@dynamo-caffeina-dev/locator-frontend 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{GoogleMapsProvider-D61GrJyl.js → GoogleMapsProvider-DQGZSsz5.js} +2 -2
- package/dist/{GoogleMapsProvider-D61GrJyl.js.map → GoogleMapsProvider-DQGZSsz5.js.map} +1 -1
- package/dist/{index-BhpoYiuQ.js → index-DZTdTGr2.js} +2546 -2521
- package/dist/{index-BhpoYiuQ.js.map → index-DZTdTGr2.js.map} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +51 -51
- package/dist/index.umd.js.map +1 -1
- package/dist/locator-frontend.css +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,112 +1,112 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(W,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],y):(W=typeof globalThis<"u"?globalThis:W||self,y(W["@dynamo-caffeina-dev/locator-frontend"]={},W.jsxRuntime,W.React,W.ReactDOM))})(this,function(W,y,g,tn){"use strict";var Ey=Object.defineProperty;var Ty=(W,y,g)=>y in W?Ey(W,y,{enumerable:!0,configurable:!0,writable:!0,value:g}):W[y]=g;var co=(W,y,g)=>Ty(W,typeof y!="symbol"?y+"":y,g);function Ml(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const K=Ml(g);var Me=(e=>(e[e.CLUSTER=0]="CLUSTER",e[e.MARKER=1]="MARKER",e))(Me||{});const uo=e=>{let t;const n=new Set,r=(c,u)=>{const d=typeof c=="function"?c(t):c;if(!Object.is(d,t)){const f=t;t=u??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(h=>h(t,f))}},o=()=>t,a={setState:r,getState:o,getInitialState:()=>l,subscribe:c=>(n.add(c),()=>n.delete(c))},l=t=e(r,o,a);return a},Pl=e=>e?uo(e):uo,Ll=e=>e;function Ol(e,t=Ll){const n=g.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return g.useDebugValue(n),n}const fo={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Nn=new Map,nn=e=>{const t=Nn.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,r])=>[n,r.getState()])):{}},kl=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const r=Nn.get(n.name);if(r)return{type:"tracked",store:e,...r};const o={connection:t.connect(n),stores:{}};return Nn.set(n.name,o),{type:"tracked",store:e,...o}},Nl=(e,t={})=>(n,r,o)=>{const{enabled:s,anonymousActionType:i,store:a,...l}=t;let c;try{c=(s??(fo?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!c)return e(n,r,o);const{connection:u,...d}=kl(a,c,l);let f=!0;o.setState=(m,v,b)=>{const C=n(m,v);if(!f)return C;const S=b===void 0?{type:i||"anonymous"}:typeof b=="string"?{type:b}:b;return a===void 0?(u==null||u.send(S,r()),C):(u==null||u.send({...S,type:`${a}/${S.type}`},{...nn(l.name),[a]:o.getState()}),C)};const h=(...m)=>{const v=f;f=!1,n(...m),f=v},p=e(o.setState,r,o);if(d.type==="untracked"?u==null||u.init(p):(d.stores[d.store]=o,u==null||u.init(Object.fromEntries(Object.entries(d.stores).map(([m,v])=>[m,m===d.store?p:v.getState()])))),o.dispatchFromDevtools&&typeof o.dispatch=="function"){let m=!1;const v=o.dispatch;o.dispatch=(...b)=>{(fo?"production":void 0)!=="production"&&b[0].type==="__setState"&&!m&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),m=!0),v(...b)}}return u.subscribe(m=>{var v;switch(m.type){case"ACTION":if(typeof m.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Dn(m.payload,b=>{if(b.type==="__setState"){if(a===void 0){h(b.state);return}Object.keys(b.state).length!==1&&console.error(`
|
|
2
2
|
[zustand devtools middleware] Unsupported __setState action format.
|
|
3
3
|
When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
|
|
4
4
|
and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
|
|
5
|
-
`);const C=b.state[a];if(C==null)return;JSON.stringify(o.getState())!==JSON.stringify(C)&&h(C);return}o.dispatchFromDevtools&&typeof o.dispatch=="function"&&o.dispatch(b)});case"DISPATCH":switch(m.payload.type){case"RESET":return h(p),a===void 0?u==null?void 0:u.init(o.getState()):u==null?void 0:u.init(
|
|
5
|
+
`);const C=b.state[a];if(C==null)return;JSON.stringify(o.getState())!==JSON.stringify(C)&&h(C);return}o.dispatchFromDevtools&&typeof o.dispatch=="function"&&o.dispatch(b)});case"DISPATCH":switch(m.payload.type){case"RESET":return h(p),a===void 0?u==null?void 0:u.init(o.getState()):u==null?void 0:u.init(nn(l.name));case"COMMIT":if(a===void 0){u==null||u.init(o.getState());return}return u==null?void 0:u.init(nn(l.name));case"ROLLBACK":return Dn(m.state,b=>{if(a===void 0){h(b),u==null||u.init(o.getState());return}h(b[a]),u==null||u.init(nn(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Dn(m.state,b=>{if(a===void 0){h(b);return}JSON.stringify(o.getState())!==JSON.stringify(b[a])&&h(b[a])});case"IMPORT_STATE":{const{nextLiftedState:b}=m.payload,C=(v=b.computedStates.slice(-1)[0])==null?void 0:v.state;if(!C)return;h(a===void 0?C:C[a]),u==null||u.send(null,b);return}case"PAUSE_RECORDING":return f=!f}return}}),p},Dn=(e,t)=>{let n;try{n=JSON.parse(e)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&t(n)},Dl={lang:"IT",labels:{"InfoWindow.CTA_1":"Percorso","InfoWindow.CTA_2":"Dettagli","LocationList.header":"Mostra {:1} {:2} nella tua area","LocationList.locationDesignator":"luoghi","LocationList.noResults":"Nessun risultato trovato","Map.areaSearchButton":"Cerca nell'area","Map.areaSearchTooltip":"Posiziona la mappa e avvia la ricerca","Map.areaSearchVisualCueCTA":"Esegui ricerca","Search.geolocationButton":"Geolocalizzati","Search.placeholder":"La tua città","ShareSheet.copyLinkErrorNotif":"Impossibile copiare il link","ShareSheet.copyLinkSuccessNotif":"Link copiato in clipboard!","ShareSheet.copyLinkTooltip":"Copia link","ShareSheet.genericShareTooltip":"Condividi su ","ShareSheet.shareViaEmailTooltip":"Condividi via email","ShareSheet.title":"Condividi"}},Il=()=>Pl()(Nl(e=>({mapId:void 0,locations:[],mapDetail:Me.CLUSTER,isFullscreen:!1,selectedLocation:"",shouldRefetch:!1,targetLocation:null,isLocationListExpanded:!1,isShareSheetOpen:!1,localizationConfig:Dl,featureFlags:{fullscreen:!0,search:!0,share:!0,withClusters:!0,withCustomMarkers:!1,withCustomInfoWindow:!1,withAreaSearch:!0},clusteringProvider:"airc",googleClustererConfig:null,customMarkers:[],customInfoWindow:null,customZoomLevels:null,presentationPrefs:null,setMapId:t=>e({mapId:t},!1,"SET_MAP_ID"),setLocations:t=>e({locations:t},!1,"SET_LOCATIONS"),setMapDetail:t=>e({mapDetail:t},!1,"SET_MAP_DETAIL"),setFullscreen:t=>e({isFullscreen:t},!1,"SET_FULLSCREEN"),setSelectedLocation:t=>e({selectedLocation:t},!1,"SET_SELECTED_LOCATION"),setShouldRefetch:t=>e({shouldRefetch:t},!1,"SET_SHOULD_REFETCH"),zoomToLocation:(t,n=15)=>e({targetLocation:{coords:t,zoom:n}},!1,"ZOOM_TO_LOCATION"),clearTargetLocation:()=>e({targetLocation:null},!1,"CLEAR_TARGET_LOCATION"),setIsLocationListExpanded:t=>e({isLocationListExpanded:t},!1,"SET_IS_LOCATION_LIST_EXPANDED"),toggleShareSheet:t=>e({isShareSheetOpen:t},!1,"TOGGLE_SHARE_SHEET"),setLocalizationConfig:t=>e(n=>({localizationConfig:{...n.localizationConfig,...t,labels:t.labels?{...n.localizationConfig.labels,...t.labels}:n.localizationConfig.labels}}),!1,"SET_LOCALIZATION_CONFIG"),setFeatureFlags:t=>e(n=>({featureFlags:{...n.featureFlags,...t}}),!1,"SET_FEATURE_FLAGS"),setCustomMarkers:t=>e({customMarkers:t},!1,"SET_CUSTOM_MARKERS"),setCustomInfoWindow:t=>e({customInfoWindow:t},!1,"SET_CUSTOM_INFO_WINDOW"),setCustomZoomLevels:t=>e({customZoomLevels:t},!1,"SET_CUSTOM_ZOOM_LEVELS"),setClusteringProvider:t=>e({clusteringProvider:t},!1,"SET_CLUSTERING_PROVIDER"),setPresentationPrefs:t=>e(n=>({presentationPrefs:n.presentationPrefs?{...n.presentationPrefs,...t}:t}),!1,"SET_PRESENTATION_PREFS")}),{name:`LocatorStore_${Date.now()}`})),ho=g.createContext(null);function Vl({children:e}){const[t]=g.useState(Il);return y.jsx(ho.Provider,{value:t,children:e})}function M(e){const t=g.useContext(ho);if(t===null)throw new Error("useLocatorStore must be used within LocatorStoreProvider");return Ol(t,e)}function po(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var In={exports:{}};/*!
|
|
6
6
|
Copyright (c) 2018 Jed Watson.
|
|
7
7
|
Licensed under the MIT License (MIT), see
|
|
8
8
|
http://jedwatson.github.io/classnames
|
|
9
|
-
*/var
|
|
9
|
+
*/var mo;function Bl(){return mo||(mo=1,function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",i=0;i<arguments.length;i++){var a=arguments[i];a&&(s=o(s,r(a)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var i="";for(var a in s)t.call(s,a)&&s[a]&&(i=o(i,a));return i}function o(s,i){return i?s?s+" "+i:s+i:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(In)),In.exports}var Fl=Bl();const j=po(Fl),go={root:"_root_q2czu_7",loaderContainer:"_loaderContainer_q2czu_121"},yo={root:"_root_17v7m_1",spinner:"_spinner_17v7m_25"};function wt({className:e,size:t="medium",color:n="primary",...r}){const o=j(yo.root,e);return y.jsx("div",{className:o,"data-size":t,"data-color":n,...r,children:y.jsx("div",{className:yo.spinner})})}const $l=g.lazy(()=>Promise.resolve().then(()=>Cy)),jl=g.lazy(()=>Promise.resolve().then(()=>xy)),zl=g.lazy(()=>Promise.resolve().then(()=>_y));function Ul({children:e,mapProvider:t}){const{name:n,APIKey:r,config:o}=t??{};if(!r||!n)throw new Error("Cannot initialize MapProvider without APIKey and name.");const s=y.jsx("div",{className:go.loaderContainer,children:y.jsx(wt,{size:"large",color:"primary"})});return y.jsx(g.Suspense,{fallback:s,children:(()=>{switch(n){case"mapbox":return y.jsx(jl,{apiKey:r,...o??{},children:e});case"here":return y.jsx(zl,{apiKey:r,...o??{},children:e});case"google":return y.jsx($l,{apiKey:r,...o??{},children:e});default:return null}})()})}const Rl={container:"_container_17c19_4"},_t={root:"_root_3405i_4",header:"_header_3405i_14",icon:"_icon_3405i_25",body:"_body_3405i_47",content:"_content_3405i_50"};/**
|
|
10
10
|
* @license lucide-react v0.483.0 - ISC
|
|
11
11
|
*
|
|
12
12
|
* This source code is licensed under the ISC license.
|
|
13
13
|
* See the LICENSE file in the root directory of this source tree.
|
|
14
|
-
*/const
|
|
14
|
+
*/const Xl=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),vo=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
15
15
|
* @license lucide-react v0.483.0 - ISC
|
|
16
16
|
*
|
|
17
17
|
* This source code is licensed under the ISC license.
|
|
18
18
|
* See the LICENSE file in the root directory of this source tree.
|
|
19
|
-
*/var
|
|
19
|
+
*/var ql={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
20
20
|
* @license lucide-react v0.483.0 - ISC
|
|
21
21
|
*
|
|
22
22
|
* This source code is licensed under the ISC license.
|
|
23
23
|
* See the LICENSE file in the root directory of this source tree.
|
|
24
|
-
*/const
|
|
24
|
+
*/const Gl=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},l)=>g.createElement("svg",{ref:l,...ql,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:vo("lucide",o),...a},[...i.map(([c,u])=>g.createElement(c,u)),...Array.isArray(s)?s:[s]]));/**
|
|
25
25
|
* @license lucide-react v0.483.0 - ISC
|
|
26
26
|
*
|
|
27
27
|
* This source code is licensed under the ISC license.
|
|
28
28
|
* See the LICENSE file in the root directory of this source tree.
|
|
29
|
-
*/const
|
|
29
|
+
*/const ee=(e,t)=>{const n=g.forwardRef(({className:r,...o},s)=>g.createElement(Gl,{ref:s,iconNode:t,className:vo(`lucide-${Xl(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
|
|
30
30
|
* @license lucide-react v0.483.0 - ISC
|
|
31
31
|
*
|
|
32
32
|
* This source code is licensed under the ISC license.
|
|
33
33
|
* See the LICENSE file in the root directory of this source tree.
|
|
34
|
-
*/const
|
|
34
|
+
*/const Wl=ee("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
35
35
|
* @license lucide-react v0.483.0 - ISC
|
|
36
36
|
*
|
|
37
37
|
* This source code is licensed under the ISC license.
|
|
38
38
|
* See the LICENSE file in the root directory of this source tree.
|
|
39
|
-
*/const Kl=
|
|
39
|
+
*/const Kl=ee("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
40
40
|
* @license lucide-react v0.483.0 - ISC
|
|
41
41
|
*
|
|
42
42
|
* This source code is licensed under the ISC license.
|
|
43
43
|
* See the LICENSE file in the root directory of this source tree.
|
|
44
|
-
*/const
|
|
44
|
+
*/const Hl=ee("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
|
|
45
45
|
* @license lucide-react v0.483.0 - ISC
|
|
46
46
|
*
|
|
47
47
|
* This source code is licensed under the ISC license.
|
|
48
48
|
* See the LICENSE file in the root directory of this source tree.
|
|
49
|
-
*/const
|
|
49
|
+
*/const Zl=ee("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
50
50
|
* @license lucide-react v0.483.0 - ISC
|
|
51
51
|
*
|
|
52
52
|
* This source code is licensed under the ISC license.
|
|
53
53
|
* See the LICENSE file in the root directory of this source tree.
|
|
54
|
-
*/const
|
|
54
|
+
*/const Yl=ee("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
55
55
|
* @license lucide-react v0.483.0 - ISC
|
|
56
56
|
*
|
|
57
57
|
* This source code is licensed under the ISC license.
|
|
58
58
|
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
-
*/const
|
|
59
|
+
*/const Jl=ee("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
60
60
|
* @license lucide-react v0.483.0 - ISC
|
|
61
61
|
*
|
|
62
62
|
* This source code is licensed under the ISC license.
|
|
63
63
|
* See the LICENSE file in the root directory of this source tree.
|
|
64
|
-
*/const
|
|
64
|
+
*/const Ql=ee("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
65
65
|
* @license lucide-react v0.483.0 - ISC
|
|
66
66
|
*
|
|
67
67
|
* This source code is licensed under the ISC license.
|
|
68
68
|
* See the LICENSE file in the root directory of this source tree.
|
|
69
|
-
*/const
|
|
69
|
+
*/const ec=ee("Crosshair",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]]);/**
|
|
70
70
|
* @license lucide-react v0.483.0 - ISC
|
|
71
71
|
*
|
|
72
72
|
* This source code is licensed under the ISC license.
|
|
73
73
|
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
-
*/const
|
|
74
|
+
*/const tc=ee("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
|
|
75
75
|
* @license lucide-react v0.483.0 - ISC
|
|
76
76
|
*
|
|
77
77
|
* This source code is licensed under the ISC license.
|
|
78
78
|
* See the LICENSE file in the root directory of this source tree.
|
|
79
|
-
*/const
|
|
79
|
+
*/const nc=ee("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
|
|
80
80
|
* @license lucide-react v0.483.0 - ISC
|
|
81
81
|
*
|
|
82
82
|
* This source code is licensed under the ISC license.
|
|
83
83
|
* See the LICENSE file in the root directory of this source tree.
|
|
84
|
-
*/const
|
|
84
|
+
*/const rc=ee("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
|
|
85
85
|
* @license lucide-react v0.483.0 - ISC
|
|
86
86
|
*
|
|
87
87
|
* This source code is licensed under the ISC license.
|
|
88
88
|
* See the LICENSE file in the root directory of this source tree.
|
|
89
|
-
*/const
|
|
89
|
+
*/const oc=ee("ScanSearch",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m16 16-1.9-1.9",key:"1dq9hf"}]]);/**
|
|
90
90
|
* @license lucide-react v0.483.0 - ISC
|
|
91
91
|
*
|
|
92
92
|
* This source code is licensed under the ISC license.
|
|
93
93
|
* See the LICENSE file in the root directory of this source tree.
|
|
94
|
-
*/const
|
|
94
|
+
*/const sc=ee("Scan",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]]);/**
|
|
95
95
|
* @license lucide-react v0.483.0 - ISC
|
|
96
96
|
*
|
|
97
97
|
* This source code is licensed under the ISC license.
|
|
98
98
|
* See the LICENSE file in the root directory of this source tree.
|
|
99
|
-
*/const
|
|
99
|
+
*/const ic=ee("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
100
100
|
* @license lucide-react v0.483.0 - ISC
|
|
101
101
|
*
|
|
102
102
|
* This source code is licensed under the ISC license.
|
|
103
103
|
* See the LICENSE file in the root directory of this source tree.
|
|
104
|
-
*/const
|
|
104
|
+
*/const ac=ee("SquareArrowOutUpRight",[["path",{d:"M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6",key:"y09zxi"}],["path",{d:"m21 3-9 9",key:"mpx6sq"}],["path",{d:"M15 3h6v6",key:"1q9fwt"}]]);/**
|
|
105
105
|
* @license lucide-react v0.483.0 - ISC
|
|
106
106
|
*
|
|
107
107
|
* This source code is licensed under the ISC license.
|
|
108
108
|
* See the LICENSE file in the root directory of this source tree.
|
|
109
|
-
*/const Co=Q("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),So=g.createContext({});function cc(e){const t=g.useRef(null);return t.current===null&&(t.current=e()),t.current}const Fn=typeof window<"u",uc=Fn?g.useLayoutEffect:g.useEffect,$n=g.createContext(null),wo=g.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function dc(e=!0){const t=g.useContext($n);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=g.useId();g.useEffect(()=>{if(e)return o(s)},[e]);const i=g.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,i]:[!0]}function jn(e,t){e.indexOf(t)===-1&&e.push(t)}function zn(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const se=e=>e;let ct=se,Pe=se;process.env.NODE_ENV!=="production"&&(ct=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Pe=(e,t)=>{if(!e)throw new Error(t)});const fc={useManualTiming:!1};function Un(e){let t;return()=>(t===void 0&&(t=e()),t)}const ut=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Rn{constructor(){this.subscriptions=[]}add(t){return jn(this.subscriptions,t),()=>zn(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const i=this.subscriptions[s];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const fe=e=>e*1e3,be=e=>e/1e3;function xo(e,t){return t?e*(1e3/t):0}const _o=new Set;function on(e,t,n){e||_o.has(t)||(console.warn(t),_o.add(t))}const hc=Un(()=>window.ScrollTimeline!==void 0);class pc{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(o=>{if(hc()&&o.attachTimeline)return o.attachTimeline(t);if(typeof n=="function")return n(o)});return()=>{r.forEach((o,s)=>{o&&o(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class mc extends pc{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function Xn(e,t){return e?e[t]||e.default||e:void 0}const qn=2e4;function Eo(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<qn;)t+=n,r=e.next(t);return t>=qn?1/0:t}function Gn(e){return typeof e=="function"}function To(e,t){e.timeline=t,e.onfinish=null}const Wn=e=>Array.isArray(e)&&typeof e[0]=="number",gc={linearEasing:void 0};function yc(e,t){const n=Un(e);return()=>{var r;return(r=gc[t])!==null&&r!==void 0?r:n()}}const sn=yc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ao=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let s=0;s<o;s++)r+=e(ut(0,o-1,s))+", ";return`linear(${r.substring(0,r.length-2)})`};function Mo(e){return!!(typeof e=="function"&&sn()||!e||typeof e=="string"&&(e in Hn||sn())||Wn(e)||Array.isArray(e)&&e.every(Mo))}const Et=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Hn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Et([0,.65,.55,1]),circOut:Et([.55,0,1,.45]),backIn:Et([.31,.01,.66,-.59]),backOut:Et([.33,1.53,.69,.99])};function Po(e,t){if(e)return typeof e=="function"&&sn()?Ao(e,t):Wn(e)?Et(e):Array.isArray(e)?e.map(n=>Po(n,t)||Hn.easeOut):Hn[e]}const an=["read","resolveKeyframes","update","preRender","render","postRender"],Lo={value:null};function vc(e,t){let n=new Set,r=new Set,o=!1,s=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(d){i.has(d)&&(u.schedule(d),e()),l++,d(a)}const u={schedule:(d,f=!1,h=!1)=>{const m=h&&o?n:r;return f&&i.add(d),m.has(d)||m.add(d),d},cancel:d=>{r.delete(d),i.delete(d)},process:d=>{if(a=d,o){s=!0;return}o=!0,[n,r]=[r,n],n.forEach(c),t&&Lo.value&&Lo.value.frameloop[t].push(l),l=0,n.clear(),o=!1,s&&(s=!1,u.process(d))}};return u}const bc=40;function Oo(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=an.reduce((b,C)=>(b[C]=vc(s,t?C:void 0),b),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=i,h=()=>{const b=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(b-o.timestamp,bc),1),o.timestamp=b,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(h))},p=()=>{n=!0,r=!0,o.isProcessing||e(h)};return{schedule:an.reduce((b,C)=>{const S=i[C];return b[C]=(_,w=!1,E=!1)=>(n||p(),S.schedule(_,w,E)),b},{}),cancel:b=>{for(let C=0;C<an.length;C++)i[an[C]].cancel(b)},state:o,steps:i}}const{schedule:B,cancel:Le,state:Z,steps:Kn}=Oo(typeof requestAnimationFrame<"u"?requestAnimationFrame:se,!0),{schedule:Zn}=Oo(queueMicrotask,!1);let ln;function Cc(){ln=void 0}const he={now:()=>(ln===void 0&&he.set(Z.isProcessing||fc.useManualTiming?Z.timestamp:performance.now()),ln),set:e=>{ln=e,queueMicrotask(Cc)}},de={x:!1,y:!1};function ko(){return de.x||de.y}function Sc(e){return e==="x"||e==="y"?de[e]?null:(de[e]=!0,()=>{de[e]=!1}):de.x||de.y?null:(de.x=de.y=!0,()=>{de.x=de.y=!1})}function wc(e,t,n){var r;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;const s=(r=void 0)!==null&&r!==void 0?r:o.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}function Do(e,t){const n=wc(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function No(e){return!(e.pointerType==="touch"||ko())}function xc(e,t,n={}){const[r,o,s]=Do(e,n),i=a=>{if(!No(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{No(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(a=>{a.addEventListener("pointerenter",i,o)}),s}function Io(e,t){const n=`${t}PointerCapture`;if(e.target instanceof Element&&n in e.target&&e.pointerId!==void 0)try{e.target[n](e.pointerId)}catch{}}const Vo=(e,t)=>t?e===t?!0:Vo(e,t.parentElement):!1,Yn=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,_c=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ec(e){return _c.has(e.tagName)||e.tabIndex!==-1}const Tt=new WeakSet;function Bo(e){return t=>{t.key==="Enter"&&e(t)}}function Jn(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Tc=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Bo(()=>{if(Tt.has(n))return;Jn(n,"down");const o=Bo(()=>{Jn(n,"up")}),s=()=>Jn(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Fo(e){return Yn(e)&&!ko()}function Ac(e,t,n={}){const[r,o,s]=Do(e,n),i=a=>{const l=a.currentTarget;if(!l||!Fo(a)||Tt.has(l))return;Tt.add(l),Io(a,"set");const c=t(l,a),u=(h,p)=>{l.removeEventListener("pointerup",d),l.removeEventListener("pointercancel",f),Io(h,"release"),!(!Fo(h)||!Tt.has(l))&&(Tt.delete(l),typeof c=="function"&&c(h,{success:p}))},d=h=>{(h.isTrusted?Mc(h,l instanceof Element?l.getBoundingClientRect():{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}):!1)?u(h,!1):u(h,!(l instanceof Element)||Vo(l,h.target))},f=h=>{u(h,!1)};l.addEventListener("pointerup",d,o),l.addEventListener("pointercancel",f,o),l.addEventListener("lostpointercapture",f,o)};return r.forEach(a=>{a=n.useGlobalTarget?window:a;let l=!1;a instanceof HTMLElement&&(l=!0,!Ec(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0)),a.addEventListener("pointerdown",i,o),l&&a.addEventListener("focus",c=>Tc(c,o),o)}),s}function Mc(e,t){return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}const $o=30,Pc=e=>!isNaN(parseFloat(e));class Lc{constructor(t,n={}){this.version="12.5.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const s=he.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=he.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Pc(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&on(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Rn);const r=this.events[t].add(n);return t==="change"?()=>{r(),B.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=he.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>$o)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,$o);return xo(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function At(e,t){return new Lc(e,t)}const jo=g.createContext({strict:!1}),zo={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},dt={};for(const e in zo)dt[e]={isEnabled:t=>zo[e].some(n=>!!t[n])};function Oc(e){for(const t in e)dt[t]={...dt[t],...e[t]}}const kc=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function cn(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||kc.has(e)}let Uo=e=>!cn(e);function Dc(e){e&&(Uo=t=>t.startsWith("on")?!cn(t):e(t))}try{Dc(require("@emotion/is-prop-valid").default)}catch{}function Nc(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Uo(o)||n===!0&&cn(o)||!t&&!cn(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Ic(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&on(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const un=g.createContext({});function dn(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Mt(e){return typeof e=="string"||Array.isArray(e)}const Qn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],er=["initial",...Qn];function fn(e){return dn(e.animate)||er.some(t=>Mt(e[t]))}function Ro(e){return!!(fn(e)||e.variants)}function Vc(e,t){if(fn(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Mt(n)?n:void 0,animate:Mt(r)?r:void 0}}return e.inherit!==!1?t:{}}function Bc(e){const{initial:t,animate:n}=Vc(e,g.useContext(un));return g.useMemo(()=>({initial:t,animate:n}),[Xo(t),Xo(n)])}function Xo(e){return Array.isArray(e)?e.join(" "):e}const Fc=Symbol.for("motionComponentSymbol");function ft(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function $c(e,t,n){return g.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):ft(n)&&(n.current=r))},[t])}const tr=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),qo="data-"+tr("framerAppearId"),Go=g.createContext({});function jc(e,t,n,r,o){var s,i;const{visualElement:a}=g.useContext(un),l=g.useContext(jo),c=g.useContext($n),u=g.useContext(wo).reducedMotion,d=g.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const f=d.current,h=g.useContext(Go);f&&!f.projection&&o&&(f.type==="html"||f.type==="svg")&&zc(d.current,n,o,h);const p=g.useRef(!1);g.useInsertionEffect(()=>{f&&p.current&&f.update(n,c)});const m=n[qo],v=g.useRef(!!m&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,m))&&((i=window.MotionHasOptimisedAnimation)===null||i===void 0?void 0:i.call(window,m)));return uc(()=>{f&&(p.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Zn.render(f.render),v.current&&f.animationState&&f.animationState.animateChanges())}),g.useEffect(()=>{f&&(!v.current&&f.animationState&&f.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)===null||b===void 0||b.call(window,m)}),v.current=!1))}),f}function zc(e,t,n,r){const{layoutId:o,layout:s,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Wo(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&ft(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function Wo(e){if(e)return e.options.allowProjection!==!1?e.projection:Wo(e.parent)}function Uc({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var s,i;e&&Oc(e);function a(c,u){let d;const f={...g.useContext(wo),...c,layoutId:Rc(c)},{isStatic:h}=f,p=Bc(c),m=r(c,h);if(!h&&Fn){Xc(f,e);const v=qc(f);d=v.MeasureLayout,p.visualElement=jc(o,m,f,t,v.ProjectionNode)}return y.jsxs(un.Provider,{value:p,children:[d&&p.visualElement?y.jsx(d,{visualElement:p.visualElement,...f}):null,n(o,c,$c(m,p.visualElement,u),m,h,p.visualElement)]})}a.displayName=`motion.${typeof o=="string"?o:`create(${(i=(s=o.displayName)!==null&&s!==void 0?s:o.name)!==null&&i!==void 0?i:""})`}`;const l=g.forwardRef(a);return l[Fc]=o,l}function Rc({layoutId:e}){const t=g.useContext(So).id;return t&&e!==void 0?t+"-"+e:e}function Xc(e,t){const n=g.useContext(jo).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?ct(!1,r):Pe(!1,r)}}function qc(e){const{drag:t,layout:n}=dt;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Ho=e=>t=>typeof t=="string"&&t.startsWith(e),nr=Ho("--"),Gc=Ho("var(--"),rr=e=>Gc(e)?Wc.test(e.split("/*")[0].trim()):!1,Wc=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Pt={};function Hc(e){for(const t in e)Pt[t]=e[t],nr(t)&&(Pt[t].isCSSVariable=!0)}const ht=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],We=new Set(ht);function Ko(e,{layout:t,layoutId:n}){return We.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Pt[e]||e==="opacity")}const ee=e=>!!(e&&e.getVelocity),Zo=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Ce=(e,t,n)=>n>t?t:n<e?e:n,pt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Lt={...pt,transform:e=>Ce(0,1,e)},hn={...pt,default:1},Ot=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Oe=Ot("deg"),pe=Ot("%"),k=Ot("px"),Kc=Ot("vh"),Zc=Ot("vw"),Yo={...pe,parse:e=>pe.parse(e)/100,transform:e=>pe.transform(e*100)},Yc={borderWidth:k,borderTopWidth:k,borderRightWidth:k,borderBottomWidth:k,borderLeftWidth:k,borderRadius:k,radius:k,borderTopLeftRadius:k,borderTopRightRadius:k,borderBottomRightRadius:k,borderBottomLeftRadius:k,width:k,maxWidth:k,height:k,maxHeight:k,top:k,right:k,bottom:k,left:k,padding:k,paddingTop:k,paddingRight:k,paddingBottom:k,paddingLeft:k,margin:k,marginTop:k,marginRight:k,marginBottom:k,marginLeft:k,backgroundPositionX:k,backgroundPositionY:k},Jc={rotate:Oe,rotateX:Oe,rotateY:Oe,rotateZ:Oe,scale:hn,scaleX:hn,scaleY:hn,scaleZ:hn,skew:Oe,skewX:Oe,skewY:Oe,distance:k,translateX:k,translateY:k,translateZ:k,x:k,y:k,z:k,perspective:k,transformPerspective:k,opacity:Lt,originX:Yo,originY:Yo,originZ:k},Jo={...pt,transform:Math.round},or={...Yc,...Jc,zIndex:Jo,size:k,fillOpacity:Lt,strokeOpacity:Lt,numOctaves:Jo},Qc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},eu=ht.length;function tu(e,t,n){let r="",o=!0;for(let s=0;s<eu;s++){const i=ht[s],a=e[i];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(i.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=Zo(a,or[i]);if(!l){o=!1;const u=Qc[i]||i;r+=`${u}(${c}) `}n&&(t[i]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function sr(e,t,n){const{style:r,vars:o,transformOrigin:s}=e;let i=!1,a=!1;for(const l in t){const c=t[l];if(We.has(l)){i=!0;continue}else if(nr(l)){o[l]=c;continue}else{const u=Zo(c,or[l]);l.startsWith("origin")?(a=!0,s[l]=u):r[l]=u}}if(t.transform||(i||n?r.transform=tu(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=s;r.transformOrigin=`${l} ${c} ${u}`}}const ir=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Qo(e,t,n){for(const r in t)!ee(t[r])&&!Ko(r,n)&&(e[r]=t[r])}function nu({transformTemplate:e},t){return g.useMemo(()=>{const n=ir();return sr(n,t,e),Object.assign({},n.vars,n.style)},[t])}function ru(e,t){const n=e.style||{},r={};return Qo(r,n,e),Object.assign(r,nu(e,t)),r}function ou(e,t){const n={},r=ru(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const su=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function ar(e){return typeof e!="string"||e.includes("-")?!1:!!(su.indexOf(e)>-1||/[A-Z]/u.test(e))}const iu={offset:"stroke-dashoffset",array:"stroke-dasharray"},au={offset:"strokeDashoffset",array:"strokeDasharray"};function lu(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?iu:au;e[s.offset]=k.transform(-r);const i=k.transform(t),a=k.transform(n);e[s.array]=`${i} ${a}`}function es(e,t,n){return typeof e=="string"?e:k.transform(t+n*e)}function cu(e,t,n){const r=es(t,e.x,e.width),o=es(n,e.y,e.height);return`${r} ${o}`}function lr(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(sr(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h,dimensions:p}=e;f.transform&&(p&&(h.transform=f.transform),delete f.transform),p&&(o!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=cu(p,o!==void 0?o:.5,s!==void 0?s:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&lu(f,i,a,l,!1)}const ts=()=>({...ir(),attrs:{}}),cr=e=>typeof e=="string"&&e.toLowerCase()==="svg";function uu(e,t,n,r){const o=g.useMemo(()=>{const s=ts();return lr(s,t,cr(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Qo(s,e.style,e),o.style={...s,...o.style}}return o}function du(e=!1){return(n,r,o,{latestValues:s},i)=>{const l=(ar(n)?uu:ou)(r,s,i,n),c=Nc(r,typeof n=="string",e),u=n!==g.Fragment?{...c,...l,ref:o}:{},{children:d}=r,f=g.useMemo(()=>ee(d)?d.get():d,[d]);return g.createElement(n,{...u,children:f})}}function ns(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function ur(e,t,n,r){if(typeof t=="function"){const[o,s]=ns(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=ns(r);t=t(n!==void 0?n:e.custom,o,s)}return t}const dr=e=>Array.isArray(e),fu=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),hu=e=>dr(e)?e[e.length-1]||0:e;function pn(e){const t=ee(e)?e.get():e;return fu(t)?t.toValue():t}function pu({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,s){const i={latestValues:mu(r,o,s,e),renderState:t()};return n&&(i.onMount=a=>n({props:r,current:a,...i}),i.onUpdate=a=>n(a)),i}const rs=e=>(t,n)=>{const r=g.useContext(un),o=g.useContext($n),s=()=>pu(e,t,r,o);return n?s():cc(s)};function mu(e,t,n,r){const o={},s=r(e,{});for(const f in s)o[f]=pn(s[f]);let{initial:i,animate:a}=e;const l=fn(e),c=Ro(e);t&&c&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||i===!1;const d=u?a:i;if(d&&typeof d!="boolean"&&!dn(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const p=ur(e,f[h]);if(p){const{transitionEnd:m,transition:v,...b}=p;for(const C in b){let S=b[C];if(Array.isArray(S)){const _=u?S.length-1:0;S=S[_]}S!==null&&(o[C]=S)}for(const C in m)o[C]=m[C]}}}return o}function fr(e,t,n){var r;const{style:o}=e,s={};for(const i in o)(ee(o[i])||t.style&&ee(t.style[i])||Ko(i,e)||((r=n==null?void 0:n.getValue(i))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[i]=o[i]);return s}const gu={useVisualState:rs({scrapeMotionValuesFromProps:fr,createRenderState:ir})};function os(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function ss(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const is=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function as(e,t,n,r){ss(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(is.has(o)?o:tr(o),t.attrs[o])}function ls(e,t,n){const r=fr(e,t,n);for(const o in e)if(ee(e[o])||ee(t[o])){const s=ht.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}const cs=["x","y","width","height","cx","cy","r"],yu={useVisualState:rs({scrapeMotionValuesFromProps:ls,createRenderState:ts,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let s=!!e.drag;if(!s){for(const a in o)if(We.has(a)){s=!0;break}}if(!s)return;let i=!t;if(t)for(let a=0;a<cs.length;a++){const l=cs[a];e[l]!==t[l]&&(i=!0)}i&&B.read(()=>{os(n,r),B.render(()=>{lr(r,o,cr(n.tagName),e.transformTemplate),as(n,r)})})}})};function vu(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const i={...ar(r)?yu:gu,preloadedFeatures:e,useRender:du(o),createVisualElement:t,Component:r};return Uc(i)}}function kt(e,t,n){const r=e.getProps();return ur(r,t,n!==void 0?n:r.custom,e)}const us=new Set(["width","height","top","left","right","bottom",...ht]);function bu(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,At(n))}function Cu(e,t){const n=kt(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=hu(s[i]);bu(e,i,a)}}function Su(e){return!!(ee(e)&&e.add)}function hr(e,t){const n=e.getValue("willChange");if(Su(n))return n.add(t)}function ds(e){return e.props[qo]}const fs=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,wu=1e-7,xu=12;function _u(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=fs(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>wu&&++a<xu);return i}function Dt(e,t,n,r){if(e===t&&n===r)return se;const o=s=>_u(s,0,1,e,n);return s=>s===0||s===1?s:fs(o(s),t,r)}const hs=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ps=e=>t=>1-e(1-t),ms=Dt(.33,1.53,.69,.99),pr=ps(ms),gs=hs(pr),ys=e=>(e*=2)<1?.5*pr(e):.5*(2-Math.pow(2,-10*(e-1))),mr=e=>1-Math.sin(Math.acos(e)),vs=ps(mr),bs=hs(mr),Cs=e=>/^0[^.\s]+$/u.test(e);function Eu(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Cs(e):!0}const Nt=e=>Math.round(e*1e5)/1e5,gr=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Tu(e){return e==null}const Au=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,yr=(e,t)=>n=>!!(typeof n=="string"&&Au.test(n)&&n.startsWith(e)||t&&!Tu(n)&&Object.prototype.hasOwnProperty.call(n,t)),Ss=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,s,i,a]=r.match(gr);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},Mu=e=>Ce(0,255,e),vr={...pt,transform:e=>Math.round(Mu(e))},He={test:yr("rgb","red"),parse:Ss("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+vr.transform(e)+", "+vr.transform(t)+", "+vr.transform(n)+", "+Nt(Lt.transform(r))+")"};function Pu(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const br={test:yr("#"),parse:Pu,transform:He.transform},mt={test:yr("hsl","hue"),parse:Ss("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+pe.transform(Nt(t))+", "+pe.transform(Nt(n))+", "+Nt(Lt.transform(r))+")"},te={test:e=>He.test(e)||br.test(e)||mt.test(e),parse:e=>He.test(e)?He.parse(e):mt.test(e)?mt.parse(e):br.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?He.transform(e):mt.transform(e)},Lu=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Ou(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(gr))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Lu))===null||n===void 0?void 0:n.length)||0)>0}const ws="number",xs="color",ku="var",Du="var(",_s="${}",Nu=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function It(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(Nu,l=>(te.test(l)?(r.color.push(s),o.push(xs),n.push(te.parse(l))):l.startsWith(Du)?(r.var.push(s),o.push(ku),n.push(l)):(r.number.push(s),o.push(ws),n.push(parseFloat(l))),++s,_s)).split(_s);return{values:n,split:a,indexes:r,types:o}}function Es(e){return It(e).values}function Ts(e){const{split:t,types:n}=It(e),r=t.length;return o=>{let s="";for(let i=0;i<r;i++)if(s+=t[i],o[i]!==void 0){const a=n[i];a===ws?s+=Nt(o[i]):a===xs?s+=te.transform(o[i]):s+=o[i]}return s}}const Iu=e=>typeof e=="number"?0:e;function Vu(e){const t=Es(e);return Ts(e)(t.map(Iu))}const ke={test:Ou,parse:Es,createTransformer:Ts,getAnimatableNone:Vu},Bu=new Set(["brightness","contrast","saturate","opacity"]);function Fu(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(gr)||[];if(!r)return e;const o=n.replace(r,"");let s=Bu.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const $u=/\b([a-z-]*)\(.*?\)/gu,Cr={...ke,getAnimatableNone:e=>{const t=e.match($u);return t?t.map(Fu).join(" "):e}},ju={...or,color:te,backgroundColor:te,outlineColor:te,fill:te,stroke:te,borderColor:te,borderTopColor:te,borderRightColor:te,borderBottomColor:te,borderLeftColor:te,filter:Cr,WebkitFilter:Cr},As=e=>ju[e];function Ms(e,t){let n=As(e);return n!==Cr&&(n=ke),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const zu=new Set(["auto","none","0"]);function Uu(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!zu.has(s)&&It(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=Ms(n,o)}const Ke=e=>e*180/Math.PI,Sr=e=>{const t=Ke(Math.atan2(e[1],e[0]));return wr(t)},Ru={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Sr,rotateZ:Sr,skewX:e=>Ke(Math.atan(e[1])),skewY:e=>Ke(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},wr=e=>(e=e%360,e<0&&(e+=360),e),Ps=Sr,Ls=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Os=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Xu={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ls,scaleY:Os,scale:e=>(Ls(e)+Os(e))/2,rotateX:e=>wr(Ke(Math.atan2(e[6],e[5]))),rotateY:e=>wr(Ke(Math.atan2(-e[2],e[0]))),rotateZ:Ps,rotate:Ps,skewX:e=>Ke(Math.atan(e[4])),skewY:e=>Ke(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function ks(e){return e.includes("scale")?1:0}function xr(e,t){if(!e||e==="none")return ks(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=Xu,o=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Ru,o=a}if(!o)return ks(t);const s=r[t],i=o[1].split(",").map(Gu);return typeof s=="function"?s(i):i[s]}const qu=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return xr(n,t)};function Gu(e){return parseFloat(e.trim())}const Ds=e=>e===pt||e===k,Wu=new Set(["x","y","z"]),Hu=ht.filter(e=>!Wu.has(e));function Ku(e){const t=[];return Hu.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const gt={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>xr(t,"x"),y:(e,{transform:t})=>xr(t,"y")};gt.translateX=gt.x,gt.translateY=gt.y;const Ze=new Set;let _r=!1,Er=!1;function Ns(){if(Er){const e=Array.from(Ze).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=Ku(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([s,i])=>{var a;(a=r.getValue(s))===null||a===void 0||a.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Er=!1,_r=!1,Ze.forEach(e=>e.complete()),Ze.clear()}function Is(){Ze.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Er=!0)})}function Zu(){Is(),Ns()}class Tr{constructor(t,n,r,o,s,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ze.add(this),_r||(_r=!0,B.read(Is),B.resolveKeyframes(Ns))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const i=o==null?void 0:o.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Ze.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ze.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Vs=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Yu=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ju(e){const t=Yu.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const Qu=4;function Bs(e,t,n=1){Pe(n<=Qu,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=Ju(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return Vs(i)?parseFloat(i):i}return rr(o)?Bs(o,t,n+1):o}const Fs=e=>t=>t.test(e),$s=[pt,k,pe,Oe,Zc,Kc,{test:e=>e==="auto",parse:e=>e}],js=e=>$s.find(Fs(e));class zs extends Tr{constructor(t,n,r,o,s){super(t,n,r,o,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),rr(c))){const u=Bs(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!us.has(r)||t.length!==2)return;const[o,s]=t,i=js(o),a=js(s);if(i!==a)if(Ds(i)&&Ds(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)Eu(t[o])&&r.push(o);r.length&&Uu(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=gt[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n||!n.current)return;const s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const i=o.length-1,a=o[i];o[i]=gt[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const Us=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ke.test(e)||e==="0")&&!e.startsWith("url("));function ed(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function td(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],i=Us(o,t),a=Us(s,t);return ct(i===a,`You are trying to animate ${t} from "${o}" to "${s}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${s} via the \`style\` property.`),!i||!a?!1:ed(e)||(n==="spring"||Gn(n))&&r}const nd=e=>e!==null;function mn(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(nd),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}const rd=40;class Rs{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=he.now(),this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:i,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>rd?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Zu(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=he.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:s,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!td(t,r,o,s))if(i)this.options.duration=0;else{l&&l(mn(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const z=(e,t,n)=>e+(t-e)*n;function Ar(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function od({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,i=0;if(!t)o=s=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=Ar(l,a,e+1/3),s=Ar(l,a,e),i=Ar(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function gn(e,t){return n=>n>0?t:e}const Mr=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},sd=[br,He,mt],id=e=>sd.find(t=>t.test(e));function Xs(e){const t=id(e);if(ct(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===mt&&(n=od(n)),n}const qs=(e,t)=>{const n=Xs(e),r=Xs(t);if(!n||!r)return gn(e,t);const o={...n};return s=>(o.red=Mr(n.red,r.red,s),o.green=Mr(n.green,r.green,s),o.blue=Mr(n.blue,r.blue,s),o.alpha=z(n.alpha,r.alpha,s),He.transform(o))},ad=(e,t)=>n=>t(e(n)),Vt=(...e)=>e.reduce(ad),Pr=new Set(["none","hidden"]);function ld(e,t){return Pr.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function cd(e,t){return n=>z(e,t,n)}function Lr(e){return typeof e=="number"?cd:typeof e=="string"?rr(e)?gn:te.test(e)?qs:fd:Array.isArray(e)?Gs:typeof e=="object"?te.test(e)?qs:ud:gn}function Gs(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>Lr(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function ud(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Lr(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function dd(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],a=e.indexes[i][o[i]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[s]=l,o[i]++}return r}const fd=(e,t)=>{const n=ke.createTransformer(t),r=It(e),o=It(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Pr.has(e)&&!o.values.length||Pr.has(t)&&!r.values.length?ld(e,t):Vt(Gs(dd(r,o),o.values),n):(ct(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),gn(e,t))};function Ws(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?z(e,t,n):Lr(e)(e,t)}const hd=5;function Hs(e,t,n){const r=Math.max(t-hd,0);return xo(n-e(r),t-r)}const U={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Ks=.001;function pd({duration:e=U.duration,bounce:t=U.bounce,velocity:n=U.velocity,mass:r=U.mass}){let o,s;ct(e<=fe(U.maxDuration),"Spring duration must be 10 seconds or less");let i=1-t;i=Ce(U.minDamping,U.maxDamping,i),e=Ce(U.minDuration,U.maxDuration,be(e)),i<1?(o=c=>{const u=c*i,d=u*e,f=u-n,h=Or(c,i),p=Math.exp(-d);return Ks-f/h*p},s=c=>{const d=c*i*e,f=d*n+n,h=Math.pow(i,2)*Math.pow(c,2)*e,p=Math.exp(-d),m=Or(Math.pow(c,2),i);return(-o(c)+Ks>0?-1:1)*((f-h)*p)/m}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-.001+u*d},s=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=gd(o,s,a);if(e=fe(e),isNaN(l))return{stiffness:U.stiffness,damping:U.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const md=12;function gd(e,t,n){let r=n;for(let o=1;o<md;o++)r=r-e(r)/t(r);return r}function Or(e,t){return e*Math.sqrt(1-t*t)}const yd=["duration","bounce"],vd=["stiffness","damping","mass"];function Zs(e,t){return t.some(n=>e[n]!==void 0)}function bd(e){let t={velocity:U.velocity,stiffness:U.stiffness,damping:U.damping,mass:U.mass,isResolvedFromDuration:!1,...e};if(!Zs(e,vd)&&Zs(e,yd))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,s=2*Ce(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:U.mass,stiffness:o,damping:s}}else{const n=pd(e);t={...t,...n,mass:U.mass},t.isResolvedFromDuration=!0}return t}function Ys(e=U.visualDuration,t=U.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const s=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:h}=bd({...n,velocity:-be(n.velocity||0)}),p=f||0,m=c/(2*Math.sqrt(l*u)),v=i-s,b=be(Math.sqrt(l/u)),C=Math.abs(v)<5;r||(r=C?U.restSpeed.granular:U.restSpeed.default),o||(o=C?U.restDelta.granular:U.restDelta.default);let S;if(m<1){const w=Or(b,m);S=E=>{const x=Math.exp(-m*b*E);return i-x*((p+m*b*v)/w*Math.sin(w*E)+v*Math.cos(w*E))}}else if(m===1)S=w=>i-Math.exp(-b*w)*(v+(p+b*v)*w);else{const w=b*Math.sqrt(m*m-1);S=E=>{const x=Math.exp(-m*b*E),T=Math.min(w*E,300);return i-x*((p+m*b*v)*Math.sinh(T)+w*v*Math.cosh(T))/w}}const _={calculatedDuration:h&&d||null,next:w=>{const E=S(w);if(h)a.done=w>=d;else{let x=0;m<1&&(x=w===0?fe(p):Hs(S,w,E));const T=Math.abs(x)<=r,D=Math.abs(i-E)<=o;a.done=T&&D}return a.value=a.done?i:E,a},toString:()=>{const w=Math.min(Eo(_),qn),E=Ao(x=>_.next(w*x).value,w,30);return w+"ms "+E}};return _}function Js({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},h=T=>a!==void 0&&T<a||l!==void 0&&T>l,p=T=>a===void 0?l:l===void 0||Math.abs(a-T)<Math.abs(l-T)?a:l;let m=n*t;const v=d+m,b=i===void 0?v:i(v);b!==v&&(m=b-d);const C=T=>-m*Math.exp(-T/r),S=T=>b+C(T),_=T=>{const D=C(T),O=S(T);f.done=Math.abs(D)<=c,f.value=f.done?b:O};let w,E;const x=T=>{h(f.value)&&(w=T,E=Ys({keyframes:[f.value,p(f.value)],velocity:Hs(S,T,f.value),damping:o,stiffness:s,restDelta:c,restSpeed:u}))};return x(0),{calculatedDuration:null,next:T=>{let D=!1;return!E&&w===void 0&&(D=!0,_(T),x(T)),w!==void 0&&T>=w?E.next(T-w):(!D&&_(T),f)}}}const Cd=Dt(.42,0,1,1),Sd=Dt(0,0,.58,1),Qs=Dt(.42,0,.58,1),wd=e=>Array.isArray(e)&&typeof e[0]!="number",ei={linear:se,easeIn:Cd,easeInOut:Qs,easeOut:Sd,circIn:mr,circInOut:bs,circOut:vs,backIn:pr,backInOut:gs,backOut:ms,anticipate:ys},ti=e=>{if(Wn(e)){Pe(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Dt(t,n,r,o)}else if(typeof e=="string")return Pe(ei[e]!==void 0,`Invalid easing type '${e}'`),ei[e];return e};function xd(e,t,n){const r=[],o=n||Ws,s=e.length-1;for(let i=0;i<s;i++){let a=o(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||se:t;a=Vt(l,a)}r.push(a)}return r}function _d(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(Pe(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=xd(t,r,o),l=a.length,c=u=>{if(i&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=ut(e[d],e[d+1],u);return a[d](f)};return n?u=>c(Ce(e[0],e[s-1],u)):c}function Ed(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=ut(0,t,r);e.push(z(n,1,o))}}function Td(e){const t=[0];return Ed(t,e.length-1),t}function Ad(e,t){return e.map(n=>n*t)}function Md(e,t){return e.map(()=>t||Qs).splice(0,e.length-1)}function Bt({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=wd(r)?r.map(ti):ti(r),s={done:!1,value:t[0]},i=Ad(n&&n.length===t.length?n:Td(t),e),a=_d(i,t,{ease:Array.isArray(o)?o:Md(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const Pd=e=>{const t=({timestamp:n})=>e(n);return{start:()=>B.update(t,!0),stop:()=>Le(t),now:()=>Z.isProcessing?Z.timestamp:he.now()}},Ld={decay:Js,inertia:Js,tween:Bt,keyframes:Bt,spring:Ys},Od=e=>e/100;class kr extends Rs{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:o,keyframes:s}=this.options,i=(o==null?void 0:o.KeyframeResolver)||Tr,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new i(s,a,n,r,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:i=0}=this.options,a=Gn(n)?n:Ld[n]||Bt;let l,c;process.env.NODE_ENV!=="production"&&a!==Bt&&Pe(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),a!==Bt&&typeof t[0]!="number"&&(l=Vt(Od,Ws(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});s==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=Eo(u));const{calculatedDuration:d}=u,f=d+o,h=f*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:h}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:T}=this.options;return{done:!0,value:T[T.length-1]}}const{finalKeyframe:o,generator:s,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return s.next(0);const{delay:f,repeat:h,repeatType:p,repeatDelay:m,onUpdate:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const b=this.currentTime-f*(this.speed>=0?1:-1),C=this.speed>=0?b<0:b>u;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let S=this.currentTime,_=s;if(h){const T=Math.min(this.currentTime,u)/d;let D=Math.floor(T),O=T%1;!O&&T>=1&&(O=1),O===1&&D--,D=Math.min(D,h+1),!!(D%2)&&(p==="reverse"?(O=1-O,m&&(O-=m/d)):p==="mirror"&&(_=i)),S=Ce(0,1,O)*d}const w=C?{done:!1,value:l[0]}:_.next(S);a&&(w.value=a(w.value));let{done:E}=w;!C&&c!==null&&(E=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const x=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return x&&o!==void 0&&(w.value=mn(l,this.options,o)),v&&v(w.value),x&&this.finish(),w}get duration(){const{resolved:t}=this;return t?be(t.calculatedDuration):0}get time(){return be(this.currentTime)}set time(t){t=fe(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=be(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Pd,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const kd=new Set(["opacity","clipPath","filter","transform"]);function Dd(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:i="loop",ease:a="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Po(a,o);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:i==="reverse"?"alternate":"normal"})}const Nd=Un(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),yn=10,Id=2e4;function Vd(e){return Gn(e.type)||e.type==="spring"||!Mo(e.ease)}function Bd(e,t){const n=new kr({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let s=0;for(;!r.done&&s<Id;)r=n.sample(s),o.push(r.value),s+=yn;return{times:void 0,keyframes:o,duration:s-yn,ease:"linear"}}const ni={anticipate:ys,backInOut:gs,circInOut:bs};function Fd(e){return e in ni}class ri extends Rs{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:s}=this.options;this.resolver=new zs(s,(i,a)=>this.onKeyframesResolved(i,a),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:o,ease:s,type:i,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&sn()&&Fd(s)&&(s=ni[s]),Vd(this.options)){const{onComplete:d,onUpdate:f,motionValue:h,element:p,...m}=this.options,v=Bd(t,m);t=v.keyframes,t.length===1&&(t[1]=t[0]),r=v.duration,o=v.times,s=v.ease,i="keyframes"}const u=Dd(a.owner.current,l,t,{...this.options,duration:r,times:o,ease:s});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(To(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;a.set(mn(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:o,type:i,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return be(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return be(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=fe(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return se;const{animation:r}=n;To(r,t)}return se}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:s,ease:i,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,element:f,...h}=this.options,p=new kr({...h,keyframes:r,duration:o,type:s,ease:i,times:a,isGenerator:!0}),m=fe(this.time);c.setWithVelocity(p.sample(m-yn).value,p.sample(m).value,yn)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:s,damping:i,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return Nd()&&r&&kd.has(r)&&!l&&!c&&!o&&s!=="mirror"&&i!==0&&a!=="inertia"}}const $d={type:"spring",stiffness:500,damping:25,restSpeed:10},jd=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),zd={type:"keyframes",duration:.8},Ud={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Rd=(e,{keyframes:t})=>t.length>2?zd:We.has(e)?e.startsWith("scale")?jd(t[1]):$d:Ud;function Xd({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:i,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const Dr=(e,t,n,r={},o,s)=>i=>{const a=Xn(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-fe(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:o};Xd(a)||(u={...u,...Rd(e,u)}),u.duration&&(u.duration=fe(u.duration)),u.repeatDelay&&(u.repeatDelay=fe(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),u.allowFlatten=!a.type&&!a.ease,d&&!s&&t.get()!==void 0){const f=mn(u.keyframes,a);if(f!==void 0)return B.update(()=>{u.onUpdate(f),u.onComplete()}),new mc([])}return!s&&ri.supports(u)?new ri(u):new kr(u)};function qd({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function oi(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var s;let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(i=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const f=e.getValue(d,(s=e.latestValues[d])!==null&&s!==void 0?s:null),h=l[d];if(h===void 0||u&&qd(u,d))continue;const p={delay:n,...Xn(i||{},d)};let m=!1;if(window.MotionHandoffAnimation){const b=ds(e);if(b){const C=window.MotionHandoffAnimation(b,d,B);C!==null&&(p.startTime=C,m=!0)}}hr(e,d),f.start(Dr(d,f,h,e.shouldReduceMotion&&us.has(d)?{type:!1}:p,e,m));const v=f.animation;v&&c.push(v)}return a&&Promise.all(c).then(()=>{B.update(()=>{a&&Cu(e,a)})}),c}function Nr(e,t,n={}){var r;const o=kt(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>Promise.all(oi(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=s;return Gd(e,t,u+c,d,f,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[c,u]=l==="beforeChildren"?[i,a]:[a,i];return c().then(()=>u())}else return Promise.all([i(),a(n.delay)])}function Gd(e,t,n=0,r=0,o=1,s){const i=[],a=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(Wd).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(Nr(c,t,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function Wd(e,t){return e.sortNodePosition(t)}function Hd(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>Nr(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=Nr(e,t,n);else{const o=typeof t=="function"?kt(e,t,n.custom):t;r=Promise.all(oi(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function si(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const Kd=er.length;function ii(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?ii(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Kd;n++){const r=er[n],o=e.props[r];(Mt(o)||o===!1)&&(t[r]=o)}return t}const Zd=[...Qn].reverse(),Yd=Qn.length;function Jd(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Hd(e,n,r)))}function Qd(e){let t=Jd(e),n=ai(),r=!0;const o=l=>(c,u)=>{var d;const f=kt(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:h,transitionEnd:p,...m}=f;c={...c,...m,...p}}return c};function s(l){t=l(e)}function i(l){const{props:c}=e,u=ii(e.parent)||{},d=[],f=new Set;let h={},p=1/0;for(let v=0;v<Yd;v++){const b=Zd[v],C=n[b],S=c[b]!==void 0?c[b]:u[b],_=Mt(S),w=b===l?C.isActive:null;w===!1&&(p=v);let E=S===u[b]&&S!==c[b]&&_;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),C.protectedKeys={...h},!C.isActive&&w===null||!S&&!C.prevProp||dn(S)||typeof S=="boolean")continue;const x=ef(C.prevProp,S);let T=x||b===l&&C.isActive&&!E&&_||v>p&&_,D=!1;const O=Array.isArray(S)?S:[S];let F=O.reduce(o(b),{});w===!1&&(F={});const{prevResolvedValues:N={}}=C,Y={...N,...F},oe=P=>{T=!0,f.has(P)&&(D=!0,f.delete(P)),C.needsAnimating[P]=!0;const I=e.getValue(P);I&&(I.liveStyle=!1)};for(const P in Y){const I=F[P],V=N[P];if(h.hasOwnProperty(P))continue;let q=!1;dr(I)&&dr(V)?q=!si(I,V):q=I!==V,q?I!=null?oe(P):f.add(P):I!==void 0&&f.has(P)?oe(P):C.protectedKeys[P]=!0}C.prevProp=S,C.prevResolvedValues=F,C.isActive&&(h={...h,...F}),r&&e.blockInitialAnimation&&(T=!1),T&&(!(E&&x)||D)&&d.push(...O.map(P=>({animation:P,options:{type:b}})))}if(f.size){const v={};if(typeof c.initial!="boolean"){const b=kt(e,Array.isArray(c.initial)?c.initial[0]:c.initial);b&&b.transition&&(v.transition=b.transition)}f.forEach(b=>{const C=e.getBaseTarget(b),S=e.getValue(b);S&&(S.liveStyle=!0),v[b]=C??null}),d.push({animation:v})}let m=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(f=>{var h;return(h=f.animationState)===null||h===void 0?void 0:h.setActive(l,c)}),n[l].isActive=c;const d=i(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=ai(),r=!0}}}function ef(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!si(t,e):!1}function Ye(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ai(){return{animate:Ye(!0),whileInView:Ye(),whileHover:Ye(),whileTap:Ye(),whileDrag:Ye(),whileFocus:Ye(),exit:Ye()}}class De{constructor(t){this.isMounted=!1,this.node=t}update(){}}class tf extends De{constructor(t){super(t),t.animationState||(t.animationState=Qd(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();dn(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let nf=0;class rf extends De{constructor(){super(...arguments),this.id=nf++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const of={animation:{Feature:tf},exit:{Feature:rf}};function Ft(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function $t(e){return{point:{x:e.pageX,y:e.pageY}}}const sf=e=>t=>Yn(t)&&e(t,$t(t));function jt(e,t,n,r){return Ft(e,t,sf(n),r)}function li({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function af({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function lf(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const ci=1e-4,cf=1-ci,uf=1+ci,ui=.01,df=0-ui,ff=0+ui;function ne(e){return e.max-e.min}function hf(e,t,n){return Math.abs(e-t)<=n}function di(e,t,n,r=.5){e.origin=r,e.originPoint=z(t.min,t.max,e.origin),e.scale=ne(n)/ne(t),e.translate=z(n.min,n.max,e.origin)-e.originPoint,(e.scale>=cf&&e.scale<=uf||isNaN(e.scale))&&(e.scale=1),(e.translate>=df&&e.translate<=ff||isNaN(e.translate))&&(e.translate=0)}function zt(e,t,n,r){di(e.x,t.x,n.x,r?r.originX:void 0),di(e.y,t.y,n.y,r?r.originY:void 0)}function fi(e,t,n){e.min=n.min+t.min,e.max=e.min+ne(t)}function pf(e,t,n){fi(e.x,t.x,n.x),fi(e.y,t.y,n.y)}function hi(e,t,n){e.min=t.min-n.min,e.max=e.min+ne(t)}function Ut(e,t,n){hi(e.x,t.x,n.x),hi(e.y,t.y,n.y)}const pi=()=>({translate:0,scale:1,origin:0,originPoint:0}),yt=()=>({x:pi(),y:pi()}),mi=()=>({min:0,max:0}),X=()=>({x:mi(),y:mi()});function ae(e){return[e("x"),e("y")]}function Ir(e){return e===void 0||e===1}function Vr({scale:e,scaleX:t,scaleY:n}){return!Ir(e)||!Ir(t)||!Ir(n)}function Je(e){return Vr(e)||gi(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function gi(e){return yi(e.x)||yi(e.y)}function yi(e){return e&&e!=="0%"}function vn(e,t,n){const r=e-n,o=t*r;return n+o}function vi(e,t,n,r,o){return o!==void 0&&(e=vn(e,o,r)),vn(e,n,r)+t}function Br(e,t=0,n=1,r,o){e.min=vi(e.min,t,n,r,o),e.max=vi(e.max,t,n,r,o)}function bi(e,{x:t,y:n}){Br(e.x,t.translate,t.scale,t.originPoint),Br(e.y,n.translate,n.scale,n.originPoint)}const Ci=.999999999999,Si=1.0000000000001;function mf(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,i;for(let a=0;a<o;a++){s=n[a],i=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&bt(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,bi(e,i)),r&&Je(s.latestValues)&&bt(e,s.latestValues))}t.x<Si&&t.x>Ci&&(t.x=1),t.y<Si&&t.y>Ci&&(t.y=1)}function vt(e,t){e.min=e.min+t,e.max=e.max+t}function wi(e,t,n,r,o=.5){const s=z(e.min,e.max,o);Br(e,t,n,s,r)}function bt(e,t){wi(e.x,t.x,t.scaleX,t.scale,t.originX),wi(e.y,t.y,t.scaleY,t.scale,t.originY)}function xi(e,t){return li(lf(e.getBoundingClientRect(),t))}function gf(e,t,n){const r=xi(e,n),{scroll:o}=t;return o&&(vt(r.x,o.offset.x),vt(r.y,o.offset.y)),r}const _i=({current:e})=>e?e.ownerDocument.defaultView:null,Ei=(e,t)=>Math.abs(e-t);function yf(e,t){const n=Ei(e.x,t.x),r=Ei(e.y,t.y);return Math.sqrt(n**2+r**2)}class Ti{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=$r(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,h=yf(d.offset,{x:0,y:0})>=3;if(!f&&!h)return;const{point:p}=d,{timestamp:m}=Z;this.history.push({...p,timestamp:m});const{onStart:v,onMove:b}=this.handlers;f||(v&&v(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Fr(f,this.transformPagePoint),B.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:h,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=$r(d.type==="pointercancel"?this.lastMoveEventInfo:Fr(f,this.transformPagePoint),this.history);this.startEvent&&h&&h(d,v),p&&p(d,v)},!Yn(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const i=$t(t),a=Fr(i,this.transformPagePoint),{point:l}=a,{timestamp:c}=Z;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,$r(a,this.history)),this.removeListeners=Vt(jt(this.contextWindow,"pointermove",this.handlePointerMove),jt(this.contextWindow,"pointerup",this.handlePointerUp),jt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Le(this.updatePoint)}}function Fr(e,t){return t?{point:t(e.point)}:e}function Ai(e,t){return{x:e.x-t.x,y:e.y-t.y}}function $r({point:e},t){return{point:e,delta:Ai(e,Mi(t)),offset:Ai(e,vf(t)),velocity:bf(t,.1)}}function vf(e){return e[0]}function Mi(e){return e[e.length-1]}function bf(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Mi(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>fe(t)));)n--;if(!r)return{x:0,y:0};const s=be(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const i={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function Cf(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?z(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?z(n,e,r.max):Math.min(e,n)),e}function Pi(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Sf(e,{top:t,left:n,bottom:r,right:o}){return{x:Pi(e.x,n,o),y:Pi(e.y,t,r)}}function Li(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function wf(e,t){return{x:Li(e.x,t.x),y:Li(e.y,t.y)}}function xf(e,t){let n=.5;const r=ne(e),o=ne(t);return o>r?n=ut(t.min,t.max-r,e.min):r>o&&(n=ut(e.min,e.max-o,t.min)),Ce(0,1,n)}function _f(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const jr=.35;function Ef(e=jr){return e===!1?e=0:e===!0&&(e=jr),{x:Oi(e,"left","right"),y:Oi(e,"top","bottom")}}function Oi(e,t,n){return{min:ki(e,t),max:ki(e,n)}}function ki(e,t){return typeof e=="number"?e:e[t]||0}const Tf=new WeakMap;class Af{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=X(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor($t(u).point)},s=(u,d)=>{const{drag:f,dragPropagation:h,onDragStart:p}=this.getProps();if(f&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Sc(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ae(v=>{let b=this.getAxisMotionValue(v).get()||0;if(pe.test(b)){const{projection:C}=this.visualElement;if(C&&C.layout){const S=C.layout.layoutBox[v];S&&(b=ne(S)*(parseFloat(b)/100))}}this.originPoint[v]=b}),p&&B.postRender(()=>p(u,d)),hr(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},i=(u,d)=>{const{dragPropagation:f,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:v}=d;if(h&&this.currentDirection===null){this.currentDirection=Mf(v),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,v),this.updateAxis("y",d.point,v),this.visualElement.render(),m&&m(u,d)},a=(u,d)=>this.stop(u,d),l=()=>ae(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Ti(t,{onSessionStart:o,onStart:s,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:_i(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:s}=this.getProps();s&&B.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!bn(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=Cf(i,this.constraints[t],this.elastic[t])),s.set(i)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&ft(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=Sf(o.layoutBox,n):this.constraints=!1,this.elastic=Ef(r),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&ae(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=_f(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ft(t))return!1;const r=t.current;Pe(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=gf(r,o.root,this.visualElement.getTransformPagePoint());let i=wf(o.layout.layoutBox,s);if(n){const a=n(af(i));this.hasMutatedConstraints=!!a,a&&(i=li(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=ae(u=>{if(!bn(u,n,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});const f=o?200:1e6,h=o?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return hr(this.visualElement,t),r.start(Dr(t,r,0,n,this.visualElement,!1))}stopAnimation(){ae(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ae(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){ae(n=>{const{drag:r}=this.getProps();if(!bn(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:i,max:a}=o.layout.layoutBox[n];s.set(t[n]-z(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ft(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};ae(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();o[i]=xf({min:l,max:l},this.constraints[i])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),ae(i=>{if(!bn(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(z(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;Tf.set(this.visualElement,this);const t=this.visualElement.current,n=jt(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();ft(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),B.read(r);const i=Ft(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(ae(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{i(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:i=jr,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function bn(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Mf(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Pf extends De{constructor(t){super(t),this.removeGroupControls=se,this.removeListeners=se,this.controls=new Af(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||se}unmount(){this.removeGroupControls(),this.removeListeners()}}const Di=e=>(t,n)=>{e&&B.postRender(()=>e(t,n))};class Lf extends De{constructor(){super(...arguments),this.removePointerDownListener=se}onPointerDown(t){this.session=new Ti(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:_i(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Di(t),onStart:Di(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&B.postRender(()=>o(s,i))}}}mount(){this.removePointerDownListener=jt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Cn={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ni(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Rt={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(k.test(e))e=parseFloat(e);else return e;const n=Ni(e,t.target.x),r=Ni(e,t.target.y);return`${n}% ${r}%`}},Of={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=ke.parse(e);if(o.length>5)return r;const s=ke.createTransformer(e),i=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+i]/=a,o[1+i]/=l;const c=z(a,l,.5);return typeof o[2+i]=="number"&&(o[2+i]/=c),typeof o[3+i]=="number"&&(o[3+i]/=c),s(o)}};class kf extends g.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;Hc(Df),s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Cn.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,i=r.projection;return i&&(i.isPresent=s,o||t.layoutDependency!==n||n===void 0||t.isPresent!==s?i.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?i.promote():i.relegate()||B.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Zn.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Ii(e){const[t,n]=dc(),r=g.useContext(So);return y.jsx(kf,{...e,layoutGroup:r,switchLayoutGroup:g.useContext(Go),isPresent:t,safeToRemove:n})}const Df={borderRadius:{...Rt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Rt,borderTopRightRadius:Rt,borderBottomLeftRadius:Rt,borderBottomRightRadius:Rt,boxShadow:Of};function Nf(e,t,n){const r=ee(e)?e:At(e);return r.start(Dr("",r,t,n)),r.animation}function If(e){return e instanceof SVGElement&&e.tagName!=="svg"}const Vf=(e,t)=>e.depth-t.depth;class Bf{constructor(){this.children=[],this.isDirty=!1}add(t){jn(this.children,t),this.isDirty=!0}remove(t){zn(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Vf),this.isDirty=!1,this.children.forEach(t)}}function Ff(e,t){const n=he.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(Le(r),e(s-t))};return B.read(r,!0),()=>Le(r)}const Vi=["TopLeft","TopRight","BottomLeft","BottomRight"],$f=Vi.length,Bi=e=>typeof e=="string"?parseFloat(e):e,Fi=e=>typeof e=="number"||k.test(e);function jf(e,t,n,r,o,s){o?(e.opacity=z(0,n.opacity!==void 0?n.opacity:1,zf(r)),e.opacityExit=z(t.opacity!==void 0?t.opacity:1,0,Uf(r))):s&&(e.opacity=z(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<$f;i++){const a=`border${Vi[i]}Radius`;let l=$i(t,a),c=$i(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Fi(l)===Fi(c)?(e[a]=Math.max(z(Bi(l),Bi(c),r),0),(pe.test(c)||pe.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=z(t.rotate||0,n.rotate||0,r))}function $i(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const zf=ji(0,.5,vs),Uf=ji(.5,.95,se);function ji(e,t,n){return r=>r<e?0:r>t?1:n(ut(e,t,r))}function zi(e,t){e.min=t.min,e.max=t.max}function le(e,t){zi(e.x,t.x),zi(e.y,t.y)}function Ui(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Ri(e,t,n,r,o){return e-=t,e=vn(e,1/n,r),o!==void 0&&(e=vn(e,1/o,r)),e}function Rf(e,t=0,n=1,r=.5,o,s=e,i=e){if(pe.test(t)&&(t=parseFloat(t),t=z(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=z(s.min,s.max,r);e===s&&(a-=t),e.min=Ri(e.min,t,n,a,o),e.max=Ri(e.max,t,n,a,o)}function Xi(e,t,[n,r,o],s,i){Rf(e,t[n],t[r],t[o],t.scale,s,i)}const Xf=["x","scaleX","originX"],qf=["y","scaleY","originY"];function qi(e,t,n,r){Xi(e.x,t,Xf,n?n.x:void 0,r?r.x:void 0),Xi(e.y,t,qf,n?n.y:void 0,r?r.y:void 0)}function Gi(e){return e.translate===0&&e.scale===1}function Wi(e){return Gi(e.x)&&Gi(e.y)}function Hi(e,t){return e.min===t.min&&e.max===t.max}function Gf(e,t){return Hi(e.x,t.x)&&Hi(e.y,t.y)}function Ki(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Zi(e,t){return Ki(e.x,t.x)&&Ki(e.y,t.y)}function Yi(e){return ne(e.x)/ne(e.y)}function Ji(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Wf{constructor(){this.members=[]}add(t){jn(this.members,t),t.scheduleRender()}remove(t){if(zn(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Hf(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((o||s||i)&&(r=`translate3d(${o}px, ${s}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:h,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),h&&(r+=`skewX(${h}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const zr=["","X","Y","Z"],Kf={visibility:"hidden"},Qi=1e3;let Zf=0;function Ur(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function ea(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=ds(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",B,!(o||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&ea(r)}function ta({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=Zf++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Qf),this.nodes.forEach(oh),this.nodes.forEach(sh),this.nodes.forEach(eh)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Bf)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Rn),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const l=this.eventHandlers.get(i);l&&l.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=If(i),this.instance=i;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=Ff(f,250),Cn.hasAnimatedSinceResize&&(Cn.hasAnimatedSinceResize=!1,this.nodes.forEach(ra))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||uh,{onLayoutAnimationStart:v,onLayoutAnimationComplete:b}=u.getProps(),C=!this.targetLayout||!Zi(this.targetLayout,p),S=!f&&h;if(this.options.layoutRoot||this.resumeFrom||S||f&&(C||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,S);const _={...Xn(m,"layout"),onPlay:v,onComplete:b};(u.shouldReduceMotion||this.options.layoutRoot)&&(_.delay=0,_.type=!1),this.startAnimation(_)}else f||ra(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Le(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ih),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ea(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(na);return}this.isUpdating||this.nodes.forEach(nh),this.isUpdating=!1,this.nodes.forEach(rh),this.nodes.forEach(Yf),this.nodes.forEach(Jf),this.clearAllSnapshots();const a=he.now();Z.delta=Ce(0,1e3/60,a-Z.timestamp),Z.timestamp=a,Z.isProcessing=!0,Kn.update.process(Z),Kn.preRender.process(Z),Kn.render.process(Z),Z.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Zn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(th),this.sharedNodes.forEach(ah)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,B.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){B.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ne(this.snapshot.measuredBox.x)&&!ne(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=X(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Wi(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||Je(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return i&&(l=this.removeTransform(l)),dh(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var i;const{visualElement:a}=this.options;if(!a)return X();const l=a.measureViewportBox();if(!(((i=this.scroll)===null||i===void 0?void 0:i.wasRoot)||this.path.some(fh))){const{scroll:u}=this.root;u&&(vt(l.x,u.offset.x),vt(l.y,u.offset.y))}return l}removeElementScroll(i){var a;const l=X();if(le(l,i),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:f}=u;u!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&le(l,i),vt(l.x,d.offset.x),vt(l.y,d.offset.y))}return l}applyTransform(i,a=!1){const l=X();le(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&bt(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Je(u.latestValues)&&bt(l,u.latestValues)}return Je(this.latestValues)&&bt(l,this.latestValues),l}removeTransform(i){const a=X();le(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Je(c.latestValues))continue;Vr(c.latestValues)&&c.updateSnapshot();const u=X(),d=c.measurePageBox();le(u,d),qi(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Je(this.latestValues)&&qi(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Z.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Z.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=X(),this.relativeTargetOrigin=X(),Ut(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),le(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=X(),this.targetWithTransforms=X()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),pf(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):le(this.target,this.layout.layoutBox),bi(this.target,this.targetDelta)):le(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=X(),this.relativeTargetOrigin=X(),Ut(this.relativeTargetOrigin,this.target,h.target),le(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Vr(this.parent.latestValues)||gi(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var i;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((i=this.parent)===null||i===void 0)&&i.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Z.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;le(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;mf(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=X());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ui(this.prevProjectionDelta.x,this.projectionDelta.x),Ui(this.prevProjectionDelta.y,this.projectionDelta.y)),zt(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!Ji(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ji(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),i){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=yt(),this.projectionDelta=yt(),this.projectionDeltaWithTransform=yt()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=yt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=X(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=h!==p,v=this.getStack(),b=!v||v.members.length<=1,C=!!(m&&!b&&this.options.crossfade===!0&&!this.path.some(ch));this.animationProgress=0;let S;this.mixTargetDelta=_=>{const w=_/1e3;oa(d.x,i.x,w),oa(d.y,i.y,w),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ut(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),lh(this.relativeTarget,this.relativeTargetOrigin,f,w),S&&Gf(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=X()),le(S,this.relativeTarget)),m&&(this.animationValues=u,jf(u,c,this.latestValues,w,C,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Le(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=B.update(()=>{Cn.hasAnimatedSinceResize=!0,this.currentAnimation=Nf(0,Qi,{...i,onUpdate:a=>{this.mixTargetDelta(a),i.onUpdate&&i.onUpdate(a)},onStop:()=>{},onComplete:()=>{i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Qi),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=i;if(!(!a||!l||!c)){if(this!==i&&this.layout&&c&&ca(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||X();const d=ne(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const f=ne(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}le(a,l),bt(a,u),zt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new Wf),this.sharedNodes.get(i).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var i;const{layoutId:a}=this.options;return a?((i=this.getStack())===null||i===void 0?void 0:i.lead)||this:this}getPrevLead(){var i;const{layoutId:a}=this.options;return a?(i=this.getStack())===null||i===void 0?void 0:i.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Ur("z",i,c,this.animationValues);for(let u=0;u<zr.length;u++)Ur(`rotate${zr[u]}`,i,c,this.animationValues),Ur(`skew${zr[u]}`,i,c,this.animationValues);i.render();for(const u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);i.scheduleRender()}getProjectionStyles(i){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Kf;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=pn(i==null?void 0:i.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=pn(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!Je(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=Hf(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));const{x:h,y:p}=this.projectionDelta;c.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:c.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const m in Pt){if(f[m]===void 0)continue;const{correct:v,applyTo:b,isCSSVariable:C}=Pt[m],S=c.transform==="none"?f[m]:v(f[m],d);if(b){const _=b.length;for(let w=0;w<_;w++)c[b[w]]=S}else C?this.options.visualElement.renderState.vars[m]=S:c[m]=S}return this.options.layoutId&&(c.pointerEvents=d===this?pn(i==null?void 0:i.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(na),this.root.sharedNodes.clear()}}}function Yf(e){e.updateLayout()}function Jf(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:s}=e.options,i=n.source!==e.layout.source;s==="size"?ae(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],h=ne(f);f.min=r[d].min,f.max=f.min+h}):ca(s,n.layoutBox,r)&&ae(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],h=ne(r[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const a=yt();zt(a,r,n.layoutBox);const l=yt();i?zt(l,e.applyTransform(o,!0),n.measuredBox):zt(l,r,n.layoutBox);const c=!Wi(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const p=X();Ut(p,n.layoutBox,f.layoutBox);const m=X();Ut(m,r,h.layoutBox),Zi(p,m)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Qf(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function eh(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function th(e){e.clearSnapshot()}function na(e){e.clearMeasurements()}function nh(e){e.isLayoutDirty=!1}function rh(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function ra(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function oh(e){e.resolveTargetDelta()}function sh(e){e.calcProjection()}function ih(e){e.resetSkewAndRotation()}function ah(e){e.removeLeadSnapshot()}function oa(e,t,n){e.translate=z(t.translate,0,n),e.scale=z(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function sa(e,t,n,r){e.min=z(t.min,n.min,r),e.max=z(t.max,n.max,r)}function lh(e,t,n,r){sa(e.x,t.x,n.x,r),sa(e.y,t.y,n.y,r)}function ch(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const uh={duration:.45,ease:[.4,0,.1,1]},ia=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),aa=ia("applewebkit/")&&!ia("chrome/")?Math.round:se;function la(e){e.min=aa(e.min),e.max=aa(e.max)}function dh(e){la(e.x),la(e.y)}function ca(e,t,n){return e==="position"||e==="preserve-aspect"&&!hf(Yi(t),Yi(n),.2)}function fh(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const hh=ta({attachResizeListener:(e,t)=>Ft(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Rr={current:void 0},ua=ta({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Rr.current){const e=new hh({});e.mount(window),e.setOptions({layoutScroll:!0}),Rr.current=e}return Rr.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),ph={pan:{Feature:Lf},drag:{Feature:Pf,ProjectionNode:ua,MeasureLayout:Ii}};function da(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=r[o];s&&B.postRender(()=>s(t,$t(t)))}class mh extends De{mount(){const{current:t}=this.node;t&&(this.unmount=xc(t,(n,r)=>(da(this.node,r,"Start"),o=>da(this.node,o,"End"))))}unmount(){}}class gh extends De{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Vt(Ft(this.node.current,"focus",()=>this.onFocus()),Ft(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function fa(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=r[o];s&&B.postRender(()=>s(t,$t(t)))}class yh extends De{mount(){const{current:t}=this.node;t&&(this.unmount=Ac(t,(n,r)=>(fa(this.node,r,"Start"),(o,{success:s})=>fa(this.node,o,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Xr=new WeakMap,qr=new WeakMap,vh=e=>{const t=Xr.get(e.target);t&&t(e)},bh=e=>{e.forEach(vh)};function Ch({root:e,...t}){const n=e||document;qr.has(n)||qr.set(n,{});const r=qr.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(bh,{root:e,...t})),r[o]}function Sh(e,t,n){const r=Ch(t);return Xr.set(e,n),r.observe(e),()=>{Xr.delete(e),r.unobserve(e)}}const wh={some:0,all:1};class xh extends De{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:wh[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return Sh(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(_h(t,n))&&this.startObserver()}unmount(){}}function _h({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Eh={inView:{Feature:xh},tap:{Feature:yh},focus:{Feature:gh},hover:{Feature:mh}},Th={layout:{ProjectionNode:ua,MeasureLayout:Ii}},Gr={current:null},ha={current:!1};function Ah(){if(ha.current=!0,!!Fn)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Gr.current=e.matches;e.addListener(t),t()}else Gr.current=!1}const Mh=[...$s,te,ke],Ph=e=>Mh.find(Fs(e)),Lh=new WeakMap;function Oh(e,t,n){for(const r in t){const o=t[r],s=n[r];if(ee(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&on(o.version==="12.5.0",`Attempting to mix Motion versions ${o.version} with 12.5.0 may not work as expected.`);else if(ee(s))e.addValue(r,At(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{const i=e.getStaticValue(r);e.addValue(r,At(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const pa=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class kh{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Tr,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=he.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,B.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:u}=i;this.onUpdate=u,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=fn(n),this.isVariantNode=Ro(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in f){const p=f[h];l[h]!==void 0&&ee(p)&&p.set(l[h],!1)}}mount(t){this.current=t,Lh.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),ha.current||Ah(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Gr.current,process.env.NODE_ENV!=="production"&&on(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Le(this.notifyUpdate),Le(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=We.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&B.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),s(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in dt){const n=dt[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):X()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<pa.length;r++){const o=pa[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,i=t[s];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=Oh(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=At(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(Vs(o)||Cs(o))?o=parseFloat(o):!Ph(o)&&ke.test(n)&&(o=Ms(t,n)),this.setBaseTarget(t,ee(o)?o.get():o)),ee(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const i=ur(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);i&&(o=i[t])}if(r&&o!==void 0)return o;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!ee(s)?s:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Rn),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class ma extends kh{constructor(){super(...arguments),this.KeyframeResolver=zs}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ee(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Dh(e){return window.getComputedStyle(e)}class Nh extends ma{constructor(){super(...arguments),this.type="html",this.renderInstance=ss}readValueFromInstance(t,n){if(We.has(n))return qu(t,n);{const r=Dh(t),o=(nr(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return xi(t,n)}build(t,n,r){sr(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return fr(t,n,r)}}class Ih extends ma{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=X,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&os(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(We.has(n)){const r=As(n);return r&&r.default||0}return n=is.has(n)?n:tr(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return ls(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&B.postRender(this.updateDimensions)}build(t,n,r){lr(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){as(t,n,r,o)}mount(t){this.isSVGTag=cr(t.tagName),super.mount(t)}}const Vh=(e,t)=>ar(e)?new Ih(t):new Nh(t,{allowProjection:e!==g.Fragment}),Bh=vu({...of,...Eh,...ph,...Th},Vh),Qe=Ic(Bh),Fh={root:"_root_uup2j_1"},ga={bgDefault:"c-corporate-default-bg",cBlack:"c-corporate-default-black",cBlue:"c-corporate-default-blue",bgDark:"c-corporate-default-dark-bg",cDarkBlue:"c-corporate-default-dark-blue",cDarkGreen:"c-corporate-default-dark-green",cGreen:"c-corporate-default-green",cRichBlue:"c-corporate-default-rich-blue",grey050:"c-grey-050",grey100:"c-grey-100",grey200:"c-grey-200",grey300:"c-grey-300",grey400:"c-grey-400",grey500:"c-grey-500",grey600:"c-grey-600",grey700:"c-grey-700",grey800:"c-grey-800",grey900:"c-grey-900",rFull:"radius-full",rL:"radius-l",rM:"radius-m",rNone:"radius-none",rS:"radius-s",rXL:"radius-xl",rXS:"radius-xs",rXXL:"radius-xxl",rXXS:"radius-xxs",pXXS:"p-xxs",pXS:"p-xs",pS:"p-s",pM:"p-m",pL:"p-l",pXL:"p-xl",pXXL:"p-xxl",pxXXS:"px-xxs",pxXS:"px-xs",pxS:"px-s",pxM:"px-m",pxL:"px-l",pxXL:"px-xl",pxXXL:"px-xxl",pyXXS:"py-xxs",pyXS:"py-xs",pyS:"py-s",pyM:"py-m",pyL:"py-l",pyXL:"py-xl",pyXXL:"py-xxl",ptXXS:"pt-xxs",ptXS:"pt-xs",ptS:"pt-s",ptM:"pt-m",ptL:"pt-l",ptXL:"pt-xl",ptXXL:"pt-xxl",prXXS:"pr-xxs",prXS:"pr-xs",prS:"pr-s",prM:"pr-m",prL:"pr-l",prXL:"pr-xl",prXXL:"pr-xxl",pbXXS:"pb-xxs",pbXS:"pb-xs",pbS:"pb-s",pbM:"pb-m",pbL:"pb-l",pbXL:"pb-xl",pbXXL:"pb-xxl",plXXS:"pl-xxs",plXS:"pl-xs",plS:"pl-s",plM:"pl-m",plL:"pl-l",plXL:"pl-xl",plXXL:"pl-xxl",mXXS:"m-xxs",mXS:"m-xs",mS:"m-s",mM:"m-m",mL:"m-l",mXL:"m-xl",mXXL:"m-xxl",mxXXS:"mx-xxs",mxXS:"mx-xs",mxS:"mx-s",mxM:"mx-m",mxL:"mx-l",mxXL:"mx-xl",mxXXL:"mx-xxl",myXXS:"my-xxs",myXS:"my-xs",myS:"my-s",myM:"my-m",myL:"my-l",myXL:"my-xl",myXXL:"my-xxl",mtXXS:"mt-xxs",mtXS:"mt-xs",mtS:"mt-s",mtM:"mt-m",mtL:"mt-l",mtXL:"mt-xl",mtXXL:"mt-xxl",mrXXS:"mr-xxs",mrXS:"mr-xs",mrS:"mr-s",mrM:"mr-m",mrL:"mr-l",mrXL:"mr-xl",mrXXL:"mr-xxl",mbXXS:"mb-xxs",mbXS:"mb-xs",mbS:"mb-s",mbM:"mb-m",mbL:"mb-l",mbXL:"mb-xl",mbXXL:"mb-xxl",mlXXS:"ml-xxs",mlXS:"ml-xs",mlS:"ml-s",mlM:"ml-m",mlL:"ml-l",mlXL:"ml-xl",mlXXL:"ml-xxl",fsXXXS:"fs-xxxs",fsXXS:"fs-xxs",fsXS:"fs-xs",fsS:"fs-s",fsM:"fs-m",fsL:"fs-l",fsXL:"fs-xl",fsXXL:"fs-xxl",fsXXXL:"fs-xxxl",fwRegular:"fw-regular",fwSemibold:"fw-semibold",fwBold:"fw-bold",dBlock:"d-block",dInBlock:"d-in-block",taLeft:"ta-left",taCenter:"ta-center",mwSM:"mw-sm",mwMD:"mw-md",mwLG:"mw-lg",mwXL:"mw-xl",mwXXL:"mw-xxl",mw3XL:"mw-3xl",shNone:"sh-none"};function Ne(e){return e&&Object.keys(e).length?Object.keys(e).filter(t=>Object.keys(ga).includes(t)).filter(t=>e[t]===!0).map(t=>ga[t]):null}const Ie="Errore: ",$h="Impossibile acquisire la posizione.",Sn="Impossibile caricare i punti di mappa.",jh="Si è verificato un errore.",zh="Impossibile caricare i suggerimenti.",Uh="Impossibile caricare i dettagli della location.",Rh="Impossibile caricare la mappa.",Xh="Impossibile trovare punti di mappa nell'area di ricerca.",qh="Ottieni indicazioni di navigazione per questa destinazione",Gh="Condividi questa destinazione",Wh="Scarica l'evento",Hh="dyn-locator__portal-root",ya=3e3,va=6,ba=2e4,Kh=300,Xt={north:47.1,south:36.6,east:18.6,west:6.6},Zh={lat:(Xt.north+Xt.south)/2,lng:(Xt.east+Xt.west)/2},et={AIRC:"airc",GOOGLE:"google"};function Se(e){if(e)return e.trim().split(" ").filter(t=>t.length)}function we(e){return e?e.split("").reduce((t,n)=>(/[A-Z]/.test(n)?e.indexOf(n)===0?t+=n.toLowerCase():t+="-"+n.toLowerCase():t+=n,t),""):""}function Ca(e,t){const{type:n,url:r}=e??{};switch(n){case"navigate":case"directions":return{"aria-label":qh,as:"a",href:r??"#",target:"_blank",rel:"noopener noreferrer",...typeof t=="function"?{onClick(){t()}}:{}};case"share":return{"aria-label":Gh,as:"a",href:r??"#",target:"_blank",rel:"noopener noreferrer"};case"event":case"calendar":return{"aria-label":Wh,as:"a",href:r??"#",download:!0,target:"_blank",rel:"noopener noreferrer",...typeof t=="function"?{onClick(){t()}}:{}};case"email":default:return{}}}function Yh(e,t){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e(...r),t)}}function Jh(e){var l,c,u,d;const t=(e==null?void 0:e.address_components)??[];function n(f){return t.find(h=>h.types.includes(f))}const r=(e==null?void 0:e.formatted_address)??"No address found",o=((l=n("locality"))==null?void 0:l.long_name)??"No city found",s=((c=n("country"))==null?void 0:c.long_name)??"No country found",i=((u=n("administrative_area_level_1"))==null?void 0:u.long_name)??"No region found",a=((d=n("administrative_area_level_2"))==null?void 0:d.short_name)??"No province found";return{address:r,city:o,province:a,region:i,country:s}}function wn({fallback:e,format:t,...n}){if(typeof e>"u"&&(e=""),t)switch(t){case"ZIP_CITY_PROVINCE":{const{zip:r,city:o,province:s}=n??{};return[r,o,s].every(Boolean)?`${r} ${o} (${s})`:e}case"STREET_ZIP_CITY_PROVINCE":{const{street:r,zip:o,city:s,province:i}=n??{};return[r,o,s,i].every(Boolean)?`${r}, ${o} ${s} (${i})`:e}case"STREET_CITY_PROVINCE":{const{street:r,city:o,province:s}=n??{};return[r,o,s].every(Boolean)?`${r}, ${o} (${s})`:e}case"ZIP_CITY":{const{zip:r,city:o}=n??{};return[r,o].every(Boolean)?`${r} ${o}`:e}case"CITY_PROVINCE":{const{city:r,province:o}=n??{};return[r,o].every(Boolean)?`${r} (${o})`:e}case"STREET_CITY":{const{street:r,city:o}=n??{};return[r,o].every(Boolean)?`${r}, ${o}`:e}case"STREET_ZIP_CITY":{const{street:r,zip:o,city:s}=n??{};return[r,o,s].every(Boolean)?`${r}, ${o} ${s}`:e}default:return e}return e}const Sa="Anchor";function wa({as:e,wrapper:t,children:n,variant:r="default",className:o,animate:s=!0,animationDelay:i=0,href:a,target:l,rel:c,linkProps:u={},style:d,...f},h){const p=t||"span",m=s?Qe[p]:p,v=e||"a",b=Ne(f)??[],C=s?{initial:{opacity:0,y:5},animate:{opacity:1,y:0},transition:{delay:i,duration:.2}}:{},_=c||(l==="_blank"?{rel:"noopener noreferrer"}:{}).rel;return y.jsx(m,{className:j(Fh.root,"dyn-locator__"+we(Sa),Se(o),...b),"data-variant":r,...d?{style:d}:{},...C,...f,children:y.jsx(v,{ref:h,href:a,target:l,rel:_,...u,children:n})})}wa.displayName=Sa;const xa=g.forwardRef(wa),_a="ErrorBanner";function Ea({title:e="Si è verificato un errore",message:t="Impossibile completare l'operazione richiesta.",actionText:n="ricaricare la pagina",onAction:r,errorDetails:o,className:s,children:i,...a}){const l=Ne(a)??[];return y.jsxs("div",{className:j("dyn-locator__"+we(_a),_t.root,Se(s),...l??[]),children:[y.jsxs("header",{className:_t.header,children:[y.jsx(Ql,{size:28,color:"currentColor",className:_t.icon})," ",y.jsx("h3",{children:e})]}),y.jsxs("div",{className:_t.body,children:[y.jsx("p",{children:t}),n&&r&&y.jsxs("p",{children:["Prova a"," ",y.jsx(xa,{animate:!1,"aria-label":n,href:"#",onClick:r,children:n})]}),i,o&&y.jsx("div",{className:_t.content,children:y.jsx("pre",{children:o})})]})]})}Ea.displayName=_a;const Ta=Ea;class Qh extends g.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Locator error: ",t,n)}render(){var t;return this.state.hasError?this.props.fallback||y.jsx("div",{className:Xl.container,children:y.jsx(Ta,{message:"Something went wrong with the Locator component",errorDetails:(t=this.state.error)==null?void 0:t.message})}):this.props.children}}const ep=({title:e,titleId:t,...n},r)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:r,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsx("path",{fill:"currentColor",fillRule:"evenodd",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M12 2.5a9.5 9.5 0 1 0 0 19 9.5 9.5 0 0 0 0-19ZM13.286 14.518h2.459l.386-2.498h-2.845v-1.365c0-1.037.338-1.957 1.309-1.957h1.56v-2.18c-.275-.037-.854-.118-1.949-.118-2.287 0-3.627 1.208-3.627 3.959v1.661h-2.35v2.498h2.35v6.864c.465.07.937.118 1.421.118.438 0 .864-.04 1.286-.097v-6.885Z"})]}),tp=g.forwardRef(ep),np=({title:e,titleId:t,...n},r)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:r,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsx("path",{fill:"currentColor",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M8 3a5 5 0 0 0-5 5v8a5 5 0 0 0 5 5h8a5 5 0 0 0 5-5V8a5 5 0 0 0-5-5H8Zm10 2a1 1 0 1 1 0 2 1 1 0 0 1 0-2Zm-6 2a5 5 0 1 1-.001 10.001A5 5 0 0 1 12 7Zm0 2a3 3 0 1 0 0 6 3 3 0 0 0 0-6Z"})]}),rp=g.forwardRef(np),op=({title:e,titleId:t,...n},r)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:r,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsx("path",{fill:"currentColor",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2ZM9 17H6.477v-7H9v7ZM7.694 8.717c-.771 0-1.286-.514-1.286-1.2 0-.686.514-1.2 1.371-1.2.771 0 1.286.514 1.286 1.2 0 .686-.514 1.2-1.371 1.2ZM18 17h-2.442v-3.826c0-1.058-.651-1.302-.895-1.302s-1.058.163-1.058 1.302V17h-2.523v-7h2.523v.977c.325-.57.976-.977 2.197-.977S18 10.977 18 13.174V17Z"})]}),sp=g.forwardRef(op),ip=({title:e,titleId:t,...n},r)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:r,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsx("path",{fill:"currentColor",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M19.68 1.92H4.32a2.403 2.403 0 0 0-2.4 2.4v15.36c0 1.323 1.077 2.4 2.4 2.4h15.36c1.323 0 2.4-1.077 2.4-2.4V4.32c0-1.323-1.077-2.4-2.4-2.4Zm-1.917 8.795a3.596 3.596 0 0 1-3.34-1.61v5.538a4.093 4.093 0 1 1-4.093-4.093c.085 0 .169.008.253.013v2.017c-.084-.01-.167-.025-.253-.025a2.089 2.089 0 1 0 0 4.178c1.154 0 2.173-.91 2.173-2.063l.02-9.405h1.927a3.594 3.594 0 0 0 3.313 3.208v2.242Z"})]}),ap=g.forwardRef(ip),lp=({title:e,titleId:t,...n},r)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:r,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsx("path",{fill:"currentColor",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M19.077 4.928A9.927 9.927 0 0 0 12.011 2c-5.506 0-9.987 4.479-9.989 9.985a9.962 9.962 0 0 0 1.333 4.992L2 22l5.233-1.237a9.98 9.98 0 0 0 4.773 1.216h.004c5.505 0 9.986-4.48 9.989-9.985a9.922 9.922 0 0 0-2.922-7.066Zm-2.179 10.626c-.208.583-1.227 1.145-1.685 1.186-.458.042-.887.207-2.995-.624-2.537-1-4.139-3.601-4.263-3.767-.125-.167-1.019-1.353-1.019-2.581s.645-1.832.874-2.081a.916.916 0 0 1 .666-.312c.166 0 .333 0 .478.006.178.007.375.016.562.431.222.494.707 1.728.769 1.853.062.125.104.271.021.437-.083.166-.125.27-.249.416-.125.146-.262.325-.374.437-.125.124-.255.26-.11.509.146.25.646 1.067 1.388 1.728.954.85 1.757 1.113 2.007 1.239.25.125.395.104.541-.063.146-.166.624-.728.79-.978.166-.25.333-.208.562-.125.229.083 1.456.687 1.705.812.25.125.416.187.478.291.062.103.062.603-.146 1.186Z"})]}),cp=g.forwardRef(lp),up=({title:e,titleId:t,...n},r)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:r,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsxs("g",{transform:"scale(1.2) translate(-2.4, -2.4)",children:[y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M20.5 3 4.965 21H3.108L18.643 3H20.5Z",clipRule:"evenodd"}),y.jsx("path",{fill:"currentColor",fillOpacity:"0.3",fillRule:"evenodd",d:"M15.572 20.5 3.91 3.5h4.479l11.661 17h-4.479Z",clipRule:"evenodd"}),y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m7.862 4.5 10.29 15h-2.054L5.81 4.5h2.053Zm.79-1.5h-5.69l12.346 18H21L8.652 3Z",clipRule:"evenodd"})]})]}),Aa=g.forwardRef(up),dp=({title:e,titleId:t,...n},r)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:r,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsx("path",{fill:"currentColor",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M21.551 6.96c-.191-1.056-1.102-1.824-2.16-2.064-1.582-.336-4.511-.576-7.68-.576-3.167 0-6.142.24-7.727.576-1.055.24-1.968.96-2.16 2.064-.193 1.2-.384 2.88-.384 5.04s.191 3.84.431 5.04c.193 1.056 1.105 1.824 2.16 2.064 1.68.336 4.56.576 7.729.576 3.169 0 6.049-.24 7.729-.576 1.055-.24 1.967-.96 2.16-2.064.19-1.2.43-2.929.48-5.04-.098-2.16-.338-3.84-.578-5.04ZM9.12 15.36V8.64L14.976 12 9.12 15.36Z"})]}),fp=g.forwardRef(dp),Ma={ArrowLeft:Hl,ArrowUpRight:Zl,ChevronUp:Jl,ChevronDown:Yl,Close:Co,Expand:oc,Location:rc,Search:ac,Share:lc,Target:tc,Email:nc,Copy:ec,X:Aa,Twitter:Aa,Facebook:tp,Instagram:rp,Linkedin:sp,TikTok:ap,Whatsapp:cp,Youtube:fp},xe={root:"_root_1cmog_4",header:"_header_1cmog_21",body:"_body_1cmog_22",cta:"_cta_1cmog_23",titleContainer:"_titleContainer_1cmog_40",shareButton:"_shareButton_1cmog_51",capabilities:"_capabilities_1cmog_59",tagContainer:"_tagContainer_1cmog_72",tag:"_tag_1cmog_72"},Ct={root:"_root_1k1dg_4",container:"_container_1k1dg_10",label:"_label_1k1dg_17",icon:"_icon_1k1dg_27"},Wr={root:"_root_71ove_4",icon:"_icon_71ove_43"};function hp(e){return g.isValidElement(e)||typeof e=="function"}function pp(e){return e?typeof e=="string"||typeof e=="object"&&"name"in e:!1}function mp(e){return!!e&&typeof e=="object"&&"path"in e}const Pa="Icon";function La({as:e,icon:t,iconRef:n,label:r,size:o="S",radius:s,variant:i="default",className:a,animate:l=!0,animationDelay:c=0,style:u,...d},f){const h=e||"span",p=l?Qe[h]:h,{iconMap:m}=xp();function v(S){if(pp(S)){const _=typeof S=="string"?S:S.name;return m[_]?g.createElement(m[_],{...n?{ref:n}:{},...r?{title:r,titleId:r.trim().toLowerCase().replace(/[^a-z0-9\s_-]/g,"").replace(/\s+/g,"_")+"_id"}:{},className:Wr.icon}):'No icon found for "'+_+'"!'}return mp(S)?(i!=="default"&&console.warn("Warning: cannot set icon stroke on a remote asset"),y.jsx("img",{...n?{ref:n}:{},src:S.path,alt:`Icona decorativa${r?" che rappresenta '"+r+"'":""}`,className:Wr.icon})):"No icon provided"}const b=Ne(d)??[],C=l?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:c,duration:.2}}:{};return y.jsx(p,{ref:f,className:j(Wr.root,"dyn-locator__"+we(Pa),Se(a),...b),...u?{style:u}:{},"data-variant":i,"data-size":o,...s?{"data-radius":s}:{},...C,...d,children:v(t)})}La.displayName=Pa;const me=g.forwardRef(La),Oa="Tag";function ka({as:e,iconPosition:t="left",children:n,icon:r,className:o,animate:s=!0,animationDelay:i=0,style:a,...l},c){const u=e||"span",d=s?Qe[u]:u,f=Ne(l)??[],h=s?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:i,duration:.2}}:{};return y.jsx(d,{ref:c,className:j(Ct.root,"dyn-locator__"+we(Oa),Se(o),...f),"data-icon-position":t,...a?{style:a}:{},...h,...l,children:y.jsxs("div",{className:Ct.container,children:[r?y.jsx("div",{className:Ct.icon,children:hp(r)?typeof r=="function"?y.jsx(r,{className:Ct.icon}):r:y.jsx(me,{className:Ct.icon,icon:r})}):null,y.jsx("div",{className:Ct.label,children:n})]})})}ka.displayName=Oa;const gp=g.forwardRef(ka),yp={root:"_root_u5v4v_1"},Da="IconButton";function Na({as:e,children:t,className:n,variant:r="default",animate:o=!0,animationDelay:s=0,style:i,ariaLabel:a,href:l,target:c,rel:u,disabled:d=!1,...f},h){const p=e||"button",m=o?Qe[p]:p,v=Ne(f)??[],b=o?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:s,duration:.2}}:{},C=p==="a"?{href:l??"/",target:c??"_blank",rel:c==="_blank"?"noopener noreferrer":u}:{};return y.jsx(m,{ref:h,className:j(yp.root,"dyn-locator__"+we(Da),Se(n),...v),"data-variant":r,"data-element":p,"aria-label":a,disabled:d,...i?{style:i}:{},...b,...C,...f,children:t})}Na.displayName=Da;const Ve=g.forwardRef(Na),Ia={root:"_root_1fk3z_1",content:"_content_1fk3z_32"},Va="Card";function Ba({as:e,children:t,className:n,variant:r="default",animate:o=!0,animationDelay:s=0,style:i,clickable:a=!1,onClick:l,...c},u){const d=e||"article",f=o?Qe[d]:d,h=Ne(c)??[],p=o?{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:s,duration:.3}}:{};return y.jsx(f,{ref:u,className:j(Ia.root,"dyn-locator__"+we(Va),Se(n),...h),"data-variant":r,"data-clickable":a||!!l,onClick:l,...i?{style:i}:{},...p,...c,children:r==="bare"?t:y.jsx("div",{className:Ia.content,children:t})})}Ba.displayName=Va;const vp=g.forwardRef(Ba);function Fa(e){const{componentMap:t}=_p();return t[e]}var ce=(e=>(e.FULLSCREEN_TOGGLE="fullscreen",e.BACK_BUTTON_CLICK="back_button",e.SEARCH="search",e.AUTOCOMPLETE_ITEM_SELECT="autocomplete_item_select",e.GEOLOCATION="geolocation",e.LOCATION_CARD_CLICK="location_card_click",e.LOCATION_CARD_PRIMARY_ACTION="location_card_primary_action",e.LOCATION_CARD_SECONDARY_ACTION="location_card_secondary_action",e.INFO_WINDOW_PRIMARY_ACTION="info_window_primary_action",e.INFO_WINDOW_SECONDARY_ACTION="info_window_secondary_action",e.CARD_LIST_TOGGLE="card_list_toggle",e.SHARE_SHEET_OPEN="share_sheet_open",e.SHARE_SHEET_CLOSE="share_sheet_close",e.SHARE_SHEET_SHARE="share_sheet_share",e.AREA_SEARCH_TOGGLE="area_search_toggle",e.AREA_SEARCH_SUBMIT="area_search_submit",e.AREA_SEARCH_CANCEL="area_search_cancel",e))(ce||{});const Hr=[ce.LOCATION_CARD_PRIMARY_ACTION,ce.LOCATION_CARD_SECONDARY_ACTION,ce.AUTOCOMPLETE_ITEM_SELECT];class bp{constructor(){Nn(this,"config",{});Nn(this,"isInitialized",!1);Nn(this,"warnedEvents",new Set)}initialize(t={}){this.config=t,this.isInitialized=!0,Object.keys(t).forEach(n=>{var r;(r=t[n])!=null&&r.enabled&&!Hr.includes(n)&&console.warn(`[TrackingService] Event "${n}" is configured but not yet implemented in the codebase.`)})}isEventEnabled(t){var n,r;return this.isInitialized?(!Hr.includes(t)&&!this.warnedEvents.has(t)&&(console.warn(`[TrackingService] Event "${t}" is not yet implemented in the codebase.`),this.warnedEvents.add(t)),!!((n=this.config[t])!=null&&n.enabled)&&typeof((r=this.config[t])==null?void 0:r.tracker)=="function"):!1}track(t,n={}){if(!Hr.includes(t)&&!this.warnedEvents.has(t)&&(console.warn(`[TrackingService] Event "${t}" is not yet implemented in the codebase.`),this.warnedEvents.add(t)),!this.isEventEnabled(t))return;const r={...n,timestamp:n.timestamp||Date.now()},{tracker:o}=this.config[t]??{};typeof o=="function"&&o(r)}isTrackerInitialized(){return this.isInitialized}reset(){this.config={},this.isInitialized=!1,this.warnedEvents.clear()}}const Be=new bp,$a="LocationCard";function ja({title:e,timestamp:t,address:n,zip:r,province:o,street:s,city:i,country:a,capabilities:l,actions:c,className:u,id:d,coords:f,on_share:h,...p},m){const v=Fa("ctaButton"),b=M(x=>x.toggleShareSheet),C=M(x=>x.featureFlags),S=M(x=>x.presentationPrefs),{addressFormat:_}=S??{};function w(){b(!0)}function E(x){if(Be.isEventEnabled(ce.LOCATION_CARD_PRIMARY_ACTION))return()=>Be.track(ce.LOCATION_CARD_PRIMARY_ACTION,{cta_event_type:x.type??"",cta_url:x.url??"",cta_label:x.label??""});if(Be.isEventEnabled(ce.LOCATION_CARD_SECONDARY_ACTION))return()=>Be.track(ce.LOCATION_CARD_SECONDARY_ACTION,{cta_event_type:x.type??"",cta_url:x.url??"",cta_label:x.label??""})}return y.jsx(vp,{ref:m,variant:"bare",clickable:!0,className:j("dyn-locator__"+we($a),Se(u)),...p,style:{...p.style?p.style:{},padding:"var(--dyn-locator__spacing-xs) 0",borderRadius:"var(--dyn-locator__radius-s)",border:"1px solid var(--dyn-locator__colors-grey-grey-100)",boxShadow:"none"},children:y.jsxs("div",{className:xe.root,children:[y.jsxs("header",{className:xe.header,children:[t?y.jsx("time",{children:t}):null,y.jsxs("div",{className:xe.titleContainer,children:[e?y.jsx("h4",{children:e}):null,C.share?y.jsx(Ve,{className:xe.shareButton,variant:"bare",onClick:w,children:y.jsx(me,{size:"M",icon:"Share"})}):null]}),n?y.jsx("address",{children:_?wn({fallback:n,format:_,zip:r,city:i,province:o,street:s,country:a}):n}):null]}),l!=null&&l.length?y.jsx("div",{className:xe.body,children:l.map((x,T)=>y.jsxs("div",{className:xe.capabilities,children:[y.jsx("h5",{children:x.title}),y.jsx("ul",{className:xe.tagContainer,children:(x.capabilities??[]).map((D,O)=>y.jsx(gp,{as:"li",animationDelay:+`.${O+1}`,className:xe.tag,children:D.label},O))})]},T))}):null,c!=null&&c.length?y.jsx("div",{className:xe.cta,children:c.map((x,T)=>y.jsx(v,{animate:!1,fullWidth:!0,variant:T===0?"themed":"secondary",...Ca(x,E(x)),children:x.label},T))}):null]})})}ja.displayName=$a;const Cp=g.forwardRef(ja),za={root:"_root_o9d55_1",loader:"_loader_o9d55_73"},Ua="Button";function Ra({as:e,children:t,className:n,variant:r="default",size:o="medium",disabled:s=!1,loading:i=!1,fullWidth:a=!1,animate:l=!0,animationDelay:c=0,href:u,target:d,rel:f,style:h,...p},m){const v=e||(u?"a":"button"),b=l?Qe[v]:v,C=Ne(p)??[],S=l?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:c,duration:.2}}:{},_=u?{href:u,target:d,rel:d==="_blank"?"noopener noreferrer":f}:{};return y.jsx(b,{ref:m,className:j(za.root,"dyn-locator__"+we(Ua),Se(n),...C),"data-variant":r,"data-size":o,"data-full-width":a,disabled:s||i,...h?{style:h}:{},...S,..._,...p,children:i?y.jsxs("span",{style:{display:"flex",gap:10},children:[t,y.jsx("span",{className:za.loader,"aria-hidden":"true"})]}):t})}Ra.displayName=Ua;const qt=g.forwardRef(Ra),Xa={locationCard:Cp,ctaButton:qt},Sp={iconMap:Ma,componentMap:Xa},Kr=g.createContext(Sp);function wp({children:e,customIcons:t,customComponents:n}){const r={...Ma,...t??{}},o={...Xa,...n??{}};return y.jsx(Kr.Provider,{value:{iconMap:r,componentMap:o},children:e})}function xp(){const{iconMap:e}=g.useContext(Kr);return{iconMap:e}}function _p(){const{componentMap:e}=g.useContext(Kr);return{componentMap:e}}var St=(e=>(e.CLUSTERS="clusters",e.MARKERS="markers",e.FIND="find",e.ALL_MARKERS="allMarkers",e))(St||{});const qa=g.createContext({endpointMap:{},apiUrl:""});function Ep({children:e,endpoints:t,apiUrl:n}){var r;if(!n||!((r=Object.keys(t??{}))!=null&&r.length))throw new Error("EndpointProvider requires an apiUrl and endpointMap.");return y.jsx(qa.Provider,{value:{endpointMap:t,apiUrl:n},children:e})}function Tp(e){const{endpointMap:t,apiUrl:n}=g.useContext(qa);return{getEndpoint:(r={})=>{const o=t[e];if(!o)throw new Error(`Endpoint with id "${e}" not configured. Make sure to provide all required endpoints.`);let s="";return o.buildPath?s=o.buildPath(r):(s=o.path,Object.entries(r).forEach(([i,a])=>{s=s.replace(`:${i}`,String(a))})),{url:`${n}${s}`,method:o.method}}}}let Ap={data:""},Mp=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||Ap,Pp=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Lp=/\/\*[^]*?\*\/| +/g,Ga=/\n+/g,Fe=(e,t)=>{let n="",r="",o="";for(let s in e){let i=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+i+";":r+=s[1]=="f"?Fe(i,s):s+"{"+Fe(i,s[1]=="k"?"":t)+"}":typeof i=="object"?r+=Fe(i,t?t.replace(/([^,])+/g,a=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,a):a?a+" "+l:l)):s):i!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=Fe.p?Fe.p(s,i):s+":"+i+";")}return n+(t&&o?t+"{"+o+"}":o)+r},_e={},Wa=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+Wa(e[n]);return t}return e},Op=(e,t,n,r,o)=>{let s=Wa(e),i=_e[s]||(_e[s]=(l=>{let c=0,u=11;for(;c<l.length;)u=101*u+l.charCodeAt(c++)>>>0;return"go"+u})(s));if(!_e[i]){let l=s!==e?e:(c=>{let u,d,f=[{}];for(;u=Pp.exec(c.replace(Lp,""));)u[4]?f.shift():u[3]?(d=u[3].replace(Ga," ").trim(),f.unshift(f[0][d]=f[0][d]||{})):f[0][u[1]]=u[2].replace(Ga," ").trim();return f[0]})(e);_e[i]=Fe(o?{["@keyframes "+i]:l}:l,n?"":"."+i)}let a=n&&_e.g?_e.g:null;return n&&(_e.g=_e[i]),((l,c,u,d)=>{d?c.data=c.data.replace(d,l):c.data.indexOf(l)===-1&&(c.data=u?l+c.data:c.data+l)})(_e[i],t,r,a),i},kp=(e,t,n)=>e.reduce((r,o,s)=>{let i=t[s];if(i&&i.call){let a=i(n),l=a&&a.props&&a.props.className||/^go/.test(a)&&a;i=l?"."+l:a&&typeof a=="object"?a.props?"":Fe(a,""):a===!1?"":a}return r+o+(i??"")},"");function xn(e){let t=this||{},n=e.call?e(t.p):e;return Op(n.unshift?n.raw?kp(n,[].slice.call(arguments,1),t.p):n.reduce((r,o)=>Object.assign(r,o&&o.call?o(t.p):o),{}):n,Mp(t.target),t.g,t.o,t.k)}let Ha,Zr,Yr;xn.bind({g:1});let Ee=xn.bind({k:1});function Dp(e,t,n,r){Fe.p=t,Ha=e,Zr=n,Yr=r}function $e(e,t){let n=this||{};return function(){let r=arguments;function o(s,i){let a=Object.assign({},s),l=a.className||o.className;n.p=Object.assign({theme:Zr&&Zr()},a),n.o=/ *go\d+/.test(l),a.className=xn.apply(n,r)+(l?" "+l:"");let c=e;return e[0]&&(c=a.as||e,delete a.as),Yr&&c[0]&&Yr(a),Ha(c,a)}return t?t(o):o}}var Np=e=>typeof e=="function",_n=(e,t)=>Np(e)?e(t):e,Ip=(()=>{let e=0;return()=>(++e).toString()})(),Ka=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),Vp=20,Za=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,Vp)};case 1:return{...e,toasts:e.toasts.map(s=>s.id===t.toast.id?{...s,...t.toast}:s)};case 2:let{toast:n}=t;return Za(e,{type:e.toasts.find(s=>s.id===n.id)?1:0,toast:n});case 3:let{toastId:r}=t;return{...e,toasts:e.toasts.map(s=>s.id===r||r===void 0?{...s,dismissed:!0,visible:!1}:s)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(s=>s.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let o=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(s=>({...s,pauseDuration:s.pauseDuration+o}))}}},En=[],tt={toasts:[],pausedAt:void 0},nt=e=>{tt=Za(tt,e),En.forEach(t=>{t(tt)})},Bp={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Fp=(e={})=>{let[t,n]=g.useState(tt),r=g.useRef(tt);g.useEffect(()=>(r.current!==tt&&n(tt),En.push(n),()=>{let s=En.indexOf(n);s>-1&&En.splice(s,1)}),[]);let o=t.toasts.map(s=>{var i,a,l;return{...e,...e[s.type],...s,removeDelay:s.removeDelay||((i=e[s.type])==null?void 0:i.removeDelay)||(e==null?void 0:e.removeDelay),duration:s.duration||((a=e[s.type])==null?void 0:a.duration)||(e==null?void 0:e.duration)||Bp[s.type],style:{...e.style,...(l=e[s.type])==null?void 0:l.style,...s.style}}});return{...t,toasts:o}},$p=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||Ip()}),Gt=e=>(t,n)=>{let r=$p(t,e,n);return nt({type:2,toast:r}),r.id},$=(e,t)=>Gt("blank")(e,t);$.error=Gt("error"),$.success=Gt("success"),$.loading=Gt("loading"),$.custom=Gt("custom"),$.dismiss=e=>{nt({type:3,toastId:e})},$.remove=e=>nt({type:4,toastId:e}),$.promise=(e,t,n)=>{let r=$.loading(t.loading,{...n,...n==null?void 0:n.loading});return typeof e=="function"&&(e=e()),e.then(o=>{let s=t.success?_n(t.success,o):void 0;return s?$.success(s,{id:r,...n,...n==null?void 0:n.success}):$.dismiss(r),o}).catch(o=>{let s=t.error?_n(t.error,o):void 0;s?$.error(s,{id:r,...n,...n==null?void 0:n.error}):$.dismiss(r)}),e};var jp=(e,t)=>{nt({type:1,toast:{id:e,height:t}})},zp=()=>{nt({type:5,time:Date.now()})},Wt=new Map,Up=1e3,Rp=(e,t=Up)=>{if(Wt.has(e))return;let n=setTimeout(()=>{Wt.delete(e),nt({type:4,toastId:e})},t);Wt.set(e,n)},Xp=e=>{let{toasts:t,pausedAt:n}=Fp(e);g.useEffect(()=>{if(n)return;let s=Date.now(),i=t.map(a=>{if(a.duration===1/0)return;let l=(a.duration||0)+a.pauseDuration-(s-a.createdAt);if(l<0){a.visible&&$.dismiss(a.id);return}return setTimeout(()=>$.dismiss(a.id),l)});return()=>{i.forEach(a=>a&&clearTimeout(a))}},[t,n]);let r=g.useCallback(()=>{n&&nt({type:6,time:Date.now()})},[n]),o=g.useCallback((s,i)=>{let{reverseOrder:a=!1,gutter:l=8,defaultPosition:c}=i||{},u=t.filter(h=>(h.position||c)===(s.position||c)&&h.height),d=u.findIndex(h=>h.id===s.id),f=u.filter((h,p)=>p<d&&h.visible).length;return u.filter(h=>h.visible).slice(...a?[f+1]:[0,f]).reduce((h,p)=>h+(p.height||0)+l,0)},[t]);return g.useEffect(()=>{t.forEach(s=>{if(s.dismissed)Rp(s.id,s.removeDelay);else{let i=Wt.get(s.id);i&&(clearTimeout(i),Wt.delete(s.id))}})},[t]),{toasts:t,handlers:{updateHeight:jp,startPause:zp,endPause:r,calculateOffset:o}}},qp=Ee`
|
|
109
|
+
*/const bo=ee("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Co=g.createContext({});function lc(e){const t=g.useRef(null);return t.current===null&&(t.current=e()),t.current}const Vn=typeof window<"u",cc=Vn?g.useLayoutEffect:g.useEffect,Bn=g.createContext(null),So=g.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function uc(e=!0){const t=g.useContext(Bn);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=g.useId();g.useEffect(()=>{if(e)return o(s)},[e]);const i=g.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,i]:[!0]}function Fn(e,t){e.indexOf(t)===-1&&e.push(t)}function $n(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ae=e=>e;let lt=ae,Pe=ae;process.env.NODE_ENV!=="production"&&(lt=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Pe=(e,t)=>{if(!e)throw new Error(t)});const dc={useManualTiming:!1};function jn(e){let t;return()=>(t===void 0&&(t=e()),t)}const ct=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class zn{constructor(){this.subscriptions=[]}add(t){return Fn(this.subscriptions,t),()=>$n(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const i=this.subscriptions[s];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const he=e=>e*1e3,Ce=e=>e/1e3;function xo(e,t){return t?e*(1e3/t):0}const wo=new Set;function rn(e,t,n){e||wo.has(t)||(console.warn(t),wo.add(t))}const fc=jn(()=>window.ScrollTimeline!==void 0);class hc{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(o=>{if(fc()&&o.attachTimeline)return o.attachTimeline(t);if(typeof n=="function")return n(o)});return()=>{r.forEach((o,s)=>{o&&o(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class pc extends hc{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function Un(e,t){return e?e[t]||e.default||e:void 0}const Rn=2e4;function _o(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Rn;)t+=n,r=e.next(t);return t>=Rn?1/0:t}function Xn(e){return typeof e=="function"}function Eo(e,t){e.timeline=t,e.onfinish=null}const qn=e=>Array.isArray(e)&&typeof e[0]=="number",mc={linearEasing:void 0};function gc(e,t){const n=jn(e);return()=>{var r;return(r=mc[t])!==null&&r!==void 0?r:n()}}const on=gc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),To=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let s=0;s<o;s++)r+=e(ct(0,o-1,s))+", ";return`linear(${r.substring(0,r.length-2)})`};function Ao(e){return!!(typeof e=="function"&&on()||!e||typeof e=="string"&&(e in Gn||on())||qn(e)||Array.isArray(e)&&e.every(Ao))}const Et=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Gn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Et([0,.65,.55,1]),circOut:Et([.55,0,1,.45]),backIn:Et([.31,.01,.66,-.59]),backOut:Et([.33,1.53,.69,.99])};function Mo(e,t){if(e)return typeof e=="function"&&on()?To(e,t):qn(e)?Et(e):Array.isArray(e)?e.map(n=>Mo(n,t)||Gn.easeOut):Gn[e]}const sn=["read","resolveKeyframes","update","preRender","render","postRender"],Po={value:null};function yc(e,t){let n=new Set,r=new Set,o=!1,s=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(d){i.has(d)&&(u.schedule(d),e()),l++,d(a)}const u={schedule:(d,f=!1,h=!1)=>{const m=h&&o?n:r;return f&&i.add(d),m.has(d)||m.add(d),d},cancel:d=>{r.delete(d),i.delete(d)},process:d=>{if(a=d,o){s=!0;return}o=!0,[n,r]=[r,n],n.forEach(c),t&&Po.value&&Po.value.frameloop[t].push(l),l=0,n.clear(),o=!1,s&&(s=!1,u.process(d))}};return u}const vc=40;function Lo(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=sn.reduce((b,C)=>(b[C]=yc(s,t?C:void 0),b),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=i,h=()=>{const b=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(b-o.timestamp,vc),1),o.timestamp=b,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(h))},p=()=>{n=!0,r=!0,o.isProcessing||e(h)};return{schedule:sn.reduce((b,C)=>{const S=i[C];return b[C]=(w,x=!1,_=!1)=>(n||p(),S.schedule(w,x,_)),b},{}),cancel:b=>{for(let C=0;C<sn.length;C++)i[sn[C]].cancel(b)},state:o,steps:i}}const{schedule:F,cancel:Le,state:Y,steps:Wn}=Lo(typeof requestAnimationFrame<"u"?requestAnimationFrame:ae,!0),{schedule:Kn}=Lo(queueMicrotask,!1);let an;function bc(){an=void 0}const pe={now:()=>(an===void 0&&pe.set(Y.isProcessing||dc.useManualTiming?Y.timestamp:performance.now()),an),set:e=>{an=e,queueMicrotask(bc)}},de={x:!1,y:!1};function Oo(){return de.x||de.y}function Cc(e){return e==="x"||e==="y"?de[e]?null:(de[e]=!0,()=>{de[e]=!1}):de.x||de.y?null:(de.x=de.y=!0,()=>{de.x=de.y=!1})}function Sc(e,t,n){var r;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;const s=(r=void 0)!==null&&r!==void 0?r:o.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}function ko(e,t){const n=Sc(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function No(e){return!(e.pointerType==="touch"||Oo())}function xc(e,t,n={}){const[r,o,s]=ko(e,n),i=a=>{if(!No(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{No(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(a=>{a.addEventListener("pointerenter",i,o)}),s}function Do(e,t){const n=`${t}PointerCapture`;if(e.target instanceof Element&&n in e.target&&e.pointerId!==void 0)try{e.target[n](e.pointerId)}catch{}}const Io=(e,t)=>t?e===t?!0:Io(e,t.parentElement):!1,Hn=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,wc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function _c(e){return wc.has(e.tagName)||e.tabIndex!==-1}const Tt=new WeakSet;function Vo(e){return t=>{t.key==="Enter"&&e(t)}}function Zn(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Ec=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Vo(()=>{if(Tt.has(n))return;Zn(n,"down");const o=Vo(()=>{Zn(n,"up")}),s=()=>Zn(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Bo(e){return Hn(e)&&!Oo()}function Tc(e,t,n={}){const[r,o,s]=ko(e,n),i=a=>{const l=a.currentTarget;if(!l||!Bo(a)||Tt.has(l))return;Tt.add(l),Do(a,"set");const c=t(l,a),u=(h,p)=>{l.removeEventListener("pointerup",d),l.removeEventListener("pointercancel",f),Do(h,"release"),!(!Bo(h)||!Tt.has(l))&&(Tt.delete(l),typeof c=="function"&&c(h,{success:p}))},d=h=>{(h.isTrusted?Ac(h,l instanceof Element?l.getBoundingClientRect():{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}):!1)?u(h,!1):u(h,!(l instanceof Element)||Io(l,h.target))},f=h=>{u(h,!1)};l.addEventListener("pointerup",d,o),l.addEventListener("pointercancel",f,o),l.addEventListener("lostpointercapture",f,o)};return r.forEach(a=>{a=n.useGlobalTarget?window:a;let l=!1;a instanceof HTMLElement&&(l=!0,!_c(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0)),a.addEventListener("pointerdown",i,o),l&&a.addEventListener("focus",c=>Ec(c,o),o)}),s}function Ac(e,t){return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}const Fo=30,Mc=e=>!isNaN(parseFloat(e));class Pc{constructor(t,n={}){this.version="12.5.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const s=pe.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=pe.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Mc(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&rn(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new zn);const r=this.events[t].add(n);return t==="change"?()=>{r(),F.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=pe.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Fo)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Fo);return xo(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function At(e,t){return new Pc(e,t)}const $o=g.createContext({strict:!1}),jo={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ut={};for(const e in jo)ut[e]={isEnabled:t=>jo[e].some(n=>!!t[n])};function Lc(e){for(const t in e)ut[t]={...ut[t],...e[t]}}const Oc=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function ln(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Oc.has(e)}let zo=e=>!ln(e);function kc(e){e&&(zo=t=>t.startsWith("on")?!ln(t):e(t))}try{kc(require("@emotion/is-prop-valid").default)}catch{}function Nc(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(zo(o)||n===!0&&ln(o)||!t&&!ln(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Dc(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&rn(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const cn=g.createContext({});function un(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Mt(e){return typeof e=="string"||Array.isArray(e)}const Yn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Jn=["initial",...Yn];function dn(e){return un(e.animate)||Jn.some(t=>Mt(e[t]))}function Uo(e){return!!(dn(e)||e.variants)}function Ic(e,t){if(dn(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Mt(n)?n:void 0,animate:Mt(r)?r:void 0}}return e.inherit!==!1?t:{}}function Vc(e){const{initial:t,animate:n}=Ic(e,g.useContext(cn));return g.useMemo(()=>({initial:t,animate:n}),[Ro(t),Ro(n)])}function Ro(e){return Array.isArray(e)?e.join(" "):e}const Bc=Symbol.for("motionComponentSymbol");function dt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Fc(e,t,n){return g.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):dt(n)&&(n.current=r))},[t])}const Qn=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Xo="data-"+Qn("framerAppearId"),qo=g.createContext({});function $c(e,t,n,r,o){var s,i;const{visualElement:a}=g.useContext(cn),l=g.useContext($o),c=g.useContext(Bn),u=g.useContext(So).reducedMotion,d=g.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const f=d.current,h=g.useContext(qo);f&&!f.projection&&o&&(f.type==="html"||f.type==="svg")&&jc(d.current,n,o,h);const p=g.useRef(!1);g.useInsertionEffect(()=>{f&&p.current&&f.update(n,c)});const m=n[Xo],v=g.useRef(!!m&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,m))&&((i=window.MotionHasOptimisedAnimation)===null||i===void 0?void 0:i.call(window,m)));return cc(()=>{f&&(p.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Kn.render(f.render),v.current&&f.animationState&&f.animationState.animateChanges())}),g.useEffect(()=>{f&&(!v.current&&f.animationState&&f.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)===null||b===void 0||b.call(window,m)}),v.current=!1))}),f}function jc(e,t,n,r){const{layoutId:o,layout:s,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Go(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&dt(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function Go(e){if(e)return e.options.allowProjection!==!1?e.projection:Go(e.parent)}function zc({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var s,i;e&&Lc(e);function a(c,u){let d;const f={...g.useContext(So),...c,layoutId:Uc(c)},{isStatic:h}=f,p=Vc(c),m=r(c,h);if(!h&&Vn){Rc(f,e);const v=Xc(f);d=v.MeasureLayout,p.visualElement=$c(o,m,f,t,v.ProjectionNode)}return y.jsxs(cn.Provider,{value:p,children:[d&&p.visualElement?y.jsx(d,{visualElement:p.visualElement,...f}):null,n(o,c,Fc(m,p.visualElement,u),m,h,p.visualElement)]})}a.displayName=`motion.${typeof o=="string"?o:`create(${(i=(s=o.displayName)!==null&&s!==void 0?s:o.name)!==null&&i!==void 0?i:""})`}`;const l=g.forwardRef(a);return l[Bc]=o,l}function Uc({layoutId:e}){const t=g.useContext(Co).id;return t&&e!==void 0?t+"-"+e:e}function Rc(e,t){const n=g.useContext($o).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?lt(!1,r):Pe(!1,r)}}function Xc(e){const{drag:t,layout:n}=ut;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Wo=e=>t=>typeof t=="string"&&t.startsWith(e),er=Wo("--"),qc=Wo("var(--"),tr=e=>qc(e)?Gc.test(e.split("/*")[0].trim()):!1,Gc=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Pt={};function Wc(e){for(const t in e)Pt[t]=e[t],er(t)&&(Pt[t].isCSSVariable=!0)}const ft=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ge=new Set(ft);function Ko(e,{layout:t,layoutId:n}){return Ge.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Pt[e]||e==="opacity")}const te=e=>!!(e&&e.getVelocity),Ho=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Se=(e,t,n)=>n>t?t:n<e?e:n,ht={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Lt={...ht,transform:e=>Se(0,1,e)},fn={...ht,default:1},Ot=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Oe=Ot("deg"),me=Ot("%"),N=Ot("px"),Kc=Ot("vh"),Hc=Ot("vw"),Zo={...me,parse:e=>me.parse(e)/100,transform:e=>me.transform(e*100)},Zc={borderWidth:N,borderTopWidth:N,borderRightWidth:N,borderBottomWidth:N,borderLeftWidth:N,borderRadius:N,radius:N,borderTopLeftRadius:N,borderTopRightRadius:N,borderBottomRightRadius:N,borderBottomLeftRadius:N,width:N,maxWidth:N,height:N,maxHeight:N,top:N,right:N,bottom:N,left:N,padding:N,paddingTop:N,paddingRight:N,paddingBottom:N,paddingLeft:N,margin:N,marginTop:N,marginRight:N,marginBottom:N,marginLeft:N,backgroundPositionX:N,backgroundPositionY:N},Yc={rotate:Oe,rotateX:Oe,rotateY:Oe,rotateZ:Oe,scale:fn,scaleX:fn,scaleY:fn,scaleZ:fn,skew:Oe,skewX:Oe,skewY:Oe,distance:N,translateX:N,translateY:N,translateZ:N,x:N,y:N,z:N,perspective:N,transformPerspective:N,opacity:Lt,originX:Zo,originY:Zo,originZ:N},Yo={...ht,transform:Math.round},nr={...Zc,...Yc,zIndex:Yo,size:N,fillOpacity:Lt,strokeOpacity:Lt,numOctaves:Yo},Jc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Qc=ft.length;function eu(e,t,n){let r="",o=!0;for(let s=0;s<Qc;s++){const i=ft[s],a=e[i];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(i.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=Ho(a,nr[i]);if(!l){o=!1;const u=Jc[i]||i;r+=`${u}(${c}) `}n&&(t[i]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function rr(e,t,n){const{style:r,vars:o,transformOrigin:s}=e;let i=!1,a=!1;for(const l in t){const c=t[l];if(Ge.has(l)){i=!0;continue}else if(er(l)){o[l]=c;continue}else{const u=Ho(c,nr[l]);l.startsWith("origin")?(a=!0,s[l]=u):r[l]=u}}if(t.transform||(i||n?r.transform=eu(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=s;r.transformOrigin=`${l} ${c} ${u}`}}const or=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Jo(e,t,n){for(const r in t)!te(t[r])&&!Ko(r,n)&&(e[r]=t[r])}function tu({transformTemplate:e},t){return g.useMemo(()=>{const n=or();return rr(n,t,e),Object.assign({},n.vars,n.style)},[t])}function nu(e,t){const n=e.style||{},r={};return Jo(r,n,e),Object.assign(r,tu(e,t)),r}function ru(e,t){const n={},r=nu(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const ou=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function sr(e){return typeof e!="string"||e.includes("-")?!1:!!(ou.indexOf(e)>-1||/[A-Z]/u.test(e))}const su={offset:"stroke-dashoffset",array:"stroke-dasharray"},iu={offset:"strokeDashoffset",array:"strokeDasharray"};function au(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?su:iu;e[s.offset]=N.transform(-r);const i=N.transform(t),a=N.transform(n);e[s.array]=`${i} ${a}`}function Qo(e,t,n){return typeof e=="string"?e:N.transform(t+n*e)}function lu(e,t,n){const r=Qo(t,e.x,e.width),o=Qo(n,e.y,e.height);return`${r} ${o}`}function ir(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(rr(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h,dimensions:p}=e;f.transform&&(p&&(h.transform=f.transform),delete f.transform),p&&(o!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=lu(p,o!==void 0?o:.5,s!==void 0?s:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&au(f,i,a,l,!1)}const es=()=>({...or(),attrs:{}}),ar=e=>typeof e=="string"&&e.toLowerCase()==="svg";function cu(e,t,n,r){const o=g.useMemo(()=>{const s=es();return ir(s,t,ar(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Jo(s,e.style,e),o.style={...s,...o.style}}return o}function uu(e=!1){return(n,r,o,{latestValues:s},i)=>{const l=(sr(n)?cu:ru)(r,s,i,n),c=Nc(r,typeof n=="string",e),u=n!==g.Fragment?{...c,...l,ref:o}:{},{children:d}=r,f=g.useMemo(()=>te(d)?d.get():d,[d]);return g.createElement(n,{...u,children:f})}}function ts(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function lr(e,t,n,r){if(typeof t=="function"){const[o,s]=ts(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=ts(r);t=t(n!==void 0?n:e.custom,o,s)}return t}const cr=e=>Array.isArray(e),du=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),fu=e=>cr(e)?e[e.length-1]||0:e;function hn(e){const t=te(e)?e.get():e;return du(t)?t.toValue():t}function hu({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,s){const i={latestValues:pu(r,o,s,e),renderState:t()};return n&&(i.onMount=a=>n({props:r,current:a,...i}),i.onUpdate=a=>n(a)),i}const ns=e=>(t,n)=>{const r=g.useContext(cn),o=g.useContext(Bn),s=()=>hu(e,t,r,o);return n?s():lc(s)};function pu(e,t,n,r){const o={},s=r(e,{});for(const f in s)o[f]=hn(s[f]);let{initial:i,animate:a}=e;const l=dn(e),c=Uo(e);t&&c&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||i===!1;const d=u?a:i;if(d&&typeof d!="boolean"&&!un(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const p=lr(e,f[h]);if(p){const{transitionEnd:m,transition:v,...b}=p;for(const C in b){let S=b[C];if(Array.isArray(S)){const w=u?S.length-1:0;S=S[w]}S!==null&&(o[C]=S)}for(const C in m)o[C]=m[C]}}}return o}function ur(e,t,n){var r;const{style:o}=e,s={};for(const i in o)(te(o[i])||t.style&&te(t.style[i])||Ko(i,e)||((r=n==null?void 0:n.getValue(i))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[i]=o[i]);return s}const mu={useVisualState:ns({scrapeMotionValuesFromProps:ur,createRenderState:or})};function rs(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function os(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const ss=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function is(e,t,n,r){os(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(ss.has(o)?o:Qn(o),t.attrs[o])}function as(e,t,n){const r=ur(e,t,n);for(const o in e)if(te(e[o])||te(t[o])){const s=ft.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}const ls=["x","y","width","height","cx","cy","r"],gu={useVisualState:ns({scrapeMotionValuesFromProps:as,createRenderState:es,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let s=!!e.drag;if(!s){for(const a in o)if(Ge.has(a)){s=!0;break}}if(!s)return;let i=!t;if(t)for(let a=0;a<ls.length;a++){const l=ls[a];e[l]!==t[l]&&(i=!0)}i&&F.read(()=>{rs(n,r),F.render(()=>{ir(r,o,ar(n.tagName),e.transformTemplate),is(n,r)})})}})};function yu(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const i={...sr(r)?gu:mu,preloadedFeatures:e,useRender:uu(o),createVisualElement:t,Component:r};return zc(i)}}function kt(e,t,n){const r=e.getProps();return lr(r,t,n!==void 0?n:r.custom,e)}const cs=new Set(["width","height","top","left","right","bottom",...ft]);function vu(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,At(n))}function bu(e,t){const n=kt(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=fu(s[i]);vu(e,i,a)}}function Cu(e){return!!(te(e)&&e.add)}function dr(e,t){const n=e.getValue("willChange");if(Cu(n))return n.add(t)}function us(e){return e.props[Xo]}const ds=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Su=1e-7,xu=12;function wu(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=ds(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>Su&&++a<xu);return i}function Nt(e,t,n,r){if(e===t&&n===r)return ae;const o=s=>wu(s,0,1,e,n);return s=>s===0||s===1?s:ds(o(s),t,r)}const fs=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,hs=e=>t=>1-e(1-t),ps=Nt(.33,1.53,.69,.99),fr=hs(ps),ms=fs(fr),gs=e=>(e*=2)<1?.5*fr(e):.5*(2-Math.pow(2,-10*(e-1))),hr=e=>1-Math.sin(Math.acos(e)),ys=hs(hr),vs=fs(hr),bs=e=>/^0[^.\s]+$/u.test(e);function _u(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||bs(e):!0}const Dt=e=>Math.round(e*1e5)/1e5,pr=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Eu(e){return e==null}const Tu=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,mr=(e,t)=>n=>!!(typeof n=="string"&&Tu.test(n)&&n.startsWith(e)||t&&!Eu(n)&&Object.prototype.hasOwnProperty.call(n,t)),Cs=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,s,i,a]=r.match(pr);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},Au=e=>Se(0,255,e),gr={...ht,transform:e=>Math.round(Au(e))},We={test:mr("rgb","red"),parse:Cs("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+gr.transform(e)+", "+gr.transform(t)+", "+gr.transform(n)+", "+Dt(Lt.transform(r))+")"};function Mu(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const yr={test:mr("#"),parse:Mu,transform:We.transform},pt={test:mr("hsl","hue"),parse:Cs("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+me.transform(Dt(t))+", "+me.transform(Dt(n))+", "+Dt(Lt.transform(r))+")"},ne={test:e=>We.test(e)||yr.test(e)||pt.test(e),parse:e=>We.test(e)?We.parse(e):pt.test(e)?pt.parse(e):yr.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?We.transform(e):pt.transform(e)},Pu=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Lu(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(pr))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Pu))===null||n===void 0?void 0:n.length)||0)>0}const Ss="number",xs="color",Ou="var",ku="var(",ws="${}",Nu=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function It(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(Nu,l=>(ne.test(l)?(r.color.push(s),o.push(xs),n.push(ne.parse(l))):l.startsWith(ku)?(r.var.push(s),o.push(Ou),n.push(l)):(r.number.push(s),o.push(Ss),n.push(parseFloat(l))),++s,ws)).split(ws);return{values:n,split:a,indexes:r,types:o}}function _s(e){return It(e).values}function Es(e){const{split:t,types:n}=It(e),r=t.length;return o=>{let s="";for(let i=0;i<r;i++)if(s+=t[i],o[i]!==void 0){const a=n[i];a===Ss?s+=Dt(o[i]):a===xs?s+=ne.transform(o[i]):s+=o[i]}return s}}const Du=e=>typeof e=="number"?0:e;function Iu(e){const t=_s(e);return Es(e)(t.map(Du))}const ke={test:Lu,parse:_s,createTransformer:Es,getAnimatableNone:Iu},Vu=new Set(["brightness","contrast","saturate","opacity"]);function Bu(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(pr)||[];if(!r)return e;const o=n.replace(r,"");let s=Vu.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const Fu=/\b([a-z-]*)\(.*?\)/gu,vr={...ke,getAnimatableNone:e=>{const t=e.match(Fu);return t?t.map(Bu).join(" "):e}},$u={...nr,color:ne,backgroundColor:ne,outlineColor:ne,fill:ne,stroke:ne,borderColor:ne,borderTopColor:ne,borderRightColor:ne,borderBottomColor:ne,borderLeftColor:ne,filter:vr,WebkitFilter:vr},Ts=e=>$u[e];function As(e,t){let n=Ts(e);return n!==vr&&(n=ke),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const ju=new Set(["auto","none","0"]);function zu(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!ju.has(s)&&It(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=As(n,o)}const Ke=e=>e*180/Math.PI,br=e=>{const t=Ke(Math.atan2(e[1],e[0]));return Cr(t)},Uu={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:br,rotateZ:br,skewX:e=>Ke(Math.atan(e[1])),skewY:e=>Ke(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Cr=e=>(e=e%360,e<0&&(e+=360),e),Ms=br,Ps=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Ls=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Ru={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ps,scaleY:Ls,scale:e=>(Ps(e)+Ls(e))/2,rotateX:e=>Cr(Ke(Math.atan2(e[6],e[5]))),rotateY:e=>Cr(Ke(Math.atan2(-e[2],e[0]))),rotateZ:Ms,rotate:Ms,skewX:e=>Ke(Math.atan(e[4])),skewY:e=>Ke(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Os(e){return e.includes("scale")?1:0}function Sr(e,t){if(!e||e==="none")return Os(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=Ru,o=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Uu,o=a}if(!o)return Os(t);const s=r[t],i=o[1].split(",").map(qu);return typeof s=="function"?s(i):i[s]}const Xu=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Sr(n,t)};function qu(e){return parseFloat(e.trim())}const ks=e=>e===ht||e===N,Gu=new Set(["x","y","z"]),Wu=ft.filter(e=>!Gu.has(e));function Ku(e){const t=[];return Wu.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const mt={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Sr(t,"x"),y:(e,{transform:t})=>Sr(t,"y")};mt.translateX=mt.x,mt.translateY=mt.y;const He=new Set;let xr=!1,wr=!1;function Ns(){if(wr){const e=Array.from(He).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=Ku(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([s,i])=>{var a;(a=r.getValue(s))===null||a===void 0||a.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}wr=!1,xr=!1,He.forEach(e=>e.complete()),He.clear()}function Ds(){He.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(wr=!0)})}function Hu(){Ds(),Ns()}class _r{constructor(t,n,r,o,s,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(He.add(this),xr||(xr=!0,F.read(Ds),F.resolveKeyframes(Ns))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const i=o==null?void 0:o.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),He.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,He.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Is=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Zu=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Yu(e){const t=Zu.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const Ju=4;function Vs(e,t,n=1){Pe(n<=Ju,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=Yu(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return Is(i)?parseFloat(i):i}return tr(o)?Vs(o,t,n+1):o}const Bs=e=>t=>t.test(e),Fs=[ht,N,me,Oe,Hc,Kc,{test:e=>e==="auto",parse:e=>e}],$s=e=>Fs.find(Bs(e));class js extends _r{constructor(t,n,r,o,s){super(t,n,r,o,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),tr(c))){const u=Vs(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!cs.has(r)||t.length!==2)return;const[o,s]=t,i=$s(o),a=$s(s);if(i!==a)if(ks(i)&&ks(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)_u(t[o])&&r.push(o);r.length&&zu(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=mt[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n||!n.current)return;const s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const i=o.length-1,a=o[i];o[i]=mt[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const zs=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ke.test(e)||e==="0")&&!e.startsWith("url("));function Qu(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function ed(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],i=zs(o,t),a=zs(s,t);return lt(i===a,`You are trying to animate ${t} from "${o}" to "${s}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${s} via the \`style\` property.`),!i||!a?!1:Qu(e)||(n==="spring"||Xn(n))&&r}const td=e=>e!==null;function pn(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(td),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}const nd=40;class Us{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=pe.now(),this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:i,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>nd?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Hu(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=pe.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:s,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!ed(t,r,o,s))if(i)this.options.duration=0;else{l&&l(pn(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const z=(e,t,n)=>e+(t-e)*n;function Er(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function rd({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,i=0;if(!t)o=s=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=Er(l,a,e+1/3),s=Er(l,a,e),i=Er(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function mn(e,t){return n=>n>0?t:e}const Tr=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},od=[yr,We,pt],sd=e=>od.find(t=>t.test(e));function Rs(e){const t=sd(e);if(lt(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===pt&&(n=rd(n)),n}const Xs=(e,t)=>{const n=Rs(e),r=Rs(t);if(!n||!r)return mn(e,t);const o={...n};return s=>(o.red=Tr(n.red,r.red,s),o.green=Tr(n.green,r.green,s),o.blue=Tr(n.blue,r.blue,s),o.alpha=z(n.alpha,r.alpha,s),We.transform(o))},id=(e,t)=>n=>t(e(n)),Vt=(...e)=>e.reduce(id),Ar=new Set(["none","hidden"]);function ad(e,t){return Ar.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function ld(e,t){return n=>z(e,t,n)}function Mr(e){return typeof e=="number"?ld:typeof e=="string"?tr(e)?mn:ne.test(e)?Xs:dd:Array.isArray(e)?qs:typeof e=="object"?ne.test(e)?Xs:cd:mn}function qs(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>Mr(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function cd(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Mr(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function ud(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],a=e.indexes[i][o[i]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[s]=l,o[i]++}return r}const dd=(e,t)=>{const n=ke.createTransformer(t),r=It(e),o=It(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Ar.has(e)&&!o.values.length||Ar.has(t)&&!r.values.length?ad(e,t):Vt(qs(ud(r,o),o.values),n):(lt(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),mn(e,t))};function Gs(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?z(e,t,n):Mr(e)(e,t)}const fd=5;function Ws(e,t,n){const r=Math.max(t-fd,0);return xo(n-e(r),t-r)}const U={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Ks=.001;function hd({duration:e=U.duration,bounce:t=U.bounce,velocity:n=U.velocity,mass:r=U.mass}){let o,s;lt(e<=he(U.maxDuration),"Spring duration must be 10 seconds or less");let i=1-t;i=Se(U.minDamping,U.maxDamping,i),e=Se(U.minDuration,U.maxDuration,Ce(e)),i<1?(o=c=>{const u=c*i,d=u*e,f=u-n,h=Pr(c,i),p=Math.exp(-d);return Ks-f/h*p},s=c=>{const d=c*i*e,f=d*n+n,h=Math.pow(i,2)*Math.pow(c,2)*e,p=Math.exp(-d),m=Pr(Math.pow(c,2),i);return(-o(c)+Ks>0?-1:1)*((f-h)*p)/m}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-.001+u*d},s=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=md(o,s,a);if(e=he(e),isNaN(l))return{stiffness:U.stiffness,damping:U.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const pd=12;function md(e,t,n){let r=n;for(let o=1;o<pd;o++)r=r-e(r)/t(r);return r}function Pr(e,t){return e*Math.sqrt(1-t*t)}const gd=["duration","bounce"],yd=["stiffness","damping","mass"];function Hs(e,t){return t.some(n=>e[n]!==void 0)}function vd(e){let t={velocity:U.velocity,stiffness:U.stiffness,damping:U.damping,mass:U.mass,isResolvedFromDuration:!1,...e};if(!Hs(e,yd)&&Hs(e,gd))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,s=2*Se(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:U.mass,stiffness:o,damping:s}}else{const n=hd(e);t={...t,...n,mass:U.mass},t.isResolvedFromDuration=!0}return t}function Zs(e=U.visualDuration,t=U.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const s=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:h}=vd({...n,velocity:-Ce(n.velocity||0)}),p=f||0,m=c/(2*Math.sqrt(l*u)),v=i-s,b=Ce(Math.sqrt(l/u)),C=Math.abs(v)<5;r||(r=C?U.restSpeed.granular:U.restSpeed.default),o||(o=C?U.restDelta.granular:U.restDelta.default);let S;if(m<1){const x=Pr(b,m);S=_=>{const A=Math.exp(-m*b*_);return i-A*((p+m*b*v)/x*Math.sin(x*_)+v*Math.cos(x*_))}}else if(m===1)S=x=>i-Math.exp(-b*x)*(v+(p+b*v)*x);else{const x=b*Math.sqrt(m*m-1);S=_=>{const A=Math.exp(-m*b*_),T=Math.min(x*_,300);return i-A*((p+m*b*v)*Math.sinh(T)+x*v*Math.cosh(T))/x}}const w={calculatedDuration:h&&d||null,next:x=>{const _=S(x);if(h)a.done=x>=d;else{let A=0;m<1&&(A=x===0?he(p):Ws(S,x,_));const T=Math.abs(A)<=r,O=Math.abs(i-_)<=o;a.done=T&&O}return a.value=a.done?i:_,a},toString:()=>{const x=Math.min(_o(w),Rn),_=To(A=>w.next(x*A).value,x,30);return x+"ms "+_}};return w}function Ys({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},h=T=>a!==void 0&&T<a||l!==void 0&&T>l,p=T=>a===void 0?l:l===void 0||Math.abs(a-T)<Math.abs(l-T)?a:l;let m=n*t;const v=d+m,b=i===void 0?v:i(v);b!==v&&(m=b-d);const C=T=>-m*Math.exp(-T/r),S=T=>b+C(T),w=T=>{const O=C(T),P=S(T);f.done=Math.abs(O)<=c,f.value=f.done?b:P};let x,_;const A=T=>{h(f.value)&&(x=T,_=Zs({keyframes:[f.value,p(f.value)],velocity:Ws(S,T,f.value),damping:o,stiffness:s,restDelta:c,restSpeed:u}))};return A(0),{calculatedDuration:null,next:T=>{let O=!1;return!_&&x===void 0&&(O=!0,w(T),A(T)),x!==void 0&&T>=x?_.next(T-x):(!O&&w(T),f)}}}const bd=Nt(.42,0,1,1),Cd=Nt(0,0,.58,1),Js=Nt(.42,0,.58,1),Sd=e=>Array.isArray(e)&&typeof e[0]!="number",Qs={linear:ae,easeIn:bd,easeInOut:Js,easeOut:Cd,circIn:hr,circInOut:vs,circOut:ys,backIn:fr,backInOut:ms,backOut:ps,anticipate:gs},ei=e=>{if(qn(e)){Pe(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Nt(t,n,r,o)}else if(typeof e=="string")return Pe(Qs[e]!==void 0,`Invalid easing type '${e}'`),Qs[e];return e};function xd(e,t,n){const r=[],o=n||Gs,s=e.length-1;for(let i=0;i<s;i++){let a=o(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||ae:t;a=Vt(l,a)}r.push(a)}return r}function wd(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(Pe(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=xd(t,r,o),l=a.length,c=u=>{if(i&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=ct(e[d],e[d+1],u);return a[d](f)};return n?u=>c(Se(e[0],e[s-1],u)):c}function _d(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=ct(0,t,r);e.push(z(n,1,o))}}function Ed(e){const t=[0];return _d(t,e.length-1),t}function Td(e,t){return e.map(n=>n*t)}function Ad(e,t){return e.map(()=>t||Js).splice(0,e.length-1)}function Bt({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Sd(r)?r.map(ei):ei(r),s={done:!1,value:t[0]},i=Td(n&&n.length===t.length?n:Ed(t),e),a=wd(i,t,{ease:Array.isArray(o)?o:Ad(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const Md=e=>{const t=({timestamp:n})=>e(n);return{start:()=>F.update(t,!0),stop:()=>Le(t),now:()=>Y.isProcessing?Y.timestamp:pe.now()}},Pd={decay:Ys,inertia:Ys,tween:Bt,keyframes:Bt,spring:Zs},Ld=e=>e/100;class Lr extends Us{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:o,keyframes:s}=this.options,i=(o==null?void 0:o.KeyframeResolver)||_r,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new i(s,a,n,r,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:i=0}=this.options,a=Xn(n)?n:Pd[n]||Bt;let l,c;process.env.NODE_ENV!=="production"&&a!==Bt&&Pe(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),a!==Bt&&typeof t[0]!="number"&&(l=Vt(Ld,Gs(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});s==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=_o(u));const{calculatedDuration:d}=u,f=d+o,h=f*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:h}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:T}=this.options;return{done:!0,value:T[T.length-1]}}const{finalKeyframe:o,generator:s,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return s.next(0);const{delay:f,repeat:h,repeatType:p,repeatDelay:m,onUpdate:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const b=this.currentTime-f*(this.speed>=0?1:-1),C=this.speed>=0?b<0:b>u;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let S=this.currentTime,w=s;if(h){const T=Math.min(this.currentTime,u)/d;let O=Math.floor(T),P=T%1;!P&&T>=1&&(P=1),P===1&&O--,O=Math.min(O,h+1),!!(O%2)&&(p==="reverse"?(P=1-P,m&&(P-=m/d)):p==="mirror"&&(w=i)),S=Se(0,1,P)*d}const x=C?{done:!1,value:l[0]}:w.next(S);a&&(x.value=a(x.value));let{done:_}=x;!C&&c!==null&&(_=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&_);return A&&o!==void 0&&(x.value=pn(l,this.options,o)),v&&v(x.value),A&&this.finish(),x}get duration(){const{resolved:t}=this;return t?Ce(t.calculatedDuration):0}get time(){return Ce(this.currentTime)}set time(t){t=he(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ce(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Md,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Od=new Set(["opacity","clipPath","filter","transform"]);function kd(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:i="loop",ease:a="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Mo(a,o);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:i==="reverse"?"alternate":"normal"})}const Nd=jn(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),gn=10,Dd=2e4;function Id(e){return Xn(e.type)||e.type==="spring"||!Ao(e.ease)}function Vd(e,t){const n=new Lr({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let s=0;for(;!r.done&&s<Dd;)r=n.sample(s),o.push(r.value),s+=gn;return{times:void 0,keyframes:o,duration:s-gn,ease:"linear"}}const ti={anticipate:gs,backInOut:ms,circInOut:vs};function Bd(e){return e in ti}class ni extends Us{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:s}=this.options;this.resolver=new js(s,(i,a)=>this.onKeyframesResolved(i,a),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:o,ease:s,type:i,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&on()&&Bd(s)&&(s=ti[s]),Id(this.options)){const{onComplete:d,onUpdate:f,motionValue:h,element:p,...m}=this.options,v=Vd(t,m);t=v.keyframes,t.length===1&&(t[1]=t[0]),r=v.duration,o=v.times,s=v.ease,i="keyframes"}const u=kd(a.owner.current,l,t,{...this.options,duration:r,times:o,ease:s});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(Eo(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;a.set(pn(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:o,type:i,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Ce(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Ce(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=he(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return ae;const{animation:r}=n;Eo(r,t)}return ae}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:s,ease:i,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,element:f,...h}=this.options,p=new Lr({...h,keyframes:r,duration:o,type:s,ease:i,times:a,isGenerator:!0}),m=he(this.time);c.setWithVelocity(p.sample(m-gn).value,p.sample(m).value,gn)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:s,damping:i,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return Nd()&&r&&Od.has(r)&&!l&&!c&&!o&&s!=="mirror"&&i!==0&&a!=="inertia"}}const Fd={type:"spring",stiffness:500,damping:25,restSpeed:10},$d=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),jd={type:"keyframes",duration:.8},zd={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ud=(e,{keyframes:t})=>t.length>2?jd:Ge.has(e)?e.startsWith("scale")?$d(t[1]):Fd:zd;function Rd({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:i,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const Or=(e,t,n,r={},o,s)=>i=>{const a=Un(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-he(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:o};Rd(a)||(u={...u,...Ud(e,u)}),u.duration&&(u.duration=he(u.duration)),u.repeatDelay&&(u.repeatDelay=he(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),u.allowFlatten=!a.type&&!a.ease,d&&!s&&t.get()!==void 0){const f=pn(u.keyframes,a);if(f!==void 0)return F.update(()=>{u.onUpdate(f),u.onComplete()}),new pc([])}return!s&&ni.supports(u)?new ni(u):new Lr(u)};function Xd({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function ri(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var s;let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(i=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const f=e.getValue(d,(s=e.latestValues[d])!==null&&s!==void 0?s:null),h=l[d];if(h===void 0||u&&Xd(u,d))continue;const p={delay:n,...Un(i||{},d)};let m=!1;if(window.MotionHandoffAnimation){const b=us(e);if(b){const C=window.MotionHandoffAnimation(b,d,F);C!==null&&(p.startTime=C,m=!0)}}dr(e,d),f.start(Or(d,f,h,e.shouldReduceMotion&&cs.has(d)?{type:!1}:p,e,m));const v=f.animation;v&&c.push(v)}return a&&Promise.all(c).then(()=>{F.update(()=>{a&&bu(e,a)})}),c}function kr(e,t,n={}){var r;const o=kt(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>Promise.all(ri(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=s;return qd(e,t,u+c,d,f,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[c,u]=l==="beforeChildren"?[i,a]:[a,i];return c().then(()=>u())}else return Promise.all([i(),a(n.delay)])}function qd(e,t,n=0,r=0,o=1,s){const i=[],a=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(Gd).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(kr(c,t,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function Gd(e,t){return e.sortNodePosition(t)}function Wd(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>kr(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=kr(e,t,n);else{const o=typeof t=="function"?kt(e,t,n.custom):t;r=Promise.all(ri(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function oi(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const Kd=Jn.length;function si(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?si(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Kd;n++){const r=Jn[n],o=e.props[r];(Mt(o)||o===!1)&&(t[r]=o)}return t}const Hd=[...Yn].reverse(),Zd=Yn.length;function Yd(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Wd(e,n,r)))}function Jd(e){let t=Yd(e),n=ii(),r=!0;const o=l=>(c,u)=>{var d;const f=kt(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:h,transitionEnd:p,...m}=f;c={...c,...m,...p}}return c};function s(l){t=l(e)}function i(l){const{props:c}=e,u=si(e.parent)||{},d=[],f=new Set;let h={},p=1/0;for(let v=0;v<Zd;v++){const b=Hd[v],C=n[b],S=c[b]!==void 0?c[b]:u[b],w=Mt(S),x=b===l?C.isActive:null;x===!1&&(p=v);let _=S===u[b]&&S!==c[b]&&w;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),C.protectedKeys={...h},!C.isActive&&x===null||!S&&!C.prevProp||un(S)||typeof S=="boolean")continue;const A=Qd(C.prevProp,S);let T=A||b===l&&C.isActive&&!_&&w||v>p&&w,O=!1;const P=Array.isArray(S)?S:[S];let V=P.reduce(o(b),{});x===!1&&(V={});const{prevResolvedValues:q={}}=C,se={...q,...V},ie=L=>{T=!0,f.has(L)&&(O=!0,f.delete(L)),C.needsAnimating[L]=!0;const D=e.getValue(L);D&&(D.liveStyle=!1)};for(const L in se){const D=V[L],B=q[L];if(h.hasOwnProperty(L))continue;let G=!1;cr(D)&&cr(B)?G=!oi(D,B):G=D!==B,G?D!=null?ie(L):f.add(L):D!==void 0&&f.has(L)?ie(L):C.protectedKeys[L]=!0}C.prevProp=S,C.prevResolvedValues=V,C.isActive&&(h={...h,...V}),r&&e.blockInitialAnimation&&(T=!1),T&&(!(_&&A)||O)&&d.push(...P.map(L=>({animation:L,options:{type:b}})))}if(f.size){const v={};if(typeof c.initial!="boolean"){const b=kt(e,Array.isArray(c.initial)?c.initial[0]:c.initial);b&&b.transition&&(v.transition=b.transition)}f.forEach(b=>{const C=e.getBaseTarget(b),S=e.getValue(b);S&&(S.liveStyle=!0),v[b]=C??null}),d.push({animation:v})}let m=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(f=>{var h;return(h=f.animationState)===null||h===void 0?void 0:h.setActive(l,c)}),n[l].isActive=c;const d=i(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=ii(),r=!0}}}function Qd(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!oi(t,e):!1}function Ze(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ii(){return{animate:Ze(!0),whileInView:Ze(),whileHover:Ze(),whileTap:Ze(),whileDrag:Ze(),whileFocus:Ze(),exit:Ze()}}class Ne{constructor(t){this.isMounted=!1,this.node=t}update(){}}class ef extends Ne{constructor(t){super(t),t.animationState||(t.animationState=Jd(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();un(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let tf=0;class nf extends Ne{constructor(){super(...arguments),this.id=tf++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const rf={animation:{Feature:ef},exit:{Feature:nf}};function Ft(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function $t(e){return{point:{x:e.pageX,y:e.pageY}}}const of=e=>t=>Hn(t)&&e(t,$t(t));function jt(e,t,n,r){return Ft(e,t,of(n),r)}function ai({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function sf({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function af(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const li=1e-4,lf=1-li,cf=1+li,ci=.01,uf=0-ci,df=0+ci;function re(e){return e.max-e.min}function ff(e,t,n){return Math.abs(e-t)<=n}function ui(e,t,n,r=.5){e.origin=r,e.originPoint=z(t.min,t.max,e.origin),e.scale=re(n)/re(t),e.translate=z(n.min,n.max,e.origin)-e.originPoint,(e.scale>=lf&&e.scale<=cf||isNaN(e.scale))&&(e.scale=1),(e.translate>=uf&&e.translate<=df||isNaN(e.translate))&&(e.translate=0)}function zt(e,t,n,r){ui(e.x,t.x,n.x,r?r.originX:void 0),ui(e.y,t.y,n.y,r?r.originY:void 0)}function di(e,t,n){e.min=n.min+t.min,e.max=e.min+re(t)}function hf(e,t,n){di(e.x,t.x,n.x),di(e.y,t.y,n.y)}function fi(e,t,n){e.min=t.min-n.min,e.max=e.min+re(t)}function Ut(e,t,n){fi(e.x,t.x,n.x),fi(e.y,t.y,n.y)}const hi=()=>({translate:0,scale:1,origin:0,originPoint:0}),gt=()=>({x:hi(),y:hi()}),pi=()=>({min:0,max:0}),X=()=>({x:pi(),y:pi()});function ce(e){return[e("x"),e("y")]}function Nr(e){return e===void 0||e===1}function Dr({scale:e,scaleX:t,scaleY:n}){return!Nr(e)||!Nr(t)||!Nr(n)}function Ye(e){return Dr(e)||mi(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function mi(e){return gi(e.x)||gi(e.y)}function gi(e){return e&&e!=="0%"}function yn(e,t,n){const r=e-n,o=t*r;return n+o}function yi(e,t,n,r,o){return o!==void 0&&(e=yn(e,o,r)),yn(e,n,r)+t}function Ir(e,t=0,n=1,r,o){e.min=yi(e.min,t,n,r,o),e.max=yi(e.max,t,n,r,o)}function vi(e,{x:t,y:n}){Ir(e.x,t.translate,t.scale,t.originPoint),Ir(e.y,n.translate,n.scale,n.originPoint)}const bi=.999999999999,Ci=1.0000000000001;function pf(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,i;for(let a=0;a<o;a++){s=n[a],i=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&vt(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,vi(e,i)),r&&Ye(s.latestValues)&&vt(e,s.latestValues))}t.x<Ci&&t.x>bi&&(t.x=1),t.y<Ci&&t.y>bi&&(t.y=1)}function yt(e,t){e.min=e.min+t,e.max=e.max+t}function Si(e,t,n,r,o=.5){const s=z(e.min,e.max,o);Ir(e,t,n,s,r)}function vt(e,t){Si(e.x,t.x,t.scaleX,t.scale,t.originX),Si(e.y,t.y,t.scaleY,t.scale,t.originY)}function xi(e,t){return ai(af(e.getBoundingClientRect(),t))}function mf(e,t,n){const r=xi(e,n),{scroll:o}=t;return o&&(yt(r.x,o.offset.x),yt(r.y,o.offset.y)),r}const wi=({current:e})=>e?e.ownerDocument.defaultView:null,_i=(e,t)=>Math.abs(e-t);function gf(e,t){const n=_i(e.x,t.x),r=_i(e.y,t.y);return Math.sqrt(n**2+r**2)}class Ei{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Br(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,h=gf(d.offset,{x:0,y:0})>=3;if(!f&&!h)return;const{point:p}=d,{timestamp:m}=Y;this.history.push({...p,timestamp:m});const{onStart:v,onMove:b}=this.handlers;f||(v&&v(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Vr(f,this.transformPagePoint),F.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:h,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Br(d.type==="pointercancel"?this.lastMoveEventInfo:Vr(f,this.transformPagePoint),this.history);this.startEvent&&h&&h(d,v),p&&p(d,v)},!Hn(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const i=$t(t),a=Vr(i,this.transformPagePoint),{point:l}=a,{timestamp:c}=Y;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Br(a,this.history)),this.removeListeners=Vt(jt(this.contextWindow,"pointermove",this.handlePointerMove),jt(this.contextWindow,"pointerup",this.handlePointerUp),jt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Le(this.updatePoint)}}function Vr(e,t){return t?{point:t(e.point)}:e}function Ti(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Br({point:e},t){return{point:e,delta:Ti(e,Ai(t)),offset:Ti(e,yf(t)),velocity:vf(t,.1)}}function yf(e){return e[0]}function Ai(e){return e[e.length-1]}function vf(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Ai(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>he(t)));)n--;if(!r)return{x:0,y:0};const s=Ce(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const i={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function bf(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?z(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?z(n,e,r.max):Math.min(e,n)),e}function Mi(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Cf(e,{top:t,left:n,bottom:r,right:o}){return{x:Mi(e.x,n,o),y:Mi(e.y,t,r)}}function Pi(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Sf(e,t){return{x:Pi(e.x,t.x),y:Pi(e.y,t.y)}}function xf(e,t){let n=.5;const r=re(e),o=re(t);return o>r?n=ct(t.min,t.max-r,e.min):r>o&&(n=ct(e.min,e.max-o,t.min)),Se(0,1,n)}function wf(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Fr=.35;function _f(e=Fr){return e===!1?e=0:e===!0&&(e=Fr),{x:Li(e,"left","right"),y:Li(e,"top","bottom")}}function Li(e,t,n){return{min:Oi(e,t),max:Oi(e,n)}}function Oi(e,t){return typeof e=="number"?e:e[t]||0}const Ef=new WeakMap;class Tf{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=X(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor($t(u).point)},s=(u,d)=>{const{drag:f,dragPropagation:h,onDragStart:p}=this.getProps();if(f&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Cc(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ce(v=>{let b=this.getAxisMotionValue(v).get()||0;if(me.test(b)){const{projection:C}=this.visualElement;if(C&&C.layout){const S=C.layout.layoutBox[v];S&&(b=re(S)*(parseFloat(b)/100))}}this.originPoint[v]=b}),p&&F.postRender(()=>p(u,d)),dr(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},i=(u,d)=>{const{dragPropagation:f,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:v}=d;if(h&&this.currentDirection===null){this.currentDirection=Af(v),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,v),this.updateAxis("y",d.point,v),this.visualElement.render(),m&&m(u,d)},a=(u,d)=>this.stop(u,d),l=()=>ce(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Ei(t,{onSessionStart:o,onStart:s,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:wi(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:s}=this.getProps();s&&F.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!vn(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=bf(i,this.constraints[t],this.elastic[t])),s.set(i)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&dt(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=Cf(o.layoutBox,n):this.constraints=!1,this.elastic=_f(r),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&ce(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=wf(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!dt(t))return!1;const r=t.current;Pe(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=mf(r,o.root,this.visualElement.getTransformPagePoint());let i=Sf(o.layout.layoutBox,s);if(n){const a=n(sf(i));this.hasMutatedConstraints=!!a,a&&(i=ai(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=ce(u=>{if(!vn(u,n,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});const f=o?200:1e6,h=o?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return dr(this.visualElement,t),r.start(Or(t,r,0,n,this.visualElement,!1))}stopAnimation(){ce(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ce(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){ce(n=>{const{drag:r}=this.getProps();if(!vn(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:i,max:a}=o.layout.layoutBox[n];s.set(t[n]-z(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!dt(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};ce(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();o[i]=xf({min:l,max:l},this.constraints[i])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),ce(i=>{if(!vn(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(z(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;Ef.set(this.visualElement,this);const t=this.visualElement.current,n=jt(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();dt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),F.read(r);const i=Ft(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(ce(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{i(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:i=Fr,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function vn(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Af(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Mf extends Ne{constructor(t){super(t),this.removeGroupControls=ae,this.removeListeners=ae,this.controls=new Tf(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ae}unmount(){this.removeGroupControls(),this.removeListeners()}}const ki=e=>(t,n)=>{e&&F.postRender(()=>e(t,n))};class Pf extends Ne{constructor(){super(...arguments),this.removePointerDownListener=ae}onPointerDown(t){this.session=new Ei(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:wi(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:ki(t),onStart:ki(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&F.postRender(()=>o(s,i))}}}mount(){this.removePointerDownListener=jt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const bn={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ni(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Rt={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(N.test(e))e=parseFloat(e);else return e;const n=Ni(e,t.target.x),r=Ni(e,t.target.y);return`${n}% ${r}%`}},Lf={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=ke.parse(e);if(o.length>5)return r;const s=ke.createTransformer(e),i=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+i]/=a,o[1+i]/=l;const c=z(a,l,.5);return typeof o[2+i]=="number"&&(o[2+i]/=c),typeof o[3+i]=="number"&&(o[3+i]/=c),s(o)}};class Of extends g.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;Wc(kf),s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),bn.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,i=r.projection;return i&&(i.isPresent=s,o||t.layoutDependency!==n||n===void 0||t.isPresent!==s?i.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?i.promote():i.relegate()||F.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Kn.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Di(e){const[t,n]=uc(),r=g.useContext(Co);return y.jsx(Of,{...e,layoutGroup:r,switchLayoutGroup:g.useContext(qo),isPresent:t,safeToRemove:n})}const kf={borderRadius:{...Rt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Rt,borderTopRightRadius:Rt,borderBottomLeftRadius:Rt,borderBottomRightRadius:Rt,boxShadow:Lf};function Nf(e,t,n){const r=te(e)?e:At(e);return r.start(Or("",r,t,n)),r.animation}function Df(e){return e instanceof SVGElement&&e.tagName!=="svg"}const If=(e,t)=>e.depth-t.depth;class Vf{constructor(){this.children=[],this.isDirty=!1}add(t){Fn(this.children,t),this.isDirty=!0}remove(t){$n(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(If),this.isDirty=!1,this.children.forEach(t)}}function Bf(e,t){const n=pe.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(Le(r),e(s-t))};return F.read(r,!0),()=>Le(r)}const Ii=["TopLeft","TopRight","BottomLeft","BottomRight"],Ff=Ii.length,Vi=e=>typeof e=="string"?parseFloat(e):e,Bi=e=>typeof e=="number"||N.test(e);function $f(e,t,n,r,o,s){o?(e.opacity=z(0,n.opacity!==void 0?n.opacity:1,jf(r)),e.opacityExit=z(t.opacity!==void 0?t.opacity:1,0,zf(r))):s&&(e.opacity=z(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<Ff;i++){const a=`border${Ii[i]}Radius`;let l=Fi(t,a),c=Fi(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Bi(l)===Bi(c)?(e[a]=Math.max(z(Vi(l),Vi(c),r),0),(me.test(c)||me.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=z(t.rotate||0,n.rotate||0,r))}function Fi(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const jf=$i(0,.5,ys),zf=$i(.5,.95,ae);function $i(e,t,n){return r=>r<e?0:r>t?1:n(ct(e,t,r))}function ji(e,t){e.min=t.min,e.max=t.max}function ue(e,t){ji(e.x,t.x),ji(e.y,t.y)}function zi(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Ui(e,t,n,r,o){return e-=t,e=yn(e,1/n,r),o!==void 0&&(e=yn(e,1/o,r)),e}function Uf(e,t=0,n=1,r=.5,o,s=e,i=e){if(me.test(t)&&(t=parseFloat(t),t=z(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=z(s.min,s.max,r);e===s&&(a-=t),e.min=Ui(e.min,t,n,a,o),e.max=Ui(e.max,t,n,a,o)}function Ri(e,t,[n,r,o],s,i){Uf(e,t[n],t[r],t[o],t.scale,s,i)}const Rf=["x","scaleX","originX"],Xf=["y","scaleY","originY"];function Xi(e,t,n,r){Ri(e.x,t,Rf,n?n.x:void 0,r?r.x:void 0),Ri(e.y,t,Xf,n?n.y:void 0,r?r.y:void 0)}function qi(e){return e.translate===0&&e.scale===1}function Gi(e){return qi(e.x)&&qi(e.y)}function Wi(e,t){return e.min===t.min&&e.max===t.max}function qf(e,t){return Wi(e.x,t.x)&&Wi(e.y,t.y)}function Ki(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Hi(e,t){return Ki(e.x,t.x)&&Ki(e.y,t.y)}function Zi(e){return re(e.x)/re(e.y)}function Yi(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Gf{constructor(){this.members=[]}add(t){Fn(this.members,t),t.scheduleRender()}remove(t){if($n(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Wf(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((o||s||i)&&(r=`translate3d(${o}px, ${s}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:h,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),h&&(r+=`skewX(${h}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const $r=["","X","Y","Z"],Kf={visibility:"hidden"},Ji=1e3;let Hf=0;function jr(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Qi(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=us(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",F,!(o||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Qi(r)}function ea({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=Hf++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Jf),this.nodes.forEach(rh),this.nodes.forEach(oh),this.nodes.forEach(Qf)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Vf)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new zn),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const l=this.eventHandlers.get(i);l&&l.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Df(i),this.instance=i;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=Bf(f,250),bn.hasAnimatedSinceResize&&(bn.hasAnimatedSinceResize=!1,this.nodes.forEach(na))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||ch,{onLayoutAnimationStart:v,onLayoutAnimationComplete:b}=u.getProps(),C=!this.targetLayout||!Hi(this.targetLayout,p),S=!f&&h;if(this.options.layoutRoot||this.resumeFrom||S||f&&(C||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,S);const w={...Un(m,"layout"),onPlay:v,onComplete:b};(u.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w)}else f||na(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Le(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(sh),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Qi(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ta);return}this.isUpdating||this.nodes.forEach(th),this.isUpdating=!1,this.nodes.forEach(nh),this.nodes.forEach(Zf),this.nodes.forEach(Yf),this.clearAllSnapshots();const a=pe.now();Y.delta=Se(0,1e3/60,a-Y.timestamp),Y.timestamp=a,Y.isProcessing=!0,Wn.update.process(Y),Wn.preRender.process(Y),Wn.render.process(Y),Y.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Kn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(eh),this.sharedNodes.forEach(ih)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,F.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){F.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!re(this.snapshot.measuredBox.x)&&!re(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=X(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Gi(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||Ye(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return i&&(l=this.removeTransform(l)),uh(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var i;const{visualElement:a}=this.options;if(!a)return X();const l=a.measureViewportBox();if(!(((i=this.scroll)===null||i===void 0?void 0:i.wasRoot)||this.path.some(dh))){const{scroll:u}=this.root;u&&(yt(l.x,u.offset.x),yt(l.y,u.offset.y))}return l}removeElementScroll(i){var a;const l=X();if(ue(l,i),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:f}=u;u!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&ue(l,i),yt(l.x,d.offset.x),yt(l.y,d.offset.y))}return l}applyTransform(i,a=!1){const l=X();ue(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&vt(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Ye(u.latestValues)&&vt(l,u.latestValues)}return Ye(this.latestValues)&&vt(l,this.latestValues),l}removeTransform(i){const a=X();ue(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Ye(c.latestValues))continue;Dr(c.latestValues)&&c.updateSnapshot();const u=X(),d=c.measurePageBox();ue(u,d),Xi(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Ye(this.latestValues)&&Xi(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Y.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Y.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=X(),this.relativeTargetOrigin=X(),Ut(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),ue(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=X(),this.targetWithTransforms=X()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),hf(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ue(this.target,this.layout.layoutBox),vi(this.target,this.targetDelta)):ue(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=X(),this.relativeTargetOrigin=X(),Ut(this.relativeTargetOrigin,this.target,h.target),ue(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Dr(this.parent.latestValues)||mi(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var i;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((i=this.parent)===null||i===void 0)&&i.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Y.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;ue(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;pf(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=X());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(zi(this.prevProjectionDelta.x,this.projectionDelta.x),zi(this.prevProjectionDelta.y,this.projectionDelta.y)),zt(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!Yi(this.projectionDelta.x,this.prevProjectionDelta.x)||!Yi(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),i){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=gt(),this.projectionDelta=gt(),this.projectionDeltaWithTransform=gt()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=gt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=X(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=h!==p,v=this.getStack(),b=!v||v.members.length<=1,C=!!(m&&!b&&this.options.crossfade===!0&&!this.path.some(lh));this.animationProgress=0;let S;this.mixTargetDelta=w=>{const x=w/1e3;ra(d.x,i.x,x),ra(d.y,i.y,x),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ut(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ah(this.relativeTarget,this.relativeTargetOrigin,f,x),S&&qf(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=X()),ue(S,this.relativeTarget)),m&&(this.animationValues=u,$f(u,c,this.latestValues,x,C,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=x},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Le(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=F.update(()=>{bn.hasAnimatedSinceResize=!0,this.currentAnimation=Nf(0,Ji,{...i,onUpdate:a=>{this.mixTargetDelta(a),i.onUpdate&&i.onUpdate(a)},onStop:()=>{},onComplete:()=>{i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Ji),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=i;if(!(!a||!l||!c)){if(this!==i&&this.layout&&c&&la(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||X();const d=re(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const f=re(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}ue(a,l),vt(a,u),zt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new Gf),this.sharedNodes.get(i).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var i;const{layoutId:a}=this.options;return a?((i=this.getStack())===null||i===void 0?void 0:i.lead)||this:this}getPrevLead(){var i;const{layoutId:a}=this.options;return a?(i=this.getStack())===null||i===void 0?void 0:i.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&jr("z",i,c,this.animationValues);for(let u=0;u<$r.length;u++)jr(`rotate${$r[u]}`,i,c,this.animationValues),jr(`skew${$r[u]}`,i,c,this.animationValues);i.render();for(const u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);i.scheduleRender()}getProjectionStyles(i){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Kf;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=hn(i==null?void 0:i.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=hn(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!Ye(this.latestValues)&&(m.transform=u?u({},""):"none",this.hasProjected=!1),m}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=Wf(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));const{x:h,y:p}=this.projectionDelta;c.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:c.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const m in Pt){if(f[m]===void 0)continue;const{correct:v,applyTo:b,isCSSVariable:C}=Pt[m],S=c.transform==="none"?f[m]:v(f[m],d);if(b){const w=b.length;for(let x=0;x<w;x++)c[b[x]]=S}else C?this.options.visualElement.renderState.vars[m]=S:c[m]=S}return this.options.layoutId&&(c.pointerEvents=d===this?hn(i==null?void 0:i.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(ta),this.root.sharedNodes.clear()}}}function Zf(e){e.updateLayout()}function Yf(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:s}=e.options,i=n.source!==e.layout.source;s==="size"?ce(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],h=re(f);f.min=r[d].min,f.max=f.min+h}):la(s,n.layoutBox,r)&&ce(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],h=re(r[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const a=gt();zt(a,r,n.layoutBox);const l=gt();i?zt(l,e.applyTransform(o,!0),n.measuredBox):zt(l,r,n.layoutBox);const c=!Gi(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const p=X();Ut(p,n.layoutBox,f.layoutBox);const m=X();Ut(m,r,h.layoutBox),Hi(p,m)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Jf(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Qf(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function eh(e){e.clearSnapshot()}function ta(e){e.clearMeasurements()}function th(e){e.isLayoutDirty=!1}function nh(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function na(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function rh(e){e.resolveTargetDelta()}function oh(e){e.calcProjection()}function sh(e){e.resetSkewAndRotation()}function ih(e){e.removeLeadSnapshot()}function ra(e,t,n){e.translate=z(t.translate,0,n),e.scale=z(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function oa(e,t,n,r){e.min=z(t.min,n.min,r),e.max=z(t.max,n.max,r)}function ah(e,t,n,r){oa(e.x,t.x,n.x,r),oa(e.y,t.y,n.y,r)}function lh(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const ch={duration:.45,ease:[.4,0,.1,1]},sa=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ia=sa("applewebkit/")&&!sa("chrome/")?Math.round:ae;function aa(e){e.min=ia(e.min),e.max=ia(e.max)}function uh(e){aa(e.x),aa(e.y)}function la(e,t,n){return e==="position"||e==="preserve-aspect"&&!ff(Zi(t),Zi(n),.2)}function dh(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const fh=ea({attachResizeListener:(e,t)=>Ft(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),zr={current:void 0},ca=ea({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!zr.current){const e=new fh({});e.mount(window),e.setOptions({layoutScroll:!0}),zr.current=e}return zr.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),hh={pan:{Feature:Pf},drag:{Feature:Mf,ProjectionNode:ca,MeasureLayout:Di}};function ua(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=r[o];s&&F.postRender(()=>s(t,$t(t)))}class ph extends Ne{mount(){const{current:t}=this.node;t&&(this.unmount=xc(t,(n,r)=>(ua(this.node,r,"Start"),o=>ua(this.node,o,"End"))))}unmount(){}}class mh extends Ne{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Vt(Ft(this.node.current,"focus",()=>this.onFocus()),Ft(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function da(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=r[o];s&&F.postRender(()=>s(t,$t(t)))}class gh extends Ne{mount(){const{current:t}=this.node;t&&(this.unmount=Tc(t,(n,r)=>(da(this.node,r,"Start"),(o,{success:s})=>da(this.node,o,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Ur=new WeakMap,Rr=new WeakMap,yh=e=>{const t=Ur.get(e.target);t&&t(e)},vh=e=>{e.forEach(yh)};function bh({root:e,...t}){const n=e||document;Rr.has(n)||Rr.set(n,{});const r=Rr.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(vh,{root:e,...t})),r[o]}function Ch(e,t,n){const r=bh(t);return Ur.set(e,n),r.observe(e),()=>{Ur.delete(e),r.unobserve(e)}}const Sh={some:0,all:1};class xh extends Ne{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:Sh[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return Ch(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(wh(t,n))&&this.startObserver()}unmount(){}}function wh({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const _h={inView:{Feature:xh},tap:{Feature:gh},focus:{Feature:mh},hover:{Feature:ph}},Eh={layout:{ProjectionNode:ca,MeasureLayout:Di}},Xr={current:null},fa={current:!1};function Th(){if(fa.current=!0,!!Vn)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Xr.current=e.matches;e.addListener(t),t()}else Xr.current=!1}const Ah=[...Fs,ne,ke],Mh=e=>Ah.find(Bs(e)),Ph=new WeakMap;function Lh(e,t,n){for(const r in t){const o=t[r],s=n[r];if(te(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&rn(o.version==="12.5.0",`Attempting to mix Motion versions ${o.version} with 12.5.0 may not work as expected.`);else if(te(s))e.addValue(r,At(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{const i=e.getStaticValue(r);e.addValue(r,At(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const ha=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Oh{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=_r,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=pe.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,F.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:u}=i;this.onUpdate=u,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=dn(n),this.isVariantNode=Uo(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in f){const p=f[h];l[h]!==void 0&&te(p)&&p.set(l[h],!1)}}mount(t){this.current=t,Ph.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),fa.current||Th(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Xr.current,process.env.NODE_ENV!=="production"&&rn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Le(this.notifyUpdate),Le(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Ge.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&F.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),s(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in ut){const n=ut[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):X()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<ha.length;r++){const o=ha[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,i=t[s];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=Lh(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=At(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(Is(o)||bs(o))?o=parseFloat(o):!Mh(o)&&ke.test(n)&&(o=As(t,n)),this.setBaseTarget(t,te(o)?o.get():o)),te(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const i=lr(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);i&&(o=i[t])}if(r&&o!==void 0)return o;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!te(s)?s:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new zn),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class pa extends Oh{constructor(){super(...arguments),this.KeyframeResolver=js}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;te(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function kh(e){return window.getComputedStyle(e)}class Nh extends pa{constructor(){super(...arguments),this.type="html",this.renderInstance=os}readValueFromInstance(t,n){if(Ge.has(n))return Xu(t,n);{const r=kh(t),o=(er(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return xi(t,n)}build(t,n,r){rr(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return ur(t,n,r)}}class Dh extends pa{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=X,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&rs(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ge.has(n)){const r=Ts(n);return r&&r.default||0}return n=ss.has(n)?n:Qn(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return as(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&F.postRender(this.updateDimensions)}build(t,n,r){ir(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){is(t,n,r,o)}mount(t){this.isSVGTag=ar(t.tagName),super.mount(t)}}const Ih=(e,t)=>sr(e)?new Dh(t):new Nh(t,{allowProjection:e!==g.Fragment}),Vh=yu({...rf,..._h,...hh,...Eh},Ih),Je=Dc(Vh),Bh={root:"_root_uup2j_1"},ma={bgDefault:"c-corporate-default-bg",cBlack:"c-corporate-default-black",cBlue:"c-corporate-default-blue",bgDark:"c-corporate-default-dark-bg",cDarkBlue:"c-corporate-default-dark-blue",cDarkGreen:"c-corporate-default-dark-green",cGreen:"c-corporate-default-green",cRichBlue:"c-corporate-default-rich-blue",grey050:"c-grey-050",grey100:"c-grey-100",grey200:"c-grey-200",grey300:"c-grey-300",grey400:"c-grey-400",grey500:"c-grey-500",grey600:"c-grey-600",grey700:"c-grey-700",grey800:"c-grey-800",grey900:"c-grey-900",rFull:"radius-full",rL:"radius-l",rM:"radius-m",rNone:"radius-none",rS:"radius-s",rXL:"radius-xl",rXS:"radius-xs",rXXL:"radius-xxl",rXXS:"radius-xxs",pXXS:"p-xxs",pXS:"p-xs",pS:"p-s",pM:"p-m",pL:"p-l",pXL:"p-xl",pXXL:"p-xxl",pxXXS:"px-xxs",pxXS:"px-xs",pxS:"px-s",pxM:"px-m",pxL:"px-l",pxXL:"px-xl",pxXXL:"px-xxl",pyXXS:"py-xxs",pyXS:"py-xs",pyS:"py-s",pyM:"py-m",pyL:"py-l",pyXL:"py-xl",pyXXL:"py-xxl",ptXXS:"pt-xxs",ptXS:"pt-xs",ptS:"pt-s",ptM:"pt-m",ptL:"pt-l",ptXL:"pt-xl",ptXXL:"pt-xxl",prXXS:"pr-xxs",prXS:"pr-xs",prS:"pr-s",prM:"pr-m",prL:"pr-l",prXL:"pr-xl",prXXL:"pr-xxl",pbXXS:"pb-xxs",pbXS:"pb-xs",pbS:"pb-s",pbM:"pb-m",pbL:"pb-l",pbXL:"pb-xl",pbXXL:"pb-xxl",plXXS:"pl-xxs",plXS:"pl-xs",plS:"pl-s",plM:"pl-m",plL:"pl-l",plXL:"pl-xl",plXXL:"pl-xxl",mXXS:"m-xxs",mXS:"m-xs",mS:"m-s",mM:"m-m",mL:"m-l",mXL:"m-xl",mXXL:"m-xxl",mxXXS:"mx-xxs",mxXS:"mx-xs",mxS:"mx-s",mxM:"mx-m",mxL:"mx-l",mxXL:"mx-xl",mxXXL:"mx-xxl",myXXS:"my-xxs",myXS:"my-xs",myS:"my-s",myM:"my-m",myL:"my-l",myXL:"my-xl",myXXL:"my-xxl",mtXXS:"mt-xxs",mtXS:"mt-xs",mtS:"mt-s",mtM:"mt-m",mtL:"mt-l",mtXL:"mt-xl",mtXXL:"mt-xxl",mrXXS:"mr-xxs",mrXS:"mr-xs",mrS:"mr-s",mrM:"mr-m",mrL:"mr-l",mrXL:"mr-xl",mrXXL:"mr-xxl",mbXXS:"mb-xxs",mbXS:"mb-xs",mbS:"mb-s",mbM:"mb-m",mbL:"mb-l",mbXL:"mb-xl",mbXXL:"mb-xxl",mlXXS:"ml-xxs",mlXS:"ml-xs",mlS:"ml-s",mlM:"ml-m",mlL:"ml-l",mlXL:"ml-xl",mlXXL:"ml-xxl",fsXXXS:"fs-xxxs",fsXXS:"fs-xxs",fsXS:"fs-xs",fsS:"fs-s",fsM:"fs-m",fsL:"fs-l",fsXL:"fs-xl",fsXXL:"fs-xxl",fsXXXL:"fs-xxxl",fwRegular:"fw-regular",fwSemibold:"fw-semibold",fwBold:"fw-bold",dBlock:"d-block",dInBlock:"d-in-block",taLeft:"ta-left",taCenter:"ta-center",mwSM:"mw-sm",mwMD:"mw-md",mwLG:"mw-lg",mwXL:"mw-xl",mwXXL:"mw-xxl",mw3XL:"mw-3xl",shNone:"sh-none"};function De(e){return e&&Object.keys(e).length?Object.keys(e).filter(t=>Object.keys(ma).includes(t)).filter(t=>e[t]===!0).map(t=>ma[t]):null}const Ie="Errore: ",Fh="Impossibile acquisire la posizione.",Cn="Impossibile caricare i punti di mappa.",$h="Si è verificato un errore.",jh="Impossibile caricare i suggerimenti.",zh="Impossibile caricare i dettagli della location.",Uh="Impossibile caricare la mappa.",Rh="Impossibile trovare punti di mappa nell'area di ricerca.",Xh="Ottieni indicazioni di navigazione per questa destinazione",qh="Condividi questa destinazione",Gh="Scarica l'evento",Wh="dyn-locator__portal-root",ga=3e3,ya=6,va=2e4,Kh=300,Xt={north:47.1,south:36.6,east:18.6,west:6.6},Hh={lat:(Xt.north+Xt.south)/2,lng:(Xt.east+Xt.west)/2},Qe={AIRC:"airc",GOOGLE:"google"};function xe(e){if(e)return e.trim().split(" ").filter(t=>t.length)}function we(e){return e?e.split("").reduce((t,n)=>(/[A-Z]/.test(n)?e.indexOf(n)===0?t+=n.toLowerCase():t+="-"+n.toLowerCase():t+=n,t),""):""}function ba(e,t){const{type:n,url:r}=e??{};switch(n){case"navigate":case"directions":return{"aria-label":Xh,as:"a",href:r??"#",target:"_blank",rel:"noopener noreferrer",...typeof t=="function"?{onClick(){t()}}:{}};case"share":return{"aria-label":qh,as:"a",href:r??"#",target:"_blank",rel:"noopener noreferrer"};case"event":case"calendar":return{"aria-label":Gh,as:"a",href:r??"#",download:!0,target:"_blank",rel:"noopener noreferrer",...typeof t=="function"?{onClick(){t()}}:{}};case"email":default:return{}}}function Zh(e,t){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e(...r),t)}}function Yh(e){var l,c,u,d;const t=(e==null?void 0:e.address_components)??[];function n(f){return t.find(h=>h.types.includes(f))}const r=(e==null?void 0:e.formatted_address)??"No address found",o=((l=n("locality"))==null?void 0:l.long_name)??"No city found",s=((c=n("country"))==null?void 0:c.long_name)??"No country found",i=((u=n("administrative_area_level_1"))==null?void 0:u.long_name)??"No region found",a=((d=n("administrative_area_level_2"))==null?void 0:d.short_name)??"No province found";return{address:r,city:o,province:a,region:i,country:s}}function Sn({fallback:e,format:t,...n}){if(typeof e>"u"&&(e=""),t)switch(t){case"ZIP_CITY_PROVINCE":{const{zip:r,city:o,province:s}=n??{};return[r,o,s].every(Boolean)?`${r} ${o} (${s})`:e}case"STREET_ZIP_CITY_PROVINCE":{const{street:r,zip:o,city:s,province:i}=n??{};return[r,o,s,i].every(Boolean)?`${r}, ${o} ${s} (${i})`:e}case"STREET_CITY_PROVINCE":{const{street:r,city:o,province:s}=n??{};return[r,o,s].every(Boolean)?`${r}, ${o} (${s})`:e}case"ZIP_CITY":{const{zip:r,city:o}=n??{};return[r,o].every(Boolean)?`${r} ${o}`:e}case"CITY_PROVINCE":{const{city:r,province:o}=n??{};return[r,o].every(Boolean)?`${r} (${o})`:e}case"STREET_CITY":{const{street:r,city:o}=n??{};return[r,o].every(Boolean)?`${r}, ${o}`:e}case"STREET_ZIP_CITY":{const{street:r,zip:o,city:s}=n??{};return[r,o,s].every(Boolean)?`${r}, ${o} ${s}`:e}default:return e}return e}const Ca="Anchor";function Sa({as:e,wrapper:t,children:n,variant:r="default",className:o,animate:s=!0,animationDelay:i=0,href:a,target:l,rel:c,linkProps:u={},style:d,...f},h){const p=t||"span",m=s?Je[p]:p,v=e||"a",b=De(f)??[],C=s?{initial:{opacity:0,y:5},animate:{opacity:1,y:0},transition:{delay:i,duration:.2}}:{},w=c||(l==="_blank"?{rel:"noopener noreferrer"}:{}).rel;return y.jsx(m,{className:j(Bh.root,"dyn-locator__"+we(Ca),xe(o),...b),"data-variant":r,...d?{style:d}:{},...C,...f,children:y.jsx(v,{ref:h,href:a,target:l,rel:w,...u,children:n})})}Sa.displayName=Ca;const xa=g.forwardRef(Sa),wa="ErrorBanner";function _a({title:e="Si è verificato un errore",message:t="Impossibile completare l'operazione richiesta.",actionText:n="ricaricare la pagina",onAction:r,errorDetails:o,className:s,children:i,...a}){const l=De(a)??[];return y.jsxs("div",{className:j("dyn-locator__"+we(wa),_t.root,xe(s),...l??[]),children:[y.jsxs("header",{className:_t.header,children:[y.jsx(Jl,{size:28,color:"currentColor",className:_t.icon})," ",y.jsx("h3",{children:e})]}),y.jsxs("div",{className:_t.body,children:[y.jsx("p",{children:t}),n&&r&&y.jsxs("p",{children:["Prova a"," ",y.jsx(xa,{animate:!1,"aria-label":n,href:"#",onClick:r,children:n})]}),i,o&&y.jsx("div",{className:_t.content,children:y.jsx("pre",{children:o})})]})]})}_a.displayName=wa;const Ea=_a;class Jh extends g.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Locator error: ",t,n)}render(){var t;return this.state.hasError?this.props.fallback||y.jsx("div",{className:Rl.container,children:y.jsx(Ea,{message:"Something went wrong with the Locator component",errorDetails:(t=this.state.error)==null?void 0:t.message})}):this.props.children}}const Qh=({title:e,titleId:t,...n},r)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:r,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsx("path",{fill:"currentColor",fillRule:"evenodd",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M12 2.5a9.5 9.5 0 1 0 0 19 9.5 9.5 0 0 0 0-19ZM13.286 14.518h2.459l.386-2.498h-2.845v-1.365c0-1.037.338-1.957 1.309-1.957h1.56v-2.18c-.275-.037-.854-.118-1.949-.118-2.287 0-3.627 1.208-3.627 3.959v1.661h-2.35v2.498h2.35v6.864c.465.07.937.118 1.421.118.438 0 .864-.04 1.286-.097v-6.885Z"})]}),ep=g.forwardRef(Qh),tp=({title:e,titleId:t,...n},r)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:r,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsx("path",{fill:"currentColor",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M8 3a5 5 0 0 0-5 5v8a5 5 0 0 0 5 5h8a5 5 0 0 0 5-5V8a5 5 0 0 0-5-5H8Zm10 2a1 1 0 1 1 0 2 1 1 0 0 1 0-2Zm-6 2a5 5 0 1 1-.001 10.001A5 5 0 0 1 12 7Zm0 2a3 3 0 1 0 0 6 3 3 0 0 0 0-6Z"})]}),np=g.forwardRef(tp),rp=({title:e,titleId:t,...n},r)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:r,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsx("path",{fill:"currentColor",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2ZM9 17H6.477v-7H9v7ZM7.694 8.717c-.771 0-1.286-.514-1.286-1.2 0-.686.514-1.2 1.371-1.2.771 0 1.286.514 1.286 1.2 0 .686-.514 1.2-1.371 1.2ZM18 17h-2.442v-3.826c0-1.058-.651-1.302-.895-1.302s-1.058.163-1.058 1.302V17h-2.523v-7h2.523v.977c.325-.57.976-.977 2.197-.977S18 10.977 18 13.174V17Z"})]}),op=g.forwardRef(rp),sp=({title:e,titleId:t,...n},r)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:r,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsx("path",{fill:"currentColor",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M19.68 1.92H4.32a2.403 2.403 0 0 0-2.4 2.4v15.36c0 1.323 1.077 2.4 2.4 2.4h15.36c1.323 0 2.4-1.077 2.4-2.4V4.32c0-1.323-1.077-2.4-2.4-2.4Zm-1.917 8.795a3.596 3.596 0 0 1-3.34-1.61v5.538a4.093 4.093 0 1 1-4.093-4.093c.085 0 .169.008.253.013v2.017c-.084-.01-.167-.025-.253-.025a2.089 2.089 0 1 0 0 4.178c1.154 0 2.173-.91 2.173-2.063l.02-9.405h1.927a3.594 3.594 0 0 0 3.313 3.208v2.242Z"})]}),ip=g.forwardRef(sp),ap=({title:e,titleId:t,...n},r)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:r,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsx("path",{fill:"currentColor",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M19.077 4.928A9.927 9.927 0 0 0 12.011 2c-5.506 0-9.987 4.479-9.989 9.985a9.962 9.962 0 0 0 1.333 4.992L2 22l5.233-1.237a9.98 9.98 0 0 0 4.773 1.216h.004c5.505 0 9.986-4.48 9.989-9.985a9.922 9.922 0 0 0-2.922-7.066Zm-2.179 10.626c-.208.583-1.227 1.145-1.685 1.186-.458.042-.887.207-2.995-.624-2.537-1-4.139-3.601-4.263-3.767-.125-.167-1.019-1.353-1.019-2.581s.645-1.832.874-2.081a.916.916 0 0 1 .666-.312c.166 0 .333 0 .478.006.178.007.375.016.562.431.222.494.707 1.728.769 1.853.062.125.104.271.021.437-.083.166-.125.27-.249.416-.125.146-.262.325-.374.437-.125.124-.255.26-.11.509.146.25.646 1.067 1.388 1.728.954.85 1.757 1.113 2.007 1.239.25.125.395.104.541-.063.146-.166.624-.728.79-.978.166-.25.333-.208.562-.125.229.083 1.456.687 1.705.812.25.125.416.187.478.291.062.103.062.603-.146 1.186Z"})]}),lp=g.forwardRef(ap),cp=({title:e,titleId:t,...n},r)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:r,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsxs("g",{transform:"scale(1.2) translate(-2.4, -2.4)",children:[y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M20.5 3 4.965 21H3.108L18.643 3H20.5Z",clipRule:"evenodd"}),y.jsx("path",{fill:"currentColor",fillOpacity:"0.3",fillRule:"evenodd",d:"M15.572 20.5 3.91 3.5h4.479l11.661 17h-4.479Z",clipRule:"evenodd"}),y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m7.862 4.5 10.29 15h-2.054L5.81 4.5h2.053Zm.79-1.5h-5.69l12.346 18H21L8.652 3Z",clipRule:"evenodd"})]})]}),Ta=g.forwardRef(cp),up=({title:e,titleId:t,...n},r)=>y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",ref:r,"aria-labelledby":t,viewBox:"0 0 24 24",...n,children:[e?y.jsx("title",{id:t,children:e}):null,y.jsx("path",{fill:"currentColor",transform:"scale(1.2) translate(-2.4, -2.4)",d:"M21.551 6.96c-.191-1.056-1.102-1.824-2.16-2.064-1.582-.336-4.511-.576-7.68-.576-3.167 0-6.142.24-7.727.576-1.055.24-1.968.96-2.16 2.064-.193 1.2-.384 2.88-.384 5.04s.191 3.84.431 5.04c.193 1.056 1.105 1.824 2.16 2.064 1.68.336 4.56.576 7.729.576 3.169 0 6.049-.24 7.729-.576 1.055-.24 1.967-.96 2.16-2.064.19-1.2.43-2.929.48-5.04-.098-2.16-.338-3.84-.578-5.04ZM9.12 15.36V8.64L14.976 12 9.12 15.36Z"})]}),dp=g.forwardRef(up),Aa={ArrowLeft:Wl,ArrowUpRight:Hl,ChevronUp:Yl,ChevronDown:Zl,Close:bo,Expand:rc,Location:nc,Search:ic,Share:ac,Target:ec,Email:tc,Copy:Ql,X:Ta,Twitter:Ta,Facebook:ep,Instagram:np,Linkedin:op,TikTok:ip,Whatsapp:lp,Youtube:dp},ge={root:"_root_16x1s_4",header:"_header_16x1s_21",body:"_body_16x1s_22",cta:"_cta_16x1s_23",titleContainer:"_titleContainer_16x1s_40",shareButton:"_shareButton_16x1s_51",capabilities:"_capabilities_16x1s_59",tagContainer:"_tagContainer_16x1s_72",notes:"_notes_16x1s_78",tag:"_tag_16x1s_72"},bt={root:"_root_1k1dg_4",container:"_container_1k1dg_10",label:"_label_1k1dg_17",icon:"_icon_1k1dg_27"},qr={root:"_root_71ove_4",icon:"_icon_71ove_43"};function fp(e){return g.isValidElement(e)||typeof e=="function"}function hp(e){return e?typeof e=="string"||typeof e=="object"&&"name"in e:!1}function pp(e){return!!e&&typeof e=="object"&&"path"in e}const Ma="Icon";function Pa({as:e,icon:t,iconRef:n,label:r,size:o="S",radius:s,variant:i="default",className:a,animate:l=!0,animationDelay:c=0,style:u,...d},f){const h=e||"span",p=l?Je[h]:h,{iconMap:m}=Ep();function v(S){if(hp(S)){const w=typeof S=="string"?S:S.name;return m[w]?g.createElement(m[w],{...n?{ref:n}:{},...r?{title:r,titleId:r.trim().toLowerCase().replace(/[^a-z0-9\s_-]/g,"").replace(/\s+/g,"_")+"_id"}:{},className:qr.icon}):'No icon found for "'+w+'"!'}return pp(S)?(i!=="default"&&console.warn("Warning: cannot set icon stroke on a remote asset"),y.jsx("img",{...n?{ref:n}:{},src:S.path,alt:`Icona decorativa${r?" che rappresenta '"+r+"'":""}`,className:qr.icon})):"No icon provided"}const b=De(d)??[],C=l?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:c,duration:.2}}:{};return y.jsx(p,{ref:f,className:j(qr.root,"dyn-locator__"+we(Ma),xe(a),...b),...u?{style:u}:{},"data-variant":i,"data-size":o,...s?{"data-radius":s}:{},...C,...d,children:v(t)})}Pa.displayName=Ma;const ye=g.forwardRef(Pa),La="Tag";function Oa({as:e,iconPosition:t="left",children:n,icon:r,className:o,animate:s=!0,animationDelay:i=0,style:a,...l},c){const u=e||"span",d=s?Je[u]:u,f=De(l)??[],h=s?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:i,duration:.2}}:{};return y.jsx(d,{ref:c,className:j(bt.root,"dyn-locator__"+we(La),xe(o),...f),"data-icon-position":t,...a?{style:a}:{},...h,...l,children:y.jsxs("div",{className:bt.container,children:[r?y.jsx("div",{className:bt.icon,children:fp(r)?typeof r=="function"?y.jsx(r,{className:bt.icon}):r:y.jsx(ye,{className:bt.icon,icon:r})}):null,y.jsx("div",{className:bt.label,children:n})]})})}Oa.displayName=La;const mp=g.forwardRef(Oa),gp={root:"_root_u5v4v_1"},ka="IconButton";function Na({as:e,children:t,className:n,variant:r="default",animate:o=!0,animationDelay:s=0,style:i,ariaLabel:a,href:l,target:c,rel:u,disabled:d=!1,...f},h){const p=e||"button",m=o?Je[p]:p,v=De(f)??[],b=o?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:s,duration:.2}}:{},C=p==="a"?{href:l??"/",target:c??"_blank",rel:c==="_blank"?"noopener noreferrer":u}:{};return y.jsx(m,{ref:h,className:j(gp.root,"dyn-locator__"+we(ka),xe(n),...v),"data-variant":r,"data-element":p,"aria-label":a,disabled:d,...i?{style:i}:{},...b,...C,...f,children:t})}Na.displayName=ka;const Ve=g.forwardRef(Na),Da={root:"_root_1fk3z_1",content:"_content_1fk3z_32"},Ia="Card";function Va({as:e,children:t,className:n,variant:r="default",animate:o=!0,animationDelay:s=0,style:i,clickable:a=!1,onClick:l,...c},u){const d=e||"article",f=o?Je[d]:d,h=De(c)??[],p=o?{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:s,duration:.3}}:{};return y.jsx(f,{ref:u,className:j(Da.root,"dyn-locator__"+we(Ia),xe(n),...h),"data-variant":r,"data-clickable":a||!!l,onClick:l,...i?{style:i}:{},...p,...c,children:r==="bare"?t:y.jsx("div",{className:Da.content,children:t})})}Va.displayName=Ia;const yp=g.forwardRef(Va);function Ba(e){const{componentMap:t}=Tp();return t[e]}var fe=(e=>(e.FULLSCREEN_TOGGLE="fullscreen",e.BACK_BUTTON_CLICK="back_button",e.SEARCH="search",e.AUTOCOMPLETE_ITEM_SELECT="autocomplete_item_select",e.GEOLOCATION="geolocation",e.LOCATION_CARD_CLICK="location_card_click",e.LOCATION_CARD_PRIMARY_ACTION="location_card_primary_action",e.LOCATION_CARD_SECONDARY_ACTION="location_card_secondary_action",e.INFO_WINDOW_PRIMARY_ACTION="info_window_primary_action",e.INFO_WINDOW_SECONDARY_ACTION="info_window_secondary_action",e.CARD_LIST_TOGGLE="card_list_toggle",e.SHARE_SHEET_OPEN="share_sheet_open",e.SHARE_SHEET_CLOSE="share_sheet_close",e.SHARE_SHEET_SHARE="share_sheet_share",e.AREA_SEARCH_TOGGLE="area_search_toggle",e.AREA_SEARCH_SUBMIT="area_search_submit",e.AREA_SEARCH_CANCEL="area_search_cancel",e))(fe||{});const vp=[fe.LOCATION_CARD_PRIMARY_ACTION,fe.LOCATION_CARD_SECONDARY_ACTION,fe.AUTOCOMPLETE_ITEM_SELECT,fe.INFO_WINDOW_PRIMARY_ACTION,fe.INFO_WINDOW_SECONDARY_ACTION];class bp{constructor(){co(this,"config",{});co(this,"isInitialized",!1)}initialize(t={}){this.config=t,this.isInitialized=!0,Object.keys(t).forEach(n=>{vp.includes(n)||console.warn(`[TrackingService] Event "${n}" is not yet implemented; adding it in the config has no effect.`)})}isEventEnabled(t){var r,o;if(!this.isInitialized)return!1;const n=!!((r=this.config[t])!=null&&r.enabled)&&typeof((o=this.config[t])==null?void 0:o.tracker)=="function";return n||console.warn(`[TrackingService] Event "${t}" is not enabled or missing its tracker function.`),n}track(t,n={}){if(this.isEventEnabled(t))try{const r={...n,timestamp:n.timestamp??Date.now()},{tracker:o}=this.config[t]??{};if(typeof o!="function")throw new Error(`[TrackingService] Tracker function not found for event "${t}"`);o(r)}catch(r){console.error(`[TrackingService] Error tracking event "${t}":`,r)}}isTrackerInitialized(){return this.isInitialized}reset(){this.config={},this.isInitialized=!1}}const Ct=new bp,Fa="LocationCard",Cp="Prodotti disponibili in piazza";function Sp(e){return typeof e=="string"&&e.trim().length>0}function $a({title:e,timestamp:t,address:n,zip:r,province:o,street:s,city:i,country:a,capabilities:l,actions:c,className:u,notes:d,id:f,coords:h,on_share:p,markerType:m,...v},b){const C=Ba("ctaButton"),S=M(O=>O.toggleShareSheet),w=M(O=>O.featureFlags),x=M(O=>O.presentationPrefs),{addressFormat:_}=x??{};function A(){S(!0)}function T(O,P){return()=>{Ct.track(fe[P===0?"LOCATION_CARD_PRIMARY_ACTION":"LOCATION_CARD_SECONDARY_ACTION"],{cta_event_type:O.type??"",cta_url:O.url??"",cta_label:O.label??""})}}return y.jsx(yp,{ref:b,variant:"bare",clickable:!0,className:j("dyn-locator__"+we(Fa),xe(u)),...v,style:{...v.style?v.style:{},padding:"var(--dyn-locator__spacing-xs) 0",borderRadius:"var(--dyn-locator__radius-s)",border:"1px solid var(--dyn-locator__colors-grey-grey-100)",boxShadow:"none"},children:y.jsxs("div",{className:ge.root,children:[y.jsxs("header",{className:ge.header,children:[t?y.jsx("time",{children:t}):null,y.jsxs("div",{className:ge.titleContainer,children:[e?y.jsx("h4",{children:e}):null,w.share?y.jsx(Ve,{className:ge.shareButton,variant:"bare",onClick:A,children:y.jsx(ye,{size:"M",icon:"Share"})}):null]}),n?y.jsx("address",{children:_?Sn({fallback:n,format:_,zip:r,city:i,province:o,street:s,country:a}):n}):null]}),l!=null&&l.length?y.jsx("div",{className:ge.body,children:l.map((O,P)=>{const V=O.title===Cp&&Sp(d)?d.trim():null;return y.jsxs("div",{className:ge.capabilities,children:[y.jsx("h5",{children:O.title}),y.jsx("ul",{className:ge.tagContainer,children:(O.capabilities??[]).map((q,se)=>y.jsx(mp,{as:"li",animationDelay:+`.${se+1}`,className:ge.tag,children:q.label},se))}),V?y.jsx("p",{className:ge.notes,children:V}):null]},P)})}):null,c!=null&&c.length?y.jsx("div",{className:ge.cta,children:c.map((O,P)=>y.jsx(C,{animate:!1,fullWidth:!0,variant:P===0?"themed":"secondary",...ba(O,T(O,P)),children:O.label},P))}):null]})})}$a.displayName=Fa;const xp=g.forwardRef($a),ja={root:"_root_o9d55_1",loader:"_loader_o9d55_73"},za="Button";function Ua({as:e,children:t,className:n,variant:r="default",size:o="medium",disabled:s=!1,loading:i=!1,fullWidth:a=!1,animate:l=!0,animationDelay:c=0,href:u,target:d,rel:f,style:h,...p},m){const v=e||(u?"a":"button"),b=l?Je[v]:v,C=De(p)??[],S=l?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:c,duration:.2}}:{},w=u?{href:u,target:d,rel:d==="_blank"?"noopener noreferrer":f}:{};return y.jsx(b,{ref:m,className:j(ja.root,"dyn-locator__"+we(za),xe(n),...C),"data-variant":r,"data-size":o,"data-full-width":a,disabled:s||i,...h?{style:h}:{},...S,...w,...p,children:i?y.jsxs("span",{style:{display:"flex",gap:10},children:[t,y.jsx("span",{className:ja.loader,"aria-hidden":"true"})]}):t})}Ua.displayName=za;const qt=g.forwardRef(Ua),Ra={locationCard:xp,ctaButton:qt},wp={iconMap:Aa,componentMap:Ra},Gr=g.createContext(wp);function _p({children:e,customIcons:t,customComponents:n}){const r={...Aa,...t??{}},o={...Ra,...n??{}};return y.jsx(Gr.Provider,{value:{iconMap:r,componentMap:o},children:e})}function Ep(){const{iconMap:e}=g.useContext(Gr);return{iconMap:e}}function Tp(){const{componentMap:e}=g.useContext(Gr);return{componentMap:e}}var St=(e=>(e.CLUSTERS="clusters",e.MARKERS="markers",e.FIND="find",e.ALL_MARKERS="allMarkers",e))(St||{});const Xa=g.createContext({endpointMap:{},apiUrl:""});function Ap({children:e,endpoints:t,apiUrl:n}){var r;if(!n||!((r=Object.keys(t??{}))!=null&&r.length))throw new Error("EndpointProvider requires an apiUrl and endpointMap.");return y.jsx(Xa.Provider,{value:{endpointMap:t,apiUrl:n},children:e})}function Mp(e){const{endpointMap:t,apiUrl:n}=g.useContext(Xa);return{getEndpoint:(r={})=>{const o=t[e];if(!o)throw new Error(`Endpoint with id "${e}" not configured. Make sure to provide all required endpoints.`);let s="";return o.buildPath?s=o.buildPath(r):(s=o.path,Object.entries(r).forEach(([i,a])=>{s=s.replace(`:${i}`,String(a))})),{url:`${n}${s}`,method:o.method}}}}let Pp={data:""},Lp=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||Pp,Op=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,kp=/\/\*[^]*?\*\/| +/g,qa=/\n+/g,Be=(e,t)=>{let n="",r="",o="";for(let s in e){let i=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+i+";":r+=s[1]=="f"?Be(i,s):s+"{"+Be(i,s[1]=="k"?"":t)+"}":typeof i=="object"?r+=Be(i,t?t.replace(/([^,])+/g,a=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,a):a?a+" "+l:l)):s):i!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=Be.p?Be.p(s,i):s+":"+i+";")}return n+(t&&o?t+"{"+o+"}":o)+r},_e={},Ga=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+Ga(e[n]);return t}return e},Np=(e,t,n,r,o)=>{let s=Ga(e),i=_e[s]||(_e[s]=(l=>{let c=0,u=11;for(;c<l.length;)u=101*u+l.charCodeAt(c++)>>>0;return"go"+u})(s));if(!_e[i]){let l=s!==e?e:(c=>{let u,d,f=[{}];for(;u=Op.exec(c.replace(kp,""));)u[4]?f.shift():u[3]?(d=u[3].replace(qa," ").trim(),f.unshift(f[0][d]=f[0][d]||{})):f[0][u[1]]=u[2].replace(qa," ").trim();return f[0]})(e);_e[i]=Be(o?{["@keyframes "+i]:l}:l,n?"":"."+i)}let a=n&&_e.g?_e.g:null;return n&&(_e.g=_e[i]),((l,c,u,d)=>{d?c.data=c.data.replace(d,l):c.data.indexOf(l)===-1&&(c.data=u?l+c.data:c.data+l)})(_e[i],t,r,a),i},Dp=(e,t,n)=>e.reduce((r,o,s)=>{let i=t[s];if(i&&i.call){let a=i(n),l=a&&a.props&&a.props.className||/^go/.test(a)&&a;i=l?"."+l:a&&typeof a=="object"?a.props?"":Be(a,""):a===!1?"":a}return r+o+(i??"")},"");function xn(e){let t=this||{},n=e.call?e(t.p):e;return Np(n.unshift?n.raw?Dp(n,[].slice.call(arguments,1),t.p):n.reduce((r,o)=>Object.assign(r,o&&o.call?o(t.p):o),{}):n,Lp(t.target),t.g,t.o,t.k)}let Wa,Wr,Kr;xn.bind({g:1});let Ee=xn.bind({k:1});function Ip(e,t,n,r){Be.p=t,Wa=e,Wr=n,Kr=r}function Fe(e,t){let n=this||{};return function(){let r=arguments;function o(s,i){let a=Object.assign({},s),l=a.className||o.className;n.p=Object.assign({theme:Wr&&Wr()},a),n.o=/ *go\d+/.test(l),a.className=xn.apply(n,r)+(l?" "+l:"");let c=e;return e[0]&&(c=a.as||e,delete a.as),Kr&&c[0]&&Kr(a),Wa(c,a)}return t?t(o):o}}var Vp=e=>typeof e=="function",wn=(e,t)=>Vp(e)?e(t):e,Bp=(()=>{let e=0;return()=>(++e).toString()})(),Ka=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),Fp=20,Ha=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,Fp)};case 1:return{...e,toasts:e.toasts.map(s=>s.id===t.toast.id?{...s,...t.toast}:s)};case 2:let{toast:n}=t;return Ha(e,{type:e.toasts.find(s=>s.id===n.id)?1:0,toast:n});case 3:let{toastId:r}=t;return{...e,toasts:e.toasts.map(s=>s.id===r||r===void 0?{...s,dismissed:!0,visible:!1}:s)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(s=>s.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let o=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(s=>({...s,pauseDuration:s.pauseDuration+o}))}}},_n=[],et={toasts:[],pausedAt:void 0},tt=e=>{et=Ha(et,e),_n.forEach(t=>{t(et)})},$p={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},jp=(e={})=>{let[t,n]=g.useState(et),r=g.useRef(et);g.useEffect(()=>(r.current!==et&&n(et),_n.push(n),()=>{let s=_n.indexOf(n);s>-1&&_n.splice(s,1)}),[]);let o=t.toasts.map(s=>{var i,a,l;return{...e,...e[s.type],...s,removeDelay:s.removeDelay||((i=e[s.type])==null?void 0:i.removeDelay)||(e==null?void 0:e.removeDelay),duration:s.duration||((a=e[s.type])==null?void 0:a.duration)||(e==null?void 0:e.duration)||$p[s.type],style:{...e.style,...(l=e[s.type])==null?void 0:l.style,...s.style}}});return{...t,toasts:o}},zp=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||Bp()}),Gt=e=>(t,n)=>{let r=zp(t,e,n);return tt({type:2,toast:r}),r.id},$=(e,t)=>Gt("blank")(e,t);$.error=Gt("error"),$.success=Gt("success"),$.loading=Gt("loading"),$.custom=Gt("custom"),$.dismiss=e=>{tt({type:3,toastId:e})},$.remove=e=>tt({type:4,toastId:e}),$.promise=(e,t,n)=>{let r=$.loading(t.loading,{...n,...n==null?void 0:n.loading});return typeof e=="function"&&(e=e()),e.then(o=>{let s=t.success?wn(t.success,o):void 0;return s?$.success(s,{id:r,...n,...n==null?void 0:n.success}):$.dismiss(r),o}).catch(o=>{let s=t.error?wn(t.error,o):void 0;s?$.error(s,{id:r,...n,...n==null?void 0:n.error}):$.dismiss(r)}),e};var Up=(e,t)=>{tt({type:1,toast:{id:e,height:t}})},Rp=()=>{tt({type:5,time:Date.now()})},Wt=new Map,Xp=1e3,qp=(e,t=Xp)=>{if(Wt.has(e))return;let n=setTimeout(()=>{Wt.delete(e),tt({type:4,toastId:e})},t);Wt.set(e,n)},Gp=e=>{let{toasts:t,pausedAt:n}=jp(e);g.useEffect(()=>{if(n)return;let s=Date.now(),i=t.map(a=>{if(a.duration===1/0)return;let l=(a.duration||0)+a.pauseDuration-(s-a.createdAt);if(l<0){a.visible&&$.dismiss(a.id);return}return setTimeout(()=>$.dismiss(a.id),l)});return()=>{i.forEach(a=>a&&clearTimeout(a))}},[t,n]);let r=g.useCallback(()=>{n&&tt({type:6,time:Date.now()})},[n]),o=g.useCallback((s,i)=>{let{reverseOrder:a=!1,gutter:l=8,defaultPosition:c}=i||{},u=t.filter(h=>(h.position||c)===(s.position||c)&&h.height),d=u.findIndex(h=>h.id===s.id),f=u.filter((h,p)=>p<d&&h.visible).length;return u.filter(h=>h.visible).slice(...a?[f+1]:[0,f]).reduce((h,p)=>h+(p.height||0)+l,0)},[t]);return g.useEffect(()=>{t.forEach(s=>{if(s.dismissed)qp(s.id,s.removeDelay);else{let i=Wt.get(s.id);i&&(clearTimeout(i),Wt.delete(s.id))}})},[t]),{toasts:t,handlers:{updateHeight:Up,startPause:Rp,endPause:r,calculateOffset:o}}},Wp=Ee`
|
|
110
110
|
from {
|
|
111
111
|
transform: scale(0) rotate(45deg);
|
|
112
112
|
opacity: 0;
|
|
@@ -114,7 +114,7 @@ from {
|
|
|
114
114
|
to {
|
|
115
115
|
transform: scale(1) rotate(45deg);
|
|
116
116
|
opacity: 1;
|
|
117
|
-
}`,
|
|
117
|
+
}`,Kp=Ee`
|
|
118
118
|
from {
|
|
119
119
|
transform: scale(0);
|
|
120
120
|
opacity: 0;
|
|
@@ -122,7 +122,7 @@ from {
|
|
|
122
122
|
to {
|
|
123
123
|
transform: scale(1);
|
|
124
124
|
opacity: 1;
|
|
125
|
-
}`,
|
|
125
|
+
}`,Hp=Ee`
|
|
126
126
|
from {
|
|
127
127
|
transform: scale(0) rotate(90deg);
|
|
128
128
|
opacity: 0;
|
|
@@ -130,7 +130,7 @@ from {
|
|
|
130
130
|
to {
|
|
131
131
|
transform: scale(1) rotate(90deg);
|
|
132
132
|
opacity: 1;
|
|
133
|
-
}`,
|
|
133
|
+
}`,Zp=Fe("div")`
|
|
134
134
|
width: 20px;
|
|
135
135
|
opacity: 0;
|
|
136
136
|
height: 20px;
|
|
@@ -139,14 +139,14 @@ to {
|
|
|
139
139
|
position: relative;
|
|
140
140
|
transform: rotate(45deg);
|
|
141
141
|
|
|
142
|
-
animation: ${
|
|
142
|
+
animation: ${Wp} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
143
143
|
forwards;
|
|
144
144
|
animation-delay: 100ms;
|
|
145
145
|
|
|
146
146
|
&:after,
|
|
147
147
|
&:before {
|
|
148
148
|
content: '';
|
|
149
|
-
animation: ${
|
|
149
|
+
animation: ${Kp} 0.15s ease-out forwards;
|
|
150
150
|
animation-delay: 150ms;
|
|
151
151
|
position: absolute;
|
|
152
152
|
border-radius: 3px;
|
|
@@ -159,18 +159,18 @@ to {
|
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
&:before {
|
|
162
|
-
animation: ${
|
|
162
|
+
animation: ${Hp} 0.15s ease-out forwards;
|
|
163
163
|
animation-delay: 180ms;
|
|
164
164
|
transform: rotate(90deg);
|
|
165
165
|
}
|
|
166
|
-
`,
|
|
166
|
+
`,Yp=Ee`
|
|
167
167
|
from {
|
|
168
168
|
transform: rotate(0deg);
|
|
169
169
|
}
|
|
170
170
|
to {
|
|
171
171
|
transform: rotate(360deg);
|
|
172
172
|
}
|
|
173
|
-
`,
|
|
173
|
+
`,Jp=Fe("div")`
|
|
174
174
|
width: 12px;
|
|
175
175
|
height: 12px;
|
|
176
176
|
box-sizing: border-box;
|
|
@@ -178,8 +178,8 @@ to {
|
|
|
178
178
|
border-radius: 100%;
|
|
179
179
|
border-color: ${e=>e.secondary||"#e0e0e0"};
|
|
180
180
|
border-right-color: ${e=>e.primary||"#616161"};
|
|
181
|
-
animation: ${
|
|
182
|
-
`,
|
|
181
|
+
animation: ${Yp} 1s linear infinite;
|
|
182
|
+
`,Qp=Ee`
|
|
183
183
|
from {
|
|
184
184
|
transform: scale(0) rotate(45deg);
|
|
185
185
|
opacity: 0;
|
|
@@ -187,7 +187,7 @@ from {
|
|
|
187
187
|
to {
|
|
188
188
|
transform: scale(1) rotate(45deg);
|
|
189
189
|
opacity: 1;
|
|
190
|
-
}`,
|
|
190
|
+
}`,em=Ee`
|
|
191
191
|
0% {
|
|
192
192
|
height: 0;
|
|
193
193
|
width: 0;
|
|
@@ -201,7 +201,7 @@ to {
|
|
|
201
201
|
100% {
|
|
202
202
|
opacity: 1;
|
|
203
203
|
height: 10px;
|
|
204
|
-
}`,
|
|
204
|
+
}`,tm=Fe("div")`
|
|
205
205
|
width: 20px;
|
|
206
206
|
opacity: 0;
|
|
207
207
|
height: 20px;
|
|
@@ -210,13 +210,13 @@ to {
|
|
|
210
210
|
position: relative;
|
|
211
211
|
transform: rotate(45deg);
|
|
212
212
|
|
|
213
|
-
animation: ${
|
|
213
|
+
animation: ${Qp} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
214
214
|
forwards;
|
|
215
215
|
animation-delay: 100ms;
|
|
216
216
|
&:after {
|
|
217
217
|
content: '';
|
|
218
218
|
box-sizing: border-box;
|
|
219
|
-
animation: ${
|
|
219
|
+
animation: ${em} 0.2s ease-out forwards;
|
|
220
220
|
opacity: 0;
|
|
221
221
|
animation-delay: 200ms;
|
|
222
222
|
position: absolute;
|
|
@@ -228,16 +228,16 @@ to {
|
|
|
228
228
|
height: 10px;
|
|
229
229
|
width: 6px;
|
|
230
230
|
}
|
|
231
|
-
`,
|
|
231
|
+
`,nm=Fe("div")`
|
|
232
232
|
position: absolute;
|
|
233
|
-
`,
|
|
233
|
+
`,rm=Fe("div")`
|
|
234
234
|
position: relative;
|
|
235
235
|
display: flex;
|
|
236
236
|
justify-content: center;
|
|
237
237
|
align-items: center;
|
|
238
238
|
min-width: 20px;
|
|
239
239
|
min-height: 20px;
|
|
240
|
-
`,
|
|
240
|
+
`,om=Ee`
|
|
241
241
|
from {
|
|
242
242
|
transform: scale(0.6);
|
|
243
243
|
opacity: 0.4;
|
|
@@ -245,20 +245,20 @@ from {
|
|
|
245
245
|
to {
|
|
246
246
|
transform: scale(1);
|
|
247
247
|
opacity: 1;
|
|
248
|
-
}`,
|
|
248
|
+
}`,sm=Fe("div")`
|
|
249
249
|
position: relative;
|
|
250
250
|
transform: scale(0.6);
|
|
251
251
|
opacity: 0.4;
|
|
252
252
|
min-width: 20px;
|
|
253
|
-
animation: ${
|
|
253
|
+
animation: ${om} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
254
254
|
forwards;
|
|
255
|
-
`,
|
|
255
|
+
`,im=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?K.createElement(sm,null,t):t:n==="blank"?null:K.createElement(rm,null,K.createElement(Jp,{...r}),n!=="loading"&&K.createElement(nm,null,n==="error"?K.createElement(Zp,{...r}):K.createElement(tm,{...r})))},am=e=>`
|
|
256
256
|
0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
|
|
257
257
|
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
|
|
258
|
-
`,
|
|
258
|
+
`,lm=e=>`
|
|
259
259
|
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
|
|
260
260
|
100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
|
|
261
|
-
`,
|
|
261
|
+
`,cm="0%{opacity:0;} 100%{opacity:1;}",um="0%{opacity:1;} 100%{opacity:0;}",dm=Fe("div")`
|
|
262
262
|
display: flex;
|
|
263
263
|
align-items: center;
|
|
264
264
|
background: #fff;
|
|
@@ -270,27 +270,27 @@ to {
|
|
|
270
270
|
pointer-events: auto;
|
|
271
271
|
padding: 8px 10px;
|
|
272
272
|
border-radius: 8px;
|
|
273
|
-
`,
|
|
273
|
+
`,fm=Fe("div")`
|
|
274
274
|
display: flex;
|
|
275
275
|
justify-content: center;
|
|
276
276
|
margin: 4px 10px;
|
|
277
277
|
color: inherit;
|
|
278
278
|
flex: 1 1 auto;
|
|
279
279
|
white-space: pre-line;
|
|
280
|
-
`,
|
|
280
|
+
`,hm=(e,t)=>{let n=e.includes("top")?1:-1,[r,o]=Ka()?[cm,um]:[am(n),lm(n)];return{animation:t?`${Ee(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Ee(o)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},Za=K.memo(({toast:e,position:t,style:n,children:r})=>{let o=e.height?hm(e.position||t||"top-center",e.visible):{opacity:0},s=K.createElement(im,{toast:e}),i=K.createElement(fm,{...e.ariaProps},wn(e.message,e));return K.createElement(dm,{className:e.className,style:{...o,...n,...e.style}},typeof r=="function"?r({icon:s,message:i}):K.createElement(K.Fragment,null,s,i))});Ip(K.createElement);var pm=({id:e,className:t,style:n,onHeightUpdate:r,children:o})=>{let s=K.useCallback(i=>{if(i){let a=()=>{let l=i.getBoundingClientRect().height;r(e,l)};a(),new MutationObserver(a).observe(i,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return K.createElement("div",{ref:s,className:t,style:n},o)},mm=(e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},o=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:Ka()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...o}},gm=xn`
|
|
281
281
|
z-index: 9999;
|
|
282
282
|
> * {
|
|
283
283
|
pointer-events: auto;
|
|
284
284
|
}
|
|
285
|
-
`,Tn=16,mm=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:o,containerStyle:s,containerClassName:i})=>{let{toasts:a,handlers:l}=Xp(n);return W.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:Tn,left:Tn,right:Tn,bottom:Tn,pointerEvents:"none",...s},className:i,onMouseEnter:l.startPause,onMouseLeave:l.endPause},a.map(c=>{let u=c.position||t,d=l.calculateOffset(c,{reverseOrder:e,gutter:r,defaultPosition:t}),f=hm(u,d);return W.createElement(fm,{id:c.id,key:c.id,onHeightUpdate:l.updateHeight,className:c.visible?pm:"",style:f},c.type==="custom"?_n(c.message,c):o?o(c):W.createElement(Ya,{toast:c,position:u}))}))};const gm={root:"_root_movxa_4"};function Jr({className:e,children:t,show:n=!0,variant:r="light",...o}){const s=j("dyn-locator__overlay",gm.root,e);return n?y.jsx("div",{className:s,"data-variant":r,...o,children:t}):null}function Ht(e){const[t,n]=g.useState(!1),[r,o]=g.useState(null),{getEndpoint:s}=Tp(e);return{request:async(a={},l={})=>{n(!0),o(null);try{let c;try{c=s(a)}catch{throw new Error(`Endpoint "${e}" is not configured. The host application must provide all required endpoints.`)}const{url:u,method:d}=c,f=await fetch(u,{method:d,headers:{"Content-Type":"application/json",...l.headers},...d!=="GET"&&l.body?{body:JSON.stringify(l.body)}:{}});if(!f.ok)throw new Error(`HTTP error! status: ${f.status}`);return{data:await f.json()}}catch(c){const u=c instanceof Error?c:new Error(String(c));throw o(u),console.error(`Error in API request to "${e}":`,u),u}finally{n(!1)}},loading:t,error:r}}const je={content:"_content_jvati_17",header:"_header_jvati_29",locationInfo:"_locationInfo_jvati_30",title:"_title_jvati_42",closeButton:"_closeButton_jvati_49",body:"_body_jvati_56",shareButtons:"_shareButtons_jvati_77",shareButton:"_shareButton_jvati_77"},ym={root:"_root_1re47_4"};function vm({children:e,className:t,position:n="top"}){return y.jsx("span",{className:j("dyn-locator__tooltip",ym.root,t),role:"tooltip","aria-hidden":"true","data-position":n,children:e})}function bm({isOpen:e,onClose:t,portalContainer:n=document.body}){var d,f;const{labels:r}=M(h=>h.localizationConfig),o=M(h=>h.locations),s=M(h=>h.selectedLocation),i=M(h=>h.presentationPrefs),{addressFormat:a}=i??{},l=g.useMemo(()=>s?o.find(h=>h.id===s):void 0,[o,s]);function c(h){const{name:p,shareURL:m}=h;switch(p){case"facebook":return{style:{"--icon-button-bg":"#1877F2","--icon-button-hover-bg":"#0a4992"},href:m??"#",target:"_blank",rel:"noopener noreferrer"};case"x":case"twitter":return{style:{"--icon-button-bg":"#000","--icon-button-hover-bg":"#333"},href:m??"#",target:"_blank",rel:"noopener noreferrer"};case"whatsapp":return{style:{"--icon-button-bg":"#25D366","--icon-button-hover-bg":"#167d3c"},href:m??"#",target:"_blank",rel:"noopener noreferrer"};case"email":return{style:{"--icon-button-bg":"var(--dyn-locator__colors-grey-grey-300)","--icon-button-hover-bg":"var(--dyn-locator__colors-grey-grey-400)"},href:m??"#"};case"copy":return{style:{"--icon-button-bg":"var(--dyn-locator__colors-grey-grey-300)","--icon-button-hover-bg":"var(--dyn-locator__colors-grey-grey-400)"},href:"#",onClick:v=>{v.preventDefault(),navigator.clipboard.writeText(m).then(()=>{$.success(r["ShareSheet.copyLinkSuccessNotif"])}).catch(b=>{$.error(r["ShareSheet.copyLinkErrorNotif"]),console.error("Failed to copy link: ",b)})}};default:return{}}}if(!e)return null;const u=y.jsx(Jr,{show:e,variant:"dark",onClick:t,children:y.jsxs("div",{className:j("dyn-locator__share-sheet",je.content),onClick:h=>h.stopPropagation(),role:"dialog","aria-modal":"true","aria-labelledby":"share-sheet-title",children:[y.jsxs("header",{className:je.header,children:[y.jsx("h2",{id:"share-sheet-title",className:je.title,children:r["ShareSheet.title"]}),y.jsx(Ve,{className:je.closeButton,onClick:t,"aria-label":"Close",variant:"bare",children:y.jsx(me,{icon:"Close"})})]}),y.jsxs("div",{className:je.body,children:[l&&y.jsxs("div",{className:je.locationInfo,children:[y.jsx("h3",{children:l.title}),y.jsx("p",{children:a?wn({fallback:l.address,format:a,zip:l.zip,city:l.city,province:l.province,street:l.street,country:l.country}):l.address})]}),y.jsx("div",{className:je.shareButtons,children:(f=(d=l==null?void 0:l.on_share)==null?void 0:d.map)==null?void 0:f.call(d,h=>{const{name:p,shareURL:m}=h,v=p.charAt(0).toUpperCase()+p.slice(1),b=p==="copy"?r["ShareSheet.copyLinkTooltip"]:p==="email"?r["ShareSheet.shareViaEmailTooltip"]:r["ShareSheet.genericShareTooltip"]+v;return y.jsxs(Ve,{as:"a",href:m,variant:"negative",className:je.shareButton,...c(h),children:[y.jsx(me,{icon:v,size:"M"}),y.jsx(vm,{children:b})]})})})]})]})});return n?nn.createPortal(u,n):u}function Cm({isFullscreen:e}){return y.jsx(mm,{...e?{}:{containerStyle:{position:"absolute"}},toastOptions:{position:e?"top-center":"bottom-right",duration:3e3,error:{duration:1/0}},children:t=>y.jsx(Ya,{toast:t,children:({icon:n,message:r})=>y.jsxs(y.Fragment,{children:[n,r,t.type==="error"&&y.jsx(Ve,{variant:"bare",onClick:()=>$.dismiss(t.id),children:y.jsx(me,{icon:"Close"})})]})})})}function Sm({children:e,customComponents:t,customIcons:n,featureFlags:r,presentationPrefs:o,fetchLocations:s,localizationConfig:i,locations:a=[],mapId:l,trackingConfig:c,customMarkers:u=[],customInfoWindow:d=null,customZoomLevels:f=null,clusteringProvider:h=et.AIRC}){const p=M(L=>L.shouldRefetch),m=M(L=>L.setShouldRefetch),v=M(L=>L.isShareSheetOpen),b=M(L=>L.toggleShareSheet),C=M(L=>L.featureFlags),S=M(L=>L.setFeatureFlags),_=M(L=>L.setMapId),w=M(L=>L.setLocalizationConfig),E=M(L=>L.setMapDetail),x=M(L=>L.setLocations),T=M(L=>L.isFullscreen),D=M(L=>L.setCustomMarkers),O=M(L=>L.setCustomInfoWindow),F=M(L=>L.setCustomZoomLevels),N=M(L=>L.setClusteringProvider),Y=M(L=>L.setPresentationPrefs),oe=g.useRef(null),{request:ue,loading:ye,error:P}=Ht(St.CLUSTERS),{request:I,loading:V,error:q}=Ht(St.MARKERS),{request:A,loading:J,error:R}=Ht(St.ALL_MARKERS),H=ye||V||J,qe=!!P||!!q||!!R;async function Ge(L){try{if(typeof L!="number"||L<0||isNaN(L))throw new Error("No map ID provided");const ve=[];try{const{data:K}=await A({mapId:String(L)})??{};K&&Array.isArray(K)&&ve.push(...K)}catch(K){console.warn("Error fetching markers",K)}x(ve),E(Me.CLUSTER)}catch(ve){console.error("Error fetching all markers: ",ve),$.error(Ie+Sn),x([])}}async function lt(L){var ve;try{if(typeof L!="number"||L<0||isNaN(L))throw new Error("No map ID provided");const{data:K}=await ue({mapId:String(L)})??{};if(!K)throw new Error("No cluster data received from the server");x((ve=K.map)==null?void 0:ve.call(K,Ml=>({...Ml,onMarkerClick:async()=>{await tn(L,Ml.id)}})))}catch(K){console.error("Error fetching clusters: ",K),$.error(Ie+Sn),x([])}}async function tn(L,ve){try{if(typeof L!="number"||L<0||isNaN(L))throw new Error("No map ID provided");const{data:K}=await I({mapId:L,clusterId:ve})??{};if(!K)throw new Error("No marker data received from the server");x(K),E(Me.MARKER)}catch(K){console.error("Error fetching markers: ",K),$.error(Ie+Sn),x([])}}return g.useEffect(()=>{i&&w(i),r&&S(r),o&&Y(o),u.length&&(r!=null&&r.withCustomMarkers)&&D(u),d&&(r!=null&&r.withCustomInfoWindow)&&O(d),f&&F(f),h&&N(h),c&&Be.initialize(c),typeof l=="number"&&l>0&&!isNaN(l)&&_(l),a!=null&&a.length?x(a):s?s().then(L=>x(L)):(r?r.withClusters&&h===et.AIRC:C.withClusters&&h===et.AIRC)?lt(l):Ge(l)},[]),g.useEffect(()=>{let L=!0;return p&&l&&((r?r.withClusters&&h===et.AIRC:C.withClusters&&h===et.AIRC)?lt:Ge)(l).finally(()=>{L&&m(!1)}),()=>{L=!1}},[p,l,C.withClusters]),y.jsx("div",{id:"dyn-locator",className:j("dyn-locator__locator",yo.root),"data-fullscreen":T,children:y.jsxs(wp,{customIcons:n,customComponents:t,children:[e,y.jsxs(Jr,{show:H||qe,variant:"light",children:[H?y.jsx(xt,{size:"large"}):null,qe?y.jsx(Ta,{title:jh,message:Sn,actionText:"ricaricare la pagina.",errorDetails:(P==null?void 0:P.message)||(q==null?void 0:q.message),onAction:L=>{L.preventDefault(),window.location.reload()}}):null]}),y.jsx(Cm,{isFullscreen:T}),y.jsx("div",{ref:oe,className:Hh}),C.share?y.jsx(bm,{isOpen:v,onClose:()=>b(!1),portalContainer:oe.current}):null]})})}function Ja({mapProvider:e,endpoints:t,apiUrl:n,children:r,...o}){return y.jsx(Qh,{children:y.jsx(Bl,{children:y.jsx(Rl,{mapProvider:e,children:y.jsx(Ep,{endpoints:t,apiUrl:n,children:y.jsx(Sm,{...o,children:r})})})})})}Ja.displayName="Locator";var Qr,Qa;function wm(){return Qa||(Qa=1,Qr=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,s;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(s=Object.keys(t),r=s.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[o]))return!1;for(o=r;o--!==0;){var i=s[o];if(!e(t[i],n[i]))return!1}return!0}return t!==t&&n!==n}),Qr}var xm=wm();const _m=mo(xm);function ge(){return ge=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ge.apply(null,arguments)}function rt(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Em(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Tm(e){var t=Em(e,"string");return typeof t=="symbol"?t:t+""}const ie={NOT_LOADED:"NOT_LOADED",LOADING:"LOADING",LOADED:"LOADED",FAILED:"FAILED",AUTH_FAILURE:"AUTH_FAILURE"},Am="https://maps.googleapis.com/maps/api/js";class Kt{static async load(t,n){var r;const o=t.libraries?t.libraries.split(","):[],s=this.serializeParams(t);this.listeners.push(n),(r=window.google)!=null&&(r=r.maps)!=null&&r.importLibrary?(this.serializedApiParams||(this.loadingStatus=ie.LOADED),this.notifyLoadingStatusListeners()):(this.serializedApiParams=s,this.initImportLibrary(t)),this.serializedApiParams&&this.serializedApiParams!==s&&console.warn("[google-maps-api-loader] The maps API has already been loaded with different parameters and will not be loaded again. Refresh the page for new values to have effect.");const i=["maps",...o];await Promise.all(i.map(a=>google.maps.importLibrary(a)))}static serializeParams(t){return[t.v,t.key,t.language,t.region,t.authReferrerPolicy,t.solutionChannel].join("/")}static initImportLibrary(t){if(window.google||(window.google={}),window.google.maps||(window.google.maps={}),window.google.maps.importLibrary){console.error("[google-maps-api-loader-internal]: initImportLibrary must only be called once");return}let n=null;const r=()=>n||(n=new Promise((o,s)=>{var i;const a=document.createElement("script"),l=new URLSearchParams;for(const[c,u]of Object.entries(t)){const d=c.replace(/[A-Z]/g,f=>"_"+f[0].toLowerCase());l.set(d,String(u))}l.set("loading","async"),l.set("callback","__googleMapsCallback__"),a.async=!0,a.src=Am+"?"+l.toString(),a.nonce=((i=document.querySelector("script[nonce]"))==null?void 0:i.nonce)||"",a.onerror=()=>{this.loadingStatus=ie.FAILED,this.notifyLoadingStatusListeners(),s(new Error("The Google Maps JavaScript API could not load."))},window.__googleMapsCallback__=()=>{this.loadingStatus=ie.LOADED,this.notifyLoadingStatusListeners(),o()},window.gm_authFailure=()=>{this.loadingStatus=ie.AUTH_FAILURE,this.notifyLoadingStatusListeners()},this.loadingStatus=ie.LOADING,this.notifyLoadingStatusListeners(),document.head.append(a)}),n);google.maps.importLibrary=o=>r().then(()=>google.maps.importLibrary(o))}static notifyLoadingStatusListeners(){for(const t of this.listeners)t(this.loadingStatus)}}Kt.loadingStatus=ie.NOT_LOADED,Kt.serializedApiParams=void 0,Kt.listeners=[];const Mm=["onLoad","onError","apiKey","version","libraries"],Pm=["children"],Lm="GMP_visgl_rgmlibrary_v1_default",Zt=g.createContext(null);function Om(){const[e,t]=g.useState({});return{mapInstances:e,addMapInstance:(s,i="default")=>{t(a=>ge({},a,{[i]:s}))},removeMapInstance:(s="default")=>{t(i=>rt(i,[s].map(Tm)))},clearMapInstances:()=>{t({})}}}function km(e){const{onLoad:t,onError:n,apiKey:r,version:o,libraries:s=[]}=e,i=rt(e,Mm),[a,l]=g.useState(Kt.loadingStatus),[c,u]=g.useReducer((p,m)=>p[m.name]?p:ge({},p,{[m.name]:m.value}),{}),d=g.useMemo(()=>s==null?void 0:s.join(","),[s]),f=g.useMemo(()=>JSON.stringify(ge({apiKey:r,version:o},i)),[r,o,i]),h=g.useCallback(async p=>{var m;if(c[p])return c[p];if(!((m=google)!=null&&(m=m.maps)!=null&&m.importLibrary))throw new Error("[api-provider-internal] importLibrary was called before google.maps.importLibrary was defined.");const v=await window.google.maps.importLibrary(p);return u({name:p,value:v}),v},[c]);return g.useEffect(()=>{(async()=>{try{const p=ge({key:r},i);o&&(p.v=o),(d==null?void 0:d.length)>0&&(p.libraries=d),(p.channel===void 0||p.channel<0||p.channel>999)&&delete p.channel,p.solutionChannel===void 0?p.solutionChannel=Lm:p.solutionChannel===""&&delete p.solutionChannel,await Kt.load(p,m=>l(m));for(const m of["core","maps",...s])await h(m);t&&t()}catch(p){n?n(p):console.error("<ApiProvider> failed to load the Google Maps JavaScript API",p)}})()},[r,d,f]),{status:a,loadedLibraries:c,importLibrary:h}}const Dm=e=>{const{children:t}=e,n=rt(e,Pm),{mapInstances:r,addMapInstance:o,removeMapInstance:s,clearMapInstances:i}=Om(),{status:a,loadedLibraries:l,importLibrary:c}=km(n),u=g.useMemo(()=>({mapInstances:r,addMapInstance:o,removeMapInstance:s,clearMapInstances:i,status:a,loadedLibraries:l,importLibrary:c}),[r,o,s,i,a,l,c]);return g.createElement(Zt.Provider,{value:u},t)};function Nm(e,t){for(const n of Fm){const r=t[n],o=el[n];g.useEffect(()=>{if(!e||!r)return;const s=google.maps.event.addListener(e,o,i=>{r(Im(o,e,i))});return()=>s.remove()},[e,o,r])}}function Im(e,t,n){const r={type:e,map:t,detail:{},stoppable:!1,stop:()=>{}};if(Vm.includes(e)){const s=r,i=t.getCenter(),a=t.getZoom(),l=t.getHeading()||0,c=t.getTilt()||0,u=t.getBounds();return(!i||!u||!Number.isFinite(a))&&console.warn("[createEvent] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),s.detail={center:(i==null?void 0:i.toJSON())||{lat:0,lng:0},zoom:a||0,heading:l,tilt:c,bounds:(u==null?void 0:u.toJSON())||{north:90,east:180,south:-90,west:-180}},s}else if(Bm.includes(e)){var o;if(!n)throw new Error("[createEvent] mouse events must provide a srcEvent");const s=r;return s.domEvent=n.domEvent,s.stoppable=!0,s.stop=()=>n.stop(),s.detail={latLng:((o=n.latLng)==null?void 0:o.toJSON())||null,placeId:n.placeId},s}return r}const el={onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onContextmenu:"contextmenu",onDblclick:"dblclick",onDrag:"drag",onDragend:"dragend",onDragstart:"dragstart",onHeadingChanged:"heading_changed",onIdle:"idle",onIsFractionalZoomEnabledChanged:"isfractionalzoomenabled_changed",onMapCapabilitiesChanged:"mapcapabilities_changed",onMapTypeIdChanged:"maptypeid_changed",onMousemove:"mousemove",onMouseout:"mouseout",onMouseover:"mouseover",onProjectionChanged:"projection_changed",onRenderingTypeChanged:"renderingtype_changed",onTilesLoaded:"tilesloaded",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed",onCameraChanged:"bounds_changed"},Vm=["bounds_changed","center_changed","heading_changed","tilt_changed","zoom_changed"],Bm=["click","contextmenu","dblclick","mousemove","mouseout","mouseover"],Fm=Object.keys(el);function eo(e,t){const n=g.useRef(void 0);(!n.current||!_m(t,n.current))&&(n.current=t),g.useEffect(e,n.current)}const $m=new Set(["backgroundColor","clickableIcons","controlSize","disableDefaultUI","disableDoubleClickZoom","draggable","draggableCursor","draggingCursor","fullscreenControl","fullscreenControlOptions","gestureHandling","headingInteractionEnabled","isFractionalZoomEnabled","keyboardShortcuts","mapTypeControl","mapTypeControlOptions","mapTypeId","maxZoom","minZoom","noClear","panControl","panControlOptions","restriction","rotateControl","rotateControlOptions","scaleControl","scaleControlOptions","scrollwheel","streetView","streetViewControl","streetViewControlOptions","styles","tiltInteractionEnabled","zoomControl","zoomControlOptions"]);function jm(e,t){const n={},r=Object.keys(t);for(const o of r)$m.has(o)&&(n[o]=t[o]);eo(()=>{e&&e.setOptions(n)},[n])}function to(){var e;return((e=g.useContext(Zt))==null?void 0:e.status)||ie.NOT_LOADED}function zm(e,t){const{viewport:n,viewState:r}=t,o=!!n;return g.useLayoutEffect(()=>{if(!e||!r)return;const{latitude:s,longitude:i,bearing:a,pitch:l,zoom:c}=r;e.moveCamera({center:{lat:s,lng:i},heading:a,tilt:l,zoom:c+1})},[e,r]),o}function Um(e){return!e||typeof e!="object"||!("lat"in e&&"lng"in e)?!1:Number.isFinite(e.lat)&&Number.isFinite(e.lng)}function tl(e){return Um(e)?e:e.toJSON()}function Rm(e,t,n){const r=n.center?tl(n.center):null;let o=null,s=null;r&&Number.isFinite(r.lat)&&Number.isFinite(r.lng)&&(o=r.lat,s=r.lng);const i=Number.isFinite(n.zoom)?n.zoom:null,a=Number.isFinite(n.heading)?n.heading:null,l=Number.isFinite(n.tilt)?n.tilt:null;g.useLayoutEffect(()=>{if(!e)return;const c={};let u=!1;o!==null&&s!==null&&(t.current.center.lat!==o||t.current.center.lng!==s)&&(c.center={lat:o,lng:s},u=!0),i!==null&&t.current.zoom!==i&&(c.zoom=i,u=!0),a!==null&&t.current.heading!==a&&(c.heading=a,u=!0),l!==null&&t.current.tilt!==l&&(c.tilt=l,u=!0),u&&e.moveCamera(c)})}const Xm=()=>{const e={position:"absolute",top:0,left:0,bottom:0,right:0,zIndex:999,display:"flex",flexFlow:"column nowrap",textAlign:"center",justifyContent:"center",fontSize:".8rem",color:"rgba(0,0,0,0.6)",background:"#dddddd",padding:"1rem 1.5rem"};return g.createElement("div",{style:e},g.createElement("h2",null,"Error: AuthFailure"),g.createElement("p",null,"A problem with your API key prevents the map from rendering correctly. Please make sure the value of the ",g.createElement("code",null,"APIProvider.apiKey")," prop is correct. Check the error-message in the console for further details."))};function qm(){const[e,t]=g.useState(null),n=g.useCallback(r=>t(r),[t]);return[e,n]}function nl(){return to()===ie.LOADED}function Gm(){const[,e]=g.useReducer(t=>t+1,0);return e}function Wm(e,t){const n=e.getCenter(),r=e.getZoom(),o=e.getHeading()||0,s=e.getTilt()||0,i=e.getBounds();(!n||!i||!Number.isFinite(r))&&console.warn("[useTrackedCameraState] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),Object.assign(t.current,{center:(n==null?void 0:n.toJSON())||{lat:0,lng:0},zoom:r||0,heading:o,tilt:s})}function Hm(e){const t=Gm(),n=g.useRef({center:{lat:0,lng:0},heading:0,tilt:0,zoom:0});return g.useEffect(()=>{if(!e)return;const r=google.maps.event.addListener(e,"bounds_changed",()=>{Wm(e,n),t()});return()=>r.remove()},[e,t]),n}const Km=["id","defaultBounds","defaultCenter","defaultZoom","defaultHeading","defaultTilt","reuseMaps","renderingType","colorScheme"],Zm=["padding"];class An{static has(t){return this.entries[t]&&this.entries[t].length>0}static pop(t){return this.entries[t]&&this.entries[t].pop()||null}static push(t,n){this.entries[t]||(this.entries[t]=[]),this.entries[t].push(n)}}An.entries={};function Ym(e,t){const n=nl(),[r,o]=g.useState(null),[s,i]=qm(),a=Hm(r),{id:l,defaultBounds:c,defaultCenter:u,defaultZoom:d,defaultHeading:f,defaultTilt:h,reuseMaps:p,renderingType:m,colorScheme:v}=e,b=rt(e,Km),C=e.zoom!==void 0||e.defaultZoom!==void 0,S=e.center!==void 0||e.defaultCenter!==void 0;!c&&(!C||!S)&&console.warn("<Map> component is missing configuration. You have to provide zoom and center (via the `zoom`/`defaultZoom` and `center`/`defaultCenter` props) or specify the region to show using `defaultBounds`. See https://visgl.github.io/react-google-maps/docs/api-reference/components/map#required"),!b.center&&u&&(b.center=u),!b.zoom&&Number.isFinite(d)&&(b.zoom=d),!b.heading&&Number.isFinite(f)&&(b.heading=f),!b.tilt&&Number.isFinite(h)&&(b.tilt=h);for(const w of Object.keys(b))b[w]===void 0&&delete b[w];const _=g.useRef(void 0);return g.useEffect(()=>{if(!s||!n)return;const{addMapInstance:w,removeMapInstance:E}=t,{mapId:x}=e,T=`${x||"default"}:${m||"default"}:${v||"LIGHT"}`;let D,O;if(p&&An.has(T)?(O=An.pop(T),D=O.getDiv(),s.appendChild(D),O.setOptions(b),setTimeout(()=>O.setCenter(O.getCenter()),0)):(D=document.createElement("div"),D.style.height="100%",s.appendChild(D),O=new google.maps.Map(D,ge({},b,m?{renderingType:m}:{},v?{colorScheme:v}:{}))),o(O),w(O,l),c){const{padding:F}=c,N=rt(c,Zm);O.fitBounds(N,F)}else(!C||!S)&&O.fitBounds({east:180,west:-180,south:-90,north:90});if(_.current){const{mapId:F,cameraState:N}=_.current;F!==x&&O.setOptions(N)}return()=>{_.current={mapId:x,cameraState:a.current},D.remove(),p?An.push(T,O):google.maps.event.clearInstanceListeners(O),o(null),E(l)}},[s,n,l,e.mapId,e.renderingType,e.colorScheme]),[r,i,a]}const rl=g.createContext(null),ol=e=>{const{children:t,id:n,className:r,style:o}=e,s=g.useContext(Zt),i=to();if(!s)throw new Error("<Map> can only be used inside an <ApiProvider> component.");const[a,l,c]=Ym(e,s);Rm(a,c,e),Nm(a,e),jm(a,e);const u=zm(a,e),d=!!e.controlled;g.useEffect(()=>{if(a)return u&&a.setOptions({disableDefaultUI:!0}),(u||d)&&a.setOptions({gestureHandling:"none",keyboardShortcuts:!1}),()=>{a.setOptions({gestureHandling:e.gestureHandling,keyboardShortcuts:e.keyboardShortcuts})}},[a,u,d,e.gestureHandling,e.keyboardShortcuts]);const f=e.center?tl(e.center):null;let h=null,p=null;f&&Number.isFinite(f.lat)&&Number.isFinite(f.lng)&&(h=f.lat,p=f.lng);const m=g.useMemo(()=>{var C,S,_,w,E;return{center:{lat:(C=h)!=null?C:0,lng:(S=p)!=null?S:0},zoom:(_=e.zoom)!=null?_:0,heading:(w=e.heading)!=null?w:0,tilt:(E=e.tilt)!=null?E:0}},[h,p,e.zoom,e.heading,e.tilt]);g.useLayoutEffect(()=>{if(!a||!d)return;a.moveCamera(m);const C=a.addListener("bounds_changed",()=>{a.moveCamera(m)});return()=>C.remove()},[a,d,m]);const v=g.useMemo(()=>ge({width:"100%",height:"100%",position:"relative",zIndex:u?-1:0},o),[o,u]),b=g.useMemo(()=>({map:a}),[a]);return i===ie.AUTH_FAILURE?g.createElement("div",{style:ge({position:"relative"},r?{}:v),className:r},g.createElement(Xm,null)):g.createElement("div",ge({ref:l,"data-testid":"map",style:r?void 0:v,className:r},n?{id:n}:{}),a?g.createElement(rl.Provider,{value:b},t):null)};ol.deckGLViewProps=!0;const sl=new Set;function Jm(...e){const t=JSON.stringify(e);sl.has(t)||(sl.add(t),console.error(...e))}const Yt=(e=null)=>{const t=g.useContext(Zt),{map:n}=g.useContext(rl)||{};if(t===null)return Jm("useMap(): failed to retrieve APIProviderContext. Make sure that the <APIProvider> component exists and that the component you are calling `useMap()` from is a sibling of the <APIProvider>."),null;const{mapInstances:r}=t;return e!==null?r[e]||null:n||r.default||null};function Mn(e){const t=nl(),n=g.useContext(Zt);return g.useEffect(()=>{!t||!n||n.importLibrary(e)},[t,n,e]),(n==null?void 0:n.loadedLibraries[e])||null}function wt(e,t,n){g.useEffect(()=>{if(!e||!t||!n)return;const r=google.maps.event.addListener(e,t,n);return()=>r.remove()},[e,t,n])}function Pn(e,t,n){g.useEffect(()=>{e&&(e[t]=n)},[e,t,n])}function il(e,t,n){g.useEffect(()=>{if(!(!e||!t||!n))return e.addEventListener(t,n),()=>e.removeEventListener(t,n)},[e,t,n])}function Qm(e){return e.content!==void 0}function eg(e){return e.nodeType===Node.ELEMENT_NODE}const tg=g.createContext(null),ng={BOTTOM:["50%","100%"]},rg=({children:e,styles:t,className:n,anchorPoint:r})=>{const[o,s]=r??ng.BOTTOM;let i=`-${o}`,a=`-${s}`;o.trimStart().startsWith("-")&&(i=o.substring(1)),s.trimStart().startsWith("-")&&(a=s.substring(1));const l=`translate(50%, 100%) translate(${i}, ${a})`;return g.createElement("div",{style:{transform:l}},g.createElement("div",{className:n,style:t},e))};function og(e){const[t,n]=g.useState(null),[r,o]=g.useState(null),s=Yt(),i=Mn("marker"),{children:a,onClick:l,className:c,onMouseEnter:u,onMouseLeave:d,onDrag:f,onDragStart:h,onDragEnd:p,collisionBehavior:m,clickable:v,draggable:b,position:C,title:S,zIndex:_}=e,w=g.Children.count(a);return g.useEffect(()=>{if(!s||!i)return;const E=new i.AdvancedMarkerElement;E.map=s,n(E);let x=null;return w>0&&(x=document.createElement("div"),x.isCustomMarker=!0,E.content=x,o(x)),()=>{var T;E.map=null,(T=x)==null||T.remove(),n(null),o(null)}},[s,i,w]),g.useEffect(()=>{!t||!t.content||w>0||(t.content.className=c||"")},[t,c,w]),Pn(t,"position",C),Pn(t,"title",S??""),Pn(t,"zIndex",_),Pn(t,"collisionBehavior",m),g.useEffect(()=>{t&&(b!==void 0?t.gmpDraggable=b:f||h||p?t.gmpDraggable=!0:t.gmpDraggable=!1)},[t,b,f,p,h]),g.useEffect(()=>{if(!t)return;const E=v!==void 0||!!l||!!u||!!d;t.gmpClickable=E,E&&t!=null&&t.content&&eg(t.content)&&(t.content.style.pointerEvents="none",t.content.firstElementChild&&(t.content.firstElementChild.style.pointerEvents="all"))},[t,v,l,u,d]),wt(t,"click",l),wt(t,"drag",f),wt(t,"dragstart",h),wt(t,"dragend",p),il(t==null?void 0:t.element,"mouseenter",u),il(t==null?void 0:t.element,"mouseleave",d),[t,r]}const sg=g.forwardRef((e,t)=>{const{children:n,style:r,className:o,anchorPoint:s}=e,[i,a]=og(e),l=g.useMemo(()=>i?{marker:i}:null,[i]);return g.useImperativeHandle(t,()=>i,[i]),a?g.createElement(tg.Provider,{value:l},nn.createPortal(g.createElement(rg,{anchorPoint:s,styles:r,className:o},n),a)):null});function ig(e,t,n){if(t!=null&&typeof t!="object")throw new Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");const r=e.style;if(n==null){if(t==null)return;for(const o in t)t.hasOwnProperty(o)&&al(r,o,t[o]);return}for(const o in n)n.hasOwnProperty(o)&&(t==null||!t.hasOwnProperty(o))&&(o.indexOf("--")===0?r.setProperty(o,""):o==="float"?r.cssFloat="":r[o]="");if(t!=null)for(const o in t){const s=t[o];t.hasOwnProperty(o)&&n[o]!==s&&al(r,o,s)}}function al(e,t,n){const r=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,n):typeof n=="number"&&n!==0&&!lg(t)?e[t]=n+"px":t==="float"?e.cssFloat=n:e[t]=(""+n).trim()}const ag=new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridArea","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","fontWeight","lineClamp","lineHeight","opacity","order","orphans","scale","tabSize","widows","zIndex","zoom","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth"]);function lg(e){return ag.has(e)}const cg=["children","headerContent","style","className","pixelOffset","anchor","shouldFocus","onClose","onCloseClick"],ug=e=>{const{children:t,headerContent:n,style:r,className:o,pixelOffset:s,anchor:i,shouldFocus:a,onClose:l,onCloseClick:c}=e,u=rt(e,cg),d=Mn("maps"),[f,h]=g.useState(null),p=g.useRef(null),m=g.useRef(null);g.useEffect(()=>{if(!d)return;p.current=document.createElement("div"),m.current=document.createElement("div");const C=u;s&&(C.pixelOffset=new google.maps.Size(s[0],s[1])),n&&(C.headerContent=typeof n=="string"?n:m.current);const S=new google.maps.InfoWindow(u);return S.setContent(p.current),h(S),()=>{var _,w;S.setContent(null),(_=p.current)==null||_.remove(),(w=m.current)==null||w.remove(),p.current=null,m.current=null,h(null)}},[d]);const v=g.useRef(null);g.useEffect(()=>{!f||!p.current||(ig(p.current,r||null,v.current),v.current=r||null,o!==p.current.className&&(p.current.className=o||""))},[f,o,r]),eo(()=>{if(!f)return;const C=u;s?C.pixelOffset=new google.maps.Size(s[0],s[1]):C.pixelOffset=null,n?C.headerContent=typeof n=="string"?n:m.current:C.headerContent=null,f.setOptions(u)},[u,s,n]),wt(f,"close",l),wt(f,"closeclick",c);const b=Yt();return eo(()=>{if(!b||!f||i===null)return;const C=!!i,S={map:b};if(i&&(S.anchor=i,Qm(i)&&i.content instanceof Element)){const w=i.content,E=w==null?void 0:w.getBoundingClientRect();if(E&&w!=null&&w.isCustomMarker){var _;const x=(_=i.content.firstElementChild)==null?void 0:_.firstElementChild,T=x==null?void 0:x.getBoundingClientRect(),D=T.x-E.x+(T.width-E.width)/2,O=T.y-E.y,F=u;F.pixelOffset=new google.maps.Size(s?s[0]+D:D,s?s[1]+O:O),f.setOptions(F)}}return a!==void 0&&(S.shouldFocus=a),f.open(S),()=>{C&&f.set("anchor",null),f.close()}},[f,i,b,a,u,s]),g.createElement(g.Fragment,null,p.current&&nn.createPortal(t,p.current),m.current!==null&&nn.createPortal(n,m.current))},dg=["onClick","onDrag","onDragStart","onDragEnd","onMouseOver","onMouseOut"];function fg(e){const[t,n]=g.useState(null),r=Yt(),{onClick:o,onDrag:s,onDragStart:i,onDragEnd:a,onMouseOver:l,onMouseOut:c}=e,u=rt(e,dg),{position:d,draggable:f}=u;return g.useEffect(()=>{if(!r){r===void 0&&console.error("<Marker> has to be inside a Map component.");return}const h=new google.maps.Marker(u);return h.setMap(r),n(h),()=>{h.setMap(null),n(null)}},[r]),g.useEffect(()=>{if(!t)return;const h=t,p=google.maps.event;return o&&p.addListener(h,"click",o),s&&p.addListener(h,"drag",s),i&&p.addListener(h,"dragstart",i),a&&p.addListener(h,"dragend",a),l&&p.addListener(h,"mouseover",l),c&&p.addListener(h,"mouseout",c),t.setDraggable(!!f),()=>{p.clearInstanceListeners(h)}},[t,f,o,s,i,a,l,c]),g.useEffect(()=>{t&&u&&t.setOptions(u)},[t,u]),g.useEffect(()=>{f||!d||!t||t.setPosition(d)},[f,d,t]),t}const no=g.forwardRef((e,t)=>{const n=fg(e);return g.useImperativeHandle(t,()=>n,[n]),g.createElement(g.Fragment,null)});function hg(){const[e,t]=g.useState(null);return[g.useCallback(r=>{t(r)},[]),e]}const ze={root:"_root_faay1_10",header:"_header_faay1_18",body:"_body_faay1_31",highlighted:"_highlighted_faay1_43",toggleButton:"_toggleButton_faay1_46",toggleButtonIcon:"_toggleButtonIcon_faay1_46"};function pg({onLocationSelect:e}){var p;const t=Fa("locationCard"),n=M(m=>m.locations),{labels:r}=M(m=>m.localizationConfig),o=M(m=>m.isLocationListExpanded),s=M(m=>m.setIsLocationListExpanded),i=M(m=>m.selectedLocation),a=M(m=>m.setSelectedLocation),l=g.useRef({}),c=r["LocationList.header"],u=r["LocationList.locationDesignator"],d=(p=c==null?void 0:c.split)==null?void 0:p.call(c,/(\{:\d\})/g),f=g.useMemo(()=>(d??[]).map((m,v)=>m==="{:1}"?y.jsx("span",{className:ze.highlighted,children:(n==null?void 0:n.length)??0},v):m==="{:2}"?y.jsx("span",{className:ze.highlighted,children:u},v):m),[u,n.length,d]);function h(m){return()=>{e==null||e(m.coords),a==null||a(m.id)}}return g.useEffect(()=>{if(i&&o){const m=l.current[i];m!=null&&m.current&&requestAnimationFrame(()=>{const v=window.scrollY;m.current.scrollIntoView({behavior:"smooth",block:"start"}),window.scrollTo({top:v,behavior:"auto"})})}},[i,o]),y.jsxs("div",{className:j("dyn-locator__location-list",ze.root),"data-expanded":o,children:[y.jsxs("header",{className:ze.header,onClick:()=>s(!o),role:"button","aria-expanded":o,children:[y.jsx("span",{children:f}),y.jsx(Ve,{className:ze.toggleButton,variant:"bare",children:y.jsx(me,{className:ze.toggleButtonIcon,animate:!1,icon:"ChevronUp"})})]}),y.jsx("div",{className:ze.body,children:n!=null&&n.length?n.map(m=>{const v=m.id;l.current[v]||(l.current[v]=g.createRef());const b=l.current[v];return y.jsx(t,{ref:b,"data-active":i===m.id,onClick:h(m),...m},m.id)}):y.jsx("div",{className:ze.noResults,children:r["LocationList.noResults"]})})]})}const Te={root:"_root_b3glo_21",loaderContainer:"_loaderContainer_b3glo_29",fullscreenButton:"_fullscreenButton_b3glo_36",backButton:"_backButton_b3glo_37",areaSearchButton:"_areaSearchButton_b3glo_52",visualCue:"_visualCue_b3glo_77",closeButton:"_closeButton_b3glo_102",searchButton:"_searchButton_b3glo_120"},Ln={root:"_root_e0ns1_4",header:"_header_e0ns1_7",cta:"_cta_e0ns1_24"};function ll({id:e,title:t,address:n,zip:r,province:o,street:s,city:i,country:a,coords:l,actions:c,onClick:u,onRightButtonClick:d,markerType:f,...h}){var F;const{labels:p}=M(N=>N.localizationConfig),m=M(N=>N.selectedLocation),v=M(N=>N.featureFlags),b=M(N=>N.customMarkers),C=M(N=>N.customInfoWindow),S=M(N=>N.setSelectedLocation),_=M(N=>N.presentationPrefs),{addressFormat:w}=_??{},[E,x]=hg(),T=g.useCallback(()=>{S==null||S("")},[S]),D=N=>{const Y=b.find(ue=>ue.markerType===N),oe=Y==null?void 0:Y.component;return oe?y.jsx(oe,{}):null},O=N=>{const Y=C==null?void 0:C.component;return Y?y.jsx(Y,{...N}):null};return y.jsxs(y.Fragment,{children:[v.withCustomMarkers&&f&&f!=="default"?y.jsx(sg,{onClick:()=>{u==null||u()},position:l,ref:E,children:D(f)}):y.jsx(no,{ref:E,position:l,onClick:()=>{u==null||u()}}),m===e?y.jsx(ug,{anchor:x,headerContent:t,onCloseClick:T,className:Ln.root,children:v.withCustomInfoWindow&&(C!=null&&C.component)&&typeof C.component=="function"?O({...h,title:t,actions:c,address:w?wn({fallback:n,format:w,zip:r,city:i,province:o,street:s,country:a}):n}):y.jsxs(y.Fragment,{children:[y.jsxs("header",{className:Ln.header,children:[y.jsx("h6",{children:t}),y.jsx("address",{children:w?wn({fallback:n,format:w,zip:r,city:i,province:o,street:s,country:a}):n})]}),y.jsx("div",{className:Ln.body,children:y.jsxs("div",{className:Ln.cta,children:[y.jsx(qt,{animate:!1,variant:"secondary",size:"small",...Ca((F=c==null?void 0:c.find)==null?void 0:F.call(c,N=>N.type==="navigate")),children:p["InfoWindow.CTA_1"]}),y.jsx(qt,{animate:!1,variant:"secondary",size:"small",onClick:d,children:p["InfoWindow.CTA_2"]})]})})]})}):null]})}var mg=Object.getOwnPropertyNames,gg=Object.getOwnPropertySymbols,yg=Object.prototype.hasOwnProperty;function cl(e,t){return function(r,o,s){return e(r,o,s)&&t(r,o,s)}}function On(e){return function(n,r,o){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,o);var s=o.cache,i=s.get(n),a=s.get(r);if(i&&a)return i===r&&a===n;s.set(n,r),s.set(r,n);var l=e(n,r,o);return s.delete(n),s.delete(r),l}}function ul(e){return mg(e).concat(gg(e))}var vg=Object.hasOwn||function(e,t){return yg.call(e,t)};function ot(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var bg="__v",Cg="__o",Sg="_owner",dl=Object.getOwnPropertyDescriptor,fl=Object.keys;function wg(e,t,n){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function xg(e,t){return ot(e.getTime(),t.getTime())}function _g(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function Eg(e,t){return e===t}function hl(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var o=new Array(r),s=e.entries(),i,a,l=0;(i=s.next())&&!i.done;){for(var c=t.entries(),u=!1,d=0;(a=c.next())&&!a.done;){if(o[d]){d++;continue}var f=i.value,h=a.value;if(n.equals(f[0],h[0],l,d,e,t,n)&&n.equals(f[1],h[1],f[0],h[0],e,t,n)){u=o[d]=!0;break}d++}if(!u)return!1;l++}return!0}var Tg=ot;function Ag(e,t,n){var r=fl(e),o=r.length;if(fl(t).length!==o)return!1;for(;o-- >0;)if(!ml(e,t,n,r[o]))return!1;return!0}function Jt(e,t,n){var r=ul(e),o=r.length;if(ul(t).length!==o)return!1;for(var s,i,a;o-- >0;)if(s=r[o],!ml(e,t,n,s)||(i=dl(e,s),a=dl(t,s),(i||a)&&(!i||!a||i.configurable!==a.configurable||i.enumerable!==a.enumerable||i.writable!==a.writable)))return!1;return!0}function Mg(e,t){return ot(e.valueOf(),t.valueOf())}function Pg(e,t){return e.source===t.source&&e.flags===t.flags}function pl(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var o=new Array(r),s=e.values(),i,a;(i=s.next())&&!i.done;){for(var l=t.values(),c=!1,u=0;(a=l.next())&&!a.done;){if(!o[u]&&n.equals(i.value,a.value,i.value,a.value,e,t,n)){c=o[u]=!0;break}u++}if(!c)return!1}return!0}function Lg(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function Og(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function ml(e,t,n,r){return(r===Sg||r===Cg||r===bg)&&(e.$$typeof||t.$$typeof)?!0:vg(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var kg="[object Arguments]",Dg="[object Boolean]",Ng="[object Date]",Ig="[object Error]",Vg="[object Map]",Bg="[object Number]",Fg="[object Object]",$g="[object RegExp]",jg="[object Set]",zg="[object String]",Ug="[object URL]",Rg=Array.isArray,gl=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,yl=Object.assign,Xg=Object.prototype.toString.call.bind(Object.prototype.toString);function qg(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areErrorsEqual,o=e.areFunctionsEqual,s=e.areMapsEqual,i=e.areNumbersEqual,a=e.areObjectsEqual,l=e.arePrimitiveWrappersEqual,c=e.areRegExpsEqual,u=e.areSetsEqual,d=e.areTypedArraysEqual,f=e.areUrlsEqual;return function(p,m,v){if(p===m)return!0;if(p==null||m==null)return!1;var b=typeof p;if(b!==typeof m)return!1;if(b!=="object")return b==="number"?i(p,m,v):b==="function"?o(p,m,v):!1;var C=p.constructor;if(C!==m.constructor)return!1;if(C===Object)return a(p,m,v);if(Rg(p))return t(p,m,v);if(gl!=null&&gl(p))return d(p,m,v);if(C===Date)return n(p,m,v);if(C===RegExp)return c(p,m,v);if(C===Map)return s(p,m,v);if(C===Set)return u(p,m,v);var S=Xg(p);return S===Ng?n(p,m,v):S===$g?c(p,m,v):S===Vg?s(p,m,v):S===jg?u(p,m,v):S===Fg?typeof p.then!="function"&&typeof m.then!="function"&&a(p,m,v):S===Ug?f(p,m,v):S===Ig?r(p,m,v):S===kg?a(p,m,v):S===Dg||S===Bg||S===zg?l(p,m,v):!1}}function Gg(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,o={areArraysEqual:r?Jt:wg,areDatesEqual:xg,areErrorsEqual:_g,areFunctionsEqual:Eg,areMapsEqual:r?cl(hl,Jt):hl,areNumbersEqual:Tg,areObjectsEqual:r?Jt:Ag,arePrimitiveWrappersEqual:Mg,areRegExpsEqual:Pg,areSetsEqual:r?cl(pl,Jt):pl,areTypedArraysEqual:r?Jt:Lg,areUrlsEqual:Og};if(n&&(o=yl({},o,n(o))),t){var s=On(o.areArraysEqual),i=On(o.areMapsEqual),a=On(o.areObjectsEqual),l=On(o.areSetsEqual);o=yl({},o,{areArraysEqual:s,areMapsEqual:i,areObjectsEqual:a,areSetsEqual:l})}return o}function Wg(e){return function(t,n,r,o,s,i,a){return e(t,n,a)}}function Hg(e){var t=e.circular,n=e.comparator,r=e.createState,o=e.equals,s=e.strict;if(r)return function(l,c){var u=r(),d=u.cache,f=d===void 0?t?new WeakMap:void 0:d,h=u.meta;return n(l,c,{cache:f,equals:o,meta:h,strict:s})};if(t)return function(l,c){return n(l,c,{cache:new WeakMap,equals:o,meta:void 0,strict:s})};var i={cache:void 0,equals:o,meta:void 0,strict:s};return function(l,c){return n(l,c,i)}}var vl=Ue();Ue({strict:!0}),Ue({circular:!0}),Ue({circular:!0,strict:!0}),Ue({createInternalComparator:function(){return ot}}),Ue({strict:!0,createInternalComparator:function(){return ot}}),Ue({circular:!0,createInternalComparator:function(){return ot}}),Ue({circular:!0,createInternalComparator:function(){return ot},strict:!0});function Ue(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,o=e.createState,s=e.strict,i=s===void 0?!1:s,a=Gg(e),l=qg(a),c=r?r(l):Wg(l);return Hg({circular:n,comparator:l,createState:o,equals:c,strict:i})}const bl=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],ro=1,Qt=8;class oo{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[n,r]=new Uint8Array(t,0,2);if(n!==219)throw new Error("Data does not appear to be in a KDBush format.");const o=r>>4;if(o!==ro)throw new Error(`Got v${o} data when expected v${ro}.`);const s=bl[r&15];if(!s)throw new Error("Unrecognized array type.");const[i]=new Uint16Array(t,2,1),[a]=new Uint32Array(t,4,1);return new oo(a,i,s,t)}constructor(t,n=64,r=Float64Array,o){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+n,2),65535),this.ArrayType=r,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const s=bl.indexOf(this.ArrayType),i=t*2*this.ArrayType.BYTES_PER_ELEMENT,a=t*this.IndexArrayType.BYTES_PER_ELEMENT,l=(8-a%8)%8;if(s<0)throw new Error(`Unexpected typed array class: ${r}.`);o&&o instanceof ArrayBuffer?(this.data=o,this.ids=new this.IndexArrayType(this.data,Qt,t),this.coords=new this.ArrayType(this.data,Qt+a+l,t*2),this._pos=t*2,this._finished=!0):(this.data=new ArrayBuffer(Qt+i+a+l),this.ids=new this.IndexArrayType(this.data,Qt,t),this.coords=new this.ArrayType(this.data,Qt+a+l,t*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(ro<<4)+s]),new Uint16Array(this.data,2,1)[0]=n,new Uint32Array(this.data,4,1)[0]=t)}add(t,n){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=t,this.coords[this._pos++]=n,r}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return so(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,n,r,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:s,coords:i,nodeSize:a}=this,l=[0,s.length-1,0],c=[];for(;l.length;){const u=l.pop()||0,d=l.pop()||0,f=l.pop()||0;if(d-f<=a){for(let v=f;v<=d;v++){const b=i[2*v],C=i[2*v+1];b>=t&&b<=r&&C>=n&&C<=o&&c.push(s[v])}continue}const h=f+d>>1,p=i[2*h],m=i[2*h+1];p>=t&&p<=r&&m>=n&&m<=o&&c.push(s[h]),(u===0?t<=p:n<=m)&&(l.push(f),l.push(h-1),l.push(1-u)),(u===0?r>=p:o>=m)&&(l.push(h+1),l.push(d),l.push(1-u))}return c}within(t,n,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:s,nodeSize:i}=this,a=[0,o.length-1,0],l=[],c=r*r;for(;a.length;){const u=a.pop()||0,d=a.pop()||0,f=a.pop()||0;if(d-f<=i){for(let v=f;v<=d;v++)Sl(s[2*v],s[2*v+1],t,n)<=c&&l.push(o[v]);continue}const h=f+d>>1,p=s[2*h],m=s[2*h+1];Sl(p,m,t,n)<=c&&l.push(o[h]),(u===0?t-r<=p:n-r<=m)&&(a.push(f),a.push(h-1),a.push(1-u)),(u===0?t+r>=p:n+r>=m)&&(a.push(h+1),a.push(d),a.push(1-u))}return l}}function so(e,t,n,r,o,s){if(o-r<=n)return;const i=r+o>>1;Cl(e,t,i,r,o,s),so(e,t,n,r,i-1,1-s),so(e,t,n,i+1,o,1-s)}function Cl(e,t,n,r,o,s){for(;o>r;){if(o-r>600){const c=o-r+1,u=n-r+1,d=Math.log(c),f=.5*Math.exp(2*d/3),h=.5*Math.sqrt(d*f*(c-f)/c)*(u-c/2<0?-1:1),p=Math.max(r,Math.floor(n-u*f/c+h)),m=Math.min(o,Math.floor(n+(c-u)*f/c+h));Cl(e,t,n,p,m,s)}const i=t[2*n+s];let a=r,l=o;for(en(e,t,r,n),t[2*o+s]>i&&en(e,t,r,o);a<l;){for(en(e,t,a,l),a++,l--;t[2*a+s]<i;)a++;for(;t[2*l+s]>i;)l--}t[2*r+s]===i?en(e,t,r,l):(l++,en(e,t,l,o)),l<=n&&(r=l+1),n<=l&&(o=l-1)}}function en(e,t,n,r){io(e,n,r),io(t,2*n,2*r),io(t,2*n+1,2*r+1)}function io(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Sl(e,t,n,r){const o=e-n,s=t-r;return o*o+s*s}const Kg={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:e=>e},wl=Math.fround||(e=>t=>(e[0]=+t,e[0]))(new Float32Array(1)),st=2,Re=3,ao=4,Xe=5,xl=6;class Zg{constructor(t){this.options=Object.assign(Object.create(Kg),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(t){const{log:n,minZoom:r,maxZoom:o}=this.options;n&&console.time("total time");const s=`prepare ${t.length} points`;n&&console.time(s),this.points=t;const i=[];for(let l=0;l<t.length;l++){const c=t[l];if(!c.geometry)continue;const[u,d]=c.geometry.coordinates,f=wl(kn(u)),h=wl(Dn(d));i.push(f,h,1/0,l,-1,1),this.options.reduce&&i.push(0)}let a=this.trees[o+1]=this._createTree(i);n&&console.timeEnd(s);for(let l=o;l>=r;l--){const c=+Date.now();a=this.trees[l]=this._createTree(this._cluster(a,l)),n&&console.log("z%d: %d clusters in %dms",l,a.numItems,+Date.now()-c)}return n&&console.timeEnd("total time"),this}getClusters(t,n){let r=((t[0]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,t[1]));let s=t[2]===180?180:((t[2]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,s=180;else if(r>s){const d=this.getClusters([r,o,180,i],n),f=this.getClusters([-180,o,s,i],n);return d.concat(f)}const a=this.trees[this._limitZoom(n)],l=a.range(kn(r),Dn(i),kn(s),Dn(o)),c=a.data,u=[];for(const d of l){const f=this.stride*d;u.push(c[f+Xe]>1?_l(c,f,this.clusterProps):this.points[c[f+Re]])}return u}getChildren(t){const n=this._getOriginId(t),r=this._getOriginZoom(t),o="No cluster with the specified id.",s=this.trees[r];if(!s)throw new Error(o);const i=s.data;if(n*this.stride>=i.length)throw new Error(o);const a=this.options.radius/(this.options.extent*Math.pow(2,r-1)),l=i[n*this.stride],c=i[n*this.stride+1],u=s.within(l,c,a),d=[];for(const f of u){const h=f*this.stride;i[h+ao]===t&&d.push(i[h+Xe]>1?_l(i,h,this.clusterProps):this.points[i[h+Re]])}if(d.length===0)throw new Error(o);return d}getLeaves(t,n,r){n=n||10,r=r||0;const o=[];return this._appendLeaves(o,t,n,r,0),o}getTile(t,n,r){const o=this.trees[this._limitZoom(t)],s=Math.pow(2,t),{extent:i,radius:a}=this.options,l=a/i,c=(r-l)/s,u=(r+1+l)/s,d={features:[]};return this._addTileFeatures(o.range((n-l)/s,c,(n+1+l)/s,u),o.data,n,r,s,d),n===0&&this._addTileFeatures(o.range(1-l/s,c,1,u),o.data,s,r,s,d),n===s-1&&this._addTileFeatures(o.range(0,c,l/s,u),o.data,-1,r,s,d),d.features.length?d:null}getClusterExpansionZoom(t){let n=this._getOriginZoom(t)-1;for(;n<=this.options.maxZoom;){const r=this.getChildren(t);if(n++,r.length!==1)break;t=r[0].properties.cluster_id}return n}_appendLeaves(t,n,r,o,s){const i=this.getChildren(n);for(const a of i){const l=a.properties;if(l&&l.cluster?s+l.point_count<=o?s+=l.point_count:s=this._appendLeaves(t,l.cluster_id,r,o,s):s<o?s++:t.push(a),t.length===r)break}return s}_createTree(t){const n=new oo(t.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<t.length;r+=this.stride)n.add(t[r],t[r+1]);return n.finish(),n.data=t,n}_addTileFeatures(t,n,r,o,s,i){for(const a of t){const l=a*this.stride,c=n[l+Xe]>1;let u,d,f;if(c)u=El(n,l,this.clusterProps),d=n[l],f=n[l+1];else{const m=this.points[n[l+Re]];u=m.properties;const[v,b]=m.geometry.coordinates;d=kn(v),f=Dn(b)}const h={type:1,geometry:[[Math.round(this.options.extent*(d*s-r)),Math.round(this.options.extent*(f*s-o))]],tags:u};let p;c||this.options.generateId?p=n[l+Re]:p=this.points[n[l+Re]].id,p!==void 0&&(h.id=p),i.features.push(h)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,n){const{radius:r,extent:o,reduce:s,minPoints:i}=this.options,a=r/(o*Math.pow(2,n)),l=t.data,c=[],u=this.stride;for(let d=0;d<l.length;d+=u){if(l[d+st]<=n)continue;l[d+st]=n;const f=l[d],h=l[d+1],p=t.within(l[d],l[d+1],a),m=l[d+Xe];let v=m;for(const b of p){const C=b*u;l[C+st]>n&&(v+=l[C+Xe])}if(v>m&&v>=i){let b=f*m,C=h*m,S,_=-1;const w=((d/u|0)<<5)+(n+1)+this.points.length;for(const E of p){const x=E*u;if(l[x+st]<=n)continue;l[x+st]=n;const T=l[x+Xe];b+=l[x]*T,C+=l[x+1]*T,l[x+ao]=w,s&&(S||(S=this._map(l,d,!0),_=this.clusterProps.length,this.clusterProps.push(S)),s(S,this._map(l,x)))}l[d+ao]=w,c.push(b/v,C/v,1/0,w,-1,v),s&&c.push(_)}else{for(let b=0;b<u;b++)c.push(l[d+b]);if(v>1)for(const b of p){const C=b*u;if(!(l[C+st]<=n)){l[C+st]=n;for(let S=0;S<u;S++)c.push(l[C+S])}}}}return c}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,n,r){if(t[n+Xe]>1){const i=this.clusterProps[t[n+xl]];return r?Object.assign({},i):i}const o=this.points[t[n+Re]].properties,s=this.options.map(o);return r&&s===o?Object.assign({},s):s}}function _l(e,t,n){return{type:"Feature",id:e[t+Re],properties:El(e,t,n),geometry:{type:"Point",coordinates:[Yg(e[t]),Jg(e[t+1])]}}}function El(e,t,n){const r=e[t+Xe],o=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,s=e[t+xl],i=s===-1?{}:Object.assign({},n[s]);return Object.assign(i,{cluster:!0,cluster_id:e[t+Re],point_count:r,point_count_abbreviated:o})}function kn(e){return e/360+.5}function Dn(e){const t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function Yg(e){return(e-.5)*360}function Jg(e){const t=(180-e*360)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}function Qg(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}typeof SuppressedError=="function"&&SuppressedError;class re{static isAdvancedMarkerAvailable(t){return google.maps.marker&&t.getMapCapabilities().isAdvancedMarkersAvailable===!0}static isAdvancedMarker(t){return google.maps.marker&&t instanceof google.maps.marker.AdvancedMarkerElement}static setMap(t,n){this.isAdvancedMarker(t)?t.map=n:t.setMap(n)}static getPosition(t){if(this.isAdvancedMarker(t)){if(t.position){if(t.position instanceof google.maps.LatLng)return t.position;if(Number.isFinite(t.position.lat)&&Number.isFinite(t.position.lng))return new google.maps.LatLng(t.position.lat,t.position.lng)}return new google.maps.LatLng(null)}return t.getPosition()}static getVisible(t){return this.isAdvancedMarker(t)?!0:t.getVisible()}}class lo{constructor({markers:t,position:n}){this.markers=[],t&&(this.markers=t),n&&(n instanceof google.maps.LatLng?this._position=n:this._position=new google.maps.LatLng(n))}get bounds(){if(this.markers.length===0&&!this._position)return;const t=new google.maps.LatLngBounds(this._position,this._position);for(const n of this.markers)t.extend(re.getPosition(n));return t}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(t=>re.getVisible(t)).length}push(t){this.markers.push(t)}delete(){this.marker&&(re.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}function co(e,t="assertion failed"){if(e==null)throw Error(t)}class ey{constructor({maxZoom:t=16}){this.maxZoom=t}noop({markers:t}){return ty(t)}}const ty=e=>e.map(n=>new lo({position:re.getPosition(n),markers:[n]}));class ny extends ey{constructor(t){var{maxZoom:n,radius:r=60}=t,o=Qg(t,["maxZoom","radius"]);super({maxZoom:n}),this.markers=[],this.clusters=[],this.state={zoom:-1},this.superCluster=new Zg(Object.assign({maxZoom:this.maxZoom,radius:r},o))}calculate(t){let n=!1,r=t.map.getZoom();co(r),r=Math.round(r);const o={zoom:r};if(!vl(t.markers,this.markers)){n=!0,this.markers=[...t.markers];const s=this.markers.map(i=>{const a=re.getPosition(i);return{type:"Feature",geometry:{type:"Point",coordinates:[a.lng(),a.lat()]},properties:{marker:i}}});this.superCluster.load(s)}return n||(this.state.zoom<=this.maxZoom||o.zoom<=this.maxZoom)&&(n=!vl(this.state,o)),this.state=o,t.markers.length===0?(this.clusters=[],{clusters:this.clusters,changed:n}):(n&&(this.clusters=this.cluster(t)),{clusters:this.clusters,changed:n})}cluster({map:t}){const n=t.getZoom();return co(n),this.superCluster.getClusters([-180,-90,180,90],Math.round(n)).map(r=>this.transformCluster(r))}transformCluster({geometry:{coordinates:[t,n]},properties:r}){if(r.cluster)return new lo({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(s=>s.properties.marker),position:{lat:n,lng:t}});const o=r.marker;return new lo({markers:[o],position:re.getPosition(o)})}}class ry{constructor(t,n){this.markers={sum:t.length};const r=n.map(s=>s.count),o=r.reduce((s,i)=>s+i,0);this.clusters={count:n.length,markers:{mean:o/n.length,sum:o,min:Math.min(...r),max:Math.max(...r)}}}}class oy{render({count:t,position:n},r,o){const i=`<svg fill="${t>Math.max(10,r.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
|
|
285
|
+
`,En=16,ym=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:o,containerStyle:s,containerClassName:i})=>{let{toasts:a,handlers:l}=Gp(n);return K.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:En,left:En,right:En,bottom:En,pointerEvents:"none",...s},className:i,onMouseEnter:l.startPause,onMouseLeave:l.endPause},a.map(c=>{let u=c.position||t,d=l.calculateOffset(c,{reverseOrder:e,gutter:r,defaultPosition:t}),f=mm(u,d);return K.createElement(pm,{id:c.id,key:c.id,onHeightUpdate:l.updateHeight,className:c.visible?gm:"",style:f},c.type==="custom"?wn(c.message,c):o?o(c):K.createElement(Za,{toast:c,position:u}))}))};const vm={root:"_root_movxa_4"};function Hr({className:e,children:t,show:n=!0,variant:r="light",...o}){const s=j("dyn-locator__overlay",vm.root,e);return n?y.jsx("div",{className:s,"data-variant":r,...o,children:t}):null}function Kt(e){const[t,n]=g.useState(!1),[r,o]=g.useState(null),{getEndpoint:s}=Mp(e);return{request:async(a={},l={})=>{n(!0),o(null);try{let c;try{c=s(a)}catch{throw new Error(`Endpoint "${e}" is not configured. The host application must provide all required endpoints.`)}const{url:u,method:d}=c,f=await fetch(u,{method:d,headers:{"Content-Type":"application/json",...l.headers},...d!=="GET"&&l.body?{body:JSON.stringify(l.body)}:{}});if(!f.ok)throw new Error(`HTTP error! status: ${f.status}`);return{data:await f.json()}}catch(c){const u=c instanceof Error?c:new Error(String(c));throw o(u),console.error(`Error in API request to "${e}":`,u),u}finally{n(!1)}},loading:t,error:r}}const $e={content:"_content_jvati_17",header:"_header_jvati_29",locationInfo:"_locationInfo_jvati_30",title:"_title_jvati_42",closeButton:"_closeButton_jvati_49",body:"_body_jvati_56",shareButtons:"_shareButtons_jvati_77",shareButton:"_shareButton_jvati_77"},bm={root:"_root_1re47_4"};function Cm({children:e,className:t,position:n="top"}){return y.jsx("span",{className:j("dyn-locator__tooltip",bm.root,t),role:"tooltip","aria-hidden":"true","data-position":n,children:e})}function Sm({isOpen:e,onClose:t,portalContainer:n=document.body}){var d,f;const{labels:r}=M(h=>h.localizationConfig),o=M(h=>h.locations),s=M(h=>h.selectedLocation),i=M(h=>h.presentationPrefs),{addressFormat:a}=i??{},l=g.useMemo(()=>s?o.find(h=>h.id===s):void 0,[o,s]);function c(h){const{name:p,shareURL:m}=h;switch(p){case"facebook":return{style:{"--icon-button-bg":"#1877F2","--icon-button-hover-bg":"#0a4992"},href:m??"#",target:"_blank",rel:"noopener noreferrer"};case"x":case"twitter":return{style:{"--icon-button-bg":"#000","--icon-button-hover-bg":"#333"},href:m??"#",target:"_blank",rel:"noopener noreferrer"};case"whatsapp":return{style:{"--icon-button-bg":"#25D366","--icon-button-hover-bg":"#167d3c"},href:m??"#",target:"_blank",rel:"noopener noreferrer"};case"email":return{style:{"--icon-button-bg":"var(--dyn-locator__colors-grey-grey-300)","--icon-button-hover-bg":"var(--dyn-locator__colors-grey-grey-400)"},href:m??"#"};case"copy":return{style:{"--icon-button-bg":"var(--dyn-locator__colors-grey-grey-300)","--icon-button-hover-bg":"var(--dyn-locator__colors-grey-grey-400)"},href:"#",onClick:v=>{v.preventDefault(),navigator.clipboard.writeText(m).then(()=>{$.success(r["ShareSheet.copyLinkSuccessNotif"])}).catch(b=>{$.error(r["ShareSheet.copyLinkErrorNotif"]),console.error("Failed to copy link: ",b)})}};default:return{}}}if(!e)return null;const u=y.jsx(Hr,{show:e,variant:"dark",onClick:t,children:y.jsxs("div",{className:j("dyn-locator__share-sheet",$e.content),onClick:h=>h.stopPropagation(),role:"dialog","aria-modal":"true","aria-labelledby":"share-sheet-title",children:[y.jsxs("header",{className:$e.header,children:[y.jsx("h2",{id:"share-sheet-title",className:$e.title,children:r["ShareSheet.title"]}),y.jsx(Ve,{className:$e.closeButton,onClick:t,"aria-label":"Close",variant:"bare",children:y.jsx(ye,{icon:"Close"})})]}),y.jsxs("div",{className:$e.body,children:[l&&y.jsxs("div",{className:$e.locationInfo,children:[y.jsx("h3",{children:l.title}),y.jsx("p",{children:a?Sn({fallback:l.address,format:a,zip:l.zip,city:l.city,province:l.province,street:l.street,country:l.country}):l.address})]}),y.jsx("div",{className:$e.shareButtons,children:(f=(d=l==null?void 0:l.on_share)==null?void 0:d.map)==null?void 0:f.call(d,h=>{const{name:p,shareURL:m}=h,v=p.charAt(0).toUpperCase()+p.slice(1),b=p==="copy"?r["ShareSheet.copyLinkTooltip"]:p==="email"?r["ShareSheet.shareViaEmailTooltip"]:r["ShareSheet.genericShareTooltip"]+v;return y.jsxs(Ve,{as:"a",href:m,variant:"negative",className:$e.shareButton,...c(h),children:[y.jsx(ye,{icon:v,size:"M"}),y.jsx(Cm,{children:b})]})})})]})]})});return n?tn.createPortal(u,n):u}function xm({isFullscreen:e}){return y.jsx(ym,{...e?{}:{containerStyle:{position:"absolute"}},toastOptions:{position:e?"top-center":"bottom-right",duration:3e3,error:{duration:1/0}},children:t=>y.jsx(Za,{toast:t,children:({icon:n,message:r})=>y.jsxs(y.Fragment,{children:[n,r,t.type==="error"&&y.jsx(Ve,{variant:"bare",onClick:()=>$.dismiss(t.id),children:y.jsx(ye,{icon:"Close"})})]})})})}function wm({children:e,customComponents:t,customIcons:n,featureFlags:r,presentationPrefs:o,fetchLocations:s,localizationConfig:i,locations:a=[],mapId:l,trackingConfig:c,customMarkers:u=[],customInfoWindow:d=null,customZoomLevels:f=null,clusteringProvider:h=Qe.AIRC}){const p=M(k=>k.shouldRefetch),m=M(k=>k.setShouldRefetch),v=M(k=>k.isShareSheetOpen),b=M(k=>k.toggleShareSheet),C=M(k=>k.featureFlags),S=M(k=>k.setFeatureFlags),w=M(k=>k.setMapId),x=M(k=>k.setLocalizationConfig),_=M(k=>k.setMapDetail),A=M(k=>k.setLocations),T=M(k=>k.isFullscreen),O=M(k=>k.setCustomMarkers),P=M(k=>k.setCustomInfoWindow),V=M(k=>k.setCustomZoomLevels),q=M(k=>k.setClusteringProvider),se=M(k=>k.setPresentationPrefs),ie=g.useRef(null),{request:I,loading:J,error:L}=Kt(St.CLUSTERS),{request:D,loading:B,error:G}=Kt(St.MARKERS),{request:E,loading:Q,error:R}=Kt(St.ALL_MARKERS),H=J||B||Q,Xe=!!L||!!G||!!R;async function qe(k){try{if(typeof k!="number"||k<0||isNaN(k))throw new Error("No map ID provided");const be=[];try{const{data:Z}=await E({mapId:String(k)})??{};Z&&Array.isArray(Z)&&be.push(...Z)}catch(Z){console.warn("Error fetching markers",Z)}A(be),_(Me.CLUSTER)}catch(be){console.error("Error fetching all markers: ",be),$.error(Ie+Cn),A([])}}async function at(k){var be;try{if(typeof k!="number"||k<0||isNaN(k))throw new Error("No map ID provided");const{data:Z}=await I({mapId:String(k)})??{};if(!Z)throw new Error("No cluster data received from the server");A((be=Z.map)==null?void 0:be.call(Z,Al=>({...Al,onMarkerClick:async()=>{await lo(k,Al.id)}})))}catch(Z){console.error("Error fetching clusters: ",Z),$.error(Ie+Cn),A([])}}async function lo(k,be){try{if(typeof k!="number"||k<0||isNaN(k))throw new Error("No map ID provided");const{data:Z}=await D({mapId:k,clusterId:be})??{};if(!Z)throw new Error("No marker data received from the server");A(Z),_(Me.MARKER)}catch(Z){console.error("Error fetching markers: ",Z),$.error(Ie+Cn),A([])}}return g.useEffect(()=>{i&&x(i),r&&S(r),o&&se(o),u.length&&(r!=null&&r.withCustomMarkers)&&O(u),d&&(r!=null&&r.withCustomInfoWindow)&&P(d),f&&V(f),h&&q(h),c&&Ct.initialize(c),typeof l=="number"&&l>0&&!isNaN(l)&&w(l),a!=null&&a.length?A(a):s?s().then(k=>A(k)):(r?r.withClusters&&h===Qe.AIRC:C.withClusters&&h===Qe.AIRC)?at(l):qe(l)},[]),g.useEffect(()=>{let k=!0;return p&&l&&((r?r.withClusters&&h===Qe.AIRC:C.withClusters&&h===Qe.AIRC)?at:qe)(l).finally(()=>{k&&m(!1)}),()=>{k=!1}},[p,l,C.withClusters]),y.jsx("div",{id:"dyn-locator",className:j("dyn-locator__locator",go.root),"data-fullscreen":T,children:y.jsxs(_p,{customIcons:n,customComponents:t,children:[e,y.jsxs(Hr,{show:H||Xe,variant:"light",children:[H?y.jsx(wt,{size:"large"}):null,Xe?y.jsx(Ea,{title:$h,message:Cn,actionText:"ricaricare la pagina.",errorDetails:(L==null?void 0:L.message)||(G==null?void 0:G.message),onAction:k=>{k.preventDefault(),window.location.reload()}}):null]}),y.jsx(xm,{isFullscreen:T}),y.jsx("div",{ref:ie,className:Wh}),C.share?y.jsx(Sm,{isOpen:v,onClose:()=>b(!1),portalContainer:ie.current}):null]})})}function Ya({mapProvider:e,endpoints:t,apiUrl:n,children:r,...o}){return y.jsx(Jh,{children:y.jsx(Vl,{children:y.jsx(Ul,{mapProvider:e,children:y.jsx(Ap,{endpoints:t,apiUrl:n,children:y.jsx(wm,{...o,children:r})})})})})}Ya.displayName="Locator";var Zr,Ja;function _m(){return Ja||(Ja=1,Zr=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,s;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(s=Object.keys(t),r=s.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[o]))return!1;for(o=r;o--!==0;){var i=s[o];if(!e(t[i],n[i]))return!1}return!0}return t!==t&&n!==n}),Zr}var Em=_m();const Tm=po(Em);function ve(){return ve=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ve.apply(null,arguments)}function nt(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Am(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Mm(e){var t=Am(e,"string");return typeof t=="symbol"?t:t+""}const le={NOT_LOADED:"NOT_LOADED",LOADING:"LOADING",LOADED:"LOADED",FAILED:"FAILED",AUTH_FAILURE:"AUTH_FAILURE"},Pm="https://maps.googleapis.com/maps/api/js";class Ht{static async load(t,n){var r;const o=t.libraries?t.libraries.split(","):[],s=this.serializeParams(t);this.listeners.push(n),(r=window.google)!=null&&(r=r.maps)!=null&&r.importLibrary?(this.serializedApiParams||(this.loadingStatus=le.LOADED),this.notifyLoadingStatusListeners()):(this.serializedApiParams=s,this.initImportLibrary(t)),this.serializedApiParams&&this.serializedApiParams!==s&&console.warn("[google-maps-api-loader] The maps API has already been loaded with different parameters and will not be loaded again. Refresh the page for new values to have effect.");const i=["maps",...o];await Promise.all(i.map(a=>google.maps.importLibrary(a)))}static serializeParams(t){return[t.v,t.key,t.language,t.region,t.authReferrerPolicy,t.solutionChannel].join("/")}static initImportLibrary(t){if(window.google||(window.google={}),window.google.maps||(window.google.maps={}),window.google.maps.importLibrary){console.error("[google-maps-api-loader-internal]: initImportLibrary must only be called once");return}let n=null;const r=()=>n||(n=new Promise((o,s)=>{var i;const a=document.createElement("script"),l=new URLSearchParams;for(const[c,u]of Object.entries(t)){const d=c.replace(/[A-Z]/g,f=>"_"+f[0].toLowerCase());l.set(d,String(u))}l.set("loading","async"),l.set("callback","__googleMapsCallback__"),a.async=!0,a.src=Pm+"?"+l.toString(),a.nonce=((i=document.querySelector("script[nonce]"))==null?void 0:i.nonce)||"",a.onerror=()=>{this.loadingStatus=le.FAILED,this.notifyLoadingStatusListeners(),s(new Error("The Google Maps JavaScript API could not load."))},window.__googleMapsCallback__=()=>{this.loadingStatus=le.LOADED,this.notifyLoadingStatusListeners(),o()},window.gm_authFailure=()=>{this.loadingStatus=le.AUTH_FAILURE,this.notifyLoadingStatusListeners()},this.loadingStatus=le.LOADING,this.notifyLoadingStatusListeners(),document.head.append(a)}),n);google.maps.importLibrary=o=>r().then(()=>google.maps.importLibrary(o))}static notifyLoadingStatusListeners(){for(const t of this.listeners)t(this.loadingStatus)}}Ht.loadingStatus=le.NOT_LOADED,Ht.serializedApiParams=void 0,Ht.listeners=[];const Lm=["onLoad","onError","apiKey","version","libraries"],Om=["children"],km="GMP_visgl_rgmlibrary_v1_default",Zt=g.createContext(null);function Nm(){const[e,t]=g.useState({});return{mapInstances:e,addMapInstance:(s,i="default")=>{t(a=>ve({},a,{[i]:s}))},removeMapInstance:(s="default")=>{t(i=>nt(i,[s].map(Mm)))},clearMapInstances:()=>{t({})}}}function Dm(e){const{onLoad:t,onError:n,apiKey:r,version:o,libraries:s=[]}=e,i=nt(e,Lm),[a,l]=g.useState(Ht.loadingStatus),[c,u]=g.useReducer((p,m)=>p[m.name]?p:ve({},p,{[m.name]:m.value}),{}),d=g.useMemo(()=>s==null?void 0:s.join(","),[s]),f=g.useMemo(()=>JSON.stringify(ve({apiKey:r,version:o},i)),[r,o,i]),h=g.useCallback(async p=>{var m;if(c[p])return c[p];if(!((m=google)!=null&&(m=m.maps)!=null&&m.importLibrary))throw new Error("[api-provider-internal] importLibrary was called before google.maps.importLibrary was defined.");const v=await window.google.maps.importLibrary(p);return u({name:p,value:v}),v},[c]);return g.useEffect(()=>{(async()=>{try{const p=ve({key:r},i);o&&(p.v=o),(d==null?void 0:d.length)>0&&(p.libraries=d),(p.channel===void 0||p.channel<0||p.channel>999)&&delete p.channel,p.solutionChannel===void 0?p.solutionChannel=km:p.solutionChannel===""&&delete p.solutionChannel,await Ht.load(p,m=>l(m));for(const m of["core","maps",...s])await h(m);t&&t()}catch(p){n?n(p):console.error("<ApiProvider> failed to load the Google Maps JavaScript API",p)}})()},[r,d,f]),{status:a,loadedLibraries:c,importLibrary:h}}const Im=e=>{const{children:t}=e,n=nt(e,Om),{mapInstances:r,addMapInstance:o,removeMapInstance:s,clearMapInstances:i}=Nm(),{status:a,loadedLibraries:l,importLibrary:c}=Dm(n),u=g.useMemo(()=>({mapInstances:r,addMapInstance:o,removeMapInstance:s,clearMapInstances:i,status:a,loadedLibraries:l,importLibrary:c}),[r,o,s,i,a,l,c]);return g.createElement(Zt.Provider,{value:u},t)};function Vm(e,t){for(const n of jm){const r=t[n],o=Qa[n];g.useEffect(()=>{if(!e||!r)return;const s=google.maps.event.addListener(e,o,i=>{r(Bm(o,e,i))});return()=>s.remove()},[e,o,r])}}function Bm(e,t,n){const r={type:e,map:t,detail:{},stoppable:!1,stop:()=>{}};if(Fm.includes(e)){const s=r,i=t.getCenter(),a=t.getZoom(),l=t.getHeading()||0,c=t.getTilt()||0,u=t.getBounds();return(!i||!u||!Number.isFinite(a))&&console.warn("[createEvent] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),s.detail={center:(i==null?void 0:i.toJSON())||{lat:0,lng:0},zoom:a||0,heading:l,tilt:c,bounds:(u==null?void 0:u.toJSON())||{north:90,east:180,south:-90,west:-180}},s}else if($m.includes(e)){var o;if(!n)throw new Error("[createEvent] mouse events must provide a srcEvent");const s=r;return s.domEvent=n.domEvent,s.stoppable=!0,s.stop=()=>n.stop(),s.detail={latLng:((o=n.latLng)==null?void 0:o.toJSON())||null,placeId:n.placeId},s}return r}const Qa={onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onContextmenu:"contextmenu",onDblclick:"dblclick",onDrag:"drag",onDragend:"dragend",onDragstart:"dragstart",onHeadingChanged:"heading_changed",onIdle:"idle",onIsFractionalZoomEnabledChanged:"isfractionalzoomenabled_changed",onMapCapabilitiesChanged:"mapcapabilities_changed",onMapTypeIdChanged:"maptypeid_changed",onMousemove:"mousemove",onMouseout:"mouseout",onMouseover:"mouseover",onProjectionChanged:"projection_changed",onRenderingTypeChanged:"renderingtype_changed",onTilesLoaded:"tilesloaded",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed",onCameraChanged:"bounds_changed"},Fm=["bounds_changed","center_changed","heading_changed","tilt_changed","zoom_changed"],$m=["click","contextmenu","dblclick","mousemove","mouseout","mouseover"],jm=Object.keys(Qa);function Yr(e,t){const n=g.useRef(void 0);(!n.current||!Tm(t,n.current))&&(n.current=t),g.useEffect(e,n.current)}const zm=new Set(["backgroundColor","clickableIcons","controlSize","disableDefaultUI","disableDoubleClickZoom","draggable","draggableCursor","draggingCursor","fullscreenControl","fullscreenControlOptions","gestureHandling","headingInteractionEnabled","isFractionalZoomEnabled","keyboardShortcuts","mapTypeControl","mapTypeControlOptions","mapTypeId","maxZoom","minZoom","noClear","panControl","panControlOptions","restriction","rotateControl","rotateControlOptions","scaleControl","scaleControlOptions","scrollwheel","streetView","streetViewControl","streetViewControlOptions","styles","tiltInteractionEnabled","zoomControl","zoomControlOptions"]);function Um(e,t){const n={},r=Object.keys(t);for(const o of r)zm.has(o)&&(n[o]=t[o]);Yr(()=>{e&&e.setOptions(n)},[n])}function Jr(){var e;return((e=g.useContext(Zt))==null?void 0:e.status)||le.NOT_LOADED}function Rm(e,t){const{viewport:n,viewState:r}=t,o=!!n;return g.useLayoutEffect(()=>{if(!e||!r)return;const{latitude:s,longitude:i,bearing:a,pitch:l,zoom:c}=r;e.moveCamera({center:{lat:s,lng:i},heading:a,tilt:l,zoom:c+1})},[e,r]),o}function Xm(e){return!e||typeof e!="object"||!("lat"in e&&"lng"in e)?!1:Number.isFinite(e.lat)&&Number.isFinite(e.lng)}function el(e){return Xm(e)?e:e.toJSON()}function qm(e,t,n){const r=n.center?el(n.center):null;let o=null,s=null;r&&Number.isFinite(r.lat)&&Number.isFinite(r.lng)&&(o=r.lat,s=r.lng);const i=Number.isFinite(n.zoom)?n.zoom:null,a=Number.isFinite(n.heading)?n.heading:null,l=Number.isFinite(n.tilt)?n.tilt:null;g.useLayoutEffect(()=>{if(!e)return;const c={};let u=!1;o!==null&&s!==null&&(t.current.center.lat!==o||t.current.center.lng!==s)&&(c.center={lat:o,lng:s},u=!0),i!==null&&t.current.zoom!==i&&(c.zoom=i,u=!0),a!==null&&t.current.heading!==a&&(c.heading=a,u=!0),l!==null&&t.current.tilt!==l&&(c.tilt=l,u=!0),u&&e.moveCamera(c)})}const Gm=()=>{const e={position:"absolute",top:0,left:0,bottom:0,right:0,zIndex:999,display:"flex",flexFlow:"column nowrap",textAlign:"center",justifyContent:"center",fontSize:".8rem",color:"rgba(0,0,0,0.6)",background:"#dddddd",padding:"1rem 1.5rem"};return g.createElement("div",{style:e},g.createElement("h2",null,"Error: AuthFailure"),g.createElement("p",null,"A problem with your API key prevents the map from rendering correctly. Please make sure the value of the ",g.createElement("code",null,"APIProvider.apiKey")," prop is correct. Check the error-message in the console for further details."))};function Wm(){const[e,t]=g.useState(null),n=g.useCallback(r=>t(r),[t]);return[e,n]}function tl(){return Jr()===le.LOADED}function Km(){const[,e]=g.useReducer(t=>t+1,0);return e}function Hm(e,t){const n=e.getCenter(),r=e.getZoom(),o=e.getHeading()||0,s=e.getTilt()||0,i=e.getBounds();(!n||!i||!Number.isFinite(r))&&console.warn("[useTrackedCameraState] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),Object.assign(t.current,{center:(n==null?void 0:n.toJSON())||{lat:0,lng:0},zoom:r||0,heading:o,tilt:s})}function Zm(e){const t=Km(),n=g.useRef({center:{lat:0,lng:0},heading:0,tilt:0,zoom:0});return g.useEffect(()=>{if(!e)return;const r=google.maps.event.addListener(e,"bounds_changed",()=>{Hm(e,n),t()});return()=>r.remove()},[e,t]),n}const Ym=["id","defaultBounds","defaultCenter","defaultZoom","defaultHeading","defaultTilt","reuseMaps","renderingType","colorScheme"],Jm=["padding"];class Tn{static has(t){return this.entries[t]&&this.entries[t].length>0}static pop(t){return this.entries[t]&&this.entries[t].pop()||null}static push(t,n){this.entries[t]||(this.entries[t]=[]),this.entries[t].push(n)}}Tn.entries={};function Qm(e,t){const n=tl(),[r,o]=g.useState(null),[s,i]=Wm(),a=Zm(r),{id:l,defaultBounds:c,defaultCenter:u,defaultZoom:d,defaultHeading:f,defaultTilt:h,reuseMaps:p,renderingType:m,colorScheme:v}=e,b=nt(e,Ym),C=e.zoom!==void 0||e.defaultZoom!==void 0,S=e.center!==void 0||e.defaultCenter!==void 0;!c&&(!C||!S)&&console.warn("<Map> component is missing configuration. You have to provide zoom and center (via the `zoom`/`defaultZoom` and `center`/`defaultCenter` props) or specify the region to show using `defaultBounds`. See https://visgl.github.io/react-google-maps/docs/api-reference/components/map#required"),!b.center&&u&&(b.center=u),!b.zoom&&Number.isFinite(d)&&(b.zoom=d),!b.heading&&Number.isFinite(f)&&(b.heading=f),!b.tilt&&Number.isFinite(h)&&(b.tilt=h);for(const x of Object.keys(b))b[x]===void 0&&delete b[x];const w=g.useRef(void 0);return g.useEffect(()=>{if(!s||!n)return;const{addMapInstance:x,removeMapInstance:_}=t,{mapId:A}=e,T=`${A||"default"}:${m||"default"}:${v||"LIGHT"}`;let O,P;if(p&&Tn.has(T)?(P=Tn.pop(T),O=P.getDiv(),s.appendChild(O),P.setOptions(b),setTimeout(()=>P.setCenter(P.getCenter()),0)):(O=document.createElement("div"),O.style.height="100%",s.appendChild(O),P=new google.maps.Map(O,ve({},b,m?{renderingType:m}:{},v?{colorScheme:v}:{}))),o(P),x(P,l),c){const{padding:V}=c,q=nt(c,Jm);P.fitBounds(q,V)}else(!C||!S)&&P.fitBounds({east:180,west:-180,south:-90,north:90});if(w.current){const{mapId:V,cameraState:q}=w.current;V!==A&&P.setOptions(q)}return()=>{w.current={mapId:A,cameraState:a.current},O.remove(),p?Tn.push(T,P):google.maps.event.clearInstanceListeners(P),o(null),_(l)}},[s,n,l,e.mapId,e.renderingType,e.colorScheme]),[r,i,a]}const nl=g.createContext(null),rl=e=>{const{children:t,id:n,className:r,style:o}=e,s=g.useContext(Zt),i=Jr();if(!s)throw new Error("<Map> can only be used inside an <ApiProvider> component.");const[a,l,c]=Qm(e,s);qm(a,c,e),Vm(a,e),Um(a,e);const u=Rm(a,e),d=!!e.controlled;g.useEffect(()=>{if(a)return u&&a.setOptions({disableDefaultUI:!0}),(u||d)&&a.setOptions({gestureHandling:"none",keyboardShortcuts:!1}),()=>{a.setOptions({gestureHandling:e.gestureHandling,keyboardShortcuts:e.keyboardShortcuts})}},[a,u,d,e.gestureHandling,e.keyboardShortcuts]);const f=e.center?el(e.center):null;let h=null,p=null;f&&Number.isFinite(f.lat)&&Number.isFinite(f.lng)&&(h=f.lat,p=f.lng);const m=g.useMemo(()=>{var C,S,w,x,_;return{center:{lat:(C=h)!=null?C:0,lng:(S=p)!=null?S:0},zoom:(w=e.zoom)!=null?w:0,heading:(x=e.heading)!=null?x:0,tilt:(_=e.tilt)!=null?_:0}},[h,p,e.zoom,e.heading,e.tilt]);g.useLayoutEffect(()=>{if(!a||!d)return;a.moveCamera(m);const C=a.addListener("bounds_changed",()=>{a.moveCamera(m)});return()=>C.remove()},[a,d,m]);const v=g.useMemo(()=>ve({width:"100%",height:"100%",position:"relative",zIndex:u?-1:0},o),[o,u]),b=g.useMemo(()=>({map:a}),[a]);return i===le.AUTH_FAILURE?g.createElement("div",{style:ve({position:"relative"},r?{}:v),className:r},g.createElement(Gm,null)):g.createElement("div",ve({ref:l,"data-testid":"map",style:r?void 0:v,className:r},n?{id:n}:{}),a?g.createElement(nl.Provider,{value:b},t):null)};rl.deckGLViewProps=!0;const ol=new Set;function eg(...e){const t=JSON.stringify(e);ol.has(t)||(ol.add(t),console.error(...e))}const Yt=(e=null)=>{const t=g.useContext(Zt),{map:n}=g.useContext(nl)||{};if(t===null)return eg("useMap(): failed to retrieve APIProviderContext. Make sure that the <APIProvider> component exists and that the component you are calling `useMap()` from is a sibling of the <APIProvider>."),null;const{mapInstances:r}=t;return e!==null?r[e]||null:n||r.default||null};function An(e){const t=tl(),n=g.useContext(Zt);return g.useEffect(()=>{!t||!n||n.importLibrary(e)},[t,n,e]),(n==null?void 0:n.loadedLibraries[e])||null}function xt(e,t,n){g.useEffect(()=>{if(!e||!t||!n)return;const r=google.maps.event.addListener(e,t,n);return()=>r.remove()},[e,t,n])}function Mn(e,t,n){g.useEffect(()=>{e&&(e[t]=n)},[e,t,n])}function sl(e,t,n){g.useEffect(()=>{if(!(!e||!t||!n))return e.addEventListener(t,n),()=>e.removeEventListener(t,n)},[e,t,n])}function tg(e){return e.content!==void 0}function ng(e){return e.nodeType===Node.ELEMENT_NODE}const rg=g.createContext(null),og={BOTTOM:["50%","100%"]},sg=({children:e,styles:t,className:n,anchorPoint:r})=>{const[o,s]=r??og.BOTTOM;let i=`-${o}`,a=`-${s}`;o.trimStart().startsWith("-")&&(i=o.substring(1)),s.trimStart().startsWith("-")&&(a=s.substring(1));const l=`translate(50%, 100%) translate(${i}, ${a})`;return g.createElement("div",{style:{transform:l}},g.createElement("div",{className:n,style:t},e))};function ig(e){const[t,n]=g.useState(null),[r,o]=g.useState(null),s=Yt(),i=An("marker"),{children:a,onClick:l,className:c,onMouseEnter:u,onMouseLeave:d,onDrag:f,onDragStart:h,onDragEnd:p,collisionBehavior:m,clickable:v,draggable:b,position:C,title:S,zIndex:w}=e,x=g.Children.count(a);return g.useEffect(()=>{if(!s||!i)return;const _=new i.AdvancedMarkerElement;_.map=s,n(_);let A=null;return x>0&&(A=document.createElement("div"),A.isCustomMarker=!0,_.content=A,o(A)),()=>{var T;_.map=null,(T=A)==null||T.remove(),n(null),o(null)}},[s,i,x]),g.useEffect(()=>{!t||!t.content||x>0||(t.content.className=c||"")},[t,c,x]),Mn(t,"position",C),Mn(t,"title",S??""),Mn(t,"zIndex",w),Mn(t,"collisionBehavior",m),g.useEffect(()=>{t&&(b!==void 0?t.gmpDraggable=b:f||h||p?t.gmpDraggable=!0:t.gmpDraggable=!1)},[t,b,f,p,h]),g.useEffect(()=>{if(!t)return;const _=v!==void 0||!!l||!!u||!!d;t.gmpClickable=_,_&&t!=null&&t.content&&ng(t.content)&&(t.content.style.pointerEvents="none",t.content.firstElementChild&&(t.content.firstElementChild.style.pointerEvents="all"))},[t,v,l,u,d]),xt(t,"click",l),xt(t,"drag",f),xt(t,"dragstart",h),xt(t,"dragend",p),sl(t==null?void 0:t.element,"mouseenter",u),sl(t==null?void 0:t.element,"mouseleave",d),[t,r]}const ag=g.forwardRef((e,t)=>{const{children:n,style:r,className:o,anchorPoint:s}=e,[i,a]=ig(e),l=g.useMemo(()=>i?{marker:i}:null,[i]);return g.useImperativeHandle(t,()=>i,[i]),a?g.createElement(rg.Provider,{value:l},tn.createPortal(g.createElement(sg,{anchorPoint:s,styles:r,className:o},n),a)):null});function lg(){const[e,t]=g.useState(null);return[g.useCallback(r=>{t(r)},[]),e]}function cg(e,t,n){if(t!=null&&typeof t!="object")throw new Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");const r=e.style;if(n==null){if(t==null)return;for(const o in t)t.hasOwnProperty(o)&&il(r,o,t[o]);return}for(const o in n)n.hasOwnProperty(o)&&(t==null||!t.hasOwnProperty(o))&&(o.indexOf("--")===0?r.setProperty(o,""):o==="float"?r.cssFloat="":r[o]="");if(t!=null)for(const o in t){const s=t[o];t.hasOwnProperty(o)&&n[o]!==s&&il(r,o,s)}}function il(e,t,n){const r=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,n):typeof n=="number"&&n!==0&&!dg(t)?e[t]=n+"px":t==="float"?e.cssFloat=n:e[t]=(""+n).trim()}const ug=new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridArea","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","fontWeight","lineClamp","lineHeight","opacity","order","orphans","scale","tabSize","widows","zIndex","zoom","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth"]);function dg(e){return ug.has(e)}const fg=["children","headerContent","style","className","pixelOffset","anchor","shouldFocus","onClose","onCloseClick"],hg=e=>{const{children:t,headerContent:n,style:r,className:o,pixelOffset:s,anchor:i,shouldFocus:a,onClose:l,onCloseClick:c}=e,u=nt(e,fg),d=An("maps"),[f,h]=g.useState(null),p=g.useRef(null),m=g.useRef(null);g.useEffect(()=>{if(!d)return;p.current=document.createElement("div"),m.current=document.createElement("div");const C=u;s&&(C.pixelOffset=new google.maps.Size(s[0],s[1])),n&&(C.headerContent=typeof n=="string"?n:m.current);const S=new google.maps.InfoWindow(u);return S.setContent(p.current),h(S),()=>{var w,x;S.setContent(null),(w=p.current)==null||w.remove(),(x=m.current)==null||x.remove(),p.current=null,m.current=null,h(null)}},[d]);const v=g.useRef(null);g.useEffect(()=>{!f||!p.current||(cg(p.current,r||null,v.current),v.current=r||null,o!==p.current.className&&(p.current.className=o||""))},[f,o,r]),Yr(()=>{if(!f)return;const C=u;s?C.pixelOffset=new google.maps.Size(s[0],s[1]):C.pixelOffset=null,n?C.headerContent=typeof n=="string"?n:m.current:C.headerContent=null,f.setOptions(u)},[u,s,n]),xt(f,"close",l),xt(f,"closeclick",c);const b=Yt();return Yr(()=>{if(!b||!f||i===null)return;const C=!!i,S={map:b};if(i&&(S.anchor=i,tg(i)&&i.content instanceof Element)){const x=i.content,_=x==null?void 0:x.getBoundingClientRect();if(_&&x!=null&&x.isCustomMarker){var w;const A=(w=i.content.firstElementChild)==null?void 0:w.firstElementChild,T=A==null?void 0:A.getBoundingClientRect(),O=T.x-_.x+(T.width-_.width)/2,P=T.y-_.y,V=u;V.pixelOffset=new google.maps.Size(s?s[0]+O:O,s?s[1]+P:P),f.setOptions(V)}}return a!==void 0&&(S.shouldFocus=a),f.open(S),()=>{C&&f.set("anchor",null),f.close()}},[f,i,b,a,u,s]),g.createElement(g.Fragment,null,p.current&&tn.createPortal(t,p.current),m.current!==null&&tn.createPortal(n,m.current))},pg=["onClick","onDrag","onDragStart","onDragEnd","onMouseOver","onMouseOut"];function mg(e){const[t,n]=g.useState(null),r=Yt(),{onClick:o,onDrag:s,onDragStart:i,onDragEnd:a,onMouseOver:l,onMouseOut:c}=e,u=nt(e,pg),{position:d,draggable:f}=u;return g.useEffect(()=>{if(!r){r===void 0&&console.error("<Marker> has to be inside a Map component.");return}const h=new google.maps.Marker(u);return h.setMap(r),n(h),()=>{h.setMap(null),n(null)}},[r]),g.useEffect(()=>{if(!t)return;const h=t,p=google.maps.event;return o&&p.addListener(h,"click",o),s&&p.addListener(h,"drag",s),i&&p.addListener(h,"dragstart",i),a&&p.addListener(h,"dragend",a),l&&p.addListener(h,"mouseover",l),c&&p.addListener(h,"mouseout",c),t.setDraggable(!!f),()=>{p.clearInstanceListeners(h)}},[t,f,o,s,i,a,l,c]),g.useEffect(()=>{t&&u&&t.setOptions(u)},[t,u]),g.useEffect(()=>{f||!d||!t||t.setPosition(d)},[f,d,t]),t}const Qr=g.forwardRef((e,t)=>{const n=mg(e);return g.useImperativeHandle(t,()=>n,[n]),g.createElement(g.Fragment,null)});function gg(){const[e,t]=g.useState(null);return[g.useCallback(r=>{t(r)},[]),e]}const je={root:"_root_faay1_10",header:"_header_faay1_18",body:"_body_faay1_31",highlighted:"_highlighted_faay1_43",toggleButton:"_toggleButton_faay1_46",toggleButtonIcon:"_toggleButtonIcon_faay1_46"};function yg({onLocationSelect:e}){var p;const t=Ba("locationCard"),n=M(m=>m.locations),{labels:r}=M(m=>m.localizationConfig),o=M(m=>m.isLocationListExpanded),s=M(m=>m.setIsLocationListExpanded),i=M(m=>m.selectedLocation),a=M(m=>m.setSelectedLocation),l=g.useRef({}),c=r["LocationList.header"],u=r["LocationList.locationDesignator"],d=(p=c==null?void 0:c.split)==null?void 0:p.call(c,/(\{:\d\})/g),f=g.useMemo(()=>(d??[]).map((m,v)=>m==="{:1}"?y.jsx("span",{className:je.highlighted,children:(n==null?void 0:n.length)??0},v):m==="{:2}"?y.jsx("span",{className:je.highlighted,children:u},v):m),[u,n.length,d]);function h(m){return()=>{e==null||e(m.coords),a==null||a(m.id)}}return g.useEffect(()=>{if(i&&o){const m=l.current[i];m!=null&&m.current&&requestAnimationFrame(()=>{const v=window.scrollY;m.current.scrollIntoView({behavior:"smooth",block:"start"}),window.scrollTo({top:v,behavior:"auto"})})}},[i,o]),y.jsxs("div",{className:j("dyn-locator__location-list",je.root),"data-expanded":o,children:[y.jsxs("header",{className:je.header,onClick:()=>s(!o),role:"button","aria-expanded":o,children:[y.jsx("span",{children:f}),y.jsx(Ve,{className:je.toggleButton,variant:"bare",children:y.jsx(ye,{className:je.toggleButtonIcon,animate:!1,icon:"ChevronUp"})})]}),y.jsx("div",{className:je.body,children:n!=null&&n.length?n.map(m=>{const v=m.id;l.current[v]||(l.current[v]=g.createRef());const b=l.current[v];return y.jsx(t,{ref:b,"data-active":i===m.id,onClick:h(m),...m},m.id)}):y.jsx("div",{className:je.noResults,children:r["LocationList.noResults"]})})]})}const Te={root:"_root_b3glo_21",loaderContainer:"_loaderContainer_b3glo_29",fullscreenButton:"_fullscreenButton_b3glo_36",backButton:"_backButton_b3glo_37",areaSearchButton:"_areaSearchButton_b3glo_52",visualCue:"_visualCue_b3glo_77",closeButton:"_closeButton_b3glo_102",searchButton:"_searchButton_b3glo_120"},Pn={root:"_root_e0ns1_4",header:"_header_e0ns1_7",cta:"_cta_e0ns1_24"};function al({id:e,title:t,address:n,zip:r,province:o,street:s,city:i,country:a,coords:l,actions:c,onClick:u,onRightButtonClick:d,markerType:f,...h}){var ie;const{labels:p}=M(I=>I.localizationConfig),m=M(I=>I.selectedLocation),v=M(I=>I.featureFlags),b=M(I=>I.customMarkers),C=M(I=>I.customInfoWindow),S=M(I=>I.setSelectedLocation),w=M(I=>I.presentationPrefs),{addressFormat:x}=w??{},[_,A]=gg(),[T,O]=lg(),P=v.withCustomMarkers&&f&&f!=="default"?f:null,V=g.useCallback(()=>{S==null||S("")},[S]),q=I=>{const J=b.find(D=>D.markerType===I),L=J==null?void 0:J.component;return L?y.jsx(L,{}):null},se=I=>{const J=C==null?void 0:C.component;return J?y.jsx(J,{...I}):null};return y.jsxs(y.Fragment,{children:[P?y.jsx(ag,{onClick:()=>{u==null||u()},position:l,ref:T,children:q(P)}):y.jsx(Qr,{ref:_,position:l,onClick:()=>{u==null||u()}}),m===e?y.jsx(hg,{anchor:P?O:A,headerContent:t,onCloseClick:V,className:Pn.root,children:v.withCustomInfoWindow&&(C!=null&&C.component)&&typeof C.component=="function"?se({...h,title:t,actions:c,address:x?Sn({fallback:n,format:x,zip:r,city:i,province:o,street:s,country:a}):n}):y.jsxs(y.Fragment,{children:[y.jsxs("header",{className:Pn.header,children:[y.jsx("h6",{children:t}),y.jsx("address",{children:x?Sn({fallback:n,format:x,zip:r,city:i,province:o,street:s,country:a}):n})]}),y.jsx("div",{className:Pn.body,children:y.jsxs("div",{className:Pn.cta,children:[y.jsx(qt,{animate:!1,variant:"secondary",size:"small",...ba((ie=c==null?void 0:c.find)==null?void 0:ie.call(c,I=>I.type==="navigate"),()=>{Ct.track(fe.INFO_WINDOW_PRIMARY_ACTION,{cta_event_type:"cta_primary",cta_label:p["InfoWindow.CTA_1"]})}),children:p["InfoWindow.CTA_1"]}),y.jsx(qt,{animate:!1,variant:"secondary",size:"small",onClick:()=>{Ct.track(fe.INFO_WINDOW_SECONDARY_ACTION,{cta_event_type:"cta_secondary",cta_label:p["InfoWindow.CTA_2"]}),d==null||d()},children:p["InfoWindow.CTA_2"]})]})})]})}):null]})}var vg=Object.getOwnPropertyNames,bg=Object.getOwnPropertySymbols,Cg=Object.prototype.hasOwnProperty;function ll(e,t){return function(r,o,s){return e(r,o,s)&&t(r,o,s)}}function Ln(e){return function(n,r,o){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,o);var s=o.cache,i=s.get(n),a=s.get(r);if(i&&a)return i===r&&a===n;s.set(n,r),s.set(r,n);var l=e(n,r,o);return s.delete(n),s.delete(r),l}}function cl(e){return vg(e).concat(bg(e))}var Sg=Object.hasOwn||function(e,t){return Cg.call(e,t)};function rt(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var xg="__v",wg="__o",_g="_owner",ul=Object.getOwnPropertyDescriptor,dl=Object.keys;function Eg(e,t,n){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function Tg(e,t){return rt(e.getTime(),t.getTime())}function Ag(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function Mg(e,t){return e===t}function fl(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var o=new Array(r),s=e.entries(),i,a,l=0;(i=s.next())&&!i.done;){for(var c=t.entries(),u=!1,d=0;(a=c.next())&&!a.done;){if(o[d]){d++;continue}var f=i.value,h=a.value;if(n.equals(f[0],h[0],l,d,e,t,n)&&n.equals(f[1],h[1],f[0],h[0],e,t,n)){u=o[d]=!0;break}d++}if(!u)return!1;l++}return!0}var Pg=rt;function Lg(e,t,n){var r=dl(e),o=r.length;if(dl(t).length!==o)return!1;for(;o-- >0;)if(!pl(e,t,n,r[o]))return!1;return!0}function Jt(e,t,n){var r=cl(e),o=r.length;if(cl(t).length!==o)return!1;for(var s,i,a;o-- >0;)if(s=r[o],!pl(e,t,n,s)||(i=ul(e,s),a=ul(t,s),(i||a)&&(!i||!a||i.configurable!==a.configurable||i.enumerable!==a.enumerable||i.writable!==a.writable)))return!1;return!0}function Og(e,t){return rt(e.valueOf(),t.valueOf())}function kg(e,t){return e.source===t.source&&e.flags===t.flags}function hl(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var o=new Array(r),s=e.values(),i,a;(i=s.next())&&!i.done;){for(var l=t.values(),c=!1,u=0;(a=l.next())&&!a.done;){if(!o[u]&&n.equals(i.value,a.value,i.value,a.value,e,t,n)){c=o[u]=!0;break}u++}if(!c)return!1}return!0}function Ng(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function Dg(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function pl(e,t,n,r){return(r===_g||r===wg||r===xg)&&(e.$$typeof||t.$$typeof)?!0:Sg(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var Ig="[object Arguments]",Vg="[object Boolean]",Bg="[object Date]",Fg="[object Error]",$g="[object Map]",jg="[object Number]",zg="[object Object]",Ug="[object RegExp]",Rg="[object Set]",Xg="[object String]",qg="[object URL]",Gg=Array.isArray,ml=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,gl=Object.assign,Wg=Object.prototype.toString.call.bind(Object.prototype.toString);function Kg(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areErrorsEqual,o=e.areFunctionsEqual,s=e.areMapsEqual,i=e.areNumbersEqual,a=e.areObjectsEqual,l=e.arePrimitiveWrappersEqual,c=e.areRegExpsEqual,u=e.areSetsEqual,d=e.areTypedArraysEqual,f=e.areUrlsEqual;return function(p,m,v){if(p===m)return!0;if(p==null||m==null)return!1;var b=typeof p;if(b!==typeof m)return!1;if(b!=="object")return b==="number"?i(p,m,v):b==="function"?o(p,m,v):!1;var C=p.constructor;if(C!==m.constructor)return!1;if(C===Object)return a(p,m,v);if(Gg(p))return t(p,m,v);if(ml!=null&&ml(p))return d(p,m,v);if(C===Date)return n(p,m,v);if(C===RegExp)return c(p,m,v);if(C===Map)return s(p,m,v);if(C===Set)return u(p,m,v);var S=Wg(p);return S===Bg?n(p,m,v):S===Ug?c(p,m,v):S===$g?s(p,m,v):S===Rg?u(p,m,v):S===zg?typeof p.then!="function"&&typeof m.then!="function"&&a(p,m,v):S===qg?f(p,m,v):S===Fg?r(p,m,v):S===Ig?a(p,m,v):S===Vg||S===jg||S===Xg?l(p,m,v):!1}}function Hg(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,o={areArraysEqual:r?Jt:Eg,areDatesEqual:Tg,areErrorsEqual:Ag,areFunctionsEqual:Mg,areMapsEqual:r?ll(fl,Jt):fl,areNumbersEqual:Pg,areObjectsEqual:r?Jt:Lg,arePrimitiveWrappersEqual:Og,areRegExpsEqual:kg,areSetsEqual:r?ll(hl,Jt):hl,areTypedArraysEqual:r?Jt:Ng,areUrlsEqual:Dg};if(n&&(o=gl({},o,n(o))),t){var s=Ln(o.areArraysEqual),i=Ln(o.areMapsEqual),a=Ln(o.areObjectsEqual),l=Ln(o.areSetsEqual);o=gl({},o,{areArraysEqual:s,areMapsEqual:i,areObjectsEqual:a,areSetsEqual:l})}return o}function Zg(e){return function(t,n,r,o,s,i,a){return e(t,n,a)}}function Yg(e){var t=e.circular,n=e.comparator,r=e.createState,o=e.equals,s=e.strict;if(r)return function(l,c){var u=r(),d=u.cache,f=d===void 0?t?new WeakMap:void 0:d,h=u.meta;return n(l,c,{cache:f,equals:o,meta:h,strict:s})};if(t)return function(l,c){return n(l,c,{cache:new WeakMap,equals:o,meta:void 0,strict:s})};var i={cache:void 0,equals:o,meta:void 0,strict:s};return function(l,c){return n(l,c,i)}}var yl=ze();ze({strict:!0}),ze({circular:!0}),ze({circular:!0,strict:!0}),ze({createInternalComparator:function(){return rt}}),ze({strict:!0,createInternalComparator:function(){return rt}}),ze({circular:!0,createInternalComparator:function(){return rt}}),ze({circular:!0,createInternalComparator:function(){return rt},strict:!0});function ze(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,o=e.createState,s=e.strict,i=s===void 0?!1:s,a=Hg(e),l=Kg(a),c=r?r(l):Zg(l);return Yg({circular:n,comparator:l,createState:o,equals:c,strict:i})}const vl=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],eo=1,Qt=8;class to{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[n,r]=new Uint8Array(t,0,2);if(n!==219)throw new Error("Data does not appear to be in a KDBush format.");const o=r>>4;if(o!==eo)throw new Error(`Got v${o} data when expected v${eo}.`);const s=vl[r&15];if(!s)throw new Error("Unrecognized array type.");const[i]=new Uint16Array(t,2,1),[a]=new Uint32Array(t,4,1);return new to(a,i,s,t)}constructor(t,n=64,r=Float64Array,o){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+n,2),65535),this.ArrayType=r,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const s=vl.indexOf(this.ArrayType),i=t*2*this.ArrayType.BYTES_PER_ELEMENT,a=t*this.IndexArrayType.BYTES_PER_ELEMENT,l=(8-a%8)%8;if(s<0)throw new Error(`Unexpected typed array class: ${r}.`);o&&o instanceof ArrayBuffer?(this.data=o,this.ids=new this.IndexArrayType(this.data,Qt,t),this.coords=new this.ArrayType(this.data,Qt+a+l,t*2),this._pos=t*2,this._finished=!0):(this.data=new ArrayBuffer(Qt+i+a+l),this.ids=new this.IndexArrayType(this.data,Qt,t),this.coords=new this.ArrayType(this.data,Qt+a+l,t*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(eo<<4)+s]),new Uint16Array(this.data,2,1)[0]=n,new Uint32Array(this.data,4,1)[0]=t)}add(t,n){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=t,this.coords[this._pos++]=n,r}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return no(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,n,r,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:s,coords:i,nodeSize:a}=this,l=[0,s.length-1,0],c=[];for(;l.length;){const u=l.pop()||0,d=l.pop()||0,f=l.pop()||0;if(d-f<=a){for(let v=f;v<=d;v++){const b=i[2*v],C=i[2*v+1];b>=t&&b<=r&&C>=n&&C<=o&&c.push(s[v])}continue}const h=f+d>>1,p=i[2*h],m=i[2*h+1];p>=t&&p<=r&&m>=n&&m<=o&&c.push(s[h]),(u===0?t<=p:n<=m)&&(l.push(f),l.push(h-1),l.push(1-u)),(u===0?r>=p:o>=m)&&(l.push(h+1),l.push(d),l.push(1-u))}return c}within(t,n,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:s,nodeSize:i}=this,a=[0,o.length-1,0],l=[],c=r*r;for(;a.length;){const u=a.pop()||0,d=a.pop()||0,f=a.pop()||0;if(d-f<=i){for(let v=f;v<=d;v++)Cl(s[2*v],s[2*v+1],t,n)<=c&&l.push(o[v]);continue}const h=f+d>>1,p=s[2*h],m=s[2*h+1];Cl(p,m,t,n)<=c&&l.push(o[h]),(u===0?t-r<=p:n-r<=m)&&(a.push(f),a.push(h-1),a.push(1-u)),(u===0?t+r>=p:n+r>=m)&&(a.push(h+1),a.push(d),a.push(1-u))}return l}}function no(e,t,n,r,o,s){if(o-r<=n)return;const i=r+o>>1;bl(e,t,i,r,o,s),no(e,t,n,r,i-1,1-s),no(e,t,n,i+1,o,1-s)}function bl(e,t,n,r,o,s){for(;o>r;){if(o-r>600){const c=o-r+1,u=n-r+1,d=Math.log(c),f=.5*Math.exp(2*d/3),h=.5*Math.sqrt(d*f*(c-f)/c)*(u-c/2<0?-1:1),p=Math.max(r,Math.floor(n-u*f/c+h)),m=Math.min(o,Math.floor(n+(c-u)*f/c+h));bl(e,t,n,p,m,s)}const i=t[2*n+s];let a=r,l=o;for(en(e,t,r,n),t[2*o+s]>i&&en(e,t,r,o);a<l;){for(en(e,t,a,l),a++,l--;t[2*a+s]<i;)a++;for(;t[2*l+s]>i;)l--}t[2*r+s]===i?en(e,t,r,l):(l++,en(e,t,l,o)),l<=n&&(r=l+1),n<=l&&(o=l-1)}}function en(e,t,n,r){ro(e,n,r),ro(t,2*n,2*r),ro(t,2*n+1,2*r+1)}function ro(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Cl(e,t,n,r){const o=e-n,s=t-r;return o*o+s*s}const Jg={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:e=>e},Sl=Math.fround||(e=>t=>(e[0]=+t,e[0]))(new Float32Array(1)),ot=2,Ue=3,oo=4,Re=5,xl=6;class Qg{constructor(t){this.options=Object.assign(Object.create(Jg),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(t){const{log:n,minZoom:r,maxZoom:o}=this.options;n&&console.time("total time");const s=`prepare ${t.length} points`;n&&console.time(s),this.points=t;const i=[];for(let l=0;l<t.length;l++){const c=t[l];if(!c.geometry)continue;const[u,d]=c.geometry.coordinates,f=Sl(On(u)),h=Sl(kn(d));i.push(f,h,1/0,l,-1,1),this.options.reduce&&i.push(0)}let a=this.trees[o+1]=this._createTree(i);n&&console.timeEnd(s);for(let l=o;l>=r;l--){const c=+Date.now();a=this.trees[l]=this._createTree(this._cluster(a,l)),n&&console.log("z%d: %d clusters in %dms",l,a.numItems,+Date.now()-c)}return n&&console.timeEnd("total time"),this}getClusters(t,n){let r=((t[0]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,t[1]));let s=t[2]===180?180:((t[2]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,s=180;else if(r>s){const d=this.getClusters([r,o,180,i],n),f=this.getClusters([-180,o,s,i],n);return d.concat(f)}const a=this.trees[this._limitZoom(n)],l=a.range(On(r),kn(i),On(s),kn(o)),c=a.data,u=[];for(const d of l){const f=this.stride*d;u.push(c[f+Re]>1?wl(c,f,this.clusterProps):this.points[c[f+Ue]])}return u}getChildren(t){const n=this._getOriginId(t),r=this._getOriginZoom(t),o="No cluster with the specified id.",s=this.trees[r];if(!s)throw new Error(o);const i=s.data;if(n*this.stride>=i.length)throw new Error(o);const a=this.options.radius/(this.options.extent*Math.pow(2,r-1)),l=i[n*this.stride],c=i[n*this.stride+1],u=s.within(l,c,a),d=[];for(const f of u){const h=f*this.stride;i[h+oo]===t&&d.push(i[h+Re]>1?wl(i,h,this.clusterProps):this.points[i[h+Ue]])}if(d.length===0)throw new Error(o);return d}getLeaves(t,n,r){n=n||10,r=r||0;const o=[];return this._appendLeaves(o,t,n,r,0),o}getTile(t,n,r){const o=this.trees[this._limitZoom(t)],s=Math.pow(2,t),{extent:i,radius:a}=this.options,l=a/i,c=(r-l)/s,u=(r+1+l)/s,d={features:[]};return this._addTileFeatures(o.range((n-l)/s,c,(n+1+l)/s,u),o.data,n,r,s,d),n===0&&this._addTileFeatures(o.range(1-l/s,c,1,u),o.data,s,r,s,d),n===s-1&&this._addTileFeatures(o.range(0,c,l/s,u),o.data,-1,r,s,d),d.features.length?d:null}getClusterExpansionZoom(t){let n=this._getOriginZoom(t)-1;for(;n<=this.options.maxZoom;){const r=this.getChildren(t);if(n++,r.length!==1)break;t=r[0].properties.cluster_id}return n}_appendLeaves(t,n,r,o,s){const i=this.getChildren(n);for(const a of i){const l=a.properties;if(l&&l.cluster?s+l.point_count<=o?s+=l.point_count:s=this._appendLeaves(t,l.cluster_id,r,o,s):s<o?s++:t.push(a),t.length===r)break}return s}_createTree(t){const n=new to(t.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<t.length;r+=this.stride)n.add(t[r],t[r+1]);return n.finish(),n.data=t,n}_addTileFeatures(t,n,r,o,s,i){for(const a of t){const l=a*this.stride,c=n[l+Re]>1;let u,d,f;if(c)u=_l(n,l,this.clusterProps),d=n[l],f=n[l+1];else{const m=this.points[n[l+Ue]];u=m.properties;const[v,b]=m.geometry.coordinates;d=On(v),f=kn(b)}const h={type:1,geometry:[[Math.round(this.options.extent*(d*s-r)),Math.round(this.options.extent*(f*s-o))]],tags:u};let p;c||this.options.generateId?p=n[l+Ue]:p=this.points[n[l+Ue]].id,p!==void 0&&(h.id=p),i.features.push(h)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,n){const{radius:r,extent:o,reduce:s,minPoints:i}=this.options,a=r/(o*Math.pow(2,n)),l=t.data,c=[],u=this.stride;for(let d=0;d<l.length;d+=u){if(l[d+ot]<=n)continue;l[d+ot]=n;const f=l[d],h=l[d+1],p=t.within(l[d],l[d+1],a),m=l[d+Re];let v=m;for(const b of p){const C=b*u;l[C+ot]>n&&(v+=l[C+Re])}if(v>m&&v>=i){let b=f*m,C=h*m,S,w=-1;const x=((d/u|0)<<5)+(n+1)+this.points.length;for(const _ of p){const A=_*u;if(l[A+ot]<=n)continue;l[A+ot]=n;const T=l[A+Re];b+=l[A]*T,C+=l[A+1]*T,l[A+oo]=x,s&&(S||(S=this._map(l,d,!0),w=this.clusterProps.length,this.clusterProps.push(S)),s(S,this._map(l,A)))}l[d+oo]=x,c.push(b/v,C/v,1/0,x,-1,v),s&&c.push(w)}else{for(let b=0;b<u;b++)c.push(l[d+b]);if(v>1)for(const b of p){const C=b*u;if(!(l[C+ot]<=n)){l[C+ot]=n;for(let S=0;S<u;S++)c.push(l[C+S])}}}}return c}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,n,r){if(t[n+Re]>1){const i=this.clusterProps[t[n+xl]];return r?Object.assign({},i):i}const o=this.points[t[n+Ue]].properties,s=this.options.map(o);return r&&s===o?Object.assign({},s):s}}function wl(e,t,n){return{type:"Feature",id:e[t+Ue],properties:_l(e,t,n),geometry:{type:"Point",coordinates:[ey(e[t]),ty(e[t+1])]}}}function _l(e,t,n){const r=e[t+Re],o=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,s=e[t+xl],i=s===-1?{}:Object.assign({},n[s]);return Object.assign(i,{cluster:!0,cluster_id:e[t+Ue],point_count:r,point_count_abbreviated:o})}function On(e){return e/360+.5}function kn(e){const t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function ey(e){return(e-.5)*360}function ty(e){const t=(180-e*360)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}function ny(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}typeof SuppressedError=="function"&&SuppressedError;class oe{static isAdvancedMarkerAvailable(t){return google.maps.marker&&t.getMapCapabilities().isAdvancedMarkersAvailable===!0}static isAdvancedMarker(t){return google.maps.marker&&t instanceof google.maps.marker.AdvancedMarkerElement}static setMap(t,n){this.isAdvancedMarker(t)?t.map=n:t.setMap(n)}static getPosition(t){if(this.isAdvancedMarker(t)){if(t.position){if(t.position instanceof google.maps.LatLng)return t.position;if(Number.isFinite(t.position.lat)&&Number.isFinite(t.position.lng))return new google.maps.LatLng(t.position.lat,t.position.lng)}return new google.maps.LatLng(null)}return t.getPosition()}static getVisible(t){return this.isAdvancedMarker(t)?!0:t.getVisible()}}class so{constructor({markers:t,position:n}){this.markers=[],t&&(this.markers=t),n&&(n instanceof google.maps.LatLng?this._position=n:this._position=new google.maps.LatLng(n))}get bounds(){if(this.markers.length===0&&!this._position)return;const t=new google.maps.LatLngBounds(this._position,this._position);for(const n of this.markers)t.extend(oe.getPosition(n));return t}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(t=>oe.getVisible(t)).length}push(t){this.markers.push(t)}delete(){this.marker&&(oe.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}function io(e,t="assertion failed"){if(e==null)throw Error(t)}class ry{constructor({maxZoom:t=16}){this.maxZoom=t}noop({markers:t}){return oy(t)}}const oy=e=>e.map(n=>new so({position:oe.getPosition(n),markers:[n]}));class sy extends ry{constructor(t){var{maxZoom:n,radius:r=60}=t,o=ny(t,["maxZoom","radius"]);super({maxZoom:n}),this.markers=[],this.clusters=[],this.state={zoom:-1},this.superCluster=new Qg(Object.assign({maxZoom:this.maxZoom,radius:r},o))}calculate(t){let n=!1,r=t.map.getZoom();io(r),r=Math.round(r);const o={zoom:r};if(!yl(t.markers,this.markers)){n=!0,this.markers=[...t.markers];const s=this.markers.map(i=>{const a=oe.getPosition(i);return{type:"Feature",geometry:{type:"Point",coordinates:[a.lng(),a.lat()]},properties:{marker:i}}});this.superCluster.load(s)}return n||(this.state.zoom<=this.maxZoom||o.zoom<=this.maxZoom)&&(n=!yl(this.state,o)),this.state=o,t.markers.length===0?(this.clusters=[],{clusters:this.clusters,changed:n}):(n&&(this.clusters=this.cluster(t)),{clusters:this.clusters,changed:n})}cluster({map:t}){const n=t.getZoom();return io(n),this.superCluster.getClusters([-180,-90,180,90],Math.round(n)).map(r=>this.transformCluster(r))}transformCluster({geometry:{coordinates:[t,n]},properties:r}){if(r.cluster)return new so({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(s=>s.properties.marker),position:{lat:n,lng:t}});const o=r.marker;return new so({markers:[o],position:oe.getPosition(o)})}}class iy{constructor(t,n){this.markers={sum:t.length};const r=n.map(s=>s.count),o=r.reduce((s,i)=>s+i,0);this.clusters={count:n.length,markers:{mean:o/n.length,sum:o,min:Math.min(...r),max:Math.max(...r)}}}}class ay{render({count:t,position:n},r,o){const i=`<svg fill="${t>Math.max(10,r.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
|
|
286
286
|
<circle cx="120" cy="120" opacity=".6" r="70" />
|
|
287
287
|
<circle cx="120" cy="120" opacity=".3" r="90" />
|
|
288
288
|
<circle cx="120" cy="120" opacity=".2" r="110" />
|
|
289
289
|
<text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${t}</text>
|
|
290
|
-
</svg>`,a=`Cluster of ${t} markers`,l=Number(google.maps.Marker.MAX_ZINDEX)+t;if(
|
|
290
|
+
</svg>`,a=`Cluster of ${t} markers`,l=Number(google.maps.Marker.MAX_ZINDEX)+t;if(oe.isAdvancedMarkerAvailable(o)){const d=new DOMParser().parseFromString(i,"image/svg+xml").documentElement;d.setAttribute("transform","translate(0 25)");const f={map:o,position:n,zIndex:l,title:a,content:d};return new google.maps.marker.AdvancedMarkerElement(f)}const c={position:n,zIndex:l,title:a,icon:{url:`data:image/svg+xml;base64,${btoa(i)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(c)}}function ly(e,t){for(let n in t.prototype)e.prototype[n]=t.prototype[n]}class ao{constructor(){ly(ao,google.maps.OverlayView)}}var st;(function(e){e.CLUSTERING_BEGIN="clusteringbegin",e.CLUSTERING_END="clusteringend",e.CLUSTER_CLICK="click",e.GMP_CLICK="gmp-click"})(st||(st={}));const cy=(e,t,n)=>{t.bounds&&n.fitBounds(t.bounds)};class uy extends ao{constructor({map:t,markers:n=[],algorithmOptions:r={},algorithm:o=new sy(r),renderer:s=new ay,onClusterClick:i=cy}){super(),this.map=null,this.idleListener=null,this.markers=[...n],this.clusters=[],this.algorithm=o,this.renderer=s,this.onClusterClick=i,t&&this.setMap(t)}addMarker(t,n){this.markers.includes(t)||(this.markers.push(t),n||this.render())}addMarkers(t,n){t.forEach(r=>{this.addMarker(r,!0)}),n||this.render()}removeMarker(t,n){const r=this.markers.indexOf(t);return r===-1?!1:(oe.setMap(t,null),this.markers.splice(r,1),n||this.render(),!0)}removeMarkers(t,n){let r=!1;return t.forEach(o=>{r=this.removeMarker(o,!0)||r}),r&&!n&&this.render(),r}clearMarkers(t){this.markers.length=0,t||this.render()}render(){const t=this.getMap();if(t instanceof google.maps.Map&&t.getProjection()){google.maps.event.trigger(this,st.CLUSTERING_BEGIN,this);const{clusters:n,changed:r}=this.algorithm.calculate({markers:this.markers,map:t,mapCanvasProjection:this.getProjection()});if(r||r==null){const o=new Set;for(const i of n)i.markers.length==1&&o.add(i.markers[0]);const s=[];for(const i of this.clusters)i.marker!=null&&(i.markers.length==1?o.has(i.marker)||oe.setMap(i.marker,null):s.push(i.marker));this.clusters=n,this.renderClusters(),requestAnimationFrame(()=>s.forEach(i=>oe.setMap(i,null)))}google.maps.event.trigger(this,st.CLUSTERING_END,this)}}onAdd(){const t=this.getMap();io(t),this.idleListener=t.addListener("idle",this.render.bind(this)),this.render()}onRemove(){this.idleListener&&google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(t=>oe.setMap(t,null)),this.clusters.forEach(t=>t.delete()),this.clusters=[]}renderClusters(){const t=new iy(this.markers,this.clusters),n=this.getMap();this.clusters.forEach(r=>{if(r.markers.length===1)r.marker=r.markers[0];else if(r.marker=this.renderer.render(r,t,n),r.markers.forEach(o=>oe.setMap(o,null)),this.onClusterClick){const o=oe.isAdvancedMarker(r.marker)?st.GMP_CLICK:st.CLUSTER_CLICK;r.marker.addListener(o,s=>{google.maps.event.trigger(this,st.CLUSTER_CLICK,r),this.onClusterClick(s,r,n)})}oe.setMap(r.marker,n)})}}function dy(e){return e!=null&&"coords"in e&&("size"in e||"range"in e)&&"onMarkerClick"in e}function fy(e){return e!=null&&"coords"in e&&!("size"in e)}function hy({locations:e,onRightButtonClick:t}){const n=Yt(),r=M(p=>p.setSelectedLocation),o=g.useRef(""),s=g.useRef([]),i=g.useRef(null),a=g.useRef(new Map),[l,c]=g.useState(new Set),u=g.useRef(null);g.useEffect(()=>{o.current=getComputedStyle(document.documentElement).getPropertyValue("--dyn-locator__colors-accent-500")},[]);const{clusters:d,markers:f}=g.useMemo(()=>{const p=[],m=[];for(const v of e||[])dy(v)?p.push(v):fy(v)&&m.push(v);return{clusters:p,markers:m}},[e]);g.useEffect(()=>{if(!n)return;const p=()=>{var x,_;u.current!=null&&(cancelAnimationFrame(u.current),u.current=null),(x=i.current)==null||x.clearMarkers(),(_=i.current)==null||_.setMap(null),i.current=null,s.current.forEach(A=>A.setMap(null)),s.current=[],a.current.clear(),c(new Set)};if(f.length===0){p();return}s.current=f.map(x=>{const _=new google.maps.Marker({position:x.coords,title:x.title||"",opacity:0,clickable:!1,zIndex:h.NATIVE});return a.current.set(_,x.id),_});const m={render({count:x,position:_},A,T){var J,L;const O=Math.max(10,((L=(J=A==null?void 0:A.clusters)==null?void 0:J.markers)==null?void 0:L.mean)??0),P=document.querySelector("#dyn-locator")||document.documentElement,V=x>O?getComputedStyle(P).getPropertyValue("--dyn-locator__high-density-cluster-color").trim()||"#ff0000":getComputedStyle(P).getPropertyValue("--dyn-locator__low-density-cluster-color").trim()||"#0000ff",q=x>O?getComputedStyle(P).getPropertyValue("--dyn-locator__high-density-cluster-text-color").trim()||"#fff":getComputedStyle(P).getPropertyValue("--dyn-locator__low-density-cluster-text-color").trim()||"#fff";console.log({clusterColor:V,clusterTextColor:q});const se=`<svg fill="${V}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
|
|
291
291
|
<circle cx="120" cy="120" opacity=".6" r="70" />
|
|
292
292
|
<circle cx="120" cy="120" opacity=".3" r="90" />
|
|
293
293
|
<circle cx="120" cy="120" opacity=".2" r="110" />
|
|
294
|
-
<text x="50%" y="50%" style="fill:${
|
|
295
|
-
</svg>`,oe=`Cluster of ${w} markers`,ue=Number(google.maps.Marker.MAX_ZINDEX)+w;if(re.isAdvancedMarkerAvailable(T)){const V=new DOMParser().parseFromString(Y,"image/svg+xml").documentElement;return V.setAttribute("transform","translate(0 25)"),new google.maps.marker.AdvancedMarkerElement({map:T,position:E,zIndex:ue,title:oe,content:V})}return new google.maps.Marker({position:E,zIndex:ue,title:oe,icon:{url:`data:image/svg+xml;base64,${btoa(Y)}`,anchor:new google.maps.Point(25,25)}})}};i.current=new ay({map:n,markers:s.current,renderer:m});const v=()=>{const w=new Set;for(const E of s.current)if(E.getMap()){const x=a.current.get(E);x&&w.add(x)}c(w)},b=()=>{u.current!=null&&cancelAnimationFrame(u.current),u.current=requestAnimationFrame(v)};b();const C=n.addListener("zoom_changed",b),S=n.addListener("dragend",b);let _;return i.current&&(_=i.current.addListener("clusteringend",b)),()=>{C==null||C.remove(),S==null||S.remove(),_==null||_.remove(),p()}},[n,f]);const h={NATIVE:-1e3,CLUSTER:1};return y.jsxs(y.Fragment,{children:[d.map(p=>y.jsx(no,{position:p.coords,icon:{path:google.maps.SymbolPath.CIRCLE,fillColor:(o.current||"#00acde").trim()||"#00acde",fillOpacity:.6,strokeWeight:0,scale:(p.range??0)/ya,labelOrigin:new google.maps.Point(0,0),anchor:new google.maps.Point(0,0)},optimized:!1,zIndex:h.CLUSTER,onClick:async()=>{await p.onMarkerClick()}},p.id)),f.filter(p=>l.has(p.id)).map(p=>{const{id:m="",title:v="No Title",address:b="No Address",coords:C={lat:0,lng:0},actions:S=[],markerType:_="default",...w}=p;return y.jsx(ll,{id:m,title:v,address:b,coords:C,actions:S,markerType:_,onRightButtonClick:()=>t(p),onClick:()=>r(m),...w},m)})]})}function dy(e){return"size"in e&&"range"in e&&"onMarkerClick"in e}function fy(e){return"title"in e&&!("size"in e)}function hy(){var q;const[e,t]=g.useState({zoom:va}),[n,r]=g.useState(!1),[o,s]=g.useState("inactive"),i=g.useRef(""),a=to(),{request:l,loading:c}=Ht(St.FIND),u=M(A=>A.mapId),d=M(A=>A.featureFlags),{labels:f}=M(A=>A.localizationConfig),h=M(A=>A.locations),p=M(A=>A.setLocations),m=M(A=>A.targetLocation),v=M(A=>A.clearTargetLocation),b=M(A=>A.mapDetail),C=M(A=>A.setMapDetail),S=M(A=>A.isFullscreen),_=M(A=>A.setFullscreen),w=M(A=>A.isLocationListExpanded),E=M(A=>A.setIsLocationListExpanded),x=M(A=>A.shouldRefetch),T=M(A=>A.setShouldRefetch),D=M(A=>A.setSelectedLocation),O=M(A=>A.customZoomLevels),F=M(A=>A.clusteringProvider),N=b===Me.MARKER;g.useEffect(()=>{O!=null&&O.INITIAL_ZOOM_LEVEL&&t({zoom:O==null?void 0:O.INITIAL_ZOOM_LEVEL})},[O]);function Y({detail:A}){const{center:J,zoom:R}=A;t({center:J,zoom:R}),n||r(!0)}function oe(){n&&e.center&&o==="inactive"&&s("active")}function ue(A){t(J=>({center:A,zoom:J.zoom}))}function ye(){s("inactive"),D(""),E(!1),C(Me.CLUSTER),t({center:Zh,zoom:(O==null?void 0:O.INITIAL_ZOOM_LEVEL)||va}),T(!0)}const P=g.useCallback(async()=>{if(!e.center)return;const{lat:A,lng:J}=e.center,R={location:{type:"Feature",geometry:{type:"Point",coordinates:[J,A]},properties:{}},distance:ba};try{const{data:H}=await l({mapId:u},{body:R})??{};if(!(H!=null&&H.pins))throw new Error("No locations found");p(H.pins),C(Me.MARKER),s("inactive")}catch(H){console.error("Error finding locations in this area: ",H),$.error(Ie+Xh)}},[e.center,l,C,u,p]);function I(A){t({center:A.coords,zoom:20}),w||E(!0)}function V(A){if(dy(A))return y.jsx(no,{position:A.coords,icon:{path:google.maps.SymbolPath.CIRCLE,fillColor:i.current||"#00acde",fillOpacity:.6,strokeWeight:0,scale:(A.range??0)/ya,labelOrigin:new google.maps.Point(0,0)},onClick:async()=>{await A.onMarkerClick(),t({center:A.coords,zoom:A.zoom||15})}},A.id);if(fy(A)){const{id:J="",title:R="No Title",address:H="No Address",coords:qe={lat:0,lng:0},actions:Ge=[],markerType:lt="default",...tn}=A;return y.jsx(ll,{id:J,title:R,address:H,coords:qe,actions:Ge,markerType:lt,onRightButtonClick:()=>I(A),onClick:()=>{D(A.id)},...tn},J)}}if(g.useEffect(()=>{i.current=getComputedStyle(document.documentElement).getPropertyValue("--dyn-locator__colors-accent-500")},[]),g.useEffect(()=>{m&&(t({center:m.coords,zoom:m.zoom}),v())},[m,v]),a===ie.LOADING)return y.jsx("div",{className:j("dyn-locator__map",Te.root),children:y.jsx("div",{className:Te.loaderContainer,children:y.jsx(xt,{size:"large"})})});if(a===ie.FAILED||a===ie.AUTH_FAILURE)throw new Error(Rh);if(a===ie.LOADED)return y.jsxs("div",{className:j("dyn-locator__map",Te.root),children:[d.fullscreen?y.jsx(Ve,{className:j(Te.fullscreenButton,"dyn-locator__map__fullscreen-button"),variant:"negative",onClick:()=>_==null?void 0:_(!S),children:y.jsx(me,{size:"M",icon:S?"Close":"Expand"})}):null,N?y.jsx(Ve,{className:j(Te.backButton,"dyn-locator__map__back-button"),variant:"negative",onClick:ye,children:y.jsx(me,{size:"M",icon:"ArrowLeft"})}):null,o!=="inactive"&&d.withAreaSearch&&y.jsxs(qt,{className:j(Te.areaSearchButton,"dyn-locator__map__area-search-button",N&&"dyn-locator__map__area-search-button--with-back-button"),disabled:c||o==="select_area",loading:c,onClick:()=>s("select_area"),children:[y.jsx(sc,{}),f["Map.areaSearchButton"]]}),o==="select_area"&&d.withAreaSearch&&y.jsxs("div",{className:Te.visualCue,children:[y.jsxs("i",{children:[y.jsx("button",{className:Te.closeButton,onClick:()=>s("active"),"aria-label":"Close area search",children:y.jsx(Co,{size:16})}),y.jsx(ic,{size:48,strokeWidth:1,color:"currentColor"})]}),y.jsxs(qt,{className:Te.searchButton,disabled:c,loading:c,onClick:P,size:"small",variant:"themed",children:[f["Map.areaSearchVisualCueCTA"]," ",y.jsx(Kl,{size:22,style:{position:"relative",left:-8}})]})]}),y.jsxs(ol,{style:{width:"100%",height:"100%"},gestureHandling:"greedy",disableDefaultUI:!0,...e,onCameraChanged:Y,onDragend:oe,defaultBounds:Xt,mapId:"DEMO_MAP_ID",children:[!x&&F!==et.GOOGLE?(q=h==null?void 0:h.map)==null?void 0:q.call(h,V):null,!x&&d.withClusters&&F===et.GOOGLE?y.jsx(uy,{locations:h,onRightButtonClick:I,setLocations:p}):null]}),N?y.jsx(pg,{onLocationSelect:ue}):null]})}const Ae={root:"_root_1nmik_10",validIcon:"_validIcon_1nmik_20",errorIcon:"_errorIcon_1nmik_27",label:"_label_1nmik_48",input:"_input_1nmik_58",sideButton:"_sideButton_1nmik_89",sideOrnament:"_sideOrnament_1nmik_92",clearButton:"_clearButton_1nmik_126",dropdown:"_dropdown_1nmik_166"},Tl="Input";function Al({label:e,className:t,showValidation:n=!0,error:r=!1,valid:o=!1,clearable:s=!1,onClear:i,animate:a=!0,animationDelay:l=0,dropdown:c,dropdownVisible:u=!1,ariaLabel:d,style:f,sideButton:h,sideOrnament:p,...m},v){const b=a?Qe.div:"div",C=Ne(m)??[],S=a?{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:l,duration:.2}}:{};return y.jsxs(b,{className:j("dyn-locator__"+we(Tl),Ae.root,Se(t),...C??[]),"data-valid":o,"data-error":r,"data-expanded":u,"data-side-button":!!h,...f?{style:f}:{},...S,children:[n&&y.jsxs(y.Fragment,{children:[o&&y.jsx("span",{className:Ae.validIcon}),r&&y.jsx("span",{className:Ae.errorIcon})]}),e?y.jsx("label",{className:Ae.label,...m.id?{htmlFor:m.id}:{},children:e}):null,p?y.jsx("span",{className:Ae.sideOrnament,children:p}):null,y.jsx("input",{ref:v,className:j(Ae.input),"aria-label":d,"aria-invalid":r,"data-side-button":!!h,"data-side-ornament":!!p,...m}),h?y.jsx("span",{className:Ae.sideButton,children:h}):null,s&&(m==null?void 0:m.value)&&y.jsx("button",{className:Ae.clearButton,onClick:i,type:"button","aria-label":"Clear input"}),c&&u&&y.jsx("div",{className:Ae.dropdown,children:c})]})}Al.displayName=Tl;const py=g.forwardRef(Al),at={root:"_root_1vbtg_7",input:"_input_1vbtg_7",clearButton:"_clearButton_1vbtg_10",sideOrnament:"_sideOrnament_1vbtg_13",predictionsContainer:"_predictionsContainer_1vbtg_18",predictionItem:"_predictionItem_1vbtg_29",loadingItem:"_loadingItem_1vbtg_47"};function my(){const[e,t]=g.useState(""),[n,r]=g.useState([]),[o,s]=g.useState(!1),[i,a]=g.useState(!1),[l,c]=g.useState(!1),u=M(P=>P.mapId),d=M(P=>P.setLocations),f=M(P=>P.setMapDetail),h=M(P=>P.zoomToLocation),{labels:p}=M(P=>P.localizationConfig),{search:m}=M(P=>P.featureFlags),{request:v,loading:b}=Ht(St.FIND),C=Mn("places"),S=Mn("geocoding"),_=Yt(),w=g.useRef(null),E=g.useRef(null),x=g.useRef(null),T=g.useRef(null);g.useEffect(()=>{S&&(x.current||(x.current=new S.Geocoder))},[S]),g.useEffect(()=>{C&&(w.current||(w.current=new C.AutocompleteService),T.current||(T.current=new C.AutocompleteSessionToken))},[C]),g.useEffect(()=>{!C||!_||E.current||(E.current=new C.PlacesService(_))},[C,_]);const D=g.useCallback(Yh(async P=>{var I;if(!P||P.length<3){r([]),s(!1);return}a(!0);try{if(!C||!w.current)throw new Error("Places library or Autocomplete Service not available");const V=await w.current.getPlacePredictions({input:P,...T.current?{sessionToken:T.current}:{}});if(a(!1),!((I=V==null?void 0:V.predictions)!=null&&I.length)){r([]),s(!1);return}r(V.predictions),s(!0)}catch(V){console.error("Error fetching predictions: ",V),a(!1),r([]),s(!1),$.error(Ie+zh)}},Kh),[C]),O=P=>{const I=P.currentTarget.value;if(t(I),!I||I.length<3){r([]),s(!1);return}D(I)},F=async P=>{var I,V,q,A,J;t(P.description),s(!1);try{if(!C||!E.current)throw new Error("Places library or Places Service not available");const R=await new Promise((H,qe)=>{E.current.getDetails({placeId:P.place_id,fields:["geometry","address_components","formatted_address"],...T.current?{sessionToken:T.current}:{}},(Ge,lt)=>{if(lt===C.PlacesServiceStatus.OK&&Ge){H(Ge);try{Be.isEventEnabled(ce.AUTOCOMPLETE_ITEM_SELECT)&&Be.track(ce.AUTOCOMPLETE_ITEM_SELECT,{label:P.description,...Jh(Ge)})}catch(tn){console.error(`Could not track event: "${ce.AUTOCOMPLETE_ITEM_SELECT}"`,tn)}}else qe(new Error(`Place details request failed with status: ${lt}`))})});if((I=R==null?void 0:R.geometry)!=null&&I.location){const H=(q=(V=R.geometry.location).lat)==null?void 0:q.call(V),qe=(J=(A=R.geometry.location).lng)==null?void 0:J.call(A);await ue({lat:H,lng:qe})}}catch(R){console.error("Error getting place details:",R),$.error(Ie+Uh)}finally{C&&(T.current=new C.AutocompleteSessionToken)}},N=()=>{t(""),r([]),s(!1)},Y=()=>!o||n.length===0?null:y.jsx("div",{className:at.predictionsContainer,children:i?y.jsx("div",{className:at.loadingItem,children:y.jsx(xt,{size:"medium"})}):n.map(P=>y.jsx("div",{className:at.predictionItem,onClick:()=>F(P),children:P.description},P.place_id))});async function oe(P){P.preventDefault(),c(!0);try{const I=await new Promise((A,J)=>{navigator.geolocation.getCurrentPosition(R=>A(R),R=>J(R),{timeout:5e3})}),V={lat:I.coords.latitude,lng:I.coords.longitude};if(await ue(V),!S||!(x!=null&&x.current)||!_)throw new Error("Geocoding library or Geocoder not available");const q=await new Promise((A,J)=>{x.current.geocode({location:V},(R,H)=>{H===google.maps.GeocoderStatus.OK&&R&&R.length>0?A(R):J(new Error(`Geocoding failed with status: ${H}`))})});q&&q[0]&&t(q[0].formatted_address)}catch(I){console.error("Error getting location: ",I);const V=I instanceof GeolocationPositionError?Ie+I.message:Ie+$h;$.error(V)}finally{c(!1)}}async function ue(P){const{lng:I,lat:V}=P,q={location:{type:"Feature",geometry:{type:"Point",coordinates:[I,V]},properties:{}},distance:ba/2};try{const{data:A}=await v({mapId:u},{body:q})??{};if(!(A!=null&&A.pins))throw new Error("No locations found");d(A.pins),f(Me.MARKER),h({lat:V,lng:I},A.zoom||15)}catch(A){throw console.error("Error finding locations: ",A),A}}const ye=b||l;return m?y.jsxs("div",{className:j("dyn-locator__search",at.root),children:[y.jsx(py,{name:"locator_search_field",className:j("dyn-locator__search__field",at.input),value:e,onChange:O,placeholder:p["Search.placeholder"],dropdown:Y(),dropdownVisible:o,disabled:ye,sideOrnament:e?void 0:y.jsx(me,{className:at.sideOrnament,icon:"Search",size:"M"}),sideButton:e?y.jsx(Ve,{variant:"bare",className:at.clearButton,onClick:N,"aria-label":"Clear",children:y.jsx(me,{icon:"Close",size:"M"})}):y.jsx(xa,{href:"#",onClick:oe,children:p["Search.geolocationButton"]})}),y.jsx(Jr,{show:ye,children:y.jsx(xt,{size:"medium"})})]}):null}function gy({children:e,apiKey:t,language:n,region:r,libraries:o}){return y.jsx(Dm,{apiKey:t,region:r,language:n,libraries:o,children:e})}const yy=Object.freeze(Object.defineProperty({__proto__:null,default:gy},Symbol.toStringTag,{value:"Module"}));function vy(){throw new Error("Mapbox provider is not implemented yet")}const by=Object.freeze(Object.defineProperty({__proto__:null,default:vy},Symbol.toStringTag,{value:"Module"}));function Cy(){throw new Error("HERE Maps provider is not implemented yet")}const Sy=Object.freeze(Object.defineProperty({__proto__:null,default:Cy},Symbol.toStringTag,{value:"Module"}));G.Map=hy,G.Search=my,G.TrackingEvent=ce,G.default=Ja,G.trackingService=Be,Object.defineProperties(G,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
294
|
+
<text x="50%" y="50%" style="fill:${q}" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${x}</text>
|
|
295
|
+
</svg>`,ie=`Cluster of ${x} markers`,I=Number(google.maps.Marker.MAX_ZINDEX)+x;if(oe.isAdvancedMarkerAvailable(T)){const B=new DOMParser().parseFromString(se,"image/svg+xml").documentElement;return B.setAttribute("transform","translate(0 25)"),new google.maps.marker.AdvancedMarkerElement({map:T,position:_,zIndex:I,title:ie,content:B})}return new google.maps.Marker({position:_,zIndex:I,title:ie,icon:{url:`data:image/svg+xml;base64,${btoa(se)}`,anchor:new google.maps.Point(25,25)}})}};i.current=new uy({map:n,markers:s.current,renderer:m});const v=()=>{const x=new Set;for(const _ of s.current)if(_.getMap()){const A=a.current.get(_);A&&x.add(A)}c(x)},b=()=>{u.current!=null&&cancelAnimationFrame(u.current),u.current=requestAnimationFrame(v)};b();const C=n.addListener("zoom_changed",b),S=n.addListener("dragend",b);let w;return i.current&&(w=i.current.addListener("clusteringend",b)),()=>{C==null||C.remove(),S==null||S.remove(),w==null||w.remove(),p()}},[n,f]);const h={NATIVE:-1e3,CLUSTER:1};return y.jsxs(y.Fragment,{children:[d.map(p=>y.jsx(Qr,{position:p.coords,icon:{path:google.maps.SymbolPath.CIRCLE,fillColor:(o.current||"#00acde").trim()||"#00acde",fillOpacity:.6,strokeWeight:0,scale:(p.range??0)/ga,labelOrigin:new google.maps.Point(0,0),anchor:new google.maps.Point(0,0)},optimized:!1,zIndex:h.CLUSTER,onClick:async()=>{await p.onMarkerClick()}},p.id)),f.filter(p=>l.has(p.id)).map(p=>{const{id:m="",title:v="No Title",address:b="No Address",coords:C={lat:0,lng:0},actions:S=[],markerType:w="default",...x}=p;return y.jsx(al,{id:m,title:v,address:b,coords:C,actions:S,markerType:w,onRightButtonClick:()=>t(p),onClick:()=>r(m),...x},m)})]})}function py(e){return"size"in e&&"range"in e&&"onMarkerClick"in e}function my(e){return"title"in e&&!("size"in e)}function gy(){var G;const[e,t]=g.useState({zoom:ya}),[n,r]=g.useState(!1),[o,s]=g.useState("inactive"),i=g.useRef(""),a=Jr(),{request:l,loading:c}=Kt(St.FIND),u=M(E=>E.mapId),d=M(E=>E.featureFlags),{labels:f}=M(E=>E.localizationConfig),h=M(E=>E.locations),p=M(E=>E.setLocations),m=M(E=>E.targetLocation),v=M(E=>E.clearTargetLocation),b=M(E=>E.mapDetail),C=M(E=>E.setMapDetail),S=M(E=>E.isFullscreen),w=M(E=>E.setFullscreen),x=M(E=>E.isLocationListExpanded),_=M(E=>E.setIsLocationListExpanded),A=M(E=>E.shouldRefetch),T=M(E=>E.setShouldRefetch),O=M(E=>E.setSelectedLocation),P=M(E=>E.customZoomLevels),V=M(E=>E.clusteringProvider),q=b===Me.MARKER;g.useEffect(()=>{P!=null&&P.INITIAL_ZOOM_LEVEL&&t({zoom:P==null?void 0:P.INITIAL_ZOOM_LEVEL})},[P]);function se({detail:E}){const{center:Q,zoom:R}=E;t({center:Q,zoom:R}),n||r(!0)}function ie(){n&&e.center&&o==="inactive"&&s("active")}function I(E){t(Q=>({center:E,zoom:Q.zoom}))}function J(){s("inactive"),O(""),_(!1),C(Me.CLUSTER),t({center:Hh,zoom:(P==null?void 0:P.INITIAL_ZOOM_LEVEL)||ya}),T(!0)}const L=g.useCallback(async()=>{if(!e.center)return;const{lat:E,lng:Q}=e.center,R={location:{type:"Feature",geometry:{type:"Point",coordinates:[Q,E]},properties:{}},distance:va};try{const{data:H}=await l({mapId:u},{body:R})??{};if(!(H!=null&&H.pins))throw new Error("No locations found");p(H.pins),C(Me.MARKER),s("inactive")}catch(H){console.error("Error finding locations in this area: ",H),$.error(Ie+Rh)}},[e.center,l,C,u,p]);function D(E){t({center:E.coords,zoom:20}),x||_(!0)}function B(E){if(py(E))return y.jsx(Qr,{position:E.coords,icon:{path:google.maps.SymbolPath.CIRCLE,fillColor:i.current||"#00acde",fillOpacity:.6,strokeWeight:0,scale:(E.range??0)/ga,labelOrigin:new google.maps.Point(0,0)},onClick:async()=>{await E.onMarkerClick(),t({center:E.coords,zoom:E.zoom||15})}},E.id);if(my(E)){const{id:Q="",title:R="No Title",address:H="No Address",coords:Xe={lat:0,lng:0},actions:qe=[],markerType:at="default",...lo}=E;return y.jsx(al,{id:Q,title:R,address:H,coords:Xe,actions:qe,markerType:at,onRightButtonClick:()=>D(E),onClick:()=>{O(E.id)},...lo},Q)}}if(g.useEffect(()=>{i.current=getComputedStyle(document.documentElement).getPropertyValue("--dyn-locator__colors-accent-500")},[]),g.useEffect(()=>{m&&(t({center:m.coords,zoom:m.zoom}),v())},[m,v]),a===le.LOADING)return y.jsx("div",{className:j("dyn-locator__map",Te.root),children:y.jsx("div",{className:Te.loaderContainer,children:y.jsx(wt,{size:"large"})})});if(a===le.FAILED||a===le.AUTH_FAILURE)throw new Error(Uh);if(a===le.LOADED)return y.jsxs("div",{className:j("dyn-locator__map",Te.root),children:[d.fullscreen?y.jsx(Ve,{className:j(Te.fullscreenButton,"dyn-locator__map__fullscreen-button"),variant:"negative",onClick:()=>w==null?void 0:w(!S),children:y.jsx(ye,{size:"M",icon:S?"Close":"Expand"})}):null,q?y.jsx(Ve,{className:j(Te.backButton,"dyn-locator__map__back-button"),variant:"negative",onClick:J,children:y.jsx(ye,{size:"M",icon:"ArrowLeft"})}):null,o!=="inactive"&&d.withAreaSearch&&y.jsxs(qt,{className:j(Te.areaSearchButton,"dyn-locator__map__area-search-button",q&&"dyn-locator__map__area-search-button--with-back-button"),disabled:c||o==="select_area",loading:c,onClick:()=>s("select_area"),children:[y.jsx(oc,{}),f["Map.areaSearchButton"]]}),o==="select_area"&&d.withAreaSearch&&y.jsxs("div",{className:Te.visualCue,children:[y.jsxs("i",{children:[y.jsx("button",{className:Te.closeButton,onClick:()=>s("active"),"aria-label":"Close area search",children:y.jsx(bo,{size:16})}),y.jsx(sc,{size:48,strokeWidth:1,color:"currentColor"})]}),y.jsxs(qt,{className:Te.searchButton,disabled:c,loading:c,onClick:L,size:"small",variant:"themed",children:[f["Map.areaSearchVisualCueCTA"]," ",y.jsx(Kl,{size:22,style:{position:"relative",left:-8}})]})]}),y.jsxs(rl,{style:{width:"100%",height:"100%"},gestureHandling:"greedy",disableDefaultUI:!0,...e,onCameraChanged:se,onDragend:ie,defaultBounds:Xt,mapId:"DEMO_MAP_ID",children:[!A&&V!==Qe.GOOGLE?(G=h==null?void 0:h.map)==null?void 0:G.call(h,B):null,!A&&d.withClusters&&V===Qe.GOOGLE?y.jsx(hy,{locations:h,onRightButtonClick:D,setLocations:p}):null]}),q?y.jsx(yg,{onLocationSelect:I}):null]})}const Ae={root:"_root_1nmik_10",validIcon:"_validIcon_1nmik_20",errorIcon:"_errorIcon_1nmik_27",label:"_label_1nmik_48",input:"_input_1nmik_58",sideButton:"_sideButton_1nmik_89",sideOrnament:"_sideOrnament_1nmik_92",clearButton:"_clearButton_1nmik_126",dropdown:"_dropdown_1nmik_166"},El="Input";function Tl({label:e,className:t,showValidation:n=!0,error:r=!1,valid:o=!1,clearable:s=!1,onClear:i,animate:a=!0,animationDelay:l=0,dropdown:c,dropdownVisible:u=!1,ariaLabel:d,style:f,sideButton:h,sideOrnament:p,...m},v){const b=a?Je.div:"div",C=De(m)??[],S=a?{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:l,duration:.2}}:{};return y.jsxs(b,{className:j("dyn-locator__"+we(El),Ae.root,xe(t),...C??[]),"data-valid":o,"data-error":r,"data-expanded":u,"data-side-button":!!h,...f?{style:f}:{},...S,children:[n&&y.jsxs(y.Fragment,{children:[o&&y.jsx("span",{className:Ae.validIcon}),r&&y.jsx("span",{className:Ae.errorIcon})]}),e?y.jsx("label",{className:Ae.label,...m.id?{htmlFor:m.id}:{},children:e}):null,p?y.jsx("span",{className:Ae.sideOrnament,children:p}):null,y.jsx("input",{ref:v,className:j(Ae.input),"aria-label":d,"aria-invalid":r,"data-side-button":!!h,"data-side-ornament":!!p,...m}),h?y.jsx("span",{className:Ae.sideButton,children:h}):null,s&&(m==null?void 0:m.value)&&y.jsx("button",{className:Ae.clearButton,onClick:i,type:"button","aria-label":"Clear input"}),c&&u&&y.jsx("div",{className:Ae.dropdown,children:c})]})}Tl.displayName=El;const yy=g.forwardRef(Tl),it={root:"_root_1vbtg_7",input:"_input_1vbtg_7",clearButton:"_clearButton_1vbtg_10",sideOrnament:"_sideOrnament_1vbtg_13",predictionsContainer:"_predictionsContainer_1vbtg_18",predictionItem:"_predictionItem_1vbtg_29",loadingItem:"_loadingItem_1vbtg_47"};function vy(){const[e,t]=g.useState(""),[n,r]=g.useState([]),[o,s]=g.useState(!1),[i,a]=g.useState(!1),[l,c]=g.useState(!1),u=M(L=>L.mapId),d=M(L=>L.setLocations),f=M(L=>L.setMapDetail),h=M(L=>L.zoomToLocation),{labels:p}=M(L=>L.localizationConfig),{search:m}=M(L=>L.featureFlags),{request:v,loading:b}=Kt(St.FIND),C=An("places"),S=An("geocoding"),w=Yt(),x=g.useRef(null),_=g.useRef(null),A=g.useRef(null),T=g.useRef(null);g.useEffect(()=>{S&&(A.current||(A.current=new S.Geocoder))},[S]),g.useEffect(()=>{C&&(x.current||(x.current=new C.AutocompleteService),T.current||(T.current=new C.AutocompleteSessionToken))},[C]),g.useEffect(()=>{!C||!w||_.current||(_.current=new C.PlacesService(w))},[C,w]);const O=g.useCallback(Zh(async L=>{var D;if(!L||L.length<3){r([]),s(!1);return}a(!0);try{if(!C||!x.current)throw new Error("Places library or Autocomplete Service not available");const B=await x.current.getPlacePredictions({input:L,...T.current?{sessionToken:T.current}:{}});if(a(!1),!((D=B==null?void 0:B.predictions)!=null&&D.length)){r([]),s(!1);return}r(B.predictions),s(!0)}catch(B){console.error("Error fetching predictions: ",B),a(!1),r([]),s(!1),$.error(Ie+jh)}},Kh),[C]),P=L=>{const D=L.currentTarget.value;if(t(D),!D||D.length<3){r([]),s(!1);return}O(D)},V=async L=>{var D,B,G,E,Q;t(L.description),s(!1);try{if(!C||!_.current)throw new Error("Places library or Places Service not available");const R=await new Promise((H,Xe)=>{_.current.getDetails({placeId:L.place_id,fields:["geometry","address_components","formatted_address"],...T.current?{sessionToken:T.current}:{}},(qe,at)=>{at===C.PlacesServiceStatus.OK&&qe?(H(qe),Ct.track(fe.AUTOCOMPLETE_ITEM_SELECT,{label:L.description,...Yh(qe)})):Xe(new Error(`Place details request failed with status: ${at}`))})});if((D=R==null?void 0:R.geometry)!=null&&D.location){const H=(G=(B=R.geometry.location).lat)==null?void 0:G.call(B),Xe=(Q=(E=R.geometry.location).lng)==null?void 0:Q.call(E);await I({lat:H,lng:Xe})}}catch(R){console.error("Error getting place details:",R),$.error(Ie+zh)}finally{C&&(T.current=new C.AutocompleteSessionToken)}},q=()=>{t(""),r([]),s(!1)},se=()=>!o||n.length===0?null:y.jsx("div",{className:it.predictionsContainer,children:i?y.jsx("div",{className:it.loadingItem,children:y.jsx(wt,{size:"medium"})}):n.map(L=>y.jsx("div",{className:it.predictionItem,onClick:()=>V(L),children:L.description},L.place_id))});async function ie(L){L.preventDefault(),c(!0);try{const D=await new Promise((E,Q)=>{navigator.geolocation.getCurrentPosition(R=>E(R),R=>Q(R),{timeout:5e3})}),B={lat:D.coords.latitude,lng:D.coords.longitude};if(await I(B),!S||!(A!=null&&A.current)||!w)throw new Error("Geocoding library or Geocoder not available");const G=await new Promise((E,Q)=>{A.current.geocode({location:B},(R,H)=>{H===google.maps.GeocoderStatus.OK&&R&&R.length>0?E(R):Q(new Error(`Geocoding failed with status: ${H}`))})});G&&G[0]&&t(G[0].formatted_address)}catch(D){console.error("Error getting location: ",D);const B=D instanceof GeolocationPositionError?Ie+D.message:Ie+Fh;$.error(B)}finally{c(!1)}}async function I(L){const{lng:D,lat:B}=L,G={location:{type:"Feature",geometry:{type:"Point",coordinates:[D,B]},properties:{}},distance:va/2};try{const{data:E}=await v({mapId:u},{body:G})??{};if(!(E!=null&&E.pins))throw new Error("No locations found");d(E.pins),f(Me.MARKER),h({lat:B,lng:D},E.zoom||15)}catch(E){throw console.error("Error finding locations: ",E),E}}const J=b||l;return m?y.jsxs("div",{className:j("dyn-locator__search",it.root),children:[y.jsx(yy,{name:"locator_search_field",className:j("dyn-locator__search__field",it.input),value:e,onChange:P,placeholder:p["Search.placeholder"],dropdown:se(),dropdownVisible:o,disabled:J,sideOrnament:e?void 0:y.jsx(ye,{className:it.sideOrnament,icon:"Search",size:"M"}),sideButton:e?y.jsx(Ve,{variant:"bare",className:it.clearButton,onClick:q,"aria-label":"Clear",children:y.jsx(ye,{icon:"Close",size:"M"})}):y.jsx(xa,{href:"#",onClick:ie,children:p["Search.geolocationButton"]})}),y.jsx(Hr,{show:J,children:y.jsx(wt,{size:"medium"})})]}):null}function by({children:e,apiKey:t,language:n,region:r,libraries:o}){return y.jsx(Im,{apiKey:t,region:r,language:n,libraries:o,children:e})}const Cy=Object.freeze(Object.defineProperty({__proto__:null,default:by},Symbol.toStringTag,{value:"Module"}));function Sy(){throw new Error("Mapbox provider is not implemented yet")}const xy=Object.freeze(Object.defineProperty({__proto__:null,default:Sy},Symbol.toStringTag,{value:"Module"}));function wy(){throw new Error("HERE Maps provider is not implemented yet")}const _y=Object.freeze(Object.defineProperty({__proto__:null,default:wy},Symbol.toStringTag,{value:"Module"}));W.Map=gy,W.Search=vy,W.TrackingEvent=fe,W.default=Ya,W.trackingService=Ct,Object.defineProperties(W,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
296
296
|
//# sourceMappingURL=index.umd.js.map
|