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

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 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={};/**
1
+ (function(ve,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):(ve=typeof globalThis<"u"?globalThis:ve||self,g(ve["@dynamo-caffeina-dev/locator-frontend"]={},ve.React,ve.ReactDOM))})(this,function(ve,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 Q=wl(g);function lo(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 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={};/**
9
+ */var co;function Tl(){if(co)return _t;co=1;var e=g,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function i(a,l,c){var u,d={},f=null,m=null;c!==void 0&&(f=""+c),l.key!==void 0&&(f=""+l.key),l.ref!==void 0&&(m=l.ref);for(u in l)r.call(l,u)&&!s.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:m,props:d,_owner:o.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,33 +14,33 @@
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 _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
- `),le=k.stack.split(`
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`
17
+ */var uo;function _l(){return uo||(uo=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"),o=Symbol.for("react.strict_mode"),s=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"),m=Symbol.for("react.offscreen"),p=Symbol.iterator,y="@@iterator";function S(h){if(h===null||typeof h!="object")return null;var T=p&&h[p]||h[y];return typeof T=="function"?T:null}var v=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(h){{for(var T=arguments.length,P=new Array(T>1?T-1:0),O=1;O<T;O++)P[O-1]=arguments[O];w("error",h,P)}}function w(h,T,P){{var O=v.ReactDebugCurrentFrame,F=O.getStackAddendum();F!==""&&(T+="%s",P=P.concat([F]));var z=P.map(function(R){return String(R)});z.unshift("Warning: "+T),Function.prototype.apply.call(console[h],console,z)}}var M=!1,_=!1,L=!1,k=!1,A=!1,V;V=Symbol.for("react.module.reference");function E(h){return!!(typeof h=="string"||typeof h=="function"||h===r||h===s||A||h===o||h===c||h===u||k||h===m||M||_||L||typeof h=="object"&&h!==null&&(h.$$typeof===f||h.$$typeof===d||h.$$typeof===i||h.$$typeof===a||h.$$typeof===l||h.$$typeof===V||h.getModuleId!==void 0))}function X(h,T,P){var O=h.displayName;if(O)return O;var F=T.displayName||T.name||"";return F!==""?P+"("+F+")":P}function $(h){return h.displayName||"Context"}function ee(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 s:return"Profiler";case o:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if(typeof h=="object")switch(h.$$typeof){case a:var T=h;return $(T)+".Consumer";case i:var P=h;return $(P._context)+".Provider";case l:return X(h,h.render,"ForwardRef");case d:var O=h.displayName||null;return O!==null?O:ee(h.type)||"Memo";case f:{var F=h,z=F._payload,R=F._init;try{return ee(R(z))}catch{return null}}}return null}var le=Object.assign,we=0,Xe,W,C,I,B,te,ne;function ke(){}ke.__reactDisabledLog=!0;function oe(){{if(we===0){Xe=console.log,W=console.info,C=console.warn,I=console.error,B=console.group,te=console.groupCollapsed,ne=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})}we++}}function We(){{if(we--,we===0){var h={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:le({},h,{value:Xe}),info:le({},h,{value:W}),warn:le({},h,{value:C}),error:le({},h,{value:I}),group:le({},h,{value:B}),groupCollapsed:le({},h,{value:te}),groupEnd:le({},h,{value:ne})})}we<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var st=v.ReactCurrentDispatcher,Ct;function it(h,T,P){{if(Ct===void 0)try{throw Error()}catch(F){var O=F.stack.trim().match(/\n( *(at )?)/);Ct=O&&O[1]||""}return`
18
+ `+Ct+h}}var no=!1,Dn;{var tg=typeof WeakMap=="function"?WeakMap:Map;Dn=new tg}function ll(h,T){if(!h||no)return"";{var P=Dn.get(h);if(P!==void 0)return P}var O;no=!0;var F=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var z;z=st.current,st.current=null,oe();try{if(T){var R=function(){throw Error()};if(Object.defineProperty(R.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(R,[])}catch(fe){O=fe}Reflect.construct(h,[],R)}else{try{R.call()}catch(fe){O=fe}h.call(R.prototype)}}else{try{throw Error()}catch(fe){O=fe}h()}}catch(fe){if(fe&&O&&typeof fe.stack=="string"){for(var N=fe.stack.split(`
19
+ `),ce=O.stack.split(`
20
+ `),Z=N.length-1,J=ce.length-1;Z>=1&&J>=0&&N[Z]!==ce[J];)J--;for(;Z>=1&&J>=0;Z--,J--)if(N[Z]!==ce[J]){if(Z!==1||J!==1)do if(Z--,J--,J<0||N[Z]!==ce[J]){var ge=`
21
+ `+N[Z].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(Z>=1&&J>=0);break}}}finally{no=!1,st.current=z,We(),Error.prepareStackTrace=F}var Tt=h?h.displayName||h.name:"",at=Tt?it(Tt):"";return typeof h=="function"&&Dn.set(h,at),at}function ng(h,T,P){return ll(h,!1)}function rg(h){var T=h.prototype;return!!(T&&T.isReactComponent)}function On(h,T,P){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,T,P);case f:{var O=h,F=O._payload,z=O._init;try{return On(z(F),T,P)}catch{}}}return""}var tn=Object.prototype.hasOwnProperty,cl={},ul=v.ReactDebugCurrentFrame;function kn(h){if(h){var T=h._owner,P=On(h.type,h._source,T?T.type:null);ul.setExtraStackFrame(P)}else ul.setExtraStackFrame(null)}function og(h,T,P,O,F){{var z=Function.call.bind(tn);for(var R in h)if(z(h,R)){var N=void 0;try{if(typeof h[R]!="function"){var ce=Error((O||"React class")+": "+P+" type `"+R+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof h[R]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ce.name="Invariant Violation",ce}N=h[R](T,R,O,P,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Z){N=Z}N&&!(N instanceof Error)&&(kn(F),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).",O||"React class",P,R,typeof N),kn(null)),N instanceof Error&&!(N.message in cl)&&(cl[N.message]=!0,kn(F),b("Failed %s type: %s",P,N.message),kn(null))}}}var sg=Array.isArray;function ro(h){return sg(h)}function ig(h){{var T=typeof Symbol=="function"&&Symbol.toStringTag,P=T&&h[Symbol.toStringTag]||h.constructor.name||"Object";return P}}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 T=Object.getOwnPropertyDescriptor(h,"ref").get;if(T&&T.isReactWarning)return!1}return h.ref!==void 0}function ug(h){if(tn.call(h,"key")){var T=Object.getOwnPropertyDescriptor(h,"key").get;if(T&&T.isReactWarning)return!1}return h.key!==void 0}function dg(h,T){typeof h.ref=="string"&&hl.current}function fg(h,T){{var P=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)",T))};P.isReactWarning=!0,Object.defineProperty(h,"key",{get:P,configurable:!0})}}function hg(h,T){{var P=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)",T))};P.isReactWarning=!0,Object.defineProperty(h,"ref",{get:P,configurable:!0})}}var pg=function(h,T,P,O,F,z,R){var N={$$typeof:t,type:h,key:T,ref:P,props:R,_owner:z};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:O}),Object.defineProperty(N,"_source",{configurable:!1,enumerable:!1,writable:!1,value:F}),Object.freeze&&(Object.freeze(N.props),Object.freeze(N)),N};function mg(h,T,P,O,F){{var z,R={},N=null,ce=null;P!==void 0&&(fl(P),N=""+P),ug(T)&&(fl(T.key),N=""+T.key),cg(T)&&(ce=T.ref,dg(T,F));for(z in T)tn.call(T,z)&&!lg.hasOwnProperty(z)&&(R[z]=T[z]);if(h&&h.defaultProps){var Z=h.defaultProps;for(z in Z)R[z]===void 0&&(R[z]=Z[z])}if(N||ce){var J=typeof h=="function"?h.displayName||h.name||"Unknown":h;N&&fg(R,J),ce&&hg(R,J)}return pg(h,N,ce,F,O,hl.current,R)}}var oo=v.ReactCurrentOwner,gl=v.ReactDebugCurrentFrame;function wt(h){if(h){var T=h._owner,P=On(h.type,h._source,T?T.type:null);gl.setExtraStackFrame(P)}else gl.setExtraStackFrame(null)}var so;so=!1;function io(h){return typeof h=="object"&&h!==null&&h.$$typeof===t}function yl(){{if(oo.current){var h=ee(oo.current.type);if(h)return`
22
22
 
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=`
23
+ Check the render method of \``+h+"`."}return""}}function gg(h){return""}var vl={};function yg(h){{var T=yl();if(!T){var P=typeof h=="string"?h:h.displayName||h.name;P&&(T=`
24
24
 
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:
25
+ Check the top-level render call using <`+P+">.")}return T}}function xl(h,T){{if(!h._store||h._store.validated||h.key!=null)return;h._store.validated=!0;var P=yg(T);if(vl[P])return;vl[P]=!0;var O="";h&&h._owner&&h._owner!==oo.current&&(O=" It was passed a child from "+ee(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,O),wt(null)}}function bl(h,T){{if(typeof h!="object")return;if(ro(h))for(var P=0;P<h.length;P++){var O=h[P];io(O)&&xl(O,T)}else if(io(h))h._store&&(h._store.validated=!0);else if(h){var F=S(h);if(typeof F=="function"&&F!==h.entries)for(var z=F.call(h),R;!(R=z.next()).done;)io(R.value)&&xl(R.value,T)}}}function vg(h){{var T=h.type;if(T==null||typeof T=="string")return;var P;if(typeof T=="function")P=T.propTypes;else if(typeof T=="object"&&(T.$$typeof===l||T.$$typeof===d))P=T.propTypes;else return;if(P){var O=ee(T);og(P,h.props,"prop",O,h)}else if(T.PropTypes!==void 0&&!so){so=!0;var F=ee(T);b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",F||"Unknown")}typeof T.getDefaultProps=="function"&&!T.getDefaultProps.isReactClassApproved&&b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function xg(h){{for(var T=Object.keys(h.props),P=0;P<T.length;P++){var O=T[P];if(O!=="children"&&O!=="key"){wt(h),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",O),wt(null);break}}h.ref!==null&&(wt(h),b("Invalid attribute `ref` supplied to `React.Fragment`."),wt(null))}}var Sl={};function Cl(h,T,P,O,F,z){{var R=E(h);if(!R){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 ce=gg();ce?N+=ce:N+=yl();var Z;h===null?Z="null":ro(h)?Z="array":h!==void 0&&h.$$typeof===t?(Z="<"+(ee(h.type)||"Unknown")+" />",N=" Did you accidentally export a JSX literal instead of a component?"):Z=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",Z,N)}var J=mg(h,T,P,F,z);if(J==null)return J;if(R){var ge=T.children;if(ge!==void 0)if(O)if(ro(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(T,"key")){var at=ee(h),fe=Object.keys(T).filter(function(_g){return _g!=="key"}),ao=fe.length>0?"{key: someKey, "+fe.join(": ..., ")+": ...}":"{key: someKey}";if(!Sl[at+ao]){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,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(`
30
+ <%s key={someKey} {...props} />`,ao,at,Tg,at),Sl[at+ao]=!0}}return h===r?xg(J):vg(J),J}}function bg(h,T,P){return Cl(h,T,P,!0)}function Sg(h,T,P){return Cl(h,T,P,!1)}var Cg=Sg,wg=bg;Et.Fragment=r,Et.jsx=Cg,Et.jsxs=wg}()),Et}var fo;function El(){return fo||(fo=1,process.env.NODE_ENV==="production"?nn.exports=Tl():nn.exports=_l()),nn.exports}var x=El(),Ke=(e=>(e[e.CLUSTER=0]="CLUSTER",e[e.MARKER=1]="MARKER",e))(Ke||{});const ho=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(m=>m(t,f))}},o=()=>t,a={setState:r,getState:o,getInitialState:()=>l,subscribe:c=>(n.add(c),()=>n.delete(c))},l=t=e(r,o,a);return a},Pl=e=>e?ho(e):ho,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 po={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 o={connection:t.connect(n),stores:{}};return Nn.set(n.name,o),{type:"tracked",store:e,...o}},Dl=(e,t={})=>(n,r,o)=>{const{enabled:s,anonymousActionType:i,store:a,...l}=t;let c;try{c=(s??(po?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!c)return e(n,r,o);const{connection:u,...d}=Ll(a,c,l);let f=!0;o.setState=(y,S,v)=>{const b=n(y,S);if(!f)return b;const w=v===void 0?{type:i||"anonymous"}:typeof v=="string"?{type:v}:v;return a===void 0?(u==null||u.send(w,r()),b):(u==null||u.send({...w,type:`${a}/${w.type}`},{...rn(l.name),[a]:o.getState()}),b)};const m=(...y)=>{const S=f;f=!1,n(...y),f=S},p=e(o.setState,r,o);if(d.type==="untracked"?u==null||u.init(p):(d.stores[d.store]=o,u==null||u.init(Object.fromEntries(Object.entries(d.stores).map(([y,S])=>[y,y===d.store?p:S.getState()])))),o.dispatchFromDevtools&&typeof o.dispatch=="function"){let y=!1;const S=o.dispatch;o.dispatch=(...v)=>{(po?"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){m(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(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:{}};/*!
34
+ `);const b=v.state[a];if(b==null)return;JSON.stringify(o.getState())!==JSON.stringify(b)&&m(b);return}o.dispatchFromDevtools&&typeof o.dispatch=="function"&&o.dispatch(v)});case"DISPATCH":switch(y.payload.type){case"RESET":return m(p),a===void 0?u==null?void 0:u.init(o.getState()):u==null?void 0:u.init(rn(l.name));case"COMMIT":if(a===void 0){u==null||u.init(o.getState());return}return u==null?void 0:u.init(rn(l.name));case"ROLLBACK":return Vn(y.state,v=>{if(a===void 0){m(v),u==null||u.init(o.getState());return}m(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){m(v);return}JSON.stringify(o.getState())!==JSON.stringify(v[a])&&m(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;m(a===void 0?b:b[a]),u==null||u.send(null,v);return}case"PAUSE_RECORDING":return f=!f}return}}),p},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:Ke.CLUSTER,isFullscreen:!1,selectedLocation:"",shouldRefetch:!1,targetLocation:null,isLocationListExpanded:!1,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","InfoWindow.CTA_1":"Percorso","InfoWindow.CTA_2":"Dettagli","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}),setIsLocationListExpanded:t=>e({isLocationListExpanded:t}),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()}`})),mo=g.createContext(null);function kl({children:e}){const[t]=g.useState(Ol);return x.jsx(mo.Provider,{value:t,children:e})}function j(e){const t=g.useContext(mo);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 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"};/**
38
+ */var go;function jl(){return go||(go=1,function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",i=0;i<arguments.length;i++){var a=arguments[i];a&&(s=o(s,r(a)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var i="";for(var a in s)t.call(s,a)&&s[a]&&(i=o(i,a));return i}function o(s,i){return i?s?s+" "+i:s+i:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()}(In)),In.exports}var Nl=jl();const q=lo(Nl),yo={root:"_root_q2czu_7",loaderContainer:"_loaderContainer_q2czu_121"},vo={root:"_root_17v7m_1",spinner:"_spinner_17v7m_25"};function Pt({className:e,size:t="medium",color:n="primary",...r}){const o=q(vo.root,e);return x.jsx("div",{className:o,"data-size":t,"data-color":n,...r,children:x.jsx("div",{className:vo.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:o}=t??{};if(!r||!n)throw new Error("Cannot initialize MapProvider without APIKey and name.");const s=x.jsx("div",{className:yo.loaderContainer,children:x.jsx(Pt,{size:"large",color:"primary"})});return x.jsx(g.Suspense,{fallback:s,children:(()=>{switch(n){case"mapbox":return x.jsx(Il,{apiKey:r,...o??{},children:e});case"here":return x.jsx(Rl,{apiKey:r,...o??{},children:e});case"google":return x.jsx(Vl,{apiKey:r,...o??{},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 $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();/**
43
+ */const $l=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),xo=(...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.
@@ -50,82 +50,82 @@ React keys must be passed directly to JSX without using spread:
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 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]]));/**
53
+ */const Ul=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},l)=>g.createElement("svg",{ref:l,...zl,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:xo("lucide",o),...a},[...i.map(([c,u])=>g.createElement(c,u)),...Array.isArray(s)?s:[s]]));/**
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 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};/**
58
+ */const ue=(e,t)=>{const n=g.forwardRef(({className:r,...o},s)=>g.createElement(Ul,{ref:s,iconNode:t,className:xo(`lucide-${$l(e)}`,r),...o}));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 Xl=ce("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
63
+ */const Xl=ue("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 Wl=ce("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
68
+ */const Wl=ue("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 Kl=ce("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
73
+ */const Kl=ue("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 Gl=ce("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
78
+ */const Gl=ue("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 ql=ce("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
83
+ */const ql=ue("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=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"}]]);/**
88
+ */const Hl=ue("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 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"}]]);/**
93
+ */const Yl=ue("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 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"}]]);/**
98
+ */const Zl=ue("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 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"}]]);/**
103
+ */const Jl=ue("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 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"}]]);/**
108
+ */const Ql=ue("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 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"}]]);/**
113
+ */const ec=ue("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 tc=ce("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
118
+ */const tc=ue("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 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"}]]);/**
123
+ */const nc=ue("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
124
  * @license lucide-react v0.483.0 - ISC
125
125
  *
126
126
  * This source code is licensed under the ISC license.
127
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`
128
+ */const bo=ue("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),So=g.createContext({});function rc(e){const t=g.useRef(null);return t.current===null&&(t.current=e()),t.current}const Rn=typeof window<"u",oc=Rn?g.useLayoutEffect:g.useEffect,Fn=g.createContext(null),Co=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:o}=t,s=g.useId();g.useEffect(()=>{if(e)return o(s)},[e]);const i=g.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,i]:[!0]}function 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 de=e=>e;let lt=de,je=de;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 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 o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const i=this.subscriptions[s];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const xe=e=>e*1e3,Te=e=>e/1e3;function wo(e,t){return t?e*(1e3/t):0}const To=new Set;function on(e,t,n){e||To.has(t)||(console.warn(t),To.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(o=>{if(ac()&&o.attachTimeline)return o.attachTimeline(t);if(typeof n=="function")return n(o)});return()=>{r.forEach((o,s)=>{o&&o(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class 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 _o(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 Eo(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 sn=dc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Po=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let s=0;s<o;s++)r+=e(ct(0,o-1,s))+", ";return`linear(${r.substring(0,r.length-2)})`};function Ao(e){return!!(typeof e=="function"&&sn()||!e||typeof e=="string"&&(e in qn||sn())||Gn(e)||Array.isArray(e)&&e.every(Ao))}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 Mo(e,t){if(e)return typeof e=="function"&&sn()?Po(e,t):Gn(e)?Mt(e):Array.isArray(e)?e.map(n=>Mo(n,t)||qn.easeOut):qn[e]}const an=["read","resolveKeyframes","update","preRender","render","postRender"],Lo={value:null};function fc(e,t){let n=new Set,r=new Set,o=!1,s=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(d){i.has(d)&&(u.schedule(d),e()),l++,d(a)}const u={schedule:(d,f=!1,m=!1)=>{const y=m&&o?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,o){s=!0;return}o=!0,[n,r]=[r,n],n.forEach(c),t&&Lo.value&&Lo.value.frameloop[t].push(l),l=0,n.clear(),o=!1,s&&(s=!1,u.process(d))}};return u}const hc=40;function Do(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=an.reduce((v,b)=>(v[b]=fc(s,t?b:void 0),v),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=i,m=()=>{const v=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(v-o.timestamp,hc),1),o.timestamp=v,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(m))},p=()=>{n=!0,r=!0,o.isProcessing||e(m)};return{schedule:an.reduce((v,b)=>{const w=i[b];return v[b]=(M,_=!1,L=!1)=>(n||p(),w.schedule(M,_,L)),v},{}),cancel:v=>{for(let b=0;b<an.length;b++)i[an[b]].cancel(v)},state:o,steps:i}}const{schedule:U,cancel:Ne,state:re,steps:Hn}=Do(typeof requestAnimationFrame<"u"?requestAnimationFrame:de,!0),{schedule:Yn}=Do(queueMicrotask,!1);let ln;function pc(){ln=void 0}const be={now:()=>(ln===void 0&&be.set(re.isProcessing||ic.useManualTiming?re.timestamp:performance.now()),ln),set:e=>{ln=e,queueMicrotask(pc)}},ye={x:!1,y:!1};function Oo(){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 o=document;const s=(r=void 0)!==null&&r!==void 0?r:o.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}function ko(e,t){const n=gc(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function jo(e){return!(e.pointerType==="touch"||Oo())}function yc(e,t,n={}){const[r,o,s]=ko(e,n),i=a=>{if(!jo(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{jo(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(a=>{a.addEventListener("pointerenter",i,o)}),s}function No(e,t){const n=`${t}PointerCapture`;if(e.target instanceof Element&&n in e.target&&e.pointerId!==void 0)try{e.target[n](e.pointerId)}catch{}}const Vo=(e,t)=>t?e===t?!0:Vo(e,t.parentElement):!1,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 Io(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=Io(()=>{if(Lt.has(n))return;Jn(n,"down");const o=Io(()=>{Jn(n,"up")}),s=()=>Jn(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Ro(e){return Zn(e)&&!Oo()}function Sc(e,t,n={}){const[r,o,s]=ko(e,n),i=a=>{const l=a.currentTarget;if(!l||!Ro(a)||Lt.has(l))return;Lt.add(l),No(a,"set");const c=t(l,a),u=(m,p)=>{l.removeEventListener("pointerup",d),l.removeEventListener("pointercancel",f),No(m,"release"),!(!Ro(m)||!Lt.has(l))&&(Lt.delete(l),typeof c=="function"&&c(m,{success:p}))},d=m=>{(m.isTrusted?Cc(m,l instanceof Element?l.getBoundingClientRect():{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}):!1)?u(m,!1):u(m,!(l instanceof Element)||Vo(l,m.target))},f=m=>{u(m,!1)};l.addEventListener("pointerup",d,o),l.addEventListener("pointercancel",f,o),l.addEventListener("lostpointercapture",f,o)};return r.forEach(a=>{a=n.useGlobalTarget?window:a;let l=!1;a instanceof HTMLElement&&(l=!0,!xc(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0)),a.addEventListener("pointerdown",i,o),l&&a.addEventListener("focus",c=>bc(c,o),o)}),s}function Cc(e,t){return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}const Fo=30,wc=e=>!isNaN(parseFloat(e));class Tc{constructor(t,n={}){this.version="12.5.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const s=be.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=be.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"&&on(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Un);const r=this.events[t].add(n);return t==="change"?()=>{r(),U.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=be.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Fo)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Fo);return wo(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 Bo=g.createContext({strict:!1}),$o={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 $o)ut[e]={isEnabled:t=>$o[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 zo=e=>!cn(e);function Pc(e){e&&(zo=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 o in e)o==="values"&&typeof e.values=="object"||(zo(o)||n===!0&&cn(o)||!t&&!cn(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Mc(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&on(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const un=g.createContext({});function dn(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function 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 Uo(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}),[Xo(t),Xo(n)])}function Xo(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(),Wo="data-"+tr("framerAppearId"),Ko=g.createContext({});function jc(e,t,n,r,o){var s,i;const{visualElement:a}=g.useContext(un),l=g.useContext(Bo),c=g.useContext(Fn),u=g.useContext(Co).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,m=g.useContext(Ko);f&&!f.projection&&o&&(f.type==="html"||f.type==="svg")&&Nc(d.current,n,o,m);const p=g.useRef(!1);g.useInsertionEffect(()=>{f&&p.current&&f.update(n,c)});const y=n[Wo],S=g.useRef(!!y&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,y))&&((i=window.MotionHasOptimisedAnimation)===null||i===void 0?void 0:i.call(window,y)));return oc(()=>{f&&(p.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:o,layout:s,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Go(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&dt(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function Go(e){if(e)return e.options.allowProjection!==!1?e.projection:Go(e.parent)}function Vc({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var s,i;e&&_c(e);function a(c,u){let d;const f={...g.useContext(Co),...c,layoutId:Ic(c)},{isStatic:m}=f,p=Dc(c),y=r(c,m);if(!m&&Rn){Rc(f,e);const S=Fc(f);d=S.MeasureLayout,p.visualElement=jc(o,y,f,t,S.ProjectionNode)}return x.jsxs(un.Provider,{value:p,children:[d&&p.visualElement?x.jsx(d,{visualElement:p.visualElement,...f}):null,n(o,c,kc(y,p.visualElement,u),y,m,p.visualElement)]})}a.displayName=`motion.${typeof o=="string"?o:`create(${(i=(s=o.displayName)!==null&&s!==void 0?s:o.name)!==null&&i!==void 0?i:""})`}`;const l=g.forwardRef(a);return l[Oc]=o,l}function Ic({layoutId:e}){const t=g.useContext(So).id;return t&&e!==void 0?t+"-"+e:e}function Rc(e,t){const n=g.useContext(Bo).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 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 qo=e=>t=>typeof t=="string"&&t.startsWith(e),nr=qo("--"),Bc=qo("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"],Ge=new Set(ft);function Ho(e,{layout:t,layoutId:n}){return Ge.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!kt[e]||e==="opacity")}const se=e=>!!(e&&e.getVelocity),Yo=(e,t)=>t&&typeof e=="number"?t.transform(e):e,_e=(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=>_e(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}`}),Ve=Nt("deg"),Se=Nt("%"),D=Nt("px"),Uc=Nt("vh"),Xc=Nt("vw"),Zo={...Se,parse:e=>Se.parse(e)/100,transform:e=>Se.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:Ve,rotateX:Ve,rotateY:Ve,rotateZ:Ve,scale:hn,scaleX:hn,scaleY:hn,scaleZ:hn,skew:Ve,skewX:Ve,skewY:Ve,distance:D,translateX:D,translateY:D,translateZ:D,x:D,y:D,z:D,perspective:D,transformPerspective:D,opacity:jt,originX:Zo,originY:Zo,originZ:D},Jo={...ht,transform:Math.round},or={...Wc,...Kc,zIndex:Jo,size:D,fillOpacity:jt,strokeOpacity:jt,numOctaves:Jo},Gc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},qc=ft.length;function Hc(e,t,n){let r="",o=!0;for(let s=0;s<qc;s++){const i=ft[s],a=e[i];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(i.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=Yo(a,or[i]);if(!l){o=!1;const u=Gc[i]||i;r+=`${u}(${c}) `}n&&(t[i]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function sr(e,t,n){const{style:r,vars:o,transformOrigin:s}=e;let i=!1,a=!1;for(const l in t){const c=t[l];if(Ge.has(l)){i=!0;continue}else if(nr(l)){o[l]=c;continue}else{const u=Yo(c,or[l]);l.startsWith("origin")?(a=!0,s[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}=s;r.transformOrigin=`${l} ${c} ${u}`}}const ir=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Qo(e,t,n){for(const r in t)!se(t[r])&&!Ho(r,n)&&(e[r]=t[r])}function Yc({transformTemplate:e},t){return g.useMemo(()=>{const n=ir();return sr(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Zc(e,t){const n=e.style||{},r={};return Qo(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,o=!0){e.pathLength=1;const s=o?eu:tu;e[s.offset]=D.transform(-r);const i=D.transform(t),a=D.transform(n);e[s.array]=`${i} ${a}`}function es(e,t,n){return typeof e=="string"?e:D.transform(t+n*e)}function ru(e,t,n){const r=es(t,e.x,e.width),o=es(n,e.y,e.height);return`${r} ${o}`}function lr(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(sr(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:m,dimensions:p}=e;f.transform&&(p&&(m.transform=f.transform),delete f.transform),p&&(o!==void 0||s!==void 0||m.transform)&&(m.transformOrigin=ru(p,o!==void 0?o:.5,s!==void 0?s:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&nu(f,i,a,l,!1)}const ts=()=>({...ir(),attrs:{}}),cr=e=>typeof e=="string"&&e.toLowerCase()==="svg";function ou(e,t,n,r){const o=g.useMemo(()=>{const s=ts();return lr(s,t,cr(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Qo(s,e.style,e),o.style={...s,...o.style}}return o}function su(e=!1){return(n,r,o,{latestValues:s},i)=>{const l=(ar(n)?ou:Jc)(r,s,i,n),c=Ac(r,typeof n=="string",e),u=n!==g.Fragment?{...c,...l,ref:o}:{},{children:d}=r,f=g.useMemo(()=>se(d)?d.get():d,[d]);return g.createElement(n,{...u,children:f})}}function ns(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function ur(e,t,n,r){if(typeof t=="function"){const[o,s]=ns(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=ns(r);t=t(n!==void 0?n:e.custom,o,s)}return t}const dr=e=>Array.isArray(e),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=se(e)?e.get():e;return iu(t)?t.toValue():t}function lu({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,s){const i={latestValues:cu(r,o,s,e),renderState:t()};return n&&(i.onMount=a=>n({props:r,current:a,...i}),i.onUpdate=a=>n(a)),i}const rs=e=>(t,n)=>{const r=g.useContext(un),o=g.useContext(Fn),s=()=>lu(e,t,r,o);return n?s():rc(s)};function cu(e,t,n,r){const o={},s=r(e,{});for(const f in s)o[f]=pn(s[f]);let{initial:i,animate:a}=e;const l=fn(e),c=Uo(e);t&&c&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||i===!1;const d=u?a:i;if(d&&typeof d!="boolean"&&!dn(d)){const f=Array.isArray(d)?d:[d];for(let m=0;m<f.length;m++){const p=ur(e,f[m]);if(p){const{transitionEnd:y,transition:S,...v}=p;for(const b in v){let w=v[b];if(Array.isArray(w)){const M=u?w.length-1:0;w=w[M]}w!==null&&(o[b]=w)}for(const b in y)o[b]=y[b]}}}return o}function fr(e,t,n){var r;const{style:o}=e,s={};for(const i in o)(se(o[i])||t.style&&se(t.style[i])||Ho(i,e)||((r=n==null?void 0:n.getValue(i))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[i]=o[i]);return s}const uu={useVisualState:rs({scrapeMotionValuesFromProps:fr,createRenderState:ir})};function os(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function ss(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const is=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function as(e,t,n,r){ss(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(is.has(o)?o:tr(o),t.attrs[o])}function ls(e,t,n){const r=fr(e,t,n);for(const o in e)if(se(e[o])||se(t[o])){const s=ft.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}const cs=["x","y","width","height","cx","cy","r"],du={useVisualState:rs({scrapeMotionValuesFromProps:ls,createRenderState:ts,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let s=!!e.drag;if(!s){for(const a in o)if(Ge.has(a)){s=!0;break}}if(!s)return;let i=!t;if(t)for(let a=0;a<cs.length;a++){const l=cs[a];e[l]!==t[l]&&(i=!0)}i&&U.read(()=>{os(n,r),U.render(()=>{lr(r,o,cr(n.tagName),e.transformTemplate),as(n,r)})})}})};function fu(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const i={...ar(r)?du:uu,preloadedFeatures:e,useRender:su(o),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 us=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:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=au(s[i]);hu(e,i,a)}}function mu(e){return!!(se(e)&&e.add)}function hr(e,t){const n=e.getValue("willChange");if(mu(n))return n.add(t)}function ds(e){return e.props[Wo]}const fs=(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,o){let s,i,a=0;do i=t+(n-t)/2,s=fs(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>gu&&++a<yu);return i}function It(e,t,n,r){if(e===t&&n===r)return de;const o=s=>vu(s,0,1,e,n);return s=>s===0||s===1?s:fs(o(s),t,r)}const hs=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ps=e=>t=>1-e(1-t),ms=It(.33,1.53,.69,.99),pr=ps(ms),gs=hs(pr),ys=e=>(e*=2)<1?.5*pr(e):.5*(2-Math.pow(2,-10*(e-1))),mr=e=>1-Math.sin(Math.acos(e)),vs=ps(mr),xs=hs(mr),bs=e=>/^0[^.\s]+$/u.test(e);function xu(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||bs(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)),Ss=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,s,i,a]=r.match(gr);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},Cu=e=>_e(0,255,e),vr={...ht,transform:e=>Math.round(Cu(e))},qe={test:yr("rgb","red"),parse:Ss("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+vr.transform(e)+", "+vr.transform(t)+", "+vr.transform(n)+", "+Rt(jt.transform(r))+")"};function wu(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const xr={test:yr("#"),parse:wu,transform:qe.transform},pt={test:yr("hsl","hue"),parse:Ss("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Se.transform(Rt(t))+", "+Se.transform(Rt(n))+", "+Rt(jt.transform(r))+")"},ie={test:e=>qe.test(e)||xr.test(e)||pt.test(e),parse:e=>qe.test(e)?qe.parse(e):pt.test(e)?pt.parse(e):xr.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?qe.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 Cs="number",ws="color",Eu="var",Pu="var(",Ts="${}",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:[]},o=[];let s=0;const a=t.replace(Au,l=>(ie.test(l)?(r.color.push(s),o.push(ws),n.push(ie.parse(l))):l.startsWith(Pu)?(r.var.push(s),o.push(Eu),n.push(l)):(r.number.push(s),o.push(Cs),n.push(parseFloat(l))),++s,Ts)).split(Ts);return{values:n,split:a,indexes:r,types:o}}function _s(e){return Ft(e).values}function Es(e){const{split:t,types:n}=Ft(e),r=t.length;return o=>{let s="";for(let i=0;i<r;i++)if(s+=t[i],o[i]!==void 0){const a=n[i];a===Cs?s+=Rt(o[i]):a===ws?s+=ie.transform(o[i]):s+=o[i]}return s}}const Mu=e=>typeof e=="number"?0:e;function Lu(e){const t=_s(e);return Es(e)(t.map(Mu))}const Ie={test:_u,parse:_s,createTransformer:Es,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 o=n.replace(r,"");let s=Du.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const ku=/\b([a-z-]*)\(.*?\)/gu,br={...Ie,getAnimatableNone:e=>{const t=e.match(ku);return t?t.map(Ou).join(" "):e}},ju={...or,color:ie,backgroundColor:ie,outlineColor:ie,fill:ie,stroke:ie,borderColor:ie,borderTopColor:ie,borderRightColor:ie,borderBottomColor:ie,borderLeftColor:ie,filter:br,WebkitFilter:br},Ps=e=>ju[e];function As(e,t){let n=Ps(e);return n!==br&&(n=Ie),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Nu=new Set(["auto","none","0"]);function Vu(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!Nu.has(s)&&Ft(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=As(n,o)}const He=e=>e*180/Math.PI,Sr=e=>{const t=He(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=>He(Math.atan(e[1])),skewY:e=>He(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Cr=e=>(e=e%360,e<0&&(e+=360),e),Ms=Sr,Ls=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Ds=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:Ls,scaleY:Ds,scale:e=>(Ls(e)+Ds(e))/2,rotateX:e=>Cr(He(Math.atan2(e[6],e[5]))),rotateY:e=>Cr(He(Math.atan2(-e[2],e[0]))),rotateZ:Ms,rotate:Ms,skewX:e=>He(Math.atan(e[4])),skewY:e=>He(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Os(e){return e.includes("scale")?1:0}function wr(e,t){if(!e||e==="none")return Os(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=Ru,o=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Iu,o=a}if(!o)return Os(t);const s=r[t],i=o[1].split(",").map(Bu);return typeof s=="function"?s(i):i[s]}const Fu=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return wr(n,t)};function Bu(e){return parseFloat(e.trim())}const ks=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 Ye=new Set;let Tr=!1,_r=!1;function js(){if(_r){const e=Array.from(Ye).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=Uu(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([s,i])=>{var a;(a=r.getValue(s))===null||a===void 0||a.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}_r=!1,Tr=!1,Ye.forEach(e=>e.complete()),Ye.clear()}function Ns(){Ye.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(_r=!0)})}function Xu(){Ns(),js()}class Er{constructor(t,n,r,o,s,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ye.add(this),Tr||(Tr=!0,U.read(Ns),U.resolveKeyframes(js))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const i=o==null?void 0:o.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Ye.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ye.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Vs=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,o]=t;return[`--${n??r}`,o]}const Gu=4;function Is(e,t,n=1){je(n<=Gu,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=Ku(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return Vs(i)?parseFloat(i):i}return rr(o)?Is(o,t,n+1):o}const Rs=e=>t=>t.test(e),Fs=[ht,D,Se,Ve,Xc,Uc,{test:e=>e==="auto",parse:e=>e}],Bs=e=>Fs.find(Rs(e));class $s extends Er{constructor(t,n,r,o,s){super(t,n,r,o,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),rr(c))){const u=Is(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!us.has(r)||t.length!==2)return;const[o,s]=t,i=Bs(o),a=Bs(s);if(i!==a)if(ks(i)&&ks(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)xu(t[o])&&r.push(o);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 o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n||!n.current)return;const s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const i=o.length-1,a=o[i];o[i]=mt[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const zs=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ie.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 o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],i=zs(o,t),a=zs(s,t);return lt(i===a,`You are trying to animate ${t} from "${o}" to "${s}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${s} via the \`style\` property.`),!i||!a?!1:qu(e)||(n==="spring"||Kn(n))&&r}const Yu=e=>e!==null;function mn(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(Yu),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}const Zu=40;class Us{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=be.now(),this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:i,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>Zu?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Xu(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=be.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:s,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!Hu(t,r,o,s))if(i)this.options.duration=0;else{l&&l(mn(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const K=(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 o=0,s=0,i=0;if(!t)o=s=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=Pr(l,a,e+1/3),s=Pr(l,a,e),i=Pr(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function gn(e,t){return n=>n>0?t:e}const Ar=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},Qu=[xr,qe,pt],ed=e=>Qu.find(t=>t.test(e));function Xs(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 Ws=(e,t)=>{const n=Xs(e),r=Xs(t);if(!n||!r)return gn(e,t);const o={...n};return s=>(o.red=Ar(n.red,r.red,s),o.green=Ar(n.green,r.green,s),o.blue=Ar(n.blue,r.blue,s),o.alpha=K(n.alpha,r.alpha,s),qe.transform(o))},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=>K(e,t,n)}function Lr(e){return typeof e=="number"?rd:typeof e=="string"?rr(e)?gn:ie.test(e)?Ws:id:Array.isArray(e)?Ks:typeof e=="object"?ie.test(e)?Ws:od:gn}function Ks(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>Lr(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function od(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Lr(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function sd(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],a=e.indexes[i][o[i]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[s]=l,o[i]++}return r}const id=(e,t)=>{const n=Ie.createTransformer(t),r=Ft(e),o=Ft(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Mr.has(e)&&!o.values.length||Mr.has(t)&&!r.values.length?nd(e,t):Bt(Ks(sd(r,o),o.values),n):(lt(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),gn(e,t))};function Gs(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?K(e,t,n):Lr(e)(e,t)}const ad=5;function qs(e,t,n){const r=Math.max(t-ad,0);return wo(n-e(r),t-r)}const G={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},Hs=.001;function ld({duration:e=G.duration,bounce:t=G.bounce,velocity:n=G.velocity,mass:r=G.mass}){let o,s;lt(e<=xe(G.maxDuration),"Spring duration must be 10 seconds or less");let i=1-t;i=_e(G.minDamping,G.maxDamping,i),e=_e(G.minDuration,G.maxDuration,Te(e)),i<1?(o=c=>{const u=c*i,d=u*e,f=u-n,m=Dr(c,i),p=Math.exp(-d);return Hs-f/m*p},s=c=>{const d=c*i*e,f=d*n+n,m=Math.pow(i,2)*Math.pow(c,2)*e,p=Math.exp(-d),y=Dr(Math.pow(c,2),i);return(-o(c)+Hs>0?-1:1)*((f-m)*p)/y}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-.001+u*d},s=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=ud(o,s,a);if(e=xe(e),isNaN(l))return{stiffness:G.stiffness,damping:G.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 o=1;o<cd;o++)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 Ys(e,t){return t.some(n=>e[n]!==void 0)}function hd(e){let t={velocity:G.velocity,stiffness:G.stiffness,damping:G.damping,mass:G.mass,isResolvedFromDuration:!1,...e};if(!Ys(e,fd)&&Ys(e,dd))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,s=2*_e(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:G.mass,stiffness:o,damping:s}}else{const n=ld(e);t={...t,...n,mass:G.mass},t.isResolvedFromDuration=!0}return t}function Zs(e=G.visualDuration,t=G.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const s=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:m}=hd({...n,velocity:-Te(n.velocity||0)}),p=f||0,y=c/(2*Math.sqrt(l*u)),S=i-s,v=Te(Math.sqrt(l/u)),b=Math.abs(S)<5;r||(r=b?G.restSpeed.granular:G.restSpeed.default),o||(o=b?G.restDelta.granular:G.restDelta.default);let w;if(y<1){const _=Dr(v,y);w=L=>{const k=Math.exp(-y*v*L);return i-k*((p+y*v*S)/_*Math.sin(_*L)+S*Math.cos(_*L))}}else if(y===1)w=_=>i-Math.exp(-v*_)*(S+(p+v*S)*_);else{const _=v*Math.sqrt(y*y-1);w=L=>{const k=Math.exp(-y*v*L),A=Math.min(_*L,300);return i-k*((p+y*v*S)*Math.sinh(A)+_*S*Math.cosh(A))/_}}const M={calculatedDuration:m&&d||null,next:_=>{const L=w(_);if(m)a.done=_>=d;else{let k=0;y<1&&(k=_===0?xe(p):qs(w,_,L));const A=Math.abs(k)<=r,V=Math.abs(i-L)<=o;a.done=A&&V}return a.value=a.done?i:L,a},toString:()=>{const _=Math.min(_o(M),Wn),L=Po(k=>M.next(_*k).value,_,30);return _+"ms "+L}};return M}function Js({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},m=A=>a!==void 0&&A<a||l!==void 0&&A>l,p=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let y=n*t;const S=d+y,v=i===void 0?S:i(S);v!==S&&(y=v-d);const b=A=>-y*Math.exp(-A/r),w=A=>v+b(A),M=A=>{const V=b(A),E=w(A);f.done=Math.abs(V)<=c,f.value=f.done?v:E};let _,L;const k=A=>{m(f.value)&&(_=A,L=Zs({keyframes:[f.value,p(f.value)],velocity:qs(w,A,f.value),damping:o,stiffness:s,restDelta:c,restSpeed:u}))};return k(0),{calculatedDuration:null,next:A=>{let V=!1;return!L&&_===void 0&&(V=!0,M(A),k(A)),_!==void 0&&A>=_?L.next(A-_):(!V&&M(A),f)}}}const pd=It(.42,0,1,1),md=It(0,0,.58,1),Qs=It(.42,0,.58,1),gd=e=>Array.isArray(e)&&typeof e[0]!="number",ei={linear:de,easeIn:pd,easeInOut:Qs,easeOut:md,circIn:mr,circInOut:xs,circOut:vs,backIn:pr,backInOut:gs,backOut:ms,anticipate:ys},ti=e=>{if(Gn(e)){je(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return It(t,n,r,o)}else if(typeof e=="string")return je(ei[e]!==void 0,`Invalid easing type '${e}'`),ei[e];return e};function yd(e,t,n){const r=[],o=n||Gs,s=e.length-1;for(let i=0;i<s;i++){let a=o(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||de:t;a=Bt(l,a)}r.push(a)}return r}function vd(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(je(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=yd(t,r,o),l=a.length,c=u=>{if(i&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=ct(e[d],e[d+1],u);return a[d](f)};return n?u=>c(_e(e[0],e[s-1],u)):c}function xd(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=ct(0,t,r);e.push(K(n,1,o))}}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||Qs).splice(0,e.length-1)}function $t({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=gd(r)?r.map(ti):ti(r),s={done:!1,value:t[0]},i=Sd(n&&n.length===t.length?n:bd(t),e),a=vd(i,t,{ease:Array.isArray(o)?o:Cd(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const wd=e=>{const t=({timestamp:n})=>e(n);return{start:()=>U.update(t,!0),stop:()=>Ne(t),now:()=>re.isProcessing?re.timestamp:be.now()}},Td={decay:Js,inertia:Js,tween:$t,keyframes:$t,spring:Zs},_d=e=>e/100;class Or extends Us{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:o,keyframes:s}=this.options,i=(o==null?void 0:o.KeyframeResolver)||Er,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new i(s,a,n,r,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:i=0}=this.options,a=Kn(n)?n:Td[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(_d,Gs(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});s==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=_o(u));const{calculatedDuration:d}=u,f=d+o,m=f*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:m}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:A}=this.options;return{done:!0,value:A[A.length-1]}}const{finalKeyframe:o,generator:s,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return s.next(0);const{delay:f,repeat:m,repeatType:p,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 w=this.currentTime,M=s;if(m){const A=Math.min(this.currentTime,u)/d;let V=Math.floor(A),E=A%1;!E&&A>=1&&(E=1),E===1&&V--,V=Math.min(V,m+1),!!(V%2)&&(p==="reverse"?(E=1-E,y&&(E-=y/d)):p==="mirror"&&(M=i)),w=_e(0,1,E)*d}const _=b?{done:!1,value:l[0]}:M.next(w);a&&(_.value=a(_.value));let{done:L}=_;!b&&c!==null&&(L=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&L);return k&&o!==void 0&&(_.value=mn(l,this.options,o)),S&&S(_.value),k&&this.finish(),_}get duration(){const{resolved:t}=this;return t?Te(t.calculatedDuration):0}get time(){return Te(this.currentTime)}set time(t){t=xe(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Te(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(s=>this.tick(s))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Ed=new Set(["opacity","clipPath","filter","transform"]);function Pd(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:i="loop",ease:a="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Mo(a,o);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:i==="reverse"?"alternate":"normal"})}const Ad=zn(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),yn=10,Md=2e4;function Ld(e){return Kn(e.type)||e.type==="spring"||!Ao(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 o=[];let s=0;for(;!r.done&&s<Md;)r=n.sample(s),o.push(r.value),s+=yn;return{times:void 0,keyframes:o,duration:s-yn,ease:"linear"}}const ni={anticipate:ys,backInOut:gs,circInOut:xs};function Od(e){return e in ni}class ri extends Us{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:s}=this.options;this.resolver=new $s(s,(i,a)=>this.onKeyframesResolved(i,a),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:o,ease:s,type:i,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&sn()&&Od(s)&&(s=ni[s]),Ld(this.options)){const{onComplete:d,onUpdate:f,motionValue:m,element:p,...y}=this.options,S=Dd(t,y);t=S.keyframes,t.length===1&&(t[1]=t[0]),r=S.duration,o=S.times,s=S.ease,i="keyframes"}const u=Pd(a.owner.current,l,t,{...this.options,duration:r,times:o,ease:s});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(Eo(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;a.set(mn(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:o,type:i,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Te(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Te(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=xe(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return de;const{animation:r}=n;Eo(r,t)}return de}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:s,ease:i,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,element:f,...m}=this.options,p=new Or({...m,keyframes:r,duration:o,type:s,ease:i,times:a,isGenerator:!0}),y=xe(this.time);c.setWithVelocity(p.sample(y-yn).value,p.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:o,repeatType:s,damping:i,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return Ad()&&r&&Ed.has(r)&&!l&&!c&&!o&&s!=="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:Ge.has(e)?e.startsWith("scale")?jd(t[1]):kd:Vd;function Rd({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:i,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const kr=(e,t,n,r={},o,s)=>i=>{const a=Xn(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-xe(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:o};Rd(a)||(u={...u,...Id(e,u)}),u.duration&&(u.duration=xe(u.duration)),u.repeatDelay&&(u.repeatDelay=xe(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),u.allowFlatten=!a.type&&!a.ease,d&&!s&&t.get()!==void 0){const f=mn(u.keyframes,a);if(f!==void 0)return U.update(()=>{u.onUpdate(f),u.onComplete()}),new cc([])}return!s&&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 oi(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var s;let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(i=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const f=e.getValue(d,(s=e.latestValues[d])!==null&&s!==void 0?s:null),m=l[d];if(m===void 0||u&&Fd(u,d))continue;const p={delay:n,...Xn(i||{},d)};let y=!1;if(window.MotionHandoffAnimation){const v=ds(e);if(v){const b=window.MotionHandoffAnimation(v,d,U);b!==null&&(p.startTime=b,y=!0)}}hr(e,d),f.start(kr(d,f,m,e.shouldReduceMotion&&us.has(d)?{type:!1}:p,e,y));const S=f.animation;S&&c.push(S)}return a&&Promise.all(c).then(()=>{U.update(()=>{a&&pu(e,a)})}),c}function jr(e,t,n={}){var r;const o=Vt(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>Promise.all(oi(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=s;return Bd(e,t,u+c,d,f,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[c,u]=l==="beforeChildren"?[i,a]:[a,i];return c().then(()=>u())}else return Promise.all([i(),a(n.delay)])}function Bd(e,t,n=0,r=0,o=1,s){const i=[],a=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort($d).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(jr(c,t,{...s,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 o=t.map(s=>jr(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=jr(e,t,n);else{const o=typeof t=="function"?Vt(e,t,n.custom):t;r=Promise.all(oi(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function si(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const 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],o=e.props[r];(Ot(o)||o===!1)&&(t[r]=o)}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 o=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:m,transitionEnd:p,...y}=f;c={...c,...y,...p}}return c};function s(l){t=l(e)}function i(l){const{props:c}=e,u=ii(e.parent)||{},d=[],f=new Set;let m={},p=1/0;for(let S=0;S<Wd;S++){const v=Xd[S],b=n[v],w=c[v]!==void 0?c[v]:u[v],M=Ot(w),_=v===l?b.isActive:null;_===!1&&(p=S);let L=w===u[v]&&w!==c[v]&&M;if(L&&r&&e.manuallyAnimateOnMount&&(L=!1),b.protectedKeys={...m},!b.isActive&&_===null||!w&&!b.prevProp||dn(w)||typeof w=="boolean")continue;const k=qd(b.prevProp,w);let A=k||v===l&&b.isActive&&!L&&M||S>p&&M,V=!1;const E=Array.isArray(w)?w:[w];let X=E.reduce(o(v),{});_===!1&&(X={});const{prevResolvedValues:$={}}=b,ee={...$,...X},le=W=>{A=!0,f.has(W)&&(V=!0,f.delete(W)),b.needsAnimating[W]=!0;const C=e.getValue(W);C&&(C.liveStyle=!1)};for(const W in ee){const C=X[W],I=$[W];if(m.hasOwnProperty(W))continue;let B=!1;dr(C)&&dr(I)?B=!si(C,I):B=C!==I,B?C!=null?le(W):f.add(W):C!==void 0&&f.has(W)?le(W):b.protectedKeys[W]=!0}b.prevProp=w,b.prevResolvedValues=X,b.isActive&&(m={...m,...X}),r&&e.blockInitialAnimation&&(A=!1),A&&(!(L&&k)||V)&&d.push(...E.map(W=>({animation:W,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),w=e.getValue(v);w&&(w.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 m;return(m=f.animationState)===null||m===void 0?void 0:m.setActive(l,c)}),n[l].isActive=c;const d=i(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=ai(),r=!0}}}function qd(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!si(t,e):!1}function Ze(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ai(){return{animate:Ze(!0),whileInView:Ze(),whileHover:Ze(),whileTap:Ze(),whileDrag:Ze(),whileFocus:Ze(),exit:Ze()}}class Re{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Hd extends Re{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 Re{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 o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const 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,of=0-ui,sf=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=K(t.min,t.max,e.origin),e.scale=ae(n)/ae(t),e.translate=K(n.min,n.max,e.origin)-e.originPoint,(e.scale>=nf&&e.scale<=rf||isNaN(e.scale))&&(e.scale=1),(e.translate>=of&&e.translate<=sf||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}),H=()=>({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 Je(e){return Vr(e)||gi(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function gi(e){return yi(e.x)||yi(e.y)}function yi(e){return e&&e!=="0%"}function vn(e,t,n){const r=e-n,o=t*r;return n+o}function vi(e,t,n,r,o){return o!==void 0&&(e=vn(e,o,r)),vn(e,n,r)+t}function Ir(e,t=0,n=1,r,o){e.min=vi(e.min,t,n,r,o),e.max=vi(e.max,t,n,r,o)}function 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 o=n.length;if(!o)return;t.x=t.y=1;let s,i;for(let a=0;a<o;a++){s=n[a],i=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&vt(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,xi(e,i)),r&&Je(s.latestValues)&&vt(e,s.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,o=.5){const s=K(e.min,e.max,o);Ir(e,t,n,s,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:o}=t;return o&&(yt(r.x,o.offset.x),yt(r.y,o.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:o,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Fr(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,m=df(d.offset,{x:0,y:0})>=3;if(!f&&!m)return;const{point:p}=d,{timestamp:y}=re;this.history.push({...p,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),U.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:m,onSessionEnd:p,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&&m&&m(d,S),p&&p(d,S)},!Zn(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const i=Ut(t),a=Rr(i,this.transformPagePoint),{point:l}=a,{timestamp:c}=re;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(),Ne(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 o=Ai(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>xe(t)));)n--;if(!r)return{x:0,y:0};const s=Te(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const i={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function pf(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?K(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?K(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:o}){return{x:Mi(e.x,n,o),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),o=ae(t);return o>r?n=ct(t.min,t.max-r,e.min):r>o&&(n=ct(e.min,e.max-o,t.min)),_e(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=H(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ut(u).point)},s=(u,d)=>{const{drag:f,dragPropagation:m,onDragStart:p}=this.getProps();if(f&&!m&&(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(Se.test(v)){const{projection:b}=this.visualElement;if(b&&b.layout){const w=b.layout.layoutBox[S];w&&(v=ae(w)*(parseFloat(v)/100))}}this.originPoint[S]=v}),p&&U.postRender(()=>p(u,d)),hr(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},i=(u,d)=>{const{dragPropagation:f,dragDirectionLock:m,onDirectionLock:p,onDrag:y}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:S}=d;if(m&&this.currentDirection===null){this.currentDirection=Cf(S),this.currentDirection!==null&&p&&p(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:o,onStart:s,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:o}=n;this.startAnimation(o);const{onDragEnd:s}=this.getProps();s&&U.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!xn(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=pf(i,this.constraints[t],this.elastic[t])),s.set(i)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&dt(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=mf(o.layoutBox,n):this.constraints=!1,this.elastic=xf(r),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&pe(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=vf(o.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:o}=this.visualElement;if(!o||!o.layout)return!1;const s=uf(r,o.root,this.visualElement.getTransformPagePoint());let i=gf(o.layout.layoutBox,s);if(n){const a=n(ef(i));this.hasMutatedConstraints=!!a,a&&(i=li(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=pe(u=>{if(!xn(u,n,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});const f=o?200:1e6,m=o?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return hr(this.visualElement,t),r.start(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(),o=r[n];return o||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:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:i,max:a}=o.layout.layoutBox[n];s.set(t[n]-K(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!dt(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};pe(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();o[i]=yf({min:l,max:l},this.constraints[i])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),pe(i=>{if(!xn(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(K(l,c,o[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:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),U.read(r);const i=zt(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.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(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:i=Br,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,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 Re{constructor(t){super(t),this.removeGroupControls=de,this.removeListeners=de,this.controls=new Sf(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||de}unmount(){this.removeGroupControls(),this.removeListeners()}}const ki=e=>(t,n)=>{e&&U.postRender(()=>e(t,n))};class Tf extends Re{constructor(){super(...arguments),this.removePointerDownListener=de}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:o}=this.node.getProps();return{onSessionStart:ki(t),onStart:ki(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&U.postRender(()=>o(s,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,o=Ie.parse(e);if(o.length>5)return r;const s=Ie.createTransformer(e),i=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+i]/=a,o[1+i]/=l;const c=K(a,l,.5);return typeof o[2+i]=="number"&&(o[2+i]/=c),typeof o[3+i]=="number"&&(o[3+i]/=c),s(o)}};class Ef extends g.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;zc(Pf),s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),bn.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,i=r.projection;return i&&(i.isPresent=s,o||t.layoutDependency!==n||n===void 0||t.isPresent!==s?i.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?i.promote():i.relegate()||U.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:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Ni(e){const[t,n]=sc(),r=g.useContext(So);return x.jsx(Ef,{...e,layoutGroup:r,switchLayoutGroup:g.useContext(Ko),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=se(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=be.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(Ne(r),e(s-t))};return U.read(r,!0),()=>Ne(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,o,s){o?(e.opacity=K(0,n.opacity!==void 0?n.opacity:1,Nf(r)),e.opacityExit=K(t.opacity!==void 0?t.opacity:1,0,Vf(r))):s&&(e.opacity=K(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(K(Ii(l),Ii(c),r),0),(Se.test(c)||Se.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=K(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,vs),Vf=Bi(.5,.95,de);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,o){return e-=t,e=vn(e,1/n,r),o!==void 0&&(e=vn(e,1/o,r)),e}function If(e,t=0,n=1,r=.5,o,s=e,i=e){if(Se.test(t)&&(t=parseFloat(t),t=K(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=K(s.min,s.max,r);e===s&&(a-=t),e.min=Ui(e.min,t,n,a,o),e.max=Ui(e.max,t,n,a,o)}function Xi(e,t,[n,r,o],s,i){If(e,t[n],t[r],t[o],t.scale,s,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(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function zf(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((o||s||i)&&(r=`translate3d(${o}px, ${s}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:m,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),m&&(r+=`skewX(${m}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const $r=["","X","Y","Z"],Uf={visibility:"hidden"},Qi=1e3;let Xf=0;function zr(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function ea(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=ds(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",U,!(o||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&ea(r)}function ta({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=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:m,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||u.getDefaultTransition()||oh,{onLayoutAnimationStart:S,onLayoutAnimationComplete:v}=u.getProps(),b=!this.targetLayout||!Yi(this.targetLayout,p),w=!f&&m;if(this.options.layoutRoot||this.resumeFrom||w||f&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,w);const M={...Xn(y,"layout"),onPlay:S,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(M.delay=0,M.type=!1),this.startAnimation(M)}else f||ra(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ne(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=be.now();re.delta=_e(0,1e3/60,a-re.timestamp),re.timestamp=a,re.isProcessing=!0,Hn.update.process(re),Hn.preRender.process(re),Hn.render.process(re),re.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,U.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){U.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=H(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Gi(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||Je(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return i&&(l=this.removeTransform(l)),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 H();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=H();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=H();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}),Je(u.latestValues)&&vt(l,u.latestValues)}return Je(this.latestValues)&&vt(l,this.latestValues),l}removeTransform(i){const a=H();me(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Je(c.latestValues))continue;Vr(c.latestValues)&&c.updateSnapshot();const u=H(),d=c.measurePageBox();me(u,d),Wi(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Je(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!==re.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=re.timestamp,!this.targetDelta&&!this.relativeTarget){const m=this.getClosestProjectingParent();m&&m.layout&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=H(),this.relativeTargetOrigin=H(),Kt(this.relativeTargetOrigin,this.layout.layoutBox,m.layout.layoutBox),me(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=H(),this.targetWithTransforms=H()),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 m=this.getClosestProjectingParent();m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=H(),this.relativeTargetOrigin=H(),Kt(this.relativeTargetOrigin,this.target,m.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===re.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,m=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=H());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(zi(this.prevProjectionDelta.x,this.projectionDelta.x),zi(this.prevProjectionDelta.y,this.projectionDelta.y)),Wt(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==m||!Ji(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ji(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),i){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=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=H(),m=l?l.source:void 0,p=this.layout?this.layout.source:void 0,y=m!==p,S=this.getStack(),v=!S||S.members.length<=1,b=!!(y&&!v&&this.options.crossfade===!0&&!this.path.some(rh));this.animationProgress=0;let w;this.mixTargetDelta=M=>{const _=M/1e3;oa(d.x,i.x,_),oa(d.y,i.y,_),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,_),w&&Bf(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=H()),me(w,this.relativeTarget)),y&&(this.animationValues=u,jf(u,c,this.latestValues,_,b,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=_},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&&(Ne(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=U.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||H();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&&!Je(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:m,y:p}=this.projectionDelta;c.transformOrigin=`${m.origin*100}% ${p.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:c.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const y in kt){if(f[y]===void 0)continue;const{correct:S,applyTo:v,isCSSVariable:b}=kt[y],w=c.transform==="none"?f[y]:S(f[y],d);if(v){const M=v.length;for(let _=0;_<M;_++)c[v[_]]=w}else b?this.options.visualElement.renderState.vars[y]=w:c[y]=w}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:o}=e.layout,{animationType:s}=e.options,i=n.source!==e.layout.source;s==="size"?pe(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],m=ae(f);f.min=r[d].min,f.max=f.min+m}):ca(s,n.layoutBox,r)&&pe(d=>{const f=i?n.measuredBox[d]:n.layoutBox[d],m=ae(r[d]);f.max=f.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+m)});const a=gt();Wt(a,r,n.layoutBox);const l=gt();i?Wt(l,e.applyTransform(o,!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:m}=d;if(f&&m){const p=H();Kt(p,n.layoutBox,f.layoutBox);const y=H();Kt(y,r,m.layoutBox),Yi(p,y)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=p,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function 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 oa(e,t,n){e.translate=K(t.translate,0,n),e.scale=K(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function sa(e,t,n,r){e.min=K(t.min,n.min,r),e.max=K(t.max,n.max,r)}function nh(e,t,n,r){sa(e.x,t.x,n.x,r),sa(e.y,t.y,n.y,r)}function rh(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const oh={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:de;function la(e){e.min=aa(e.min),e.max=aa(e.max)}function sh(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 o="onHover"+n,s=r[o];s&&U.postRender(()=>s(t,Ut(t)))}class ch extends Re{mount(){const{current:t}=this.node;t&&(this.unmount=yc(t,(n,r)=>(da(this.node,r,"Start"),o=>da(this.node,o,"End"))))}unmount(){}}class uh 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 fa(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=r[o];s&&U.postRender(()=>s(t,Ut(t)))}class dh extends Re{mount(){const{current:t}=this.node;t&&(this.unmount=Sc(t,(n,r)=>(fa(this.node,r,"Start"),(o,{success:s})=>fa(this.node,o,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Xr=new WeakMap,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),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(hh,{root:e,...t})),r[o]}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 Re{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:gh[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return 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=[...Fs,ie,Ie],wh=e=>Ch.find(Rs(e)),Th=new WeakMap;function _h(e,t,n){for(const r in t){const o=t[r],s=n[r];if(se(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&on(o.version==="12.5.0",`Attempting to mix Motion versions ${o.version} with 12.5.0 may not work as expected.`);else if(se(s))e.addValue(r,Dt(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{const i=e.getStaticValue(r);e.addValue(r,Dt(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const pa=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Eh{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=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 m=be.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,U.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:u}=i;this.onUpdate=u,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=fn(n),this.isVariantNode=Uo(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in f){const p=f[m];l[m]!==void 0&&se(p)&&p.set(l[m],!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"&&on(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ne(this.notifyUpdate),Ne(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Ge.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&U.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),s(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in ut){const n=ut[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):H()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<pa.length;r++){const o=pa[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,i=t[s];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=_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 o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(Vs(o)||bs(o))?o=parseFloat(o):!wh(o)&&Ie.test(n)&&(o=As(t,n)),this.setBaseTarget(t,se(o)?o.get():o)),se(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const i=ur(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);i&&(o=i[t])}if(r&&o!==void 0)return o;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!se(s)?s:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new 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=$s}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;se(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=ss}readValueFromInstance(t,n){if(Ge.has(n))return Fu(t,n);{const r=Ph(t),o=(nr(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return wi(t,n)}build(t,n,r){sr(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=H,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&os(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ge.has(n)){const r=Ps(n);return r&&r.default||0}return n=is.has(n)?n:tr(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return ls(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&U.postRender(this.updateDimensions)}build(t,n,r){lr(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){as(t,n,r,o)}mount(t){this.isSVGTag=cr(t.tagName),super.mount(t)}}const Lh=(e,t)=>ar(e)?new Mh(t):new Ah(t,{allowProjection:e!==g.Fragment}),Dh=fu({...Jd,...xh,...lh,...bh},Lh),Qe=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 Fe(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 et="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 Ee(e){if(e)return e.trim().split(" ").filter(t=>t.length)}function Pe(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:o,animate:s=!0,animationDelay:i=0,href:a,target:l,rel:c,linkProps:u={},style:d,...f},m){const p=t||"span",y=s?Qe[p]:p,S=e||"a",v=Fe(f)??[],b=s?{initial:{opacity:0,y:5},animate:{opacity:1,y:0},transition:{delay:i,duration:.2}}:{},M=c||(l==="_blank"?{rel:"noopener noreferrer"}:{}).rel;return x.jsx(y,{className:q(Oh.root,"dyn-locator__"+Pe(va),Ee(o),...v),"data-variant":r,...d?{style:d}:{},...b,...f,children:x.jsx(S,{ref:m,href:a,target:l,rel:M,...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:o,className:s,children:i,...a}){const l=Fe(a)??[];return x.jsxs("div",{className:q("dyn-locator__"+Pe(Sa),At.root,Ee(s),...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,o&&x.jsx("div",{className:At.content,children:x.jsx("pre",{children:o})})]})]})}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:bo,Expand:Jl,Location:Zl,Search:tc,Share:nc,Target:Yl},Ae={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:o="S",radius:s,variant:i="default",className:a,animate:l=!0,animationDelay:c=0,style:u,...d},f){const m=e||"span",p=l?Qe[m]:m,{iconMap:y}=np();function S(w){if(qh(w)){const M=typeof w=="string"?w:w.name;return y[M]?g.createElement(y[M],{...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 "'+M+'"!'}return Hh(w)?(i!=="default"&&console.warn("Warning: cannot set icon stroke on a remote asset"),x.jsx("img",{...n?{ref:n}:{},src:w.path,alt:`Icona decorativa${r?" che rappresenta '"+r+"'":""}`,className:Hr.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(p,{ref:f,className:q(Hr.root,"dyn-locator__"+Pe(_a),Ee(a),...v),...u?{style:u}:{},"data-variant":i,"data-size":o,...s?{"data-radius":s}:{},...b,...d,children:S(t)})}Ea.displayName=_a;const Be=g.forwardRef(Ea),Pa="Tag";function Aa({as:e,iconPosition:t="left",children:n,icon:r,className:o,animate:s=!0,animationDelay:i=0,style:a,...l},c){const u=e||"span",d=s?Qe[u]:u,f=Fe(l)??[],m=s?{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__"+Pe(Pa),Ee(o),...f),"data-icon-position":t,...a?{style:a}:{},...m,...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(Be,{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:o=!0,animationDelay:s=0,style:i,ariaLabel:a,href:l,target:c,rel:u,disabled:d=!1,...f},m){const p=e||"button",y=o?Qe[p]:p,S=Fe(f)??[],v=o?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:s,duration:.2}}:{},b=p==="a"?{href:l??"/",target:c??"_blank",rel:c==="_blank"?"noopener noreferrer":u}:{};return x.jsx(y,{ref:m,className:q(Zh.root,"dyn-locator__"+Pe(Ma),Ee(n),...S),"data-variant":r,"data-element":p,"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:o=!0,animationDelay:s=0,style:i,clickable:a=!1,onClick:l,...c},u){const d=e||"article",f=o?Qe[d]:d,m=Fe(c)??[],p=o?{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:s,duration:.3}}:{};return x.jsx(f,{ref:u,className:q(Da.root,"dyn-locator__"+Pe(Oa),Ee(n),...m),"data-variant":r,"data-clickable":a||!!l,onClick:l,...i?{style:i}:{},...p,...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:o,actions:s,className:i,...a},l){const c=ja("ctaButton");return x.jsx(Jh,{ref:l,variant:"bare",clickable:!0,className:q("dyn-locator__"+Pe(Na),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:Ae.root,children:[x.jsxs("header",{className:Ae.header,children:[t?x.jsx("time",{children:new Date(t).toLocaleDateString("it",{day:"numeric",month:"long",year:"numeric"})}):null,x.jsxs("div",{className:Ae.titleContainer,children:[e?x.jsx("h4",{children:e}):null,x.jsx(bt,{className:Ae.shareButton,variant:"bare",...qr(o),children:x.jsx(Be,{size:"M",icon:"Share"})})]}),n?x.jsx("address",{children:n}):null]}),r!=null&&r.length?x.jsx("div",{className:Ae.body,children:r.map((u,d)=>x.jsxs("div",{className:Ae.capabilities,children:[x.jsx("h5",{children:u.title}),x.jsx("ul",{className:Ae.tagContainer,children:(u.capabilities??[]).map((f,m)=>x.jsx(Yh,{as:"li",animationDelay:+`.${m+1}`,className:Ae.tag,children:f.label},m))})]},d))}):null,s!=null&&s.length?x.jsx("div",{className:Ae.cta,children:s.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_o9d55_1",loader:"_loader_o9d55_73"},Ra="Button";function Fa({as:e,children:t,className:n,variant:r="default",size:o="medium",disabled:s=!1,loading:i=!1,fullWidth:a=!1,animate:l=!0,animationDelay:c=0,href:u,target:d,rel:f,style:m,...p},y){const S=e||(u?"a":"button"),v=l?Qe[S]:S,b=Fe(p)??[],w=l?{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:c,duration:.2}}:{},M=u?{href:u,target:d,rel:d==="_blank"?"noopener noreferrer":f}:{};return x.jsx(v,{ref:y,className:q(Ia.root,"dyn-locator__"+Pe(Ra),Ee(n),...b),"data-variant":r,"data-size":o,"data-full-width":a,disabled:s||i,...m?{style:m}:{},...w,...M,...p,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??{}},o={...Ba,...n??{}};return x.jsx(Yr.Provider,{value:{iconMap:r,componentMap:o},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 op({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 sp(e){const{endpointMap:t,apiUrl:n}=g.useContext($a);return{getEndpoint:(r={})=>{const o=t[e];if(!o)throw new Error(`Endpoint with id "${e}" not configured. Make sure to provide all required endpoints.`);let s="";return o.buildPath?s=o.buildPath(r):(s=o.path,Object.entries(r).forEach(([i,a])=>{s=s.replace(`:${i}`,String(a))})),{url:`${n}${s}`,method:o.method}}}}let 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,$e=(e,t)=>{let n="",r="",o="";for(let s in e){let i=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+i+";":r+=s[1]=="f"?$e(i,s):s+"{"+$e(i,s[1]=="k"?"":t)+"}":typeof i=="object"?r+=$e(i,t?t.replace(/([^,])+/g,a=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,a):a?a+" "+l:l)):s):i!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=$e.p?$e.p(s,i):s+":"+i+";")}return n+(t&&o?t+"{"+o+"}":o)+r},Me={},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,o)=>{let s=Ua(e),i=Me[s]||(Me[s]=(l=>{let c=0,u=11;for(;c<l.length;)u=101*u+l.charCodeAt(c++)>>>0;return"go"+u})(s));if(!Me[i]){let l=s!==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);Me[i]=$e(o?{["@keyframes "+i]:l}:l,n?"":"."+i)}let a=n&&Me.g?Me.g:null;return n&&(Me.g=Me[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)})(Me[i],t,r,a),i},dp=(e,t,n)=>e.reduce((r,o,s)=>{let i=t[s];if(i&&i.call){let a=i(n),l=a&&a.props&&a.props.className||/^go/.test(a)&&a;i=l?"."+l:a&&typeof a=="object"?a.props?"":$e(a,""):a===!1?"":a}return r+o+(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,o)=>Object.assign(r,o&&o.call?o(t.p):o),{}):n,ap(t.target),t.g,t.o,t.k)}let Xa,Zr,Jr;Sn.bind({g:1});let Le=Sn.bind({k:1});function fp(e,t,n,r){$e.p=t,Xa=e,Zr=n,Jr=r}function ze(e,t){let n=this||{};return function(){let r=arguments;function o(s,i){let a=Object.assign({},s),l=a.className||o.className;n.p=Object.assign({theme:Zr&&Zr()},a),n.o=/ *go\d+/.test(l),a.className=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(o):o}}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(s=>s.id===t.toast.id?{...s,...t.toast}:s)};case 2:let{toast:n}=t;return Ka(e,{type:e.toasts.find(s=>s.id===n.id)?1:0,toast:n});case 3:let{toastId:r}=t;return{...e,toasts:e.toasts.map(s=>s.id===r||r===void 0?{...s,dismissed:!0,visible:!1}:s)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(s=>s.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let o=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(s=>({...s,pauseDuration:s.pauseDuration+o}))}}},wn=[],tt={toasts:[],pausedAt:void 0},nt=e=>{tt=Ka(tt,e),wn.forEach(t=>{t(tt)})},gp={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},yp=(e={})=>{let[t,n]=g.useState(tt),r=g.useRef(tt);g.useEffect(()=>(r.current!==tt&&n(tt),wn.push(n),()=>{let s=wn.indexOf(n);s>-1&&wn.splice(s,1)}),[]);let o=t.toasts.map(s=>{var i,a,l;return{...e,...e[s.type],...s,removeDelay:s.removeDelay||((i=e[s.type])==null?void 0:i.removeDelay)||(e==null?void 0:e.removeDelay),duration:s.duration||((a=e[s.type])==null?void 0:a.duration)||(e==null?void 0:e.duration)||gp[s.type],style:{...e.style,...(l=e[s.type])==null?void 0:l.style,...s.style}}});return{...t,toasts:o}},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 nt({type:2,toast:r}),r.id},Y=(e,t)=>Zt("blank")(e,t);Y.error=Zt("error"),Y.success=Zt("success"),Y.loading=Zt("loading"),Y.custom=Zt("custom"),Y.dismiss=e=>{nt({type:3,toastId:e})},Y.remove=e=>nt({type:4,toastId:e}),Y.promise=(e,t,n)=>{let r=Y.loading(t.loading,{...n,...n==null?void 0:n.loading});return typeof e=="function"&&(e=e()),e.then(o=>{let s=t.success?Cn(t.success,o):void 0;return s?Y.success(s,{id:r,...n,...n==null?void 0:n.success}):Y.dismiss(r),o}).catch(o=>{let s=t.error?Cn(t.error,o):void 0;s?Y.error(s,{id:r,...n,...n==null?void 0:n.error}):Y.dismiss(r)}),e};var xp=(e,t)=>{nt({type:1,toast:{id:e,height:t}})},bp=()=>{nt({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),nt({type:4,toastId:e})},t);Jt.set(e,n)},wp=e=>{let{toasts:t,pausedAt:n}=yp(e);g.useEffect(()=>{if(n)return;let s=Date.now(),i=t.map(a=>{if(a.duration===1/0)return;let l=(a.duration||0)+a.pauseDuration-(s-a.createdAt);if(l<0){a.visible&&Y.dismiss(a.id);return}return setTimeout(()=>Y.dismiss(a.id),l)});return()=>{i.forEach(a=>a&&clearTimeout(a))}},[t,n]);let r=g.useCallback(()=>{n&&nt({type:6,time:Date.now()})},[n]),o=g.useCallback((s,i)=>{let{reverseOrder:a=!1,gutter:l=8,defaultPosition:c}=i||{},u=t.filter(m=>(m.position||c)===(s.position||c)&&m.height),d=u.findIndex(m=>m.id===s.id),f=u.filter((m,p)=>p<d&&m.visible).length;return u.filter(m=>m.visible).slice(...a?[f+1]:[0,f]).reduce((m,p)=>m+(p.height||0)+l,0)},[t]);return g.useEffect(()=>{t.forEach(s=>{if(s.dismissed)Cp(s.id,s.removeDelay);else{let i=Jt.get(s.id);i&&(clearTimeout(i),Jt.delete(s.id))}})},[t]),{toasts:t,handlers:{updateHeight:xp,startPause:bp,endPause:r,calculateOffset:o}}},Tp=Le`
129
129
  from {
130
130
  transform: scale(0) rotate(45deg);
131
131
  opacity: 0;
@@ -133,7 +133,7 @@ from {
133
133
  to {
134
134
  transform: scale(1) rotate(45deg);
135
135
  opacity: 1;
136
- }`,_p=De`
136
+ }`,_p=Le`
137
137
  from {
138
138
  transform: scale(0);
139
139
  opacity: 0;
@@ -141,7 +141,7 @@ from {
141
141
  to {
142
142
  transform: scale(1);
143
143
  opacity: 1;
144
- }`,Ep=De`
144
+ }`,Ep=Le`
145
145
  from {
146
146
  transform: scale(0) rotate(90deg);
147
147
  opacity: 0;
@@ -149,7 +149,7 @@ from {
149
149
  to {
150
150
  transform: scale(1) rotate(90deg);
151
151
  opacity: 1;
152
- }`,Pp=Ue("div")`
152
+ }`,Pp=ze("div")`
153
153
  width: 20px;
154
154
  opacity: 0;
155
155
  height: 20px;
@@ -182,14 +182,14 @@ to {
182
182
  animation-delay: 180ms;
183
183
  transform: rotate(90deg);
184
184
  }
185
- `,Ap=De`
185
+ `,Ap=Le`
186
186
  from {
187
187
  transform: rotate(0deg);
188
188
  }
189
189
  to {
190
190
  transform: rotate(360deg);
191
191
  }
192
- `,Mp=Ue("div")`
192
+ `,Mp=ze("div")`
193
193
  width: 12px;
194
194
  height: 12px;
195
195
  box-sizing: border-box;
@@ -198,7 +198,7 @@ to {
198
198
  border-color: ${e=>e.secondary||"#e0e0e0"};
199
199
  border-right-color: ${e=>e.primary||"#616161"};
200
200
  animation: ${Ap} 1s linear infinite;
201
- `,Lp=De`
201
+ `,Lp=Le`
202
202
  from {
203
203
  transform: scale(0) rotate(45deg);
204
204
  opacity: 0;
@@ -206,7 +206,7 @@ from {
206
206
  to {
207
207
  transform: scale(1) rotate(45deg);
208
208
  opacity: 1;
209
- }`,Dp=De`
209
+ }`,Dp=Le`
210
210
  0% {
211
211
  height: 0;
212
212
  width: 0;
@@ -220,7 +220,7 @@ to {
220
220
  100% {
221
221
  opacity: 1;
222
222
  height: 10px;
223
- }`,Op=Ue("div")`
223
+ }`,Op=ze("div")`
224
224
  width: 20px;
225
225
  opacity: 0;
226
226
  height: 20px;
@@ -247,16 +247,16 @@ to {
247
247
  height: 10px;
248
248
  width: 6px;
249
249
  }
250
- `,kp=Ue("div")`
250
+ `,kp=ze("div")`
251
251
  position: absolute;
252
- `,jp=Ue("div")`
252
+ `,jp=ze("div")`
253
253
  position: relative;
254
254
  display: flex;
255
255
  justify-content: center;
256
256
  align-items: center;
257
257
  min-width: 20px;
258
258
  min-height: 20px;
259
- `,Np=De`
259
+ `,Np=Le`
260
260
  from {
261
261
  transform: scale(0.6);
262
262
  opacity: 0.4;
@@ -264,20 +264,20 @@ from {
264
264
  to {
265
265
  transform: scale(1);
266
266
  opacity: 1;
267
- }`,Vp=Ue("div")`
267
+ }`,Vp=ze("div")`
268
268
  position: relative;
269
269
  transform: scale(0.6);
270
270
  opacity: 0.4;
271
271
  min-width: 20px;
272
272
  animation: ${Np} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
273
273
  forwards;
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=>`
274
+ `,Ip=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?Q.createElement(Vp,null,t):t:n==="blank"?null:Q.createElement(jp,null,Q.createElement(Mp,{...r}),n!=="loading"&&Q.createElement(kp,null,n==="error"?Q.createElement(Pp,{...r}):Q.createElement(Op,{...r})))},Rp=e=>`
275
275
  0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
276
276
  100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
277
277
  `,Fp=e=>`
278
278
  0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
279
279
  100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
280
- `,Bp="0%{opacity:0;} 100%{opacity:1;}",$p="0%{opacity:1;} 100%{opacity:0;}",zp=Ue("div")`
280
+ `,Bp="0%{opacity:0;} 100%{opacity:1;}",$p="0%{opacity:1;} 100%{opacity:0;}",zp=ze("div")`
281
281
  display: flex;
282
282
  align-items: center;
283
283
  background: #fff;
@@ -289,17 +289,17 @@ to {
289
289
  pointer-events: auto;
290
290
  padding: 8px 10px;
291
291
  border-radius: 8px;
292
- `,Up=Ue("div")`
292
+ `,Up=ze("div")`
293
293
  display: flex;
294
294
  justify-content: center;
295
295
  margin: 4px 10px;
296
296
  color: inherit;
297
297
  flex: 1 1 auto;
298
298
  white-space: pre-line;
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`
299
+ `,Xp=(e,t)=>{let n=e.includes("top")?1:-1,[r,o]=Wa()?[Bp,$p]:[Rp(n),Fp(n)];return{animation:t?`${Le(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Le(o)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},Ga=Q.memo(({toast:e,position:t,style:n,children:r})=>{let o=e.height?Xp(e.position||t||"top-center",e.visible):{opacity:0},s=Q.createElement(Ip,{toast:e}),i=Q.createElement(Up,{...e.ariaProps},Cn(e.message,e));return Q.createElement(zp,{className:e.className,style:{...o,...n,...e.style}},typeof r=="function"?r({icon:s,message:i}):Q.createElement(Q.Fragment,null,s,i))});fp(Q.createElement);var Wp=({id:e,className:t,style:n,onHeightUpdate:r,children:o})=>{let s=Q.useCallback(i=>{if(i){let a=()=>{let l=i.getBoundingClientRect().height;r(e,l)};a(),new MutationObserver(a).observe(i,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return Q.createElement("div",{ref:s,className:t,style:n},o)},Kp=(e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},o=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:Wa()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...o}},Gp=Sn`
300
300
  z-index: 9999;
301
301
  > * {
302
302
  pointer-events: auto;
303
303
  }
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"}})});
304
+ `,Tn=16,qp=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:o,containerStyle:s,containerClassName:i})=>{let{toasts:a,handlers:l}=wp(n);return Q.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:Tn,left:Tn,right:Tn,bottom:Tn,pointerEvents:"none",...s},className:i,onMouseEnter:l.startPause,onMouseLeave:l.endPause},a.map(c=>{let u=c.position||t,d=l.calculateOffset(c,{reverseOrder:e,gutter:r,defaultPosition:t}),f=Kp(u,d);return Q.createElement(Wp,{id:c.id,key:c.id,onHeightUpdate:l.updateHeight,className:c.visible?Gp:"",style:f},c.type==="custom"?Cn(c.message,c):o?o(c):Q.createElement(Ga,{toast:c,position:u}))}))};const Hp={root:"_root_movxa_4"};function qa({className:e,children:t,show:n=!0,variant:r="light",...o}){const s=q("dyn-locator__overlay",Hp.root,e);return n?x.jsx("div",{className:s,"data-variant":r,...o,children:t}):null}function _n(e){const[t,n]=g.useState(!1),[r,o]=g.useState(null),{getEndpoint:s}=sp(e);return{request:async(a={},l={})=>{n(!0),o(null);try{let c;try{c=s(a)}catch{throw new Error(`Endpoint "${e}" is not configured. The host application must provide all required endpoints.`)}const{url:u,method:d}=c,f=await fetch(u,{method:d,headers:{"Content-Type":"application/json",...l.headers},...d!=="GET"&&l.body?{body:JSON.stringify(l.body)}:{}});if(!f.ok)throw new Error(`HTTP error! status: ${f.status}`);return{data:await f.json()}}catch(c){const u=c instanceof Error?c:new Error(String(c));throw o(u),console.error(`Error in API request to "${e}":`,u),u}finally{n(!1)}},loading:t,error:r}}function Yp({children:e,customComponents:t,customIcons:n,featureFlags:r,fetchLocations:o,localizationConfig:s,locations:i=[],mapId:a}){const l=j(E=>E.isFullscreen),c=j(E=>E.setLocations),u=j(E=>E.setMapId),d=j(E=>E.setFeatureFlags),f=j(E=>E.setLocalizationConfig),m=j(E=>E.setMapDetail),p=j(E=>E.shouldRefetch),y=j(E=>E.setShouldRefetch),{request:S,loading:v,error:b}=_n(Yt.CLUSTERS),{request:w,loading:M,error:_}=_n(Yt.MARKERS),L=v||M,k=!!b||!!_;async function A(E){var X;try{if(typeof E!="number"||E<0||isNaN(E))throw new Error("No map ID provided");const{data:$}=await S({mapId:String(E)})??{};if(!$)throw new Error("No cluster data received from the server");c((X=$.map)==null?void 0:X.call($,ee=>({...ee,onMarkerClick:async()=>{await V(E,ee.id)}})))}catch($){console.error("Error fetching clusters: ",$),Y.error(et+Gr),c([])}}async function V(E,X){try{if(typeof E!="number"||E<0||isNaN(E))throw new Error("No map ID provided");const{data:$}=await w({mapId:E,clusterId:X})??{};if(!$)throw new Error("No marker data received from the server");c($),m(Ke.MARKER)}catch($){console.error("Error fetching markers: ",$),Y.error(et+Gr),c([])}}return g.useEffect(()=>{s&&f(s),r&&d(r),typeof a=="number"&&a>0&&!isNaN(a)&&u(a),i!=null&&i.length?c(i):o?o().then(E=>c(E)):A(a)},[]),g.useEffect(()=>{let E=!0;return p&&a&&A(a).finally(()=>{E&&y(!1)}),()=>{E=!1}},[p,a]),x.jsx("div",{id:"dyn-locator",className:q("dyn-locator__locator",yo.root),"data-fullscreen":l,children:x.jsxs(tp,{customIcons:n,customComponents:t,children:[e,x.jsxs(qa,{show:L||k,variant:"light",children:[L?x.jsx(Pt,{size:"large"}):null,k?x.jsx(wa,{title:jh,message:Gr,actionText:"ricaricare la pagina.",errorDetails:(b==null?void 0:b.message)||(_==null?void 0:_.message),onAction:E=>{E.preventDefault(),window.location.reload()}}):null]}),x.jsx(qp,{toastOptions:{position:"top-right",duration:3e3,error:{duration:1/0}},children:E=>x.jsx(Ga,{toast:E,children:({icon:X,message:$})=>x.jsxs(x.Fragment,{children:[X,$,E.type==="error"&&x.jsx(bt,{variant:"bare",onClick:()=>Y.dismiss(E.id),children:x.jsx(Be,{icon:"Close"})})]})})})]})})}function Ha({mapProvider:e,endpoints:t,apiUrl:n,children:r,...o}){return x.jsx(Kh,{children:x.jsx(kl,{children:x.jsx(Fl,{mapProvider:e,children:x.jsx(op,{endpoints:t,apiUrl:n,children:x.jsx(Yp,{children:r,...o})})})})})}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,o,s;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(s=Object.keys(t),r=s.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[o]))return!1;for(o=r;o--!==0;){var i=s[o];if(!e(t[i],n[i]))return!1}return!0}return t!==t&&n!==n}),Qr}var Jp=Zp();const Qp=lo(Jp);function Ce(){return Ce=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},Ce.apply(null,arguments)}function rt(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function em(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function tm(e){var t=em(e,"string");return typeof t=="symbol"?t:t+""}const 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 o=t.libraries?t.libraries.split(","):[],s=this.serializeParams(t);this.listeners.push(n),(r=window.google)!=null&&(r=r.maps)!=null&&r.importLibrary?(this.serializedApiParams||(this.loadingStatus=he.LOADED),this.notifyLoadingStatusListeners()):(this.serializedApiParams=s,this.initImportLibrary(t)),this.serializedApiParams&&this.serializedApiParams!==s&&console.warn("[google-maps-api-loader] The maps API has already been loaded with different parameters and will not be loaded again. Refresh the page for new values to have effect.");const i=["maps",...o];await Promise.all(i.map(a=>google.maps.importLibrary(a)))}static serializeParams(t){return[t.v,t.key,t.language,t.region,t.authReferrerPolicy,t.solutionChannel].join("/")}static initImportLibrary(t){if(window.google||(window.google={}),window.google.maps||(window.google.maps={}),window.google.maps.importLibrary){console.error("[google-maps-api-loader-internal]: initImportLibrary must only be called once");return}let n=null;const r=()=>n||(n=new Promise((o,s)=>{var i;const a=document.createElement("script"),l=new URLSearchParams;for(const[c,u]of Object.entries(t)){const d=c.replace(/[A-Z]/g,f=>"_"+f[0].toLowerCase());l.set(d,String(u))}l.set("loading","async"),l.set("callback","__googleMapsCallback__"),a.async=!0,a.src=nm+"?"+l.toString(),a.nonce=((i=document.querySelector("script[nonce]"))==null?void 0:i.nonce)||"",a.onerror=()=>{this.loadingStatus=he.FAILED,this.notifyLoadingStatusListeners(),s(new Error("The Google Maps JavaScript API could not load."))},window.__googleMapsCallback__=()=>{this.loadingStatus=he.LOADED,this.notifyLoadingStatusListeners(),o()},window.gm_authFailure=()=>{this.loadingStatus=he.AUTH_FAILURE,this.notifyLoadingStatusListeners()},this.loadingStatus=he.LOADING,this.notifyLoadingStatusListeners(),document.head.append(a)}),n);google.maps.importLibrary=o=>r().then(()=>google.maps.importLibrary(o))}static notifyLoadingStatusListeners(){for(const t of this.listeners)t(this.loadingStatus)}}Qt.loadingStatus=he.NOT_LOADED,Qt.serializedApiParams=void 0,Qt.listeners=[];const rm=["onLoad","onError","apiKey","version","libraries"],om=["children"],sm="GMP_visgl_rgmlibrary_v1_default",en=g.createContext(null);function im(){const[e,t]=g.useState({});return{mapInstances:e,addMapInstance:(s,i="default")=>{t(a=>Ce({},a,{[i]:s}))},removeMapInstance:(s="default")=>{t(i=>rt(i,[s].map(tm)))},clearMapInstances:()=>{t({})}}}function am(e){const{onLoad:t,onError:n,apiKey:r,version:o,libraries:s=[]}=e,i=rt(e,rm),[a,l]=g.useState(Qt.loadingStatus),[c,u]=g.useReducer((p,y)=>p[y.name]?p:Ce({},p,{[y.name]:y.value}),{}),d=g.useMemo(()=>s==null?void 0:s.join(","),[s]),f=g.useMemo(()=>JSON.stringify(Ce({apiKey:r,version:o},i)),[r,o,i]),m=g.useCallback(async p=>{var y;if(c[p])return c[p];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(p);return u({name:p,value:S}),S},[c]);return g.useEffect(()=>{(async()=>{try{const p=Ce({key:r},i);o&&(p.v=o),(d==null?void 0:d.length)>0&&(p.libraries=d),(p.channel===void 0||p.channel<0||p.channel>999)&&delete p.channel,p.solutionChannel===void 0?p.solutionChannel=sm:p.solutionChannel===""&&delete p.solutionChannel,await Qt.load(p,y=>l(y));for(const y of["core","maps",...s])await m(y);t&&t()}catch(p){n?n(p):console.error("<ApiProvider> failed to load the Google Maps JavaScript API",p)}})()},[r,d,f]),{status:a,loadedLibraries:c,importLibrary:m}}const lm=e=>{const{children:t}=e,n=rt(e,om),{mapInstances:r,addMapInstance:o,removeMapInstance:s,clearMapInstances:i}=im(),{status:a,loadedLibraries:l,importLibrary:c}=am(n),u=g.useMemo(()=>({mapInstances:r,addMapInstance:o,removeMapInstance:s,clearMapInstances:i,status:a,loadedLibraries:l,importLibrary:c}),[r,o,s,i,a,l,c]);return g.createElement(en.Provider,{value:u},t)};function cm(e,t){for(const n of hm){const r=t[n],o=Za[n];g.useEffect(()=>{if(!e||!r)return;const s=google.maps.event.addListener(e,o,i=>{r(um(o,e,i))});return()=>s.remove()},[e,o,r])}}function um(e,t,n){const r={type:e,map:t,detail:{},stoppable:!1,stop:()=>{}};if(dm.includes(e)){const s=r,i=t.getCenter(),a=t.getZoom(),l=t.getHeading()||0,c=t.getTilt()||0,u=t.getBounds();return(!i||!u||!Number.isFinite(a))&&console.warn("[createEvent] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),s.detail={center:(i==null?void 0:i.toJSON())||{lat:0,lng:0},zoom:a||0,heading:l,tilt:c,bounds:(u==null?void 0:u.toJSON())||{north:90,east:180,south:-90,west:-180}},s}else if(fm.includes(e)){var o;if(!n)throw new Error("[createEvent] mouse events must provide a srcEvent");const s=r;return s.domEvent=n.domEvent,s.stoppable=!0,s.stop=()=>n.stop(),s.detail={latLng:((o=n.latLng)==null?void 0:o.toJSON())||null,placeId:n.placeId},s}return r}const 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 eo(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 o of r)pm.has(o)&&(n[o]=t[o]);eo(()=>{e&&e.setOptions(n)},[n])}function to(){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,o=!!n;return g.useLayoutEffect(()=>{if(!e||!r)return;const{latitude:s,longitude:i,bearing:a,pitch:l,zoom:c}=r;e.moveCamera({center:{lat:s,lng:i},heading:a,tilt:l,zoom:c+1})},[e,r]),o}function 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 o=null,s=null;r&&Number.isFinite(r.lat)&&Number.isFinite(r.lng)&&(o=r.lat,s=r.lng);const i=Number.isFinite(n.zoom)?n.zoom:null,a=Number.isFinite(n.heading)?n.heading:null,l=Number.isFinite(n.tilt)?n.tilt:null;g.useLayoutEffect(()=>{if(!e)return;const c={};let u=!1;o!==null&&s!==null&&(t.current.center.lat!==o||t.current.center.lng!==s)&&(c.center={lat:o,lng:s},u=!0),i!==null&&t.current.zoom!==i&&(c.zoom=i,u=!0),a!==null&&t.current.heading!==a&&(c.heading=a,u=!0),l!==null&&t.current.tilt!==l&&(c.tilt=l,u=!0),u&&e.moveCamera(c)})}const xm=()=>{const e={position:"absolute",top:0,left:0,bottom:0,right:0,zIndex:999,display:"flex",flexFlow:"column nowrap",textAlign:"center",justifyContent:"center",fontSize:".8rem",color:"rgba(0,0,0,0.6)",background:"#dddddd",padding:"1rem 1.5rem"};return g.createElement("div",{style:e},g.createElement("h2",null,"Error: AuthFailure"),g.createElement("p",null,"A problem with your API key prevents the map from rendering correctly. Please make sure the value of the ",g.createElement("code",null,"APIProvider.apiKey")," prop is correct. Check the error-message in the console for further details."))};function bm(){const[e,t]=g.useState(null),n=g.useCallback(r=>t(r),[t]);return[e,n]}function Qa(){return to()===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(),o=e.getHeading()||0,s=e.getTilt()||0,i=e.getBounds();(!n||!i||!Number.isFinite(r))&&console.warn("[useTrackedCameraState] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),Object.assign(t.current,{center:(n==null?void 0:n.toJSON())||{lat:0,lng:0},zoom:r||0,heading:o,tilt:s})}function 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,o]=g.useState(null),[s,i]=bm(),a=wm(r),{id:l,defaultBounds:c,defaultCenter:u,defaultZoom:d,defaultHeading:f,defaultTilt:m,reuseMaps:p,renderingType:y,colorScheme:S}=e,v=rt(e,Tm),b=e.zoom!==void 0||e.defaultZoom!==void 0,w=e.center!==void 0||e.defaultCenter!==void 0;!c&&(!b||!w)&&console.warn("<Map> component is missing configuration. You have to provide zoom and center (via the `zoom`/`defaultZoom` and `center`/`defaultCenter` props) or specify the region to show using `defaultBounds`. See https://visgl.github.io/react-google-maps/docs/api-reference/components/map#required"),!v.center&&u&&(v.center=u),!v.zoom&&Number.isFinite(d)&&(v.zoom=d),!v.heading&&Number.isFinite(f)&&(v.heading=f),!v.tilt&&Number.isFinite(m)&&(v.tilt=m);for(const _ of Object.keys(v))v[_]===void 0&&delete v[_];const M=g.useRef(void 0);return g.useEffect(()=>{if(!s||!n)return;const{addMapInstance:_,removeMapInstance:L}=t,{mapId:k}=e,A=`${k||"default"}:${y||"default"}:${S||"LIGHT"}`;let V,E;if(p&&En.has(A)?(E=En.pop(A),V=E.getDiv(),s.appendChild(V),E.setOptions(v),setTimeout(()=>E.setCenter(E.getCenter()),0)):(V=document.createElement("div"),V.style.height="100%",s.appendChild(V),E=new google.maps.Map(V,Ce({},v,y?{renderingType:y}:{},S?{colorScheme:S}:{}))),o(E),_(E,l),c){const{padding:X}=c,$=rt(c,_m);E.fitBounds($,X)}else(!b||!w)&&E.fitBounds({east:180,west:-180,south:-90,north:90});if(M.current){const{mapId:X,cameraState:$}=M.current;X!==k&&E.setOptions($)}return()=>{M.current={mapId:k,cameraState:a.current},V.remove(),p?En.push(A,E):google.maps.event.clearInstanceListeners(E),o(null),L(l)}},[s,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:o}=e,s=g.useContext(en),i=to();if(!s)throw new Error("<Map> can only be used inside an <ApiProvider> component.");const[a,l,c]=Em(e,s);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 m=null,p=null;f&&Number.isFinite(f.lat)&&Number.isFinite(f.lng)&&(m=f.lat,p=f.lng);const y=g.useMemo(()=>{var b,w,M,_,L;return{center:{lat:(b=m)!=null?b:0,lng:(w=p)!=null?w:0},zoom:(M=e.zoom)!=null?M:0,heading:(_=e.heading)!=null?_:0,tilt:(L=e.tilt)!=null?L:0}},[m,p,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(()=>Ce({width:"100%",height:"100%",position:"relative",zIndex:u?-1:0},o),[o,u]),v=g.useMemo(()=>({map:a}),[a]);return i===he.AUTH_FAILURE?g.createElement("div",{style:Ce({position:"relative"},r?{}:S),className:r},g.createElement(xm,null)):g.createElement("div",Ce({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[o,s]=r??Dm.BOTTOM;let i=`-${o}`,a=`-${s}`;o.trimStart().startsWith("-")&&(i=o.substring(1)),s.trimStart().startsWith("-")&&(a=s.substring(1));const l=`translate(50%, 100%) translate(${i}, ${a})`;return g.createElement("div",{style:{transform:l}},g.createElement("div",{className:n,style:t},e))};function km(e){const[t,n]=g.useState(null),[r,o]=g.useState(null),s=Pn(),i=An("marker"),{children:a,onClick:l,className:c,onMouseEnter:u,onMouseLeave:d,onDrag:f,onDragStart:m,onDragEnd:p,collisionBehavior:y,clickable:S,draggable:v,position:b,title:w,zIndex:M}=e,_=g.Children.count(a);return g.useEffect(()=>{if(!s||!i)return;const L=new i.AdvancedMarkerElement;L.map=s,n(L);let k=null;return _>0&&(k=document.createElement("div"),k.isCustomMarker=!0,L.content=k,o(k)),()=>{var A;L.map=null,(A=k)==null||A.remove(),n(null),o(null)}},[s,i,_]),g.useEffect(()=>{!t||!t.content||_>0||(t.content.className=c||"")},[t,c,_]),Mn(t,"position",b),Mn(t,"title",w??""),Mn(t,"zIndex",M),Mn(t,"collisionBehavior",y),g.useEffect(()=>{t&&(v!==void 0?t.gmpDraggable=v:f||m||p?t.gmpDraggable=!0:t.gmpDraggable=!1)},[t,v,f,p,m]),g.useEffect(()=>{if(!t)return;const L=S!==void 0||!!l||!!u||!!d;t.gmpClickable=L,L&&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",m),St(t,"dragend",p),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:o,anchorPoint:s}=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:s,styles:r,className:o},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 o in t)t.hasOwnProperty(o)&&ol(r,o,t[o]);return}for(const o in n)n.hasOwnProperty(o)&&(t==null||!t.hasOwnProperty(o))&&(o.indexOf("--")===0?r.setProperty(o,""):o==="float"?r.cssFloat="":r[o]="");if(t!=null)for(const o in t){const s=t[o];t.hasOwnProperty(o)&&n[o]!==s&&ol(r,o,s)}}function ol(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:o,pixelOffset:s,anchor:i,shouldFocus:a,onClose:l,onCloseClick:c}=e,u=rt(e,Im),d=An("maps"),[f,m]=g.useState(null),p=g.useRef(null),y=g.useRef(null);g.useEffect(()=>{if(!d)return;p.current=document.createElement("div"),y.current=document.createElement("div");const b=u;s&&(b.pixelOffset=new google.maps.Size(s[0],s[1])),n&&(b.headerContent=typeof n=="string"?n:y.current);const w=new google.maps.InfoWindow(u);return w.setContent(p.current),m(w),()=>{var M,_;w.setContent(null),(M=p.current)==null||M.remove(),(_=y.current)==null||_.remove(),p.current=null,y.current=null,m(null)}},[d]);const S=g.useRef(null);g.useEffect(()=>{!f||!p.current||(jm(p.current,r||null,S.current),S.current=r||null,o!==p.current.className&&(p.current.className=o||""))},[f,o,r]),eo(()=>{if(!f)return;const b=u;s?b.pixelOffset=new google.maps.Size(s[0],s[1]):b.pixelOffset=null,n?b.headerContent=typeof n=="string"?n:y.current:b.headerContent=null,f.setOptions(u)},[u,s,n]),St(f,"close",l),St(f,"closeclick",c);const v=Pn();return eo(()=>{if(!v||!f||i===null)return;const b=!!i,w={map:v};if(i&&(w.anchor=i,Am(i)&&i.content instanceof Element)){const _=i.content,L=_==null?void 0:_.getBoundingClientRect();if(L&&_!=null&&_.isCustomMarker){var M;const k=(M=i.content.firstElementChild)==null?void 0:M.firstElementChild,A=k==null?void 0:k.getBoundingClientRect(),V=A.x-L.x+(A.width-L.width)/2,E=A.y-L.y,X=u;X.pixelOffset=new google.maps.Size(s?s[0]+V:V,s?s[1]+E:E),f.setOptions(X)}}return a!==void 0&&(w.shouldFocus=a),f.open(w),()=>{b&&f.set("anchor",null),f.close()}},[f,i,v,a,u,s]),g.createElement(g.Fragment,null,p.current&&jn.createPortal(t,p.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:o,onDrag:s,onDragStart:i,onDragEnd:a,onMouseOver:l,onMouseOut:c}=e,u=rt(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 m=new google.maps.Marker(u);return m.setMap(r),n(m),()=>{m.setMap(null),n(null)}},[r]),g.useEffect(()=>{if(!t)return;const m=t,p=google.maps.event;return o&&p.addListener(m,"click",o),s&&p.addListener(m,"drag",s),i&&p.addListener(m,"dragstart",i),a&&p.addListener(m,"dragend",a),l&&p.addListener(m,"mouseover",l),c&&p.addListener(m,"mouseout",c),t.setDraggable(!!f),()=>{p.clearInstanceListeners(m)}},[t,f,o,s,i,a,l,c]),g.useEffect(()=>{t&&u&&t.setOptions(u)},[t,u]),g.useEffect(()=>{f||!d||!t||t.setPosition(d)},[f,d,t]),t}const sl=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 Ue={root:"_root_faay1_10",header:"_header_faay1_18",body:"_body_faay1_31",highlighted:"_highlighted_faay1_43",toggleButton:"_toggleButton_faay1_46",toggleButtonIcon:"_toggleButtonIcon_faay1_46"};function zm({onLocationSelect:e}){const t=ja("locationCard"),n=j(p=>p.locations),{labels:r}=j(p=>p.localizationConfig),o=j(p=>p.isLocationListExpanded),s=j(p=>p.setIsLocationListExpanded),i=j(p=>p.selectedLocation),a=j(p=>p.setSelectedLocation),l=g.useRef({}),c=r["LocationList.header"],u=r["LocationList.locationDesignator"],d=c.split(/(\{:\d\})/g),f=g.useMemo(()=>d.map((p,y)=>p==="{:1}"?x.jsx("span",{className:Ue.highlighted,children:(n==null?void 0:n.length)??0},y):p==="{:2}"?x.jsx("span",{className:Ue.highlighted,children:u},y):p),[u,n.length,d]);g.useEffect(()=>{if(i&&o){const p=l.current[i];p!=null&&p.current&&requestAnimationFrame(()=>{p.current.scrollIntoView({behavior:"smooth",block:"start"})})}},[i,o]);function m(p){return()=>{e==null||e(p.coords),a==null||a(p.id)}}return x.jsxs("div",{className:q("dyn-locator__location-list",Ue.root),"data-expanded":o,children:[x.jsxs("header",{className:Ue.header,onClick:()=>s(!o),role:"button","aria-expanded":o,children:[x.jsx("span",{children:f}),x.jsx(bt,{className:Ue.toggleButton,variant:"bare",children:x.jsx(Be,{className:Ue.toggleButtonIcon,animate:!1,icon:"ChevronDown"})})]}),x.jsx("div",{className:Ue.body,children:n!=null&&n.length?n.map(p=>{const y=p.id;l.current[y]||(l.current[y]=g.createRef());const S=l.current[y];return x.jsx(t,{ref:S,"data-active":i===p.id,onClick:m(p),...p},p.id)}):x.jsx("div",{className:Ue.noResults,children:r["LocationList.noResults"]})})]})}const De={root:"_root_b3glo_21",loaderContainer:"_loaderContainer_b3glo_29",fullscreenButton:"_fullscreenButton_b3glo_36",backButton:"_backButton_b3glo_37",areaSearchButton:"_areaSearchButton_b3glo_52",visualCue:"_visualCue_b3glo_77",closeButton:"_closeButton_b3glo_102",searchButton:"_searchButton_b3glo_120"},Ln={root:"_root_e0ns1_4",header:"_header_e0ns1_7",cta:"_cta_e0ns1_24"};function Um({id:e,title:t,address:n,coords:r,actions:o,onClick:s,onZoom:i}){var m;const{labels:a}=j(p=>p.localizationConfig),l=j(p=>p.selectedLocation),c=j(p=>p.setSelectedLocation),[u,d]=$m(),f=g.useCallback(()=>{c==null||c("")},[c]);return x.jsxs(x.Fragment,{children:[x.jsx(sl,{ref:u,position:r,onClick:()=>{s==null||s()}}),l===e?x.jsxs(Rm,{anchor:d,headerContent:t,onCloseClick:f,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((m=o==null?void 0:o.find)==null?void 0:m.call(o,p=>p.type==="navigate")),children:a["InfoWindow.CTA_1"]}),x.jsx(Ht,{animate:!1,variant:"secondary",size:"small",onClick:i,children:a["InfoWindow.CTA_2"]})]})})]}):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 W;const[e,t]=g.useState({zoom:ya}),[n,r]=g.useState(!1),[o,s]=g.useState("inactive"),i=g.useRef(""),a=to(),{request:l,loading:c}=_n(Yt.FIND),u=j(C=>C.locations),d=j(C=>C.featureFlags),{labels:f}=j(C=>C.localizationConfig),m=j(C=>C.targetLocation),p=j(C=>C.clearTargetLocation),y=j(C=>C.mapDetail),S=j(C=>C.setMapDetail),v=j(C=>C.isFullscreen),b=j(C=>C.setFullscreen),w=j(C=>C.isLocationListExpanded),M=j(C=>C.setIsLocationListExpanded),_=j(C=>C.shouldRefetch),L=j(C=>C.setShouldRefetch),k=j(C=>C.setSelectedLocation),A=y===Ke.MARKER;function V({detail:C}){const{center:I,zoom:B}=C;t({center:I,zoom:B}),n||r(!0)}function E(){n&&e.center&&o==="inactive"&&s("active")}function X(C){t(I=>({center:C,zoom:I.zoom}))}function $(){s("inactive"),M(!1),S(Ke.CLUSTER),t({center:Uh,zoom:ya}),L(!0)}const ee=j(C=>C.mapId),le=j(C=>C.setLocations),we=g.useCallback(async()=>{if(!e.center)return;const{lat:C,lng:I}=e.center,B={location:{type:"Feature",geometry:{type:"Point",coordinates:[I,C]},properties:{distance:Xh}}};try{const{data:te}=await l({mapId:ee},{body:B})??{};if(!(te!=null&&te.pins))throw new Error("No locations found");le(te.pins),S(Ke.MARKER),s("inactive")}catch(te){console.error("Error finding locations in this area: ",te),Y.error(et+Rh)}},[e.center,l,S,ee,le]);function Xe(C){function I(){t({center:C.coords,zoom:18}),w||M(!0)}if(Xm(C))return x.jsx(sl,{position:C.coords,icon:{path:google.maps.SymbolPath.CIRCLE,fillColor:i.current||"#00acde",fillOpacity:.6,strokeWeight:0,scale:(C.range??0)/zh,labelOrigin:new google.maps.Point(0,0)},onClick:async()=>{await C.onMarkerClick(),t({center:C.coords,zoom:C.zoom||15})}},C.id);if(Wm(C))return x.jsx(Um,{id:C.id,title:C.title??"No title",address:C.address??"No address",coords:C.coords,actions:C.actions,onZoom:I,onClick:()=>{k(C.id)}},C.id)}if(g.useEffect(()=>{i.current=getComputedStyle(document.documentElement).getPropertyValue("--dyn-locator__colors-accent-500")},[]),g.useEffect(()=>{m&&(t({center:m.coords,zoom:m.zoom}),p())},[m,p]),a===he.LOADING)return x.jsx("div",{className:q("dyn-locator__map",De.root),children:x.jsx("div",{className:De.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:q("dyn-locator__map",De.root),children:[d.fullscreen?x.jsx(bt,{className:q(De.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,A?x.jsx(bt,{className:q(De.backButton,"dyn-locator__map__back-button"),variant:"negative",onClick:$,children:x.jsx(Be,{size:"M",icon:"ArrowLeft"})}):null,o!=="inactive"&&x.jsxs(Ht,{className:q(De.areaSearchButton,"dyn-locator__map__area-search-button",A&&"dyn-locator__map__area-search-button--with-back-button"),disabled:c||o==="select_area",loading:c,onClick:()=>s("select_area"),children:[x.jsx(Ql,{}),f["Map.areaSearchButton"]]}),o==="select_area"&&x.jsxs("div",{className:De.visualCue,children:[x.jsxs("i",{children:[x.jsx("button",{className:De.closeButton,onClick:()=>s("active"),"aria-label":"Close area search",children:x.jsx(bo,{size:16})}),x.jsx(ec,{size:48,strokeWidth:1,color:"currentColor"})]}),x.jsxs(Ht,{className:De.searchButton,disabled:c,loading:c,onClick:we,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:V,onDragend:E,defaultBounds:qt,children:!_&&((W=u==null?void 0:u.map)==null?void 0:W.call(u,Xe))}),A?x.jsx(zm,{onLocationSelect:X}):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"},il="Input";function al({label:e,className:t,showValidation:n=!0,error:r=!1,valid:o=!1,clearable:s=!1,onClear:i,animate:a=!0,animationDelay:l=0,dropdown:c,dropdownVisible:u=!1,ariaLabel:d,style:f,sideButton:m,sideOrnament:p,...y},S){const v=a?Qe.div:"div",b=Fe(y)??[],w=a?{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:l,duration:.2}}:{};return x.jsxs(v,{className:q("dyn-locator__"+Pe(il),Oe.root,Ee(t),...b??[]),"data-valid":o,"data-error":r,"data-expanded":u,"data-side-button":!!m,...f?{style:f}:{},...w,children:[n&&x.jsxs(x.Fragment,{children:[o&&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,p?x.jsx("span",{className:Oe.sideOrnament,children:p}):null,x.jsx("input",{ref:S,className:q(Oe.input),"aria-label":d,"aria-invalid":r,"data-side-button":!!m,"data-side-ornament":!!p,...y}),m?x.jsx("span",{className:Oe.sideButton,children:m}):null,s&&(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})]})}al.displayName=il;const Gm=g.forwardRef(al),ot={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([]),[o,s]=g.useState(!1),[i,a]=g.useState(!1),[l,c]=g.useState(!1),u=j(C=>C.mapId),d=j(C=>C.setLocations),f=j(C=>C.setMapDetail),m=j(C=>C.zoomToLocation),{labels:p}=j(C=>C.localizationConfig),{search:y}=j(C=>C.featureFlags),{request:S,loading:v}=_n(Yt.FIND),b=An("places"),w=An("geocoding"),M=Pn(),_=g.useRef(null),L=g.useRef(null),k=g.useRef(null),A=g.useRef(null);g.useEffect(()=>{w&&(k.current||(k.current=new w.Geocoder))},[w]),g.useEffect(()=>{b&&(_.current||(_.current=new b.AutocompleteService),A.current||(A.current=new b.AutocompleteSessionToken))},[b]),g.useEffect(()=>{!b||!M||L.current||(L.current=new b.PlacesService(M))},[b,M]);const V=async C=>{var I;if(!C||C.length<3){r([]),s(!1);return}a(!0);try{if(!b||!_.current)throw new Error("Places library or Autocomplete Service not available");const B=await _.current.getPlacePredictions({input:C,...A.current?{sessionToken:A.current}:{}});if(a(!1),!((I=B==null?void 0:B.predictions)!=null&&I.length)){r([]),s(!1);return}r(B.predictions),s(!0)}catch(B){console.error("Error fetching predictions: ",B),a(!1),r([]),s(!1),Y.error(et+Nh)}},E=g.useMemo(()=>Wh(C=>V(C),600),[V]),X=C=>{const I=C.currentTarget.value;if(t(I),!I||I.length<3){r([]),s(!1);return}E(I)},$=async C=>{var I,B,te,ne,ke;t(C.description),s(!1);try{if(!b||!L.current)throw new Error("Places library or Places Service not available");const oe=await new Promise((We,st)=>{L.current.getDetails({placeId:C.place_id,fields:["geometry"],...A.current?{sessionToken:A.current}:{}},(Ct,it)=>{it===b.PlacesServiceStatus.OK&&Ct?We(Ct):st(new Error(`Place details request failed with status: ${it}`))})});if((I=oe==null?void 0:oe.geometry)!=null&&I.location){const We=(te=(B=oe.geometry.location).lat)==null?void 0:te.call(B),st=(ke=(ne=oe.geometry.location).lng)==null?void 0:ke.call(ne);await Xe({lat:We,lng:st})}}catch(oe){console.error("Error getting place details:",oe),Y.error(et+Vh)}finally{b&&(A.current=new b.AutocompleteSessionToken)}},ee=()=>{t(""),r([]),s(!1)},le=()=>!o||n.length===0?null:x.jsx("div",{className:ot.predictionsContainer,children:i?x.jsx("div",{className:ot.loadingItem,children:x.jsx(Pt,{size:"medium"})}):n.map(C=>x.jsx("div",{className:ot.predictionItem,onClick:()=>$(C),children:C.description},C.place_id))});async function we(C){C.preventDefault(),c(!0);try{const I=await new Promise((ne,ke)=>{navigator.geolocation.getCurrentPosition(oe=>ne(oe),oe=>ke(oe),{timeout:5e3})}),B={lat:I.coords.latitude,lng:I.coords.longitude};if(await Xe(B),!w||!(k!=null&&k.current)||!M)throw new Error("Geocoding library or Geocoder not available");const te=await new Promise((ne,ke)=>{k.current.geocode({location:B},(oe,We)=>{We===google.maps.GeocoderStatus.OK&&oe&&oe.length>0?ne(oe):ke(new Error(`Geocoding failed with status: ${We}`))})});te&&te[0]&&t(te[0].formatted_address)}catch(I){console.error("Error getting location: ",I);const B=I instanceof GeolocationPositionError?et+I.message:et+kh;Y.error(B)}finally{c(!1)}}async function Xe(C){const{lng:I,lat:B}=C,te={location:{type:"Feature",geometry:{type:"Point",coordinates:[I,B]},properties:{}}};try{const{data:ne}=await S({mapId:u},{body:te})??{};if(!(ne!=null&&ne.pins))throw new Error("No locations found");d(ne.pins),f(Ke.MARKER),m({lat:B,lng:I},ne.zoom||15)}catch(ne){throw console.error("Error finding locations: ",ne),ne}}const W=v||l;return y?x.jsxs("div",{className:q("dyn-locator__search",ot.root),children:[x.jsx(Gm,{name:"locator_search_field",className:q("dyn-locator__search__field",ot.input),value:e,onChange:X,placeholder:p["Search.placeholder"],dropdown:le(),dropdownVisible:o,disabled:W,sideOrnament:e?void 0:x.jsx(Be,{className:ot.sideOrnament,icon:"Search",size:"M"}),sideButton:e?x.jsx(bt,{variant:"bare",className:ot.clearButton,onClick:ee,"aria-label":"Clear",children:x.jsx(Be,{icon:"Close",size:"M"})}):x.jsx(ba,{href:"#",onClick:we,children:p["Search.geolocationButton"]})}),x.jsx(qa,{show:W,children:x.jsx(Pt,{size:"medium"})})]}):null}function Hm({children:e,apiKey:t,language:n,region:r,libraries:o}){return x.jsx(lm,{apiKey:t,region:r,language:n,libraries:o,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"}));ve.Map=Km,ve.Search=qm,ve.default=Ha,Object.defineProperties(ve,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
305
305
  //# sourceMappingURL=index.umd.js.map