@dynamo-caffeina-dev/locator-frontend 0.0.10 → 0.0.11

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(be,g){typeof exports=="object"&&typeof module<"u"?g(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],g):(be=typeof globalThis<"u"?globalThis:be||self,g(be["@dynamo-caffeina-dev/locator-frontend"]={},be.React,be.ReactDOM))})(this,function(be,g,jn){"use strict";function Cl(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 ee=Cl(g);function ls(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var tn={exports:{}},_t={};/**
1
+ (function(be,g){typeof exports=="object"&&typeof module<"u"?g(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],g):(be=typeof globalThis<"u"?globalThis:be||self,g(be["@dynamo-caffeina-dev/locator-frontend"]={},be.React,be.ReactDOM))})(this,function(be,g,jn){"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 ee=wl(g);function ls(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nn={exports:{}},_t={};/**
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 cs;function wl(){if(cs)return _t;cs=1;var e=g,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 _t.Fragment=n,_t.jsx=i,_t.jsxs=i,_t}var Pt={};/**
9
+ */var cs;function Tl(){if(cs)return _t;cs=1;var e=g,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 _t.Fragment=n,_t.jsx=i,_t.jsxs=i,_t}var Et={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,113 +14,118 @@
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 us;function Tl(){return us||(us=1,process.env.NODE_ENV!=="production"&&function(){var e=g,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"),m=Symbol.iterator,y="@@iterator";function S(h){if(h===null||typeof h!="object")return null;var w=m&&h[m]||h[y];return typeof w=="function"?w:null}var v=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(h){{for(var w=arguments.length,P=new Array(w>1?w-1:0),k=1;k<w;k++)P[k-1]=arguments[k];C("error",h,P)}}function C(h,w,P){{var k=v.ReactDebugCurrentFrame,B=k.getStackAddendum();B!==""&&(w+="%s",P=P.concat([B]));var X=P.map(function(F){return String(F)});X.unshift("Warning: "+w),Function.prototype.apply.call(console[h],console,X)}}var A=!1,T=!1,M=!1,j=!1,E=!1,N;N=Symbol.for("react.module.reference");function _(h){return!!(typeof h=="string"||typeof h=="function"||h===r||h===o||E||h===s||h===c||h===u||j||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===N||h.getModuleId!==void 0))}function z(h,w,P){var k=h.displayName;if(k)return k;var B=w.displayName||w.name||"";return B!==""?P+"("+B+")":P}function $(h){return h.displayName||"Context"}function re(h){if(h==null)return null;if(typeof h.tag=="number"&&b("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 w=h;return $(w)+".Consumer";case i:var P=h;return $(P._context)+".Provider";case l:return z(h,h.render,"ForwardRef");case d:var k=h.displayName||null;return k!==null?k:re(h.type)||"Memo";case f:{var B=h,X=B._payload,F=B._init;try{return re(F(X))}catch{return null}}}return null}var ue=Object.assign,ve=0,L,U,O,R,K,xe,te;function ke(){}ke.__reactDisabledLog=!0;function se(){{if(ve===0){L=console.log,U=console.info,O=console.warn,R=console.error,K=console.group,xe=console.groupCollapsed,te=console.groupEnd;var h={configurable:!0,enumerable:!0,value:ke,writable:!0};Object.defineProperties(console,{info:h,log:h,warn:h,error:h,group:h,groupCollapsed:h,groupEnd:h})}ve++}}function Ue(){{if(ve--,ve===0){var h={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ue({},h,{value:L}),info:ue({},h,{value:U}),warn:ue({},h,{value:O}),error:ue({},h,{value:R}),group:ue({},h,{value:K}),groupCollapsed:ue({},h,{value:xe}),groupEnd:ue({},h,{value:te})})}ve<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ot=v.ReactCurrentDispatcher,Ct;function it(h,w,P){{if(Ct===void 0)try{throw Error()}catch(B){var k=B.stack.trim().match(/\n( *(at )?)/);Ct=k&&k[1]||""}return`
18
- `+Ct+h}}var ns=!1,Dn;{var eg=typeof WeakMap=="function"?WeakMap:Map;Dn=new eg}function al(h,w){if(!h||ns)return"";{var P=Dn.get(h);if(P!==void 0)return P}var k;ns=!0;var B=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var X;X=ot.current,ot.current=null,se();try{if(w){var F=function(){throw Error()};if(Object.defineProperty(F.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(F,[])}catch(de){k=de}Reflect.construct(h,[],F)}else{try{F.call()}catch(de){k=de}h.call(F.prototype)}}else{try{throw Error()}catch(de){k=de}h()}}catch(de){if(de&&k&&typeof de.stack=="string"){for(var V=de.stack.split(`
17
+ */var us;function _l(){return us||(us=1,process.env.NODE_ENV!=="production"&&function(){var e=g,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"),m=Symbol.iterator,y="@@iterator";function S(h){if(h===null||typeof h!="object")return null;var w=m&&h[m]||h[y];return typeof w=="function"?w:null}var v=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(h){{for(var w=arguments.length,E=new Array(w>1?w-1:0),k=1;k<w;k++)E[k-1]=arguments[k];C("error",h,E)}}function C(h,w,E){{var k=v.ReactDebugCurrentFrame,B=k.getStackAddendum();B!==""&&(w+="%s",E=E.concat([B]));var X=E.map(function(F){return String(F)});X.unshift("Warning: "+w),Function.prototype.apply.call(console[h],console,X)}}var A=!1,T=!1,M=!1,j=!1,P=!1,V;V=Symbol.for("react.module.reference");function _(h){return!!(typeof h=="string"||typeof h=="function"||h===r||h===o||P||h===s||h===c||h===u||j||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===V||h.getModuleId!==void 0))}function z(h,w,E){var k=h.displayName;if(k)return k;var B=w.displayName||w.name||"";return B!==""?E+"("+B+")":E}function $(h){return h.displayName||"Context"}function re(h){if(h==null)return null;if(typeof h.tag=="number"&&b("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 w=h;return $(w)+".Consumer";case i:var E=h;return $(E._context)+".Provider";case l:return z(h,h.render,"ForwardRef");case d:var k=h.displayName||null;return k!==null?k:re(h.type)||"Memo";case f:{var B=h,X=B._payload,F=B._init;try{return re(F(X))}catch{return null}}}return null}var de=Object.assign,ve=0,L,U,O,R,K,xe,te;function je(){}je.__reactDisabledLog=!0;function se(){{if(ve===0){L=console.log,U=console.info,O=console.warn,R=console.error,K=console.group,xe=console.groupCollapsed,te=console.groupEnd;var h={configurable:!0,enumerable:!0,value:je,writable:!0};Object.defineProperties(console,{info:h,log:h,warn:h,error:h,group:h,groupCollapsed:h,groupEnd:h})}ve++}}function Xe(){{if(ve--,ve===0){var h={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:de({},h,{value:L}),info:de({},h,{value:U}),warn:de({},h,{value:O}),error:de({},h,{value:R}),group:de({},h,{value:K}),groupCollapsed:de({},h,{value:xe}),groupEnd:de({},h,{value:te})})}ve<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ot=v.ReactCurrentDispatcher,Ct;function it(h,w,E){{if(Ct===void 0)try{throw Error()}catch(B){var k=B.stack.trim().match(/\n( *(at )?)/);Ct=k&&k[1]||""}return`
18
+ `+Ct+h}}var ns=!1,Dn;{var tg=typeof WeakMap=="function"?WeakMap:Map;Dn=new tg}function ll(h,w){if(!h||ns)return"";{var E=Dn.get(h);if(E!==void 0)return E}var k;ns=!0;var B=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var X;X=ot.current,ot.current=null,se();try{if(w){var F=function(){throw Error()};if(Object.defineProperty(F.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(F,[])}catch(fe){k=fe}Reflect.construct(h,[],F)}else{try{F.call()}catch(fe){k=fe}h.call(F.prototype)}}else{try{throw Error()}catch(fe){k=fe}h()}}catch(fe){if(fe&&k&&typeof fe.stack=="string"){for(var N=fe.stack.split(`
19
19
  `),le=k.stack.split(`
20
- `),J=V.length-1,Q=le.length-1;J>=1&&Q>=0&&V[J]!==le[Q];)Q--;for(;J>=1&&Q>=0;J--,Q--)if(V[J]!==le[Q]){if(J!==1||Q!==1)do if(J--,Q--,Q<0||V[J]!==le[Q]){var ge=`
21
- `+V[J].replace(" at new "," at ");return h.displayName&&ge.includes("<anonymous>")&&(ge=ge.replace("<anonymous>",h.displayName)),typeof h=="function"&&Dn.set(h,ge),ge}while(J>=1&&Q>=0);break}}}finally{ns=!1,ot.current=X,Ue(),Error.prepareStackTrace=B}var Tt=h?h.displayName||h.name:"",at=Tt?it(Tt):"";return typeof h=="function"&&Dn.set(h,at),at}function tg(h,w,P){return al(h,!1)}function ng(h){var w=h.prototype;return!!(w&&w.isReactComponent)}function On(h,w,P){if(h==null)return"";if(typeof h=="function")return al(h,ng(h));if(typeof h=="string")return it(h);switch(h){case c:return it("Suspense");case u:return it("SuspenseList")}if(typeof h=="object")switch(h.$$typeof){case l:return tg(h.render);case d:return On(h.type,w,P);case f:{var k=h,B=k._payload,X=k._init;try{return On(X(B),w,P)}catch{}}}return""}var en=Object.prototype.hasOwnProperty,ll={},cl=v.ReactDebugCurrentFrame;function kn(h){if(h){var w=h._owner,P=On(h.type,h._source,w?w.type:null);cl.setExtraStackFrame(P)}else cl.setExtraStackFrame(null)}function rg(h,w,P,k,B){{var X=Function.call.bind(en);for(var F in h)if(X(h,F)){var V=void 0;try{if(typeof h[F]!="function"){var le=Error((k||"React class")+": "+P+" type `"+F+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof h[F]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw le.name="Invariant Violation",le}V=h[F](w,F,k,P,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(J){V=J}V&&!(V instanceof Error)&&(kn(B),b("%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).",k||"React class",P,F,typeof V),kn(null)),V instanceof Error&&!(V.message in ll)&&(ll[V.message]=!0,kn(B),b("Failed %s type: %s",P,V.message),kn(null))}}}var sg=Array.isArray;function rs(h){return sg(h)}function og(h){{var w=typeof Symbol=="function"&&Symbol.toStringTag,P=w&&h[Symbol.toStringTag]||h.constructor.name||"Object";return P}}function ig(h){try{return ul(h),!1}catch{return!0}}function ul(h){return""+h}function dl(h){if(ig(h))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",og(h)),ul(h)}var fl=v.ReactCurrentOwner,ag={key:!0,ref:!0,__self:!0,__source:!0},hl,pl;function lg(h){if(en.call(h,"ref")){var w=Object.getOwnPropertyDescriptor(h,"ref").get;if(w&&w.isReactWarning)return!1}return h.ref!==void 0}function cg(h){if(en.call(h,"key")){var w=Object.getOwnPropertyDescriptor(h,"key").get;if(w&&w.isReactWarning)return!1}return h.key!==void 0}function ug(h,w){typeof h.ref=="string"&&fl.current}function dg(h,w){{var P=function(){hl||(hl=!0,b("%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)",w))};P.isReactWarning=!0,Object.defineProperty(h,"key",{get:P,configurable:!0})}}function fg(h,w){{var P=function(){pl||(pl=!0,b("%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)",w))};P.isReactWarning=!0,Object.defineProperty(h,"ref",{get:P,configurable:!0})}}var hg=function(h,w,P,k,B,X,F){var V={$$typeof:t,type:h,key:w,ref:P,props:F,_owner:X};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:k}),Object.defineProperty(V,"_source",{configurable:!1,enumerable:!1,writable:!1,value:B}),Object.freeze&&(Object.freeze(V.props),Object.freeze(V)),V};function pg(h,w,P,k,B){{var X,F={},V=null,le=null;P!==void 0&&(dl(P),V=""+P),cg(w)&&(dl(w.key),V=""+w.key),lg(w)&&(le=w.ref,ug(w,B));for(X in w)en.call(w,X)&&!ag.hasOwnProperty(X)&&(F[X]=w[X]);if(h&&h.defaultProps){var J=h.defaultProps;for(X in J)F[X]===void 0&&(F[X]=J[X])}if(V||le){var Q=typeof h=="function"?h.displayName||h.name||"Unknown":h;V&&dg(F,Q),le&&fg(F,Q)}return hg(h,V,le,B,k,fl.current,F)}}var ss=v.ReactCurrentOwner,ml=v.ReactDebugCurrentFrame;function wt(h){if(h){var w=h._owner,P=On(h.type,h._source,w?w.type:null);ml.setExtraStackFrame(P)}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=re(ss.current.type);if(h)return`
20
+ `),J=N.length-1,Q=le.length-1;J>=1&&Q>=0&&N[J]!==le[Q];)Q--;for(;J>=1&&Q>=0;J--,Q--)if(N[J]!==le[Q]){if(J!==1||Q!==1)do if(J--,Q--,Q<0||N[J]!==le[Q]){var ge=`
21
+ `+N[J].replace(" at new "," at ");return h.displayName&&ge.includes("<anonymous>")&&(ge=ge.replace("<anonymous>",h.displayName)),typeof h=="function"&&Dn.set(h,ge),ge}while(J>=1&&Q>=0);break}}}finally{ns=!1,ot.current=X,Xe(),Error.prepareStackTrace=B}var Tt=h?h.displayName||h.name:"",at=Tt?it(Tt):"";return typeof h=="function"&&Dn.set(h,at),at}function ng(h,w,E){return ll(h,!1)}function rg(h){var w=h.prototype;return!!(w&&w.isReactComponent)}function On(h,w,E){if(h==null)return"";if(typeof h=="function")return ll(h,rg(h));if(typeof h=="string")return it(h);switch(h){case c:return it("Suspense");case u:return it("SuspenseList")}if(typeof h=="object")switch(h.$$typeof){case l:return ng(h.render);case d:return On(h.type,w,E);case f:{var k=h,B=k._payload,X=k._init;try{return On(X(B),w,E)}catch{}}}return""}var tn=Object.prototype.hasOwnProperty,cl={},ul=v.ReactDebugCurrentFrame;function kn(h){if(h){var w=h._owner,E=On(h.type,h._source,w?w.type:null);ul.setExtraStackFrame(E)}else ul.setExtraStackFrame(null)}function sg(h,w,E,k,B){{var X=Function.call.bind(tn);for(var F in h)if(X(h,F)){var N=void 0;try{if(typeof h[F]!="function"){var le=Error((k||"React class")+": "+E+" type `"+F+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof h[F]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw le.name="Invariant Violation",le}N=h[F](w,F,k,E,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(J){N=J}N&&!(N instanceof Error)&&(kn(B),b("%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).",k||"React class",E,F,typeof N),kn(null)),N instanceof Error&&!(N.message in cl)&&(cl[N.message]=!0,kn(B),b("Failed %s type: %s",E,N.message),kn(null))}}}var og=Array.isArray;function rs(h){return og(h)}function ig(h){{var w=typeof Symbol=="function"&&Symbol.toStringTag,E=w&&h[Symbol.toStringTag]||h.constructor.name||"Object";return E}}function ag(h){try{return dl(h),!1}catch{return!0}}function dl(h){return""+h}function fl(h){if(ag(h))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ig(h)),dl(h)}var hl=v.ReactCurrentOwner,lg={key:!0,ref:!0,__self:!0,__source:!0},pl,ml;function cg(h){if(tn.call(h,"ref")){var w=Object.getOwnPropertyDescriptor(h,"ref").get;if(w&&w.isReactWarning)return!1}return h.ref!==void 0}function ug(h){if(tn.call(h,"key")){var w=Object.getOwnPropertyDescriptor(h,"key").get;if(w&&w.isReactWarning)return!1}return h.key!==void 0}function dg(h,w){typeof h.ref=="string"&&hl.current}function fg(h,w){{var E=function(){pl||(pl=!0,b("%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)",w))};E.isReactWarning=!0,Object.defineProperty(h,"key",{get:E,configurable:!0})}}function hg(h,w){{var E=function(){ml||(ml=!0,b("%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)",w))};E.isReactWarning=!0,Object.defineProperty(h,"ref",{get:E,configurable:!0})}}var pg=function(h,w,E,k,B,X,F){var N={$$typeof:t,type:h,key:w,ref:E,props:F,_owner:X};return N._store={},Object.defineProperty(N._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(N,"_self",{configurable:!1,enumerable:!1,writable:!1,value:k}),Object.defineProperty(N,"_source",{configurable:!1,enumerable:!1,writable:!1,value:B}),Object.freeze&&(Object.freeze(N.props),Object.freeze(N)),N};function mg(h,w,E,k,B){{var X,F={},N=null,le=null;E!==void 0&&(fl(E),N=""+E),ug(w)&&(fl(w.key),N=""+w.key),cg(w)&&(le=w.ref,dg(w,B));for(X in w)tn.call(w,X)&&!lg.hasOwnProperty(X)&&(F[X]=w[X]);if(h&&h.defaultProps){var J=h.defaultProps;for(X in J)F[X]===void 0&&(F[X]=J[X])}if(N||le){var Q=typeof h=="function"?h.displayName||h.name||"Unknown":h;N&&fg(F,Q),le&&hg(F,Q)}return pg(h,N,le,B,k,hl.current,F)}}var ss=v.ReactCurrentOwner,gl=v.ReactDebugCurrentFrame;function wt(h){if(h){var w=h._owner,E=On(h.type,h._source,w?w.type:null);gl.setExtraStackFrame(E)}else gl.setExtraStackFrame(null)}var os;os=!1;function is(h){return typeof h=="object"&&h!==null&&h.$$typeof===t}function yl(){{if(ss.current){var h=re(ss.current.type);if(h)return`
22
22
 
23
- Check the render method of \``+h+"`."}return""}}function mg(h){return""}var yl={};function gg(h){{var w=gl();if(!w){var P=typeof h=="string"?h:h.displayName||h.name;P&&(w=`
23
+ Check the render method of \``+h+"`."}return""}}function gg(h){return""}var vl={};function yg(h){{var w=yl();if(!w){var E=typeof h=="string"?h:h.displayName||h.name;E&&(w=`
24
24
 
25
- Check the top-level render call using <`+P+">.")}return w}}function vl(h,w){{if(!h._store||h._store.validated||h.key!=null)return;h._store.validated=!0;var P=gg(w);if(yl[P])return;yl[P]=!0;var k="";h&&h._owner&&h._owner!==ss.current&&(k=" It was passed a child from "+re(h._owner.type)+"."),wt(h),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',P,k),wt(null)}}function xl(h,w){{if(typeof h!="object")return;if(rs(h))for(var P=0;P<h.length;P++){var k=h[P];is(k)&&vl(k,w)}else if(is(h))h._store&&(h._store.validated=!0);else if(h){var B=S(h);if(typeof B=="function"&&B!==h.entries)for(var X=B.call(h),F;!(F=X.next()).done;)is(F.value)&&vl(F.value,w)}}}function yg(h){{var w=h.type;if(w==null||typeof w=="string")return;var P;if(typeof w=="function")P=w.propTypes;else if(typeof w=="object"&&(w.$$typeof===l||w.$$typeof===d))P=w.propTypes;else return;if(P){var k=re(w);rg(P,h.props,"prop",k,h)}else if(w.PropTypes!==void 0&&!os){os=!0;var B=re(w);b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",B||"Unknown")}typeof w.getDefaultProps=="function"&&!w.getDefaultProps.isReactClassApproved&&b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function vg(h){{for(var w=Object.keys(h.props),P=0;P<w.length;P++){var k=w[P];if(k!=="children"&&k!=="key"){wt(h),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",k),wt(null);break}}h.ref!==null&&(wt(h),b("Invalid attribute `ref` supplied to `React.Fragment`."),wt(null))}}var bl={};function Sl(h,w,P,k,B,X){{var F=_(h);if(!F){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 le=mg();le?V+=le:V+=gl();var J;h===null?J="null":rs(h)?J="array":h!==void 0&&h.$$typeof===t?(J="<"+(re(h.type)||"Unknown")+" />",V=" Did you accidentally export a JSX literal instead of a component?"):J=typeof h,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",J,V)}var Q=pg(h,w,P,B,X);if(Q==null)return Q;if(F){var ge=w.children;if(ge!==void 0)if(k)if(rs(ge)){for(var Tt=0;Tt<ge.length;Tt++)xl(ge[Tt],h);Object.freeze&&Object.freeze(ge)}else b("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(ge,h)}if(en.call(w,"key")){var at=re(h),de=Object.keys(w).filter(function(Tg){return Tg!=="key"}),as=de.length>0?"{key: someKey, "+de.join(": ..., ")+": ...}":"{key: someKey}";if(!bl[at+as]){var wg=de.length>0?"{"+de.join(": ..., ")+": ...}":"{}";b(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+E+">.")}return w}}function xl(h,w){{if(!h._store||h._store.validated||h.key!=null)return;h._store.validated=!0;var E=yg(w);if(vl[E])return;vl[E]=!0;var k="";h&&h._owner&&h._owner!==ss.current&&(k=" It was passed a child from "+re(h._owner.type)+"."),wt(h),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',E,k),wt(null)}}function bl(h,w){{if(typeof h!="object")return;if(rs(h))for(var E=0;E<h.length;E++){var k=h[E];is(k)&&xl(k,w)}else if(is(h))h._store&&(h._store.validated=!0);else if(h){var B=S(h);if(typeof B=="function"&&B!==h.entries)for(var X=B.call(h),F;!(F=X.next()).done;)is(F.value)&&xl(F.value,w)}}}function vg(h){{var w=h.type;if(w==null||typeof w=="string")return;var E;if(typeof w=="function")E=w.propTypes;else if(typeof w=="object"&&(w.$$typeof===l||w.$$typeof===d))E=w.propTypes;else return;if(E){var k=re(w);sg(E,h.props,"prop",k,h)}else if(w.PropTypes!==void 0&&!os){os=!0;var B=re(w);b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",B||"Unknown")}typeof w.getDefaultProps=="function"&&!w.getDefaultProps.isReactClassApproved&&b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function xg(h){{for(var w=Object.keys(h.props),E=0;E<w.length;E++){var k=w[E];if(k!=="children"&&k!=="key"){wt(h),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",k),wt(null);break}}h.ref!==null&&(wt(h),b("Invalid attribute `ref` supplied to `React.Fragment`."),wt(null))}}var Sl={};function Cl(h,w,E,k,B,X){{var F=_(h);if(!F){var N="";(h===void 0||typeof h=="object"&&h!==null&&Object.keys(h).length===0)&&(N+=" 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 le=gg();le?N+=le:N+=yl();var J;h===null?J="null":rs(h)?J="array":h!==void 0&&h.$$typeof===t?(J="<"+(re(h.type)||"Unknown")+" />",N=" Did you accidentally export a JSX literal instead of a component?"):J=typeof h,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",J,N)}var Q=mg(h,w,E,B,X);if(Q==null)return Q;if(F){var ge=w.children;if(ge!==void 0)if(k)if(rs(ge)){for(var Tt=0;Tt<ge.length;Tt++)bl(ge[Tt],h);Object.freeze&&Object.freeze(ge)}else b("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 bl(ge,h)}if(tn.call(w,"key")){var at=re(h),fe=Object.keys(w).filter(function(_g){return _g!=="key"}),as=fe.length>0?"{key: someKey, "+fe.join(": ..., ")+": ...}":"{key: someKey}";if(!Sl[at+as]){var Tg=fe.length>0?"{"+fe.join(": ..., ")+": ...}":"{}";b(`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} />`,as,at,wg,at),bl[at+as]=!0}}return h===r?vg(Q):yg(Q),Q}}function xg(h,w,P){return Sl(h,w,P,!0)}function bg(h,w,P){return Sl(h,w,P,!1)}var Sg=bg,Cg=xg;Pt.Fragment=r,Pt.jsx=Sg,Pt.jsxs=Cg}()),Pt}var ds;function _l(){return ds||(ds=1,process.env.NODE_ENV==="production"?tn.exports=wl():tn.exports=Tl()),tn.exports}var x=_l(),Xe=(e=>(e[e.CLUSTER=0]="CLUSTER",e[e.MARKER=1]="MARKER",e))(Xe||{});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},Pl=e=>e?fs(e):fs,El=e=>e;function Al(e,t=El){const n=g.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return g.useDebugValue(n),n}const hs={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"},Vn=new Map,nn=e=>{const t=Vn.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=Vn.get(n.name);if(r)return{type:"tracked",store:e,...r};const s={connection:t.connect(n),stores:{}};return Vn.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=(y,S,v)=>{const b=n(y,S);if(!f)return b;const C=v===void 0?{type:i||"anonymous"}:typeof v=="string"?{type:v}:v;return a===void 0?(u==null||u.send(C,r()),b):(u==null||u.send({...C,type:`${a}/${C.type}`},{...nn(l.name),[a]:s.getState()}),b)};const p=(...y)=>{const S=f;f=!1,n(...y),f=S},m=e(s.setState,r,s);if(d.type==="untracked"?u==null||u.init(m):(d.stores[d.store]=s,u==null||u.init(Object.fromEntries(Object.entries(d.stores).map(([y,S])=>[y,y===d.store?m:S.getState()])))),s.dispatchFromDevtools&&typeof s.dispatch=="function"){let y=!1;const S=s.dispatch;s.dispatch=(...v)=>{(hs?"production":void 0)!=="production"&&v[0].type==="__setState"&&!y&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),y=!0),S(...v)}}return u.subscribe(y=>{var S;switch(y.type){case"ACTION":if(typeof y.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Nn(y.payload,v=>{if(v.type==="__setState"){if(a===void 0){p(v.state);return}Object.keys(v.state).length!==1&&console.error(`
30
+ <%s key={someKey} {...props} />`,as,at,Tg,at),Sl[at+as]=!0}}return h===r?xg(Q):vg(Q),Q}}function bg(h,w,E){return Cl(h,w,E,!0)}function Sg(h,w,E){return Cl(h,w,E,!1)}var Cg=Sg,wg=bg;Et.Fragment=r,Et.jsx=Cg,Et.jsxs=wg}()),Et}var ds;function El(){return ds||(ds=1,process.env.NODE_ENV==="production"?nn.exports=Tl():nn.exports=_l()),nn.exports}var x=El(),We=(e=>(e[e.CLUSTER=0]="CLUSTER",e[e.MARKER=1]="MARKER",e))(We||{});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},Pl=e=>e?fs(e):fs,Al=e=>e;function Ml(e,t=Al){const n=g.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return g.useDebugValue(n),n}const hs={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"},Nn=new Map,rn=e=>{const t=Nn.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,r])=>[n,r.getState()])):{}},Ll=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const r=Nn.get(n.name);if(r)return{type:"tracked",store:e,...r};const s={connection:t.connect(n),stores:{}};return Nn.set(n.name,s),{type:"tracked",store:e,...s}},Dl=(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}=Ll(a,c,l);let f=!0;s.setState=(y,S,v)=>{const b=n(y,S);if(!f)return b;const C=v===void 0?{type:i||"anonymous"}:typeof v=="string"?{type:v}:v;return a===void 0?(u==null||u.send(C,r()),b):(u==null||u.send({...C,type:`${a}/${C.type}`},{...rn(l.name),[a]:s.getState()}),b)};const p=(...y)=>{const S=f;f=!1,n(...y),f=S},m=e(s.setState,r,s);if(d.type==="untracked"?u==null||u.init(m):(d.stores[d.store]=s,u==null||u.init(Object.fromEntries(Object.entries(d.stores).map(([y,S])=>[y,y===d.store?m:S.getState()])))),s.dispatchFromDevtools&&typeof s.dispatch=="function"){let y=!1;const S=s.dispatch;s.dispatch=(...v)=>{(hs?"production":void 0)!=="production"&&v[0].type==="__setState"&&!y&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),y=!0),S(...v)}}return u.subscribe(y=>{var S;switch(y.type){case"ACTION":if(typeof y.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Vn(y.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 b=v.state[a];if(b==null)return;JSON.stringify(s.getState())!==JSON.stringify(b)&&p(b);return}s.dispatchFromDevtools&&typeof s.dispatch=="function"&&s.dispatch(v)});case"DISPATCH":switch(y.payload.type){case"RESET":return p(m),a===void 0?u==null?void 0:u.init(s.getState()):u==null?void 0:u.init(nn(l.name));case"COMMIT":if(a===void 0){u==null||u.init(s.getState());return}return u==null?void 0:u.init(nn(l.name));case"ROLLBACK":return Nn(y.state,v=>{if(a===void 0){p(v),u==null||u.init(s.getState());return}p(v[a]),u==null||u.init(nn(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Nn(y.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}=y.payload,b=(S=v.computedStates.slice(-1)[0])==null?void 0:S.state;if(!b)return;p(a===void 0?b:b[a]),u==null||u.send(null,v);return}case"PAUSE_RECORDING":return f=!f}return}}),m},Nn=(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=()=>Pl()(Ll(e=>({mapId:void 0,locations:[],mapDetail:Xe.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","Map.areaSearchButton":"Cerca nell'area","Map.areaSearchVisualCue":"Posiziona la mappa e avvia la ricerca"}},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=g.createContext(null);function Ol({children:e}){const[t]=g.useState(Dl);return x.jsx(ps.Provider,{value:t,children:e})}function I(e){const t=g.useContext(ps);if(t===null)throw new Error("useLocatorStore must be used within LocatorStoreProvider");return Al(t,e)}var In={exports:{}};/*!
34
+ `);const b=v.state[a];if(b==null)return;JSON.stringify(s.getState())!==JSON.stringify(b)&&p(b);return}s.dispatchFromDevtools&&typeof s.dispatch=="function"&&s.dispatch(v)});case"DISPATCH":switch(y.payload.type){case"RESET":return p(m),a===void 0?u==null?void 0:u.init(s.getState()):u==null?void 0:u.init(rn(l.name));case"COMMIT":if(a===void 0){u==null||u.init(s.getState());return}return u==null?void 0:u.init(rn(l.name));case"ROLLBACK":return Vn(y.state,v=>{if(a===void 0){p(v),u==null||u.init(s.getState());return}p(v[a]),u==null||u.init(rn(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Vn(y.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}=y.payload,b=(S=v.computedStates.slice(-1)[0])==null?void 0:S.state;if(!b)return;p(a===void 0?b:b[a]),u==null||u.send(null,v);return}case"PAUSE_RECORDING":return f=!f}return}}),m},Vn=(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)},Ol=()=>Pl()(Dl(e=>({mapId:void 0,locations:[],mapDetail:We.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","Map.areaSearchButton":"Cerca nell'area","Map.areaSearchTooltip":"Posiziona la mappa e avvia la ricerca","Map.areaSearchVisualCueCTA":"Esegui ricerca"}},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=g.createContext(null);function kl({children:e}){const[t]=g.useState(Ol);return x.jsx(ps.Provider,{value:t,children:e})}function I(e){const t=g.useContext(ps);if(t===null)throw new Error("useLocatorStore must be used within LocatorStoreProvider");return Ml(t,e)}var In={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 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})()}(In)),In.exports}var jl=kl();const q=ls(jl),gs={root:"_root_q2czu_7",loaderContainer:"_loaderContainer_q2czu_121"},ys={root:"_root_17v7m_1",spinner:"_spinner_17v7m_25"};function Et({className:e,size:t="medium",color:n="primary",...r}){const s=q(ys.root,e);return x.jsx("div",{className:s,"data-size":t,"data-color":n,...r,children:x.jsx("div",{className:ys.spinner})})}const Vl=g.lazy(()=>Promise.resolve().then(()=>qm)),Nl=g.lazy(()=>Promise.resolve().then(()=>Zm)),Il=g.lazy(()=>Promise.resolve().then(()=>Qm));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=x.jsx("div",{className:gs.loaderContainer,children:x.jsx(Et,{size:"large",color:"primary"})});return x.jsx(g.Suspense,{fallback:o,children:(()=>{switch(n){case"mapbox":return x.jsx(Nl,{apiKey:r,...s??{},children:e});case"here":return x.jsx(Il,{apiKey:r,...s??{},children:e});case"google":return x.jsx(Vl,{apiKey:r,...s??{},children:e});default:return null}})()})}const Fl={container:"_container_17c19_4"},At={root:"_root_3405i_4",header:"_header_3405i_14",icon:"_icon_3405i_25",body:"_body_3405i_47",content:"_content_3405i_50"};/**
38
+ */var ms;function jl(){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})()}(In)),In.exports}var Nl=jl();const H=ls(Nl),gs={root:"_root_q2czu_7",loaderContainer:"_loaderContainer_q2czu_121"},ys={root:"_root_17v7m_1",spinner:"_spinner_17v7m_25"};function Pt({className:e,size:t="medium",color:n="primary",...r}){const s=H(ys.root,e);return x.jsx("div",{className:s,"data-size":t,"data-color":n,...r,children:x.jsx("div",{className:ys.spinner})})}const Vl=g.lazy(()=>Promise.resolve().then(()=>Ym)),Il=g.lazy(()=>Promise.resolve().then(()=>Jm)),Rl=g.lazy(()=>Promise.resolve().then(()=>eg));function Fl({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=x.jsx("div",{className:gs.loaderContainer,children:x.jsx(Pt,{size:"large",color:"primary"})});return x.jsx(g.Suspense,{fallback:o,children:(()=>{switch(n){case"mapbox":return x.jsx(Il,{apiKey:r,...s??{},children:e});case"here":return x.jsx(Rl,{apiKey:r,...s??{},children:e});case"google":return x.jsx(Vl,{apiKey:r,...s??{},children:e});default:return null}})()})}const Bl={container:"_container_17c19_4"},At={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 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();/**
43
+ */const $l=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 $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"};/**
48
+ */var zl={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 zl=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:i,...a},l)=>g.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])=>g.createElement(c,u)),...Array.isArray(o)?o:[o]]));/**
53
+ */const Ul=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:i,...a},l)=>g.createElement("svg",{ref:l,...zl,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:vs("lucide",s),...a},[...i.map(([c,u])=>g.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 fe=(e,t)=>{const n=g.forwardRef(({className:r,...s},o)=>g.createElement(zl,{ref:o,iconNode:t,className:vs(`lucide-${Bl(e)}`,r),...s}));return n.displayName=`${e}`,n};/**
58
+ */const ce=(e,t)=>{const n=g.forwardRef(({className:r,...s},o)=>g.createElement(Ul,{ref:o,iconNode:t,className:vs(`lucide-${$l(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 Ul=fe("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
63
+ */const Xl=ce("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 Xl=fe("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
68
+ */const Wl=ce("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
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 Wl=fe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
73
+ */const Kl=ce("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
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 Kl=fe("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
78
+ */const Gl=ce("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
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 Gl=fe("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"}]]);/**
83
+ */const ql=ce("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
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 Hl=fe("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"}]]);/**
88
+ */const Hl=ce("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"}]]);/**
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 ql=fe("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"}]]);/**
93
+ */const Yl=ce("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"}]]);/**
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 Yl=fe("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"}]]);/**
98
+ */const Zl=ce("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"}]]);/**
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 Zl=fe("ScanSearch",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m16 16-1.9-1.9",key:"1dq9hf"}]]);/**
103
+ */const Jl=ce("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"}]]);/**
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 Jl=fe("Scan",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]]);/**
108
+ */const Ql=ce("ScanSearch",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m16 16-1.9-1.9",key:"1dq9hf"}]]);/**
109
109
  * @license lucide-react v0.483.0 - ISC
110
110
  *
111
111
  * This source code is licensed under the ISC license.
112
112
  * See the LICENSE file in the root directory of this source tree.
113
- */const Ql=fe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
113
+ */const ec=ce("Scan",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]]);/**
114
114
  * @license lucide-react v0.483.0 - ISC
115
115
  *
116
116
  * This source code is licensed under the ISC license.
117
117
  * See the LICENSE file in the root directory of this source tree.
118
- */const ec=fe("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"}]]);/**
118
+ */const tc=ce("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
119
119
  * @license lucide-react v0.483.0 - ISC
120
120
  *
121
121
  * This source code is licensed under the ISC license.
122
122
  * See the LICENSE file in the root directory of this source tree.
123
- */const tc=fe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),xs=g.createContext({});function nc(e){const t=g.useRef(null);return t.current===null&&(t.current=e()),t.current}const Rn=typeof window<"u",rc=Rn?g.useLayoutEffect:g.useEffect,Fn=g.createContext(null),bs=g.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function sc(e=!0){const t=g.useContext(Fn);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,o=g.useId();g.useEffect(()=>{if(e)return s(o)},[e]);const i=g.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,i]:[!0]}function Bn(e,t){e.indexOf(t)===-1&&e.push(t)}function $n(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ce=e=>e;let lt=ce,je=ce;process.env.NODE_ENV!=="production"&&(lt=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},je=(e,t)=>{if(!e)throw new Error(t)});const oc={useManualTiming:!1};function zn(e){let t;return()=>(t===void 0&&(t=e()),t)}const ct=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Un{constructor(){this.subscriptions=[]}add(t){return Bn(this.subscriptions,t),()=>$n(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 Se=e=>e*1e3,_e=e=>e/1e3;function Ss(e,t){return t?e*(1e3/t):0}const Cs=new Set;function rn(e,t,n){e||Cs.has(t)||(console.warn(t),Cs.add(t))}const ic=zn(()=>window.ScrollTimeline!==void 0);class ac{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(ic()&&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 lc extends ac{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function Xn(e,t){return e?e[t]||e.default||e:void 0}const Wn=2e4;function ws(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Wn;)t+=n,r=e.next(t);return t>=Wn?1/0:t}function Kn(e){return typeof e=="function"}function Ts(e,t){e.timeline=t,e.onfinish=null}const Gn=e=>Array.isArray(e)&&typeof e[0]=="number",cc={linearEasing:void 0};function uc(e,t){const n=zn(e);return()=>{var r;return(r=cc[t])!==null&&r!==void 0?r:n()}}const sn=uc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),_s=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)r+=e(ct(0,s-1,o))+", ";return`linear(${r.substring(0,r.length-2)})`};function Ps(e){return!!(typeof e=="function"&&sn()||!e||typeof e=="string"&&(e in Hn||sn())||Gn(e)||Array.isArray(e)&&e.every(Ps))}const Mt=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Hn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Mt([0,.65,.55,1]),circOut:Mt([.55,0,1,.45]),backIn:Mt([.31,.01,.66,-.59]),backOut:Mt([.33,1.53,.69,.99])};function Es(e,t){if(e)return typeof e=="function"&&sn()?_s(e,t):Gn(e)?Mt(e):Array.isArray(e)?e.map(n=>Es(n,t)||Hn.easeOut):Hn[e]}const on=["read","resolveKeyframes","update","preRender","render","postRender"],As={value:null};function dc(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 y=p&&s?n:r;return f&&i.add(d),y.has(d)||y.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 fc=40;function Ms(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,i=on.reduce((v,b)=>(v[b]=dc(o,t?b: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,fc),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))},m=()=>{n=!0,r=!0,s.isProcessing||e(p)};return{schedule:on.reduce((v,b)=>{const C=i[b];return v[b]=(A,T=!1,M=!1)=>(n||m(),C.schedule(A,T,M)),v},{}),cancel:v=>{for(let b=0;b<on.length;b++)i[on[b]].cancel(v)},state:s,steps:i}}const{schedule:W,cancel:Ve,state:ne,steps:qn}=Ms(typeof requestAnimationFrame<"u"?requestAnimationFrame:ce,!0),{schedule:Yn}=Ms(queueMicrotask,!1);let an;function hc(){an=void 0}const Ce={now:()=>(an===void 0&&Ce.set(ne.isProcessing||oc.useManualTiming?ne.timestamp:performance.now()),an),set:e=>{an=e,queueMicrotask(hc)}},ye={x:!1,y:!1};function Ls(){return ye.x||ye.y}function pc(e){return e==="x"||e==="y"?ye[e]?null:(ye[e]=!0,()=>{ye[e]=!1}):ye.x||ye.y?null:(ye.x=ye.y=!0,()=>{ye.x=ye.y=!1})}function mc(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=mc(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 gc(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,Zn=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,yc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function vc(e){return yc.has(e.tagName)||e.tabIndex!==-1}const Lt=new WeakSet;function Vs(e){return t=>{t.key==="Enter"&&e(t)}}function Jn(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const xc=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Vs(()=>{if(Lt.has(n))return;Jn(n,"down");const s=Vs(()=>{Jn(n,"up")}),o=()=>Jn(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 Zn(e)&&!Ls()}function bc(e,t,n={}){const[r,s,o]=Ds(e,n),i=a=>{const l=a.currentTarget;if(!l||!Ns(a)||Lt.has(l))return;Lt.add(l),ks(a,"set");const c=t(l,a),u=(p,m)=>{l.removeEventListener("pointerup",d),l.removeEventListener("pointercancel",f),ks(p,"release"),!(!Ns(p)||!Lt.has(l))&&(Lt.delete(l),typeof c=="function"&&c(p,{success:m}))},d=p=>{(p.isTrusted?Sc(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,!vc(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0)),a.addEventListener("pointerdown",i,s),l&&a.addEventListener("focus",c=>xc(c,s),s)}),o}function Sc(e,t){return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}const Is=30,Cc=e=>!isNaN(parseFloat(e));class wc{constructor(t,n={}){this.version="12.5.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,s=!0)=>{const o=Ce.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=Ce.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Cc(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&rn(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Un);const r=this.events[t].add(n);return t==="change"?()=>{r(),W.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=Ce.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 Dt(e,t){return new wc(e,t)}const Rs=g.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"]},ut={};for(const e in Fs)ut[e]={isEnabled:t=>Fs[e].some(n=>!!t[n])};function Tc(e){for(const t in e)ut[t]={...ut[t],...e[t]}}const _c=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function ln(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||_c.has(e)}let Bs=e=>!ln(e);function Pc(e){e&&(Bs=t=>t.startsWith("on")?!ln(t):e(t))}try{Pc(require("@emotion/is-prop-valid").default)}catch{}function Ec(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(Bs(s)||n===!0&&ln(s)||!t&&!ln(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}function Ac(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&rn(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,s)=>s==="create"?e:(t.has(s)||t.set(s,e(s)),t.get(s))})}const cn=g.createContext({});function un(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ot(e){return typeof e=="string"||Array.isArray(e)}const Qn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],er=["initial",...Qn];function dn(e){return un(e.animate)||er.some(t=>Ot(e[t]))}function $s(e){return!!(dn(e)||e.variants)}function Mc(e,t){if(dn(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ot(n)?n:void 0,animate:Ot(r)?r:void 0}}return e.inherit!==!1?t:{}}function Lc(e){const{initial:t,animate:n}=Mc(e,g.useContext(cn));return g.useMemo(()=>({initial:t,animate:n}),[zs(t),zs(n)])}function zs(e){return Array.isArray(e)?e.join(" "):e}const Dc=Symbol.for("motionComponentSymbol");function dt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Oc(e,t,n){return g.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):dt(n)&&(n.current=r))},[t])}const tr=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Us="data-"+tr("framerAppearId"),Xs=g.createContext({});function kc(e,t,n,r,s){var o,i;const{visualElement:a}=g.useContext(cn),l=g.useContext(Rs),c=g.useContext(Fn),u=g.useContext(bs).reducedMotion,d=g.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const f=d.current,p=g.useContext(Xs);f&&!f.projection&&s&&(f.type==="html"||f.type==="svg")&&jc(d.current,n,s,p);const m=g.useRef(!1);g.useInsertionEffect(()=>{f&&m.current&&f.update(n,c)});const y=n[Us],S=g.useRef(!!y&&!(!((o=window.MotionHandoffIsComplete)===null||o===void 0)&&o.call(window,y))&&((i=window.MotionHasOptimisedAnimation)===null||i===void 0?void 0:i.call(window,y)));return rc(()=>{f&&(m.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Yn.render(f.render),S.current&&f.animationState&&f.animationState.animateChanges())}),g.useEffect(()=>{f&&(!S.current&&f.animationState&&f.animationState.animateChanges(),S.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,y)}),S.current=!1))}),f}function jc(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&&dt(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 Vc({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:s}){var o,i;e&&Tc(e);function a(c,u){let d;const f={...g.useContext(bs),...c,layoutId:Nc(c)},{isStatic:p}=f,m=Lc(c),y=r(c,p);if(!p&&Rn){Ic(f,e);const S=Rc(f);d=S.MeasureLayout,m.visualElement=kc(s,y,f,t,S.ProjectionNode)}return x.jsxs(cn.Provider,{value:m,children:[d&&m.visualElement?x.jsx(d,{visualElement:m.visualElement,...f}):null,n(s,c,Oc(y,m.visualElement,u),y,p,m.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=g.forwardRef(a);return l[Dc]=s,l}function Nc({layoutId:e}){const t=g.useContext(xs).id;return t&&e!==void 0?t+"-"+e:e}function Ic(e,t){const n=g.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?lt(!1,r):je(!1,r)}}function Rc(e){const{drag:t,layout:n}=ut;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Ks=e=>t=>typeof t=="string"&&t.startsWith(e),nr=Ks("--"),Fc=Ks("var(--"),rr=e=>Fc(e)?Bc.test(e.split("/*")[0].trim()):!1,Bc=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,kt={};function $c(e){for(const t in e)kt[t]=e[t],nr(t)&&(kt[t].isCSSVariable=!0)}const ft=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],We=new Set(ft);function Gs(e,{layout:t,layoutId:n}){return We.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!kt[e]||e==="opacity")}const oe=e=>!!(e&&e.getVelocity),Hs=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Pe=(e,t,n)=>n>t?t:n<e?e:n,ht={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},jt={...ht,transform:e=>Pe(0,1,e)},fn={...ht,default:1},Vt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ne=Vt("deg"),we=Vt("%"),D=Vt("px"),zc=Vt("vh"),Uc=Vt("vw"),qs={...we,parse:e=>we.parse(e)/100,transform:e=>we.transform(e*100)},Xc={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},Wc={rotate:Ne,rotateX:Ne,rotateY:Ne,rotateZ:Ne,scale:fn,scaleX:fn,scaleY:fn,scaleZ:fn,skew:Ne,skewX:Ne,skewY:Ne,distance:D,translateX:D,translateY:D,translateZ:D,x:D,y:D,z:D,perspective:D,transformPerspective:D,opacity:jt,originX:qs,originY:qs,originZ:D},Ys={...ht,transform:Math.round},sr={...Xc,...Wc,zIndex:Ys,size:D,fillOpacity:jt,strokeOpacity:jt,numOctaves:Ys},Kc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Gc=ft.length;function Hc(e,t,n){let r="",s=!0;for(let o=0;o<Gc;o++){const i=ft[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,sr[i]);if(!l){s=!1;const u=Kc[i]||i;r+=`${u}(${c}) `}n&&(t[i]=c)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function or(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(We.has(l)){i=!0;continue}else if(nr(l)){s[l]=c;continue}else{const u=Hs(c,sr[l]);l.startsWith("origin")?(a=!0,o[l]=u):r[l]=u}}if(t.transform||(i||n?r.transform=Hc(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 ir=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Zs(e,t,n){for(const r in t)!oe(t[r])&&!Gs(r,n)&&(e[r]=t[r])}function qc({transformTemplate:e},t){return g.useMemo(()=>{const n=ir();return or(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Yc(e,t){const n=e.style||{},r={};return Zs(r,n,e),Object.assign(r,qc(e,t)),r}function Zc(e,t){const n={},r=Yc(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 Jc=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function ar(e){return typeof e!="string"||e.includes("-")?!1:!!(Jc.indexOf(e)>-1||/[A-Z]/u.test(e))}const Qc={offset:"stroke-dashoffset",array:"stroke-dasharray"},eu={offset:"strokeDashoffset",array:"strokeDasharray"};function tu(e,t,n=1,r=0,s=!0){e.pathLength=1;const o=s?Qc:eu;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 nu(e,t,n){const r=Js(t,e.x,e.width),s=Js(n,e.y,e.height);return`${r} ${s}`}function lr(e,{attrX:t,attrY:n,attrScale:r,originX:s,originY:o,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(or(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:m}=e;f.transform&&(m&&(p.transform=f.transform),delete f.transform),m&&(s!==void 0||o!==void 0||p.transform)&&(p.transformOrigin=nu(m,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&&tu(f,i,a,l,!1)}const Qs=()=>({...ir(),attrs:{}}),cr=e=>typeof e=="string"&&e.toLowerCase()==="svg";function ru(e,t,n,r){const s=g.useMemo(()=>{const o=Qs();return lr(o,t,cr(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 su(e=!1){return(n,r,s,{latestValues:o},i)=>{const l=(ar(n)?ru:Zc)(r,o,i,n),c=Ec(r,typeof n=="string",e),u=n!==g.Fragment?{...c,...l,ref:s}:{},{children:d}=r,f=g.useMemo(()=>oe(d)?d.get():d,[d]);return g.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 ur(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 dr=e=>Array.isArray(e),ou=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),iu=e=>dr(e)?e[e.length-1]||0:e;function hn(e){const t=oe(e)?e.get():e;return ou(t)?t.toValue():t}function au({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,s,o){const i={latestValues:lu(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=g.useContext(cn),s=g.useContext(Fn),o=()=>au(e,t,r,s);return n?o():nc(o)};function lu(e,t,n,r){const s={},o=r(e,{});for(const f in o)s[f]=hn(o[f]);let{initial:i,animate:a}=e;const l=dn(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"&&!un(d)){const f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){const m=ur(e,f[p]);if(m){const{transitionEnd:y,transition:S,...v}=m;for(const b in v){let C=v[b];if(Array.isArray(C)){const A=u?C.length-1:0;C=C[A]}C!==null&&(s[b]=C)}for(const b in y)s[b]=y[b]}}}return s}function fr(e,t,n){var r;const{style:s}=e,o={};for(const i in s)(oe(s[i])||t.style&&oe(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 cu={useVisualState:to({scrapeMotionValuesFromProps:fr,createRenderState:ir})};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:tr(s),t.attrs[s])}function io(e,t,n){const r=fr(e,t,n);for(const s in e)if(oe(e[s])||oe(t[s])){const o=ft.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"],uu={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(We.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&&W.read(()=>{no(n,r),W.render(()=>{lr(r,s,cr(n.tagName),e.transformTemplate),oo(n,r)})})}})};function du(e,t){return function(r,{forwardMotionProps:s}={forwardMotionProps:!1}){const i={...ar(r)?uu:cu,preloadedFeatures:e,useRender:su(s),createVisualElement:t,Component:r};return Vc(i)}}function Nt(e,t,n){const r=e.getProps();return ur(r,t,n!==void 0?n:r.custom,e)}const lo=new Set(["width","height","top","left","right","bottom",...ft]);function fu(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Dt(n))}function hu(e,t){const n=Nt(e,t);let{transitionEnd:r={},transition:s={},...o}=n||{};o={...o,...r};for(const i in o){const a=iu(o[i]);fu(e,i,a)}}function pu(e){return!!(oe(e)&&e.add)}function hr(e,t){const n=e.getValue("willChange");if(pu(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,mu=1e-7,gu=12;function yu(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)>mu&&++a<gu);return i}function It(e,t,n,r){if(e===t&&n===r)return ce;const s=o=>yu(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=It(.33,1.53,.69,.99),pr=ho(po),mo=fo(pr),go=e=>(e*=2)<1?.5*pr(e):.5*(2-Math.pow(2,-10*(e-1))),mr=e=>1-Math.sin(Math.acos(e)),yo=ho(mr),vo=fo(mr),xo=e=>/^0[^.\s]+$/u.test(e);function vu(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||xo(e):!0}const Rt=e=>Math.round(e*1e5)/1e5,gr=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function xu(e){return e==null}const bu=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,yr=(e,t)=>n=>!!(typeof n=="string"&&bu.test(n)&&n.startsWith(e)||t&&!xu(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(gr);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},Su=e=>Pe(0,255,e),vr={...ht,transform:e=>Math.round(Su(e))},Ke={test:yr("rgb","red"),parse:bo("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+vr.transform(e)+", "+vr.transform(t)+", "+vr.transform(n)+", "+Rt(jt.transform(r))+")"};function Cu(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 xr={test:yr("#"),parse:Cu,transform:Ke.transform},pt={test:yr("hsl","hue"),parse:bo("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+we.transform(Rt(t))+", "+we.transform(Rt(n))+", "+Rt(jt.transform(r))+")"},ie={test:e=>Ke.test(e)||xr.test(e)||pt.test(e),parse:e=>Ke.test(e)?Ke.parse(e):pt.test(e)?pt.parse(e):xr.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ke.transform(e):pt.transform(e)},wu=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Tu(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(gr))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(wu))===null||n===void 0?void 0:n.length)||0)>0}const So="number",Co="color",_u="var",Pu="var(",wo="${}",Eu=/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 Ft(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let o=0;const a=t.replace(Eu,l=>(ie.test(l)?(r.color.push(o),s.push(Co),n.push(ie.parse(l))):l.startsWith(Pu)?(r.var.push(o),s.push(_u),n.push(l)):(r.number.push(o),s.push(So),n.push(parseFloat(l))),++o,wo)).split(wo);return{values:n,split:a,indexes:r,types:s}}function To(e){return Ft(e).values}function _o(e){const{split:t,types:n}=Ft(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+=Rt(s[i]):a===Co?o+=ie.transform(s[i]):o+=s[i]}return o}}const Au=e=>typeof e=="number"?0:e;function Mu(e){const t=To(e);return _o(e)(t.map(Au))}const Ie={test:Tu,parse:To,createTransformer:_o,getAnimatableNone:Mu},Lu=new Set(["brightness","contrast","saturate","opacity"]);function Du(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(gr)||[];if(!r)return e;const s=n.replace(r,"");let o=Lu.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+s+")"}const Ou=/\b([a-z-]*)\(.*?\)/gu,br={...Ie,getAnimatableNone:e=>{const t=e.match(Ou);return t?t.map(Du).join(" "):e}},ku={...sr,color:ie,backgroundColor:ie,outlineColor:ie,fill:ie,stroke:ie,borderColor:ie,borderTopColor:ie,borderRightColor:ie,borderBottomColor:ie,borderLeftColor:ie,filter:br,WebkitFilter:br},Po=e=>ku[e];function Eo(e,t){let n=Po(e);return n!==br&&(n=Ie),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const ju=new Set(["auto","none","0"]);function Vu(e,t,n){let r=0,s;for(;r<e.length&&!s;){const o=e[r];typeof o=="string"&&!ju.has(o)&&Ft(o).values.length&&(s=e[r]),r++}if(s&&n)for(const o of t)e[o]=Eo(n,s)}const Ge=e=>e*180/Math.PI,Sr=e=>{const t=Ge(Math.atan2(e[1],e[0]));return Cr(t)},Nu={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Sr,rotateZ:Sr,skewX:e=>Ge(Math.atan(e[1])),skewY:e=>Ge(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Cr=e=>(e=e%360,e<0&&(e+=360),e),Ao=Sr,Mo=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Lo=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Iu={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=>Cr(Ge(Math.atan2(e[6],e[5]))),rotateY:e=>Cr(Ge(Math.atan2(-e[2],e[0]))),rotateZ:Ao,rotate:Ao,skewX:e=>Ge(Math.atan(e[4])),skewY:e=>Ge(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 wr(e,t){if(!e||e==="none")return Do(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=Iu,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Nu,s=a}if(!s)return Do(t);const o=r[t],i=s[1].split(",").map(Fu);return typeof o=="function"?o(i):i[o]}const Ru=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return wr(n,t)};function Fu(e){return parseFloat(e.trim())}const Oo=e=>e===ht||e===D,Bu=new Set(["x","y","z"]),$u=ft.filter(e=>!Bu.has(e));function zu(e){const t=[];return $u.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const mt={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>wr(t,"x"),y:(e,{transform:t})=>wr(t,"y")};mt.translateX=mt.x,mt.translateY=mt.y;const He=new Set;let Tr=!1,_r=!1;function ko(){if(_r){const e=Array.from(He).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=zu(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)})}_r=!1,Tr=!1,He.forEach(e=>e.complete()),He.clear()}function jo(){He.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(_r=!0)})}function Uu(){jo(),ko()}class Pr{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?(He.add(this),Tr||(Tr=!0,W.read(jo),W.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),He.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,He.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Vo=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Xu=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Wu(e){const t=Xu.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}const Ku=4;function No(e,t,n=1){je(n<=Ku,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,s]=Wu(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const i=o.trim();return Vo(i)?parseFloat(i):i}return rr(s)?No(s,t,n+1):s}const Io=e=>t=>t.test(e),Ro=[ht,D,we,Ne,Uc,zc,{test:e=>e==="auto",parse:e=>e}],Fo=e=>Ro.find(Io(e));class Bo extends Pr{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(),rr(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++)vu(t[s])&&r.push(s);r.length&&Vu(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=mt[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const 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]=mt[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const $o=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ie.test(e)||e==="0")&&!e.startsWith("url("));function Gu(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 Hu(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 lt(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:Gu(e)||(n==="spring"||Kn(n))&&r}const qu=e=>e!==null;function pn(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(qu),o=t&&n!=="loop"&&t%2===1?0:s.length-1;return!o||r===void 0?s[o]:r}const Yu=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=Ce.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>Yu?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Uu(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Ce.now(),this.hasAttemptedResolve=!0;const{name:r,type:s,velocity:o,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!Hu(t,r,s,o))if(i)this.options.duration=0;else{l&&l(pn(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const G=(e,t,n)=>e+(t-e)*n;function Er(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Zu({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=Er(l,a,e+1/3),o=Er(l,a,e),i=Er(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(i*255),alpha:r}}function mn(e,t){return n=>n>0?t:e}const Ar=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},Ju=[xr,Ke,pt],Qu=e=>Ju.find(t=>t.test(e));function Uo(e){const t=Qu(e);if(lt(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===pt&&(n=Zu(n)),n}const Xo=(e,t)=>{const n=Uo(e),r=Uo(t);if(!n||!r)return mn(e,t);const s={...n};return o=>(s.red=Ar(n.red,r.red,o),s.green=Ar(n.green,r.green,o),s.blue=Ar(n.blue,r.blue,o),s.alpha=G(n.alpha,r.alpha,o),Ke.transform(s))},ed=(e,t)=>n=>t(e(n)),Bt=(...e)=>e.reduce(ed),Mr=new Set(["none","hidden"]);function td(e,t){return Mr.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function nd(e,t){return n=>G(e,t,n)}function Lr(e){return typeof e=="number"?nd:typeof e=="string"?rr(e)?mn:ie.test(e)?Xo:od:Array.isArray(e)?Wo:typeof e=="object"?ie.test(e)?Xo:rd:mn}function Wo(e,t){const n=[...e],r=n.length,s=e.map((o,i)=>Lr(o)(o,t[i]));return o=>{for(let i=0;i<r;i++)n[i]=s[i](o);return n}}function rd(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=Lr(e[s])(e[s],t[s]));return s=>{for(const o in r)n[o]=r[o](s);return n}}function sd(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 od=(e,t)=>{const n=Ie.createTransformer(t),r=Ft(e),s=Ft(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?Mr.has(e)&&!s.values.length||Mr.has(t)&&!r.values.length?td(e,t):Bt(Wo(sd(r,s),s.values),n):(lt(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),mn(e,t))};function Ko(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?G(e,t,n):Lr(e)(e,t)}const id=5;function Go(e,t,n){const r=Math.max(t-id,0);return Ss(n-e(r),t-r)}const H={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 ad({duration:e=H.duration,bounce:t=H.bounce,velocity:n=H.velocity,mass:r=H.mass}){let s,o;lt(e<=Se(H.maxDuration),"Spring duration must be 10 seconds or less");let i=1-t;i=Pe(H.minDamping,H.maxDamping,i),e=Pe(H.minDuration,H.maxDuration,_e(e)),i<1?(s=c=>{const u=c*i,d=u*e,f=u-n,p=Dr(c,i),m=Math.exp(-d);return Ho-f/p*m},o=c=>{const d=c*i*e,f=d*n+n,p=Math.pow(i,2)*Math.pow(c,2)*e,m=Math.exp(-d),y=Dr(Math.pow(c,2),i);return(-s(c)+Ho>0?-1:1)*((f-p)*m)/y}):(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=cd(s,o,a);if(e=Se(e),isNaN(l))return{stiffness:H.stiffness,damping:H.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const ld=12;function cd(e,t,n){let r=n;for(let s=1;s<ld;s++)r=r-e(r)/t(r);return r}function Dr(e,t){return e*Math.sqrt(1-t*t)}const ud=["duration","bounce"],dd=["stiffness","damping","mass"];function qo(e,t){return t.some(n=>e[n]!==void 0)}function fd(e){let t={velocity:H.velocity,stiffness:H.stiffness,damping:H.damping,mass:H.mass,isResolvedFromDuration:!1,...e};if(!qo(e,dd)&&qo(e,ud))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,o=2*Pe(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:H.mass,stiffness:s,damping:o}}else{const n=ad(e);t={...t,...n,mass:H.mass},t.isResolvedFromDuration=!0}return t}function Yo(e=H.visualDuration,t=H.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}=fd({...n,velocity:-_e(n.velocity||0)}),m=f||0,y=c/(2*Math.sqrt(l*u)),S=i-o,v=_e(Math.sqrt(l/u)),b=Math.abs(S)<5;r||(r=b?H.restSpeed.granular:H.restSpeed.default),s||(s=b?H.restDelta.granular:H.restDelta.default);let C;if(y<1){const T=Dr(v,y);C=M=>{const j=Math.exp(-y*v*M);return i-j*((m+y*v*S)/T*Math.sin(T*M)+S*Math.cos(T*M))}}else if(y===1)C=T=>i-Math.exp(-v*T)*(S+(m+v*S)*T);else{const T=v*Math.sqrt(y*y-1);C=M=>{const j=Math.exp(-y*v*M),E=Math.min(T*M,300);return i-j*((m+y*v*S)*Math.sinh(E)+T*S*Math.cosh(E))/T}}const A={calculatedDuration:p&&d||null,next:T=>{const M=C(T);if(p)a.done=T>=d;else{let j=0;y<1&&(j=T===0?Se(m):Go(C,T,M));const E=Math.abs(j)<=r,N=Math.abs(i-M)<=s;a.done=E&&N}return a.value=a.done?i:M,a},toString:()=>{const T=Math.min(ws(A),Wn),M=_s(j=>A.next(T*j).value,T,30);return T+"ms "+M}};return A}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=E=>a!==void 0&&E<a||l!==void 0&&E>l,m=E=>a===void 0?l:l===void 0||Math.abs(a-E)<Math.abs(l-E)?a:l;let y=n*t;const S=d+y,v=i===void 0?S:i(S);v!==S&&(y=v-d);const b=E=>-y*Math.exp(-E/r),C=E=>v+b(E),A=E=>{const N=b(E),_=C(E);f.done=Math.abs(N)<=c,f.value=f.done?v:_};let T,M;const j=E=>{p(f.value)&&(T=E,M=Yo({keyframes:[f.value,m(f.value)],velocity:Go(C,E,f.value),damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return j(0),{calculatedDuration:null,next:E=>{let N=!1;return!M&&T===void 0&&(N=!0,A(E),j(E)),T!==void 0&&E>=T?M.next(E-T):(!N&&A(E),f)}}}const hd=It(.42,0,1,1),pd=It(0,0,.58,1),Jo=It(.42,0,.58,1),md=e=>Array.isArray(e)&&typeof e[0]!="number",Qo={linear:ce,easeIn:hd,easeInOut:Jo,easeOut:pd,circIn:mr,circInOut:vo,circOut:yo,backIn:pr,backInOut:mo,backOut:po,anticipate:go},ei=e=>{if(Gn(e)){je(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,s]=e;return It(t,n,r,s)}else if(typeof e=="string")return je(Qo[e]!==void 0,`Invalid easing type '${e}'`),Qo[e];return e};function gd(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]||ce:t;a=Bt(l,a)}r.push(a)}return r}function yd(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const o=e.length;if(je(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=gd(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=ct(e[d],e[d+1],u);return a[d](f)};return n?u=>c(Pe(e[0],e[o-1],u)):c}function vd(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=ct(0,t,r);e.push(G(n,1,s))}}function xd(e){const t=[0];return vd(t,e.length-1),t}function bd(e,t){return e.map(n=>n*t)}function Sd(e,t){return e.map(()=>t||Jo).splice(0,e.length-1)}function $t({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=md(r)?r.map(ei):ei(r),o={done:!1,value:t[0]},i=bd(n&&n.length===t.length?n:xd(t),e),a=yd(i,t,{ease:Array.isArray(s)?s:Sd(t,s)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}const Cd=e=>{const t=({timestamp:n})=>e(n);return{start:()=>W.update(t,!0),stop:()=>Ve(t),now:()=>ne.isProcessing?ne.timestamp:Ce.now()}},wd={decay:Zo,inertia:Zo,tween:$t,keyframes:$t,spring:Yo},Td=e=>e/100;class Or 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)||Pr,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=Kn(n)?n:wd[n]||$t;let l,c;process.env.NODE_ENV!=="production"&&a!==$t&&je(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),a!==$t&&typeof t[0]!="number"&&(l=Bt(Td,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=ws(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:E}=this.options;return{done:!0,value:E[E.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:m,repeatDelay:y,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),b=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let C=this.currentTime,A=o;if(p){const E=Math.min(this.currentTime,u)/d;let N=Math.floor(E),_=E%1;!_&&E>=1&&(_=1),_===1&&N--,N=Math.min(N,p+1),!!(N%2)&&(m==="reverse"?(_=1-_,y&&(_-=y/d)):m==="mirror"&&(A=i)),C=Pe(0,1,_)*d}const T=b?{done:!1,value:l[0]}:A.next(C);a&&(T.value=a(T.value));let{done:M}=T;!b&&c!==null&&(M=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const j=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return j&&s!==void 0&&(T.value=pn(l,this.options,s)),S&&S(T.value),j&&this.finish(),T}get duration(){const{resolved:t}=this;return t?_e(t.calculatedDuration):0}get time(){return _e(this.currentTime)}set time(t){t=Se(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=_e(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Cd,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 _d=new Set(["opacity","clipPath","filter","transform"]);function Pd(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=Es(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 Ed=zn(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),gn=10,Ad=2e4;function Md(e){return Kn(e.type)||e.type==="spring"||!Ps(e.ease)}function Ld(e,t){const n=new Or({...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<Ad;)r=n.sample(o),s.push(r.value),o+=gn;return{times:void 0,keyframes:s,duration:o-gn,ease:"linear"}}const ti={anticipate:go,backInOut:mo,circInOut:vo};function Dd(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"&&sn()&&Dd(o)&&(o=ti[o]),Md(this.options)){const{onComplete:d,onUpdate:f,motionValue:p,element:m,...y}=this.options,S=Ld(t,y);t=S.keyframes,t.length===1&&(t[1]=t[0]),r=S.duration,s=S.times,o=S.ease,i="keyframes"}const u=Pd(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(pn(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 _e(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return _e(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Se(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 ce;const{animation:r}=n;Ts(r,t)}return ce}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,m=new Or({...p,keyframes:r,duration:s,type:o,ease:i,times:a,isGenerator:!0}),y=Se(this.time);c.setWithVelocity(m.sample(y-gn).value,m.sample(y).value,gn)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay: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 Ed()&&r&&_d.has(r)&&!l&&!c&&!s&&o!=="mirror"&&i!==0&&a!=="inertia"}}const Od={type:"spring",stiffness:500,damping:25,restSpeed:10},kd=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),jd={type:"keyframes",duration:.8},Vd={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Nd=(e,{keyframes:t})=>t.length>2?jd:We.has(e)?e.startsWith("scale")?kd(t[1]):Od:Vd;function Id({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 kr=(e,t,n,r={},s,o)=>i=>{const a=Xn(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Se(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};Id(a)||(u={...u,...Nd(e,u)}),u.duration&&(u.duration=Se(u.duration)),u.repeatDelay&&(u.repeatDelay=Se(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=pn(u.keyframes,a);if(f!==void 0)return W.update(()=>{u.onUpdate(f),u.onComplete()}),new lc([])}return!o&&ni.supports(u)?new ni(u):new Or(u)};function Rd({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&&Rd(u,d))continue;const m={delay:n,...Xn(i||{},d)};let y=!1;if(window.MotionHandoffAnimation){const v=co(e);if(v){const b=window.MotionHandoffAnimation(v,d,W);b!==null&&(m.startTime=b,y=!0)}}hr(e,d),f.start(kr(d,f,p,e.shouldReduceMotion&&lo.has(d)?{type:!1}:m,e,y));const S=f.animation;S&&c.push(S)}return a&&Promise.all(c).then(()=>{W.update(()=>{a&&hu(e,a)})}),c}function jr(e,t,n={}){var r;const s=Nt(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 Fd(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 Fd(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(Bd).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(jr(c,t,{...o,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function Bd(e,t){return e.sortNodePosition(t)}function $d(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(o=>jr(e,o,n));r=Promise.all(s)}else if(typeof t=="string")r=jr(e,t,n);else{const s=typeof t=="function"?Nt(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 zd=er.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<zd;n++){const r=er[n],s=e.props[r];(Ot(s)||s===!1)&&(t[r]=s)}return t}const Ud=[...Qn].reverse(),Xd=Qn.length;function Wd(e){return t=>Promise.all(t.map(({animation:n,options:r})=>$d(e,n,r)))}function Kd(e){let t=Wd(e),n=ii(),r=!0;const s=l=>(c,u)=>{var d;const f=Nt(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:p,transitionEnd:m,...y}=f;c={...c,...y,...m}}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={},m=1/0;for(let S=0;S<Xd;S++){const v=Ud[S],b=n[v],C=c[v]!==void 0?c[v]:u[v],A=Ot(C),T=v===l?b.isActive:null;T===!1&&(m=S);let M=C===u[v]&&C!==c[v]&&A;if(M&&r&&e.manuallyAnimateOnMount&&(M=!1),b.protectedKeys={...p},!b.isActive&&T===null||!C&&!b.prevProp||un(C)||typeof C=="boolean")continue;const j=Gd(b.prevProp,C);let E=j||v===l&&b.isActive&&!M&&A||S>m&&A,N=!1;const _=Array.isArray(C)?C:[C];let z=_.reduce(s(v),{});T===!1&&(z={});const{prevResolvedValues:$={}}=b,re={...$,...z},ue=U=>{E=!0,f.has(U)&&(N=!0,f.delete(U)),b.needsAnimating[U]=!0;const O=e.getValue(U);O&&(O.liveStyle=!1)};for(const U in re){const O=z[U],R=$[U];if(p.hasOwnProperty(U))continue;let K=!1;dr(O)&&dr(R)?K=!si(O,R):K=O!==R,K?O!=null?ue(U):f.add(U):O!==void 0&&f.has(U)?ue(U):b.protectedKeys[U]=!0}b.prevProp=C,b.prevResolvedValues=z,b.isActive&&(p={...p,...z}),r&&e.blockInitialAnimation&&(E=!1),E&&(!(M&&j)||N)&&d.push(..._.map(U=>({animation:U,options:{type:v}})))}if(f.size){const S={};if(typeof c.initial!="boolean"){const v=Nt(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(S.transition=v.transition)}f.forEach(v=>{const b=e.getBaseTarget(v),C=e.getValue(v);C&&(C.liveStyle=!0),S[v]=b??null}),d.push({animation:S})}let y=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?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 Gd(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!si(t,e):!1}function qe(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ii(){return{animate:qe(!0),whileInView:qe(),whileHover:qe(),whileTap:qe(),whileDrag:qe(),whileFocus:qe(),exit:qe()}}class Re{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Hd extends Re{constructor(t){super(t),t.animationState||(t.animationState=Kd(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();un(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let qd=0;class Yd extends Re{constructor(){super(...arguments),this.id=qd++}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 Zd={animation:{Feature:Hd},exit:{Feature:Yd}};function zt(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Ut(e){return{point:{x:e.pageX,y:e.pageY}}}const Jd=e=>t=>Zn(t)&&e(t,Ut(t));function Xt(e,t,n,r){return zt(e,t,Jd(n),r)}function ai({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Qd({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function ef(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,tf=1-li,nf=1+li,ci=.01,rf=0-ci,sf=0+ci;function ae(e){return e.max-e.min}function of(e,t,n){return Math.abs(e-t)<=n}function ui(e,t,n,r=.5){e.origin=r,e.originPoint=G(t.min,t.max,e.origin),e.scale=ae(n)/ae(t),e.translate=G(n.min,n.max,e.origin)-e.originPoint,(e.scale>=tf&&e.scale<=nf||isNaN(e.scale))&&(e.scale=1),(e.translate>=rf&&e.translate<=sf||isNaN(e.translate))&&(e.translate=0)}function Wt(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+ae(t)}function af(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+ae(t)}function Kt(e,t,n){fi(e.x,t.x,n.x),fi(e.y,t.y,n.y)}const hi=()=>({translate:0,scale:1,origin:0,originPoint:0}),gt=()=>({x:hi(),y:hi()}),pi=()=>({min:0,max:0}),Y=()=>({x:pi(),y:pi()});function pe(e){return[e("x"),e("y")]}function Vr(e){return e===void 0||e===1}function Nr({scale:e,scaleX:t,scaleY:n}){return!Vr(e)||!Vr(t)||!Vr(n)}function Ye(e){return Nr(e)||mi(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function mi(e){return gi(e.x)||gi(e.y)}function gi(e){return e&&e!=="0%"}function yn(e,t,n){const r=e-n,s=t*r;return n+s}function yi(e,t,n,r,s){return s!==void 0&&(e=yn(e,s,r)),yn(e,n,r)+t}function Ir(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}){Ir(e.x,t.translate,t.scale,t.originPoint),Ir(e.y,n.translate,n.scale,n.originPoint)}const xi=.999999999999,bi=1.0000000000001;function lf(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&&vt(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&&Ye(o.latestValues)&&vt(e,o.latestValues))}t.x<bi&&t.x>xi&&(t.x=1),t.y<bi&&t.y>xi&&(t.y=1)}function yt(e,t){e.min=e.min+t,e.max=e.max+t}function Si(e,t,n,r,s=.5){const o=G(e.min,e.max,s);Ir(e,t,n,o,r)}function vt(e,t){Si(e.x,t.x,t.scaleX,t.scale,t.originX),Si(e.y,t.y,t.scaleY,t.scale,t.originY)}function Ci(e,t){return ai(ef(e.getBoundingClientRect(),t))}function cf(e,t,n){const r=Ci(e,n),{scroll:s}=t;return s&&(yt(r.x,s.offset.x),yt(r.y,s.offset.y)),r}const wi=({current:e})=>e?e.ownerDocument.defaultView:null,Ti=(e,t)=>Math.abs(e-t);function uf(e,t){const n=Ti(e.x,t.x),r=Ti(e.y,t.y);return Math.sqrt(n**2+r**2)}class _i{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=Fr(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=uf(d.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:m}=d,{timestamp:y}=ne;this.history.push({...m,timestamp:y});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=Rr(f,this.transformPagePoint),W.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:p,onSessionEnd:m,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=Fr(d.type==="pointercancel"?this.lastMoveEventInfo:Rr(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,S),m&&m(d,S)},!Zn(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=s||window;const i=Ut(t),a=Rr(i,this.transformPagePoint),{point:l}=a,{timestamp:c}=ne;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Fr(a,this.history)),this.removeListeners=Bt(Xt(this.contextWindow,"pointermove",this.handlePointerMove),Xt(this.contextWindow,"pointerup",this.handlePointerUp),Xt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ve(this.updatePoint)}}function Rr(e,t){return t?{point:t(e.point)}:e}function Pi(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Fr({point:e},t){return{point:e,delta:Pi(e,Ei(t)),offset:Pi(e,df(t)),velocity:ff(t,.1)}}function df(e){return e[0]}function Ei(e){return e[e.length-1]}function ff(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=Ei(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>Se(t)));)n--;if(!r)return{x:0,y:0};const o=_e(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 hf(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?G(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?G(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 pf(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 mf(e,t){return{x:Mi(e.x,t.x),y:Mi(e.y,t.y)}}function gf(e,t){let n=.5;const r=ae(e),s=ae(t);return s>r?n=ct(t.min,t.max-r,e.min):r>s&&(n=ct(e.min,e.max-s,t.min)),Pe(0,1,n)}function yf(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 Br=.35;function vf(e=Br){return e===!1?e=0:e===!0&&(e=Br),{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 xf=new WeakMap;class bf{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=Y(),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(Ut(u).point)},o=(u,d)=>{const{drag:f,dragPropagation:p,onDragStart:m}=this.getProps();if(f&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=pc(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),pe(S=>{let v=this.getAxisMotionValue(S).get()||0;if(we.test(v)){const{projection:b}=this.visualElement;if(b&&b.layout){const C=b.layout.layoutBox[S];C&&(v=ae(C)*(parseFloat(v)/100))}}this.originPoint[S]=v}),m&&W.postRender(()=>m(u,d)),hr(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},i=(u,d)=>{const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:m,onDrag:y}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:S}=d;if(p&&this.currentDirection===null){this.currentDirection=Sf(S),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,S),this.updateAxis("y",d.point,S),this.visualElement.render(),y&&y(u,d)},a=(u,d)=>this.stop(u,d),l=()=>pe(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 _i(t,{onSessionStart:s,onStart:o,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:wi(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:o}=this.getProps();o&&W.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||!vn(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=hf(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&&dt(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&s?this.constraints=pf(s.layoutBox,n):this.constraints=!1,this.elastic=vf(r),o!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&pe(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=yf(s.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!dt(t))return!1;const r=t.current;je(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=cf(r,s.root,this.visualElement.getTransformPagePoint());let i=mf(s.layout.layoutBox,o);if(n){const a=n(Qd(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=pe(u=>{if(!vn(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,m={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return hr(this.visualElement,t),r.start(kr(t,r,0,n,this.visualElement,!1))}stopAnimation(){pe(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){pe(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){pe(n=>{const{drag:r}=this.getProps();if(!vn(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]-G(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!dt(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};pe(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();s[i]=gf({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(),pe(i=>{if(!vn(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(G(l,c,s[i]))})}addListeners(){if(!this.visualElement.current)return;xf.set(this.visualElement,this);const t=this.visualElement.current,n=Xt(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();dt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,o=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),W.read(r);const i=zt(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(pe(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=Br,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function vn(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Sf(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Cf extends Re{constructor(t){super(t),this.removeGroupControls=ce,this.removeListeners=ce,this.controls=new bf(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ce}unmount(){this.removeGroupControls(),this.removeListeners()}}const Oi=e=>(t,n)=>{e&&W.postRender(()=>e(t,n))};class wf extends Re{constructor(){super(...arguments),this.removePointerDownListener=ce}onPointerDown(t){this.session=new _i(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:wi(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&&W.postRender(()=>s(o,i))}}}mount(){this.removePointerDownListener=Xt(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 xn={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ki(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Gt={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}%`}},Tf={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=Ie.parse(e);if(s.length>5)return r;const o=Ie.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=G(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 _f extends g.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:o}=t;$c(Pf),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()})),xn.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()||W.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Yn.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]=sc(),r=g.useContext(xs);return x.jsx(_f,{...e,layoutGroup:r,switchLayoutGroup:g.useContext(Xs),isPresent:t,safeToRemove:n})}const Pf={borderRadius:{...Gt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Gt,borderTopRightRadius:Gt,borderBottomLeftRadius:Gt,borderBottomRightRadius:Gt,boxShadow:Tf};function Ef(e,t,n){const r=oe(e)?e:Dt(e);return r.start(kr("",r,t,n)),r.animation}function Af(e){return e instanceof SVGElement&&e.tagName!=="svg"}const Mf=(e,t)=>e.depth-t.depth;class Lf{constructor(){this.children=[],this.isDirty=!1}add(t){Bn(this.children,t),this.isDirty=!0}remove(t){$n(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Mf),this.isDirty=!1,this.children.forEach(t)}}function Df(e,t){const n=Ce.now(),r=({timestamp:s})=>{const o=s-n;o>=t&&(Ve(r),e(o-t))};return W.read(r,!0),()=>Ve(r)}const Vi=["TopLeft","TopRight","BottomLeft","BottomRight"],Of=Vi.length,Ni=e=>typeof e=="string"?parseFloat(e):e,Ii=e=>typeof e=="number"||D.test(e);function kf(e,t,n,r,s,o){s?(e.opacity=G(0,n.opacity!==void 0?n.opacity:1,jf(r)),e.opacityExit=G(t.opacity!==void 0?t.opacity:1,0,Vf(r))):o&&(e.opacity=G(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<Of;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(G(Ni(l),Ni(c),r),0),(we.test(c)||we.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=G(t.rotate||0,n.rotate||0,r))}function Ri(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const jf=Fi(0,.5,yo),Vf=Fi(.5,.95,ce);function Fi(e,t,n){return r=>r<e?0:r>t?1:n(ct(e,t,r))}function Bi(e,t){e.min=t.min,e.max=t.max}function me(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=yn(e,1/n,r),s!==void 0&&(e=yn(e,1/s,r)),e}function Nf(e,t=0,n=1,r=.5,s,o=e,i=e){if(we.test(t)&&(t=parseFloat(t),t=G(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=G(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){Nf(e,t[n],t[r],t[s],t.scale,o,i)}const If=["x","scaleX","originX"],Rf=["y","scaleY","originY"];function Xi(e,t,n,r){Ui(e.x,t,If,n?n.x:void 0,r?r.x:void 0),Ui(e.y,t,Rf,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 Ff(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 ae(e.x)/ae(e.y)}function Zi(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Bf{constructor(){this.members=[]}add(t){Bn(this.members,t),t.scheduleRender()}remove(t){if($n(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(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 $f(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:m}=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) `),m&&(r+=`skewY(${m}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const $r=["","X","Y","Z"],zf={visibility:"hidden"},Ji=1e3;let Uf=0;function zr(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",W,!(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=Uf++,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(Kf),this.nodes.forEach(Zf),this.nodes.forEach(Jf),this.nodes.forEach(Gf)},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 Lf)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Un),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=Af(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=Df(f,250),xn.hasAnimatedSinceResize&&(xn.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:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||u.getDefaultTransition()||rh,{onLayoutAnimationStart:S,onLayoutAnimationComplete:v}=u.getProps(),b=!this.targetLayout||!qi(this.targetLayout,m),C=!f&&p;if(this.options.layoutRoot||this.resumeFrom||C||f&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,C);const A={...Xn(y,"layout"),onPlay:S,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(A.delay=0,A.type=!1),this.startAnimation(A)}else f||na(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}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,Ve(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(Qf),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(qf),this.isUpdating=!1,this.nodes.forEach(Yf),this.nodes.forEach(Xf),this.nodes.forEach(Wf),this.clearAllSnapshots();const a=Ce.now();ne.delta=Pe(0,1e3/60,a-ne.timestamp),ne.timestamp=a,ne.isProcessing=!0,qn.update.process(ne),qn.preRender.process(ne),qn.render.process(ne),ne.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Yn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Hf),this.sharedNodes.forEach(eh)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,W.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){W.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ae(this.snapshot.measuredBox.x)&&!ae(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=Y(),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||Ye(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)),sh(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var i;const{visualElement:a}=this.options;if(!a)return Y();const l=a.measureViewportBox();if(!(((i=this.scroll)===null||i===void 0?void 0:i.wasRoot)||this.path.some(oh))){const{scroll:u}=this.root;u&&(yt(l.x,u.offset.x),yt(l.y,u.offset.y))}return l}removeElementScroll(i){var a;const l=Y();if(me(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&&me(l,i),yt(l.x,d.offset.x),yt(l.y,d.offset.y))}return l}applyTransform(i,a=!1){const l=Y();me(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&vt(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Ye(u.latestValues)&&vt(l,u.latestValues)}return Ye(this.latestValues)&&vt(l,this.latestValues),l}removeTransform(i){const a=Y();me(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Ye(c.latestValues))continue;Nr(c.latestValues)&&c.updateSnapshot();const u=Y(),d=c.measurePageBox();me(u,d),Xi(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Ye(this.latestValues)&&Xi(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ne.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=ne.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Y(),this.relativeTargetOrigin=Y(),Kt(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),me(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Y(),this.targetWithTransforms=Y()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),af(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):me(this.target,this.layout.layoutBox),vi(this.target,this.targetDelta)):me(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=Y(),this.relativeTargetOrigin=Y(),Kt(this.relativeTargetOrigin,this.target,p.target),me(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Nr(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===ne.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;me(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;lf(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=Y());const{target:m}=a;if(!m){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)),Wt(this.projectionDelta,this.layoutCorrected,m,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",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),i){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=gt(),this.projectionDelta=gt(),this.projectionDeltaWithTransform=gt()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=gt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Y(),p=l?l.source:void 0,m=this.layout?this.layout.source:void 0,y=p!==m,S=this.getStack(),v=!S||S.members.length<=1,b=!!(y&&!v&&this.options.crossfade===!0&&!this.path.some(nh));this.animationProgress=0;let C;this.mixTargetDelta=A=>{const T=A/1e3;ra(d.x,i.x,T),ra(d.y,i.y,T),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Kt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),th(this.relativeTarget,this.relativeTargetOrigin,f,T),C&&Ff(this.relativeTarget,C)&&(this.isProjectionDirty=!1),C||(C=Y()),me(C,this.relativeTarget)),y&&(this.animationValues=u,kf(u,c,this.latestValues,T,b,v)),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&&(Ve(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=W.update(()=>{xn.hasAnimatedSinceResize=!0,this.currentAnimation=Ef(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||Y();const d=ae(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const f=ae(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}me(a,l),vt(a,u),Wt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new Bf),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&&zr("z",i,c,this.animationValues);for(let u=0;u<$r.length;u++)zr(`rotate${$r[u]}`,i,c,this.animationValues),zr(`skew${$r[u]}`,i,c,this.animationValues);i.render();for(const u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);i.scheduleRender()}getProjectionStyles(i){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return zf;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=hn(i==null?void 0:i.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const y={};return this.options.layoutId&&(y.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,y.pointerEvents=hn(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!Ye(this.latestValues)&&(y.transform=u?u({},""):"none",this.hasProjected=!1),y}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=$f(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));const{x:p,y:m}=this.projectionDelta;c.transformOrigin=`${p.origin*100}% ${m.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 y in kt){if(f[y]===void 0)continue;const{correct:S,applyTo:v,isCSSVariable:b}=kt[y],C=c.transform==="none"?f[y]:S(f[y],d);if(v){const A=v.length;for(let T=0;T<A;T++)c[v[T]]=C}else b?this.options.visualElement.renderState.vars[y]=C:c[y]=C}return this.options.layoutId&&(c.pointerEvents=d===this?hn(i==null?void 0:i.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(ta),this.root.sharedNodes.clear()}}}function Xf(e){e.updateLayout()}function Wf(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"?pe(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],p=ae(f);f.min=r[d].min,f.max=f.min+p}):la(o,n.layoutBox,r)&&pe(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],p=ae(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=gt();Wt(a,r,n.layoutBox);const l=gt();i?Wt(l,e.applyTransform(s,!0),n.measuredBox):Wt(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 m=Y();Kt(m,n.layoutBox,f.layoutBox);const y=Y();Kt(y,r,p.layoutBox),qi(m,y)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=m,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 Kf(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 Gf(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Hf(e){e.clearSnapshot()}function ta(e){e.clearMeasurements()}function qf(e){e.isLayoutDirty=!1}function Yf(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 Zf(e){e.resolveTargetDelta()}function Jf(e){e.calcProjection()}function Qf(e){e.resetSkewAndRotation()}function eh(e){e.removeLeadSnapshot()}function ra(e,t,n){e.translate=G(t.translate,0,n),e.scale=G(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function sa(e,t,n,r){e.min=G(t.min,n.min,r),e.max=G(t.max,n.max,r)}function th(e,t,n,r){sa(e.x,t.x,n.x,r),sa(e.y,t.y,n.y,r)}function nh(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const rh={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:ce;function aa(e){e.min=ia(e.min),e.max=ia(e.max)}function sh(e){aa(e.x),aa(e.y)}function la(e,t,n){return e==="position"||e==="preserve-aspect"&&!of(Yi(t),Yi(n),.2)}function oh(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const ih=ea({attachResizeListener:(e,t)=>zt(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ur={current:void 0},ca=ea({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ur.current){const e=new ih({});e.mount(window),e.setOptions({layoutScroll:!0}),Ur.current=e}return Ur.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),ah={pan:{Feature:wf},drag:{Feature:Cf,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&&W.postRender(()=>o(t,Ut(t)))}class lh extends Re{mount(){const{current:t}=this.node;t&&(this.unmount=gc(t,(n,r)=>(ua(this.node,r,"Start"),s=>ua(this.node,s,"End"))))}unmount(){}}class ch extends Re{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=Bt(zt(this.node.current,"focus",()=>this.onFocus()),zt(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&&W.postRender(()=>o(t,Ut(t)))}class uh extends Re{mount(){const{current:t}=this.node;t&&(this.unmount=bc(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 Xr=new WeakMap,Wr=new WeakMap,dh=e=>{const t=Xr.get(e.target);t&&t(e)},fh=e=>{e.forEach(dh)};function hh({root:e,...t}){const n=e||document;Wr.has(n)||Wr.set(n,{});const r=Wr.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(fh,{root:e,...t})),r[s]}function ph(e,t,n){const r=hh(t);return Xr.set(e,n),r.observe(e),()=>{Xr.delete(e),r.unobserve(e)}}const mh={some:0,all:1};class gh extends Re{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:mh[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 ph(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(yh(t,n))&&this.startObserver()}unmount(){}}function yh({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const vh={inView:{Feature:gh},tap:{Feature:uh},focus:{Feature:ch},hover:{Feature:lh}},xh={layout:{ProjectionNode:ca,MeasureLayout:ji}},Kr={current:null},fa={current:!1};function bh(){if(fa.current=!0,!!Rn)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Kr.current=e.matches;e.addListener(t),t()}else Kr.current=!1}const Sh=[...Ro,ie,Ie],Ch=e=>Sh.find(Io(e)),wh=new WeakMap;function Th(e,t,n){for(const r in t){const s=t[r],o=n[r];if(oe(s))e.addValue(r,s),process.env.NODE_ENV==="development"&&rn(s.version==="12.5.0",`Attempting to mix Motion versions ${s.version} with 12.5.0 may not work as expected.`);else if(oe(o))e.addValue(r,Dt(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,Dt(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 _h{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=Pr,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=Ce.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,W.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=dn(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 m=f[p];l[p]!==void 0&&oe(m)&&m.set(l[p],!1)}}mount(t){this.current=t,wh.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||bh(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Kr.current,process.env.NODE_ENV!=="production"&&rn(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ve(this.notifyUpdate),Ve(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=We.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&W.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 ut){const n=ut[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):Y()}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=Th(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=Dt(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):!Ch(s)&&Ie.test(n)&&(s=Eo(t,n)),this.setBaseTarget(t,oe(s)?s.get():s)),oe(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=ur(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&&!oe(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 Un),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class pa extends _h{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;oe(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Ph(e){return window.getComputedStyle(e)}class Eh extends pa{constructor(){super(...arguments),this.type="html",this.renderInstance=ro}readValueFromInstance(t,n){if(We.has(n))return Ru(t,n);{const r=Ph(t),s=(nr(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Ci(t,n)}build(t,n,r){or(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return fr(t,n,r)}}class Ah extends pa{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Y,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&no(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(We.has(n)){const r=Po(n);return r&&r.default||0}return n=so.has(n)?n:tr(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return io(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&W.postRender(this.updateDimensions)}build(t,n,r){lr(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,s){oo(t,n,r,s)}mount(t){this.isSVGTag=cr(t.tagName),super.mount(t)}}const Mh=(e,t)=>ar(e)?new Ah(t):new Eh(t,{allowProjection:e!==g.Fragment}),Lh=du({...Zd,...vh,...ah,...xh},Mh),Ze=Ac(Lh),Dh={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 Fe(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 Je="Errore: ",Oh="Impossibile acquisire la posizione.",Gr="Impossibile caricare i punti di mappa.",kh="Si è verificato un errore.",jh="Impossibile caricare i suggerimenti.",Vh="Impossibile caricare i dettagli della location.",Nh="Impossibile caricare la mappa.",Ih="Impossibile trovare punti di mappa nell'area di ricerca.",Rh="Ottieni indicazioni di navigazione per questa destinazione",Fh="Condividi questa destinazione",Bh="Scarica l'evento",$h=3e3,ga=6,Ht={north:47.1,south:36.6,east:18.6,west:6.6},zh={lat:(Ht.north+Ht.south)/2,lng:(Ht.east+Ht.west)/2},Uh=2e4;function Ee(e){if(e)return e.trim().split(" ").filter(t=>t.length)}function Ae(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 Hr(e){const{type:t,url:n}=e??{};switch(t){case"navigate":case"directions":return{"aria-label":Rh,as:"a",href:n??"#",target:"_blank",rel:"noopener noreferrer"};case"share":return{"aria-label":Fh,as:"a",href:n??"#",target:"_blank",rel:"noopener noreferrer"};case"event":case"calendar":return{"aria-label":Bh,as:"a",href:n??"#",download:!0,target:"_blank",rel:"noopener noreferrer"};case"email":default:return{}}}function Xh(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 m=t||"span",y=o?Ze[m]:m,S=e||"a",v=Fe(f)??[],b=o?{initial:{opacity:0,y:5},animate:{opacity:1,y:0},transition:{delay:i,duration:.2}}:{},A=c||(l==="_blank"?{rel:"noopener noreferrer"}:{}).rel;return x.jsx(y,{className:q(Dh.root,"dyn-locator__"+Ae(ya),Ee(s),...v),"data-variant":r,...d?{style:d}:{},...b,...f,children:x.jsx(S,{ref:p,href:a,target:l,rel:A,...u,children:n})})}va.displayName=ya;const xa=g.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=Fe(a)??[];return x.jsxs("div",{className:q("dyn-locator__"+Ae(ba),At.root,Ee(o),...l??[]),children:[x.jsxs("header",{className:At.header,children:[x.jsx(Gl,{size:28,color:"currentColor",className:At.icon})," ",x.jsx("h3",{children:e})]}),x.jsxs("div",{className:At.body,children:[x.jsx("p",{children:t}),n&&r&&x.jsxs("p",{children:["Prova a"," ",x.jsx(xa,{animate:!1,"aria-label":n,href:"#",onClick:r,children:n})]}),i,s&&x.jsx("div",{className:At.content,children:x.jsx("pre",{children:s})})]})]})}Sa.displayName=ba;const Ca=Sa;class Wh extends g.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Locator error: ",t,n)}render(){var t;return this.state.hasError?this.props.fallback||x.jsx("div",{className:Fl.container,children:x.jsx(Ca,{message:"Something went wrong with the Locator component",errorDetails:(t=this.state.error)==null?void 0:t.message})}):this.props.children}}const wa={ArrowLeft:Ul,ArrowUpRight:Xl,ChevronUp:Kl,ChevronDown:Wl,Close:tc,Expand:Yl,Location:ql,Search:Ql,Share:ec,Target:Hl},Me={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"},xt={root:"_root_1k1dg_4",container:"_container_1k1dg_10",label:"_label_1k1dg_17",icon:"_icon_1k1dg_27"},qr={root:"_root_71ove_4",icon:"_icon_71ove_43"};function Kh(e){return g.isValidElement(e)||typeof e=="function"}function Gh(e){return e?typeof e=="string"||typeof e=="object"&&"name"in e:!1}function Hh(e){return!!e&&typeof e=="object"&&"path"in e}const Ta="Icon";function _a({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",m=l?Ze[p]:p,{iconMap:y}=tp();function S(C){if(Gh(C)){const A=typeof C=="string"?C:C.name;return y[A]?g.createElement(y[A],{...n?{ref:n}:{},...r?{title:r,titleId:r.trim().toLowerCase().replace(/[^a-z0-9\s_-]/g,"").replace(/\s+/g,"_")+"_id"}:{},className:qr.icon}):'No icon found for "'+A+'"!'}return Hh(C)?(i!=="default"&&console.warn("Warning: cannot set icon stroke on a remote asset"),x.jsx("img",{...n?{ref:n}:{},src:C.path,alt:`Icona decorativa${r?" che rappresenta '"+r+"'":""}`,className:qr.icon})):"No icon provided"}const v=Fe(d)??[],b=l?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:c,duration:.2}}:{};return x.jsx(m,{ref:f,className:q(qr.root,"dyn-locator__"+Ae(Ta),Ee(a),...v),...u?{style:u}:{},"data-variant":i,"data-size":s,...o?{"data-radius":o}:{},...b,...d,children:S(t)})}_a.displayName=Ta;const Be=g.forwardRef(_a),Pa="Tag";function Ea({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?Ze[u]:u,f=Fe(l)??[],p=o?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:i,duration:.2}}:{};return x.jsx(d,{ref:c,className:q(xt.root,"dyn-locator__"+Ae(Pa),Ee(s),...f),"data-icon-position":t,...a?{style:a}:{},...p,...l,children:x.jsxs("div",{className:xt.container,children:[r?x.jsx("div",{className:xt.icon,children:Kh(r)?typeof r=="function"?x.jsx(r,{className:xt.icon}):r:x.jsx(Be,{className:xt.icon,icon:r})}):null,x.jsx("div",{className:xt.label,children:n})]})})}Ea.displayName=Pa;const qh=g.forwardRef(Ea),Yh={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 m=e||"button",y=s?Ze[m]:m,S=Fe(f)??[],v=s?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:o,duration:.2}}:{},b=m==="a"?{href:l??"/",target:c??"_blank",rel:c==="_blank"?"noopener noreferrer":u}:{};return x.jsx(y,{ref:p,className:q(Yh.root,"dyn-locator__"+Ae(Aa),Ee(n),...S),"data-variant":r,"data-element":m,"aria-label":a,disabled:d,...i?{style:i}:{},...v,...b,...f,children:t})}Ma.displayName=Aa;const bt=g.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?Ze[d]:d,p=Fe(c)??[],m=s?{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:o,duration:.3}}:{};return x.jsx(f,{ref:u,className:q(La.root,"dyn-locator__"+Ae(Da),Ee(n),...p),"data-variant":r,"data-clickable":a||!!l,onClick:l,...i?{style:i}:{},...m,...c,children:r==="bare"?t:x.jsx("div",{className:La.content,children:t})})}Oa.displayName=Da;const Zh=g.forwardRef(Oa);function ka(e){const{componentMap:t}=np();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 x.jsx(Zh,{ref:l,variant:"bare",clickable:!0,className:q("dyn-locator__"+Ae(ja),Ee(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:x.jsxs("div",{className:Me.root,children:[x.jsxs("header",{className:Me.header,children:[t?x.jsx("time",{children:new Date(t).toLocaleDateString("it",{day:"numeric",month:"long",year:"numeric"})}):null,x.jsxs("div",{className:Me.titleContainer,children:[e?x.jsx("h4",{children:e}):null,x.jsx(bt,{className:Me.shareButton,variant:"bare",...Hr(s),children:x.jsx(Be,{size:"M",icon:"Share"})})]}),n?x.jsx("address",{children:n}):null]}),r!=null&&r.length?x.jsx("div",{className:Me.body,children:r.map((u,d)=>x.jsxs("div",{className:Me.capabilities,children:[x.jsx("h5",{children:u.title}),x.jsx("ul",{className:Me.tagContainer,children:(u.capabilities??[]).map((f,p)=>x.jsx(qh,{as:"li",animationDelay:+`.${p+1}`,className:Me.tag,children:f.label},p))})]},d))}):null,o!=null&&o.length?x.jsx("div",{className:Me.cta,children:o.map((u,d)=>x.jsx(c,{animate:!1,fullWidth:!0,variant:d===0?"themed":"secondary",...Hr(u),children:u.label},d))}):null]})})}Va.displayName=ja;const Jh=g.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,...m},y){const S=e||(u?"a":"button"),v=l?Ze[S]:S,b=Fe(m)??[],C=l?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:c,duration:.2}}:{},A=u?{href:u,target:d,rel:d==="_blank"?"noopener noreferrer":f}:{};return x.jsx(v,{ref:y,className:q(Na.root,"dyn-locator__"+Ae(Ia),Ee(n),...b),"data-variant":r,"data-size":s,"data-full-width":a,disabled:o||i,...p?{style:p}:{},...C,...A,...m,children:i?x.jsxs("span",{style:{display:"flex",gap:10},children:[t,x.jsx("span",{className:Na.loader,"aria-hidden":"true"})]}):t})}Ra.displayName=Ia;const bn=g.forwardRef(Ra),Fa={locationCard:Jh,ctaButton:bn},Qh={iconMap:wa,componentMap:Fa},Yr=g.createContext(Qh);function ep({children:e,customIcons:t,customComponents:n}){const r={...wa,...t??{}},s={...Fa,...n??{}};return x.jsx(Yr.Provider,{value:{iconMap:r,componentMap:s},children:e})}function tp(){const{iconMap:e}=g.useContext(Yr);return{iconMap:e}}function np(){const{componentMap:e}=g.useContext(Yr);return{componentMap:e}}var qt=(e=>(e.CLUSTERS="clusters",e.MARKERS="markers",e.FIND="find",e))(qt||{});const Ba=g.createContext({endpointMap:{},apiUrl:""});function rp({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 x.jsx(Ba.Provider,{value:{endpointMap:t,apiUrl:n},children:e})}function sp(e){const{endpointMap:t,apiUrl:n}=g.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 op={data:""},ip=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||op,ap=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,lp=/\/\*[^]*?\*\/| +/g,$a=/\n+/g,$e=(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"?$e(i,o):o+"{"+$e(i,o[1]=="k"?"":t)+"}":typeof i=="object"?r+=$e(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+=$e.p?$e.p(o,i):o+":"+i+";")}return n+(t&&s?t+"{"+s+"}":s)+r},Le={},za=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+za(e[n]);return t}return e},cp=(e,t,n,r,s)=>{let o=za(e),i=Le[o]||(Le[o]=(l=>{let c=0,u=11;for(;c<l.length;)u=101*u+l.charCodeAt(c++)>>>0;return"go"+u})(o));if(!Le[i]){let l=o!==e?e:(c=>{let u,d,f=[{}];for(;u=ap.exec(c.replace(lp,""));)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);Le[i]=$e(s?{["@keyframes "+i]:l}:l,n?"":"."+i)}let a=n&&Le.g?Le.g:null;return n&&(Le.g=Le[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)})(Le[i],t,r,a),i},up=(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?"":$e(a,""):a===!1?"":a}return r+s+(i??"")},"");function Sn(e){let t=this||{},n=e.call?e(t.p):e;return cp(n.unshift?n.raw?up(n,[].slice.call(arguments,1),t.p):n.reduce((r,s)=>Object.assign(r,s&&s.call?s(t.p):s),{}):n,ip(t.target),t.g,t.o,t.k)}let Ua,Zr,Jr;Sn.bind({g:1});let De=Sn.bind({k:1});function dp(e,t,n,r){$e.p=t,Ua=e,Zr=n,Jr=r}function ze(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:Zr&&Zr()},a),n.o=/ *go\d+/.test(l),a.className=Sn.apply(n,r)+(l?" "+l:"");let c=e;return e[0]&&(c=a.as||e,delete a.as),Jr&&c[0]&&Jr(a),Ua(c,a)}return t?t(s):s}}var fp=e=>typeof e=="function",Cn=(e,t)=>fp(e)?e(t):e,hp=(()=>{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}})(),pp=20,Wa=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,pp)};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}))}}},wn=[],Qe={toasts:[],pausedAt:void 0},et=e=>{Qe=Wa(Qe,e),wn.forEach(t=>{t(Qe)})},mp={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},gp=(e={})=>{let[t,n]=g.useState(Qe),r=g.useRef(Qe);g.useEffect(()=>(r.current!==Qe&&n(Qe),wn.push(n),()=>{let o=wn.indexOf(n);o>-1&&wn.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)||mp[o.type],style:{...e.style,...(l=e[o.type])==null?void 0:l.style,...o.style}}});return{...t,toasts:s}},yp=(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)||hp()}),Yt=e=>(t,n)=>{let r=yp(t,e,n);return et({type:2,toast:r}),r.id},Z=(e,t)=>Yt("blank")(e,t);Z.error=Yt("error"),Z.success=Yt("success"),Z.loading=Yt("loading"),Z.custom=Yt("custom"),Z.dismiss=e=>{et({type:3,toastId:e})},Z.remove=e=>et({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?Cn(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?Cn(t.error,s):void 0;o?Z.error(o,{id:r,...n,...n==null?void 0:n.error}):Z.dismiss(r)}),e};var vp=(e,t)=>{et({type:1,toast:{id:e,height:t}})},xp=()=>{et({type:5,time:Date.now()})},Zt=new Map,bp=1e3,Sp=(e,t=bp)=>{if(Zt.has(e))return;let n=setTimeout(()=>{Zt.delete(e),et({type:4,toastId:e})},t);Zt.set(e,n)},Cp=e=>{let{toasts:t,pausedAt:n}=gp(e);g.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=g.useCallback(()=>{n&&et({type:6,time:Date.now()})},[n]),s=g.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,m)=>m<d&&p.visible).length;return u.filter(p=>p.visible).slice(...a?[f+1]:[0,f]).reduce((p,m)=>p+(m.height||0)+l,0)},[t]);return g.useEffect(()=>{t.forEach(o=>{if(o.dismissed)Sp(o.id,o.removeDelay);else{let i=Zt.get(o.id);i&&(clearTimeout(i),Zt.delete(o.id))}})},[t]),{toasts:t,handlers:{updateHeight:vp,startPause:xp,endPause:r,calculateOffset:s}}},wp=De`
123
+ */const nc=ce("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"}]]);/**
124
+ * @license lucide-react v0.483.0 - ISC
125
+ *
126
+ * This source code is licensed under the ISC license.
127
+ * See the LICENSE file in the root directory of this source tree.
128
+ */const xs=ce("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),bs=g.createContext({});function rc(e){const t=g.useRef(null);return t.current===null&&(t.current=e()),t.current}const Rn=typeof window<"u",sc=Rn?g.useLayoutEffect:g.useEffect,Fn=g.createContext(null),Ss=g.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function oc(e=!0){const t=g.useContext(Fn);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,o=g.useId();g.useEffect(()=>{if(e)return s(o)},[e]);const i=g.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,i]:[!0]}function Bn(e,t){e.indexOf(t)===-1&&e.push(t)}function $n(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ue=e=>e;let lt=ue,Ne=ue;process.env.NODE_ENV!=="production"&&(lt=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Ne=(e,t)=>{if(!e)throw new Error(t)});const ic={useManualTiming:!1};function zn(e){let t;return()=>(t===void 0&&(t=e()),t)}const ct=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Un{constructor(){this.subscriptions=[]}add(t){return Bn(this.subscriptions,t),()=>$n(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 Se=e=>e*1e3,_e=e=>e/1e3;function Cs(e,t){return t?e*(1e3/t):0}const ws=new Set;function sn(e,t,n){e||ws.has(t)||(console.warn(t),ws.add(t))}const ac=zn(()=>window.ScrollTimeline!==void 0);class lc{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(ac()&&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 cc extends lc{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function Xn(e,t){return e?e[t]||e.default||e:void 0}const Wn=2e4;function Ts(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Wn;)t+=n,r=e.next(t);return t>=Wn?1/0:t}function Kn(e){return typeof e=="function"}function _s(e,t){e.timeline=t,e.onfinish=null}const Gn=e=>Array.isArray(e)&&typeof e[0]=="number",uc={linearEasing:void 0};function dc(e,t){const n=zn(e);return()=>{var r;return(r=uc[t])!==null&&r!==void 0?r:n()}}const on=dc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Es=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)r+=e(ct(0,s-1,o))+", ";return`linear(${r.substring(0,r.length-2)})`};function Ps(e){return!!(typeof e=="function"&&on()||!e||typeof e=="string"&&(e in qn||on())||Gn(e)||Array.isArray(e)&&e.every(Ps))}const Mt=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,qn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Mt([0,.65,.55,1]),circOut:Mt([.55,0,1,.45]),backIn:Mt([.31,.01,.66,-.59]),backOut:Mt([.33,1.53,.69,.99])};function As(e,t){if(e)return typeof e=="function"&&on()?Es(e,t):Gn(e)?Mt(e):Array.isArray(e)?e.map(n=>As(n,t)||qn.easeOut):qn[e]}const an=["read","resolveKeyframes","update","preRender","render","postRender"],Ms={value:null};function fc(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 y=p&&s?n:r;return f&&i.add(d),y.has(d)||y.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&&Ms.value&&Ms.value.frameloop[t].push(l),l=0,n.clear(),s=!1,o&&(o=!1,u.process(d))}};return u}const hc=40;function Ls(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,i=an.reduce((v,b)=>(v[b]=fc(o,t?b: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,hc),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))},m=()=>{n=!0,r=!0,s.isProcessing||e(p)};return{schedule:an.reduce((v,b)=>{const C=i[b];return v[b]=(A,T=!1,M=!1)=>(n||m(),C.schedule(A,T,M)),v},{}),cancel:v=>{for(let b=0;b<an.length;b++)i[an[b]].cancel(v)},state:s,steps:i}}const{schedule:W,cancel:Ve,state:ne,steps:Hn}=Ls(typeof requestAnimationFrame<"u"?requestAnimationFrame:ue,!0),{schedule:Yn}=Ls(queueMicrotask,!1);let ln;function pc(){ln=void 0}const Ce={now:()=>(ln===void 0&&Ce.set(ne.isProcessing||ic.useManualTiming?ne.timestamp:performance.now()),ln),set:e=>{ln=e,queueMicrotask(pc)}},ye={x:!1,y:!1};function Ds(){return ye.x||ye.y}function mc(e){return e==="x"||e==="y"?ye[e]?null:(ye[e]=!0,()=>{ye[e]=!1}):ye.x||ye.y?null:(ye.x=ye.y=!0,()=>{ye.x=ye.y=!1})}function gc(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 Os(e,t){const n=gc(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function ks(e){return!(e.pointerType==="touch"||Ds())}function yc(e,t,n={}){const[r,s,o]=Os(e,n),i=a=>{if(!ks(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{ks(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,s)};return r.forEach(a=>{a.addEventListener("pointerenter",i,s)}),o}function js(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 Ns=(e,t)=>t?e===t?!0:Ns(e,t.parentElement):!1,Zn=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,vc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function xc(e){return vc.has(e.tagName)||e.tabIndex!==-1}const Lt=new WeakSet;function Vs(e){return t=>{t.key==="Enter"&&e(t)}}function Jn(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const bc=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Vs(()=>{if(Lt.has(n))return;Jn(n,"down");const s=Vs(()=>{Jn(n,"up")}),o=()=>Jn(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 Is(e){return Zn(e)&&!Ds()}function Sc(e,t,n={}){const[r,s,o]=Os(e,n),i=a=>{const l=a.currentTarget;if(!l||!Is(a)||Lt.has(l))return;Lt.add(l),js(a,"set");const c=t(l,a),u=(p,m)=>{l.removeEventListener("pointerup",d),l.removeEventListener("pointercancel",f),js(p,"release"),!(!Is(p)||!Lt.has(l))&&(Lt.delete(l),typeof c=="function"&&c(p,{success:m}))},d=p=>{(p.isTrusted?Cc(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)||Ns(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,!xc(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0)),a.addEventListener("pointerdown",i,s),l&&a.addEventListener("focus",c=>bc(c,s),s)}),o}function Cc(e,t){return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}const Rs=30,wc=e=>!isNaN(parseFloat(e));class Tc{constructor(t,n={}){this.version="12.5.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,s=!0)=>{const o=Ce.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=Ce.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=wc(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&sn(!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 Un);const r=this.events[t].add(n);return t==="change"?()=>{r(),W.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=Ce.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Rs)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Rs);return Cs(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 Dt(e,t){return new Tc(e,t)}const Fs=g.createContext({strict:!1}),Bs={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ut={};for(const e in Bs)ut[e]={isEnabled:t=>Bs[e].some(n=>!!t[n])};function _c(e){for(const t in e)ut[t]={...ut[t],...e[t]}}const Ec=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function cn(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Ec.has(e)}let $s=e=>!cn(e);function Pc(e){e&&($s=t=>t.startsWith("on")?!cn(t):e(t))}try{Pc(require("@emotion/is-prop-valid").default)}catch{}function Ac(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||($s(s)||n===!0&&cn(s)||!t&&!cn(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}function Mc(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&sn(!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 un=g.createContext({});function dn(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ot(e){return typeof e=="string"||Array.isArray(e)}const Qn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],er=["initial",...Qn];function fn(e){return dn(e.animate)||er.some(t=>Ot(e[t]))}function zs(e){return!!(fn(e)||e.variants)}function Lc(e,t){if(fn(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ot(n)?n:void 0,animate:Ot(r)?r:void 0}}return e.inherit!==!1?t:{}}function Dc(e){const{initial:t,animate:n}=Lc(e,g.useContext(un));return g.useMemo(()=>({initial:t,animate:n}),[Us(t),Us(n)])}function Us(e){return Array.isArray(e)?e.join(" "):e}const Oc=Symbol.for("motionComponentSymbol");function dt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function kc(e,t,n){return g.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):dt(n)&&(n.current=r))},[t])}const tr=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Xs="data-"+tr("framerAppearId"),Ws=g.createContext({});function jc(e,t,n,r,s){var o,i;const{visualElement:a}=g.useContext(un),l=g.useContext(Fs),c=g.useContext(Fn),u=g.useContext(Ss).reducedMotion,d=g.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const f=d.current,p=g.useContext(Ws);f&&!f.projection&&s&&(f.type==="html"||f.type==="svg")&&Nc(d.current,n,s,p);const m=g.useRef(!1);g.useInsertionEffect(()=>{f&&m.current&&f.update(n,c)});const y=n[Xs],S=g.useRef(!!y&&!(!((o=window.MotionHandoffIsComplete)===null||o===void 0)&&o.call(window,y))&&((i=window.MotionHasOptimisedAnimation)===null||i===void 0?void 0:i.call(window,y)));return sc(()=>{f&&(m.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Yn.render(f.render),S.current&&f.animationState&&f.animationState.animateChanges())}),g.useEffect(()=>{f&&(!S.current&&f.animationState&&f.animationState.animateChanges(),S.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,y)}),S.current=!1))}),f}function Nc(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:Ks(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!i||a&&dt(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function Ks(e){if(e)return e.options.allowProjection!==!1?e.projection:Ks(e.parent)}function Vc({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:s}){var o,i;e&&_c(e);function a(c,u){let d;const f={...g.useContext(Ss),...c,layoutId:Ic(c)},{isStatic:p}=f,m=Dc(c),y=r(c,p);if(!p&&Rn){Rc(f,e);const S=Fc(f);d=S.MeasureLayout,m.visualElement=jc(s,y,f,t,S.ProjectionNode)}return x.jsxs(un.Provider,{value:m,children:[d&&m.visualElement?x.jsx(d,{visualElement:m.visualElement,...f}):null,n(s,c,kc(y,m.visualElement,u),y,p,m.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=g.forwardRef(a);return l[Oc]=s,l}function Ic({layoutId:e}){const t=g.useContext(bs).id;return t&&e!==void 0?t+"-"+e:e}function Rc(e,t){const n=g.useContext(Fs).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?lt(!1,r):Ne(!1,r)}}function Fc(e){const{drag:t,layout:n}=ut;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Gs=e=>t=>typeof t=="string"&&t.startsWith(e),nr=Gs("--"),Bc=Gs("var(--"),rr=e=>Bc(e)?$c.test(e.split("/*")[0].trim()):!1,$c=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,kt={};function zc(e){for(const t in e)kt[t]=e[t],nr(t)&&(kt[t].isCSSVariable=!0)}const ft=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ke=new Set(ft);function qs(e,{layout:t,layoutId:n}){return Ke.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!kt[e]||e==="opacity")}const oe=e=>!!(e&&e.getVelocity),Hs=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Ee=(e,t,n)=>n>t?t:n<e?e:n,ht={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},jt={...ht,transform:e=>Ee(0,1,e)},hn={...ht,default:1},Nt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ie=Nt("deg"),we=Nt("%"),D=Nt("px"),Uc=Nt("vh"),Xc=Nt("vw"),Ys={...we,parse:e=>we.parse(e)/100,transform:e=>we.transform(e*100)},Wc={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},Kc={rotate:Ie,rotateX:Ie,rotateY:Ie,rotateZ:Ie,scale:hn,scaleX:hn,scaleY:hn,scaleZ:hn,skew:Ie,skewX:Ie,skewY:Ie,distance:D,translateX:D,translateY:D,translateZ:D,x:D,y:D,z:D,perspective:D,transformPerspective:D,opacity:jt,originX:Ys,originY:Ys,originZ:D},Zs={...ht,transform:Math.round},sr={...Wc,...Kc,zIndex:Zs,size:D,fillOpacity:jt,strokeOpacity:jt,numOctaves:Zs},Gc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},qc=ft.length;function Hc(e,t,n){let r="",s=!0;for(let o=0;o<qc;o++){const i=ft[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,sr[i]);if(!l){s=!1;const u=Gc[i]||i;r+=`${u}(${c}) `}n&&(t[i]=c)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function or(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(Ke.has(l)){i=!0;continue}else if(nr(l)){s[l]=c;continue}else{const u=Hs(c,sr[l]);l.startsWith("origin")?(a=!0,o[l]=u):r[l]=u}}if(t.transform||(i||n?r.transform=Hc(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 ir=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Js(e,t,n){for(const r in t)!oe(t[r])&&!qs(r,n)&&(e[r]=t[r])}function Yc({transformTemplate:e},t){return g.useMemo(()=>{const n=ir();return or(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Zc(e,t){const n=e.style||{},r={};return Js(r,n,e),Object.assign(r,Yc(e,t)),r}function Jc(e,t){const n={},r=Zc(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 Qc=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function ar(e){return typeof e!="string"||e.includes("-")?!1:!!(Qc.indexOf(e)>-1||/[A-Z]/u.test(e))}const eu={offset:"stroke-dashoffset",array:"stroke-dasharray"},tu={offset:"strokeDashoffset",array:"strokeDasharray"};function nu(e,t,n=1,r=0,s=!0){e.pathLength=1;const o=s?eu:tu;e[o.offset]=D.transform(-r);const i=D.transform(t),a=D.transform(n);e[o.array]=`${i} ${a}`}function Qs(e,t,n){return typeof e=="string"?e:D.transform(t+n*e)}function ru(e,t,n){const r=Qs(t,e.x,e.width),s=Qs(n,e.y,e.height);return`${r} ${s}`}function lr(e,{attrX:t,attrY:n,attrScale:r,originX:s,originY:o,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(or(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:m}=e;f.transform&&(m&&(p.transform=f.transform),delete f.transform),m&&(s!==void 0||o!==void 0||p.transform)&&(p.transformOrigin=ru(m,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&&nu(f,i,a,l,!1)}const eo=()=>({...ir(),attrs:{}}),cr=e=>typeof e=="string"&&e.toLowerCase()==="svg";function su(e,t,n,r){const s=g.useMemo(()=>{const o=eo();return lr(o,t,cr(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Js(o,e.style,e),s.style={...o,...s.style}}return s}function ou(e=!1){return(n,r,s,{latestValues:o},i)=>{const l=(ar(n)?su:Jc)(r,o,i,n),c=Ac(r,typeof n=="string",e),u=n!==g.Fragment?{...c,...l,ref:s}:{},{children:d}=r,f=g.useMemo(()=>oe(d)?d.get():d,[d]);return g.createElement(n,{...u,children:f})}}function to(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function ur(e,t,n,r){if(typeof t=="function"){const[s,o]=to(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]=to(r);t=t(n!==void 0?n:e.custom,s,o)}return t}const dr=e=>Array.isArray(e),iu=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),au=e=>dr(e)?e[e.length-1]||0:e;function pn(e){const t=oe(e)?e.get():e;return iu(t)?t.toValue():t}function lu({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,s,o){const i={latestValues:cu(r,s,o,e),renderState:t()};return n&&(i.onMount=a=>n({props:r,current:a,...i}),i.onUpdate=a=>n(a)),i}const no=e=>(t,n)=>{const r=g.useContext(un),s=g.useContext(Fn),o=()=>lu(e,t,r,s);return n?o():rc(o)};function cu(e,t,n,r){const s={},o=r(e,{});for(const f in o)s[f]=pn(o[f]);let{initial:i,animate:a}=e;const l=fn(e),c=zs(e);t&&c&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||i===!1;const d=u?a:i;if(d&&typeof d!="boolean"&&!dn(d)){const f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){const m=ur(e,f[p]);if(m){const{transitionEnd:y,transition:S,...v}=m;for(const b in v){let C=v[b];if(Array.isArray(C)){const A=u?C.length-1:0;C=C[A]}C!==null&&(s[b]=C)}for(const b in y)s[b]=y[b]}}}return s}function fr(e,t,n){var r;const{style:s}=e,o={};for(const i in s)(oe(s[i])||t.style&&oe(t.style[i])||qs(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 uu={useVisualState:no({scrapeMotionValuesFromProps:fr,createRenderState:ir})};function ro(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 so(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 oo=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 io(e,t,n,r){so(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(oo.has(s)?s:tr(s),t.attrs[s])}function ao(e,t,n){const r=fr(e,t,n);for(const s in e)if(oe(e[s])||oe(t[s])){const o=ft.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[o]=e[s]}return r}const lo=["x","y","width","height","cx","cy","r"],du={useVisualState:no({scrapeMotionValuesFromProps:ao,createRenderState:eo,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(Ke.has(a)){o=!0;break}}if(!o)return;let i=!t;if(t)for(let a=0;a<lo.length;a++){const l=lo[a];e[l]!==t[l]&&(i=!0)}i&&W.read(()=>{ro(n,r),W.render(()=>{lr(r,s,cr(n.tagName),e.transformTemplate),io(n,r)})})}})};function fu(e,t){return function(r,{forwardMotionProps:s}={forwardMotionProps:!1}){const i={...ar(r)?du:uu,preloadedFeatures:e,useRender:ou(s),createVisualElement:t,Component:r};return Vc(i)}}function Vt(e,t,n){const r=e.getProps();return ur(r,t,n!==void 0?n:r.custom,e)}const co=new Set(["width","height","top","left","right","bottom",...ft]);function hu(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Dt(n))}function pu(e,t){const n=Vt(e,t);let{transitionEnd:r={},transition:s={},...o}=n||{};o={...o,...r};for(const i in o){const a=au(o[i]);hu(e,i,a)}}function mu(e){return!!(oe(e)&&e.add)}function hr(e,t){const n=e.getValue("willChange");if(mu(n))return n.add(t)}function uo(e){return e.props[Xs]}const fo=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,gu=1e-7,yu=12;function vu(e,t,n,r,s){let o,i,a=0;do i=t+(n-t)/2,o=fo(i,r,s)-e,o>0?n=i:t=i;while(Math.abs(o)>gu&&++a<yu);return i}function It(e,t,n,r){if(e===t&&n===r)return ue;const s=o=>vu(o,0,1,e,n);return o=>o===0||o===1?o:fo(s(o),t,r)}const ho=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,po=e=>t=>1-e(1-t),mo=It(.33,1.53,.69,.99),pr=po(mo),go=ho(pr),yo=e=>(e*=2)<1?.5*pr(e):.5*(2-Math.pow(2,-10*(e-1))),mr=e=>1-Math.sin(Math.acos(e)),vo=po(mr),xo=ho(mr),bo=e=>/^0[^.\s]+$/u.test(e);function xu(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||bo(e):!0}const Rt=e=>Math.round(e*1e5)/1e5,gr=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function bu(e){return e==null}const Su=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,yr=(e,t)=>n=>!!(typeof n=="string"&&Su.test(n)&&n.startsWith(e)||t&&!bu(n)&&Object.prototype.hasOwnProperty.call(n,t)),So=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,o,i,a]=r.match(gr);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},Cu=e=>Ee(0,255,e),vr={...ht,transform:e=>Math.round(Cu(e))},Ge={test:yr("rgb","red"),parse:So("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+vr.transform(e)+", "+vr.transform(t)+", "+vr.transform(n)+", "+Rt(jt.transform(r))+")"};function wu(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 xr={test:yr("#"),parse:wu,transform:Ge.transform},pt={test:yr("hsl","hue"),parse:So("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+we.transform(Rt(t))+", "+we.transform(Rt(n))+", "+Rt(jt.transform(r))+")"},ie={test:e=>Ge.test(e)||xr.test(e)||pt.test(e),parse:e=>Ge.test(e)?Ge.parse(e):pt.test(e)?pt.parse(e):xr.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ge.transform(e):pt.transform(e)},Tu=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function _u(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(gr))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Tu))===null||n===void 0?void 0:n.length)||0)>0}const Co="number",wo="color",Eu="var",Pu="var(",To="${}",Au=/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 Ft(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let o=0;const a=t.replace(Au,l=>(ie.test(l)?(r.color.push(o),s.push(wo),n.push(ie.parse(l))):l.startsWith(Pu)?(r.var.push(o),s.push(Eu),n.push(l)):(r.number.push(o),s.push(Co),n.push(parseFloat(l))),++o,To)).split(To);return{values:n,split:a,indexes:r,types:s}}function _o(e){return Ft(e).values}function Eo(e){const{split:t,types:n}=Ft(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===Co?o+=Rt(s[i]):a===wo?o+=ie.transform(s[i]):o+=s[i]}return o}}const Mu=e=>typeof e=="number"?0:e;function Lu(e){const t=_o(e);return Eo(e)(t.map(Mu))}const Re={test:_u,parse:_o,createTransformer:Eo,getAnimatableNone:Lu},Du=new Set(["brightness","contrast","saturate","opacity"]);function Ou(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(gr)||[];if(!r)return e;const s=n.replace(r,"");let o=Du.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+s+")"}const ku=/\b([a-z-]*)\(.*?\)/gu,br={...Re,getAnimatableNone:e=>{const t=e.match(ku);return t?t.map(Ou).join(" "):e}},ju={...sr,color:ie,backgroundColor:ie,outlineColor:ie,fill:ie,stroke:ie,borderColor:ie,borderTopColor:ie,borderRightColor:ie,borderBottomColor:ie,borderLeftColor:ie,filter:br,WebkitFilter:br},Po=e=>ju[e];function Ao(e,t){let n=Po(e);return n!==br&&(n=Re),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Nu=new Set(["auto","none","0"]);function Vu(e,t,n){let r=0,s;for(;r<e.length&&!s;){const o=e[r];typeof o=="string"&&!Nu.has(o)&&Ft(o).values.length&&(s=e[r]),r++}if(s&&n)for(const o of t)e[o]=Ao(n,s)}const qe=e=>e*180/Math.PI,Sr=e=>{const t=qe(Math.atan2(e[1],e[0]));return Cr(t)},Iu={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Sr,rotateZ:Sr,skewX:e=>qe(Math.atan(e[1])),skewY:e=>qe(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Cr=e=>(e=e%360,e<0&&(e+=360),e),Mo=Sr,Lo=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Do=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Ru={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Lo,scaleY:Do,scale:e=>(Lo(e)+Do(e))/2,rotateX:e=>Cr(qe(Math.atan2(e[6],e[5]))),rotateY:e=>Cr(qe(Math.atan2(-e[2],e[0]))),rotateZ:Mo,rotate:Mo,skewX:e=>qe(Math.atan(e[4])),skewY:e=>qe(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Oo(e){return e.includes("scale")?1:0}function wr(e,t){if(!e||e==="none")return Oo(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=Ru,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Iu,s=a}if(!s)return Oo(t);const o=r[t],i=s[1].split(",").map(Bu);return typeof o=="function"?o(i):i[o]}const Fu=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return wr(n,t)};function Bu(e){return parseFloat(e.trim())}const ko=e=>e===ht||e===D,$u=new Set(["x","y","z"]),zu=ft.filter(e=>!$u.has(e));function Uu(e){const t=[];return zu.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const mt={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>wr(t,"x"),y:(e,{transform:t})=>wr(t,"y")};mt.translateX=mt.x,mt.translateY=mt.y;const He=new Set;let Tr=!1,_r=!1;function jo(){if(_r){const e=Array.from(He).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=Uu(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)})}_r=!1,Tr=!1,He.forEach(e=>e.complete()),He.clear()}function No(){He.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(_r=!0)})}function Xu(){No(),jo()}class Er{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?(He.add(this),Tr||(Tr=!0,W.read(No),W.resolveKeyframes(jo))):(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),He.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,He.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Vo=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Wu=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ku(e){const t=Wu.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}const Gu=4;function Io(e,t,n=1){Ne(n<=Gu,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,s]=Ku(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const i=o.trim();return Vo(i)?parseFloat(i):i}return rr(s)?Io(s,t,n+1):s}const Ro=e=>t=>t.test(e),Fo=[ht,D,we,Ie,Xc,Uc,{test:e=>e==="auto",parse:e=>e}],Bo=e=>Fo.find(Ro(e));class $o extends Er{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(),rr(c))){const u=Io(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!co.has(r)||t.length!==2)return;const[s,o]=t,i=Bo(s),a=Bo(o);if(i!==a)if(ko(i)&&ko(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++)xu(t[s])&&r.push(s);r.length&&Vu(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=mt[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const 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]=mt[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const zo=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Re.test(e)||e==="0")&&!e.startsWith("url("));function qu(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Hu(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=zo(s,t),a=zo(o,t);return lt(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:qu(e)||(n==="spring"||Kn(n))&&r}const Yu=e=>e!==null;function mn(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(Yu),o=t&&n!=="loop"&&t%2===1?0:s.length-1;return!o||r===void 0?s[o]:r}const Zu=40;class Uo{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=Ce.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>Zu?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Xu(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Ce.now(),this.hasAttemptedResolve=!0;const{name:r,type:s,velocity:o,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!Hu(t,r,s,o))if(i)this.options.duration=0;else{l&&l(mn(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const G=(e,t,n)=>e+(t-e)*n;function Pr(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 Ju({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=Pr(l,a,e+1/3),o=Pr(l,a,e),i=Pr(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(i*255),alpha:r}}function gn(e,t){return n=>n>0?t:e}const Ar=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},Qu=[xr,Ge,pt],ed=e=>Qu.find(t=>t.test(e));function Xo(e){const t=ed(e);if(lt(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===pt&&(n=Ju(n)),n}const Wo=(e,t)=>{const n=Xo(e),r=Xo(t);if(!n||!r)return gn(e,t);const s={...n};return o=>(s.red=Ar(n.red,r.red,o),s.green=Ar(n.green,r.green,o),s.blue=Ar(n.blue,r.blue,o),s.alpha=G(n.alpha,r.alpha,o),Ge.transform(s))},td=(e,t)=>n=>t(e(n)),Bt=(...e)=>e.reduce(td),Mr=new Set(["none","hidden"]);function nd(e,t){return Mr.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function rd(e,t){return n=>G(e,t,n)}function Lr(e){return typeof e=="number"?rd:typeof e=="string"?rr(e)?gn:ie.test(e)?Wo:id:Array.isArray(e)?Ko:typeof e=="object"?ie.test(e)?Wo:sd:gn}function Ko(e,t){const n=[...e],r=n.length,s=e.map((o,i)=>Lr(o)(o,t[i]));return o=>{for(let i=0;i<r;i++)n[i]=s[i](o);return n}}function sd(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=Lr(e[s])(e[s],t[s]));return s=>{for(const o in r)n[o]=r[o](s);return n}}function od(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 id=(e,t)=>{const n=Re.createTransformer(t),r=Ft(e),s=Ft(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?Mr.has(e)&&!s.values.length||Mr.has(t)&&!r.values.length?nd(e,t):Bt(Ko(od(r,s),s.values),n):(lt(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),gn(e,t))};function Go(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?G(e,t,n):Lr(e)(e,t)}const ad=5;function qo(e,t,n){const r=Math.max(t-ad,0);return Cs(n-e(r),t-r)}const q={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 ld({duration:e=q.duration,bounce:t=q.bounce,velocity:n=q.velocity,mass:r=q.mass}){let s,o;lt(e<=Se(q.maxDuration),"Spring duration must be 10 seconds or less");let i=1-t;i=Ee(q.minDamping,q.maxDamping,i),e=Ee(q.minDuration,q.maxDuration,_e(e)),i<1?(s=c=>{const u=c*i,d=u*e,f=u-n,p=Dr(c,i),m=Math.exp(-d);return Ho-f/p*m},o=c=>{const d=c*i*e,f=d*n+n,p=Math.pow(i,2)*Math.pow(c,2)*e,m=Math.exp(-d),y=Dr(Math.pow(c,2),i);return(-s(c)+Ho>0?-1:1)*((f-p)*m)/y}):(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=ud(s,o,a);if(e=Se(e),isNaN(l))return{stiffness:q.stiffness,damping:q.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const cd=12;function ud(e,t,n){let r=n;for(let s=1;s<cd;s++)r=r-e(r)/t(r);return r}function Dr(e,t){return e*Math.sqrt(1-t*t)}const dd=["duration","bounce"],fd=["stiffness","damping","mass"];function Yo(e,t){return t.some(n=>e[n]!==void 0)}function hd(e){let t={velocity:q.velocity,stiffness:q.stiffness,damping:q.damping,mass:q.mass,isResolvedFromDuration:!1,...e};if(!Yo(e,fd)&&Yo(e,dd))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,o=2*Ee(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:q.mass,stiffness:s,damping:o}}else{const n=ld(e);t={...t,...n,mass:q.mass},t.isResolvedFromDuration=!0}return t}function Zo(e=q.visualDuration,t=q.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}=hd({...n,velocity:-_e(n.velocity||0)}),m=f||0,y=c/(2*Math.sqrt(l*u)),S=i-o,v=_e(Math.sqrt(l/u)),b=Math.abs(S)<5;r||(r=b?q.restSpeed.granular:q.restSpeed.default),s||(s=b?q.restDelta.granular:q.restDelta.default);let C;if(y<1){const T=Dr(v,y);C=M=>{const j=Math.exp(-y*v*M);return i-j*((m+y*v*S)/T*Math.sin(T*M)+S*Math.cos(T*M))}}else if(y===1)C=T=>i-Math.exp(-v*T)*(S+(m+v*S)*T);else{const T=v*Math.sqrt(y*y-1);C=M=>{const j=Math.exp(-y*v*M),P=Math.min(T*M,300);return i-j*((m+y*v*S)*Math.sinh(P)+T*S*Math.cosh(P))/T}}const A={calculatedDuration:p&&d||null,next:T=>{const M=C(T);if(p)a.done=T>=d;else{let j=0;y<1&&(j=T===0?Se(m):qo(C,T,M));const P=Math.abs(j)<=r,V=Math.abs(i-M)<=s;a.done=P&&V}return a.value=a.done?i:M,a},toString:()=>{const T=Math.min(Ts(A),Wn),M=Es(j=>A.next(T*j).value,T,30);return T+"ms "+M}};return A}function Jo({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=P=>a!==void 0&&P<a||l!==void 0&&P>l,m=P=>a===void 0?l:l===void 0||Math.abs(a-P)<Math.abs(l-P)?a:l;let y=n*t;const S=d+y,v=i===void 0?S:i(S);v!==S&&(y=v-d);const b=P=>-y*Math.exp(-P/r),C=P=>v+b(P),A=P=>{const V=b(P),_=C(P);f.done=Math.abs(V)<=c,f.value=f.done?v:_};let T,M;const j=P=>{p(f.value)&&(T=P,M=Zo({keyframes:[f.value,m(f.value)],velocity:qo(C,P,f.value),damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return j(0),{calculatedDuration:null,next:P=>{let V=!1;return!M&&T===void 0&&(V=!0,A(P),j(P)),T!==void 0&&P>=T?M.next(P-T):(!V&&A(P),f)}}}const pd=It(.42,0,1,1),md=It(0,0,.58,1),Qo=It(.42,0,.58,1),gd=e=>Array.isArray(e)&&typeof e[0]!="number",ei={linear:ue,easeIn:pd,easeInOut:Qo,easeOut:md,circIn:mr,circInOut:xo,circOut:vo,backIn:pr,backInOut:go,backOut:mo,anticipate:yo},ti=e=>{if(Gn(e)){Ne(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,s]=e;return It(t,n,r,s)}else if(typeof e=="string")return Ne(ei[e]!==void 0,`Invalid easing type '${e}'`),ei[e];return e};function yd(e,t,n){const r=[],s=n||Go,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]||ue:t;a=Bt(l,a)}r.push(a)}return r}function vd(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const o=e.length;if(Ne(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=yd(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=ct(e[d],e[d+1],u);return a[d](f)};return n?u=>c(Ee(e[0],e[o-1],u)):c}function xd(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=ct(0,t,r);e.push(G(n,1,s))}}function bd(e){const t=[0];return xd(t,e.length-1),t}function Sd(e,t){return e.map(n=>n*t)}function Cd(e,t){return e.map(()=>t||Qo).splice(0,e.length-1)}function $t({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=gd(r)?r.map(ti):ti(r),o={done:!1,value:t[0]},i=Sd(n&&n.length===t.length?n:bd(t),e),a=vd(i,t,{ease:Array.isArray(s)?s:Cd(t,s)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}const wd=e=>{const t=({timestamp:n})=>e(n);return{start:()=>W.update(t,!0),stop:()=>Ve(t),now:()=>ne.isProcessing?ne.timestamp:Ce.now()}},Td={decay:Jo,inertia:Jo,tween:$t,keyframes:$t,spring:Zo},_d=e=>e/100;class Or extends Uo{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)||Er,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=Kn(n)?n:Td[n]||$t;let l,c;process.env.NODE_ENV!=="production"&&a!==$t&&Ne(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),a!==$t&&typeof t[0]!="number"&&(l=Bt(_d,Go(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=Ts(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:P}=this.options;return{done:!0,value:P[P.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:m,repeatDelay:y,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),b=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let C=this.currentTime,A=o;if(p){const P=Math.min(this.currentTime,u)/d;let V=Math.floor(P),_=P%1;!_&&P>=1&&(_=1),_===1&&V--,V=Math.min(V,p+1),!!(V%2)&&(m==="reverse"?(_=1-_,y&&(_-=y/d)):m==="mirror"&&(A=i)),C=Ee(0,1,_)*d}const T=b?{done:!1,value:l[0]}:A.next(C);a&&(T.value=a(T.value));let{done:M}=T;!b&&c!==null&&(M=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const j=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return j&&s!==void 0&&(T.value=mn(l,this.options,s)),S&&S(T.value),j&&this.finish(),T}get duration(){const{resolved:t}=this;return t?_e(t.calculatedDuration):0}get time(){return _e(this.currentTime)}set time(t){t=Se(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=_e(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=wd,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 Ed=new Set(["opacity","clipPath","filter","transform"]);function Pd(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=As(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 Ad=zn(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),yn=10,Md=2e4;function Ld(e){return Kn(e.type)||e.type==="spring"||!Ps(e.ease)}function Dd(e,t){const n=new Or({...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<Md;)r=n.sample(o),s.push(r.value),o+=yn;return{times:void 0,keyframes:s,duration:o-yn,ease:"linear"}}const ni={anticipate:yo,backInOut:go,circInOut:xo};function Od(e){return e in ni}class ri extends Uo{constructor(t){super(t);const{name:n,motionValue:r,element:s,keyframes:o}=this.options;this.resolver=new $o(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"&&on()&&Od(o)&&(o=ni[o]),Ld(this.options)){const{onComplete:d,onUpdate:f,motionValue:p,element:m,...y}=this.options,S=Dd(t,y);t=S.keyframes,t.length===1&&(t[1]=t[0]),r=S.duration,s=S.times,o=S.ease,i="keyframes"}const u=Pd(a.owner.current,l,t,{...this.options,duration:r,times:s,ease:o});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(_s(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;a.set(mn(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:s,type:i,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return _e(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return _e(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Se(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 ue;const{animation:r}=n;_s(r,t)}return ue}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,m=new Or({...p,keyframes:r,duration:s,type:o,ease:i,times:a,isGenerator:!0}),y=Se(this.time);c.setWithVelocity(m.sample(y-yn).value,m.sample(y).value,yn)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay: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 Ad()&&r&&Ed.has(r)&&!l&&!c&&!s&&o!=="mirror"&&i!==0&&a!=="inertia"}}const kd={type:"spring",stiffness:500,damping:25,restSpeed:10},jd=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Nd={type:"keyframes",duration:.8},Vd={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Id=(e,{keyframes:t})=>t.length>2?Nd:Ke.has(e)?e.startsWith("scale")?jd(t[1]):kd:Vd;function Rd({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 kr=(e,t,n,r={},s,o)=>i=>{const a=Xn(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Se(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};Rd(a)||(u={...u,...Id(e,u)}),u.duration&&(u.duration=Se(u.duration)),u.repeatDelay&&(u.repeatDelay=Se(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=mn(u.keyframes,a);if(f!==void 0)return W.update(()=>{u.onUpdate(f),u.onComplete()}),new cc([])}return!o&&ri.supports(u)?new ri(u):new Or(u)};function Fd({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function si(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&&Fd(u,d))continue;const m={delay:n,...Xn(i||{},d)};let y=!1;if(window.MotionHandoffAnimation){const v=uo(e);if(v){const b=window.MotionHandoffAnimation(v,d,W);b!==null&&(m.startTime=b,y=!0)}}hr(e,d),f.start(kr(d,f,p,e.shouldReduceMotion&&co.has(d)?{type:!1}:m,e,y));const S=f.animation;S&&c.push(S)}return a&&Promise.all(c).then(()=>{W.update(()=>{a&&pu(e,a)})}),c}function jr(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(si(e,s,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=o;return Bd(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 Bd(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($d).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(jr(c,t,{...o,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function $d(e,t){return e.sortNodePosition(t)}function zd(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(o=>jr(e,o,n));r=Promise.all(s)}else if(typeof t=="string")r=jr(e,t,n);else{const s=typeof t=="function"?Vt(e,t,n.custom):t;r=Promise.all(si(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function oi(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const Ud=er.length;function ii(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?ii(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Ud;n++){const r=er[n],s=e.props[r];(Ot(s)||s===!1)&&(t[r]=s)}return t}const Xd=[...Qn].reverse(),Wd=Qn.length;function Kd(e){return t=>Promise.all(t.map(({animation:n,options:r})=>zd(e,n,r)))}function Gd(e){let t=Kd(e),n=ai(),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:m,...y}=f;c={...c,...y,...m}}return c};function o(l){t=l(e)}function i(l){const{props:c}=e,u=ii(e.parent)||{},d=[],f=new Set;let p={},m=1/0;for(let S=0;S<Wd;S++){const v=Xd[S],b=n[v],C=c[v]!==void 0?c[v]:u[v],A=Ot(C),T=v===l?b.isActive:null;T===!1&&(m=S);let M=C===u[v]&&C!==c[v]&&A;if(M&&r&&e.manuallyAnimateOnMount&&(M=!1),b.protectedKeys={...p},!b.isActive&&T===null||!C&&!b.prevProp||dn(C)||typeof C=="boolean")continue;const j=qd(b.prevProp,C);let P=j||v===l&&b.isActive&&!M&&A||S>m&&A,V=!1;const _=Array.isArray(C)?C:[C];let z=_.reduce(s(v),{});T===!1&&(z={});const{prevResolvedValues:$={}}=b,re={...$,...z},de=U=>{P=!0,f.has(U)&&(V=!0,f.delete(U)),b.needsAnimating[U]=!0;const O=e.getValue(U);O&&(O.liveStyle=!1)};for(const U in re){const O=z[U],R=$[U];if(p.hasOwnProperty(U))continue;let K=!1;dr(O)&&dr(R)?K=!oi(O,R):K=O!==R,K?O!=null?de(U):f.add(U):O!==void 0&&f.has(U)?de(U):b.protectedKeys[U]=!0}b.prevProp=C,b.prevResolvedValues=z,b.isActive&&(p={...p,...z}),r&&e.blockInitialAnimation&&(P=!1),P&&(!(M&&j)||V)&&d.push(..._.map(U=>({animation:U,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 b=e.getBaseTarget(v),C=e.getValue(v);C&&(C.liveStyle=!0),S[v]=b??null}),d.push({animation:S})}let y=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?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=ai(),r=!0}}}function qd(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!oi(t,e):!1}function Ye(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ai(){return{animate:Ye(!0),whileInView:Ye(),whileHover:Ye(),whileTap:Ye(),whileDrag:Ye(),whileFocus:Ye(),exit:Ye()}}class Fe{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Hd extends Fe{constructor(t){super(t),t.animationState||(t.animationState=Gd(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();dn(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let Yd=0;class Zd extends Fe{constructor(){super(...arguments),this.id=Yd++}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 Jd={animation:{Feature:Hd},exit:{Feature:Zd}};function zt(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Ut(e){return{point:{x:e.pageX,y:e.pageY}}}const Qd=e=>t=>Zn(t)&&e(t,Ut(t));function Xt(e,t,n,r){return zt(e,t,Qd(n),r)}function li({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function ef({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function tf(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const ci=1e-4,nf=1-ci,rf=1+ci,ui=.01,sf=0-ui,of=0+ui;function ae(e){return e.max-e.min}function af(e,t,n){return Math.abs(e-t)<=n}function di(e,t,n,r=.5){e.origin=r,e.originPoint=G(t.min,t.max,e.origin),e.scale=ae(n)/ae(t),e.translate=G(n.min,n.max,e.origin)-e.originPoint,(e.scale>=nf&&e.scale<=rf||isNaN(e.scale))&&(e.scale=1),(e.translate>=sf&&e.translate<=of||isNaN(e.translate))&&(e.translate=0)}function Wt(e,t,n,r){di(e.x,t.x,n.x,r?r.originX:void 0),di(e.y,t.y,n.y,r?r.originY:void 0)}function fi(e,t,n){e.min=n.min+t.min,e.max=e.min+ae(t)}function lf(e,t,n){fi(e.x,t.x,n.x),fi(e.y,t.y,n.y)}function hi(e,t,n){e.min=t.min-n.min,e.max=e.min+ae(t)}function Kt(e,t,n){hi(e.x,t.x,n.x),hi(e.y,t.y,n.y)}const pi=()=>({translate:0,scale:1,origin:0,originPoint:0}),gt=()=>({x:pi(),y:pi()}),mi=()=>({min:0,max:0}),Y=()=>({x:mi(),y:mi()});function pe(e){return[e("x"),e("y")]}function Nr(e){return e===void 0||e===1}function Vr({scale:e,scaleX:t,scaleY:n}){return!Nr(e)||!Nr(t)||!Nr(n)}function Ze(e){return Vr(e)||gi(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function gi(e){return yi(e.x)||yi(e.y)}function yi(e){return e&&e!=="0%"}function vn(e,t,n){const r=e-n,s=t*r;return n+s}function vi(e,t,n,r,s){return s!==void 0&&(e=vn(e,s,r)),vn(e,n,r)+t}function Ir(e,t=0,n=1,r,s){e.min=vi(e.min,t,n,r,s),e.max=vi(e.max,t,n,r,s)}function xi(e,{x:t,y:n}){Ir(e.x,t.translate,t.scale,t.originPoint),Ir(e.y,n.translate,n.scale,n.originPoint)}const bi=.999999999999,Si=1.0000000000001;function cf(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&&vt(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,xi(e,i)),r&&Ze(o.latestValues)&&vt(e,o.latestValues))}t.x<Si&&t.x>bi&&(t.x=1),t.y<Si&&t.y>bi&&(t.y=1)}function yt(e,t){e.min=e.min+t,e.max=e.max+t}function Ci(e,t,n,r,s=.5){const o=G(e.min,e.max,s);Ir(e,t,n,o,r)}function vt(e,t){Ci(e.x,t.x,t.scaleX,t.scale,t.originX),Ci(e.y,t.y,t.scaleY,t.scale,t.originY)}function wi(e,t){return li(tf(e.getBoundingClientRect(),t))}function uf(e,t,n){const r=wi(e,n),{scroll:s}=t;return s&&(yt(r.x,s.offset.x),yt(r.y,s.offset.y)),r}const Ti=({current:e})=>e?e.ownerDocument.defaultView:null,_i=(e,t)=>Math.abs(e-t);function df(e,t){const n=_i(e.x,t.x),r=_i(e.y,t.y);return Math.sqrt(n**2+r**2)}class Ei{constructor(t,n,{transformPagePoint:r,contextWindow: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=Fr(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=df(d.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:m}=d,{timestamp:y}=ne;this.history.push({...m,timestamp:y});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=Rr(f,this.transformPagePoint),W.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:p,onSessionEnd:m,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=Fr(d.type==="pointercancel"?this.lastMoveEventInfo:Rr(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,S),m&&m(d,S)},!Zn(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=s||window;const i=Ut(t),a=Rr(i,this.transformPagePoint),{point:l}=a,{timestamp:c}=ne;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,Fr(a,this.history)),this.removeListeners=Bt(Xt(this.contextWindow,"pointermove",this.handlePointerMove),Xt(this.contextWindow,"pointerup",this.handlePointerUp),Xt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ve(this.updatePoint)}}function Rr(e,t){return t?{point:t(e.point)}:e}function Pi(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Fr({point:e},t){return{point:e,delta:Pi(e,Ai(t)),offset:Pi(e,ff(t)),velocity:hf(t,.1)}}function ff(e){return e[0]}function Ai(e){return e[e.length-1]}function hf(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=Ai(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>Se(t)));)n--;if(!r)return{x:0,y:0};const o=_e(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 pf(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?G(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?G(n,e,r.max):Math.min(e,n)),e}function Mi(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function mf(e,{top:t,left:n,bottom:r,right:s}){return{x:Mi(e.x,n,s),y:Mi(e.y,t,r)}}function Li(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function gf(e,t){return{x:Li(e.x,t.x),y:Li(e.y,t.y)}}function yf(e,t){let n=.5;const r=ae(e),s=ae(t);return s>r?n=ct(t.min,t.max-r,e.min):r>s&&(n=ct(e.min,e.max-s,t.min)),Ee(0,1,n)}function vf(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 Br=.35;function xf(e=Br){return e===!1?e=0:e===!0&&(e=Br),{x:Di(e,"left","right"),y:Di(e,"top","bottom")}}function Di(e,t,n){return{min:Oi(e,t),max:Oi(e,n)}}function Oi(e,t){return typeof e=="number"?e:e[t]||0}const bf=new WeakMap;class Sf{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=Y(),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(Ut(u).point)},o=(u,d)=>{const{drag:f,dragPropagation:p,onDragStart:m}=this.getProps();if(f&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=mc(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),pe(S=>{let v=this.getAxisMotionValue(S).get()||0;if(we.test(v)){const{projection:b}=this.visualElement;if(b&&b.layout){const C=b.layout.layoutBox[S];C&&(v=ae(C)*(parseFloat(v)/100))}}this.originPoint[S]=v}),m&&W.postRender(()=>m(u,d)),hr(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},i=(u,d)=>{const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:m,onDrag:y}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:S}=d;if(p&&this.currentDirection===null){this.currentDirection=Cf(S),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,S),this.updateAxis("y",d.point,S),this.visualElement.render(),y&&y(u,d)},a=(u,d)=>this.stop(u,d),l=()=>pe(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Ei(t,{onSessionStart:s,onStart:o,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Ti(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&&W.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||!xn(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=pf(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&&dt(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&s?this.constraints=mf(s.layoutBox,n):this.constraints=!1,this.elastic=xf(r),o!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&pe(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=vf(s.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!dt(t))return!1;const r=t.current;Ne(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=uf(r,s.root,this.visualElement.getTransformPagePoint());let i=gf(s.layout.layoutBox,o);if(n){const a=n(ef(i));this.hasMutatedConstraints=!!a,a&&(i=li(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=pe(u=>{if(!xn(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,m={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return hr(this.visualElement,t),r.start(kr(t,r,0,n,this.visualElement,!1))}stopAnimation(){pe(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){pe(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){pe(n=>{const{drag:r}=this.getProps();if(!xn(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]-G(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!dt(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};pe(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();s[i]=yf({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(),pe(i=>{if(!xn(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(G(l,c,s[i]))})}addListeners(){if(!this.visualElement.current)return;bf.set(this.visualElement,this);const t=this.visualElement.current,n=Xt(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();dt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,o=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),W.read(r);const i=zt(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(pe(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=Br,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function xn(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Cf(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class wf extends Fe{constructor(t){super(t),this.removeGroupControls=ue,this.removeListeners=ue,this.controls=new Sf(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ue}unmount(){this.removeGroupControls(),this.removeListeners()}}const ki=e=>(t,n)=>{e&&W.postRender(()=>e(t,n))};class Tf extends Fe{constructor(){super(...arguments),this.removePointerDownListener=ue}onPointerDown(t){this.session=new Ei(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ti(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:ki(t),onStart:ki(n),onMove:r,onEnd:(o,i)=>{delete this.session,s&&W.postRender(()=>s(o,i))}}}mount(){this.removePointerDownListener=Xt(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const bn={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ji(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Gt={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(D.test(e))e=parseFloat(e);else return e;const n=ji(e,t.target.x),r=ji(e,t.target.y);return`${n}% ${r}%`}},_f={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=Re.parse(e);if(s.length>5)return r;const o=Re.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=G(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 Ef extends g.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:o}=t;zc(Pf),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()})),bn.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()||W.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Yn.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 Ni(e){const[t,n]=oc(),r=g.useContext(bs);return x.jsx(Ef,{...e,layoutGroup:r,switchLayoutGroup:g.useContext(Ws),isPresent:t,safeToRemove:n})}const Pf={borderRadius:{...Gt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Gt,borderTopRightRadius:Gt,borderBottomLeftRadius:Gt,borderBottomRightRadius:Gt,boxShadow:_f};function Af(e,t,n){const r=oe(e)?e:Dt(e);return r.start(kr("",r,t,n)),r.animation}function Mf(e){return e instanceof SVGElement&&e.tagName!=="svg"}const Lf=(e,t)=>e.depth-t.depth;class Df{constructor(){this.children=[],this.isDirty=!1}add(t){Bn(this.children,t),this.isDirty=!0}remove(t){$n(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Lf),this.isDirty=!1,this.children.forEach(t)}}function Of(e,t){const n=Ce.now(),r=({timestamp:s})=>{const o=s-n;o>=t&&(Ve(r),e(o-t))};return W.read(r,!0),()=>Ve(r)}const Vi=["TopLeft","TopRight","BottomLeft","BottomRight"],kf=Vi.length,Ii=e=>typeof e=="string"?parseFloat(e):e,Ri=e=>typeof e=="number"||D.test(e);function jf(e,t,n,r,s,o){s?(e.opacity=G(0,n.opacity!==void 0?n.opacity:1,Nf(r)),e.opacityExit=G(t.opacity!==void 0?t.opacity:1,0,Vf(r))):o&&(e.opacity=G(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<kf;i++){const a=`border${Vi[i]}Radius`;let l=Fi(t,a),c=Fi(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Ri(l)===Ri(c)?(e[a]=Math.max(G(Ii(l),Ii(c),r),0),(we.test(c)||we.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=G(t.rotate||0,n.rotate||0,r))}function Fi(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Nf=Bi(0,.5,vo),Vf=Bi(.5,.95,ue);function Bi(e,t,n){return r=>r<e?0:r>t?1:n(ct(e,t,r))}function $i(e,t){e.min=t.min,e.max=t.max}function me(e,t){$i(e.x,t.x),$i(e.y,t.y)}function zi(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Ui(e,t,n,r,s){return e-=t,e=vn(e,1/n,r),s!==void 0&&(e=vn(e,1/s,r)),e}function If(e,t=0,n=1,r=.5,s,o=e,i=e){if(we.test(t)&&(t=parseFloat(t),t=G(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=G(o.min,o.max,r);e===o&&(a-=t),e.min=Ui(e.min,t,n,a,s),e.max=Ui(e.max,t,n,a,s)}function Xi(e,t,[n,r,s],o,i){If(e,t[n],t[r],t[s],t.scale,o,i)}const Rf=["x","scaleX","originX"],Ff=["y","scaleY","originY"];function Wi(e,t,n,r){Xi(e.x,t,Rf,n?n.x:void 0,r?r.x:void 0),Xi(e.y,t,Ff,n?n.y:void 0,r?r.y:void 0)}function Ki(e){return e.translate===0&&e.scale===1}function Gi(e){return Ki(e.x)&&Ki(e.y)}function qi(e,t){return e.min===t.min&&e.max===t.max}function Bf(e,t){return qi(e.x,t.x)&&qi(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 Yi(e,t){return Hi(e.x,t.x)&&Hi(e.y,t.y)}function Zi(e){return ae(e.x)/ae(e.y)}function Ji(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class $f{constructor(){this.members=[]}add(t){Bn(this.members,t),t.scheduleRender()}remove(t){if($n(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(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 zf(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:m}=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) `),m&&(r+=`skewY(${m}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const $r=["","X","Y","Z"],Uf={visibility:"hidden"},Qi=1e3;let Xf=0;function zr(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function ea(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=uo(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",W,!(s||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&ea(r)}function ta({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(i={},a=t==null?void 0:t()){this.id=Xf++,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(Gf),this.nodes.forEach(Jf),this.nodes.forEach(Qf),this.nodes.forEach(qf)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Df)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Un),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=Mf(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=Of(f,250),bn.hasAnimatedSinceResize&&(bn.hasAnimatedSinceResize=!1,this.nodes.forEach(ra))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||u.getDefaultTransition()||sh,{onLayoutAnimationStart:S,onLayoutAnimationComplete:v}=u.getProps(),b=!this.targetLayout||!Yi(this.targetLayout,m),C=!f&&p;if(this.options.layoutRoot||this.resumeFrom||C||f&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,C);const A={...Xn(y,"layout"),onPlay:S,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(A.delay=0,A.type=!1),this.startAnimation(A)}else f||ra(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}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,Ve(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(eh),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ea(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(na);return}this.isUpdating||this.nodes.forEach(Yf),this.isUpdating=!1,this.nodes.forEach(Zf),this.nodes.forEach(Wf),this.nodes.forEach(Kf),this.clearAllSnapshots();const a=Ce.now();ne.delta=Ee(0,1e3/60,a-ne.timestamp),ne.timestamp=a,ne.isProcessing=!0,Hn.update.process(ne),Hn.preRender.process(ne),Hn.render.process(ne),ne.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Yn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Hf),this.sharedNodes.forEach(th)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,W.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){W.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ae(this.snapshot.measuredBox.x)&&!ae(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=Y(),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&&!Gi(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||Ze(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)),oh(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var i;const{visualElement:a}=this.options;if(!a)return Y();const l=a.measureViewportBox();if(!(((i=this.scroll)===null||i===void 0?void 0:i.wasRoot)||this.path.some(ih))){const{scroll:u}=this.root;u&&(yt(l.x,u.offset.x),yt(l.y,u.offset.y))}return l}removeElementScroll(i){var a;const l=Y();if(me(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&&me(l,i),yt(l.x,d.offset.x),yt(l.y,d.offset.y))}return l}applyTransform(i,a=!1){const l=Y();me(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&vt(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Ze(u.latestValues)&&vt(l,u.latestValues)}return Ze(this.latestValues)&&vt(l,this.latestValues),l}removeTransform(i){const a=Y();me(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Ze(c.latestValues))continue;Vr(c.latestValues)&&c.updateSnapshot();const u=Y(),d=c.measurePageBox();me(u,d),Wi(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Ze(this.latestValues)&&Wi(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!==ne.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=ne.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Y(),this.relativeTargetOrigin=Y(),Kt(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),me(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Y(),this.targetWithTransforms=Y()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),lf(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):me(this.target,this.layout.layoutBox),xi(this.target,this.targetDelta)):me(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=Y(),this.relativeTargetOrigin=Y(),Kt(this.relativeTargetOrigin,this.target,p.target),me(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Vr(this.parent.latestValues)||gi(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var i;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((i=this.parent)===null||i===void 0)&&i.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===ne.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;me(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;cf(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=Y());const{target:m}=a;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(zi(this.prevProjectionDelta.x,this.projectionDelta.x),zi(this.prevProjectionDelta.y,this.projectionDelta.y)),Wt(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!Ji(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ji(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),i){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=gt(),this.projectionDelta=gt(),this.projectionDeltaWithTransform=gt()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=gt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Y(),p=l?l.source:void 0,m=this.layout?this.layout.source:void 0,y=p!==m,S=this.getStack(),v=!S||S.members.length<=1,b=!!(y&&!v&&this.options.crossfade===!0&&!this.path.some(rh));this.animationProgress=0;let C;this.mixTargetDelta=A=>{const T=A/1e3;sa(d.x,i.x,T),sa(d.y,i.y,T),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Kt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),nh(this.relativeTarget,this.relativeTargetOrigin,f,T),C&&Bf(this.relativeTarget,C)&&(this.isProjectionDirty=!1),C||(C=Y()),me(C,this.relativeTarget)),y&&(this.animationValues=u,jf(u,c,this.latestValues,T,b,v)),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&&(Ve(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=W.update(()=>{bn.hasAnimatedSinceResize=!0,this.currentAnimation=Af(0,Qi,{...i,onUpdate:a=>{this.mixTargetDelta(a),i.onUpdate&&i.onUpdate(a)},onStop:()=>{},onComplete:()=>{i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Qi),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=i;if(!(!a||!l||!c)){if(this!==i&&this.layout&&c&&ca(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Y();const d=ae(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const f=ae(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}me(a,l),vt(a,u),Wt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new $f),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&&zr("z",i,c,this.animationValues);for(let u=0;u<$r.length;u++)zr(`rotate${$r[u]}`,i,c,this.animationValues),zr(`skew${$r[u]}`,i,c,this.animationValues);i.render();for(const u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);i.scheduleRender()}getProjectionStyles(i){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Uf;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=pn(i==null?void 0:i.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const y={};return this.options.layoutId&&(y.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,y.pointerEvents=pn(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!Ze(this.latestValues)&&(y.transform=u?u({},""):"none",this.hasProjected=!1),y}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=zf(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));const{x:p,y:m}=this.projectionDelta;c.transformOrigin=`${p.origin*100}% ${m.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 y in kt){if(f[y]===void 0)continue;const{correct:S,applyTo:v,isCSSVariable:b}=kt[y],C=c.transform==="none"?f[y]:S(f[y],d);if(v){const A=v.length;for(let T=0;T<A;T++)c[v[T]]=C}else b?this.options.visualElement.renderState.vars[y]=C:c[y]=C}return this.options.layoutId&&(c.pointerEvents=d===this?pn(i==null?void 0:i.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(na),this.root.sharedNodes.clear()}}}function Wf(e){e.updateLayout()}function Kf(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"?pe(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],p=ae(f);f.min=r[d].min,f.max=f.min+p}):ca(o,n.layoutBox,r)&&pe(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],p=ae(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=gt();Wt(a,r,n.layoutBox);const l=gt();i?Wt(l,e.applyTransform(s,!0),n.measuredBox):Wt(l,r,n.layoutBox);const c=!Gi(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:p}=d;if(f&&p){const m=Y();Kt(m,n.layoutBox,f.layoutBox);const y=Y();Kt(y,r,p.layoutBox),Yi(m,y)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=m,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 Gf(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function qf(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Hf(e){e.clearSnapshot()}function na(e){e.clearMeasurements()}function Yf(e){e.isLayoutDirty=!1}function Zf(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function ra(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Jf(e){e.resolveTargetDelta()}function Qf(e){e.calcProjection()}function eh(e){e.resetSkewAndRotation()}function th(e){e.removeLeadSnapshot()}function sa(e,t,n){e.translate=G(t.translate,0,n),e.scale=G(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function oa(e,t,n,r){e.min=G(t.min,n.min,r),e.max=G(t.max,n.max,r)}function nh(e,t,n,r){oa(e.x,t.x,n.x,r),oa(e.y,t.y,n.y,r)}function rh(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const sh={duration:.45,ease:[.4,0,.1,1]},ia=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),aa=ia("applewebkit/")&&!ia("chrome/")?Math.round:ue;function la(e){e.min=aa(e.min),e.max=aa(e.max)}function oh(e){la(e.x),la(e.y)}function ca(e,t,n){return e==="position"||e==="preserve-aspect"&&!af(Zi(t),Zi(n),.2)}function ih(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const ah=ta({attachResizeListener:(e,t)=>zt(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ur={current:void 0},ua=ta({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ur.current){const e=new ah({});e.mount(window),e.setOptions({layoutScroll:!0}),Ur.current=e}return Ur.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),lh={pan:{Feature:Tf},drag:{Feature:wf,ProjectionNode:ua,MeasureLayout:Ni}};function da(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&&W.postRender(()=>o(t,Ut(t)))}class ch extends Fe{mount(){const{current:t}=this.node;t&&(this.unmount=yc(t,(n,r)=>(da(this.node,r,"Start"),s=>da(this.node,s,"End"))))}unmount(){}}class uh extends Fe{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=Bt(zt(this.node.current,"focus",()=>this.onFocus()),zt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function fa(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),o=r[s];o&&W.postRender(()=>o(t,Ut(t)))}class dh extends Fe{mount(){const{current:t}=this.node;t&&(this.unmount=Sc(t,(n,r)=>(fa(this.node,r,"Start"),(s,{success:o})=>fa(this.node,s,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Xr=new WeakMap,Wr=new WeakMap,fh=e=>{const t=Xr.get(e.target);t&&t(e)},hh=e=>{e.forEach(fh)};function ph({root:e,...t}){const n=e||document;Wr.has(n)||Wr.set(n,{});const r=Wr.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(hh,{root:e,...t})),r[s]}function mh(e,t,n){const r=ph(t);return Xr.set(e,n),r.observe(e),()=>{Xr.delete(e),r.unobserve(e)}}const gh={some:0,all:1};class yh extends Fe{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:gh[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 mh(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(vh(t,n))&&this.startObserver()}unmount(){}}function vh({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const xh={inView:{Feature:yh},tap:{Feature:dh},focus:{Feature:uh},hover:{Feature:ch}},bh={layout:{ProjectionNode:ua,MeasureLayout:Ni}},Kr={current:null},ha={current:!1};function Sh(){if(ha.current=!0,!!Rn)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Kr.current=e.matches;e.addListener(t),t()}else Kr.current=!1}const Ch=[...Fo,ie,Re],wh=e=>Ch.find(Ro(e)),Th=new WeakMap;function _h(e,t,n){for(const r in t){const s=t[r],o=n[r];if(oe(s))e.addValue(r,s),process.env.NODE_ENV==="development"&&sn(s.version==="12.5.0",`Attempting to mix Motion versions ${s.version} with 12.5.0 may not work as expected.`);else if(oe(o))e.addValue(r,Dt(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,Dt(i!==void 0?i:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const pa=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Eh{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=Er,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=Ce.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,W.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=fn(n),this.isVariantNode=zs(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 m=f[p];l[p]!==void 0&&oe(m)&&m.set(l[p],!1)}}mount(t){this.current=t,Th.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),ha.current||Sh(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Kr.current,process.env.NODE_ENV!=="production"&&sn(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(),Ve(this.notifyUpdate),Ve(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=Ke.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&W.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 ut){const n=ut[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):Y()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<pa.length;r++){const s=pa[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=_h(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=Dt(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)||bo(s))?s=parseFloat(s):!wh(s)&&Re.test(n)&&(s=Ao(t,n)),this.setBaseTarget(t,oe(s)?s.get():s)),oe(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=ur(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&&!oe(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 Un),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class ma extends Eh{constructor(){super(...arguments),this.KeyframeResolver=$o}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;oe(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Ph(e){return window.getComputedStyle(e)}class Ah extends ma{constructor(){super(...arguments),this.type="html",this.renderInstance=so}readValueFromInstance(t,n){if(Ke.has(n))return Fu(t,n);{const r=Ph(t),s=(nr(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){or(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return fr(t,n,r)}}class Mh extends ma{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Y,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&ro(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ke.has(n)){const r=Po(n);return r&&r.default||0}return n=oo.has(n)?n:tr(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return ao(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&W.postRender(this.updateDimensions)}build(t,n,r){lr(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,s){io(t,n,r,s)}mount(t){this.isSVGTag=cr(t.tagName),super.mount(t)}}const Lh=(e,t)=>ar(e)?new Mh(t):new Ah(t,{allowProjection:e!==g.Fragment}),Dh=fu({...Jd,...xh,...lh,...bh},Lh),Je=Mc(Dh),Oh={root:"_root_uup2j_1"},ga={bgDefault:"c-corporate-default-bg",cBlack:"c-corporate-default-black",cBlue:"c-corporate-default-blue",bgDark:"c-corporate-default-dark-bg",cDarkBlue:"c-corporate-default-dark-blue",cDarkGreen:"c-corporate-default-dark-green",cGreen:"c-corporate-default-green",cRichBlue:"c-corporate-default-rich-blue",grey050:"c-grey-050",grey100:"c-grey-100",grey200:"c-grey-200",grey300:"c-grey-300",grey400:"c-grey-400",grey500:"c-grey-500",grey600:"c-grey-600",grey700:"c-grey-700",grey800:"c-grey-800",grey900:"c-grey-900",rFull:"radius-full",rL:"radius-l",rM:"radius-m",rNone:"radius-none",rS:"radius-s",rXL:"radius-xl",rXS:"radius-xs",rXXL:"radius-xxl",rXXS:"radius-xxs",pXXS:"p-xxs",pXS:"p-xs",pS:"p-s",pM:"p-m",pL:"p-l",pXL:"p-xl",pXXL:"p-xxl",pxXXS:"px-xxs",pxXS:"px-xs",pxS:"px-s",pxM:"px-m",pxL:"px-l",pxXL:"px-xl",pxXXL:"px-xxl",pyXXS:"py-xxs",pyXS:"py-xs",pyS:"py-s",pyM:"py-m",pyL:"py-l",pyXL:"py-xl",pyXXL:"py-xxl",ptXXS:"pt-xxs",ptXS:"pt-xs",ptS:"pt-s",ptM:"pt-m",ptL:"pt-l",ptXL:"pt-xl",ptXXL:"pt-xxl",prXXS:"pr-xxs",prXS:"pr-xs",prS:"pr-s",prM:"pr-m",prL:"pr-l",prXL:"pr-xl",prXXL:"pr-xxl",pbXXS:"pb-xxs",pbXS:"pb-xs",pbS:"pb-s",pbM:"pb-m",pbL:"pb-l",pbXL:"pb-xl",pbXXL:"pb-xxl",plXXS:"pl-xxs",plXS:"pl-xs",plS:"pl-s",plM:"pl-m",plL:"pl-l",plXL:"pl-xl",plXXL:"pl-xxl",mXXS:"m-xxs",mXS:"m-xs",mS:"m-s",mM:"m-m",mL:"m-l",mXL:"m-xl",mXXL:"m-xxl",mxXXS:"mx-xxs",mxXS:"mx-xs",mxS:"mx-s",mxM:"mx-m",mxL:"mx-l",mxXL:"mx-xl",mxXXL:"mx-xxl",myXXS:"my-xxs",myXS:"my-xs",myS:"my-s",myM:"my-m",myL:"my-l",myXL:"my-xl",myXXL:"my-xxl",mtXXS:"mt-xxs",mtXS:"mt-xs",mtS:"mt-s",mtM:"mt-m",mtL:"mt-l",mtXL:"mt-xl",mtXXL:"mt-xxl",mrXXS:"mr-xxs",mrXS:"mr-xs",mrS:"mr-s",mrM:"mr-m",mrL:"mr-l",mrXL:"mr-xl",mrXXL:"mr-xxl",mbXXS:"mb-xxs",mbXS:"mb-xs",mbS:"mb-s",mbM:"mb-m",mbL:"mb-l",mbXL:"mb-xl",mbXXL:"mb-xxl",mlXXS:"ml-xxs",mlXS:"ml-xs",mlS:"ml-s",mlM:"ml-m",mlL:"ml-l",mlXL:"ml-xl",mlXXL:"ml-xxl",fsXXXS:"fs-xxxs",fsXXS:"fs-xxs",fsXS:"fs-xs",fsS:"fs-s",fsM:"fs-m",fsL:"fs-l",fsXL:"fs-xl",fsXXL:"fs-xxl",fsXXXL:"fs-xxxl",fwRegular:"fw-regular",fwSemibold:"fw-semibold",fwBold:"fw-bold",dBlock:"d-block",dInBlock:"d-in-block",taLeft:"ta-left",taCenter:"ta-center",mwSM:"mw-sm",mwMD:"mw-md",mwLG:"mw-lg",mwXL:"mw-xl",mwXXL:"mw-xxl",mw3XL:"mw-3xl",shNone:"sh-none"};function Be(e){return e&&Object.keys(e).length?Object.keys(e).filter(t=>Object.keys(ga).includes(t)).filter(t=>e[t]===!0).map(t=>ga[t]):null}const Qe="Errore: ",kh="Impossibile acquisire la posizione.",Gr="Impossibile caricare i punti di mappa.",jh="Si è verificato un errore.",Nh="Impossibile caricare i suggerimenti.",Vh="Impossibile caricare i dettagli della location.",Ih="Impossibile caricare la mappa.",Rh="Impossibile trovare punti di mappa nell'area di ricerca.",Fh="Ottieni indicazioni di navigazione per questa destinazione",Bh="Condividi questa destinazione",$h="Scarica l'evento",zh=3e3,ya=6,qt={north:47.1,south:36.6,east:18.6,west:6.6},Uh={lat:(qt.north+qt.south)/2,lng:(qt.east+qt.west)/2},Xh=2e4;function Pe(e){if(e)return e.trim().split(" ").filter(t=>t.length)}function Ae(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 qr(e){const{type:t,url:n}=e??{};switch(t){case"navigate":case"directions":return{"aria-label":Fh,as:"a",href:n??"#",target:"_blank",rel:"noopener noreferrer"};case"share":return{"aria-label":Bh,as:"a",href:n??"#",target:"_blank",rel:"noopener noreferrer"};case"event":case"calendar":return{"aria-label":$h,as:"a",href:n??"#",download:!0,target:"_blank",rel:"noopener noreferrer"};case"email":default:return{}}}function Wh(e,t){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e(...r),t)}}const va="Anchor";function xa({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 m=t||"span",y=o?Je[m]:m,S=e||"a",v=Be(f)??[],b=o?{initial:{opacity:0,y:5},animate:{opacity:1,y:0},transition:{delay:i,duration:.2}}:{},A=c||(l==="_blank"?{rel:"noopener noreferrer"}:{}).rel;return x.jsx(y,{className:H(Oh.root,"dyn-locator__"+Ae(va),Pe(s),...v),"data-variant":r,...d?{style:d}:{},...b,...f,children:x.jsx(S,{ref:p,href:a,target:l,rel:A,...u,children:n})})}xa.displayName=va;const ba=g.forwardRef(xa),Sa="ErrorBanner";function Ca({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=Be(a)??[];return x.jsxs("div",{className:H("dyn-locator__"+Ae(Sa),At.root,Pe(o),...l??[]),children:[x.jsxs("header",{className:At.header,children:[x.jsx(Hl,{size:28,color:"currentColor",className:At.icon})," ",x.jsx("h3",{children:e})]}),x.jsxs("div",{className:At.body,children:[x.jsx("p",{children:t}),n&&r&&x.jsxs("p",{children:["Prova a"," ",x.jsx(ba,{animate:!1,"aria-label":n,href:"#",onClick:r,children:n})]}),i,s&&x.jsx("div",{className:At.content,children:x.jsx("pre",{children:s})})]})]})}Ca.displayName=Sa;const wa=Ca;class Kh extends g.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Locator error: ",t,n)}render(){var t;return this.state.hasError?this.props.fallback||x.jsx("div",{className:Bl.container,children:x.jsx(wa,{message:"Something went wrong with the Locator component",errorDetails:(t=this.state.error)==null?void 0:t.message})}):this.props.children}}const Ta={ArrowLeft:Xl,ArrowUpRight:Kl,ChevronUp:ql,ChevronDown:Gl,Close:xs,Expand:Jl,Location:Zl,Search:tc,Share:nc,Target:Yl},Me={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"},xt={root:"_root_1k1dg_4",container:"_container_1k1dg_10",label:"_label_1k1dg_17",icon:"_icon_1k1dg_27"},Hr={root:"_root_71ove_4",icon:"_icon_71ove_43"};function Gh(e){return g.isValidElement(e)||typeof e=="function"}function qh(e){return e?typeof e=="string"||typeof e=="object"&&"name"in e:!1}function Hh(e){return!!e&&typeof e=="object"&&"path"in e}const _a="Icon";function Ea({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",m=l?Je[p]:p,{iconMap:y}=np();function S(C){if(qh(C)){const A=typeof C=="string"?C:C.name;return y[A]?g.createElement(y[A],{...n?{ref:n}:{},...r?{title:r,titleId:r.trim().toLowerCase().replace(/[^a-z0-9\s_-]/g,"").replace(/\s+/g,"_")+"_id"}:{},className:Hr.icon}):'No icon found for "'+A+'"!'}return Hh(C)?(i!=="default"&&console.warn("Warning: cannot set icon stroke on a remote asset"),x.jsx("img",{...n?{ref:n}:{},src:C.path,alt:`Icona decorativa${r?" che rappresenta '"+r+"'":""}`,className:Hr.icon})):"No icon provided"}const v=Be(d)??[],b=l?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:c,duration:.2}}:{};return x.jsx(m,{ref:f,className:H(Hr.root,"dyn-locator__"+Ae(_a),Pe(a),...v),...u?{style:u}:{},"data-variant":i,"data-size":s,...o?{"data-radius":o}:{},...b,...d,children:S(t)})}Ea.displayName=_a;const $e=g.forwardRef(Ea),Pa="Tag";function Aa({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?Je[u]:u,f=Be(l)??[],p=o?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:i,duration:.2}}:{};return x.jsx(d,{ref:c,className:H(xt.root,"dyn-locator__"+Ae(Pa),Pe(s),...f),"data-icon-position":t,...a?{style:a}:{},...p,...l,children:x.jsxs("div",{className:xt.container,children:[r?x.jsx("div",{className:xt.icon,children:Gh(r)?typeof r=="function"?x.jsx(r,{className:xt.icon}):r:x.jsx($e,{className:xt.icon,icon:r})}):null,x.jsx("div",{className:xt.label,children:n})]})})}Aa.displayName=Pa;const Yh=g.forwardRef(Aa),Zh={root:"_root_u5v4v_1"},Ma="IconButton";function La({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 m=e||"button",y=s?Je[m]:m,S=Be(f)??[],v=s?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:o,duration:.2}}:{},b=m==="a"?{href:l??"/",target:c??"_blank",rel:c==="_blank"?"noopener noreferrer":u}:{};return x.jsx(y,{ref:p,className:H(Zh.root,"dyn-locator__"+Ae(Ma),Pe(n),...S),"data-variant":r,"data-element":m,"aria-label":a,disabled:d,...i?{style:i}:{},...v,...b,...f,children:t})}La.displayName=Ma;const bt=g.forwardRef(La),Da={root:"_root_1fk3z_1",content:"_content_1fk3z_32"},Oa="Card";function ka({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?Je[d]:d,p=Be(c)??[],m=s?{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:o,duration:.3}}:{};return x.jsx(f,{ref:u,className:H(Da.root,"dyn-locator__"+Ae(Oa),Pe(n),...p),"data-variant":r,"data-clickable":a||!!l,onClick:l,...i?{style:i}:{},...m,...c,children:r==="bare"?t:x.jsx("div",{className:Da.content,children:t})})}ka.displayName=Oa;const Jh=g.forwardRef(ka);function ja(e){const{componentMap:t}=rp();return t[e]}const Na="LocationCard";function Va({title:e,timestamp:t,address:n,capabilities:r,on_share:s,actions:o,className:i,...a},l){const c=ja("ctaButton");return x.jsx(Jh,{ref:l,variant:"bare",clickable:!0,className:H("dyn-locator__"+Ae(Na),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:x.jsxs("div",{className:Me.root,children:[x.jsxs("header",{className:Me.header,children:[t?x.jsx("time",{children:new Date(t).toLocaleDateString("it",{day:"numeric",month:"long",year:"numeric"})}):null,x.jsxs("div",{className:Me.titleContainer,children:[e?x.jsx("h4",{children:e}):null,x.jsx(bt,{className:Me.shareButton,variant:"bare",...qr(s),children:x.jsx($e,{size:"M",icon:"Share"})})]}),n?x.jsx("address",{children:n}):null]}),r!=null&&r.length?x.jsx("div",{className:Me.body,children:r.map((u,d)=>x.jsxs("div",{className:Me.capabilities,children:[x.jsx("h5",{children:u.title}),x.jsx("ul",{className:Me.tagContainer,children:(u.capabilities??[]).map((f,p)=>x.jsx(Yh,{as:"li",animationDelay:+`.${p+1}`,className:Me.tag,children:f.label},p))})]},d))}):null,o!=null&&o.length?x.jsx("div",{className:Me.cta,children:o.map((u,d)=>x.jsx(c,{animate:!1,fullWidth:!0,variant:d===0?"themed":"secondary",...qr(u),children:u.label},d))}):null]})})}Va.displayName=Na;const Qh=g.forwardRef(Va),Ia={root:"_root_1h5d4_1",loader:"_loader_1h5d4_73"},Ra="Button";function Fa({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,...m},y){const S=e||(u?"a":"button"),v=l?Je[S]:S,b=Be(m)??[],C=l?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:c,duration:.2}}:{},A=u?{href:u,target:d,rel:d==="_blank"?"noopener noreferrer":f}:{};return x.jsx(v,{ref:y,className:H(Ia.root,"dyn-locator__"+Ae(Ra),Pe(n),...b),"data-variant":r,"data-size":s,"data-full-width":a,disabled:o||i,...p?{style:p}:{},...C,...A,...m,children:i?x.jsxs("span",{style:{display:"flex",gap:10},children:[t,x.jsx("span",{className:Ia.loader,"aria-hidden":"true"})]}):t})}Fa.displayName=Ra;const Ht=g.forwardRef(Fa),Ba={locationCard:Qh,ctaButton:Ht},ep={iconMap:Ta,componentMap:Ba},Yr=g.createContext(ep);function tp({children:e,customIcons:t,customComponents:n}){const r={...Ta,...t??{}},s={...Ba,...n??{}};return x.jsx(Yr.Provider,{value:{iconMap:r,componentMap:s},children:e})}function np(){const{iconMap:e}=g.useContext(Yr);return{iconMap:e}}function rp(){const{componentMap:e}=g.useContext(Yr);return{componentMap:e}}var Yt=(e=>(e.CLUSTERS="clusters",e.MARKERS="markers",e.FIND="find",e))(Yt||{});const $a=g.createContext({endpointMap:{},apiUrl:""});function sp({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 x.jsx($a.Provider,{value:{endpointMap:t,apiUrl:n},children:e})}function op(e){const{endpointMap:t,apiUrl:n}=g.useContext($a);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 ip={data:""},ap=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||ip,lp=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,cp=/\/\*[^]*?\*\/| +/g,za=/\n+/g,ze=(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"?ze(i,o):o+"{"+ze(i,o[1]=="k"?"":t)+"}":typeof i=="object"?r+=ze(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+=ze.p?ze.p(o,i):o+":"+i+";")}return n+(t&&s?t+"{"+s+"}":s)+r},Le={},Ua=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+Ua(e[n]);return t}return e},up=(e,t,n,r,s)=>{let o=Ua(e),i=Le[o]||(Le[o]=(l=>{let c=0,u=11;for(;c<l.length;)u=101*u+l.charCodeAt(c++)>>>0;return"go"+u})(o));if(!Le[i]){let l=o!==e?e:(c=>{let u,d,f=[{}];for(;u=lp.exec(c.replace(cp,""));)u[4]?f.shift():u[3]?(d=u[3].replace(za," ").trim(),f.unshift(f[0][d]=f[0][d]||{})):f[0][u[1]]=u[2].replace(za," ").trim();return f[0]})(e);Le[i]=ze(s?{["@keyframes "+i]:l}:l,n?"":"."+i)}let a=n&&Le.g?Le.g:null;return n&&(Le.g=Le[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)})(Le[i],t,r,a),i},dp=(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?"":ze(a,""):a===!1?"":a}return r+s+(i??"")},"");function Sn(e){let t=this||{},n=e.call?e(t.p):e;return up(n.unshift?n.raw?dp(n,[].slice.call(arguments,1),t.p):n.reduce((r,s)=>Object.assign(r,s&&s.call?s(t.p):s),{}):n,ap(t.target),t.g,t.o,t.k)}let Xa,Zr,Jr;Sn.bind({g:1});let De=Sn.bind({k:1});function fp(e,t,n,r){ze.p=t,Xa=e,Zr=n,Jr=r}function Ue(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:Zr&&Zr()},a),n.o=/ *go\d+/.test(l),a.className=Sn.apply(n,r)+(l?" "+l:"");let c=e;return e[0]&&(c=a.as||e,delete a.as),Jr&&c[0]&&Jr(a),Xa(c,a)}return t?t(s):s}}var hp=e=>typeof e=="function",Cn=(e,t)=>hp(e)?e(t):e,pp=(()=>{let e=0;return()=>(++e).toString()})(),Wa=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),mp=20,Ka=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,mp)};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 Ka(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}))}}},wn=[],et={toasts:[],pausedAt:void 0},tt=e=>{et=Ka(et,e),wn.forEach(t=>{t(et)})},gp={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},yp=(e={})=>{let[t,n]=g.useState(et),r=g.useRef(et);g.useEffect(()=>(r.current!==et&&n(et),wn.push(n),()=>{let o=wn.indexOf(n);o>-1&&wn.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)||gp[o.type],style:{...e.style,...(l=e[o.type])==null?void 0:l.style,...o.style}}});return{...t,toasts:s}},vp=(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)||pp()}),Zt=e=>(t,n)=>{let r=vp(t,e,n);return tt({type:2,toast:r}),r.id},Z=(e,t)=>Zt("blank")(e,t);Z.error=Zt("error"),Z.success=Zt("success"),Z.loading=Zt("loading"),Z.custom=Zt("custom"),Z.dismiss=e=>{tt({type:3,toastId:e})},Z.remove=e=>tt({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?Cn(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?Cn(t.error,s):void 0;o?Z.error(o,{id:r,...n,...n==null?void 0:n.error}):Z.dismiss(r)}),e};var xp=(e,t)=>{tt({type:1,toast:{id:e,height:t}})},bp=()=>{tt({type:5,time:Date.now()})},Jt=new Map,Sp=1e3,Cp=(e,t=Sp)=>{if(Jt.has(e))return;let n=setTimeout(()=>{Jt.delete(e),tt({type:4,toastId:e})},t);Jt.set(e,n)},wp=e=>{let{toasts:t,pausedAt:n}=yp(e);g.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=g.useCallback(()=>{n&&tt({type:6,time:Date.now()})},[n]),s=g.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,m)=>m<d&&p.visible).length;return u.filter(p=>p.visible).slice(...a?[f+1]:[0,f]).reduce((p,m)=>p+(m.height||0)+l,0)},[t]);return g.useEffect(()=>{t.forEach(o=>{if(o.dismissed)Cp(o.id,o.removeDelay);else{let i=Jt.get(o.id);i&&(clearTimeout(i),Jt.delete(o.id))}})},[t]),{toasts:t,handlers:{updateHeight:xp,startPause:bp,endPause:r,calculateOffset:s}}},Tp=De`
124
129
  from {
125
130
  transform: scale(0) rotate(45deg);
126
131
  opacity: 0;
@@ -128,7 +133,7 @@ from {
128
133
  to {
129
134
  transform: scale(1) rotate(45deg);
130
135
  opacity: 1;
131
- }`,Tp=De`
136
+ }`,_p=De`
132
137
  from {
133
138
  transform: scale(0);
134
139
  opacity: 0;
@@ -136,7 +141,7 @@ from {
136
141
  to {
137
142
  transform: scale(1);
138
143
  opacity: 1;
139
- }`,_p=De`
144
+ }`,Ep=De`
140
145
  from {
141
146
  transform: scale(0) rotate(90deg);
142
147
  opacity: 0;
@@ -144,7 +149,7 @@ from {
144
149
  to {
145
150
  transform: scale(1) rotate(90deg);
146
151
  opacity: 1;
147
- }`,Pp=ze("div")`
152
+ }`,Pp=Ue("div")`
148
153
  width: 20px;
149
154
  opacity: 0;
150
155
  height: 20px;
@@ -153,14 +158,14 @@ to {
153
158
  position: relative;
154
159
  transform: rotate(45deg);
155
160
 
156
- animation: ${wp} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
161
+ animation: ${Tp} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
157
162
  forwards;
158
163
  animation-delay: 100ms;
159
164
 
160
165
  &:after,
161
166
  &:before {
162
167
  content: '';
163
- animation: ${Tp} 0.15s ease-out forwards;
168
+ animation: ${_p} 0.15s ease-out forwards;
164
169
  animation-delay: 150ms;
165
170
  position: absolute;
166
171
  border-radius: 3px;
@@ -173,18 +178,18 @@ to {
173
178
  }
174
179
 
175
180
  &:before {
176
- animation: ${_p} 0.15s ease-out forwards;
181
+ animation: ${Ep} 0.15s ease-out forwards;
177
182
  animation-delay: 180ms;
178
183
  transform: rotate(90deg);
179
184
  }
180
- `,Ep=De`
185
+ `,Ap=De`
181
186
  from {
182
187
  transform: rotate(0deg);
183
188
  }
184
189
  to {
185
190
  transform: rotate(360deg);
186
191
  }
187
- `,Ap=ze("div")`
192
+ `,Mp=Ue("div")`
188
193
  width: 12px;
189
194
  height: 12px;
190
195
  box-sizing: border-box;
@@ -192,8 +197,8 @@ to {
192
197
  border-radius: 100%;
193
198
  border-color: ${e=>e.secondary||"#e0e0e0"};
194
199
  border-right-color: ${e=>e.primary||"#616161"};
195
- animation: ${Ep} 1s linear infinite;
196
- `,Mp=De`
200
+ animation: ${Ap} 1s linear infinite;
201
+ `,Lp=De`
197
202
  from {
198
203
  transform: scale(0) rotate(45deg);
199
204
  opacity: 0;
@@ -201,7 +206,7 @@ from {
201
206
  to {
202
207
  transform: scale(1) rotate(45deg);
203
208
  opacity: 1;
204
- }`,Lp=De`
209
+ }`,Dp=De`
205
210
  0% {
206
211
  height: 0;
207
212
  width: 0;
@@ -215,7 +220,7 @@ to {
215
220
  100% {
216
221
  opacity: 1;
217
222
  height: 10px;
218
- }`,Dp=ze("div")`
223
+ }`,Op=Ue("div")`
219
224
  width: 20px;
220
225
  opacity: 0;
221
226
  height: 20px;
@@ -224,13 +229,13 @@ to {
224
229
  position: relative;
225
230
  transform: rotate(45deg);
226
231
 
227
- animation: ${Mp} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
232
+ animation: ${Lp} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
228
233
  forwards;
229
234
  animation-delay: 100ms;
230
235
  &:after {
231
236
  content: '';
232
237
  box-sizing: border-box;
233
- animation: ${Lp} 0.2s ease-out forwards;
238
+ animation: ${Dp} 0.2s ease-out forwards;
234
239
  opacity: 0;
235
240
  animation-delay: 200ms;
236
241
  position: absolute;
@@ -242,16 +247,16 @@ to {
242
247
  height: 10px;
243
248
  width: 6px;
244
249
  }
245
- `,Op=ze("div")`
250
+ `,kp=Ue("div")`
246
251
  position: absolute;
247
- `,kp=ze("div")`
252
+ `,jp=Ue("div")`
248
253
  position: relative;
249
254
  display: flex;
250
255
  justify-content: center;
251
256
  align-items: center;
252
257
  min-width: 20px;
253
258
  min-height: 20px;
254
- `,jp=De`
259
+ `,Np=De`
255
260
  from {
256
261
  transform: scale(0.6);
257
262
  opacity: 0.4;
@@ -259,20 +264,20 @@ from {
259
264
  to {
260
265
  transform: scale(1);
261
266
  opacity: 1;
262
- }`,Vp=ze("div")`
267
+ }`,Vp=Ue("div")`
263
268
  position: relative;
264
269
  transform: scale(0.6);
265
270
  opacity: 0.4;
266
271
  min-width: 20px;
267
- animation: ${jp} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
272
+ animation: ${Np} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
268
273
  forwards;
269
- `,Np=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?ee.createElement(Vp,null,t):t:n==="blank"?null:ee.createElement(kp,null,ee.createElement(Ap,{...r}),n!=="loading"&&ee.createElement(Op,null,n==="error"?ee.createElement(Pp,{...r}):ee.createElement(Dp,{...r})))},Ip=e=>`
274
+ `,Ip=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?ee.createElement(Vp,null,t):t:n==="blank"?null:ee.createElement(jp,null,ee.createElement(Mp,{...r}),n!=="loading"&&ee.createElement(kp,null,n==="error"?ee.createElement(Pp,{...r}):ee.createElement(Op,{...r})))},Rp=e=>`
270
275
  0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
271
276
  100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
272
- `,Rp=e=>`
277
+ `,Fp=e=>`
273
278
  0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
274
279
  100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
275
- `,Fp="0%{opacity:0;} 100%{opacity:1;}",Bp="0%{opacity:1;} 100%{opacity:0;}",$p=ze("div")`
280
+ `,Bp="0%{opacity:0;} 100%{opacity:1;}",$p="0%{opacity:1;} 100%{opacity:0;}",zp=Ue("div")`
276
281
  display: flex;
277
282
  align-items: center;
278
283
  background: #fff;
@@ -284,17 +289,17 @@ to {
284
289
  pointer-events: auto;
285
290
  padding: 8px 10px;
286
291
  border-radius: 8px;
287
- `,zp=ze("div")`
292
+ `,Up=Ue("div")`
288
293
  display: flex;
289
294
  justify-content: center;
290
295
  margin: 4px 10px;
291
296
  color: inherit;
292
297
  flex: 1 1 auto;
293
298
  white-space: pre-line;
294
- `,Up=(e,t)=>{let n=e.includes("top")?1:-1,[r,s]=Xa()?[Fp,Bp]:[Ip(n),Rp(n)];return{animation:t?`${De(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${De(s)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},Ka=ee.memo(({toast:e,position:t,style:n,children:r})=>{let s=e.height?Up(e.position||t||"top-center",e.visible):{opacity:0},o=ee.createElement(Np,{toast:e}),i=ee.createElement(zp,{...e.ariaProps},Cn(e.message,e));return ee.createElement($p,{className:e.className,style:{...s,...n,...e.style}},typeof r=="function"?r({icon:o,message:i}):ee.createElement(ee.Fragment,null,o,i))});dp(ee.createElement);var Xp=({id:e,className:t,style:n,onHeightUpdate:r,children:s})=>{let o=ee.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 ee.createElement("div",{ref:o,className:t,style:n},s)},Wp=(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}},Kp=Sn`
299
+ `,Xp=(e,t)=>{let n=e.includes("top")?1:-1,[r,s]=Wa()?[Bp,$p]:[Rp(n),Fp(n)];return{animation:t?`${De(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${De(s)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},Ga=ee.memo(({toast:e,position:t,style:n,children:r})=>{let s=e.height?Xp(e.position||t||"top-center",e.visible):{opacity:0},o=ee.createElement(Ip,{toast:e}),i=ee.createElement(Up,{...e.ariaProps},Cn(e.message,e));return ee.createElement(zp,{className:e.className,style:{...s,...n,...e.style}},typeof r=="function"?r({icon:o,message:i}):ee.createElement(ee.Fragment,null,o,i))});fp(ee.createElement);var Wp=({id:e,className:t,style:n,onHeightUpdate:r,children:s})=>{let o=ee.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 ee.createElement("div",{ref:o,className:t,style:n},s)},Kp=(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:Wa()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...s}},Gp=Sn`
295
300
  z-index: 9999;
296
301
  > * {
297
302
  pointer-events: auto;
298
303
  }
299
- `,Tn=16,Gp=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:s,containerStyle:o,containerClassName:i})=>{let{toasts:a,handlers:l}=Cp(n);return ee.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:Tn,left:Tn,right:Tn,bottom:Tn,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=Wp(u,d);return ee.createElement(Xp,{id:c.id,key:c.id,onHeightUpdate:l.updateHeight,className:c.visible?Kp:"",style:f},c.type==="custom"?Cn(c.message,c):s?s(c):ee.createElement(Ka,{toast:c,position:u}))}))};const Hp={root:"_root_movxa_4"};function Ga({className:e,children:t,show:n=!0,variant:r="light",...s}){const o=q("dyn-locator__overlay",Hp.root,e);return n?x.jsx("div",{className:o,"data-variant":r,...s,children:t}):null}function _n(e){const[t,n]=g.useState(!1),[r,s]=g.useState(null),{getEndpoint:o}=sp(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 qp({children:e,customComponents:t,customIcons:n,featureFlags:r,fetchLocations:s,localizationConfig:o,locations:i=[],mapId:a}){const l=I(_=>_.isFullscreen),c=I(_=>_.setLocations),u=I(_=>_.setMapId),d=I(_=>_.setFeatureFlags),f=I(_=>_.setLocalizationConfig),p=I(_=>_.setMapDetail),m=I(_=>_.shouldRefetch),y=I(_=>_.setShouldRefetch),{request:S,loading:v,error:b}=_n(qt.CLUSTERS),{request:C,loading:A,error:T}=_n(qt.MARKERS),M=v||A,j=!!b||!!T;async function E(_){var z;try{if(typeof _!="number"||_<0||isNaN(_))throw new Error("No map ID provided");const{data:$}=await S({mapId:String(_)})??{};if(!$)throw new Error("No cluster data received from the server");c((z=$.map)==null?void 0:z.call($,re=>({...re,onMarkerClick:async()=>{await N(_,re.id)}})))}catch($){console.error("Error fetching clusters: ",$),Z.error(Je+Gr),c([])}}async function N(_,z){try{if(typeof _!="number"||_<0||isNaN(_))throw new Error("No map ID provided");const{data:$}=await C({mapId:_,clusterId:z})??{};if(!$)throw new Error("No marker data received from the server");c($),p(Xe.MARKER)}catch($){console.error("Error fetching markers: ",$),Z.error(Je+Gr),c([])}}return g.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(_=>c(_)):E(a)},[]),g.useEffect(()=>{let _=!0;return m&&a&&E(a).finally(()=>{_&&y(!1)}),()=>{_=!1}},[m,a]),x.jsx("div",{id:"dyn-locator",className:q("dyn-locator__locator",gs.root),"data-fullscreen":l,children:x.jsxs(ep,{customIcons:n,customComponents:t,children:[e,x.jsxs(Ga,{show:M||j,variant:"light",children:[M?x.jsx(Et,{size:"large"}):null,j?x.jsx(Ca,{title:kh,message:Gr,actionText:"ricaricare la pagina.",errorDetails:(b==null?void 0:b.message)||(T==null?void 0:T.message),onAction:_=>{_.preventDefault(),window.location.reload()}}):null]}),x.jsx(Gp,{toastOptions:{position:"top-right",duration:3e3,error:{duration:1/0}},children:_=>x.jsx(Ka,{toast:_,children:({icon:z,message:$})=>x.jsxs(x.Fragment,{children:[z,$,_.type==="error"&&x.jsx(bt,{variant:"bare",onClick:()=>Z.dismiss(_.id),children:x.jsx(Be,{icon:"Close"})})]})})})]})})}function Ha({mapProvider:e,endpoints:t,apiUrl:n,children:r,...s}){return x.jsx(Wh,{children:x.jsx(Ol,{children:x.jsx(Rl,{mapProvider:e,children:x.jsx(rp,{endpoints:t,apiUrl:n,children:x.jsx(qp,{children:r,...s})})})})})}Ha.displayName="Locator";var Qr,qa;function Yp(){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 Zp=Yp();const Jp=ls(Zp);function Te(){return Te=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},Te.apply(null,arguments)}function tt(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 Qp(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 em(e){var t=Qp(e,"string");return typeof t=="symbol"?t:t+""}const he={NOT_LOADED:"NOT_LOADED",LOADING:"LOADING",LOADED:"LOADED",FAILED:"FAILED",AUTH_FAILURE:"AUTH_FAILURE"},tm="https://maps.googleapis.com/maps/api/js";class Jt{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=he.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=tm+"?"+l.toString(),a.nonce=((i=document.querySelector("script[nonce]"))==null?void 0:i.nonce)||"",a.onerror=()=>{this.loadingStatus=he.FAILED,this.notifyLoadingStatusListeners(),o(new Error("The Google Maps JavaScript API could not load."))},window.__googleMapsCallback__=()=>{this.loadingStatus=he.LOADED,this.notifyLoadingStatusListeners(),s()},window.gm_authFailure=()=>{this.loadingStatus=he.AUTH_FAILURE,this.notifyLoadingStatusListeners()},this.loadingStatus=he.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)}}Jt.loadingStatus=he.NOT_LOADED,Jt.serializedApiParams=void 0,Jt.listeners=[];const nm=["onLoad","onError","apiKey","version","libraries"],rm=["children"],sm="GMP_visgl_rgmlibrary_v1_default",Qt=g.createContext(null);function om(){const[e,t]=g.useState({});return{mapInstances:e,addMapInstance:(o,i="default")=>{t(a=>Te({},a,{[i]:o}))},removeMapInstance:(o="default")=>{t(i=>tt(i,[o].map(em)))},clearMapInstances:()=>{t({})}}}function im(e){const{onLoad:t,onError:n,apiKey:r,version:s,libraries:o=[]}=e,i=tt(e,nm),[a,l]=g.useState(Jt.loadingStatus),[c,u]=g.useReducer((m,y)=>m[y.name]?m:Te({},m,{[y.name]:y.value}),{}),d=g.useMemo(()=>o==null?void 0:o.join(","),[o]),f=g.useMemo(()=>JSON.stringify(Te({apiKey:r,version:s},i)),[r,s,i]),p=g.useCallback(async m=>{var y;if(c[m])return c[m];if(!((y=google)!=null&&(y=y.maps)!=null&&y.importLibrary))throw new Error("[api-provider-internal] importLibrary was called before google.maps.importLibrary was defined.");const S=await window.google.maps.importLibrary(m);return u({name:m,value:S}),S},[c]);return g.useEffect(()=>{(async()=>{try{const m=Te({key:r},i);s&&(m.v=s),(d==null?void 0:d.length)>0&&(m.libraries=d),(m.channel===void 0||m.channel<0||m.channel>999)&&delete m.channel,m.solutionChannel===void 0?m.solutionChannel=sm:m.solutionChannel===""&&delete m.solutionChannel,await Jt.load(m,y=>l(y));for(const y of["core","maps",...o])await p(y);t&&t()}catch(m){n?n(m):console.error("<ApiProvider> failed to load the Google Maps JavaScript API",m)}})()},[r,d,f]),{status:a,loadedLibraries:c,importLibrary:p}}const am=e=>{const{children:t}=e,n=tt(e,rm),{mapInstances:r,addMapInstance:s,removeMapInstance:o,clearMapInstances:i}=om(),{status:a,loadedLibraries:l,importLibrary:c}=im(n),u=g.useMemo(()=>({mapInstances:r,addMapInstance:s,removeMapInstance:o,clearMapInstances:i,status:a,loadedLibraries:l,importLibrary:c}),[r,s,o,i,a,l,c]);return g.createElement(Qt.Provider,{value:u},t)};function lm(e,t){for(const n of fm){const r=t[n],s=Ya[n];g.useEffect(()=>{if(!e||!r)return;const o=google.maps.event.addListener(e,s,i=>{r(cm(s,e,i))});return()=>o.remove()},[e,s,r])}}function cm(e,t,n){const r={type:e,map:t,detail:{},stoppable:!1,stop:()=>{}};if(um.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(dm.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"},um=["bounds_changed","center_changed","heading_changed","tilt_changed","zoom_changed"],dm=["click","contextmenu","dblclick","mousemove","mouseout","mouseover"],fm=Object.keys(Ya);function es(e,t){const n=g.useRef(void 0);(!n.current||!Jp(t,n.current))&&(n.current=t),g.useEffect(e,n.current)}const hm=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 pm(e,t){const n={},r=Object.keys(t);for(const s of r)hm.has(s)&&(n[s]=t[s]);es(()=>{e&&e.setOptions(n)},[n])}function ts(){var e;return((e=g.useContext(Qt))==null?void 0:e.status)||he.NOT_LOADED}function mm(e,t){const{viewport:n,viewState:r}=t,s=!!n;return g.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 gm(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 gm(e)?e:e.toJSON()}function ym(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;g.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 vm=()=>{const e={position:"absolute",top:0,left:0,bottom:0,right:0,zIndex:999,display:"flex",flexFlow:"column nowrap",textAlign:"center",justifyContent:"center",fontSize:".8rem",color:"rgba(0,0,0,0.6)",background:"#dddddd",padding:"1rem 1.5rem"};return g.createElement("div",{style:e},g.createElement("h2",null,"Error: AuthFailure"),g.createElement("p",null,"A problem with your API key prevents the map from rendering correctly. Please make sure the value of the ",g.createElement("code",null,"APIProvider.apiKey")," prop is correct. Check the error-message in the console for further details."))};function xm(){const[e,t]=g.useState(null),n=g.useCallback(r=>t(r),[t]);return[e,n]}function Ja(){return ts()===he.LOADED}function bm(){const[,e]=g.useReducer(t=>t+1,0);return e}function Sm(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 Cm(e){const t=bm(),n=g.useRef({center:{lat:0,lng:0},heading:0,tilt:0,zoom:0});return g.useEffect(()=>{if(!e)return;const r=google.maps.event.addListener(e,"bounds_changed",()=>{Sm(e,n),t()});return()=>r.remove()},[e,t]),n}const wm=["id","defaultBounds","defaultCenter","defaultZoom","defaultHeading","defaultTilt","reuseMaps","renderingType","colorScheme"],Tm=["padding"];class Pn{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)}}Pn.entries={};function _m(e,t){const n=Ja(),[r,s]=g.useState(null),[o,i]=xm(),a=Cm(r),{id:l,defaultBounds:c,defaultCenter:u,defaultZoom:d,defaultHeading:f,defaultTilt:p,reuseMaps:m,renderingType:y,colorScheme:S}=e,v=tt(e,wm),b=e.zoom!==void 0||e.defaultZoom!==void 0,C=e.center!==void 0||e.defaultCenter!==void 0;!c&&(!b||!C)&&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 T of Object.keys(v))v[T]===void 0&&delete v[T];const A=g.useRef(void 0);return g.useEffect(()=>{if(!o||!n)return;const{addMapInstance:T,removeMapInstance:M}=t,{mapId:j}=e,E=`${j||"default"}:${y||"default"}:${S||"LIGHT"}`;let N,_;if(m&&Pn.has(E)?(_=Pn.pop(E),N=_.getDiv(),o.appendChild(N),_.setOptions(v),setTimeout(()=>_.setCenter(_.getCenter()),0)):(N=document.createElement("div"),N.style.height="100%",o.appendChild(N),_=new google.maps.Map(N,Te({},v,y?{renderingType:y}:{},S?{colorScheme:S}:{}))),s(_),T(_,l),c){const{padding:z}=c,$=tt(c,Tm);_.fitBounds($,z)}else(!b||!C)&&_.fitBounds({east:180,west:-180,south:-90,north:90});if(A.current){const{mapId:z,cameraState:$}=A.current;z!==j&&_.setOptions($)}return()=>{A.current={mapId:j,cameraState:a.current},N.remove(),m?Pn.push(E,_):google.maps.event.clearInstanceListeners(_),s(null),M(l)}},[o,n,l,e.mapId,e.renderingType,e.colorScheme]),[r,i,a]}const Qa=g.createContext(null),el=e=>{const{children:t,id:n,className:r,style:s}=e,o=g.useContext(Qt),i=ts();if(!o)throw new Error("<Map> can only be used inside an <ApiProvider> component.");const[a,l,c]=_m(e,o);ym(a,c,e),lm(a,e),pm(a,e);const u=mm(a,e),d=!!e.controlled;g.useEffect(()=>{if(a)return u&&a.setOptions({disableDefaultUI:!0}),(u||d)&&a.setOptions({gestureHandling:"none",keyboardShortcuts:!1}),()=>{a.setOptions({gestureHandling:e.gestureHandling,keyboardShortcuts:e.keyboardShortcuts})}},[a,u,d,e.gestureHandling,e.keyboardShortcuts]);const f=e.center?Za(e.center):null;let p=null,m=null;f&&Number.isFinite(f.lat)&&Number.isFinite(f.lng)&&(p=f.lat,m=f.lng);const y=g.useMemo(()=>{var b,C,A,T,M;return{center:{lat:(b=p)!=null?b:0,lng:(C=m)!=null?C:0},zoom:(A=e.zoom)!=null?A:0,heading:(T=e.heading)!=null?T:0,tilt:(M=e.tilt)!=null?M:0}},[p,m,e.zoom,e.heading,e.tilt]);g.useLayoutEffect(()=>{if(!a||!d)return;a.moveCamera(y);const b=a.addListener("bounds_changed",()=>{a.moveCamera(y)});return()=>b.remove()},[a,d,y]);const S=g.useMemo(()=>Te({width:"100%",height:"100%",position:"relative",zIndex:u?-1:0},s),[s,u]),v=g.useMemo(()=>({map:a}),[a]);return i===he.AUTH_FAILURE?g.createElement("div",{style:Te({position:"relative"},r?{}:S),className:r},g.createElement(vm,null)):g.createElement("div",Te({ref:l,"data-testid":"map",style:r?void 0:S,className:r},n?{id:n}:{}),a?g.createElement(Qa.Provider,{value:v},t):null)};el.deckGLViewProps=!0;const tl=new Set;function Pm(...e){const t=JSON.stringify(e);tl.has(t)||(tl.add(t),console.error(...e))}const En=(e=null)=>{const t=g.useContext(Qt),{map:n}=g.useContext(Qa)||{};if(t===null)return Pm("useMap(): failed to retrieve APIProviderContext. Make sure that the <APIProvider> component exists and that the component you are calling `useMap()` from is a sibling of the <APIProvider>."),null;const{mapInstances:r}=t;return e!==null?r[e]||null:n||r.default||null};function An(e){const t=Ja(),n=g.useContext(Qt);return g.useEffect(()=>{!t||!n||n.importLibrary(e)},[t,n,e]),(n==null?void 0:n.loadedLibraries[e])||null}function St(e,t,n){g.useEffect(()=>{if(!e||!t||!n)return;const r=google.maps.event.addListener(e,t,n);return()=>r.remove()},[e,t,n])}function Mn(e,t,n){g.useEffect(()=>{e&&(e[t]=n)},[e,t,n])}function nl(e,t,n){g.useEffect(()=>{if(!(!e||!t||!n))return e.addEventListener(t,n),()=>e.removeEventListener(t,n)},[e,t,n])}function Em(e){return e.content!==void 0}function Am(e){return e.nodeType===Node.ELEMENT_NODE}const Mm=g.createContext(null),Lm={BOTTOM:["50%","100%"]},Dm=({children:e,styles:t,className:n,anchorPoint:r})=>{const[s,o]=r??Lm.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 g.createElement("div",{style:{transform:l}},g.createElement("div",{className:n,style:t},e))};function Om(e){const[t,n]=g.useState(null),[r,s]=g.useState(null),o=En(),i=An("marker"),{children:a,onClick:l,className:c,onMouseEnter:u,onMouseLeave:d,onDrag:f,onDragStart:p,onDragEnd:m,collisionBehavior:y,clickable:S,draggable:v,position:b,title:C,zIndex:A}=e,T=g.Children.count(a);return g.useEffect(()=>{if(!o||!i)return;const M=new i.AdvancedMarkerElement;M.map=o,n(M);let j=null;return T>0&&(j=document.createElement("div"),j.isCustomMarker=!0,M.content=j,s(j)),()=>{var E;M.map=null,(E=j)==null||E.remove(),n(null),s(null)}},[o,i,T]),g.useEffect(()=>{!t||!t.content||T>0||(t.content.className=c||"")},[t,c,T]),Mn(t,"position",b),Mn(t,"title",C??""),Mn(t,"zIndex",A),Mn(t,"collisionBehavior",y),g.useEffect(()=>{t&&(v!==void 0?t.gmpDraggable=v:f||p||m?t.gmpDraggable=!0:t.gmpDraggable=!1)},[t,v,f,m,p]),g.useEffect(()=>{if(!t)return;const M=S!==void 0||!!l||!!u||!!d;t.gmpClickable=M,M&&t!=null&&t.content&&Am(t.content)&&(t.content.style.pointerEvents="none",t.content.firstElementChild&&(t.content.firstElementChild.style.pointerEvents="all"))},[t,S,l,u,d]),St(t,"click",l),St(t,"drag",f),St(t,"dragstart",p),St(t,"dragend",m),nl(t==null?void 0:t.element,"mouseenter",u),nl(t==null?void 0:t.element,"mouseleave",d),[t,r]}g.forwardRef((e,t)=>{const{children:n,style:r,className:s,anchorPoint:o}=e,[i,a]=Om(e),l=g.useMemo(()=>i?{marker:i}:null,[i]);return g.useImperativeHandle(t,()=>i,[i]),a?g.createElement(Mm.Provider,{value:l},jn.createPortal(g.createElement(Dm,{anchorPoint:o,styles:r,className:s},n),a)):null});function km(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&&!Vm(t)?e[t]=n+"px":t==="float"?e.cssFloat=n:e[t]=(""+n).trim()}const jm=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 Vm(e){return jm.has(e)}const Nm=["children","headerContent","style","className","pixelOffset","anchor","shouldFocus","onClose","onCloseClick"],Im=e=>{const{children:t,headerContent:n,style:r,className:s,pixelOffset:o,anchor:i,shouldFocus:a,onClose:l,onCloseClick:c}=e,u=tt(e,Nm),d=An("maps"),[f,p]=g.useState(null),m=g.useRef(null),y=g.useRef(null);g.useEffect(()=>{if(!d)return;m.current=document.createElement("div"),y.current=document.createElement("div");const b=u;o&&(b.pixelOffset=new google.maps.Size(o[0],o[1])),n&&(b.headerContent=typeof n=="string"?n:y.current);const C=new google.maps.InfoWindow(u);return C.setContent(m.current),p(C),()=>{var A,T;C.setContent(null),(A=m.current)==null||A.remove(),(T=y.current)==null||T.remove(),m.current=null,y.current=null,p(null)}},[d]);const S=g.useRef(null);g.useEffect(()=>{!f||!m.current||(km(m.current,r||null,S.current),S.current=r||null,s!==m.current.className&&(m.current.className=s||""))},[f,s,r]),es(()=>{if(!f)return;const b=u;o?b.pixelOffset=new google.maps.Size(o[0],o[1]):b.pixelOffset=null,n?b.headerContent=typeof n=="string"?n:y.current:b.headerContent=null,f.setOptions(u)},[u,o,n]),St(f,"close",l),St(f,"closeclick",c);const v=En();return es(()=>{if(!v||!f||i===null)return;const b=!!i,C={map:v};if(i&&(C.anchor=i,Em(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 j=(A=i.content.firstElementChild)==null?void 0:A.firstElementChild,E=j==null?void 0:j.getBoundingClientRect(),N=E.x-M.x+(E.width-M.width)/2,_=E.y-M.y,z=u;z.pixelOffset=new google.maps.Size(o?o[0]+N:N,o?o[1]+_:_),f.setOptions(z)}}return a!==void 0&&(C.shouldFocus=a),f.open(C),()=>{b&&f.set("anchor",null),f.close()}},[f,i,v,a,u,o]),g.createElement(g.Fragment,null,m.current&&jn.createPortal(t,m.current),y.current!==null&&jn.createPortal(n,y.current))},Rm=["onClick","onDrag","onDragStart","onDragEnd","onMouseOver","onMouseOut"];function Fm(e){const[t,n]=g.useState(null),r=En(),{onClick:s,onDrag:o,onDragStart:i,onDragEnd:a,onMouseOver:l,onMouseOut:c}=e,u=tt(e,Rm),{position:d,draggable:f}=u;return g.useEffect(()=>{if(!r){r===void 0&&console.error("<Marker> has to be inside a Map component.");return}const p=new google.maps.Marker(u);return p.setMap(r),n(p),()=>{p.setMap(null),n(null)}},[r]),g.useEffect(()=>{if(!t)return;const p=t,m=google.maps.event;return s&&m.addListener(p,"click",s),o&&m.addListener(p,"drag",o),i&&m.addListener(p,"dragstart",i),a&&m.addListener(p,"dragend",a),l&&m.addListener(p,"mouseover",l),c&&m.addListener(p,"mouseout",c),t.setDraggable(!!f),()=>{m.clearInstanceListeners(p)}},[t,f,s,o,i,a,l,c]),g.useEffect(()=>{t&&u&&t.setOptions(u)},[t,u]),g.useEffect(()=>{f||!d||!t||t.setPosition(d)},[f,d,t]),t}const sl=g.forwardRef((e,t)=>{const n=Fm(e);return g.useImperativeHandle(t,()=>n,[n]),g.createElement(g.Fragment,null)});function Bm(){const[e,t]=g.useState(null);return[g.useCallback(r=>{t(r)},[]),e]}const nt={root:"_root_186dn_10",header:"_header_186dn_18",body:"_body_186dn_31",highlighted:"_highlighted_186dn_43"};function $m({onLocationSelect:e}){const t=ka("locationCard"),[n,r]=g.useState(!1),s=I(m=>m.locations),{labels:o}=I(m=>m.localizationConfig),i=I(m=>m.selectedLocation),a=I(m=>m.setSelectedLocation),l=g.useRef({}),c=o["LocationList.header"],u=o["LocationList.locationDesignator"],d=c.split(/(\{:\d\})/g),f=g.useMemo(()=>d.map((m,y)=>m==="{:1}"?x.jsx("span",{className:nt.highlighted,children:(s==null?void 0:s.length)??0},y):m==="{:2}"?x.jsx("span",{className:nt.highlighted,children:u},y):m),[u,s.length,d]);g.useEffect(()=>{if(i&&n){const m=l.current[i];m!=null&&m.current&&requestAnimationFrame(()=>{m.current.scrollIntoView({behavior:"smooth",block:"start"})})}},[i,n]);function p(m){return()=>{e==null||e(m.coords),a==null||a(m.id)}}return x.jsxs("div",{className:q("dyn-locator__location-list",nt.root),"data-expanded":n,children:[x.jsxs("header",{className:nt.header,onClick:()=>r(m=>!m),children:[x.jsx("span",{children:f}),x.jsx(bt,{className:nt.closeButton,variant:"bare",children:x.jsx(Be,{icon:n?"ChevronDown":"ChevronUp"})})]}),x.jsx("div",{className:nt.body,children:s!=null&&s.length?s.map(m=>{const y=m.id;l.current[y]||(l.current[y]=g.createRef());const S=l.current[y];return x.jsx(t,{ref:S,"data-active":i===m.id,onClick:p(m),...m},m.id)}):x.jsx("div",{className:nt.noResults,children:o["LocationList.noResults"]})})]})}const rt={root:"_root_1sne7_21",loaderContainer:"_loaderContainer_1sne7_29",fullscreenButton:"_fullscreenButton_1sne7_36",backButton:"_backButton_1sne7_37",areaSearchButton:"_areaSearchButton_1sne7_52",visualCue:"_visualCue_1sne7_77"},Ln={root:"_root_e0ns1_4",header:"_header_e0ns1_7",cta:"_cta_e0ns1_24"};function zm({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]=Bm(),d=g.useCallback(()=>{l==null||l("")},[l]);return x.jsxs(x.Fragment,{children:[x.jsx(sl,{ref:c,position:r,onClick:()=>{o==null||o()}}),a===e?x.jsxs(Im,{anchor:u,headerContent:t,onCloseClick:d,className:Ln.root,children:[x.jsxs("header",{className:Ln.header,children:[x.jsx("h6",{children:t}),x.jsx("address",{children:n})]}),x.jsx("div",{className:Ln.body,children:x.jsxs("div",{className:Ln.cta,children:[x.jsx(bn,{animate:!1,variant:"secondary",size:"small",...Hr((f=s==null?void 0:s.find)==null?void 0:f.call(s,p=>p.type==="navigate")),children:"Percorso"}),x.jsx(bn,{animate:!1,variant:"secondary",size:"small",onClick:i,children:"Zoom"})]})})]}):null]})}function Um(e){return"size"in e&&"range"in e&&"onMarkerClick"in e}function Xm(e){return"title"in e&&!("size"in e)}function Wm(){var ve;const[e,t]=g.useState({zoom:ga}),[n,r]=g.useState(!1),[s,o]=g.useState(!1),i=g.useRef(""),a=ts(),{request:l,loading:c}=_n(qt.FIND),u=I(L=>L.locations),d=I(L=>L.featureFlags),{labels:f}=I(L=>L.localizationConfig),p=I(L=>L.targetLocation),m=I(L=>L.clearTargetLocation),y=I(L=>L.mapDetail),S=I(L=>L.setMapDetail),v=I(L=>L.isFullscreen),b=I(L=>L.setFullscreen),C=I(L=>L.shouldRefetch),A=I(L=>L.setShouldRefetch),T=I(L=>L.setSelectedLocation),M=y===Xe.MARKER;function j({detail:L}){const{center:U,zoom:O}=L;t({center:U,zoom:O}),n||r(!0)}function E(){n&&e.center&&o(!0)}function N(L){t(U=>({center:L,zoom:U.zoom}))}function _(){o(!1),S(Xe.CLUSTER),t({center:zh,zoom:ga}),A(!0)}const z=I(L=>L.mapId),$=I(L=>L.setLocations),re=g.useCallback(async()=>{if(!e.center)return;const{lat:L,lng:U}=e.center,O={location:{type:"Feature",geometry:{type:"Point",coordinates:[U,L]},properties:{distance:Uh}}};try{const{data:R}=await l({mapId:z},{body:O})??{};if(!(R!=null&&R.pins))throw new Error("No locations found");$(R.pins),S(Xe.MARKER),o(!1)}catch(R){console.error("Error finding locations in this area: ",R),Z.error(Je+Ih)}},[e.center,l,S,z,$]);function ue(L){if(Um(L))return x.jsx(sl,{position:L.coords,icon:{path:google.maps.SymbolPath.CIRCLE,fillColor:i.current||"#00acde",fillOpacity:.6,strokeWeight:0,scale:(L.range??0)/$h,labelOrigin:new google.maps.Point(0,0)},onClick:async()=>{await L.onMarkerClick(),t({center:L.coords,zoom:L.zoom||15})}},L.id);if(Xm(L))return x.jsx(zm,{id:L.id,title:L.title??"No title",address:L.address??"No address",coords:L.coords,actions:L.actions,onZoom:()=>t({center:L.coords,zoom:18}),onClick:()=>{T(L.id)}},L.id)}if(g.useEffect(()=>{i.current=getComputedStyle(document.documentElement).getPropertyValue("--dyn-locator__colors-accent-500")},[]),g.useEffect(()=>{p&&(t({center:p.coords,zoom:p.zoom}),m())},[p,m]),a===he.LOADING)return x.jsx("div",{className:q("dyn-locator__map",rt.root),children:x.jsx("div",{className:rt.loaderContainer,children:x.jsx(Et,{size:"large"})})});if(a===he.FAILED||a===he.AUTH_FAILURE)throw new Error(Nh);if(a===he.LOADED)return x.jsxs("div",{className:q("dyn-locator__map",rt.root),children:[d.fullscreen?x.jsx(bt,{className:q(rt.fullscreenButton,"dyn-locator__map__fullscreen-button"),variant:"negative",onClick:()=>b==null?void 0:b(!v),children:x.jsx(Be,{size:"M",icon:v?"Close":"Expand"})}):null,M?x.jsx(bt,{className:q(rt.backButton,"dyn-locator__map__back-button"),variant:"negative",onClick:_,children:x.jsx(Be,{size:"M",icon:"ArrowLeft"})}):null,s?x.jsxs(x.Fragment,{children:[x.jsxs(bn,{className:q(rt.areaSearchButton,"dyn-locator__map__area-search-button",M&&"dyn-locator__map__area-search-button--with-back-button"),disabled:c,loading:c,onClick:re,children:[x.jsx(Zl,{}),f["Map.areaSearchButton"]]}),x.jsxs("div",{className:rt.visualCue,children:[x.jsx("i",{children:x.jsx(Jl,{size:48,strokeWidth:1,color:"currentColor"})}),x.jsx("span",{children:f["Map.areaSearchVisualCue"]})]})]}):null,x.jsx(el,{style:{width:"100%",height:"100%"},gestureHandling:"greedy",disableDefaultUI:!0,...e,onCameraChanged:j,onDragend:E,defaultBounds:Ht,children:!C&&((ve=u==null?void 0:u.map)==null?void 0:ve.call(u,ue))}),M?x.jsx($m,{onLocationSelect:N}):null]})}const Oe={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:m,...y},S){const v=a?Ze.div:"div",b=Fe(y)??[],C=a?{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:l,duration:.2}}:{};return x.jsxs(v,{className:q("dyn-locator__"+Ae(ol),Oe.root,Ee(t),...b??[]),"data-valid":s,"data-error":r,"data-expanded":u,"data-side-button":!!p,...f?{style:f}:{},...C,children:[n&&x.jsxs(x.Fragment,{children:[s&&x.jsx("span",{className:Oe.validIcon}),r&&x.jsx("span",{className:Oe.errorIcon})]}),e?x.jsx("label",{className:Oe.label,...y.id?{htmlFor:y.id}:{},children:e}):null,m?x.jsx("span",{className:Oe.sideOrnament,children:m}):null,x.jsx("input",{ref:S,className:q(Oe.input),"aria-label":d,"aria-invalid":r,"data-side-button":!!p,"data-side-ornament":!!m,...y}),p?x.jsx("span",{className:Oe.sideButton,children:p}):null,o&&(y==null?void 0:y.value)&&x.jsx("button",{className:Oe.clearButton,onClick:i,type:"button","aria-label":"Clear input"}),c&&u&&x.jsx("div",{className:Oe.dropdown,children:c})]})}il.displayName=ol;const Km=g.forwardRef(il),st={root:"_root_1vbtg_7",input:"_input_1vbtg_7",clearButton:"_clearButton_1vbtg_10",sideOrnament:"_sideOrnament_1vbtg_13",predictionsContainer:"_predictionsContainer_1vbtg_18",predictionItem:"_predictionItem_1vbtg_29",loadingItem:"_loadingItem_1vbtg_47"};function Gm(){const[e,t]=g.useState(""),[n,r]=g.useState([]),[s,o]=g.useState(!1),[i,a]=g.useState(!1),[l,c]=g.useState(!1),u=I(O=>O.mapId),d=I(O=>O.setLocations),f=I(O=>O.setMapDetail),p=I(O=>O.zoomToLocation),{labels:m}=I(O=>O.localizationConfig),{search:y}=I(O=>O.featureFlags),{request:S,loading:v}=_n(qt.FIND),b=An("places"),C=An("geocoding"),A=En(),T=g.useRef(null),M=g.useRef(null),j=g.useRef(null),E=g.useRef(null);g.useEffect(()=>{C&&(j.current||(j.current=new C.Geocoder))},[C]),g.useEffect(()=>{b&&(T.current||(T.current=new b.AutocompleteService),E.current||(E.current=new b.AutocompleteSessionToken))},[b]),g.useEffect(()=>{!b||!A||M.current||(M.current=new b.PlacesService(A))},[b,A]);const N=async O=>{var R;if(!O||O.length<3){r([]),o(!1);return}a(!0);try{if(!b||!T.current)throw new Error("Places library or Autocomplete Service not available");const K=await T.current.getPlacePredictions({input:O,...E.current?{sessionToken:E.current}:{}});if(a(!1),!((R=K==null?void 0:K.predictions)!=null&&R.length)){r([]),o(!1);return}r(K.predictions),o(!0)}catch(K){console.error("Error fetching predictions: ",K),a(!1),r([]),o(!1),Z.error(Je+jh)}},_=g.useMemo(()=>Xh(O=>N(O),600),[N]),z=O=>{const R=O.currentTarget.value;if(t(R),!R||R.length<3){r([]),o(!1);return}_(R)},$=async O=>{var R,K,xe,te,ke;t(O.description),o(!1);try{if(!b||!M.current)throw new Error("Places library or Places Service not available");const se=await new Promise((Ue,ot)=>{M.current.getDetails({placeId:O.place_id,fields:["geometry"],...E.current?{sessionToken:E.current}:{}},(Ct,it)=>{it===b.PlacesServiceStatus.OK&&Ct?Ue(Ct):ot(new Error(`Place details request failed with status: ${it}`))})});if((R=se==null?void 0:se.geometry)!=null&&R.location){const Ue=(xe=(K=se.geometry.location).lat)==null?void 0:xe.call(K),ot=(ke=(te=se.geometry.location).lng)==null?void 0:ke.call(te);await L({lat:Ue,lng:ot})}}catch(se){console.error("Error getting place details:",se),Z.error(Je+Vh)}finally{b&&(E.current=new b.AutocompleteSessionToken)}},re=()=>{t(""),r([]),o(!1)},ue=()=>!s||n.length===0?null:x.jsx("div",{className:st.predictionsContainer,children:i?x.jsx("div",{className:st.loadingItem,children:x.jsx(Et,{size:"medium"})}):n.map(O=>x.jsx("div",{className:st.predictionItem,onClick:()=>$(O),children:O.description},O.place_id))});async function ve(O){O.preventDefault(),c(!0);try{const R=await new Promise((te,ke)=>{navigator.geolocation.getCurrentPosition(se=>te(se),se=>ke(se),{timeout:5e3})}),K={lat:R.coords.latitude,lng:R.coords.longitude};if(await L(K),!C||!(j!=null&&j.current)||!A)throw new Error("Geocoding library or Geocoder not available");const xe=await new Promise((te,ke)=>{j.current.geocode({location:K},(se,Ue)=>{Ue===google.maps.GeocoderStatus.OK&&se&&se.length>0?te(se):ke(new Error(`Geocoding failed with status: ${Ue}`))})});xe&&xe[0]&&t(xe[0].formatted_address)}catch(R){console.error("Error getting location: ",R);const K=R instanceof GeolocationPositionError?Je+R.message:Je+Oh;Z.error(K)}finally{c(!1)}}async function L(O){const{lng:R,lat:K}=O,xe={location:{type:"Feature",geometry:{type:"Point",coordinates:[R,K]},properties:{}}};try{const{data:te}=await S({mapId:u},{body:xe})??{};if(!(te!=null&&te.pins))throw new Error("No locations found");d(te.pins),f(Xe.MARKER),p({lat:K,lng:R},te.zoom||15)}catch(te){throw console.error("Error finding locations: ",te),te}}const U=v||l;return y?x.jsxs("div",{className:q("dyn-locator__search",st.root),children:[x.jsx(Km,{name:"locator_search_field",className:q("dyn-locator__search__field",st.input),value:e,onChange:z,placeholder:m["Search.placeholder"],dropdown:ue(),dropdownVisible:s,disabled:U,sideOrnament:e?void 0:x.jsx(Be,{className:st.sideOrnament,icon:"Search",size:"M"}),sideButton:e?x.jsx(bt,{variant:"bare",className:st.clearButton,onClick:re,"aria-label":"Clear",children:x.jsx(Be,{icon:"Close",size:"M"})}):x.jsx(xa,{href:"#",onClick:ve,children:m["Search.geolocationButton"]})}),x.jsx(Ga,{show:U,children:x.jsx(Et,{size:"medium"})})]}):null}function Hm({children:e,apiKey:t,language:n,region:r,libraries:s}){return x.jsx(am,{apiKey:t,region:r,language:n,libraries:s,children:e})}const qm=Object.freeze(Object.defineProperty({__proto__:null,default:Hm},Symbol.toStringTag,{value:"Module"}));function Ym(){throw new Error("Mapbox provider is not implemented yet")}const Zm=Object.freeze(Object.defineProperty({__proto__:null,default:Ym},Symbol.toStringTag,{value:"Module"}));function Jm(){throw new Error("HERE Maps provider is not implemented yet")}const Qm=Object.freeze(Object.defineProperty({__proto__:null,default:Jm},Symbol.toStringTag,{value:"Module"}));be.Map=Wm,be.Search=Gm,be.default=Ha,Object.defineProperties(be,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
304
+ `,Tn=16,qp=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:s,containerStyle:o,containerClassName:i})=>{let{toasts:a,handlers:l}=wp(n);return ee.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:Tn,left:Tn,right:Tn,bottom:Tn,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=Kp(u,d);return ee.createElement(Wp,{id:c.id,key:c.id,onHeightUpdate:l.updateHeight,className:c.visible?Gp:"",style:f},c.type==="custom"?Cn(c.message,c):s?s(c):ee.createElement(Ga,{toast:c,position:u}))}))};const Hp={root:"_root_movxa_4"};function qa({className:e,children:t,show:n=!0,variant:r="light",...s}){const o=H("dyn-locator__overlay",Hp.root,e);return n?x.jsx("div",{className:o,"data-variant":r,...s,children:t}):null}function _n(e){const[t,n]=g.useState(!1),[r,s]=g.useState(null),{getEndpoint:o}=op(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 Yp({children:e,customComponents:t,customIcons:n,featureFlags:r,fetchLocations:s,localizationConfig:o,locations:i=[],mapId:a}){const l=I(_=>_.isFullscreen),c=I(_=>_.setLocations),u=I(_=>_.setMapId),d=I(_=>_.setFeatureFlags),f=I(_=>_.setLocalizationConfig),p=I(_=>_.setMapDetail),m=I(_=>_.shouldRefetch),y=I(_=>_.setShouldRefetch),{request:S,loading:v,error:b}=_n(Yt.CLUSTERS),{request:C,loading:A,error:T}=_n(Yt.MARKERS),M=v||A,j=!!b||!!T;async function P(_){var z;try{if(typeof _!="number"||_<0||isNaN(_))throw new Error("No map ID provided");const{data:$}=await S({mapId:String(_)})??{};if(!$)throw new Error("No cluster data received from the server");c((z=$.map)==null?void 0:z.call($,re=>({...re,onMarkerClick:async()=>{await V(_,re.id)}})))}catch($){console.error("Error fetching clusters: ",$),Z.error(Qe+Gr),c([])}}async function V(_,z){try{if(typeof _!="number"||_<0||isNaN(_))throw new Error("No map ID provided");const{data:$}=await C({mapId:_,clusterId:z})??{};if(!$)throw new Error("No marker data received from the server");c($),p(We.MARKER)}catch($){console.error("Error fetching markers: ",$),Z.error(Qe+Gr),c([])}}return g.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(_=>c(_)):P(a)},[]),g.useEffect(()=>{let _=!0;return m&&a&&P(a).finally(()=>{_&&y(!1)}),()=>{_=!1}},[m,a]),x.jsx("div",{id:"dyn-locator",className:H("dyn-locator__locator",gs.root),"data-fullscreen":l,children:x.jsxs(tp,{customIcons:n,customComponents:t,children:[e,x.jsxs(qa,{show:M||j,variant:"light",children:[M?x.jsx(Pt,{size:"large"}):null,j?x.jsx(wa,{title:jh,message:Gr,actionText:"ricaricare la pagina.",errorDetails:(b==null?void 0:b.message)||(T==null?void 0:T.message),onAction:_=>{_.preventDefault(),window.location.reload()}}):null]}),x.jsx(qp,{toastOptions:{position:"top-right",duration:3e3,error:{duration:1/0}},children:_=>x.jsx(Ga,{toast:_,children:({icon:z,message:$})=>x.jsxs(x.Fragment,{children:[z,$,_.type==="error"&&x.jsx(bt,{variant:"bare",onClick:()=>Z.dismiss(_.id),children:x.jsx($e,{icon:"Close"})})]})})})]})})}function Ha({mapProvider:e,endpoints:t,apiUrl:n,children:r,...s}){return x.jsx(Kh,{children:x.jsx(kl,{children:x.jsx(Fl,{mapProvider:e,children:x.jsx(sp,{endpoints:t,apiUrl:n,children:x.jsx(Yp,{children:r,...s})})})})})}Ha.displayName="Locator";var Qr,Ya;function Zp(){return Ya||(Ya=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 Jp=Zp();const Qp=ls(Jp);function Te(){return Te=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},Te.apply(null,arguments)}function nt(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function em(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function tm(e){var t=em(e,"string");return typeof t=="symbol"?t:t+""}const he={NOT_LOADED:"NOT_LOADED",LOADING:"LOADING",LOADED:"LOADED",FAILED:"FAILED",AUTH_FAILURE:"AUTH_FAILURE"},nm="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=he.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=nm+"?"+l.toString(),a.nonce=((i=document.querySelector("script[nonce]"))==null?void 0:i.nonce)||"",a.onerror=()=>{this.loadingStatus=he.FAILED,this.notifyLoadingStatusListeners(),o(new Error("The Google Maps JavaScript API could not load."))},window.__googleMapsCallback__=()=>{this.loadingStatus=he.LOADED,this.notifyLoadingStatusListeners(),s()},window.gm_authFailure=()=>{this.loadingStatus=he.AUTH_FAILURE,this.notifyLoadingStatusListeners()},this.loadingStatus=he.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=he.NOT_LOADED,Qt.serializedApiParams=void 0,Qt.listeners=[];const rm=["onLoad","onError","apiKey","version","libraries"],sm=["children"],om="GMP_visgl_rgmlibrary_v1_default",en=g.createContext(null);function im(){const[e,t]=g.useState({});return{mapInstances:e,addMapInstance:(o,i="default")=>{t(a=>Te({},a,{[i]:o}))},removeMapInstance:(o="default")=>{t(i=>nt(i,[o].map(tm)))},clearMapInstances:()=>{t({})}}}function am(e){const{onLoad:t,onError:n,apiKey:r,version:s,libraries:o=[]}=e,i=nt(e,rm),[a,l]=g.useState(Qt.loadingStatus),[c,u]=g.useReducer((m,y)=>m[y.name]?m:Te({},m,{[y.name]:y.value}),{}),d=g.useMemo(()=>o==null?void 0:o.join(","),[o]),f=g.useMemo(()=>JSON.stringify(Te({apiKey:r,version:s},i)),[r,s,i]),p=g.useCallback(async m=>{var y;if(c[m])return c[m];if(!((y=google)!=null&&(y=y.maps)!=null&&y.importLibrary))throw new Error("[api-provider-internal] importLibrary was called before google.maps.importLibrary was defined.");const S=await window.google.maps.importLibrary(m);return u({name:m,value:S}),S},[c]);return g.useEffect(()=>{(async()=>{try{const m=Te({key:r},i);s&&(m.v=s),(d==null?void 0:d.length)>0&&(m.libraries=d),(m.channel===void 0||m.channel<0||m.channel>999)&&delete m.channel,m.solutionChannel===void 0?m.solutionChannel=om:m.solutionChannel===""&&delete m.solutionChannel,await Qt.load(m,y=>l(y));for(const y of["core","maps",...o])await p(y);t&&t()}catch(m){n?n(m):console.error("<ApiProvider> failed to load the Google Maps JavaScript API",m)}})()},[r,d,f]),{status:a,loadedLibraries:c,importLibrary:p}}const lm=e=>{const{children:t}=e,n=nt(e,sm),{mapInstances:r,addMapInstance:s,removeMapInstance:o,clearMapInstances:i}=im(),{status:a,loadedLibraries:l,importLibrary:c}=am(n),u=g.useMemo(()=>({mapInstances:r,addMapInstance:s,removeMapInstance:o,clearMapInstances:i,status:a,loadedLibraries:l,importLibrary:c}),[r,s,o,i,a,l,c]);return g.createElement(en.Provider,{value:u},t)};function cm(e,t){for(const n of hm){const r=t[n],s=Za[n];g.useEffect(()=>{if(!e||!r)return;const o=google.maps.event.addListener(e,s,i=>{r(um(s,e,i))});return()=>o.remove()},[e,s,r])}}function um(e,t,n){const r={type:e,map:t,detail:{},stoppable:!1,stop:()=>{}};if(dm.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(fm.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 Za={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"},dm=["bounds_changed","center_changed","heading_changed","tilt_changed","zoom_changed"],fm=["click","contextmenu","dblclick","mousemove","mouseout","mouseover"],hm=Object.keys(Za);function es(e,t){const n=g.useRef(void 0);(!n.current||!Qp(t,n.current))&&(n.current=t),g.useEffect(e,n.current)}const pm=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 mm(e,t){const n={},r=Object.keys(t);for(const s of r)pm.has(s)&&(n[s]=t[s]);es(()=>{e&&e.setOptions(n)},[n])}function ts(){var e;return((e=g.useContext(en))==null?void 0:e.status)||he.NOT_LOADED}function gm(e,t){const{viewport:n,viewState:r}=t,s=!!n;return g.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 ym(e){return!e||typeof e!="object"||!("lat"in e&&"lng"in e)?!1:Number.isFinite(e.lat)&&Number.isFinite(e.lng)}function Ja(e){return ym(e)?e:e.toJSON()}function vm(e,t,n){const r=n.center?Ja(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;g.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 xm=()=>{const e={position:"absolute",top:0,left:0,bottom:0,right:0,zIndex:999,display:"flex",flexFlow:"column nowrap",textAlign:"center",justifyContent:"center",fontSize:".8rem",color:"rgba(0,0,0,0.6)",background:"#dddddd",padding:"1rem 1.5rem"};return g.createElement("div",{style:e},g.createElement("h2",null,"Error: AuthFailure"),g.createElement("p",null,"A problem with your API key prevents the map from rendering correctly. Please make sure the value of the ",g.createElement("code",null,"APIProvider.apiKey")," prop is correct. Check the error-message in the console for further details."))};function bm(){const[e,t]=g.useState(null),n=g.useCallback(r=>t(r),[t]);return[e,n]}function Qa(){return ts()===he.LOADED}function Sm(){const[,e]=g.useReducer(t=>t+1,0);return e}function Cm(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 wm(e){const t=Sm(),n=g.useRef({center:{lat:0,lng:0},heading:0,tilt:0,zoom:0});return g.useEffect(()=>{if(!e)return;const r=google.maps.event.addListener(e,"bounds_changed",()=>{Cm(e,n),t()});return()=>r.remove()},[e,t]),n}const Tm=["id","defaultBounds","defaultCenter","defaultZoom","defaultHeading","defaultTilt","reuseMaps","renderingType","colorScheme"],_m=["padding"];class En{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)}}En.entries={};function Em(e,t){const n=Qa(),[r,s]=g.useState(null),[o,i]=bm(),a=wm(r),{id:l,defaultBounds:c,defaultCenter:u,defaultZoom:d,defaultHeading:f,defaultTilt:p,reuseMaps:m,renderingType:y,colorScheme:S}=e,v=nt(e,Tm),b=e.zoom!==void 0||e.defaultZoom!==void 0,C=e.center!==void 0||e.defaultCenter!==void 0;!c&&(!b||!C)&&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 T of Object.keys(v))v[T]===void 0&&delete v[T];const A=g.useRef(void 0);return g.useEffect(()=>{if(!o||!n)return;const{addMapInstance:T,removeMapInstance:M}=t,{mapId:j}=e,P=`${j||"default"}:${y||"default"}:${S||"LIGHT"}`;let V,_;if(m&&En.has(P)?(_=En.pop(P),V=_.getDiv(),o.appendChild(V),_.setOptions(v),setTimeout(()=>_.setCenter(_.getCenter()),0)):(V=document.createElement("div"),V.style.height="100%",o.appendChild(V),_=new google.maps.Map(V,Te({},v,y?{renderingType:y}:{},S?{colorScheme:S}:{}))),s(_),T(_,l),c){const{padding:z}=c,$=nt(c,_m);_.fitBounds($,z)}else(!b||!C)&&_.fitBounds({east:180,west:-180,south:-90,north:90});if(A.current){const{mapId:z,cameraState:$}=A.current;z!==j&&_.setOptions($)}return()=>{A.current={mapId:j,cameraState:a.current},V.remove(),m?En.push(P,_):google.maps.event.clearInstanceListeners(_),s(null),M(l)}},[o,n,l,e.mapId,e.renderingType,e.colorScheme]),[r,i,a]}const el=g.createContext(null),tl=e=>{const{children:t,id:n,className:r,style:s}=e,o=g.useContext(en),i=ts();if(!o)throw new Error("<Map> can only be used inside an <ApiProvider> component.");const[a,l,c]=Em(e,o);vm(a,c,e),cm(a,e),mm(a,e);const u=gm(a,e),d=!!e.controlled;g.useEffect(()=>{if(a)return u&&a.setOptions({disableDefaultUI:!0}),(u||d)&&a.setOptions({gestureHandling:"none",keyboardShortcuts:!1}),()=>{a.setOptions({gestureHandling:e.gestureHandling,keyboardShortcuts:e.keyboardShortcuts})}},[a,u,d,e.gestureHandling,e.keyboardShortcuts]);const f=e.center?Ja(e.center):null;let p=null,m=null;f&&Number.isFinite(f.lat)&&Number.isFinite(f.lng)&&(p=f.lat,m=f.lng);const y=g.useMemo(()=>{var b,C,A,T,M;return{center:{lat:(b=p)!=null?b:0,lng:(C=m)!=null?C:0},zoom:(A=e.zoom)!=null?A:0,heading:(T=e.heading)!=null?T:0,tilt:(M=e.tilt)!=null?M:0}},[p,m,e.zoom,e.heading,e.tilt]);g.useLayoutEffect(()=>{if(!a||!d)return;a.moveCamera(y);const b=a.addListener("bounds_changed",()=>{a.moveCamera(y)});return()=>b.remove()},[a,d,y]);const S=g.useMemo(()=>Te({width:"100%",height:"100%",position:"relative",zIndex:u?-1:0},s),[s,u]),v=g.useMemo(()=>({map:a}),[a]);return i===he.AUTH_FAILURE?g.createElement("div",{style:Te({position:"relative"},r?{}:S),className:r},g.createElement(xm,null)):g.createElement("div",Te({ref:l,"data-testid":"map",style:r?void 0:S,className:r},n?{id:n}:{}),a?g.createElement(el.Provider,{value:v},t):null)};tl.deckGLViewProps=!0;const nl=new Set;function Pm(...e){const t=JSON.stringify(e);nl.has(t)||(nl.add(t),console.error(...e))}const Pn=(e=null)=>{const t=g.useContext(en),{map:n}=g.useContext(el)||{};if(t===null)return Pm("useMap(): failed to retrieve APIProviderContext. Make sure that the <APIProvider> component exists and that the component you are calling `useMap()` from is a sibling of the <APIProvider>."),null;const{mapInstances:r}=t;return e!==null?r[e]||null:n||r.default||null};function An(e){const t=Qa(),n=g.useContext(en);return g.useEffect(()=>{!t||!n||n.importLibrary(e)},[t,n,e]),(n==null?void 0:n.loadedLibraries[e])||null}function St(e,t,n){g.useEffect(()=>{if(!e||!t||!n)return;const r=google.maps.event.addListener(e,t,n);return()=>r.remove()},[e,t,n])}function Mn(e,t,n){g.useEffect(()=>{e&&(e[t]=n)},[e,t,n])}function rl(e,t,n){g.useEffect(()=>{if(!(!e||!t||!n))return e.addEventListener(t,n),()=>e.removeEventListener(t,n)},[e,t,n])}function Am(e){return e.content!==void 0}function Mm(e){return e.nodeType===Node.ELEMENT_NODE}const Lm=g.createContext(null),Dm={BOTTOM:["50%","100%"]},Om=({children:e,styles:t,className:n,anchorPoint:r})=>{const[s,o]=r??Dm.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 g.createElement("div",{style:{transform:l}},g.createElement("div",{className:n,style:t},e))};function km(e){const[t,n]=g.useState(null),[r,s]=g.useState(null),o=Pn(),i=An("marker"),{children:a,onClick:l,className:c,onMouseEnter:u,onMouseLeave:d,onDrag:f,onDragStart:p,onDragEnd:m,collisionBehavior:y,clickable:S,draggable:v,position:b,title:C,zIndex:A}=e,T=g.Children.count(a);return g.useEffect(()=>{if(!o||!i)return;const M=new i.AdvancedMarkerElement;M.map=o,n(M);let j=null;return T>0&&(j=document.createElement("div"),j.isCustomMarker=!0,M.content=j,s(j)),()=>{var P;M.map=null,(P=j)==null||P.remove(),n(null),s(null)}},[o,i,T]),g.useEffect(()=>{!t||!t.content||T>0||(t.content.className=c||"")},[t,c,T]),Mn(t,"position",b),Mn(t,"title",C??""),Mn(t,"zIndex",A),Mn(t,"collisionBehavior",y),g.useEffect(()=>{t&&(v!==void 0?t.gmpDraggable=v:f||p||m?t.gmpDraggable=!0:t.gmpDraggable=!1)},[t,v,f,m,p]),g.useEffect(()=>{if(!t)return;const M=S!==void 0||!!l||!!u||!!d;t.gmpClickable=M,M&&t!=null&&t.content&&Mm(t.content)&&(t.content.style.pointerEvents="none",t.content.firstElementChild&&(t.content.firstElementChild.style.pointerEvents="all"))},[t,S,l,u,d]),St(t,"click",l),St(t,"drag",f),St(t,"dragstart",p),St(t,"dragend",m),rl(t==null?void 0:t.element,"mouseenter",u),rl(t==null?void 0:t.element,"mouseleave",d),[t,r]}g.forwardRef((e,t)=>{const{children:n,style:r,className:s,anchorPoint:o}=e,[i,a]=km(e),l=g.useMemo(()=>i?{marker:i}:null,[i]);return g.useImperativeHandle(t,()=>i,[i]),a?g.createElement(Lm.Provider,{value:l},jn.createPortal(g.createElement(Om,{anchorPoint:o,styles:r,className:s},n),a)):null});function jm(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)&&sl(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&&sl(r,s,o)}}function sl(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&&!Vm(t)?e[t]=n+"px":t==="float"?e.cssFloat=n:e[t]=(""+n).trim()}const Nm=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 Vm(e){return Nm.has(e)}const Im=["children","headerContent","style","className","pixelOffset","anchor","shouldFocus","onClose","onCloseClick"],Rm=e=>{const{children:t,headerContent:n,style:r,className:s,pixelOffset:o,anchor:i,shouldFocus:a,onClose:l,onCloseClick:c}=e,u=nt(e,Im),d=An("maps"),[f,p]=g.useState(null),m=g.useRef(null),y=g.useRef(null);g.useEffect(()=>{if(!d)return;m.current=document.createElement("div"),y.current=document.createElement("div");const b=u;o&&(b.pixelOffset=new google.maps.Size(o[0],o[1])),n&&(b.headerContent=typeof n=="string"?n:y.current);const C=new google.maps.InfoWindow(u);return C.setContent(m.current),p(C),()=>{var A,T;C.setContent(null),(A=m.current)==null||A.remove(),(T=y.current)==null||T.remove(),m.current=null,y.current=null,p(null)}},[d]);const S=g.useRef(null);g.useEffect(()=>{!f||!m.current||(jm(m.current,r||null,S.current),S.current=r||null,s!==m.current.className&&(m.current.className=s||""))},[f,s,r]),es(()=>{if(!f)return;const b=u;o?b.pixelOffset=new google.maps.Size(o[0],o[1]):b.pixelOffset=null,n?b.headerContent=typeof n=="string"?n:y.current:b.headerContent=null,f.setOptions(u)},[u,o,n]),St(f,"close",l),St(f,"closeclick",c);const v=Pn();return es(()=>{if(!v||!f||i===null)return;const b=!!i,C={map:v};if(i&&(C.anchor=i,Am(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 j=(A=i.content.firstElementChild)==null?void 0:A.firstElementChild,P=j==null?void 0:j.getBoundingClientRect(),V=P.x-M.x+(P.width-M.width)/2,_=P.y-M.y,z=u;z.pixelOffset=new google.maps.Size(o?o[0]+V:V,o?o[1]+_:_),f.setOptions(z)}}return a!==void 0&&(C.shouldFocus=a),f.open(C),()=>{b&&f.set("anchor",null),f.close()}},[f,i,v,a,u,o]),g.createElement(g.Fragment,null,m.current&&jn.createPortal(t,m.current),y.current!==null&&jn.createPortal(n,y.current))},Fm=["onClick","onDrag","onDragStart","onDragEnd","onMouseOver","onMouseOut"];function Bm(e){const[t,n]=g.useState(null),r=Pn(),{onClick:s,onDrag:o,onDragStart:i,onDragEnd:a,onMouseOver:l,onMouseOut:c}=e,u=nt(e,Fm),{position:d,draggable:f}=u;return g.useEffect(()=>{if(!r){r===void 0&&console.error("<Marker> has to be inside a Map component.");return}const p=new google.maps.Marker(u);return p.setMap(r),n(p),()=>{p.setMap(null),n(null)}},[r]),g.useEffect(()=>{if(!t)return;const p=t,m=google.maps.event;return s&&m.addListener(p,"click",s),o&&m.addListener(p,"drag",o),i&&m.addListener(p,"dragstart",i),a&&m.addListener(p,"dragend",a),l&&m.addListener(p,"mouseover",l),c&&m.addListener(p,"mouseout",c),t.setDraggable(!!f),()=>{m.clearInstanceListeners(p)}},[t,f,s,o,i,a,l,c]),g.useEffect(()=>{t&&u&&t.setOptions(u)},[t,u]),g.useEffect(()=>{f||!d||!t||t.setPosition(d)},[f,d,t]),t}const ol=g.forwardRef((e,t)=>{const n=Bm(e);return g.useImperativeHandle(t,()=>n,[n]),g.createElement(g.Fragment,null)});function $m(){const[e,t]=g.useState(null);return[g.useCallback(r=>{t(r)},[]),e]}const rt={root:"_root_186dn_10",header:"_header_186dn_18",body:"_body_186dn_31",highlighted:"_highlighted_186dn_43"};function zm({onLocationSelect:e}){const t=ja("locationCard"),[n,r]=g.useState(!1),s=I(m=>m.locations),{labels:o}=I(m=>m.localizationConfig),i=I(m=>m.selectedLocation),a=I(m=>m.setSelectedLocation),l=g.useRef({}),c=o["LocationList.header"],u=o["LocationList.locationDesignator"],d=c.split(/(\{:\d\})/g),f=g.useMemo(()=>d.map((m,y)=>m==="{:1}"?x.jsx("span",{className:rt.highlighted,children:(s==null?void 0:s.length)??0},y):m==="{:2}"?x.jsx("span",{className:rt.highlighted,children:u},y):m),[u,s.length,d]);g.useEffect(()=>{if(i&&n){const m=l.current[i];m!=null&&m.current&&requestAnimationFrame(()=>{m.current.scrollIntoView({behavior:"smooth",block:"start"})})}},[i,n]);function p(m){return()=>{e==null||e(m.coords),a==null||a(m.id)}}return x.jsxs("div",{className:H("dyn-locator__location-list",rt.root),"data-expanded":n,children:[x.jsxs("header",{className:rt.header,onClick:()=>r(m=>!m),children:[x.jsx("span",{children:f}),x.jsx(bt,{className:rt.closeButton,variant:"bare",children:x.jsx($e,{icon:n?"ChevronDown":"ChevronUp"})})]}),x.jsx("div",{className:rt.body,children:s!=null&&s.length?s.map(m=>{const y=m.id;l.current[y]||(l.current[y]=g.createRef());const S=l.current[y];return x.jsx(t,{ref:S,"data-active":i===m.id,onClick:p(m),...m},m.id)}):x.jsx("div",{className:rt.noResults,children:o["LocationList.noResults"]})})]})}const Oe={root:"_root_1e6nt_21",loaderContainer:"_loaderContainer_1e6nt_29",fullscreenButton:"_fullscreenButton_1e6nt_36",backButton:"_backButton_1e6nt_37",areaSearchButton:"_areaSearchButton_1e6nt_52",visualCue:"_visualCue_1e6nt_77",closeButton:"_closeButton_1e6nt_102",searchButton:"_searchButton_1e6nt_120"},Ln={root:"_root_e0ns1_4",header:"_header_e0ns1_7",cta:"_cta_e0ns1_24"};function Um({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]=$m(),d=g.useCallback(()=>{l==null||l("")},[l]);return x.jsxs(x.Fragment,{children:[x.jsx(ol,{ref:c,position:r,onClick:()=>{o==null||o()}}),a===e?x.jsxs(Rm,{anchor:u,headerContent:t,onCloseClick:d,className:Ln.root,children:[x.jsxs("header",{className:Ln.header,children:[x.jsx("h6",{children:t}),x.jsx("address",{children:n})]}),x.jsx("div",{className:Ln.body,children:x.jsxs("div",{className:Ln.cta,children:[x.jsx(Ht,{animate:!1,variant:"secondary",size:"small",...qr((f=s==null?void 0:s.find)==null?void 0:f.call(s,p=>p.type==="navigate")),children:"Percorso"}),x.jsx(Ht,{animate:!1,variant:"secondary",size:"small",onClick:i,children:"Zoom"})]})})]}):null]})}function Xm(e){return"size"in e&&"range"in e&&"onMarkerClick"in e}function Wm(e){return"title"in e&&!("size"in e)}function Km(){var ve;const[e,t]=g.useState({zoom:ya}),[n,r]=g.useState(!1),[s,o]=g.useState("inactive"),i=g.useRef(""),a=ts(),{request:l,loading:c}=_n(Yt.FIND),u=I(L=>L.locations),d=I(L=>L.featureFlags),{labels:f}=I(L=>L.localizationConfig),p=I(L=>L.targetLocation),m=I(L=>L.clearTargetLocation),y=I(L=>L.mapDetail),S=I(L=>L.setMapDetail),v=I(L=>L.isFullscreen),b=I(L=>L.setFullscreen),C=I(L=>L.shouldRefetch),A=I(L=>L.setShouldRefetch),T=I(L=>L.setSelectedLocation),M=y===We.MARKER;function j({detail:L}){const{center:U,zoom:O}=L;t({center:U,zoom:O}),n||r(!0)}function P(){n&&e.center&&s==="inactive"&&o("active")}function V(L){t(U=>({center:L,zoom:U.zoom}))}function _(){o("inactive"),S(We.CLUSTER),t({center:Uh,zoom:ya}),A(!0)}const z=I(L=>L.mapId),$=I(L=>L.setLocations),re=g.useCallback(async()=>{if(!e.center)return;const{lat:L,lng:U}=e.center,O={location:{type:"Feature",geometry:{type:"Point",coordinates:[U,L]},properties:{distance:Xh}}};try{const{data:R}=await l({mapId:z},{body:O})??{};if(!(R!=null&&R.pins))throw new Error("No locations found");$(R.pins),S(We.MARKER),o("inactive")}catch(R){console.error("Error finding locations in this area: ",R),Z.error(Qe+Rh)}},[e.center,l,S,z,$]);function de(L){if(Xm(L))return x.jsx(ol,{position:L.coords,icon:{path:google.maps.SymbolPath.CIRCLE,fillColor:i.current||"#00acde",fillOpacity:.6,strokeWeight:0,scale:(L.range??0)/zh,labelOrigin:new google.maps.Point(0,0)},onClick:async()=>{await L.onMarkerClick(),t({center:L.coords,zoom:L.zoom||15})}},L.id);if(Wm(L))return x.jsx(Um,{id:L.id,title:L.title??"No title",address:L.address??"No address",coords:L.coords,actions:L.actions,onZoom:()=>t({center:L.coords,zoom:18}),onClick:()=>{T(L.id)}},L.id)}if(g.useEffect(()=>{i.current=getComputedStyle(document.documentElement).getPropertyValue("--dyn-locator__colors-accent-500")},[]),g.useEffect(()=>{p&&(t({center:p.coords,zoom:p.zoom}),m())},[p,m]),a===he.LOADING)return x.jsx("div",{className:H("dyn-locator__map",Oe.root),children:x.jsx("div",{className:Oe.loaderContainer,children:x.jsx(Pt,{size:"large"})})});if(a===he.FAILED||a===he.AUTH_FAILURE)throw new Error(Ih);if(a===he.LOADED)return x.jsxs("div",{className:H("dyn-locator__map",Oe.root),children:[d.fullscreen?x.jsx(bt,{className:H(Oe.fullscreenButton,"dyn-locator__map__fullscreen-button"),variant:"negative",onClick:()=>b==null?void 0:b(!v),children:x.jsx($e,{size:"M",icon:v?"Close":"Expand"})}):null,M?x.jsx(bt,{className:H(Oe.backButton,"dyn-locator__map__back-button"),variant:"negative",onClick:_,children:x.jsx($e,{size:"M",icon:"ArrowLeft"})}):null,s!=="inactive"&&x.jsxs(Ht,{className:H(Oe.areaSearchButton,"dyn-locator__map__area-search-button",M&&"dyn-locator__map__area-search-button--with-back-button"),disabled:c||s==="select_area",loading:c,onClick:()=>o("select_area"),children:[x.jsx(Ql,{}),f["Map.areaSearchButton"]]}),s==="select_area"&&x.jsxs("div",{className:Oe.visualCue,children:[x.jsxs("i",{children:[x.jsx("button",{className:Oe.closeButton,onClick:()=>o("active"),"aria-label":"Close area search",children:x.jsx(xs,{size:16})}),x.jsx(ec,{size:48,strokeWidth:1,color:"currentColor"})]}),x.jsxs(Ht,{className:Oe.searchButton,disabled:c,loading:c,onClick:re,size:"small",variant:"themed",children:[f["Map.areaSearchVisualCueCTA"]," ",x.jsx(Wl,{size:22,style:{position:"relative",left:-8}})]})]}),x.jsx(tl,{style:{width:"100%",height:"100%"},gestureHandling:"greedy",disableDefaultUI:!0,...e,onCameraChanged:j,onDragend:P,defaultBounds:qt,children:!C&&((ve=u==null?void 0:u.map)==null?void 0:ve.call(u,de))}),M?x.jsx(zm,{onLocationSelect:V}):null]})}const ke={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"},il="Input";function al({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:m,...y},S){const v=a?Je.div:"div",b=Be(y)??[],C=a?{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:l,duration:.2}}:{};return x.jsxs(v,{className:H("dyn-locator__"+Ae(il),ke.root,Pe(t),...b??[]),"data-valid":s,"data-error":r,"data-expanded":u,"data-side-button":!!p,...f?{style:f}:{},...C,children:[n&&x.jsxs(x.Fragment,{children:[s&&x.jsx("span",{className:ke.validIcon}),r&&x.jsx("span",{className:ke.errorIcon})]}),e?x.jsx("label",{className:ke.label,...y.id?{htmlFor:y.id}:{},children:e}):null,m?x.jsx("span",{className:ke.sideOrnament,children:m}):null,x.jsx("input",{ref:S,className:H(ke.input),"aria-label":d,"aria-invalid":r,"data-side-button":!!p,"data-side-ornament":!!m,...y}),p?x.jsx("span",{className:ke.sideButton,children:p}):null,o&&(y==null?void 0:y.value)&&x.jsx("button",{className:ke.clearButton,onClick:i,type:"button","aria-label":"Clear input"}),c&&u&&x.jsx("div",{className:ke.dropdown,children:c})]})}al.displayName=il;const Gm=g.forwardRef(al),st={root:"_root_1vbtg_7",input:"_input_1vbtg_7",clearButton:"_clearButton_1vbtg_10",sideOrnament:"_sideOrnament_1vbtg_13",predictionsContainer:"_predictionsContainer_1vbtg_18",predictionItem:"_predictionItem_1vbtg_29",loadingItem:"_loadingItem_1vbtg_47"};function qm(){const[e,t]=g.useState(""),[n,r]=g.useState([]),[s,o]=g.useState(!1),[i,a]=g.useState(!1),[l,c]=g.useState(!1),u=I(O=>O.mapId),d=I(O=>O.setLocations),f=I(O=>O.setMapDetail),p=I(O=>O.zoomToLocation),{labels:m}=I(O=>O.localizationConfig),{search:y}=I(O=>O.featureFlags),{request:S,loading:v}=_n(Yt.FIND),b=An("places"),C=An("geocoding"),A=Pn(),T=g.useRef(null),M=g.useRef(null),j=g.useRef(null),P=g.useRef(null);g.useEffect(()=>{C&&(j.current||(j.current=new C.Geocoder))},[C]),g.useEffect(()=>{b&&(T.current||(T.current=new b.AutocompleteService),P.current||(P.current=new b.AutocompleteSessionToken))},[b]),g.useEffect(()=>{!b||!A||M.current||(M.current=new b.PlacesService(A))},[b,A]);const V=async O=>{var R;if(!O||O.length<3){r([]),o(!1);return}a(!0);try{if(!b||!T.current)throw new Error("Places library or Autocomplete Service not available");const K=await T.current.getPlacePredictions({input:O,...P.current?{sessionToken:P.current}:{}});if(a(!1),!((R=K==null?void 0:K.predictions)!=null&&R.length)){r([]),o(!1);return}r(K.predictions),o(!0)}catch(K){console.error("Error fetching predictions: ",K),a(!1),r([]),o(!1),Z.error(Qe+Nh)}},_=g.useMemo(()=>Wh(O=>V(O),600),[V]),z=O=>{const R=O.currentTarget.value;if(t(R),!R||R.length<3){r([]),o(!1);return}_(R)},$=async O=>{var R,K,xe,te,je;t(O.description),o(!1);try{if(!b||!M.current)throw new Error("Places library or Places Service not available");const se=await new Promise((Xe,ot)=>{M.current.getDetails({placeId:O.place_id,fields:["geometry"],...P.current?{sessionToken:P.current}:{}},(Ct,it)=>{it===b.PlacesServiceStatus.OK&&Ct?Xe(Ct):ot(new Error(`Place details request failed with status: ${it}`))})});if((R=se==null?void 0:se.geometry)!=null&&R.location){const Xe=(xe=(K=se.geometry.location).lat)==null?void 0:xe.call(K),ot=(je=(te=se.geometry.location).lng)==null?void 0:je.call(te);await L({lat:Xe,lng:ot})}}catch(se){console.error("Error getting place details:",se),Z.error(Qe+Vh)}finally{b&&(P.current=new b.AutocompleteSessionToken)}},re=()=>{t(""),r([]),o(!1)},de=()=>!s||n.length===0?null:x.jsx("div",{className:st.predictionsContainer,children:i?x.jsx("div",{className:st.loadingItem,children:x.jsx(Pt,{size:"medium"})}):n.map(O=>x.jsx("div",{className:st.predictionItem,onClick:()=>$(O),children:O.description},O.place_id))});async function ve(O){O.preventDefault(),c(!0);try{const R=await new Promise((te,je)=>{navigator.geolocation.getCurrentPosition(se=>te(se),se=>je(se),{timeout:5e3})}),K={lat:R.coords.latitude,lng:R.coords.longitude};if(await L(K),!C||!(j!=null&&j.current)||!A)throw new Error("Geocoding library or Geocoder not available");const xe=await new Promise((te,je)=>{j.current.geocode({location:K},(se,Xe)=>{Xe===google.maps.GeocoderStatus.OK&&se&&se.length>0?te(se):je(new Error(`Geocoding failed with status: ${Xe}`))})});xe&&xe[0]&&t(xe[0].formatted_address)}catch(R){console.error("Error getting location: ",R);const K=R instanceof GeolocationPositionError?Qe+R.message:Qe+kh;Z.error(K)}finally{c(!1)}}async function L(O){const{lng:R,lat:K}=O,xe={location:{type:"Feature",geometry:{type:"Point",coordinates:[R,K]},properties:{}}};try{const{data:te}=await S({mapId:u},{body:xe})??{};if(!(te!=null&&te.pins))throw new Error("No locations found");d(te.pins),f(We.MARKER),p({lat:K,lng:R},te.zoom||15)}catch(te){throw console.error("Error finding locations: ",te),te}}const U=v||l;return y?x.jsxs("div",{className:H("dyn-locator__search",st.root),children:[x.jsx(Gm,{name:"locator_search_field",className:H("dyn-locator__search__field",st.input),value:e,onChange:z,placeholder:m["Search.placeholder"],dropdown:de(),dropdownVisible:s,disabled:U,sideOrnament:e?void 0:x.jsx($e,{className:st.sideOrnament,icon:"Search",size:"M"}),sideButton:e?x.jsx(bt,{variant:"bare",className:st.clearButton,onClick:re,"aria-label":"Clear",children:x.jsx($e,{icon:"Close",size:"M"})}):x.jsx(ba,{href:"#",onClick:ve,children:m["Search.geolocationButton"]})}),x.jsx(qa,{show:U,children:x.jsx(Pt,{size:"medium"})})]}):null}function Hm({children:e,apiKey:t,language:n,region:r,libraries:s}){return x.jsx(lm,{apiKey:t,region:r,language:n,libraries:s,children:e})}const Ym=Object.freeze(Object.defineProperty({__proto__:null,default:Hm},Symbol.toStringTag,{value:"Module"}));function Zm(){throw new Error("Mapbox provider is not implemented yet")}const Jm=Object.freeze(Object.defineProperty({__proto__:null,default:Zm},Symbol.toStringTag,{value:"Module"}));function Qm(){throw new Error("HERE Maps provider is not implemented yet")}const eg=Object.freeze(Object.defineProperty({__proto__:null,default:Qm},Symbol.toStringTag,{value:"Module"}));be.Map=Km,be.Search=qm,be.default=Ha,Object.defineProperties(be,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
300
305
  //# sourceMappingURL=index.umd.js.map