@dynamo-caffeina-dev/locator-frontend 0.0.6 → 0.0.8

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/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(ye,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],m):(ye=typeof globalThis<"u"?globalThis:ye||self,m(ye["@dynamo-caffeina-dev/locator-frontend"]={},ye.React,ye.ReactDOM))})(this,function(ye,m,Dn){"use strict";function bl(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 J=bl(m);function is(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Jt={exports:{}},St={};/**
1
+ (function(ve,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],m):(ve=typeof globalThis<"u"?globalThis:ve||self,m(ve["@dynamo-caffeina-dev/locator-frontend"]={},ve.React,ve.ReactDOM))})(this,function(ve,m,Dn){"use strict";function wl(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 Q=wl(m);function ls(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qt={exports:{}},Tt={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var as;function Sl(){if(as)return St;as=1;var e=m,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function i(a,l,u){var c,d={},f=null,p=null;u!==void 0&&(f=""+u),l.key!==void 0&&(f=""+l.key),l.ref!==void 0&&(p=l.ref);for(c in l)r.call(l,c)&&!o.hasOwnProperty(c)&&(d[c]=l[c]);if(a&&a.defaultProps)for(c in l=a.defaultProps,l)d[c]===void 0&&(d[c]=l[c]);return{$$typeof:t,type:a,key:f,ref:p,props:d,_owner:s.current}}return St.Fragment=n,St.jsx=i,St.jsxs=i,St}var wt={};/**
9
+ */var cs;function Cl(){if(cs)return Tt;cs=1;var e=m,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function i(a,l,c){var u,d={},f=null,p=null;c!==void 0&&(f=""+c),l.key!==void 0&&(f=""+l.key),l.ref!==void 0&&(p=l.ref);for(u in l)r.call(l,u)&&!o.hasOwnProperty(u)&&(d[u]=l[u]);if(a&&a.defaultProps)for(u in l=a.defaultProps,l)d[u]===void 0&&(d[u]=l[u]);return{$$typeof:t,type:a,key:f,ref:p,props:d,_owner:s.current}}return Tt.Fragment=n,Tt.jsx=i,Tt.jsxs=i,Tt}var Pt={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,98 +14,103 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var ls;function wl(){return ls||(ls=1,process.env.NODE_ENV!=="production"&&function(){var e=m,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),v=Symbol.iterator,g="@@iterator";function S(h){if(h===null||typeof h!="object")return null;var C=v&&h[v]||h[g];return typeof C=="function"?C:null}var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function x(h){{for(var C=arguments.length,P=new Array(C>1?C-1:0),D=1;D<C;D++)P[D-1]=arguments[D];w("error",h,P)}}function w(h,C,P){{var D=y.ReactDebugCurrentFrame,I=D.getStackAddendum();I!==""&&(C+="%s",P=P.concat([I]));var F=P.map(function(N){return String(N)});F.unshift("Warning: "+C),Function.prototype.apply.call(console[h],console,F)}}var A=!1,T=!1,M=!1,E=!1,_=!1,k;k=Symbol.for("react.module.reference");function j(h){return!!(typeof h=="string"||typeof h=="function"||h===r||h===o||_||h===s||h===u||h===c||E||h===p||A||T||M||typeof h=="object"&&h!==null&&(h.$$typeof===f||h.$$typeof===d||h.$$typeof===i||h.$$typeof===a||h.$$typeof===l||h.$$typeof===k||h.getModuleId!==void 0))}function W(h,C,P){var D=h.displayName;if(D)return D;var I=C.displayName||C.name||"";return I!==""?P+"("+I+")":P}function ee(h){return h.displayName||"Context"}function oe(h){if(h==null)return null;if(typeof h.tag=="number"&&x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case r:return"Fragment";case n:return"Portal";case o:return"Profiler";case s:return"StrictMode";case u:return"Suspense";case c:return"SuspenseList"}if(typeof h=="object")switch(h.$$typeof){case a:var C=h;return ee(C)+".Consumer";case i:var P=h;return ee(P._context)+".Provider";case l:return W(h,h.render,"ForwardRef");case d:var D=h.displayName||null;return D!==null?D:oe(h.type)||"Memo";case f:{var I=h,F=I._payload,N=I._init;try{return oe(N(F))}catch{return null}}}return null}var he=Object.assign,Be=0,yt,G,O,R,z,ge,ie;function De(){}De.__reactDisabledLog=!0;function te(){{if(Be===0){yt=console.log,G=console.info,O=console.warn,R=console.error,z=console.group,ge=console.groupCollapsed,ie=console.groupEnd;var h={configurable:!0,enumerable:!0,value:De,writable:!0};Object.defineProperties(console,{info:h,log:h,warn:h,error:h,group:h,groupCollapsed:h,groupEnd:h})}Be++}}function $e(){{if(Be--,Be===0){var h={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:he({},h,{value:yt}),info:he({},h,{value:G}),warn:he({},h,{value:O}),error:he({},h,{value:R}),group:he({},h,{value:z}),groupCollapsed:he({},h,{value:ge}),groupEnd:he({},h,{value:ie})})}Be<0&&x("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var tt=y.ReactCurrentDispatcher,vt;function nt(h,C,P){{if(vt===void 0)try{throw Error()}catch(I){var D=I.stack.trim().match(/\n( *(at )?)/);vt=D&&D[1]||""}return`
18
- `+vt+h}}var es=!1,An;{var Wm=typeof WeakMap=="function"?WeakMap:Map;An=new Wm}function ol(h,C){if(!h||es)return"";{var P=An.get(h);if(P!==void 0)return P}var D;es=!0;var I=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var F;F=tt.current,tt.current=null,te();try{if(C){var N=function(){throw Error()};if(Object.defineProperty(N.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(N,[])}catch(ce){D=ce}Reflect.construct(h,[],N)}else{try{N.call()}catch(ce){D=ce}h.call(N.prototype)}}else{try{throw Error()}catch(ce){D=ce}h()}}catch(ce){if(ce&&D&&typeof ce.stack=="string"){for(var V=ce.stack.split(`
19
- `),ae=D.stack.split(`
20
- `),H=V.length-1,q=ae.length-1;H>=1&&q>=0&&V[H]!==ae[q];)q--;for(;H>=1&&q>=0;H--,q--)if(V[H]!==ae[q]){if(H!==1||q!==1)do if(H--,q--,q<0||V[H]!==ae[q]){var pe=`
21
- `+V[H].replace(" at new "," at ");return h.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",h.displayName)),typeof h=="function"&&An.set(h,pe),pe}while(H>=1&&q>=0);break}}}finally{es=!1,tt.current=F,$e(),Error.prepareStackTrace=I}var bt=h?h.displayName||h.name:"",rt=bt?nt(bt):"";return typeof h=="function"&&An.set(h,rt),rt}function Km(h,C,P){return ol(h,!1)}function Gm(h){var C=h.prototype;return!!(C&&C.isReactComponent)}function Mn(h,C,P){if(h==null)return"";if(typeof h=="function")return ol(h,Gm(h));if(typeof h=="string")return nt(h);switch(h){case u:return nt("Suspense");case c:return nt("SuspenseList")}if(typeof h=="object")switch(h.$$typeof){case l:return Km(h.render);case d:return Mn(h.type,C,P);case f:{var D=h,I=D._payload,F=D._init;try{return Mn(F(I),C,P)}catch{}}}return""}var Zt=Object.prototype.hasOwnProperty,il={},al=y.ReactDebugCurrentFrame;function Ln(h){if(h){var C=h._owner,P=Mn(h.type,h._source,C?C.type:null);al.setExtraStackFrame(P)}else al.setExtraStackFrame(null)}function Hm(h,C,P,D,I){{var F=Function.call.bind(Zt);for(var N in h)if(F(h,N)){var V=void 0;try{if(typeof h[N]!="function"){var ae=Error((D||"React class")+": "+P+" type `"+N+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof h[N]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ae.name="Invariant Violation",ae}V=h[N](C,N,D,P,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(H){V=H}V&&!(V instanceof Error)&&(Ln(I),x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",D||"React class",P,N,typeof V),Ln(null)),V instanceof Error&&!(V.message in il)&&(il[V.message]=!0,Ln(I),x("Failed %s type: %s",P,V.message),Ln(null))}}}var qm=Array.isArray;function ts(h){return qm(h)}function Ym(h){{var C=typeof Symbol=="function"&&Symbol.toStringTag,P=C&&h[Symbol.toStringTag]||h.constructor.name||"Object";return P}}function Zm(h){try{return ll(h),!1}catch{return!0}}function ll(h){return""+h}function cl(h){if(Zm(h))return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ym(h)),ll(h)}var ul=y.ReactCurrentOwner,Jm={key:!0,ref:!0,__self:!0,__source:!0},dl,fl;function Qm(h){if(Zt.call(h,"ref")){var C=Object.getOwnPropertyDescriptor(h,"ref").get;if(C&&C.isReactWarning)return!1}return h.ref!==void 0}function eg(h){if(Zt.call(h,"key")){var C=Object.getOwnPropertyDescriptor(h,"key").get;if(C&&C.isReactWarning)return!1}return h.key!==void 0}function tg(h,C){typeof h.ref=="string"&&ul.current}function ng(h,C){{var P=function(){dl||(dl=!0,x("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",C))};P.isReactWarning=!0,Object.defineProperty(h,"key",{get:P,configurable:!0})}}function rg(h,C){{var P=function(){fl||(fl=!0,x("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",C))};P.isReactWarning=!0,Object.defineProperty(h,"ref",{get:P,configurable:!0})}}var sg=function(h,C,P,D,I,F,N){var V={$$typeof:t,type:h,key:C,ref:P,props:N,_owner:F};return V._store={},Object.defineProperty(V._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(V,"_self",{configurable:!1,enumerable:!1,writable:!1,value:D}),Object.defineProperty(V,"_source",{configurable:!1,enumerable:!1,writable:!1,value:I}),Object.freeze&&(Object.freeze(V.props),Object.freeze(V)),V};function og(h,C,P,D,I){{var F,N={},V=null,ae=null;P!==void 0&&(cl(P),V=""+P),eg(C)&&(cl(C.key),V=""+C.key),Qm(C)&&(ae=C.ref,tg(C,I));for(F in C)Zt.call(C,F)&&!Jm.hasOwnProperty(F)&&(N[F]=C[F]);if(h&&h.defaultProps){var H=h.defaultProps;for(F in H)N[F]===void 0&&(N[F]=H[F])}if(V||ae){var q=typeof h=="function"?h.displayName||h.name||"Unknown":h;V&&ng(N,q),ae&&rg(N,q)}return sg(h,V,ae,I,D,ul.current,N)}}var ns=y.ReactCurrentOwner,hl=y.ReactDebugCurrentFrame;function xt(h){if(h){var C=h._owner,P=Mn(h.type,h._source,C?C.type:null);hl.setExtraStackFrame(P)}else hl.setExtraStackFrame(null)}var rs;rs=!1;function ss(h){return typeof h=="object"&&h!==null&&h.$$typeof===t}function pl(){{if(ns.current){var h=oe(ns.current.type);if(h)return`
17
+ */var us;function Tl(){return us||(us=1,process.env.NODE_ENV!=="production"&&function(){var e=m,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),y=Symbol.iterator,g="@@iterator";function S(h){if(h===null||typeof h!="object")return null;var C=y&&h[y]||h[g];return typeof C=="function"?C:null}var v=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function x(h){{for(var C=arguments.length,_=new Array(C>1?C-1:0),O=1;O<C;O++)_[O-1]=arguments[O];w("error",h,_)}}function w(h,C,_){{var O=v.ReactDebugCurrentFrame,R=O.getStackAddendum();R!==""&&(C+="%s",_=_.concat([R]));var B=_.map(function(N){return String(N)});B.unshift("Warning: "+C),Function.prototype.apply.call(console[h],console,B)}}var M=!1,P=!1,L=!1,T=!1,A=!1,V;V=Symbol.for("react.module.reference");function E(h){return!!(typeof h=="string"||typeof h=="function"||h===r||h===o||A||h===s||h===c||h===u||T||h===p||M||P||L||typeof h=="object"&&h!==null&&(h.$$typeof===f||h.$$typeof===d||h.$$typeof===i||h.$$typeof===a||h.$$typeof===l||h.$$typeof===V||h.getModuleId!==void 0))}function U(h,C,_){var O=h.displayName;if(O)return O;var R=C.displayName||C.name||"";return R!==""?_+"("+R+")":_}function z(h){return h.displayName||"Context"}function oe(h){if(h==null)return null;if(typeof h.tag=="number"&&x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case r:return"Fragment";case n:return"Portal";case o:return"Profiler";case s:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if(typeof h=="object")switch(h.$$typeof){case a:var C=h;return z(C)+".Consumer";case i:var _=h;return z(_._context)+".Provider";case l:return U(h,h.render,"ForwardRef");case d:var O=h.displayName||null;return O!==null?O:oe(h.type)||"Memo";case f:{var R=h,B=R._payload,N=R._init;try{return oe(N(B))}catch{return null}}}return null}var he=Object.assign,$e=0,bt,H,k,F,X,ye,ie;function De(){}De.__reactDisabledLog=!0;function te(){{if($e===0){bt=console.log,H=console.info,k=console.warn,F=console.error,X=console.group,ye=console.groupCollapsed,ie=console.groupEnd;var h={configurable:!0,enumerable:!0,value:De,writable:!0};Object.defineProperties(console,{info:h,log:h,warn:h,error:h,group:h,groupCollapsed:h,groupEnd:h})}$e++}}function ze(){{if($e--,$e===0){var h={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:he({},h,{value:bt}),info:he({},h,{value:H}),warn:he({},h,{value:k}),error:he({},h,{value:F}),group:he({},h,{value:X}),groupCollapsed:he({},h,{value:ye}),groupEnd:he({},h,{value:ie})})}$e<0&&x("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var tt=v.ReactCurrentDispatcher,St;function nt(h,C,_){{if(St===void 0)try{throw Error()}catch(R){var O=R.stack.trim().match(/\n( *(at )?)/);St=O&&O[1]||""}return`
18
+ `+St+h}}var ns=!1,An;{var qm=typeof WeakMap=="function"?WeakMap:Map;An=new qm}function al(h,C){if(!h||ns)return"";{var _=An.get(h);if(_!==void 0)return _}var O;ns=!0;var R=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var B;B=tt.current,tt.current=null,te();try{if(C){var N=function(){throw Error()};if(Object.defineProperty(N.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(N,[])}catch(ce){O=ce}Reflect.construct(h,[],N)}else{try{N.call()}catch(ce){O=ce}h.call(N.prototype)}}else{try{throw Error()}catch(ce){O=ce}h()}}catch(ce){if(ce&&O&&typeof ce.stack=="string"){for(var j=ce.stack.split(`
19
+ `),ae=O.stack.split(`
20
+ `),q=j.length-1,J=ae.length-1;q>=1&&J>=0&&j[q]!==ae[J];)J--;for(;q>=1&&J>=0;q--,J--)if(j[q]!==ae[J]){if(q!==1||J!==1)do if(q--,J--,J<0||j[q]!==ae[J]){var pe=`
21
+ `+j[q].replace(" at new "," at ");return h.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",h.displayName)),typeof h=="function"&&An.set(h,pe),pe}while(q>=1&&J>=0);break}}}finally{ns=!1,tt.current=B,ze(),Error.prepareStackTrace=R}var Ct=h?h.displayName||h.name:"",rt=Ct?nt(Ct):"";return typeof h=="function"&&An.set(h,rt),rt}function Ym(h,C,_){return al(h,!1)}function Zm(h){var C=h.prototype;return!!(C&&C.isReactComponent)}function Mn(h,C,_){if(h==null)return"";if(typeof h=="function")return al(h,Zm(h));if(typeof h=="string")return nt(h);switch(h){case c:return nt("Suspense");case u:return nt("SuspenseList")}if(typeof h=="object")switch(h.$$typeof){case l:return Ym(h.render);case d:return Mn(h.type,C,_);case f:{var O=h,R=O._payload,B=O._init;try{return Mn(B(R),C,_)}catch{}}}return""}var Jt=Object.prototype.hasOwnProperty,ll={},cl=v.ReactDebugCurrentFrame;function Ln(h){if(h){var C=h._owner,_=Mn(h.type,h._source,C?C.type:null);cl.setExtraStackFrame(_)}else cl.setExtraStackFrame(null)}function Jm(h,C,_,O,R){{var B=Function.call.bind(Jt);for(var N in h)if(B(h,N)){var j=void 0;try{if(typeof h[N]!="function"){var ae=Error((O||"React class")+": "+_+" type `"+N+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof h[N]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ae.name="Invariant Violation",ae}j=h[N](C,N,O,_,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(q){j=q}j&&!(j instanceof Error)&&(Ln(R),x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",O||"React class",_,N,typeof j),Ln(null)),j instanceof Error&&!(j.message in ll)&&(ll[j.message]=!0,Ln(R),x("Failed %s type: %s",_,j.message),Ln(null))}}}var Qm=Array.isArray;function rs(h){return Qm(h)}function eg(h){{var C=typeof Symbol=="function"&&Symbol.toStringTag,_=C&&h[Symbol.toStringTag]||h.constructor.name||"Object";return _}}function tg(h){try{return ul(h),!1}catch{return!0}}function ul(h){return""+h}function dl(h){if(tg(h))return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",eg(h)),ul(h)}var fl=v.ReactCurrentOwner,ng={key:!0,ref:!0,__self:!0,__source:!0},hl,pl;function rg(h){if(Jt.call(h,"ref")){var C=Object.getOwnPropertyDescriptor(h,"ref").get;if(C&&C.isReactWarning)return!1}return h.ref!==void 0}function sg(h){if(Jt.call(h,"key")){var C=Object.getOwnPropertyDescriptor(h,"key").get;if(C&&C.isReactWarning)return!1}return h.key!==void 0}function og(h,C){typeof h.ref=="string"&&fl.current}function ig(h,C){{var _=function(){hl||(hl=!0,x("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",C))};_.isReactWarning=!0,Object.defineProperty(h,"key",{get:_,configurable:!0})}}function ag(h,C){{var _=function(){pl||(pl=!0,x("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",C))};_.isReactWarning=!0,Object.defineProperty(h,"ref",{get:_,configurable:!0})}}var lg=function(h,C,_,O,R,B,N){var j={$$typeof:t,type:h,key:C,ref:_,props:N,_owner:B};return j._store={},Object.defineProperty(j._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(j,"_self",{configurable:!1,enumerable:!1,writable:!1,value:O}),Object.defineProperty(j,"_source",{configurable:!1,enumerable:!1,writable:!1,value:R}),Object.freeze&&(Object.freeze(j.props),Object.freeze(j)),j};function cg(h,C,_,O,R){{var B,N={},j=null,ae=null;_!==void 0&&(dl(_),j=""+_),sg(C)&&(dl(C.key),j=""+C.key),rg(C)&&(ae=C.ref,og(C,R));for(B in C)Jt.call(C,B)&&!ng.hasOwnProperty(B)&&(N[B]=C[B]);if(h&&h.defaultProps){var q=h.defaultProps;for(B in q)N[B]===void 0&&(N[B]=q[B])}if(j||ae){var J=typeof h=="function"?h.displayName||h.name||"Unknown":h;j&&ig(N,J),ae&&ag(N,J)}return lg(h,j,ae,R,O,fl.current,N)}}var ss=v.ReactCurrentOwner,ml=v.ReactDebugCurrentFrame;function wt(h){if(h){var C=h._owner,_=Mn(h.type,h._source,C?C.type:null);ml.setExtraStackFrame(_)}else ml.setExtraStackFrame(null)}var os;os=!1;function is(h){return typeof h=="object"&&h!==null&&h.$$typeof===t}function gl(){{if(ss.current){var h=oe(ss.current.type);if(h)return`
22
22
 
23
- Check the render method of \``+h+"`."}return""}}function ig(h){return""}var ml={};function ag(h){{var C=pl();if(!C){var P=typeof h=="string"?h:h.displayName||h.name;P&&(C=`
23
+ Check the render method of \``+h+"`."}return""}}function ug(h){return""}var yl={};function dg(h){{var C=gl();if(!C){var _=typeof h=="string"?h:h.displayName||h.name;_&&(C=`
24
24
 
25
- Check the top-level render call using <`+P+">.")}return C}}function gl(h,C){{if(!h._store||h._store.validated||h.key!=null)return;h._store.validated=!0;var P=ag(C);if(ml[P])return;ml[P]=!0;var D="";h&&h._owner&&h._owner!==ns.current&&(D=" It was passed a child from "+oe(h._owner.type)+"."),xt(h),x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',P,D),xt(null)}}function yl(h,C){{if(typeof h!="object")return;if(ts(h))for(var P=0;P<h.length;P++){var D=h[P];ss(D)&&gl(D,C)}else if(ss(h))h._store&&(h._store.validated=!0);else if(h){var I=S(h);if(typeof I=="function"&&I!==h.entries)for(var F=I.call(h),N;!(N=F.next()).done;)ss(N.value)&&gl(N.value,C)}}}function lg(h){{var C=h.type;if(C==null||typeof C=="string")return;var P;if(typeof C=="function")P=C.propTypes;else if(typeof C=="object"&&(C.$$typeof===l||C.$$typeof===d))P=C.propTypes;else return;if(P){var D=oe(C);Hm(P,h.props,"prop",D,h)}else if(C.PropTypes!==void 0&&!rs){rs=!0;var I=oe(C);x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",I||"Unknown")}typeof C.getDefaultProps=="function"&&!C.getDefaultProps.isReactClassApproved&&x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function cg(h){{for(var C=Object.keys(h.props),P=0;P<C.length;P++){var D=C[P];if(D!=="children"&&D!=="key"){xt(h),x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",D),xt(null);break}}h.ref!==null&&(xt(h),x("Invalid attribute `ref` supplied to `React.Fragment`."),xt(null))}}var vl={};function xl(h,C,P,D,I,F){{var N=j(h);if(!N){var V="";(h===void 0||typeof h=="object"&&h!==null&&Object.keys(h).length===0)&&(V+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ae=ig();ae?V+=ae:V+=pl();var H;h===null?H="null":ts(h)?H="array":h!==void 0&&h.$$typeof===t?(H="<"+(oe(h.type)||"Unknown")+" />",V=" Did you accidentally export a JSX literal instead of a component?"):H=typeof h,x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",H,V)}var q=og(h,C,P,I,F);if(q==null)return q;if(N){var pe=C.children;if(pe!==void 0)if(D)if(ts(pe)){for(var bt=0;bt<pe.length;bt++)yl(pe[bt],h);Object.freeze&&Object.freeze(pe)}else x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else yl(pe,h)}if(Zt.call(C,"key")){var rt=oe(h),ce=Object.keys(C).filter(function(mg){return mg!=="key"}),os=ce.length>0?"{key: someKey, "+ce.join(": ..., ")+": ...}":"{key: someKey}";if(!vl[rt+os]){var pg=ce.length>0?"{"+ce.join(": ..., ")+": ...}":"{}";x(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+_+">.")}return C}}function vl(h,C){{if(!h._store||h._store.validated||h.key!=null)return;h._store.validated=!0;var _=dg(C);if(yl[_])return;yl[_]=!0;var O="";h&&h._owner&&h._owner!==ss.current&&(O=" It was passed a child from "+oe(h._owner.type)+"."),wt(h),x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',_,O),wt(null)}}function xl(h,C){{if(typeof h!="object")return;if(rs(h))for(var _=0;_<h.length;_++){var O=h[_];is(O)&&vl(O,C)}else if(is(h))h._store&&(h._store.validated=!0);else if(h){var R=S(h);if(typeof R=="function"&&R!==h.entries)for(var B=R.call(h),N;!(N=B.next()).done;)is(N.value)&&vl(N.value,C)}}}function fg(h){{var C=h.type;if(C==null||typeof C=="string")return;var _;if(typeof C=="function")_=C.propTypes;else if(typeof C=="object"&&(C.$$typeof===l||C.$$typeof===d))_=C.propTypes;else return;if(_){var O=oe(C);Jm(_,h.props,"prop",O,h)}else if(C.PropTypes!==void 0&&!os){os=!0;var R=oe(C);x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",R||"Unknown")}typeof C.getDefaultProps=="function"&&!C.getDefaultProps.isReactClassApproved&&x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function hg(h){{for(var C=Object.keys(h.props),_=0;_<C.length;_++){var O=C[_];if(O!=="children"&&O!=="key"){wt(h),x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",O),wt(null);break}}h.ref!==null&&(wt(h),x("Invalid attribute `ref` supplied to `React.Fragment`."),wt(null))}}var bl={};function Sl(h,C,_,O,R,B){{var N=E(h);if(!N){var j="";(h===void 0||typeof h=="object"&&h!==null&&Object.keys(h).length===0)&&(j+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ae=ug();ae?j+=ae:j+=gl();var q;h===null?q="null":rs(h)?q="array":h!==void 0&&h.$$typeof===t?(q="<"+(oe(h.type)||"Unknown")+" />",j=" Did you accidentally export a JSX literal instead of a component?"):q=typeof h,x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",q,j)}var J=cg(h,C,_,R,B);if(J==null)return J;if(N){var pe=C.children;if(pe!==void 0)if(O)if(rs(pe)){for(var Ct=0;Ct<pe.length;Ct++)xl(pe[Ct],h);Object.freeze&&Object.freeze(pe)}else x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else xl(pe,h)}if(Jt.call(C,"key")){var rt=oe(h),ce=Object.keys(C).filter(function(xg){return xg!=="key"}),as=ce.length>0?"{key: someKey, "+ce.join(": ..., ")+": ...}":"{key: someKey}";if(!bl[rt+as]){var vg=ce.length>0?"{"+ce.join(": ..., ")+": ...}":"{}";x(`A props object containing a "key" prop is being spread into JSX:
26
26
  let props = %s;
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,os,rt,pg,rt),vl[rt+os]=!0}}return h===r?cg(q):lg(q),q}}function ug(h,C,P){return xl(h,C,P,!0)}function dg(h,C,P){return xl(h,C,P,!1)}var fg=dg,hg=ug;wt.Fragment=r,wt.jsx=fg,wt.jsxs=hg}()),wt}var cs;function Cl(){return cs||(cs=1,process.env.NODE_ENV==="production"?Jt.exports=Sl():Jt.exports=wl()),Jt.exports}var b=Cl(),Ct=(e=>(e[e.CLUSTER=0]="CLUSTER",e[e.MARKER=1]="MARKER",e))(Ct||{});const us=e=>{let t;const n=new Set,r=(u,c)=>{const d=typeof u=="function"?u(t):u;if(!Object.is(d,t)){const f=t;t=c??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(p=>p(t,f))}},s=()=>t,a={setState:r,getState:s,getInitialState:()=>l,subscribe:u=>(n.add(u),()=>n.delete(u))},l=t=e(r,s,a);return a},Tl=e=>e?us(e):us,Pl=e=>e;function El(e,t=Pl){const n=m.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return m.useDebugValue(n),n}const ds={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_LOCATOR_DEMO_APP_API_BASE_URL:"https://develop.place-locator.airc.n3.caffeina.host/api",VITE_LOCATOR_DEMO_APP_GOOGLE_MAPS_API_KEY:"AIzaSyBPE8v1IxBu-lZ1cue8qUrTyHeZEED7ESA"},On=new Map,Qt=e=>{const t=On.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,r])=>[n,r.getState()])):{}},_l=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const r=On.get(n.name);if(r)return{type:"tracked",store:e,...r};const s={connection:t.connect(n),stores:{}};return On.set(n.name,s),{type:"tracked",store:e,...s}},Al=(e,t={})=>(n,r,s)=>{const{enabled:o,anonymousActionType:i,store:a,...l}=t;let u;try{u=(o??(ds?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!u)return e(n,r,s);const{connection:c,...d}=_l(a,u,l);let f=!0;s.setState=(g,S,y)=>{const x=n(g,S);if(!f)return x;const w=y===void 0?{type:i||"anonymous"}:typeof y=="string"?{type:y}:y;return a===void 0?(c==null||c.send(w,r()),x):(c==null||c.send({...w,type:`${a}/${w.type}`},{...Qt(l.name),[a]:s.getState()}),x)};const p=(...g)=>{const S=f;f=!1,n(...g),f=S},v=e(s.setState,r,s);if(d.type==="untracked"?c==null||c.init(v):(d.stores[d.store]=s,c==null||c.init(Object.fromEntries(Object.entries(d.stores).map(([g,S])=>[g,g===d.store?v:S.getState()])))),s.dispatchFromDevtools&&typeof s.dispatch=="function"){let g=!1;const S=s.dispatch;s.dispatch=(...y)=>{(ds?"production":void 0)!=="production"&&y[0].type==="__setState"&&!g&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),g=!0),S(...y)}}return c.subscribe(g=>{var S;switch(g.type){case"ACTION":if(typeof g.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return kn(g.payload,y=>{if(y.type==="__setState"){if(a===void 0){p(y.state);return}Object.keys(y.state).length!==1&&console.error(`
30
+ <%s key={someKey} {...props} />`,as,rt,vg,rt),bl[rt+as]=!0}}return h===r?hg(J):fg(J),J}}function pg(h,C,_){return Sl(h,C,_,!0)}function mg(h,C,_){return Sl(h,C,_,!1)}var gg=mg,yg=pg;Pt.Fragment=r,Pt.jsx=gg,Pt.jsxs=yg}()),Pt}var ds;function Pl(){return ds||(ds=1,process.env.NODE_ENV==="production"?Qt.exports=Cl():Qt.exports=Tl()),Qt.exports}var b=Pl(),st=(e=>(e[e.CLUSTER=0]="CLUSTER",e[e.MARKER=1]="MARKER",e))(st||{});const fs=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(p=>p(t,f))}},s=()=>t,a={setState:r,getState:s,getInitialState:()=>l,subscribe:c=>(n.add(c),()=>n.delete(c))},l=t=e(r,s,a);return a},El=e=>e?fs(e):fs,_l=e=>e;function Al(e,t=_l){const n=m.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return m.useDebugValue(n),n}const hs={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_LOCATOR_DEMO_APP_API_BASE_URL:"http://localhost:5173/api/locator",VITE_LOCATOR_DEMO_APP_GOOGLE_MAPS_API_KEY:"AIzaSyBPE8v1IxBu-lZ1cue8qUrTyHeZEED7ESA"},On=new Map,en=e=>{const t=On.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,r])=>[n,r.getState()])):{}},Ml=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const r=On.get(n.name);if(r)return{type:"tracked",store:e,...r};const s={connection:t.connect(n),stores:{}};return On.set(n.name,s),{type:"tracked",store:e,...s}},Ll=(e,t={})=>(n,r,s)=>{const{enabled:o,anonymousActionType:i,store:a,...l}=t;let c;try{c=(o??(hs?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!c)return e(n,r,s);const{connection:u,...d}=Ml(a,c,l);let f=!0;s.setState=(g,S,v)=>{const x=n(g,S);if(!f)return x;const w=v===void 0?{type:i||"anonymous"}:typeof v=="string"?{type:v}:v;return a===void 0?(u==null||u.send(w,r()),x):(u==null||u.send({...w,type:`${a}/${w.type}`},{...en(l.name),[a]:s.getState()}),x)};const p=(...g)=>{const S=f;f=!1,n(...g),f=S},y=e(s.setState,r,s);if(d.type==="untracked"?u==null||u.init(y):(d.stores[d.store]=s,u==null||u.init(Object.fromEntries(Object.entries(d.stores).map(([g,S])=>[g,g===d.store?y:S.getState()])))),s.dispatchFromDevtools&&typeof s.dispatch=="function"){let g=!1;const S=s.dispatch;s.dispatch=(...v)=>{(hs?"production":void 0)!=="production"&&v[0].type==="__setState"&&!g&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),g=!0),S(...v)}}return u.subscribe(g=>{var S;switch(g.type){case"ACTION":if(typeof g.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return kn(g.payload,v=>{if(v.type==="__setState"){if(a===void 0){p(v.state);return}Object.keys(v.state).length!==1&&console.error(`
31
31
  [zustand devtools middleware] Unsupported __setState action format.
32
32
  When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
33
33
  and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
34
- `);const x=y.state[a];if(x==null)return;JSON.stringify(s.getState())!==JSON.stringify(x)&&p(x);return}s.dispatchFromDevtools&&typeof s.dispatch=="function"&&s.dispatch(y)});case"DISPATCH":switch(g.payload.type){case"RESET":return p(v),a===void 0?c==null?void 0:c.init(s.getState()):c==null?void 0:c.init(Qt(l.name));case"COMMIT":if(a===void 0){c==null||c.init(s.getState());return}return c==null?void 0:c.init(Qt(l.name));case"ROLLBACK":return kn(g.state,y=>{if(a===void 0){p(y),c==null||c.init(s.getState());return}p(y[a]),c==null||c.init(Qt(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return kn(g.state,y=>{if(a===void 0){p(y);return}JSON.stringify(s.getState())!==JSON.stringify(y[a])&&p(y[a])});case"IMPORT_STATE":{const{nextLiftedState:y}=g.payload,x=(S=y.computedStates.slice(-1)[0])==null?void 0:S.state;if(!x)return;p(a===void 0?x:x[a]),c==null||c.send(null,y);return}case"PAUSE_RECORDING":return f=!f}return}}),v},kn=(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)},Ml=()=>Tl()(Al(e=>({mapId:void 0,locations:[],mapDetail:Ct.CLUSTER,isFullscreen:!1,selectedLocation:"",targetLocation:null,localizationConfig:{lang:"IT",labels:{"Search.placeholder":"La tua città","Search.geolocationButton":"Geolocalizzati","LocationList.header":"Mostra {:1} {:2} nella tua area","LocationList.locationDesignator":"luoghi","LocationList.noResults":"Nessun risultato trovato"}},featureFlags:{fullscreen:!0,search:!0},setMapId:t=>e({mapId:t}),setLocations:t=>e({locations:t}),setMapDetail:t=>e({mapDetail:t}),setFullscreen:t=>e({isFullscreen:t}),setSelectedLocation:t=>e({selectedLocation:t}),zoomToLocation:(t,n=15)=>e({targetLocation:{coords:t,zoom:n}}),clearTargetLocation:()=>e({targetLocation:null}),setLocalizationConfig:t=>e(n=>({localizationConfig:{...n.localizationConfig,...t,labels:t.labels?{...n.localizationConfig.labels,...t.labels}:n.localizationConfig.labels}})),setFeatureFlags:t=>e(n=>({featureFlags:{...n.featureFlags,...t}}))}),{name:`LocatorStore_${Date.now()}`})),fs=m.createContext(null);function Ll({children:e}){const[t]=m.useState(Ml);return b.jsx(fs.Provider,{value:t,children:e})}function B(e){const t=m.useContext(fs);if(t===null)throw new Error("useLocatorStore must be used within LocatorStoreProvider");return El(t,e)}var jn={exports:{}};/*!
34
+ `);const x=v.state[a];if(x==null)return;JSON.stringify(s.getState())!==JSON.stringify(x)&&p(x);return}s.dispatchFromDevtools&&typeof s.dispatch=="function"&&s.dispatch(v)});case"DISPATCH":switch(g.payload.type){case"RESET":return p(y),a===void 0?u==null?void 0:u.init(s.getState()):u==null?void 0:u.init(en(l.name));case"COMMIT":if(a===void 0){u==null||u.init(s.getState());return}return u==null?void 0:u.init(en(l.name));case"ROLLBACK":return kn(g.state,v=>{if(a===void 0){p(v),u==null||u.init(s.getState());return}p(v[a]),u==null||u.init(en(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return kn(g.state,v=>{if(a===void 0){p(v);return}JSON.stringify(s.getState())!==JSON.stringify(v[a])&&p(v[a])});case"IMPORT_STATE":{const{nextLiftedState:v}=g.payload,x=(S=v.computedStates.slice(-1)[0])==null?void 0:S.state;if(!x)return;p(a===void 0?x:x[a]),u==null||u.send(null,v);return}case"PAUSE_RECORDING":return f=!f}return}}),y},kn=(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=()=>El()(Ll(e=>({mapId:void 0,locations:[],mapDetail:st.CLUSTER,isFullscreen:!1,selectedLocation:"",shouldRefetch:!1,targetLocation:null,localizationConfig:{lang:"IT",labels:{"Search.placeholder":"La tua città","Search.geolocationButton":"Geolocalizzati","LocationList.header":"Mostra {:1} {:2} nella tua area","LocationList.locationDesignator":"luoghi","LocationList.noResults":"Nessun risultato trovato"}},featureFlags:{fullscreen:!0,search:!0},setMapId:t=>e({mapId:t}),setLocations:t=>e({locations:t}),setMapDetail:t=>e({mapDetail:t}),setFullscreen:t=>e({isFullscreen:t}),setSelectedLocation:t=>e({selectedLocation:t}),setShouldRefetch:t=>e({shouldRefetch:t}),zoomToLocation:(t,n=15)=>e({targetLocation:{coords:t,zoom:n}}),clearTargetLocation:()=>e({targetLocation:null}),setLocalizationConfig:t=>e(n=>({localizationConfig:{...n.localizationConfig,...t,labels:t.labels?{...n.localizationConfig.labels,...t.labels}:n.localizationConfig.labels}})),setFeatureFlags:t=>e(n=>({featureFlags:{...n.featureFlags,...t}}))}),{name:`LocatorStore_${Date.now()}`})),ps=m.createContext(null);function Ol({children:e}){const[t]=m.useState(Dl);return b.jsx(ps.Provider,{value:t,children:e})}function I(e){const t=m.useContext(ps);if(t===null)throw new Error("useLocatorStore must be used within LocatorStoreProvider");return Al(t,e)}var jn={exports:{}};/*!
35
35
  Copyright (c) 2018 Jed Watson.
36
36
  Licensed under the MIT License (MIT), see
37
37
  http://jedwatson.github.io/classnames
38
- */var hs;function Dl(){return hs||(hs=1,function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",i=0;i<arguments.length;i++){var a=arguments[i];a&&(o=s(o,r(a)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var i="";for(var a in o)t.call(o,a)&&o[a]&&(i=s(i,a));return i}function s(o,i){return i?o?o+" "+i:o+i:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(jn)),jn.exports}var Ol=Dl();const Y=is(Ol),ps={root:"_root_1fgzi_7",loaderContainer:"_loaderContainer_1fgzi_92"},ms={root:"_root_17v7m_1",spinner:"_spinner_17v7m_25"};function Tt({className:e,size:t="medium",color:n="primary",...r}){const s=Y(ms.root,e);return b.jsx("div",{className:s,"data-size":t,"data-color":n,...r,children:b.jsx("div",{className:ms.spinner})})}const kl=m.lazy(()=>Promise.resolve().then(()=>Bm)),jl=m.lazy(()=>Promise.resolve().then(()=>zm)),Vl=m.lazy(()=>Promise.resolve().then(()=>Xm));function Nl({children:e,mapProvider:t}){const{name:n,APIKey:r,config:s}=t??{};if(!r||!n)throw new Error("Cannot initialize MapProvider without APIKey and name.");const o=b.jsx("div",{className:ps.loaderContainer,children:b.jsx(Tt,{size:"large",color:"primary"})});return b.jsx(m.Suspense,{fallback:o,children:(()=>{switch(n){case"mapbox":return b.jsx(jl,{apiKey:r,...s??{},children:e});case"here":return b.jsx(Vl,{apiKey:r,...s??{},children:e});case"google":return b.jsx(kl,{apiKey:r,...s??{},children:e});default:return null}})()})}const Il={container:"_container_17c19_4"},Pt={root:"_root_3405i_4",header:"_header_3405i_14",icon:"_icon_3405i_25",body:"_body_3405i_47",content:"_content_3405i_50"};/**
38
+ */var ms;function kl(){return ms||(ms=1,function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",i=0;i<arguments.length;i++){var a=arguments[i];a&&(o=s(o,r(a)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var i="";for(var a in o)t.call(o,a)&&o[a]&&(i=s(i,a));return i}function s(o,i){return i?o?o+" "+i:o+i:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(jn)),jn.exports}var jl=kl();const Y=ls(jl),gs={root:"_root_11zbf_7",loaderContainer:"_loaderContainer_11zbf_100"},ys={root:"_root_17v7m_1",spinner:"_spinner_17v7m_25"};function Et({className:e,size:t="medium",color:n="primary",...r}){const s=Y(ys.root,e);return b.jsx("div",{className:s,"data-size":t,"data-color":n,...r,children:b.jsx("div",{className:ys.spinner})})}const Vl=m.lazy(()=>Promise.resolve().then(()=>Xm)),Nl=m.lazy(()=>Promise.resolve().then(()=>Km)),Il=m.lazy(()=>Promise.resolve().then(()=>Hm));function Rl({children:e,mapProvider:t}){const{name:n,APIKey:r,config:s}=t??{};if(!r||!n)throw new Error("Cannot initialize MapProvider without APIKey and name.");const o=b.jsx("div",{className:gs.loaderContainer,children:b.jsx(Et,{size:"large",color:"primary"})});return b.jsx(m.Suspense,{fallback:o,children:(()=>{switch(n){case"mapbox":return b.jsx(Nl,{apiKey:r,...s??{},children:e});case"here":return b.jsx(Il,{apiKey:r,...s??{},children:e});case"google":return b.jsx(Vl,{apiKey:r,...s??{},children:e});default:return null}})()})}const Fl={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"};/**
39
39
  * @license lucide-react v0.483.0 - ISC
40
40
  *
41
41
  * This source code is licensed under the ISC license.
42
42
  * See the LICENSE file in the root directory of this source tree.
43
- */const Rl=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),gs=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
43
+ */const Bl=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),vs=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
44
44
  * @license lucide-react v0.483.0 - ISC
45
45
  *
46
46
  * This source code is licensed under the ISC license.
47
47
  * See the LICENSE file in the root directory of this source tree.
48
- */var Fl={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"};/**
48
+ */var $l={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"};/**
49
49
  * @license lucide-react v0.483.0 - ISC
50
50
  *
51
51
  * This source code is licensed under the ISC license.
52
52
  * See the LICENSE file in the root directory of this source tree.
53
- */const Bl=m.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:i,...a},l)=>m.createElement("svg",{ref:l,...Fl,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:gs("lucide",s),...a},[...i.map(([u,c])=>m.createElement(u,c)),...Array.isArray(o)?o:[o]]));/**
53
+ */const zl=m.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:i,...a},l)=>m.createElement("svg",{ref:l,...$l,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:vs("lucide",s),...a},[...i.map(([c,u])=>m.createElement(c,u)),...Array.isArray(o)?o:[o]]));/**
54
54
  * @license lucide-react v0.483.0 - ISC
55
55
  *
56
56
  * This source code is licensed under the ISC license.
57
57
  * See the LICENSE file in the root directory of this source tree.
58
- */const ve=(e,t)=>{const n=m.forwardRef(({className:r,...s},o)=>m.createElement(Bl,{ref:o,iconNode:t,className:gs(`lucide-${Rl(e)}`,r),...s}));return n.displayName=`${e}`,n};/**
58
+ */const me=(e,t)=>{const n=m.forwardRef(({className:r,...s},o)=>m.createElement(zl,{ref:o,iconNode:t,className:vs(`lucide-${Bl(e)}`,r),...s}));return n.displayName=`${e}`,n};/**
59
59
  * @license lucide-react v0.483.0 - ISC
60
60
  *
61
61
  * This source code is licensed under the ISC license.
62
62
  * See the LICENSE file in the root directory of this source tree.
63
- */const $l=ve("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
63
+ */const Ul=me("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
64
64
  * @license lucide-react v0.483.0 - ISC
65
65
  *
66
66
  * This source code is licensed under the ISC license.
67
67
  * See the LICENSE file in the root directory of this source tree.
68
- */const zl=ve("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
68
+ */const Xl=me("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
69
69
  * @license lucide-react v0.483.0 - ISC
70
70
  *
71
71
  * This source code is licensed under the ISC license.
72
72
  * See the LICENSE file in the root directory of this source tree.
73
- */const Ul=ve("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
73
+ */const Wl=me("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
74
74
  * @license lucide-react v0.483.0 - ISC
75
75
  *
76
76
  * This source code is licensed under the ISC license.
77
77
  * See the LICENSE file in the root directory of this source tree.
78
- */const Xl=ve("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"}]]);/**
78
+ */const Kl=me("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
79
79
  * @license lucide-react v0.483.0 - ISC
80
80
  *
81
81
  * This source code is licensed under the ISC license.
82
82
  * See the LICENSE file in the root directory of this source tree.
83
- */const Wl=ve("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"}]]);/**
83
+ */const Gl=me("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"}]]);/**
84
84
  * @license lucide-react v0.483.0 - ISC
85
85
  *
86
86
  * This source code is licensed under the ISC license.
87
87
  * See the LICENSE file in the root directory of this source tree.
88
- */const Kl=ve("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"}]]);/**
88
+ */const Hl=me("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"}]]);/**
89
89
  * @license lucide-react v0.483.0 - ISC
90
90
  *
91
91
  * This source code is licensed under the ISC license.
92
92
  * See the LICENSE file in the root directory of this source tree.
93
- */const Gl=ve("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"}]]);/**
93
+ */const ql=me("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"}]]);/**
94
94
  * @license lucide-react v0.483.0 - ISC
95
95
  *
96
96
  * This source code is licensed under the ISC license.
97
97
  * See the LICENSE file in the root directory of this source tree.
98
- */const Hl=ve("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
98
+ */const Yl=me("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"}]]);/**
99
99
  * @license lucide-react v0.483.0 - ISC
100
100
  *
101
101
  * This source code is licensed under the ISC license.
102
102
  * See the LICENSE file in the root directory of this source tree.
103
- */const ql=ve("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"}]]);/**
103
+ */const Zl=me("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
104
104
  * @license lucide-react v0.483.0 - ISC
105
105
  *
106
106
  * This source code is licensed under the ISC license.
107
107
  * See the LICENSE file in the root directory of this source tree.
108
- */const Yl=ve("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ys=m.createContext({});function Zl(e){const t=m.useRef(null);return t.current===null&&(t.current=e()),t.current}const Vn=typeof window<"u",Jl=Vn?m.useLayoutEffect:m.useEffect,Nn=m.createContext(null),vs=m.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Ql(e=!0){const t=m.useContext(Nn);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,o=m.useId();m.useEffect(()=>{if(e)return s(o)},[e]);const i=m.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,i]:[!0]}function In(e,t){e.indexOf(t)===-1&&e.push(t)}function Rn(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const le=e=>e;let st=le,Oe=le;process.env.NODE_ENV!=="production"&&(st=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Oe=(e,t)=>{if(!e)throw new Error(t)});const ec={useManualTiming:!1};function Fn(e){let t;return()=>(t===void 0&&(t=e()),t)}const ot=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Bn{constructor(){this.subscriptions=[]}add(t){return In(this.subscriptions,t),()=>Rn(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let o=0;o<s;o++){const i=this.subscriptions[o];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const xe=e=>e*1e3,Ce=e=>e/1e3;function xs(e,t){return t?e*(1e3/t):0}const bs=new Set;function en(e,t,n){e||bs.has(t)||(console.warn(t),bs.add(t))}const tc=Fn(()=>window.ScrollTimeline!==void 0);class nc{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(s=>{if(tc()&&s.attachTimeline)return s.attachTimeline(t);if(typeof n=="function")return n(s)});return()=>{r.forEach((s,o)=>{s&&s(),this.animations[o].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 rc extends nc{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function $n(e,t){return e?e[t]||e.default||e:void 0}const zn=2e4;function Ss(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<zn;)t+=n,r=e.next(t);return t>=zn?1/0:t}function Un(e){return typeof e=="function"}function ws(e,t){e.timeline=t,e.onfinish=null}const Xn=e=>Array.isArray(e)&&typeof e[0]=="number",sc={linearEasing:void 0};function oc(e,t){const n=Fn(e);return()=>{var r;return(r=sc[t])!==null&&r!==void 0?r:n()}}const tn=oc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Cs=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)r+=e(ot(0,s-1,o))+", ";return`linear(${r.substring(0,r.length-2)})`};function Ts(e){return!!(typeof e=="function"&&tn()||!e||typeof e=="string"&&(e in Wn||tn())||Xn(e)||Array.isArray(e)&&e.every(Ts))}const Et=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Wn={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 Ps(e,t){if(e)return typeof e=="function"&&tn()?Cs(e,t):Xn(e)?Et(e):Array.isArray(e)?e.map(n=>Ps(n,t)||Wn.easeOut):Wn[e]}const nn=["read","resolveKeyframes","update","preRender","render","postRender"],Es={value:null};function ic(e,t){let n=new Set,r=new Set,s=!1,o=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function u(d){i.has(d)&&(c.schedule(d),e()),l++,d(a)}const c={schedule:(d,f=!1,p=!1)=>{const g=p&&s?n:r;return f&&i.add(d),g.has(d)||g.add(d),d},cancel:d=>{r.delete(d),i.delete(d)},process:d=>{if(a=d,s){o=!0;return}s=!0,[n,r]=[r,n],n.forEach(u),t&&Es.value&&Es.value.frameloop[t].push(l),l=0,n.clear(),s=!1,o&&(o=!1,c.process(d))}};return c}const ac=40;function _s(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,i=nn.reduce((y,x)=>(y[x]=ic(o,t?x:void 0),y),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:d,postRender:f}=i,p=()=>{const y=performance.now();n=!1,s.delta=r?1e3/60:Math.max(Math.min(y-s.timestamp,ac),1),s.timestamp=y,s.isProcessing=!0,a.process(s),l.process(s),u.process(s),c.process(s),d.process(s),f.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(p))},v=()=>{n=!0,r=!0,s.isProcessing||e(p)};return{schedule:nn.reduce((y,x)=>{const w=i[x];return y[x]=(A,T=!1,M=!1)=>(n||v(),w.schedule(A,T,M)),y},{}),cancel:y=>{for(let x=0;x<nn.length;x++)i[nn[x]].cancel(y)},state:s,steps:i}}const{schedule:$,cancel:ke,state:Q,steps:Kn}=_s(typeof requestAnimationFrame<"u"?requestAnimationFrame:le,!0),{schedule:Gn}=_s(queueMicrotask,!1);let rn;function lc(){rn=void 0}const be={now:()=>(rn===void 0&&be.set(Q.isProcessing||ec.useManualTiming?Q.timestamp:performance.now()),rn),set:e=>{rn=e,queueMicrotask(lc)}},me={x:!1,y:!1};function As(){return me.x||me.y}function cc(e){return e==="x"||e==="y"?me[e]?null:(me[e]=!0,()=>{me[e]=!1}):me.x||me.y?null:(me.x=me.y=!0,()=>{me.x=me.y=!1})}function uc(e,t,n){var r;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;const o=(r=void 0)!==null&&r!==void 0?r:s.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}function Ms(e,t){const n=uc(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function Ls(e){return!(e.pointerType==="touch"||As())}function dc(e,t,n={}){const[r,s,o]=Ms(e,n),i=a=>{if(!Ls(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const c=d=>{Ls(d)&&(u(d),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,s)};return r.forEach(a=>{a.addEventListener("pointerenter",i,s)}),o}function Ds(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 Os=(e,t)=>t?e===t?!0:Os(e,t.parentElement):!1,Hn=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,fc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function hc(e){return fc.has(e.tagName)||e.tabIndex!==-1}const _t=new WeakSet;function ks(e){return t=>{t.key==="Enter"&&e(t)}}function qn(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const pc=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=ks(()=>{if(_t.has(n))return;qn(n,"down");const s=ks(()=>{qn(n,"up")}),o=()=>qn(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function js(e){return Hn(e)&&!As()}function mc(e,t,n={}){const[r,s,o]=Ms(e,n),i=a=>{const l=a.currentTarget;if(!l||!js(a)||_t.has(l))return;_t.add(l),Ds(a,"set");const u=t(l,a),c=(p,v)=>{l.removeEventListener("pointerup",d),l.removeEventListener("pointercancel",f),Ds(p,"release"),!(!js(p)||!_t.has(l))&&(_t.delete(l),typeof u=="function"&&u(p,{success:v}))},d=p=>{(p.isTrusted?gc(p,l instanceof Element?l.getBoundingClientRect():{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}):!1)?c(p,!1):c(p,!(l instanceof Element)||Os(l,p.target))},f=p=>{c(p,!1)};l.addEventListener("pointerup",d,s),l.addEventListener("pointercancel",f,s),l.addEventListener("lostpointercapture",f,s)};return r.forEach(a=>{a=n.useGlobalTarget?window:a;let l=!1;a instanceof HTMLElement&&(l=!0,!hc(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0)),a.addEventListener("pointerdown",i,s),l&&a.addEventListener("focus",u=>pc(u,s),s)}),o}function gc(e,t){return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}const Vs=30,yc=e=>!isNaN(parseFloat(e));class vc{constructor(t,n={}){this.version="12.5.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,s=!0)=>{const o=be.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),s&&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=be.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=yc(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&en(!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 Bn);const r=this.events[t].add(n);return t==="change"?()=>{r(),$.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=be.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Vs)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Vs);return xs(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 vc(e,t)}const Ns=m.createContext({strict:!1}),Is={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"]},it={};for(const e in Is)it[e]={isEnabled:t=>Is[e].some(n=>!!t[n])};function xc(e){for(const t in e)it[t]={...it[t],...e[t]}}const bc=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 sn(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||bc.has(e)}let Rs=e=>!sn(e);function Sc(e){e&&(Rs=t=>t.startsWith("on")?!sn(t):e(t))}try{Sc(require("@emotion/is-prop-valid").default)}catch{}function wc(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(Rs(s)||n===!0&&sn(s)||!t&&!sn(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}function Cc(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&en(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,s)=>s==="create"?e:(t.has(s)||t.set(s,e(s)),t.get(s))})}const on=m.createContext({});function an(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"],Zn=["initial",...Yn];function ln(e){return an(e.animate)||Zn.some(t=>Mt(e[t]))}function Fs(e){return!!(ln(e)||e.variants)}function Tc(e,t){if(ln(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 Pc(e){const{initial:t,animate:n}=Tc(e,m.useContext(on));return m.useMemo(()=>({initial:t,animate:n}),[Bs(t),Bs(n)])}function Bs(e){return Array.isArray(e)?e.join(" "):e}const Ec=Symbol.for("motionComponentSymbol");function at(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function _c(e,t,n){return m.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):at(n)&&(n.current=r))},[t])}const Jn=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),$s="data-"+Jn("framerAppearId"),zs=m.createContext({});function Ac(e,t,n,r,s){var o,i;const{visualElement:a}=m.useContext(on),l=m.useContext(Ns),u=m.useContext(Nn),c=m.useContext(vs).reducedMotion,d=m.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:a,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:c}));const f=d.current,p=m.useContext(zs);f&&!f.projection&&s&&(f.type==="html"||f.type==="svg")&&Mc(d.current,n,s,p);const v=m.useRef(!1);m.useInsertionEffect(()=>{f&&v.current&&f.update(n,u)});const g=n[$s],S=m.useRef(!!g&&!(!((o=window.MotionHandoffIsComplete)===null||o===void 0)&&o.call(window,g))&&((i=window.MotionHasOptimisedAnimation)===null||i===void 0?void 0:i.call(window,g)));return Jl(()=>{f&&(v.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Gn.render(f.render),S.current&&f.animationState&&f.animationState.animateChanges())}),m.useEffect(()=>{f&&(!S.current&&f.animationState&&f.animationState.animateChanges(),S.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)===null||y===void 0||y.call(window,g)}),S.current=!1))}),f}function Mc(e,t,n,r){const{layoutId:s,layout:o,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Us(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!i||a&&at(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:u})}function Us(e){if(e)return e.options.allowProjection!==!1?e.projection:Us(e.parent)}function Lc({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:s}){var o,i;e&&xc(e);function a(u,c){let d;const f={...m.useContext(vs),...u,layoutId:Dc(u)},{isStatic:p}=f,v=Pc(u),g=r(u,p);if(!p&&Vn){Oc(f,e);const S=kc(f);d=S.MeasureLayout,v.visualElement=Ac(s,g,f,t,S.ProjectionNode)}return b.jsxs(on.Provider,{value:v,children:[d&&v.visualElement?b.jsx(d,{visualElement:v.visualElement,...f}):null,n(s,u,_c(g,v.visualElement,c),g,p,v.visualElement)]})}a.displayName=`motion.${typeof s=="string"?s:`create(${(i=(o=s.displayName)!==null&&o!==void 0?o:s.name)!==null&&i!==void 0?i:""})`}`;const l=m.forwardRef(a);return l[Ec]=s,l}function Dc({layoutId:e}){const t=m.useContext(ys).id;return t&&e!==void 0?t+"-"+e:e}function Oc(e,t){const n=m.useContext(Ns).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?st(!1,r):Oe(!1,r)}}function kc(e){const{drag:t,layout:n}=it;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 Xs=e=>t=>typeof t=="string"&&t.startsWith(e),Qn=Xs("--"),jc=Xs("var(--"),er=e=>jc(e)?Vc.test(e.split("/*")[0].trim()):!1,Vc=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Lt={};function Nc(e){for(const t in e)Lt[t]=e[t],Qn(t)&&(Lt[t].isCSSVariable=!0)}const lt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ze=new Set(lt);function Ws(e,{layout:t,layoutId:n}){return ze.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Lt[e]||e==="opacity")}const ne=e=>!!(e&&e.getVelocity),Ks=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Te=(e,t,n)=>n>t?t:n<e?e:n,ct={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Dt={...ct,transform:e=>Te(0,1,e)},cn={...ct,default:1},Ot=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),je=Ot("deg"),Se=Ot("%"),L=Ot("px"),Ic=Ot("vh"),Rc=Ot("vw"),Gs={...Se,parse:e=>Se.parse(e)/100,transform:e=>Se.transform(e*100)},Fc={borderWidth:L,borderTopWidth:L,borderRightWidth:L,borderBottomWidth:L,borderLeftWidth:L,borderRadius:L,radius:L,borderTopLeftRadius:L,borderTopRightRadius:L,borderBottomRightRadius:L,borderBottomLeftRadius:L,width:L,maxWidth:L,height:L,maxHeight:L,top:L,right:L,bottom:L,left:L,padding:L,paddingTop:L,paddingRight:L,paddingBottom:L,paddingLeft:L,margin:L,marginTop:L,marginRight:L,marginBottom:L,marginLeft:L,backgroundPositionX:L,backgroundPositionY:L},Bc={rotate:je,rotateX:je,rotateY:je,rotateZ:je,scale:cn,scaleX:cn,scaleY:cn,scaleZ:cn,skew:je,skewX:je,skewY:je,distance:L,translateX:L,translateY:L,translateZ:L,x:L,y:L,z:L,perspective:L,transformPerspective:L,opacity:Dt,originX:Gs,originY:Gs,originZ:L},Hs={...ct,transform:Math.round},tr={...Fc,...Bc,zIndex:Hs,size:L,fillOpacity:Dt,strokeOpacity:Dt,numOctaves:Hs},$c={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},zc=lt.length;function Uc(e,t,n){let r="",s=!0;for(let o=0;o<zc;o++){const i=lt[o],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 u=Ks(a,tr[i]);if(!l){s=!1;const c=$c[i]||i;r+=`${c}(${u}) `}n&&(t[i]=u)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function nr(e,t,n){const{style:r,vars:s,transformOrigin:o}=e;let i=!1,a=!1;for(const l in t){const u=t[l];if(ze.has(l)){i=!0;continue}else if(Qn(l)){s[l]=u;continue}else{const c=Ks(u,tr[l]);l.startsWith("origin")?(a=!0,o[l]=c):r[l]=c}}if(t.transform||(i||n?r.transform=Uc(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=o;r.transformOrigin=`${l} ${u} ${c}`}}const rr=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function qs(e,t,n){for(const r in t)!ne(t[r])&&!Ws(r,n)&&(e[r]=t[r])}function Xc({transformTemplate:e},t){return m.useMemo(()=>{const n=rr();return nr(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Wc(e,t){const n=e.style||{},r={};return qs(r,n,e),Object.assign(r,Xc(e,t)),r}function Kc(e,t){const n={},r=Wc(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 Gc=["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:!!(Gc.indexOf(e)>-1||/[A-Z]/u.test(e))}const Hc={offset:"stroke-dashoffset",array:"stroke-dasharray"},qc={offset:"strokeDashoffset",array:"strokeDasharray"};function Yc(e,t,n=1,r=0,s=!0){e.pathLength=1;const o=s?Hc:qc;e[o.offset]=L.transform(-r);const i=L.transform(t),a=L.transform(n);e[o.array]=`${i} ${a}`}function Ys(e,t,n){return typeof e=="string"?e:L.transform(t+n*e)}function Zc(e,t,n){const r=Ys(t,e.x,e.width),s=Ys(n,e.y,e.height);return`${r} ${s}`}function or(e,{attrX:t,attrY:n,attrScale:r,originX:s,originY:o,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...u},c,d){if(nr(e,u,d),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:p,dimensions:v}=e;f.transform&&(v&&(p.transform=f.transform),delete f.transform),v&&(s!==void 0||o!==void 0||p.transform)&&(p.transformOrigin=Zc(v,s!==void 0?s:.5,o!==void 0?o:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&Yc(f,i,a,l,!1)}const Zs=()=>({...rr(),attrs:{}}),ir=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Jc(e,t,n,r){const s=m.useMemo(()=>{const o=Zs();return or(o,t,ir(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};qs(o,e.style,e),s.style={...o,...s.style}}return s}function Qc(e=!1){return(n,r,s,{latestValues:o},i)=>{const l=(sr(n)?Jc:Kc)(r,o,i,n),u=wc(r,typeof n=="string",e),c=n!==m.Fragment?{...u,...l,ref:s}:{},{children:d}=r,f=m.useMemo(()=>ne(d)?d.get():d,[d]);return m.createElement(n,{...c,children:f})}}function Js(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function ar(e,t,n,r){if(typeof t=="function"){const[s,o]=Js(r);t=t(n!==void 0?n:e.custom,s,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,o]=Js(r);t=t(n!==void 0?n:e.custom,s,o)}return t}const lr=e=>Array.isArray(e),eu=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),tu=e=>lr(e)?e[e.length-1]||0:e;function un(e){const t=ne(e)?e.get():e;return eu(t)?t.toValue():t}function nu({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,s,o){const i={latestValues:ru(r,s,o,e),renderState:t()};return n&&(i.onMount=a=>n({props:r,current:a,...i}),i.onUpdate=a=>n(a)),i}const Qs=e=>(t,n)=>{const r=m.useContext(on),s=m.useContext(Nn),o=()=>nu(e,t,r,s);return n?o():Zl(o)};function ru(e,t,n,r){const s={},o=r(e,{});for(const f in o)s[f]=un(o[f]);let{initial:i,animate:a}=e;const l=ln(e),u=Fs(e);t&&u&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||i===!1;const d=c?a:i;if(d&&typeof d!="boolean"&&!an(d)){const f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){const v=ar(e,f[p]);if(v){const{transitionEnd:g,transition:S,...y}=v;for(const x in y){let w=y[x];if(Array.isArray(w)){const A=c?w.length-1:0;w=w[A]}w!==null&&(s[x]=w)}for(const x in g)s[x]=g[x]}}}return s}function cr(e,t,n){var r;const{style:s}=e,o={};for(const i in s)(ne(s[i])||t.style&&ne(t.style[i])||Ws(i,e)||((r=n==null?void 0:n.getValue(i))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(o[i]=s[i]);return o}const su={useVisualState:Qs({scrapeMotionValuesFromProps:cr,createRenderState:rr})};function eo(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 to(e,{style:t,vars:n},r,s){Object.assign(e.style,t,s&&s.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const no=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 ro(e,t,n,r){to(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(no.has(s)?s:Jn(s),t.attrs[s])}function so(e,t,n){const r=cr(e,t,n);for(const s in e)if(ne(e[s])||ne(t[s])){const o=lt.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[o]=e[s]}return r}const oo=["x","y","width","height","cx","cy","r"],ou={useVisualState:Qs({scrapeMotionValuesFromProps:so,createRenderState:Zs,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:s})=>{if(!n)return;let o=!!e.drag;if(!o){for(const a in s)if(ze.has(a)){o=!0;break}}if(!o)return;let i=!t;if(t)for(let a=0;a<oo.length;a++){const l=oo[a];e[l]!==t[l]&&(i=!0)}i&&$.read(()=>{eo(n,r),$.render(()=>{or(r,s,ir(n.tagName),e.transformTemplate),ro(n,r)})})}})};function iu(e,t){return function(r,{forwardMotionProps:s}={forwardMotionProps:!1}){const i={...sr(r)?ou:su,preloadedFeatures:e,useRender:Qc(s),createVisualElement:t,Component:r};return Lc(i)}}function kt(e,t,n){const r=e.getProps();return ar(r,t,n!==void 0?n:r.custom,e)}const io=new Set(["width","height","top","left","right","bottom",...lt]);function au(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,At(n))}function lu(e,t){const n=kt(e,t);let{transitionEnd:r={},transition:s={},...o}=n||{};o={...o,...r};for(const i in o){const a=tu(o[i]);au(e,i,a)}}function cu(e){return!!(ne(e)&&e.add)}function ur(e,t){const n=e.getValue("willChange");if(cu(n))return n.add(t)}function ao(e){return e.props[$s]}const lo=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,uu=1e-7,du=12;function fu(e,t,n,r,s){let o,i,a=0;do i=t+(n-t)/2,o=lo(i,r,s)-e,o>0?n=i:t=i;while(Math.abs(o)>uu&&++a<du);return i}function jt(e,t,n,r){if(e===t&&n===r)return le;const s=o=>fu(o,0,1,e,n);return o=>o===0||o===1?o:lo(s(o),t,r)}const co=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,uo=e=>t=>1-e(1-t),fo=jt(.33,1.53,.69,.99),dr=uo(fo),ho=co(dr),po=e=>(e*=2)<1?.5*dr(e):.5*(2-Math.pow(2,-10*(e-1))),fr=e=>1-Math.sin(Math.acos(e)),mo=uo(fr),go=co(fr),yo=e=>/^0[^.\s]+$/u.test(e);function hu(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||yo(e):!0}const Vt=e=>Math.round(e*1e5)/1e5,hr=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function pu(e){return e==null}const mu=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,pr=(e,t)=>n=>!!(typeof n=="string"&&mu.test(n)&&n.startsWith(e)||t&&!pu(n)&&Object.prototype.hasOwnProperty.call(n,t)),vo=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,o,i,a]=r.match(hr);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},gu=e=>Te(0,255,e),mr={...ct,transform:e=>Math.round(gu(e))},Ue={test:pr("rgb","red"),parse:vo("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+mr.transform(e)+", "+mr.transform(t)+", "+mr.transform(n)+", "+Vt(Dt.transform(r))+")"};function yu(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const gr={test:pr("#"),parse:yu,transform:Ue.transform},ut={test:pr("hsl","hue"),parse:vo("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Se.transform(Vt(t))+", "+Se.transform(Vt(n))+", "+Vt(Dt.transform(r))+")"},re={test:e=>Ue.test(e)||gr.test(e)||ut.test(e),parse:e=>Ue.test(e)?Ue.parse(e):ut.test(e)?ut.parse(e):gr.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ue.transform(e):ut.transform(e)},vu=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function xu(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(hr))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(vu))===null||n===void 0?void 0:n.length)||0)>0}const xo="number",bo="color",bu="var",Su="var(",So="${}",wu=/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 Nt(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let o=0;const a=t.replace(wu,l=>(re.test(l)?(r.color.push(o),s.push(bo),n.push(re.parse(l))):l.startsWith(Su)?(r.var.push(o),s.push(bu),n.push(l)):(r.number.push(o),s.push(xo),n.push(parseFloat(l))),++o,So)).split(So);return{values:n,split:a,indexes:r,types:s}}function wo(e){return Nt(e).values}function Co(e){const{split:t,types:n}=Nt(e),r=t.length;return s=>{let o="";for(let i=0;i<r;i++)if(o+=t[i],s[i]!==void 0){const a=n[i];a===xo?o+=Vt(s[i]):a===bo?o+=re.transform(s[i]):o+=s[i]}return o}}const Cu=e=>typeof e=="number"?0:e;function Tu(e){const t=wo(e);return Co(e)(t.map(Cu))}const Ve={test:xu,parse:wo,createTransformer:Co,getAnimatableNone:Tu},Pu=new Set(["brightness","contrast","saturate","opacity"]);function Eu(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(hr)||[];if(!r)return e;const s=n.replace(r,"");let o=Pu.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+s+")"}const _u=/\b([a-z-]*)\(.*?\)/gu,yr={...Ve,getAnimatableNone:e=>{const t=e.match(_u);return t?t.map(Eu).join(" "):e}},Au={...tr,color:re,backgroundColor:re,outlineColor:re,fill:re,stroke:re,borderColor:re,borderTopColor:re,borderRightColor:re,borderBottomColor:re,borderLeftColor:re,filter:yr,WebkitFilter:yr},To=e=>Au[e];function Po(e,t){let n=To(e);return n!==yr&&(n=Ve),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Mu=new Set(["auto","none","0"]);function Lu(e,t,n){let r=0,s;for(;r<e.length&&!s;){const o=e[r];typeof o=="string"&&!Mu.has(o)&&Nt(o).values.length&&(s=e[r]),r++}if(s&&n)for(const o of t)e[o]=Po(n,s)}const Xe=e=>e*180/Math.PI,vr=e=>{const t=Xe(Math.atan2(e[1],e[0]));return xr(t)},Du={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:vr,rotateZ:vr,skewX:e=>Xe(Math.atan(e[1])),skewY:e=>Xe(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},xr=e=>(e=e%360,e<0&&(e+=360),e),Eo=vr,_o=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Ao=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Ou={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:_o,scaleY:Ao,scale:e=>(_o(e)+Ao(e))/2,rotateX:e=>xr(Xe(Math.atan2(e[6],e[5]))),rotateY:e=>xr(Xe(Math.atan2(-e[2],e[0]))),rotateZ:Eo,rotate:Eo,skewX:e=>Xe(Math.atan(e[4])),skewY:e=>Xe(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Mo(e){return e.includes("scale")?1:0}function br(e,t){if(!e||e==="none")return Mo(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=Ou,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Du,s=a}if(!s)return Mo(t);const o=r[t],i=s[1].split(",").map(ju);return typeof o=="function"?o(i):i[o]}const ku=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return br(n,t)};function ju(e){return parseFloat(e.trim())}const Lo=e=>e===ct||e===L,Vu=new Set(["x","y","z"]),Nu=lt.filter(e=>!Vu.has(e));function Iu(e){const t=[];return Nu.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const dt={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})=>br(t,"x"),y:(e,{transform:t})=>br(t,"y")};dt.translateX=dt.x,dt.translateY=dt.y;const We=new Set;let Sr=!1,wr=!1;function Do(){if(wr){const e=Array.from(We).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=Iu(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([o,i])=>{var a;(a=r.getValue(o))===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,Sr=!1,We.forEach(e=>e.complete()),We.clear()}function Oo(){We.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(wr=!0)})}function Ru(){Oo(),Do()}class Cr{constructor(t,n,r,s,o,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=s,this.element=o,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(We.add(this),Sr||(Sr=!0,$.read(Oo),$.resolveKeyframes(Do))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;for(let o=0;o<t.length;o++)if(t[o]===null)if(o===0){const i=s==null?void 0:s.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),s&&i===void 0&&s.set(t[0])}else t[o]=t[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),We.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,We.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const ko=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Fu=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Bu(e){const t=Fu.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}const $u=4;function jo(e,t,n=1){Oe(n<=$u,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,s]=Bu(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const i=o.trim();return ko(i)?parseFloat(i):i}return er(s)?jo(s,t,n+1):s}const Vo=e=>t=>t.test(e),No=[ct,L,Se,je,Rc,Ic,{test:e=>e==="auto",parse:e=>e}],Io=e=>No.find(Vo(e));class Ro extends Cr{constructor(t,n,r,s,o){super(t,n,r,s,o,!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 u=t[l];if(typeof u=="string"&&(u=u.trim(),er(u))){const c=jo(u,n.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!io.has(r)||t.length!==2)return;const[s,o]=t,i=Io(s),a=Io(o);if(i!==a)if(Lo(i)&&Lo(a))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)hu(t[s])&&r.push(s);r.length&&Lu(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=dt[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:s}=this;if(!n||!n.current)return;const o=n.getValue(r);o&&o.jump(this.measuredOrigin,!1);const i=s.length-1,a=s[i];s[i]=dt[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,u])=>{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const Fo=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ve.test(e)||e==="0")&&!e.startsWith("url("));function zu(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 Uu(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],i=Fo(s,t),a=Fo(o,t);return st(i===a,`You are trying to animate ${t} from "${s}" to "${o}". ${s} is not an animatable value - to enable this animation set ${s} to a value animatable to ${o} via the \`style\` property.`),!i||!a?!1:zu(e)||(n==="spring"||Un(n))&&r}const Xu=e=>e!==null;function dn(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(Xu),o=t&&n!=="loop"&&t%2===1?0:s.length-1;return!o||r===void 0?s[o]:r}const Wu=40;class Bo{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=be.now(),this.options={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:o,repeatType:i,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>Wu?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Ru(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=be.now(),this.hasAttemptedResolve=!0;const{name:r,type:s,velocity:o,delay:i,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!Uu(t,r,s,o))if(i)this.options.duration=0;else{l&&l(dn(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const c=this.initPlayback(t,n);c!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...c},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 U=(e,t,n)=>e+(t-e)*n;function Tr(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 Ku({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,o=0,i=0;if(!t)s=o=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=Tr(l,a,e+1/3),o=Tr(l,a,e),i=Tr(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(i*255),alpha:r}}function fn(e,t){return n=>n>0?t:e}const Pr=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},Gu=[gr,Ue,ut],Hu=e=>Gu.find(t=>t.test(e));function $o(e){const t=Hu(e);if(st(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===ut&&(n=Ku(n)),n}const zo=(e,t)=>{const n=$o(e),r=$o(t);if(!n||!r)return fn(e,t);const s={...n};return o=>(s.red=Pr(n.red,r.red,o),s.green=Pr(n.green,r.green,o),s.blue=Pr(n.blue,r.blue,o),s.alpha=U(n.alpha,r.alpha,o),Ue.transform(s))},qu=(e,t)=>n=>t(e(n)),It=(...e)=>e.reduce(qu),Er=new Set(["none","hidden"]);function Yu(e,t){return Er.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Zu(e,t){return n=>U(e,t,n)}function _r(e){return typeof e=="number"?Zu:typeof e=="string"?er(e)?fn:re.test(e)?zo:ed:Array.isArray(e)?Uo:typeof e=="object"?re.test(e)?zo:Ju:fn}function Uo(e,t){const n=[...e],r=n.length,s=e.map((o,i)=>_r(o)(o,t[i]));return o=>{for(let i=0;i<r;i++)n[i]=s[i](o);return n}}function Ju(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=_r(e[s])(e[s],t[s]));return s=>{for(const o in r)n[o]=r[o](s);return n}}function Qu(e,t){var n;const r=[],s={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],a=e.indexes[i][s[i]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[o]=l,s[i]++}return r}const ed=(e,t)=>{const n=Ve.createTransformer(t),r=Nt(e),s=Nt(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?Er.has(e)&&!s.values.length||Er.has(t)&&!r.values.length?Yu(e,t):It(Uo(Qu(r,s),s.values),n):(st(!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.`),fn(e,t))};function Xo(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?U(e,t,n):_r(e)(e,t)}const td=5;function Wo(e,t,n){const r=Math.max(t-td,0);return xs(n-e(r),t-r)}const X={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},Ko=.001;function nd({duration:e=X.duration,bounce:t=X.bounce,velocity:n=X.velocity,mass:r=X.mass}){let s,o;st(e<=xe(X.maxDuration),"Spring duration must be 10 seconds or less");let i=1-t;i=Te(X.minDamping,X.maxDamping,i),e=Te(X.minDuration,X.maxDuration,Ce(e)),i<1?(s=u=>{const c=u*i,d=c*e,f=c-n,p=Ar(u,i),v=Math.exp(-d);return Ko-f/p*v},o=u=>{const d=u*i*e,f=d*n+n,p=Math.pow(i,2)*Math.pow(u,2)*e,v=Math.exp(-d),g=Ar(Math.pow(u,2),i);return(-s(u)+Ko>0?-1:1)*((f-p)*v)/g}):(s=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-.001+c*d},o=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const a=5/e,l=sd(s,o,a);if(e=xe(e),isNaN(l))return{stiffness:X.stiffness,damping:X.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:i*2*Math.sqrt(r*u),duration:e}}}const rd=12;function sd(e,t,n){let r=n;for(let s=1;s<rd;s++)r=r-e(r)/t(r);return r}function Ar(e,t){return e*Math.sqrt(1-t*t)}const od=["duration","bounce"],id=["stiffness","damping","mass"];function Go(e,t){return t.some(n=>e[n]!==void 0)}function ad(e){let t={velocity:X.velocity,stiffness:X.stiffness,damping:X.damping,mass:X.mass,isResolvedFromDuration:!1,...e};if(!Go(e,id)&&Go(e,od))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,o=2*Te(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:X.mass,stiffness:s,damping:o}}else{const n=nd(e);t={...t,...n,mass:X.mass},t.isResolvedFromDuration=!0}return t}function Ho(e=X.visualDuration,t=X.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const o=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:p}=ad({...n,velocity:-Ce(n.velocity||0)}),v=f||0,g=u/(2*Math.sqrt(l*c)),S=i-o,y=Ce(Math.sqrt(l/c)),x=Math.abs(S)<5;r||(r=x?X.restSpeed.granular:X.restSpeed.default),s||(s=x?X.restDelta.granular:X.restDelta.default);let w;if(g<1){const T=Ar(y,g);w=M=>{const E=Math.exp(-g*y*M);return i-E*((v+g*y*S)/T*Math.sin(T*M)+S*Math.cos(T*M))}}else if(g===1)w=T=>i-Math.exp(-y*T)*(S+(v+y*S)*T);else{const T=y*Math.sqrt(g*g-1);w=M=>{const E=Math.exp(-g*y*M),_=Math.min(T*M,300);return i-E*((v+g*y*S)*Math.sinh(_)+T*S*Math.cosh(_))/T}}const A={calculatedDuration:p&&d||null,next:T=>{const M=w(T);if(p)a.done=T>=d;else{let E=0;g<1&&(E=T===0?xe(v):Wo(w,T,M));const _=Math.abs(E)<=r,k=Math.abs(i-M)<=s;a.done=_&&k}return a.value=a.done?i:M,a},toString:()=>{const T=Math.min(Ss(A),zn),M=Cs(E=>A.next(T*E).value,T,30);return T+"ms "+M}};return A}function qo({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:i,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},p=_=>a!==void 0&&_<a||l!==void 0&&_>l,v=_=>a===void 0?l:l===void 0||Math.abs(a-_)<Math.abs(l-_)?a:l;let g=n*t;const S=d+g,y=i===void 0?S:i(S);y!==S&&(g=y-d);const x=_=>-g*Math.exp(-_/r),w=_=>y+x(_),A=_=>{const k=x(_),j=w(_);f.done=Math.abs(k)<=u,f.value=f.done?y:j};let T,M;const E=_=>{p(f.value)&&(T=_,M=Ho({keyframes:[f.value,v(f.value)],velocity:Wo(w,_,f.value),damping:s,stiffness:o,restDelta:u,restSpeed:c}))};return E(0),{calculatedDuration:null,next:_=>{let k=!1;return!M&&T===void 0&&(k=!0,A(_),E(_)),T!==void 0&&_>=T?M.next(_-T):(!k&&A(_),f)}}}const ld=jt(.42,0,1,1),cd=jt(0,0,.58,1),Yo=jt(.42,0,.58,1),ud=e=>Array.isArray(e)&&typeof e[0]!="number",Zo={linear:le,easeIn:ld,easeInOut:Yo,easeOut:cd,circIn:fr,circInOut:go,circOut:mo,backIn:dr,backInOut:ho,backOut:fo,anticipate:po},Jo=e=>{if(Xn(e)){Oe(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,s]=e;return jt(t,n,r,s)}else if(typeof e=="string")return Oe(Zo[e]!==void 0,`Invalid easing type '${e}'`),Zo[e];return e};function dd(e,t,n){const r=[],s=n||Xo,o=e.length-1;for(let i=0;i<o;i++){let a=s(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||le:t;a=It(l,a)}r.push(a)}return r}function fd(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const o=e.length;if(Oe(o===t.length,"Both input and output ranges must be the same length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=dd(t,r,s),l=a.length,u=c=>{if(i&&c<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(c<e[d+1]);d++);const f=ot(e[d],e[d+1],c);return a[d](f)};return n?c=>u(Te(e[0],e[o-1],c)):u}function hd(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=ot(0,t,r);e.push(U(n,1,s))}}function pd(e){const t=[0];return hd(t,e.length-1),t}function md(e,t){return e.map(n=>n*t)}function gd(e,t){return e.map(()=>t||Yo).splice(0,e.length-1)}function Rt({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=ud(r)?r.map(Jo):Jo(r),o={done:!1,value:t[0]},i=md(n&&n.length===t.length?n:pd(t),e),a=fd(i,t,{ease:Array.isArray(s)?s:gd(t,s)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}const yd=e=>{const t=({timestamp:n})=>e(n);return{start:()=>$.update(t,!0),stop:()=>ke(t),now:()=>Q.isProcessing?Q.timestamp:be.now()}},vd={decay:qo,inertia:qo,tween:Rt,keyframes:Rt,spring:Ho},xd=e=>e/100;class Mr extends Bo{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:s,keyframes:o}=this.options,i=(s==null?void 0:s.KeyframeResolver)||Cr,a=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new i(o,a,n,r,s),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:s=0,repeatType:o,velocity:i=0}=this.options,a=Un(n)?n:vd[n]||Rt;let l,u;process.env.NODE_ENV!=="production"&&a!==Rt&&Oe(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),a!==Rt&&typeof t[0]!="number"&&(l=It(xd,Xo(t[0],t[1])),t=[0,100]);const c=a({...this.options,keyframes:t});o==="mirror"&&(u=a({...this.options,keyframes:[...t].reverse(),velocity:-i})),c.calculatedDuration===null&&(c.calculatedDuration=Ss(c));const{calculatedDuration:d}=c,f=d+s,p=f*(r+1)-s;return{generator:c,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:p}}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:_}=this.options;return{done:!0,value:_[_.length-1]}}const{finalKeyframe:s,generator:o,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:c,resolvedDuration:d}=r;if(this.startTime===null)return o.next(0);const{delay:f,repeat:p,repeatType:v,repeatDelay:g,onUpdate:S}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/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 y=this.currentTime-f*(this.speed>=0?1:-1),x=this.speed>=0?y<0:y>c;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let w=this.currentTime,A=o;if(p){const _=Math.min(this.currentTime,c)/d;let k=Math.floor(_),j=_%1;!j&&_>=1&&(j=1),j===1&&k--,k=Math.min(k,p+1),!!(k%2)&&(v==="reverse"?(j=1-j,g&&(j-=g/d)):v==="mirror"&&(A=i)),w=Te(0,1,j)*d}const T=x?{done:!1,value:l[0]}:A.next(w);a&&(T.value=a(T.value));let{done:M}=T;!x&&u!==null&&(M=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return E&&s!==void 0&&(T.value=dn(l,this.options,s)),S&&S(T.value),E&&this.finish(),T}get duration(){const{resolved:t}=this;return t?Ce(t.calculatedDuration):0}get time(){return Ce(this.currentTime)}set time(t){t=xe(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=yd,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=s):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 bd=new Set(["opacity","clipPath","filter","transform"]);function Sd(e,t,n,{delay:r=0,duration:s=300,repeat:o=0,repeatType:i="loop",ease:a="easeInOut",times:l}={}){const u={[t]:n};l&&(u.offset=l);const c=Ps(a,s);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:r,duration:s,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:i==="reverse"?"alternate":"normal"})}const wd=Fn(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),hn=10,Cd=2e4;function Td(e){return Un(e.type)||e.type==="spring"||!Ts(e.ease)}function Pd(e,t){const n=new Mr({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const s=[];let o=0;for(;!r.done&&o<Cd;)r=n.sample(o),s.push(r.value),o+=hn;return{times:void 0,keyframes:s,duration:o-hn,ease:"linear"}}const Qo={anticipate:po,backInOut:ho,circInOut:go};function Ed(e){return e in Qo}class ei extends Bo{constructor(t){super(t);const{name:n,motionValue:r,element:s,keyframes:o}=this.options;this.resolver=new Ro(o,(i,a)=>this.onKeyframesResolved(i,a),n,r,s),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:s,ease:o,type:i,motionValue:a,name:l,startTime:u}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof o=="string"&&tn()&&Ed(o)&&(o=Qo[o]),Td(this.options)){const{onComplete:d,onUpdate:f,motionValue:p,element:v,...g}=this.options,S=Pd(t,g);t=S.keyframes,t.length===1&&(t[1]=t[0]),r=S.duration,s=S.times,o=S.ease,i="keyframes"}const c=Sd(a.owner.current,l,t,{...this.options,duration:r,times:s,ease:o});return c.startTime=u??this.calcStartTime(),this.pendingTimeline?(ws(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:d}=this.options;a.set(dn(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:r,times:s,type:i,ease:o,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=xe(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 le;const{animation:r}=n;ws(r,t)}return le}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:s,type:o,ease:i,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:c,onComplete:d,element:f,...p}=this.options,v=new Mr({...p,keyframes:r,duration:s,type:o,ease:i,times:a,isGenerator:!0}),g=xe(this.time);u.setWithVelocity(v.sample(g-hn).value,v.sample(g).value,hn)}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:s,repeatType:o,damping:i,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=n.owner.getProps();return wd()&&r&&bd.has(r)&&!l&&!u&&!s&&o!=="mirror"&&i!==0&&a!=="inertia"}}const _d={type:"spring",stiffness:500,damping:25,restSpeed:10},Ad=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Md={type:"keyframes",duration:.8},Ld={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Dd=(e,{keyframes:t})=>t.length>2?Md:ze.has(e)?e.startsWith("scale")?Ad(t[1]):_d:Ld;function Od({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:o,repeatType:i,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const Lr=(e,t,n,r={},s,o)=>i=>{const a=$n(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-xe(l);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:s};Od(a)||(c={...c,...Dd(e,c)}),c.duration&&(c.duration=xe(c.duration)),c.repeatDelay&&(c.repeatDelay=xe(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(d=!0)),c.allowFlatten=!a.type&&!a.ease,d&&!o&&t.get()!==void 0){const f=dn(c.keyframes,a);if(f!==void 0)return $.update(()=>{c.onUpdate(f),c.onComplete()}),new rc([])}return!o&&ei.supports(c)?new ei(c):new Mr(c)};function kd({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function ti(e,t,{delay:n=0,transitionOverride:r,type:s}={}){var o;let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(i=r);const u=[],c=s&&e.animationState&&e.animationState.getState()[s];for(const d in l){const f=e.getValue(d,(o=e.latestValues[d])!==null&&o!==void 0?o:null),p=l[d];if(p===void 0||c&&kd(c,d))continue;const v={delay:n,...$n(i||{},d)};let g=!1;if(window.MotionHandoffAnimation){const y=ao(e);if(y){const x=window.MotionHandoffAnimation(y,d,$);x!==null&&(v.startTime=x,g=!0)}}ur(e,d),f.start(Lr(d,f,p,e.shouldReduceMotion&&io.has(d)?{type:!1}:v,e,g));const S=f.animation;S&&u.push(S)}return a&&Promise.all(u).then(()=>{$.update(()=>{a&&lu(e,a)})}),u}function Dr(e,t,n={}){var r;const s=kt(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(o=n.transitionOverride);const i=s?()=>Promise.all(ti(e,s,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=o;return jd(e,t,c+u,d,f,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,c]=l==="beforeChildren"?[i,a]:[a,i];return u().then(()=>c())}else return Promise.all([i(),a(n.delay)])}function jd(e,t,n=0,r=0,s=1,o){const i=[],a=(e.variantChildren.size-1)*r,l=s===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(Vd).forEach((u,c)=>{u.notify("AnimationStart",t),i.push(Dr(u,t,{...o,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(i)}function Vd(e,t){return e.sortNodePosition(t)}function Nd(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(o=>Dr(e,o,n));r=Promise.all(s)}else if(typeof t=="string")r=Dr(e,t,n);else{const s=typeof t=="function"?kt(e,t,n.custom):t;r=Promise.all(ti(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function ni(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 Id=Zn.length;function ri(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?ri(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Id;n++){const r=Zn[n],s=e.props[r];(Mt(s)||s===!1)&&(t[r]=s)}return t}const Rd=[...Yn].reverse(),Fd=Yn.length;function Bd(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Nd(e,n,r)))}function $d(e){let t=Bd(e),n=si(),r=!0;const s=l=>(u,c)=>{var d;const f=kt(e,c,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:p,transitionEnd:v,...g}=f;u={...u,...g,...v}}return u};function o(l){t=l(e)}function i(l){const{props:u}=e,c=ri(e.parent)||{},d=[],f=new Set;let p={},v=1/0;for(let S=0;S<Fd;S++){const y=Rd[S],x=n[y],w=u[y]!==void 0?u[y]:c[y],A=Mt(w),T=y===l?x.isActive:null;T===!1&&(v=S);let M=w===c[y]&&w!==u[y]&&A;if(M&&r&&e.manuallyAnimateOnMount&&(M=!1),x.protectedKeys={...p},!x.isActive&&T===null||!w&&!x.prevProp||an(w)||typeof w=="boolean")continue;const E=zd(x.prevProp,w);let _=E||y===l&&x.isActive&&!M&&A||S>v&&A,k=!1;const j=Array.isArray(w)?w:[w];let W=j.reduce(s(y),{});T===!1&&(W={});const{prevResolvedValues:ee={}}=x,oe={...ee,...W},he=G=>{_=!0,f.has(G)&&(k=!0,f.delete(G)),x.needsAnimating[G]=!0;const O=e.getValue(G);O&&(O.liveStyle=!1)};for(const G in oe){const O=W[G],R=ee[G];if(p.hasOwnProperty(G))continue;let z=!1;lr(O)&&lr(R)?z=!ni(O,R):z=O!==R,z?O!=null?he(G):f.add(G):O!==void 0&&f.has(G)?he(G):x.protectedKeys[G]=!0}x.prevProp=w,x.prevResolvedValues=W,x.isActive&&(p={...p,...W}),r&&e.blockInitialAnimation&&(_=!1),_&&(!(M&&E)||k)&&d.push(...j.map(G=>({animation:G,options:{type:y}})))}if(f.size){const S={};if(typeof u.initial!="boolean"){const y=kt(e,Array.isArray(u.initial)?u.initial[0]:u.initial);y&&y.transition&&(S.transition=y.transition)}f.forEach(y=>{const x=e.getBaseTarget(y),w=e.getValue(y);w&&(w.liveStyle=!0),S[y]=x??null}),d.push({animation:S})}let g=!!d.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(d):Promise.resolve()}function a(l,u){var c;if(n[l].isActive===u)return Promise.resolve();(c=e.variantChildren)===null||c===void 0||c.forEach(f=>{var p;return(p=f.animationState)===null||p===void 0?void 0:p.setActive(l,u)}),n[l].isActive=u;const d=i(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:i,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=si(),r=!0}}}function zd(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ni(t,e):!1}function Ke(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function si(){return{animate:Ke(!0),whileInView:Ke(),whileHover:Ke(),whileTap:Ke(),whileDrag:Ke(),whileFocus:Ke(),exit:Ke()}}class Ne{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Ud extends Ne{constructor(t){super(t),t.animationState||(t.animationState=$d(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();an(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 Xd=0;class Wd extends Ne{constructor(){super(...arguments),this.id=Xd++}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 s=this.node.animationState.setActive("exit",!t);n&&!t&&s.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 Kd={animation:{Feature:Ud},exit:{Feature:Wd}};function Ft(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Bt(e){return{point:{x:e.pageX,y:e.pageY}}}const Gd=e=>t=>Hn(t)&&e(t,Bt(t));function $t(e,t,n,r){return Ft(e,t,Gd(n),r)}function oi({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Hd({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function qd(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 ii=1e-4,Yd=1-ii,Zd=1+ii,ai=.01,Jd=0-ai,Qd=0+ai;function se(e){return e.max-e.min}function ef(e,t,n){return Math.abs(e-t)<=n}function li(e,t,n,r=.5){e.origin=r,e.originPoint=U(t.min,t.max,e.origin),e.scale=se(n)/se(t),e.translate=U(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Yd&&e.scale<=Zd||isNaN(e.scale))&&(e.scale=1),(e.translate>=Jd&&e.translate<=Qd||isNaN(e.translate))&&(e.translate=0)}function zt(e,t,n,r){li(e.x,t.x,n.x,r?r.originX:void 0),li(e.y,t.y,n.y,r?r.originY:void 0)}function ci(e,t,n){e.min=n.min+t.min,e.max=e.min+se(t)}function tf(e,t,n){ci(e.x,t.x,n.x),ci(e.y,t.y,n.y)}function ui(e,t,n){e.min=t.min-n.min,e.max=e.min+se(t)}function Ut(e,t,n){ui(e.x,t.x,n.x),ui(e.y,t.y,n.y)}const di=()=>({translate:0,scale:1,origin:0,originPoint:0}),ft=()=>({x:di(),y:di()}),fi=()=>({min:0,max:0}),K=()=>({x:fi(),y:fi()});function de(e){return[e("x"),e("y")]}function Or(e){return e===void 0||e===1}function kr({scale:e,scaleX:t,scaleY:n}){return!Or(e)||!Or(t)||!Or(n)}function Ge(e){return kr(e)||hi(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function hi(e){return pi(e.x)||pi(e.y)}function pi(e){return e&&e!=="0%"}function pn(e,t,n){const r=e-n,s=t*r;return n+s}function mi(e,t,n,r,s){return s!==void 0&&(e=pn(e,s,r)),pn(e,n,r)+t}function jr(e,t=0,n=1,r,s){e.min=mi(e.min,t,n,r,s),e.max=mi(e.max,t,n,r,s)}function gi(e,{x:t,y:n}){jr(e.x,t.translate,t.scale,t.originPoint),jr(e.y,n.translate,n.scale,n.originPoint)}const yi=.999999999999,vi=1.0000000000001;function nf(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let o,i;for(let a=0;a<s;a++){o=n[a],i=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&pt(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,gi(e,i)),r&&Ge(o.latestValues)&&pt(e,o.latestValues))}t.x<vi&&t.x>yi&&(t.x=1),t.y<vi&&t.y>yi&&(t.y=1)}function ht(e,t){e.min=e.min+t,e.max=e.max+t}function xi(e,t,n,r,s=.5){const o=U(e.min,e.max,s);jr(e,t,n,o,r)}function pt(e,t){xi(e.x,t.x,t.scaleX,t.scale,t.originX),xi(e.y,t.y,t.scaleY,t.scale,t.originY)}function bi(e,t){return oi(qd(e.getBoundingClientRect(),t))}function rf(e,t,n){const r=bi(e,n),{scroll:s}=t;return s&&(ht(r.x,s.offset.x),ht(r.y,s.offset.y)),r}const Si=({current:e})=>e?e.ownerDocument.defaultView:null,wi=(e,t)=>Math.abs(e-t);function sf(e,t){const n=wi(e.x,t.x),r=wi(e.y,t.y);return Math.sqrt(n**2+r**2)}class Ci{constructor(t,n,{transformPagePoint:r,contextWindow:s,dragSnapToOrigin:o=!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=Nr(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=sf(d.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:v}=d,{timestamp:g}=Q;this.history.push({...v,timestamp:g});const{onStart:S,onMove:y}=this.handlers;f||(S&&S(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Vr(f,this.transformPagePoint),$.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:p,onSessionEnd:v,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=Nr(d.type==="pointercancel"?this.lastMoveEventInfo:Vr(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,S),v&&v(d,S)},!Hn(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=s||window;const i=Bt(t),a=Vr(i,this.transformPagePoint),{point:l}=a,{timestamp:u}=Q;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=n;c&&c(t,Nr(a,this.history)),this.removeListeners=It($t(this.contextWindow,"pointermove",this.handlePointerMove),$t(this.contextWindow,"pointerup",this.handlePointerUp),$t(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ke(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 Nr({point:e},t){return{point:e,delta:Ti(e,Pi(t)),offset:Ti(e,of(t)),velocity:af(t,.1)}}function of(e){return e[0]}function Pi(e){return e[e.length-1]}function af(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=Pi(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>xe(t)));)n--;if(!r)return{x:0,y:0};const o=Ce(s.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const i={x:(s.x-r.x)/o,y:(s.y-r.y)/o};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function lf(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?U(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?U(n,e,r.max):Math.min(e,n)),e}function Ei(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:s}){return{x:Ei(e.x,n,s),y:Ei(e.y,t,r)}}function _i(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 uf(e,t){return{x:_i(e.x,t.x),y:_i(e.y,t.y)}}function df(e,t){let n=.5;const r=se(e),s=se(t);return s>r?n=ot(t.min,t.max-r,e.min):r>s&&(n=ot(e.min,e.max-s,t.min)),Te(0,1,n)}function ff(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 Ir=.35;function hf(e=Ir){return e===!1?e=0:e===!0&&(e=Ir),{x:Ai(e,"left","right"),y:Ai(e,"top","bottom")}}function Ai(e,t,n){return{min:Mi(e,t),max:Mi(e,n)}}function Mi(e,t){return typeof e=="number"?e:e[t]||0}const pf=new WeakMap;class mf{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=K(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const s=c=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Bt(c).point)},o=(c,d)=>{const{drag:f,dragPropagation:p,onDragStart:v}=this.getProps();if(f&&!p&&(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),de(S=>{let y=this.getAxisMotionValue(S).get()||0;if(Se.test(y)){const{projection:x}=this.visualElement;if(x&&x.layout){const w=x.layout.layoutBox[S];w&&(y=se(w)*(parseFloat(y)/100))}}this.originPoint[S]=y}),v&&$.postRender(()=>v(c,d)),ur(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},i=(c,d)=>{const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:v,onDrag:g}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:S}=d;if(p&&this.currentDirection===null){this.currentDirection=gf(S),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",d.point,S),this.updateAxis("y",d.point,S),this.visualElement.render(),g&&g(c,d)},a=(c,d)=>this.stop(c,d),l=()=>de(c=>{var d;return this.getAnimationState(c)==="paused"&&((d=this.getAxisMotionValue(c).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Ci(t,{onSessionStart:s,onStart:o,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Si(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:o}=this.getProps();o&&$.postRender(()=>o(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:s}=this.getProps();if(!r||!mn(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=lf(i,this.constraints[t],this.elastic[t])),o.set(i)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,o=this.constraints;n&&at(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&s?this.constraints=cf(s.layoutBox,n):this.constraints=!1,this.elastic=hf(r),o!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&de(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=ff(s.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!at(t))return!1;const r=t.current;Oe(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const o=rf(r,s.root,this.visualElement.getTransformPagePoint());let i=uf(s.layout.layoutBox,o);if(n){const a=n(Hd(i));this.hasMutatedConstraints=!!a,a&&(i=oi(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=de(c=>{if(!mn(c,n,this.currentDirection))return;let d=l&&l[c]||{};i&&(d={min:0,max:0});const f=s?200:1e6,p=s?40:1e7,v={type:"inertia",velocity:r?t[c]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(c,v)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return ur(this.visualElement,t),r.start(Lr(t,r,0,n,this.visualElement,!1))}stopAnimation(){de(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){de(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(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){de(n=>{const{drag:r}=this.getProps();if(!mn(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(n);if(s&&s.layout){const{min:i,max:a}=s.layout.layoutBox[n];o.set(t[n]-U(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!at(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};de(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();s[i]=df({min:l,max:l},this.constraints[i])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),de(i=>{if(!mn(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:u}=this.constraints[i];a.set(U(l,u,s[i]))})}addListeners(){if(!this.visualElement.current)return;pf.set(this.visualElement,this);const t=this.visualElement.current,n=$t(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();at(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,o=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),$.read(r);const i=Ft(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(de(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())});return()=>{i(),n(),o(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:i=Ir,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function mn(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function gf(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class yf extends Ne{constructor(t){super(t),this.removeGroupControls=le,this.removeListeners=le,this.controls=new mf(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||le}unmount(){this.removeGroupControls(),this.removeListeners()}}const Li=e=>(t,n)=>{e&&$.postRender(()=>e(t,n))};class vf extends Ne{constructor(){super(...arguments),this.removePointerDownListener=le}onPointerDown(t){this.session=new Ci(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Si(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:Li(t),onStart:Li(n),onMove:r,onEnd:(o,i)=>{delete this.session,s&&$.postRender(()=>s(o,i))}}}mount(){this.removePointerDownListener=$t(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 gn={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Di(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Xt={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(L.test(e))e=parseFloat(e);else return e;const n=Di(e,t.target.x),r=Di(e,t.target.y);return`${n}% ${r}%`}},xf={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=Ve.parse(e);if(s.length>5)return r;const o=Ve.createTransformer(e),i=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;s[0+i]/=a,s[1+i]/=l;const u=U(a,l,.5);return typeof s[2+i]=="number"&&(s[2+i]/=u),typeof s[3+i]=="number"&&(s[3+i]/=u),o(s)}};class bf extends m.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:o}=t;Nc(Sf),o&&(n.group&&n.group.add(o),r&&r.register&&s&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),gn.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:o}=this.props,i=r.projection;return i&&(i.isPresent=o,s||t.layoutDependency!==n||n===void 0||t.isPresent!==o?i.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?i.promote():i.relegate()||$.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Gn.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Oi(e){const[t,n]=Ql(),r=m.useContext(ys);return b.jsx(bf,{...e,layoutGroup:r,switchLayoutGroup:m.useContext(zs),isPresent:t,safeToRemove:n})}const Sf={borderRadius:{...Xt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Xt,borderTopRightRadius:Xt,borderBottomLeftRadius:Xt,borderBottomRightRadius:Xt,boxShadow:xf};function wf(e,t,n){const r=ne(e)?e:At(e);return r.start(Lr("",r,t,n)),r.animation}function Cf(e){return e instanceof SVGElement&&e.tagName!=="svg"}const Tf=(e,t)=>e.depth-t.depth;class Pf{constructor(){this.children=[],this.isDirty=!1}add(t){In(this.children,t),this.isDirty=!0}remove(t){Rn(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Tf),this.isDirty=!1,this.children.forEach(t)}}function Ef(e,t){const n=be.now(),r=({timestamp:s})=>{const o=s-n;o>=t&&(ke(r),e(o-t))};return $.read(r,!0),()=>ke(r)}const ki=["TopLeft","TopRight","BottomLeft","BottomRight"],_f=ki.length,ji=e=>typeof e=="string"?parseFloat(e):e,Vi=e=>typeof e=="number"||L.test(e);function Af(e,t,n,r,s,o){s?(e.opacity=U(0,n.opacity!==void 0?n.opacity:1,Mf(r)),e.opacityExit=U(t.opacity!==void 0?t.opacity:1,0,Lf(r))):o&&(e.opacity=U(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${ki[i]}Radius`;let l=Ni(t,a),u=Ni(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Vi(l)===Vi(u)?(e[a]=Math.max(U(ji(l),ji(u),r),0),(Se.test(u)||Se.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=U(t.rotate||0,n.rotate||0,r))}function Ni(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Mf=Ii(0,.5,mo),Lf=Ii(.5,.95,le);function Ii(e,t,n){return r=>r<e?0:r>t?1:n(ot(e,t,r))}function Ri(e,t){e.min=t.min,e.max=t.max}function fe(e,t){Ri(e.x,t.x),Ri(e.y,t.y)}function Fi(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Bi(e,t,n,r,s){return e-=t,e=pn(e,1/n,r),s!==void 0&&(e=pn(e,1/s,r)),e}function Df(e,t=0,n=1,r=.5,s,o=e,i=e){if(Se.test(t)&&(t=parseFloat(t),t=U(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=U(o.min,o.max,r);e===o&&(a-=t),e.min=Bi(e.min,t,n,a,s),e.max=Bi(e.max,t,n,a,s)}function $i(e,t,[n,r,s],o,i){Df(e,t[n],t[r],t[s],t.scale,o,i)}const Of=["x","scaleX","originX"],kf=["y","scaleY","originY"];function zi(e,t,n,r){$i(e.x,t,Of,n?n.x:void 0,r?r.x:void 0),$i(e.y,t,kf,n?n.y:void 0,r?r.y:void 0)}function Ui(e){return e.translate===0&&e.scale===1}function Xi(e){return Ui(e.x)&&Ui(e.y)}function Wi(e,t){return e.min===t.min&&e.max===t.max}function jf(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 Gi(e,t){return Ki(e.x,t.x)&&Ki(e.y,t.y)}function Hi(e){return se(e.x)/se(e.y)}function qi(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Vf{constructor(){this.members=[]}add(t){In(this.members,t),t.scheduleRender()}remove(t){if(Rn(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(s=>t===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const o=this.members[s];if(o.isPresent!==!1){r=o;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:s}=t.options;s===!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 Nf(e,t,n){let r="";const s=e.x.translate/t.x,o=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((s||o||i)&&(r=`translate3d(${s}px, ${o}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:d,rotateY:f,skewX:p,skewY:v}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),v&&(r+=`skewY(${v}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 Rr=["","X","Y","Z"],If={visibility:"hidden"},Yi=1e3;let Rf=0;function Fr(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Zi(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=ao(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",$,!(s||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Zi(r)}function Ji({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(i={},a=t==null?void 0:t()){this.id=Rf++,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($f),this.nodes.forEach(Kf),this.nodes.forEach(Gf),this.nodes.forEach(zf)},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 Pf)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Bn),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=Cf(i),this.instance=i;const{layoutId:l,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||l)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=Ef(f,250),gn.hasAnimatedSinceResize&&(gn.hasAnimatedSinceResize=!1,this.nodes.forEach(ea))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:p,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||c.getDefaultTransition()||Jf,{onLayoutAnimationStart:S,onLayoutAnimationComplete:y}=c.getProps(),x=!this.targetLayout||!Gi(this.targetLayout,v),w=!f&&p;if(this.options.layoutRoot||this.resumeFrom||w||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,w);const A={...$n(g,"layout"),onPlay:S,onComplete:y};(c.shouldReduceMotion||this.options.layoutRoot)&&(A.delay=0,A.type=!1),this.startAnimation(A)}else f||ea(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}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,ke(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(Hf),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&&Zi(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const d=this.path[c];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 u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Qi);return}this.isUpdating||this.nodes.forEach(Xf),this.isUpdating=!1,this.nodes.forEach(Wf),this.nodes.forEach(Ff),this.nodes.forEach(Bf),this.clearAllSnapshots();const a=be.now();Q.delta=Te(0,1e3/60,a-Q.timestamp),Q.timestamp=a,Q.isProcessing=!0,Kn.update.process(Q),Kn.preRender.process(Q),Kn.render.process(Q),Q.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Gn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Uf),this.sharedNodes.forEach(qf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,$.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){$.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!se(this.snapshot.measuredBox.x)&&!se(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=K(),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(!s)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Xi(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;i&&(a||Ge(this.latestValues)||c)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return i&&(l=this.removeTransform(l)),Qf(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var i;const{visualElement:a}=this.options;if(!a)return K();const l=a.measureViewportBox();if(!(((i=this.scroll)===null||i===void 0?void 0:i.wasRoot)||this.path.some(eh))){const{scroll:c}=this.root;c&&(ht(l.x,c.offset.x),ht(l.y,c.offset.y))}return l}removeElementScroll(i){var a;const l=K();if(fe(l,i),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:d,options:f}=c;c!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&fe(l,i),ht(l.x,d.offset.x),ht(l.y,d.offset.y))}return l}applyTransform(i,a=!1){const l=K();fe(l,i);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&pt(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Ge(c.latestValues)&&pt(l,c.latestValues)}return Ge(this.latestValues)&&pt(l,this.latestValues),l}removeTransform(i){const a=K();fe(a,i);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Ge(u.latestValues))continue;kr(u.latestValues)&&u.updateSnapshot();const c=K(),d=u.measurePageBox();fe(c,d),zi(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Ge(this.latestValues)&&zi(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!==Q.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 u=!!this.resumingFrom||this!==l;if(!(i||u&&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=Q.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=K(),this.relativeTargetOrigin=K(),Ut(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),fe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=K(),this.targetWithTransforms=K()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),tf(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):fe(this.target,this.layout.layoutBox),gi(this.target,this.targetDelta)):fe(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=K(),this.relativeTargetOrigin=K(),Ut(this.relativeTargetOrigin,this.target,p.target),fe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||kr(this.parent.latestValues)||hi(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 u=!0;if((this.isProjectionDirty||!((i=this.parent)===null||i===void 0)&&i.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===Q.timestamp&&(u=!1),u)return;const{layout:c,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||!(c||d))return;fe(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;nf(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=K());const{target:v}=a;if(!v){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Fi(this.prevProjectionDelta.x,this.projectionDelta.x),Fi(this.prevProjectionDelta.y,this.projectionDelta.y)),zt(this.projectionDelta,this.layoutCorrected,v,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!qi(this.projectionDelta.x,this.prevProjectionDelta.x)||!qi(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",v))}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=ft(),this.projectionDelta=ft(),this.projectionDeltaWithTransform=ft()}setAnimationOrigin(i,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=ft();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=K(),p=l?l.source:void 0,v=this.layout?this.layout.source:void 0,g=p!==v,S=this.getStack(),y=!S||S.members.length<=1,x=!!(g&&!y&&this.options.crossfade===!0&&!this.path.some(Zf));this.animationProgress=0;let w;this.mixTargetDelta=A=>{const T=A/1e3;ta(d.x,i.x,T),ta(d.y,i.y,T),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ut(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Yf(this.relativeTarget,this.relativeTargetOrigin,f,T),w&&jf(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=K()),fe(w,this.relativeTarget)),g&&(this.animationValues=c,Af(c,u,this.latestValues,T,x,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},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&&(ke(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=$.update(()=>{gn.hasAnimatedSinceResize=!0,this.currentAnimation=wf(0,Yi,{...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(Yi),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=i;if(!(!a||!l||!u)){if(this!==i&&this.layout&&u&&ia(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||K();const d=se(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const f=se(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}fe(a,l),pt(a,c),zt(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new Vf),this.sharedNodes.get(i).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.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 u=this.getStack();u&&u.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 u={};l.z&&Fr("z",i,u,this.animationValues);for(let c=0;c<Rr.length;c++)Fr(`rotate${Rr[c]}`,i,u,this.animationValues),Fr(`skew${Rr[c]}`,i,u,this.animationValues);i.render();for(const c in u)i.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);i.scheduleRender()}getProjectionStyles(i){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return If;const u={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=un(i==null?void 0:i.pointerEvents)||"",u.transform=c?c(this.latestValues,""):"none",u;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=un(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!Ge(this.latestValues)&&(g.transform=c?c({},""):"none",this.hasProjected=!1),g}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),u.transform=Nf(this.projectionDeltaWithTransform,this.treeScale,f),c&&(u.transform=c(f,u.transform));const{x:p,y:v}=this.projectionDelta;u.transformOrigin=`${p.origin*100}% ${v.origin*100}% 0`,d.animationValues?u.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:u.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const g in Lt){if(f[g]===void 0)continue;const{correct:S,applyTo:y,isCSSVariable:x}=Lt[g],w=u.transform==="none"?f[g]:S(f[g],d);if(y){const A=y.length;for(let T=0;T<A;T++)u[y[T]]=w}else x?this.options.visualElement.renderState.vars[g]=w:u[g]=w}return this.options.layoutId&&(u.pointerEvents=d===this?un(i==null?void 0:i.pointerEvents)||"":"none"),u}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(Qi),this.root.sharedNodes.clear()}}}function Ff(e){e.updateLayout()}function Bf(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:s}=e.layout,{animationType:o}=e.options,i=n.source!==e.layout.source;o==="size"?de(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],p=se(f);f.min=r[d].min,f.max=f.min+p}):ia(o,n.layoutBox,r)&&de(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],p=se(r[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const a=ft();zt(a,r,n.layoutBox);const l=ft();i?zt(l,e.applyTransform(s,!0),n.measuredBox):zt(l,r,n.layoutBox);const u=!Xi(a);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:p}=d;if(f&&p){const v=K();Ut(v,n.layoutBox,f.layoutBox);const g=K();Ut(g,r,p.layoutBox),Gi(v,g)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=v,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function $f(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 zf(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Uf(e){e.clearSnapshot()}function Qi(e){e.clearMeasurements()}function Xf(e){e.isLayoutDirty=!1}function Wf(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function ea(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Kf(e){e.resolveTargetDelta()}function Gf(e){e.calcProjection()}function Hf(e){e.resetSkewAndRotation()}function qf(e){e.removeLeadSnapshot()}function ta(e,t,n){e.translate=U(t.translate,0,n),e.scale=U(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function na(e,t,n,r){e.min=U(t.min,n.min,r),e.max=U(t.max,n.max,r)}function Yf(e,t,n,r){na(e.x,t.x,n.x,r),na(e.y,t.y,n.y,r)}function Zf(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Jf={duration:.45,ease:[.4,0,.1,1]},ra=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),sa=ra("applewebkit/")&&!ra("chrome/")?Math.round:le;function oa(e){e.min=sa(e.min),e.max=sa(e.max)}function Qf(e){oa(e.x),oa(e.y)}function ia(e,t,n){return e==="position"||e==="preserve-aspect"&&!ef(Hi(t),Hi(n),.2)}function eh(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const th=Ji({attachResizeListener:(e,t)=>Ft(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Br={current:void 0},aa=Ji({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Br.current){const e=new th({});e.mount(window),e.setOptions({layoutScroll:!0}),Br.current=e}return Br.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),nh={pan:{Feature:vf},drag:{Feature:yf,ProjectionNode:aa,MeasureLayout:Oi}};function la(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=r[s];o&&$.postRender(()=>o(t,Bt(t)))}class rh extends Ne{mount(){const{current:t}=this.node;t&&(this.unmount=dc(t,(n,r)=>(la(this.node,r,"Start"),s=>la(this.node,s,"End"))))}unmount(){}}class sh 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=It(Ft(this.node.current,"focus",()=>this.onFocus()),Ft(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function ca(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 s="onTap"+(n==="End"?"":n),o=r[s];o&&$.postRender(()=>o(t,Bt(t)))}class oh extends Ne{mount(){const{current:t}=this.node;t&&(this.unmount=mc(t,(n,r)=>(ca(this.node,r,"Start"),(s,{success:o})=>ca(this.node,s,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const $r=new WeakMap,zr=new WeakMap,ih=e=>{const t=$r.get(e.target);t&&t(e)},ah=e=>{e.forEach(ih)};function lh({root:e,...t}){const n=e||document;zr.has(n)||zr.set(n,{});const r=zr.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(ah,{root:e,...t})),r[s]}function ch(e,t,n){const r=lh(t);return $r.set(e,n),r.observe(e),()=>{$r.delete(e),r.unobserve(e)}}const uh={some:0,all:1};class dh 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:s="some",once:o}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:uh[s]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=u?c: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(fh(t,n))&&this.startObserver()}unmount(){}}function fh({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const hh={inView:{Feature:dh},tap:{Feature:oh},focus:{Feature:sh},hover:{Feature:rh}},ph={layout:{ProjectionNode:aa,MeasureLayout:Oi}},Ur={current:null},ua={current:!1};function mh(){if(ua.current=!0,!!Vn)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ur.current=e.matches;e.addListener(t),t()}else Ur.current=!1}const gh=[...No,re,Ve],yh=e=>gh.find(Vo(e)),vh=new WeakMap;function xh(e,t,n){for(const r in t){const s=t[r],o=n[r];if(ne(s))e.addValue(r,s),process.env.NODE_ENV==="development"&&en(s.version==="12.5.0",`Attempting to mix Motion versions ${s.version} with 12.5.0 may not work as expected.`);else if(ne(o))e.addValue(r,At(s,{owner:e}));else if(o!==s)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(s):i.hasAnimated||i.set(s)}else{const i=e.getStaticValue(r);e.addValue(r,At(i!==void 0?i:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const da=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class bh{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,blockInitialAnimation:o,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=Cr,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 p=be.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,$.render(this.render,!1,!0))};const{latestValues:l,renderState:u,onUpdate:c}=i;this.onUpdate=c,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=ln(n),this.isVariantNode=Fs(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const v=f[p];l[p]!==void 0&&ne(v)&&v.set(l[p],!1)}}mount(t){this.current=t,vh.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)),ua.current||mh(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ur.current,process.env.NODE_ENV!=="production"&&en(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(),ke(this.notifyUpdate),ke(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=ze.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&$.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),o(),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 it){const n=it[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):K()}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<da.length;r++){const s=da[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,i=t[o];i&&(this.propEventSubscriptions[s]=this.on(s,i))}this.prevMotionValues=xh(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 s=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 s!=null&&(typeof s=="string"&&(ko(s)||yo(s))?s=parseFloat(s):!yh(s)&&Ve.test(n)&&(s=Po(t,n)),this.setBaseTarget(t,ne(s)?s.get():s)),ne(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let s;if(typeof r=="string"||typeof r=="object"){const i=ar(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);i&&(s=i[t])}if(r&&s!==void 0)return s;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!ne(o)?o:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Bn),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class fa extends bh{constructor(){super(...arguments),this.KeyframeResolver=Ro}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;ne(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Sh(e){return window.getComputedStyle(e)}class wh extends fa{constructor(){super(...arguments),this.type="html",this.renderInstance=to}readValueFromInstance(t,n){if(ze.has(n))return ku(t,n);{const r=Sh(t),s=(Qn(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return bi(t,n)}build(t,n,r){nr(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return cr(t,n,r)}}class Ch extends fa{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=K,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&eo(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ze.has(n)){const r=To(n);return r&&r.default||0}return n=no.has(n)?n:Jn(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return so(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&$.postRender(this.updateDimensions)}build(t,n,r){or(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,s){ro(t,n,r,s)}mount(t){this.isSVGTag=ir(t.tagName),super.mount(t)}}const Th=(e,t)=>sr(e)?new Ch(t):new wh(t,{allowProjection:e!==m.Fragment}),Ph=iu({...Kd,...hh,...nh,...ph},Th),He=Cc(Ph),Eh={root:"_root_uup2j_1"},ha={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 Ie(e){return e&&Object.keys(e).length?Object.keys(e).filter(t=>Object.keys(ha).includes(t)).filter(t=>e[t]===!0).map(t=>ha[t]):null}const Wt="Errore: ",_h="Impossibile acquisire la posizione.",pa="Impossibile caricare i punti di mappa.",Ah="Si è verificato un errore.",Mh="Impossibile caricare i suggerimenti.",Lh="Impossibile caricare i dettagli della location.",Dh="Impossibile caricare la mappa.",Oh="Ottieni indicazioni di navigazione per questa destinazione",kh="Condividi questa destinazione",jh="Scarica l'evento";function Pe(e){if(e)return e.trim().split(" ").filter(t=>t.length)}function Ee(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 Xr(e){const{type:t,url:n}=e??{};switch(t){case"navigate":case"directions":return{"aria-label":Oh,as:"a",href:n??"#",target:"_blank",rel:"noopener noreferrer"};case"share":return{"aria-label":kh,as:"a",href:n??"#",target:"_blank",rel:"noopener noreferrer"};case"event":case"calendar":return{"aria-label":jh,as:"a",href:n??"#",download:!0,target:"_blank",rel:"noopener noreferrer"};case"email":default:return{}}}function Vh(e,t){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e(...r),t)}}const ma="Anchor";function ga({as:e,wrapper:t,children:n,variant:r="default",className:s,animate:o=!0,animationDelay:i=0,href:a,target:l,rel:u,linkProps:c={},style:d,...f},p){const v=t||"span",g=o?He[v]:v,S=e||"a",y=Ie(f)??[],x=o?{initial:{opacity:0,y:5},animate:{opacity:1,y:0},transition:{delay:i,duration:.2}}:{},A=u||(l==="_blank"?{rel:"noopener noreferrer"}:{}).rel;return b.jsx(g,{className:Y(Eh.root,"dyn-locator__"+Ee(ma),Pe(s),...y),"data-variant":r,...d?{style:d}:{},...x,...f,children:b.jsx(S,{ref:p,href:a,target:l,rel:A,...c,children:n})})}ga.displayName=ma;const ya=m.forwardRef(ga),va="ErrorBanner";function xa({title:e="Si è verificato un errore",message:t="Impossibile completare l'operazione richiesta.",actionText:n="ricaricare la pagina",onAction:r,errorDetails:s,className:o,children:i,...a}){const l=Ie(a)??[];return b.jsxs("div",{className:Y("dyn-locator__"+Ee(va),Pt.root,Pe(o),...l??[]),children:[b.jsxs("header",{className:Pt.header,children:[b.jsx(Xl,{size:28,color:"currentColor",className:Pt.icon})," ",b.jsx("h3",{children:e})]}),b.jsxs("div",{className:Pt.body,children:[b.jsx("p",{children:t}),n&&r&&b.jsxs("p",{children:["Prova a"," ",b.jsx(ya,{animate:!1,"aria-label":n,href:"#",onClick:r,children:n})]}),i,s&&b.jsx("div",{className:Pt.content,children:b.jsx("pre",{children:s})})]})]})}xa.displayName=va;const ba=xa;class Nh extends m.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||b.jsx("div",{className:Il.container,children:b.jsx(ba,{message:"Something went wrong with the Locator component",errorDetails:(t=this.state.error)==null?void 0:t.message})}):this.props.children}}const Sa={ArrowUpRight:$l,ChevronUp:Ul,ChevronDown:zl,Close:Yl,Expand:Gl,Location:Kl,Search:Hl,Share:ql,Target:Wl},_e={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"},mt={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 Ih(e){return m.isValidElement(e)||typeof e=="function"}function Rh(e){return e?typeof e=="string"||typeof e=="object"&&"name"in e:!1}function Fh(e){return!!e&&typeof e=="object"&&"path"in e}const wa="Icon";function Ca({as:e,icon:t,iconRef:n,label:r,size:s="S",radius:o,variant:i="default",className:a,animate:l=!0,animationDelay:u=0,style:c,...d},f){const p=e||"span",v=l?He[p]:p,{iconMap:g}=Kh();function S(w){if(Rh(w)){const A=typeof w=="string"?w:w.name;return g[A]?m.createElement(g[A],{...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 "'+A+'"!'}return Fh(w)?(i!=="default"&&console.warn("Warning: cannot set icon stroke on a remote asset"),b.jsx("img",{...n?{ref:n}:{},src:w.path,alt:`Icona decorativa${r?" che rappresenta '"+r+"'":""}`,className:Wr.icon})):"No icon provided"}const y=Ie(d)??[],x=l?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:u,duration:.2}}:{};return b.jsx(v,{ref:f,className:Y(Wr.root,"dyn-locator__"+Ee(wa),Pe(a),...y),...c?{style:c}:{},"data-variant":i,"data-size":s,...o?{"data-radius":o}:{},...x,...d,children:S(t)})}Ca.displayName=wa;const qe=m.forwardRef(Ca),Ta="Tag";function Pa({as:e,iconPosition:t="left",children:n,icon:r,className:s,animate:o=!0,animationDelay:i=0,style:a,...l},u){const c=e||"span",d=o?He[c]:c,f=Ie(l)??[],p=o?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:i,duration:.2}}:{};return b.jsx(d,{ref:u,className:Y(mt.root,"dyn-locator__"+Ee(Ta),Pe(s),...f),"data-icon-position":t,...a?{style:a}:{},...p,...l,children:b.jsxs("div",{className:mt.container,children:[r?b.jsx("div",{className:mt.icon,children:Ih(r)?typeof r=="function"?b.jsx(r,{className:mt.icon}):r:b.jsx(qe,{className:mt.icon,icon:r})}):null,b.jsx("div",{className:mt.label,children:n})]})})}Pa.displayName=Ta;const Bh=m.forwardRef(Pa),$h={root:"_root_u5v4v_1"},Ea="IconButton";function _a({as:e,children:t,className:n,variant:r="default",animate:s=!0,animationDelay:o=0,style:i,ariaLabel:a,href:l,target:u,rel:c,disabled:d=!1,...f},p){const v=e||"button",g=s?He[v]:v,S=Ie(f)??[],y=s?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:o,duration:.2}}:{},x=v==="a"?{href:l??"/",target:u??"_blank",rel:u==="_blank"?"noopener noreferrer":c}:{};return b.jsx(g,{ref:p,className:Y($h.root,"dyn-locator__"+Ee(Ea),Pe(n),...S),"data-variant":r,"data-element":v,"aria-label":a,disabled:d,...i?{style:i}:{},...y,...x,...f,children:t})}_a.displayName=Ea;const Kt=m.forwardRef(_a),Aa={root:"_root_1fk3z_1",content:"_content_1fk3z_32"},Ma="Card";function La({as:e,children:t,className:n,variant:r="default",animate:s=!0,animationDelay:o=0,style:i,clickable:a=!1,onClick:l,...u},c){const d=e||"article",f=s?He[d]:d,p=Ie(u)??[],v=s?{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:o,duration:.3}}:{};return b.jsx(f,{ref:c,className:Y(Aa.root,"dyn-locator__"+Ee(Ma),Pe(n),...p),"data-variant":r,"data-clickable":a||!!l,onClick:l,...i?{style:i}:{},...v,...u,children:r==="bare"?t:b.jsx("div",{className:Aa.content,children:t})})}La.displayName=Ma;const zh=m.forwardRef(La);function Da(e){const{componentMap:t}=Gh();return t[e]}const Oa="LocationCard";function ka({title:e,timestamp:t,address:n,capabilities:r,on_share:s,actions:o,className:i,...a},l){const u=Da("ctaButton");return b.jsx(zh,{ref:l,variant:"bare",clickable:!0,className:Y("dyn-locator__"+Ee(Oa),Pe(i)),...a,style:{...a.style?a.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:b.jsxs("div",{className:_e.root,children:[b.jsxs("header",{className:_e.header,children:[t?b.jsx("time",{children:new Date(t).toLocaleDateString("it",{day:"numeric",month:"long",year:"numeric"})}):null,b.jsxs("div",{className:_e.titleContainer,children:[e?b.jsx("h4",{children:e}):null,b.jsx(Kt,{className:_e.shareButton,variant:"bare",...Xr(s),children:b.jsx(qe,{size:"M",icon:"Share"})})]}),n?b.jsx("address",{children:n}):null]}),r!=null&&r.length?b.jsx("div",{className:_e.body,children:r.map((c,d)=>{var f;return b.jsxs("div",{className:_e.capabilities,children:[b.jsx("h5",{children:c==null?void 0:c.title}),b.jsx("ul",{className:_e.tagContainer,children:(f=c==null?void 0:c.capabilities)==null?void 0:f.map((p,v)=>b.jsx(Bh,{as:"li",animationDelay:+`.${v+1}`,className:_e.tag,children:p.label},v))})]},d)})}):null,o!=null&&o.length?b.jsx("div",{className:_e.cta,children:o.map((c,d)=>b.jsx(u,{animate:!1,fullWidth:!0,variant:d===0?"themed":"secondary",...Xr(c),children:c.label},d))}):null]})})}ka.displayName=Oa;const Uh=m.forwardRef(ka),ja={root:"_root_1h5d4_1",loader:"_loader_1h5d4_73"},Va="Button";function Na({as:e,children:t,className:n,variant:r="default",size:s="medium",disabled:o=!1,loading:i=!1,fullWidth:a=!1,animate:l=!0,animationDelay:u=0,href:c,target:d,rel:f,style:p,...v},g){const S=e||(c?"a":"button"),y=l?He[S]:S,x=Ie(v)??[],w=l?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:u,duration:.2}}:{},A=c?{href:c,target:d,rel:d==="_blank"?"noopener noreferrer":f}:{};return b.jsx(y,{ref:g,className:Y(ja.root,"dyn-locator__"+Ee(Va),Pe(n),...x),"data-variant":r,"data-size":s,"data-full-width":a,disabled:o||i,...p?{style:p}:{},...w,...A,...v,children:i?b.jsxs("span",{style:{display:"flex",gap:10},children:[t,b.jsx("span",{className:ja.loader,"aria-hidden":"true"})]}):t})}Na.displayName=Va;const Kr=m.forwardRef(Na),Ia={locationCard:Uh,ctaButton:Kr},Xh={iconMap:Sa,componentMap:Ia},Gr=m.createContext(Xh);function Wh({children:e,customIcons:t,customComponents:n}){const r={...Sa,...t??{}},s={...Ia,...n??{}};return b.jsx(Gr.Provider,{value:{iconMap:r,componentMap:s},children:e})}function Kh(){const{iconMap:e}=m.useContext(Gr);return{iconMap:e}}function Gh(){const{componentMap:e}=m.useContext(Gr);return{componentMap:e}}var yn=(e=>(e.CLUSTERS="clusters",e.MARKERS="markers",e.FIND="find",e))(yn||{});const Ra=m.createContext({endpointMap:{},apiUrl:""});function Hh({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 b.jsx(Ra.Provider,{value:{endpointMap:t,apiUrl:n},children:e})}function qh(e){const{endpointMap:t,apiUrl:n}=m.useContext(Ra);return{getEndpoint:(r={})=>{const s=t[e];if(!s)throw new Error(`Endpoint with id "${e}" not configured. Make sure to provide all required endpoints.`);let o="";return s.buildPath?o=s.buildPath(r):(o=s.path,Object.entries(r).forEach(([i,a])=>{o=o.replace(`:${i}`,String(a))})),{url:`${n}${o}`,method:s.method}}}}let Yh={data:""},Zh=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||Yh,Jh=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Qh=/\/\*[^]*?\*\/| +/g,Fa=/\n+/g,Re=(e,t)=>{let n="",r="",s="";for(let o in e){let i=e[o];o[0]=="@"?o[1]=="i"?n=o+" "+i+";":r+=o[1]=="f"?Re(i,o):o+"{"+Re(i,o[1]=="k"?"":t)+"}":typeof i=="object"?r+=Re(i,t?t.replace(/([^,])+/g,a=>o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,a):a?a+" "+l:l)):o):i!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),s+=Re.p?Re.p(o,i):o+":"+i+";")}return n+(t&&s?t+"{"+s+"}":s)+r},Ae={},Ba=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+Ba(e[n]);return t}return e},ep=(e,t,n,r,s)=>{let o=Ba(e),i=Ae[o]||(Ae[o]=(l=>{let u=0,c=11;for(;u<l.length;)c=101*c+l.charCodeAt(u++)>>>0;return"go"+c})(o));if(!Ae[i]){let l=o!==e?e:(u=>{let c,d,f=[{}];for(;c=Jh.exec(u.replace(Qh,""));)c[4]?f.shift():c[3]?(d=c[3].replace(Fa," ").trim(),f.unshift(f[0][d]=f[0][d]||{})):f[0][c[1]]=c[2].replace(Fa," ").trim();return f[0]})(e);Ae[i]=Re(s?{["@keyframes "+i]:l}:l,n?"":"."+i)}let a=n&&Ae.g?Ae.g:null;return n&&(Ae.g=Ae[i]),((l,u,c,d)=>{d?u.data=u.data.replace(d,l):u.data.indexOf(l)===-1&&(u.data=c?l+u.data:u.data+l)})(Ae[i],t,r,a),i},tp=(e,t,n)=>e.reduce((r,s,o)=>{let i=t[o];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?"":Re(a,""):a===!1?"":a}return r+s+(i??"")},"");function vn(e){let t=this||{},n=e.call?e(t.p):e;return ep(n.unshift?n.raw?tp(n,[].slice.call(arguments,1),t.p):n.reduce((r,s)=>Object.assign(r,s&&s.call?s(t.p):s),{}):n,Zh(t.target),t.g,t.o,t.k)}let $a,Hr,qr;vn.bind({g:1});let Me=vn.bind({k:1});function np(e,t,n,r){Re.p=t,$a=e,Hr=n,qr=r}function Fe(e,t){let n=this||{};return function(){let r=arguments;function s(o,i){let a=Object.assign({},o),l=a.className||s.className;n.p=Object.assign({theme:Hr&&Hr()},a),n.o=/ *go\d+/.test(l),a.className=vn.apply(n,r)+(l?" "+l:"");let u=e;return e[0]&&(u=a.as||e,delete a.as),qr&&u[0]&&qr(a),$a(u,a)}return t?t(s):s}}var rp=e=>typeof e=="function",xn=(e,t)=>rp(e)?e(t):e,sp=(()=>{let e=0;return()=>(++e).toString()})(),za=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),op=20,Ua=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,op)};case 1:return{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case 2:let{toast:n}=t;return Ua(e,{type:e.toasts.find(o=>o.id===n.id)?1:0,toast:n});case 3:let{toastId:r}=t;return{...e,toasts:e.toasts.map(o=>o.id===r||r===void 0?{...o,dismissed:!0,visible:!1}:o)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let s=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(o=>({...o,pauseDuration:o.pauseDuration+s}))}}},bn=[],Ye={toasts:[],pausedAt:void 0},Ze=e=>{Ye=Ua(Ye,e),bn.forEach(t=>{t(Ye)})},ip={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},ap=(e={})=>{let[t,n]=m.useState(Ye),r=m.useRef(Ye);m.useEffect(()=>(r.current!==Ye&&n(Ye),bn.push(n),()=>{let o=bn.indexOf(n);o>-1&&bn.splice(o,1)}),[]);let s=t.toasts.map(o=>{var i,a,l;return{...e,...e[o.type],...o,removeDelay:o.removeDelay||((i=e[o.type])==null?void 0:i.removeDelay)||(e==null?void 0:e.removeDelay),duration:o.duration||((a=e[o.type])==null?void 0:a.duration)||(e==null?void 0:e.duration)||ip[o.type],style:{...e.style,...(l=e[o.type])==null?void 0:l.style,...o.style}}});return{...t,toasts:s}},lp=(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)||sp()}),Gt=e=>(t,n)=>{let r=lp(t,e,n);return Ze({type:2,toast:r}),r.id},Z=(e,t)=>Gt("blank")(e,t);Z.error=Gt("error"),Z.success=Gt("success"),Z.loading=Gt("loading"),Z.custom=Gt("custom"),Z.dismiss=e=>{Ze({type:3,toastId:e})},Z.remove=e=>Ze({type:4,toastId:e}),Z.promise=(e,t,n)=>{let r=Z.loading(t.loading,{...n,...n==null?void 0:n.loading});return typeof e=="function"&&(e=e()),e.then(s=>{let o=t.success?xn(t.success,s):void 0;return o?Z.success(o,{id:r,...n,...n==null?void 0:n.success}):Z.dismiss(r),s}).catch(s=>{let o=t.error?xn(t.error,s):void 0;o?Z.error(o,{id:r,...n,...n==null?void 0:n.error}):Z.dismiss(r)}),e};var cp=(e,t)=>{Ze({type:1,toast:{id:e,height:t}})},up=()=>{Ze({type:5,time:Date.now()})},Ht=new Map,dp=1e3,fp=(e,t=dp)=>{if(Ht.has(e))return;let n=setTimeout(()=>{Ht.delete(e),Ze({type:4,toastId:e})},t);Ht.set(e,n)},hp=e=>{let{toasts:t,pausedAt:n}=ap(e);m.useEffect(()=>{if(n)return;let o=Date.now(),i=t.map(a=>{if(a.duration===1/0)return;let l=(a.duration||0)+a.pauseDuration-(o-a.createdAt);if(l<0){a.visible&&Z.dismiss(a.id);return}return setTimeout(()=>Z.dismiss(a.id),l)});return()=>{i.forEach(a=>a&&clearTimeout(a))}},[t,n]);let r=m.useCallback(()=>{n&&Ze({type:6,time:Date.now()})},[n]),s=m.useCallback((o,i)=>{let{reverseOrder:a=!1,gutter:l=8,defaultPosition:u}=i||{},c=t.filter(p=>(p.position||u)===(o.position||u)&&p.height),d=c.findIndex(p=>p.id===o.id),f=c.filter((p,v)=>v<d&&p.visible).length;return c.filter(p=>p.visible).slice(...a?[f+1]:[0,f]).reduce((p,v)=>p+(v.height||0)+l,0)},[t]);return m.useEffect(()=>{t.forEach(o=>{if(o.dismissed)fp(o.id,o.removeDelay);else{let i=Ht.get(o.id);i&&(clearTimeout(i),Ht.delete(o.id))}})},[t]),{toasts:t,handlers:{updateHeight:cp,startPause:up,endPause:r,calculateOffset:s}}},pp=Me`
108
+ */const Jl=me("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"}]]);/**
109
+ * @license lucide-react v0.483.0 - ISC
110
+ *
111
+ * This source code is licensed under the ISC license.
112
+ * See the LICENSE file in the root directory of this source tree.
113
+ */const Ql=me("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),xs=m.createContext({});function ec(e){const t=m.useRef(null);return t.current===null&&(t.current=e()),t.current}const Vn=typeof window<"u",tc=Vn?m.useLayoutEffect:m.useEffect,Nn=m.createContext(null),bs=m.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function nc(e=!0){const t=m.useContext(Nn);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,o=m.useId();m.useEffect(()=>{if(e)return s(o)},[e]);const i=m.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,i]:[!0]}function In(e,t){e.indexOf(t)===-1&&e.push(t)}function Rn(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const le=e=>e;let ot=le,Oe=le;process.env.NODE_ENV!=="production"&&(ot=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Oe=(e,t)=>{if(!e)throw new Error(t)});const rc={useManualTiming:!1};function Fn(e){let t;return()=>(t===void 0&&(t=e()),t)}const it=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Bn{constructor(){this.subscriptions=[]}add(t){return In(this.subscriptions,t),()=>Rn(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let o=0;o<s;o++){const i=this.subscriptions[o];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const xe=e=>e*1e3,Ce=e=>e/1e3;function Ss(e,t){return t?e*(1e3/t):0}const ws=new Set;function tn(e,t,n){e||ws.has(t)||(console.warn(t),ws.add(t))}const sc=Fn(()=>window.ScrollTimeline!==void 0);class oc{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(s=>{if(sc()&&s.attachTimeline)return s.attachTimeline(t);if(typeof n=="function")return n(s)});return()=>{r.forEach((s,o)=>{s&&s(),this.animations[o].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 ic extends oc{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function $n(e,t){return e?e[t]||e.default||e:void 0}const zn=2e4;function Cs(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<zn;)t+=n,r=e.next(t);return t>=zn?1/0:t}function Un(e){return typeof e=="function"}function Ts(e,t){e.timeline=t,e.onfinish=null}const Xn=e=>Array.isArray(e)&&typeof e[0]=="number",ac={linearEasing:void 0};function lc(e,t){const n=Fn(e);return()=>{var r;return(r=ac[t])!==null&&r!==void 0?r:n()}}const nn=lc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ps=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)r+=e(it(0,s-1,o))+", ";return`linear(${r.substring(0,r.length-2)})`};function Es(e){return!!(typeof e=="function"&&nn()||!e||typeof e=="string"&&(e in Wn||nn())||Xn(e)||Array.isArray(e)&&e.every(Es))}const At=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Wn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:At([0,.65,.55,1]),circOut:At([.55,0,1,.45]),backIn:At([.31,.01,.66,-.59]),backOut:At([.33,1.53,.69,.99])};function _s(e,t){if(e)return typeof e=="function"&&nn()?Ps(e,t):Xn(e)?At(e):Array.isArray(e)?e.map(n=>_s(n,t)||Wn.easeOut):Wn[e]}const rn=["read","resolveKeyframes","update","preRender","render","postRender"],As={value:null};function cc(e,t){let n=new Set,r=new Set,s=!1,o=!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,p=!1)=>{const g=p&&s?n:r;return f&&i.add(d),g.has(d)||g.add(d),d},cancel:d=>{r.delete(d),i.delete(d)},process:d=>{if(a=d,s){o=!0;return}s=!0,[n,r]=[r,n],n.forEach(c),t&&As.value&&As.value.frameloop[t].push(l),l=0,n.clear(),s=!1,o&&(o=!1,u.process(d))}};return u}const uc=40;function Ms(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,i=rn.reduce((v,x)=>(v[x]=cc(o,t?x:void 0),v),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=i,p=()=>{const v=performance.now();n=!1,s.delta=r?1e3/60:Math.max(Math.min(v-s.timestamp,uc),1),s.timestamp=v,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),u.process(s),d.process(s),f.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(p))},y=()=>{n=!0,r=!0,s.isProcessing||e(p)};return{schedule:rn.reduce((v,x)=>{const w=i[x];return v[x]=(M,P=!1,L=!1)=>(n||y(),w.schedule(M,P,L)),v},{}),cancel:v=>{for(let x=0;x<rn.length;x++)i[rn[x]].cancel(v)},state:s,steps:i}}const{schedule:$,cancel:ke,state:ee,steps:Kn}=Ms(typeof requestAnimationFrame<"u"?requestAnimationFrame:le,!0),{schedule:Gn}=Ms(queueMicrotask,!1);let sn;function dc(){sn=void 0}const be={now:()=>(sn===void 0&&be.set(ee.isProcessing||rc.useManualTiming?ee.timestamp:performance.now()),sn),set:e=>{sn=e,queueMicrotask(dc)}},ge={x:!1,y:!1};function Ls(){return ge.x||ge.y}function fc(e){return e==="x"||e==="y"?ge[e]?null:(ge[e]=!0,()=>{ge[e]=!1}):ge.x||ge.y?null:(ge.x=ge.y=!0,()=>{ge.x=ge.y=!1})}function hc(e,t,n){var r;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;const o=(r=void 0)!==null&&r!==void 0?r:s.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}function Ds(e,t){const n=hc(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function Os(e){return!(e.pointerType==="touch"||Ls())}function pc(e,t,n={}){const[r,s,o]=Ds(e,n),i=a=>{if(!Os(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{Os(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,s)};return r.forEach(a=>{a.addEventListener("pointerenter",i,s)}),o}function ks(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 js=(e,t)=>t?e===t?!0:js(e,t.parentElement):!1,Hn=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,mc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function gc(e){return mc.has(e.tagName)||e.tabIndex!==-1}const Mt=new WeakSet;function Vs(e){return t=>{t.key==="Enter"&&e(t)}}function qn(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const yc=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Vs(()=>{if(Mt.has(n))return;qn(n,"down");const s=Vs(()=>{qn(n,"up")}),o=()=>qn(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Ns(e){return Hn(e)&&!Ls()}function vc(e,t,n={}){const[r,s,o]=Ds(e,n),i=a=>{const l=a.currentTarget;if(!l||!Ns(a)||Mt.has(l))return;Mt.add(l),ks(a,"set");const c=t(l,a),u=(p,y)=>{l.removeEventListener("pointerup",d),l.removeEventListener("pointercancel",f),ks(p,"release"),!(!Ns(p)||!Mt.has(l))&&(Mt.delete(l),typeof c=="function"&&c(p,{success:y}))},d=p=>{(p.isTrusted?xc(p,l instanceof Element?l.getBoundingClientRect():{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}):!1)?u(p,!1):u(p,!(l instanceof Element)||js(l,p.target))},f=p=>{u(p,!1)};l.addEventListener("pointerup",d,s),l.addEventListener("pointercancel",f,s),l.addEventListener("lostpointercapture",f,s)};return r.forEach(a=>{a=n.useGlobalTarget?window:a;let l=!1;a instanceof HTMLElement&&(l=!0,!gc(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0)),a.addEventListener("pointerdown",i,s),l&&a.addEventListener("focus",c=>yc(c,s),s)}),o}function xc(e,t){return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}const Is=30,bc=e=>!isNaN(parseFloat(e));class Sc{constructor(t,n={}){this.version="12.5.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,s=!0)=>{const o=be.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),s&&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=be.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=bc(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&tn(!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 Bn);const r=this.events[t].add(n);return t==="change"?()=>{r(),$.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=be.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Is)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Is);return Ss(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 Lt(e,t){return new Sc(e,t)}const Rs=m.createContext({strict:!1}),Fs={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"]},at={};for(const e in Fs)at[e]={isEnabled:t=>Fs[e].some(n=>!!t[n])};function wc(e){for(const t in e)at[t]={...at[t],...e[t]}}const Cc=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 on(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Cc.has(e)}let Bs=e=>!on(e);function Tc(e){e&&(Bs=t=>t.startsWith("on")?!on(t):e(t))}try{Tc(require("@emotion/is-prop-valid").default)}catch{}function Pc(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(Bs(s)||n===!0&&on(s)||!t&&!on(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}function Ec(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&tn(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,s)=>s==="create"?e:(t.has(s)||t.set(s,e(s)),t.get(s))})}const an=m.createContext({});function ln(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Dt(e){return typeof e=="string"||Array.isArray(e)}const Yn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Zn=["initial",...Yn];function cn(e){return ln(e.animate)||Zn.some(t=>Dt(e[t]))}function $s(e){return!!(cn(e)||e.variants)}function _c(e,t){if(cn(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Dt(n)?n:void 0,animate:Dt(r)?r:void 0}}return e.inherit!==!1?t:{}}function Ac(e){const{initial:t,animate:n}=_c(e,m.useContext(an));return m.useMemo(()=>({initial:t,animate:n}),[zs(t),zs(n)])}function zs(e){return Array.isArray(e)?e.join(" "):e}const Mc=Symbol.for("motionComponentSymbol");function lt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Lc(e,t,n){return m.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):lt(n)&&(n.current=r))},[t])}const Jn=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Us="data-"+Jn("framerAppearId"),Xs=m.createContext({});function Dc(e,t,n,r,s){var o,i;const{visualElement:a}=m.useContext(an),l=m.useContext(Rs),c=m.useContext(Nn),u=m.useContext(bs).reducedMotion,d=m.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,p=m.useContext(Xs);f&&!f.projection&&s&&(f.type==="html"||f.type==="svg")&&Oc(d.current,n,s,p);const y=m.useRef(!1);m.useInsertionEffect(()=>{f&&y.current&&f.update(n,c)});const g=n[Us],S=m.useRef(!!g&&!(!((o=window.MotionHandoffIsComplete)===null||o===void 0)&&o.call(window,g))&&((i=window.MotionHasOptimisedAnimation)===null||i===void 0?void 0:i.call(window,g)));return tc(()=>{f&&(y.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Gn.render(f.render),S.current&&f.animationState&&f.animationState.animateChanges())}),m.useEffect(()=>{f&&(!S.current&&f.animationState&&f.animationState.animateChanges(),S.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,g)}),S.current=!1))}),f}function Oc(e,t,n,r){const{layoutId:s,layout:o,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Ws(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!i||a&&lt(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function Ws(e){if(e)return e.options.allowProjection!==!1?e.projection:Ws(e.parent)}function kc({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:s}){var o,i;e&&wc(e);function a(c,u){let d;const f={...m.useContext(bs),...c,layoutId:jc(c)},{isStatic:p}=f,y=Ac(c),g=r(c,p);if(!p&&Vn){Vc(f,e);const S=Nc(f);d=S.MeasureLayout,y.visualElement=Dc(s,g,f,t,S.ProjectionNode)}return b.jsxs(an.Provider,{value:y,children:[d&&y.visualElement?b.jsx(d,{visualElement:y.visualElement,...f}):null,n(s,c,Lc(g,y.visualElement,u),g,p,y.visualElement)]})}a.displayName=`motion.${typeof s=="string"?s:`create(${(i=(o=s.displayName)!==null&&o!==void 0?o:s.name)!==null&&i!==void 0?i:""})`}`;const l=m.forwardRef(a);return l[Mc]=s,l}function jc({layoutId:e}){const t=m.useContext(xs).id;return t&&e!==void 0?t+"-"+e:e}function Vc(e,t){const n=m.useContext(Rs).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?ot(!1,r):Oe(!1,r)}}function Nc(e){const{drag:t,layout:n}=at;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 Ks=e=>t=>typeof t=="string"&&t.startsWith(e),Qn=Ks("--"),Ic=Ks("var(--"),er=e=>Ic(e)?Rc.test(e.split("/*")[0].trim()):!1,Rc=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ot={};function Fc(e){for(const t in e)Ot[t]=e[t],Qn(t)&&(Ot[t].isCSSVariable=!0)}const ct=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ue=new Set(ct);function Gs(e,{layout:t,layoutId:n}){return Ue.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Ot[e]||e==="opacity")}const ne=e=>!!(e&&e.getVelocity),Hs=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Te=(e,t,n)=>n>t?t:n<e?e:n,ut={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},kt={...ut,transform:e=>Te(0,1,e)},un={...ut,default:1},jt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),je=jt("deg"),Se=jt("%"),D=jt("px"),Bc=jt("vh"),$c=jt("vw"),qs={...Se,parse:e=>Se.parse(e)/100,transform:e=>Se.transform(e*100)},zc={borderWidth:D,borderTopWidth:D,borderRightWidth:D,borderBottomWidth:D,borderLeftWidth:D,borderRadius:D,radius:D,borderTopLeftRadius:D,borderTopRightRadius:D,borderBottomRightRadius:D,borderBottomLeftRadius:D,width:D,maxWidth:D,height:D,maxHeight:D,top:D,right:D,bottom:D,left:D,padding:D,paddingTop:D,paddingRight:D,paddingBottom:D,paddingLeft:D,margin:D,marginTop:D,marginRight:D,marginBottom:D,marginLeft:D,backgroundPositionX:D,backgroundPositionY:D},Uc={rotate:je,rotateX:je,rotateY:je,rotateZ:je,scale:un,scaleX:un,scaleY:un,scaleZ:un,skew:je,skewX:je,skewY:je,distance:D,translateX:D,translateY:D,translateZ:D,x:D,y:D,z:D,perspective:D,transformPerspective:D,opacity:kt,originX:qs,originY:qs,originZ:D},Ys={...ut,transform:Math.round},tr={...zc,...Uc,zIndex:Ys,size:D,fillOpacity:kt,strokeOpacity:kt,numOctaves:Ys},Xc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Wc=ct.length;function Kc(e,t,n){let r="",s=!0;for(let o=0;o<Wc;o++){const i=ct[o],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=Hs(a,tr[i]);if(!l){s=!1;const u=Xc[i]||i;r+=`${u}(${c}) `}n&&(t[i]=c)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function nr(e,t,n){const{style:r,vars:s,transformOrigin:o}=e;let i=!1,a=!1;for(const l in t){const c=t[l];if(Ue.has(l)){i=!0;continue}else if(Qn(l)){s[l]=c;continue}else{const u=Hs(c,tr[l]);l.startsWith("origin")?(a=!0,o[l]=u):r[l]=u}}if(t.transform||(i||n?r.transform=Kc(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=o;r.transformOrigin=`${l} ${c} ${u}`}}const rr=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Zs(e,t,n){for(const r in t)!ne(t[r])&&!Gs(r,n)&&(e[r]=t[r])}function Gc({transformTemplate:e},t){return m.useMemo(()=>{const n=rr();return nr(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Hc(e,t){const n=e.style||{},r={};return Zs(r,n,e),Object.assign(r,Gc(e,t)),r}function qc(e,t){const n={},r=Hc(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 Yc=["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:!!(Yc.indexOf(e)>-1||/[A-Z]/u.test(e))}const Zc={offset:"stroke-dashoffset",array:"stroke-dasharray"},Jc={offset:"strokeDashoffset",array:"strokeDasharray"};function Qc(e,t,n=1,r=0,s=!0){e.pathLength=1;const o=s?Zc:Jc;e[o.offset]=D.transform(-r);const i=D.transform(t),a=D.transform(n);e[o.array]=`${i} ${a}`}function Js(e,t,n){return typeof e=="string"?e:D.transform(t+n*e)}function eu(e,t,n){const r=Js(t,e.x,e.width),s=Js(n,e.y,e.height);return`${r} ${s}`}function or(e,{attrX:t,attrY:n,attrScale:r,originX:s,originY:o,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(nr(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:p,dimensions:y}=e;f.transform&&(y&&(p.transform=f.transform),delete f.transform),y&&(s!==void 0||o!==void 0||p.transform)&&(p.transformOrigin=eu(y,s!==void 0?s:.5,o!==void 0?o:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&Qc(f,i,a,l,!1)}const Qs=()=>({...rr(),attrs:{}}),ir=e=>typeof e=="string"&&e.toLowerCase()==="svg";function tu(e,t,n,r){const s=m.useMemo(()=>{const o=Qs();return or(o,t,ir(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Zs(o,e.style,e),s.style={...o,...s.style}}return s}function nu(e=!1){return(n,r,s,{latestValues:o},i)=>{const l=(sr(n)?tu:qc)(r,o,i,n),c=Pc(r,typeof n=="string",e),u=n!==m.Fragment?{...c,...l,ref:s}:{},{children:d}=r,f=m.useMemo(()=>ne(d)?d.get():d,[d]);return m.createElement(n,{...u,children:f})}}function eo(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function ar(e,t,n,r){if(typeof t=="function"){const[s,o]=eo(r);t=t(n!==void 0?n:e.custom,s,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,o]=eo(r);t=t(n!==void 0?n:e.custom,s,o)}return t}const lr=e=>Array.isArray(e),ru=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),su=e=>lr(e)?e[e.length-1]||0:e;function dn(e){const t=ne(e)?e.get():e;return ru(t)?t.toValue():t}function ou({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,s,o){const i={latestValues:iu(r,s,o,e),renderState:t()};return n&&(i.onMount=a=>n({props:r,current:a,...i}),i.onUpdate=a=>n(a)),i}const to=e=>(t,n)=>{const r=m.useContext(an),s=m.useContext(Nn),o=()=>ou(e,t,r,s);return n?o():ec(o)};function iu(e,t,n,r){const s={},o=r(e,{});for(const f in o)s[f]=dn(o[f]);let{initial:i,animate:a}=e;const l=cn(e),c=$s(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"&&!ln(d)){const f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){const y=ar(e,f[p]);if(y){const{transitionEnd:g,transition:S,...v}=y;for(const x in v){let w=v[x];if(Array.isArray(w)){const M=u?w.length-1:0;w=w[M]}w!==null&&(s[x]=w)}for(const x in g)s[x]=g[x]}}}return s}function cr(e,t,n){var r;const{style:s}=e,o={};for(const i in s)(ne(s[i])||t.style&&ne(t.style[i])||Gs(i,e)||((r=n==null?void 0:n.getValue(i))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(o[i]=s[i]);return o}const au={useVisualState:to({scrapeMotionValuesFromProps:cr,createRenderState:rr})};function no(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 ro(e,{style:t,vars:n},r,s){Object.assign(e.style,t,s&&s.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const so=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 oo(e,t,n,r){ro(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(so.has(s)?s:Jn(s),t.attrs[s])}function io(e,t,n){const r=cr(e,t,n);for(const s in e)if(ne(e[s])||ne(t[s])){const o=ct.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[o]=e[s]}return r}const ao=["x","y","width","height","cx","cy","r"],lu={useVisualState:to({scrapeMotionValuesFromProps:io,createRenderState:Qs,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:s})=>{if(!n)return;let o=!!e.drag;if(!o){for(const a in s)if(Ue.has(a)){o=!0;break}}if(!o)return;let i=!t;if(t)for(let a=0;a<ao.length;a++){const l=ao[a];e[l]!==t[l]&&(i=!0)}i&&$.read(()=>{no(n,r),$.render(()=>{or(r,s,ir(n.tagName),e.transformTemplate),oo(n,r)})})}})};function cu(e,t){return function(r,{forwardMotionProps:s}={forwardMotionProps:!1}){const i={...sr(r)?lu:au,preloadedFeatures:e,useRender:nu(s),createVisualElement:t,Component:r};return kc(i)}}function Vt(e,t,n){const r=e.getProps();return ar(r,t,n!==void 0?n:r.custom,e)}const lo=new Set(["width","height","top","left","right","bottom",...ct]);function uu(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Lt(n))}function du(e,t){const n=Vt(e,t);let{transitionEnd:r={},transition:s={},...o}=n||{};o={...o,...r};for(const i in o){const a=su(o[i]);uu(e,i,a)}}function fu(e){return!!(ne(e)&&e.add)}function ur(e,t){const n=e.getValue("willChange");if(fu(n))return n.add(t)}function co(e){return e.props[Us]}const uo=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,hu=1e-7,pu=12;function mu(e,t,n,r,s){let o,i,a=0;do i=t+(n-t)/2,o=uo(i,r,s)-e,o>0?n=i:t=i;while(Math.abs(o)>hu&&++a<pu);return i}function Nt(e,t,n,r){if(e===t&&n===r)return le;const s=o=>mu(o,0,1,e,n);return o=>o===0||o===1?o:uo(s(o),t,r)}const fo=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ho=e=>t=>1-e(1-t),po=Nt(.33,1.53,.69,.99),dr=ho(po),mo=fo(dr),go=e=>(e*=2)<1?.5*dr(e):.5*(2-Math.pow(2,-10*(e-1))),fr=e=>1-Math.sin(Math.acos(e)),yo=ho(fr),vo=fo(fr),xo=e=>/^0[^.\s]+$/u.test(e);function gu(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||xo(e):!0}const It=e=>Math.round(e*1e5)/1e5,hr=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function yu(e){return e==null}const vu=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,pr=(e,t)=>n=>!!(typeof n=="string"&&vu.test(n)&&n.startsWith(e)||t&&!yu(n)&&Object.prototype.hasOwnProperty.call(n,t)),bo=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,o,i,a]=r.match(hr);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},xu=e=>Te(0,255,e),mr={...ut,transform:e=>Math.round(xu(e))},Xe={test:pr("rgb","red"),parse:bo("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+mr.transform(e)+", "+mr.transform(t)+", "+mr.transform(n)+", "+It(kt.transform(r))+")"};function bu(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const gr={test:pr("#"),parse:bu,transform:Xe.transform},dt={test:pr("hsl","hue"),parse:bo("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Se.transform(It(t))+", "+Se.transform(It(n))+", "+It(kt.transform(r))+")"},re={test:e=>Xe.test(e)||gr.test(e)||dt.test(e),parse:e=>Xe.test(e)?Xe.parse(e):dt.test(e)?dt.parse(e):gr.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Xe.transform(e):dt.transform(e)},Su=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function wu(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(hr))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Su))===null||n===void 0?void 0:n.length)||0)>0}const So="number",wo="color",Cu="var",Tu="var(",Co="${}",Pu=/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 Rt(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let o=0;const a=t.replace(Pu,l=>(re.test(l)?(r.color.push(o),s.push(wo),n.push(re.parse(l))):l.startsWith(Tu)?(r.var.push(o),s.push(Cu),n.push(l)):(r.number.push(o),s.push(So),n.push(parseFloat(l))),++o,Co)).split(Co);return{values:n,split:a,indexes:r,types:s}}function To(e){return Rt(e).values}function Po(e){const{split:t,types:n}=Rt(e),r=t.length;return s=>{let o="";for(let i=0;i<r;i++)if(o+=t[i],s[i]!==void 0){const a=n[i];a===So?o+=It(s[i]):a===wo?o+=re.transform(s[i]):o+=s[i]}return o}}const Eu=e=>typeof e=="number"?0:e;function _u(e){const t=To(e);return Po(e)(t.map(Eu))}const Ve={test:wu,parse:To,createTransformer:Po,getAnimatableNone:_u},Au=new Set(["brightness","contrast","saturate","opacity"]);function Mu(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(hr)||[];if(!r)return e;const s=n.replace(r,"");let o=Au.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+s+")"}const Lu=/\b([a-z-]*)\(.*?\)/gu,yr={...Ve,getAnimatableNone:e=>{const t=e.match(Lu);return t?t.map(Mu).join(" "):e}},Du={...tr,color:re,backgroundColor:re,outlineColor:re,fill:re,stroke:re,borderColor:re,borderTopColor:re,borderRightColor:re,borderBottomColor:re,borderLeftColor:re,filter:yr,WebkitFilter:yr},Eo=e=>Du[e];function _o(e,t){let n=Eo(e);return n!==yr&&(n=Ve),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Ou=new Set(["auto","none","0"]);function ku(e,t,n){let r=0,s;for(;r<e.length&&!s;){const o=e[r];typeof o=="string"&&!Ou.has(o)&&Rt(o).values.length&&(s=e[r]),r++}if(s&&n)for(const o of t)e[o]=_o(n,s)}const We=e=>e*180/Math.PI,vr=e=>{const t=We(Math.atan2(e[1],e[0]));return xr(t)},ju={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:vr,rotateZ:vr,skewX:e=>We(Math.atan(e[1])),skewY:e=>We(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},xr=e=>(e=e%360,e<0&&(e+=360),e),Ao=vr,Mo=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Lo=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Vu={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Mo,scaleY:Lo,scale:e=>(Mo(e)+Lo(e))/2,rotateX:e=>xr(We(Math.atan2(e[6],e[5]))),rotateY:e=>xr(We(Math.atan2(-e[2],e[0]))),rotateZ:Ao,rotate:Ao,skewX:e=>We(Math.atan(e[4])),skewY:e=>We(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Do(e){return e.includes("scale")?1:0}function br(e,t){if(!e||e==="none")return Do(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=Vu,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=ju,s=a}if(!s)return Do(t);const o=r[t],i=s[1].split(",").map(Iu);return typeof o=="function"?o(i):i[o]}const Nu=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return br(n,t)};function Iu(e){return parseFloat(e.trim())}const Oo=e=>e===ut||e===D,Ru=new Set(["x","y","z"]),Fu=ct.filter(e=>!Ru.has(e));function Bu(e){const t=[];return Fu.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const ft={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})=>br(t,"x"),y:(e,{transform:t})=>br(t,"y")};ft.translateX=ft.x,ft.translateY=ft.y;const Ke=new Set;let Sr=!1,wr=!1;function ko(){if(wr){const e=Array.from(Ke).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=Bu(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([o,i])=>{var a;(a=r.getValue(o))===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,Sr=!1,Ke.forEach(e=>e.complete()),Ke.clear()}function jo(){Ke.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(wr=!0)})}function $u(){jo(),ko()}class Cr{constructor(t,n,r,s,o,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=s,this.element=o,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ke.add(this),Sr||(Sr=!0,$.read(jo),$.resolveKeyframes(ko))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;for(let o=0;o<t.length;o++)if(t[o]===null)if(o===0){const i=s==null?void 0:s.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),s&&i===void 0&&s.set(t[0])}else t[o]=t[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Ke.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ke.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Vo=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),zu=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Uu(e){const t=zu.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}const Xu=4;function No(e,t,n=1){Oe(n<=Xu,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,s]=Uu(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const i=o.trim();return Vo(i)?parseFloat(i):i}return er(s)?No(s,t,n+1):s}const Io=e=>t=>t.test(e),Ro=[ut,D,Se,je,$c,Bc,{test:e=>e==="auto",parse:e=>e}],Fo=e=>Ro.find(Io(e));class Bo extends Cr{constructor(t,n,r,s,o){super(t,n,r,s,o,!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(),er(c))){const u=No(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!lo.has(r)||t.length!==2)return;const[s,o]=t,i=Fo(s),a=Fo(o);if(i!==a)if(Oo(i)&&Oo(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 s=0;s<t.length;s++)gu(t[s])&&r.push(s);r.length&&ku(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=ft[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:s}=this;if(!n||!n.current)return;const o=n.getValue(r);o&&o.jump(this.measuredOrigin,!1);const i=s.length-1,a=s[i];s[i]=ft[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 $o=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ve.test(e)||e==="0")&&!e.startsWith("url("));function Wu(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 Ku(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],i=$o(s,t),a=$o(o,t);return ot(i===a,`You are trying to animate ${t} from "${s}" to "${o}". ${s} is not an animatable value - to enable this animation set ${s} to a value animatable to ${o} via the \`style\` property.`),!i||!a?!1:Wu(e)||(n==="spring"||Un(n))&&r}const Gu=e=>e!==null;function fn(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(Gu),o=t&&n!=="loop"&&t%2===1?0:s.length-1;return!o||r===void 0?s[o]:r}const Hu=40;class zo{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=be.now(),this.options={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:o,repeatType:i,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>Hu?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&$u(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=be.now(),this.hasAttemptedResolve=!0;const{name:r,type:s,velocity:o,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!Ku(t,r,s,o))if(i)this.options.duration=0;else{l&&l(fn(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 W=(e,t,n)=>e+(t-e)*n;function Tr(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 qu({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,o=0,i=0;if(!t)s=o=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=Tr(l,a,e+1/3),o=Tr(l,a,e),i=Tr(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(i*255),alpha:r}}function hn(e,t){return n=>n>0?t:e}const Pr=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},Yu=[gr,Xe,dt],Zu=e=>Yu.find(t=>t.test(e));function Uo(e){const t=Zu(e);if(ot(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===dt&&(n=qu(n)),n}const Xo=(e,t)=>{const n=Uo(e),r=Uo(t);if(!n||!r)return hn(e,t);const s={...n};return o=>(s.red=Pr(n.red,r.red,o),s.green=Pr(n.green,r.green,o),s.blue=Pr(n.blue,r.blue,o),s.alpha=W(n.alpha,r.alpha,o),Xe.transform(s))},Ju=(e,t)=>n=>t(e(n)),Ft=(...e)=>e.reduce(Ju),Er=new Set(["none","hidden"]);function Qu(e,t){return Er.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function ed(e,t){return n=>W(e,t,n)}function _r(e){return typeof e=="number"?ed:typeof e=="string"?er(e)?hn:re.test(e)?Xo:rd:Array.isArray(e)?Wo:typeof e=="object"?re.test(e)?Xo:td:hn}function Wo(e,t){const n=[...e],r=n.length,s=e.map((o,i)=>_r(o)(o,t[i]));return o=>{for(let i=0;i<r;i++)n[i]=s[i](o);return n}}function td(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=_r(e[s])(e[s],t[s]));return s=>{for(const o in r)n[o]=r[o](s);return n}}function nd(e,t){var n;const r=[],s={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],a=e.indexes[i][s[i]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[o]=l,s[i]++}return r}const rd=(e,t)=>{const n=Ve.createTransformer(t),r=Rt(e),s=Rt(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?Er.has(e)&&!s.values.length||Er.has(t)&&!r.values.length?Qu(e,t):Ft(Wo(nd(r,s),s.values),n):(ot(!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.`),hn(e,t))};function Ko(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?W(e,t,n):_r(e)(e,t)}const sd=5;function Go(e,t,n){const r=Math.max(t-sd,0);return Ss(n-e(r),t-r)}const K={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},Ho=.001;function od({duration:e=K.duration,bounce:t=K.bounce,velocity:n=K.velocity,mass:r=K.mass}){let s,o;ot(e<=xe(K.maxDuration),"Spring duration must be 10 seconds or less");let i=1-t;i=Te(K.minDamping,K.maxDamping,i),e=Te(K.minDuration,K.maxDuration,Ce(e)),i<1?(s=c=>{const u=c*i,d=u*e,f=u-n,p=Ar(c,i),y=Math.exp(-d);return Ho-f/p*y},o=c=>{const d=c*i*e,f=d*n+n,p=Math.pow(i,2)*Math.pow(c,2)*e,y=Math.exp(-d),g=Ar(Math.pow(c,2),i);return(-s(c)+Ho>0?-1:1)*((f-p)*y)/g}):(s=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-.001+u*d},o=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=ad(s,o,a);if(e=xe(e),isNaN(l))return{stiffness:K.stiffness,damping:K.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const id=12;function ad(e,t,n){let r=n;for(let s=1;s<id;s++)r=r-e(r)/t(r);return r}function Ar(e,t){return e*Math.sqrt(1-t*t)}const ld=["duration","bounce"],cd=["stiffness","damping","mass"];function qo(e,t){return t.some(n=>e[n]!==void 0)}function ud(e){let t={velocity:K.velocity,stiffness:K.stiffness,damping:K.damping,mass:K.mass,isResolvedFromDuration:!1,...e};if(!qo(e,cd)&&qo(e,ld))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,o=2*Te(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:K.mass,stiffness:s,damping:o}}else{const n=od(e);t={...t,...n,mass:K.mass},t.isResolvedFromDuration=!0}return t}function Yo(e=K.visualDuration,t=K.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const o=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=ud({...n,velocity:-Ce(n.velocity||0)}),y=f||0,g=c/(2*Math.sqrt(l*u)),S=i-o,v=Ce(Math.sqrt(l/u)),x=Math.abs(S)<5;r||(r=x?K.restSpeed.granular:K.restSpeed.default),s||(s=x?K.restDelta.granular:K.restDelta.default);let w;if(g<1){const P=Ar(v,g);w=L=>{const T=Math.exp(-g*v*L);return i-T*((y+g*v*S)/P*Math.sin(P*L)+S*Math.cos(P*L))}}else if(g===1)w=P=>i-Math.exp(-v*P)*(S+(y+v*S)*P);else{const P=v*Math.sqrt(g*g-1);w=L=>{const T=Math.exp(-g*v*L),A=Math.min(P*L,300);return i-T*((y+g*v*S)*Math.sinh(A)+P*S*Math.cosh(A))/P}}const M={calculatedDuration:p&&d||null,next:P=>{const L=w(P);if(p)a.done=P>=d;else{let T=0;g<1&&(T=P===0?xe(y):Go(w,P,L));const A=Math.abs(T)<=r,V=Math.abs(i-L)<=s;a.done=A&&V}return a.value=a.done?i:L,a},toString:()=>{const P=Math.min(Cs(M),zn),L=Ps(T=>M.next(P*T).value,P,30);return P+"ms "+L}};return M}function Zo({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},p=A=>a!==void 0&&A<a||l!==void 0&&A>l,y=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let g=n*t;const S=d+g,v=i===void 0?S:i(S);v!==S&&(g=v-d);const x=A=>-g*Math.exp(-A/r),w=A=>v+x(A),M=A=>{const V=x(A),E=w(A);f.done=Math.abs(V)<=c,f.value=f.done?v:E};let P,L;const T=A=>{p(f.value)&&(P=A,L=Yo({keyframes:[f.value,y(f.value)],velocity:Go(w,A,f.value),damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return T(0),{calculatedDuration:null,next:A=>{let V=!1;return!L&&P===void 0&&(V=!0,M(A),T(A)),P!==void 0&&A>=P?L.next(A-P):(!V&&M(A),f)}}}const dd=Nt(.42,0,1,1),fd=Nt(0,0,.58,1),Jo=Nt(.42,0,.58,1),hd=e=>Array.isArray(e)&&typeof e[0]!="number",Qo={linear:le,easeIn:dd,easeInOut:Jo,easeOut:fd,circIn:fr,circInOut:vo,circOut:yo,backIn:dr,backInOut:mo,backOut:po,anticipate:go},ei=e=>{if(Xn(e)){Oe(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,s]=e;return Nt(t,n,r,s)}else if(typeof e=="string")return Oe(Qo[e]!==void 0,`Invalid easing type '${e}'`),Qo[e];return e};function pd(e,t,n){const r=[],s=n||Ko,o=e.length-1;for(let i=0;i<o;i++){let a=s(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||le:t;a=Ft(l,a)}r.push(a)}return r}function md(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const o=e.length;if(Oe(o===t.length,"Both input and output ranges must be the same length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=pd(t,r,s),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=it(e[d],e[d+1],u);return a[d](f)};return n?u=>c(Te(e[0],e[o-1],u)):c}function gd(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=it(0,t,r);e.push(W(n,1,s))}}function yd(e){const t=[0];return gd(t,e.length-1),t}function vd(e,t){return e.map(n=>n*t)}function xd(e,t){return e.map(()=>t||Jo).splice(0,e.length-1)}function Bt({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=hd(r)?r.map(ei):ei(r),o={done:!1,value:t[0]},i=vd(n&&n.length===t.length?n:yd(t),e),a=md(i,t,{ease:Array.isArray(s)?s:xd(t,s)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}const bd=e=>{const t=({timestamp:n})=>e(n);return{start:()=>$.update(t,!0),stop:()=>ke(t),now:()=>ee.isProcessing?ee.timestamp:be.now()}},Sd={decay:Zo,inertia:Zo,tween:Bt,keyframes:Bt,spring:Yo},wd=e=>e/100;class Mr extends zo{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:s,keyframes:o}=this.options,i=(s==null?void 0:s.KeyframeResolver)||Cr,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new i(o,a,n,r,s),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:s=0,repeatType:o,velocity:i=0}=this.options,a=Un(n)?n:Sd[n]||Bt;let l,c;process.env.NODE_ENV!=="production"&&a!==Bt&&Oe(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),a!==Bt&&typeof t[0]!="number"&&(l=Ft(wd,Ko(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});o==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=Cs(u));const{calculatedDuration:d}=u,f=d+s,p=f*(r+1)-s;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:p}}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:A}=this.options;return{done:!0,value:A[A.length-1]}}const{finalKeyframe:s,generator:o,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return o.next(0);const{delay:f,repeat:p,repeatType:y,repeatDelay:g,onUpdate:S}=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 v=this.currentTime-f*(this.speed>=0?1:-1),x=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let w=this.currentTime,M=o;if(p){const A=Math.min(this.currentTime,u)/d;let V=Math.floor(A),E=A%1;!E&&A>=1&&(E=1),E===1&&V--,V=Math.min(V,p+1),!!(V%2)&&(y==="reverse"?(E=1-E,g&&(E-=g/d)):y==="mirror"&&(M=i)),w=Te(0,1,E)*d}const P=x?{done:!1,value:l[0]}:M.next(w);a&&(P.value=a(P.value));let{done:L}=P;!x&&c!==null&&(L=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const T=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&L);return T&&s!==void 0&&(P.value=fn(l,this.options,s)),S&&S(P.value),T&&this.finish(),P}get duration(){const{resolved:t}=this;return t?Ce(t.calculatedDuration):0}get time(){return Ce(this.currentTime)}set time(t){t=xe(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=bd,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=s):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 Cd=new Set(["opacity","clipPath","filter","transform"]);function Td(e,t,n,{delay:r=0,duration:s=300,repeat:o=0,repeatType:i="loop",ease:a="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=_s(a,s);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:i==="reverse"?"alternate":"normal"})}const Pd=Fn(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),pn=10,Ed=2e4;function _d(e){return Un(e.type)||e.type==="spring"||!Es(e.ease)}function Ad(e,t){const n=new Mr({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const s=[];let o=0;for(;!r.done&&o<Ed;)r=n.sample(o),s.push(r.value),o+=pn;return{times:void 0,keyframes:s,duration:o-pn,ease:"linear"}}const ti={anticipate:go,backInOut:mo,circInOut:vo};function Md(e){return e in ti}class ni extends zo{constructor(t){super(t);const{name:n,motionValue:r,element:s,keyframes:o}=this.options;this.resolver=new Bo(o,(i,a)=>this.onKeyframesResolved(i,a),n,r,s),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:s,ease:o,type:i,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof o=="string"&&nn()&&Md(o)&&(o=ti[o]),_d(this.options)){const{onComplete:d,onUpdate:f,motionValue:p,element:y,...g}=this.options,S=Ad(t,g);t=S.keyframes,t.length===1&&(t[1]=t[0]),r=S.duration,s=S.times,o=S.ease,i="keyframes"}const u=Td(a.owner.current,l,t,{...this.options,duration:r,times:s,ease:o});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(Ts(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;a.set(fn(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:s,type:i,ease:o,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=xe(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 le;const{animation:r}=n;Ts(r,t)}return le}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:s,type:o,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,...p}=this.options,y=new Mr({...p,keyframes:r,duration:s,type:o,ease:i,times:a,isGenerator:!0}),g=xe(this.time);c.setWithVelocity(y.sample(g-pn).value,y.sample(g).value,pn)}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:s,repeatType:o,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 Pd()&&r&&Cd.has(r)&&!l&&!c&&!s&&o!=="mirror"&&i!==0&&a!=="inertia"}}const Ld={type:"spring",stiffness:500,damping:25,restSpeed:10},Dd=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Od={type:"keyframes",duration:.8},kd={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},jd=(e,{keyframes:t})=>t.length>2?Od:Ue.has(e)?e.startsWith("scale")?Dd(t[1]):Ld:kd;function Vd({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:o,repeatType:i,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const Lr=(e,t,n,r={},s,o)=>i=>{const a=$n(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-xe(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:o?void 0:s};Vd(a)||(u={...u,...jd(e,u)}),u.duration&&(u.duration=xe(u.duration)),u.repeatDelay&&(u.repeatDelay=xe(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&&!o&&t.get()!==void 0){const f=fn(u.keyframes,a);if(f!==void 0)return $.update(()=>{u.onUpdate(f),u.onComplete()}),new ic([])}return!o&&ni.supports(u)?new ni(u):new Mr(u)};function Nd({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:s}={}){var o;let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(i=r);const c=[],u=s&&e.animationState&&e.animationState.getState()[s];for(const d in l){const f=e.getValue(d,(o=e.latestValues[d])!==null&&o!==void 0?o:null),p=l[d];if(p===void 0||u&&Nd(u,d))continue;const y={delay:n,...$n(i||{},d)};let g=!1;if(window.MotionHandoffAnimation){const v=co(e);if(v){const x=window.MotionHandoffAnimation(v,d,$);x!==null&&(y.startTime=x,g=!0)}}ur(e,d),f.start(Lr(d,f,p,e.shouldReduceMotion&&lo.has(d)?{type:!1}:y,e,g));const S=f.animation;S&&c.push(S)}return a&&Promise.all(c).then(()=>{$.update(()=>{a&&du(e,a)})}),c}function Dr(e,t,n={}){var r;const s=Vt(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(o=n.transitionOverride);const i=s?()=>Promise.all(ri(e,s,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=o;return Id(e,t,u+c,d,f,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[c,u]=l==="beforeChildren"?[i,a]:[a,i];return c().then(()=>u())}else return Promise.all([i(),a(n.delay)])}function Id(e,t,n=0,r=0,s=1,o){const i=[],a=(e.variantChildren.size-1)*r,l=s===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(Rd).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(Dr(c,t,{...o,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function Rd(e,t){return e.sortNodePosition(t)}function Fd(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(o=>Dr(e,o,n));r=Promise.all(s)}else if(typeof t=="string")r=Dr(e,t,n);else{const s=typeof t=="function"?Vt(e,t,n.custom):t;r=Promise.all(ri(e,s,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 Bd=Zn.length;function oi(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?oi(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Bd;n++){const r=Zn[n],s=e.props[r];(Dt(s)||s===!1)&&(t[r]=s)}return t}const $d=[...Yn].reverse(),zd=Yn.length;function Ud(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Fd(e,n,r)))}function Xd(e){let t=Ud(e),n=ii(),r=!0;const s=l=>(c,u)=>{var d;const f=Vt(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:p,transitionEnd:y,...g}=f;c={...c,...g,...y}}return c};function o(l){t=l(e)}function i(l){const{props:c}=e,u=oi(e.parent)||{},d=[],f=new Set;let p={},y=1/0;for(let S=0;S<zd;S++){const v=$d[S],x=n[v],w=c[v]!==void 0?c[v]:u[v],M=Dt(w),P=v===l?x.isActive:null;P===!1&&(y=S);let L=w===u[v]&&w!==c[v]&&M;if(L&&r&&e.manuallyAnimateOnMount&&(L=!1),x.protectedKeys={...p},!x.isActive&&P===null||!w&&!x.prevProp||ln(w)||typeof w=="boolean")continue;const T=Wd(x.prevProp,w);let A=T||v===l&&x.isActive&&!L&&M||S>y&&M,V=!1;const E=Array.isArray(w)?w:[w];let U=E.reduce(s(v),{});P===!1&&(U={});const{prevResolvedValues:z={}}=x,oe={...z,...U},he=H=>{A=!0,f.has(H)&&(V=!0,f.delete(H)),x.needsAnimating[H]=!0;const k=e.getValue(H);k&&(k.liveStyle=!1)};for(const H in oe){const k=U[H],F=z[H];if(p.hasOwnProperty(H))continue;let X=!1;lr(k)&&lr(F)?X=!si(k,F):X=k!==F,X?k!=null?he(H):f.add(H):k!==void 0&&f.has(H)?he(H):x.protectedKeys[H]=!0}x.prevProp=w,x.prevResolvedValues=U,x.isActive&&(p={...p,...U}),r&&e.blockInitialAnimation&&(A=!1),A&&(!(L&&T)||V)&&d.push(...E.map(H=>({animation:H,options:{type:v}})))}if(f.size){const S={};if(typeof c.initial!="boolean"){const v=Vt(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(S.transition=v.transition)}f.forEach(v=>{const x=e.getBaseTarget(v),w=e.getValue(v);w&&(w.liveStyle=!0),S[v]=x??null}),d.push({animation:S})}let g=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?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 p;return(p=f.animationState)===null||p===void 0?void 0:p.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:o,getState:()=>n,reset:()=>{n=ii(),r=!0}}}function Wd(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!si(t,e):!1}function Ge(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ii(){return{animate:Ge(!0),whileInView:Ge(),whileHover:Ge(),whileTap:Ge(),whileDrag:Ge(),whileFocus:Ge(),exit:Ge()}}class Ne{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Kd extends Ne{constructor(t){super(t),t.animationState||(t.animationState=Xd(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ln(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 Gd=0;class Hd extends Ne{constructor(){super(...arguments),this.id=Gd++}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 s=this.node.animationState.setActive("exit",!t);n&&!t&&s.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 qd={animation:{Feature:Kd},exit:{Feature:Hd}};function $t(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function zt(e){return{point:{x:e.pageX,y:e.pageY}}}const Yd=e=>t=>Hn(t)&&e(t,zt(t));function Ut(e,t,n,r){return $t(e,t,Yd(n),r)}function ai({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Zd({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Jd(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,Qd=1-li,ef=1+li,ci=.01,tf=0-ci,nf=0+ci;function se(e){return e.max-e.min}function rf(e,t,n){return Math.abs(e-t)<=n}function ui(e,t,n,r=.5){e.origin=r,e.originPoint=W(t.min,t.max,e.origin),e.scale=se(n)/se(t),e.translate=W(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Qd&&e.scale<=ef||isNaN(e.scale))&&(e.scale=1),(e.translate>=tf&&e.translate<=nf||isNaN(e.translate))&&(e.translate=0)}function Xt(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+se(t)}function sf(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+se(t)}function Wt(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}),ht=()=>({x:hi(),y:hi()}),pi=()=>({min:0,max:0}),G=()=>({x:pi(),y:pi()});function de(e){return[e("x"),e("y")]}function Or(e){return e===void 0||e===1}function kr({scale:e,scaleX:t,scaleY:n}){return!Or(e)||!Or(t)||!Or(n)}function He(e){return kr(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 mn(e,t,n){const r=e-n,s=t*r;return n+s}function yi(e,t,n,r,s){return s!==void 0&&(e=mn(e,s,r)),mn(e,n,r)+t}function jr(e,t=0,n=1,r,s){e.min=yi(e.min,t,n,r,s),e.max=yi(e.max,t,n,r,s)}function vi(e,{x:t,y:n}){jr(e.x,t.translate,t.scale,t.originPoint),jr(e.y,n.translate,n.scale,n.originPoint)}const xi=.999999999999,bi=1.0000000000001;function of(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let o,i;for(let a=0;a<s;a++){o=n[a],i=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&mt(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,vi(e,i)),r&&He(o.latestValues)&&mt(e,o.latestValues))}t.x<bi&&t.x>xi&&(t.x=1),t.y<bi&&t.y>xi&&(t.y=1)}function pt(e,t){e.min=e.min+t,e.max=e.max+t}function Si(e,t,n,r,s=.5){const o=W(e.min,e.max,s);jr(e,t,n,o,r)}function mt(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 wi(e,t){return ai(Jd(e.getBoundingClientRect(),t))}function af(e,t,n){const r=wi(e,n),{scroll:s}=t;return s&&(pt(r.x,s.offset.x),pt(r.y,s.offset.y)),r}const Ci=({current:e})=>e?e.ownerDocument.defaultView:null,Ti=(e,t)=>Math.abs(e-t);function lf(e,t){const n=Ti(e.x,t.x),r=Ti(e.y,t.y);return Math.sqrt(n**2+r**2)}class Pi{constructor(t,n,{transformPagePoint:r,contextWindow:s,dragSnapToOrigin:o=!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=Nr(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=lf(d.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:y}=d,{timestamp:g}=ee;this.history.push({...y,timestamp:g});const{onStart:S,onMove:v}=this.handlers;f||(S&&S(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Vr(f,this.transformPagePoint),$.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:p,onSessionEnd:y,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=Nr(d.type==="pointercancel"?this.lastMoveEventInfo:Vr(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,S),y&&y(d,S)},!Hn(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=s||window;const i=zt(t),a=Vr(i,this.transformPagePoint),{point:l}=a,{timestamp:c}=ee;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Nr(a,this.history)),this.removeListeners=Ft(Ut(this.contextWindow,"pointermove",this.handlePointerMove),Ut(this.contextWindow,"pointerup",this.handlePointerUp),Ut(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ke(this.updatePoint)}}function Vr(e,t){return t?{point:t(e.point)}:e}function Ei(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Nr({point:e},t){return{point:e,delta:Ei(e,_i(t)),offset:Ei(e,cf(t)),velocity:uf(t,.1)}}function cf(e){return e[0]}function _i(e){return e[e.length-1]}function uf(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=_i(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>xe(t)));)n--;if(!r)return{x:0,y:0};const o=Ce(s.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const i={x:(s.x-r.x)/o,y:(s.y-r.y)/o};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function df(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?W(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?W(n,e,r.max):Math.min(e,n)),e}function Ai(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 ff(e,{top:t,left:n,bottom:r,right:s}){return{x:Ai(e.x,n,s),y:Ai(e.y,t,r)}}function Mi(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 hf(e,t){return{x:Mi(e.x,t.x),y:Mi(e.y,t.y)}}function pf(e,t){let n=.5;const r=se(e),s=se(t);return s>r?n=it(t.min,t.max-r,e.min):r>s&&(n=it(e.min,e.max-s,t.min)),Te(0,1,n)}function mf(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 Ir=.35;function gf(e=Ir){return e===!1?e=0:e===!0&&(e=Ir),{x:Li(e,"left","right"),y:Li(e,"top","bottom")}}function Li(e,t,n){return{min:Di(e,t),max:Di(e,n)}}function Di(e,t){return typeof e=="number"?e:e[t]||0}const yf=new WeakMap;class vf{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=G(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const s=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(zt(u).point)},o=(u,d)=>{const{drag:f,dragPropagation:p,onDragStart:y}=this.getProps();if(f&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=fc(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),de(S=>{let v=this.getAxisMotionValue(S).get()||0;if(Se.test(v)){const{projection:x}=this.visualElement;if(x&&x.layout){const w=x.layout.layoutBox[S];w&&(v=se(w)*(parseFloat(v)/100))}}this.originPoint[S]=v}),y&&$.postRender(()=>y(u,d)),ur(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},i=(u,d)=>{const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:y,onDrag:g}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:S}=d;if(p&&this.currentDirection===null){this.currentDirection=xf(S),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",d.point,S),this.updateAxis("y",d.point,S),this.visualElement.render(),g&&g(u,d)},a=(u,d)=>this.stop(u,d),l=()=>de(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 Pi(t,{onSessionStart:s,onStart:o,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Ci(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:o}=this.getProps();o&&$.postRender(()=>o(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:s}=this.getProps();if(!r||!gn(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=df(i,this.constraints[t],this.elastic[t])),o.set(i)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,o=this.constraints;n&&lt(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&s?this.constraints=ff(s.layoutBox,n):this.constraints=!1,this.elastic=gf(r),o!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&de(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=mf(s.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!lt(t))return!1;const r=t.current;Oe(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const o=af(r,s.root,this.visualElement.getTransformPagePoint());let i=hf(s.layout.layoutBox,o);if(n){const a=n(Zd(i));this.hasMutatedConstraints=!!a,a&&(i=ai(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=de(u=>{if(!gn(u,n,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});const f=s?200:1e6,p=s?40:1e7,y={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(u,y)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return ur(this.visualElement,t),r.start(Lr(t,r,0,n,this.visualElement,!1))}stopAnimation(){de(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){de(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(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){de(n=>{const{drag:r}=this.getProps();if(!gn(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(n);if(s&&s.layout){const{min:i,max:a}=s.layout.layoutBox[n];o.set(t[n]-W(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!lt(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};de(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();s[i]=pf({min:l,max:l},this.constraints[i])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),de(i=>{if(!gn(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(W(l,c,s[i]))})}addListeners(){if(!this.visualElement.current)return;yf.set(this.visualElement,this);const t=this.visualElement.current,n=Ut(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();lt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,o=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),$.read(r);const i=$t(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(de(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(),o(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:i=Ir,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function gn(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function xf(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class bf extends Ne{constructor(t){super(t),this.removeGroupControls=le,this.removeListeners=le,this.controls=new vf(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||le}unmount(){this.removeGroupControls(),this.removeListeners()}}const Oi=e=>(t,n)=>{e&&$.postRender(()=>e(t,n))};class Sf extends Ne{constructor(){super(...arguments),this.removePointerDownListener=le}onPointerDown(t){this.session=new Pi(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ci(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:Oi(t),onStart:Oi(n),onMove:r,onEnd:(o,i)=>{delete this.session,s&&$.postRender(()=>s(o,i))}}}mount(){this.removePointerDownListener=Ut(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 yn={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ki(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Kt={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(D.test(e))e=parseFloat(e);else return e;const n=ki(e,t.target.x),r=ki(e,t.target.y);return`${n}% ${r}%`}},wf={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=Ve.parse(e);if(s.length>5)return r;const o=Ve.createTransformer(e),i=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;s[0+i]/=a,s[1+i]/=l;const c=W(a,l,.5);return typeof s[2+i]=="number"&&(s[2+i]/=c),typeof s[3+i]=="number"&&(s[3+i]/=c),o(s)}};class Cf extends m.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:o}=t;Fc(Tf),o&&(n.group&&n.group.add(o),r&&r.register&&s&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),yn.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:o}=this.props,i=r.projection;return i&&(i.isPresent=o,s||t.layoutDependency!==n||n===void 0||t.isPresent!==o?i.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?i.promote():i.relegate()||$.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Gn.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function ji(e){const[t,n]=nc(),r=m.useContext(xs);return b.jsx(Cf,{...e,layoutGroup:r,switchLayoutGroup:m.useContext(Xs),isPresent:t,safeToRemove:n})}const Tf={borderRadius:{...Kt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Kt,borderTopRightRadius:Kt,borderBottomLeftRadius:Kt,borderBottomRightRadius:Kt,boxShadow:wf};function Pf(e,t,n){const r=ne(e)?e:Lt(e);return r.start(Lr("",r,t,n)),r.animation}function Ef(e){return e instanceof SVGElement&&e.tagName!=="svg"}const _f=(e,t)=>e.depth-t.depth;class Af{constructor(){this.children=[],this.isDirty=!1}add(t){In(this.children,t),this.isDirty=!0}remove(t){Rn(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(_f),this.isDirty=!1,this.children.forEach(t)}}function Mf(e,t){const n=be.now(),r=({timestamp:s})=>{const o=s-n;o>=t&&(ke(r),e(o-t))};return $.read(r,!0),()=>ke(r)}const Vi=["TopLeft","TopRight","BottomLeft","BottomRight"],Lf=Vi.length,Ni=e=>typeof e=="string"?parseFloat(e):e,Ii=e=>typeof e=="number"||D.test(e);function Df(e,t,n,r,s,o){s?(e.opacity=W(0,n.opacity!==void 0?n.opacity:1,Of(r)),e.opacityExit=W(t.opacity!==void 0?t.opacity:1,0,kf(r))):o&&(e.opacity=W(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<Lf;i++){const a=`border${Vi[i]}Radius`;let l=Ri(t,a),c=Ri(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Ii(l)===Ii(c)?(e[a]=Math.max(W(Ni(l),Ni(c),r),0),(Se.test(c)||Se.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=W(t.rotate||0,n.rotate||0,r))}function Ri(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Of=Fi(0,.5,yo),kf=Fi(.5,.95,le);function Fi(e,t,n){return r=>r<e?0:r>t?1:n(it(e,t,r))}function Bi(e,t){e.min=t.min,e.max=t.max}function fe(e,t){Bi(e.x,t.x),Bi(e.y,t.y)}function $i(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function zi(e,t,n,r,s){return e-=t,e=mn(e,1/n,r),s!==void 0&&(e=mn(e,1/s,r)),e}function jf(e,t=0,n=1,r=.5,s,o=e,i=e){if(Se.test(t)&&(t=parseFloat(t),t=W(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=W(o.min,o.max,r);e===o&&(a-=t),e.min=zi(e.min,t,n,a,s),e.max=zi(e.max,t,n,a,s)}function Ui(e,t,[n,r,s],o,i){jf(e,t[n],t[r],t[s],t.scale,o,i)}const Vf=["x","scaleX","originX"],Nf=["y","scaleY","originY"];function Xi(e,t,n,r){Ui(e.x,t,Vf,n?n.x:void 0,r?r.x:void 0),Ui(e.y,t,Nf,n?n.y:void 0,r?r.y:void 0)}function Wi(e){return e.translate===0&&e.scale===1}function Ki(e){return Wi(e.x)&&Wi(e.y)}function Gi(e,t){return e.min===t.min&&e.max===t.max}function If(e,t){return Gi(e.x,t.x)&&Gi(e.y,t.y)}function Hi(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function qi(e,t){return Hi(e.x,t.x)&&Hi(e.y,t.y)}function Yi(e){return se(e.x)/se(e.y)}function Zi(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Rf{constructor(){this.members=[]}add(t){In(this.members,t),t.scheduleRender()}remove(t){if(Rn(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(s=>t===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const o=this.members[s];if(o.isPresent!==!1){r=o;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:s}=t.options;s===!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 Ff(e,t,n){let r="";const s=e.x.translate/t.x,o=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((s||o||i)&&(r=`translate3d(${s}px, ${o}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:p,skewY:y}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),y&&(r+=`skewY(${y}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 Rr=["","X","Y","Z"],Bf={visibility:"hidden"},Ji=1e3;let $f=0;function Fr(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[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=co(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",$,!(s||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Qi(r)}function ea({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(i={},a=t==null?void 0:t()){this.id=$f++,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(Xf),this.nodes.forEach(qf),this.nodes.forEach(Yf),this.nodes.forEach(Wf)},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 Af)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Bn),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=Ef(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=Mf(f,250),yn.hasAnimatedSinceResize&&(yn.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:p,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||th,{onLayoutAnimationStart:S,onLayoutAnimationComplete:v}=u.getProps(),x=!this.targetLayout||!qi(this.targetLayout,y),w=!f&&p;if(this.options.layoutRoot||this.resumeFrom||w||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,w);const M={...$n(g,"layout"),onPlay:S,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(M.delay=0,M.type=!1),this.startAnimation(M)}else f||na(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}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,ke(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(Zf),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(Gf),this.isUpdating=!1,this.nodes.forEach(Hf),this.nodes.forEach(zf),this.nodes.forEach(Uf),this.clearAllSnapshots();const a=be.now();ee.delta=Te(0,1e3/60,a-ee.timestamp),ee.timestamp=a,ee.isProcessing=!0,Kn.update.process(ee),Kn.preRender.process(ee),Kn.render.process(ee),ee.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Gn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Kf),this.sharedNodes.forEach(Jf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,$.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){$.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!se(this.snapshot.measuredBox.x)&&!se(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=G(),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(!s)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Ki(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||He(this.latestValues)||u)&&(s(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)),nh(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var i;const{visualElement:a}=this.options;if(!a)return G();const l=a.measureViewportBox();if(!(((i=this.scroll)===null||i===void 0?void 0:i.wasRoot)||this.path.some(rh))){const{scroll:u}=this.root;u&&(pt(l.x,u.offset.x),pt(l.y,u.offset.y))}return l}removeElementScroll(i){var a;const l=G();if(fe(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&&fe(l,i),pt(l.x,d.offset.x),pt(l.y,d.offset.y))}return l}applyTransform(i,a=!1){const l=G();fe(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&&mt(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),He(u.latestValues)&&mt(l,u.latestValues)}return He(this.latestValues)&&mt(l,this.latestValues),l}removeTransform(i){const a=G();fe(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!He(c.latestValues))continue;kr(c.latestValues)&&c.updateSnapshot();const u=G(),d=c.measurePageBox();fe(u,d),Xi(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return He(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!==ee.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=ee.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=G(),this.relativeTargetOrigin=G(),Wt(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),fe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=G(),this.targetWithTransforms=G()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),sf(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):fe(this.target,this.layout.layoutBox),vi(this.target,this.targetDelta)):fe(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=G(),this.relativeTargetOrigin=G(),Wt(this.relativeTargetOrigin,this.target,p.target),fe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||kr(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===ee.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;fe(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;of(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=G());const{target:y}=a;if(!y){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():($i(this.prevProjectionDelta.x,this.projectionDelta.x),$i(this.prevProjectionDelta.y,this.projectionDelta.y)),Xt(this.projectionDelta,this.layoutCorrected,y,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!Zi(this.projectionDelta.x,this.prevProjectionDelta.x)||!Zi(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",y))}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=ht(),this.projectionDelta=ht(),this.projectionDeltaWithTransform=ht()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=ht();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=G(),p=l?l.source:void 0,y=this.layout?this.layout.source:void 0,g=p!==y,S=this.getStack(),v=!S||S.members.length<=1,x=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(eh));this.animationProgress=0;let w;this.mixTargetDelta=M=>{const P=M/1e3;ra(d.x,i.x,P),ra(d.y,i.y,P),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Wt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Qf(this.relativeTarget,this.relativeTargetOrigin,f,P),w&&If(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=G()),fe(w,this.relativeTarget)),g&&(this.animationValues=u,Df(u,c,this.latestValues,P,x,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},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&&(ke(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=$.update(()=>{yn.hasAnimatedSinceResize=!0,this.currentAnimation=Pf(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||G();const d=se(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const f=se(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}fe(a,l),mt(a,u),Xt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new Rf),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&&Fr("z",i,c,this.animationValues);for(let u=0;u<Rr.length;u++)Fr(`rotate${Rr[u]}`,i,c,this.animationValues),Fr(`skew${Rr[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 Bf;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=dn(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 g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=dn(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!He(this.latestValues)&&(g.transform=u?u({},""):"none",this.hasProjected=!1),g}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=Ff(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));const{x:p,y}=this.projectionDelta;c.transformOrigin=`${p.origin*100}% ${y.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 g in Ot){if(f[g]===void 0)continue;const{correct:S,applyTo:v,isCSSVariable:x}=Ot[g],w=c.transform==="none"?f[g]:S(f[g],d);if(v){const M=v.length;for(let P=0;P<M;P++)c[v[P]]=w}else x?this.options.visualElement.renderState.vars[g]=w:c[g]=w}return this.options.layoutId&&(c.pointerEvents=d===this?dn(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 Uf(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:s}=e.layout,{animationType:o}=e.options,i=n.source!==e.layout.source;o==="size"?de(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],p=se(f);f.min=r[d].min,f.max=f.min+p}):la(o,n.layoutBox,r)&&de(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],p=se(r[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const a=ht();Xt(a,r,n.layoutBox);const l=ht();i?Xt(l,e.applyTransform(s,!0),n.measuredBox):Xt(l,r,n.layoutBox);const c=!Ki(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:p}=d;if(f&&p){const y=G();Wt(y,n.layoutBox,f.layoutBox);const g=G();Wt(g,r,p.layoutBox),qi(y,g)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=y,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 Xf(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 Wf(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Kf(e){e.clearSnapshot()}function ta(e){e.clearMeasurements()}function Gf(e){e.isLayoutDirty=!1}function Hf(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 qf(e){e.resolveTargetDelta()}function Yf(e){e.calcProjection()}function Zf(e){e.resetSkewAndRotation()}function Jf(e){e.removeLeadSnapshot()}function ra(e,t,n){e.translate=W(t.translate,0,n),e.scale=W(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function sa(e,t,n,r){e.min=W(t.min,n.min,r),e.max=W(t.max,n.max,r)}function Qf(e,t,n,r){sa(e.x,t.x,n.x,r),sa(e.y,t.y,n.y,r)}function eh(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const th={duration:.45,ease:[.4,0,.1,1]},oa=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ia=oa("applewebkit/")&&!oa("chrome/")?Math.round:le;function aa(e){e.min=ia(e.min),e.max=ia(e.max)}function nh(e){aa(e.x),aa(e.y)}function la(e,t,n){return e==="position"||e==="preserve-aspect"&&!rf(Yi(t),Yi(n),.2)}function rh(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const sh=ea({attachResizeListener:(e,t)=>$t(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Br={current:void 0},ca=ea({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Br.current){const e=new sh({});e.mount(window),e.setOptions({layoutScroll:!0}),Br.current=e}return Br.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),oh={pan:{Feature:Sf},drag:{Feature:bf,ProjectionNode:ca,MeasureLayout:ji}};function ua(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=r[s];o&&$.postRender(()=>o(t,zt(t)))}class ih extends Ne{mount(){const{current:t}=this.node;t&&(this.unmount=pc(t,(n,r)=>(ua(this.node,r,"Start"),s=>ua(this.node,s,"End"))))}unmount(){}}class ah 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=Ft($t(this.node.current,"focus",()=>this.onFocus()),$t(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 s="onTap"+(n==="End"?"":n),o=r[s];o&&$.postRender(()=>o(t,zt(t)))}class lh extends Ne{mount(){const{current:t}=this.node;t&&(this.unmount=vc(t,(n,r)=>(da(this.node,r,"Start"),(s,{success:o})=>da(this.node,s,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const $r=new WeakMap,zr=new WeakMap,ch=e=>{const t=$r.get(e.target);t&&t(e)},uh=e=>{e.forEach(ch)};function dh({root:e,...t}){const n=e||document;zr.has(n)||zr.set(n,{});const r=zr.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(uh,{root:e,...t})),r[s]}function fh(e,t,n){const r=dh(t);return $r.set(e,n),r.observe(e),()=>{$r.delete(e),r.unobserve(e)}}const hh={some:0,all:1};class ph 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:s="some",once:o}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:hh[s]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,o&&!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 fh(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(mh(t,n))&&this.startObserver()}unmount(){}}function mh({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const gh={inView:{Feature:ph},tap:{Feature:lh},focus:{Feature:ah},hover:{Feature:ih}},yh={layout:{ProjectionNode:ca,MeasureLayout:ji}},Ur={current:null},fa={current:!1};function vh(){if(fa.current=!0,!!Vn)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ur.current=e.matches;e.addListener(t),t()}else Ur.current=!1}const xh=[...Ro,re,Ve],bh=e=>xh.find(Io(e)),Sh=new WeakMap;function wh(e,t,n){for(const r in t){const s=t[r],o=n[r];if(ne(s))e.addValue(r,s),process.env.NODE_ENV==="development"&&tn(s.version==="12.5.0",`Attempting to mix Motion versions ${s.version} with 12.5.0 may not work as expected.`);else if(ne(o))e.addValue(r,Lt(s,{owner:e}));else if(o!==s)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(s):i.hasAnimated||i.set(s)}else{const i=e.getStaticValue(r);e.addValue(r,Lt(i!==void 0?i:s,{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 Ch{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,blockInitialAnimation:o,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=Cr,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 p=be.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,$.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=s,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=cn(n),this.isVariantNode=$s(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const y=f[p];l[p]!==void 0&&ne(y)&&y.set(l[p],!1)}}mount(t){this.current=t,Sh.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||vh(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ur.current,process.env.NODE_ENV!=="production"&&tn(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(),ke(this.notifyUpdate),ke(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=Ue.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&$.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),o(),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 at){const n=at[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):G()}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 s=ha[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,i=t[o];i&&(this.propEventSubscriptions[s]=this.on(s,i))}this.prevMotionValues=wh(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=Lt(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let s=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 s!=null&&(typeof s=="string"&&(Vo(s)||xo(s))?s=parseFloat(s):!bh(s)&&Ve.test(n)&&(s=_o(t,n)),this.setBaseTarget(t,ne(s)?s.get():s)),ne(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let s;if(typeof r=="string"||typeof r=="object"){const i=ar(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);i&&(s=i[t])}if(r&&s!==void 0)return s;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!ne(o)?o:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Bn),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class pa extends Ch{constructor(){super(...arguments),this.KeyframeResolver=Bo}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;ne(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Th(e){return window.getComputedStyle(e)}class Ph extends pa{constructor(){super(...arguments),this.type="html",this.renderInstance=ro}readValueFromInstance(t,n){if(Ue.has(n))return Nu(t,n);{const r=Th(t),s=(Qn(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return wi(t,n)}build(t,n,r){nr(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return cr(t,n,r)}}class Eh extends pa{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=G,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&no(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ue.has(n)){const r=Eo(n);return r&&r.default||0}return n=so.has(n)?n:Jn(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return io(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&$.postRender(this.updateDimensions)}build(t,n,r){or(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,s){oo(t,n,r,s)}mount(t){this.isSVGTag=ir(t.tagName),super.mount(t)}}const _h=(e,t)=>sr(e)?new Eh(t):new Ph(t,{allowProjection:e!==m.Fragment}),Ah=cu({...qd,...gh,...oh,...yh},_h),qe=Ec(Ah),Mh={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 Ie(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 gt="Errore: ",Lh="Impossibile acquisire la posizione.",Xr="Impossibile caricare i punti di mappa.",Dh="Si è verificato un errore.",Oh="Impossibile caricare i suggerimenti.",kh="Impossibile caricare i dettagli della location.",jh="Impossibile caricare la mappa.",Vh="Ottieni indicazioni di navigazione per questa destinazione",Nh="Condividi questa destinazione",Ih="Scarica l'evento",Rh=3e3,ga=6,Wr={lat:45.4642,lng:9.19};function Pe(e){if(e)return e.trim().split(" ").filter(t=>t.length)}function Ee(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 Kr(e){const{type:t,url:n}=e??{};switch(t){case"navigate":case"directions":return{"aria-label":Vh,as:"a",href:n??"#",target:"_blank",rel:"noopener noreferrer"};case"share":return{"aria-label":Nh,as:"a",href:n??"#",target:"_blank",rel:"noopener noreferrer"};case"event":case"calendar":return{"aria-label":Ih,as:"a",href:n??"#",download:!0,target:"_blank",rel:"noopener noreferrer"};case"email":default:return{}}}function Fh(e,t){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e(...r),t)}}const ya="Anchor";function va({as:e,wrapper:t,children:n,variant:r="default",className:s,animate:o=!0,animationDelay:i=0,href:a,target:l,rel:c,linkProps:u={},style:d,...f},p){const y=t||"span",g=o?qe[y]:y,S=e||"a",v=Ie(f)??[],x=o?{initial:{opacity:0,y:5},animate:{opacity:1,y:0},transition:{delay:i,duration:.2}}:{},M=c||(l==="_blank"?{rel:"noopener noreferrer"}:{}).rel;return b.jsx(g,{className:Y(Mh.root,"dyn-locator__"+Ee(ya),Pe(s),...v),"data-variant":r,...d?{style:d}:{},...x,...f,children:b.jsx(S,{ref:p,href:a,target:l,rel:M,...u,children:n})})}va.displayName=ya;const xa=m.forwardRef(va),ba="ErrorBanner";function Sa({title:e="Si è verificato un errore",message:t="Impossibile completare l'operazione richiesta.",actionText:n="ricaricare la pagina",onAction:r,errorDetails:s,className:o,children:i,...a}){const l=Ie(a)??[];return b.jsxs("div",{className:Y("dyn-locator__"+Ee(ba),_t.root,Pe(o),...l??[]),children:[b.jsxs("header",{className:_t.header,children:[b.jsx(Gl,{size:28,color:"currentColor",className:_t.icon})," ",b.jsx("h3",{children:e})]}),b.jsxs("div",{className:_t.body,children:[b.jsx("p",{children:t}),n&&r&&b.jsxs("p",{children:["Prova a"," ",b.jsx(xa,{animate:!1,"aria-label":n,href:"#",onClick:r,children:n})]}),i,s&&b.jsx("div",{className:_t.content,children:b.jsx("pre",{children:s})})]})]})}Sa.displayName=ba;const wa=Sa;class Bh extends m.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||b.jsx("div",{className:Fl.container,children:b.jsx(wa,{message:"Something went wrong with the Locator component",errorDetails:(t=this.state.error)==null?void 0:t.message})}):this.props.children}}const Ca={ArrowLeft:Ul,ArrowUpRight:Xl,ChevronUp:Kl,ChevronDown:Wl,Close:Ql,Expand:Yl,Location:ql,Search:Zl,Share:Jl,Target:Hl},_e={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"},yt={root:"_root_1k1dg_4",container:"_container_1k1dg_10",label:"_label_1k1dg_17",icon:"_icon_1k1dg_27"},Gr={root:"_root_71ove_4",icon:"_icon_71ove_43"};function $h(e){return m.isValidElement(e)||typeof e=="function"}function zh(e){return e?typeof e=="string"||typeof e=="object"&&"name"in e:!1}function Uh(e){return!!e&&typeof e=="object"&&"path"in e}const Ta="Icon";function Pa({as:e,icon:t,iconRef:n,label:r,size:s="S",radius:o,variant:i="default",className:a,animate:l=!0,animationDelay:c=0,style:u,...d},f){const p=e||"span",y=l?qe[p]:p,{iconMap:g}=Yh();function S(w){if(zh(w)){const M=typeof w=="string"?w:w.name;return g[M]?m.createElement(g[M],{...n?{ref:n}:{},...r?{title:r,titleId:r.trim().toLowerCase().replace(/[^a-z0-9\s_-]/g,"").replace(/\s+/g,"_")+"_id"}:{},className:Gr.icon}):'No icon found for "'+M+'"!'}return Uh(w)?(i!=="default"&&console.warn("Warning: cannot set icon stroke on a remote asset"),b.jsx("img",{...n?{ref:n}:{},src:w.path,alt:`Icona decorativa${r?" che rappresenta '"+r+"'":""}`,className:Gr.icon})):"No icon provided"}const v=Ie(d)??[],x=l?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:c,duration:.2}}:{};return b.jsx(y,{ref:f,className:Y(Gr.root,"dyn-locator__"+Ee(Ta),Pe(a),...v),...u?{style:u}:{},"data-variant":i,"data-size":s,...o?{"data-radius":o}:{},...x,...d,children:S(t)})}Pa.displayName=Ta;const Re=m.forwardRef(Pa),Ea="Tag";function _a({as:e,iconPosition:t="left",children:n,icon:r,className:s,animate:o=!0,animationDelay:i=0,style:a,...l},c){const u=e||"span",d=o?qe[u]:u,f=Ie(l)??[],p=o?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:i,duration:.2}}:{};return b.jsx(d,{ref:c,className:Y(yt.root,"dyn-locator__"+Ee(Ea),Pe(s),...f),"data-icon-position":t,...a?{style:a}:{},...p,...l,children:b.jsxs("div",{className:yt.container,children:[r?b.jsx("div",{className:yt.icon,children:$h(r)?typeof r=="function"?b.jsx(r,{className:yt.icon}):r:b.jsx(Re,{className:yt.icon,icon:r})}):null,b.jsx("div",{className:yt.label,children:n})]})})}_a.displayName=Ea;const Xh=m.forwardRef(_a),Wh={root:"_root_u5v4v_1"},Aa="IconButton";function Ma({as:e,children:t,className:n,variant:r="default",animate:s=!0,animationDelay:o=0,style:i,ariaLabel:a,href:l,target:c,rel:u,disabled:d=!1,...f},p){const y=e||"button",g=s?qe[y]:y,S=Ie(f)??[],v=s?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:o,duration:.2}}:{},x=y==="a"?{href:l??"/",target:c??"_blank",rel:c==="_blank"?"noopener noreferrer":u}:{};return b.jsx(g,{ref:p,className:Y(Wh.root,"dyn-locator__"+Ee(Aa),Pe(n),...S),"data-variant":r,"data-element":y,"aria-label":a,disabled:d,...i?{style:i}:{},...v,...x,...f,children:t})}Ma.displayName=Aa;const vt=m.forwardRef(Ma),La={root:"_root_1fk3z_1",content:"_content_1fk3z_32"},Da="Card";function Oa({as:e,children:t,className:n,variant:r="default",animate:s=!0,animationDelay:o=0,style:i,clickable:a=!1,onClick:l,...c},u){const d=e||"article",f=s?qe[d]:d,p=Ie(c)??[],y=s?{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:o,duration:.3}}:{};return b.jsx(f,{ref:u,className:Y(La.root,"dyn-locator__"+Ee(Da),Pe(n),...p),"data-variant":r,"data-clickable":a||!!l,onClick:l,...i?{style:i}:{},...y,...c,children:r==="bare"?t:b.jsx("div",{className:La.content,children:t})})}Oa.displayName=Da;const Kh=m.forwardRef(Oa);function ka(e){const{componentMap:t}=Zh();return t[e]}const ja="LocationCard";function Va({title:e,timestamp:t,address:n,capabilities:r,on_share:s,actions:o,className:i,...a},l){const c=ka("ctaButton");return b.jsx(Kh,{ref:l,variant:"bare",clickable:!0,className:Y("dyn-locator__"+Ee(ja),Pe(i)),...a,style:{...a.style?a.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:b.jsxs("div",{className:_e.root,children:[b.jsxs("header",{className:_e.header,children:[t?b.jsx("time",{children:new Date(t).toLocaleDateString("it",{day:"numeric",month:"long",year:"numeric"})}):null,b.jsxs("div",{className:_e.titleContainer,children:[e?b.jsx("h4",{children:e}):null,b.jsx(vt,{className:_e.shareButton,variant:"bare",...Kr(s),children:b.jsx(Re,{size:"M",icon:"Share"})})]}),n?b.jsx("address",{children:n}):null]}),r!=null&&r.length?b.jsx("div",{className:_e.body,children:r.map((u,d)=>{var f;return b.jsxs("div",{className:_e.capabilities,children:[b.jsx("h5",{children:u==null?void 0:u.title}),b.jsx("ul",{className:_e.tagContainer,children:(f=u==null?void 0:u.capabilities)==null?void 0:f.map((p,y)=>b.jsx(Xh,{as:"li",animationDelay:+`.${y+1}`,className:_e.tag,children:p.label},y))})]},d)})}):null,o!=null&&o.length?b.jsx("div",{className:_e.cta,children:o.map((u,d)=>b.jsx(c,{animate:!1,fullWidth:!0,variant:d===0?"themed":"secondary",...Kr(u),children:u.label},d))}):null]})})}Va.displayName=ja;const Gh=m.forwardRef(Va),Na={root:"_root_1h5d4_1",loader:"_loader_1h5d4_73"},Ia="Button";function Ra({as:e,children:t,className:n,variant:r="default",size:s="medium",disabled:o=!1,loading:i=!1,fullWidth:a=!1,animate:l=!0,animationDelay:c=0,href:u,target:d,rel:f,style:p,...y},g){const S=e||(u?"a":"button"),v=l?qe[S]:S,x=Ie(y)??[],w=l?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:c,duration:.2}}:{},M=u?{href:u,target:d,rel:d==="_blank"?"noopener noreferrer":f}:{};return b.jsx(v,{ref:g,className:Y(Na.root,"dyn-locator__"+Ee(Ia),Pe(n),...x),"data-variant":r,"data-size":s,"data-full-width":a,disabled:o||i,...p?{style:p}:{},...w,...M,...y,children:i?b.jsxs("span",{style:{display:"flex",gap:10},children:[t,b.jsx("span",{className:Na.loader,"aria-hidden":"true"})]}):t})}Ra.displayName=Ia;const Hr=m.forwardRef(Ra),Fa={locationCard:Gh,ctaButton:Hr},Hh={iconMap:Ca,componentMap:Fa},qr=m.createContext(Hh);function qh({children:e,customIcons:t,customComponents:n}){const r={...Ca,...t??{}},s={...Fa,...n??{}};return b.jsx(qr.Provider,{value:{iconMap:r,componentMap:s},children:e})}function Yh(){const{iconMap:e}=m.useContext(qr);return{iconMap:e}}function Zh(){const{componentMap:e}=m.useContext(qr);return{componentMap:e}}var vn=(e=>(e.CLUSTERS="clusters",e.MARKERS="markers",e.FIND="find",e))(vn||{});const Ba=m.createContext({endpointMap:{},apiUrl:""});function Jh({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 b.jsx(Ba.Provider,{value:{endpointMap:t,apiUrl:n},children:e})}function Qh(e){const{endpointMap:t,apiUrl:n}=m.useContext(Ba);return{getEndpoint:(r={})=>{const s=t[e];if(!s)throw new Error(`Endpoint with id "${e}" not configured. Make sure to provide all required endpoints.`);let o="";return s.buildPath?o=s.buildPath(r):(o=s.path,Object.entries(r).forEach(([i,a])=>{o=o.replace(`:${i}`,String(a))})),{url:`${n}${o}`,method:s.method}}}}let ep={data:""},tp=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||ep,np=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,rp=/\/\*[^]*?\*\/| +/g,$a=/\n+/g,Fe=(e,t)=>{let n="",r="",s="";for(let o in e){let i=e[o];o[0]=="@"?o[1]=="i"?n=o+" "+i+";":r+=o[1]=="f"?Fe(i,o):o+"{"+Fe(i,o[1]=="k"?"":t)+"}":typeof i=="object"?r+=Fe(i,t?t.replace(/([^,])+/g,a=>o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,a):a?a+" "+l:l)):o):i!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),s+=Fe.p?Fe.p(o,i):o+":"+i+";")}return n+(t&&s?t+"{"+s+"}":s)+r},Ae={},za=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+za(e[n]);return t}return e},sp=(e,t,n,r,s)=>{let o=za(e),i=Ae[o]||(Ae[o]=(l=>{let c=0,u=11;for(;c<l.length;)u=101*u+l.charCodeAt(c++)>>>0;return"go"+u})(o));if(!Ae[i]){let l=o!==e?e:(c=>{let u,d,f=[{}];for(;u=np.exec(c.replace(rp,""));)u[4]?f.shift():u[3]?(d=u[3].replace($a," ").trim(),f.unshift(f[0][d]=f[0][d]||{})):f[0][u[1]]=u[2].replace($a," ").trim();return f[0]})(e);Ae[i]=Fe(s?{["@keyframes "+i]:l}:l,n?"":"."+i)}let a=n&&Ae.g?Ae.g:null;return n&&(Ae.g=Ae[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)})(Ae[i],t,r,a),i},op=(e,t,n)=>e.reduce((r,s,o)=>{let i=t[o];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+s+(i??"")},"");function xn(e){let t=this||{},n=e.call?e(t.p):e;return sp(n.unshift?n.raw?op(n,[].slice.call(arguments,1),t.p):n.reduce((r,s)=>Object.assign(r,s&&s.call?s(t.p):s),{}):n,tp(t.target),t.g,t.o,t.k)}let Ua,Yr,Zr;xn.bind({g:1});let Me=xn.bind({k:1});function ip(e,t,n,r){Fe.p=t,Ua=e,Yr=n,Zr=r}function Be(e,t){let n=this||{};return function(){let r=arguments;function s(o,i){let a=Object.assign({},o),l=a.className||s.className;n.p=Object.assign({theme:Yr&&Yr()},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),Zr&&c[0]&&Zr(a),Ua(c,a)}return t?t(s):s}}var ap=e=>typeof e=="function",bn=(e,t)=>ap(e)?e(t):e,lp=(()=>{let e=0;return()=>(++e).toString()})(),Xa=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),cp=20,Wa=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,cp)};case 1:return{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case 2:let{toast:n}=t;return Wa(e,{type:e.toasts.find(o=>o.id===n.id)?1:0,toast:n});case 3:let{toastId:r}=t;return{...e,toasts:e.toasts.map(o=>o.id===r||r===void 0?{...o,dismissed:!0,visible:!1}:o)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let s=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(o=>({...o,pauseDuration:o.pauseDuration+s}))}}},Sn=[],Ye={toasts:[],pausedAt:void 0},Ze=e=>{Ye=Wa(Ye,e),Sn.forEach(t=>{t(Ye)})},up={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},dp=(e={})=>{let[t,n]=m.useState(Ye),r=m.useRef(Ye);m.useEffect(()=>(r.current!==Ye&&n(Ye),Sn.push(n),()=>{let o=Sn.indexOf(n);o>-1&&Sn.splice(o,1)}),[]);let s=t.toasts.map(o=>{var i,a,l;return{...e,...e[o.type],...o,removeDelay:o.removeDelay||((i=e[o.type])==null?void 0:i.removeDelay)||(e==null?void 0:e.removeDelay),duration:o.duration||((a=e[o.type])==null?void 0:a.duration)||(e==null?void 0:e.duration)||up[o.type],style:{...e.style,...(l=e[o.type])==null?void 0:l.style,...o.style}}});return{...t,toasts:s}},fp=(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)||lp()}),Gt=e=>(t,n)=>{let r=fp(t,e,n);return Ze({type:2,toast:r}),r.id},Z=(e,t)=>Gt("blank")(e,t);Z.error=Gt("error"),Z.success=Gt("success"),Z.loading=Gt("loading"),Z.custom=Gt("custom"),Z.dismiss=e=>{Ze({type:3,toastId:e})},Z.remove=e=>Ze({type:4,toastId:e}),Z.promise=(e,t,n)=>{let r=Z.loading(t.loading,{...n,...n==null?void 0:n.loading});return typeof e=="function"&&(e=e()),e.then(s=>{let o=t.success?bn(t.success,s):void 0;return o?Z.success(o,{id:r,...n,...n==null?void 0:n.success}):Z.dismiss(r),s}).catch(s=>{let o=t.error?bn(t.error,s):void 0;o?Z.error(o,{id:r,...n,...n==null?void 0:n.error}):Z.dismiss(r)}),e};var hp=(e,t)=>{Ze({type:1,toast:{id:e,height:t}})},pp=()=>{Ze({type:5,time:Date.now()})},Ht=new Map,mp=1e3,gp=(e,t=mp)=>{if(Ht.has(e))return;let n=setTimeout(()=>{Ht.delete(e),Ze({type:4,toastId:e})},t);Ht.set(e,n)},yp=e=>{let{toasts:t,pausedAt:n}=dp(e);m.useEffect(()=>{if(n)return;let o=Date.now(),i=t.map(a=>{if(a.duration===1/0)return;let l=(a.duration||0)+a.pauseDuration-(o-a.createdAt);if(l<0){a.visible&&Z.dismiss(a.id);return}return setTimeout(()=>Z.dismiss(a.id),l)});return()=>{i.forEach(a=>a&&clearTimeout(a))}},[t,n]);let r=m.useCallback(()=>{n&&Ze({type:6,time:Date.now()})},[n]),s=m.useCallback((o,i)=>{let{reverseOrder:a=!1,gutter:l=8,defaultPosition:c}=i||{},u=t.filter(p=>(p.position||c)===(o.position||c)&&p.height),d=u.findIndex(p=>p.id===o.id),f=u.filter((p,y)=>y<d&&p.visible).length;return u.filter(p=>p.visible).slice(...a?[f+1]:[0,f]).reduce((p,y)=>p+(y.height||0)+l,0)},[t]);return m.useEffect(()=>{t.forEach(o=>{if(o.dismissed)gp(o.id,o.removeDelay);else{let i=Ht.get(o.id);i&&(clearTimeout(i),Ht.delete(o.id))}})},[t]),{toasts:t,handlers:{updateHeight:hp,startPause:pp,endPause:r,calculateOffset:s}}},vp=Me`
109
114
  from {
110
115
  transform: scale(0) rotate(45deg);
111
116
  opacity: 0;
@@ -113,7 +118,7 @@ from {
113
118
  to {
114
119
  transform: scale(1) rotate(45deg);
115
120
  opacity: 1;
116
- }`,mp=Me`
121
+ }`,xp=Me`
117
122
  from {
118
123
  transform: scale(0);
119
124
  opacity: 0;
@@ -121,7 +126,7 @@ from {
121
126
  to {
122
127
  transform: scale(1);
123
128
  opacity: 1;
124
- }`,gp=Me`
129
+ }`,bp=Me`
125
130
  from {
126
131
  transform: scale(0) rotate(90deg);
127
132
  opacity: 0;
@@ -129,7 +134,7 @@ from {
129
134
  to {
130
135
  transform: scale(1) rotate(90deg);
131
136
  opacity: 1;
132
- }`,yp=Fe("div")`
137
+ }`,Sp=Be("div")`
133
138
  width: 20px;
134
139
  opacity: 0;
135
140
  height: 20px;
@@ -138,14 +143,14 @@ to {
138
143
  position: relative;
139
144
  transform: rotate(45deg);
140
145
 
141
- animation: ${pp} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
146
+ animation: ${vp} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
142
147
  forwards;
143
148
  animation-delay: 100ms;
144
149
 
145
150
  &:after,
146
151
  &:before {
147
152
  content: '';
148
- animation: ${mp} 0.15s ease-out forwards;
153
+ animation: ${xp} 0.15s ease-out forwards;
149
154
  animation-delay: 150ms;
150
155
  position: absolute;
151
156
  border-radius: 3px;
@@ -158,18 +163,18 @@ to {
158
163
  }
159
164
 
160
165
  &:before {
161
- animation: ${gp} 0.15s ease-out forwards;
166
+ animation: ${bp} 0.15s ease-out forwards;
162
167
  animation-delay: 180ms;
163
168
  transform: rotate(90deg);
164
169
  }
165
- `,vp=Me`
170
+ `,wp=Me`
166
171
  from {
167
172
  transform: rotate(0deg);
168
173
  }
169
174
  to {
170
175
  transform: rotate(360deg);
171
176
  }
172
- `,xp=Fe("div")`
177
+ `,Cp=Be("div")`
173
178
  width: 12px;
174
179
  height: 12px;
175
180
  box-sizing: border-box;
@@ -177,8 +182,8 @@ to {
177
182
  border-radius: 100%;
178
183
  border-color: ${e=>e.secondary||"#e0e0e0"};
179
184
  border-right-color: ${e=>e.primary||"#616161"};
180
- animation: ${vp} 1s linear infinite;
181
- `,bp=Me`
185
+ animation: ${wp} 1s linear infinite;
186
+ `,Tp=Me`
182
187
  from {
183
188
  transform: scale(0) rotate(45deg);
184
189
  opacity: 0;
@@ -186,7 +191,7 @@ from {
186
191
  to {
187
192
  transform: scale(1) rotate(45deg);
188
193
  opacity: 1;
189
- }`,Sp=Me`
194
+ }`,Pp=Me`
190
195
  0% {
191
196
  height: 0;
192
197
  width: 0;
@@ -200,7 +205,7 @@ to {
200
205
  100% {
201
206
  opacity: 1;
202
207
  height: 10px;
203
- }`,wp=Fe("div")`
208
+ }`,Ep=Be("div")`
204
209
  width: 20px;
205
210
  opacity: 0;
206
211
  height: 20px;
@@ -209,13 +214,13 @@ to {
209
214
  position: relative;
210
215
  transform: rotate(45deg);
211
216
 
212
- animation: ${bp} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
217
+ animation: ${Tp} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
213
218
  forwards;
214
219
  animation-delay: 100ms;
215
220
  &:after {
216
221
  content: '';
217
222
  box-sizing: border-box;
218
- animation: ${Sp} 0.2s ease-out forwards;
223
+ animation: ${Pp} 0.2s ease-out forwards;
219
224
  opacity: 0;
220
225
  animation-delay: 200ms;
221
226
  position: absolute;
@@ -227,16 +232,16 @@ to {
227
232
  height: 10px;
228
233
  width: 6px;
229
234
  }
230
- `,Cp=Fe("div")`
235
+ `,_p=Be("div")`
231
236
  position: absolute;
232
- `,Tp=Fe("div")`
237
+ `,Ap=Be("div")`
233
238
  position: relative;
234
239
  display: flex;
235
240
  justify-content: center;
236
241
  align-items: center;
237
242
  min-width: 20px;
238
243
  min-height: 20px;
239
- `,Pp=Me`
244
+ `,Mp=Me`
240
245
  from {
241
246
  transform: scale(0.6);
242
247
  opacity: 0.4;
@@ -244,20 +249,20 @@ from {
244
249
  to {
245
250
  transform: scale(1);
246
251
  opacity: 1;
247
- }`,Ep=Fe("div")`
252
+ }`,Lp=Be("div")`
248
253
  position: relative;
249
254
  transform: scale(0.6);
250
255
  opacity: 0.4;
251
256
  min-width: 20px;
252
- animation: ${Pp} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
257
+ animation: ${Mp} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
253
258
  forwards;
254
- `,_p=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?J.createElement(Ep,null,t):t:n==="blank"?null:J.createElement(Tp,null,J.createElement(xp,{...r}),n!=="loading"&&J.createElement(Cp,null,n==="error"?J.createElement(yp,{...r}):J.createElement(wp,{...r})))},Ap=e=>`
259
+ `,Dp=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?Q.createElement(Lp,null,t):t:n==="blank"?null:Q.createElement(Ap,null,Q.createElement(Cp,{...r}),n!=="loading"&&Q.createElement(_p,null,n==="error"?Q.createElement(Sp,{...r}):Q.createElement(Ep,{...r})))},Op=e=>`
255
260
  0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
256
261
  100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
257
- `,Mp=e=>`
262
+ `,kp=e=>`
258
263
  0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
259
264
  100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
260
- `,Lp="0%{opacity:0;} 100%{opacity:1;}",Dp="0%{opacity:1;} 100%{opacity:0;}",Op=Fe("div")`
265
+ `,jp="0%{opacity:0;} 100%{opacity:1;}",Vp="0%{opacity:1;} 100%{opacity:0;}",Np=Be("div")`
261
266
  display: flex;
262
267
  align-items: center;
263
268
  background: #fff;
@@ -269,17 +274,17 @@ to {
269
274
  pointer-events: auto;
270
275
  padding: 8px 10px;
271
276
  border-radius: 8px;
272
- `,kp=Fe("div")`
277
+ `,Ip=Be("div")`
273
278
  display: flex;
274
279
  justify-content: center;
275
280
  margin: 4px 10px;
276
281
  color: inherit;
277
282
  flex: 1 1 auto;
278
283
  white-space: pre-line;
279
- `,jp=(e,t)=>{let n=e.includes("top")?1:-1,[r,s]=za()?[Lp,Dp]:[Ap(n),Mp(n)];return{animation:t?`${Me(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Me(s)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},Xa=J.memo(({toast:e,position:t,style:n,children:r})=>{let s=e.height?jp(e.position||t||"top-center",e.visible):{opacity:0},o=J.createElement(_p,{toast:e}),i=J.createElement(kp,{...e.ariaProps},xn(e.message,e));return J.createElement(Op,{className:e.className,style:{...s,...n,...e.style}},typeof r=="function"?r({icon:o,message:i}):J.createElement(J.Fragment,null,o,i))});np(J.createElement);var Vp=({id:e,className:t,style:n,onHeightUpdate:r,children:s})=>{let o=J.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 J.createElement("div",{ref:o,className:t,style:n},s)},Np=(e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},s=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:za()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...s}},Ip=vn`
284
+ `,Rp=(e,t)=>{let n=e.includes("top")?1:-1,[r,s]=Xa()?[jp,Vp]:[Op(n),kp(n)];return{animation:t?`${Me(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Me(s)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},Ka=Q.memo(({toast:e,position:t,style:n,children:r})=>{let s=e.height?Rp(e.position||t||"top-center",e.visible):{opacity:0},o=Q.createElement(Dp,{toast:e}),i=Q.createElement(Ip,{...e.ariaProps},bn(e.message,e));return Q.createElement(Np,{className:e.className,style:{...s,...n,...e.style}},typeof r=="function"?r({icon:o,message:i}):Q.createElement(Q.Fragment,null,o,i))});ip(Q.createElement);var Fp=({id:e,className:t,style:n,onHeightUpdate:r,children:s})=>{let o=Q.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 Q.createElement("div",{ref:o,className:t,style:n},s)},Bp=(e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},s=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:Xa()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...s}},$p=xn`
280
285
  z-index: 9999;
281
286
  > * {
282
287
  pointer-events: auto;
283
288
  }
284
- `,Sn=16,Rp=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:s,containerStyle:o,containerClassName:i})=>{let{toasts:a,handlers:l}=hp(n);return J.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:Sn,left:Sn,right:Sn,bottom:Sn,pointerEvents:"none",...o},className:i,onMouseEnter:l.startPause,onMouseLeave:l.endPause},a.map(u=>{let c=u.position||t,d=l.calculateOffset(u,{reverseOrder:e,gutter:r,defaultPosition:t}),f=Np(c,d);return J.createElement(Vp,{id:u.id,key:u.id,onHeightUpdate:l.updateHeight,className:u.visible?Ip:"",style:f},u.type==="custom"?xn(u.message,u):s?s(u):J.createElement(Xa,{toast:u,position:c}))}))};const Fp={root:"_root_movxa_4"};function Wa({className:e,children:t,show:n=!0,variant:r="light",...s}){const o=Y("dyn-locator__overlay",Fp.root,e);return n?b.jsx("div",{className:o,"data-variant":r,...s,children:t}):null}function Yr(e){const[t,n]=m.useState(!1),[r,s]=m.useState(null),{getEndpoint:o}=qh(e);return{request:async(a={},l={})=>{n(!0),s(null);try{let u;try{u=o(a)}catch{throw new Error(`Endpoint "${e}" is not configured. The host application must provide all required endpoints.`)}const{url:c,method:d}=u,f=await fetch(c,{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(u){const c=u instanceof Error?u:new Error(String(u));throw s(c),console.error(`Error in API request to "${e}":`,c),c}finally{n(!1)}},loading:t,error:r}}function Bp({children:e,customComponents:t,customIcons:n,featureFlags:r,fetchLocations:s,localizationConfig:o,locations:i=[],mapId:a}){const l=B(E=>E.isFullscreen),u=B(E=>E.setLocations),c=B(E=>E.setMapId),d=B(E=>E.setMapDetail),f=B(E=>E.setFeatureFlags),p=B(E=>E.setLocalizationConfig),{request:v,loading:g,error:S}=Yr(yn.CLUSTERS),{request:y,loading:x,error:w}=Yr(yn.MARKERS);async function A(E,_){var j;const k=!!_;try{if(typeof E!="number"||E<0||isNaN(E))throw new Error("No map ID provided");const W={mapId:String(E)};k&&(W.clusterId=_);const{data:ee}=k?await y(W,{})??{}:await v(W,{})??{};if(!ee)throw new Error("No data received from the server");u(k?ee:(j=ee.map)==null?void 0:j.call(ee,oe=>({...oe,onMarkerClick:async()=>{await A(E,oe.id)}}))),k&&d(Ct.MARKER)}catch(W){console.error("Error fetching map data: ",W),Z.error(Wt+pa),u([])}}m.useEffect(()=>{o&&p(o),r&&f(r),typeof a=="number"&&a>0&&!isNaN(a)&&c(a),i!=null&&i.length?u(i):s?s().then(E=>u(E)):A(a)},[]);const T=g||x,M=!!S||!!w;return b.jsx("div",{id:"dyn-locator",className:Y("dyn-locator__locator",ps.root),"data-fullscreen":l,children:b.jsxs(Wh,{customIcons:n,customComponents:t,children:[e,b.jsxs(Wa,{show:T||M,variant:"light",children:[T?b.jsx(Tt,{size:"large"}):null,M?b.jsx(ba,{title:Ah,message:pa,actionText:"ricaricare la pagina.",errorDetails:(S==null?void 0:S.message)||(w==null?void 0:w.message),onAction:E=>{E.preventDefault(),window.location.reload()}}):null]}),b.jsx(Rp,{toastOptions:{position:"top-right",duration:3e3,error:{duration:1/0}},children:E=>b.jsx(Xa,{toast:E,children:({icon:_,message:k})=>b.jsxs(b.Fragment,{children:[_,k,E.type==="error"&&b.jsx(Kt,{variant:"bare",onClick:()=>Z.dismiss(E.id),children:b.jsx(qe,{icon:"Close"})})]})})})]})})}function Ka({mapProvider:e,endpoints:t,apiUrl:n,children:r,...s}){return b.jsx(Nh,{children:b.jsx(Ll,{children:b.jsx(Nl,{mapProvider:e,children:b.jsx(Hh,{endpoints:t,apiUrl:n,children:b.jsx(Bp,{children:r,...s})})})})})}Ka.displayName="Locator";var Zr,Ga;function $p(){return Ga||(Ga=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,s,o;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(s=r;s--!==0;)if(!e(t[s],n[s]))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(o=Object.keys(t),r=o.length,r!==Object.keys(n).length)return!1;for(s=r;s--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[s]))return!1;for(s=r;s--!==0;){var i=o[s];if(!e(t[i],n[i]))return!1}return!0}return t!==t&&n!==n}),Zr}var zp=$p();const Up=is(zp);function we(){return we=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},we.apply(null,arguments)}function Je(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 Xp(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 Wp(e){var t=Xp(e,"string");return typeof t=="symbol"?t:t+""}const ue={NOT_LOADED:"NOT_LOADED",LOADING:"LOADING",LOADED:"LOADED",FAILED:"FAILED",AUTH_FAILURE:"AUTH_FAILURE"},Kp="https://maps.googleapis.com/maps/api/js";class qt{static async load(t,n){var r;const s=t.libraries?t.libraries.split(","):[],o=this.serializeParams(t);this.listeners.push(n),(r=window.google)!=null&&(r=r.maps)!=null&&r.importLibrary?(this.serializedApiParams||(this.loadingStatus=ue.LOADED),this.notifyLoadingStatusListeners()):(this.serializedApiParams=o,this.initImportLibrary(t)),this.serializedApiParams&&this.serializedApiParams!==o&&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",...s];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((s,o)=>{var i;const a=document.createElement("script"),l=new URLSearchParams;for(const[u,c]of Object.entries(t)){const d=u.replace(/[A-Z]/g,f=>"_"+f[0].toLowerCase());l.set(d,String(c))}l.set("loading","async"),l.set("callback","__googleMapsCallback__"),a.async=!0,a.src=Kp+"?"+l.toString(),a.nonce=((i=document.querySelector("script[nonce]"))==null?void 0:i.nonce)||"",a.onerror=()=>{this.loadingStatus=ue.FAILED,this.notifyLoadingStatusListeners(),o(new Error("The Google Maps JavaScript API could not load."))},window.__googleMapsCallback__=()=>{this.loadingStatus=ue.LOADED,this.notifyLoadingStatusListeners(),s()},window.gm_authFailure=()=>{this.loadingStatus=ue.AUTH_FAILURE,this.notifyLoadingStatusListeners()},this.loadingStatus=ue.LOADING,this.notifyLoadingStatusListeners(),document.head.append(a)}),n);google.maps.importLibrary=s=>r().then(()=>google.maps.importLibrary(s))}static notifyLoadingStatusListeners(){for(const t of this.listeners)t(this.loadingStatus)}}qt.loadingStatus=ue.NOT_LOADED,qt.serializedApiParams=void 0,qt.listeners=[];const Gp=["onLoad","onError","apiKey","version","libraries"],Hp=["children"],qp="GMP_visgl_rgmlibrary_v1_default",Yt=m.createContext(null);function Yp(){const[e,t]=m.useState({});return{mapInstances:e,addMapInstance:(o,i="default")=>{t(a=>we({},a,{[i]:o}))},removeMapInstance:(o="default")=>{t(i=>Je(i,[o].map(Wp)))},clearMapInstances:()=>{t({})}}}function Zp(e){const{onLoad:t,onError:n,apiKey:r,version:s,libraries:o=[]}=e,i=Je(e,Gp),[a,l]=m.useState(qt.loadingStatus),[u,c]=m.useReducer((v,g)=>v[g.name]?v:we({},v,{[g.name]:g.value}),{}),d=m.useMemo(()=>o==null?void 0:o.join(","),[o]),f=m.useMemo(()=>JSON.stringify(we({apiKey:r,version:s},i)),[r,s,i]),p=m.useCallback(async v=>{var g;if(u[v])return u[v];if(!((g=google)!=null&&(g=g.maps)!=null&&g.importLibrary))throw new Error("[api-provider-internal] importLibrary was called before google.maps.importLibrary was defined.");const S=await window.google.maps.importLibrary(v);return c({name:v,value:S}),S},[u]);return m.useEffect(()=>{(async()=>{try{const v=we({key:r},i);s&&(v.v=s),(d==null?void 0:d.length)>0&&(v.libraries=d),(v.channel===void 0||v.channel<0||v.channel>999)&&delete v.channel,v.solutionChannel===void 0?v.solutionChannel=qp:v.solutionChannel===""&&delete v.solutionChannel,await qt.load(v,g=>l(g));for(const g of["core","maps",...o])await p(g);t&&t()}catch(v){n?n(v):console.error("<ApiProvider> failed to load the Google Maps JavaScript API",v)}})()},[r,d,f]),{status:a,loadedLibraries:u,importLibrary:p}}const Jp=e=>{const{children:t}=e,n=Je(e,Hp),{mapInstances:r,addMapInstance:s,removeMapInstance:o,clearMapInstances:i}=Yp(),{status:a,loadedLibraries:l,importLibrary:u}=Zp(n),c=m.useMemo(()=>({mapInstances:r,addMapInstance:s,removeMapInstance:o,clearMapInstances:i,status:a,loadedLibraries:l,importLibrary:u}),[r,s,o,i,a,l,u]);return m.createElement(Yt.Provider,{value:c},t)};function Qp(e,t){for(const n of rm){const r=t[n],s=Ha[n];m.useEffect(()=>{if(!e||!r)return;const o=google.maps.event.addListener(e,s,i=>{r(em(s,e,i))});return()=>o.remove()},[e,s,r])}}function em(e,t,n){const r={type:e,map:t,detail:{},stoppable:!1,stop:()=>{}};if(tm.includes(e)){const o=r,i=t.getCenter(),a=t.getZoom(),l=t.getHeading()||0,u=t.getTilt()||0,c=t.getBounds();return(!i||!c||!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"),o.detail={center:(i==null?void 0:i.toJSON())||{lat:0,lng:0},zoom:a||0,heading:l,tilt:u,bounds:(c==null?void 0:c.toJSON())||{north:90,east:180,south:-90,west:-180}},o}else if(nm.includes(e)){var s;if(!n)throw new Error("[createEvent] mouse events must provide a srcEvent");const o=r;return o.domEvent=n.domEvent,o.stoppable=!0,o.stop=()=>n.stop(),o.detail={latLng:((s=n.latLng)==null?void 0:s.toJSON())||null,placeId:n.placeId},o}return r}const Ha={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"},tm=["bounds_changed","center_changed","heading_changed","tilt_changed","zoom_changed"],nm=["click","contextmenu","dblclick","mousemove","mouseout","mouseover"],rm=Object.keys(Ha);function Jr(e,t){const n=m.useRef(void 0);(!n.current||!Up(t,n.current))&&(n.current=t),m.useEffect(e,n.current)}const sm=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 om(e,t){const n={},r=Object.keys(t);for(const s of r)sm.has(s)&&(n[s]=t[s]);Jr(()=>{e&&e.setOptions(n)},[n])}function Qr(){var e;return((e=m.useContext(Yt))==null?void 0:e.status)||ue.NOT_LOADED}function im(e,t){const{viewport:n,viewState:r}=t,s=!!n;return m.useLayoutEffect(()=>{if(!e||!r)return;const{latitude:o,longitude:i,bearing:a,pitch:l,zoom:u}=r;e.moveCamera({center:{lat:o,lng:i},heading:a,tilt:l,zoom:u+1})},[e,r]),s}function am(e){return!e||typeof e!="object"||!("lat"in e&&"lng"in e)?!1:Number.isFinite(e.lat)&&Number.isFinite(e.lng)}function qa(e){return am(e)?e:e.toJSON()}function lm(e,t,n){const r=n.center?qa(n.center):null;let s=null,o=null;r&&Number.isFinite(r.lat)&&Number.isFinite(r.lng)&&(s=r.lat,o=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;m.useLayoutEffect(()=>{if(!e)return;const u={};let c=!1;s!==null&&o!==null&&(t.current.center.lat!==s||t.current.center.lng!==o)&&(u.center={lat:s,lng:o},c=!0),i!==null&&t.current.zoom!==i&&(u.zoom=i,c=!0),a!==null&&t.current.heading!==a&&(u.heading=a,c=!0),l!==null&&t.current.tilt!==l&&(u.tilt=l,c=!0),c&&e.moveCamera(u)})}const cm=()=>{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 m.createElement("div",{style:e},m.createElement("h2",null,"Error: AuthFailure"),m.createElement("p",null,"A problem with your API key prevents the map from rendering correctly. Please make sure the value of the ",m.createElement("code",null,"APIProvider.apiKey")," prop is correct. Check the error-message in the console for further details."))};function um(){const[e,t]=m.useState(null),n=m.useCallback(r=>t(r),[t]);return[e,n]}function Ya(){return Qr()===ue.LOADED}function dm(){const[,e]=m.useReducer(t=>t+1,0);return e}function fm(e,t){const n=e.getCenter(),r=e.getZoom(),s=e.getHeading()||0,o=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:s,tilt:o})}function hm(e){const t=dm(),n=m.useRef({center:{lat:0,lng:0},heading:0,tilt:0,zoom:0});return m.useEffect(()=>{if(!e)return;const r=google.maps.event.addListener(e,"bounds_changed",()=>{fm(e,n),t()});return()=>r.remove()},[e,t]),n}const pm=["id","defaultBounds","defaultCenter","defaultZoom","defaultHeading","defaultTilt","reuseMaps","renderingType","colorScheme"],mm=["padding"];class wn{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)}}wn.entries={};function gm(e,t){const n=Ya(),[r,s]=m.useState(null),[o,i]=um(),a=hm(r),{id:l,defaultBounds:u,defaultCenter:c,defaultZoom:d,defaultHeading:f,defaultTilt:p,reuseMaps:v,renderingType:g,colorScheme:S}=e,y=Je(e,pm),x=e.zoom!==void 0||e.defaultZoom!==void 0,w=e.center!==void 0||e.defaultCenter!==void 0;!u&&(!x||!w)&&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"),!y.center&&c&&(y.center=c),!y.zoom&&Number.isFinite(d)&&(y.zoom=d),!y.heading&&Number.isFinite(f)&&(y.heading=f),!y.tilt&&Number.isFinite(p)&&(y.tilt=p);for(const T of Object.keys(y))y[T]===void 0&&delete y[T];const A=m.useRef(void 0);return m.useEffect(()=>{if(!o||!n)return;const{addMapInstance:T,removeMapInstance:M}=t,{mapId:E}=e,_=`${E||"default"}:${g||"default"}:${S||"LIGHT"}`;let k,j;if(v&&wn.has(_)?(j=wn.pop(_),k=j.getDiv(),o.appendChild(k),j.setOptions(y),setTimeout(()=>j.setCenter(j.getCenter()),0)):(k=document.createElement("div"),k.style.height="100%",o.appendChild(k),j=new google.maps.Map(k,we({},y,g?{renderingType:g}:{},S?{colorScheme:S}:{}))),s(j),T(j,l),u){const{padding:W}=u,ee=Je(u,mm);j.fitBounds(ee,W)}else(!x||!w)&&j.fitBounds({east:180,west:-180,south:-90,north:90});if(A.current){const{mapId:W,cameraState:ee}=A.current;W!==E&&j.setOptions(ee)}return()=>{A.current={mapId:E,cameraState:a.current},k.remove(),v?wn.push(_,j):google.maps.event.clearInstanceListeners(j),s(null),M(l)}},[o,n,l,e.mapId,e.renderingType,e.colorScheme]),[r,i,a]}const Za=m.createContext(null),Ja=e=>{const{children:t,id:n,className:r,style:s}=e,o=m.useContext(Yt),i=Qr();if(!o)throw new Error("<Map> can only be used inside an <ApiProvider> component.");const[a,l,u]=gm(e,o);lm(a,u,e),Qp(a,e),om(a,e);const c=im(a,e),d=!!e.controlled;m.useEffect(()=>{if(a)return c&&a.setOptions({disableDefaultUI:!0}),(c||d)&&a.setOptions({gestureHandling:"none",keyboardShortcuts:!1}),()=>{a.setOptions({gestureHandling:e.gestureHandling,keyboardShortcuts:e.keyboardShortcuts})}},[a,c,d,e.gestureHandling,e.keyboardShortcuts]);const f=e.center?qa(e.center):null;let p=null,v=null;f&&Number.isFinite(f.lat)&&Number.isFinite(f.lng)&&(p=f.lat,v=f.lng);const g=m.useMemo(()=>{var x,w,A,T,M;return{center:{lat:(x=p)!=null?x:0,lng:(w=v)!=null?w:0},zoom:(A=e.zoom)!=null?A:0,heading:(T=e.heading)!=null?T:0,tilt:(M=e.tilt)!=null?M:0}},[p,v,e.zoom,e.heading,e.tilt]);m.useLayoutEffect(()=>{if(!a||!d)return;a.moveCamera(g);const x=a.addListener("bounds_changed",()=>{a.moveCamera(g)});return()=>x.remove()},[a,d,g]);const S=m.useMemo(()=>we({width:"100%",height:"100%",position:"relative",zIndex:c?-1:0},s),[s,c]),y=m.useMemo(()=>({map:a}),[a]);return i===ue.AUTH_FAILURE?m.createElement("div",{style:we({position:"relative"},r?{}:S),className:r},m.createElement(cm,null)):m.createElement("div",we({ref:l,"data-testid":"map",style:r?void 0:S,className:r},n?{id:n}:{}),a?m.createElement(Za.Provider,{value:y},t):null)};Ja.deckGLViewProps=!0;const Qa=new Set;function ym(...e){const t=JSON.stringify(e);Qa.has(t)||(Qa.add(t),console.error(...e))}const Cn=(e=null)=>{const t=m.useContext(Yt),{map:n}=m.useContext(Za)||{};if(t===null)return ym("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 Tn(e){const t=Ya(),n=m.useContext(Yt);return m.useEffect(()=>{!t||!n||n.importLibrary(e)},[t,n,e]),(n==null?void 0:n.loadedLibraries[e])||null}function gt(e,t,n){m.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){m.useEffect(()=>{e&&(e[t]=n)},[e,t,n])}function el(e,t,n){m.useEffect(()=>{if(!(!e||!t||!n))return e.addEventListener(t,n),()=>e.removeEventListener(t,n)},[e,t,n])}function vm(e){return e.content!==void 0}function xm(e){return e.nodeType===Node.ELEMENT_NODE}const bm=m.createContext(null),Sm={BOTTOM:["50%","100%"]},wm=({children:e,styles:t,className:n,anchorPoint:r})=>{const[s,o]=r??Sm.BOTTOM;let i=`-${s}`,a=`-${o}`;s.trimStart().startsWith("-")&&(i=s.substring(1)),o.trimStart().startsWith("-")&&(a=o.substring(1));const l=`translate(50%, 100%) translate(${i}, ${a})`;return m.createElement("div",{style:{transform:l}},m.createElement("div",{className:n,style:t},e))};function Cm(e){const[t,n]=m.useState(null),[r,s]=m.useState(null),o=Cn(),i=Tn("marker"),{children:a,onClick:l,className:u,onMouseEnter:c,onMouseLeave:d,onDrag:f,onDragStart:p,onDragEnd:v,collisionBehavior:g,clickable:S,draggable:y,position:x,title:w,zIndex:A}=e,T=m.Children.count(a);return m.useEffect(()=>{if(!o||!i)return;const M=new i.AdvancedMarkerElement;M.map=o,n(M);let E=null;return T>0&&(E=document.createElement("div"),E.isCustomMarker=!0,M.content=E,s(E)),()=>{var _;M.map=null,(_=E)==null||_.remove(),n(null),s(null)}},[o,i,T]),m.useEffect(()=>{!t||!t.content||T>0||(t.content.className=u||"")},[t,u,T]),Pn(t,"position",x),Pn(t,"title",w??""),Pn(t,"zIndex",A),Pn(t,"collisionBehavior",g),m.useEffect(()=>{t&&(y!==void 0?t.gmpDraggable=y:f||p||v?t.gmpDraggable=!0:t.gmpDraggable=!1)},[t,y,f,v,p]),m.useEffect(()=>{if(!t)return;const M=S!==void 0||!!l||!!c||!!d;t.gmpClickable=M,M&&t!=null&&t.content&&xm(t.content)&&(t.content.style.pointerEvents="none",t.content.firstElementChild&&(t.content.firstElementChild.style.pointerEvents="all"))},[t,S,l,c,d]),gt(t,"click",l),gt(t,"drag",f),gt(t,"dragstart",p),gt(t,"dragend",v),el(t==null?void 0:t.element,"mouseenter",c),el(t==null?void 0:t.element,"mouseleave",d),[t,r]}m.forwardRef((e,t)=>{const{children:n,style:r,className:s,anchorPoint:o}=e,[i,a]=Cm(e),l=m.useMemo(()=>i?{marker:i}:null,[i]);return m.useImperativeHandle(t,()=>i,[i]),a?m.createElement(bm.Provider,{value:l},Dn.createPortal(m.createElement(wm,{anchorPoint:o,styles:r,className:s},n),a)):null});function Tm(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 s in t)t.hasOwnProperty(s)&&tl(r,s,t[s]);return}for(const s in n)n.hasOwnProperty(s)&&(t==null||!t.hasOwnProperty(s))&&(s.indexOf("--")===0?r.setProperty(s,""):s==="float"?r.cssFloat="":r[s]="");if(t!=null)for(const s in t){const o=t[s];t.hasOwnProperty(s)&&n[s]!==o&&tl(r,s,o)}}function tl(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&&!Em(t)?e[t]=n+"px":t==="float"?e.cssFloat=n:e[t]=(""+n).trim()}const Pm=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 Em(e){return Pm.has(e)}const _m=["children","headerContent","style","className","pixelOffset","anchor","shouldFocus","onClose","onCloseClick"],Am=e=>{const{children:t,headerContent:n,style:r,className:s,pixelOffset:o,anchor:i,shouldFocus:a,onClose:l,onCloseClick:u}=e,c=Je(e,_m),d=Tn("maps"),[f,p]=m.useState(null),v=m.useRef(null),g=m.useRef(null);m.useEffect(()=>{if(!d)return;v.current=document.createElement("div"),g.current=document.createElement("div");const x=c;o&&(x.pixelOffset=new google.maps.Size(o[0],o[1])),n&&(x.headerContent=typeof n=="string"?n:g.current);const w=new google.maps.InfoWindow(c);return w.setContent(v.current),p(w),()=>{var A,T;w.setContent(null),(A=v.current)==null||A.remove(),(T=g.current)==null||T.remove(),v.current=null,g.current=null,p(null)}},[d]);const S=m.useRef(null);m.useEffect(()=>{!f||!v.current||(Tm(v.current,r||null,S.current),S.current=r||null,s!==v.current.className&&(v.current.className=s||""))},[f,s,r]),Jr(()=>{if(!f)return;const x=c;o?x.pixelOffset=new google.maps.Size(o[0],o[1]):x.pixelOffset=null,n?x.headerContent=typeof n=="string"?n:g.current:x.headerContent=null,f.setOptions(c)},[c,o,n]),gt(f,"close",l),gt(f,"closeclick",u);const y=Cn();return Jr(()=>{if(!y||!f||i===null)return;const x=!!i,w={map:y};if(i&&(w.anchor=i,vm(i)&&i.content instanceof Element)){const T=i.content,M=T==null?void 0:T.getBoundingClientRect();if(M&&T!=null&&T.isCustomMarker){var A;const E=(A=i.content.firstElementChild)==null?void 0:A.firstElementChild,_=E==null?void 0:E.getBoundingClientRect(),k=_.x-M.x+(_.width-M.width)/2,j=_.y-M.y,W=c;W.pixelOffset=new google.maps.Size(o?o[0]+k:k,o?o[1]+j:j),f.setOptions(W)}}return a!==void 0&&(w.shouldFocus=a),f.open(w),()=>{x&&f.set("anchor",null),f.close()}},[f,i,y,a,c,o]),m.createElement(m.Fragment,null,v.current&&Dn.createPortal(t,v.current),g.current!==null&&Dn.createPortal(n,g.current))},Mm=["onClick","onDrag","onDragStart","onDragEnd","onMouseOver","onMouseOut"];function Lm(e){const[t,n]=m.useState(null),r=Cn(),{onClick:s,onDrag:o,onDragStart:i,onDragEnd:a,onMouseOver:l,onMouseOut:u}=e,c=Je(e,Mm),{position:d,draggable:f}=c;return m.useEffect(()=>{if(!r){r===void 0&&console.error("<Marker> has to be inside a Map component.");return}const p=new google.maps.Marker(c);return p.setMap(r),n(p),()=>{p.setMap(null),n(null)}},[r]),m.useEffect(()=>{if(!t)return;const p=t,v=google.maps.event;return s&&v.addListener(p,"click",s),o&&v.addListener(p,"drag",o),i&&v.addListener(p,"dragstart",i),a&&v.addListener(p,"dragend",a),l&&v.addListener(p,"mouseover",l),u&&v.addListener(p,"mouseout",u),t.setDraggable(!!f),()=>{v.clearInstanceListeners(p)}},[t,f,s,o,i,a,l,u]),m.useEffect(()=>{t&&c&&t.setOptions(c)},[t,c]),m.useEffect(()=>{f||!d||!t||t.setPosition(d)},[f,d,t]),t}const nl=m.forwardRef((e,t)=>{const n=Lm(e);return m.useImperativeHandle(t,()=>n,[n]),m.createElement(m.Fragment,null)});function Dm(){const[e,t]=m.useState(null);return[m.useCallback(r=>{t(r)},[]),e]}const Qe={root:"_root_xftk3_10",header:"_header_xftk3_17",highlighted:"_highlighted_xftk3_30",body:"_body_xftk3_51"};function Om({onLocationSelect:e}){var v;const t=Da("locationCard"),[n,r]=m.useState(!1),s=B(g=>g.locations),{labels:o}=B(g=>g.localizationConfig),i=B(g=>g.selectedLocation),a=B(g=>g.setSelectedLocation),l=m.useRef({}),u=o["LocationList.header"],c=o["LocationList.locationDesignator"],d=u.split(/(\{:\d\})/g),f=m.useMemo(()=>d.map((g,S)=>g==="{:1}"?b.jsx("span",{className:Qe.highlighted,children:s.length},S):g==="{:2}"?b.jsx("span",{className:Qe.highlighted,children:c},S):g),[c,s.length,d]);m.useEffect(()=>{if(i){const g=l.current[i];g!=null&&g.current&&g.current.scrollIntoView({behavior:"smooth",block:"start"})}},[i]);function p(g){return()=>{e==null||e(g.coords),a==null||a(g.id)}}return b.jsxs("div",{className:Y("dyn-locator__location-list",Qe.root),"data-expanded":n,children:[s!=null&&s.length?b.jsxs("header",{className:Qe.header,onClick:()=>r(g=>!g),children:[b.jsx("span",{children:f}),b.jsx(Kt,{className:Qe.closeButton,variant:"bare",children:b.jsx(qe,{icon:n?"ChevronDown":"ChevronUp"})})]}):b.jsx("div",{className:Qe.header,style:{cursor:"default"},children:o["LocationList.noResults"]}),n?b.jsx("div",{className:Qe.body,children:(v=s==null?void 0:s.map)==null?void 0:v.call(s,g=>{const S=g.id;l.current[S]||(l.current[S]=m.createRef());const y=l.current[S];return b.jsx(t,{ref:y,"data-active":i===g.id,onClick:p(g),...g},g.id)})}):null]})}const En={root:"_root_7kzjs_4",loaderContainer:"_loaderContainer_7kzjs_10",fullscreenButton:"_fullscreenButton_7kzjs_17"},_n={root:"_root_e0ns1_4",header:"_header_e0ns1_7",cta:"_cta_e0ns1_24"};function km({id:e,title:t,address:n,coords:r,actions:s,onClick:o,onZoom:i}){var f;const a=B(p=>p.selectedLocation),l=B(p=>p.setSelectedLocation),[u,c]=Dm(),d=m.useCallback(()=>l==null?void 0:l(""),[l]);return b.jsxs(b.Fragment,{children:[b.jsx(nl,{ref:u,position:r,onClick:()=>{o==null||o()}}),a===e?b.jsxs(Am,{anchor:c,headerContent:t,onClose:d,className:_n.root,children:[b.jsxs("header",{className:_n.header,children:[b.jsx("h6",{children:t}),b.jsx("address",{children:n})]}),b.jsx("div",{className:_n.body,children:b.jsxs("div",{className:_n.cta,children:[b.jsx(Kr,{animate:!1,variant:"secondary",size:"small",...Xr((f=s==null?void 0:s.find)==null?void 0:f.call(s,p=>p.type==="navigate")),children:"Percorso"}),b.jsx(Kr,{animate:!1,variant:"secondary",size:"small",onClick:i,children:"Zoom"})]})})]}):null]})}function jm(e){return"size"in e&&"range"in e&&"onMarkerClick"in e}function Vm(e){return"title"in e&&!("size"in e)}function Nm({zoom:e=6,center:t={lat:45.4642,lng:9.19}}){var S;const[n,r]=m.useState({zoom:e,center:t}),s=Qr(),o=B(y=>y.targetLocation),i=B(y=>y.clearTargetLocation),a=B(y=>y.locations),l=B(y=>y.mapDetail),u=B(y=>y.featureFlags),c=B(y=>y.isFullscreen),d=B(y=>y.setFullscreen),f=B(y=>y.setSelectedLocation);function p({detail:y}){const{center:x,zoom:w}=y;r({center:x,zoom:w})}m.useEffect(()=>{o&&(r({center:o.coords,zoom:o.zoom}),i())},[o,i]);function v(y){r(x=>({center:y,zoom:x.zoom}))}function g(y){if(jm(y))return b.jsx(nl,{position:y.coords,icon:{path:google.maps.SymbolPath.CIRCLE,fillColor:"#00acde",fillOpacity:.6,strokeWeight:0,scale:(y.range??0)/3e3,labelOrigin:new google.maps.Point(0,0)},onClick:async()=>{await y.onMarkerClick(),r({center:y.coords,zoom:y.zoom||15})}},y.id);if(Vm(y))return b.jsx(km,{id:y.id,title:y.title??"No title",address:y.address??"No address",coords:y.coords,actions:y.actions,onZoom:()=>r({center:y.coords,zoom:18}),onClick:()=>{f(y.id)}},y.id)}if(s===ue.LOADING)return b.jsx("div",{className:Y("dyn-locator__map",En.root),children:b.jsx("div",{className:En.loaderContainer,children:b.jsx(Tt,{size:"large"})})});if(s===ue.FAILED||s===ue.AUTH_FAILURE)throw new Error(Dh);if(s===ue.LOADED)return b.jsxs("div",{className:Y("dyn-locator__map",En.root),children:[u.fullscreen?b.jsx(Kt,{className:Y(En.fullscreenButton,"dyn-locator__map__fullscreen-button"),variant:"negative",onClick:()=>d==null?void 0:d(!c),children:b.jsx(qe,{size:"M",icon:c?"Close":"Expand"})}):null,b.jsx(Ja,{style:{width:"100%",height:"100%"},gestureHandling:"greedy",disableDefaultUI:!0,...n,onCameraChanged:p,children:(S=a==null?void 0:a.map)==null?void 0:S.call(a,g)}),l===Ct.MARKER?b.jsx(Om,{onLocationSelect:v}):null]})}const Le={root:"_root_h6kw7_10",validIcon:"_validIcon_h6kw7_23",errorIcon:"_errorIcon_h6kw7_30",label:"_label_h6kw7_51",input:"_input_h6kw7_61",sideButton:"_sideButton_h6kw7_92",sideOrnament:"_sideOrnament_h6kw7_95",clearButton:"_clearButton_h6kw7_129",dropdown:"_dropdown_h6kw7_169"},rl="Input";function sl({label:e,className:t,showValidation:n=!0,error:r=!1,valid:s=!1,clearable:o=!1,onClear:i,animate:a=!0,animationDelay:l=0,dropdown:u,dropdownVisible:c=!1,ariaLabel:d,style:f,sideButton:p,sideOrnament:v,...g},S){const y=a?He.div:"div",x=Ie(g)??[],w=a?{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:l,duration:.2}}:{};return b.jsxs(y,{className:Y("dyn-locator__"+Ee(rl),Le.root,Pe(t),...x??[]),"data-valid":s,"data-error":r,"data-expanded":c,"data-side-button":!!p,...f?{style:f}:{},...w,children:[n&&b.jsxs(b.Fragment,{children:[s&&b.jsx("span",{className:Le.validIcon}),r&&b.jsx("span",{className:Le.errorIcon})]}),e?b.jsx("label",{className:Le.label,...g.id?{htmlFor:g.id}:{},children:e}):null,v?b.jsx("span",{className:Le.sideOrnament,children:v}):null,b.jsx("input",{ref:S,className:Y(Le.input),"aria-label":d,"aria-invalid":r,"data-side-button":!!p,"data-side-ornament":!!v,...g}),p?b.jsx("span",{className:Le.sideButton,children:p}):null,o&&(g==null?void 0:g.value)&&b.jsx("button",{className:Le.clearButton,onClick:i,type:"button","aria-label":"Clear input"}),u&&c&&b.jsx("div",{className:Le.dropdown,children:u})]})}sl.displayName=rl;const Im=m.forwardRef(sl),et={root:"_root_1pdcn_7",input:"_input_1pdcn_7",clearButton:"_clearButton_1pdcn_10",sideOrnament:"_sideOrnament_1pdcn_13",predictionsContainer:"_predictionsContainer_1pdcn_18",predictionItem:"_predictionItem_1pdcn_28",loadingItem:"_loadingItem_1pdcn_46"};function Rm(){const[e,t]=m.useState(""),[n,r]=m.useState([]),[s,o]=m.useState(!1),[i,a]=m.useState(!1),[l,u]=m.useState(!1),c=B(O=>O.mapId),d=B(O=>O.setLocations),f=B(O=>O.setMapDetail),p=B(O=>O.zoomToLocation),{labels:v}=B(O=>O.localizationConfig),{search:g}=B(O=>O.featureFlags),{request:S,loading:y}=Yr(yn.FIND),x=Tn("places"),w=Tn("geocoding"),A=Cn(),T=m.useRef(null),M=m.useRef(null),E=m.useRef(null),_=m.useRef(null);m.useEffect(()=>{w&&(E.current||(E.current=new w.Geocoder))},[w]),m.useEffect(()=>{x&&(T.current||(T.current=new x.AutocompleteService),_.current||(_.current=new x.AutocompleteSessionToken))},[x]),m.useEffect(()=>{!x||!A||M.current||(M.current=new x.PlacesService(A))},[x,A]);const k=async O=>{var R;if(!O||O.length<3){r([]),o(!1);return}a(!0);try{if(!x||!T.current)throw new Error("Places library or Autocomplete Service not available");const z=await T.current.getPlacePredictions({input:O,..._.current?{sessionToken:_.current}:{}});if(a(!1),!((R=z==null?void 0:z.predictions)!=null&&R.length)){r([]),o(!1);return}r(z.predictions),o(!0)}catch(z){console.error("Error fetching predictions: ",z),a(!1),r([]),o(!1),Z.error(Wt+Mh)}},j=m.useMemo(()=>Vh(O=>k(O),600),[k]),W=O=>{const R=O.currentTarget.value;if(t(R),!R||R.length<3){r([]),o(!1);return}j(R)},ee=async O=>{var R,z,ge,ie,De;t(O.description),o(!1);try{if(!x||!M.current)throw new Error("Places library or Places Service not available");const te=await new Promise(($e,tt)=>{M.current.getDetails({placeId:O.place_id,fields:["geometry"],..._.current?{sessionToken:_.current}:{}},(vt,nt)=>{nt===x.PlacesServiceStatus.OK&&vt?$e(vt):tt(new Error(`Place details request failed with status: ${nt}`))})});if((R=te==null?void 0:te.geometry)!=null&&R.location){const $e=(ge=(z=te.geometry.location).lat)==null?void 0:ge.call(z),tt=(De=(ie=te.geometry.location).lng)==null?void 0:De.call(ie);await yt({lat:$e,lng:tt})}}catch(te){console.error("Error getting place details:",te),Z.error(Wt+Lh)}finally{x&&(_.current=new x.AutocompleteSessionToken)}},oe=()=>{t(""),r([]),o(!1)},he=()=>!s||n.length===0?null:b.jsx("div",{className:et.predictionsContainer,children:i?b.jsx("div",{className:et.loadingItem,children:b.jsx(Tt,{size:"medium"})}):n.map(O=>b.jsx("div",{className:et.predictionItem,onClick:()=>ee(O),children:O.description},O.place_id))});async function Be(O){O.preventDefault(),u(!0);try{const R=await new Promise((ie,De)=>{navigator.geolocation.getCurrentPosition(te=>ie(te),te=>De(te),{timeout:5e3})}),z={lat:R.coords.latitude,lng:R.coords.longitude};if(await yt(z),!w||!(E!=null&&E.current)||!A)throw new Error("Geocoding library or Geocoder not available");const ge=await new Promise((ie,De)=>{E.current.geocode({location:z},(te,$e)=>{$e===google.maps.GeocoderStatus.OK&&te&&te.length>0?ie(te):De(new Error(`Geocoding failed with status: ${$e}`))})});ge&&ge[0]&&t(ge[0].formatted_address)}catch(R){console.error("Error getting location: ",R);const z=R instanceof GeolocationPositionError?Wt+R.message:Wt+_h;Z.error(z)}finally{u(!1)}}async function yt(O){const{lng:R,lat:z}=O,ge={location:{type:"Feature",geometry:{type:"Point",coordinates:[R,z]},properties:{}}};try{const{data:ie}=await S({mapId:c},{body:ge})??{};if(!ie)throw new Error("No locations found");d(ie),f(Ct.MARKER),p({lat:z,lng:R},15)}catch(ie){throw console.error("Error finding locations: ",ie),ie}}const G=y||l;return g?b.jsxs("div",{className:Y("dyn-locator__search",et.root),children:[b.jsx(Im,{className:Y("dyn-locator__search__field",et.input),value:e,onChange:W,placeholder:v["Search.placeholder"],dropdown:he(),dropdownVisible:s,disabled:G,sideOrnament:e?void 0:b.jsx(qe,{className:et.sideOrnament,icon:"Search",size:"M"}),sideButton:e?b.jsx(Kt,{variant:"bare",className:et.clearButton,onClick:oe,"aria-label":"Clear",children:b.jsx(qe,{icon:"Close",size:"M"})}):b.jsx(ya,{href:"#",onClick:Be,children:v["Search.geolocationButton"]})}),b.jsx(Wa,{show:G,children:b.jsx(Tt,{size:"medium"})})]}):null}function Fm({children:e,apiKey:t,language:n,region:r,libraries:s}){return b.jsx(Jp,{apiKey:t,region:r,language:n,libraries:s,children:e})}const Bm=Object.freeze(Object.defineProperty({__proto__:null,default:Fm},Symbol.toStringTag,{value:"Module"}));function $m(){throw new Error("Mapbox provider is not implemented yet")}const zm=Object.freeze(Object.defineProperty({__proto__:null,default:$m},Symbol.toStringTag,{value:"Module"}));function Um(){throw new Error("HERE Maps provider is not implemented yet")}const Xm=Object.freeze(Object.defineProperty({__proto__:null,default:Um},Symbol.toStringTag,{value:"Module"}));ye.Map=Nm,ye.Search=Rm,ye.default=Ka,Object.defineProperties(ye,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
289
+ `,wn=16,zp=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:s,containerStyle:o,containerClassName:i})=>{let{toasts:a,handlers:l}=yp(n);return Q.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:wn,left:wn,right:wn,bottom:wn,pointerEvents:"none",...o},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=Bp(u,d);return Q.createElement(Fp,{id:c.id,key:c.id,onHeightUpdate:l.updateHeight,className:c.visible?$p:"",style:f},c.type==="custom"?bn(c.message,c):s?s(c):Q.createElement(Ka,{toast:c,position:u}))}))};const Up={root:"_root_movxa_4"};function Ga({className:e,children:t,show:n=!0,variant:r="light",...s}){const o=Y("dyn-locator__overlay",Up.root,e);return n?b.jsx("div",{className:o,"data-variant":r,...s,children:t}):null}function Jr(e){const[t,n]=m.useState(!1),[r,s]=m.useState(null),{getEndpoint:o}=Qh(e);return{request:async(a={},l={})=>{n(!0),s(null);try{let c;try{c=o(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 s(u),console.error(`Error in API request to "${e}":`,u),u}finally{n(!1)}},loading:t,error:r}}function Xp({children:e,customComponents:t,customIcons:n,featureFlags:r,fetchLocations:s,localizationConfig:o,locations:i=[],mapId:a}){const l=I(E=>E.isFullscreen),c=I(E=>E.setLocations),u=I(E=>E.setMapId),d=I(E=>E.setFeatureFlags),f=I(E=>E.setLocalizationConfig),p=I(E=>E.setMapDetail),y=I(E=>E.shouldRefetch),g=I(E=>E.setShouldRefetch),{request:S,loading:v,error:x}=Jr(vn.CLUSTERS),{request:w,loading:M,error:P}=Jr(vn.MARKERS),L=v||M,T=!!x||!!P;async function A(E){var U;try{if(typeof E!="number"||E<0||isNaN(E))throw new Error("No map ID provided");const{data:z}=await S({mapId:String(E)})??{};if(!z)throw new Error("No cluster data received from the server");c((U=z.map)==null?void 0:U.call(z,oe=>({...oe,onMarkerClick:async()=>{await V(E,oe.id)}})))}catch(z){console.error("Error fetching clusters: ",z),Z.error(gt+Xr),c([])}}async function V(E,U){try{if(typeof E!="number"||E<0||isNaN(E))throw new Error("No map ID provided");const{data:z}=await w({mapId:String(E),clusterId:U})??{};if(!z)throw new Error("No marker data received from the server");c(z),p(st.MARKER)}catch(z){console.error("Error fetching markers: ",z),Z.error(gt+Xr),c([])}}return m.useEffect(()=>{o&&f(o),r&&d(r),typeof a=="number"&&a>0&&!isNaN(a)&&u(a),i!=null&&i.length?c(i):s?s().then(E=>c(E)):A(a)},[]),m.useEffect(()=>{let E=!0;return y&&a&&A(a).finally(()=>{E&&g(!1)}),()=>{E=!1}},[y,a]),b.jsx("div",{id:"dyn-locator",className:Y("dyn-locator__locator",gs.root),"data-fullscreen":l,children:b.jsxs(qh,{customIcons:n,customComponents:t,children:[e,b.jsxs(Ga,{show:L||T,variant:"light",children:[L?b.jsx(Et,{size:"large"}):null,T?b.jsx(wa,{title:Dh,message:Xr,actionText:"ricaricare la pagina.",errorDetails:(x==null?void 0:x.message)||(P==null?void 0:P.message),onAction:E=>{E.preventDefault(),window.location.reload()}}):null]}),b.jsx(zp,{toastOptions:{position:"top-right",duration:3e3,error:{duration:1/0}},children:E=>b.jsx(Ka,{toast:E,children:({icon:U,message:z})=>b.jsxs(b.Fragment,{children:[U,z,E.type==="error"&&b.jsx(vt,{variant:"bare",onClick:()=>Z.dismiss(E.id),children:b.jsx(Re,{icon:"Close"})})]})})})]})})}function Ha({mapProvider:e,endpoints:t,apiUrl:n,children:r,...s}){return b.jsx(Bh,{children:b.jsx(Ol,{children:b.jsx(Rl,{mapProvider:e,children:b.jsx(Jh,{endpoints:t,apiUrl:n,children:b.jsx(Xp,{children:r,...s})})})})})}Ha.displayName="Locator";var Qr,qa;function Wp(){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,s,o;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(s=r;s--!==0;)if(!e(t[s],n[s]))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(o=Object.keys(t),r=o.length,r!==Object.keys(n).length)return!1;for(s=r;s--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[s]))return!1;for(s=r;s--!==0;){var i=o[s];if(!e(t[i],n[i]))return!1}return!0}return t!==t&&n!==n}),Qr}var Kp=Wp();const Gp=ls(Kp);function we(){return we=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},we.apply(null,arguments)}function Je(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 Hp(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 qp(e){var t=Hp(e,"string");return typeof t=="symbol"?t:t+""}const ue={NOT_LOADED:"NOT_LOADED",LOADING:"LOADING",LOADED:"LOADED",FAILED:"FAILED",AUTH_FAILURE:"AUTH_FAILURE"},Yp="https://maps.googleapis.com/maps/api/js";class qt{static async load(t,n){var r;const s=t.libraries?t.libraries.split(","):[],o=this.serializeParams(t);this.listeners.push(n),(r=window.google)!=null&&(r=r.maps)!=null&&r.importLibrary?(this.serializedApiParams||(this.loadingStatus=ue.LOADED),this.notifyLoadingStatusListeners()):(this.serializedApiParams=o,this.initImportLibrary(t)),this.serializedApiParams&&this.serializedApiParams!==o&&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",...s];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((s,o)=>{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=Yp+"?"+l.toString(),a.nonce=((i=document.querySelector("script[nonce]"))==null?void 0:i.nonce)||"",a.onerror=()=>{this.loadingStatus=ue.FAILED,this.notifyLoadingStatusListeners(),o(new Error("The Google Maps JavaScript API could not load."))},window.__googleMapsCallback__=()=>{this.loadingStatus=ue.LOADED,this.notifyLoadingStatusListeners(),s()},window.gm_authFailure=()=>{this.loadingStatus=ue.AUTH_FAILURE,this.notifyLoadingStatusListeners()},this.loadingStatus=ue.LOADING,this.notifyLoadingStatusListeners(),document.head.append(a)}),n);google.maps.importLibrary=s=>r().then(()=>google.maps.importLibrary(s))}static notifyLoadingStatusListeners(){for(const t of this.listeners)t(this.loadingStatus)}}qt.loadingStatus=ue.NOT_LOADED,qt.serializedApiParams=void 0,qt.listeners=[];const Zp=["onLoad","onError","apiKey","version","libraries"],Jp=["children"],Qp="GMP_visgl_rgmlibrary_v1_default",Yt=m.createContext(null);function em(){const[e,t]=m.useState({});return{mapInstances:e,addMapInstance:(o,i="default")=>{t(a=>we({},a,{[i]:o}))},removeMapInstance:(o="default")=>{t(i=>Je(i,[o].map(qp)))},clearMapInstances:()=>{t({})}}}function tm(e){const{onLoad:t,onError:n,apiKey:r,version:s,libraries:o=[]}=e,i=Je(e,Zp),[a,l]=m.useState(qt.loadingStatus),[c,u]=m.useReducer((y,g)=>y[g.name]?y:we({},y,{[g.name]:g.value}),{}),d=m.useMemo(()=>o==null?void 0:o.join(","),[o]),f=m.useMemo(()=>JSON.stringify(we({apiKey:r,version:s},i)),[r,s,i]),p=m.useCallback(async y=>{var g;if(c[y])return c[y];if(!((g=google)!=null&&(g=g.maps)!=null&&g.importLibrary))throw new Error("[api-provider-internal] importLibrary was called before google.maps.importLibrary was defined.");const S=await window.google.maps.importLibrary(y);return u({name:y,value:S}),S},[c]);return m.useEffect(()=>{(async()=>{try{const y=we({key:r},i);s&&(y.v=s),(d==null?void 0:d.length)>0&&(y.libraries=d),(y.channel===void 0||y.channel<0||y.channel>999)&&delete y.channel,y.solutionChannel===void 0?y.solutionChannel=Qp:y.solutionChannel===""&&delete y.solutionChannel,await qt.load(y,g=>l(g));for(const g of["core","maps",...o])await p(g);t&&t()}catch(y){n?n(y):console.error("<ApiProvider> failed to load the Google Maps JavaScript API",y)}})()},[r,d,f]),{status:a,loadedLibraries:c,importLibrary:p}}const nm=e=>{const{children:t}=e,n=Je(e,Jp),{mapInstances:r,addMapInstance:s,removeMapInstance:o,clearMapInstances:i}=em(),{status:a,loadedLibraries:l,importLibrary:c}=tm(n),u=m.useMemo(()=>({mapInstances:r,addMapInstance:s,removeMapInstance:o,clearMapInstances:i,status:a,loadedLibraries:l,importLibrary:c}),[r,s,o,i,a,l,c]);return m.createElement(Yt.Provider,{value:u},t)};function rm(e,t){for(const n of am){const r=t[n],s=Ya[n];m.useEffect(()=>{if(!e||!r)return;const o=google.maps.event.addListener(e,s,i=>{r(sm(s,e,i))});return()=>o.remove()},[e,s,r])}}function sm(e,t,n){const r={type:e,map:t,detail:{},stoppable:!1,stop:()=>{}};if(om.includes(e)){const o=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"),o.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}},o}else if(im.includes(e)){var s;if(!n)throw new Error("[createEvent] mouse events must provide a srcEvent");const o=r;return o.domEvent=n.domEvent,o.stoppable=!0,o.stop=()=>n.stop(),o.detail={latLng:((s=n.latLng)==null?void 0:s.toJSON())||null,placeId:n.placeId},o}return r}const Ya={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"},om=["bounds_changed","center_changed","heading_changed","tilt_changed","zoom_changed"],im=["click","contextmenu","dblclick","mousemove","mouseout","mouseover"],am=Object.keys(Ya);function es(e,t){const n=m.useRef(void 0);(!n.current||!Gp(t,n.current))&&(n.current=t),m.useEffect(e,n.current)}const lm=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 cm(e,t){const n={},r=Object.keys(t);for(const s of r)lm.has(s)&&(n[s]=t[s]);es(()=>{e&&e.setOptions(n)},[n])}function ts(){var e;return((e=m.useContext(Yt))==null?void 0:e.status)||ue.NOT_LOADED}function um(e,t){const{viewport:n,viewState:r}=t,s=!!n;return m.useLayoutEffect(()=>{if(!e||!r)return;const{latitude:o,longitude:i,bearing:a,pitch:l,zoom:c}=r;e.moveCamera({center:{lat:o,lng:i},heading:a,tilt:l,zoom:c+1})},[e,r]),s}function dm(e){return!e||typeof e!="object"||!("lat"in e&&"lng"in e)?!1:Number.isFinite(e.lat)&&Number.isFinite(e.lng)}function Za(e){return dm(e)?e:e.toJSON()}function fm(e,t,n){const r=n.center?Za(n.center):null;let s=null,o=null;r&&Number.isFinite(r.lat)&&Number.isFinite(r.lng)&&(s=r.lat,o=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;m.useLayoutEffect(()=>{if(!e)return;const c={};let u=!1;s!==null&&o!==null&&(t.current.center.lat!==s||t.current.center.lng!==o)&&(c.center={lat:s,lng:o},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 hm=()=>{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 m.createElement("div",{style:e},m.createElement("h2",null,"Error: AuthFailure"),m.createElement("p",null,"A problem with your API key prevents the map from rendering correctly. Please make sure the value of the ",m.createElement("code",null,"APIProvider.apiKey")," prop is correct. Check the error-message in the console for further details."))};function pm(){const[e,t]=m.useState(null),n=m.useCallback(r=>t(r),[t]);return[e,n]}function Ja(){return ts()===ue.LOADED}function mm(){const[,e]=m.useReducer(t=>t+1,0);return e}function gm(e,t){const n=e.getCenter(),r=e.getZoom(),s=e.getHeading()||0,o=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:s,tilt:o})}function ym(e){const t=mm(),n=m.useRef({center:{lat:0,lng:0},heading:0,tilt:0,zoom:0});return m.useEffect(()=>{if(!e)return;const r=google.maps.event.addListener(e,"bounds_changed",()=>{gm(e,n),t()});return()=>r.remove()},[e,t]),n}const vm=["id","defaultBounds","defaultCenter","defaultZoom","defaultHeading","defaultTilt","reuseMaps","renderingType","colorScheme"],xm=["padding"];class Cn{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)}}Cn.entries={};function bm(e,t){const n=Ja(),[r,s]=m.useState(null),[o,i]=pm(),a=ym(r),{id:l,defaultBounds:c,defaultCenter:u,defaultZoom:d,defaultHeading:f,defaultTilt:p,reuseMaps:y,renderingType:g,colorScheme:S}=e,v=Je(e,vm),x=e.zoom!==void 0||e.defaultZoom!==void 0,w=e.center!==void 0||e.defaultCenter!==void 0;!c&&(!x||!w)&&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"),!v.center&&u&&(v.center=u),!v.zoom&&Number.isFinite(d)&&(v.zoom=d),!v.heading&&Number.isFinite(f)&&(v.heading=f),!v.tilt&&Number.isFinite(p)&&(v.tilt=p);for(const P of Object.keys(v))v[P]===void 0&&delete v[P];const M=m.useRef(void 0);return m.useEffect(()=>{if(!o||!n)return;const{addMapInstance:P,removeMapInstance:L}=t,{mapId:T}=e,A=`${T||"default"}:${g||"default"}:${S||"LIGHT"}`;let V,E;if(y&&Cn.has(A)?(E=Cn.pop(A),V=E.getDiv(),o.appendChild(V),E.setOptions(v),setTimeout(()=>E.setCenter(E.getCenter()),0)):(V=document.createElement("div"),V.style.height="100%",o.appendChild(V),E=new google.maps.Map(V,we({},v,g?{renderingType:g}:{},S?{colorScheme:S}:{}))),s(E),P(E,l),c){const{padding:U}=c,z=Je(c,xm);E.fitBounds(z,U)}else(!x||!w)&&E.fitBounds({east:180,west:-180,south:-90,north:90});if(M.current){const{mapId:U,cameraState:z}=M.current;U!==T&&E.setOptions(z)}return()=>{M.current={mapId:T,cameraState:a.current},V.remove(),y?Cn.push(A,E):google.maps.event.clearInstanceListeners(E),s(null),L(l)}},[o,n,l,e.mapId,e.renderingType,e.colorScheme]),[r,i,a]}const Qa=m.createContext(null),el=e=>{const{children:t,id:n,className:r,style:s}=e,o=m.useContext(Yt),i=ts();if(!o)throw new Error("<Map> can only be used inside an <ApiProvider> component.");const[a,l,c]=bm(e,o);fm(a,c,e),rm(a,e),cm(a,e);const u=um(a,e),d=!!e.controlled;m.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?Za(e.center):null;let p=null,y=null;f&&Number.isFinite(f.lat)&&Number.isFinite(f.lng)&&(p=f.lat,y=f.lng);const g=m.useMemo(()=>{var x,w,M,P,L;return{center:{lat:(x=p)!=null?x:0,lng:(w=y)!=null?w:0},zoom:(M=e.zoom)!=null?M:0,heading:(P=e.heading)!=null?P:0,tilt:(L=e.tilt)!=null?L:0}},[p,y,e.zoom,e.heading,e.tilt]);m.useLayoutEffect(()=>{if(!a||!d)return;a.moveCamera(g);const x=a.addListener("bounds_changed",()=>{a.moveCamera(g)});return()=>x.remove()},[a,d,g]);const S=m.useMemo(()=>we({width:"100%",height:"100%",position:"relative",zIndex:u?-1:0},s),[s,u]),v=m.useMemo(()=>({map:a}),[a]);return i===ue.AUTH_FAILURE?m.createElement("div",{style:we({position:"relative"},r?{}:S),className:r},m.createElement(hm,null)):m.createElement("div",we({ref:l,"data-testid":"map",style:r?void 0:S,className:r},n?{id:n}:{}),a?m.createElement(Qa.Provider,{value:v},t):null)};el.deckGLViewProps=!0;const tl=new Set;function Sm(...e){const t=JSON.stringify(e);tl.has(t)||(tl.add(t),console.error(...e))}const Tn=(e=null)=>{const t=m.useContext(Yt),{map:n}=m.useContext(Qa)||{};if(t===null)return Sm("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 Pn(e){const t=Ja(),n=m.useContext(Yt);return m.useEffect(()=>{!t||!n||n.importLibrary(e)},[t,n,e]),(n==null?void 0:n.loadedLibraries[e])||null}function xt(e,t,n){m.useEffect(()=>{if(!e||!t||!n)return;const r=google.maps.event.addListener(e,t,n);return()=>r.remove()},[e,t,n])}function En(e,t,n){m.useEffect(()=>{e&&(e[t]=n)},[e,t,n])}function nl(e,t,n){m.useEffect(()=>{if(!(!e||!t||!n))return e.addEventListener(t,n),()=>e.removeEventListener(t,n)},[e,t,n])}function wm(e){return e.content!==void 0}function Cm(e){return e.nodeType===Node.ELEMENT_NODE}const Tm=m.createContext(null),Pm={BOTTOM:["50%","100%"]},Em=({children:e,styles:t,className:n,anchorPoint:r})=>{const[s,o]=r??Pm.BOTTOM;let i=`-${s}`,a=`-${o}`;s.trimStart().startsWith("-")&&(i=s.substring(1)),o.trimStart().startsWith("-")&&(a=o.substring(1));const l=`translate(50%, 100%) translate(${i}, ${a})`;return m.createElement("div",{style:{transform:l}},m.createElement("div",{className:n,style:t},e))};function _m(e){const[t,n]=m.useState(null),[r,s]=m.useState(null),o=Tn(),i=Pn("marker"),{children:a,onClick:l,className:c,onMouseEnter:u,onMouseLeave:d,onDrag:f,onDragStart:p,onDragEnd:y,collisionBehavior:g,clickable:S,draggable:v,position:x,title:w,zIndex:M}=e,P=m.Children.count(a);return m.useEffect(()=>{if(!o||!i)return;const L=new i.AdvancedMarkerElement;L.map=o,n(L);let T=null;return P>0&&(T=document.createElement("div"),T.isCustomMarker=!0,L.content=T,s(T)),()=>{var A;L.map=null,(A=T)==null||A.remove(),n(null),s(null)}},[o,i,P]),m.useEffect(()=>{!t||!t.content||P>0||(t.content.className=c||"")},[t,c,P]),En(t,"position",x),En(t,"title",w??""),En(t,"zIndex",M),En(t,"collisionBehavior",g),m.useEffect(()=>{t&&(v!==void 0?t.gmpDraggable=v:f||p||y?t.gmpDraggable=!0:t.gmpDraggable=!1)},[t,v,f,y,p]),m.useEffect(()=>{if(!t)return;const L=S!==void 0||!!l||!!u||!!d;t.gmpClickable=L,L&&t!=null&&t.content&&Cm(t.content)&&(t.content.style.pointerEvents="none",t.content.firstElementChild&&(t.content.firstElementChild.style.pointerEvents="all"))},[t,S,l,u,d]),xt(t,"click",l),xt(t,"drag",f),xt(t,"dragstart",p),xt(t,"dragend",y),nl(t==null?void 0:t.element,"mouseenter",u),nl(t==null?void 0:t.element,"mouseleave",d),[t,r]}m.forwardRef((e,t)=>{const{children:n,style:r,className:s,anchorPoint:o}=e,[i,a]=_m(e),l=m.useMemo(()=>i?{marker:i}:null,[i]);return m.useImperativeHandle(t,()=>i,[i]),a?m.createElement(Tm.Provider,{value:l},Dn.createPortal(m.createElement(Em,{anchorPoint:o,styles:r,className:s},n),a)):null});function Am(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 s in t)t.hasOwnProperty(s)&&rl(r,s,t[s]);return}for(const s in n)n.hasOwnProperty(s)&&(t==null||!t.hasOwnProperty(s))&&(s.indexOf("--")===0?r.setProperty(s,""):s==="float"?r.cssFloat="":r[s]="");if(t!=null)for(const s in t){const o=t[s];t.hasOwnProperty(s)&&n[s]!==o&&rl(r,s,o)}}function rl(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&&!Lm(t)?e[t]=n+"px":t==="float"?e.cssFloat=n:e[t]=(""+n).trim()}const Mm=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 Lm(e){return Mm.has(e)}const Dm=["children","headerContent","style","className","pixelOffset","anchor","shouldFocus","onClose","onCloseClick"],Om=e=>{const{children:t,headerContent:n,style:r,className:s,pixelOffset:o,anchor:i,shouldFocus:a,onClose:l,onCloseClick:c}=e,u=Je(e,Dm),d=Pn("maps"),[f,p]=m.useState(null),y=m.useRef(null),g=m.useRef(null);m.useEffect(()=>{if(!d)return;y.current=document.createElement("div"),g.current=document.createElement("div");const x=u;o&&(x.pixelOffset=new google.maps.Size(o[0],o[1])),n&&(x.headerContent=typeof n=="string"?n:g.current);const w=new google.maps.InfoWindow(u);return w.setContent(y.current),p(w),()=>{var M,P;w.setContent(null),(M=y.current)==null||M.remove(),(P=g.current)==null||P.remove(),y.current=null,g.current=null,p(null)}},[d]);const S=m.useRef(null);m.useEffect(()=>{!f||!y.current||(Am(y.current,r||null,S.current),S.current=r||null,s!==y.current.className&&(y.current.className=s||""))},[f,s,r]),es(()=>{if(!f)return;const x=u;o?x.pixelOffset=new google.maps.Size(o[0],o[1]):x.pixelOffset=null,n?x.headerContent=typeof n=="string"?n:g.current:x.headerContent=null,f.setOptions(u)},[u,o,n]),xt(f,"close",l),xt(f,"closeclick",c);const v=Tn();return es(()=>{if(!v||!f||i===null)return;const x=!!i,w={map:v};if(i&&(w.anchor=i,wm(i)&&i.content instanceof Element)){const P=i.content,L=P==null?void 0:P.getBoundingClientRect();if(L&&P!=null&&P.isCustomMarker){var M;const T=(M=i.content.firstElementChild)==null?void 0:M.firstElementChild,A=T==null?void 0:T.getBoundingClientRect(),V=A.x-L.x+(A.width-L.width)/2,E=A.y-L.y,U=u;U.pixelOffset=new google.maps.Size(o?o[0]+V:V,o?o[1]+E:E),f.setOptions(U)}}return a!==void 0&&(w.shouldFocus=a),f.open(w),()=>{x&&f.set("anchor",null),f.close()}},[f,i,v,a,u,o]),m.createElement(m.Fragment,null,y.current&&Dn.createPortal(t,y.current),g.current!==null&&Dn.createPortal(n,g.current))},km=["onClick","onDrag","onDragStart","onDragEnd","onMouseOver","onMouseOut"];function jm(e){const[t,n]=m.useState(null),r=Tn(),{onClick:s,onDrag:o,onDragStart:i,onDragEnd:a,onMouseOver:l,onMouseOut:c}=e,u=Je(e,km),{position:d,draggable:f}=u;return m.useEffect(()=>{if(!r){r===void 0&&console.error("<Marker> has to be inside a Map component.");return}const p=new google.maps.Marker(u);return p.setMap(r),n(p),()=>{p.setMap(null),n(null)}},[r]),m.useEffect(()=>{if(!t)return;const p=t,y=google.maps.event;return s&&y.addListener(p,"click",s),o&&y.addListener(p,"drag",o),i&&y.addListener(p,"dragstart",i),a&&y.addListener(p,"dragend",a),l&&y.addListener(p,"mouseover",l),c&&y.addListener(p,"mouseout",c),t.setDraggable(!!f),()=>{y.clearInstanceListeners(p)}},[t,f,s,o,i,a,l,c]),m.useEffect(()=>{t&&u&&t.setOptions(u)},[t,u]),m.useEffect(()=>{f||!d||!t||t.setPosition(d)},[f,d,t]),t}const sl=m.forwardRef((e,t)=>{const n=jm(e);return m.useImperativeHandle(t,()=>n,[n]),m.createElement(m.Fragment,null)});function Vm(){const[e,t]=m.useState(null);return[m.useCallback(r=>{t(r)},[]),e]}const Qe={root:"_root_xftk3_10",header:"_header_xftk3_17",highlighted:"_highlighted_xftk3_30",body:"_body_xftk3_51"};function Nm({onLocationSelect:e}){var y;const t=ka("locationCard"),[n,r]=m.useState(!1),s=I(g=>g.locations),{labels:o}=I(g=>g.localizationConfig),i=I(g=>g.selectedLocation),a=I(g=>g.setSelectedLocation),l=m.useRef({}),c=o["LocationList.header"],u=o["LocationList.locationDesignator"],d=c.split(/(\{:\d\})/g),f=m.useMemo(()=>d.map((g,S)=>g==="{:1}"?b.jsx("span",{className:Qe.highlighted,children:s.length},S):g==="{:2}"?b.jsx("span",{className:Qe.highlighted,children:u},S):g),[u,s.length,d]);m.useEffect(()=>{if(i){const g=l.current[i];g!=null&&g.current&&g.current.scrollIntoView({behavior:"smooth",block:"start"})}},[i]);function p(g){return()=>{e==null||e(g.coords),a==null||a(g.id)}}return b.jsxs("div",{className:Y("dyn-locator__location-list",Qe.root),"data-expanded":n,children:[s!=null&&s.length?b.jsxs("header",{className:Qe.header,onClick:()=>r(g=>!g),children:[b.jsx("span",{children:f}),b.jsx(vt,{className:Qe.closeButton,variant:"bare",children:b.jsx(Re,{icon:n?"ChevronDown":"ChevronUp"})})]}):b.jsx("div",{className:Qe.header,style:{cursor:"default"},children:o["LocationList.noResults"]}),n?b.jsx("div",{className:Qe.body,children:(y=s==null?void 0:s.map)==null?void 0:y.call(s,g=>{const S=g.id;l.current[S]||(l.current[S]=m.createRef());const v=l.current[S];return b.jsx(t,{ref:v,"data-active":i===g.id,onClick:p(g),...g},g.id)})}):null]})}const Zt={root:"_root_1l10e_4",loaderContainer:"_loaderContainer_1l10e_10",fullscreenButton:"_fullscreenButton_1l10e_17",backButton:"_backButton_1l10e_18"},_n={root:"_root_e0ns1_4",header:"_header_e0ns1_7",cta:"_cta_e0ns1_24"};function Im({id:e,title:t,address:n,coords:r,actions:s,onClick:o,onZoom:i}){var f;const a=I(p=>p.selectedLocation),l=I(p=>p.setSelectedLocation),[c,u]=Vm(),d=m.useCallback(()=>{l==null||l("")},[l]);return b.jsxs(b.Fragment,{children:[b.jsx(sl,{ref:c,position:r,onClick:()=>{o==null||o()}}),a===e?b.jsxs(Om,{anchor:u,headerContent:t,onClose:d,className:_n.root,children:[b.jsxs("header",{className:_n.header,children:[b.jsx("h6",{children:t}),b.jsx("address",{children:n})]}),b.jsx("div",{className:_n.body,children:b.jsxs("div",{className:_n.cta,children:[b.jsx(Hr,{animate:!1,variant:"secondary",size:"small",...Kr((f=s==null?void 0:s.find)==null?void 0:f.call(s,p=>p.type==="navigate")),children:"Percorso"}),b.jsx(Hr,{animate:!1,variant:"secondary",size:"small",onClick:i,children:"Zoom"})]})})]}):null]})}function Rm(e){return"size"in e&&"range"in e&&"onMarkerClick"in e}function Fm(e){return"title"in e&&!("size"in e)}function Bm({zoom:e=ga,center:t={lat:Wr.lat,lng:Wr.lng}}){var L;const[n,r]=m.useState({zoom:e,center:t}),s=m.useRef(""),o=ts(),i=I(T=>T.locations),a=I(T=>T.featureFlags),l=I(T=>T.targetLocation),c=I(T=>T.clearTargetLocation),u=I(T=>T.mapDetail),d=I(T=>T.setMapDetail),f=I(T=>T.isFullscreen),p=I(T=>T.setFullscreen),y=I(T=>T.shouldRefetch),g=I(T=>T.setShouldRefetch),S=I(T=>T.setSelectedLocation),v=u===st.MARKER;function x({detail:T}){const{center:A,zoom:V}=T;r({center:A,zoom:V})}function w(T){r(A=>({center:T,zoom:A.zoom}))}function M(){d(st.CLUSTER),r({center:Wr,zoom:ga}),g(!0)}function P(T){if(Rm(T))return b.jsx(sl,{position:T.coords,icon:{path:google.maps.SymbolPath.CIRCLE,fillColor:s.current||"#00acde",fillOpacity:.6,strokeWeight:0,scale:(T.range??0)/Rh,labelOrigin:new google.maps.Point(0,0)},onClick:async()=>{await T.onMarkerClick(),r({center:T.coords,zoom:T.zoom||15})}},T.id);if(Fm(T))return b.jsx(Im,{id:T.id,title:T.title??"No title",address:T.address??"No address",coords:T.coords,actions:T.actions,onZoom:()=>r({center:T.coords,zoom:18}),onClick:()=>{S(T.id)}},T.id)}if(m.useEffect(()=>{s.current=getComputedStyle(document.documentElement).getPropertyValue("--dyn-locator__colors-accent-500")},[]),m.useEffect(()=>{l&&(r({center:l.coords,zoom:l.zoom}),c())},[l,c]),o===ue.LOADING)return b.jsx("div",{className:Y("dyn-locator__map",Zt.root),children:b.jsx("div",{className:Zt.loaderContainer,children:b.jsx(Et,{size:"large"})})});if(o===ue.FAILED||o===ue.AUTH_FAILURE)throw new Error(jh);if(o===ue.LOADED)return b.jsxs("div",{className:Y("dyn-locator__map",Zt.root),children:[a.fullscreen?b.jsx(vt,{className:Y(Zt.fullscreenButton,"dyn-locator__map__fullscreen-button"),variant:"negative",onClick:()=>p==null?void 0:p(!f),children:b.jsx(Re,{size:"M",icon:f?"Close":"Expand"})}):null,v?b.jsx(vt,{className:Y(Zt.backButton,"dyn-locator__map__back-button"),variant:"negative",onClick:M,children:b.jsx(Re,{size:"M",icon:"ArrowLeft"})}):null,b.jsx(el,{style:{width:"100%",height:"100%"},gestureHandling:"greedy",disableDefaultUI:!0,...n,onCameraChanged:x,children:!y&&((L=i==null?void 0:i.map)==null?void 0:L.call(i,P))}),v?b.jsx(Nm,{onLocationSelect:w}):null]})}const Le={root:"_root_h6kw7_10",validIcon:"_validIcon_h6kw7_23",errorIcon:"_errorIcon_h6kw7_30",label:"_label_h6kw7_51",input:"_input_h6kw7_61",sideButton:"_sideButton_h6kw7_92",sideOrnament:"_sideOrnament_h6kw7_95",clearButton:"_clearButton_h6kw7_129",dropdown:"_dropdown_h6kw7_169"},ol="Input";function il({label:e,className:t,showValidation:n=!0,error:r=!1,valid:s=!1,clearable:o=!1,onClear:i,animate:a=!0,animationDelay:l=0,dropdown:c,dropdownVisible:u=!1,ariaLabel:d,style:f,sideButton:p,sideOrnament:y,...g},S){const v=a?qe.div:"div",x=Ie(g)??[],w=a?{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:l,duration:.2}}:{};return b.jsxs(v,{className:Y("dyn-locator__"+Ee(ol),Le.root,Pe(t),...x??[]),"data-valid":s,"data-error":r,"data-expanded":u,"data-side-button":!!p,...f?{style:f}:{},...w,children:[n&&b.jsxs(b.Fragment,{children:[s&&b.jsx("span",{className:Le.validIcon}),r&&b.jsx("span",{className:Le.errorIcon})]}),e?b.jsx("label",{className:Le.label,...g.id?{htmlFor:g.id}:{},children:e}):null,y?b.jsx("span",{className:Le.sideOrnament,children:y}):null,b.jsx("input",{ref:S,className:Y(Le.input),"aria-label":d,"aria-invalid":r,"data-side-button":!!p,"data-side-ornament":!!y,...g}),p?b.jsx("span",{className:Le.sideButton,children:p}):null,o&&(g==null?void 0:g.value)&&b.jsx("button",{className:Le.clearButton,onClick:i,type:"button","aria-label":"Clear input"}),c&&u&&b.jsx("div",{className:Le.dropdown,children:c})]})}il.displayName=ol;const $m=m.forwardRef(il),et={root:"_root_1pdcn_7",input:"_input_1pdcn_7",clearButton:"_clearButton_1pdcn_10",sideOrnament:"_sideOrnament_1pdcn_13",predictionsContainer:"_predictionsContainer_1pdcn_18",predictionItem:"_predictionItem_1pdcn_28",loadingItem:"_loadingItem_1pdcn_46"};function zm(){const[e,t]=m.useState(""),[n,r]=m.useState([]),[s,o]=m.useState(!1),[i,a]=m.useState(!1),[l,c]=m.useState(!1),u=I(k=>k.mapId),d=I(k=>k.setLocations),f=I(k=>k.setMapDetail),p=I(k=>k.zoomToLocation),{labels:y}=I(k=>k.localizationConfig),{search:g}=I(k=>k.featureFlags),{request:S,loading:v}=Jr(vn.FIND),x=Pn("places"),w=Pn("geocoding"),M=Tn(),P=m.useRef(null),L=m.useRef(null),T=m.useRef(null),A=m.useRef(null);m.useEffect(()=>{w&&(T.current||(T.current=new w.Geocoder))},[w]),m.useEffect(()=>{x&&(P.current||(P.current=new x.AutocompleteService),A.current||(A.current=new x.AutocompleteSessionToken))},[x]),m.useEffect(()=>{!x||!M||L.current||(L.current=new x.PlacesService(M))},[x,M]);const V=async k=>{var F;if(!k||k.length<3){r([]),o(!1);return}a(!0);try{if(!x||!P.current)throw new Error("Places library or Autocomplete Service not available");const X=await P.current.getPlacePredictions({input:k,...A.current?{sessionToken:A.current}:{}});if(a(!1),!((F=X==null?void 0:X.predictions)!=null&&F.length)){r([]),o(!1);return}r(X.predictions),o(!0)}catch(X){console.error("Error fetching predictions: ",X),a(!1),r([]),o(!1),Z.error(gt+Oh)}},E=m.useMemo(()=>Fh(k=>V(k),600),[V]),U=k=>{const F=k.currentTarget.value;if(t(F),!F||F.length<3){r([]),o(!1);return}E(F)},z=async k=>{var F,X,ye,ie,De;t(k.description),o(!1);try{if(!x||!L.current)throw new Error("Places library or Places Service not available");const te=await new Promise((ze,tt)=>{L.current.getDetails({placeId:k.place_id,fields:["geometry"],...A.current?{sessionToken:A.current}:{}},(St,nt)=>{nt===x.PlacesServiceStatus.OK&&St?ze(St):tt(new Error(`Place details request failed with status: ${nt}`))})});if((F=te==null?void 0:te.geometry)!=null&&F.location){const ze=(ye=(X=te.geometry.location).lat)==null?void 0:ye.call(X),tt=(De=(ie=te.geometry.location).lng)==null?void 0:De.call(ie);await bt({lat:ze,lng:tt})}}catch(te){console.error("Error getting place details:",te),Z.error(gt+kh)}finally{x&&(A.current=new x.AutocompleteSessionToken)}},oe=()=>{t(""),r([]),o(!1)},he=()=>!s||n.length===0?null:b.jsx("div",{className:et.predictionsContainer,children:i?b.jsx("div",{className:et.loadingItem,children:b.jsx(Et,{size:"medium"})}):n.map(k=>b.jsx("div",{className:et.predictionItem,onClick:()=>z(k),children:k.description},k.place_id))});async function $e(k){k.preventDefault(),c(!0);try{const F=await new Promise((ie,De)=>{navigator.geolocation.getCurrentPosition(te=>ie(te),te=>De(te),{timeout:5e3})}),X={lat:F.coords.latitude,lng:F.coords.longitude};if(await bt(X),!w||!(T!=null&&T.current)||!M)throw new Error("Geocoding library or Geocoder not available");const ye=await new Promise((ie,De)=>{T.current.geocode({location:X},(te,ze)=>{ze===google.maps.GeocoderStatus.OK&&te&&te.length>0?ie(te):De(new Error(`Geocoding failed with status: ${ze}`))})});ye&&ye[0]&&t(ye[0].formatted_address)}catch(F){console.error("Error getting location: ",F);const X=F instanceof GeolocationPositionError?gt+F.message:gt+Lh;Z.error(X)}finally{c(!1)}}async function bt(k){const{lng:F,lat:X}=k,ye={location:{type:"Feature",geometry:{type:"Point",coordinates:[F,X]},properties:{}}};try{const{data:ie}=await S({mapId:u},{body:ye})??{};if(!ie)throw new Error("No locations found");d(ie),f(st.MARKER),p({lat:X,lng:F},15)}catch(ie){throw console.error("Error finding locations: ",ie),ie}}const H=v||l;return g?b.jsxs("div",{className:Y("dyn-locator__search",et.root),children:[b.jsx($m,{name:"locator_search_field",className:Y("dyn-locator__search__field",et.input),value:e,onChange:U,placeholder:y["Search.placeholder"],dropdown:he(),dropdownVisible:s,disabled:H,sideOrnament:e?void 0:b.jsx(Re,{className:et.sideOrnament,icon:"Search",size:"M"}),sideButton:e?b.jsx(vt,{variant:"bare",className:et.clearButton,onClick:oe,"aria-label":"Clear",children:b.jsx(Re,{icon:"Close",size:"M"})}):b.jsx(xa,{href:"#",onClick:$e,children:y["Search.geolocationButton"]})}),b.jsx(Ga,{show:H,children:b.jsx(Et,{size:"medium"})})]}):null}function Um({children:e,apiKey:t,language:n,region:r,libraries:s}){return b.jsx(nm,{apiKey:t,region:r,language:n,libraries:s,children:e})}const Xm=Object.freeze(Object.defineProperty({__proto__:null,default:Um},Symbol.toStringTag,{value:"Module"}));function Wm(){throw new Error("Mapbox provider is not implemented yet")}const Km=Object.freeze(Object.defineProperty({__proto__:null,default:Wm},Symbol.toStringTag,{value:"Module"}));function Gm(){throw new Error("HERE Maps provider is not implemented yet")}const Hm=Object.freeze(Object.defineProperty({__proto__:null,default:Gm},Symbol.toStringTag,{value:"Module"}));ve.Map=Bm,ve.Search=zm,ve.default=Ha,Object.defineProperties(ve,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
285
290
  //# sourceMappingURL=index.umd.js.map