@devstgo/stgo-salta-components-react 0.1.8 → 0.1.9

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.
@@ -1,9 +1,9 @@
1
- (function(q,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("react"),require("lucide-react"),require("react-router-dom"),require("react-i18next"),require("react-dom"),require("i18next")):typeof define=="function"&&define.amd?define(["exports","react","lucide-react","react-router-dom","react-i18next","react-dom","i18next"],b):(q=typeof globalThis<"u"?globalThis:q||self,b(q.StgoSaltaComponentsReact={},q.React,q.LucideIcons,q.ReactRouterDOM,q.ReactI18next,q.ReactDOM,q.i18next))})(this,(function(q,b,F,Se,jt,vo,wu){"use strict";function wo(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const g=wo(b),rs=wo(F);let So;const Su=e=>{So=e},xe=()=>So;var wn={exports:{}},qt={};var To;function Tu(){if(To)return qt;To=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(s,i,r){var o=null;if(r!==void 0&&(o=""+r),i.key!==void 0&&(o=""+i.key),"key"in i){r={};for(var l in i)l!=="key"&&(r[l]=i[l])}else r=i;return i=r.ref,{$$typeof:e,type:s,key:o,ref:i!==void 0?i:null,props:r}}return qt.Fragment=t,qt.jsx=n,qt.jsxs=n,qt}var Jt={};var Eo;function Eu(){return Eo||(Eo=1,process.env.NODE_ENV!=="production"&&(function(){function e(T){if(T==null)return null;if(typeof T=="function")return T.$$typeof===z?null:T.displayName||T.name||null;if(typeof T=="string")return T;switch(T){case v:return"Fragment";case C:return"Profiler";case x:return"StrictMode";case k:return"Suspense";case E:return"SuspenseList";case $:return"Activity"}if(typeof T=="object")switch(typeof T.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),T.$$typeof){case y:return"Portal";case I:return T.displayName||"Context";case N:return(T._context.displayName||"Context")+".Consumer";case A:var O=T.render;return T=T.displayName,T||(T=O.displayName||O.name||"",T=T!==""?"ForwardRef("+T+")":"ForwardRef"),T;case w:return O=T.displayName||null,O!==null?O:e(T.type)||"Memo";case j:O=T._payload,T=T._init;try{return e(T(O))}catch{}}return null}function t(T){return""+T}function n(T){try{t(T);var O=!1}catch{O=!0}if(O){O=console;var ne=O.error,ie=typeof Symbol=="function"&&Symbol.toStringTag&&T[Symbol.toStringTag]||T.constructor.name||"Object";return ne.call(O,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",ie),t(T)}}function s(T){if(T===v)return"<>";if(typeof T=="object"&&T!==null&&T.$$typeof===j)return"<...>";try{var O=e(T);return O?"<"+O+">":"<...>"}catch{return"<...>"}}function i(){var T=Q.A;return T===null?null:T.getOwner()}function r(){return Error("react-stack-top-frame")}function o(T){if(R.call(T,"key")){var O=Object.getOwnPropertyDescriptor(T,"key").get;if(O&&O.isReactWarning)return!1}return T.key!==void 0}function l(T,O){function ne(){J||(J=!0,console.error("%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://react.dev/link/special-props)",O))}ne.isReactWarning=!0,Object.defineProperty(T,"key",{get:ne,configurable:!0})}function c(){var T=e(this.type);return V[T]||(V[T]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),T=this.props.ref,T!==void 0?T:null}function u(T,O,ne,ie,re,ae){var le=ne.ref;return T={$$typeof:p,type:T,key:O,props:ne,_owner:ie},(le!==void 0?le:null)!==null?Object.defineProperty(T,"ref",{enumerable:!1,get:c}):Object.defineProperty(T,"ref",{enumerable:!1,value:null}),T._store={},Object.defineProperty(T._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(T,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(T,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:re}),Object.defineProperty(T,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ae}),Object.freeze&&(Object.freeze(T.props),Object.freeze(T)),T}function d(T,O,ne,ie,re,ae){var le=O.children;if(le!==void 0)if(ie)if(se(le)){for(ie=0;ie<le.length;ie++)f(le[ie]);Object.freeze&&Object.freeze(le)}else console.error("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 f(le);if(R.call(O,"key")){le=e(T);var ye=Object.keys(O).filter(function(Ne){return Ne!=="key"});ie=0<ye.length?"{key: someKey, "+ye.join(": ..., ")+": ...}":"{key: someKey}",M[le+ie]||(ye=0<ye.length?"{"+ye.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
1
+ (function(q,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("react"),require("lucide-react"),require("react-router-dom"),require("react-i18next"),require("react-dom"),require("i18next")):typeof define=="function"&&define.amd?define(["exports","react","lucide-react","react-router-dom","react-i18next","react-dom","i18next"],b):(q=typeof globalThis<"u"?globalThis:q||self,b(q.StgoSaltaComponentsReact={},q.React,q.LucideIcons,q.ReactRouterDOM,q.ReactI18next,q.ReactDOM,q.i18next))})(this,(function(q,b,F,Se,ot,vo,wu){"use strict";function wo(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const g=wo(b),rs=wo(F);let So;const Su=e=>{So=e},xe=()=>So;var wn={exports:{}},Jt={};var To;function Tu(){if(To)return Jt;To=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(s,i,r){var o=null;if(r!==void 0&&(o=""+r),i.key!==void 0&&(o=""+i.key),"key"in i){r={};for(var l in i)l!=="key"&&(r[l]=i[l])}else r=i;return i=r.ref,{$$typeof:e,type:s,key:o,ref:i!==void 0?i:null,props:r}}return Jt.Fragment=t,Jt.jsx=n,Jt.jsxs=n,Jt}var Qt={};var Eo;function Eu(){return Eo||(Eo=1,process.env.NODE_ENV!=="production"&&(function(){function e(T){if(T==null)return null;if(typeof T=="function")return T.$$typeof===z?null:T.displayName||T.name||null;if(typeof T=="string")return T;switch(T){case v:return"Fragment";case C:return"Profiler";case x:return"StrictMode";case k:return"Suspense";case E:return"SuspenseList";case $:return"Activity"}if(typeof T=="object")switch(typeof T.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),T.$$typeof){case y:return"Portal";case I:return T.displayName||"Context";case N:return(T._context.displayName||"Context")+".Consumer";case A:var O=T.render;return T=T.displayName,T||(T=O.displayName||O.name||"",T=T!==""?"ForwardRef("+T+")":"ForwardRef"),T;case w:return O=T.displayName||null,O!==null?O:e(T.type)||"Memo";case j:O=T._payload,T=T._init;try{return e(T(O))}catch{}}return null}function t(T){return""+T}function n(T){try{t(T);var O=!1}catch{O=!0}if(O){O=console;var ne=O.error,ae=typeof Symbol=="function"&&Symbol.toStringTag&&T[Symbol.toStringTag]||T.constructor.name||"Object";return ne.call(O,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",ae),t(T)}}function s(T){if(T===v)return"<>";if(typeof T=="object"&&T!==null&&T.$$typeof===j)return"<...>";try{var O=e(T);return O?"<"+O+">":"<...>"}catch{return"<...>"}}function i(){var T=Q.A;return T===null?null:T.getOwner()}function r(){return Error("react-stack-top-frame")}function o(T){if(R.call(T,"key")){var O=Object.getOwnPropertyDescriptor(T,"key").get;if(O&&O.isReactWarning)return!1}return T.key!==void 0}function l(T,O){function ne(){J||(J=!0,console.error("%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://react.dev/link/special-props)",O))}ne.isReactWarning=!0,Object.defineProperty(T,"key",{get:ne,configurable:!0})}function c(){var T=e(this.type);return V[T]||(V[T]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),T=this.props.ref,T!==void 0?T:null}function u(T,O,ne,ae,ie,le){var re=ne.ref;return T={$$typeof:p,type:T,key:O,props:ne,_owner:ae},(re!==void 0?re:null)!==null?Object.defineProperty(T,"ref",{enumerable:!1,get:c}):Object.defineProperty(T,"ref",{enumerable:!1,value:null}),T._store={},Object.defineProperty(T._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(T,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(T,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ie}),Object.defineProperty(T,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:le}),Object.freeze&&(Object.freeze(T.props),Object.freeze(T)),T}function d(T,O,ne,ae,ie,le){var re=O.children;if(re!==void 0)if(ae)if(se(re)){for(ae=0;ae<re.length;ae++)f(re[ae]);Object.freeze&&Object.freeze(re)}else console.error("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 f(re);if(R.call(O,"key")){re=e(T);var ge=Object.keys(O).filter(function($e){return $e!=="key"});ae=0<ge.length?"{key: someKey, "+ge.join(": ..., ")+": ...}":"{key: someKey}",M[re+ae]||(ge=0<ge.length?"{"+ge.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
2
2
  let props = %s;
3
3
  <%s {...props} />
4
4
  React keys must be passed directly to JSX without using spread:
5
5
  let props = %s;
6
- <%s key={someKey} {...props} />`,ie,le,ye,le),M[le+ie]=!0)}if(le=null,ne!==void 0&&(n(ne),le=""+ne),o(O)&&(n(O.key),le=""+O.key),"key"in O){ne={};for(var ue in O)ue!=="key"&&(ne[ue]=O[ue])}else ne=O;return le&&l(ne,typeof T=="function"?T.displayName||T.name||"Unknown":T),u(T,le,ne,i(),re,ae)}function f(T){h(T)?T._store&&(T._store.validated=1):typeof T=="object"&&T!==null&&T.$$typeof===j&&(T._payload.status==="fulfilled"?h(T._payload.value)&&T._payload.value._store&&(T._payload.value._store.validated=1):T._store&&(T._store.validated=1))}function h(T){return typeof T=="object"&&T!==null&&T.$$typeof===p}var m=b,p=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),I=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),z=Symbol.for("react.client.reference"),Q=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R=Object.prototype.hasOwnProperty,se=Array.isArray,U=console.createTask?console.createTask:function(){return null};m={react_stack_bottom_frame:function(T){return T()}};var J,V={},P=m.react_stack_bottom_frame.bind(m,r)(),_=U(s(r)),M={};Jt.Fragment=v,Jt.jsx=function(T,O,ne){var ie=1e4>Q.recentlyCreatedOwnerStacks++;return d(T,O,ne,!1,ie?Error("react-stack-top-frame"):P,ie?U(s(T)):_)},Jt.jsxs=function(T,O,ne){var ie=1e4>Q.recentlyCreatedOwnerStacks++;return d(T,O,ne,!0,ie?Error("react-stack-top-frame"):P,ie?U(s(T)):_)}})()),Jt}var Co;function Cu(){return Co||(Co=1,process.env.NODE_ENV==="production"?wn.exports=Tu():wn.exports=Eu()),wn.exports}var a=Cu();const as=b.createContext({});function Sn(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const No=typeof window<"u",ko=No?b.useLayoutEffect:b.useEffect,Qt=b.createContext(null);function ls(e,t){e.indexOf(t)===-1&&e.push(t)}function It(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Ke=(e,t,n)=>n>t?t:n<e?e:n;function cs(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Mt=()=>{},Ye=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(Mt=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(cs(t,n))},Ye=(e,t,n)=>{if(!e)throw new Error(cs(t,n))});const tt={},Po=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function jo(e){return typeof e=="object"&&e!==null}const Io=e=>/^0[^.\s]+$/u.test(e);function Mo(e){let t;return()=>(t===void 0&&(t=e()),t)}const $e=e=>e,Nu=(e,t)=>n=>t(e(n)),en=(...e)=>e.reduce(Nu),At=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s};class us{constructor(){this.subscriptions=[]}add(t){return ls(this.subscriptions,t),()=>It(this.subscriptions,t)}notify(t,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,s);else for(let r=0;r<i;r++){const o=this.subscriptions[r];o&&o(t,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Fe=e=>e*1e3,Be=e=>e/1e3;function Ao(e,t){return t?e*(1e3/t):0}const Vo=new Set;function ds(e,t,n){e||Vo.has(t)||(console.warn(cs(t,n)),Vo.add(t))}const ku=(e,t,n)=>{const s=t-e;return((n-e)%s+s)%s+e},Oo=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Pu=1e-7,ju=12;function Iu(e,t,n,s,i){let r,o,l=0;do o=t+(n-t)/2,r=Oo(o,s,i)-e,r>0?n=o:t=o;while(Math.abs(r)>Pu&&++l<ju);return o}function tn(e,t,n,s){if(e===t&&n===s)return $e;const i=r=>Iu(r,0,1,e,n);return r=>r===0||r===1?r:Oo(i(r),t,s)}const Lo=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Do=e=>t=>1-e(1-t),Ro=tn(.33,1.53,.69,.99),fs=Do(Ro),_o=Lo(fs),Fo=e=>(e*=2)<1?.5*fs(e):.5*(2-Math.pow(2,-10*(e-1))),hs=e=>1-Math.sin(Math.acos(e)),$o=Do(hs),Bo=Lo(hs),Mu=tn(.42,0,1,1),Au=tn(0,0,.58,1),zo=tn(.42,0,.58,1),Wo=e=>Array.isArray(e)&&typeof e[0]!="number";function Yo(e,t){return Wo(e)?e[ku(0,e.length,t)]:e}const Uo=e=>Array.isArray(e)&&typeof e[0]=="number",Ho={linear:$e,easeIn:Mu,easeInOut:zo,easeOut:Au,circIn:hs,circInOut:Bo,circOut:$o,backIn:fs,backInOut:_o,backOut:Ro,anticipate:Fo},Vu=e=>typeof e=="string",Xo=e=>{if(Uo(e)){Ye(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,s,i]=e;return tn(t,n,s,i)}else if(Vu(e))return Ye(Ho[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Ho[e];return e},Tn=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Ou(e,t){let n=new Set,s=new Set,i=!1,r=!1;const o=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1};function c(d){o.has(d)&&(u.schedule(d),e()),d(l)}const u={schedule:(d,f=!1,h=!1)=>{const p=h&&i?n:s;return f&&o.add(d),p.has(d)||p.add(d),d},cancel:d=>{s.delete(d),o.delete(d)},process:d=>{if(l=d,i){r=!0;return}i=!0,[n,s]=[s,n],n.forEach(c),n.clear(),i=!1,r&&(r=!1,u.process(d))}};return u}const Lu=40;function Go(e,t){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Tn.reduce((N,I)=>(N[I]=Ou(r),N),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:d,update:f,preRender:h,render:m,postRender:p}=o,y=()=>{const N=tt.useManualTiming?i.timestamp:performance.now();n=!1,tt.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(N-i.timestamp,Lu),1)),i.timestamp=N,i.isProcessing=!0,l.process(i),c.process(i),u.process(i),d.process(i),f.process(i),h.process(i),m.process(i),p.process(i),i.isProcessing=!1,n&&t&&(s=!1,e(y))},v=()=>{n=!0,s=!0,i.isProcessing||e(y)};return{schedule:Tn.reduce((N,I)=>{const A=o[I];return N[I]=(k,E=!1,w=!1)=>(n||v(),A.schedule(k,E,w)),N},{}),cancel:N=>{for(let I=0;I<Tn.length;I++)o[Tn[I]].cancel(N)},state:i,steps:o}}const{schedule:ge,cancel:ot,state:Ve,steps:ms}=Go(typeof requestAnimationFrame<"u"?requestAnimationFrame:$e,!0);let En;function Du(){En=void 0}const Le={now:()=>(En===void 0&&Le.set(Ve.isProcessing||tt.useManualTiming?Ve.timestamp:performance.now()),En),set:e=>{En=e,queueMicrotask(Du)}},Ko=e=>t=>typeof t=="string"&&t.startsWith(e),Zo=Ko("--"),Ru=Ko("var(--"),ps=e=>Ru(e)?_u.test(e.split("/*")[0].trim()):!1,_u=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function qo(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Vt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},nn={...Vt,transform:e=>Ke(0,1,e)},Cn={...Vt,default:1},sn=e=>Math.round(e*1e5)/1e5,gs=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Fu(e){return e==null}const $u=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,bs=(e,t)=>n=>!!(typeof n=="string"&&$u.test(n)&&n.startsWith(e)||t&&!Fu(n)&&Object.prototype.hasOwnProperty.call(n,t)),Jo=(e,t,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,l]=s.match(gs);return{[e]:parseFloat(i),[t]:parseFloat(r),[n]:parseFloat(o),alpha:l!==void 0?parseFloat(l):1}},Bu=e=>Ke(0,255,e),ys={...Vt,transform:e=>Math.round(Bu(e))},pt={test:bs("rgb","red"),parse:Jo("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+ys.transform(e)+", "+ys.transform(t)+", "+ys.transform(n)+", "+sn(nn.transform(s))+")"};function zu(e){let t="",n="",s="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,s+=s,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const xs={test:bs("#"),parse:zu,transform:pt.transform},on=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),rt=on("deg"),Ze=on("%"),G=on("px"),Wu=on("vh"),Yu=on("vw"),Qo={...Ze,parse:e=>Ze.parse(e)/100,transform:e=>Ze.transform(e*100)},Ot={test:bs("hsl","hue"),parse:Jo("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+Ze.transform(sn(t))+", "+Ze.transform(sn(n))+", "+sn(nn.transform(s))+")"},Te={test:e=>pt.test(e)||xs.test(e)||Ot.test(e),parse:e=>pt.test(e)?pt.parse(e):Ot.test(e)?Ot.parse(e):xs.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?pt.transform(e):Ot.transform(e),getAnimatableNone:e=>{const t=Te.parse(e);return t.alpha=0,Te.transform(t)}},Uu=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Hu(e){return isNaN(e)&&typeof e=="string"&&(e.match(gs)?.length||0)+(e.match(Uu)?.length||0)>0}const er="number",tr="color",Xu="var",Gu="var(",nr="${}",Ku=/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 rn(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const l=t.replace(Ku,c=>(Te.test(c)?(s.color.push(r),i.push(tr),n.push(Te.parse(c))):c.startsWith(Gu)?(s.var.push(r),i.push(Xu),n.push(c)):(s.number.push(r),i.push(er),n.push(parseFloat(c))),++r,nr)).split(nr);return{values:n,split:l,indexes:s,types:i}}function sr(e){return rn(e).values}function ir(e){const{split:t,types:n}=rn(e),s=t.length;return i=>{let r="";for(let o=0;o<s;o++)if(r+=t[o],i[o]!==void 0){const l=n[o];l===er?r+=sn(i[o]):l===tr?r+=Te.transform(i[o]):r+=i[o]}return r}}const Zu=e=>typeof e=="number"?0:Te.test(e)?Te.getAnimatableNone(e):e;function qu(e){const t=sr(e);return ir(e)(t.map(Zu))}const Ue={test:Hu,parse:sr,createTransformer:ir,getAnimatableNone:qu};function vs(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:s}){e/=360,t/=100,n/=100;let i=0,r=0,o=0;if(!t)i=r=o=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;i=vs(c,l,e+1/3),r=vs(c,l,e),o=vs(c,l,e-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function Nn(e,t){return n=>n>0?t:e}const ve=(e,t,n)=>e+(t-e)*n,ws=(e,t,n)=>{const s=e*e,i=n*(t*t-s)+s;return i<0?0:Math.sqrt(i)},Qu=[xs,pt,Ot],ed=e=>Qu.find(t=>t.test(e));function or(e){const t=ed(e);if(Mt(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Ot&&(n=Ju(n)),n}const rr=(e,t)=>{const n=or(e),s=or(t);if(!n||!s)return Nn(e,t);const i={...n};return r=>(i.red=ws(n.red,s.red,r),i.green=ws(n.green,s.green,r),i.blue=ws(n.blue,s.blue,r),i.alpha=ve(n.alpha,s.alpha,r),pt.transform(i))},Ss=new Set(["none","hidden"]);function td(e,t){return Ss.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function nd(e,t){return n=>ve(e,t,n)}function Ts(e){return typeof e=="number"?nd:typeof e=="string"?ps(e)?Nn:Te.test(e)?rr:od:Array.isArray(e)?ar:typeof e=="object"?Te.test(e)?rr:sd:Nn}function ar(e,t){const n=[...e],s=n.length,i=e.map((r,o)=>Ts(r)(r,t[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function sd(e,t){const n={...e,...t},s={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(s[i]=Ts(e[i])(e[i],t[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function id(e,t){const n=[],s={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const r=t.types[i],o=e.indexes[r][s[r]],l=e.values[o]??0;n[i]=l,s[r]++}return n}const od=(e,t)=>{const n=Ue.createTransformer(t),s=rn(e),i=rn(t);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?Ss.has(e)&&!i.values.length||Ss.has(t)&&!s.values.length?td(e,t):en(ar(id(s,i),i.values),n):(Mt(!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.`,"complex-values-different"),Nn(e,t))};function lr(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ve(e,t,n):Ts(e)(e,t)}const rd=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ge.update(t,n),stop:()=>ot(t),now:()=>Ve.isProcessing?Ve.timestamp:Le.now()}},cr=(e,t,n=10)=>{let s="";const i=Math.max(Math.round(t/n),2);for(let r=0;r<i;r++)s+=Math.round(e(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},kn=2e4;function Es(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<kn;)t+=n,s=e.next(t);return t>=kn?1/0:t}function ur(e,t=100,n){const s=n({...e,keyframes:[0,t]}),i=Math.min(Es(s),kn);return{type:"keyframes",ease:r=>s.next(i*r).value/t,duration:Be(i)}}const ad=5;function dr(e,t,n){const s=Math.max(t-ad,0);return Ao(n-e(s),t-s)}const we={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},Cs=.001;function ld({duration:e=we.duration,bounce:t=we.bounce,velocity:n=we.velocity,mass:s=we.mass}){let i,r;Mt(e<=Fe(we.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=Ke(we.minDamping,we.maxDamping,o),e=Ke(we.minDuration,we.maxDuration,Be(e)),o<1?(i=u=>{const d=u*o,f=d*e,h=d-n,m=Ns(u,o),p=Math.exp(-f);return Cs-h/m*p},r=u=>{const f=u*o*e,h=f*n+n,m=Math.pow(o,2)*Math.pow(u,2)*e,p=Math.exp(-f),y=Ns(Math.pow(u,2),o);return(-i(u)+Cs>0?-1:1)*((h-m)*p)/y}):(i=u=>{const d=Math.exp(-u*e),f=(u-n)*e+1;return-Cs+d*f},r=u=>{const d=Math.exp(-u*e),f=(n-u)*(e*e);return d*f});const l=5/e,c=ud(i,r,l);if(e=Fe(e),isNaN(c))return{stiffness:we.stiffness,damping:we.damping,duration:e};{const u=Math.pow(c,2)*s;return{stiffness:u,damping:o*2*Math.sqrt(s*u),duration:e}}}const cd=12;function ud(e,t,n){let s=n;for(let i=1;i<cd;i++)s=s-e(s)/t(s);return s}function Ns(e,t){return e*Math.sqrt(1-t*t)}const dd=["duration","bounce"],fd=["stiffness","damping","mass"];function fr(e,t){return t.some(n=>e[n]!==void 0)}function hd(e){let t={velocity:we.velocity,stiffness:we.stiffness,damping:we.damping,mass:we.mass,isResolvedFromDuration:!1,...e};if(!fr(e,fd)&&fr(e,dd))if(e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*Ke(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:we.mass,stiffness:i,damping:r}}else{const n=ld(e);t={...t,...n,mass:we.mass},t.isResolvedFromDuration=!0}return t}function an(e=we.visualDuration,t=we.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],l={done:!1,value:r},{stiffness:c,damping:u,mass:d,duration:f,velocity:h,isResolvedFromDuration:m}=hd({...n,velocity:-Be(n.velocity||0)}),p=h||0,y=u/(2*Math.sqrt(c*d)),v=o-r,x=Be(Math.sqrt(c/d)),C=Math.abs(v)<5;s||(s=C?we.restSpeed.granular:we.restSpeed.default),i||(i=C?we.restDelta.granular:we.restDelta.default);let N;if(y<1){const A=Ns(x,y);N=k=>{const E=Math.exp(-y*x*k);return o-E*((p+y*x*v)/A*Math.sin(A*k)+v*Math.cos(A*k))}}else if(y===1)N=A=>o-Math.exp(-x*A)*(v+(p+x*v)*A);else{const A=x*Math.sqrt(y*y-1);N=k=>{const E=Math.exp(-y*x*k),w=Math.min(A*k,300);return o-E*((p+y*x*v)*Math.sinh(w)+A*v*Math.cosh(w))/A}}const I={calculatedDuration:m&&f||null,next:A=>{const k=N(A);if(m)l.done=A>=f;else{let E=A===0?p:0;y<1&&(E=A===0?Fe(p):dr(N,A,k));const w=Math.abs(E)<=s,j=Math.abs(o-k)<=i;l.done=w&&j}return l.value=l.done?o:k,l},toString:()=>{const A=Math.min(Es(I),kn),k=cr(E=>I.next(A*E).value,A,30);return A+"ms "+k},toTransition:()=>{}};return I}an.applyToOptions=e=>{const t=ur(e,100,an);return e.ease=t.ease,e.duration=Fe(t.duration),e.type="keyframes",e};function ks({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:l,max:c,restDelta:u=.5,restSpeed:d}){const f=e[0],h={done:!1,value:f},m=w=>l!==void 0&&w<l||c!==void 0&&w>c,p=w=>l===void 0?c:c===void 0||Math.abs(l-w)<Math.abs(c-w)?l:c;let y=n*t;const v=f+y,x=o===void 0?v:o(v);x!==v&&(y=x-f);const C=w=>-y*Math.exp(-w/s),N=w=>x+C(w),I=w=>{const j=C(w),$=N(w);h.done=Math.abs(j)<=u,h.value=h.done?x:$};let A,k;const E=w=>{m(h.value)&&(A=w,k=an({keyframes:[h.value,p(h.value)],velocity:dr(N,w,h.value),damping:i,stiffness:r,restDelta:u,restSpeed:d}))};return E(0),{calculatedDuration:null,next:w=>{let j=!1;return!k&&A===void 0&&(j=!0,I(w),E(w)),A!==void 0&&w>=A?k.next(w-A):(!j&&I(w),h)}}}function md(e,t,n){const s=[],i=n||tt.mix||lr,r=e.length-1;for(let o=0;o<r;o++){let l=i(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||$e:t;l=en(c,l)}s.push(l)}return s}function pd(e,t,{clamp:n=!0,ease:s,mixer:i}={}){const r=e.length;if(Ye(r===t.length,"Both input and output ranges must be the same length","range-length"),r===1)return()=>t[0];if(r===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[r-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=md(t,s,i),c=l.length,u=d=>{if(o&&d<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(d<e[f+1]);f++);const h=At(e[f],e[f+1],d);return l[f](h)};return n?d=>u(Ke(e[0],e[r-1],d)):u}function hr(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const i=At(0,t,s);e.push(ve(n,1,i))}}function mr(e){const t=[0];return hr(t,e.length-1),t}function gd(e,t){return e.map(n=>n*t)}function bd(e,t){return e.map(()=>t||zo).splice(0,e.length-1)}function Lt({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const i=Wo(s)?s.map(Xo):Xo(s),r={done:!1,value:t[0]},o=gd(n&&n.length===t.length?n:mr(t),e),l=pd(o,t,{ease:Array.isArray(i)?i:bd(t,i)});return{calculatedDuration:e,next:c=>(r.value=l(c),r.done=c>=e,r)}}const yd=e=>e!==null;function Ps(e,{repeat:t,repeatType:n="loop"},s,i=1){const r=e.filter(yd),l=i<0||t&&n!=="loop"&&t%2===1?0:r.length-1;return!l||s===void 0?r[l]:s}const xd={decay:ks,inertia:ks,tween:Lt,keyframes:Lt,spring:an};function pr(e){typeof e.type=="string"&&(e.type=xd[e.type])}class js{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const vd=e=>e/100;class Is extends js{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==Le.now()&&this.tick(Le.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;pr(t);const{type:n=Lt,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=t;let{keyframes:l}=t;const c=n||Lt;process.env.NODE_ENV!=="production"&&c!==Lt&&Ye(l.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${l}`,"spring-two-frames"),c!==Lt&&typeof l[0]!="number"&&(this.mixKeyframes=en(vd,lr(l[0],l[1])),l=[0,100]);const u=c({...t,keyframes:l});r==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...l].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=Es(u));const{calculatedDuration:d}=u;this.calculatedDuration=d,this.resolvedDuration=d+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:s,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:l,calculatedDuration:c}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:d,repeat:f,repeatType:h,repeatDelay:m,type:p,onUpdate:y,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const x=this.currentTime-u*(this.playbackSpeed>=0?1:-1),C=this.playbackSpeed>=0?x<0:x>i;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let N=this.currentTime,I=s;if(f){const w=Math.min(this.currentTime,i)/l;let j=Math.floor(w),$=w%1;!$&&w>=1&&($=1),$===1&&j--,j=Math.min(j,f+1),j%2&&(h==="reverse"?($=1-$,m&&($-=m/l)):h==="mirror"&&(I=o)),N=Ke(0,1,$)*l}const A=C?{done:!1,value:d[0]}:I.next(N);r&&(A.value=r(A.value));let{done:k}=A;!C&&c!==null&&(k=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&k);return E&&p!==ks&&(A.value=Ps(d,this.options,v,this.speed)),y&&y(A.value),E&&this.finish(),A}then(t,n){return this.finished.then(t,n)}get duration(){return Be(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Be(t)}get time(){return Be(this.currentTime)}set time(t){t=Fe(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Le.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Be(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=rd,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Le.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function wd(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const gt=e=>e*180/Math.PI,Ms=e=>{const t=gt(Math.atan2(e[1],e[0]));return As(t)},Sd={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Ms,rotateZ:Ms,skewX:e=>gt(Math.atan(e[1])),skewY:e=>gt(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},As=e=>(e=e%360,e<0&&(e+=360),e),gr=Ms,br=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),yr=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Td={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:br,scaleY:yr,scale:e=>(br(e)+yr(e))/2,rotateX:e=>As(gt(Math.atan2(e[6],e[5]))),rotateY:e=>As(gt(Math.atan2(-e[2],e[0]))),rotateZ:gr,rotate:gr,skewX:e=>gt(Math.atan(e[4])),skewY:e=>gt(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Vs(e){return e.includes("scale")?1:0}function Os(e,t){if(!e||e==="none")return Vs(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Td,i=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Sd,i=l}if(!i)return Vs(t);const r=s[t],o=i[1].split(",").map(Cd);return typeof r=="function"?r(o):o[r]}const Ed=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Os(n,t)};function Cd(e){return parseFloat(e.trim())}const Dt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Rt=new Set(Dt),xr=e=>e===Vt||e===G,Nd=new Set(["x","y","z"]),kd=Dt.filter(e=>!Nd.has(e));function Pd(e){const t=[];return kd.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const at={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})=>Os(t,"x"),y:(e,{transform:t})=>Os(t,"y")};at.translateX=at.x,at.translateY=at.y;const bt=new Set;let Ls=!1,Ds=!1,Rs=!1;function vr(){if(Ds){const e=Array.from(bt).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const i=Pd(s);i.length&&(n.set(s,i),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,o])=>{s.getValue(r)?.set(o)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Ds=!1,Ls=!1,bt.forEach(e=>e.complete(Rs)),bt.clear()}function wr(){bt.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ds=!0)})}function jd(){Rs=!0,wr(),vr(),Rs=!1}class _s{constructor(t,n,s,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(bt.add(this),Ls||(Ls=!0,ge.read(wr),ge.resolveKeyframes(vr))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:i}=this;if(t[0]===null){const r=i?.get(),o=t[t.length-1];if(r!==void 0)t[0]=r;else if(s&&n){const l=s.readValue(n,o);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=o),i&&r===void 0&&i.set(t[0])}wd(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),bt.delete(this)}cancel(){this.state==="scheduled"&&(bt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Id=e=>e.startsWith("--");function Md(e,t,n){Id(t)?e.style.setProperty(t,n):e.style[t]=n}const Ad={};function Sr(e,t){const n=Mo(e);return()=>Ad[t]??n()}const Vd=Sr(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Tr=Sr(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ln=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,Er={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ln([0,.65,.55,1]),circOut:ln([.55,0,1,.45]),backIn:ln([.31,.01,.66,-.59]),backOut:ln([.33,1.53,.69,.99])};function Cr(e,t){if(e)return typeof e=="function"?Tr()?cr(e,t):"ease-out":Uo(e)?ln(e):Array.isArray(e)?e.map(n=>Cr(n,t)||Er.easeOut):Er[e]}function Od(e,t,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:l="easeOut",times:c}={},u=void 0){const d={[t]:n};c&&(d.offset=c);const f=Cr(l,i);Array.isArray(f)&&(d.easing=f);const h={delay:s,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return u&&(h.pseudoElement=u),e.animate(d,h)}function Fs(e){return typeof e=="function"&&"applyToOptions"in e}function Ld({type:e,...t}){return Fs(e)&&Tr()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Nr extends js{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:l,onComplete:c}=t;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=t,Ye(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=Ld(t);this.animation=Od(n,s,i,u,r),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const d=Ps(i,this.options,l,this.speed);this.updateMotionValue?this.updateMotionValue(d):Md(n,s,d),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return Be(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Be(t)}get time(){return Be(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Fe(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Vd()?(this.animation.timeline=t,$e):n(this)}}const kr={anticipate:Fo,backInOut:_o,circInOut:Bo};function Dd(e){return e in kr}function Rd(e){typeof e.ease=="string"&&Dd(e.ease)&&(e.ease=kr[e.ease])}const $s=10;class _d extends Nr{constructor(t){Rd(t),pr(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const l=new Is({...o,autoplay:!1}),c=Math.max($s,Le.now()-this.startTime),u=Ke(0,$s,c-$s);n.setWithVelocity(l.sample(Math.max(0,c-u)).value,l.sample(c).value,u),l.stop()}}const Pr=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ue.test(e)||e==="0")&&!e.startsWith("url("));function Fd(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 $d(e,t,n,s){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const r=e[e.length-1],o=Pr(i,t),l=Pr(r,t);return Mt(o===l,`You are trying to animate ${t} from "${i}" to "${r}". "${o?r:i}" is not an animatable value.`,"value-not-animatable"),!o||!l?!1:Fd(e)||(n==="spring"||Fs(n))&&s}function Bs(e){e.duration=0,e.type="keyframes"}const Bd=new Set(["opacity","clipPath","filter","transform"]),zd=Mo(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Wd(e){const{motionValue:t,name:n,repeatDelay:s,repeatType:i,damping:r,type:o}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=t.owner.getProps();return zd()&&n&&Bd.has(n)&&(n!=="transform"||!u)&&!c&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const Yd=40;class Ud extends js{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:l,name:c,motionValue:u,element:d,...f}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Le.now();const h={autoplay:t,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:c,motionValue:u,element:d,...f},m=d?.KeyframeResolver||_s;this.keyframeResolver=new m(l,(p,y,v)=>this.onKeyframesResolved(p,y,h,!v),c,u,d),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,s,i){this.keyframeResolver=void 0;const{name:r,type:o,velocity:l,delay:c,isHandoff:u,onUpdate:d}=s;this.resolvedAt=Le.now(),$d(t,r,o,l)||((tt.instantAnimations||!c)&&d?.(Ps(t,s,n)),t[0]=t[t.length-1],Bs(s),s.repeat=0);const h={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Yd?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:t},m=!u&&Wd(h),p=h.motionValue?.owner?.current,y=m?new _d({...h,element:p}):new Is(h);y.finished.then(()=>{this.notifyFinished()}).catch($e),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),jd()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class Hd{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let s=0;s<this.animations.length;s++)this.animations[s][t]=n}attachTimeline(t){const n=this.animations.map(s=>s.attachTimeline(t));return()=>{n.forEach((s,i)=>{s&&s(),this.animations[i].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 state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return jr(this.animations,"duration")}get iterationDuration(){return jr(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function jr(e,t){let n=0;for(let s=0;s<e.length;s++){const i=e[s][t];i!==null&&i>n&&(n=i)}return n}class Xd extends Hd{then(t,n){return this.finished.finally(t).then(()=>{})}}function Ir(e,t,n,s=0,i=1){const r=Array.from(e).sort((u,d)=>u.sortNodePosition(d)).indexOf(t),o=e.size,l=(o-1)*s;return typeof n=="function"?n(r,o):i===1?r*s:l-r*s}const Gd=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Kd(e){const t=Gd.exec(e);if(!t)return[,];const[,n,s,i]=t;return[`--${n??s}`,i]}const Zd=4;function Mr(e,t,n=1){Ye(n<=Zd,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=Kd(e);if(!s)return;const r=window.getComputedStyle(t).getPropertyValue(s);if(r){const o=r.trim();return Po(o)?parseFloat(o):o}return ps(i)?Mr(i,t,n+1):i}const qd={type:"spring",stiffness:500,damping:25,restSpeed:10},Jd=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Qd={type:"keyframes",duration:.8},ef={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},tf=(e,{keyframes:t})=>t.length>2?Qd:Rt.has(e)?e.startsWith("scale")?Jd(t[1]):qd:ef,nf=e=>e!==null;function sf(e,{repeat:t,repeatType:n="loop"},s){const i=e.filter(nf),r=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[r]}function Ar(e,t){if(e?.inherit&&t){const{inherit:n,...s}=e;return{...t,...s}}return e}function zs(e,t){const n=e?.[t]??e?.default??e;return n!==e?Ar(n,e):n}function of({when:e,delay:t,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:l,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const Ws=(e,t,n,s={},i,r)=>o=>{const l=zs(s,e)||{},c=l.delay||s.delay||0;let{elapsed:u=0}=s;u=u-Fe(c);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:h=>{t.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:r?void 0:i};of(l)||Object.assign(d,tf(e,d)),d.duration&&(d.duration=Fe(d.duration)),d.repeatDelay&&(d.repeatDelay=Fe(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(Bs(d),d.delay===0&&(f=!0)),(tt.instantAnimations||tt.skipAnimations||i?.shouldSkipAnimations)&&(f=!0,Bs(d),d.delay=0),d.allowFlatten=!l.type&&!l.ease,f&&!r&&t.get()!==void 0){const h=sf(d.keyframes,l);if(h!==void 0){ge.update(()=>{d.onUpdate(h),d.onComplete()});return}}return l.isSync?new Is(d):new Ud(d)};function Vr(e){const t=[{},{}];return e?.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function Ys(e,t,n,s){if(typeof t=="function"){const[i,r]=Vr(s);t=t(n!==void 0?n:e.custom,i,r)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,r]=Vr(s);t=t(n!==void 0?n:e.custom,i,r)}return t}function _t(e,t,n){const s=e.getProps();return Ys(s,t,n!==void 0?n:s.custom,e)}const Or=new Set(["width","height","top","left","right","bottom",...Dt]),Lr=30,rf=e=>!isNaN(parseFloat(e));class af{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=Le.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Le.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=rf(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&ds(!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 us);const s=this.events[t].add(n);return t==="change"?()=>{s(),ge.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Le.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Lr)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Lr);return Ao(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.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function lt(e,t){return new af(e,t)}const Us=e=>Array.isArray(e);function lf(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,lt(n))}function cf(e){return Us(e)?e[e.length-1]||0:e}function uf(e,t){const n=_t(e,t);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const l=cf(r[o]);lf(e,o,l)}}const je=e=>!!(e&&e.getVelocity);function df(e){return!!(je(e)&&e.add)}function Hs(e,t){const n=e.getValue("willChange");if(df(n))return n.add(t);if(!n&&tt.WillChange){const s=new tt.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function Xs(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Dr="data-"+Xs("framerAppearId");function Rr(e){return e.props[Dr]}function ff({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function Gs(e,t,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r,transitionEnd:o,...l}=t;const c=e.getDefaultTransition();r=r?Ar(r,c):c;const u=r?.reduceMotion;s&&(r=s);const d=[],f=i&&e.animationState&&e.animationState.getState()[i];for(const h in l){const m=e.getValue(h,e.latestValues[h]??null),p=l[h];if(p===void 0||f&&ff(f,h))continue;const y={delay:n,...zs(r||{},h)},v=m.get();if(v!==void 0&&!m.isAnimating&&!Array.isArray(p)&&p===v&&!y.velocity)continue;let x=!1;if(window.MotionHandoffAnimation){const I=Rr(e);if(I){const A=window.MotionHandoffAnimation(I,h,ge);A!==null&&(y.startTime=A,x=!0)}}Hs(e,h);const C=u??e.shouldReduceMotion;m.start(Ws(h,m,p,C&&Or.has(h)?{type:!1}:y,e,x));const N=m.animation;N&&d.push(N)}if(o){const h=()=>ge.update(()=>{o&&uf(e,o)});d.length?Promise.all(d).then(h):h()}return d}function Ks(e,t,n={}){const s=_t(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Promise.all(Gs(e,s,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=i;return hf(e,t,c,u,d,f,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,u]=l==="beforeChildren"?[r,o]:[o,r];return c().then(()=>u())}else return Promise.all([r(),o(n.delay)])}function hf(e,t,n=0,s=0,i=0,r=1,o){const l=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),l.push(Ks(c,t,{...o,delay:n+(typeof s=="function"?0:s)+Ir(e.variantChildren,c,s,i,r)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(l)}function mf(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const i=t.map(r=>Ks(e,r,n));s=Promise.all(i)}else if(typeof t=="string")s=Ks(e,t,n);else{const i=typeof t=="function"?_t(e,t,n.custom):t;s=Promise.all(Gs(e,i,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}const pf={test:e=>e==="auto",parse:e=>e},_r=e=>t=>t.test(e),Fr=[Vt,G,Ze,rt,Yu,Wu,pf],$r=e=>Fr.find(_r(e));function gf(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Io(e):!0}const bf=new Set(["brightness","contrast","saturate","opacity"]);function yf(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(gs)||[];if(!s)return e;const i=n.replace(s,"");let r=bf.has(t)?1:0;return s!==n&&(r*=100),t+"("+r+i+")"}const xf=/\b([a-z-]*)\(.*?\)/gu,Zs={...Ue,getAnimatableNone:e=>{const t=e.match(xf);return t?t.map(yf).join(" "):e}},qs={...Ue,getAnimatableNone:e=>{const t=Ue.parse(e);return Ue.createTransformer(e)(t.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},Br={...Vt,transform:Math.round},Js={borderWidth:G,borderTopWidth:G,borderRightWidth:G,borderBottomWidth:G,borderLeftWidth:G,borderRadius:G,borderTopLeftRadius:G,borderTopRightRadius:G,borderBottomRightRadius:G,borderBottomLeftRadius:G,width:G,maxWidth:G,height:G,maxHeight:G,top:G,right:G,bottom:G,left:G,inset:G,insetBlock:G,insetBlockStart:G,insetBlockEnd:G,insetInline:G,insetInlineStart:G,insetInlineEnd:G,padding:G,paddingTop:G,paddingRight:G,paddingBottom:G,paddingLeft:G,paddingBlock:G,paddingBlockStart:G,paddingBlockEnd:G,paddingInline:G,paddingInlineStart:G,paddingInlineEnd:G,margin:G,marginTop:G,marginRight:G,marginBottom:G,marginLeft:G,marginBlock:G,marginBlockStart:G,marginBlockEnd:G,marginInline:G,marginInlineStart:G,marginInlineEnd:G,fontSize:G,backgroundPositionX:G,backgroundPositionY:G,...{rotate:rt,rotateX:rt,rotateY:rt,rotateZ:rt,scale:Cn,scaleX:Cn,scaleY:Cn,scaleZ:Cn,skew:rt,skewX:rt,skewY:rt,distance:G,translateX:G,translateY:G,translateZ:G,x:G,y:G,z:G,perspective:G,transformPerspective:G,opacity:nn,originX:Qo,originY:Qo,originZ:G},zIndex:Br,fillOpacity:nn,strokeOpacity:nn,numOctaves:Br},vf={...Js,color:Te,backgroundColor:Te,outlineColor:Te,fill:Te,stroke:Te,borderColor:Te,borderTopColor:Te,borderRightColor:Te,borderBottomColor:Te,borderLeftColor:Te,filter:Zs,WebkitFilter:Zs,mask:qs,WebkitMask:qs},zr=e=>vf[e],wf=new Set([Zs,qs]);function Wr(e,t){let n=zr(e);return wf.has(n)||(n=Ue),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Sf=new Set(["auto","none","0"]);function Tf(e,t,n){let s=0,i;for(;s<e.length&&!i;){const r=e[s];typeof r=="string"&&!Sf.has(r)&&rn(r).values.length&&(i=e[s]),s++}if(i&&n)for(const r of t)e[r]=Wr(n,i)}class Ef extends _s{constructor(t,n,s,i,r){super(t,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let f=t[d];if(typeof f=="string"&&(f=f.trim(),ps(f))){const h=Mr(f,n.current);h!==void 0&&(t[d]=h),d===t.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!Or.has(s)||t.length!==2)return;const[i,r]=t,o=$r(i),l=$r(r),c=qo(i),u=qo(r);if(c!==u&&at[s]){this.needsMeasurement=!0;return}if(o!==l)if(xr(o)&&xr(l))for(let d=0;d<t.length;d++){const f=t[d];typeof f=="string"&&(t[d]=parseFloat(f))}else at[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let i=0;i<t.length;i++)(t[i]===null||gf(t[i]))&&s.push(i);s.length&&Tf(t,s,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=at[s](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(s,i).jump(i,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:s}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const r=s.length-1,o=s[r];s[r]=at[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([l,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const Cf=new Set(["opacity","clipPath","filter","transform"]);function Qs(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;t&&(s=t.current);const i=n?.[e]??s.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(s=>s!=null)}const Yr=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function ei(e){return jo(e)&&"offsetHeight"in e}const{schedule:ti}=Go(queueMicrotask,!1),He={x:!1,y:!1};function Ur(){return He.x||He.y}function Nf(e){return e==="x"||e==="y"?He[e]?null:(He[e]=!0,()=>{He[e]=!1}):He.x||He.y?null:(He.x=He.y=!0,()=>{He.x=He.y=!1})}function Hr(e,t){const n=Qs(e),s=new AbortController,i={passive:!0,...t,signal:s.signal};return[n,i,()=>s.abort()]}function kf(e){return!(e.pointerType==="touch"||Ur())}function Pf(e,t,n={}){const[s,i,r]=Hr(e,n);return s.forEach(o=>{let l=!1,c=!1,u;const d=()=>{o.removeEventListener("pointerleave",p)},f=v=>{u&&(u(v),u=void 0),d()},h=v=>{l=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),c&&(c=!1,f(v))},m=()=>{l=!0,window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",h,i)},p=v=>{if(v.pointerType!=="touch"){if(l){c=!0;return}f(v)}},y=v=>{if(!kf(v))return;c=!1;const x=t(o,v);typeof x=="function"&&(u=x,o.addEventListener("pointerleave",p,i))};o.addEventListener("pointerenter",y,i),o.addEventListener("pointerdown",m,i)}),r}const Xr=(e,t)=>t?e===t?!0:Xr(e,t.parentElement):!1,ni=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,jf=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function If(e){return jf.has(e.tagName)||e.isContentEditable===!0}const Mf=new Set(["INPUT","SELECT","TEXTAREA"]);function Af(e){return Mf.has(e.tagName)||e.isContentEditable===!0}const Pn=new WeakSet;function Gr(e){return t=>{t.key==="Enter"&&e(t)}}function si(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Vf=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=Gr(()=>{if(Pn.has(n))return;si(n,"down");const i=Gr(()=>{si(n,"up")}),r=()=>si(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",r,t)});n.addEventListener("keydown",s,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),t)};function Kr(e){return ni(e)&&!Ur()}const Zr=new WeakSet;function Of(e,t,n={}){const[s,i,r]=Hr(e,n),o=l=>{const c=l.currentTarget;if(!Kr(l)||Zr.has(l))return;Pn.add(c),n.stopPropagation&&Zr.add(l);const u=t(c,l),d=(m,p)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),Pn.has(c)&&Pn.delete(c),Kr(m)&&typeof u=="function"&&u(m,{success:p})},f=m=>{d(m,c===window||c===document||n.useGlobalTarget||Xr(c,m.target))},h=m=>{d(m,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",h,i)};return s.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",o,i),ei(l)&&(l.addEventListener("focus",u=>Vf(u,i)),!If(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),r}function jn(e){return jo(e)&&"ownerSVGElement"in e}const In=new WeakMap;let Mn;const qr=(e,t,n)=>(s,i)=>i&&i[0]?i[0][e+"Size"]:jn(s)&&"getBBox"in s?s.getBBox()[t]:s[n],Lf=qr("inline","width","offsetWidth"),Df=qr("block","height","offsetHeight");function Rf({target:e,borderBoxSize:t}){In.get(e)?.forEach(n=>{n(e,{get width(){return Lf(e,t)},get height(){return Df(e,t)}})})}function _f(e){e.forEach(Rf)}function Ff(){typeof ResizeObserver>"u"||(Mn=new ResizeObserver(_f))}function $f(e,t){Mn||Ff();const n=Qs(e);return n.forEach(s=>{let i=In.get(s);i||(i=new Set,In.set(s,i)),i.add(t),Mn?.observe(s)}),()=>{n.forEach(s=>{const i=In.get(s);i?.delete(t),i?.size||Mn?.unobserve(s)})}}const An=new Set;let Ft;function Bf(){Ft=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};An.forEach(t=>t(e))},window.addEventListener("resize",Ft)}function zf(e){return An.add(e),Ft||Bf(),()=>{An.delete(e),!An.size&&typeof Ft=="function"&&(window.removeEventListener("resize",Ft),Ft=void 0)}}function Jr(e,t){return typeof e=="function"?zf(e):$f(e,t)}function Qr(e){return jn(e)&&e.tagName==="svg"}const Wf=[...Fr,Te,Ue],Yf=e=>Wf.find(_r(e)),ea=()=>({translate:0,scale:1,origin:0,originPoint:0}),$t=()=>({x:ea(),y:ea()}),ta=()=>({min:0,max:0}),Ee=()=>({x:ta(),y:ta()}),cn=new WeakMap;function Vn(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function un(e){return typeof e=="string"||Array.isArray(e)}const ii=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],oi=["initial",...ii];function On(e){return Vn(e.animate)||oi.some(t=>un(e[t]))}function na(e){return!!(On(e)||e.variants)}function Uf(e,t,n){for(const s in t){const i=t[s],r=n[s];if(je(i))e.addValue(s,i);else if(je(r))e.addValue(s,lt(i,{owner:e}));else if(r!==i)if(e.hasValue(s)){const o=e.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(s);e.addValue(s,lt(o!==void 0?o:i,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const ri={current:null},sa={current:!1},Hf=typeof window<"u";function Xf(){if(sa.current=!0,!!Hf)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ri.current=e.matches;e.addEventListener("change",t),t()}else ri.current=!1}const ia=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Ln={};function oa(e){Ln=e}function Gf(){return Ln}class ra{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:o,visualState:l},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=_s,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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=Le.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,ge.render(this.render,!1,!0))};const{latestValues:u,renderState:d}=l;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=r,this.options=c,this.blockInitialAnimation=!!o,this.isControllingVariants=On(n),this.isVariantNode=na(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in h){const p=h[m];u[m]!==void 0&&je(p)&&p.set(u[m])}}mount(t){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=t,cn.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,s)=>this.bindToMotionValue(s,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(sa.current||Xf(),this.shouldReduceMotion=ri.current),process.env.NODE_ENV!=="production"&&ds(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),ot(this.notifyUpdate),ot(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(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}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&Cf.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:l,times:c,ease:u,duration:d}=n.accelerate,f=new Nr({element:this.current,name:t,keyframes:l,times:c,ease:u,duration:Fe(d)}),h=o(f);this.valueSubscriptions.set(t,()=>{h(),f.cancel()});return}const s=Rt.has(t);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&ge.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),r&&r(),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 Ln){const n=Ln[t];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[t]&&i&&s(this.props)&&(this.features[t]=new i(this)),this.features[t]){const r=this.features[t];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ee()}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 s=0;s<ia.length;s++){const i=ia[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=t[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=Uf(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}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 s=this.values.get(t);n!==s&&(s&&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 s=this.values.get(t);return s===void 0&&n!==void 0&&(s=lt(n===null?void 0:n,{owner:this}),this.addValue(t,s)),s}readValue(t,n){let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(Po(s)||Io(s))?s=parseFloat(s):!Yf(s)&&Ue.test(n)&&(s=Wr(t,n)),this.setBaseTarget(t,je(s)?s.get():s)),je(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const r=Ys(this.props,n,this.presenceContext?.custom);r&&(s=r[t])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!je(i)?i:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new us),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){ti.render(this.render)}}class aa extends ra{constructor(){super(...arguments),this.KeyframeResolver=Ef}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const s=t.style;return s?s[n]:void 0}removeValueFromRenderState(t,{vars:n,style:s}){delete n[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;je(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class ct{constructor(t){this.isMounted=!1,this.node=t}update(){}}function la({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function Kf({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Zf(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function ai(e){return e===void 0||e===1}function li({scale:e,scaleX:t,scaleY:n}){return!ai(e)||!ai(t)||!ai(n)}function yt(e){return li(e)||ca(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ca(e){return ua(e.x)||ua(e.y)}function ua(e){return e&&e!=="0%"}function Dn(e,t,n){const s=e-n,i=t*s;return n+i}function da(e,t,n,s,i){return i!==void 0&&(e=Dn(e,i,s)),Dn(e,n,s)+t}function ci(e,t=0,n=1,s,i){e.min=da(e.min,t,n,s,i),e.max=da(e.max,t,n,s,i)}function fa(e,{x:t,y:n}){ci(e.x,t.translate,t.scale,t.originPoint),ci(e.y,n.translate,n.scale,n.originPoint)}const ha=.999999999999,ma=1.0000000000001;function qf(e,t,n,s=!1){const i=n.length;if(!i)return;t.x=t.y=1;let r,o;for(let l=0;l<i;l++){r=n[l],o=r.projectionDelta;const{visualElement:c}=r.options;c&&c.props.style&&c.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&zt(e,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,fa(e,o)),s&&yt(r.latestValues)&&zt(e,r.latestValues))}t.x<ma&&t.x>ha&&(t.x=1),t.y<ma&&t.y>ha&&(t.y=1)}function Bt(e,t){e.min=e.min+t,e.max=e.max+t}function pa(e,t,n,s,i=.5){const r=ve(e.min,e.max,i);ci(e,t,n,r,s)}function zt(e,t){pa(e.x,t.x,t.scaleX,t.scale,t.originX),pa(e.y,t.y,t.scaleY,t.scale,t.originY)}function ga(e,t){return la(Zf(e.getBoundingClientRect(),t))}function Jf(e,t,n){const s=ga(e,n),{scroll:i}=t;return i&&(Bt(s.x,i.offset.x),Bt(s.y,i.offset.y)),s}const Qf={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},eh=Dt.length;function th(e,t,n){let s="",i=!0;for(let r=0;r<eh;r++){const o=Dt[r],l=e[o];if(l===void 0)continue;let c=!0;if(typeof l=="number")c=l===(o.startsWith("scale")?1:0);else{const u=parseFloat(l);c=o.startsWith("scale")?u===1:u===0}if(!c||n){const u=Yr(l,Js[o]);if(!c){i=!1;const d=Qf[o]||o;s+=`${d}(${u}) `}n&&(t[o]=u)}}return s=s.trim(),n?s=n(t,i?"":s):i&&(s="none"),s}function ui(e,t,n){const{style:s,vars:i,transformOrigin:r}=e;let o=!1,l=!1;for(const c in t){const u=t[c];if(Rt.has(c)){o=!0;continue}else if(Zo(c)){i[c]=u;continue}else{const d=Yr(u,Js[c]);c.startsWith("origin")?(l=!0,r[c]=d):s[c]=d}}if(t.transform||(o||n?s.transform=th(t,e.transform,n):s.transform&&(s.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:d=0}=r;s.transformOrigin=`${c} ${u} ${d}`}}function ba(e,{style:t,vars:n},s,i){const r=e.style;let o;for(o in t)r[o]=t[o];i?.applyProjectionStyles(r,s);for(o in n)r.setProperty(o,n[o])}function ya(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const dn={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(G.test(e))e=parseFloat(e);else return e;const n=ya(e,t.target.x),s=ya(e,t.target.y);return`${n}% ${s}%`}},nh={correct:(e,{treeScale:t,projectionDelta:n})=>{const s=e,i=Ue.parse(e);if(i.length>5)return s;const r=Ue.createTransformer(e),o=typeof i[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=l,i[1+o]/=c;const u=ve(l,c,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),r(i)}},di={borderRadius:{...dn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:dn,borderTopRightRadius:dn,borderBottomLeftRadius:dn,borderBottomRightRadius:dn,boxShadow:nh};function xa(e,{layout:t,layoutId:n}){return Rt.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!di[e]||e==="opacity")}function fi(e,t,n){const s=e.style,i=t?.style,r={};if(!s)return r;for(const o in s)(je(s[o])||i&&je(i[o])||xa(o,e)||n?.getValue(o)?.liveStyle!==void 0)&&(r[o]=s[o]);return r}function sh(e){return window.getComputedStyle(e)}class va extends aa{constructor(){super(...arguments),this.type="html",this.renderInstance=ba}readValueFromInstance(t,n){if(Rt.has(n))return this.projection?.isProjecting?Vs(n):Ed(t,n);{const s=sh(t),i=(Zo(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return ga(t,n)}build(t,n,s){ui(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return fi(t,n,s)}}function ih(e,t){return e in t}class oh extends ra{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(ih(n,t)){const s=t[n];if(typeof s=="string"||typeof s=="number")return s}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return Ee()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}const rh={offset:"stroke-dashoffset",array:"stroke-dasharray"},ah={offset:"strokeDashoffset",array:"strokeDasharray"};function lh(e,t,n=1,s=0,i=!0){e.pathLength=1;const r=i?rh:ah;e[r.offset]=`${-s}`,e[r.array]=`${t} ${n}`}const ch=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function wa(e,{attrX:t,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...l},c,u,d){if(ui(e,l,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h}=e;f.transform&&(h.transform=f.transform,delete f.transform),(h.transform||f.transformOrigin)&&(h.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),h.transform&&(h.transformBox=d?.transformBox??"fill-box",delete f.transformBox);for(const m of ch)f[m]!==void 0&&(h[m]=f[m],delete f[m]);t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),i!==void 0&&lh(f,i,r,o,!1)}const Sa=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"]),Ta=e=>typeof e=="string"&&e.toLowerCase()==="svg";function uh(e,t,n,s){ba(e,t,void 0,s);for(const i in t.attrs)e.setAttribute(Sa.has(i)?i:Xs(i),t.attrs[i])}function Ea(e,t,n){const s=fi(e,t,n);for(const i in e)if(je(e[i])||je(t[i])){const r=Dt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=e[i]}return s}class Ca extends aa{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ee}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Rt.has(n)){const s=zr(n);return s&&s.default||0}return n=Sa.has(n)?n:Xs(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return Ea(t,n,s)}build(t,n,s){wa(t,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,n,s,i){uh(t,n,s,i)}mount(t){this.isSVGTag=Ta(t.tagName),super.mount(t)}}const dh=oi.length;function Na(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Na(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<dh;n++){const s=oi[n],i=e.props[s];(un(i)||i===!1)&&(t[s]=i)}return t}function ka(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let s=0;s<n;s++)if(t[s]!==e[s])return!1;return!0}const fh=[...ii].reverse(),hh=ii.length;function mh(e){return t=>Promise.all(t.map(({animation:n,options:s})=>mf(e,n,s)))}function ph(e){let t=mh(e),n=Pa(),s=!0;const i=c=>(u,d)=>{const f=_t(e,d,c==="exit"?e.presenceContext?.custom:void 0);if(f){const{transition:h,transitionEnd:m,...p}=f;u={...u,...p,...m}}return u};function r(c){t=c(e)}function o(c){const{props:u}=e,d=Na(e.parent)||{},f=[],h=new Set;let m={},p=1/0;for(let v=0;v<hh;v++){const x=fh[v],C=n[x],N=u[x]!==void 0?u[x]:d[x],I=un(N),A=x===c?C.isActive:null;A===!1&&(p=v);let k=N===d[x]&&N!==u[x]&&I;if(k&&s&&e.manuallyAnimateOnMount&&(k=!1),C.protectedKeys={...m},!C.isActive&&A===null||!N&&!C.prevProp||Vn(N)||typeof N=="boolean")continue;if(x==="exit"&&C.isActive&&A!==!0){C.prevResolvedValues&&(m={...m,...C.prevResolvedValues});continue}const E=gh(C.prevProp,N);let w=E||x===c&&C.isActive&&!k&&I||v>p&&I,j=!1;const $=Array.isArray(N)?N:[N];let z=$.reduce(i(x),{});A===!1&&(z={});const{prevResolvedValues:Q={}}=C,R={...Q,...z},se=V=>{w=!0,h.has(V)&&(j=!0,h.delete(V)),C.needsAnimating[V]=!0;const P=e.getValue(V);P&&(P.liveStyle=!1)};for(const V in R){const P=z[V],_=Q[V];if(m.hasOwnProperty(V))continue;let M=!1;Us(P)&&Us(_)?M=!ka(P,_):M=P!==_,M?P!=null?se(V):h.add(V):P!==void 0&&h.has(V)?se(V):C.protectedKeys[V]=!0}C.prevProp=N,C.prevResolvedValues=z,C.isActive&&(m={...m,...z}),s&&e.blockInitialAnimation&&(w=!1);const U=k&&E;w&&(!U||j)&&f.push(...$.map(V=>{const P={type:x};if(typeof V=="string"&&s&&!U&&e.manuallyAnimateOnMount&&e.parent){const{parent:_}=e,M=_t(_,V);if(_.enteringChildren&&M){const{delayChildren:T}=M.transition||{};P.delay=Ir(_.enteringChildren,e,T)}}return{animation:V,options:P}}))}if(h.size){const v={};if(typeof u.initial!="boolean"){const x=_t(e,Array.isArray(u.initial)?u.initial[0]:u.initial);x&&x.transition&&(v.transition=x.transition)}h.forEach(x=>{const C=e.getBaseTarget(x),N=e.getValue(x);N&&(N.liveStyle=!0),v[x]=C??null}),f.push({animation:v})}let y=!!f.length;return s&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(y=!1),s=!1,y?t(f):Promise.resolve()}function l(c,u){if(n[c].isActive===u)return Promise.resolve();e.variantChildren?.forEach(f=>f.animationState?.setActive(c,u)),n[c].isActive=u;const d=o(c);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:o,setActive:l,setAnimateFunction:r,getState:()=>n,reset:()=>{n=Pa()}}}function gh(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ka(t,e):!1}function xt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Pa(){return{animate:xt(!0),whileInView:xt(),whileHover:xt(),whileTap:xt(),whileDrag:xt(),whileFocus:xt(),exit:xt()}}function ja(e,t){e.min=t.min,e.max=t.max}function Xe(e,t){ja(e.x,t.x),ja(e.y,t.y)}function Ia(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Ma=1e-4,bh=1-Ma,yh=1+Ma,Aa=.01,xh=0-Aa,vh=0+Aa;function De(e){return e.max-e.min}function wh(e,t,n){return Math.abs(e-t)<=n}function Va(e,t,n,s=.5){e.origin=s,e.originPoint=ve(t.min,t.max,e.origin),e.scale=De(n)/De(t),e.translate=ve(n.min,n.max,e.origin)-e.originPoint,(e.scale>=bh&&e.scale<=yh||isNaN(e.scale))&&(e.scale=1),(e.translate>=xh&&e.translate<=vh||isNaN(e.translate))&&(e.translate=0)}function fn(e,t,n,s){Va(e.x,t.x,n.x,s?s.originX:void 0),Va(e.y,t.y,n.y,s?s.originY:void 0)}function Oa(e,t,n){e.min=n.min+t.min,e.max=e.min+De(t)}function Sh(e,t,n){Oa(e.x,t.x,n.x),Oa(e.y,t.y,n.y)}function La(e,t,n){e.min=t.min-n.min,e.max=e.min+De(t)}function Rn(e,t,n){La(e.x,t.x,n.x),La(e.y,t.y,n.y)}function Da(e,t,n,s,i){return e-=t,e=Dn(e,1/n,s),i!==void 0&&(e=Dn(e,1/i,s)),e}function Th(e,t=0,n=1,s=.5,i,r=e,o=e){if(Ze.test(t)&&(t=parseFloat(t),t=ve(o.min,o.max,t/100)-o.min),typeof t!="number")return;let l=ve(r.min,r.max,s);e===r&&(l-=t),e.min=Da(e.min,t,n,l,i),e.max=Da(e.max,t,n,l,i)}function Ra(e,t,[n,s,i],r,o){Th(e,t[n],t[s],t[i],t.scale,r,o)}const Eh=["x","scaleX","originX"],Ch=["y","scaleY","originY"];function _a(e,t,n,s){Ra(e.x,t,Eh,n?n.x:void 0,s?s.x:void 0),Ra(e.y,t,Ch,n?n.y:void 0,s?s.y:void 0)}function Fa(e){return e.translate===0&&e.scale===1}function $a(e){return Fa(e.x)&&Fa(e.y)}function Ba(e,t){return e.min===t.min&&e.max===t.max}function Nh(e,t){return Ba(e.x,t.x)&&Ba(e.y,t.y)}function za(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Wa(e,t){return za(e.x,t.x)&&za(e.y,t.y)}function Ya(e){return De(e.x)/De(e.y)}function Ua(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function qe(e){return[e("x"),e("y")]}function kh(e,t,n){let s="";const i=e.x.translate/t.x,r=e.y.translate/t.y,o=n?.z||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}px) `),(t.x!==1||t.y!==1)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:f,rotateY:h,skewX:m,skewY:p}=n;u&&(s=`perspective(${u}px) ${s}`),d&&(s+=`rotate(${d}deg) `),f&&(s+=`rotateX(${f}deg) `),h&&(s+=`rotateY(${h}deg) `),m&&(s+=`skewX(${m}deg) `),p&&(s+=`skewY(${p}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(s+=`scale(${l}, ${c})`),s||"none"}const Ha=["TopLeft","TopRight","BottomLeft","BottomRight"],Ph=Ha.length,Xa=e=>typeof e=="string"?parseFloat(e):e,Ga=e=>typeof e=="number"||G.test(e);function jh(e,t,n,s,i,r){i?(e.opacity=ve(0,n.opacity??1,Ih(s)),e.opacityExit=ve(t.opacity??1,0,Mh(s))):r&&(e.opacity=ve(t.opacity??1,n.opacity??1,s));for(let o=0;o<Ph;o++){const l=`border${Ha[o]}Radius`;let c=Ka(t,l),u=Ka(n,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||Ga(c)===Ga(u)?(e[l]=Math.max(ve(Xa(c),Xa(u),s),0),(Ze.test(u)||Ze.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||n.rotate)&&(e.rotate=ve(t.rotate||0,n.rotate||0,s))}function Ka(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Ih=Za(0,.5,$o),Mh=Za(.5,.95,$e);function Za(e,t,n){return s=>s<e?0:s>t?1:n(At(e,t,s))}function qa(e,t,n){const s=je(e)?e:lt(e);return s.start(Ws("",s,t,n)),s.animation}function hn(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}const Ah=(e,t)=>e.depth-t.depth;class Vh{constructor(){this.children=[],this.isDirty=!1}add(t){ls(this.children,t),this.isDirty=!0}remove(t){It(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Ah),this.isDirty=!1,this.children.forEach(t)}}function Oh(e,t){const n=Le.now(),s=({timestamp:i})=>{const r=i-n;r>=t&&(ot(s),e(r-t))};return ge.setup(s,!0),()=>ot(s)}function _n(e){return je(e)?e.get():e}class Lh{constructor(){this.members=[]}add(t){ls(this.members,t);for(let n=this.members.length-1;n>=0;n--){const s=this.members[n];if(s===t||s===this.lead||s===this.prevLead)continue;const i=s.instance;i&&i.isConnected===!1&&s.isPresent!==!1&&!s.snapshot&&It(this.members,s)}t.scheduleRender()}remove(t){if(It(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(i=>t===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const r=this.members[i],o=r.instance;if(r.isPresent!==!1&&(!o||o.isConnected!==!1)){s=r;break}}return s?(this.promote(s),!0):!1}promote(t,n){const s=this.lead;if(t!==s&&(this.prevLead=s,this.lead=t,t.show(),s)){s.instance&&s.scheduleRender(),t.scheduleRender();const i=s.options.layoutDependency,r=t.options.layoutDependency;if(!(i!==void 0&&r!==void 0&&i===r)){const c=s.instance;c&&c.isConnected===!1&&!s.snapshot||(t.resumeFrom=s,n&&(t.resumeFrom.preserveOpacity=!0),s.snapshot&&(t.snapshot=s.snapshot,t.snapshot.latestValues=s.animationValues||s.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0))}const{crossfade:l}=t.options;l===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:s}=t;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Fn={hasAnimatedSinceResize:!0,hasEverUpdated:!1},hi=["","X","Y","Z"],Dh=1e3;let Rh=0;function mi(e,t,n,s){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),s&&(s[e]=0))}function Ja(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Rr(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ge,!(i||r))}const{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&Ja(s)}function Qa({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},l=t?.()){this.id=Rh++,this.animationId=0,this.animationCommitId=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.layoutVersion=0,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($h),this.nodes.forEach(Yh),this.nodes.forEach(Uh),this.nodes.forEach(Bh)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new Vh)}addEventListener(o,l){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new us),this.eventHandlers.get(o).add(l)}notifyListeners(o,...l){const c=this.eventHandlers.get(o);c&&c.notify(...l)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=jn(o)&&!Qr(o),this.instance=o;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||l)&&(this.isLayoutDirty=!0),e){let d,f=0;const h=()=>this.root.updateBlockedByResize=!1;ge.read(()=>{f=window.innerWidth}),e(o,()=>{const m=window.innerWidth;m!==f&&(f=m,this.root.updateBlockedByResize=!0,d&&d(),d=Oh(h,250),Fn.hasAnimatedSinceResize&&(Fn.hasAnimatedSinceResize=!1,this.nodes.forEach(nl)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||Zh,{onLayoutAnimationStart:y,onLayoutAnimationComplete:v}=u.getProps(),x=!this.targetLayout||!Wa(this.targetLayout,m),C=!f&&h;if(this.options.layoutRoot||this.resumeFrom||C||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const N={...zs(p,"layout"),onPlay:y,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(N.delay=0,N.type=!1),this.startAnimation(N),this.setAnimationOrigin(d,C)}else f||nl(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ot(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(Hh),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ja(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(el);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(tl);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Wh),this.nodes.forEach(_h),this.nodes.forEach(Fh)):this.nodes.forEach(tl),this.clearAllSnapshots();const l=Le.now();Ve.delta=Ke(0,1e3/60,l-Ve.timestamp),Ve.timestamp=l,Ve.isProcessing=!0,ms.update.process(Ve),ms.preRender.process(Ve),ms.render.process(Ve),Ve.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ti.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(zh),this.sharedNodes.forEach(Xh)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ge.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ge.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!De(this.snapshot.measuredBox.x)&&!De(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 c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Ee(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(l=!1),l&&this.instance){const c=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!$a(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;o&&this.instance&&(l||yt(this.latestValues)||d)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return o&&(c=this.removeTransform(c)),qh(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return Ee();const l=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Jh))){const{scroll:u}=this.root;u&&(Bt(l.x,u.offset.x),Bt(l.y,u.offset.y))}return l}removeElementScroll(o){const l=Ee();if(Xe(l,o),this.scroll?.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&&Xe(l,o),Bt(l.x,d.offset.x),Bt(l.y,d.offset.y))}return l}applyTransform(o,l=!1){const c=Ee();Xe(c,o);for(let u=0;u<this.path.length;u++){const d=this.path[u];!l&&d.options.layoutScroll&&d.scroll&&d!==d.root&&zt(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),yt(d.latestValues)&&zt(c,d.latestValues)}return yt(this.latestValues)&&zt(c,this.latestValues),c}removeTransform(o){const l=Ee();Xe(l,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!yt(u.latestValues))continue;li(u.latestValues)&&u.updateSnapshot();const d=Ee(),f=u.measurePageBox();Xe(d,f),_a(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return yt(this.latestValues)&&_a(l,this.latestValues),l}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.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!==Ve.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){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(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!this.layout||!(d||f))return;this.resolvedRelativeTargetAt=Ve.timestamp;const h=this.getClosestProjectingParent();h&&this.linkedParentVersion!==h.layoutVersion&&!h.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(h&&h.layout?this.createRelativeTarget(h,this.layout.layoutBox,h.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ee(),this.targetWithTransforms=Ee()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Sh(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Xe(this.target,this.layout.layoutBox),fa(this.target,this.targetDelta)):Xe(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?this.createRelativeTarget(h,this.target,h.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||li(this.parent.latestValues)||ca(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,l,c){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ee(),this.relativeTargetOrigin=Ee(),Rn(this.relativeTargetOrigin,l,c),Xe(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const o=this.getLead(),l=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Ve.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;Xe(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;qf(this.layoutCorrected,this.treeScale,this.path,l),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Ee());const{target:m}=o;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ia(this.prevProjectionDelta.x,this.projectionDelta.x),Ia(this.prevProjectionDelta.y,this.projectionDelta.y)),fn(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!Ua(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ua(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=$t(),this.projectionDelta=$t(),this.projectionDeltaWithTransform=$t()}setAnimationOrigin(o,l=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},f=$t();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const h=Ee(),m=c?c.source:void 0,p=this.layout?this.layout.source:void 0,y=m!==p,v=this.getStack(),x=!v||v.members.length<=1,C=!!(y&&!x&&this.options.crossfade===!0&&!this.path.some(Kh));this.animationProgress=0;let N;this.mixTargetDelta=I=>{const A=I/1e3;sl(f.x,o.x,A),sl(f.y,o.y,A),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Rn(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Gh(this.relativeTarget,this.relativeTargetOrigin,h,A),N&&Nh(this.relativeTarget,N)&&(this.isProjectionDirty=!1),N||(N=Ee()),Xe(N,this.relativeTarget)),y&&(this.animationValues=d,jh(d,u,this.latestValues,A,C,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=A},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(ot(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ge.update(()=>{Fn.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=lt(0)),this.motionValue.jump(0,!1),this.currentAnimation=qa(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:l=>{this.mixTargetDelta(l),o.onUpdate&&o.onUpdate(l)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.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 o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Dh),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:d}=o;if(!(!l||!c||!u)){if(this!==o&&this.layout&&u&&ll(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||Ee();const f=De(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+f;const h=De(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+h}Xe(l,c),zt(l,d),fn(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(o,l){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Lh),this.sharedNodes.get(o).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let l=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&mi("z",o,u,this.animationValues);for(let d=0;d<hi.length;d++)mi(`rotate${hi[d]}`,o,u,this.animationValues),mi(`skew${hi[d]}`,o,u,this.animationValues);o.render();for(const d in u)o.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);o.scheduleRender()}applyProjectionStyles(o,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=_n(l?.pointerEvents)||"",o.transform=c?c(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=_n(l?.pointerEvents)||""),this.hasProjected&&!yt(this.latestValues)&&(o.transform=c?c({},""):"none",this.hasProjected=!1);return}o.visibility="";const d=u.animationValues||u.latestValues;this.applyTransformsToTarget();let f=kh(this.projectionDeltaWithTransform,this.treeScale,d);c&&(f=c(d,f)),o.transform=f;const{x:h,y:m}=this.projectionDelta;o.transformOrigin=`${h.origin*100}% ${m.origin*100}% 0`,u.animationValues?o.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:o.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const p in di){if(d[p]===void 0)continue;const{correct:y,applyTo:v,isCSSVariable:x}=di[p],C=f==="none"?d[p]:y(d[p],u);if(v){const N=v.length;for(let I=0;I<N;I++)o[v[I]]=C}else x?this.options.visualElement.renderState.vars[p]=C:o[p]=C}this.options.layoutId&&(o.pointerEvents=u===this?_n(l?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(el),this.root.sharedNodes.clear()}}}function _h(e){e.updateLayout()}function Fh(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=e.layout,{animationType:i}=e.options,r=t.source!==e.layout.source;i==="size"?qe(d=>{const f=r?t.measuredBox[d]:t.layoutBox[d],h=De(f);f.min=n[d].min,f.max=f.min+h}):ll(i,t.layoutBox,n)&&qe(d=>{const f=r?t.measuredBox[d]:t.layoutBox[d],h=De(n[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const o=$t();fn(o,n,t.layoutBox);const l=$t();r?fn(l,e.applyTransform(s,!0),t.measuredBox):fn(l,n,t.layoutBox);const c=!$a(o);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const m=Ee();Rn(m,t.layoutBox,f.layoutBox);const p=Ee();Rn(p,n,h.layoutBox),Wa(m,p)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=p,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:l,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function $h(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 Bh(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function zh(e){e.clearSnapshot()}function el(e){e.clearMeasurements()}function tl(e){e.isLayoutDirty=!1}function Wh(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function nl(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Yh(e){e.resolveTargetDelta()}function Uh(e){e.calcProjection()}function Hh(e){e.resetSkewAndRotation()}function Xh(e){e.removeLeadSnapshot()}function sl(e,t,n){e.translate=ve(t.translate,0,n),e.scale=ve(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function il(e,t,n,s){e.min=ve(t.min,n.min,s),e.max=ve(t.max,n.max,s)}function Gh(e,t,n,s){il(e.x,t.x,n.x,s),il(e.y,t.y,n.y,s)}function Kh(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Zh={duration:.45,ease:[.4,0,.1,1]},ol=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),rl=ol("applewebkit/")&&!ol("chrome/")?Math.round:$e;function al(e){e.min=rl(e.min),e.max=rl(e.max)}function qh(e){al(e.x),al(e.y)}function ll(e,t,n){return e==="position"||e==="preserve-aspect"&&!wh(Ya(t),Ya(n),.2)}function Jh(e){return e!==e.root&&e.scroll?.wasRoot}const Qh=Qa({attachResizeListener:(e,t)=>hn(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),pi={current:void 0},cl=Qa({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!pi.current){const e=new Qh({});e.mount(window),e.setOptions({layoutScroll:!0}),pi.current=e}return pi.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),$n=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function ul(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function e0(...e){return t=>{let n=!1;const s=e.map(i=>{const r=ul(i,t);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let i=0;i<s.length;i++){const r=s[i];typeof r=="function"?r():ul(e[i],null)}}}}function t0(...e){return g.useCallback(e0(...e),e)}class n0 extends g.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const s=n.offsetParent,i=ei(s)&&s.offsetWidth||0,r=ei(s)&&s.offsetHeight||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=i-o.width-o.left,o.bottom=r-o.height-o.top}return null}componentDidUpdate(){}render(){return this.props.children}}function s0({children:e,isPresent:t,anchorX:n,anchorY:s,root:i,pop:r}){const o=b.useId(),l=b.useRef(null),c=b.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=b.useContext($n),d=e.props?.ref??e?.ref,f=t0(l,d);return b.useInsertionEffect(()=>{const{width:h,height:m,top:p,left:y,right:v,bottom:x}=c.current;if(t||r===!1||!l.current||!h||!m)return;const C=n==="left"?`left: ${y}`:`right: ${v}`,N=s==="bottom"?`bottom: ${x}`:`top: ${p}`;l.current.dataset.motionPopId=o;const I=document.createElement("style");u&&(I.nonce=u);const A=i??document.head;return A.appendChild(I),I.sheet&&I.sheet.insertRule(`
6
+ <%s key={someKey} {...props} />`,ae,re,ge,re),M[re+ae]=!0)}if(re=null,ne!==void 0&&(n(ne),re=""+ne),o(O)&&(n(O.key),re=""+O.key),"key"in O){ne={};for(var ue in O)ue!=="key"&&(ne[ue]=O[ue])}else ne=O;return re&&l(ne,typeof T=="function"?T.displayName||T.name||"Unknown":T),u(T,re,ne,i(),ie,le)}function f(T){h(T)?T._store&&(T._store.validated=1):typeof T=="object"&&T!==null&&T.$$typeof===j&&(T._payload.status==="fulfilled"?h(T._payload.value)&&T._payload.value._store&&(T._payload.value._store.validated=1):T._store&&(T._store.validated=1))}function h(T){return typeof T=="object"&&T!==null&&T.$$typeof===p}var m=b,p=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),I=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),z=Symbol.for("react.client.reference"),Q=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R=Object.prototype.hasOwnProperty,se=Array.isArray,U=console.createTask?console.createTask:function(){return null};m={react_stack_bottom_frame:function(T){return T()}};var J,V={},P=m.react_stack_bottom_frame.bind(m,r)(),_=U(s(r)),M={};Qt.Fragment=v,Qt.jsx=function(T,O,ne){var ae=1e4>Q.recentlyCreatedOwnerStacks++;return d(T,O,ne,!1,ae?Error("react-stack-top-frame"):P,ae?U(s(T)):_)},Qt.jsxs=function(T,O,ne){var ae=1e4>Q.recentlyCreatedOwnerStacks++;return d(T,O,ne,!0,ae?Error("react-stack-top-frame"):P,ae?U(s(T)):_)}})()),Qt}var Co;function Cu(){return Co||(Co=1,process.env.NODE_ENV==="production"?wn.exports=Tu():wn.exports=Eu()),wn.exports}var a=Cu();const as=b.createContext({});function Sn(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const No=typeof window<"u",ko=No?b.useLayoutEffect:b.useEffect,en=b.createContext(null);function ls(e,t){e.indexOf(t)===-1&&e.push(t)}function Mt(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Ze=(e,t,n)=>n>t?t:n<e?e:n;function cs(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let At=()=>{},Ue=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(At=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(cs(t,n))},Ue=(e,t,n)=>{if(!e)throw new Error(cs(t,n))});const tt={},Po=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function jo(e){return typeof e=="object"&&e!==null}const Io=e=>/^0[^.\s]+$/u.test(e);function Mo(e){let t;return()=>(t===void 0&&(t=e()),t)}const Be=e=>e,Nu=(e,t)=>n=>t(e(n)),tn=(...e)=>e.reduce(Nu),Vt=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s};class us{constructor(){this.subscriptions=[]}add(t){return ls(this.subscriptions,t),()=>Mt(this.subscriptions,t)}notify(t,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,s);else for(let r=0;r<i;r++){const o=this.subscriptions[r];o&&o(t,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Fe=e=>e*1e3,ze=e=>e/1e3;function Ao(e,t){return t?e*(1e3/t):0}const Vo=new Set;function ds(e,t,n){e||Vo.has(t)||(console.warn(cs(t,n)),Vo.add(t))}const ku=(e,t,n)=>{const s=t-e;return((n-e)%s+s)%s+e},Oo=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Pu=1e-7,ju=12;function Iu(e,t,n,s,i){let r,o,l=0;do o=t+(n-t)/2,r=Oo(o,s,i)-e,r>0?n=o:t=o;while(Math.abs(r)>Pu&&++l<ju);return o}function nn(e,t,n,s){if(e===t&&n===s)return Be;const i=r=>Iu(r,0,1,e,n);return r=>r===0||r===1?r:Oo(i(r),t,s)}const Lo=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Do=e=>t=>1-e(1-t),Ro=nn(.33,1.53,.69,.99),fs=Do(Ro),_o=Lo(fs),Fo=e=>(e*=2)<1?.5*fs(e):.5*(2-Math.pow(2,-10*(e-1))),hs=e=>1-Math.sin(Math.acos(e)),$o=Do(hs),Bo=Lo(hs),Mu=nn(.42,0,1,1),Au=nn(0,0,.58,1),zo=nn(.42,0,.58,1),Wo=e=>Array.isArray(e)&&typeof e[0]!="number";function Yo(e,t){return Wo(e)?e[ku(0,e.length,t)]:e}const Uo=e=>Array.isArray(e)&&typeof e[0]=="number",Ho={linear:Be,easeIn:Mu,easeInOut:zo,easeOut:Au,circIn:hs,circInOut:Bo,circOut:$o,backIn:fs,backInOut:_o,backOut:Ro,anticipate:Fo},Vu=e=>typeof e=="string",Xo=e=>{if(Uo(e)){Ue(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,s,i]=e;return nn(t,n,s,i)}else if(Vu(e))return Ue(Ho[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Ho[e];return e},Tn=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Ou(e,t){let n=new Set,s=new Set,i=!1,r=!1;const o=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1};function c(d){o.has(d)&&(u.schedule(d),e()),d(l)}const u={schedule:(d,f=!1,h=!1)=>{const p=h&&i?n:s;return f&&o.add(d),p.has(d)||p.add(d),d},cancel:d=>{s.delete(d),o.delete(d)},process:d=>{if(l=d,i){r=!0;return}i=!0,[n,s]=[s,n],n.forEach(c),n.clear(),i=!1,r&&(r=!1,u.process(d))}};return u}const Lu=40;function Go(e,t){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Tn.reduce((N,I)=>(N[I]=Ou(r),N),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:d,update:f,preRender:h,render:m,postRender:p}=o,y=()=>{const N=tt.useManualTiming?i.timestamp:performance.now();n=!1,tt.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(N-i.timestamp,Lu),1)),i.timestamp=N,i.isProcessing=!0,l.process(i),c.process(i),u.process(i),d.process(i),f.process(i),h.process(i),m.process(i),p.process(i),i.isProcessing=!1,n&&t&&(s=!1,e(y))},v=()=>{n=!0,s=!0,i.isProcessing||e(y)};return{schedule:Tn.reduce((N,I)=>{const A=o[I];return N[I]=(k,E=!1,w=!1)=>(n||v(),A.schedule(k,E,w)),N},{}),cancel:N=>{for(let I=0;I<Tn.length;I++)o[Tn[I]].cancel(N)},state:i,steps:o}}const{schedule:ye,cancel:rt,state:Ae,steps:ms}=Go(typeof requestAnimationFrame<"u"?requestAnimationFrame:Be,!0);let En;function Du(){En=void 0}const Le={now:()=>(En===void 0&&Le.set(Ae.isProcessing||tt.useManualTiming?Ae.timestamp:performance.now()),En),set:e=>{En=e,queueMicrotask(Du)}},Ko=e=>t=>typeof t=="string"&&t.startsWith(e),Zo=Ko("--"),Ru=Ko("var(--"),ps=e=>Ru(e)?_u.test(e.split("/*")[0].trim()):!1,_u=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function qo(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Ot={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},sn={...Ot,transform:e=>Ze(0,1,e)},Cn={...Ot,default:1},on=e=>Math.round(e*1e5)/1e5,gs=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Fu(e){return e==null}const $u=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,bs=(e,t)=>n=>!!(typeof n=="string"&&$u.test(n)&&n.startsWith(e)||t&&!Fu(n)&&Object.prototype.hasOwnProperty.call(n,t)),Jo=(e,t,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,l]=s.match(gs);return{[e]:parseFloat(i),[t]:parseFloat(r),[n]:parseFloat(o),alpha:l!==void 0?parseFloat(l):1}},Bu=e=>Ze(0,255,e),ys={...Ot,transform:e=>Math.round(Bu(e))},gt={test:bs("rgb","red"),parse:Jo("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+ys.transform(e)+", "+ys.transform(t)+", "+ys.transform(n)+", "+on(sn.transform(s))+")"};function zu(e){let t="",n="",s="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,s+=s,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const xs={test:bs("#"),parse:zu,transform:gt.transform},rn=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),at=rn("deg"),qe=rn("%"),G=rn("px"),Wu=rn("vh"),Yu=rn("vw"),Qo={...qe,parse:e=>qe.parse(e)/100,transform:e=>qe.transform(e*100)},Lt={test:bs("hsl","hue"),parse:Jo("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+qe.transform(on(t))+", "+qe.transform(on(n))+", "+on(sn.transform(s))+")"},Te={test:e=>gt.test(e)||xs.test(e)||Lt.test(e),parse:e=>gt.test(e)?gt.parse(e):Lt.test(e)?Lt.parse(e):xs.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?gt.transform(e):Lt.transform(e),getAnimatableNone:e=>{const t=Te.parse(e);return t.alpha=0,Te.transform(t)}},Uu=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Hu(e){return isNaN(e)&&typeof e=="string"&&(e.match(gs)?.length||0)+(e.match(Uu)?.length||0)>0}const er="number",tr="color",Xu="var",Gu="var(",nr="${}",Ku=/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 an(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const l=t.replace(Ku,c=>(Te.test(c)?(s.color.push(r),i.push(tr),n.push(Te.parse(c))):c.startsWith(Gu)?(s.var.push(r),i.push(Xu),n.push(c)):(s.number.push(r),i.push(er),n.push(parseFloat(c))),++r,nr)).split(nr);return{values:n,split:l,indexes:s,types:i}}function sr(e){return an(e).values}function ir(e){const{split:t,types:n}=an(e),s=t.length;return i=>{let r="";for(let o=0;o<s;o++)if(r+=t[o],i[o]!==void 0){const l=n[o];l===er?r+=on(i[o]):l===tr?r+=Te.transform(i[o]):r+=i[o]}return r}}const Zu=e=>typeof e=="number"?0:Te.test(e)?Te.getAnimatableNone(e):e;function qu(e){const t=sr(e);return ir(e)(t.map(Zu))}const He={test:Hu,parse:sr,createTransformer:ir,getAnimatableNone:qu};function vs(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:s}){e/=360,t/=100,n/=100;let i=0,r=0,o=0;if(!t)i=r=o=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;i=vs(c,l,e+1/3),r=vs(c,l,e),o=vs(c,l,e-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function Nn(e,t){return n=>n>0?t:e}const ve=(e,t,n)=>e+(t-e)*n,ws=(e,t,n)=>{const s=e*e,i=n*(t*t-s)+s;return i<0?0:Math.sqrt(i)},Qu=[xs,gt,Lt],ed=e=>Qu.find(t=>t.test(e));function or(e){const t=ed(e);if(At(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Lt&&(n=Ju(n)),n}const rr=(e,t)=>{const n=or(e),s=or(t);if(!n||!s)return Nn(e,t);const i={...n};return r=>(i.red=ws(n.red,s.red,r),i.green=ws(n.green,s.green,r),i.blue=ws(n.blue,s.blue,r),i.alpha=ve(n.alpha,s.alpha,r),gt.transform(i))},Ss=new Set(["none","hidden"]);function td(e,t){return Ss.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function nd(e,t){return n=>ve(e,t,n)}function Ts(e){return typeof e=="number"?nd:typeof e=="string"?ps(e)?Nn:Te.test(e)?rr:od:Array.isArray(e)?ar:typeof e=="object"?Te.test(e)?rr:sd:Nn}function ar(e,t){const n=[...e],s=n.length,i=e.map((r,o)=>Ts(r)(r,t[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function sd(e,t){const n={...e,...t},s={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(s[i]=Ts(e[i])(e[i],t[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function id(e,t){const n=[],s={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const r=t.types[i],o=e.indexes[r][s[r]],l=e.values[o]??0;n[i]=l,s[r]++}return n}const od=(e,t)=>{const n=He.createTransformer(t),s=an(e),i=an(t);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?Ss.has(e)&&!i.values.length||Ss.has(t)&&!s.values.length?td(e,t):tn(ar(id(s,i),i.values),n):(At(!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.`,"complex-values-different"),Nn(e,t))};function lr(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ve(e,t,n):Ts(e)(e,t)}const rd=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ye.update(t,n),stop:()=>rt(t),now:()=>Ae.isProcessing?Ae.timestamp:Le.now()}},cr=(e,t,n=10)=>{let s="";const i=Math.max(Math.round(t/n),2);for(let r=0;r<i;r++)s+=Math.round(e(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},kn=2e4;function Es(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<kn;)t+=n,s=e.next(t);return t>=kn?1/0:t}function ur(e,t=100,n){const s=n({...e,keyframes:[0,t]}),i=Math.min(Es(s),kn);return{type:"keyframes",ease:r=>s.next(i*r).value/t,duration:ze(i)}}const ad=5;function dr(e,t,n){const s=Math.max(t-ad,0);return Ao(n-e(s),t-s)}const we={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},Cs=.001;function ld({duration:e=we.duration,bounce:t=we.bounce,velocity:n=we.velocity,mass:s=we.mass}){let i,r;At(e<=Fe(we.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=Ze(we.minDamping,we.maxDamping,o),e=Ze(we.minDuration,we.maxDuration,ze(e)),o<1?(i=u=>{const d=u*o,f=d*e,h=d-n,m=Ns(u,o),p=Math.exp(-f);return Cs-h/m*p},r=u=>{const f=u*o*e,h=f*n+n,m=Math.pow(o,2)*Math.pow(u,2)*e,p=Math.exp(-f),y=Ns(Math.pow(u,2),o);return(-i(u)+Cs>0?-1:1)*((h-m)*p)/y}):(i=u=>{const d=Math.exp(-u*e),f=(u-n)*e+1;return-Cs+d*f},r=u=>{const d=Math.exp(-u*e),f=(n-u)*(e*e);return d*f});const l=5/e,c=ud(i,r,l);if(e=Fe(e),isNaN(c))return{stiffness:we.stiffness,damping:we.damping,duration:e};{const u=Math.pow(c,2)*s;return{stiffness:u,damping:o*2*Math.sqrt(s*u),duration:e}}}const cd=12;function ud(e,t,n){let s=n;for(let i=1;i<cd;i++)s=s-e(s)/t(s);return s}function Ns(e,t){return e*Math.sqrt(1-t*t)}const dd=["duration","bounce"],fd=["stiffness","damping","mass"];function fr(e,t){return t.some(n=>e[n]!==void 0)}function hd(e){let t={velocity:we.velocity,stiffness:we.stiffness,damping:we.damping,mass:we.mass,isResolvedFromDuration:!1,...e};if(!fr(e,fd)&&fr(e,dd))if(e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*Ze(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:we.mass,stiffness:i,damping:r}}else{const n=ld(e);t={...t,...n,mass:we.mass},t.isResolvedFromDuration=!0}return t}function ln(e=we.visualDuration,t=we.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],l={done:!1,value:r},{stiffness:c,damping:u,mass:d,duration:f,velocity:h,isResolvedFromDuration:m}=hd({...n,velocity:-ze(n.velocity||0)}),p=h||0,y=u/(2*Math.sqrt(c*d)),v=o-r,x=ze(Math.sqrt(c/d)),C=Math.abs(v)<5;s||(s=C?we.restSpeed.granular:we.restSpeed.default),i||(i=C?we.restDelta.granular:we.restDelta.default);let N;if(y<1){const A=Ns(x,y);N=k=>{const E=Math.exp(-y*x*k);return o-E*((p+y*x*v)/A*Math.sin(A*k)+v*Math.cos(A*k))}}else if(y===1)N=A=>o-Math.exp(-x*A)*(v+(p+x*v)*A);else{const A=x*Math.sqrt(y*y-1);N=k=>{const E=Math.exp(-y*x*k),w=Math.min(A*k,300);return o-E*((p+y*x*v)*Math.sinh(w)+A*v*Math.cosh(w))/A}}const I={calculatedDuration:m&&f||null,next:A=>{const k=N(A);if(m)l.done=A>=f;else{let E=A===0?p:0;y<1&&(E=A===0?Fe(p):dr(N,A,k));const w=Math.abs(E)<=s,j=Math.abs(o-k)<=i;l.done=w&&j}return l.value=l.done?o:k,l},toString:()=>{const A=Math.min(Es(I),kn),k=cr(E=>I.next(A*E).value,A,30);return A+"ms "+k},toTransition:()=>{}};return I}ln.applyToOptions=e=>{const t=ur(e,100,ln);return e.ease=t.ease,e.duration=Fe(t.duration),e.type="keyframes",e};function ks({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:l,max:c,restDelta:u=.5,restSpeed:d}){const f=e[0],h={done:!1,value:f},m=w=>l!==void 0&&w<l||c!==void 0&&w>c,p=w=>l===void 0?c:c===void 0||Math.abs(l-w)<Math.abs(c-w)?l:c;let y=n*t;const v=f+y,x=o===void 0?v:o(v);x!==v&&(y=x-f);const C=w=>-y*Math.exp(-w/s),N=w=>x+C(w),I=w=>{const j=C(w),$=N(w);h.done=Math.abs(j)<=u,h.value=h.done?x:$};let A,k;const E=w=>{m(h.value)&&(A=w,k=ln({keyframes:[h.value,p(h.value)],velocity:dr(N,w,h.value),damping:i,stiffness:r,restDelta:u,restSpeed:d}))};return E(0),{calculatedDuration:null,next:w=>{let j=!1;return!k&&A===void 0&&(j=!0,I(w),E(w)),A!==void 0&&w>=A?k.next(w-A):(!j&&I(w),h)}}}function md(e,t,n){const s=[],i=n||tt.mix||lr,r=e.length-1;for(let o=0;o<r;o++){let l=i(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||Be:t;l=tn(c,l)}s.push(l)}return s}function pd(e,t,{clamp:n=!0,ease:s,mixer:i}={}){const r=e.length;if(Ue(r===t.length,"Both input and output ranges must be the same length","range-length"),r===1)return()=>t[0];if(r===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[r-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=md(t,s,i),c=l.length,u=d=>{if(o&&d<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(d<e[f+1]);f++);const h=Vt(e[f],e[f+1],d);return l[f](h)};return n?d=>u(Ze(e[0],e[r-1],d)):u}function hr(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const i=Vt(0,t,s);e.push(ve(n,1,i))}}function mr(e){const t=[0];return hr(t,e.length-1),t}function gd(e,t){return e.map(n=>n*t)}function bd(e,t){return e.map(()=>t||zo).splice(0,e.length-1)}function Dt({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const i=Wo(s)?s.map(Xo):Xo(s),r={done:!1,value:t[0]},o=gd(n&&n.length===t.length?n:mr(t),e),l=pd(o,t,{ease:Array.isArray(i)?i:bd(t,i)});return{calculatedDuration:e,next:c=>(r.value=l(c),r.done=c>=e,r)}}const yd=e=>e!==null;function Ps(e,{repeat:t,repeatType:n="loop"},s,i=1){const r=e.filter(yd),l=i<0||t&&n!=="loop"&&t%2===1?0:r.length-1;return!l||s===void 0?r[l]:s}const xd={decay:ks,inertia:ks,tween:Dt,keyframes:Dt,spring:ln};function pr(e){typeof e.type=="string"&&(e.type=xd[e.type])}class js{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const vd=e=>e/100;class Is extends js{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==Le.now()&&this.tick(Le.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;pr(t);const{type:n=Dt,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=t;let{keyframes:l}=t;const c=n||Dt;process.env.NODE_ENV!=="production"&&c!==Dt&&Ue(l.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${l}`,"spring-two-frames"),c!==Dt&&typeof l[0]!="number"&&(this.mixKeyframes=tn(vd,lr(l[0],l[1])),l=[0,100]);const u=c({...t,keyframes:l});r==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...l].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=Es(u));const{calculatedDuration:d}=u;this.calculatedDuration=d,this.resolvedDuration=d+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:s,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:l,calculatedDuration:c}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:d,repeat:f,repeatType:h,repeatDelay:m,type:p,onUpdate:y,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const x=this.currentTime-u*(this.playbackSpeed>=0?1:-1),C=this.playbackSpeed>=0?x<0:x>i;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let N=this.currentTime,I=s;if(f){const w=Math.min(this.currentTime,i)/l;let j=Math.floor(w),$=w%1;!$&&w>=1&&($=1),$===1&&j--,j=Math.min(j,f+1),j%2&&(h==="reverse"?($=1-$,m&&($-=m/l)):h==="mirror"&&(I=o)),N=Ze(0,1,$)*l}const A=C?{done:!1,value:d[0]}:I.next(N);r&&(A.value=r(A.value));let{done:k}=A;!C&&c!==null&&(k=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&k);return E&&p!==ks&&(A.value=Ps(d,this.options,v,this.speed)),y&&y(A.value),E&&this.finish(),A}then(t,n){return this.finished.then(t,n)}get duration(){return ze(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ze(t)}get time(){return ze(this.currentTime)}set time(t){t=Fe(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Le.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ze(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=rd,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Le.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function wd(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const bt=e=>e*180/Math.PI,Ms=e=>{const t=bt(Math.atan2(e[1],e[0]));return As(t)},Sd={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Ms,rotateZ:Ms,skewX:e=>bt(Math.atan(e[1])),skewY:e=>bt(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},As=e=>(e=e%360,e<0&&(e+=360),e),gr=Ms,br=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),yr=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Td={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:br,scaleY:yr,scale:e=>(br(e)+yr(e))/2,rotateX:e=>As(bt(Math.atan2(e[6],e[5]))),rotateY:e=>As(bt(Math.atan2(-e[2],e[0]))),rotateZ:gr,rotate:gr,skewX:e=>bt(Math.atan(e[4])),skewY:e=>bt(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Vs(e){return e.includes("scale")?1:0}function Os(e,t){if(!e||e==="none")return Vs(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Td,i=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Sd,i=l}if(!i)return Vs(t);const r=s[t],o=i[1].split(",").map(Cd);return typeof r=="function"?r(o):o[r]}const Ed=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Os(n,t)};function Cd(e){return parseFloat(e.trim())}const Rt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],_t=new Set(Rt),xr=e=>e===Ot||e===G,Nd=new Set(["x","y","z"]),kd=Rt.filter(e=>!Nd.has(e));function Pd(e){const t=[];return kd.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const lt={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})=>Os(t,"x"),y:(e,{transform:t})=>Os(t,"y")};lt.translateX=lt.x,lt.translateY=lt.y;const yt=new Set;let Ls=!1,Ds=!1,Rs=!1;function vr(){if(Ds){const e=Array.from(yt).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const i=Pd(s);i.length&&(n.set(s,i),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,o])=>{s.getValue(r)?.set(o)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Ds=!1,Ls=!1,yt.forEach(e=>e.complete(Rs)),yt.clear()}function wr(){yt.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ds=!0)})}function jd(){Rs=!0,wr(),vr(),Rs=!1}class _s{constructor(t,n,s,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(yt.add(this),Ls||(Ls=!0,ye.read(wr),ye.resolveKeyframes(vr))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:i}=this;if(t[0]===null){const r=i?.get(),o=t[t.length-1];if(r!==void 0)t[0]=r;else if(s&&n){const l=s.readValue(n,o);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=o),i&&r===void 0&&i.set(t[0])}wd(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),yt.delete(this)}cancel(){this.state==="scheduled"&&(yt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Id=e=>e.startsWith("--");function Md(e,t,n){Id(t)?e.style.setProperty(t,n):e.style[t]=n}const Ad={};function Sr(e,t){const n=Mo(e);return()=>Ad[t]??n()}const Vd=Sr(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Tr=Sr(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),cn=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,Er={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:cn([0,.65,.55,1]),circOut:cn([.55,0,1,.45]),backIn:cn([.31,.01,.66,-.59]),backOut:cn([.33,1.53,.69,.99])};function Cr(e,t){if(e)return typeof e=="function"?Tr()?cr(e,t):"ease-out":Uo(e)?cn(e):Array.isArray(e)?e.map(n=>Cr(n,t)||Er.easeOut):Er[e]}function Od(e,t,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:l="easeOut",times:c}={},u=void 0){const d={[t]:n};c&&(d.offset=c);const f=Cr(l,i);Array.isArray(f)&&(d.easing=f);const h={delay:s,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return u&&(h.pseudoElement=u),e.animate(d,h)}function Fs(e){return typeof e=="function"&&"applyToOptions"in e}function Ld({type:e,...t}){return Fs(e)&&Tr()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Nr extends js{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:l,onComplete:c}=t;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=t,Ue(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=Ld(t);this.animation=Od(n,s,i,u,r),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const d=Ps(i,this.options,l,this.speed);this.updateMotionValue?this.updateMotionValue(d):Md(n,s,d),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return ze(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ze(t)}get time(){return ze(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Fe(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Vd()?(this.animation.timeline=t,Be):n(this)}}const kr={anticipate:Fo,backInOut:_o,circInOut:Bo};function Dd(e){return e in kr}function Rd(e){typeof e.ease=="string"&&Dd(e.ease)&&(e.ease=kr[e.ease])}const $s=10;class _d extends Nr{constructor(t){Rd(t),pr(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const l=new Is({...o,autoplay:!1}),c=Math.max($s,Le.now()-this.startTime),u=Ze(0,$s,c-$s);n.setWithVelocity(l.sample(Math.max(0,c-u)).value,l.sample(c).value,u),l.stop()}}const Pr=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(He.test(e)||e==="0")&&!e.startsWith("url("));function Fd(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 $d(e,t,n,s){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const r=e[e.length-1],o=Pr(i,t),l=Pr(r,t);return At(o===l,`You are trying to animate ${t} from "${i}" to "${r}". "${o?r:i}" is not an animatable value.`,"value-not-animatable"),!o||!l?!1:Fd(e)||(n==="spring"||Fs(n))&&s}function Bs(e){e.duration=0,e.type="keyframes"}const Bd=new Set(["opacity","clipPath","filter","transform"]),zd=Mo(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Wd(e){const{motionValue:t,name:n,repeatDelay:s,repeatType:i,damping:r,type:o}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=t.owner.getProps();return zd()&&n&&Bd.has(n)&&(n!=="transform"||!u)&&!c&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const Yd=40;class Ud extends js{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:l,name:c,motionValue:u,element:d,...f}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Le.now();const h={autoplay:t,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:c,motionValue:u,element:d,...f},m=d?.KeyframeResolver||_s;this.keyframeResolver=new m(l,(p,y,v)=>this.onKeyframesResolved(p,y,h,!v),c,u,d),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,s,i){this.keyframeResolver=void 0;const{name:r,type:o,velocity:l,delay:c,isHandoff:u,onUpdate:d}=s;this.resolvedAt=Le.now(),$d(t,r,o,l)||((tt.instantAnimations||!c)&&d?.(Ps(t,s,n)),t[0]=t[t.length-1],Bs(s),s.repeat=0);const h={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Yd?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:t},m=!u&&Wd(h),p=h.motionValue?.owner?.current,y=m?new _d({...h,element:p}):new Is(h);y.finished.then(()=>{this.notifyFinished()}).catch(Be),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),jd()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class Hd{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let s=0;s<this.animations.length;s++)this.animations[s][t]=n}attachTimeline(t){const n=this.animations.map(s=>s.attachTimeline(t));return()=>{n.forEach((s,i)=>{s&&s(),this.animations[i].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 state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return jr(this.animations,"duration")}get iterationDuration(){return jr(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function jr(e,t){let n=0;for(let s=0;s<e.length;s++){const i=e[s][t];i!==null&&i>n&&(n=i)}return n}class Xd extends Hd{then(t,n){return this.finished.finally(t).then(()=>{})}}function Ir(e,t,n,s=0,i=1){const r=Array.from(e).sort((u,d)=>u.sortNodePosition(d)).indexOf(t),o=e.size,l=(o-1)*s;return typeof n=="function"?n(r,o):i===1?r*s:l-r*s}const Gd=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Kd(e){const t=Gd.exec(e);if(!t)return[,];const[,n,s,i]=t;return[`--${n??s}`,i]}const Zd=4;function Mr(e,t,n=1){Ue(n<=Zd,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=Kd(e);if(!s)return;const r=window.getComputedStyle(t).getPropertyValue(s);if(r){const o=r.trim();return Po(o)?parseFloat(o):o}return ps(i)?Mr(i,t,n+1):i}const qd={type:"spring",stiffness:500,damping:25,restSpeed:10},Jd=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Qd={type:"keyframes",duration:.8},ef={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},tf=(e,{keyframes:t})=>t.length>2?Qd:_t.has(e)?e.startsWith("scale")?Jd(t[1]):qd:ef,nf=e=>e!==null;function sf(e,{repeat:t,repeatType:n="loop"},s){const i=e.filter(nf),r=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[r]}function Ar(e,t){if(e?.inherit&&t){const{inherit:n,...s}=e;return{...t,...s}}return e}function zs(e,t){const n=e?.[t]??e?.default??e;return n!==e?Ar(n,e):n}function of({when:e,delay:t,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:l,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const Ws=(e,t,n,s={},i,r)=>o=>{const l=zs(s,e)||{},c=l.delay||s.delay||0;let{elapsed:u=0}=s;u=u-Fe(c);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:h=>{t.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:r?void 0:i};of(l)||Object.assign(d,tf(e,d)),d.duration&&(d.duration=Fe(d.duration)),d.repeatDelay&&(d.repeatDelay=Fe(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(Bs(d),d.delay===0&&(f=!0)),(tt.instantAnimations||tt.skipAnimations||i?.shouldSkipAnimations)&&(f=!0,Bs(d),d.delay=0),d.allowFlatten=!l.type&&!l.ease,f&&!r&&t.get()!==void 0){const h=sf(d.keyframes,l);if(h!==void 0){ye.update(()=>{d.onUpdate(h),d.onComplete()});return}}return l.isSync?new Is(d):new Ud(d)};function Vr(e){const t=[{},{}];return e?.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function Ys(e,t,n,s){if(typeof t=="function"){const[i,r]=Vr(s);t=t(n!==void 0?n:e.custom,i,r)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,r]=Vr(s);t=t(n!==void 0?n:e.custom,i,r)}return t}function Ft(e,t,n){const s=e.getProps();return Ys(s,t,n!==void 0?n:s.custom,e)}const Or=new Set(["width","height","top","left","right","bottom",...Rt]),Lr=30,rf=e=>!isNaN(parseFloat(e));class af{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=Le.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Le.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=rf(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&ds(!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 us);const s=this.events[t].add(n);return t==="change"?()=>{s(),ye.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Le.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Lr)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Lr);return Ao(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.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ct(e,t){return new af(e,t)}const Us=e=>Array.isArray(e);function lf(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ct(n))}function cf(e){return Us(e)?e[e.length-1]||0:e}function uf(e,t){const n=Ft(e,t);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const l=cf(r[o]);lf(e,o,l)}}const ke=e=>!!(e&&e.getVelocity);function df(e){return!!(ke(e)&&e.add)}function Hs(e,t){const n=e.getValue("willChange");if(df(n))return n.add(t);if(!n&&tt.WillChange){const s=new tt.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function Xs(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Dr="data-"+Xs("framerAppearId");function Rr(e){return e.props[Dr]}function ff({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function Gs(e,t,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r,transitionEnd:o,...l}=t;const c=e.getDefaultTransition();r=r?Ar(r,c):c;const u=r?.reduceMotion;s&&(r=s);const d=[],f=i&&e.animationState&&e.animationState.getState()[i];for(const h in l){const m=e.getValue(h,e.latestValues[h]??null),p=l[h];if(p===void 0||f&&ff(f,h))continue;const y={delay:n,...zs(r||{},h)},v=m.get();if(v!==void 0&&!m.isAnimating&&!Array.isArray(p)&&p===v&&!y.velocity)continue;let x=!1;if(window.MotionHandoffAnimation){const I=Rr(e);if(I){const A=window.MotionHandoffAnimation(I,h,ye);A!==null&&(y.startTime=A,x=!0)}}Hs(e,h);const C=u??e.shouldReduceMotion;m.start(Ws(h,m,p,C&&Or.has(h)?{type:!1}:y,e,x));const N=m.animation;N&&d.push(N)}if(o){const h=()=>ye.update(()=>{o&&uf(e,o)});d.length?Promise.all(d).then(h):h()}return d}function Ks(e,t,n={}){const s=Ft(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Promise.all(Gs(e,s,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=i;return hf(e,t,c,u,d,f,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,u]=l==="beforeChildren"?[r,o]:[o,r];return c().then(()=>u())}else return Promise.all([r(),o(n.delay)])}function hf(e,t,n=0,s=0,i=0,r=1,o){const l=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),l.push(Ks(c,t,{...o,delay:n+(typeof s=="function"?0:s)+Ir(e.variantChildren,c,s,i,r)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(l)}function mf(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const i=t.map(r=>Ks(e,r,n));s=Promise.all(i)}else if(typeof t=="string")s=Ks(e,t,n);else{const i=typeof t=="function"?Ft(e,t,n.custom):t;s=Promise.all(Gs(e,i,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}const pf={test:e=>e==="auto",parse:e=>e},_r=e=>t=>t.test(e),Fr=[Ot,G,qe,at,Yu,Wu,pf],$r=e=>Fr.find(_r(e));function gf(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Io(e):!0}const bf=new Set(["brightness","contrast","saturate","opacity"]);function yf(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(gs)||[];if(!s)return e;const i=n.replace(s,"");let r=bf.has(t)?1:0;return s!==n&&(r*=100),t+"("+r+i+")"}const xf=/\b([a-z-]*)\(.*?\)/gu,Zs={...He,getAnimatableNone:e=>{const t=e.match(xf);return t?t.map(yf).join(" "):e}},qs={...He,getAnimatableNone:e=>{const t=He.parse(e);return He.createTransformer(e)(t.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},Br={...Ot,transform:Math.round},Js={borderWidth:G,borderTopWidth:G,borderRightWidth:G,borderBottomWidth:G,borderLeftWidth:G,borderRadius:G,borderTopLeftRadius:G,borderTopRightRadius:G,borderBottomRightRadius:G,borderBottomLeftRadius:G,width:G,maxWidth:G,height:G,maxHeight:G,top:G,right:G,bottom:G,left:G,inset:G,insetBlock:G,insetBlockStart:G,insetBlockEnd:G,insetInline:G,insetInlineStart:G,insetInlineEnd:G,padding:G,paddingTop:G,paddingRight:G,paddingBottom:G,paddingLeft:G,paddingBlock:G,paddingBlockStart:G,paddingBlockEnd:G,paddingInline:G,paddingInlineStart:G,paddingInlineEnd:G,margin:G,marginTop:G,marginRight:G,marginBottom:G,marginLeft:G,marginBlock:G,marginBlockStart:G,marginBlockEnd:G,marginInline:G,marginInlineStart:G,marginInlineEnd:G,fontSize:G,backgroundPositionX:G,backgroundPositionY:G,...{rotate:at,rotateX:at,rotateY:at,rotateZ:at,scale:Cn,scaleX:Cn,scaleY:Cn,scaleZ:Cn,skew:at,skewX:at,skewY:at,distance:G,translateX:G,translateY:G,translateZ:G,x:G,y:G,z:G,perspective:G,transformPerspective:G,opacity:sn,originX:Qo,originY:Qo,originZ:G},zIndex:Br,fillOpacity:sn,strokeOpacity:sn,numOctaves:Br},vf={...Js,color:Te,backgroundColor:Te,outlineColor:Te,fill:Te,stroke:Te,borderColor:Te,borderTopColor:Te,borderRightColor:Te,borderBottomColor:Te,borderLeftColor:Te,filter:Zs,WebkitFilter:Zs,mask:qs,WebkitMask:qs},zr=e=>vf[e],wf=new Set([Zs,qs]);function Wr(e,t){let n=zr(e);return wf.has(n)||(n=He),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Sf=new Set(["auto","none","0"]);function Tf(e,t,n){let s=0,i;for(;s<e.length&&!i;){const r=e[s];typeof r=="string"&&!Sf.has(r)&&an(r).values.length&&(i=e[s]),s++}if(i&&n)for(const r of t)e[r]=Wr(n,i)}class Ef extends _s{constructor(t,n,s,i,r){super(t,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let f=t[d];if(typeof f=="string"&&(f=f.trim(),ps(f))){const h=Mr(f,n.current);h!==void 0&&(t[d]=h),d===t.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!Or.has(s)||t.length!==2)return;const[i,r]=t,o=$r(i),l=$r(r),c=qo(i),u=qo(r);if(c!==u&&lt[s]){this.needsMeasurement=!0;return}if(o!==l)if(xr(o)&&xr(l))for(let d=0;d<t.length;d++){const f=t[d];typeof f=="string"&&(t[d]=parseFloat(f))}else lt[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let i=0;i<t.length;i++)(t[i]===null||gf(t[i]))&&s.push(i);s.length&&Tf(t,s,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=lt[s](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(s,i).jump(i,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:s}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const r=s.length-1,o=s[r];s[r]=lt[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([l,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const Cf=new Set(["opacity","clipPath","filter","transform"]);function Qs(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;t&&(s=t.current);const i=n?.[e]??s.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(s=>s!=null)}const Yr=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function ei(e){return jo(e)&&"offsetHeight"in e}const{schedule:ti}=Go(queueMicrotask,!1),Xe={x:!1,y:!1};function Ur(){return Xe.x||Xe.y}function Nf(e){return e==="x"||e==="y"?Xe[e]?null:(Xe[e]=!0,()=>{Xe[e]=!1}):Xe.x||Xe.y?null:(Xe.x=Xe.y=!0,()=>{Xe.x=Xe.y=!1})}function Hr(e,t){const n=Qs(e),s=new AbortController,i={passive:!0,...t,signal:s.signal};return[n,i,()=>s.abort()]}function kf(e){return!(e.pointerType==="touch"||Ur())}function Pf(e,t,n={}){const[s,i,r]=Hr(e,n);return s.forEach(o=>{let l=!1,c=!1,u;const d=()=>{o.removeEventListener("pointerleave",p)},f=v=>{u&&(u(v),u=void 0),d()},h=v=>{l=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),c&&(c=!1,f(v))},m=()=>{l=!0,window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",h,i)},p=v=>{if(v.pointerType!=="touch"){if(l){c=!0;return}f(v)}},y=v=>{if(!kf(v))return;c=!1;const x=t(o,v);typeof x=="function"&&(u=x,o.addEventListener("pointerleave",p,i))};o.addEventListener("pointerenter",y,i),o.addEventListener("pointerdown",m,i)}),r}const Xr=(e,t)=>t?e===t?!0:Xr(e,t.parentElement):!1,ni=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,jf=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function If(e){return jf.has(e.tagName)||e.isContentEditable===!0}const Mf=new Set(["INPUT","SELECT","TEXTAREA"]);function Af(e){return Mf.has(e.tagName)||e.isContentEditable===!0}const Pn=new WeakSet;function Gr(e){return t=>{t.key==="Enter"&&e(t)}}function si(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Vf=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=Gr(()=>{if(Pn.has(n))return;si(n,"down");const i=Gr(()=>{si(n,"up")}),r=()=>si(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",r,t)});n.addEventListener("keydown",s,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),t)};function Kr(e){return ni(e)&&!Ur()}const Zr=new WeakSet;function Of(e,t,n={}){const[s,i,r]=Hr(e,n),o=l=>{const c=l.currentTarget;if(!Kr(l)||Zr.has(l))return;Pn.add(c),n.stopPropagation&&Zr.add(l);const u=t(c,l),d=(m,p)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),Pn.has(c)&&Pn.delete(c),Kr(m)&&typeof u=="function"&&u(m,{success:p})},f=m=>{d(m,c===window||c===document||n.useGlobalTarget||Xr(c,m.target))},h=m=>{d(m,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",h,i)};return s.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",o,i),ei(l)&&(l.addEventListener("focus",u=>Vf(u,i)),!If(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),r}function jn(e){return jo(e)&&"ownerSVGElement"in e}const In=new WeakMap;let Mn;const qr=(e,t,n)=>(s,i)=>i&&i[0]?i[0][e+"Size"]:jn(s)&&"getBBox"in s?s.getBBox()[t]:s[n],Lf=qr("inline","width","offsetWidth"),Df=qr("block","height","offsetHeight");function Rf({target:e,borderBoxSize:t}){In.get(e)?.forEach(n=>{n(e,{get width(){return Lf(e,t)},get height(){return Df(e,t)}})})}function _f(e){e.forEach(Rf)}function Ff(){typeof ResizeObserver>"u"||(Mn=new ResizeObserver(_f))}function $f(e,t){Mn||Ff();const n=Qs(e);return n.forEach(s=>{let i=In.get(s);i||(i=new Set,In.set(s,i)),i.add(t),Mn?.observe(s)}),()=>{n.forEach(s=>{const i=In.get(s);i?.delete(t),i?.size||Mn?.unobserve(s)})}}const An=new Set;let $t;function Bf(){$t=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};An.forEach(t=>t(e))},window.addEventListener("resize",$t)}function zf(e){return An.add(e),$t||Bf(),()=>{An.delete(e),!An.size&&typeof $t=="function"&&(window.removeEventListener("resize",$t),$t=void 0)}}function Jr(e,t){return typeof e=="function"?zf(e):$f(e,t)}function Qr(e){return jn(e)&&e.tagName==="svg"}const Wf=[...Fr,Te,He],Yf=e=>Wf.find(_r(e)),ea=()=>({translate:0,scale:1,origin:0,originPoint:0}),Bt=()=>({x:ea(),y:ea()}),ta=()=>({min:0,max:0}),Ee=()=>({x:ta(),y:ta()}),un=new WeakMap;function Vn(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function dn(e){return typeof e=="string"||Array.isArray(e)}const ii=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],oi=["initial",...ii];function On(e){return Vn(e.animate)||oi.some(t=>dn(e[t]))}function na(e){return!!(On(e)||e.variants)}function Uf(e,t,n){for(const s in t){const i=t[s],r=n[s];if(ke(i))e.addValue(s,i);else if(ke(r))e.addValue(s,ct(i,{owner:e}));else if(r!==i)if(e.hasValue(s)){const o=e.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(s);e.addValue(s,ct(o!==void 0?o:i,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const ri={current:null},sa={current:!1},Hf=typeof window<"u";function Xf(){if(sa.current=!0,!!Hf)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ri.current=e.matches;e.addEventListener("change",t),t()}else ri.current=!1}const ia=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Ln={};function oa(e){Ln=e}function Gf(){return Ln}class ra{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:o,visualState:l},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=_s,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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=Le.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,ye.render(this.render,!1,!0))};const{latestValues:u,renderState:d}=l;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=r,this.options=c,this.blockInitialAnimation=!!o,this.isControllingVariants=On(n),this.isVariantNode=na(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in h){const p=h[m];u[m]!==void 0&&ke(p)&&p.set(u[m])}}mount(t){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=t,un.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,s)=>this.bindToMotionValue(s,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(sa.current||Xf(),this.shouldReduceMotion=ri.current),process.env.NODE_ENV!=="production"&&ds(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),rt(this.notifyUpdate),rt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(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}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&Cf.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:l,times:c,ease:u,duration:d}=n.accelerate,f=new Nr({element:this.current,name:t,keyframes:l,times:c,ease:u,duration:Fe(d)}),h=o(f);this.valueSubscriptions.set(t,()=>{h(),f.cancel()});return}const s=_t.has(t);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&ye.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),r&&r(),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 Ln){const n=Ln[t];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[t]&&i&&s(this.props)&&(this.features[t]=new i(this)),this.features[t]){const r=this.features[t];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ee()}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 s=0;s<ia.length;s++){const i=ia[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=t[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=Uf(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}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 s=this.values.get(t);n!==s&&(s&&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 s=this.values.get(t);return s===void 0&&n!==void 0&&(s=ct(n===null?void 0:n,{owner:this}),this.addValue(t,s)),s}readValue(t,n){let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(Po(s)||Io(s))?s=parseFloat(s):!Yf(s)&&He.test(n)&&(s=Wr(t,n)),this.setBaseTarget(t,ke(s)?s.get():s)),ke(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const r=Ys(this.props,n,this.presenceContext?.custom);r&&(s=r[t])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!ke(i)?i:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new us),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){ti.render(this.render)}}class aa extends ra{constructor(){super(...arguments),this.KeyframeResolver=Ef}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const s=t.style;return s?s[n]:void 0}removeValueFromRenderState(t,{vars:n,style:s}){delete n[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ke(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class ut{constructor(t){this.isMounted=!1,this.node=t}update(){}}function la({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function Kf({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Zf(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function ai(e){return e===void 0||e===1}function li({scale:e,scaleX:t,scaleY:n}){return!ai(e)||!ai(t)||!ai(n)}function xt(e){return li(e)||ca(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ca(e){return ua(e.x)||ua(e.y)}function ua(e){return e&&e!=="0%"}function Dn(e,t,n){const s=e-n,i=t*s;return n+i}function da(e,t,n,s,i){return i!==void 0&&(e=Dn(e,i,s)),Dn(e,n,s)+t}function ci(e,t=0,n=1,s,i){e.min=da(e.min,t,n,s,i),e.max=da(e.max,t,n,s,i)}function fa(e,{x:t,y:n}){ci(e.x,t.translate,t.scale,t.originPoint),ci(e.y,n.translate,n.scale,n.originPoint)}const ha=.999999999999,ma=1.0000000000001;function qf(e,t,n,s=!1){const i=n.length;if(!i)return;t.x=t.y=1;let r,o;for(let l=0;l<i;l++){r=n[l],o=r.projectionDelta;const{visualElement:c}=r.options;c&&c.props.style&&c.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&Wt(e,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,fa(e,o)),s&&xt(r.latestValues)&&Wt(e,r.latestValues))}t.x<ma&&t.x>ha&&(t.x=1),t.y<ma&&t.y>ha&&(t.y=1)}function zt(e,t){e.min=e.min+t,e.max=e.max+t}function pa(e,t,n,s,i=.5){const r=ve(e.min,e.max,i);ci(e,t,n,r,s)}function Wt(e,t){pa(e.x,t.x,t.scaleX,t.scale,t.originX),pa(e.y,t.y,t.scaleY,t.scale,t.originY)}function ga(e,t){return la(Zf(e.getBoundingClientRect(),t))}function Jf(e,t,n){const s=ga(e,n),{scroll:i}=t;return i&&(zt(s.x,i.offset.x),zt(s.y,i.offset.y)),s}const Qf={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},eh=Rt.length;function th(e,t,n){let s="",i=!0;for(let r=0;r<eh;r++){const o=Rt[r],l=e[o];if(l===void 0)continue;let c=!0;if(typeof l=="number")c=l===(o.startsWith("scale")?1:0);else{const u=parseFloat(l);c=o.startsWith("scale")?u===1:u===0}if(!c||n){const u=Yr(l,Js[o]);if(!c){i=!1;const d=Qf[o]||o;s+=`${d}(${u}) `}n&&(t[o]=u)}}return s=s.trim(),n?s=n(t,i?"":s):i&&(s="none"),s}function ui(e,t,n){const{style:s,vars:i,transformOrigin:r}=e;let o=!1,l=!1;for(const c in t){const u=t[c];if(_t.has(c)){o=!0;continue}else if(Zo(c)){i[c]=u;continue}else{const d=Yr(u,Js[c]);c.startsWith("origin")?(l=!0,r[c]=d):s[c]=d}}if(t.transform||(o||n?s.transform=th(t,e.transform,n):s.transform&&(s.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:d=0}=r;s.transformOrigin=`${c} ${u} ${d}`}}function ba(e,{style:t,vars:n},s,i){const r=e.style;let o;for(o in t)r[o]=t[o];i?.applyProjectionStyles(r,s);for(o in n)r.setProperty(o,n[o])}function ya(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const fn={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(G.test(e))e=parseFloat(e);else return e;const n=ya(e,t.target.x),s=ya(e,t.target.y);return`${n}% ${s}%`}},nh={correct:(e,{treeScale:t,projectionDelta:n})=>{const s=e,i=He.parse(e);if(i.length>5)return s;const r=He.createTransformer(e),o=typeof i[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=l,i[1+o]/=c;const u=ve(l,c,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),r(i)}},di={borderRadius:{...fn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:fn,borderTopRightRadius:fn,borderBottomLeftRadius:fn,borderBottomRightRadius:fn,boxShadow:nh};function xa(e,{layout:t,layoutId:n}){return _t.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!di[e]||e==="opacity")}function fi(e,t,n){const s=e.style,i=t?.style,r={};if(!s)return r;for(const o in s)(ke(s[o])||i&&ke(i[o])||xa(o,e)||n?.getValue(o)?.liveStyle!==void 0)&&(r[o]=s[o]);return r}function sh(e){return window.getComputedStyle(e)}class va extends aa{constructor(){super(...arguments),this.type="html",this.renderInstance=ba}readValueFromInstance(t,n){if(_t.has(n))return this.projection?.isProjecting?Vs(n):Ed(t,n);{const s=sh(t),i=(Zo(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return ga(t,n)}build(t,n,s){ui(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return fi(t,n,s)}}function ih(e,t){return e in t}class oh extends ra{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(ih(n,t)){const s=t[n];if(typeof s=="string"||typeof s=="number")return s}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return Ee()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}const rh={offset:"stroke-dashoffset",array:"stroke-dasharray"},ah={offset:"strokeDashoffset",array:"strokeDasharray"};function lh(e,t,n=1,s=0,i=!0){e.pathLength=1;const r=i?rh:ah;e[r.offset]=`${-s}`,e[r.array]=`${t} ${n}`}const ch=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function wa(e,{attrX:t,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...l},c,u,d){if(ui(e,l,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h}=e;f.transform&&(h.transform=f.transform,delete f.transform),(h.transform||f.transformOrigin)&&(h.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),h.transform&&(h.transformBox=d?.transformBox??"fill-box",delete f.transformBox);for(const m of ch)f[m]!==void 0&&(h[m]=f[m],delete f[m]);t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),i!==void 0&&lh(f,i,r,o,!1)}const Sa=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"]),Ta=e=>typeof e=="string"&&e.toLowerCase()==="svg";function uh(e,t,n,s){ba(e,t,void 0,s);for(const i in t.attrs)e.setAttribute(Sa.has(i)?i:Xs(i),t.attrs[i])}function Ea(e,t,n){const s=fi(e,t,n);for(const i in e)if(ke(e[i])||ke(t[i])){const r=Rt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=e[i]}return s}class Ca extends aa{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ee}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(_t.has(n)){const s=zr(n);return s&&s.default||0}return n=Sa.has(n)?n:Xs(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return Ea(t,n,s)}build(t,n,s){wa(t,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,n,s,i){uh(t,n,s,i)}mount(t){this.isSVGTag=Ta(t.tagName),super.mount(t)}}const dh=oi.length;function Na(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Na(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<dh;n++){const s=oi[n],i=e.props[s];(dn(i)||i===!1)&&(t[s]=i)}return t}function ka(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let s=0;s<n;s++)if(t[s]!==e[s])return!1;return!0}const fh=[...ii].reverse(),hh=ii.length;function mh(e){return t=>Promise.all(t.map(({animation:n,options:s})=>mf(e,n,s)))}function ph(e){let t=mh(e),n=Pa(),s=!0;const i=c=>(u,d)=>{const f=Ft(e,d,c==="exit"?e.presenceContext?.custom:void 0);if(f){const{transition:h,transitionEnd:m,...p}=f;u={...u,...p,...m}}return u};function r(c){t=c(e)}function o(c){const{props:u}=e,d=Na(e.parent)||{},f=[],h=new Set;let m={},p=1/0;for(let v=0;v<hh;v++){const x=fh[v],C=n[x],N=u[x]!==void 0?u[x]:d[x],I=dn(N),A=x===c?C.isActive:null;A===!1&&(p=v);let k=N===d[x]&&N!==u[x]&&I;if(k&&s&&e.manuallyAnimateOnMount&&(k=!1),C.protectedKeys={...m},!C.isActive&&A===null||!N&&!C.prevProp||Vn(N)||typeof N=="boolean")continue;if(x==="exit"&&C.isActive&&A!==!0){C.prevResolvedValues&&(m={...m,...C.prevResolvedValues});continue}const E=gh(C.prevProp,N);let w=E||x===c&&C.isActive&&!k&&I||v>p&&I,j=!1;const $=Array.isArray(N)?N:[N];let z=$.reduce(i(x),{});A===!1&&(z={});const{prevResolvedValues:Q={}}=C,R={...Q,...z},se=V=>{w=!0,h.has(V)&&(j=!0,h.delete(V)),C.needsAnimating[V]=!0;const P=e.getValue(V);P&&(P.liveStyle=!1)};for(const V in R){const P=z[V],_=Q[V];if(m.hasOwnProperty(V))continue;let M=!1;Us(P)&&Us(_)?M=!ka(P,_):M=P!==_,M?P!=null?se(V):h.add(V):P!==void 0&&h.has(V)?se(V):C.protectedKeys[V]=!0}C.prevProp=N,C.prevResolvedValues=z,C.isActive&&(m={...m,...z}),s&&e.blockInitialAnimation&&(w=!1);const U=k&&E;w&&(!U||j)&&f.push(...$.map(V=>{const P={type:x};if(typeof V=="string"&&s&&!U&&e.manuallyAnimateOnMount&&e.parent){const{parent:_}=e,M=Ft(_,V);if(_.enteringChildren&&M){const{delayChildren:T}=M.transition||{};P.delay=Ir(_.enteringChildren,e,T)}}return{animation:V,options:P}}))}if(h.size){const v={};if(typeof u.initial!="boolean"){const x=Ft(e,Array.isArray(u.initial)?u.initial[0]:u.initial);x&&x.transition&&(v.transition=x.transition)}h.forEach(x=>{const C=e.getBaseTarget(x),N=e.getValue(x);N&&(N.liveStyle=!0),v[x]=C??null}),f.push({animation:v})}let y=!!f.length;return s&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(y=!1),s=!1,y?t(f):Promise.resolve()}function l(c,u){if(n[c].isActive===u)return Promise.resolve();e.variantChildren?.forEach(f=>f.animationState?.setActive(c,u)),n[c].isActive=u;const d=o(c);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:o,setActive:l,setAnimateFunction:r,getState:()=>n,reset:()=>{n=Pa()}}}function gh(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ka(t,e):!1}function vt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Pa(){return{animate:vt(!0),whileInView:vt(),whileHover:vt(),whileTap:vt(),whileDrag:vt(),whileFocus:vt(),exit:vt()}}function ja(e,t){e.min=t.min,e.max=t.max}function Ge(e,t){ja(e.x,t.x),ja(e.y,t.y)}function Ia(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Ma=1e-4,bh=1-Ma,yh=1+Ma,Aa=.01,xh=0-Aa,vh=0+Aa;function De(e){return e.max-e.min}function wh(e,t,n){return Math.abs(e-t)<=n}function Va(e,t,n,s=.5){e.origin=s,e.originPoint=ve(t.min,t.max,e.origin),e.scale=De(n)/De(t),e.translate=ve(n.min,n.max,e.origin)-e.originPoint,(e.scale>=bh&&e.scale<=yh||isNaN(e.scale))&&(e.scale=1),(e.translate>=xh&&e.translate<=vh||isNaN(e.translate))&&(e.translate=0)}function hn(e,t,n,s){Va(e.x,t.x,n.x,s?s.originX:void 0),Va(e.y,t.y,n.y,s?s.originY:void 0)}function Oa(e,t,n){e.min=n.min+t.min,e.max=e.min+De(t)}function Sh(e,t,n){Oa(e.x,t.x,n.x),Oa(e.y,t.y,n.y)}function La(e,t,n){e.min=t.min-n.min,e.max=e.min+De(t)}function Rn(e,t,n){La(e.x,t.x,n.x),La(e.y,t.y,n.y)}function Da(e,t,n,s,i){return e-=t,e=Dn(e,1/n,s),i!==void 0&&(e=Dn(e,1/i,s)),e}function Th(e,t=0,n=1,s=.5,i,r=e,o=e){if(qe.test(t)&&(t=parseFloat(t),t=ve(o.min,o.max,t/100)-o.min),typeof t!="number")return;let l=ve(r.min,r.max,s);e===r&&(l-=t),e.min=Da(e.min,t,n,l,i),e.max=Da(e.max,t,n,l,i)}function Ra(e,t,[n,s,i],r,o){Th(e,t[n],t[s],t[i],t.scale,r,o)}const Eh=["x","scaleX","originX"],Ch=["y","scaleY","originY"];function _a(e,t,n,s){Ra(e.x,t,Eh,n?n.x:void 0,s?s.x:void 0),Ra(e.y,t,Ch,n?n.y:void 0,s?s.y:void 0)}function Fa(e){return e.translate===0&&e.scale===1}function $a(e){return Fa(e.x)&&Fa(e.y)}function Ba(e,t){return e.min===t.min&&e.max===t.max}function Nh(e,t){return Ba(e.x,t.x)&&Ba(e.y,t.y)}function za(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Wa(e,t){return za(e.x,t.x)&&za(e.y,t.y)}function Ya(e){return De(e.x)/De(e.y)}function Ua(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Je(e){return[e("x"),e("y")]}function kh(e,t,n){let s="";const i=e.x.translate/t.x,r=e.y.translate/t.y,o=n?.z||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}px) `),(t.x!==1||t.y!==1)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:f,rotateY:h,skewX:m,skewY:p}=n;u&&(s=`perspective(${u}px) ${s}`),d&&(s+=`rotate(${d}deg) `),f&&(s+=`rotateX(${f}deg) `),h&&(s+=`rotateY(${h}deg) `),m&&(s+=`skewX(${m}deg) `),p&&(s+=`skewY(${p}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(s+=`scale(${l}, ${c})`),s||"none"}const Ha=["TopLeft","TopRight","BottomLeft","BottomRight"],Ph=Ha.length,Xa=e=>typeof e=="string"?parseFloat(e):e,Ga=e=>typeof e=="number"||G.test(e);function jh(e,t,n,s,i,r){i?(e.opacity=ve(0,n.opacity??1,Ih(s)),e.opacityExit=ve(t.opacity??1,0,Mh(s))):r&&(e.opacity=ve(t.opacity??1,n.opacity??1,s));for(let o=0;o<Ph;o++){const l=`border${Ha[o]}Radius`;let c=Ka(t,l),u=Ka(n,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||Ga(c)===Ga(u)?(e[l]=Math.max(ve(Xa(c),Xa(u),s),0),(qe.test(u)||qe.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||n.rotate)&&(e.rotate=ve(t.rotate||0,n.rotate||0,s))}function Ka(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Ih=Za(0,.5,$o),Mh=Za(.5,.95,Be);function Za(e,t,n){return s=>s<e?0:s>t?1:n(Vt(e,t,s))}function qa(e,t,n){const s=ke(e)?e:ct(e);return s.start(Ws("",s,t,n)),s.animation}function mn(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}const Ah=(e,t)=>e.depth-t.depth;class Vh{constructor(){this.children=[],this.isDirty=!1}add(t){ls(this.children,t),this.isDirty=!0}remove(t){Mt(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Ah),this.isDirty=!1,this.children.forEach(t)}}function Oh(e,t){const n=Le.now(),s=({timestamp:i})=>{const r=i-n;r>=t&&(rt(s),e(r-t))};return ye.setup(s,!0),()=>rt(s)}function _n(e){return ke(e)?e.get():e}class Lh{constructor(){this.members=[]}add(t){ls(this.members,t);for(let n=this.members.length-1;n>=0;n--){const s=this.members[n];if(s===t||s===this.lead||s===this.prevLead)continue;const i=s.instance;i&&i.isConnected===!1&&s.isPresent!==!1&&!s.snapshot&&Mt(this.members,s)}t.scheduleRender()}remove(t){if(Mt(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(i=>t===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const r=this.members[i],o=r.instance;if(r.isPresent!==!1&&(!o||o.isConnected!==!1)){s=r;break}}return s?(this.promote(s),!0):!1}promote(t,n){const s=this.lead;if(t!==s&&(this.prevLead=s,this.lead=t,t.show(),s)){s.instance&&s.scheduleRender(),t.scheduleRender();const i=s.options.layoutDependency,r=t.options.layoutDependency;if(!(i!==void 0&&r!==void 0&&i===r)){const c=s.instance;c&&c.isConnected===!1&&!s.snapshot||(t.resumeFrom=s,n&&(t.resumeFrom.preserveOpacity=!0),s.snapshot&&(t.snapshot=s.snapshot,t.snapshot.latestValues=s.animationValues||s.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0))}const{crossfade:l}=t.options;l===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:s}=t;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Fn={hasAnimatedSinceResize:!0,hasEverUpdated:!1},hi=["","X","Y","Z"],Dh=1e3;let Rh=0;function mi(e,t,n,s){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),s&&(s[e]=0))}function Ja(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Rr(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ye,!(i||r))}const{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&Ja(s)}function Qa({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},l=t?.()){this.id=Rh++,this.animationId=0,this.animationCommitId=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.layoutVersion=0,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($h),this.nodes.forEach(Yh),this.nodes.forEach(Uh),this.nodes.forEach(Bh)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new Vh)}addEventListener(o,l){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new us),this.eventHandlers.get(o).add(l)}notifyListeners(o,...l){const c=this.eventHandlers.get(o);c&&c.notify(...l)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=jn(o)&&!Qr(o),this.instance=o;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||l)&&(this.isLayoutDirty=!0),e){let d,f=0;const h=()=>this.root.updateBlockedByResize=!1;ye.read(()=>{f=window.innerWidth}),e(o,()=>{const m=window.innerWidth;m!==f&&(f=m,this.root.updateBlockedByResize=!0,d&&d(),d=Oh(h,250),Fn.hasAnimatedSinceResize&&(Fn.hasAnimatedSinceResize=!1,this.nodes.forEach(nl)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||Zh,{onLayoutAnimationStart:y,onLayoutAnimationComplete:v}=u.getProps(),x=!this.targetLayout||!Wa(this.targetLayout,m),C=!f&&h;if(this.options.layoutRoot||this.resumeFrom||C||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const N={...zs(p,"layout"),onPlay:y,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(N.delay=0,N.type=!1),this.startAnimation(N),this.setAnimationOrigin(d,C)}else f||nl(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),rt(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(Hh),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ja(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(el);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(tl);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Wh),this.nodes.forEach(_h),this.nodes.forEach(Fh)):this.nodes.forEach(tl),this.clearAllSnapshots();const l=Le.now();Ae.delta=Ze(0,1e3/60,l-Ae.timestamp),Ae.timestamp=l,Ae.isProcessing=!0,ms.update.process(Ae),ms.preRender.process(Ae),ms.render.process(Ae),Ae.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ti.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(zh),this.sharedNodes.forEach(Xh)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ye.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ye.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!De(this.snapshot.measuredBox.x)&&!De(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 c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Ee(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(l=!1),l&&this.instance){const c=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!$a(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;o&&this.instance&&(l||xt(this.latestValues)||d)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return o&&(c=this.removeTransform(c)),qh(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return Ee();const l=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Jh))){const{scroll:u}=this.root;u&&(zt(l.x,u.offset.x),zt(l.y,u.offset.y))}return l}removeElementScroll(o){const l=Ee();if(Ge(l,o),this.scroll?.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&&Ge(l,o),zt(l.x,d.offset.x),zt(l.y,d.offset.y))}return l}applyTransform(o,l=!1){const c=Ee();Ge(c,o);for(let u=0;u<this.path.length;u++){const d=this.path[u];!l&&d.options.layoutScroll&&d.scroll&&d!==d.root&&Wt(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),xt(d.latestValues)&&Wt(c,d.latestValues)}return xt(this.latestValues)&&Wt(c,this.latestValues),c}removeTransform(o){const l=Ee();Ge(l,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!xt(u.latestValues))continue;li(u.latestValues)&&u.updateSnapshot();const d=Ee(),f=u.measurePageBox();Ge(d,f),_a(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return xt(this.latestValues)&&_a(l,this.latestValues),l}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.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!==Ae.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){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(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!this.layout||!(d||f))return;this.resolvedRelativeTargetAt=Ae.timestamp;const h=this.getClosestProjectingParent();h&&this.linkedParentVersion!==h.layoutVersion&&!h.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(h&&h.layout?this.createRelativeTarget(h,this.layout.layoutBox,h.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ee(),this.targetWithTransforms=Ee()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Sh(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Ge(this.target,this.layout.layoutBox),fa(this.target,this.targetDelta)):Ge(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?this.createRelativeTarget(h,this.target,h.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||li(this.parent.latestValues)||ca(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,l,c){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ee(),this.relativeTargetOrigin=Ee(),Rn(this.relativeTargetOrigin,l,c),Ge(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const o=this.getLead(),l=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Ae.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;Ge(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;qf(this.layoutCorrected,this.treeScale,this.path,l),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Ee());const{target:m}=o;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ia(this.prevProjectionDelta.x,this.projectionDelta.x),Ia(this.prevProjectionDelta.y,this.projectionDelta.y)),hn(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!Ua(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ua(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Bt(),this.projectionDelta=Bt(),this.projectionDeltaWithTransform=Bt()}setAnimationOrigin(o,l=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},f=Bt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const h=Ee(),m=c?c.source:void 0,p=this.layout?this.layout.source:void 0,y=m!==p,v=this.getStack(),x=!v||v.members.length<=1,C=!!(y&&!x&&this.options.crossfade===!0&&!this.path.some(Kh));this.animationProgress=0;let N;this.mixTargetDelta=I=>{const A=I/1e3;sl(f.x,o.x,A),sl(f.y,o.y,A),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Rn(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Gh(this.relativeTarget,this.relativeTargetOrigin,h,A),N&&Nh(this.relativeTarget,N)&&(this.isProjectionDirty=!1),N||(N=Ee()),Ge(N,this.relativeTarget)),y&&(this.animationValues=d,jh(d,u,this.latestValues,A,C,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=A},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(rt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ye.update(()=>{Fn.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ct(0)),this.motionValue.jump(0,!1),this.currentAnimation=qa(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:l=>{this.mixTargetDelta(l),o.onUpdate&&o.onUpdate(l)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.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 o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Dh),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:d}=o;if(!(!l||!c||!u)){if(this!==o&&this.layout&&u&&ll(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||Ee();const f=De(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+f;const h=De(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+h}Ge(l,c),Wt(l,d),hn(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(o,l){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Lh),this.sharedNodes.get(o).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let l=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&mi("z",o,u,this.animationValues);for(let d=0;d<hi.length;d++)mi(`rotate${hi[d]}`,o,u,this.animationValues),mi(`skew${hi[d]}`,o,u,this.animationValues);o.render();for(const d in u)o.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);o.scheduleRender()}applyProjectionStyles(o,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=_n(l?.pointerEvents)||"",o.transform=c?c(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=_n(l?.pointerEvents)||""),this.hasProjected&&!xt(this.latestValues)&&(o.transform=c?c({},""):"none",this.hasProjected=!1);return}o.visibility="";const d=u.animationValues||u.latestValues;this.applyTransformsToTarget();let f=kh(this.projectionDeltaWithTransform,this.treeScale,d);c&&(f=c(d,f)),o.transform=f;const{x:h,y:m}=this.projectionDelta;o.transformOrigin=`${h.origin*100}% ${m.origin*100}% 0`,u.animationValues?o.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:o.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const p in di){if(d[p]===void 0)continue;const{correct:y,applyTo:v,isCSSVariable:x}=di[p],C=f==="none"?d[p]:y(d[p],u);if(v){const N=v.length;for(let I=0;I<N;I++)o[v[I]]=C}else x?this.options.visualElement.renderState.vars[p]=C:o[p]=C}this.options.layoutId&&(o.pointerEvents=u===this?_n(l?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(el),this.root.sharedNodes.clear()}}}function _h(e){e.updateLayout()}function Fh(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=e.layout,{animationType:i}=e.options,r=t.source!==e.layout.source;i==="size"?Je(d=>{const f=r?t.measuredBox[d]:t.layoutBox[d],h=De(f);f.min=n[d].min,f.max=f.min+h}):ll(i,t.layoutBox,n)&&Je(d=>{const f=r?t.measuredBox[d]:t.layoutBox[d],h=De(n[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const o=Bt();hn(o,n,t.layoutBox);const l=Bt();r?hn(l,e.applyTransform(s,!0),t.measuredBox):hn(l,n,t.layoutBox);const c=!$a(o);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const m=Ee();Rn(m,t.layoutBox,f.layoutBox);const p=Ee();Rn(p,n,h.layoutBox),Wa(m,p)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=p,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:l,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function $h(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 Bh(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function zh(e){e.clearSnapshot()}function el(e){e.clearMeasurements()}function tl(e){e.isLayoutDirty=!1}function Wh(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function nl(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Yh(e){e.resolveTargetDelta()}function Uh(e){e.calcProjection()}function Hh(e){e.resetSkewAndRotation()}function Xh(e){e.removeLeadSnapshot()}function sl(e,t,n){e.translate=ve(t.translate,0,n),e.scale=ve(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function il(e,t,n,s){e.min=ve(t.min,n.min,s),e.max=ve(t.max,n.max,s)}function Gh(e,t,n,s){il(e.x,t.x,n.x,s),il(e.y,t.y,n.y,s)}function Kh(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Zh={duration:.45,ease:[.4,0,.1,1]},ol=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),rl=ol("applewebkit/")&&!ol("chrome/")?Math.round:Be;function al(e){e.min=rl(e.min),e.max=rl(e.max)}function qh(e){al(e.x),al(e.y)}function ll(e,t,n){return e==="position"||e==="preserve-aspect"&&!wh(Ya(t),Ya(n),.2)}function Jh(e){return e!==e.root&&e.scroll?.wasRoot}const Qh=Qa({attachResizeListener:(e,t)=>mn(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),pi={current:void 0},cl=Qa({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!pi.current){const e=new Qh({});e.mount(window),e.setOptions({layoutScroll:!0}),pi.current=e}return pi.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),$n=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function ul(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function e0(...e){return t=>{let n=!1;const s=e.map(i=>{const r=ul(i,t);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let i=0;i<s.length;i++){const r=s[i];typeof r=="function"?r():ul(e[i],null)}}}}function t0(...e){return g.useCallback(e0(...e),e)}class n0 extends g.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const s=n.offsetParent,i=ei(s)&&s.offsetWidth||0,r=ei(s)&&s.offsetHeight||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=i-o.width-o.left,o.bottom=r-o.height-o.top}return null}componentDidUpdate(){}render(){return this.props.children}}function s0({children:e,isPresent:t,anchorX:n,anchorY:s,root:i,pop:r}){const o=b.useId(),l=b.useRef(null),c=b.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=b.useContext($n),d=e.props?.ref??e?.ref,f=t0(l,d);return b.useInsertionEffect(()=>{const{width:h,height:m,top:p,left:y,right:v,bottom:x}=c.current;if(t||r===!1||!l.current||!h||!m)return;const C=n==="left"?`left: ${y}`:`right: ${v}`,N=s==="bottom"?`bottom: ${x}`:`top: ${p}`;l.current.dataset.motionPopId=o;const I=document.createElement("style");u&&(I.nonce=u);const A=i??document.head;return A.appendChild(I),I.sheet&&I.sheet.insertRule(`
7
7
  [data-motion-pop-id="${o}"] {
8
8
  position: absolute !important;
9
9
  width: ${h}px !important;
@@ -11,11 +11,11 @@ React keys must be passed directly to JSX without using spread:
11
11
  ${C}px !important;
12
12
  ${N}px !important;
13
13
  }
14
- `),()=>{A.contains(I)&&A.removeChild(I)}},[t]),a.jsx(n0,{isPresent:t,childRef:l,sizeRef:c,pop:r,children:r===!1?e:g.cloneElement(e,{ref:f})})}const i0=({children:e,initial:t,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:r,mode:o,anchorX:l,anchorY:c,root:u})=>{const d=Sn(o0),f=b.useId();let h=!0,m=b.useMemo(()=>(h=!1,{id:f,initial:t,isPresent:n,custom:i,onExitComplete:p=>{d.set(p,!0);for(const y of d.values())if(!y)return;s&&s()},register:p=>(d.set(p,!1),()=>d.delete(p))}),[n,d,s]);return r&&h&&(m={...m}),b.useMemo(()=>{d.forEach((p,y)=>d.set(y,!1))},[n]),g.useEffect(()=>{!n&&!d.size&&s&&s()},[n]),e=a.jsx(s0,{pop:o==="popLayout",isPresent:n,anchorX:l,anchorY:c,root:u,children:e}),a.jsx(Qt.Provider,{value:m,children:e})};function o0(){return new Map}function dl(e=!0){const t=b.useContext(Qt);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=t,r=b.useId();b.useEffect(()=>{if(e)return i(r)},[e]);const o=b.useCallback(()=>e&&s&&s(r),[r,s,e]);return!n&&s?[!1,o]:[!0]}function r0(){return a0(b.useContext(Qt))}function a0(e){return e===null?!0:e.isPresent}const Bn=e=>e.key||"";function fl(e){const t=[];return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const Ce=({children:e,custom:t,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:r="sync",propagate:o=!1,anchorX:l="left",anchorY:c="top",root:u})=>{const[d,f]=dl(o),h=b.useMemo(()=>fl(e),[e]),m=o&&!d?[]:h.map(Bn),p=b.useRef(!0),y=b.useRef(h),v=Sn(()=>new Map),x=b.useRef(new Set),[C,N]=b.useState(h),[I,A]=b.useState(h);ko(()=>{p.current=!1,y.current=h;for(let w=0;w<I.length;w++){const j=Bn(I[w]);m.includes(j)?(v.delete(j),x.current.delete(j)):v.get(j)!==!0&&v.set(j,!1)}},[I,m.length,m.join("-")]);const k=[];if(h!==C){let w=[...h];for(let j=0;j<I.length;j++){const $=I[j],z=Bn($);m.includes(z)||(w.splice(j,0,$),k.push($))}return r==="wait"&&k.length&&(w=k),A(fl(w)),N(h),null}process.env.NODE_ENV!=="production"&&r==="wait"&&I.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:E}=b.useContext(as);return a.jsx(a.Fragment,{children:I.map(w=>{const j=Bn(w),$=o&&!d?!1:h===I||m.includes(j),z=()=>{if(x.current.has(j))return;if(x.current.add(j),v.has(j))v.set(j,!0);else return;let Q=!0;v.forEach(R=>{R||(Q=!1)}),Q&&(E?.(),A(y.current),o&&f?.(),s&&s())};return a.jsx(i0,{isPresent:$,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:r,root:u,onExitComplete:$?void 0:z,anchorX:l,anchorY:c,children:w},j)})})},hl=b.createContext({strict:!1}),ml={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"]};let pl=!1;function l0(){if(pl)return;const e={};for(const t in ml)e[t]={isEnabled:n=>ml[t].some(s=>!!n[s])};oa(e),pl=!0}function gl(){return l0(),Gf()}function c0(e){const t=gl();for(const n in e)t[n]={...t[n],...e[n]};oa(t)}const u0=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","propagate","ignoreStrict","viewport"]);function zn(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||u0.has(e)}let bl=e=>!zn(e);function d0(e){typeof e=="function"&&(bl=t=>t.startsWith("on")?!zn(t):e(t))}try{d0(require("@emotion/is-prop-valid").default)}catch{}function f0(e,t,n){const s={};for(const i in e)i==="values"&&typeof e.values=="object"||(bl(i)||n===!0&&zn(i)||!t&&!zn(i)||e.draggable&&i.startsWith("onDrag"))&&(s[i]=e[i]);return s}const Wn=b.createContext({});function h0(e,t){if(On(e)){const{initial:n,animate:s}=e;return{initial:n===!1||un(n)?n:void 0,animate:un(s)?s:void 0}}return e.inherit!==!1?t:{}}function m0(e){const{initial:t,animate:n}=h0(e,b.useContext(Wn));return b.useMemo(()=>({initial:t,animate:n}),[yl(t),yl(n)])}function yl(e){return Array.isArray(e)?e.join(" "):e}const gi=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function xl(e,t,n){for(const s in t)!je(t[s])&&!xa(s,n)&&(e[s]=t[s])}function p0({transformTemplate:e},t){return b.useMemo(()=>{const n=gi();return ui(n,t,e),Object.assign({},n.vars,n.style)},[t])}function g0(e,t){const n=e.style||{},s={};return xl(s,n,e),Object.assign(s,p0(e,t)),s}function b0(e,t){const n={},s=g0(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.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=s,n}const vl=()=>({...gi(),attrs:{}});function y0(e,t,n,s){const i=b.useMemo(()=>{const r=vl();return wa(r,t,Ta(s),e.transformTemplate,e.style),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};xl(r,e.style,e),i.style={...r,...i.style}}return i}const x0=["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 bi(e){return typeof e!="string"||e.includes("-")?!1:!!(x0.indexOf(e)>-1||/[A-Z]/u.test(e))}function v0(e,t,n,{latestValues:s},i,r=!1,o){const c=(o??bi(e)?y0:b0)(t,s,i,e),u=f0(t,typeof e=="string",r),d=e!==b.Fragment?{...u,...c,ref:n}:{},{children:f}=t,h=b.useMemo(()=>je(f)?f.get():f,[f]);return b.createElement(e,{...d,children:h})}function w0({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,i){return{latestValues:S0(n,s,i,e),renderState:t()}}function S0(e,t,n,s){const i={},r=s(e,{});for(const h in r)i[h]=_n(r[h]);let{initial:o,animate:l}=e;const c=On(e),u=na(e);t&&u&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const f=d?l:o;if(f&&typeof f!="boolean"&&!Vn(f)){const h=Array.isArray(f)?f:[f];for(let m=0;m<h.length;m++){const p=Ys(e,h[m]);if(p){const{transitionEnd:y,transition:v,...x}=p;for(const C in x){let N=x[C];if(Array.isArray(N)){const I=d?N.length-1:0;N=N[I]}N!==null&&(i[C]=N)}for(const C in y)i[C]=y[C]}}}return i}const wl=e=>(t,n)=>{const s=b.useContext(Wn),i=b.useContext(Qt),r=()=>w0(e,t,s,i);return n?r():Sn(r)},T0=wl({scrapeMotionValuesFromProps:fi,createRenderState:gi}),E0=wl({scrapeMotionValuesFromProps:Ea,createRenderState:vl}),C0=Symbol.for("motionComponentSymbol");function N0(e,t,n){const s=b.useRef(n);b.useInsertionEffect(()=>{s.current=n});const i=b.useRef(null);return b.useCallback(r=>{r&&e.onMount?.(r),t&&(r?t.mount(r):t.unmount());const o=s.current;if(typeof o=="function")if(r){const l=o(r);typeof l=="function"&&(i.current=l)}else i.current?(i.current(),i.current=null):o(r);else o&&(o.current=r)},[t])}const Sl=b.createContext({});function Wt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function k0(e,t,n,s,i,r){const{visualElement:o}=b.useContext(Wn),l=b.useContext(hl),c=b.useContext(Qt),u=b.useContext($n),d=u.reducedMotion,f=u.skipAnimations,h=b.useRef(null),m=b.useRef(!1);s=s||l.renderer,!h.current&&s&&(h.current=s(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:d,skipAnimations:f,isSVG:r}),m.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const p=h.current,y=b.useContext(Sl);p&&!p.projection&&i&&(p.type==="html"||p.type==="svg")&&P0(h.current,n,i,y);const v=b.useRef(!1);b.useInsertionEffect(()=>{p&&v.current&&p.update(n,c)});const x=n[Dr],C=b.useRef(!!x&&!window.MotionHandoffIsComplete?.(x)&&window.MotionHasOptimisedAnimation?.(x));return ko(()=>{m.current=!0,p&&(v.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),C.current&&p.animationState&&p.animationState.animateChanges())}),b.useEffect(()=>{p&&(!C.current&&p.animationState&&p.animationState.animateChanges(),C.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(x)}),C.current=!1),p.enteringChildren=void 0)}),p}function P0(e,t,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:l,layoutScroll:c,layoutRoot:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Tl(e.parent)),e.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||l&&Wt(l),visualElement:e,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,crossfade:d,layoutScroll:c,layoutRoot:u})}function Tl(e){if(e)return e.options.allowProjection!==!1?e.projection:Tl(e.parent)}function yi(e,{forwardMotionProps:t=!1,type:n}={},s,i){s&&c0(s);const r=n?n==="svg":bi(e),o=r?E0:T0;function l(u,d){let f;const h={...b.useContext($n),...u,layoutId:j0(u)},{isStatic:m}=h,p=m0(u),y=o(u,m);if(!m&&No){I0(h,s);const v=M0(h);f=v.MeasureLayout,p.visualElement=k0(e,y,h,i,v.ProjectionNode,r)}return a.jsxs(Wn.Provider,{value:p,children:[f&&p.visualElement?a.jsx(f,{visualElement:p.visualElement,...h}):null,v0(e,u,N0(y,p.visualElement,d),y,m,t,r)]})}l.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=b.forwardRef(l);return c[C0]=e,c}function j0({layoutId:e}){const t=b.useContext(as).id;return t&&e!==void 0?t+"-"+e:e}function I0(e,t){const n=b.useContext(hl).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Mt(!1,s,"lazy-strict-mode"):Ye(!1,s,"lazy-strict-mode")}}function M0(e){const t=gl(),{drag:n,layout:s}=t;if(!n&&!s)return{};const i={...n,...s};return{MeasureLayout:n?.isEnabled(e)||s?.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function A0(e,t){if(typeof Proxy>"u")return yi;const n=new Map,s=(r,o)=>yi(r,o,e,t),i=(r,o)=>(process.env.NODE_ENV!=="production"&&ds(!1,"motion() is deprecated. Use motion.create() instead."),s(r,o));return new Proxy(i,{get:(r,o)=>o==="create"?s:(n.has(o)||n.set(o,yi(o,void 0,e,t)),n.get(o))})}const V0=(e,t)=>t.isSVG??bi(e)?new Ca(t):new va(t,{allowProjection:e!==b.Fragment});class O0 extends ct{constructor(t){super(t),t.animationState||(t.animationState=ph(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Vn(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(){this.node.animationState.reset(),this.unmountControls?.()}}let L0=0;class D0 extends ct{constructor(){super(...arguments),this.id=L0++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.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 R0={animation:{Feature:O0},exit:{Feature:D0}};function mn(e){return{point:{x:e.pageX,y:e.pageY}}}const _0=e=>t=>ni(t)&&e(t,mn(t));function pn(e,t,n,s){return hn(e,t,_0(n),s)}const El=({current:e})=>e?e.ownerDocument.defaultView:null,Cl=(e,t)=>Math.abs(e-t);function F0(e,t){const n=Cl(e.x,t.x),s=Cl(e.y,t.y);return Math.sqrt(n**2+s**2)}const Nl=new Set(["auto","scroll"]);class kl{constructor(t,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:r=!1,distanceThreshold:o=3,element:l}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=m=>{this.handleScroll(m.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=vi(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,y=F0(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!y)return;const{point:v}=m,{timestamp:x}=Ve;this.history.push({...v,timestamp:x});const{onStart:C,onMove:N}=this.handlers;p||(C&&C(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),N&&N(this.lastMoveEvent,m)},this.handlePointerMove=(m,p)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=xi(p,this.transformPagePoint),ge.update(this.updatePoint,!0)},this.handlePointerUp=(m,p)=>{this.end();const{onEnd:y,onSessionEnd:v,resumeAnimation:x}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const C=vi(m.type==="pointercancel"?this.lastMoveEventInfo:xi(p,this.transformPagePoint),this.history);this.startEvent&&y&&y(m,C),v&&v(m,C)},!ni(t))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=o,this.contextWindow=i||window;const c=mn(t),u=xi(c,this.transformPagePoint),{point:d}=u,{timestamp:f}=Ve;this.history=[{...d,timestamp:f}];const{onSessionStart:h}=n;h&&h(t,vi(u,this.history)),this.removeListeners=en(pn(this.contextWindow,"pointermove",this.handlePointerMove),pn(this.contextWindow,"pointerup",this.handlePointerUp),pn(this.contextWindow,"pointercancel",this.handlePointerUp)),l&&this.startScrollTracking(l)}startScrollTracking(t){let n=t.parentElement;for(;n;){const s=getComputedStyle(n);(Nl.has(s.overflowX)||Nl.has(s.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const s=t===window,i=s?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},r={x:i.x-n.x,y:i.y-n.y};r.x===0&&r.y===0||(s?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=r.x,this.lastMoveEventInfo.point.y+=r.y):this.history.length>0&&(this.history[0].x-=r.x,this.history[0].y-=r.y),this.scrollPositions.set(t,i),ge.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ot(this.updatePoint)}}function xi(e,t){return t?{point:t(e.point)}:e}function Pl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function vi({point:e},t){return{point:e,delta:Pl(e,jl(t)),offset:Pl(e,$0(t)),velocity:B0(t,.1)}}function $0(e){return e[0]}function jl(e){return e[e.length-1]}function B0(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,s=null;const i=jl(e);for(;n>=0&&(s=e[n],!(i.timestamp-s.timestamp>Fe(t)));)n--;if(!s)return{x:0,y:0};s===e[0]&&e.length>2&&i.timestamp-s.timestamp>Fe(t)*2&&(s=e[1]);const r=Be(i.timestamp-s.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function z0(e,{min:t,max:n},s){return t!==void 0&&e<t?e=s?ve(t,e,s.min):Math.max(e,t):n!==void 0&&e>n&&(e=s?ve(n,e,s.max):Math.min(e,n)),e}function Il(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 W0(e,{top:t,left:n,bottom:s,right:i}){return{x:Il(e.x,n,i),y:Il(e.y,t,s)}}function Ml(e,t){let n=t.min-e.min,s=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,s]=[s,n]),{min:n,max:s}}function Y0(e,t){return{x:Ml(e.x,t.x),y:Ml(e.y,t.y)}}function U0(e,t){let n=.5;const s=De(e),i=De(t);return i>s?n=At(t.min,t.max-s,e.min):s>i&&(n=At(e.min,e.max-i,t.min)),Ke(0,1,n)}function H0(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 wi=.35;function X0(e=wi){return e===!1?e=0:e===!0&&(e=wi),{x:Al(e,"left","right"),y:Al(e,"top","bottom")}}function Al(e,t,n){return{min:Vl(e,t),max:Vl(e,n)}}function Vl(e,t){return typeof e=="number"?e:e[t]||0}const G0=new WeakMap;class K0{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=Ee(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const r=f=>{n&&this.snapToCursor(mn(f).point),this.stopAnimation()},o=(f,h)=>{const{drag:m,dragPropagation:p,onDragStart:y}=this.getProps();if(m&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Nf(m),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),qe(x=>{let C=this.getAxisMotionValue(x).get()||0;if(Ze.test(C)){const{projection:N}=this.visualElement;if(N&&N.layout){const I=N.layout.layoutBox[x];I&&(C=De(I)*(parseFloat(C)/100))}}this.originPoint[x]=C}),y&&ge.update(()=>y(f,h),!1,!0),Hs(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},l=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h;const{dragPropagation:m,dragDirectionLock:p,onDirectionLock:y,onDrag:v}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:x}=h;if(p&&this.currentDirection===null){this.currentDirection=q0(x),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",h.point,x),this.updateAxis("y",h.point,x),this.visualElement.render(),v&&ge.update(()=>v(f,h),!1,!0)},c=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h,this.stop(f,h),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:f}=this.getProps();(f||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:d}=this.getProps();this.panSession=new kl(t,{onSessionStart:r,onStart:o,onMove:l,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:s,contextWindow:El(this.visualElement),element:this.visualElement.current})}stop(t,n){const s=t||this.latestPointerEvent,i=n||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!i||!s)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:l}=this.getProps();l&&ge.postRender(()=>l(s,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,s){const{drag:i}=this.getProps();if(!s||!Yn(t,i,this.currentDirection))return;const r=this.getAxisMotionValue(t);let o=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(o=z0(o,this.constraints[t],this.elastic[t])),r.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&Wt(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&s?this.constraints=W0(s.layoutBox,t):this.constraints=!1,this.elastic=X0(n),i!==this.constraints&&!Wt(t)&&s&&this.constraints&&!this.hasMutatedConstraints&&qe(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=H0(s.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Wt(t))return!1;const s=t.current;Ye(s!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=Jf(s,i.root,this.visualElement.getTransformPagePoint());let o=Y0(i.layout.layoutBox,r);if(n){const l=n(Kf(o));this.hasMutatedConstraints=!!l,l&&(o=la(l))}return o}startAnimation(t){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=qe(d=>{if(!Yn(d,n,this.currentDirection))return;let f=c&&c[d]||{};o&&(f={min:0,max:0});const h=i?200:1e6,m=i?40:1e7,p={type:"inertia",velocity:s?t[d]:0,bounceStiffness:h,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...r,...f};return this.startAxisValueAnimation(d,p)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const s=this.getAxisMotionValue(t);return Hs(this.visualElement,t),s.start(Ws(t,s,0,n,this.visualElement,!1))}stopAnimation(){qe(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(t,(s.initial?s.initial[t]:void 0)||0)}snapToCursor(t){qe(n=>{const{drag:s}=this.getProps();if(!Yn(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:l}=i.layout.layoutBox[n],c=r.get()||0;r.set(t[n]-ve(o,l,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!Wt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};qe(o=>{const l=this.getAxisMotionValue(o);if(l&&this.constraints!==!1){const c=l.get();i[o]=U0({min:c,max:c},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.constraints=!1,this.resolveConstraints(),qe(o=>{if(!Yn(o,t,null))return;const l=this.getAxisMotionValue(o),{min:c,max:u}=this.constraints[o];l.set(ve(c,u,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;G0.set(this.visualElement,this);const t=this.visualElement.current,n=pn(t,"pointerdown",u=>{const{drag:d,dragListener:f=!0}=this.getProps(),h=u.target,m=h!==t&&Af(h);d&&f&&!m&&this.start(u)});let s;const i=()=>{const{dragConstraints:u}=this.getProps();Wt(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),s||(s=Z0(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:r}=this.visualElement,o=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),ge.read(i);const l=hn(window,"resize",()=>this.scalePositionWithinConstraints()),c=r.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:d})=>{this.isDragging&&d&&(qe(f=>{const h=this.getAxisMotionValue(f);h&&(this.originPoint[f]+=u[f].translate,h.set(h.get()+u[f].translate))}),this.visualElement.render())}));return()=>{l(),n(),o(),c&&c(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=wi,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:l}}}function Ol(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Z0(e,t,n){const s=Jr(e,Ol(n)),i=Jr(t,Ol(n));return()=>{s(),i()}}function Yn(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function q0(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class J0 extends ct{constructor(t){super(t),this.removeGroupControls=$e,this.removeListeners=$e,this.controls=new K0(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||$e}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Si=e=>(t,n)=>{e&&ge.update(()=>e(t,n),!1,!0)};class Q0 extends ct{constructor(){super(...arguments),this.removePointerDownListener=$e}onPointerDown(t){this.session=new kl(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:El(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Si(t),onStart:Si(n),onMove:Si(s),onEnd:(r,o)=>{delete this.session,i&&ge.postRender(()=>i(r,o))}}}mount(){this.removePointerDownListener=pn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Ti=!1;class em extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:r}=t;r&&(n.group&&n.group.add(r),s&&s.register&&i&&s.register(r),Ti&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Fn.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:s,drag:i,isPresent:r}=this.props,{projection:o}=s;return o&&(o.isPresent=r,t.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),Ti=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==r?o.willUpdate():this.safeToRemove(),t.isPresent!==r&&(r?o.promote():o.relegate()||ge.postRender(()=>{const l=o.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),ti.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=t;Ti=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Ll(e){const[t,n]=dl(),s=b.useContext(as);return a.jsx(em,{...e,layoutGroup:s,switchLayoutGroup:b.useContext(Sl),isPresent:t,safeToRemove:n})}const tm={pan:{Feature:Q0},drag:{Feature:J0,ProjectionNode:cl,MeasureLayout:Ll}};function Dl(e,t,n){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,r=s[i];r&&ge.postRender(()=>r(t,mn(t)))}class nm extends ct{mount(){const{current:t}=this.node;t&&(this.unmount=Pf(t,(n,s)=>(Dl(this.node,s,"Start"),i=>Dl(this.node,i,"End"))))}unmount(){}}class sm extends ct{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=en(hn(this.node.current,"focus",()=>this.onFocus()),hn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Rl(e,t,n){const{props:s}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),r=s[i];r&&ge.postRender(()=>r(t,mn(t)))}class im extends ct{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=Of(t,(i,r)=>(Rl(this.node,r,"Start"),(o,{success:l})=>Rl(this.node,o,l?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:s?.tap===!1})}unmount(){}}const Ei=new WeakMap,Ci=new WeakMap,om=e=>{const t=Ei.get(e.target);t&&t(e)},rm=e=>{e.forEach(om)};function am({root:e,...t}){const n=e||document;Ci.has(n)||Ci.set(n,{});const s=Ci.get(n),i=JSON.stringify(t);return s[i]||(s[i]=new IntersectionObserver(rm,{root:e,...t})),s[i]}function lm(e,t,n){const s=am(t);return Ei.set(e,n),s.observe(e),()=>{Ei.delete(e),s.unobserve(e)}}const cm={some:0,all:1};class um extends ct{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:r}=t,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:cm[i]},l=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,r&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),h=u?d:f;h&&h(c)};return lm(this.node.current,o,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(dm(t,n))&&this.startObserver()}unmount(){}}function dm({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const fm={...R0,...{inView:{Feature:um},tap:{Feature:im},focus:{Feature:sm},hover:{Feature:nm}},...tm,...{layout:{ProjectionNode:cl,MeasureLayout:Ll}}},S=A0(fm,V0);function hm(e){const t=Sn(()=>lt(e)),{isStatic:n}=b.useContext($n);if(n){const[,s]=b.useState(e);b.useEffect(()=>t.on("change",s),[])}return t}function Ni(e){return typeof e=="object"&&!Array.isArray(e)}function _l(e,t,n,s){return e==null?[]:typeof e=="string"&&Ni(t)?Qs(e,n,s):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(i=>i!=null):[e]}function mm(e,t,n){return e*(t+1)}function Fl(e,t,n,s){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:t.startsWith("<")?Math.max(0,n+parseFloat(t.slice(1))):s.get(t)??e}function pm(e,t,n){for(let s=0;s<e.length;s++){const i=e[s];i.at>t&&i.at<n&&(It(e,i),s--)}}function gm(e,t,n,s,i,r){pm(e,i,r);for(let o=0;o<t.length;o++)e.push({value:t[o],at:ve(i,r,s[o]),easing:Yo(n,o)})}function bm(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function ym(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const xm="easeInOut",vm=20;function wm(e,{defaultTransition:t={},...n}={},s,i){const r=t.duration||.3,o=new Map,l=new Map,c={},u=new Map;let d=0,f=0,h=0;for(let m=0;m<e.length;m++){const p=e[m];if(typeof p=="string"){u.set(p,f);continue}else if(!Array.isArray(p)){u.set(p.name,Fl(f,p.at,d,u));continue}let[y,v,x={}]=p;x.at!==void 0&&(f=Fl(f,x.at,d,u));let C=0;const N=(I,A,k,E=0,w=0)=>{const j=Sm(I),{delay:$=0,times:z=mr(j),type:Q=t.type||"keyframes",repeat:R,repeatType:se,repeatDelay:U=0,...J}=A;let{ease:V=t.ease||"easeOut",duration:P}=A;const _=typeof $=="function"?$(E,w):$,M=j.length,T=Fs(Q)?Q:i?.[Q||"keyframes"];if(M<=2&&T){let re=100;if(M===2&&Cm(j)){const ye=j[1]-j[0];re=Math.abs(ye)}const ae={...t,...J};P!==void 0&&(ae.duration=Fe(P));const le=ur(ae,re,T);V=le.ease,P=le.duration}P??(P=r);const O=f+_;z.length===1&&z[0]===0&&(z[1]=1);const ne=z.length-j.length;if(ne>0&&hr(z,ne),j.length===1&&j.unshift(null),R){Ye(R<vm,"Repeat count too high, must be less than 20","repeat-count-high"),P=mm(P,R);const re=[...j],ae=[...z];V=Array.isArray(V)?[...V]:[V];const le=[...V];for(let ye=0;ye<R;ye++){j.push(...re);for(let ue=0;ue<re.length;ue++)z.push(ae[ue]+(ye+1)),V.push(ue===0?"linear":Yo(le,ue-1))}bm(z,R)}const ie=O+P;gm(k,j,V,z,O,ie),C=Math.max(_+P,C),h=Math.max(ie,h)};if(je(y)){const I=$l(y,l);N(v,x,Bl("default",I))}else{const I=_l(y,v,s,c),A=I.length;for(let k=0;k<A;k++){v=v,x=x;const E=I[k],w=$l(E,l);for(const j in v)N(v[j],Tm(x,j),Bl(j,w),k,A)}}d=f,f+=C}return l.forEach((m,p)=>{for(const y in m){const v=m[y];v.sort(ym);const x=[],C=[],N=[];for(let E=0;E<v.length;E++){const{at:w,value:j,easing:$}=v[E];x.push(j),C.push(At(0,h,w)),N.push($||"easeOut")}C[0]!==0&&(C.unshift(0),x.unshift(x[0]),N.unshift(xm)),C[C.length-1]!==1&&(C.push(1),x.push(null)),o.has(p)||o.set(p,{keyframes:{},transition:{}});const I=o.get(p);I.keyframes[y]=x;const{type:A,...k}=t;I.transition[y]={...k,duration:h,ease:N,times:C,...n}}}),o}function $l(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Bl(e,t){return t[e]||(t[e]=[]),t[e]}function Sm(e){return Array.isArray(e)?e:[e]}function Tm(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const Em=e=>typeof e=="number",Cm=e=>e.every(Em);function Nm(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=jn(e)&&!Qr(e)?new Ca(t):new va(t);n.mount(e),cn.set(e,n)}function km(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new oh(t);n.mount(e),cn.set(e,n)}function Pm(e,t){return je(e)||typeof e=="number"||typeof e=="string"&&!Ni(t)}function zl(e,t,n,s){const i=[];if(Pm(e,t))i.push(qa(e,Ni(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return i;const r=_l(e,t,s),o=r.length;Ye(!!o,"No valid elements provided.","no-valid-elements");for(let l=0;l<o;l++){const c=r[l],u=c instanceof Element?Nm:km;cn.has(c)||u(c);const d=cn.get(c),f={...n};"delay"in f&&typeof f.delay=="function"&&(f.delay=f.delay(l,o)),i.push(...Gs(d,{...t,transition:f},{}))}}return i}function jm(e,t,n){const s=[],i=e.map(o=>{if(Array.isArray(o)&&typeof o[0]=="function"){const l=o[0],c=lt(0);return c.on("change",l),o.length===1?[c,[0,1]]:o.length===2?[c,[0,1],o[1]]:[c,o[1],o[2]]}return o});return wm(i,t,n,{spring:an}).forEach(({keyframes:o,transition:l},c)=>{s.push(...zl(c,o,l))}),s}function Im(e){return Array.isArray(e)&&e.some(Array.isArray)}function Mm(e={}){const{scope:t,reduceMotion:n}=e;function s(i,r,o){let l=[],c;if(Im(i))l=jm(i,n!==void 0?{reduceMotion:n,...r}:r,t);else{const{onComplete:d,...f}=o||{};typeof d=="function"&&(c=d),l=zl(i,r,n!==void 0?{reduceMotion:n,...f}:f,t)}const u=new Xd(l);return c&&u.finished.then(c),t&&(t.animations.push(u),u.finished.then(()=>{It(t.animations,u)})),u}return s}const ki=Mm(),Wl=({onClick:e})=>a.jsx(S.button,{className:"inline-flex items-center gap-1 sm:gap-2 px-3 sm:px-4 md:px-6 py-2 sm:py-3 bg-slate-800/80 hover:bg-slate-700/80 text-cyan-300 font-medium text-xs sm:text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-slate-500/25 border border-cyan-400/30 hover:border-cyan-400/60",whileHover:{scale:1.05},whileTap:{scale:.95},initial:{opacity:0},animate:{opacity:1},transition:{delay:0,duration:.6},onClick:e,children:a.jsx(F.Grid2x2,{className:"w-3 h-3 sm:w-4 sm:h-4"})}),Pi=({Icon:e,onClick:t,delay:n=0})=>a.jsx(S.button,{className:"inline-flex items-center gap-1 sm:gap-2 px-3 sm:px-4 md:px-6 py-2 sm:py-3 bg-slate-800/80 hover:bg-slate-700/80 text-cyan-300 font-medium text-xs sm:text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-slate-500/25 border border-cyan-400/30 hover:border-cyan-400/60",whileHover:{scale:1.05},whileTap:{scale:.95},initial:{opacity:0},animate:{opacity:1},transition:{delay:n,duration:.6},onClick:t,children:a.jsx(e,{className:"w-3 h-3 sm:w-4 sm:h-4"})});function Yl({iconName:e,className:t}){const n=rs[e];return n?a.jsx(n,{className:t}):null}const Un=({item:e,onClick:t})=>a.jsx(a.Fragment,{children:a.jsx(S.button,{className:"inline-flex items-center gap-1 sm:gap-2 px-3 sm:px-4 md:px-6 py-2 sm:py-3 bg-slate-800/80 hover:bg-slate-700/80 text-cyan-300 font-medium text-xs sm:text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-slate-500/25 border border-cyan-400/30 hover:border-cyan-400/60",whileHover:{scale:1.05},whileTap:{scale:.95},initial:{opacity:0},animate:{opacity:1},transition:{delay:0,duration:.6},onClick:t,children:a.jsxs(a.Fragment,{children:[e.text,a.jsx(Yl,{iconName:e.icon,className:"w-3 h-3 sm:w-4 sm:h-4"})]})})}),ji=b.createContext(void 0),Am=({children:e})=>{const[t,n]=b.useState(!1),s=b.useCallback(r=>{n(r)},[]),i=b.useCallback(()=>{n(r=>!r)},[]);return a.jsx(ji.Provider,{value:{isMinimized:t,setMinimized:s,toggleMinimized:i},children:e})},Vm=()=>{const e=b.useContext(ji);if(!e)throw new Error("useMinimize debe ser usado dentro de un MinimizeProvider");return e},Ii=()=>b.useContext(ji),Ul=b.createContext({lastEvent:null,setLastEvent:()=>{},internalEvent:null,setInternalEvent:()=>{}}),Om=({children:e})=>{const[t,n]=b.useState(null),[s,i]=b.useState(null);return a.jsx(Ul.Provider,{value:{lastEvent:t,setLastEvent:n,internalEvent:s,setInternalEvent:i},children:e})},vt=()=>b.useContext(Ul);function Hl(e){var t,n,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Hl(e[t]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}function Xl(){for(var e,t,n=0,s="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Hl(e))&&(s&&(s+=" "),s+=t);return s}const Lm=(e,t)=>{const n=new Array(e.length+t.length);for(let s=0;s<e.length;s++)n[s]=e[s];for(let s=0;s<t.length;s++)n[e.length+s]=t[s];return n},Dm=(e,t)=>({classGroupId:e,validator:t}),Gl=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Hn="-",Kl=[],Rm="arbitrary..",_m=e=>{const t=$m(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return Fm(o);const l=o.split(Hn),c=l[0]===""&&l.length>1?1:0;return Zl(l,c,t)},getConflictingClassGroupIds:(o,l)=>{if(l){const c=s[o],u=n[o];return c?u?Lm(u,c):c:u||Kl}return n[o]||Kl}}},Zl=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],r=n.nextPart.get(i);if(r){const u=Zl(e,t+1,r);if(u)return u}const o=n.validators;if(o===null)return;const l=t===0?e.join(Hn):e.slice(t).join(Hn),c=o.length;for(let u=0;u<c;u++){const d=o[u];if(d.validator(l))return d.classGroupId}},Fm=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),s=t.slice(0,n);return s?Rm+s:void 0})(),$m=e=>{const{theme:t,classGroups:n}=e;return Bm(n,t)},Bm=(e,t)=>{const n=Gl();for(const s in e){const i=e[s];Mi(i,n,s,t)}return n},Mi=(e,t,n,s)=>{const i=e.length;for(let r=0;r<i;r++){const o=e[r];zm(o,t,n,s)}},zm=(e,t,n,s)=>{if(typeof e=="string"){Wm(e,t,n);return}if(typeof e=="function"){Ym(e,t,n,s);return}Um(e,t,n,s)},Wm=(e,t,n)=>{const s=e===""?t:ql(t,e);s.classGroupId=n},Ym=(e,t,n,s)=>{if(Hm(e)){Mi(e(s),t,n,s);return}t.validators===null&&(t.validators=[]),t.validators.push(Dm(n,e))},Um=(e,t,n,s)=>{const i=Object.entries(e),r=i.length;for(let o=0;o<r;o++){const[l,c]=i[o];Mi(c,ql(t,l),n,s)}},ql=(e,t)=>{let n=e;const s=t.split(Hn),i=s.length;for(let r=0;r<i;r++){const o=s[r];let l=n.nextPart.get(o);l||(l=Gl(),n.nextPart.set(o,l)),n=l}return n},Hm=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Xm=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),s=Object.create(null);const i=(r,o)=>{n[r]=o,t++,t>e&&(t=0,s=n,n=Object.create(null))};return{get(r){let o=n[r];if(o!==void 0)return o;if((o=s[r])!==void 0)return i(r,o),o},set(r,o){r in n?n[r]=o:i(r,o)}}},Ai="!",Jl=":",Gm=[],Ql=(e,t,n,s,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:s,isExternal:i}),Km=e=>{const{prefix:t,experimentalParseClassName:n}=e;let s=i=>{const r=[];let o=0,l=0,c=0,u;const d=i.length;for(let y=0;y<d;y++){const v=i[y];if(o===0&&l===0){if(v===Jl){r.push(i.slice(c,y)),c=y+1;continue}if(v==="/"){u=y;continue}}v==="["?o++:v==="]"?o--:v==="("?l++:v===")"&&l--}const f=r.length===0?i:i.slice(c);let h=f,m=!1;f.endsWith(Ai)?(h=f.slice(0,-1),m=!0):f.startsWith(Ai)&&(h=f.slice(1),m=!0);const p=u&&u>c?u-c:void 0;return Ql(r,m,h,p)};if(t){const i=t+Jl,r=s;s=o=>o.startsWith(i)?r(o.slice(i.length)):Ql(Gm,!1,o,void 0,!0)}if(n){const i=s;s=r=>n({className:r,parseClassName:i})}return s},Zm=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,s)=>{t.set(n,1e6+s)}),n=>{const s=[];let i=[];for(let r=0;r<n.length;r++){const o=n[r],l=o[0]==="[",c=t.has(o);l||c?(i.length>0&&(i.sort(),s.push(...i),i=[]),s.push(o)):i.push(o)}return i.length>0&&(i.sort(),s.push(...i)),s}},qm=e=>({cache:Xm(e.cacheSize),parseClassName:Km(e),sortModifiers:Zm(e),..._m(e)}),Jm=/\s+/,Qm=(e,t)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:i,sortModifiers:r}=t,o=[],l=e.trim().split(Jm);let c="";for(let u=l.length-1;u>=0;u-=1){const d=l[u],{isExternal:f,modifiers:h,hasImportantModifier:m,baseClassName:p,maybePostfixModifierPosition:y}=n(d);if(f){c=d+(c.length>0?" "+c:c);continue}let v=!!y,x=s(v?p.substring(0,y):p);if(!x){if(!v){c=d+(c.length>0?" "+c:c);continue}if(x=s(p),!x){c=d+(c.length>0?" "+c:c);continue}v=!1}const C=h.length===0?"":h.length===1?h[0]:r(h).join(":"),N=m?C+Ai:C,I=N+x;if(o.indexOf(I)>-1)continue;o.push(I);const A=i(x,v);for(let k=0;k<A.length;++k){const E=A[k];o.push(N+E)}c=d+(c.length>0?" "+c:c)}return c},ep=(...e)=>{let t=0,n,s,i="";for(;t<e.length;)(n=e[t++])&&(s=ec(n))&&(i&&(i+=" "),i+=s);return i},ec=e=>{if(typeof e=="string")return e;let t,n="";for(let s=0;s<e.length;s++)e[s]&&(t=ec(e[s]))&&(n&&(n+=" "),n+=t);return n},tp=(e,...t)=>{let n,s,i,r;const o=c=>{const u=t.reduce((d,f)=>f(d),e());return n=qm(u),s=n.cache.get,i=n.cache.set,r=l,l(c)},l=c=>{const u=s(c);if(u)return u;const d=Qm(c,n);return i(c,d),d};return r=o,(...c)=>r(ep(...c))},np=[],Pe=e=>{const t=n=>n[e]||np;return t.isThemeGetter=!0,t},tc=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,nc=/^\((?:(\w[\w-]*):)?(.+)\)$/i,sp=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ip=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,op=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,rp=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ap=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,lp=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ut=e=>sp.test(e),ce=e=>!!e&&!Number.isNaN(Number(e)),dt=e=>!!e&&Number.isInteger(Number(e)),Vi=e=>e.endsWith("%")&&ce(e.slice(0,-1)),nt=e=>ip.test(e),sc=()=>!0,cp=e=>op.test(e)&&!rp.test(e),Oi=()=>!1,up=e=>ap.test(e),dp=e=>lp.test(e),fp=e=>!K(e)&&!Z(e),hp=e=>ft(e,cc,Oi),K=e=>tc.test(e),wt=e=>ft(e,uc,cp),ic=e=>ft(e,wp,ce),mp=e=>ft(e,fc,sc),pp=e=>ft(e,dc,Oi),oc=e=>ft(e,ac,Oi),gp=e=>ft(e,lc,dp),Xn=e=>ft(e,hc,up),Z=e=>nc.test(e),gn=e=>St(e,uc),bp=e=>St(e,dc),rc=e=>St(e,ac),yp=e=>St(e,cc),xp=e=>St(e,lc),Gn=e=>St(e,hc,!0),vp=e=>St(e,fc,!0),ft=(e,t,n)=>{const s=tc.exec(e);return s?s[1]?t(s[1]):n(s[2]):!1},St=(e,t,n=!1)=>{const s=nc.exec(e);return s?s[1]?t(s[1]):n:!1},ac=e=>e==="position"||e==="percentage",lc=e=>e==="image"||e==="url",cc=e=>e==="length"||e==="size"||e==="bg-size",uc=e=>e==="length",wp=e=>e==="number",dc=e=>e==="family-name",fc=e=>e==="number"||e==="weight",hc=e=>e==="shadow",Sp=tp(()=>{const e=Pe("color"),t=Pe("font"),n=Pe("text"),s=Pe("font-weight"),i=Pe("tracking"),r=Pe("leading"),o=Pe("breakpoint"),l=Pe("container"),c=Pe("spacing"),u=Pe("radius"),d=Pe("shadow"),f=Pe("inset-shadow"),h=Pe("text-shadow"),m=Pe("drop-shadow"),p=Pe("blur"),y=Pe("perspective"),v=Pe("aspect"),x=Pe("ease"),C=Pe("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...I(),Z,K],k=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],w=()=>[Z,K,c],j=()=>[ut,"full","auto",...w()],$=()=>[dt,"none","subgrid",Z,K],z=()=>["auto",{span:["full",dt,Z,K]},dt,Z,K],Q=()=>[dt,"auto",Z,K],R=()=>["auto","min","max","fr",Z,K],se=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],U=()=>["start","end","center","stretch","center-safe","end-safe"],J=()=>["auto",...w()],V=()=>[ut,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],P=()=>[ut,"screen","full","dvw","lvw","svw","min","max","fit",...w()],_=()=>[ut,"screen","full","lh","dvh","lvh","svh","min","max","fit",...w()],M=()=>[e,Z,K],T=()=>[...I(),rc,oc,{position:[Z,K]}],O=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ne=()=>["auto","cover","contain",yp,hp,{size:[Z,K]}],ie=()=>[Vi,gn,wt],re=()=>["","none","full",u,Z,K],ae=()=>["",ce,gn,wt],le=()=>["solid","dashed","dotted","double"],ye=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ue=()=>[ce,Vi,rc,oc],Ne=()=>["","none",p,Z,K],W=()=>["none",ce,Z,K],he=()=>["none",ce,Z,K],be=()=>[ce,Z,K],ke=()=>[ut,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[nt],breakpoint:[nt],color:[sc],container:[nt],"drop-shadow":[nt],ease:["in","out","in-out"],font:[fp],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[nt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[nt],shadow:[nt],spacing:["px",ce],text:[nt],"text-shadow":[nt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ut,K,Z,v]}],container:["container"],columns:[{columns:[ce,K,Z,l]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:A()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:j()}],"inset-x":[{"inset-x":j()}],"inset-y":[{"inset-y":j()}],start:[{"inset-s":j(),start:j()}],end:[{"inset-e":j(),end:j()}],"inset-bs":[{"inset-bs":j()}],"inset-be":[{"inset-be":j()}],top:[{top:j()}],right:[{right:j()}],bottom:[{bottom:j()}],left:[{left:j()}],visibility:["visible","invisible","collapse"],z:[{z:[dt,"auto",Z,K]}],basis:[{basis:[ut,"full","auto",l,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ce,ut,"auto","initial","none",K]}],grow:[{grow:["",ce,Z,K]}],shrink:[{shrink:["",ce,Z,K]}],order:[{order:[dt,"first","last","none",Z,K]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:z()}],"col-start":[{"col-start":Q()}],"col-end":[{"col-end":Q()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:z()}],"row-start":[{"row-start":Q()}],"row-end":[{"row-end":Q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":R()}],"auto-rows":[{"auto-rows":R()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...se(),"normal"]}],"justify-items":[{"justify-items":[...U(),"normal"]}],"justify-self":[{"justify-self":["auto",...U()]}],"align-content":[{content:["normal",...se()]}],"align-items":[{items:[...U(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...U(),{baseline:["","last"]}]}],"place-content":[{"place-content":se()}],"place-items":[{"place-items":[...U(),"baseline"]}],"place-self":[{"place-self":["auto",...U()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:J()}],mx:[{mx:J()}],my:[{my:J()}],ms:[{ms:J()}],me:[{me:J()}],mbs:[{mbs:J()}],mbe:[{mbe:J()}],mt:[{mt:J()}],mr:[{mr:J()}],mb:[{mb:J()}],ml:[{ml:J()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:V()}],"inline-size":[{inline:["auto",...P()]}],"min-inline-size":[{"min-inline":["auto",...P()]}],"max-inline-size":[{"max-inline":["none",...P()]}],"block-size":[{block:["auto",..._()]}],"min-block-size":[{"min-block":["auto",..._()]}],"max-block-size":[{"max-block":["none",..._()]}],w:[{w:[l,"screen",...V()]}],"min-w":[{"min-w":[l,"screen","none",...V()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[o]},...V()]}],h:[{h:["screen","lh",...V()]}],"min-h":[{"min-h":["screen","lh","none",...V()]}],"max-h":[{"max-h":["screen","lh",...V()]}],"font-size":[{text:["base",n,gn,wt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,vp,mp]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Vi,K]}],"font-family":[{font:[bp,pp,t]}],"font-features":[{"font-features":[K]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Z,K]}],"line-clamp":[{"line-clamp":[ce,"none",Z,ic]}],leading:[{leading:[r,...w()]}],"list-image":[{"list-image":["none",Z,K]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Z,K]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...le(),"wavy"]}],"text-decoration-thickness":[{decoration:[ce,"from-font","auto",Z,wt]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[ce,"auto",Z,K]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Z,K]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Z,K]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:T()}],"bg-repeat":[{bg:O()}],"bg-size":[{bg:ne()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},dt,Z,K],radial:["",Z,K],conic:[dt,Z,K]},xp,gp]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:re()}],"rounded-s":[{"rounded-s":re()}],"rounded-e":[{"rounded-e":re()}],"rounded-t":[{"rounded-t":re()}],"rounded-r":[{"rounded-r":re()}],"rounded-b":[{"rounded-b":re()}],"rounded-l":[{"rounded-l":re()}],"rounded-ss":[{"rounded-ss":re()}],"rounded-se":[{"rounded-se":re()}],"rounded-ee":[{"rounded-ee":re()}],"rounded-es":[{"rounded-es":re()}],"rounded-tl":[{"rounded-tl":re()}],"rounded-tr":[{"rounded-tr":re()}],"rounded-br":[{"rounded-br":re()}],"rounded-bl":[{"rounded-bl":re()}],"border-w":[{border:ae()}],"border-w-x":[{"border-x":ae()}],"border-w-y":[{"border-y":ae()}],"border-w-s":[{"border-s":ae()}],"border-w-e":[{"border-e":ae()}],"border-w-bs":[{"border-bs":ae()}],"border-w-be":[{"border-be":ae()}],"border-w-t":[{"border-t":ae()}],"border-w-r":[{"border-r":ae()}],"border-w-b":[{"border-b":ae()}],"border-w-l":[{"border-l":ae()}],"divide-x":[{"divide-x":ae()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ae()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...le(),"hidden","none"]}],"divide-style":[{divide:[...le(),"hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-bs":[{"border-bs":M()}],"border-color-be":[{"border-be":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...le(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ce,Z,K]}],"outline-w":[{outline:["",ce,gn,wt]}],"outline-color":[{outline:M()}],shadow:[{shadow:["","none",d,Gn,Xn]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",f,Gn,Xn]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[ce,wt]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":ae()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":["none",h,Gn,Xn]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[ce,Z,K]}],"mix-blend":[{"mix-blend":[...ye(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ye()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ce]}],"mask-image-linear-from-pos":[{"mask-linear-from":ue()}],"mask-image-linear-to-pos":[{"mask-linear-to":ue()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":ue()}],"mask-image-t-to-pos":[{"mask-t-to":ue()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":ue()}],"mask-image-r-to-pos":[{"mask-r-to":ue()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":ue()}],"mask-image-b-to-pos":[{"mask-b-to":ue()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":ue()}],"mask-image-l-to-pos":[{"mask-l-to":ue()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":ue()}],"mask-image-x-to-pos":[{"mask-x-to":ue()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":ue()}],"mask-image-y-to-pos":[{"mask-y-to":ue()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[Z,K]}],"mask-image-radial-from-pos":[{"mask-radial-from":ue()}],"mask-image-radial-to-pos":[{"mask-radial-to":ue()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":I()}],"mask-image-conic-pos":[{"mask-conic":[ce]}],"mask-image-conic-from-pos":[{"mask-conic-from":ue()}],"mask-image-conic-to-pos":[{"mask-conic-to":ue()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:T()}],"mask-repeat":[{mask:O()}],"mask-size":[{mask:ne()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Z,K]}],filter:[{filter:["","none",Z,K]}],blur:[{blur:Ne()}],brightness:[{brightness:[ce,Z,K]}],contrast:[{contrast:[ce,Z,K]}],"drop-shadow":[{"drop-shadow":["","none",m,Gn,Xn]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:["",ce,Z,K]}],"hue-rotate":[{"hue-rotate":[ce,Z,K]}],invert:[{invert:["",ce,Z,K]}],saturate:[{saturate:[ce,Z,K]}],sepia:[{sepia:["",ce,Z,K]}],"backdrop-filter":[{"backdrop-filter":["","none",Z,K]}],"backdrop-blur":[{"backdrop-blur":Ne()}],"backdrop-brightness":[{"backdrop-brightness":[ce,Z,K]}],"backdrop-contrast":[{"backdrop-contrast":[ce,Z,K]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ce,Z,K]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ce,Z,K]}],"backdrop-invert":[{"backdrop-invert":["",ce,Z,K]}],"backdrop-opacity":[{"backdrop-opacity":[ce,Z,K]}],"backdrop-saturate":[{"backdrop-saturate":[ce,Z,K]}],"backdrop-sepia":[{"backdrop-sepia":["",ce,Z,K]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Z,K]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ce,"initial",Z,K]}],ease:[{ease:["linear","initial",x,Z,K]}],delay:[{delay:[ce,Z,K]}],animate:[{animate:["none",C,Z,K]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,Z,K]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:W()}],"rotate-x":[{"rotate-x":W()}],"rotate-y":[{"rotate-y":W()}],"rotate-z":[{"rotate-z":W()}],scale:[{scale:he()}],"scale-x":[{"scale-x":he()}],"scale-y":[{"scale-y":he()}],"scale-z":[{"scale-z":he()}],"scale-3d":["scale-3d"],skew:[{skew:be()}],"skew-x":[{"skew-x":be()}],"skew-y":[{"skew-y":be()}],transform:[{transform:[Z,K,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ke()}],"translate-x":[{"translate-x":ke()}],"translate-y":[{"translate-y":ke()}],"translate-z":[{"translate-z":ke()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Z,K]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Z,K]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[ce,gn,wt,ic]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function bn(...e){return Sp(Xl(e))}const Tp=new Map([["fragata-f110","F110"],["submarino-s80","S80"],["portaaeronaves-lhd","L61"],["bam-is","BAM"],["bac","AOR"],["lcm","LCM"],["coex","COEX"],["pdmd","PDT"],["usv-poniente","poniente"],["usv","7M"],["fragata-ligera","corbeta"],["anfibio","anfibio"]]),mc=new Map([["F110","fragata-f110"],["S80","submarino-s80"],["L61","portaaeronaves-lhd"],["BAM","bam-is"],["AOR","bac"],["LCM","lcm"],["COEX","coex"],["PDT","pdmd"],["poniente","usv-poniente"],["7M","usv"],["corbeta","fragata-ligera"],["anfibio","anfibio"]]);function pc(e){return e==="/"?"global":e.slice(1).replace(/\//g,"-")}function Ep(e){return e==="/"?"general.mp4":`${e.substring(1)}.mp4`}const Yt={payload:{type:"cinematics",action:"start"}},gc={payload:{type:"cinematics",action:"end"}},bc=b.createContext({sendMessage:()=>{},isConnected:!1,reconnect:()=>{}}),Cp=({children:e})=>{const t=b.useRef(null),n=Se.useNavigate(),{setLastEvent:s}=vt(),i=b.useRef(null),[r,o]=b.useState(!1),l=xe().wsRoom,c=xe().wsUrl,u=b.useCallback(()=>{t.current=new WebSocket(c),t.current.onopen=()=>{console.log("✅ WS conectado"),t.current?.send(JSON.stringify({type:"join",room:l})),o(!0),i.current=window.setInterval(()=>{t.current?.readyState===WebSocket.OPEN&&(t.current?.send(JSON.stringify({type:"ping"})),console.log("📤 PING enviado"))},3e4)},t.current.onmessage=h=>{const m=JSON.parse(h.data);if(console.log("📩 WS mensaje recibido:",m),m?.payload?.type==="click"){const p=mc.get(m?.payload?.target);p&&n(`/product/${p}`)}m?.type==="pong"&&(r||o(!0)),s(m)},t.current.onclose=()=>{console.log("❌ WS cerrado"),o(!1),i.current&&clearInterval(i.current)},t.current.onerror=h=>{console.error("⚠️ Error en WS:",h),o(!1)}},[]);b.useEffect(()=>(u(),()=>{i.current&&clearInterval(i.current),t.current?.close()}),[u]);const d=h=>{t.current&&t.current.readyState===WebSocket.OPEN?t.current.send(JSON.stringify(h)):console.warn("⚠️ WS no está conectado aún")},f=()=>{u()};return a.jsx(bc.Provider,{value:{sendMessage:d,isConnected:r,reconnect:f},children:e})},Ut=()=>b.useContext(bc);function Np(){const e=Ii();if(!e)return null;const{isMinimized:t,toggleMinimized:n,setMinimized:s}=e,{sendMessage:i}=Ut(),{lastEvent:r}=vt(),o=xe().wsRoom;return b.useEffect(()=>{r?.payload?.type==="browser"&&r?.payload?.status==="visible"&&s(!1)},[r]),a.jsx(S.div,{className:"fixed z-[9999] pointer-events-auto",initial:!1,animate:{bottom:20,right:20},transition:{duration:.6,ease:[.4,0,.2,1]},children:a.jsx(S.button,{onClick:()=>{setTimeout(()=>{i({type:"publish",room:o,payload:{type:"browser",status:"hidden"}})},700),n()},className:"w-12 h-12 rounded-full backdrop-blur-md flex items-center justify-center shadow-xl border-2 transition-all duration-300 bg-white/30 hover:bg-white/40 border-white/40 hover:border-white/60",whileHover:{scale:1.15},whileTap:{scale:.95},animate:{x:[0,5,0]},transition:{x:{repeat:Number.POSITIVE_INFINITY,duration:1.5,ease:"easeInOut"}},children:a.jsx(S.div,{animate:{rotate:0},transition:{duration:.3},children:t?a.jsx(F.ChevronUp,{className:"w-5 h-5 text-white"}):a.jsx(F.ChevronDown,{className:"w-5 h-5 text-white"})})})})}const yc=({label:e,onClick:t})=>a.jsxs(S.button,{onClick:t,className:"inline-flex items-center gap-1 sm:gap-2 px-3 sm:px-4 md:px-6 py-2 sm:py-3 bg-cyan-500 hover:bg-cyan-400 text-blue-900 font-medium text-xs sm:text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-cyan-500/25",whileHover:{scale:1.05},whileTap:{scale:.95,rotate:180},initial:{opacity:0},animate:{opacity:1},transition:{delay:0,duration:.6},children:[a.jsx("span",{className:"hidden xs:inline",children:e}),a.jsx("span",{className:"inline xs:hidden",children:e.split(" ")[0]}),a.jsx("div",{className:"w-4 h-4 sm:w-5 sm:h-5 rounded-full bg-blue-900/20 flex items-center justify-center",children:a.jsxs(S.svg,{className:"w-3 h-3 sm:w-4 sm:h-4",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("circle",{cx:"12",cy:"12",r:"2",fill:"currentColor"}),a.jsx("ellipse",{cx:"12",cy:"12",rx:"8",ry:"4",stroke:"currentColor",strokeWidth:"0.5",fill:"none",opacity:"0.4"}),a.jsx("ellipse",{cx:"12",cy:"12",rx:"8",ry:"4",stroke:"currentColor",strokeWidth:"0.5",fill:"none",opacity:"0.4",transform:"rotate(60 12 12)"}),a.jsx("ellipse",{cx:"12",cy:"12",rx:"8",ry:"4",stroke:"currentColor",strokeWidth:"0.5",fill:"none",opacity:"0.4",transform:"rotate(120 12 12)"}),a.jsx(S.circle,{cx:"20",cy:"12",r:"1.5",fill:"currentColor",initial:{cx:20,cy:12},animate:{cx:[20,12,4,12,20],cy:[12,16,12,8,12]},transition:{duration:3,repeat:1/0,ease:"linear"}}),a.jsx(S.circle,{cx:"12",cy:"8",r:"1.5",fill:"currentColor",initial:{cx:12,cy:8},animate:{cx:[12,16.93,7.07,12],cy:[8,14,14,8]},transition:{duration:3,repeat:1/0,ease:"linear",delay:1}}),a.jsx(S.circle,{cx:"7.07",cy:"14",r:"1.5",fill:"currentColor",initial:{cx:7.07,cy:14},animate:{cx:[7.07,12,16.93,7.07],cy:[14,8,14,14]},transition:{duration:3,repeat:1/0,ease:"linear",delay:2}})]})})]}),xc=({onClick:e})=>a.jsxs(S.button,{onClick:e,className:"inline-flex items-center gap-1 sm:gap-2 px-3 sm:px-4 md:px-6 py-2 sm:py-3 bg-gradient-to-r from-teal-500 to-emerald-500 hover:from-teal-400 hover:to-emerald-400 text-white font-medium text-xs sm:text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-teal-500/50 border border-teal-300/50",whileHover:{scale:1.08},whileTap:{scale:.95},initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1,boxShadow:["0 0 20px rgba(20, 184, 166, 0.4)","0 0 40px rgba(20, 184, 166, 0.6)","0 0 20px rgba(20, 184, 166, 0.4)"]},transition:{delay:0,duration:.6,boxShadow:{repeat:Number.POSITIVE_INFINITY,duration:2,ease:"easeInOut"}},children:[a.jsxs(S.svg,{className:"w-3 h-3 sm:w-4 sm:h-4",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("circle",{cx:"12",cy:"12",r:"1.5",fill:"currentColor"}),a.jsx(S.circle,{cx:"12",cy:"12",r:"4",stroke:"currentColor",strokeWidth:"0.5",fill:"none",animate:{r:[4,10],opacity:[.8,0]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeOut"}}),a.jsx(S.circle,{cx:"12",cy:"12",r:"4",stroke:"currentColor",strokeWidth:"0.5",fill:"none",animate:{r:[4,10],opacity:[.8,0]},transition:{duration:2,delay:.5,repeat:Number.POSITIVE_INFINITY,ease:"easeOut"}}),a.jsx(S.circle,{cx:"12",cy:"12",r:"4",stroke:"currentColor",strokeWidth:"0.5",fill:"none",animate:{r:[4,10],opacity:[.8,0]},transition:{duration:2,delay:1,repeat:Number.POSITIVE_INFINITY,ease:"easeOut"}}),a.jsx("circle",{cx:"12",cy:"12",r:"6",stroke:"currentColor",strokeWidth:"0.5",fill:"none",opacity:"0.3"}),a.jsx("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"0.5",fill:"none",opacity:"0.2"}),a.jsx(S.line,{x1:"12",y1:"12",x2:"12",y2:"3",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",animate:{rotate:[0,360]},transition:{duration:3,repeat:Number.POSITIVE_INFINITY,ease:"linear"},style:{originX:"12px",originY:"12px"}}),a.jsx("defs",{children:a.jsxs("radialGradient",{id:"radarGradient",children:[a.jsx("stop",{offset:"0%",stopColor:"currentColor",stopOpacity:"0.6"}),a.jsx("stop",{offset:"100%",stopColor:"currentColor",stopOpacity:"0"})]})}),a.jsx(S.path,{d:"M 12 12 L 12 3 A 9 9 0 0 1 21 12 Z",fill:"url(#radarGradient)",animate:{rotate:[0,360]},transition:{duration:3,repeat:Number.POSITIVE_INFINITY,ease:"linear"},style:{originX:"12px",originY:"12px"}}),a.jsx(S.circle,{cx:"16",cy:"8",r:"1",fill:"currentColor",animate:{opacity:[0,1,1,0],scale:[.5,1,1,.5]},transition:{duration:3,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}}),a.jsx(S.circle,{cx:"8",cy:"15",r:"1",fill:"currentColor",animate:{opacity:[0,1,1,0],scale:[.5,1,1,.5]},transition:{duration:3,delay:1,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}}),a.jsx(S.circle,{cx:"18",cy:"16",r:"1",fill:"currentColor",animate:{opacity:[0,1,1,0],scale:[.5,1,1,.5]},transition:{duration:3,delay:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}})]}),a.jsx("span",{className:"hidden xs:inline",children:"SIMULACIÓN"}),a.jsx("span",{className:"inline xs:hidden",children:"SIM"})]});function Ht({src:e,transparent:t=!1,onClose:n}){const{t:s}=jt.useTranslation(),{sendMessage:i}=Ut(),{lastEvent:r}=vt(),o=xe().wsRoom,l=xe().iframesEnabled??!0;return b.useEffect(()=>{const c=setTimeout(()=>{i({type:"publish",room:o,payload:{type:"browser",action:"open",target:e}})},700);return()=>clearTimeout(c)},[e]),b.useEffect(()=>{r?.payload?.type==="browser"&&r?.payload?.action==="close"&&n()},[r]),a.jsxs(S.div,{className:Xl("absolute inset-0 z-12000",!t&&"bg-black/95"),initial:{y:"100%"},animate:{y:0},exit:{y:"100%"},transition:{duration:1.2,ease:[.34,1.56,.64,1]},children:[a.jsxs(S.button,{onClick:n,className:"absolute top-8 left-1/2 -translate-x-1/2 z-60 px-6 py-3 bg-slate-800/90 hover:bg-slate-700/90 text-cyan-300 rounded-full transition-all duration-300 border-2! border-cyan-400/50! hover:border-cyan-400/80! shadow-lg hover:shadow-cyan-500/50 font-medium flex items-center gap-2",initial:{opacity:0,y:-20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{delay:.5,duration:.4},whileHover:{scale:1.05},whileTap:{scale:.95},children:[a.jsx(F.X,{className:"w-5 h-5"}),a.jsx("span",{children:s("layout.cerrar")})]}),l&&a.jsx(S.iframe,{src:e,className:"w-full h-full border-0",allow:"microphone; clipboard-read; clipboard-write; encrypted-media; fullscreen",initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{delay:.6,duration:.8,ease:[.34,1.56,.64,1]}})]})}const Kn={sm:640,lg:1024},Li=()=>{const[e,t]=b.useState(window.innerWidth);b.useEffect(()=>{const r=()=>{t(window.innerWidth)};return window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[]);const n=e<Kn.sm,s=e>=Kn.sm&&e<Kn.lg,i=e>=Kn.lg;return{width:e,isMobile:n,isTablet:s,isDesktop:i}};function vc({onClose:e,cards:t}){const[n,s]=b.useState(!1),[i,r]=b.useState(!1),[o,l]=b.useState(""),[c,u]=b.useState(0),[d,f]=b.useState(!1),{isMobile:h,isTablet:m}=Li();let p=4,y=2;h?(p=1,y=1):m&&(p=2,y=1);const v=()=>{s(!0),setTimeout(()=>{e(),s(!1)},600)},x=k=>{k.webUrl?.trim()&&(r(!0),l(k.webUrl.replace("https://www.navantia.es",xe().remoteUrl)+"?lightbox"))},C=()=>{r(!1)},N=()=>{if(d)return;f(!0);const k=I.length;if(k<=y){f(!1);return}u(E=>(E+1)%k),setTimeout(()=>f(!1),1e3)},I=[];for(let k=0;k<t.length;k+=p)I.push(t.slice(k,k+p));const A=()=>{const k=I.length;if(k<=y)return I;const E=[];for(let w=0;w<y;w++){const j=(c+w)%k;E.push(I[j])}return E};return b.useEffect(()=>{const k=E=>{E.key==="Escape"&&e()};return window.addEventListener("keydown",k),()=>{window.removeEventListener("keydown",k)}},[e]),a.jsx(S.div,{className:"absolute inset-0 z-10000 flex items-center justify-center bg-black/80 backdrop-blur-sm p-4",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:v,children:a.jsxs(S.div,{className:"w-full max-w-7xl max-h-[90vh] rounded-2xl overflow-hidden",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},onClick:k=>k.stopPropagation(),children:[a.jsx(S.div,{className:"overflow-hidden max-h-[90vh] p-6 sm:p-8 md:p-12",style:{perspective:"1500px"},animate:{y:i?"-50vh":0,scale:i?.85:1},transition:{duration:1,ease:[.34,1.56,.64,1]},children:a.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 sm:gap-6 min-h-[calc(90vh-8rem)]",children:[a.jsx(S.button,{onClick:v,className:"flex mt-5 mx-auto z-10 p-2 bg-slate-800/80 hover:bg-slate-700/80 text-cyan-300 rounded-full transition-all duration-300 border-cyan-400/30 hover:border-cyan-400/60 shadow-lg hover:shadow-cyan-500/50 disabled:opacity-30 disabled:cursor-not-allowed bg-[rgba(30,41,59,0)] border px-2 py-2",initial:{opacity:0,scale:0,rotate:-180},animate:{opacity:1,scale:1,rotate:n?360:0,boxShadow:n?"0 0 60px rgba(34, 211, 238, 0.8)":"0 0 20px rgba(34, 211, 238, 0.3)"},exit:{opacity:0,scale:0,rotate:180,transition:{duration:.4,ease:[.34,1.56,.64,1]}},transition:{rotate:{duration:.6,ease:[.34,1.56,.64,1]},boxShadow:{duration:.6,ease:"easeInOut"}},whileHover:{scale:1.15,rotate:90,boxShadow:"0 0 40px rgba(34, 211, 238, 0.6)",transition:{duration:.3}},whileTap:{scale:.85,rotate:180,transition:{duration:.2}},children:a.jsx(S.div,{animate:{rotate:n?360:0},transition:{duration:.6,ease:[.34,1.56,.64,1]},children:a.jsx(F.X,{className:"w-6 h-6 px-0 mx-0 my-0"})})}),a.jsx(Ce,{mode:"popLayout",children:A().map((k,E)=>a.jsx(S.div,{className:"grid justify-center grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 sm:gap-6",initial:{opacity:0,y:120,rotateX:25,scale:.85},animate:{opacity:1,y:0,rotateX:0,scale:1},exit:{opacity:0,y:-120,rotateX:-25,scale:.85},transition:{duration:.8,ease:[.34,1.56,.64,1],delay:E*.15},children:k.map((w,j)=>a.jsxs(S.div,{className:"relative group cursor-pointer",initial:{opacity:0,scale:.8,rotateY:-15,filter:"blur(10px)"},animate:{opacity:1,scale:1,rotateY:0,filter:"blur(0px)"},exit:{opacity:0,scale:.8,rotateY:15,filter:"blur(10px)"},transition:{duration:.6,delay:E*.15+j*.08,ease:[.34,1.56,.64,1]},whileHover:{scale:1.08,rotateY:5,z:50,transition:{duration:.3,ease:"easeOut"}},onClick:()=>x(w),children:[a.jsx(S.img,{src:w.imageUrl||"/placeholder.svg",alt:w.title,className:"aspect-4/5 object-cover rounded-2xl border-2 border-cyan-400/20 group-hover:border-cyan-400/60 transition-all duration-300 shadow-lg group-hover:shadow-cyan-500/50 group-hover:shadow-2xl",whileHover:{boxShadow:"0 0 30px rgba(34, 211, 238, 0.4)"}}),a.jsx("div",{className:"absolute inset-[2px] bg-gradient-to-b from-black/0 to-60% to-black/60 rounded-2xl"}),a.jsxs("div",{className:"absolute bottom-5 left-5 right-5 text-center",children:[a.jsx("span",{className:"block text-lg font-semibold text-[#70cdee]",children:w.title}),a.jsx("span",{className:"block text-xs text-white",children:w.subtitle})]})]},w.title))},`row-${(c+E)%I.length}`))}),!i&&t.length>p*y&&a.jsx(S.button,{onClick:N,disabled:d,className:"mx-auto flex z-10 p-3 hover:bg-slate-700/80 text-cyan-300 font-medium text-xs sm:text-sm rounded-full transition-all duration-300 border-cyan-400/30 hover:border-cyan-400/60 shadow-lg hover:shadow-cyan-500/50 disabled:opacity-50 disabled:cursor-not-allowed bg-[rgba(30,41,59,0)] border mt-0 px-2 py-2",whileHover:{scale:1.05,y:5},whileTap:{scale:.9,rotate:180},animate:{y:[0,10,0],boxShadow:["0 0 20px rgba(34, 211, 238, 0.3)","0 0 40px rgba(34, 211, 238, 0.6)","0 0 20px rgba(34, 211, 238, 0.3)"]},transition:{y:{repeat:Number.POSITIVE_INFINITY,duration:1.5,ease:"easeInOut"},boxShadow:{repeat:Number.POSITIVE_INFINITY,duration:2,ease:"easeInOut"},scale:{duration:.2},rotate:{duration:.4,ease:"easeInOut"}},children:a.jsx(F.ChevronDown,{className:"w-6 h-6 mx-0 my-0 px-0"})})]})}),a.jsx(Ce,{children:i&&a.jsx(Ht,{onClose:C,src:o})})]})})}const kp=[{icon:F.Mail,name:"Navantia",color:"bg-blue-500",src:"https://www.navantia.es/es/"},{icon:F.Calendar,name:"Edinaf",color:"bg-red-500",src:"https://edinaf.wavant.es/"},{icon:F.Camera,name:"Edinaf",color:"bg-slate-700",src:"https://edinaf.eu/"},{icon:F.Music,name:"Music",color:"bg-pink-500",src:""},{icon:F.Map,name:"Maps",color:"bg-green-500",src:""},{icon:F.Settings,name:"Settings",color:"bg-slate-600",src:""},{icon:F.Cloud,name:"iCloud",color:"bg-cyan-500",src:""},{icon:F.Phone,name:"Phone",color:"bg-emerald-500",src:""},{icon:F.MessageSquare,name:"Messages",color:"bg-green-400",src:""},{icon:F.AppWindow,name:"Safari",color:"bg-blue-400",src:""},{icon:F.FileText,name:"Notes",color:"bg-yellow-400",src:""},{icon:F.ImageIcon,name:"Photos",color:"bg-gradient-to-br from-yellow-400 via-red-400 to-purple-500",src:""}];function Pp({onClose:e}){const[t,n]=b.useState(!1),[s,i]=b.useState("");return b.useEffect(()=>(document.body.style.overflow="hidden",()=>{document.body.style.overflow="unset"}),[]),b.useEffect(()=>{const r=o=>{o.key==="Escape"&&e()};return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[e]),a.jsxs(a.Fragment,{children:[a.jsxs(S.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},className:"fixed inset-0 z-10000 flex items-center justify-center cursor-default",onClick:e,children:[a.jsx(S.div,{initial:{opacity:0,backdropFilter:"blur(0px)"},animate:{opacity:1,backdropFilter:"blur(40px)"},exit:{opacity:0,backdropFilter:"blur(0px)"},transition:{duration:.5,ease:[.16,1,.3,1]},className:"absolute inset-0 bg-black/85"}),a.jsx(S.div,{initial:{scale:1.3,opacity:0},animate:{scale:1,opacity:1},exit:{scale:1.3,opacity:0},transition:{duration:.5,ease:[.16,1,.3,1]},onClick:r=>r.stopPropagation(),className:"relative z-10",children:a.jsx("div",{className:"grid grid-cols-4 gap-12 p-16 max-w-4xl",children:kp.map((r,o)=>a.jsxs(S.button,{initial:{scale:.3,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.3,opacity:0},transition:{duration:.4,delay:o*.025,ease:[.16,1,.3,1]},whileHover:{scale:1.05},whileTap:{scale:.95},className:"flex flex-col items-center gap-3 group cursor-default",onClick:()=>{i(r.src),n(!0)},children:[a.jsx("div",{className:`${r.color} w-24 h-24 rounded-[22px] flex items-center justify-center shadow-2xl`,style:{boxShadow:"0 8px 32px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2)"},children:a.jsx(r.icon,{className:"w-12 h-12 text-white",strokeWidth:1.5})}),a.jsx("span",{className:"text-white text-sm font-medium tracking-tight",children:r.name})]},r.name))})})]}),t&&a.jsx(Ht,{src:s,onClose:()=>n(!1)})]})}const wc="carousel",Sc="controller",jp="navigation",Ip="no-scroll",Di="portal",Mp="root",Tc="toolbar",Ec="zoom",Ri="loading",_i="error",Fi="complete",Ap="placeholder",Vp=e=>`active-slide-${e}`,Op="fullsize",$i="flex_center",Lp="no_scroll",Cc="no_scroll_padding",Bi="slide",Nc="slide_wrapper",Dp="slide_wrapper_interactive",Tt="prev",Et="next",kc="swipe",Xt="close",Pc="onPointerDown",jc="onPointerMove",Ic="onPointerUp",Mc="onPointerLeave",Ac="onPointerCancel",zi="onKeyDown",Rp="onKeyUp",Wi="onWheel",_p="Escape",Fp="ArrowLeft",$p="ArrowRight",Bp="button",Yi="icon",Vc="contain",Oc="cover",Lc="Unknown action type",Dc="yarl__";function Je(...e){return e.filter(Boolean).join(" ")}function fe(e){return`${Dc}${e}`}function Re(e){return`--${Dc}${e}`}function yn(e,t){return`${e}${t?`_${t}`:""}`}function Ui(e){return t=>yn(e,t)}function Gt(e,t){var n;return(n=e?.[t])!==null&&n!==void 0?n:t}function zp(e,t,n){return Gt(e,"{index} of {total}").replace(/\{index}/g,`${Zi(n,t.length)+1}`).replace(/\{total}/g,`${t.length}`)}function Hi(...e){return()=>{e.forEach(t=>{t()})}}function st(e,t,n){return()=>{const s=g.useContext(n);if(!s)throw new Error(`${e} must be used within a ${t}.Provider`);return s}}function Xi(){return typeof window<"u"}function Gi(e,t=0){const n=10**t;return Math.round((e+Number.EPSILON)*n)/n}function Kt(e){return e.type===void 0||e.type==="image"}function Ki(e,t){return e.imageFit===Oc||e.imageFit!==Vc&&t===Oc}function Zn(e){return typeof e=="string"?Number.parseInt(e,10):e}function qn(e){if(typeof e=="number")return{pixel:e};if(typeof e=="string"){const t=Zn(e);return e.endsWith("%")?{percent:t}:{pixel:t}}return{pixel:0}}function Wp(e,t){const n=qn(t),s=n.percent!==void 0?e.width/100*n.percent:n.pixel;return{width:Math.max(e.width-2*s,0),height:Math.max(e.height-2*s,0)}}function Yp(){return(Xi()?window?.devicePixelRatio:void 0)||1}function Zi(e,t){return t>0?(e%t+t)%t:0}function Rc(e){return e.length>0}function _c(e,t){return e[Zi(t,e.length)]}function qi(e,t){return Rc(e)?_c(e,t):void 0}function Up(e){return Kt(e)?e.src:void 0}function Hp(e,t,n){if(!n)return e;const{buttons:s,...i}=e,r=s.findIndex(l=>l===t),o=g.isValidElement(n)?g.cloneElement(n,{key:t},null):n;if(r>=0){const l=[...s];return l.splice(r,1,o),{buttons:l,...i}}return{buttons:[o,...s],...i}}function Xp(e,t,n=0){return Math.min(e.preload,Math.max(e.finite?t.length-1:Math.floor(t.length/2),n))}const Gp=Number(g.version.split(".")[0])>=19;function Kp(e){return{inert:Gp?e:e?"":void 0}}function Zp(e){e.scrollTop}const Ji={open:!1,close:()=>{},index:0,slides:[],render:{},plugins:[],toolbar:{buttons:[Xt]},labels:{},animation:{fade:250,swipe:500,easing:{fade:"ease",swipe:"ease-out",navigation:"ease-in-out"}},carousel:{finite:!1,preload:2,padding:"16px",spacing:"30%",imageFit:Vc,imageProps:{}},controller:{ref:null,focus:!0,aria:!1,touchAction:"none",closeOnPullUp:!1,closeOnPullDown:!1,closeOnBackdropClick:!1,preventDefaultWheelX:!0,preventDefaultWheelY:!1,disableSwipeNavigation:!1},portal:{},noScroll:{disabled:!1},on:{},styles:{},className:""};function ht(e,t){return{name:e,component:t}}function Ie(e,t){return{module:e,children:t}}function Fc(e,t,n){return e.module.name===t?n(e):e.children?[Ie(e.module,e.children.flatMap(s=>{var i;return(i=Fc(s,t,n))!==null&&i!==void 0?i:[]}))]:[e]}function Zt(e,t,n){return e.flatMap(s=>{var i;return(i=Fc(s,t,n))!==null&&i!==void 0?i:[]})}function qp(e,t=[],n=[]){let s=e;const i=m=>{const p=[...s];for(;p.length>0;){const y=p.pop();if(y?.module.name===m)return!0;y?.children&&p.push(...y.children)}return!1},r=(m,p)=>{if(m===""){s=[Ie(p,s)];return}s=Zt(s,m,y=>[Ie(p,[y])])},o=(m,p)=>{s=Zt(s,m,y=>[Ie(y.module,[Ie(p,y.children)])])},l=(m,p,y)=>{s=Zt(s,m,v=>{var x;return[Ie(v.module,[...y?[Ie(p)]:[],...(x=v.children)!==null&&x!==void 0?x:[],...y?[]:[Ie(p)]])]})},c=(m,p,y)=>{s=Zt(s,m,v=>[...y?[Ie(p)]:[],v,...y?[]:[Ie(p)]])},u=m=>{o(Sc,m)},d=(m,p)=>{s=Zt(s,m,y=>[Ie(p,y.children)])},f=m=>{s=Zt(s,m,p=>p.children)},h=m=>{n.push(m)};return t.forEach(m=>{m({contains:i,addParent:r,append:o,addChild:l,addSibling:c,addModule:u,replace:d,remove:f,augment:h})}),{config:s,augmentation:m=>n.reduce((p,y)=>y(p),m)}}const $c=g.createContext(null),Bc=st("useA11yContext","A11yContext",$c);function Jp({children:e}){const[t,n]=g.useState(!1),[s,i]=g.useState(!1),r=g.useMemo(()=>({focusWithin:t,trackFocusWithin:(l,c)=>{const u=d=>f=>{var h;f.currentTarget.contains(f.relatedTarget)||n(d),(h=d?l:c)===null||h===void 0||h(f)};return{onFocus:u(!0),onBlur:u(!1)}},autoPlaying:s,setAutoPlaying:i}),[t,s]);return g.createElement($c.Provider,{value:r},e)}const zc=g.createContext(null),Jn=st("useDocument","DocumentContext",zc);function Qp({nodeRef:e,children:t}){const n=g.useMemo(()=>{const s=r=>{var o;return((o=r||e.current)===null||o===void 0?void 0:o.ownerDocument)||document};return{getOwnerDocument:s,getOwnerWindow:r=>{var o;return((o=s(r))===null||o===void 0?void 0:o.defaultView)||window}}},[e]);return g.createElement(zc.Provider,{value:n},t)}const Wc=g.createContext(null),Qn=st("useEvents","EventsContext",Wc);function eg({children:e}){const[t]=g.useState({});g.useEffect(()=>()=>{Object.keys(t).forEach(s=>delete t[s])},[t]);const n=g.useMemo(()=>{const s=(o,l)=>{var c;(c=t[o])===null||c===void 0||c.splice(0,t[o].length,...t[o].filter(u=>u!==l))};return{publish:(...[o,l])=>{var c;(c=t[o])===null||c===void 0||c.forEach(u=>u(l))},subscribe:(o,l)=>(t[o]||(t[o]=[]),t[o].push(l),()=>s(o,l)),unsubscribe:s}},[t]);return g.createElement(Wc.Provider,{value:n},e)}const Yc=g.createContext(null),ze=st("useLightboxProps","LightboxPropsContext",Yc);function tg({children:e,...t}){return g.createElement(Yc.Provider,{value:t},e)}const Uc=g.createContext(null),mt=st("useLightboxState","LightboxStateContext",Uc),Hc=g.createContext(null),ng=st("useLightboxDispatch","LightboxDispatchContext",Hc);function sg(e,t){switch(t.type){case"swipe":{const{slides:n}=e,s=t?.increment||0,i=e.globalIndex+s,r=Zi(i,n.length),o=qi(n,r),l=s||t.duration!==void 0?{increment:s,duration:t.duration,easing:t.easing}:void 0;return{slides:n,currentIndex:r,globalIndex:i,currentSlide:o,animation:l}}case"update":return t.slides!==e.slides||t.index!==e.currentIndex?{slides:t.slides,currentIndex:t.index,globalIndex:t.index,currentSlide:qi(t.slides,t.index)}:e;default:throw new Error(Lc)}}function ig({slides:e,index:t,children:n}){const[s,i]=g.useReducer(sg,{slides:e,currentIndex:t,globalIndex:t,currentSlide:qi(e,t)});g.useEffect(()=>{i({type:"update",slides:e,index:t})},[e,t]);const r=g.useMemo(()=>({...s,state:s,dispatch:i}),[s,i]);return g.createElement(Hc.Provider,{value:i},g.createElement(Uc.Provider,{value:r},n))}const Xc=g.createContext(null),es=st("useTimeouts","TimeoutsContext",Xc);function og({children:e}){const[t]=g.useState([]);g.useEffect(()=>()=>{t.forEach(s=>window.clearTimeout(s)),t.splice(0,t.length)},[t]);const n=g.useMemo(()=>{const s=o=>{t.splice(0,t.length,...t.filter(l=>l!==o))};return{setTimeout:(o,l)=>{const c=window.setTimeout(()=>{s(c),o()},l);return t.push(c),c},clearTimeout:o=>{o!==void 0&&(s(o),window.clearTimeout(o))}}},[t]);return g.createElement(Xc.Provider,{value:n},e)}const Qi=g.forwardRef(function({label:t,className:n,icon:s,renderIcon:i,onClick:r,style:o,...l},c){const{styles:u,labels:d}=ze(),f=Gt(d,t);return g.createElement("button",{ref:c,type:"button",title:f,"aria-label":f,className:Je(fe(Bp),n),onClick:r,style:{...o,...u.button},...l},i?i():g.createElement(s,{className:fe(Yi),style:u.icon}))});function rg(e,t){const n=s=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",...s},t);return n.displayName=e,n}function Ct(e,t){return rg(e,g.createElement("g",{fill:"currentColor"},g.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),t))}const ag=Ct("Close",g.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),lg=Ct("Previous",g.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})),cg=Ct("Next",g.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),ug=Ct("Loading",g.createElement(g.Fragment,null,Array.from({length:8}).map((e,t,n)=>g.createElement("line",{key:t,x1:"12",y1:"6.5",x2:"12",y2:"1.8",strokeLinecap:"round",strokeWidth:"2.6",stroke:"currentColor",strokeOpacity:1/n.length*(t+1),transform:`rotate(${360/n.length*t}, 12, 12)`})))),dg=Ct("Error",g.createElement("path",{d:"M21.9,21.9l-8.49-8.49l0,0L3.59,3.59l0,0L2.1,2.1L0.69,3.51L3,5.83V19c0,1.1,0.9,2,2,2h13.17l2.31,2.31L21.9,21.9z M5,18 l3.5-4.5l2.5,3.01L12.17,15l3,3H5z M21,18.17L5.83,3H19c1.1,0,2,0.9,2,2V18.17z"})),Qe=Xi()?g.useLayoutEffect:g.useEffect;function eo(){const[e,t]=g.useState(!1);return g.useEffect(()=>{var n,s;const i=(n=window.matchMedia)===null||n===void 0?void 0:n.call(window,"(prefers-reduced-motion: reduce)");t(i?.matches);const r=o=>t(o.matches);return(s=i?.addEventListener)===null||s===void 0||s.call(i,"change",r),()=>{var o;return(o=i?.removeEventListener)===null||o===void 0?void 0:o.call(i,"change",r)}},[]),e}function fg(e){let t=0,n=0,s=0;const r=window.getComputedStyle(e).transform.match(/matrix.*\((.+)\)/);if(r){const o=r[1].split(",").map(Zn);o.length===6?(t=o[4],n=o[5]):o.length===16&&(t=o[12],n=o[13],s=o[14])}return{x:t,y:n,z:s}}function Gc(e,t){const n=g.useRef(void 0),s=g.useRef(void 0),i=eo();return Qe(()=>{var r,o,l;if(e.current&&n.current!==void 0&&!i){const{keyframes:c,duration:u,easing:d,onfinish:f}=t(n.current,e.current.getBoundingClientRect(),fg(e.current))||{};if(c&&u){(r=s.current)===null||r===void 0||r.cancel(),s.current=void 0;try{s.current=(l=(o=e.current).animate)===null||l===void 0?void 0:l.call(o,c,{duration:u,easing:d})}catch(h){console.error(h)}s.current&&(s.current.onfinish=()=>{s.current=void 0,f?.()})}}n.current=void 0}),{prepareAnimation:r=>{n.current=r},isAnimationPlaying:()=>{var r;return((r=s.current)===null||r===void 0?void 0:r.playState)==="running"}}}function Kc(){const e=g.useRef(null),t=g.useRef(void 0),[n,s]=g.useState();return{setContainerRef:g.useCallback(r=>{e.current=r,t.current&&(t.current.disconnect(),t.current=void 0);const o=()=>{if(r){const l=window.getComputedStyle(r),c=u=>parseFloat(u)||0;s({width:Math.round(r.clientWidth-c(l.paddingLeft)-c(l.paddingRight)),height:Math.round(r.clientHeight-c(l.paddingTop)-c(l.paddingBottom))})}else s(void 0)};o(),r&&typeof ResizeObserver<"u"&&(t.current=new ResizeObserver(o),t.current.observe(r))},[]),containerRef:e,containerRect:n}}function ts(){const e=g.useRef(void 0),{setTimeout:t,clearTimeout:n}=es();return g.useCallback((s,i)=>{n(e.current),e.current=t(s,i>0?i:0)},[t,n])}function me(e){const t=g.useRef(e);return Qe(()=>{t.current=e}),g.useCallback((...n)=>{var s;return(s=t.current)===null||s===void 0?void 0:s.call(t,...n)},[])}function Zc(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function to(e,t){return g.useMemo(()=>e==null&&t==null?null:n=>{Zc(e,n),Zc(t,n)},[e,t])}function hg(e,t=!1){const n=g.useRef(!1);Qe(()=>{t&&n.current&&(n.current=!1,e())},[t,e]);const s=g.useCallback(()=>{n.current=!0},[]),i=g.useCallback(()=>{n.current=!1},[]);return{onFocus:s,onBlur:i}}function no(){const[e,t]=g.useState(!1);return Qe(()=>{t(window.getComputedStyle(window.document.documentElement).direction==="rtl")},[]),e}function mg(){const[e]=g.useState({}),t=g.useCallback((i,r)=>{var o;(o=e[i])===null||o===void 0||o.forEach(l=>{r.isPropagationStopped()||l(r)})},[e]),n=g.useMemo(()=>({onPointerDown:i=>t(Pc,i),onPointerMove:i=>t(jc,i),onPointerUp:i=>t(Ic,i),onPointerLeave:i=>t(Mc,i),onPointerCancel:i=>t(Ac,i),onKeyDown:i=>t(zi,i),onKeyUp:i=>t(Rp,i),onWheel:i=>t(Wi,i)}),[t]),s=g.useCallback((i,r)=>(e[i]||(e[i]=[]),e[i].unshift(r),()=>{const o=e[i];o&&o.splice(0,o.length,...o.filter(l=>l!==r))}),[e]);return{registerSensors:n,subscribeSensors:s}}function qc(e,t){const n=g.useRef(0),s=ts(),i=me((...r)=>{n.current=Date.now(),e(r)});return g.useCallback((...r)=>{s(()=>{i(r)},t-(Date.now()-n.current))},[t,i,s])}const so=Ui("slide"),io=Ui("slide_image");function ns({slide:e,offset:t,render:n,rect:s,imageFit:i,imageProps:r,onClick:o,onLoad:l,onError:c,style:u}){var d,f,h,m,p,y,v,x;const[C,N]=g.useState(Ri),{publish:I}=Qn(),{setTimeout:A}=es(),k=g.useRef(null);g.useEffect(()=>{t===0&&I(Vp(C))},[t,C,I]);const E=me(O=>{("decode"in O?O.decode():Promise.resolve()).catch(()=>{}).then(()=>{O.parentNode&&(N(Fi),A(()=>{l?.(O)},0))})}),w=g.useCallback(O=>{k.current=O,O?.complete&&E(O)},[E]),j=g.useCallback(O=>{E(O.currentTarget)},[E]),$=me(()=>{N(_i),c?.()}),z=Ki(e,i),Q=(O,ne)=>Number.isFinite(O)?O:ne,R=Q(Math.max(...((f=(d=e.srcSet)===null||d===void 0?void 0:d.map(O=>O.width))!==null&&f!==void 0?f:[]).concat(e.width?[e.width]:[]).filter(Boolean)),((h=k.current)===null||h===void 0?void 0:h.naturalWidth)||0),se=Q(Math.max(...((p=(m=e.srcSet)===null||m===void 0?void 0:m.map(O=>O.height))!==null&&p!==void 0?p:[]).concat(e.height?[e.height]:[]).filter(Boolean)),((y=k.current)===null||y===void 0?void 0:y.naturalHeight)||0),U=R&&se?{maxWidth:`min(${R}px, 100%)`,maxHeight:`min(${se}px, 100%)`}:{maxWidth:"100%",maxHeight:"100%"},J=(v=e.srcSet)===null||v===void 0?void 0:v.slice().sort((O,ne)=>O.width-ne.width).map(O=>`${O.src} ${O.width}w`).join(", "),V=()=>s&&!z&&e.width&&e.height?s.height/e.height*e.width:Number.MAX_VALUE,P=J&&s&&Xi()?`${Math.round(Math.min(V(),s.width))}px`:void 0,{style:_,className:M,...T}=(typeof r=="function"?r(e):r)||{};return g.createElement(g.Fragment,null,g.createElement("img",{ref:w,onLoad:j,onError:$,onClick:o,draggable:!1,className:Je(fe(io()),z&&fe(io("cover")),C!==Fi&&fe(io("loading")),M),style:{...U,...u,..._},...T,alt:(x=e.alt)!==null&&x!==void 0?x:"",sizes:P,srcSet:J,src:e.src}),C!==Fi&&g.createElement("div",{className:fe(so(Ap))},C===Ri&&(n?.iconLoading?n.iconLoading():g.createElement(ug,{className:Je(fe(Yi),fe(so(Ri)))})),C===_i&&(n?.iconError?n.iconError():g.createElement(dg,{className:Je(fe(Yi),fe(so(_i)))}))))}const pg=g.forwardRef(function({className:t,children:n,onFocus:s,onBlur:i,...r},o){const l=g.useRef(null),{trackFocusWithin:c}=Bc();return g.createElement(Qp,{nodeRef:l},g.createElement("div",{ref:to(o,l),className:Je(fe("root"),t),...c(s,i),...r},n))});var Oe;(function(e){e[e.NONE=0]="NONE",e[e.SWIPE=1]="SWIPE",e[e.PULL=2]="PULL",e[e.ANIMATION=3]="ANIMATION"})(Oe||(Oe={}));function Jc(e,t,n,s,i){g.useEffect(()=>i?()=>{}:Hi(e(Pc,t),e(jc,n),e(Ic,s),e(Mc,s),e(Ac,s)),[e,t,n,s,i])}var Ge;(function(e){e[e.NONE=0]="NONE",e[e.SWIPE=1]="SWIPE",e[e.PULL=2]="PULL"})(Ge||(Ge={}));const oo=30;function gg({disableSwipeNavigation:e,closeOnBackdropClick:t},n,s,i,r,o,l,c,u,d,f,h,m,p,y,v){const x=g.useRef(0),C=g.useRef([]),N=g.useRef(void 0),I=g.useRef(0),A=g.useRef(Ge.NONE),k=g.useCallback(R=>{N.current===R.pointerId&&(N.current=void 0,A.current=Ge.NONE);const se=C.current;se.splice(0,se.length,...se.filter(U=>U.pointerId!==R.pointerId))},[]),E=g.useCallback(R=>{k(R),R.persist(),C.current.push(R)},[k]),w=g.useCallback(R=>C.current.find(({pointerId:se})=>R.pointerId===se),[]),j=me(R=>{E(R)}),$=(R,se)=>f&&R>se||d&&R<-se,z=me(R=>{const se=w(R);if(se)if(N.current===R.pointerId){const U=Date.now()-I.current,J=x.current;A.current===Ge.SWIPE?Math.abs(J)>.3*i||Math.abs(J)>5&&U<r?c(J,U):u(J):A.current===Ge.PULL&&($(J,2*oo)?p(J,U):y(J)),x.current=0,A.current=Ge.NONE}else{const{target:U}=R;t&&U instanceof HTMLElement&&U===se.target&&(U.classList.contains(fe(Bi))||U.classList.contains(fe(Nc)))&&v()}k(R)}),Q=me(R=>{const se=w(R);if(se){const U=N.current===R.pointerId;if(R.buttons===0){U&&x.current!==0?z(R):k(se);return}const J=R.clientX-se.clientX,V=R.clientY-se.clientY;if(N.current===void 0){const P=_=>{E(R),N.current=R.pointerId,I.current=Date.now(),A.current=_};Math.abs(J)>Math.abs(V)&&Math.abs(J)>oo&&s(J)?e||(P(Ge.SWIPE),o()):Math.abs(V)>Math.abs(J)&&$(V,oo)&&(P(Ge.PULL),h())}else U&&(A.current===Ge.SWIPE?(x.current=J,l(J)):A.current===Ge.PULL&&(x.current=V,m(V)))}});Jc(n,j,Q,z)}function bg({preventDefaultWheelX:e,preventDefaultWheelY:t}){const n=g.useRef(null),s=me(i=>{const r=Math.abs(i.deltaX)>Math.abs(i.deltaY);(r&&e||!r&&t||i.ctrlKey)&&i.preventDefault()});return g.useCallback(i=>{var r;i?i.addEventListener("wheel",s,{passive:!1}):(r=n.current)===null||r===void 0||r.removeEventListener("wheel",s),n.current=i},[s])}function yg(e,t,n,s,i,r,o,l,c){const u=g.useRef(0),d=g.useRef(0),f=g.useRef(void 0),h=g.useRef(void 0),m=g.useRef(0),p=g.useRef(void 0),y=g.useRef(0),{setTimeout:v,clearTimeout:x}=es(),C=g.useCallback(()=>{f.current&&(x(f.current),f.current=void 0)},[x]),N=g.useCallback(()=>{h.current&&(x(h.current),h.current=void 0)},[x]),I=me(()=>{e!==Oe.SWIPE&&(u.current=0,y.current=0,C(),N())});g.useEffect(I,[e,I]);const A=me(E=>{h.current=void 0,u.current===E&&c(u.current)}),k=me(E=>{if(E.ctrlKey||Math.abs(E.deltaY)>Math.abs(E.deltaX))return;const w=j=>{m.current=j,x(p.current),p.current=j>0?v(()=>{m.current=0,p.current=void 0},300):void 0};if(e===Oe.NONE){if(Math.abs(E.deltaX)<=1.2*Math.abs(m.current)){w(E.deltaX);return}if(!n(-E.deltaX))return;if(d.current+=E.deltaX,C(),Math.abs(d.current)>30)d.current=0,w(0),y.current=Date.now(),r();else{const j=d.current;f.current=v(()=>{f.current=void 0,j===d.current&&(d.current=0)},i)}}else if(e===Oe.SWIPE){let j=u.current-E.deltaX;if(j=Math.min(Math.abs(j),s)*Math.sign(j),u.current=j,o(j),N(),Math.abs(j)>.2*s){w(E.deltaX),l(j,Date.now()-y.current);return}h.current=v(()=>A(j),2*i)}else w(E.deltaX)});g.useEffect(()=>t(Wi,k),[t,k])}const Qc=Ui("container"),eu=g.createContext(null),it=st("useController","ControllerContext",eu);function xg({children:e,...t}){var n;const{carousel:s,animation:i,controller:r,on:o,styles:l,render:c}=t,{closeOnPullUp:u,closeOnPullDown:d,preventDefaultWheelX:f,preventDefaultWheelY:h}=r,[m,p]=g.useState(),y=mt(),v=ng(),[x,C]=g.useState(Oe.NONE),N=g.useRef(0),I=g.useRef(0),A=g.useRef(1),{registerSensors:k,subscribeSensors:E}=mg(),{subscribe:w,publish:j}=Qn(),$=ts(),z=ts(),Q=ts(),{containerRef:R,setContainerRef:se,containerRect:U}=Kc(),J=to(bg({preventDefaultWheelX:f,preventDefaultWheelY:h}),se),V=g.useRef(null),P=to(V,void 0),{getOwnerDocument:_}=Jn(),M=no(),T=H=>(M?-1:1)*(typeof H=="number"?H:1),O=me(()=>{var H;return(H=R.current)===null||H===void 0?void 0:H.focus()}),ne=me(()=>t),ie=me(()=>y),re=g.useCallback(H=>j(Tt,H),[j]),ae=g.useCallback(H=>j(Et,H),[j]),le=g.useCallback(()=>j(Xt),[j]),ye=H=>!(s.finite&&(T(H)>0&&y.currentIndex===0||T(H)<0&&y.currentIndex===y.slides.length-1)),ue=H=>{var pe;N.current=H,(pe=R.current)===null||pe===void 0||pe.style.setProperty(Re("swipe_offset"),`${Math.round(H)}px`)},Ne=H=>{var pe,Me;I.current=H,A.current=(()=>{const Pt=d&&H>0?H:u&&H<0?-H:0;return Math.min(Math.max(Gi(1-Pt/60*(1-.5),2),.5),1)})(),(pe=R.current)===null||pe===void 0||pe.style.setProperty(Re("pull_offset"),`${Math.round(H)}px`),(Me=R.current)===null||Me===void 0||Me.style.setProperty(Re("pull_opacity"),`${A.current}`)},{prepareAnimation:W}=Gc(V,(H,pe,Me)=>{if(V.current&&U)return{keyframes:[{transform:`translate(0, ${H.rect.y-pe.y+Me.y}px)`,opacity:H.opacity},{transform:"translate(0, 0)",opacity:1}],duration:H.duration,easing:i.easing.fade}}),he=(H,pe)=>{if(u||d){Ne(H);let Me=0;V.current&&(Me=i.fade*(pe?2:1),W({rect:V.current.getBoundingClientRect(),opacity:A.current,duration:Me})),Q(()=>{Ne(0),C(Oe.NONE)},Me),C(Oe.ANIMATION),pe||le()}},{prepareAnimation:be,isAnimationPlaying:ke}=Gc(V,(H,pe,Me)=>{var We;if(V.current&&U&&(!((We=y.animation)===null||We===void 0)&&We.duration)){const _e=qn(s.spacing),Pt=(_e.percent?_e.percent*U.width/100:_e.pixel)||0;return{keyframes:[{transform:`translate(${T(y.globalIndex-H.index)*(U.width+Pt)+H.rect.x-pe.x+Me.x}px, 0)`},{transform:"translate(0, 0)"}],duration:y.animation.duration,easing:y.animation.easing}}}),et=me(H=>{var pe,Me;const We=H.offset||0,_e=We?i.swipe:(pe=i.navigation)!==null&&pe!==void 0?pe:i.swipe,Pt=!We&&!ke()?i.easing.navigation:i.easing.swipe;let{direction:L}=H;const X=(Me=H.count)!==null&&Me!==void 0?Me:1;let Y=Oe.ANIMATION,D=_e*X;if(!L){const B=U?.width,te=H.duration||0,de=B?_e/B*Math.abs(We):_e;X!==0?(te<de?D=D/de*Math.max(te,de/5):B&&(D=_e/B*(B-Math.abs(We))),L=T(We)>0?Tt:Et):D=_e/2}let ee=0;L===Tt?ye(T(1))?ee=-X:(Y=Oe.NONE,D=_e):L===Et&&(ye(T(-1))?ee=X:(Y=Oe.NONE,D=_e)),D=Math.round(D),z(()=>{ue(0),C(Oe.NONE)},D),V.current&&be({rect:V.current.getBoundingClientRect(),index:y.globalIndex}),C(Y),j(kc,{type:"swipe",increment:ee,duration:D,easing:Pt})});g.useEffect(()=>{var H,pe;!((H=y.animation)===null||H===void 0)&&H.increment&&(!((pe=y.animation)===null||pe===void 0)&&pe.duration)&&$(()=>v({type:"swipe",increment:0}),y.animation.duration)},[y.animation,v,$]);const xn=[E,ye,U?.width||0,i.swipe,()=>C(Oe.SWIPE),H=>ue(H),(H,pe)=>et({offset:H,duration:pe,count:1}),H=>et({offset:H,count:0})],is=[()=>{d&&C(Oe.PULL)},H=>Ne(H),H=>he(H),H=>he(H,!0)];gg(r,...xn,u,d,...is,le),yg(x,...xn);const vn=me(()=>{r.focus&&_().querySelector(`.${fe(Di)} .${fe(Qc())}`)&&O()});g.useEffect(vn,[vn]);const kt=me(()=>{var H;(H=o.view)===null||H===void 0||H.call(o,{index:y.currentIndex})});g.useEffect(kt,[y.globalIndex,kt]),g.useEffect(()=>Hi(w(Tt,H=>et({direction:Tt,...H})),w(Et,H=>et({direction:Et,...H})),w(kc,H=>v(H))),[w,et,v]);const bo=g.useMemo(()=>({prev:re,next:ae,close:le,focus:O,slideRect:U?Wp(U,s.padding):{width:0,height:0},containerRect:U||{width:0,height:0},subscribeSensors:E,containerRef:R,setCarouselRef:P,toolbarWidth:m,setToolbarWidth:p}),[re,ae,le,O,E,U,R,P,m,p,s.padding]);return g.useImperativeHandle(r.ref,()=>({prev:re,next:ae,close:le,focus:O,getLightboxProps:ne,getLightboxState:ie}),[re,ae,le,O,ne,ie]),g.createElement("div",{ref:J,className:Je(fe(Qc()),fe($i)),style:{...x===Oe.SWIPE?{[Re("swipe_offset")]:`${Math.round(N.current)}px`}:null,...x===Oe.PULL?{[Re("pull_offset")]:`${Math.round(I.current)}px`,[Re("pull_opacity")]:`${A.current}`}:null,...r.touchAction!=="none"?{[Re("controller_touch_action")]:r.touchAction}:null,...l.container},tabIndex:-1,...k},U&&g.createElement(eu.Provider,{value:bo},e,(n=c.controls)===null||n===void 0?void 0:n.call(c)))}const vg=ht(Sc,xg);function Nt(e){return yn(wc,e)}function tu(e){return yn(Bi,e)}function wg({slide:e,offset:t}){const n=g.useRef(null),{currentIndex:s,slides:i}=mt(),{slideRect:r,focus:o}=it(),{render:l,carousel:{imageFit:c,imageProps:u},on:{click:d},styles:{slide:f},labels:h}=ze(),{getOwnerDocument:m}=Jn(),p=t!==0;g.useEffect(()=>{var v;p&&(!((v=n.current)===null||v===void 0)&&v.contains(m().activeElement))&&o()},[p,o,m]);const y=()=>{var v,x,C,N;let I=(v=l.slide)===null||v===void 0?void 0:v.call(l,{slide:e,offset:t,rect:r});return!I&&Kt(e)&&(I=g.createElement(ns,{slide:e,offset:t,render:l,rect:r,imageFit:c,imageProps:u,onClick:p?void 0:()=>d?.({index:s})})),I?g.createElement(g.Fragment,null,(x=l.slideHeader)===null||x===void 0?void 0:x.call(l,{slide:e}),((C=l.slideContainer)!==null&&C!==void 0?C:(({children:A})=>A))({slide:e,children:I}),(N=l.slideFooter)===null||N===void 0?void 0:N.call(l,{slide:e})):null};return g.createElement("div",{ref:n,className:Je(fe(tu()),!p&&fe(tu("current")),fe($i)),...Kp(p),style:f,role:"group","aria-roledescription":Gt(h,"Slide"),"aria-label":zp(h,i,s+t)},y())}function Sg(){const e=ze().styles.slide;return g.createElement("div",{className:fe(Bi),style:e})}function Tg({carousel:e,labels:t}){const{slides:n,currentIndex:s,globalIndex:i}=mt(),{setCarouselRef:r}=it(),{autoPlaying:o,focusWithin:l}=Bc(),c=qn(e.spacing),u=qn(e.padding),d=Xp(e,n,1),f=[];if(Rc(n))for(let h=s-d;h<=s+d;h+=1){const m=_c(n,h),p=i-s+h,y=e.finite&&(h<0||h>n.length-1);f.push(y?{key:p}:{key:[`${p}`,Up(m)].filter(Boolean).join("|"),offset:h-s,slide:m})}return g.createElement("div",{ref:r,className:Je(fe(Nt()),f.length>0&&fe(Nt("with_slides"))),style:{[`${Re(Nt("slides_count"))}`]:f.length,[`${Re(Nt("spacing_px"))}`]:c.pixel||0,[`${Re(Nt("spacing_percent"))}`]:c.percent||0,[`${Re(Nt("padding_px"))}`]:u.pixel||0,[`${Re(Nt("padding_percent"))}`]:u.percent||0},role:"region","aria-live":o&&!l?"off":"polite","aria-roledescription":Gt(t,"Carousel"),"aria-label":Gt(t,"Photo gallery")},f.map(({key:h,slide:m,offset:p})=>m?g.createElement(wg,{key:h,slide:m,offset:p}):g.createElement(Sg,{key:h})))}const Eg=ht(wc,Tg);function nu(){const{carousel:e}=ze(),{slides:t,currentIndex:n}=mt(),s=t.length===0||e.finite&&n===0,i=t.length===0||e.finite&&n===t.length-1;return{prevDisabled:s,nextDisabled:i}}function Cg(e){var t;const n=no(),{publish:s}=Qn(),{animation:i}=ze(),{prevDisabled:r,nextDisabled:o}=nu(),l=((t=i.navigation)!==null&&t!==void 0?t:i.swipe)/2,c=qc(()=>s(Tt),l),u=qc(()=>s(Et),l),d=me(f=>{switch(f.key){case _p:s(Xt);break;case Fp:(n?o:r)||(n?u:c)();break;case $p:(n?r:o)||(n?c:u)();break}});g.useEffect(()=>e(zi,d),[e,d])}function su({label:e,icon:t,renderIcon:n,action:s,onClick:i,disabled:r,style:o}){return g.createElement(Qi,{label:e,icon:t,renderIcon:n,className:fe(`navigation_${s}`),disabled:r,onClick:i,style:o,...hg(it().focus,r)})}function Ng({render:{buttonPrev:e,buttonNext:t,iconPrev:n,iconNext:s},styles:i}){const{prev:r,next:o,subscribeSensors:l}=it(),{prevDisabled:c,nextDisabled:u}=nu();return Cg(l),g.createElement(g.Fragment,null,e?e():g.createElement(su,{label:"Previous",action:Tt,icon:lg,renderIcon:n,style:i.navigationPrev,disabled:c,onClick:r}),t?t():g.createElement(su,{label:"Next",action:Et,icon:cg,renderIcon:s,style:i.navigationNext,disabled:u,onClick:o}))}const kg=ht(jp,Ng),iu=fe(Lp),Pg=fe(Cc);function jg(e){return"style"in e}function ou(e,t,n){const s=window.getComputedStyle(e),i=n?"padding-left":"padding-right",r=n?s.paddingLeft:s.paddingRight,o=e.style.getPropertyValue(i);return e.style.setProperty(i,`${(Zn(r)||0)+t}px`),()=>{o?e.style.setProperty(i,o):e.style.removeProperty(i)}}function Ig({noScroll:{disabled:e},children:t}){const n=no(),{getOwnerDocument:s,getOwnerWindow:i}=Jn();return g.useEffect(()=>{if(e)return()=>{};const r=[],o=i(),{body:l,documentElement:c}=s(),u=Math.round(o.innerWidth-c.clientWidth);if(u>0){r.push(ou(l,u,n));const d=l.getElementsByTagName("*");for(let f=0;f<d.length;f+=1){const h=d[f];jg(h)&&o.getComputedStyle(h).getPropertyValue("position")==="fixed"&&!h.classList.contains(Pg)&&r.push(ou(h,u,n))}}return l.classList.add(iu),()=>{l.classList.remove(iu),r.forEach(d=>d())}},[n,e,s,i]),g.createElement(g.Fragment,null,t)}const Mg=ht(Ip,Ig);function ru(e){return yn(Di,e)}function au(e,t,n){const s=e.getAttribute(t);return e.setAttribute(t,n),()=>{s?e.setAttribute(t,s):e.removeAttribute(t)}}function Ag({children:e,animation:t,styles:n,className:s,on:i,portal:r,close:o,labels:l}){const[c,u]=g.useState(!1),[d,f]=g.useState(!1),h=g.useRef([]),m=g.useRef(null),{setTimeout:p}=es(),{subscribe:y}=Qn(),x=eo()?0:t.fade;g.useEffect(()=>(u(!0),()=>{u(!1),f(!1)}),[]);const C=me(()=>{h.current.forEach(k=>k()),h.current=[]}),N=me(()=>{var k;f(!1),C(),(k=i.exiting)===null||k===void 0||k.call(i),p(()=>{var E;(E=i.exited)===null||E===void 0||E.call(i),o()},x)});g.useEffect(()=>y(Xt,N),[y,N]);const I=me(k=>{var E,w,j;Zp(k),f(!0),(E=i.entering)===null||E===void 0||E.call(i);const $=(j=(w=k.parentNode)===null||w===void 0?void 0:w.children)!==null&&j!==void 0?j:[];for(let z=0;z<$.length;z+=1){const Q=$[z];["TEMPLATE","SCRIPT","STYLE"].indexOf(Q.tagName)===-1&&Q!==k&&(h.current.push(au(Q,"inert","")),h.current.push(au(Q,"aria-hidden","true")))}h.current.push(()=>{var z,Q;(Q=(z=m.current)===null||z===void 0?void 0:z.focus)===null||Q===void 0||Q.call(z)}),p(()=>{var z;(z=i.entered)===null||z===void 0||z.call(i)},x)}),A=g.useCallback(k=>{k?I(k):C()},[I,C]);return c?vo.createPortal(g.createElement(pg,{ref:A,className:Je(s,fe(ru()),fe(Cc),d&&fe(ru("open"))),"aria-modal":!0,role:"dialog","aria-label":Gt(l,"Lightbox"),style:{...t.fade!==Ji.animation.fade?{[Re("fade_animation_duration")]:`${x}ms`}:null,...t.easing.fade!==Ji.animation.easing.fade?{[Re("fade_animation_timing_function")]:t.easing.fade}:null,...n.root},onFocus:k=>{m.current||(m.current=k.relatedTarget)}},e),r.root||document.body):null}const Vg=ht(Di,Ag);function Og({children:e}){return g.createElement(g.Fragment,null,e)}const Lg=ht(Mp,Og);function Dg(e){return yn(Tc,e)}function Rg({toolbar:{buttons:e},render:{buttonClose:t,iconClose:n},styles:s}){const{close:i,setToolbarWidth:r}=it(),{setContainerRef:o,containerRect:l}=Kc();Qe(()=>{r(l?.width)},[r,l?.width]);const c=()=>t?t():g.createElement(Qi,{key:Xt,label:"Close",icon:ag,renderIcon:n,onClick:i});return g.createElement("div",{ref:o,style:s.toolbar,className:fe(Dg())},e?.map(u=>u===Xt?c():u))}const _g=ht(Tc,Rg);function lu(e,t){var n;return g.createElement(e.module.component,{key:e.module.name,...t},(n=e.children)===null||n===void 0?void 0:n.map(s=>lu(s,t)))}function Fg(e,t={}){const{easing:n,...s}=e,{easing:i,...r}=t;return{easing:{...n,...i},...s,...r}}function $g({carousel:e,animation:t,render:n,toolbar:s,controller:i,noScroll:r,on:o,plugins:l,slides:c,index:u,...d}){const{animation:f,carousel:h,render:m,toolbar:p,controller:y,noScroll:v,on:x,slides:C,index:N,plugins:I,...A}=Ji,{config:k,augmentation:E}=qp([Ie(Vg,[Ie(Mg,[Ie(vg,[Ie(Eg),Ie(_g),Ie(kg)])])])],l||I),w=E({animation:Fg(f,t),carousel:{...h,...e},render:{...m,...n},toolbar:{...p,...s},controller:{...y,...i},noScroll:{...v,...r},on:{...x,...o},...A,...d});return w.open?g.createElement(tg,{...w},g.createElement(ig,{slides:c||C,index:Zn(u||N)},g.createElement(og,null,g.createElement(eg,null,g.createElement(Jp,null,lu(Ie(Lg,k),w)))))):null}const Bg={minZoom:1,maxZoomPixelRatio:1,zoomInMultiplier:2,doubleTapDelay:300,doubleClickDelay:500,doubleClickMaxStops:2,keyboardMoveDistance:50,wheelZoomDistanceFactor:100,pinchZoomDistanceFactor:100,pinchZoomV4:!1,scrollToZoom:!1};function zg(e){return Math.min(Math.max(e,Number.EPSILON),1)}function cu(e){const{minZoom:t,...n}={...Bg,...e};return{minZoom:zg(t),...n}}function Wg(e,t,n,s){const i=g.useRef(void 0),r=g.useRef(void 0),{zoom:o}=ze().animation,l=eo(),c=me(()=>{var u,d,f;if((u=i.current)===null||u===void 0||u.cancel(),i.current=void 0,r.current&&s?.current){try{i.current=(f=(d=s.current).animate)===null||f===void 0?void 0:f.call(d,[{transform:r.current},{transform:`scale(${e}) translateX(${t}px) translateY(${n}px)`}],{duration:l?0:o??500,easing:i.current?"ease-out":"ease-in-out"})}catch(h){console.error(h)}r.current=void 0,i.current&&(i.current.onfinish=()=>{i.current=void 0})}});return Qe(c,[e,t,n,c]),g.useCallback(()=>{r.current=s?.current?window.getComputedStyle(s.current).transform:void 0},[s])}function Yg(e,t){const{on:n}=ze(),s=me(()=>{var i;t||(i=n.zoom)===null||i===void 0||i.call(n,{zoom:e})});g.useEffect(s,[e,s])}function ss(){const{zoom:e}=ze();return cu(e)}function Ug(e,t){var n,s;let i={width:0,height:0},r={width:0,height:0};const{currentSlide:o}=mt(),{imageFit:l}=ze().carousel,{maxZoomPixelRatio:c}=ss();if(e&&o){const d={...o,...t};if(Kt(d)){const f=Ki(d,l),h=Math.max(...(((n=d.srcSet)===null||n===void 0?void 0:n.map(p=>p.width))||[]).concat(d.width?[d.width]:[])),m=Math.max(...(((s=d.srcSet)===null||s===void 0?void 0:s.map(p=>p.height))||[]).concat(d.height?[d.height]:[]));h>0&&m>0&&e.width>0&&e.height>0&&(r=f?{width:Math.round(Math.min(h,e.width/e.height*m)),height:Math.round(Math.min(m,e.height/e.width*h))}:{width:h,height:m},r={width:r.width*c,height:r.height*c},i=f?{width:Math.min(e.width,r.width,h),height:Math.min(e.height,r.height,m)}:{width:Math.round(Math.min(e.width,e.height/m*h,h)),height:Math.round(Math.min(e.height,e.width/h*m,m))})}}const u=i.width?Math.max(Gi(r.width/i.width,5),1):1;return{imageRect:i,maxZoom:u}}function uu(e,t){return Math.hypot(e.clientX-t.clientX,e.clientY-t.clientY)}function du(e,t,n=100,s=2){return e*Math.min(1+Math.abs(t/n),s)**Math.sign(t)}function Hg(e,t,n,s,i,r,o,l,c){const u=g.useRef([]),d=g.useRef(0),f=g.useRef(void 0),{globalIndex:h}=mt(),{getOwnerWindow:m}=Jn(),{containerRef:p,subscribeSensors:y}=it(),{keyboardMoveDistance:v,zoomInMultiplier:x,wheelZoomDistanceFactor:C,scrollToZoom:N,doubleTapDelay:I,doubleClickDelay:A,doubleClickMaxStops:k,pinchZoomDistanceFactor:E,pinchZoomV4:w}=ss(),j=g.useCallback(P=>{if(p.current){const{pageX:_,pageY:M}=P,{scrollX:T,scrollY:O}=m(),{left:ne,top:ie,width:re,height:ae}=p.current.getBoundingClientRect();return[_-ne-T-re/2,M-ie-O-ae/2]}return[]},[p,m]),$=me(P=>{const{key:_,metaKey:M,ctrlKey:T}=P,O=M||T,ne=()=>{P.preventDefault(),P.stopPropagation()};if(e>1){const ie=(re,ae)=>{ne(),l(re,ae)};_==="ArrowDown"?ie(0,v):_==="ArrowUp"?ie(0,-v):_==="ArrowLeft"?ie(-v,0):_==="ArrowRight"&&ie(v,0)}_==="+"||O&&_==="="?(ne(),i()):_==="-"||O&&_==="_"?(ne(),r()):O&&_==="0"&&(ne(),o(1))}),z=me(P=>{if((P.ctrlKey||N)&&Math.abs(P.deltaY)>Math.abs(P.deltaX)){P.stopPropagation(),o(du(e,-P.deltaY,C),!0,...j(P));return}e>1&&(P.stopPropagation(),N||l(P.deltaX,P.deltaY))}),Q=g.useCallback(P=>{const _=u.current;_.splice(0,_.length,..._.filter(M=>M.pointerId!==P.pointerId))},[]),R=g.useCallback(P=>{Q(P),P.persist(),u.current.push(P)},[Q]),se=me(P=>{var _;const M=u.current;if(P.pointerType==="mouse"&&P.buttons>1||!(!((_=c?.current)===null||_===void 0)&&_.contains(P.target)))return;e>1&&P.stopPropagation();const{timeStamp:T}=P;if(M.length===0&&T-d.current<(P.pointerType==="touch"?I:A)){d.current=0;const O=e>=1?e!==n?e*Math.max(n**(1/k),x):1:e!==t?e/Math.max(t**(-1/k),x):1;o(O,!1,...j(P))}else d.current=T;if(R(P),M.length===2){const O=uu(M[0],M[1]);f.current={previousDistance:O,initialDistance:Math.max(O,1),initialZoom:e}}}),U=me(P=>{const _=u.current,M=_.find(T=>T.pointerId===P.pointerId);if(_.length===2&&f.current){P.stopPropagation(),R(P);const T=uu(_[0],_[1]),O=w?f.current.initialZoom/f.current.initialDistance*T:du(e,T-f.current.previousDistance,E);o(O,!0,..._.map(ne=>j(ne)).reduce((ne,ie)=>ie.map((re,ae)=>ne[ae]+re/2))),f.current.previousDistance=T;return}e>1&&(P.stopPropagation(),M&&(_.length===1&&l((M.clientX-P.clientX)/e,(M.clientY-P.clientY)/e),R(P)))}),J=g.useCallback(P=>{const _=u.current;_.length===2&&_.find(M=>M.pointerId===P.pointerId)&&(f.current=void 0),Q(P)},[Q]),V=g.useCallback(()=>{const P=u.current;P.splice(0,P.length),d.current=0,f.current=void 0},[]);Jc(y,se,U,J,s),g.useEffect(V,[h,V]),g.useEffect(()=>s?()=>{}:Hi(V,y(zi,$),y(Wi,z)),[s,y,V,$,z])}function Xg(e,t,n){const[s,i]=g.useState(1),[r,o]=g.useState(0),[l,c]=g.useState(0),u=Wg(s,r,l,n),{currentSlide:d,globalIndex:f}=mt(),{containerRect:h,slideRect:m}=it(),{minZoom:p,zoomInMultiplier:y}=ss(),v=d&&Kt(d)?d.src:void 0,x=!v||!n?.current;Qe(()=>{i(1),o(0),c(0)},[f,v]);const C=g.useCallback((E,w,j)=>{const $=j||s,z=r-(E||0),Q=l-(w||0),R=(e.width*$-m.width)/2/$,se=(e.height*$-m.height)/2/$;o(Math.min(Math.abs(z),Math.max(R,0))*Math.sign(z)),c(Math.min(Math.abs(Q),Math.max(se,0))*Math.sign(Q))},[s,r,l,m,e.width,e.height]),N=g.useCallback((E,w,j,$)=>{const z=Gi(E+.01<t?E-.01>p?E:p:t,5);w||u(),C(j?j*(1/s-1/z):0,$?$*(1/s-1/z):0,z),i(z)},[s,p,t,C,u]),I=me(()=>{s>1&&(s>t&&N(t,!0),C())});Qe(I,[h.width,h.height,I]);const A=g.useCallback(()=>{const E=s*y;N(s<1&&E>1?1:E)},[s,y,N]),k=g.useCallback(()=>{const E=s/y;N(s>1&&E<1?1:E)},[s,y,N]);return{zoom:s,offsetX:r,offsetY:l,disabled:x,changeOffsets:C,changeZoom:N,zoomIn:A,zoomOut:k}}const fu=g.createContext(null),ro=st("useZoom","ZoomControllerContext",fu);function Gg({children:e}){const[t,n]=g.useState(),{slideRect:s}=it(),{ref:i,minZoom:r}=ss(),{imageRect:o,maxZoom:l}=Ug(s,t?.imageDimensions),{zoom:c,offsetX:u,offsetY:d,disabled:f,changeZoom:h,changeOffsets:m,zoomIn:p,zoomOut:y}=Xg(o,l,t?.zoomWrapperRef);Yg(c,f),Hg(c,r,l,f,p,y,h,m,t?.zoomWrapperRef);const v=g.useMemo(()=>({zoom:c,minZoom:r,maxZoom:l,offsetX:u,offsetY:d,disabled:f,zoomIn:p,zoomOut:y,changeZoom:h}),[c,r,l,u,d,f,p,y,h]);g.useImperativeHandle(i,()=>v,[v]);const x=g.useMemo(()=>({...v,setZoomWrapper:n}),[v,n]);return g.createElement(fu.Provider,{value:x},e)}const Kg=Ct("ZoomIn",g.createElement(g.Fragment,null,g.createElement("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),g.createElement("path",{d:"M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"}))),Zg=Ct("ZoomOut",g.createElement("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7z"})),hu=g.forwardRef(function({zoomIn:t,onLoseFocus:n},s){const i=g.useRef(!1),r=g.useRef(!1),{zoom:o,minZoom:l,maxZoom:c,zoomIn:u,zoomOut:d,disabled:f}=ro(),{render:h}=ze(),m=f||(t?o>=c:o<=l);return g.useEffect(()=>{m&&i.current&&r.current&&n(),m||(i.current=!0)},[m,n]),g.createElement(Qi,{ref:s,disabled:m,label:t?"Zoom in":"Zoom out",icon:t?Kg:Zg,renderIcon:t?h.iconZoomIn:h.iconZoomOut,onClick:t?u:d,onFocus:()=>{r.current=!0},onBlur:()=>{r.current=!1}})});function qg(){const e=g.useRef(null),t=g.useRef(null),{focus:n}=it(),s=g.useCallback(o=>{var l,c;!((l=o.current)===null||l===void 0)&&l.disabled?n():(c=o.current)===null||c===void 0||c.focus()},[n]),i=g.useCallback(()=>s(e),[s]),r=g.useCallback(()=>s(t),[s]);return g.createElement(g.Fragment,null,g.createElement(hu,{zoomIn:!0,ref:e,onLoseFocus:r}),g.createElement(hu,{ref:t,onLoseFocus:i}))}function Jg(){const{render:e}=ze(),t=ro();return e.buttonZoom?g.createElement(g.Fragment,null,e.buttonZoom(t)):g.createElement(qg,null)}function Qg(e){var t;return(((t=e.srcSet)===null||t===void 0?void 0:t.length)||0)>0}function eb({current:e,preload:t},{type:n,source:s}){switch(n){case"fetch":return e?{current:e,preload:s}:{current:s};case"done":return s===t?{current:s}:{current:e,preload:t};default:throw new Error(Lc)}}function tb(e){var t,n;const[{current:s,preload:i},r]=g.useReducer(eb,{}),{slide:o,rect:l,imageFit:c,render:u,interactive:d}=e,f=o.srcSet.sort((A,k)=>A.width-k.width),h=(t=o.width)!==null&&t!==void 0?t:f[f.length-1].width,m=(n=o.height)!==null&&n!==void 0?n:f[f.length-1].height,p=Ki(o,c),y=Math.max(...f.map(A=>A.width)),v=Math.min((p?Math.max:Math.min)(l.width,h*(l.height/m)),y),x=Yp(),C=me(()=>{var A;const k=(A=f.find(E=>E.width>=v*x))!==null&&A!==void 0?A:f[f.length-1];(!s||f.findIndex(E=>E.src===s)<f.findIndex(E=>E===k))&&r({type:"fetch",source:k.src})});Qe(C,[l.width,l.height,x,C]);const N=me(A=>r({type:"done",source:A})),I={WebkitTransform:d?"initial":"translateZ(0)"};return p||Object.assign(I,l.width/l.height<h/m?{width:"100%",height:"auto"}:{width:"auto",height:"100%"}),g.createElement(g.Fragment,null,i&&i!==s&&g.createElement(ns,{key:"preload",...e,offset:void 0,slide:{...o,src:i,srcSet:void 0},style:{position:"absolute",visibility:"hidden",...I},onLoad:()=>N(i),render:{...u,iconLoading:()=>null,iconError:()=>null}}),s&&g.createElement(ns,{key:"current",...e,slide:{...o,src:s,srcSet:void 0},style:I}))}function nb({render:e,slide:t,offset:n,rect:s}){var i;const[r,o]=g.useState(),l=g.useRef(null),{zoom:c,maxZoom:u,offsetX:d,offsetY:f,setZoomWrapper:h}=ro(),m=c>1,{carousel:p,on:y}=ze(),{currentIndex:v}=mt();Qe(()=>n===0?(h({zoomWrapperRef:l,imageDimensions:r}),()=>h(void 0)):()=>{},[n,r,h]);let x=(i=e.slide)===null||i===void 0?void 0:i.call(e,{slide:t,offset:n,rect:s,zoom:c,maxZoom:u});if(!x&&Kt(t)){const C={slide:t,offset:n,rect:s,render:e,imageFit:p.imageFit,imageProps:p.imageProps,onClick:n===0?()=>{var N;return(N=y.click)===null||N===void 0?void 0:N.call(y,{index:v})}:void 0};x=Qg(t)?g.createElement(tb,{...C,slide:t,interactive:m,rect:n===0?{width:s.width*c,height:s.height*c}:s}):g.createElement(ns,{onLoad:N=>o({width:N.naturalWidth,height:N.naturalHeight}),...C})}return x?g.createElement("div",{ref:l,className:Je(fe(Op),fe($i),fe(Nc),m&&fe(Dp)),style:n===0?{transform:`scale(${c}) translateX(${d}px) translateY(${f}px)`}:void 0},x):null}const sb=({augment:e,addModule:t})=>{e(({zoom:n,toolbar:s,render:i,controller:r,...o})=>{const l=cu(n);return{zoom:l,toolbar:Hp(s,Ec,g.createElement(Jg,null)),render:{...i,slide:c=>{var u;return Kt(c.slide)?g.createElement(nb,{render:i,...c}):(u=i.slide)===null||u===void 0?void 0:u.call(i,c)}},controller:{...r,preventDefaultWheelY:l.scrollToZoom},...o}}),t(ht(Ec,Gg))};function ib({onClose:e,images:t}){return b.useEffect(()=>{const n=s=>{s.key==="Escape"&&e()};return window.addEventListener("keydown",n),()=>{window.removeEventListener("keydown",n)}},[e]),a.jsx($g,{open:!0,close:e,plugins:[sb],zoom:{zoomInMultiplier:1.2},slides:t.map(n=>({src:n}))})}function mu({onClose:e,source:t}){return b.useEffect(()=>{const n=s=>{s.key==="Escape"&&e()};return window.addEventListener("keydown",n),()=>{window.removeEventListener("keydown",n)}},[e]),a.jsxs(S.div,{className:"absolute inset-0 z-[10000] bg-black flex items-center justify-center",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.5},children:[a.jsxs(S.button,{onClick:e,className:"absolute top-8 left-1/2 -translate-x-1/2 z-[110] px-6 py-3 bg-slate-800/90 hover:bg-slate-700/90 text-cyan-300 rounded-full transition-all duration-300 border-2 border-cyan-400/50 hover:border-cyan-400/80 shadow-lg hover:shadow-cyan-500/50 font-medium flex items-center gap-2",initial:{opacity:0,y:-50,scale:.8},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-50,scale:.8},transition:{delay:.3,duration:.4,ease:[.34,1.56,.64,1]},whileHover:{scale:1.05,boxShadow:"0 0 30px rgba(34, 211, 238, 0.6)"},whileTap:{scale:.95},children:[a.jsx(F.X,{className:"w-5 h-5"}),a.jsx("span",{children:"Cerrar"})]}),a.jsx(S.div,{className:"w-full h-full",initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},transition:{delay:.2,duration:.6,ease:[.34,1.56,.64,1]},children:a.jsxs("video",{autoPlay:!0,controls:!0,className:"w-full h-full object-contain",src:t,children:[a.jsx("source",{src:t,type:"video/webm"}),"Tu navegador no soporta el elemento de video."]})})]})}const ob={type:"spring",stiffness:300,damping:30,mass:1},rb=[.22,1,.36,1];function ao({card:e,isExpanded:t,isOtherExpanded:n,collapsedUniformHeight:s=!1,onToggle:i,onClose:r,expandedContent:o,delay:l=0,gridSpan:c=!0}){const[u,d]=b.useState(null),f=b.useRef(null),[h,m]=b.useState(!1),[p,y]=b.useState(!1),v=E=>{d(E)},x=()=>{d(null)},C=()=>{u!==null&&e.images&&d((u-1+e.images.length)%e.images.length)},N=()=>{u!==null&&e.images&&d((u+1)%e.images.length)},I=()=>{const E=f.current;if(!E)return;const{scrollLeft:w,scrollWidth:j,clientWidth:$}=E;m(w>0),y(w<j-$-10)},A=E=>{const w=f.current;if(!w)return;const j=280;w.scrollBy({left:E==="left"?-j:j,behavior:"smooth"})};if(b.useEffect(()=>{if(e.images&&e.images.length>6){I();const E=f.current;if(E)return E.addEventListener("scroll",I),window.addEventListener("resize",I),()=>{E.removeEventListener("scroll",I),window.removeEventListener("resize",I)}}},[e.images]),n)return null;const k=()=>t&&c||e.width==="full"?"col-span-full":"";return a.jsxs(a.Fragment,{children:[a.jsx(S.div,{layout:!0,initial:{opacity:0,y:10,scale:.995},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-8,scale:.995,transition:{duration:.14,ease:[.4,0,1,1]}},transition:{duration:.3,ease:rb,delay:l*.03,layout:{type:"spring",stiffness:200,damping:30,mass:.9}},className:`group relative cursor-pointer ${s?"h-full":""} ${k()}`,onClick:t?void 0:i,children:a.jsxs(S.div,{layout:!0,className:`relative p-8 bg-slate-900/40 backdrop-blur-xl border rounded-2xl shadow-xl flex flex-col ${s?"h-full":""}
14
+ `),()=>{A.contains(I)&&A.removeChild(I)}},[t]),a.jsx(n0,{isPresent:t,childRef:l,sizeRef:c,pop:r,children:r===!1?e:g.cloneElement(e,{ref:f})})}const i0=({children:e,initial:t,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:r,mode:o,anchorX:l,anchorY:c,root:u})=>{const d=Sn(o0),f=b.useId();let h=!0,m=b.useMemo(()=>(h=!1,{id:f,initial:t,isPresent:n,custom:i,onExitComplete:p=>{d.set(p,!0);for(const y of d.values())if(!y)return;s&&s()},register:p=>(d.set(p,!1),()=>d.delete(p))}),[n,d,s]);return r&&h&&(m={...m}),b.useMemo(()=>{d.forEach((p,y)=>d.set(y,!1))},[n]),g.useEffect(()=>{!n&&!d.size&&s&&s()},[n]),e=a.jsx(s0,{pop:o==="popLayout",isPresent:n,anchorX:l,anchorY:c,root:u,children:e}),a.jsx(en.Provider,{value:m,children:e})};function o0(){return new Map}function dl(e=!0){const t=b.useContext(en);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=t,r=b.useId();b.useEffect(()=>{if(e)return i(r)},[e]);const o=b.useCallback(()=>e&&s&&s(r),[r,s,e]);return!n&&s?[!1,o]:[!0]}function r0(){return a0(b.useContext(en))}function a0(e){return e===null?!0:e.isPresent}const Bn=e=>e.key||"";function fl(e){const t=[];return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const Ce=({children:e,custom:t,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:r="sync",propagate:o=!1,anchorX:l="left",anchorY:c="top",root:u})=>{const[d,f]=dl(o),h=b.useMemo(()=>fl(e),[e]),m=o&&!d?[]:h.map(Bn),p=b.useRef(!0),y=b.useRef(h),v=Sn(()=>new Map),x=b.useRef(new Set),[C,N]=b.useState(h),[I,A]=b.useState(h);ko(()=>{p.current=!1,y.current=h;for(let w=0;w<I.length;w++){const j=Bn(I[w]);m.includes(j)?(v.delete(j),x.current.delete(j)):v.get(j)!==!0&&v.set(j,!1)}},[I,m.length,m.join("-")]);const k=[];if(h!==C){let w=[...h];for(let j=0;j<I.length;j++){const $=I[j],z=Bn($);m.includes(z)||(w.splice(j,0,$),k.push($))}return r==="wait"&&k.length&&(w=k),A(fl(w)),N(h),null}process.env.NODE_ENV!=="production"&&r==="wait"&&I.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:E}=b.useContext(as);return a.jsx(a.Fragment,{children:I.map(w=>{const j=Bn(w),$=o&&!d?!1:h===I||m.includes(j),z=()=>{if(x.current.has(j))return;if(x.current.add(j),v.has(j))v.set(j,!0);else return;let Q=!0;v.forEach(R=>{R||(Q=!1)}),Q&&(E?.(),A(y.current),o&&f?.(),s&&s())};return a.jsx(i0,{isPresent:$,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:r,root:u,onExitComplete:$?void 0:z,anchorX:l,anchorY:c,children:w},j)})})},hl=b.createContext({strict:!1}),ml={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"]};let pl=!1;function l0(){if(pl)return;const e={};for(const t in ml)e[t]={isEnabled:n=>ml[t].some(s=>!!n[s])};oa(e),pl=!0}function gl(){return l0(),Gf()}function c0(e){const t=gl();for(const n in e)t[n]={...t[n],...e[n]};oa(t)}const u0=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","propagate","ignoreStrict","viewport"]);function zn(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||u0.has(e)}let bl=e=>!zn(e);function d0(e){typeof e=="function"&&(bl=t=>t.startsWith("on")?!zn(t):e(t))}try{d0(require("@emotion/is-prop-valid").default)}catch{}function f0(e,t,n){const s={};for(const i in e)i==="values"&&typeof e.values=="object"||(bl(i)||n===!0&&zn(i)||!t&&!zn(i)||e.draggable&&i.startsWith("onDrag"))&&(s[i]=e[i]);return s}const Wn=b.createContext({});function h0(e,t){if(On(e)){const{initial:n,animate:s}=e;return{initial:n===!1||dn(n)?n:void 0,animate:dn(s)?s:void 0}}return e.inherit!==!1?t:{}}function m0(e){const{initial:t,animate:n}=h0(e,b.useContext(Wn));return b.useMemo(()=>({initial:t,animate:n}),[yl(t),yl(n)])}function yl(e){return Array.isArray(e)?e.join(" "):e}const gi=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function xl(e,t,n){for(const s in t)!ke(t[s])&&!xa(s,n)&&(e[s]=t[s])}function p0({transformTemplate:e},t){return b.useMemo(()=>{const n=gi();return ui(n,t,e),Object.assign({},n.vars,n.style)},[t])}function g0(e,t){const n=e.style||{},s={};return xl(s,n,e),Object.assign(s,p0(e,t)),s}function b0(e,t){const n={},s=g0(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.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=s,n}const vl=()=>({...gi(),attrs:{}});function y0(e,t,n,s){const i=b.useMemo(()=>{const r=vl();return wa(r,t,Ta(s),e.transformTemplate,e.style),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};xl(r,e.style,e),i.style={...r,...i.style}}return i}const x0=["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 bi(e){return typeof e!="string"||e.includes("-")?!1:!!(x0.indexOf(e)>-1||/[A-Z]/u.test(e))}function v0(e,t,n,{latestValues:s},i,r=!1,o){const c=(o??bi(e)?y0:b0)(t,s,i,e),u=f0(t,typeof e=="string",r),d=e!==b.Fragment?{...u,...c,ref:n}:{},{children:f}=t,h=b.useMemo(()=>ke(f)?f.get():f,[f]);return b.createElement(e,{...d,children:h})}function w0({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,i){return{latestValues:S0(n,s,i,e),renderState:t()}}function S0(e,t,n,s){const i={},r=s(e,{});for(const h in r)i[h]=_n(r[h]);let{initial:o,animate:l}=e;const c=On(e),u=na(e);t&&u&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const f=d?l:o;if(f&&typeof f!="boolean"&&!Vn(f)){const h=Array.isArray(f)?f:[f];for(let m=0;m<h.length;m++){const p=Ys(e,h[m]);if(p){const{transitionEnd:y,transition:v,...x}=p;for(const C in x){let N=x[C];if(Array.isArray(N)){const I=d?N.length-1:0;N=N[I]}N!==null&&(i[C]=N)}for(const C in y)i[C]=y[C]}}}return i}const wl=e=>(t,n)=>{const s=b.useContext(Wn),i=b.useContext(en),r=()=>w0(e,t,s,i);return n?r():Sn(r)},T0=wl({scrapeMotionValuesFromProps:fi,createRenderState:gi}),E0=wl({scrapeMotionValuesFromProps:Ea,createRenderState:vl}),C0=Symbol.for("motionComponentSymbol");function N0(e,t,n){const s=b.useRef(n);b.useInsertionEffect(()=>{s.current=n});const i=b.useRef(null);return b.useCallback(r=>{r&&e.onMount?.(r),t&&(r?t.mount(r):t.unmount());const o=s.current;if(typeof o=="function")if(r){const l=o(r);typeof l=="function"&&(i.current=l)}else i.current?(i.current(),i.current=null):o(r);else o&&(o.current=r)},[t])}const Sl=b.createContext({});function Yt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function k0(e,t,n,s,i,r){const{visualElement:o}=b.useContext(Wn),l=b.useContext(hl),c=b.useContext(en),u=b.useContext($n),d=u.reducedMotion,f=u.skipAnimations,h=b.useRef(null),m=b.useRef(!1);s=s||l.renderer,!h.current&&s&&(h.current=s(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:d,skipAnimations:f,isSVG:r}),m.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const p=h.current,y=b.useContext(Sl);p&&!p.projection&&i&&(p.type==="html"||p.type==="svg")&&P0(h.current,n,i,y);const v=b.useRef(!1);b.useInsertionEffect(()=>{p&&v.current&&p.update(n,c)});const x=n[Dr],C=b.useRef(!!x&&!window.MotionHandoffIsComplete?.(x)&&window.MotionHasOptimisedAnimation?.(x));return ko(()=>{m.current=!0,p&&(v.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),C.current&&p.animationState&&p.animationState.animateChanges())}),b.useEffect(()=>{p&&(!C.current&&p.animationState&&p.animationState.animateChanges(),C.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(x)}),C.current=!1),p.enteringChildren=void 0)}),p}function P0(e,t,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:l,layoutScroll:c,layoutRoot:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Tl(e.parent)),e.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||l&&Yt(l),visualElement:e,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,crossfade:d,layoutScroll:c,layoutRoot:u})}function Tl(e){if(e)return e.options.allowProjection!==!1?e.projection:Tl(e.parent)}function yi(e,{forwardMotionProps:t=!1,type:n}={},s,i){s&&c0(s);const r=n?n==="svg":bi(e),o=r?E0:T0;function l(u,d){let f;const h={...b.useContext($n),...u,layoutId:j0(u)},{isStatic:m}=h,p=m0(u),y=o(u,m);if(!m&&No){I0(h,s);const v=M0(h);f=v.MeasureLayout,p.visualElement=k0(e,y,h,i,v.ProjectionNode,r)}return a.jsxs(Wn.Provider,{value:p,children:[f&&p.visualElement?a.jsx(f,{visualElement:p.visualElement,...h}):null,v0(e,u,N0(y,p.visualElement,d),y,m,t,r)]})}l.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=b.forwardRef(l);return c[C0]=e,c}function j0({layoutId:e}){const t=b.useContext(as).id;return t&&e!==void 0?t+"-"+e:e}function I0(e,t){const n=b.useContext(hl).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?At(!1,s,"lazy-strict-mode"):Ue(!1,s,"lazy-strict-mode")}}function M0(e){const t=gl(),{drag:n,layout:s}=t;if(!n&&!s)return{};const i={...n,...s};return{MeasureLayout:n?.isEnabled(e)||s?.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function A0(e,t){if(typeof Proxy>"u")return yi;const n=new Map,s=(r,o)=>yi(r,o,e,t),i=(r,o)=>(process.env.NODE_ENV!=="production"&&ds(!1,"motion() is deprecated. Use motion.create() instead."),s(r,o));return new Proxy(i,{get:(r,o)=>o==="create"?s:(n.has(o)||n.set(o,yi(o,void 0,e,t)),n.get(o))})}const V0=(e,t)=>t.isSVG??bi(e)?new Ca(t):new va(t,{allowProjection:e!==b.Fragment});class O0 extends ut{constructor(t){super(t),t.animationState||(t.animationState=ph(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Vn(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(){this.node.animationState.reset(),this.unmountControls?.()}}let L0=0;class D0 extends ut{constructor(){super(...arguments),this.id=L0++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.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 R0={animation:{Feature:O0},exit:{Feature:D0}};function pn(e){return{point:{x:e.pageX,y:e.pageY}}}const _0=e=>t=>ni(t)&&e(t,pn(t));function gn(e,t,n,s){return mn(e,t,_0(n),s)}const El=({current:e})=>e?e.ownerDocument.defaultView:null,Cl=(e,t)=>Math.abs(e-t);function F0(e,t){const n=Cl(e.x,t.x),s=Cl(e.y,t.y);return Math.sqrt(n**2+s**2)}const Nl=new Set(["auto","scroll"]);class kl{constructor(t,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:r=!1,distanceThreshold:o=3,element:l}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=m=>{this.handleScroll(m.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=vi(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,y=F0(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!y)return;const{point:v}=m,{timestamp:x}=Ae;this.history.push({...v,timestamp:x});const{onStart:C,onMove:N}=this.handlers;p||(C&&C(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),N&&N(this.lastMoveEvent,m)},this.handlePointerMove=(m,p)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=xi(p,this.transformPagePoint),ye.update(this.updatePoint,!0)},this.handlePointerUp=(m,p)=>{this.end();const{onEnd:y,onSessionEnd:v,resumeAnimation:x}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const C=vi(m.type==="pointercancel"?this.lastMoveEventInfo:xi(p,this.transformPagePoint),this.history);this.startEvent&&y&&y(m,C),v&&v(m,C)},!ni(t))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=o,this.contextWindow=i||window;const c=pn(t),u=xi(c,this.transformPagePoint),{point:d}=u,{timestamp:f}=Ae;this.history=[{...d,timestamp:f}];const{onSessionStart:h}=n;h&&h(t,vi(u,this.history)),this.removeListeners=tn(gn(this.contextWindow,"pointermove",this.handlePointerMove),gn(this.contextWindow,"pointerup",this.handlePointerUp),gn(this.contextWindow,"pointercancel",this.handlePointerUp)),l&&this.startScrollTracking(l)}startScrollTracking(t){let n=t.parentElement;for(;n;){const s=getComputedStyle(n);(Nl.has(s.overflowX)||Nl.has(s.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const s=t===window,i=s?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},r={x:i.x-n.x,y:i.y-n.y};r.x===0&&r.y===0||(s?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=r.x,this.lastMoveEventInfo.point.y+=r.y):this.history.length>0&&(this.history[0].x-=r.x,this.history[0].y-=r.y),this.scrollPositions.set(t,i),ye.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),rt(this.updatePoint)}}function xi(e,t){return t?{point:t(e.point)}:e}function Pl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function vi({point:e},t){return{point:e,delta:Pl(e,jl(t)),offset:Pl(e,$0(t)),velocity:B0(t,.1)}}function $0(e){return e[0]}function jl(e){return e[e.length-1]}function B0(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,s=null;const i=jl(e);for(;n>=0&&(s=e[n],!(i.timestamp-s.timestamp>Fe(t)));)n--;if(!s)return{x:0,y:0};s===e[0]&&e.length>2&&i.timestamp-s.timestamp>Fe(t)*2&&(s=e[1]);const r=ze(i.timestamp-s.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function z0(e,{min:t,max:n},s){return t!==void 0&&e<t?e=s?ve(t,e,s.min):Math.max(e,t):n!==void 0&&e>n&&(e=s?ve(n,e,s.max):Math.min(e,n)),e}function Il(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 W0(e,{top:t,left:n,bottom:s,right:i}){return{x:Il(e.x,n,i),y:Il(e.y,t,s)}}function Ml(e,t){let n=t.min-e.min,s=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,s]=[s,n]),{min:n,max:s}}function Y0(e,t){return{x:Ml(e.x,t.x),y:Ml(e.y,t.y)}}function U0(e,t){let n=.5;const s=De(e),i=De(t);return i>s?n=Vt(t.min,t.max-s,e.min):s>i&&(n=Vt(e.min,e.max-i,t.min)),Ze(0,1,n)}function H0(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 wi=.35;function X0(e=wi){return e===!1?e=0:e===!0&&(e=wi),{x:Al(e,"left","right"),y:Al(e,"top","bottom")}}function Al(e,t,n){return{min:Vl(e,t),max:Vl(e,n)}}function Vl(e,t){return typeof e=="number"?e:e[t]||0}const G0=new WeakMap;class K0{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=Ee(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const r=f=>{n&&this.snapToCursor(pn(f).point),this.stopAnimation()},o=(f,h)=>{const{drag:m,dragPropagation:p,onDragStart:y}=this.getProps();if(m&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Nf(m),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Je(x=>{let C=this.getAxisMotionValue(x).get()||0;if(qe.test(C)){const{projection:N}=this.visualElement;if(N&&N.layout){const I=N.layout.layoutBox[x];I&&(C=De(I)*(parseFloat(C)/100))}}this.originPoint[x]=C}),y&&ye.update(()=>y(f,h),!1,!0),Hs(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},l=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h;const{dragPropagation:m,dragDirectionLock:p,onDirectionLock:y,onDrag:v}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:x}=h;if(p&&this.currentDirection===null){this.currentDirection=q0(x),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",h.point,x),this.updateAxis("y",h.point,x),this.visualElement.render(),v&&ye.update(()=>v(f,h),!1,!0)},c=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h,this.stop(f,h),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:f}=this.getProps();(f||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:d}=this.getProps();this.panSession=new kl(t,{onSessionStart:r,onStart:o,onMove:l,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:s,contextWindow:El(this.visualElement),element:this.visualElement.current})}stop(t,n){const s=t||this.latestPointerEvent,i=n||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!i||!s)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:l}=this.getProps();l&&ye.postRender(()=>l(s,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,s){const{drag:i}=this.getProps();if(!s||!Yn(t,i,this.currentDirection))return;const r=this.getAxisMotionValue(t);let o=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(o=z0(o,this.constraints[t],this.elastic[t])),r.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&Yt(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&s?this.constraints=W0(s.layoutBox,t):this.constraints=!1,this.elastic=X0(n),i!==this.constraints&&!Yt(t)&&s&&this.constraints&&!this.hasMutatedConstraints&&Je(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=H0(s.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Yt(t))return!1;const s=t.current;Ue(s!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=Jf(s,i.root,this.visualElement.getTransformPagePoint());let o=Y0(i.layout.layoutBox,r);if(n){const l=n(Kf(o));this.hasMutatedConstraints=!!l,l&&(o=la(l))}return o}startAnimation(t){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=Je(d=>{if(!Yn(d,n,this.currentDirection))return;let f=c&&c[d]||{};o&&(f={min:0,max:0});const h=i?200:1e6,m=i?40:1e7,p={type:"inertia",velocity:s?t[d]:0,bounceStiffness:h,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...r,...f};return this.startAxisValueAnimation(d,p)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const s=this.getAxisMotionValue(t);return Hs(this.visualElement,t),s.start(Ws(t,s,0,n,this.visualElement,!1))}stopAnimation(){Je(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(t,(s.initial?s.initial[t]:void 0)||0)}snapToCursor(t){Je(n=>{const{drag:s}=this.getProps();if(!Yn(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:l}=i.layout.layoutBox[n],c=r.get()||0;r.set(t[n]-ve(o,l,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!Yt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Je(o=>{const l=this.getAxisMotionValue(o);if(l&&this.constraints!==!1){const c=l.get();i[o]=U0({min:c,max:c},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.constraints=!1,this.resolveConstraints(),Je(o=>{if(!Yn(o,t,null))return;const l=this.getAxisMotionValue(o),{min:c,max:u}=this.constraints[o];l.set(ve(c,u,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;G0.set(this.visualElement,this);const t=this.visualElement.current,n=gn(t,"pointerdown",u=>{const{drag:d,dragListener:f=!0}=this.getProps(),h=u.target,m=h!==t&&Af(h);d&&f&&!m&&this.start(u)});let s;const i=()=>{const{dragConstraints:u}=this.getProps();Yt(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),s||(s=Z0(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:r}=this.visualElement,o=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),ye.read(i);const l=mn(window,"resize",()=>this.scalePositionWithinConstraints()),c=r.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:d})=>{this.isDragging&&d&&(Je(f=>{const h=this.getAxisMotionValue(f);h&&(this.originPoint[f]+=u[f].translate,h.set(h.get()+u[f].translate))}),this.visualElement.render())}));return()=>{l(),n(),o(),c&&c(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=wi,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:l}}}function Ol(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Z0(e,t,n){const s=Jr(e,Ol(n)),i=Jr(t,Ol(n));return()=>{s(),i()}}function Yn(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function q0(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class J0 extends ut{constructor(t){super(t),this.removeGroupControls=Be,this.removeListeners=Be,this.controls=new K0(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Be}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Si=e=>(t,n)=>{e&&ye.update(()=>e(t,n),!1,!0)};class Q0 extends ut{constructor(){super(...arguments),this.removePointerDownListener=Be}onPointerDown(t){this.session=new kl(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:El(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Si(t),onStart:Si(n),onMove:Si(s),onEnd:(r,o)=>{delete this.session,i&&ye.postRender(()=>i(r,o))}}}mount(){this.removePointerDownListener=gn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Ti=!1;class em extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:r}=t;r&&(n.group&&n.group.add(r),s&&s.register&&i&&s.register(r),Ti&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Fn.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:s,drag:i,isPresent:r}=this.props,{projection:o}=s;return o&&(o.isPresent=r,t.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),Ti=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==r?o.willUpdate():this.safeToRemove(),t.isPresent!==r&&(r?o.promote():o.relegate()||ye.postRender(()=>{const l=o.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),ti.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=t;Ti=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Ll(e){const[t,n]=dl(),s=b.useContext(as);return a.jsx(em,{...e,layoutGroup:s,switchLayoutGroup:b.useContext(Sl),isPresent:t,safeToRemove:n})}const tm={pan:{Feature:Q0},drag:{Feature:J0,ProjectionNode:cl,MeasureLayout:Ll}};function Dl(e,t,n){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,r=s[i];r&&ye.postRender(()=>r(t,pn(t)))}class nm extends ut{mount(){const{current:t}=this.node;t&&(this.unmount=Pf(t,(n,s)=>(Dl(this.node,s,"Start"),i=>Dl(this.node,i,"End"))))}unmount(){}}class sm extends ut{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=tn(mn(this.node.current,"focus",()=>this.onFocus()),mn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Rl(e,t,n){const{props:s}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),r=s[i];r&&ye.postRender(()=>r(t,pn(t)))}class im extends ut{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=Of(t,(i,r)=>(Rl(this.node,r,"Start"),(o,{success:l})=>Rl(this.node,o,l?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:s?.tap===!1})}unmount(){}}const Ei=new WeakMap,Ci=new WeakMap,om=e=>{const t=Ei.get(e.target);t&&t(e)},rm=e=>{e.forEach(om)};function am({root:e,...t}){const n=e||document;Ci.has(n)||Ci.set(n,{});const s=Ci.get(n),i=JSON.stringify(t);return s[i]||(s[i]=new IntersectionObserver(rm,{root:e,...t})),s[i]}function lm(e,t,n){const s=am(t);return Ei.set(e,n),s.observe(e),()=>{Ei.delete(e),s.unobserve(e)}}const cm={some:0,all:1};class um extends ut{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:r}=t,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:cm[i]},l=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,r&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),h=u?d:f;h&&h(c)};return lm(this.node.current,o,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(dm(t,n))&&this.startObserver()}unmount(){}}function dm({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const fm={...R0,...{inView:{Feature:um},tap:{Feature:im},focus:{Feature:sm},hover:{Feature:nm}},...tm,...{layout:{ProjectionNode:cl,MeasureLayout:Ll}}},S=A0(fm,V0);function hm(e){const t=Sn(()=>ct(e)),{isStatic:n}=b.useContext($n);if(n){const[,s]=b.useState(e);b.useEffect(()=>t.on("change",s),[])}return t}function Ni(e){return typeof e=="object"&&!Array.isArray(e)}function _l(e,t,n,s){return e==null?[]:typeof e=="string"&&Ni(t)?Qs(e,n,s):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(i=>i!=null):[e]}function mm(e,t,n){return e*(t+1)}function Fl(e,t,n,s){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:t.startsWith("<")?Math.max(0,n+parseFloat(t.slice(1))):s.get(t)??e}function pm(e,t,n){for(let s=0;s<e.length;s++){const i=e[s];i.at>t&&i.at<n&&(Mt(e,i),s--)}}function gm(e,t,n,s,i,r){pm(e,i,r);for(let o=0;o<t.length;o++)e.push({value:t[o],at:ve(i,r,s[o]),easing:Yo(n,o)})}function bm(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function ym(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const xm="easeInOut",vm=20;function wm(e,{defaultTransition:t={},...n}={},s,i){const r=t.duration||.3,o=new Map,l=new Map,c={},u=new Map;let d=0,f=0,h=0;for(let m=0;m<e.length;m++){const p=e[m];if(typeof p=="string"){u.set(p,f);continue}else if(!Array.isArray(p)){u.set(p.name,Fl(f,p.at,d,u));continue}let[y,v,x={}]=p;x.at!==void 0&&(f=Fl(f,x.at,d,u));let C=0;const N=(I,A,k,E=0,w=0)=>{const j=Sm(I),{delay:$=0,times:z=mr(j),type:Q=t.type||"keyframes",repeat:R,repeatType:se,repeatDelay:U=0,...J}=A;let{ease:V=t.ease||"easeOut",duration:P}=A;const _=typeof $=="function"?$(E,w):$,M=j.length,T=Fs(Q)?Q:i?.[Q||"keyframes"];if(M<=2&&T){let ie=100;if(M===2&&Cm(j)){const ge=j[1]-j[0];ie=Math.abs(ge)}const le={...t,...J};P!==void 0&&(le.duration=Fe(P));const re=ur(le,ie,T);V=re.ease,P=re.duration}P??(P=r);const O=f+_;z.length===1&&z[0]===0&&(z[1]=1);const ne=z.length-j.length;if(ne>0&&hr(z,ne),j.length===1&&j.unshift(null),R){Ue(R<vm,"Repeat count too high, must be less than 20","repeat-count-high"),P=mm(P,R);const ie=[...j],le=[...z];V=Array.isArray(V)?[...V]:[V];const re=[...V];for(let ge=0;ge<R;ge++){j.push(...ie);for(let ue=0;ue<ie.length;ue++)z.push(le[ue]+(ge+1)),V.push(ue===0?"linear":Yo(re,ue-1))}bm(z,R)}const ae=O+P;gm(k,j,V,z,O,ae),C=Math.max(_+P,C),h=Math.max(ae,h)};if(ke(y)){const I=$l(y,l);N(v,x,Bl("default",I))}else{const I=_l(y,v,s,c),A=I.length;for(let k=0;k<A;k++){v=v,x=x;const E=I[k],w=$l(E,l);for(const j in v)N(v[j],Tm(x,j),Bl(j,w),k,A)}}d=f,f+=C}return l.forEach((m,p)=>{for(const y in m){const v=m[y];v.sort(ym);const x=[],C=[],N=[];for(let E=0;E<v.length;E++){const{at:w,value:j,easing:$}=v[E];x.push(j),C.push(Vt(0,h,w)),N.push($||"easeOut")}C[0]!==0&&(C.unshift(0),x.unshift(x[0]),N.unshift(xm)),C[C.length-1]!==1&&(C.push(1),x.push(null)),o.has(p)||o.set(p,{keyframes:{},transition:{}});const I=o.get(p);I.keyframes[y]=x;const{type:A,...k}=t;I.transition[y]={...k,duration:h,ease:N,times:C,...n}}}),o}function $l(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Bl(e,t){return t[e]||(t[e]=[]),t[e]}function Sm(e){return Array.isArray(e)?e:[e]}function Tm(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const Em=e=>typeof e=="number",Cm=e=>e.every(Em);function Nm(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=jn(e)&&!Qr(e)?new Ca(t):new va(t);n.mount(e),un.set(e,n)}function km(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new oh(t);n.mount(e),un.set(e,n)}function Pm(e,t){return ke(e)||typeof e=="number"||typeof e=="string"&&!Ni(t)}function zl(e,t,n,s){const i=[];if(Pm(e,t))i.push(qa(e,Ni(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return i;const r=_l(e,t,s),o=r.length;Ue(!!o,"No valid elements provided.","no-valid-elements");for(let l=0;l<o;l++){const c=r[l],u=c instanceof Element?Nm:km;un.has(c)||u(c);const d=un.get(c),f={...n};"delay"in f&&typeof f.delay=="function"&&(f.delay=f.delay(l,o)),i.push(...Gs(d,{...t,transition:f},{}))}}return i}function jm(e,t,n){const s=[],i=e.map(o=>{if(Array.isArray(o)&&typeof o[0]=="function"){const l=o[0],c=ct(0);return c.on("change",l),o.length===1?[c,[0,1]]:o.length===2?[c,[0,1],o[1]]:[c,o[1],o[2]]}return o});return wm(i,t,n,{spring:ln}).forEach(({keyframes:o,transition:l},c)=>{s.push(...zl(c,o,l))}),s}function Im(e){return Array.isArray(e)&&e.some(Array.isArray)}function Mm(e={}){const{scope:t,reduceMotion:n}=e;function s(i,r,o){let l=[],c;if(Im(i))l=jm(i,n!==void 0?{reduceMotion:n,...r}:r,t);else{const{onComplete:d,...f}=o||{};typeof d=="function"&&(c=d),l=zl(i,r,n!==void 0?{reduceMotion:n,...f}:f,t)}const u=new Xd(l);return c&&u.finished.then(c),t&&(t.animations.push(u),u.finished.then(()=>{Mt(t.animations,u)})),u}return s}const ki=Mm(),Wl=({onClick:e})=>a.jsx(S.button,{className:"inline-flex items-center gap-1 sm:gap-2 px-3 sm:px-4 md:px-6 py-2 sm:py-3 bg-slate-800/80 hover:bg-slate-700/80 text-cyan-300 font-medium text-xs sm:text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-slate-500/25 border border-cyan-400/30 hover:border-cyan-400/60",whileHover:{scale:1.05},whileTap:{scale:.95},initial:{opacity:0},animate:{opacity:1},transition:{delay:0,duration:.6},onClick:e,children:a.jsx(F.Grid2x2,{className:"w-3 h-3 sm:w-4 sm:h-4"})}),Pi=({Icon:e,onClick:t,delay:n=0})=>a.jsx(S.button,{className:"inline-flex items-center gap-1 sm:gap-2 px-3 sm:px-4 md:px-6 py-2 sm:py-3 bg-slate-800/80 hover:bg-slate-700/80 text-cyan-300 font-medium text-xs sm:text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-slate-500/25 border border-cyan-400/30 hover:border-cyan-400/60",whileHover:{scale:1.05},whileTap:{scale:.95},initial:{opacity:0},animate:{opacity:1},transition:{delay:n,duration:.6},onClick:t,children:a.jsx(e,{className:"w-3 h-3 sm:w-4 sm:h-4"})});function Yl({iconName:e,className:t}){const n=rs[e];return n?a.jsx(n,{className:t}):null}const Un=({item:e,onClick:t})=>a.jsx(a.Fragment,{children:a.jsx(S.button,{className:"inline-flex items-center gap-1 sm:gap-2 px-3 sm:px-4 md:px-6 py-2 sm:py-3 bg-slate-800/80 hover:bg-slate-700/80 text-cyan-300 font-medium text-xs sm:text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-slate-500/25 border border-cyan-400/30 hover:border-cyan-400/60",whileHover:{scale:1.05},whileTap:{scale:.95},initial:{opacity:0},animate:{opacity:1},transition:{delay:0,duration:.6},onClick:t,children:a.jsxs(a.Fragment,{children:[e.text,a.jsx(Yl,{iconName:e.icon,className:"w-3 h-3 sm:w-4 sm:h-4"})]})})}),ji=b.createContext(void 0),Am=({children:e})=>{const[t,n]=b.useState(!1),s=b.useCallback(r=>{n(r)},[]),i=b.useCallback(()=>{n(r=>!r)},[]);return a.jsx(ji.Provider,{value:{isMinimized:t,setMinimized:s,toggleMinimized:i},children:e})},Vm=()=>{const e=b.useContext(ji);if(!e)throw new Error("useMinimize debe ser usado dentro de un MinimizeProvider");return e},Ii=()=>b.useContext(ji),Ul=b.createContext({lastEvent:null,setLastEvent:()=>{},internalEvent:null,setInternalEvent:()=>{}}),Om=({children:e})=>{const[t,n]=b.useState(null),[s,i]=b.useState(null);return a.jsx(Ul.Provider,{value:{lastEvent:t,setLastEvent:n,internalEvent:s,setInternalEvent:i},children:e})},wt=()=>b.useContext(Ul);function Hl(e){var t,n,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Hl(e[t]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}function Xl(){for(var e,t,n=0,s="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Hl(e))&&(s&&(s+=" "),s+=t);return s}const Lm=(e,t)=>{const n=new Array(e.length+t.length);for(let s=0;s<e.length;s++)n[s]=e[s];for(let s=0;s<t.length;s++)n[e.length+s]=t[s];return n},Dm=(e,t)=>({classGroupId:e,validator:t}),Gl=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Hn="-",Kl=[],Rm="arbitrary..",_m=e=>{const t=$m(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return Fm(o);const l=o.split(Hn),c=l[0]===""&&l.length>1?1:0;return Zl(l,c,t)},getConflictingClassGroupIds:(o,l)=>{if(l){const c=s[o],u=n[o];return c?u?Lm(u,c):c:u||Kl}return n[o]||Kl}}},Zl=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],r=n.nextPart.get(i);if(r){const u=Zl(e,t+1,r);if(u)return u}const o=n.validators;if(o===null)return;const l=t===0?e.join(Hn):e.slice(t).join(Hn),c=o.length;for(let u=0;u<c;u++){const d=o[u];if(d.validator(l))return d.classGroupId}},Fm=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),s=t.slice(0,n);return s?Rm+s:void 0})(),$m=e=>{const{theme:t,classGroups:n}=e;return Bm(n,t)},Bm=(e,t)=>{const n=Gl();for(const s in e){const i=e[s];Mi(i,n,s,t)}return n},Mi=(e,t,n,s)=>{const i=e.length;for(let r=0;r<i;r++){const o=e[r];zm(o,t,n,s)}},zm=(e,t,n,s)=>{if(typeof e=="string"){Wm(e,t,n);return}if(typeof e=="function"){Ym(e,t,n,s);return}Um(e,t,n,s)},Wm=(e,t,n)=>{const s=e===""?t:ql(t,e);s.classGroupId=n},Ym=(e,t,n,s)=>{if(Hm(e)){Mi(e(s),t,n,s);return}t.validators===null&&(t.validators=[]),t.validators.push(Dm(n,e))},Um=(e,t,n,s)=>{const i=Object.entries(e),r=i.length;for(let o=0;o<r;o++){const[l,c]=i[o];Mi(c,ql(t,l),n,s)}},ql=(e,t)=>{let n=e;const s=t.split(Hn),i=s.length;for(let r=0;r<i;r++){const o=s[r];let l=n.nextPart.get(o);l||(l=Gl(),n.nextPart.set(o,l)),n=l}return n},Hm=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Xm=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),s=Object.create(null);const i=(r,o)=>{n[r]=o,t++,t>e&&(t=0,s=n,n=Object.create(null))};return{get(r){let o=n[r];if(o!==void 0)return o;if((o=s[r])!==void 0)return i(r,o),o},set(r,o){r in n?n[r]=o:i(r,o)}}},Ai="!",Jl=":",Gm=[],Ql=(e,t,n,s,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:s,isExternal:i}),Km=e=>{const{prefix:t,experimentalParseClassName:n}=e;let s=i=>{const r=[];let o=0,l=0,c=0,u;const d=i.length;for(let y=0;y<d;y++){const v=i[y];if(o===0&&l===0){if(v===Jl){r.push(i.slice(c,y)),c=y+1;continue}if(v==="/"){u=y;continue}}v==="["?o++:v==="]"?o--:v==="("?l++:v===")"&&l--}const f=r.length===0?i:i.slice(c);let h=f,m=!1;f.endsWith(Ai)?(h=f.slice(0,-1),m=!0):f.startsWith(Ai)&&(h=f.slice(1),m=!0);const p=u&&u>c?u-c:void 0;return Ql(r,m,h,p)};if(t){const i=t+Jl,r=s;s=o=>o.startsWith(i)?r(o.slice(i.length)):Ql(Gm,!1,o,void 0,!0)}if(n){const i=s;s=r=>n({className:r,parseClassName:i})}return s},Zm=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,s)=>{t.set(n,1e6+s)}),n=>{const s=[];let i=[];for(let r=0;r<n.length;r++){const o=n[r],l=o[0]==="[",c=t.has(o);l||c?(i.length>0&&(i.sort(),s.push(...i),i=[]),s.push(o)):i.push(o)}return i.length>0&&(i.sort(),s.push(...i)),s}},qm=e=>({cache:Xm(e.cacheSize),parseClassName:Km(e),sortModifiers:Zm(e),..._m(e)}),Jm=/\s+/,Qm=(e,t)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:i,sortModifiers:r}=t,o=[],l=e.trim().split(Jm);let c="";for(let u=l.length-1;u>=0;u-=1){const d=l[u],{isExternal:f,modifiers:h,hasImportantModifier:m,baseClassName:p,maybePostfixModifierPosition:y}=n(d);if(f){c=d+(c.length>0?" "+c:c);continue}let v=!!y,x=s(v?p.substring(0,y):p);if(!x){if(!v){c=d+(c.length>0?" "+c:c);continue}if(x=s(p),!x){c=d+(c.length>0?" "+c:c);continue}v=!1}const C=h.length===0?"":h.length===1?h[0]:r(h).join(":"),N=m?C+Ai:C,I=N+x;if(o.indexOf(I)>-1)continue;o.push(I);const A=i(x,v);for(let k=0;k<A.length;++k){const E=A[k];o.push(N+E)}c=d+(c.length>0?" "+c:c)}return c},ep=(...e)=>{let t=0,n,s,i="";for(;t<e.length;)(n=e[t++])&&(s=ec(n))&&(i&&(i+=" "),i+=s);return i},ec=e=>{if(typeof e=="string")return e;let t,n="";for(let s=0;s<e.length;s++)e[s]&&(t=ec(e[s]))&&(n&&(n+=" "),n+=t);return n},tp=(e,...t)=>{let n,s,i,r;const o=c=>{const u=t.reduce((d,f)=>f(d),e());return n=qm(u),s=n.cache.get,i=n.cache.set,r=l,l(c)},l=c=>{const u=s(c);if(u)return u;const d=Qm(c,n);return i(c,d),d};return r=o,(...c)=>r(ep(...c))},np=[],Ne=e=>{const t=n=>n[e]||np;return t.isThemeGetter=!0,t},tc=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,nc=/^\((?:(\w[\w-]*):)?(.+)\)$/i,sp=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ip=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,op=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,rp=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ap=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,lp=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,dt=e=>sp.test(e),ce=e=>!!e&&!Number.isNaN(Number(e)),ft=e=>!!e&&Number.isInteger(Number(e)),Vi=e=>e.endsWith("%")&&ce(e.slice(0,-1)),nt=e=>ip.test(e),sc=()=>!0,cp=e=>op.test(e)&&!rp.test(e),Oi=()=>!1,up=e=>ap.test(e),dp=e=>lp.test(e),fp=e=>!K(e)&&!Z(e),hp=e=>ht(e,cc,Oi),K=e=>tc.test(e),St=e=>ht(e,uc,cp),ic=e=>ht(e,wp,ce),mp=e=>ht(e,fc,sc),pp=e=>ht(e,dc,Oi),oc=e=>ht(e,ac,Oi),gp=e=>ht(e,lc,dp),Xn=e=>ht(e,hc,up),Z=e=>nc.test(e),bn=e=>Tt(e,uc),bp=e=>Tt(e,dc),rc=e=>Tt(e,ac),yp=e=>Tt(e,cc),xp=e=>Tt(e,lc),Gn=e=>Tt(e,hc,!0),vp=e=>Tt(e,fc,!0),ht=(e,t,n)=>{const s=tc.exec(e);return s?s[1]?t(s[1]):n(s[2]):!1},Tt=(e,t,n=!1)=>{const s=nc.exec(e);return s?s[1]?t(s[1]):n:!1},ac=e=>e==="position"||e==="percentage",lc=e=>e==="image"||e==="url",cc=e=>e==="length"||e==="size"||e==="bg-size",uc=e=>e==="length",wp=e=>e==="number",dc=e=>e==="family-name",fc=e=>e==="number"||e==="weight",hc=e=>e==="shadow",Sp=tp(()=>{const e=Ne("color"),t=Ne("font"),n=Ne("text"),s=Ne("font-weight"),i=Ne("tracking"),r=Ne("leading"),o=Ne("breakpoint"),l=Ne("container"),c=Ne("spacing"),u=Ne("radius"),d=Ne("shadow"),f=Ne("inset-shadow"),h=Ne("text-shadow"),m=Ne("drop-shadow"),p=Ne("blur"),y=Ne("perspective"),v=Ne("aspect"),x=Ne("ease"),C=Ne("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...I(),Z,K],k=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],w=()=>[Z,K,c],j=()=>[dt,"full","auto",...w()],$=()=>[ft,"none","subgrid",Z,K],z=()=>["auto",{span:["full",ft,Z,K]},ft,Z,K],Q=()=>[ft,"auto",Z,K],R=()=>["auto","min","max","fr",Z,K],se=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],U=()=>["start","end","center","stretch","center-safe","end-safe"],J=()=>["auto",...w()],V=()=>[dt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],P=()=>[dt,"screen","full","dvw","lvw","svw","min","max","fit",...w()],_=()=>[dt,"screen","full","lh","dvh","lvh","svh","min","max","fit",...w()],M=()=>[e,Z,K],T=()=>[...I(),rc,oc,{position:[Z,K]}],O=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ne=()=>["auto","cover","contain",yp,hp,{size:[Z,K]}],ae=()=>[Vi,bn,St],ie=()=>["","none","full",u,Z,K],le=()=>["",ce,bn,St],re=()=>["solid","dashed","dotted","double"],ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ue=()=>[ce,Vi,rc,oc],$e=()=>["","none",p,Z,K],je=()=>["none",ce,Z,K],W=()=>["none",ce,Z,K],he=()=>[ce,Z,K],pe=()=>[dt,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[nt],breakpoint:[nt],color:[sc],container:[nt],"drop-shadow":[nt],ease:["in","out","in-out"],font:[fp],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[nt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[nt],shadow:[nt],spacing:["px",ce],text:[nt],"text-shadow":[nt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",dt,K,Z,v]}],container:["container"],columns:[{columns:[ce,K,Z,l]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:A()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:j()}],"inset-x":[{"inset-x":j()}],"inset-y":[{"inset-y":j()}],start:[{"inset-s":j(),start:j()}],end:[{"inset-e":j(),end:j()}],"inset-bs":[{"inset-bs":j()}],"inset-be":[{"inset-be":j()}],top:[{top:j()}],right:[{right:j()}],bottom:[{bottom:j()}],left:[{left:j()}],visibility:["visible","invisible","collapse"],z:[{z:[ft,"auto",Z,K]}],basis:[{basis:[dt,"full","auto",l,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ce,dt,"auto","initial","none",K]}],grow:[{grow:["",ce,Z,K]}],shrink:[{shrink:["",ce,Z,K]}],order:[{order:[ft,"first","last","none",Z,K]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:z()}],"col-start":[{"col-start":Q()}],"col-end":[{"col-end":Q()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:z()}],"row-start":[{"row-start":Q()}],"row-end":[{"row-end":Q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":R()}],"auto-rows":[{"auto-rows":R()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...se(),"normal"]}],"justify-items":[{"justify-items":[...U(),"normal"]}],"justify-self":[{"justify-self":["auto",...U()]}],"align-content":[{content:["normal",...se()]}],"align-items":[{items:[...U(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...U(),{baseline:["","last"]}]}],"place-content":[{"place-content":se()}],"place-items":[{"place-items":[...U(),"baseline"]}],"place-self":[{"place-self":["auto",...U()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:J()}],mx:[{mx:J()}],my:[{my:J()}],ms:[{ms:J()}],me:[{me:J()}],mbs:[{mbs:J()}],mbe:[{mbe:J()}],mt:[{mt:J()}],mr:[{mr:J()}],mb:[{mb:J()}],ml:[{ml:J()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:V()}],"inline-size":[{inline:["auto",...P()]}],"min-inline-size":[{"min-inline":["auto",...P()]}],"max-inline-size":[{"max-inline":["none",...P()]}],"block-size":[{block:["auto",..._()]}],"min-block-size":[{"min-block":["auto",..._()]}],"max-block-size":[{"max-block":["none",..._()]}],w:[{w:[l,"screen",...V()]}],"min-w":[{"min-w":[l,"screen","none",...V()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[o]},...V()]}],h:[{h:["screen","lh",...V()]}],"min-h":[{"min-h":["screen","lh","none",...V()]}],"max-h":[{"max-h":["screen","lh",...V()]}],"font-size":[{text:["base",n,bn,St]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,vp,mp]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Vi,K]}],"font-family":[{font:[bp,pp,t]}],"font-features":[{"font-features":[K]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Z,K]}],"line-clamp":[{"line-clamp":[ce,"none",Z,ic]}],leading:[{leading:[r,...w()]}],"list-image":[{"list-image":["none",Z,K]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Z,K]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...re(),"wavy"]}],"text-decoration-thickness":[{decoration:[ce,"from-font","auto",Z,St]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[ce,"auto",Z,K]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Z,K]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Z,K]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:T()}],"bg-repeat":[{bg:O()}],"bg-size":[{bg:ne()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ft,Z,K],radial:["",Z,K],conic:[ft,Z,K]},xp,gp]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:ae()}],"gradient-via-pos":[{via:ae()}],"gradient-to-pos":[{to:ae()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:ie()}],"rounded-s":[{"rounded-s":ie()}],"rounded-e":[{"rounded-e":ie()}],"rounded-t":[{"rounded-t":ie()}],"rounded-r":[{"rounded-r":ie()}],"rounded-b":[{"rounded-b":ie()}],"rounded-l":[{"rounded-l":ie()}],"rounded-ss":[{"rounded-ss":ie()}],"rounded-se":[{"rounded-se":ie()}],"rounded-ee":[{"rounded-ee":ie()}],"rounded-es":[{"rounded-es":ie()}],"rounded-tl":[{"rounded-tl":ie()}],"rounded-tr":[{"rounded-tr":ie()}],"rounded-br":[{"rounded-br":ie()}],"rounded-bl":[{"rounded-bl":ie()}],"border-w":[{border:le()}],"border-w-x":[{"border-x":le()}],"border-w-y":[{"border-y":le()}],"border-w-s":[{"border-s":le()}],"border-w-e":[{"border-e":le()}],"border-w-bs":[{"border-bs":le()}],"border-w-be":[{"border-be":le()}],"border-w-t":[{"border-t":le()}],"border-w-r":[{"border-r":le()}],"border-w-b":[{"border-b":le()}],"border-w-l":[{"border-l":le()}],"divide-x":[{"divide-x":le()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":le()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...re(),"hidden","none"]}],"divide-style":[{divide:[...re(),"hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-bs":[{"border-bs":M()}],"border-color-be":[{"border-be":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ce,Z,K]}],"outline-w":[{outline:["",ce,bn,St]}],"outline-color":[{outline:M()}],shadow:[{shadow:["","none",d,Gn,Xn]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",f,Gn,Xn]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:le()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[ce,St]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":le()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":["none",h,Gn,Xn]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[ce,Z,K]}],"mix-blend":[{"mix-blend":[...ge(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ge()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ce]}],"mask-image-linear-from-pos":[{"mask-linear-from":ue()}],"mask-image-linear-to-pos":[{"mask-linear-to":ue()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":ue()}],"mask-image-t-to-pos":[{"mask-t-to":ue()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":ue()}],"mask-image-r-to-pos":[{"mask-r-to":ue()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":ue()}],"mask-image-b-to-pos":[{"mask-b-to":ue()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":ue()}],"mask-image-l-to-pos":[{"mask-l-to":ue()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":ue()}],"mask-image-x-to-pos":[{"mask-x-to":ue()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":ue()}],"mask-image-y-to-pos":[{"mask-y-to":ue()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[Z,K]}],"mask-image-radial-from-pos":[{"mask-radial-from":ue()}],"mask-image-radial-to-pos":[{"mask-radial-to":ue()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":I()}],"mask-image-conic-pos":[{"mask-conic":[ce]}],"mask-image-conic-from-pos":[{"mask-conic-from":ue()}],"mask-image-conic-to-pos":[{"mask-conic-to":ue()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:T()}],"mask-repeat":[{mask:O()}],"mask-size":[{mask:ne()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Z,K]}],filter:[{filter:["","none",Z,K]}],blur:[{blur:$e()}],brightness:[{brightness:[ce,Z,K]}],contrast:[{contrast:[ce,Z,K]}],"drop-shadow":[{"drop-shadow":["","none",m,Gn,Xn]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:["",ce,Z,K]}],"hue-rotate":[{"hue-rotate":[ce,Z,K]}],invert:[{invert:["",ce,Z,K]}],saturate:[{saturate:[ce,Z,K]}],sepia:[{sepia:["",ce,Z,K]}],"backdrop-filter":[{"backdrop-filter":["","none",Z,K]}],"backdrop-blur":[{"backdrop-blur":$e()}],"backdrop-brightness":[{"backdrop-brightness":[ce,Z,K]}],"backdrop-contrast":[{"backdrop-contrast":[ce,Z,K]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ce,Z,K]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ce,Z,K]}],"backdrop-invert":[{"backdrop-invert":["",ce,Z,K]}],"backdrop-opacity":[{"backdrop-opacity":[ce,Z,K]}],"backdrop-saturate":[{"backdrop-saturate":[ce,Z,K]}],"backdrop-sepia":[{"backdrop-sepia":["",ce,Z,K]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Z,K]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ce,"initial",Z,K]}],ease:[{ease:["linear","initial",x,Z,K]}],delay:[{delay:[ce,Z,K]}],animate:[{animate:["none",C,Z,K]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,Z,K]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:je()}],"rotate-x":[{"rotate-x":je()}],"rotate-y":[{"rotate-y":je()}],"rotate-z":[{"rotate-z":je()}],scale:[{scale:W()}],"scale-x":[{"scale-x":W()}],"scale-y":[{"scale-y":W()}],"scale-z":[{"scale-z":W()}],"scale-3d":["scale-3d"],skew:[{skew:he()}],"skew-x":[{"skew-x":he()}],"skew-y":[{"skew-y":he()}],transform:[{transform:[Z,K,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:pe()}],"translate-x":[{"translate-x":pe()}],"translate-y":[{"translate-y":pe()}],"translate-z":[{"translate-z":pe()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Z,K]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Z,K]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[ce,bn,St,ic]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function yn(...e){return Sp(Xl(e))}const Tp=new Map([["fragata-f110","F110"],["submarino-s80","S80"],["portaaeronaves-lhd","L61"],["bam-is","BAM"],["bac","AOR"],["lcm","LCM"],["coex","COEX"],["pdmd","PDT"],["usv-poniente","poniente"],["usv","7M"],["fragata-ligera","corbeta"],["anfibio","anfibio"]]),mc=new Map([["F110","fragata-f110"],["S80","submarino-s80"],["L61","portaaeronaves-lhd"],["BAM","bam-is"],["AOR","bac"],["LCM","lcm"],["COEX","coex"],["PDT","pdmd"],["poniente","usv-poniente"],["7M","usv"],["corbeta","fragata-ligera"],["anfibio","anfibio"]]);function pc(e){return e==="/"?"global":e.slice(1).replace(/\//g,"-")}function Ep(e){return e==="/"?"general.mp4":`${e.substring(1)}.mp4`}const Ut={payload:{type:"cinematics",action:"start"}},gc={payload:{type:"cinematics",action:"end"}},bc=b.createContext({sendMessage:()=>{},isConnected:!1,reconnect:()=>{}}),Cp=({children:e})=>{const t=b.useRef(null),n=Se.useNavigate(),{setLastEvent:s}=wt(),i=b.useRef(null),[r,o]=b.useState(!1),l=xe().wsRoom,c=xe().wsUrl,u=b.useCallback(()=>{t.current=new WebSocket(c),t.current.onopen=()=>{console.log("✅ WS conectado"),t.current?.send(JSON.stringify({type:"join",room:l})),o(!0),i.current=window.setInterval(()=>{t.current?.readyState===WebSocket.OPEN&&(t.current?.send(JSON.stringify({type:"ping"})),console.log("📤 PING enviado"))},3e4)},t.current.onmessage=h=>{const m=JSON.parse(h.data);if(console.log("📩 WS mensaje recibido:",m),m?.payload?.type==="click"){const p=mc.get(m?.payload?.target);p&&n(`/product/${p}`)}m?.type==="pong"&&(r||o(!0)),s(m)},t.current.onclose=()=>{console.log("❌ WS cerrado"),o(!1),i.current&&clearInterval(i.current)},t.current.onerror=h=>{console.error("⚠️ Error en WS:",h),o(!1)}},[]);b.useEffect(()=>(u(),()=>{i.current&&clearInterval(i.current),t.current?.close()}),[u]);const d=h=>{t.current&&t.current.readyState===WebSocket.OPEN?t.current.send(JSON.stringify(h)):console.warn("⚠️ WS no está conectado aún")},f=()=>{u()};return a.jsx(bc.Provider,{value:{sendMessage:d,isConnected:r,reconnect:f},children:e})},Ht=()=>b.useContext(bc);function Np(){const e=Ii();if(!e)return null;const{isMinimized:t,toggleMinimized:n,setMinimized:s}=e,{sendMessage:i}=Ht(),{lastEvent:r}=wt(),o=xe().wsRoom;return b.useEffect(()=>{r?.payload?.type==="browser"&&r?.payload?.status==="visible"&&s(!1)},[r]),a.jsx(S.div,{className:"fixed z-[9999] pointer-events-auto",initial:!1,animate:{bottom:20,right:20},transition:{duration:.6,ease:[.4,0,.2,1]},children:a.jsx(S.button,{onClick:()=>{setTimeout(()=>{i({type:"publish",room:o,payload:{type:"browser",status:"hidden"}})},700),n()},className:"w-12 h-12 rounded-full backdrop-blur-md flex items-center justify-center shadow-xl border-2 transition-all duration-300 bg-white/30 hover:bg-white/40 border-white/40 hover:border-white/60",whileHover:{scale:1.15},whileTap:{scale:.95},animate:{x:[0,5,0]},transition:{x:{repeat:Number.POSITIVE_INFINITY,duration:1.5,ease:"easeInOut"}},children:a.jsx(S.div,{animate:{rotate:0},transition:{duration:.3},children:t?a.jsx(F.ChevronUp,{className:"w-5 h-5 text-white"}):a.jsx(F.ChevronDown,{className:"w-5 h-5 text-white"})})})})}const yc=({label:e,onClick:t})=>a.jsxs(S.button,{onClick:t,className:"inline-flex items-center gap-1 sm:gap-2 px-3 sm:px-4 md:px-6 py-2 sm:py-3 bg-cyan-500 hover:bg-cyan-400 text-blue-900 font-medium text-xs sm:text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-cyan-500/25",whileHover:{scale:1.05},whileTap:{scale:.95,rotate:180},initial:{opacity:0},animate:{opacity:1},transition:{delay:0,duration:.6},children:[a.jsx("span",{className:"hidden xs:inline",children:e}),a.jsx("span",{className:"inline xs:hidden",children:e.split(" ")[0]}),a.jsx("div",{className:"w-4 h-4 sm:w-5 sm:h-5 rounded-full bg-blue-900/20 flex items-center justify-center",children:a.jsxs(S.svg,{className:"w-3 h-3 sm:w-4 sm:h-4",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("circle",{cx:"12",cy:"12",r:"2",fill:"currentColor"}),a.jsx("ellipse",{cx:"12",cy:"12",rx:"8",ry:"4",stroke:"currentColor",strokeWidth:"0.5",fill:"none",opacity:"0.4"}),a.jsx("ellipse",{cx:"12",cy:"12",rx:"8",ry:"4",stroke:"currentColor",strokeWidth:"0.5",fill:"none",opacity:"0.4",transform:"rotate(60 12 12)"}),a.jsx("ellipse",{cx:"12",cy:"12",rx:"8",ry:"4",stroke:"currentColor",strokeWidth:"0.5",fill:"none",opacity:"0.4",transform:"rotate(120 12 12)"}),a.jsx(S.circle,{cx:"20",cy:"12",r:"1.5",fill:"currentColor",initial:{cx:20,cy:12},animate:{cx:[20,12,4,12,20],cy:[12,16,12,8,12]},transition:{duration:3,repeat:1/0,ease:"linear"}}),a.jsx(S.circle,{cx:"12",cy:"8",r:"1.5",fill:"currentColor",initial:{cx:12,cy:8},animate:{cx:[12,16.93,7.07,12],cy:[8,14,14,8]},transition:{duration:3,repeat:1/0,ease:"linear",delay:1}}),a.jsx(S.circle,{cx:"7.07",cy:"14",r:"1.5",fill:"currentColor",initial:{cx:7.07,cy:14},animate:{cx:[7.07,12,16.93,7.07],cy:[14,8,14,14]},transition:{duration:3,repeat:1/0,ease:"linear",delay:2}})]})})]}),xc=({onClick:e})=>a.jsxs(S.button,{onClick:e,className:"inline-flex items-center gap-1 sm:gap-2 px-3 sm:px-4 md:px-6 py-2 sm:py-3 bg-gradient-to-r from-teal-500 to-emerald-500 hover:from-teal-400 hover:to-emerald-400 text-white font-medium text-xs sm:text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-teal-500/50 border border-teal-300/50",whileHover:{scale:1.08},whileTap:{scale:.95},initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1,boxShadow:["0 0 20px rgba(20, 184, 166, 0.4)","0 0 40px rgba(20, 184, 166, 0.6)","0 0 20px rgba(20, 184, 166, 0.4)"]},transition:{delay:0,duration:.6,boxShadow:{repeat:Number.POSITIVE_INFINITY,duration:2,ease:"easeInOut"}},children:[a.jsxs(S.svg,{className:"w-3 h-3 sm:w-4 sm:h-4",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("circle",{cx:"12",cy:"12",r:"1.5",fill:"currentColor"}),a.jsx(S.circle,{cx:"12",cy:"12",r:"4",stroke:"currentColor",strokeWidth:"0.5",fill:"none",animate:{r:[4,10],opacity:[.8,0]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeOut"}}),a.jsx(S.circle,{cx:"12",cy:"12",r:"4",stroke:"currentColor",strokeWidth:"0.5",fill:"none",animate:{r:[4,10],opacity:[.8,0]},transition:{duration:2,delay:.5,repeat:Number.POSITIVE_INFINITY,ease:"easeOut"}}),a.jsx(S.circle,{cx:"12",cy:"12",r:"4",stroke:"currentColor",strokeWidth:"0.5",fill:"none",animate:{r:[4,10],opacity:[.8,0]},transition:{duration:2,delay:1,repeat:Number.POSITIVE_INFINITY,ease:"easeOut"}}),a.jsx("circle",{cx:"12",cy:"12",r:"6",stroke:"currentColor",strokeWidth:"0.5",fill:"none",opacity:"0.3"}),a.jsx("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"0.5",fill:"none",opacity:"0.2"}),a.jsx(S.line,{x1:"12",y1:"12",x2:"12",y2:"3",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",animate:{rotate:[0,360]},transition:{duration:3,repeat:Number.POSITIVE_INFINITY,ease:"linear"},style:{originX:"12px",originY:"12px"}}),a.jsx("defs",{children:a.jsxs("radialGradient",{id:"radarGradient",children:[a.jsx("stop",{offset:"0%",stopColor:"currentColor",stopOpacity:"0.6"}),a.jsx("stop",{offset:"100%",stopColor:"currentColor",stopOpacity:"0"})]})}),a.jsx(S.path,{d:"M 12 12 L 12 3 A 9 9 0 0 1 21 12 Z",fill:"url(#radarGradient)",animate:{rotate:[0,360]},transition:{duration:3,repeat:Number.POSITIVE_INFINITY,ease:"linear"},style:{originX:"12px",originY:"12px"}}),a.jsx(S.circle,{cx:"16",cy:"8",r:"1",fill:"currentColor",animate:{opacity:[0,1,1,0],scale:[.5,1,1,.5]},transition:{duration:3,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}}),a.jsx(S.circle,{cx:"8",cy:"15",r:"1",fill:"currentColor",animate:{opacity:[0,1,1,0],scale:[.5,1,1,.5]},transition:{duration:3,delay:1,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}}),a.jsx(S.circle,{cx:"18",cy:"16",r:"1",fill:"currentColor",animate:{opacity:[0,1,1,0],scale:[.5,1,1,.5]},transition:{duration:3,delay:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}})]}),a.jsx("span",{className:"hidden xs:inline",children:"SIMULACIÓN"}),a.jsx("span",{className:"inline xs:hidden",children:"SIM"})]});function Xt({src:e,transparent:t=!1,onClose:n}){const{t:s}=ot.useTranslation(),{sendMessage:i}=Ht(),{lastEvent:r}=wt(),o=xe().wsRoom,l=xe().iframesEnabled??!0;return b.useEffect(()=>{const c=setTimeout(()=>{i({type:"publish",room:o,payload:{type:"browser",action:"open",target:e}})},700);return()=>clearTimeout(c)},[e]),b.useEffect(()=>{r?.payload?.type==="browser"&&r?.payload?.action==="close"&&n()},[r]),a.jsxs(S.div,{className:Xl("absolute inset-0 z-12000",!t&&"bg-black/95"),initial:{y:"100%"},animate:{y:0},exit:{y:"100%"},transition:{duration:1.2,ease:[.34,1.56,.64,1]},children:[a.jsxs(S.button,{onClick:n,className:"absolute top-8 left-1/2 -translate-x-1/2 z-60 px-6 py-3 bg-slate-800/90 hover:bg-slate-700/90 text-cyan-300 rounded-full transition-all duration-300 border-2! border-cyan-400/50! hover:border-cyan-400/80! shadow-lg hover:shadow-cyan-500/50 font-medium flex items-center gap-2",initial:{opacity:0,y:-20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{delay:.5,duration:.4},whileHover:{scale:1.05},whileTap:{scale:.95},children:[a.jsx(F.X,{className:"w-5 h-5"}),a.jsx("span",{children:s("layout.cerrar")})]}),l&&a.jsx(S.iframe,{src:e,className:"w-full h-full border-0",allow:"microphone; clipboard-read; clipboard-write; encrypted-media; fullscreen",initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{delay:.6,duration:.8,ease:[.34,1.56,.64,1]}})]})}const Kn={sm:640,lg:1024},Li=()=>{const[e,t]=b.useState(window.innerWidth);b.useEffect(()=>{const r=()=>{t(window.innerWidth)};return window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[]);const n=e<Kn.sm,s=e>=Kn.sm&&e<Kn.lg,i=e>=Kn.lg;return{width:e,isMobile:n,isTablet:s,isDesktop:i}};function vc({onClose:e,cards:t}){const[n,s]=b.useState(!1),[i,r]=b.useState(!1),[o,l]=b.useState(""),[c,u]=b.useState(0),[d,f]=b.useState(!1),{isMobile:h,isTablet:m}=Li();let p=4,y=2;h?(p=1,y=1):m&&(p=2,y=1);const v=()=>{s(!0),setTimeout(()=>{e(),s(!1)},600)},x=k=>{k.webUrl?.trim()&&(r(!0),l(k.webUrl.replace("https://www.navantia.es",xe().remoteUrl)+"?lightbox"))},C=()=>{r(!1)},N=()=>{if(d)return;f(!0);const k=I.length;if(k<=y){f(!1);return}u(E=>(E+1)%k),setTimeout(()=>f(!1),1e3)},I=[];for(let k=0;k<t.length;k+=p)I.push(t.slice(k,k+p));const A=()=>{const k=I.length;if(k<=y)return I;const E=[];for(let w=0;w<y;w++){const j=(c+w)%k;E.push(I[j])}return E};return b.useEffect(()=>{const k=E=>{E.key==="Escape"&&e()};return window.addEventListener("keydown",k),()=>{window.removeEventListener("keydown",k)}},[e]),a.jsx(S.div,{className:"absolute inset-0 z-10000 flex items-center justify-center bg-black/80 backdrop-blur-sm p-4",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:v,children:a.jsxs(S.div,{className:"w-full max-w-7xl max-h-[90vh] rounded-2xl overflow-hidden",initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},onClick:k=>k.stopPropagation(),children:[a.jsx(S.div,{className:"overflow-hidden max-h-[90vh] p-6 sm:p-8 md:p-12",style:{perspective:"1500px"},animate:{y:i?"-50vh":0,scale:i?.85:1},transition:{duration:1,ease:[.34,1.56,.64,1]},children:a.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 sm:gap-6 min-h-[calc(90vh-8rem)]",children:[a.jsx(S.button,{onClick:v,className:"flex mt-5 mx-auto z-10 p-2 bg-slate-800/80 hover:bg-slate-700/80 text-cyan-300 rounded-full transition-all duration-300 border-cyan-400/30 hover:border-cyan-400/60 shadow-lg hover:shadow-cyan-500/50 disabled:opacity-30 disabled:cursor-not-allowed bg-[rgba(30,41,59,0)] border px-2 py-2",initial:{opacity:0,scale:0,rotate:-180},animate:{opacity:1,scale:1,rotate:n?360:0,boxShadow:n?"0 0 60px rgba(34, 211, 238, 0.8)":"0 0 20px rgba(34, 211, 238, 0.3)"},exit:{opacity:0,scale:0,rotate:180,transition:{duration:.4,ease:[.34,1.56,.64,1]}},transition:{rotate:{duration:.6,ease:[.34,1.56,.64,1]},boxShadow:{duration:.6,ease:"easeInOut"}},whileHover:{scale:1.15,rotate:90,boxShadow:"0 0 40px rgba(34, 211, 238, 0.6)",transition:{duration:.3}},whileTap:{scale:.85,rotate:180,transition:{duration:.2}},children:a.jsx(S.div,{animate:{rotate:n?360:0},transition:{duration:.6,ease:[.34,1.56,.64,1]},children:a.jsx(F.X,{className:"w-6 h-6 px-0 mx-0 my-0"})})}),a.jsx(Ce,{mode:"popLayout",children:A().map((k,E)=>a.jsx(S.div,{className:"grid justify-center grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 sm:gap-6",initial:{opacity:0,y:120,rotateX:25,scale:.85},animate:{opacity:1,y:0,rotateX:0,scale:1},exit:{opacity:0,y:-120,rotateX:-25,scale:.85},transition:{duration:.8,ease:[.34,1.56,.64,1],delay:E*.15},children:k.map((w,j)=>a.jsxs(S.div,{className:"relative group cursor-pointer",initial:{opacity:0,scale:.8,rotateY:-15,filter:"blur(10px)"},animate:{opacity:1,scale:1,rotateY:0,filter:"blur(0px)"},exit:{opacity:0,scale:.8,rotateY:15,filter:"blur(10px)"},transition:{duration:.6,delay:E*.15+j*.08,ease:[.34,1.56,.64,1]},whileHover:{scale:1.08,rotateY:5,z:50,transition:{duration:.3,ease:"easeOut"}},onClick:()=>x(w),children:[a.jsx(S.img,{src:w.imageUrl||"/placeholder.svg",alt:w.title,className:"aspect-4/5 object-cover rounded-2xl border-2 border-cyan-400/20 group-hover:border-cyan-400/60 transition-all duration-300 shadow-lg group-hover:shadow-cyan-500/50 group-hover:shadow-2xl",whileHover:{boxShadow:"0 0 30px rgba(34, 211, 238, 0.4)"}}),a.jsx("div",{className:"absolute inset-[2px] bg-gradient-to-b from-black/0 to-60% to-black/60 rounded-2xl"}),a.jsxs("div",{className:"absolute bottom-5 left-5 right-5 text-center",children:[a.jsx("span",{className:"block text-lg font-semibold text-[#70cdee]",children:w.title}),a.jsx("span",{className:"block text-xs text-white",children:w.subtitle})]})]},w.title))},`row-${(c+E)%I.length}`))}),!i&&t.length>p*y&&a.jsx(S.button,{onClick:N,disabled:d,className:"mx-auto flex z-10 p-3 hover:bg-slate-700/80 text-cyan-300 font-medium text-xs sm:text-sm rounded-full transition-all duration-300 border-cyan-400/30 hover:border-cyan-400/60 shadow-lg hover:shadow-cyan-500/50 disabled:opacity-50 disabled:cursor-not-allowed bg-[rgba(30,41,59,0)] border mt-0 px-2 py-2",whileHover:{scale:1.05,y:5},whileTap:{scale:.9,rotate:180},animate:{y:[0,10,0],boxShadow:["0 0 20px rgba(34, 211, 238, 0.3)","0 0 40px rgba(34, 211, 238, 0.6)","0 0 20px rgba(34, 211, 238, 0.3)"]},transition:{y:{repeat:Number.POSITIVE_INFINITY,duration:1.5,ease:"easeInOut"},boxShadow:{repeat:Number.POSITIVE_INFINITY,duration:2,ease:"easeInOut"},scale:{duration:.2},rotate:{duration:.4,ease:"easeInOut"}},children:a.jsx(F.ChevronDown,{className:"w-6 h-6 mx-0 my-0 px-0"})})]})}),a.jsx(Ce,{children:i&&a.jsx(Xt,{onClose:C,src:o})})]})})}const kp=[{icon:F.Mail,name:"Navantia",color:"bg-blue-500",src:"https://www.navantia.es/es/"},{icon:F.Calendar,name:"Edinaf",color:"bg-red-500",src:"https://edinaf.wavant.es/"},{icon:F.Camera,name:"Edinaf",color:"bg-slate-700",src:"https://edinaf.eu/"},{icon:F.Music,name:"Music",color:"bg-pink-500",src:""},{icon:F.Map,name:"Maps",color:"bg-green-500",src:""},{icon:F.Settings,name:"Settings",color:"bg-slate-600",src:""},{icon:F.Cloud,name:"iCloud",color:"bg-cyan-500",src:""},{icon:F.Phone,name:"Phone",color:"bg-emerald-500",src:""},{icon:F.MessageSquare,name:"Messages",color:"bg-green-400",src:""},{icon:F.AppWindow,name:"Safari",color:"bg-blue-400",src:""},{icon:F.FileText,name:"Notes",color:"bg-yellow-400",src:""},{icon:F.ImageIcon,name:"Photos",color:"bg-gradient-to-br from-yellow-400 via-red-400 to-purple-500",src:""}];function Pp({onClose:e}){const[t,n]=b.useState(!1),[s,i]=b.useState("");return b.useEffect(()=>(document.body.style.overflow="hidden",()=>{document.body.style.overflow="unset"}),[]),b.useEffect(()=>{const r=o=>{o.key==="Escape"&&e()};return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[e]),a.jsxs(a.Fragment,{children:[a.jsxs(S.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},className:"fixed inset-0 z-10000 flex items-center justify-center cursor-default",onClick:e,children:[a.jsx(S.div,{initial:{opacity:0,backdropFilter:"blur(0px)"},animate:{opacity:1,backdropFilter:"blur(40px)"},exit:{opacity:0,backdropFilter:"blur(0px)"},transition:{duration:.5,ease:[.16,1,.3,1]},className:"absolute inset-0 bg-black/85"}),a.jsx(S.div,{initial:{scale:1.3,opacity:0},animate:{scale:1,opacity:1},exit:{scale:1.3,opacity:0},transition:{duration:.5,ease:[.16,1,.3,1]},onClick:r=>r.stopPropagation(),className:"relative z-10",children:a.jsx("div",{className:"grid grid-cols-4 gap-12 p-16 max-w-4xl",children:kp.map((r,o)=>a.jsxs(S.button,{initial:{scale:.3,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.3,opacity:0},transition:{duration:.4,delay:o*.025,ease:[.16,1,.3,1]},whileHover:{scale:1.05},whileTap:{scale:.95},className:"flex flex-col items-center gap-3 group cursor-default",onClick:()=>{i(r.src),n(!0)},children:[a.jsx("div",{className:`${r.color} w-24 h-24 rounded-[22px] flex items-center justify-center shadow-2xl`,style:{boxShadow:"0 8px 32px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2)"},children:a.jsx(r.icon,{className:"w-12 h-12 text-white",strokeWidth:1.5})}),a.jsx("span",{className:"text-white text-sm font-medium tracking-tight",children:r.name})]},r.name))})})]}),t&&a.jsx(Xt,{src:s,onClose:()=>n(!1)})]})}const wc="carousel",Sc="controller",jp="navigation",Ip="no-scroll",Di="portal",Mp="root",Tc="toolbar",Ec="zoom",Ri="loading",_i="error",Fi="complete",Ap="placeholder",Vp=e=>`active-slide-${e}`,Op="fullsize",$i="flex_center",Lp="no_scroll",Cc="no_scroll_padding",Bi="slide",Nc="slide_wrapper",Dp="slide_wrapper_interactive",Et="prev",Ct="next",kc="swipe",Gt="close",Pc="onPointerDown",jc="onPointerMove",Ic="onPointerUp",Mc="onPointerLeave",Ac="onPointerCancel",zi="onKeyDown",Rp="onKeyUp",Wi="onWheel",_p="Escape",Fp="ArrowLeft",$p="ArrowRight",Bp="button",Yi="icon",Vc="contain",Oc="cover",Lc="Unknown action type",Dc="yarl__";function Qe(...e){return e.filter(Boolean).join(" ")}function fe(e){return`${Dc}${e}`}function Re(e){return`--${Dc}${e}`}function xn(e,t){return`${e}${t?`_${t}`:""}`}function Ui(e){return t=>xn(e,t)}function Kt(e,t){var n;return(n=e?.[t])!==null&&n!==void 0?n:t}function zp(e,t,n){return Kt(e,"{index} of {total}").replace(/\{index}/g,`${Zi(n,t.length)+1}`).replace(/\{total}/g,`${t.length}`)}function Hi(...e){return()=>{e.forEach(t=>{t()})}}function st(e,t,n){return()=>{const s=g.useContext(n);if(!s)throw new Error(`${e} must be used within a ${t}.Provider`);return s}}function Xi(){return typeof window<"u"}function Gi(e,t=0){const n=10**t;return Math.round((e+Number.EPSILON)*n)/n}function Zt(e){return e.type===void 0||e.type==="image"}function Ki(e,t){return e.imageFit===Oc||e.imageFit!==Vc&&t===Oc}function Zn(e){return typeof e=="string"?Number.parseInt(e,10):e}function qn(e){if(typeof e=="number")return{pixel:e};if(typeof e=="string"){const t=Zn(e);return e.endsWith("%")?{percent:t}:{pixel:t}}return{pixel:0}}function Wp(e,t){const n=qn(t),s=n.percent!==void 0?e.width/100*n.percent:n.pixel;return{width:Math.max(e.width-2*s,0),height:Math.max(e.height-2*s,0)}}function Yp(){return(Xi()?window?.devicePixelRatio:void 0)||1}function Zi(e,t){return t>0?(e%t+t)%t:0}function Rc(e){return e.length>0}function _c(e,t){return e[Zi(t,e.length)]}function qi(e,t){return Rc(e)?_c(e,t):void 0}function Up(e){return Zt(e)?e.src:void 0}function Hp(e,t,n){if(!n)return e;const{buttons:s,...i}=e,r=s.findIndex(l=>l===t),o=g.isValidElement(n)?g.cloneElement(n,{key:t},null):n;if(r>=0){const l=[...s];return l.splice(r,1,o),{buttons:l,...i}}return{buttons:[o,...s],...i}}function Xp(e,t,n=0){return Math.min(e.preload,Math.max(e.finite?t.length-1:Math.floor(t.length/2),n))}const Gp=Number(g.version.split(".")[0])>=19;function Kp(e){return{inert:Gp?e:e?"":void 0}}function Zp(e){e.scrollTop}const Ji={open:!1,close:()=>{},index:0,slides:[],render:{},plugins:[],toolbar:{buttons:[Gt]},labels:{},animation:{fade:250,swipe:500,easing:{fade:"ease",swipe:"ease-out",navigation:"ease-in-out"}},carousel:{finite:!1,preload:2,padding:"16px",spacing:"30%",imageFit:Vc,imageProps:{}},controller:{ref:null,focus:!0,aria:!1,touchAction:"none",closeOnPullUp:!1,closeOnPullDown:!1,closeOnBackdropClick:!1,preventDefaultWheelX:!0,preventDefaultWheelY:!1,disableSwipeNavigation:!1},portal:{},noScroll:{disabled:!1},on:{},styles:{},className:""};function mt(e,t){return{name:e,component:t}}function Pe(e,t){return{module:e,children:t}}function Fc(e,t,n){return e.module.name===t?n(e):e.children?[Pe(e.module,e.children.flatMap(s=>{var i;return(i=Fc(s,t,n))!==null&&i!==void 0?i:[]}))]:[e]}function qt(e,t,n){return e.flatMap(s=>{var i;return(i=Fc(s,t,n))!==null&&i!==void 0?i:[]})}function qp(e,t=[],n=[]){let s=e;const i=m=>{const p=[...s];for(;p.length>0;){const y=p.pop();if(y?.module.name===m)return!0;y?.children&&p.push(...y.children)}return!1},r=(m,p)=>{if(m===""){s=[Pe(p,s)];return}s=qt(s,m,y=>[Pe(p,[y])])},o=(m,p)=>{s=qt(s,m,y=>[Pe(y.module,[Pe(p,y.children)])])},l=(m,p,y)=>{s=qt(s,m,v=>{var x;return[Pe(v.module,[...y?[Pe(p)]:[],...(x=v.children)!==null&&x!==void 0?x:[],...y?[]:[Pe(p)]])]})},c=(m,p,y)=>{s=qt(s,m,v=>[...y?[Pe(p)]:[],v,...y?[]:[Pe(p)]])},u=m=>{o(Sc,m)},d=(m,p)=>{s=qt(s,m,y=>[Pe(p,y.children)])},f=m=>{s=qt(s,m,p=>p.children)},h=m=>{n.push(m)};return t.forEach(m=>{m({contains:i,addParent:r,append:o,addChild:l,addSibling:c,addModule:u,replace:d,remove:f,augment:h})}),{config:s,augmentation:m=>n.reduce((p,y)=>y(p),m)}}const $c=g.createContext(null),Bc=st("useA11yContext","A11yContext",$c);function Jp({children:e}){const[t,n]=g.useState(!1),[s,i]=g.useState(!1),r=g.useMemo(()=>({focusWithin:t,trackFocusWithin:(l,c)=>{const u=d=>f=>{var h;f.currentTarget.contains(f.relatedTarget)||n(d),(h=d?l:c)===null||h===void 0||h(f)};return{onFocus:u(!0),onBlur:u(!1)}},autoPlaying:s,setAutoPlaying:i}),[t,s]);return g.createElement($c.Provider,{value:r},e)}const zc=g.createContext(null),Jn=st("useDocument","DocumentContext",zc);function Qp({nodeRef:e,children:t}){const n=g.useMemo(()=>{const s=r=>{var o;return((o=r||e.current)===null||o===void 0?void 0:o.ownerDocument)||document};return{getOwnerDocument:s,getOwnerWindow:r=>{var o;return((o=s(r))===null||o===void 0?void 0:o.defaultView)||window}}},[e]);return g.createElement(zc.Provider,{value:n},t)}const Wc=g.createContext(null),Qn=st("useEvents","EventsContext",Wc);function eg({children:e}){const[t]=g.useState({});g.useEffect(()=>()=>{Object.keys(t).forEach(s=>delete t[s])},[t]);const n=g.useMemo(()=>{const s=(o,l)=>{var c;(c=t[o])===null||c===void 0||c.splice(0,t[o].length,...t[o].filter(u=>u!==l))};return{publish:(...[o,l])=>{var c;(c=t[o])===null||c===void 0||c.forEach(u=>u(l))},subscribe:(o,l)=>(t[o]||(t[o]=[]),t[o].push(l),()=>s(o,l)),unsubscribe:s}},[t]);return g.createElement(Wc.Provider,{value:n},e)}const Yc=g.createContext(null),We=st("useLightboxProps","LightboxPropsContext",Yc);function tg({children:e,...t}){return g.createElement(Yc.Provider,{value:t},e)}const Uc=g.createContext(null),pt=st("useLightboxState","LightboxStateContext",Uc),Hc=g.createContext(null),ng=st("useLightboxDispatch","LightboxDispatchContext",Hc);function sg(e,t){switch(t.type){case"swipe":{const{slides:n}=e,s=t?.increment||0,i=e.globalIndex+s,r=Zi(i,n.length),o=qi(n,r),l=s||t.duration!==void 0?{increment:s,duration:t.duration,easing:t.easing}:void 0;return{slides:n,currentIndex:r,globalIndex:i,currentSlide:o,animation:l}}case"update":return t.slides!==e.slides||t.index!==e.currentIndex?{slides:t.slides,currentIndex:t.index,globalIndex:t.index,currentSlide:qi(t.slides,t.index)}:e;default:throw new Error(Lc)}}function ig({slides:e,index:t,children:n}){const[s,i]=g.useReducer(sg,{slides:e,currentIndex:t,globalIndex:t,currentSlide:qi(e,t)});g.useEffect(()=>{i({type:"update",slides:e,index:t})},[e,t]);const r=g.useMemo(()=>({...s,state:s,dispatch:i}),[s,i]);return g.createElement(Hc.Provider,{value:i},g.createElement(Uc.Provider,{value:r},n))}const Xc=g.createContext(null),es=st("useTimeouts","TimeoutsContext",Xc);function og({children:e}){const[t]=g.useState([]);g.useEffect(()=>()=>{t.forEach(s=>window.clearTimeout(s)),t.splice(0,t.length)},[t]);const n=g.useMemo(()=>{const s=o=>{t.splice(0,t.length,...t.filter(l=>l!==o))};return{setTimeout:(o,l)=>{const c=window.setTimeout(()=>{s(c),o()},l);return t.push(c),c},clearTimeout:o=>{o!==void 0&&(s(o),window.clearTimeout(o))}}},[t]);return g.createElement(Xc.Provider,{value:n},e)}const Qi=g.forwardRef(function({label:t,className:n,icon:s,renderIcon:i,onClick:r,style:o,...l},c){const{styles:u,labels:d}=We(),f=Kt(d,t);return g.createElement("button",{ref:c,type:"button",title:f,"aria-label":f,className:Qe(fe(Bp),n),onClick:r,style:{...o,...u.button},...l},i?i():g.createElement(s,{className:fe(Yi),style:u.icon}))});function rg(e,t){const n=s=>g.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",...s},t);return n.displayName=e,n}function Nt(e,t){return rg(e,g.createElement("g",{fill:"currentColor"},g.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),t))}const ag=Nt("Close",g.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),lg=Nt("Previous",g.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})),cg=Nt("Next",g.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),ug=Nt("Loading",g.createElement(g.Fragment,null,Array.from({length:8}).map((e,t,n)=>g.createElement("line",{key:t,x1:"12",y1:"6.5",x2:"12",y2:"1.8",strokeLinecap:"round",strokeWidth:"2.6",stroke:"currentColor",strokeOpacity:1/n.length*(t+1),transform:`rotate(${360/n.length*t}, 12, 12)`})))),dg=Nt("Error",g.createElement("path",{d:"M21.9,21.9l-8.49-8.49l0,0L3.59,3.59l0,0L2.1,2.1L0.69,3.51L3,5.83V19c0,1.1,0.9,2,2,2h13.17l2.31,2.31L21.9,21.9z M5,18 l3.5-4.5l2.5,3.01L12.17,15l3,3H5z M21,18.17L5.83,3H19c1.1,0,2,0.9,2,2V18.17z"})),et=Xi()?g.useLayoutEffect:g.useEffect;function eo(){const[e,t]=g.useState(!1);return g.useEffect(()=>{var n,s;const i=(n=window.matchMedia)===null||n===void 0?void 0:n.call(window,"(prefers-reduced-motion: reduce)");t(i?.matches);const r=o=>t(o.matches);return(s=i?.addEventListener)===null||s===void 0||s.call(i,"change",r),()=>{var o;return(o=i?.removeEventListener)===null||o===void 0?void 0:o.call(i,"change",r)}},[]),e}function fg(e){let t=0,n=0,s=0;const r=window.getComputedStyle(e).transform.match(/matrix.*\((.+)\)/);if(r){const o=r[1].split(",").map(Zn);o.length===6?(t=o[4],n=o[5]):o.length===16&&(t=o[12],n=o[13],s=o[14])}return{x:t,y:n,z:s}}function Gc(e,t){const n=g.useRef(void 0),s=g.useRef(void 0),i=eo();return et(()=>{var r,o,l;if(e.current&&n.current!==void 0&&!i){const{keyframes:c,duration:u,easing:d,onfinish:f}=t(n.current,e.current.getBoundingClientRect(),fg(e.current))||{};if(c&&u){(r=s.current)===null||r===void 0||r.cancel(),s.current=void 0;try{s.current=(l=(o=e.current).animate)===null||l===void 0?void 0:l.call(o,c,{duration:u,easing:d})}catch(h){console.error(h)}s.current&&(s.current.onfinish=()=>{s.current=void 0,f?.()})}}n.current=void 0}),{prepareAnimation:r=>{n.current=r},isAnimationPlaying:()=>{var r;return((r=s.current)===null||r===void 0?void 0:r.playState)==="running"}}}function Kc(){const e=g.useRef(null),t=g.useRef(void 0),[n,s]=g.useState();return{setContainerRef:g.useCallback(r=>{e.current=r,t.current&&(t.current.disconnect(),t.current=void 0);const o=()=>{if(r){const l=window.getComputedStyle(r),c=u=>parseFloat(u)||0;s({width:Math.round(r.clientWidth-c(l.paddingLeft)-c(l.paddingRight)),height:Math.round(r.clientHeight-c(l.paddingTop)-c(l.paddingBottom))})}else s(void 0)};o(),r&&typeof ResizeObserver<"u"&&(t.current=new ResizeObserver(o),t.current.observe(r))},[]),containerRef:e,containerRect:n}}function ts(){const e=g.useRef(void 0),{setTimeout:t,clearTimeout:n}=es();return g.useCallback((s,i)=>{n(e.current),e.current=t(s,i>0?i:0)},[t,n])}function me(e){const t=g.useRef(e);return et(()=>{t.current=e}),g.useCallback((...n)=>{var s;return(s=t.current)===null||s===void 0?void 0:s.call(t,...n)},[])}function Zc(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function to(e,t){return g.useMemo(()=>e==null&&t==null?null:n=>{Zc(e,n),Zc(t,n)},[e,t])}function hg(e,t=!1){const n=g.useRef(!1);et(()=>{t&&n.current&&(n.current=!1,e())},[t,e]);const s=g.useCallback(()=>{n.current=!0},[]),i=g.useCallback(()=>{n.current=!1},[]);return{onFocus:s,onBlur:i}}function no(){const[e,t]=g.useState(!1);return et(()=>{t(window.getComputedStyle(window.document.documentElement).direction==="rtl")},[]),e}function mg(){const[e]=g.useState({}),t=g.useCallback((i,r)=>{var o;(o=e[i])===null||o===void 0||o.forEach(l=>{r.isPropagationStopped()||l(r)})},[e]),n=g.useMemo(()=>({onPointerDown:i=>t(Pc,i),onPointerMove:i=>t(jc,i),onPointerUp:i=>t(Ic,i),onPointerLeave:i=>t(Mc,i),onPointerCancel:i=>t(Ac,i),onKeyDown:i=>t(zi,i),onKeyUp:i=>t(Rp,i),onWheel:i=>t(Wi,i)}),[t]),s=g.useCallback((i,r)=>(e[i]||(e[i]=[]),e[i].unshift(r),()=>{const o=e[i];o&&o.splice(0,o.length,...o.filter(l=>l!==r))}),[e]);return{registerSensors:n,subscribeSensors:s}}function qc(e,t){const n=g.useRef(0),s=ts(),i=me((...r)=>{n.current=Date.now(),e(r)});return g.useCallback((...r)=>{s(()=>{i(r)},t-(Date.now()-n.current))},[t,i,s])}const so=Ui("slide"),io=Ui("slide_image");function ns({slide:e,offset:t,render:n,rect:s,imageFit:i,imageProps:r,onClick:o,onLoad:l,onError:c,style:u}){var d,f,h,m,p,y,v,x;const[C,N]=g.useState(Ri),{publish:I}=Qn(),{setTimeout:A}=es(),k=g.useRef(null);g.useEffect(()=>{t===0&&I(Vp(C))},[t,C,I]);const E=me(O=>{("decode"in O?O.decode():Promise.resolve()).catch(()=>{}).then(()=>{O.parentNode&&(N(Fi),A(()=>{l?.(O)},0))})}),w=g.useCallback(O=>{k.current=O,O?.complete&&E(O)},[E]),j=g.useCallback(O=>{E(O.currentTarget)},[E]),$=me(()=>{N(_i),c?.()}),z=Ki(e,i),Q=(O,ne)=>Number.isFinite(O)?O:ne,R=Q(Math.max(...((f=(d=e.srcSet)===null||d===void 0?void 0:d.map(O=>O.width))!==null&&f!==void 0?f:[]).concat(e.width?[e.width]:[]).filter(Boolean)),((h=k.current)===null||h===void 0?void 0:h.naturalWidth)||0),se=Q(Math.max(...((p=(m=e.srcSet)===null||m===void 0?void 0:m.map(O=>O.height))!==null&&p!==void 0?p:[]).concat(e.height?[e.height]:[]).filter(Boolean)),((y=k.current)===null||y===void 0?void 0:y.naturalHeight)||0),U=R&&se?{maxWidth:`min(${R}px, 100%)`,maxHeight:`min(${se}px, 100%)`}:{maxWidth:"100%",maxHeight:"100%"},J=(v=e.srcSet)===null||v===void 0?void 0:v.slice().sort((O,ne)=>O.width-ne.width).map(O=>`${O.src} ${O.width}w`).join(", "),V=()=>s&&!z&&e.width&&e.height?s.height/e.height*e.width:Number.MAX_VALUE,P=J&&s&&Xi()?`${Math.round(Math.min(V(),s.width))}px`:void 0,{style:_,className:M,...T}=(typeof r=="function"?r(e):r)||{};return g.createElement(g.Fragment,null,g.createElement("img",{ref:w,onLoad:j,onError:$,onClick:o,draggable:!1,className:Qe(fe(io()),z&&fe(io("cover")),C!==Fi&&fe(io("loading")),M),style:{...U,...u,..._},...T,alt:(x=e.alt)!==null&&x!==void 0?x:"",sizes:P,srcSet:J,src:e.src}),C!==Fi&&g.createElement("div",{className:fe(so(Ap))},C===Ri&&(n?.iconLoading?n.iconLoading():g.createElement(ug,{className:Qe(fe(Yi),fe(so(Ri)))})),C===_i&&(n?.iconError?n.iconError():g.createElement(dg,{className:Qe(fe(Yi),fe(so(_i)))}))))}const pg=g.forwardRef(function({className:t,children:n,onFocus:s,onBlur:i,...r},o){const l=g.useRef(null),{trackFocusWithin:c}=Bc();return g.createElement(Qp,{nodeRef:l},g.createElement("div",{ref:to(o,l),className:Qe(fe("root"),t),...c(s,i),...r},n))});var Oe;(function(e){e[e.NONE=0]="NONE",e[e.SWIPE=1]="SWIPE",e[e.PULL=2]="PULL",e[e.ANIMATION=3]="ANIMATION"})(Oe||(Oe={}));function Jc(e,t,n,s,i){g.useEffect(()=>i?()=>{}:Hi(e(Pc,t),e(jc,n),e(Ic,s),e(Mc,s),e(Ac,s)),[e,t,n,s,i])}var Ke;(function(e){e[e.NONE=0]="NONE",e[e.SWIPE=1]="SWIPE",e[e.PULL=2]="PULL"})(Ke||(Ke={}));const oo=30;function gg({disableSwipeNavigation:e,closeOnBackdropClick:t},n,s,i,r,o,l,c,u,d,f,h,m,p,y,v){const x=g.useRef(0),C=g.useRef([]),N=g.useRef(void 0),I=g.useRef(0),A=g.useRef(Ke.NONE),k=g.useCallback(R=>{N.current===R.pointerId&&(N.current=void 0,A.current=Ke.NONE);const se=C.current;se.splice(0,se.length,...se.filter(U=>U.pointerId!==R.pointerId))},[]),E=g.useCallback(R=>{k(R),R.persist(),C.current.push(R)},[k]),w=g.useCallback(R=>C.current.find(({pointerId:se})=>R.pointerId===se),[]),j=me(R=>{E(R)}),$=(R,se)=>f&&R>se||d&&R<-se,z=me(R=>{const se=w(R);if(se)if(N.current===R.pointerId){const U=Date.now()-I.current,J=x.current;A.current===Ke.SWIPE?Math.abs(J)>.3*i||Math.abs(J)>5&&U<r?c(J,U):u(J):A.current===Ke.PULL&&($(J,2*oo)?p(J,U):y(J)),x.current=0,A.current=Ke.NONE}else{const{target:U}=R;t&&U instanceof HTMLElement&&U===se.target&&(U.classList.contains(fe(Bi))||U.classList.contains(fe(Nc)))&&v()}k(R)}),Q=me(R=>{const se=w(R);if(se){const U=N.current===R.pointerId;if(R.buttons===0){U&&x.current!==0?z(R):k(se);return}const J=R.clientX-se.clientX,V=R.clientY-se.clientY;if(N.current===void 0){const P=_=>{E(R),N.current=R.pointerId,I.current=Date.now(),A.current=_};Math.abs(J)>Math.abs(V)&&Math.abs(J)>oo&&s(J)?e||(P(Ke.SWIPE),o()):Math.abs(V)>Math.abs(J)&&$(V,oo)&&(P(Ke.PULL),h())}else U&&(A.current===Ke.SWIPE?(x.current=J,l(J)):A.current===Ke.PULL&&(x.current=V,m(V)))}});Jc(n,j,Q,z)}function bg({preventDefaultWheelX:e,preventDefaultWheelY:t}){const n=g.useRef(null),s=me(i=>{const r=Math.abs(i.deltaX)>Math.abs(i.deltaY);(r&&e||!r&&t||i.ctrlKey)&&i.preventDefault()});return g.useCallback(i=>{var r;i?i.addEventListener("wheel",s,{passive:!1}):(r=n.current)===null||r===void 0||r.removeEventListener("wheel",s),n.current=i},[s])}function yg(e,t,n,s,i,r,o,l,c){const u=g.useRef(0),d=g.useRef(0),f=g.useRef(void 0),h=g.useRef(void 0),m=g.useRef(0),p=g.useRef(void 0),y=g.useRef(0),{setTimeout:v,clearTimeout:x}=es(),C=g.useCallback(()=>{f.current&&(x(f.current),f.current=void 0)},[x]),N=g.useCallback(()=>{h.current&&(x(h.current),h.current=void 0)},[x]),I=me(()=>{e!==Oe.SWIPE&&(u.current=0,y.current=0,C(),N())});g.useEffect(I,[e,I]);const A=me(E=>{h.current=void 0,u.current===E&&c(u.current)}),k=me(E=>{if(E.ctrlKey||Math.abs(E.deltaY)>Math.abs(E.deltaX))return;const w=j=>{m.current=j,x(p.current),p.current=j>0?v(()=>{m.current=0,p.current=void 0},300):void 0};if(e===Oe.NONE){if(Math.abs(E.deltaX)<=1.2*Math.abs(m.current)){w(E.deltaX);return}if(!n(-E.deltaX))return;if(d.current+=E.deltaX,C(),Math.abs(d.current)>30)d.current=0,w(0),y.current=Date.now(),r();else{const j=d.current;f.current=v(()=>{f.current=void 0,j===d.current&&(d.current=0)},i)}}else if(e===Oe.SWIPE){let j=u.current-E.deltaX;if(j=Math.min(Math.abs(j),s)*Math.sign(j),u.current=j,o(j),N(),Math.abs(j)>.2*s){w(E.deltaX),l(j,Date.now()-y.current);return}h.current=v(()=>A(j),2*i)}else w(E.deltaX)});g.useEffect(()=>t(Wi,k),[t,k])}const Qc=Ui("container"),eu=g.createContext(null),it=st("useController","ControllerContext",eu);function xg({children:e,...t}){var n;const{carousel:s,animation:i,controller:r,on:o,styles:l,render:c}=t,{closeOnPullUp:u,closeOnPullDown:d,preventDefaultWheelX:f,preventDefaultWheelY:h}=r,[m,p]=g.useState(),y=pt(),v=ng(),[x,C]=g.useState(Oe.NONE),N=g.useRef(0),I=g.useRef(0),A=g.useRef(1),{registerSensors:k,subscribeSensors:E}=mg(),{subscribe:w,publish:j}=Qn(),$=ts(),z=ts(),Q=ts(),{containerRef:R,setContainerRef:se,containerRect:U}=Kc(),J=to(bg({preventDefaultWheelX:f,preventDefaultWheelY:h}),se),V=g.useRef(null),P=to(V,void 0),{getOwnerDocument:_}=Jn(),M=no(),T=H=>(M?-1:1)*(typeof H=="number"?H:1),O=me(()=>{var H;return(H=R.current)===null||H===void 0?void 0:H.focus()}),ne=me(()=>t),ae=me(()=>y),ie=g.useCallback(H=>j(Et,H),[j]),le=g.useCallback(H=>j(Ct,H),[j]),re=g.useCallback(()=>j(Gt),[j]),ge=H=>!(s.finite&&(T(H)>0&&y.currentIndex===0||T(H)<0&&y.currentIndex===y.slides.length-1)),ue=H=>{var be;N.current=H,(be=R.current)===null||be===void 0||be.style.setProperty(Re("swipe_offset"),`${Math.round(H)}px`)},$e=H=>{var be,Ie;I.current=H,A.current=(()=>{const It=d&&H>0?H:u&&H<0?-H:0;return Math.min(Math.max(Gi(1-It/60*(1-.5),2),.5),1)})(),(be=R.current)===null||be===void 0||be.style.setProperty(Re("pull_offset"),`${Math.round(H)}px`),(Ie=R.current)===null||Ie===void 0||Ie.style.setProperty(Re("pull_opacity"),`${A.current}`)},{prepareAnimation:je}=Gc(V,(H,be,Ie)=>{if(V.current&&U)return{keyframes:[{transform:`translate(0, ${H.rect.y-be.y+Ie.y}px)`,opacity:H.opacity},{transform:"translate(0, 0)",opacity:1}],duration:H.duration,easing:i.easing.fade}}),W=(H,be)=>{if(u||d){$e(H);let Ie=0;V.current&&(Ie=i.fade*(be?2:1),je({rect:V.current.getBoundingClientRect(),opacity:A.current,duration:Ie})),Q(()=>{$e(0),C(Oe.NONE)},Ie),C(Oe.ANIMATION),be||re()}},{prepareAnimation:he,isAnimationPlaying:pe}=Gc(V,(H,be,Ie)=>{var Ye;if(V.current&&U&&(!((Ye=y.animation)===null||Ye===void 0)&&Ye.duration)){const _e=qn(s.spacing),It=(_e.percent?_e.percent*U.width/100:_e.pixel)||0;return{keyframes:[{transform:`translate(${T(y.globalIndex-H.index)*(U.width+It)+H.rect.x-be.x+Ie.x}px, 0)`},{transform:"translate(0, 0)"}],duration:y.animation.duration,easing:y.animation.easing}}}),Ve=me(H=>{var be,Ie;const Ye=H.offset||0,_e=Ye?i.swipe:(be=i.navigation)!==null&&be!==void 0?be:i.swipe,It=!Ye&&!pe()?i.easing.navigation:i.easing.swipe;let{direction:L}=H;const X=(Ie=H.count)!==null&&Ie!==void 0?Ie:1;let Y=Oe.ANIMATION,D=_e*X;if(!L){const B=U?.width,te=H.duration||0,de=B?_e/B*Math.abs(Ye):_e;X!==0?(te<de?D=D/de*Math.max(te,de/5):B&&(D=_e/B*(B-Math.abs(Ye))),L=T(Ye)>0?Et:Ct):D=_e/2}let ee=0;L===Et?ge(T(1))?ee=-X:(Y=Oe.NONE,D=_e):L===Ct&&(ge(T(-1))?ee=X:(Y=Oe.NONE,D=_e)),D=Math.round(D),z(()=>{ue(0),C(Oe.NONE)},D),V.current&&he({rect:V.current.getBoundingClientRect(),index:y.globalIndex}),C(Y),j(kc,{type:"swipe",increment:ee,duration:D,easing:It})});g.useEffect(()=>{var H,be;!((H=y.animation)===null||H===void 0)&&H.increment&&(!((be=y.animation)===null||be===void 0)&&be.duration)&&$(()=>v({type:"swipe",increment:0}),y.animation.duration)},[y.animation,v,$]);const Pt=[E,ge,U?.width||0,i.swipe,()=>C(Oe.SWIPE),H=>ue(H),(H,be)=>Ve({offset:H,duration:be,count:1}),H=>Ve({offset:H,count:0})],is=[()=>{d&&C(Oe.PULL)},H=>$e(H),H=>W(H),H=>W(H,!0)];gg(r,...Pt,u,d,...is,re),yg(x,...Pt);const vn=me(()=>{r.focus&&_().querySelector(`.${fe(Di)} .${fe(Qc())}`)&&O()});g.useEffect(vn,[vn]);const jt=me(()=>{var H;(H=o.view)===null||H===void 0||H.call(o,{index:y.currentIndex})});g.useEffect(jt,[y.globalIndex,jt]),g.useEffect(()=>Hi(w(Et,H=>Ve({direction:Et,...H})),w(Ct,H=>Ve({direction:Ct,...H})),w(kc,H=>v(H))),[w,Ve,v]);const bo=g.useMemo(()=>({prev:ie,next:le,close:re,focus:O,slideRect:U?Wp(U,s.padding):{width:0,height:0},containerRect:U||{width:0,height:0},subscribeSensors:E,containerRef:R,setCarouselRef:P,toolbarWidth:m,setToolbarWidth:p}),[ie,le,re,O,E,U,R,P,m,p,s.padding]);return g.useImperativeHandle(r.ref,()=>({prev:ie,next:le,close:re,focus:O,getLightboxProps:ne,getLightboxState:ae}),[ie,le,re,O,ne,ae]),g.createElement("div",{ref:J,className:Qe(fe(Qc()),fe($i)),style:{...x===Oe.SWIPE?{[Re("swipe_offset")]:`${Math.round(N.current)}px`}:null,...x===Oe.PULL?{[Re("pull_offset")]:`${Math.round(I.current)}px`,[Re("pull_opacity")]:`${A.current}`}:null,...r.touchAction!=="none"?{[Re("controller_touch_action")]:r.touchAction}:null,...l.container},tabIndex:-1,...k},U&&g.createElement(eu.Provider,{value:bo},e,(n=c.controls)===null||n===void 0?void 0:n.call(c)))}const vg=mt(Sc,xg);function kt(e){return xn(wc,e)}function tu(e){return xn(Bi,e)}function wg({slide:e,offset:t}){const n=g.useRef(null),{currentIndex:s,slides:i}=pt(),{slideRect:r,focus:o}=it(),{render:l,carousel:{imageFit:c,imageProps:u},on:{click:d},styles:{slide:f},labels:h}=We(),{getOwnerDocument:m}=Jn(),p=t!==0;g.useEffect(()=>{var v;p&&(!((v=n.current)===null||v===void 0)&&v.contains(m().activeElement))&&o()},[p,o,m]);const y=()=>{var v,x,C,N;let I=(v=l.slide)===null||v===void 0?void 0:v.call(l,{slide:e,offset:t,rect:r});return!I&&Zt(e)&&(I=g.createElement(ns,{slide:e,offset:t,render:l,rect:r,imageFit:c,imageProps:u,onClick:p?void 0:()=>d?.({index:s})})),I?g.createElement(g.Fragment,null,(x=l.slideHeader)===null||x===void 0?void 0:x.call(l,{slide:e}),((C=l.slideContainer)!==null&&C!==void 0?C:(({children:A})=>A))({slide:e,children:I}),(N=l.slideFooter)===null||N===void 0?void 0:N.call(l,{slide:e})):null};return g.createElement("div",{ref:n,className:Qe(fe(tu()),!p&&fe(tu("current")),fe($i)),...Kp(p),style:f,role:"group","aria-roledescription":Kt(h,"Slide"),"aria-label":zp(h,i,s+t)},y())}function Sg(){const e=We().styles.slide;return g.createElement("div",{className:fe(Bi),style:e})}function Tg({carousel:e,labels:t}){const{slides:n,currentIndex:s,globalIndex:i}=pt(),{setCarouselRef:r}=it(),{autoPlaying:o,focusWithin:l}=Bc(),c=qn(e.spacing),u=qn(e.padding),d=Xp(e,n,1),f=[];if(Rc(n))for(let h=s-d;h<=s+d;h+=1){const m=_c(n,h),p=i-s+h,y=e.finite&&(h<0||h>n.length-1);f.push(y?{key:p}:{key:[`${p}`,Up(m)].filter(Boolean).join("|"),offset:h-s,slide:m})}return g.createElement("div",{ref:r,className:Qe(fe(kt()),f.length>0&&fe(kt("with_slides"))),style:{[`${Re(kt("slides_count"))}`]:f.length,[`${Re(kt("spacing_px"))}`]:c.pixel||0,[`${Re(kt("spacing_percent"))}`]:c.percent||0,[`${Re(kt("padding_px"))}`]:u.pixel||0,[`${Re(kt("padding_percent"))}`]:u.percent||0},role:"region","aria-live":o&&!l?"off":"polite","aria-roledescription":Kt(t,"Carousel"),"aria-label":Kt(t,"Photo gallery")},f.map(({key:h,slide:m,offset:p})=>m?g.createElement(wg,{key:h,slide:m,offset:p}):g.createElement(Sg,{key:h})))}const Eg=mt(wc,Tg);function nu(){const{carousel:e}=We(),{slides:t,currentIndex:n}=pt(),s=t.length===0||e.finite&&n===0,i=t.length===0||e.finite&&n===t.length-1;return{prevDisabled:s,nextDisabled:i}}function Cg(e){var t;const n=no(),{publish:s}=Qn(),{animation:i}=We(),{prevDisabled:r,nextDisabled:o}=nu(),l=((t=i.navigation)!==null&&t!==void 0?t:i.swipe)/2,c=qc(()=>s(Et),l),u=qc(()=>s(Ct),l),d=me(f=>{switch(f.key){case _p:s(Gt);break;case Fp:(n?o:r)||(n?u:c)();break;case $p:(n?r:o)||(n?c:u)();break}});g.useEffect(()=>e(zi,d),[e,d])}function su({label:e,icon:t,renderIcon:n,action:s,onClick:i,disabled:r,style:o}){return g.createElement(Qi,{label:e,icon:t,renderIcon:n,className:fe(`navigation_${s}`),disabled:r,onClick:i,style:o,...hg(it().focus,r)})}function Ng({render:{buttonPrev:e,buttonNext:t,iconPrev:n,iconNext:s},styles:i}){const{prev:r,next:o,subscribeSensors:l}=it(),{prevDisabled:c,nextDisabled:u}=nu();return Cg(l),g.createElement(g.Fragment,null,e?e():g.createElement(su,{label:"Previous",action:Et,icon:lg,renderIcon:n,style:i.navigationPrev,disabled:c,onClick:r}),t?t():g.createElement(su,{label:"Next",action:Ct,icon:cg,renderIcon:s,style:i.navigationNext,disabled:u,onClick:o}))}const kg=mt(jp,Ng),iu=fe(Lp),Pg=fe(Cc);function jg(e){return"style"in e}function ou(e,t,n){const s=window.getComputedStyle(e),i=n?"padding-left":"padding-right",r=n?s.paddingLeft:s.paddingRight,o=e.style.getPropertyValue(i);return e.style.setProperty(i,`${(Zn(r)||0)+t}px`),()=>{o?e.style.setProperty(i,o):e.style.removeProperty(i)}}function Ig({noScroll:{disabled:e},children:t}){const n=no(),{getOwnerDocument:s,getOwnerWindow:i}=Jn();return g.useEffect(()=>{if(e)return()=>{};const r=[],o=i(),{body:l,documentElement:c}=s(),u=Math.round(o.innerWidth-c.clientWidth);if(u>0){r.push(ou(l,u,n));const d=l.getElementsByTagName("*");for(let f=0;f<d.length;f+=1){const h=d[f];jg(h)&&o.getComputedStyle(h).getPropertyValue("position")==="fixed"&&!h.classList.contains(Pg)&&r.push(ou(h,u,n))}}return l.classList.add(iu),()=>{l.classList.remove(iu),r.forEach(d=>d())}},[n,e,s,i]),g.createElement(g.Fragment,null,t)}const Mg=mt(Ip,Ig);function ru(e){return xn(Di,e)}function au(e,t,n){const s=e.getAttribute(t);return e.setAttribute(t,n),()=>{s?e.setAttribute(t,s):e.removeAttribute(t)}}function Ag({children:e,animation:t,styles:n,className:s,on:i,portal:r,close:o,labels:l}){const[c,u]=g.useState(!1),[d,f]=g.useState(!1),h=g.useRef([]),m=g.useRef(null),{setTimeout:p}=es(),{subscribe:y}=Qn(),x=eo()?0:t.fade;g.useEffect(()=>(u(!0),()=>{u(!1),f(!1)}),[]);const C=me(()=>{h.current.forEach(k=>k()),h.current=[]}),N=me(()=>{var k;f(!1),C(),(k=i.exiting)===null||k===void 0||k.call(i),p(()=>{var E;(E=i.exited)===null||E===void 0||E.call(i),o()},x)});g.useEffect(()=>y(Gt,N),[y,N]);const I=me(k=>{var E,w,j;Zp(k),f(!0),(E=i.entering)===null||E===void 0||E.call(i);const $=(j=(w=k.parentNode)===null||w===void 0?void 0:w.children)!==null&&j!==void 0?j:[];for(let z=0;z<$.length;z+=1){const Q=$[z];["TEMPLATE","SCRIPT","STYLE"].indexOf(Q.tagName)===-1&&Q!==k&&(h.current.push(au(Q,"inert","")),h.current.push(au(Q,"aria-hidden","true")))}h.current.push(()=>{var z,Q;(Q=(z=m.current)===null||z===void 0?void 0:z.focus)===null||Q===void 0||Q.call(z)}),p(()=>{var z;(z=i.entered)===null||z===void 0||z.call(i)},x)}),A=g.useCallback(k=>{k?I(k):C()},[I,C]);return c?vo.createPortal(g.createElement(pg,{ref:A,className:Qe(s,fe(ru()),fe(Cc),d&&fe(ru("open"))),"aria-modal":!0,role:"dialog","aria-label":Kt(l,"Lightbox"),style:{...t.fade!==Ji.animation.fade?{[Re("fade_animation_duration")]:`${x}ms`}:null,...t.easing.fade!==Ji.animation.easing.fade?{[Re("fade_animation_timing_function")]:t.easing.fade}:null,...n.root},onFocus:k=>{m.current||(m.current=k.relatedTarget)}},e),r.root||document.body):null}const Vg=mt(Di,Ag);function Og({children:e}){return g.createElement(g.Fragment,null,e)}const Lg=mt(Mp,Og);function Dg(e){return xn(Tc,e)}function Rg({toolbar:{buttons:e},render:{buttonClose:t,iconClose:n},styles:s}){const{close:i,setToolbarWidth:r}=it(),{setContainerRef:o,containerRect:l}=Kc();et(()=>{r(l?.width)},[r,l?.width]);const c=()=>t?t():g.createElement(Qi,{key:Gt,label:"Close",icon:ag,renderIcon:n,onClick:i});return g.createElement("div",{ref:o,style:s.toolbar,className:fe(Dg())},e?.map(u=>u===Gt?c():u))}const _g=mt(Tc,Rg);function lu(e,t){var n;return g.createElement(e.module.component,{key:e.module.name,...t},(n=e.children)===null||n===void 0?void 0:n.map(s=>lu(s,t)))}function Fg(e,t={}){const{easing:n,...s}=e,{easing:i,...r}=t;return{easing:{...n,...i},...s,...r}}function $g({carousel:e,animation:t,render:n,toolbar:s,controller:i,noScroll:r,on:o,plugins:l,slides:c,index:u,...d}){const{animation:f,carousel:h,render:m,toolbar:p,controller:y,noScroll:v,on:x,slides:C,index:N,plugins:I,...A}=Ji,{config:k,augmentation:E}=qp([Pe(Vg,[Pe(Mg,[Pe(vg,[Pe(Eg),Pe(_g),Pe(kg)])])])],l||I),w=E({animation:Fg(f,t),carousel:{...h,...e},render:{...m,...n},toolbar:{...p,...s},controller:{...y,...i},noScroll:{...v,...r},on:{...x,...o},...A,...d});return w.open?g.createElement(tg,{...w},g.createElement(ig,{slides:c||C,index:Zn(u||N)},g.createElement(og,null,g.createElement(eg,null,g.createElement(Jp,null,lu(Pe(Lg,k),w)))))):null}const Bg={minZoom:1,maxZoomPixelRatio:1,zoomInMultiplier:2,doubleTapDelay:300,doubleClickDelay:500,doubleClickMaxStops:2,keyboardMoveDistance:50,wheelZoomDistanceFactor:100,pinchZoomDistanceFactor:100,pinchZoomV4:!1,scrollToZoom:!1};function zg(e){return Math.min(Math.max(e,Number.EPSILON),1)}function cu(e){const{minZoom:t,...n}={...Bg,...e};return{minZoom:zg(t),...n}}function Wg(e,t,n,s){const i=g.useRef(void 0),r=g.useRef(void 0),{zoom:o}=We().animation,l=eo(),c=me(()=>{var u,d,f;if((u=i.current)===null||u===void 0||u.cancel(),i.current=void 0,r.current&&s?.current){try{i.current=(f=(d=s.current).animate)===null||f===void 0?void 0:f.call(d,[{transform:r.current},{transform:`scale(${e}) translateX(${t}px) translateY(${n}px)`}],{duration:l?0:o??500,easing:i.current?"ease-out":"ease-in-out"})}catch(h){console.error(h)}r.current=void 0,i.current&&(i.current.onfinish=()=>{i.current=void 0})}});return et(c,[e,t,n,c]),g.useCallback(()=>{r.current=s?.current?window.getComputedStyle(s.current).transform:void 0},[s])}function Yg(e,t){const{on:n}=We(),s=me(()=>{var i;t||(i=n.zoom)===null||i===void 0||i.call(n,{zoom:e})});g.useEffect(s,[e,s])}function ss(){const{zoom:e}=We();return cu(e)}function Ug(e,t){var n,s;let i={width:0,height:0},r={width:0,height:0};const{currentSlide:o}=pt(),{imageFit:l}=We().carousel,{maxZoomPixelRatio:c}=ss();if(e&&o){const d={...o,...t};if(Zt(d)){const f=Ki(d,l),h=Math.max(...(((n=d.srcSet)===null||n===void 0?void 0:n.map(p=>p.width))||[]).concat(d.width?[d.width]:[])),m=Math.max(...(((s=d.srcSet)===null||s===void 0?void 0:s.map(p=>p.height))||[]).concat(d.height?[d.height]:[]));h>0&&m>0&&e.width>0&&e.height>0&&(r=f?{width:Math.round(Math.min(h,e.width/e.height*m)),height:Math.round(Math.min(m,e.height/e.width*h))}:{width:h,height:m},r={width:r.width*c,height:r.height*c},i=f?{width:Math.min(e.width,r.width,h),height:Math.min(e.height,r.height,m)}:{width:Math.round(Math.min(e.width,e.height/m*h,h)),height:Math.round(Math.min(e.height,e.width/h*m,m))})}}const u=i.width?Math.max(Gi(r.width/i.width,5),1):1;return{imageRect:i,maxZoom:u}}function uu(e,t){return Math.hypot(e.clientX-t.clientX,e.clientY-t.clientY)}function du(e,t,n=100,s=2){return e*Math.min(1+Math.abs(t/n),s)**Math.sign(t)}function Hg(e,t,n,s,i,r,o,l,c){const u=g.useRef([]),d=g.useRef(0),f=g.useRef(void 0),{globalIndex:h}=pt(),{getOwnerWindow:m}=Jn(),{containerRef:p,subscribeSensors:y}=it(),{keyboardMoveDistance:v,zoomInMultiplier:x,wheelZoomDistanceFactor:C,scrollToZoom:N,doubleTapDelay:I,doubleClickDelay:A,doubleClickMaxStops:k,pinchZoomDistanceFactor:E,pinchZoomV4:w}=ss(),j=g.useCallback(P=>{if(p.current){const{pageX:_,pageY:M}=P,{scrollX:T,scrollY:O}=m(),{left:ne,top:ae,width:ie,height:le}=p.current.getBoundingClientRect();return[_-ne-T-ie/2,M-ae-O-le/2]}return[]},[p,m]),$=me(P=>{const{key:_,metaKey:M,ctrlKey:T}=P,O=M||T,ne=()=>{P.preventDefault(),P.stopPropagation()};if(e>1){const ae=(ie,le)=>{ne(),l(ie,le)};_==="ArrowDown"?ae(0,v):_==="ArrowUp"?ae(0,-v):_==="ArrowLeft"?ae(-v,0):_==="ArrowRight"&&ae(v,0)}_==="+"||O&&_==="="?(ne(),i()):_==="-"||O&&_==="_"?(ne(),r()):O&&_==="0"&&(ne(),o(1))}),z=me(P=>{if((P.ctrlKey||N)&&Math.abs(P.deltaY)>Math.abs(P.deltaX)){P.stopPropagation(),o(du(e,-P.deltaY,C),!0,...j(P));return}e>1&&(P.stopPropagation(),N||l(P.deltaX,P.deltaY))}),Q=g.useCallback(P=>{const _=u.current;_.splice(0,_.length,..._.filter(M=>M.pointerId!==P.pointerId))},[]),R=g.useCallback(P=>{Q(P),P.persist(),u.current.push(P)},[Q]),se=me(P=>{var _;const M=u.current;if(P.pointerType==="mouse"&&P.buttons>1||!(!((_=c?.current)===null||_===void 0)&&_.contains(P.target)))return;e>1&&P.stopPropagation();const{timeStamp:T}=P;if(M.length===0&&T-d.current<(P.pointerType==="touch"?I:A)){d.current=0;const O=e>=1?e!==n?e*Math.max(n**(1/k),x):1:e!==t?e/Math.max(t**(-1/k),x):1;o(O,!1,...j(P))}else d.current=T;if(R(P),M.length===2){const O=uu(M[0],M[1]);f.current={previousDistance:O,initialDistance:Math.max(O,1),initialZoom:e}}}),U=me(P=>{const _=u.current,M=_.find(T=>T.pointerId===P.pointerId);if(_.length===2&&f.current){P.stopPropagation(),R(P);const T=uu(_[0],_[1]),O=w?f.current.initialZoom/f.current.initialDistance*T:du(e,T-f.current.previousDistance,E);o(O,!0,..._.map(ne=>j(ne)).reduce((ne,ae)=>ae.map((ie,le)=>ne[le]+ie/2))),f.current.previousDistance=T;return}e>1&&(P.stopPropagation(),M&&(_.length===1&&l((M.clientX-P.clientX)/e,(M.clientY-P.clientY)/e),R(P)))}),J=g.useCallback(P=>{const _=u.current;_.length===2&&_.find(M=>M.pointerId===P.pointerId)&&(f.current=void 0),Q(P)},[Q]),V=g.useCallback(()=>{const P=u.current;P.splice(0,P.length),d.current=0,f.current=void 0},[]);Jc(y,se,U,J,s),g.useEffect(V,[h,V]),g.useEffect(()=>s?()=>{}:Hi(V,y(zi,$),y(Wi,z)),[s,y,V,$,z])}function Xg(e,t,n){const[s,i]=g.useState(1),[r,o]=g.useState(0),[l,c]=g.useState(0),u=Wg(s,r,l,n),{currentSlide:d,globalIndex:f}=pt(),{containerRect:h,slideRect:m}=it(),{minZoom:p,zoomInMultiplier:y}=ss(),v=d&&Zt(d)?d.src:void 0,x=!v||!n?.current;et(()=>{i(1),o(0),c(0)},[f,v]);const C=g.useCallback((E,w,j)=>{const $=j||s,z=r-(E||0),Q=l-(w||0),R=(e.width*$-m.width)/2/$,se=(e.height*$-m.height)/2/$;o(Math.min(Math.abs(z),Math.max(R,0))*Math.sign(z)),c(Math.min(Math.abs(Q),Math.max(se,0))*Math.sign(Q))},[s,r,l,m,e.width,e.height]),N=g.useCallback((E,w,j,$)=>{const z=Gi(E+.01<t?E-.01>p?E:p:t,5);w||u(),C(j?j*(1/s-1/z):0,$?$*(1/s-1/z):0,z),i(z)},[s,p,t,C,u]),I=me(()=>{s>1&&(s>t&&N(t,!0),C())});et(I,[h.width,h.height,I]);const A=g.useCallback(()=>{const E=s*y;N(s<1&&E>1?1:E)},[s,y,N]),k=g.useCallback(()=>{const E=s/y;N(s>1&&E<1?1:E)},[s,y,N]);return{zoom:s,offsetX:r,offsetY:l,disabled:x,changeOffsets:C,changeZoom:N,zoomIn:A,zoomOut:k}}const fu=g.createContext(null),ro=st("useZoom","ZoomControllerContext",fu);function Gg({children:e}){const[t,n]=g.useState(),{slideRect:s}=it(),{ref:i,minZoom:r}=ss(),{imageRect:o,maxZoom:l}=Ug(s,t?.imageDimensions),{zoom:c,offsetX:u,offsetY:d,disabled:f,changeZoom:h,changeOffsets:m,zoomIn:p,zoomOut:y}=Xg(o,l,t?.zoomWrapperRef);Yg(c,f),Hg(c,r,l,f,p,y,h,m,t?.zoomWrapperRef);const v=g.useMemo(()=>({zoom:c,minZoom:r,maxZoom:l,offsetX:u,offsetY:d,disabled:f,zoomIn:p,zoomOut:y,changeZoom:h}),[c,r,l,u,d,f,p,y,h]);g.useImperativeHandle(i,()=>v,[v]);const x=g.useMemo(()=>({...v,setZoomWrapper:n}),[v,n]);return g.createElement(fu.Provider,{value:x},e)}const Kg=Nt("ZoomIn",g.createElement(g.Fragment,null,g.createElement("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),g.createElement("path",{d:"M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"}))),Zg=Nt("ZoomOut",g.createElement("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7z"})),hu=g.forwardRef(function({zoomIn:t,onLoseFocus:n},s){const i=g.useRef(!1),r=g.useRef(!1),{zoom:o,minZoom:l,maxZoom:c,zoomIn:u,zoomOut:d,disabled:f}=ro(),{render:h}=We(),m=f||(t?o>=c:o<=l);return g.useEffect(()=>{m&&i.current&&r.current&&n(),m||(i.current=!0)},[m,n]),g.createElement(Qi,{ref:s,disabled:m,label:t?"Zoom in":"Zoom out",icon:t?Kg:Zg,renderIcon:t?h.iconZoomIn:h.iconZoomOut,onClick:t?u:d,onFocus:()=>{r.current=!0},onBlur:()=>{r.current=!1}})});function qg(){const e=g.useRef(null),t=g.useRef(null),{focus:n}=it(),s=g.useCallback(o=>{var l,c;!((l=o.current)===null||l===void 0)&&l.disabled?n():(c=o.current)===null||c===void 0||c.focus()},[n]),i=g.useCallback(()=>s(e),[s]),r=g.useCallback(()=>s(t),[s]);return g.createElement(g.Fragment,null,g.createElement(hu,{zoomIn:!0,ref:e,onLoseFocus:r}),g.createElement(hu,{ref:t,onLoseFocus:i}))}function Jg(){const{render:e}=We(),t=ro();return e.buttonZoom?g.createElement(g.Fragment,null,e.buttonZoom(t)):g.createElement(qg,null)}function Qg(e){var t;return(((t=e.srcSet)===null||t===void 0?void 0:t.length)||0)>0}function eb({current:e,preload:t},{type:n,source:s}){switch(n){case"fetch":return e?{current:e,preload:s}:{current:s};case"done":return s===t?{current:s}:{current:e,preload:t};default:throw new Error(Lc)}}function tb(e){var t,n;const[{current:s,preload:i},r]=g.useReducer(eb,{}),{slide:o,rect:l,imageFit:c,render:u,interactive:d}=e,f=o.srcSet.sort((A,k)=>A.width-k.width),h=(t=o.width)!==null&&t!==void 0?t:f[f.length-1].width,m=(n=o.height)!==null&&n!==void 0?n:f[f.length-1].height,p=Ki(o,c),y=Math.max(...f.map(A=>A.width)),v=Math.min((p?Math.max:Math.min)(l.width,h*(l.height/m)),y),x=Yp(),C=me(()=>{var A;const k=(A=f.find(E=>E.width>=v*x))!==null&&A!==void 0?A:f[f.length-1];(!s||f.findIndex(E=>E.src===s)<f.findIndex(E=>E===k))&&r({type:"fetch",source:k.src})});et(C,[l.width,l.height,x,C]);const N=me(A=>r({type:"done",source:A})),I={WebkitTransform:d?"initial":"translateZ(0)"};return p||Object.assign(I,l.width/l.height<h/m?{width:"100%",height:"auto"}:{width:"auto",height:"100%"}),g.createElement(g.Fragment,null,i&&i!==s&&g.createElement(ns,{key:"preload",...e,offset:void 0,slide:{...o,src:i,srcSet:void 0},style:{position:"absolute",visibility:"hidden",...I},onLoad:()=>N(i),render:{...u,iconLoading:()=>null,iconError:()=>null}}),s&&g.createElement(ns,{key:"current",...e,slide:{...o,src:s,srcSet:void 0},style:I}))}function nb({render:e,slide:t,offset:n,rect:s}){var i;const[r,o]=g.useState(),l=g.useRef(null),{zoom:c,maxZoom:u,offsetX:d,offsetY:f,setZoomWrapper:h}=ro(),m=c>1,{carousel:p,on:y}=We(),{currentIndex:v}=pt();et(()=>n===0?(h({zoomWrapperRef:l,imageDimensions:r}),()=>h(void 0)):()=>{},[n,r,h]);let x=(i=e.slide)===null||i===void 0?void 0:i.call(e,{slide:t,offset:n,rect:s,zoom:c,maxZoom:u});if(!x&&Zt(t)){const C={slide:t,offset:n,rect:s,render:e,imageFit:p.imageFit,imageProps:p.imageProps,onClick:n===0?()=>{var N;return(N=y.click)===null||N===void 0?void 0:N.call(y,{index:v})}:void 0};x=Qg(t)?g.createElement(tb,{...C,slide:t,interactive:m,rect:n===0?{width:s.width*c,height:s.height*c}:s}):g.createElement(ns,{onLoad:N=>o({width:N.naturalWidth,height:N.naturalHeight}),...C})}return x?g.createElement("div",{ref:l,className:Qe(fe(Op),fe($i),fe(Nc),m&&fe(Dp)),style:n===0?{transform:`scale(${c}) translateX(${d}px) translateY(${f}px)`}:void 0},x):null}const sb=({augment:e,addModule:t})=>{e(({zoom:n,toolbar:s,render:i,controller:r,...o})=>{const l=cu(n);return{zoom:l,toolbar:Hp(s,Ec,g.createElement(Jg,null)),render:{...i,slide:c=>{var u;return Zt(c.slide)?g.createElement(nb,{render:i,...c}):(u=i.slide)===null||u===void 0?void 0:u.call(i,c)}},controller:{...r,preventDefaultWheelY:l.scrollToZoom},...o}}),t(mt(Ec,Gg))};function ib({onClose:e,images:t}){return b.useEffect(()=>{const n=s=>{s.key==="Escape"&&e()};return window.addEventListener("keydown",n),()=>{window.removeEventListener("keydown",n)}},[e]),a.jsx($g,{open:!0,close:e,plugins:[sb],zoom:{zoomInMultiplier:1.2},slides:t.map(n=>({src:n}))})}function mu({onClose:e,source:t}){const{t:n}=ot.useTranslation();return b.useEffect(()=>{const s=i=>{i.key==="Escape"&&e()};return window.addEventListener("keydown",s),()=>{window.removeEventListener("keydown",s)}},[e]),a.jsxs(S.div,{className:"absolute inset-0 z-[10000] bg-black flex items-center justify-center",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.5},children:[a.jsxs(S.button,{onClick:e,className:"absolute top-8 left-1/2 -translate-x-1/2 z-[110] px-6 py-3 bg-slate-800/90 hover:bg-slate-700/90 text-cyan-300 rounded-full transition-all duration-300 border-2 border-cyan-400/50 hover:border-cyan-400/80 shadow-lg hover:shadow-cyan-500/50 font-medium flex items-center gap-2",initial:{opacity:0,y:-50,scale:.8},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-50,scale:.8},transition:{delay:.3,duration:.4,ease:[.34,1.56,.64,1]},whileHover:{scale:1.05,boxShadow:"0 0 30px rgba(34, 211, 238, 0.6)"},whileTap:{scale:.95},children:[a.jsx(F.X,{className:"w-5 h-5"}),a.jsx("span",{children:n("layout.cerrar")})]}),a.jsx(S.div,{className:"w-full h-full",initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},transition:{delay:.2,duration:.6,ease:[.34,1.56,.64,1]},children:a.jsxs("video",{autoPlay:!0,controls:!0,className:"w-full h-full object-contain",src:t,children:[a.jsx("source",{src:t,type:"video/webm"}),"Tu navegador no soporta el elemento de video."]})})]})}const ob={type:"spring",stiffness:300,damping:30,mass:1},rb=[.22,1,.36,1];function ao({card:e,isExpanded:t,isOtherExpanded:n,collapsedUniformHeight:s=!1,onToggle:i,onClose:r,expandedContent:o,delay:l=0,gridSpan:c=!0}){const[u,d]=b.useState(null),f=b.useRef(null),[h,m]=b.useState(!1),[p,y]=b.useState(!1),v=E=>{d(E)},x=()=>{d(null)},C=()=>{u!==null&&e.images&&d((u-1+e.images.length)%e.images.length)},N=()=>{u!==null&&e.images&&d((u+1)%e.images.length)},I=()=>{const E=f.current;if(!E)return;const{scrollLeft:w,scrollWidth:j,clientWidth:$}=E;m(w>0),y(w<j-$-10)},A=E=>{const w=f.current;if(!w)return;const j=280;w.scrollBy({left:E==="left"?-j:j,behavior:"smooth"})};if(b.useEffect(()=>{if(e.images&&e.images.length>6){I();const E=f.current;if(E)return E.addEventListener("scroll",I),window.addEventListener("resize",I),()=>{E.removeEventListener("scroll",I),window.removeEventListener("resize",I)}}},[e.images]),n)return null;const k=()=>t&&c||e.width==="full"?"col-span-full":"";return a.jsxs(a.Fragment,{children:[a.jsx(S.div,{layout:!0,initial:{opacity:0,y:10,scale:.995},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-8,scale:.995,transition:{duration:.14,ease:[.4,0,1,1]}},transition:{duration:.3,ease:rb,delay:l*.03,layout:{type:"spring",stiffness:200,damping:30,mass:.9}},className:`group relative cursor-pointer ${s?"h-full":""} ${k()}`,onClick:t?void 0:i,children:a.jsxs(S.div,{layout:!0,className:`relative p-8 bg-slate-900/40 backdrop-blur-xl border rounded-2xl shadow-xl flex flex-col ${s?"h-full":""}
15
15
  ${t?"bg-slate-900/70 border-cyan-400/40 shadow-[0_25px_80px_-12px_rgba(34,211,238,0.35)]":"border-slate-400/20 hover:border-cyan-400/40 hover:shadow-[0_20px_60px_-15px_rgba(34,211,238,0.3)]"}
16
16
  ${t?"max-h-[calc(100vh-18rem)] md:max-h-[calc(100vh-20rem)] overflow-hidden":""}
17
17
  transition-all duration-300 ease-out
18
- `,whileHover:t?{}:{scale:1.015,y:-3},transition:ob,children:[a.jsxs("div",{className:"flex items-center justify-center mb-5 relative",children:[e.tagUrl?a.jsx("a",{href:e.tagUrl,target:"_blank",rel:"noopener noreferrer",className:`px-3 py-1 text-xs font-semibold rounded-full border hover:scale-105 transition-transform ${e.tagColor||"bg-cyan-500/20 text-cyan-300 border-cyan-400/30"}`,onClick:E=>E.stopPropagation(),children:e.tag}):a.jsx("span",{className:`px-3 py-1 text-xs font-semibold rounded-full border ${e.tagColor||"bg-cyan-500/20 text-cyan-300 border-cyan-400/30"}`,children:e.tag}),t&&a.jsx(S.button,{initial:{scale:0},animate:{scale:1},className:"absolute right-0 p-1 rounded-full bg-slate-800/80 hover:bg-slate-700/80 border border-cyan-400/30 hover:border-cyan-400/60 transition-colors",onClick:E=>{E.stopPropagation(),r()},children:a.jsx(F.X,{className:"w-4 h-4 text-cyan-300"})})]}),a.jsx("h3",{className:`text-2xl font-bold mb-3 transition-colors duration-300 ${t?"text-cyan-300":"text-white"}`,children:a.jsxs("span",{className:"relative inline-block",children:[e.title,a.jsx(S.span,{className:"absolute bottom-0 left-0 h-0.5 bg-linear-to-r from-cyan-400 to-teal-400",initial:{width:0},animate:{width:t?"100%":0},transition:{duration:.5,ease:[.22,1,.36,1],delay:t?.2:0}})]})}),a.jsx(S.p,{className:`text-base text-slate-300 leading-relaxed ${t?"shrink-0":"grow"}`,animate:{opacity:t?.9:1,marginBottom:t?"1.5rem":"1rem"},children:e.description}),a.jsx(Ce,{mode:"wait",children:t&&a.jsxs(S.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0,y:8},transition:{duration:.25,ease:[.4,0,.2,1]},className:"flex-1 min-h-0 overflow-y-auto overflow-x-hidden pr-1",children:[e.images&&e.images.length>0&&a.jsx(S.div,{className:"mt-6 pt-6 border-t border-cyan-400/30",initial:{opacity:0},animate:{opacity:1},transition:{delay:.1,duration:.3},children:e.images.length>6?a.jsxs("div",{className:"relative",children:[h&&a.jsx("button",{onClick:E=>{E.stopPropagation(),A("left")},className:"absolute left-0 top-1/2 -translate-y-1/2 z-10 w-12 h-12 bg-slate-900/80 hover:bg-slate-900/95 backdrop-blur-sm border border-cyan-400/30 hover:border-cyan-400/60 rounded-full flex items-center justify-center text-cyan-400 hover:text-cyan-300 transition-all shadow-lg","aria-label":"Anterior",children:a.jsx(F.ChevronLeft,{className:"w-6 h-6"})}),a.jsx("div",{ref:f,className:"flex gap-4 overflow-x-auto scrollbar-hide",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:e.images.map((E,w)=>a.jsxs(S.div,{className:"relative aspect-video rounded-lg overflow-hidden border border-cyan-400/20 hover:border-cyan-400/40 transition-colors cursor-pointer group/image shrink-0 w-64",initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{delay:.15+Math.min(w,6)*.05,duration:.3},onClick:j=>{j.stopPropagation(),v(w)},whileHover:{scale:1.05},children:[a.jsx("img",{src:E.url||E,alt:E.alt||`Imagen ${w+1}`,className:"w-full h-full object-cover"}),a.jsx("div",{className:"absolute inset-0 bg-black/0 group-hover/image:bg-black/20 transition-colors flex items-center justify-center",children:a.jsx("span",{className:"opacity-0 group-hover/image:opacity-100 text-white text-sm font-medium transition-opacity",children:"Ver imagen"})})]},`${e.id}-img-${E.url||w}`))}),p&&a.jsx("button",{onClick:E=>{E.stopPropagation(),A("right")},className:"absolute right-0 top-1/2 -translate-y-1/2 z-10 w-12 h-12 bg-slate-900/80 hover:bg-slate-900/95 backdrop-blur-sm border border-cyan-400/30 hover:border-cyan-400/60 rounded-full flex items-center justify-center text-cyan-400 hover:text-cyan-300 transition-all shadow-lg","aria-label":"Siguiente",children:a.jsx(F.ChevronRight,{className:"w-6 h-6"})})]}):a.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:e.images.map((E,w)=>a.jsxs(S.div,{className:"relative aspect-video rounded-lg overflow-hidden border border-cyan-400/20 hover:border-cyan-400/40 transition-colors cursor-pointer group/image",initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{delay:.15+w*.05,duration:.3},onClick:j=>{j.stopPropagation(),v(w)},whileHover:{scale:1.05},children:[a.jsx("img",{src:E.url||E,alt:E.alt||`Imagen ${w+1}`,className:"w-full h-full object-cover"}),a.jsx("div",{className:"absolute inset-0 bg-black/0 group-hover/image:bg-black/20 transition-colors flex items-center justify-center",children:a.jsx("span",{className:"opacity-0 group-hover/image:opacity-100 text-white text-sm font-medium transition-opacity",children:"Ver imagen"})})]},`${e.id}-img-${E.url||w}`))})}),e.keyPoints&&e.keyPoints.length>0&&a.jsxs(S.div,{className:"mt-6 pt-6 border-t border-cyan-400/30",initial:{opacity:0},animate:{opacity:1},transition:{delay:.15,duration:.3},children:[a.jsxs("h4",{className:"text-lg font-bold text-cyan-300 mb-4 flex items-center gap-2",children:[a.jsx(F.Check,{className:"w-5 h-5"}),"Puntos Clave"]}),a.jsx("ul",{className:"space-y-3",children:e.keyPoints.map((E,w)=>a.jsxs(S.li,{className:"flex items-start gap-3 text-slate-200",initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:.2+w*.05,duration:.25},children:[a.jsx("span",{className:"mt-1.5 w-2 h-2 rounded-full bg-cyan-400 shrink-0"}),a.jsx("span",{children:E})]},`${e.id}-kp-${w}-${E.slice(0,20)}`))})]}),o&&a.jsx(S.div,{className:"mt-6 pt-6 border-t border-cyan-400/30",initial:{opacity:0},animate:{opacity:1},transition:{delay:.15,duration:.3},children:o})]})})]})}),typeof document<"u"&&vo.createPortal(a.jsx(Ce,{children:u!==null&&e.images&&a.jsxs(S.div,{className:"absolute inset-0 z-12000 flex items-center justify-center bg-black",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:x,children:[a.jsx(S.button,{className:"absolute top-4 right-4 p-2 rounded-full bg-slate-800/80 hover:bg-slate-700/80 border border-cyan-400/30 hover:border-cyan-400/60 transition-colors z-10",onClick:E=>{E.stopPropagation(),x()},initial:{scale:0},animate:{scale:1},transition:{delay:.2},children:a.jsx(F.X,{className:"w-6 h-6 text-cyan-300"})}),e.images.length>1&&a.jsxs(a.Fragment,{children:[a.jsx(S.button,{className:"absolute left-4 p-3 rounded-full bg-slate-800/80 hover:bg-slate-700/80 border border-cyan-400/30 hover:border-cyan-400/60 transition-colors z-10",onClick:E=>{E.stopPropagation(),C()},initial:{x:-20,opacity:0},animate:{x:0,opacity:1},transition:{delay:.3},children:a.jsx(F.ChevronLeft,{className:"w-6 h-6 text-cyan-300"})}),a.jsx(S.button,{className:"absolute right-4 p-3 rounded-full bg-slate-800/80 hover:bg-slate-700/80 border border-cyan-400/30 hover:border-cyan-400/60 transition-colors z-10",onClick:E=>{E.stopPropagation(),N()},initial:{x:20,opacity:0},animate:{x:0,opacity:1},transition:{delay:.3},children:a.jsx(F.ChevronRight,{className:"w-6 h-6 text-cyan-300"})})]}),a.jsxs(S.div,{className:"relative w-screen h-screen p-6 md:p-10",initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},transition:{type:"spring",stiffness:300,damping:30},onClick:E=>E.stopPropagation(),children:[a.jsx("div",{className:"w-full h-full overflow-hidden flex items-center justify-center",children:a.jsx("img",{src:e.images[u].url||e.images[u],alt:e.images[u].alt||`Imagen ${u+1}`,className:"w-full h-full object-contain"})}),e.images[u].alt&&a.jsx(S.div,{className:"absolute bottom-0 left-0 right-0 bg-linear-to-t from-black/80 to-transparent p-6 rounded-b-lg",initial:{y:20,opacity:0},animate:{y:0,opacity:1},transition:{delay:.4},children:a.jsx("p",{className:"text-white text-center text-lg font-medium",children:e.images[u].alt})}),e.images.length>1&&a.jsx(S.div,{className:"absolute top-4 left-1/2 -translate-x-1/2 px-4 py-2 bg-slate-800/80 rounded-full border border-cyan-400/30",initial:{y:-20,opacity:0},animate:{y:0,opacity:1},transition:{delay:.4},children:a.jsxs("span",{className:"text-cyan-300 text-sm font-medium",children:[u+1," / ",e.images.length]})})]})]})}),document.body)]})}function ab(e){return e&&rs[e]||F.Layers}function lb(e,t,n,s){return{id:`tab-${n}-card-${s}`,title:e.title,description:e.subtitle,icon:ab(t),tag:e.tagName||"Info",tagColor:e.tagName?"bg-cyan-500/20 text-cyan-300 border-cyan-400/30":void 0,tagUrl:e.tagUrl,keyPoints:e.features.map(i=>i.text??i.description??"").filter(Boolean),images:e?.images?.map(i=>i.url),width:e.width}}function cb(e){return e.some(n=>n.width==="third")?"grid-cols-1 md:grid-cols-3":"grid-cols-1 md:grid-cols-2"}function pu({tab:e,tabIndex:t=0,expandedCardId:n,setExpandedCardId:s}){const i=u=>{s(n===u?null:u)},r=()=>{s(null)};if(!e?.cards||e.cards.length===0)return a.jsx(S.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"flex items-center justify-center py-20",children:a.jsx("div",{className:"text-slate-400 text-lg",children:"No hay contenido disponible para esta vista"})});const o=e.cards.map((u,d)=>lb(u,e.icon,t,d)),l=n?o.find(u=>u.id===n):void 0,c=`grid ${cb(e.cards)} gap-4 items-start`;return a.jsx(S.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.4,ease:[.4,0,.2,1]},className:"space-y-6",children:a.jsx(Ce,{mode:"wait",initial:!1,children:l?a.jsx(S.div,{initial:{opacity:0,y:14,scale:.995},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-10,scale:.995,transition:{duration:.16,ease:[.4,0,1,1]}},transition:{duration:.34,ease:[.22,1,.36,1]},children:a.jsx(ao,{card:l,delay:0,isExpanded:!0,isOtherExpanded:!1,collapsedUniformHeight:!1,onToggle:()=>i(l.id),onClose:r,gridSpan:!0},l.id)},`expanded-${l.id}`):a.jsx(S.div,{className:c,initial:{opacity:0,y:10,scale:.998},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-8,scale:.998,transition:{duration:.14,ease:[.4,0,1,1]}},transition:{duration:.26,ease:[.22,1,.36,1]},children:o.map((u,d)=>a.jsx(ao,{card:u,delay:d,isExpanded:!1,isOtherExpanded:!1,collapsedUniformHeight:!0,onToggle:()=>i(u.id),onClose:r,gridSpan:!0},u.id))},"collapsed-grid")})})}function gu({item:e,onClose:t}){const[n,s]=b.useState(0),[i,r]=b.useState(0),[o,l]=b.useState(!1),[c,u]=b.useState(""),[d,f]=b.useState(!1),[h,m]=b.useState(""),[p,y]=b.useState(!1),[v,x]=b.useState(!1),[C,N]=b.useState(),[I,A]=b.useState(.3),[k,E]=b.useState(null),[w,j]=b.useState(null),$=b.useRef(null),[z,Q]=b.useState(!1),[R,se]=b.useState(!1),U=xe().pagination?.simulation??6,J=U<e?.items.length,V=Math.max(0,e?.items.length-U),P=e?.items[n]?.cards??[];b.useEffect(()=>{const W=document.body.style.overflow,he=document.documentElement.style.overflow;return document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",()=>{document.body.style.overflow=W,document.documentElement.style.overflow=he}},[]);const _=()=>{i>0&&r(W=>Math.max(0,W-U))},M=()=>{i<V&&r(W=>Math.min(V,W+U))},T=W=>!!W?.trim(),O=W=>W?.endsWith(".webm")||W?.endsWith(".mp4"),ne=W=>{T(W)&&(m(W.trim()),f(!0))},ie=()=>{const W=$.current;if(!W)return;const{scrollLeft:he,scrollWidth:be,clientWidth:ke}=W;Q(he>0),se(he<be-ke-10)},re=W=>{const he=$.current;if(!he)return;const be=300;he.scrollBy({left:W==="left"?-be:be,behavior:"smooth"})},ae=e?.items[n]?.tab||[];b.useEffect(()=>{ie();const W=$.current;if(W)return W.addEventListener("scroll",ie),window.addEventListener("resize",ie),()=>{W.removeEventListener("scroll",ie),window.removeEventListener("resize",ie)}},[ae]);const le=W=>{s(W),E(null),j(null),y(!1),A(.3)};b.useEffect(()=>{const W=he=>{if(o||d||p||v)return;const be=e.items.length;be<=1||(he.key==="ArrowRight"?(he.preventDefault(),le((n+1)%be)):he.key==="ArrowLeft"&&(he.preventDefault(),le((n-1+be)%be)))};return window.addEventListener("keydown",W),()=>window.removeEventListener("keydown",W)},[n,o,d,p,v,e.items.length]),b.useEffect(()=>{const W=globalThis.setTimeout(()=>{A(.9)},1e4);return()=>globalThis.clearTimeout(W)},[n]);const ye=W=>W&&rs[W]||F.Layers,ue=W=>{if(!(W<0||W>=ae.length))return ae[W]},Ne=k!=null;return a.jsxs(a.Fragment,{children:[a.jsxs(S.div,{className:"fixed inset-0 z-[10000] bg-black simulation-mode",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.5},children:[e.items[n].videoBackgroundMedia&&a.jsx(S.video,{autoPlay:!0,loop:!0,muted:!0,playsInline:!0,className:"fixed inset-0 w-full h-full object-cover z-[101]",initial:{opacity:0,scale:1.1},animate:{opacity:1,scale:1},transition:{duration:.8},poster:e.items[n].backgroundMedia?.url??"",children:a.jsx("source",{src:e.items[n].videoBackgroundMedia.url,type:"video/webm"})},e.items[n].videoBackgroundMedia.documentId),a.jsx(S.div,{className:"fixed inset-0 bg-black z-[102]",initial:{opacity:0},animate:{opacity:I},transition:{duration:.5,ease:"easeInOut"}}),a.jsx("div",{className:"relative z-[105] h-full overflow-y-auto overflow-x-hidden scrollbar-hide overscroll-contain",children:a.jsxs("div",{className:"min-h-screen flex flex-col items-center justify-center px-8 pb-64",children:[a.jsxs("div",{className:"relative w-full flex justify-center mb-8 mt-24 md:mt-28",children:[z&&a.jsx(S.button,{onClick:W=>{W.stopPropagation(),re("left")},className:"absolute left-4 top-1/2 -translate-y-1/2 z-20 w-10 h-10 bg-slate-900/80 hover:bg-slate-900/95 backdrop-blur-sm border border-cyan-400/30 hover:border-cyan-400/60 rounded-full flex items-center justify-center text-cyan-400 hover:text-cyan-300 transition-all shadow-lg",initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},whileHover:{scale:1.1},whileTap:{scale:.9},children:a.jsx(F.ChevronLeft,{className:"w-5 h-5"})}),a.jsxs(S.div,{ref:$,className:"flex items-center justify-center gap-3 overflow-x-auto scrollbar-hide max-w-full px-2 py-2",initial:{opacity:0,y:-30,scale:.9},animate:{opacity:1,y:0,scale:1},transition:{delay:.3,duration:.7,ease:[.22,1,.36,1]},children:[a.jsx("div",{className:"w-11 h-11 shrink-0","aria-hidden":"true"}),ae.map((W,he)=>{const be=ye(W.icon),ke=k===he;return a.jsxs(S.button,{onClick:()=>{E(he),j(null)},className:`relative px-6 py-3 rounded-full font-medium text-sm transition-all duration-300 flex items-center gap-2 shrink-0 ${ke?"bg-gradient-to-r from-cyan-500 to-blue-600 text-white border border-cyan-400":"bg-slate-800/60 text-cyan-400 border border-slate-600/50 hover:text-white hover:border-cyan-400/60"}`,whileHover:{scale:1.05},whileTap:{scale:.95},children:[a.jsx(be,{className:"w-4 h-4"}),W.name,ke&&a.jsx(S.div,{layoutId:"activeTab",className:"absolute inset-0 bg-cyan-400/20 rounded-full -z-10",transition:{type:"spring",stiffness:300,damping:30}})]},`${W.name}-${he}`)}),a.jsx("div",{className:"w-11 h-11 shrink-0 flex items-center justify-center",children:a.jsx(S.button,{onClick:()=>{k!==null&&(E(null),j(null))},className:"relative p-3 rounded-full bg-slate-800/60 hover:bg-slate-700/80 text-cyan-300 hover:text-cyan-200 border border-slate-600/50 hover:border-cyan-400/60 transition-all duration-300 shadow-lg hover:shadow-cyan-500/30 disabled:pointer-events-none",initial:!1,animate:{opacity:Ne?1:0,scale:Ne?1:.75,x:Ne?0:-6},transition:{type:"spring",stiffness:300,damping:25},whileHover:Ne?{scale:1.1,rotate:90}:{},whileTap:Ne?{scale:.9}:{},disabled:!Ne,"aria-hidden":!Ne,tabIndex:Ne?0:-1,children:a.jsx(F.X,{className:"w-5 h-5"})})})]}),R&&a.jsx(S.button,{onClick:W=>{W.stopPropagation(),re("right")},className:"absolute right-4 top-1/2 -translate-y-1/2 z-20 w-10 h-10 bg-slate-900/80 hover:bg-slate-900/95 backdrop-blur-sm border border-cyan-400/30 hover:border-cyan-400/60 rounded-full flex items-center justify-center text-cyan-400 hover:text-cyan-300 transition-all shadow-lg",initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},whileHover:{scale:1.1},whileTap:{scale:.9},children:a.jsx(F.ChevronRight,{className:"w-5 h-5"})})]}),a.jsxs(S.div,{layout:!0,className:"text-center max-w-6xl w-full",initial:{opacity:0},animate:{opacity:1},transition:{duration:.6,ease:[.22,1,.36,1]},style:{willChange:"transform, opacity",backfaceVisibility:"hidden",WebkitFontSmoothing:"antialiased",transform:"translateZ(0)"},children:[a.jsxs(S.div,{layout:"position",initial:{opacity:0,y:40},animate:{opacity:1,y:0},transition:{delay:.6,duration:1,ease:[.22,1,.36,1]},style:{backfaceVisibility:"hidden",WebkitFontSmoothing:"antialiased"},children:[a.jsx(S.h1,{className:"text-6xl sm:text-7xl md:text-8xl font-bold mb-6 leading-tight uppercase font-tomorrow text-cyan-300 line-clamp-2",style:{letterSpacing:"3px",backfaceVisibility:"hidden",WebkitFontSmoothing:"antialiased",transform:"translateZ(0)"},initial:{opacity:0,y:30,scale:.95},animate:{opacity:1,y:0,scale:1},transition:{delay:.8,duration:.6,ease:[.22,1,.36,1]},children:e.items[n].title},e.items[n].title),a.jsx(Ce,{mode:"popLayout",initial:!1,children:k===null&&a.jsx(S.p,{layout:"position",className:"text-sm sm:text-base text-white/90 uppercase tracking-tighter font-medium md:text-base text-center px-[100px] mt-[-5px] shadow-none",style:{textShadow:"0 2px 10px rgba(0, 0, 0, 0.8)",fontFamily:"system-ui, -apple-system, sans-serif",letterSpacing:"0.2em",backfaceVisibility:"hidden",WebkitFontSmoothing:"antialiased",transform:"translateZ(0)"},initial:{opacity:0,y:12,filter:"blur(4px)"},animate:{opacity:1,y:0,filter:"blur(0px)"},exit:{opacity:0,y:-8,filter:"blur(3px)"},transition:{duration:.28,ease:[.22,1,.36,1]},children:e.items[n].subtitle},`subtitle-${n}`)}),a.jsxs(S.div,{layout:"position",className:"flex items-center justify-center gap-4 mt-8",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:1.3,duration:.6,ease:[.22,1,.36,1],layout:{type:"spring",stiffness:210,damping:28}},children:[T(e.items[n]?.playMedia?.url)&&a.jsx(S.button,{onClick:()=>{u(e.items[n].playMedia.url.trim()),l(!0)},className:"inline-flex items-center gap-2 px-6 py-3 bg-slate-800/80 hover:bg-slate-700/80 text-cyan-300 font-medium text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-cyan-500/25 border border-cyan-400/30 hover:border-cyan-400/60",whileHover:{scale:1.05},whileTap:{scale:.95},initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{delay:1.4+0*.1,duration:.4},children:a.jsx(F.Play,{className:"w-5 h-5"})},"play-icon"),(e.items[n]?.links?.length??0)>0&&e.items[n]?.links?.map(W=>a.jsx(Un,{item:W,onClick:()=>{O(W.url)?(u(W.url.trim()),l(!0)):ne(W.url)}})),(P?.length??0)>0&&a.jsx(S.button,{onClick:()=>y(!0),className:"inline-flex items-center gap-2 px-6 py-3 bg-slate-800/80 hover:bg-slate-700/80 text-cyan-300 font-medium text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-cyan-500/25 border border-cyan-400/30 hover:border-cyan-400/60",whileHover:{scale:1.05},whileTap:{scale:.95},initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{delay:1.6,duration:.4},children:a.jsx(F.Grid2x2,{className:"w-5 h-5"})},"cards-icon"),(e.items[n]?.ppts?.length??0)>0&&e.items[n].ppts.map((W,he)=>{const be=W.image.map(et=>et.url),ke={icon:W.icon??"Presentation",text:W.name,transparent:!1,url:""};return a.jsx(Un,{item:ke,onClick:()=>{N(be),x(!0)}},`ppt-${W.name}-${he}`)}),!1]},`buttons-${n}`)]}),a.jsx(Ce,{mode:"popLayout",initial:!1,children:k!==null&&typeof k=="number"&&a.jsx(S.div,{layout:"position",className:`w-full transition-[margin] duration-300 ${w?"mt-20 md:mt-24":"mt-16"}`,style:{perspective:"2000px"},initial:{opacity:0,y:16},animate:{opacity:1,y:0},exit:{opacity:0,y:-12},transition:{duration:.3,ease:[.22,1,.36,1],layout:{type:"spring",stiffness:200,damping:30}},children:a.jsx(pu,{tab:ue(k),tabIndex:k,expandedCardId:w,setExpandedCardId:j})},`tab-${k}-view`)})]})]})}),a.jsxs(S.button,{onClick:()=>{t(),s(0),r(0)},className:"fixed top-8 left-1/2 -translate-x-1/2 z-[110] px-6 py-3 bg-slate-800/90 hover:bg-slate-700/90 text-cyan-300 rounded-full transition-all duration-300 border-2 border-cyan-400/50 hover:border-cyan-400/80 shadow-lg hover:shadow-cyan-500/50 font-medium flex items-center gap-2",initial:{opacity:0,y:-50,scale:.8},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-50,scale:.8},transition:{delay:.3,duration:.4,ease:[.34,1.56,.64,1]},whileHover:{scale:1.05,boxShadow:"0 0 30px rgba(34, 211, 238, 0.6)"},whileTap:{scale:.95},children:[a.jsx(F.X,{className:"w-5 h-5"}),a.jsx("span",{children:"Cerrar"})]}),e.items.length>1&&a.jsx(S.div,{className:"fixed bottom-0 left-0 right-0 z-[110] py-8",initial:{y:200,opacity:0},animate:{y:0,opacity:1},exit:{y:200,opacity:0},transition:{delay:.5,duration:.6,ease:[.34,1.56,.64,1]},children:a.jsx("div",{className:`mx-auto px-6 ${J?"max-w-7xl":""}`,children:a.jsxs("div",{className:"flex items-center justify-center gap-6",children:[J&&a.jsx(S.button,{onClick:_,disabled:i===0,className:"p-3 bg-slate-800/80 hover:bg-slate-700/80 text-cyan-300 rounded-full transition-all duration-300 border-2 border-cyan-400/30 hover:border-cyan-400/60 shadow-lg hover:shadow-cyan-500/50 disabled:opacity-30 disabled:cursor-not-allowed",whileHover:{scale:1.1,x:-3},whileTap:{scale:.9},initial:{opacity:0,x:-50},animate:{opacity:1,x:0},transition:{delay:.7,duration:.4},children:a.jsx(F.ChevronLeft,{className:"w-6 h-6"})}),a.jsx("div",{className:`flex-1 overflow-hidden ${J?"max-w-7xl":""}`,children:a.jsx(S.div,{className:`flex gap-4 ${J?"":"justify-center"}`,animate:{x:`calc(-${i*(100/U)}% - ${i/U*16}px)`},transition:{type:"spring",stiffness:300,damping:30,mass:.8},children:e.items.map((W,he)=>{const be=n===he,ke=100/U;return a.jsxs(S.div,{onClick:()=>le(he),className:`relative flex-shrink-0 h-32 cursor-pointer rounded-xl overflow-hidden transition-all duration-300 ${be?"shadow-2xl shadow-cyan-500/50":"shadow-lg hover:shadow-cyan-400/30"}`,style:{width:`calc(${ke}% - 13.33px)`},whileHover:{scale:1.05,y:-5},whileTap:{scale:.98},initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{delay:.6+he*.03,duration:.3},children:[a.jsx("img",{src:W?.thumbMedia?.url||"/placeholder.svg",alt:W.title,className:"w-full h-full object-cover"}),a.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/90 via-black/30 via-30% to-transparent"}),a.jsx("div",{className:"absolute bottom-0 left-0 right-0 p-3",children:a.jsx("h3",{className:"text-white font-semibold text-sm text-center drop-shadow-lg",children:W.title})}),be&&a.jsx(S.div,{className:"absolute top-2 right-2 w-8 h-8 bg-cyan-400 rounded-full flex items-center justify-center shadow-lg",initial:{scale:0,rotate:-180},animate:{scale:1,rotate:0},transition:{type:"spring",stiffness:200,damping:15},children:a.jsx(F.Check,{className:"w-5 h-5 text-slate-900 stroke-[3]"})}),be&&a.jsx(S.div,{className:"absolute inset-0 border-4 border-cyan-400 rounded-xl pointer-events-none",animate:{opacity:[.5,0,.5],scale:[1,1.05,1]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}})]},W.title)})})}),J&&a.jsx(S.button,{onClick:M,disabled:i>=V,className:"p-3 bg-slate-800/80 hover:bg-slate-700/80 text-cyan-300 rounded-full transition-all duration-300 border-2 border-cyan-400/30 hover:border-cyan-400/60 shadow-lg hover:shadow-cyan-500/50 disabled:opacity-30 disabled:cursor-not-allowed",whileHover:{scale:1.1,x:3},whileTap:{scale:.9},initial:{opacity:0,x:50},animate:{opacity:1,x:0},transition:{delay:.7,duration:.4},children:a.jsx(F.ChevronRight,{className:"w-6 h-6"})})]})})})]}),o&&a.jsx(mu,{source:c,onClose:()=>l(!1)}),d&&a.jsx(Ht,{src:h,onClose:()=>{f(!1),m("")}}),p&&(P?.length??0)>0&&a.jsx(vc,{cards:P,onClose:()=>y(!1)}),v&&a.jsx(ib,{images:C,onClose:()=>x(!1)})]})}function ub({showLinkModal:e,setShowLinkModal:t,modalUrl:n}){const s=()=>{t(!1)};return a.jsx(Ce,{children:e&&a.jsx(Ht,{onClose:s,src:n})})}function db({isOpen:e,onClose:t,type:n,itemName:s}){if(!e)return null;const i=n==="inner"?"Esta propuesta de valor todavía no está asociada a una familia o producto tractor":"Este desarrollo tecnológico todavía no está asociado a una familia o producto tractor";return a.jsx("div",{className:"absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 z-50 w-full max-w-md overflow-y-auto rounded-xl",style:{background:"rgba(13, 25, 48, 0.9)",backdropFilter:"blur(10px)",border:"1px solid rgba(59, 130, 246, 0.3)",boxShadow:"0 0 30px rgba(0, 120, 255, 0.4)",animation:"fadeIn 0.3s ease-out",fontFamily:"'Manrope', sans-serif"},children:a.jsxs("div",{className:"p-6",children:[a.jsxs("div",{className:"flex justify-between items-center mb-6",children:[a.jsx("h2",{className:"text-2xl font-bold text-blue-100",children:s}),a.jsx("button",{onClick:t,className:"p-2 rounded-full bg-blue-900/50 text-blue-300 hover:bg-blue-800 hover:text-blue-100 transition-all",children:a.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),a.jsx("div",{className:"grid grid-cols-1 gap-6",children:a.jsx("div",{children:a.jsx("div",{className:"p-4 rounded-lg",style:{background:"rgba(30, 64, 175, 0.3)",border:"1px solid rgba(59, 130, 246, 0.3)",boxShadow:"0 0 15px rgba(0, 120, 255, 0.2)"},children:a.jsxs("div",{className:"flex items-center mb-4",children:[a.jsx("div",{className:"w-16 h-16 rounded-full mr-4 flex items-center justify-center",style:{background:"rgba(30, 64, 175, 0.4)",border:"2px solid rgba(59, 130, 246, 0.5)",boxShadow:"0 0 15px rgba(0, 120, 255, 0.3)"},children:a.jsx("span",{className:"text-xl font-bold text-blue-100",children:n==="inner"?"PV":"DT"})}),a.jsx("div",{className:"text-yellow-300 italic",children:i})]})})})})]})})}const fb=`
18
+ `,whileHover:t?{}:{scale:1.015,y:-3},transition:ob,children:[a.jsxs("div",{className:"flex items-center justify-center mb-5 relative",children:[e.tagUrl?a.jsx("a",{href:e.tagUrl,target:"_blank",rel:"noopener noreferrer",className:`px-3 py-1 text-xs font-semibold rounded-full border hover:scale-105 transition-transform ${e.tagColor||"bg-cyan-500/20 text-cyan-300 border-cyan-400/30"}`,onClick:E=>E.stopPropagation(),children:e.tag}):a.jsx("span",{className:`px-3 py-1 text-xs font-semibold rounded-full border ${e.tagColor||"bg-cyan-500/20 text-cyan-300 border-cyan-400/30"}`,children:e.tag}),t&&a.jsx(S.button,{initial:{scale:0},animate:{scale:1},className:"absolute right-0 p-1 rounded-full bg-slate-800/80 hover:bg-slate-700/80 border border-cyan-400/30 hover:border-cyan-400/60 transition-colors",onClick:E=>{E.stopPropagation(),r()},children:a.jsx(F.X,{className:"w-4 h-4 text-cyan-300"})})]}),a.jsx("h3",{className:`text-2xl font-bold mb-3 transition-colors duration-300 ${t?"text-cyan-300":"text-white"}`,children:a.jsxs("span",{className:"relative inline-block",children:[e.title,a.jsx(S.span,{className:"absolute bottom-0 left-0 h-0.5 bg-linear-to-r from-cyan-400 to-teal-400",initial:{width:0},animate:{width:t?"100%":0},transition:{duration:.5,ease:[.22,1,.36,1],delay:t?.2:0}})]})}),a.jsx(S.p,{className:`text-base text-slate-300 leading-relaxed ${t?"shrink-0":"grow"}`,animate:{opacity:t?.9:1,marginBottom:t?"1.5rem":"1rem"},children:e.description}),a.jsx(Ce,{mode:"wait",children:t&&a.jsxs(S.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0,y:8},transition:{duration:.25,ease:[.4,0,.2,1]},className:"flex-1 min-h-0 overflow-y-auto overflow-x-hidden pr-1",children:[e.images&&e.images.length>0&&a.jsx(S.div,{className:"mt-6 pt-6 border-t border-cyan-400/30",initial:{opacity:0},animate:{opacity:1},transition:{delay:.1,duration:.3},children:e.images.length>6?a.jsxs("div",{className:"relative",children:[h&&a.jsx("button",{onClick:E=>{E.stopPropagation(),A("left")},className:"absolute left-0 top-1/2 -translate-y-1/2 z-10 w-12 h-12 bg-slate-900/80 hover:bg-slate-900/95 backdrop-blur-sm border border-cyan-400/30 hover:border-cyan-400/60 rounded-full flex items-center justify-center text-cyan-400 hover:text-cyan-300 transition-all shadow-lg","aria-label":"Anterior",children:a.jsx(F.ChevronLeft,{className:"w-6 h-6"})}),a.jsx("div",{ref:f,className:"flex gap-4 overflow-x-auto scrollbar-hide",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:e.images.map((E,w)=>a.jsxs(S.div,{className:"relative aspect-video rounded-lg overflow-hidden border border-cyan-400/20 hover:border-cyan-400/40 transition-colors cursor-pointer group/image shrink-0 w-64",initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{delay:.15+Math.min(w,6)*.05,duration:.3},onClick:j=>{j.stopPropagation(),v(w)},whileHover:{scale:1.05},children:[a.jsx("img",{src:E.url||E,alt:E.alt||`Imagen ${w+1}`,className:"w-full h-full object-cover"}),a.jsx("div",{className:"absolute inset-0 bg-black/0 group-hover/image:bg-black/20 transition-colors flex items-center justify-center",children:a.jsx("span",{className:"opacity-0 group-hover/image:opacity-100 text-white text-sm font-medium transition-opacity",children:"Ver imagen"})})]},`${e.id}-img-${E.url||w}`))}),p&&a.jsx("button",{onClick:E=>{E.stopPropagation(),A("right")},className:"absolute right-0 top-1/2 -translate-y-1/2 z-10 w-12 h-12 bg-slate-900/80 hover:bg-slate-900/95 backdrop-blur-sm border border-cyan-400/30 hover:border-cyan-400/60 rounded-full flex items-center justify-center text-cyan-400 hover:text-cyan-300 transition-all shadow-lg","aria-label":"Siguiente",children:a.jsx(F.ChevronRight,{className:"w-6 h-6"})})]}):a.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:e.images.map((E,w)=>a.jsxs(S.div,{className:"relative aspect-video rounded-lg overflow-hidden border border-cyan-400/20 hover:border-cyan-400/40 transition-colors cursor-pointer group/image",initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{delay:.15+w*.05,duration:.3},onClick:j=>{j.stopPropagation(),v(w)},whileHover:{scale:1.05},children:[a.jsx("img",{src:E.url||E,alt:E.alt||`Imagen ${w+1}`,className:"w-full h-full object-cover"}),a.jsx("div",{className:"absolute inset-0 bg-black/0 group-hover/image:bg-black/20 transition-colors flex items-center justify-center",children:a.jsx("span",{className:"opacity-0 group-hover/image:opacity-100 text-white text-sm font-medium transition-opacity",children:"Ver imagen"})})]},`${e.id}-img-${E.url||w}`))})}),e.keyPoints&&e.keyPoints.length>0&&a.jsxs(S.div,{className:"mt-6 pt-6 border-t border-cyan-400/30",initial:{opacity:0},animate:{opacity:1},transition:{delay:.15,duration:.3},children:[a.jsxs("h4",{className:"text-lg font-bold text-cyan-300 mb-4 flex items-center gap-2",children:[a.jsx(F.Check,{className:"w-5 h-5"}),"Puntos Clave"]}),a.jsx("ul",{className:"space-y-3",children:e.keyPoints.map((E,w)=>a.jsxs(S.li,{className:"flex items-start gap-3 text-slate-200",initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:.2+w*.05,duration:.25},children:[a.jsx("span",{className:"mt-1.5 w-2 h-2 rounded-full bg-cyan-400 shrink-0"}),a.jsx("span",{children:E})]},`${e.id}-kp-${w}-${E.slice(0,20)}`))})]}),o&&a.jsx(S.div,{className:"mt-6 pt-6 border-t border-cyan-400/30",initial:{opacity:0},animate:{opacity:1},transition:{delay:.15,duration:.3},children:o})]})})]})}),typeof document<"u"&&vo.createPortal(a.jsx(Ce,{children:u!==null&&e.images&&a.jsxs(S.div,{className:"absolute inset-0 z-12000 flex items-center justify-center bg-black",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:x,children:[a.jsx(S.button,{className:"absolute top-4 right-4 p-2 rounded-full bg-slate-800/80 hover:bg-slate-700/80 border border-cyan-400/30 hover:border-cyan-400/60 transition-colors z-10",onClick:E=>{E.stopPropagation(),x()},initial:{scale:0},animate:{scale:1},transition:{delay:.2},children:a.jsx(F.X,{className:"w-6 h-6 text-cyan-300"})}),e.images.length>1&&a.jsxs(a.Fragment,{children:[a.jsx(S.button,{className:"absolute left-4 p-3 rounded-full bg-slate-800/80 hover:bg-slate-700/80 border border-cyan-400/30 hover:border-cyan-400/60 transition-colors z-10",onClick:E=>{E.stopPropagation(),C()},initial:{x:-20,opacity:0},animate:{x:0,opacity:1},transition:{delay:.3},children:a.jsx(F.ChevronLeft,{className:"w-6 h-6 text-cyan-300"})}),a.jsx(S.button,{className:"absolute right-4 p-3 rounded-full bg-slate-800/80 hover:bg-slate-700/80 border border-cyan-400/30 hover:border-cyan-400/60 transition-colors z-10",onClick:E=>{E.stopPropagation(),N()},initial:{x:20,opacity:0},animate:{x:0,opacity:1},transition:{delay:.3},children:a.jsx(F.ChevronRight,{className:"w-6 h-6 text-cyan-300"})})]}),a.jsxs(S.div,{className:"relative w-screen h-screen p-6 md:p-10",initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},transition:{type:"spring",stiffness:300,damping:30},onClick:E=>E.stopPropagation(),children:[a.jsx("div",{className:"w-full h-full overflow-hidden flex items-center justify-center",children:a.jsx("img",{src:e.images[u].url||e.images[u],alt:e.images[u].alt||`Imagen ${u+1}`,className:"w-full h-full object-contain"})}),e.images[u].alt&&a.jsx(S.div,{className:"absolute bottom-0 left-0 right-0 bg-linear-to-t from-black/80 to-transparent p-6 rounded-b-lg",initial:{y:20,opacity:0},animate:{y:0,opacity:1},transition:{delay:.4},children:a.jsx("p",{className:"text-white text-center text-lg font-medium",children:e.images[u].alt})}),e.images.length>1&&a.jsx(S.div,{className:"absolute top-4 left-1/2 -translate-x-1/2 px-4 py-2 bg-slate-800/80 rounded-full border border-cyan-400/30",initial:{y:-20,opacity:0},animate:{y:0,opacity:1},transition:{delay:.4},children:a.jsxs("span",{className:"text-cyan-300 text-sm font-medium",children:[u+1," / ",e.images.length]})})]})]})}),document.body)]})}function ab(e){return e&&rs[e]||F.Layers}function lb(e,t,n,s){return{id:`tab-${n}-card-${s}`,title:e.title,description:e.subtitle,icon:ab(t),tag:e.tagName||"Info",tagColor:e.tagName?"bg-cyan-500/20 text-cyan-300 border-cyan-400/30":void 0,tagUrl:e.tagUrl,keyPoints:e.features.map(i=>i.text??i.description??"").filter(Boolean),images:e?.images?.map(i=>i.url),width:e.width}}function cb(e){return e.some(n=>n.width==="third")?"grid-cols-1 md:grid-cols-3":"grid-cols-1 md:grid-cols-2"}function pu({tab:e,tabIndex:t=0,expandedCardId:n,setExpandedCardId:s}){const i=u=>{s(n===u?null:u)},r=()=>{s(null)};if(!e?.cards||e.cards.length===0)return a.jsx(S.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"flex items-center justify-center py-20",children:a.jsx("div",{className:"text-slate-400 text-lg",children:"No hay contenido disponible para esta vista"})});const o=e.cards.map((u,d)=>lb(u,e.icon,t,d)),l=n?o.find(u=>u.id===n):void 0,c=`grid ${cb(e.cards)} gap-4 items-start`;return a.jsx(S.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.4,ease:[.4,0,.2,1]},className:"space-y-6",children:a.jsx(Ce,{mode:"wait",initial:!1,children:l?a.jsx(S.div,{initial:{opacity:0,y:14,scale:.995},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-10,scale:.995,transition:{duration:.16,ease:[.4,0,1,1]}},transition:{duration:.34,ease:[.22,1,.36,1]},children:a.jsx(ao,{card:l,delay:0,isExpanded:!0,isOtherExpanded:!1,collapsedUniformHeight:!1,onToggle:()=>i(l.id),onClose:r,gridSpan:!0},l.id)},`expanded-${l.id}`):a.jsx(S.div,{className:c,initial:{opacity:0,y:10,scale:.998},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-8,scale:.998,transition:{duration:.14,ease:[.4,0,1,1]}},transition:{duration:.26,ease:[.22,1,.36,1]},children:o.map((u,d)=>a.jsx(ao,{card:u,delay:d,isExpanded:!1,isOtherExpanded:!1,collapsedUniformHeight:!0,onToggle:()=>i(u.id),onClose:r,gridSpan:!0},u.id))},"collapsed-grid")})})}function gu({item:e,onClose:t}){const[n,s]=b.useState(0),[i,r]=b.useState(0),[o,l]=b.useState(!1),[c,u]=b.useState(""),[d,f]=b.useState(!1),[h,m]=b.useState(""),[p,y]=b.useState(!1),[v,x]=b.useState(!1),[C,N]=b.useState(),[I,A]=b.useState(.3),[k,E]=b.useState(null),[w,j]=b.useState(null),$=b.useRef(null),[z,Q]=b.useState(!1),[R,se]=b.useState(!1),U=xe().pagination?.simulation??6,J=U<e?.items.length,V=Math.max(0,e?.items.length-U),P=e?.items[n]?.cards??[],{t:_}=ot.useTranslation();b.useEffect(()=>{const W=document.body.style.overflow,he=document.documentElement.style.overflow;return document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",()=>{document.body.style.overflow=W,document.documentElement.style.overflow=he}},[]);const M=()=>{i>0&&r(W=>Math.max(0,W-U))},T=()=>{i<V&&r(W=>Math.min(V,W+U))},O=W=>!!W?.trim(),ne=W=>W?.endsWith(".webm")||W?.endsWith(".mp4"),ae=W=>{O(W)&&(m(W.trim()),f(!0))},ie=()=>{const W=$.current;if(!W)return;const{scrollLeft:he,scrollWidth:pe,clientWidth:Ve}=W;Q(he>0),se(he<pe-Ve-10)},le=W=>{const he=$.current;if(!he)return;const pe=300;he.scrollBy({left:W==="left"?-pe:pe,behavior:"smooth"})},re=e?.items[n]?.tab||[];b.useEffect(()=>{ie();const W=$.current;if(W)return W.addEventListener("scroll",ie),window.addEventListener("resize",ie),()=>{W.removeEventListener("scroll",ie),window.removeEventListener("resize",ie)}},[re]);const ge=W=>{s(W),E(null),j(null),y(!1),A(.3)};b.useEffect(()=>{const W=he=>{if(o||d||p||v)return;const pe=e.items.length;pe<=1||(he.key==="ArrowRight"?(he.preventDefault(),ge((n+1)%pe)):he.key==="ArrowLeft"&&(he.preventDefault(),ge((n-1+pe)%pe)))};return window.addEventListener("keydown",W),()=>window.removeEventListener("keydown",W)},[n,o,d,p,v,e.items.length]),b.useEffect(()=>{const W=globalThis.setTimeout(()=>{A(.9)},1e4);return()=>globalThis.clearTimeout(W)},[n]);const ue=W=>W&&rs[W]||F.Layers,$e=W=>{if(!(W<0||W>=re.length))return re[W]},je=k!=null;return a.jsxs(a.Fragment,{children:[a.jsxs(S.div,{className:"fixed inset-0 z-[10000] bg-black simulation-mode",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.5},children:[e.items[n].videoBackgroundMedia&&a.jsx(S.video,{autoPlay:!0,loop:!0,muted:!0,playsInline:!0,className:"fixed inset-0 w-full h-full object-cover z-[101]",initial:{opacity:0,scale:1.1},animate:{opacity:1,scale:1},transition:{duration:.8},poster:e.items[n].backgroundMedia?.url??"",children:a.jsx("source",{src:e.items[n].videoBackgroundMedia.url,type:"video/webm"})},e.items[n].videoBackgroundMedia.documentId),a.jsx(S.div,{className:"fixed inset-0 bg-black z-[102]",initial:{opacity:0},animate:{opacity:I},transition:{duration:.5,ease:"easeInOut"}}),a.jsx("div",{className:"relative z-[105] h-full overflow-y-auto overflow-x-hidden scrollbar-hide overscroll-contain",children:a.jsxs("div",{className:"min-h-screen flex flex-col items-center justify-center px-8 pb-64",children:[a.jsxs("div",{className:"relative w-full flex justify-center mb-8 mt-24 md:mt-28",children:[z&&a.jsx(S.button,{onClick:W=>{W.stopPropagation(),le("left")},className:"absolute left-4 top-1/2 -translate-y-1/2 z-20 w-10 h-10 bg-slate-900/80 hover:bg-slate-900/95 backdrop-blur-sm border border-cyan-400/30 hover:border-cyan-400/60 rounded-full flex items-center justify-center text-cyan-400 hover:text-cyan-300 transition-all shadow-lg",initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},whileHover:{scale:1.1},whileTap:{scale:.9},children:a.jsx(F.ChevronLeft,{className:"w-5 h-5"})}),a.jsxs(S.div,{ref:$,className:"flex items-center justify-center gap-3 overflow-x-auto scrollbar-hide max-w-full px-2 py-2",initial:{opacity:0,y:-30,scale:.9},animate:{opacity:1,y:0,scale:1},transition:{delay:.3,duration:.7,ease:[.22,1,.36,1]},children:[a.jsx("div",{className:"w-11 h-11 shrink-0","aria-hidden":"true"}),re.map((W,he)=>{const pe=ue(W.icon),Ve=k===he;return a.jsxs(S.button,{onClick:()=>{E(he),j(null)},className:`relative px-6 py-3 rounded-full font-medium text-sm transition-all duration-300 flex items-center gap-2 shrink-0 ${Ve?"bg-gradient-to-r from-cyan-500 to-blue-600 text-white border border-cyan-400":"bg-slate-800/60 text-cyan-400 border border-slate-600/50 hover:text-white hover:border-cyan-400/60"}`,whileHover:{scale:1.05},whileTap:{scale:.95},children:[a.jsx(pe,{className:"w-4 h-4"}),W.name,Ve&&a.jsx(S.div,{layoutId:"activeTab",className:"absolute inset-0 bg-cyan-400/20 rounded-full -z-10",transition:{type:"spring",stiffness:300,damping:30}})]},`${W.name}-${he}`)}),a.jsx("div",{className:"w-11 h-11 shrink-0 flex items-center justify-center",children:a.jsx(S.button,{onClick:()=>{k!==null&&(E(null),j(null))},className:"relative p-3 rounded-full bg-slate-800/60 hover:bg-slate-700/80 text-cyan-300 hover:text-cyan-200 border border-slate-600/50 hover:border-cyan-400/60 transition-all duration-300 shadow-lg hover:shadow-cyan-500/30 disabled:pointer-events-none",initial:!1,animate:{opacity:je?1:0,scale:je?1:.75,x:je?0:-6},transition:{type:"spring",stiffness:300,damping:25},whileHover:je?{scale:1.1,rotate:90}:{},whileTap:je?{scale:.9}:{},disabled:!je,"aria-hidden":!je,tabIndex:je?0:-1,children:a.jsx(F.X,{className:"w-5 h-5"})})})]}),R&&a.jsx(S.button,{onClick:W=>{W.stopPropagation(),le("right")},className:"absolute right-4 top-1/2 -translate-y-1/2 z-20 w-10 h-10 bg-slate-900/80 hover:bg-slate-900/95 backdrop-blur-sm border border-cyan-400/30 hover:border-cyan-400/60 rounded-full flex items-center justify-center text-cyan-400 hover:text-cyan-300 transition-all shadow-lg",initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},whileHover:{scale:1.1},whileTap:{scale:.9},children:a.jsx(F.ChevronRight,{className:"w-5 h-5"})})]}),a.jsxs(S.div,{layout:!0,className:"text-center max-w-6xl w-full",initial:{opacity:0},animate:{opacity:1},transition:{duration:.6,ease:[.22,1,.36,1]},style:{willChange:"transform, opacity",backfaceVisibility:"hidden",WebkitFontSmoothing:"antialiased",transform:"translateZ(0)"},children:[a.jsxs(S.div,{layout:"position",initial:{opacity:0,y:40},animate:{opacity:1,y:0},transition:{delay:.6,duration:1,ease:[.22,1,.36,1]},style:{backfaceVisibility:"hidden",WebkitFontSmoothing:"antialiased"},children:[a.jsx(S.h1,{className:"text-6xl sm:text-7xl md:text-8xl font-bold mb-6 leading-tight uppercase font-tomorrow text-cyan-300 line-clamp-2",style:{letterSpacing:"3px",backfaceVisibility:"hidden",WebkitFontSmoothing:"antialiased",transform:"translateZ(0)"},initial:{opacity:0,y:30,scale:.95},animate:{opacity:1,y:0,scale:1},transition:{delay:.8,duration:.6,ease:[.22,1,.36,1]},children:e.items[n].title},e.items[n].title),a.jsx(Ce,{mode:"popLayout",initial:!1,children:k===null&&a.jsx(S.p,{layout:"position",className:"text-sm sm:text-base text-white/90 uppercase tracking-tighter font-medium md:text-base text-center px-[100px] mt-[-5px] shadow-none",style:{textShadow:"0 2px 10px rgba(0, 0, 0, 0.8)",fontFamily:"system-ui, -apple-system, sans-serif",letterSpacing:"0.2em",backfaceVisibility:"hidden",WebkitFontSmoothing:"antialiased",transform:"translateZ(0)"},initial:{opacity:0,y:12,filter:"blur(4px)"},animate:{opacity:1,y:0,filter:"blur(0px)"},exit:{opacity:0,y:-8,filter:"blur(3px)"},transition:{duration:.28,ease:[.22,1,.36,1]},children:e.items[n].subtitle},`subtitle-${n}`)}),a.jsxs(S.div,{layout:"position",className:"flex items-center justify-center gap-4 mt-8",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:1.3,duration:.6,ease:[.22,1,.36,1],layout:{type:"spring",stiffness:210,damping:28}},children:[O(e.items[n]?.playMedia?.url)&&a.jsx(S.button,{onClick:()=>{u(e.items[n].playMedia.url.trim()),l(!0)},className:"inline-flex items-center gap-2 px-6 py-3 bg-slate-800/80 hover:bg-slate-700/80 text-cyan-300 font-medium text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-cyan-500/25 border border-cyan-400/30 hover:border-cyan-400/60",whileHover:{scale:1.05},whileTap:{scale:.95},initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{delay:1.4+0*.1,duration:.4},children:a.jsx(F.Play,{className:"w-5 h-5"})},"play-icon"),(e.items[n]?.links?.length??0)>0&&e.items[n]?.links?.map(W=>a.jsx(Un,{item:W,onClick:()=>{ne(W.url)?(u(W.url.trim()),l(!0)):ae(W.url)}})),(P?.length??0)>0&&a.jsx(S.button,{onClick:()=>y(!0),className:"inline-flex items-center gap-2 px-6 py-3 bg-slate-800/80 hover:bg-slate-700/80 text-cyan-300 font-medium text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-cyan-500/25 border border-cyan-400/30 hover:border-cyan-400/60",whileHover:{scale:1.05},whileTap:{scale:.95},initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{delay:1.6,duration:.4},children:a.jsx(F.Grid2x2,{className:"w-5 h-5"})},"cards-icon"),(e.items[n]?.ppts?.length??0)>0&&e.items[n].ppts.map((W,he)=>{const pe=W.image.map(Pt=>Pt.url),Ve={icon:W.icon??"Presentation",text:W.name,transparent:!1,url:""};return a.jsx(Un,{item:Ve,onClick:()=>{N(pe),x(!0)}},`ppt-${W.name}-${he}`)}),!1]},`buttons-${n}`)]}),a.jsx(Ce,{mode:"popLayout",initial:!1,children:k!==null&&typeof k=="number"&&a.jsx(S.div,{layout:"position",className:`w-full transition-[margin] duration-300 ${w?"mt-20 md:mt-24":"mt-16"}`,style:{perspective:"2000px"},initial:{opacity:0,y:16},animate:{opacity:1,y:0},exit:{opacity:0,y:-12},transition:{duration:.3,ease:[.22,1,.36,1],layout:{type:"spring",stiffness:200,damping:30}},children:a.jsx(pu,{tab:$e(k),tabIndex:k,expandedCardId:w,setExpandedCardId:j})},`tab-${k}-view`)})]})]})}),a.jsxs(S.button,{onClick:()=>{t(),s(0),r(0)},className:"fixed top-8 left-1/2 -translate-x-1/2 z-[110] px-6 py-3 bg-slate-800/90 hover:bg-slate-700/90 text-cyan-300 rounded-full transition-all duration-300 border-2 border-cyan-400/50 hover:border-cyan-400/80 shadow-lg hover:shadow-cyan-500/50 font-medium flex items-center gap-2",initial:{opacity:0,y:-50,scale:.8},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-50,scale:.8},transition:{delay:.3,duration:.4,ease:[.34,1.56,.64,1]},whileHover:{scale:1.05,boxShadow:"0 0 30px rgba(34, 211, 238, 0.6)"},whileTap:{scale:.95},children:[a.jsx(F.X,{className:"w-5 h-5"}),a.jsx("span",{children:_("layout.cerrar")})]}),e.items.length>1&&a.jsx(S.div,{className:"fixed bottom-0 left-0 right-0 z-[110] py-8",initial:{y:200,opacity:0},animate:{y:0,opacity:1},exit:{y:200,opacity:0},transition:{delay:.5,duration:.6,ease:[.34,1.56,.64,1]},children:a.jsx("div",{className:`mx-auto px-6 ${J?"max-w-7xl":""}`,children:a.jsxs("div",{className:"flex items-center justify-center gap-6",children:[J&&a.jsx(S.button,{onClick:M,disabled:i===0,className:"p-3 bg-slate-800/80 hover:bg-slate-700/80 text-cyan-300 rounded-full transition-all duration-300 border-2 border-cyan-400/30 hover:border-cyan-400/60 shadow-lg hover:shadow-cyan-500/50 disabled:opacity-30 disabled:cursor-not-allowed",whileHover:{scale:1.1,x:-3},whileTap:{scale:.9},initial:{opacity:0,x:-50},animate:{opacity:1,x:0},transition:{delay:.7,duration:.4},children:a.jsx(F.ChevronLeft,{className:"w-6 h-6"})}),a.jsx("div",{className:`flex-1 overflow-hidden ${J?"max-w-7xl":""}`,children:a.jsx(S.div,{className:`flex gap-4 ${J?"":"justify-center"}`,animate:{x:`calc(-${i*(100/U)}% - ${i/U*16}px)`},transition:{type:"spring",stiffness:300,damping:30,mass:.8},children:e.items.map((W,he)=>{const pe=n===he,Ve=100/U;return a.jsxs(S.div,{onClick:()=>ge(he),className:`relative flex-shrink-0 h-32 cursor-pointer rounded-xl overflow-hidden transition-all duration-300 ${pe?"shadow-2xl shadow-cyan-500/50":"shadow-lg hover:shadow-cyan-400/30"}`,style:{width:`calc(${Ve}% - 13.33px)`},whileHover:{scale:1.05,y:-5},whileTap:{scale:.98},initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{delay:.6+he*.03,duration:.3},children:[a.jsx("img",{src:W?.thumbMedia?.url||"/placeholder.svg",alt:W.title,className:"w-full h-full object-cover"}),a.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/90 via-black/30 via-30% to-transparent"}),a.jsx("div",{className:"absolute bottom-0 left-0 right-0 p-3",children:a.jsx("h3",{className:"text-white font-semibold text-sm text-center drop-shadow-lg",children:W.title})}),pe&&a.jsx(S.div,{className:"absolute top-2 right-2 w-8 h-8 bg-cyan-400 rounded-full flex items-center justify-center shadow-lg",initial:{scale:0,rotate:-180},animate:{scale:1,rotate:0},transition:{type:"spring",stiffness:200,damping:15},children:a.jsx(F.Check,{className:"w-5 h-5 text-slate-900 stroke-[3]"})}),pe&&a.jsx(S.div,{className:"absolute inset-0 border-4 border-cyan-400 rounded-xl pointer-events-none",animate:{opacity:[.5,0,.5],scale:[1,1.05,1]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}})]},W.title)})})}),J&&a.jsx(S.button,{onClick:T,disabled:i>=V,className:"p-3 bg-slate-800/80 hover:bg-slate-700/80 text-cyan-300 rounded-full transition-all duration-300 border-2 border-cyan-400/30 hover:border-cyan-400/60 shadow-lg hover:shadow-cyan-500/50 disabled:opacity-30 disabled:cursor-not-allowed",whileHover:{scale:1.1,x:3},whileTap:{scale:.9},initial:{opacity:0,x:50},animate:{opacity:1,x:0},transition:{delay:.7,duration:.4},children:a.jsx(F.ChevronRight,{className:"w-6 h-6"})})]})})})]}),o&&a.jsx(mu,{source:c,onClose:()=>l(!1)}),d&&a.jsx(Xt,{src:h,onClose:()=>{f(!1),m("")}}),p&&(P?.length??0)>0&&a.jsx(vc,{cards:P,onClose:()=>y(!1)}),v&&a.jsx(ib,{images:C,onClose:()=>x(!1)})]})}function ub({showLinkModal:e,setShowLinkModal:t,modalUrl:n}){const s=()=>{t(!1)};return a.jsx(Ce,{children:e&&a.jsx(Xt,{onClose:s,src:n})})}function db({isOpen:e,onClose:t,type:n,itemName:s}){if(!e)return null;const i=n==="inner"?"Esta propuesta de valor todavía no está asociada a una familia o producto tractor":"Este desarrollo tecnológico todavía no está asociado a una familia o producto tractor";return a.jsx("div",{className:"absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 z-50 w-full max-w-md overflow-y-auto rounded-xl",style:{background:"rgba(13, 25, 48, 0.9)",backdropFilter:"blur(10px)",border:"1px solid rgba(59, 130, 246, 0.3)",boxShadow:"0 0 30px rgba(0, 120, 255, 0.4)",animation:"fadeIn 0.3s ease-out",fontFamily:"'Manrope', sans-serif"},children:a.jsxs("div",{className:"p-6",children:[a.jsxs("div",{className:"flex justify-between items-center mb-6",children:[a.jsx("h2",{className:"text-2xl font-bold text-blue-100",children:s}),a.jsx("button",{onClick:t,className:"p-2 rounded-full bg-blue-900/50 text-blue-300 hover:bg-blue-800 hover:text-blue-100 transition-all",children:a.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),a.jsx("div",{className:"grid grid-cols-1 gap-6",children:a.jsx("div",{children:a.jsx("div",{className:"p-4 rounded-lg",style:{background:"rgba(30, 64, 175, 0.3)",border:"1px solid rgba(59, 130, 246, 0.3)",boxShadow:"0 0 15px rgba(0, 120, 255, 0.2)"},children:a.jsxs("div",{className:"flex items-center mb-4",children:[a.jsx("div",{className:"w-16 h-16 rounded-full mr-4 flex items-center justify-center",style:{background:"rgba(30, 64, 175, 0.4)",border:"2px solid rgba(59, 130, 246, 0.5)",boxShadow:"0 0 15px rgba(0, 120, 255, 0.3)"},children:a.jsx("span",{className:"text-xl font-bold text-blue-100",children:n==="inner"?"PV":"DT"})}),a.jsx("div",{className:"text-yellow-300 italic",children:i})]})})})})]})})}const fb=`
19
19
 
20
20
  * {
21
21
  font-family: 'Manrope', sans-serif;
@@ -396,7 +396,7 @@ React keys must be passed directly to JSX without using spread:
396
396
  .nav-button:active {
397
397
  transform: translateY(1px);
398
398
  }
399
- `;function hb({hotspot:e}){const[t,n]=b.useState(null),[,s]=b.useState([]),[i,r]=b.useState(null),[o,l]=b.useState(null),[,c]=b.useState(new Set),u=xe().remoteUrl,d=xe().hotspots.dataEs,f=xe().hotspots.dataEn,[h,m]=b.useState(!1),[p]=b.useState("inner"),[y]=b.useState(""),{i18n:v}=jt.useTranslation();b.useEffect(()=>{let L;if(v.language==="en"?L=f??{globalTags:[],innerRingNodes:[],outerRingNodes:[],products:[],relationships:{}}:L=d??{globalTags:[],innerRingNodes:[],outerRingNodes:[],products:[],relationships:{}},n(L),L.outerRingNodes){const X=L.outerRingNodes.map(Y=>({id:Y.id,title:Y.label,description:"",icon:Y.icon})).sort((Y,D)=>Y.title.localeCompare(D.title));s(X)}},[]),b.useEffect(()=>O(e),[e]);const[x,C]=b.useState([]),[N,I]=b.useState(0),[A,k]=b.useState(!1),[E,w]=b.useState(""),[j,$]=b.useState(0),[z,Q]=b.useState(0),[R,se]=b.useState(0),U=b.useRef(null),J=b.useRef(null),V={1:"fragata",2:"submarino",3:"buque-accion-maritima",4:"buque-apoyo",5:"corbeta",6:"usv-v",7:"usv-7",8:"buque-portaeronaves",9:"buque-anfibio",10:"pdco",11:"pdmd",12:"lcm"},P=L=>{if(!t)return[];const X=t.expandableNodes?.find(ee=>ee.parentId===L);if(X)return X.childNodes;const Y=t.relationships.outerRing_to_expandableNodes?.find(ee=>ee.outerRingId===L);if(Y)return t.expandableNodes?.flatMap(ee=>ee.childNodes.filter(B=>Y.expandableNodeIds.includes(B.id)))||[];const D=t.relationships.innerRing_to_expandableNodes?.find(ee=>ee.innerRingId===L);return D?t.expandableNodes?.flatMap(ee=>ee.childNodes.filter(B=>D.expandableNodeIds.includes(B.id)))||[]:[]};b.useEffect(()=>{U.current&&J.current&&(Q(U.current.clientWidth),se(J.current.scrollWidth))},[t?.globalTags,x]);const _=()=>{$(L=>Math.max(L-200,0))},M=()=>{const L=Math.max(0,R-z+140);$(X=>Math.min(X+300,L))},T=L=>{const X=P(L);X.length>0&&C(Y=>Y.map(D=>{const ee=L===39||L===40||pe(L,D.productId),B=D.activeElement;let te=!1;if(B.type==="outer"){const de=B.id;te=t?.relationships.outerRing_to_expandableNodes?.find(oe=>oe.outerRingId===de)?.expandableNodeIds.includes(L)||!1}if(B.type==="inner"){const de=B.id;te=t?.relationships.innerRing_to_expandableNodes?.find(oe=>oe.innerRingId===de)?.expandableNodeIds.includes(L)||!1}return ee||te?D.expandedNodes&&D.expandedNodes.length>0&&D.expandedNodes?.some(oe=>oe.parentId===L)?{...D,showThirdRing:!1,expandedNodes:[]}:{...D,showThirdRing:!0,expandedNodes:[{parentId:L,childNodes:X}]}:D}))},O=L=>{if(console.log("handleHotspotClick ",L),L===12||L===13)return;if(L===10){w(u+"/es/producto/plataforma-digital/?lightbox=1"),k(!0);return}else if(L===11){w(u+"/es/producto/plataforma-digital-en-tierra/?lightbox=1"),k(!0);return}const X=V[L];if(!X)return;const Y=x.some(D=>D.hotspotId===L);r(null),l(null),c(new Set),m(!1),et({x:0,y:0}),Y?C(D=>D.map(ee=>ee.hotspotId===L?{...ee,activeElement:{type:"product",id:X},showCentralNode:!0,showInnerRing:!0,showOuterRing:!0,showThirdRing:!1,expandedNodes:[]}:ee)):(C([]),setTimeout(()=>{C([{hotspotId:L,productId:X,centralPosition:{x:50,y:50},activeElement:{type:"product",id:X},showCentralNode:!0,showInnerRing:!0,showOuterRing:!1,showThirdRing:!1,hotspotImage:"",expandedNodes:[],...L===8?{secondaryImage:"",secondaryLabel:""}:{}}]),setTimeout(()=>{C(ee=>ee.map(B=>B.hotspotId===L?{...B,showOuterRing:!0}:B))},300)},100))},ne=(L,X)=>{r(null),l(null),c(new Set),C(Y=>Y.map(D=>{if(D.hotspotId===L){const ee=X.type!=="third"&&X.type!=="outer";return{...D,activeElement:X,showCentralNode:X.type==="product",showThirdRing:ee?!1:D.showThirdRing,expandedNodes:ee?[]:D.expandedNodes}}return D})),I(X.id)},ie=L=>{const X=new Set,Y=new Set,D=new Set,ee=new Set;if(!t)return{relatedProducts:X,relatedInner:Y,relatedOuter:D,relatedExpandable:ee};const{activeElement:B}=L;if(B.type==="product"){const te=t.products.find(de=>de.id===B.id);te&&(te.innerRingIds.forEach(de=>Y.add(de)),te.outerRingIds.forEach(de=>D.add(de)),te.expandableNodeIds&&te.expandableNodeIds.forEach(de=>{ee.add(de)}),X.add(te.id))}else if(B.type==="inner"){Y.add(B.id);const te=t.relationships.innerRing_to_innerRing?.find(oe=>oe.innerRingId===B.id);te&&te.innerRingIds.forEach(oe=>Y.add(oe));const de=t.relationships.innerRing_to_outerRing?.find(oe=>oe.innerRingId===B.id);de&&de.outerRingIds.forEach(oe=>D.add(oe));const Ae=t.relationships.innerRing_to_expandableNodes?.find(oe=>oe.innerRingId===B.id);Ae&&Ae.expandableNodeIds&&Ae.expandableNodeIds.forEach(oe=>{ee.add(oe)})}else if(B.type==="outer"){D.add(B.id);const te=t.relationships.outerRing_to_outerRing?.find(oe=>oe.outerRingId===B.id);te&&te.outerRingIds.forEach(oe=>D.add(oe));const de=t.relationships.outerRing_to_innerRing?.find(oe=>oe.outerRingId===B.id);de&&de.innerRingIds.forEach(oe=>Y.add(oe));const Ae=t.relationships.outerRing_to_expandableNodes?.find(oe=>oe.outerRingId===B.id);Ae&&Ae.expandableNodeIds&&Ae.expandableNodeIds.forEach(oe=>{ee.add(oe)})}else if(B.type==="third"){ee.add(B.id);const te=t.relationships.expandableNode_to_innerRing?.find(oe=>oe.expandableNodeId===B.id);te&&te.innerRingIds.forEach(oe=>Y.add(oe));const de=t.relationships.expandableNode_to_outerRing?.find(oe=>oe.expandableNodeId===B.id);de&&de.outerRingIds.forEach(oe=>D.add(oe));const Ae=t.relationships.expandableNode_to_expandableNodes?.find(oe=>oe.expandableNodeId===B.id);Ae&&Ae.expandableNodeIds.forEach(oe=>ee.add(oe))}return{relatedProducts:X,relatedInner:Y,relatedOuter:D,relatedExpandable:ee}},re=(L,X)=>{X.stopPropagation();const Y=L.startsWith("http://")||L.startsWith("https://")?L:`${u}${L.startsWith("/")?"":"/"}${L}`;w(Y),k(!0)},ae=b.useRef(!1),le=b.useRef(0),ye=L=>{H(X=>{const Y=X*L;return Y<.6||Y>1.3?X:Y})},ue=L=>{if(x.length===0)return;const X=document.querySelector("[class^='absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 z-50']"),Y=document.querySelector(".navigation-controls");if(X&&X.contains(L.target)||Y&&Y.contains(L.target)||ae.current)return;ae.current=!0;const D=L.deltaY<0?1.15:.85;ye(D),le.current=window.setTimeout(()=>{ae.current=!1},100)};b.useEffect(()=>()=>{le.current&&clearTimeout(le.current)},[]);const[Ne,W]=b.useState(!1),[he,be]=b.useState({x:0,y:0}),[ke,et]=b.useState({x:0,y:0}),xn=L=>{if(x.length===0)return;const X=L.target;X.closest("[class^='absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 z-50']")||X.closest(".navigation-controls")||X.closest("button")||X.closest(".side-panel")||X.closest(".hotspot-layer")||X.closest("img[alt*='Hotspot']")||(W(!0),be({x:L.clientX,y:L.clientY}))},is=L=>{if(!Ne||x.length===0)return;const X=L.clientX-he.x,Y=L.clientY-he.y,D=ke.x+X,ee=ke.y+Y,B=window.innerWidth,te=window.innerHeight,de=B/2,Ae=-B/2,oe=te/2,os=-te/2,yo=Math.min(Math.max(D,Ae),de),xo=Math.min(Math.max(ee,os),oe);et({x:yo,y:xo}),be({x:L.clientX,y:L.clientY})},vn=()=>{x.length>0&&W(!1)};function kt(L,X){if(!t)return!1;const Y=x[0]?.activeElement;if(!Y)return!1;if(Y.type==="inner"){const ee=Y.id,B=t.relationships.innerRing_to_expandableNodes?.find(te=>te.innerRingId===ee);if(B&&B.expandableNodeIds.includes(L))return!0}if(Y.type==="outer"){const ee=Y.id,B=t.relationships.outerRing_to_expandableNodes?.find(te=>te.outerRingId===ee);if(B&&B.expandableNodeIds.includes(L))return!0}if(Y.type==="product"){const ee=t.products.find(B=>B.id===Y.id);if(!ee)return!1;if(ee.expandableNodeIds?.includes(L))return!0}return!!t.relationships.outerRing_to_products?.find(ee=>ee.outerRingId===L&&ee.productIds.includes(X))}const[bo,H]=b.useState(window.innerWidth<700?.6:.85),pe=(L,X)=>t?.products.find(D=>D.id===X)?.expandableNodeIds?.includes(L)||!1,Me=(L,X,Y,D=0)=>{const ee=2*Math.PI*L/X+D,B=Y*Math.cos(ee),te=Y*Math.sin(ee);return{x:B,y:te}},We=L=>{const X=L.touches[0];if(!X)return;const Y={...L,clientX:X.clientX,clientY:X.clientY};xn(Y)},_e=L=>{const X=L.touches[0];if(!X)return;L.preventDefault();const Y={...L,clientX:X.clientX,clientY:X.clientY};is(Y)},Pt=()=>{vn()};return a.jsxs("div",{className:"relative w-full h-full overflow-hidden",children:[a.jsxs("div",{className:"absolute top-4 left-4 flex gap-1 md:hidden z-1000",children:[a.jsx(S.button,{className:"px-2 py-2 bg-slate-800/80 hover:bg-slate-700/80 text-cyan-300 font-medium text-xs sm:text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-slate-500/25 border border-cyan-400/30 hover:border-cyan-400/60 z-50",whileHover:{scale:1.05},whileTap:{scale:.95},initial:{opacity:0},animate:{opacity:1},transition:{delay:1.35,duration:.6},onClick:()=>ye(1.15),children:a.jsx(F.Plus,{})}),a.jsx(S.button,{className:"px-2 py-2 bg-slate-800/80 hover:bg-slate-700/80 text-cyan-300 font-medium text-xs sm:text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-slate-500/25 border border-cyan-400/30 hover:border-cyan-400/60 z-50",whileHover:{scale:1.05},whileTap:{scale:.95},initial:{opacity:0},animate:{opacity:1},transition:{delay:1.35,duration:.6},onClick:()=>ye(.85),children:a.jsx(F.Minus,{})})]}),a.jsx("style",{children:fb}),a.jsx(db,{isOpen:h,onClose:()=>m(!1),type:p,itemName:y}),a.jsxs("div",{className:"relative w-full h-full overflow-hidden",onWheel:ue,onMouseDown:xn,onMouseMove:is,onMouseUp:vn,onTouchStart:We,onTouchMove:_e,onTouchEnd:Pt,style:{paddingRight:"0",transition:"padding 0.3s ease-in-out",cursor:x.length>0?Ne?"grabbing":"grab":"default"},children:[a.jsx("div",{className:"absolute inset-0",children:a.jsx("div",{className:"absolute inset-0",style:{backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"},children:a.jsx("div",{className:"absolute inset-0 pointer-events-none"})})}),x.length>0&&a.jsx("div",{className:"absolute inset-0 node-view-layer",style:{transform:`translate(${ke.x}px, ${ke.y}px) scale(${bo})`,transformOrigin:"center center",transition:"transform 0.3s ease",pointerEvents:"auto"},children:x.map(L=>{const X=t?.products.find(D=>D.id===L.productId),Y=ie(L);return X&&L.centralPosition?a.jsxs("div",{className:"absolute z-20",style:{left:`${L.centralPosition.x}%`,top:`${L.centralPosition.y}%`,transform:"translate(-50%, -50%)",transition:"all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1)",animation:L.isClosing?"fadeOut 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards":"fadeIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards"},children:[a.jsx("div",{className:"absolute pointer-events-none",style:{left:"50%",top:"50%",transform:"translate(-50%, -50%)"},children:L.showInnerRing&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"absolute pointer-events-none",style:{width:"600px",height:"600px",border:"1px dashed rgba(0, 180, 255, 0.4)",borderRadius:"50%",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}}),(t?.innerRingNodes||[]).map((D,ee)=>{const B=Me(ee,t?.innerRingNodes.length||0,300),te=i===D.id;return a.jsx("div",{className:"absolute pointer-events-auto",style:{transform:`translate(${B.x}px, ${B.y}px)`},children:a.jsx("div",{style:{animation:"fadeIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards",animationDelay:`${ee*100}ms`,opacity:0},children:a.jsxs("div",{className:"relative",children:[a.jsx("button",{onClick:()=>ne(L.hotspotId,{type:"inner",id:D.id}),className:`absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 ${D.id===N?"!bg-cyan-500 !border-blue-900":""} rounded-full flex items-center justify-center transition-all duration-300 w-14 h-14 ${Y.relatedInner.has(D.id)||te?te?"bg-[#1037b9] hover:bg-[#1037b9]":"bg-[#214fc580] hover:bg-[#214fc580]":"bg-blue-900/20 hover:bg-blue-800/40 opacity-40"} cursor-pointer hover:scale-110 text-blue-100`,style:Y.relatedInner.has(D.id)||te?{animation:"pulseGlowCombo 1.5s infinite",border:te?"3px solid #1037b9":"3px solid #1D4ED8"}:{},children:a.jsx("img",{src:D.icon,alt:D.label,className:"w-8 h-8"})}),a.jsx("div",{className:`absolute text-xs ${Y.relatedInner.has(D.id)||te?"text-blue-100":"text-blue-100/40"} font-medium text-center`,style:{top:"30px",left:"50%",transform:"translateX(-50%)",textShadow:"0 0 5px rgba(0,0,0,0.8)",maxWidth:"120px"},children:D.label}),(Y.relatedInner.has(D.id)||te)&&D.url&&a.jsx("div",{className:"absolute rounded-full flex items-center justify-center w-8 h-8 bg-[#000d3a] text-blue-500 cursor-pointer hover:scale-110 transition-all duration-300",style:{top:"-15px",right:"-55px",boxShadow:"0 0 10px rgba(0,180,255,0.6)",border:"1px solid rgba(0,220,255,0.8)",animation:"fadeIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards"},onClick:de=>re(D.url,de),children:a.jsx(F.LinkIcon,{className:"w-4 h-4"})})]})})},D.id)})]})}),a.jsx("div",{className:"absolute pointer-events-none",style:{left:"50%",top:"50%",transform:"translate(-50%, -50%)"},children:L.showOuterRing&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"absolute pointer-events-none",style:{width:"800px",height:"800px",border:"1px dashed rgba(0, 180, 255, 0.4)",borderRadius:"50%",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}}),(t?.outerRingNodes||[]).map((D,ee)=>{const B=Me(ee,t?.outerRingNodes.length??0,400,Math.PI/(t?.outerRingNodes.length??1)),te=o===D.id;return a.jsx("div",{className:"absolute pointer-events-auto",style:{transform:`translate(${B.x}px, ${B.y}px)`},children:a.jsx("div",{style:{animation:"fadeIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards",animationDelay:`${ee*60+400}ms`,opacity:0},children:a.jsxs("div",{className:"relative",children:[a.jsxs("button",{onClick:()=>{ne(L.hotspotId,{type:"outer",id:D.id})},className:`absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 ${D.id===N?"!bg-cyan-500 !border-blue-900":""} rounded-full flex items-center justify-center transition-all duration-300 w-12 h-12 ${Y.relatedOuter.has(D.id)||te||L.activeElement.id===D.id?te?"bg-[#1037b9] hover:bg-[#1037b9]":"bg-[#214fc580] hover:bg-[#214fc580]":"bg-blue-900/20 opacity-40"} ${Y.relatedOuter.has(D.id)||te||L.activeElement.id===D.id?te?"bg-[#1037b9] hover:bg-[#1037b9]":"bg-[#214fc580] hover:bg-[#214fc580]":"bg-blue-900/20 opacity-40"} ${Y.relatedOuter.has(D.id)||te||L.activeElement.id===D.id?te?"bg-[#1037b9] hover:bg-[#1037b9]":"hover:bg-[#214fc580]":"hover:bg-blue-800/40"} cursor-pointer hover:scale-110 text-blue-100`,style:Y.relatedOuter.has(D.id)||D.id===39&&Y.relatedExpandable?.has(39)||te||L.activeElement.id===D.id?{animation:"pulseGlowCombo 1.5s infinite",border:te?"3px solid #1037b9":"3px solid #1D4ED8"}:{},children:[(D.id===39||D.id===40&&P(D.id).length>0||pe(D.id,L.productId))&&a.jsx("div",{className:"absolute -top-3 -right-3 w-6 h-6 bg-blue-500 hover:bg-blue-400 transition-colors duration-200 rounded-full flex items-center justify-center text-white text-xs font-bold shadow-lg border border-white cursor-pointer z-10",onClick:de=>{de.stopPropagation(),T(D.id)},children:"+"}),a.jsx("img",{src:D.icon,alt:D.label,className:"w-8 h-8"})]}),a.jsx("div",{className:`absolute text-xs ${Y.relatedOuter.has(D.id)||te?"text-blue-100":"text-blue-100/40"} font-medium text-center`,style:{top:"30px",left:"50%",transform:"translateX(-50%)",textShadow:"0 0 5px rgba(0,0,0,0.8)",maxWidth:"120px"},children:D.label}),(Y.relatedOuter.has(D.id)||te)&&D.url&&a.jsx("div",{className:"absolute rounded-full flex items-center justify-center w-8 h-8 bg-[#000d3a] text-blue-500 cursor-pointer hover:scale-110 transition-all duration-300",style:{top:"-15px",right:"-55px",boxShadow:"0 0 10px rgba(0,180,255,0.6)",border:"1px solid rgba(0,220,255,0.8)",animation:"fadeIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards"},onClick:de=>re(D.url,de),children:a.jsx(F.LinkIcon,{className:"w-4 h-4"})})]})})},D.id)})]})}),a.jsx("div",{className:"absolute pointer-events-none",style:{left:"50%",top:"50%",transform:"translate(-50%, -50%)"},children:L.showThirdRing&&L.expandedNodes&&L.expandedNodes.length>0&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"absolute pointer-events-none",style:{width:"1200px",height:"1200px",border:"1px dashed rgba(0, 180, 255, 0.4)",borderRadius:"50%",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}}),L.expandedNodes.map(D=>D.childNodes.map((B,te)=>{const de=D.childNodes.length,Ae=Math.PI*.6,oe=0-Ae/2+Ae*te/(de-1||1),os=600,yo=os*Math.cos(oe),xo=os*Math.sin(oe);return a.jsx("div",{className:"absolute pointer-events-auto",style:{transform:`translate(${yo}px, ${xo}px)`},children:a.jsx("div",{style:{animation:"fadeIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards",animationDelay:`${te*50+600}ms`,opacity:0},children:a.jsxs("div",{className:"relative",children:[a.jsx("button",{onClick:()=>{ne(L.hotspotId,{type:"third",id:B.id})},className:`absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 ${B.id===N?"!bg-cyan-500 !border-blue-900":""} rounded-full flex items-center justify-center transition-all duration-300 w-12 h-12 ${kt(B.id,"")||Y.relatedExpandable.has(B.id)?"bg-[#214fc580] hover:bg-[#214fc580]":"bg-blue-900/20 opacity-40 hover:bg-blue-800/40"} cursor-pointer hover:scale-110 text-blue-100`,style:kt(B.id,"")||Y.relatedExpandable.has(B.id)?{boxShadow:"0 0 15px rgba(0, 180, 255, 0.8)",border:"3px solid #1D4ED8",animation:"pulseGlowCombo 1.5s infinite"}:{},children:a.jsx("img",{src:B.icon,alt:B.label,className:"w-8 h-8"})}),a.jsx("div",{className:`absolute text-xs ${kt(B.id,"")||Y.relatedExpandable.has(B.id)?"text-blue-100":"text-blue-100/40"} font-medium text-center`,style:{top:"30px",left:"50%",transform:"translateX(-50%)",textShadow:"0 0 5px rgba(0,0,0,0.8)",maxWidth:"120px"},children:B.label}),B.url&&(kt(B.id,"")||Y.relatedExpandable.has(B.id))&&a.jsx("div",{className:"absolute rounded-full flex items-center justify-center w-8 h-8 bg-[#000d3a] text-blue-500 cursor-pointer hover:scale-110 transition-all duration-300",style:{top:"-15px",right:"-55px",boxShadow:"0 0 10px rgba(0,180,255,0.6)",border:"1px solid rgba(0,220,255,0.8)",animation:"fadeIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards"},onClick:Mb=>re(B.url||"",Mb),children:a.jsx(F.LinkIcon,{className:"w-4 h-4"})})]})})},`third-ring-${D.parentId}-${B.id}`)}))]})})]},L.hotspotId):null})}),x.length>0&&a.jsx("div",{className:"fixed bottom-16 left-0 right-0 flex justify-center items-center z-30 px-4 w-full",style:{animation:x.length>0?"fadeInUp 0.5s ease forwards":"fadeOutDown 0.5s ease forwards",display:A?"none":"flex"},children:a.jsxs("div",{className:"relative flex items-center w-full max-w-6xl px-12",ref:U,style:{paddingRight:"24px"},children:[j>0&&a.jsx("button",{onClick:_,className:"absolute left-0 z-10 flex items-center justify-center w-10 h-10 rounded-full text-blue-100",style:{background:"rgba(30, 64, 175, 0.3)",backdropFilter:"blur(8px)",border:"1px solid rgba(59, 130, 246, 0.3)",boxShadow:"0 0 15px rgba(0, 120, 255, 0.3)",marginLeft:"-5px"},children:a.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M15 18L9 12L15 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),a.jsx("div",{className:"overflow-hidden w-full",style:{background:"transparent"},children:a.jsx("div",{ref:J,className:"flex gap-4 transition-transform duration-300 py-3 justify-start w-full",style:{transform:`translateX(-${j}px)`,paddingRight:"50px"},children:t?.globalTags&&t.globalTags.map((L,X)=>a.jsx("span",{className:"whitespace-nowrap text-blue-100 rounded-full px-6 py-2 text-sm font-medium border border-blue-400/50 transition-all flex-shrink-0 opacity-70",style:{background:"rgba(30, 64, 175, 0.75)",backdropFilter:"blur(8px)",textShadow:"0 0 5px rgba(0, 180, 255, 0.5)",boxShadow:"0 0 10px rgba(0, 120, 255, 0.2), inset 0 0 5px rgba(0, 150, 255, 0.2)"},children:L.label},X))})}),j<Math.max(0,R-z+140)&&a.jsx("button",{onClick:M,className:"absolute right-0 z-10 flex items-center justify-center w-10 h-10 rounded-full text-blue-100",style:{background:"rgba(30, 64, 175, 0.3)",backdropFilter:"blur(8px)",border:"1px solid rgba(59, 130, 246, 0.3)",boxShadow:"0 0 15px rgba(0, 120, 255, 0.3)",marginRight:"-5px"},children:a.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M9 6L15 12L9 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]})})]}),a.jsx(ub,{showLinkModal:A,setShowLinkModal:k,modalUrl:E})]})}function mb({size:e}){const t=hm(0),n=r0();b.useEffect(()=>{n||ki(t,0,{duration:.5,ease:"easeInOut"});async function o(){await ki(t,1,{duration:.5,delay:.35,ease:[0,.55,.45,1]}),ki(t,[null,.7,1],{duration:15,repeat:Number.POSITIVE_INFINITY,repeatType:"loop",ease:"easeInOut"})}o()},[n]);const s=.75,i=.5,r=e.width/3;return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"gradient-container",children:[a.jsx(S.div,{className:"expanding-circle",initial:{scale:0,opacity:1},animate:{scale:10,opacity:.2,transition:{duration:s,opacity:{duration:s,ease:"easeInOut"}}},exit:{scale:0,opacity:1,transition:{duration:i}},style:{left:`calc(50% - ${r/2}px)`,top:`calc(50% - ${r/2}px)`,width:r,height:r,originX:.5,originY:.5}}),a.jsx(S.div,{className:"gradient-circle top-left",initial:{opacity:0},animate:{opacity:.9,transition:{duration:s}},exit:{opacity:0,transition:{duration:i}},style:{scale:t,width:e.width*2,height:e.width*2,top:-e.width,left:-e.width}}),a.jsx(S.div,{className:"gradient-circle bottom-right",initial:{opacity:0},animate:{opacity:.9,transition:{duration:s}},exit:{opacity:0,transition:{duration:i}},style:{scale:t,width:e.width*2,height:e.width*2,top:e.height-e.width,left:0}})]}),a.jsx("style",{children:`
399
+ `;function hb({hotspot:e}){const[t,n]=b.useState(null),[,s]=b.useState([]),[i,r]=b.useState(null),[o,l]=b.useState(null),[,c]=b.useState(new Set),u=xe().remoteUrl,d=xe().hotspots.dataEs,f=xe().hotspots.dataEn,[h,m]=b.useState(!1),[p]=b.useState("inner"),[y]=b.useState(""),{i18n:v}=ot.useTranslation();b.useEffect(()=>{let L;if(v.language==="en"?L=f??{globalTags:[],innerRingNodes:[],outerRingNodes:[],products:[],relationships:{}}:L=d??{globalTags:[],innerRingNodes:[],outerRingNodes:[],products:[],relationships:{}},n(L),L.outerRingNodes){const X=L.outerRingNodes.map(Y=>({id:Y.id,title:Y.label,description:"",icon:Y.icon})).sort((Y,D)=>Y.title.localeCompare(D.title));s(X)}},[]),b.useEffect(()=>O(e),[e]);const[x,C]=b.useState([]),[N,I]=b.useState(0),[A,k]=b.useState(!1),[E,w]=b.useState(""),[j,$]=b.useState(0),[z,Q]=b.useState(0),[R,se]=b.useState(0),U=b.useRef(null),J=b.useRef(null),V={1:"fragata",2:"submarino",3:"buque-accion-maritima",4:"buque-apoyo",5:"corbeta",6:"usv-v",7:"usv-7",8:"buque-portaeronaves",9:"buque-anfibio",10:"pdco",11:"pdmd",12:"lcm"},P=L=>{if(!t)return[];const X=t.expandableNodes?.find(ee=>ee.parentId===L);if(X)return X.childNodes;const Y=t.relationships.outerRing_to_expandableNodes?.find(ee=>ee.outerRingId===L);if(Y)return t.expandableNodes?.flatMap(ee=>ee.childNodes.filter(B=>Y.expandableNodeIds.includes(B.id)))||[];const D=t.relationships.innerRing_to_expandableNodes?.find(ee=>ee.innerRingId===L);return D?t.expandableNodes?.flatMap(ee=>ee.childNodes.filter(B=>D.expandableNodeIds.includes(B.id)))||[]:[]};b.useEffect(()=>{U.current&&J.current&&(Q(U.current.clientWidth),se(J.current.scrollWidth))},[t?.globalTags,x]);const _=()=>{$(L=>Math.max(L-200,0))},M=()=>{const L=Math.max(0,R-z+140);$(X=>Math.min(X+300,L))},T=L=>{const X=P(L);X.length>0&&C(Y=>Y.map(D=>{const ee=L===39||L===40||be(L,D.productId),B=D.activeElement;let te=!1;if(B.type==="outer"){const de=B.id;te=t?.relationships.outerRing_to_expandableNodes?.find(oe=>oe.outerRingId===de)?.expandableNodeIds.includes(L)||!1}if(B.type==="inner"){const de=B.id;te=t?.relationships.innerRing_to_expandableNodes?.find(oe=>oe.innerRingId===de)?.expandableNodeIds.includes(L)||!1}return ee||te?D.expandedNodes&&D.expandedNodes.length>0&&D.expandedNodes?.some(oe=>oe.parentId===L)?{...D,showThirdRing:!1,expandedNodes:[]}:{...D,showThirdRing:!0,expandedNodes:[{parentId:L,childNodes:X}]}:D}))},O=L=>{if(console.log("handleHotspotClick ",L),L===12||L===13)return;if(L===10){w(u+"/es/producto/plataforma-digital/?lightbox=1"),k(!0);return}else if(L===11){w(u+"/es/producto/plataforma-digital-en-tierra/?lightbox=1"),k(!0);return}const X=V[L];if(!X)return;const Y=x.some(D=>D.hotspotId===L);r(null),l(null),c(new Set),m(!1),Ve({x:0,y:0}),Y?C(D=>D.map(ee=>ee.hotspotId===L?{...ee,activeElement:{type:"product",id:X},showCentralNode:!0,showInnerRing:!0,showOuterRing:!0,showThirdRing:!1,expandedNodes:[]}:ee)):(C([]),setTimeout(()=>{C([{hotspotId:L,productId:X,centralPosition:{x:50,y:50},activeElement:{type:"product",id:X},showCentralNode:!0,showInnerRing:!0,showOuterRing:!1,showThirdRing:!1,hotspotImage:"",expandedNodes:[],...L===8?{secondaryImage:"",secondaryLabel:""}:{}}]),setTimeout(()=>{C(ee=>ee.map(B=>B.hotspotId===L?{...B,showOuterRing:!0}:B))},300)},100))},ne=(L,X)=>{r(null),l(null),c(new Set),C(Y=>Y.map(D=>{if(D.hotspotId===L){const ee=X.type!=="third"&&X.type!=="outer";return{...D,activeElement:X,showCentralNode:X.type==="product",showThirdRing:ee?!1:D.showThirdRing,expandedNodes:ee?[]:D.expandedNodes}}return D})),I(X.id)},ae=L=>{const X=new Set,Y=new Set,D=new Set,ee=new Set;if(!t)return{relatedProducts:X,relatedInner:Y,relatedOuter:D,relatedExpandable:ee};const{activeElement:B}=L;if(B.type==="product"){const te=t.products.find(de=>de.id===B.id);te&&(te.innerRingIds.forEach(de=>Y.add(de)),te.outerRingIds.forEach(de=>D.add(de)),te.expandableNodeIds&&te.expandableNodeIds.forEach(de=>{ee.add(de)}),X.add(te.id))}else if(B.type==="inner"){Y.add(B.id);const te=t.relationships.innerRing_to_innerRing?.find(oe=>oe.innerRingId===B.id);te&&te.innerRingIds.forEach(oe=>Y.add(oe));const de=t.relationships.innerRing_to_outerRing?.find(oe=>oe.innerRingId===B.id);de&&de.outerRingIds.forEach(oe=>D.add(oe));const Me=t.relationships.innerRing_to_expandableNodes?.find(oe=>oe.innerRingId===B.id);Me&&Me.expandableNodeIds&&Me.expandableNodeIds.forEach(oe=>{ee.add(oe)})}else if(B.type==="outer"){D.add(B.id);const te=t.relationships.outerRing_to_outerRing?.find(oe=>oe.outerRingId===B.id);te&&te.outerRingIds.forEach(oe=>D.add(oe));const de=t.relationships.outerRing_to_innerRing?.find(oe=>oe.outerRingId===B.id);de&&de.innerRingIds.forEach(oe=>Y.add(oe));const Me=t.relationships.outerRing_to_expandableNodes?.find(oe=>oe.outerRingId===B.id);Me&&Me.expandableNodeIds&&Me.expandableNodeIds.forEach(oe=>{ee.add(oe)})}else if(B.type==="third"){ee.add(B.id);const te=t.relationships.expandableNode_to_innerRing?.find(oe=>oe.expandableNodeId===B.id);te&&te.innerRingIds.forEach(oe=>Y.add(oe));const de=t.relationships.expandableNode_to_outerRing?.find(oe=>oe.expandableNodeId===B.id);de&&de.outerRingIds.forEach(oe=>D.add(oe));const Me=t.relationships.expandableNode_to_expandableNodes?.find(oe=>oe.expandableNodeId===B.id);Me&&Me.expandableNodeIds.forEach(oe=>ee.add(oe))}return{relatedProducts:X,relatedInner:Y,relatedOuter:D,relatedExpandable:ee}},ie=(L,X)=>{X.stopPropagation();const Y=L.startsWith("http://")||L.startsWith("https://")?L:`${u}${L.startsWith("/")?"":"/"}${L}`;w(Y),k(!0)},le=b.useRef(!1),re=b.useRef(0),ge=L=>{H(X=>{const Y=X*L;return Y<.6||Y>1.3?X:Y})},ue=L=>{if(x.length===0)return;const X=document.querySelector("[class^='absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 z-50']"),Y=document.querySelector(".navigation-controls");if(X&&X.contains(L.target)||Y&&Y.contains(L.target)||le.current)return;le.current=!0;const D=L.deltaY<0?1.15:.85;ge(D),re.current=window.setTimeout(()=>{le.current=!1},100)};b.useEffect(()=>()=>{re.current&&clearTimeout(re.current)},[]);const[$e,je]=b.useState(!1),[W,he]=b.useState({x:0,y:0}),[pe,Ve]=b.useState({x:0,y:0}),Pt=L=>{if(x.length===0)return;const X=L.target;X.closest("[class^='absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 z-50']")||X.closest(".navigation-controls")||X.closest("button")||X.closest(".side-panel")||X.closest(".hotspot-layer")||X.closest("img[alt*='Hotspot']")||(je(!0),he({x:L.clientX,y:L.clientY}))},is=L=>{if(!$e||x.length===0)return;const X=L.clientX-W.x,Y=L.clientY-W.y,D=pe.x+X,ee=pe.y+Y,B=window.innerWidth,te=window.innerHeight,de=B/2,Me=-B/2,oe=te/2,os=-te/2,yo=Math.min(Math.max(D,Me),de),xo=Math.min(Math.max(ee,os),oe);Ve({x:yo,y:xo}),he({x:L.clientX,y:L.clientY})},vn=()=>{x.length>0&&je(!1)};function jt(L,X){if(!t)return!1;const Y=x[0]?.activeElement;if(!Y)return!1;if(Y.type==="inner"){const ee=Y.id,B=t.relationships.innerRing_to_expandableNodes?.find(te=>te.innerRingId===ee);if(B&&B.expandableNodeIds.includes(L))return!0}if(Y.type==="outer"){const ee=Y.id,B=t.relationships.outerRing_to_expandableNodes?.find(te=>te.outerRingId===ee);if(B&&B.expandableNodeIds.includes(L))return!0}if(Y.type==="product"){const ee=t.products.find(B=>B.id===Y.id);if(!ee)return!1;if(ee.expandableNodeIds?.includes(L))return!0}return!!t.relationships.outerRing_to_products?.find(ee=>ee.outerRingId===L&&ee.productIds.includes(X))}const[bo,H]=b.useState(window.innerWidth<700?.6:.85),be=(L,X)=>t?.products.find(D=>D.id===X)?.expandableNodeIds?.includes(L)||!1,Ie=(L,X,Y,D=0)=>{const ee=2*Math.PI*L/X+D,B=Y*Math.cos(ee),te=Y*Math.sin(ee);return{x:B,y:te}},Ye=L=>{const X=L.touches[0];if(!X)return;const Y={...L,clientX:X.clientX,clientY:X.clientY};Pt(Y)},_e=L=>{const X=L.touches[0];if(!X)return;L.preventDefault();const Y={...L,clientX:X.clientX,clientY:X.clientY};is(Y)},It=()=>{vn()};return a.jsxs("div",{className:"relative w-full h-full overflow-hidden",children:[a.jsxs("div",{className:"absolute top-4 left-4 flex gap-1 md:hidden z-1000",children:[a.jsx(S.button,{className:"px-2 py-2 bg-slate-800/80 hover:bg-slate-700/80 text-cyan-300 font-medium text-xs sm:text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-slate-500/25 border border-cyan-400/30 hover:border-cyan-400/60 z-50",whileHover:{scale:1.05},whileTap:{scale:.95},initial:{opacity:0},animate:{opacity:1},transition:{delay:1.35,duration:.6},onClick:()=>ge(1.15),children:a.jsx(F.Plus,{})}),a.jsx(S.button,{className:"px-2 py-2 bg-slate-800/80 hover:bg-slate-700/80 text-cyan-300 font-medium text-xs sm:text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-slate-500/25 border border-cyan-400/30 hover:border-cyan-400/60 z-50",whileHover:{scale:1.05},whileTap:{scale:.95},initial:{opacity:0},animate:{opacity:1},transition:{delay:1.35,duration:.6},onClick:()=>ge(.85),children:a.jsx(F.Minus,{})})]}),a.jsx("style",{children:fb}),a.jsx(db,{isOpen:h,onClose:()=>m(!1),type:p,itemName:y}),a.jsxs("div",{className:"relative w-full h-full overflow-hidden",onWheel:ue,onMouseDown:Pt,onMouseMove:is,onMouseUp:vn,onTouchStart:Ye,onTouchMove:_e,onTouchEnd:It,style:{paddingRight:"0",transition:"padding 0.3s ease-in-out",cursor:x.length>0?$e?"grabbing":"grab":"default"},children:[a.jsx("div",{className:"absolute inset-0",children:a.jsx("div",{className:"absolute inset-0",style:{backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"},children:a.jsx("div",{className:"absolute inset-0 pointer-events-none"})})}),x.length>0&&a.jsx("div",{className:"absolute inset-0 node-view-layer",style:{transform:`translate(${pe.x}px, ${pe.y}px) scale(${bo})`,transformOrigin:"center center",transition:"transform 0.3s ease",pointerEvents:"auto"},children:x.map(L=>{const X=t?.products.find(D=>D.id===L.productId),Y=ae(L);return X&&L.centralPosition?a.jsxs("div",{className:"absolute z-20",style:{left:`${L.centralPosition.x}%`,top:`${L.centralPosition.y}%`,transform:"translate(-50%, -50%)",transition:"all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1)",animation:L.isClosing?"fadeOut 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards":"fadeIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards"},children:[a.jsx("div",{className:"absolute pointer-events-none",style:{left:"50%",top:"50%",transform:"translate(-50%, -50%)"},children:L.showInnerRing&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"absolute pointer-events-none",style:{width:"600px",height:"600px",border:"1px dashed rgba(0, 180, 255, 0.4)",borderRadius:"50%",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}}),(t?.innerRingNodes||[]).map((D,ee)=>{const B=Ie(ee,t?.innerRingNodes.length||0,300),te=i===D.id;return a.jsx("div",{className:"absolute pointer-events-auto",style:{transform:`translate(${B.x}px, ${B.y}px)`},children:a.jsx("div",{style:{animation:"fadeIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards",animationDelay:`${ee*100}ms`,opacity:0},children:a.jsxs("div",{className:"relative",children:[a.jsx("button",{onClick:()=>ne(L.hotspotId,{type:"inner",id:D.id}),className:`absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 ${D.id===N?"!bg-cyan-500 !border-blue-900":""} rounded-full flex items-center justify-center transition-all duration-300 w-14 h-14 ${Y.relatedInner.has(D.id)||te?te?"bg-[#1037b9] hover:bg-[#1037b9]":"bg-[#214fc580] hover:bg-[#214fc580]":"bg-blue-900/20 hover:bg-blue-800/40 opacity-40"} cursor-pointer hover:scale-110 text-blue-100`,style:Y.relatedInner.has(D.id)||te?{animation:"pulseGlowCombo 1.5s infinite",border:te?"3px solid #1037b9":"3px solid #1D4ED8"}:{},children:a.jsx("img",{src:D.icon,alt:D.label,className:"w-8 h-8"})}),a.jsx("div",{className:`absolute text-xs ${Y.relatedInner.has(D.id)||te?"text-blue-100":"text-blue-100/40"} font-medium text-center`,style:{top:"30px",left:"50%",transform:"translateX(-50%)",textShadow:"0 0 5px rgba(0,0,0,0.8)",maxWidth:"120px"},children:D.label}),(Y.relatedInner.has(D.id)||te)&&D.url&&a.jsx("div",{className:"absolute rounded-full flex items-center justify-center w-8 h-8 bg-[#000d3a] text-blue-500 cursor-pointer hover:scale-110 transition-all duration-300",style:{top:"-15px",right:"-55px",boxShadow:"0 0 10px rgba(0,180,255,0.6)",border:"1px solid rgba(0,220,255,0.8)",animation:"fadeIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards"},onClick:de=>ie(D.url,de),children:a.jsx(F.LinkIcon,{className:"w-4 h-4"})})]})})},D.id)})]})}),a.jsx("div",{className:"absolute pointer-events-none",style:{left:"50%",top:"50%",transform:"translate(-50%, -50%)"},children:L.showOuterRing&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"absolute pointer-events-none",style:{width:"800px",height:"800px",border:"1px dashed rgba(0, 180, 255, 0.4)",borderRadius:"50%",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}}),(t?.outerRingNodes||[]).map((D,ee)=>{const B=Ie(ee,t?.outerRingNodes.length??0,400,Math.PI/(t?.outerRingNodes.length??1)),te=o===D.id;return a.jsx("div",{className:"absolute pointer-events-auto",style:{transform:`translate(${B.x}px, ${B.y}px)`},children:a.jsx("div",{style:{animation:"fadeIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards",animationDelay:`${ee*60+400}ms`,opacity:0},children:a.jsxs("div",{className:"relative",children:[a.jsxs("button",{onClick:()=>{ne(L.hotspotId,{type:"outer",id:D.id})},className:`absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 ${D.id===N?"!bg-cyan-500 !border-blue-900":""} rounded-full flex items-center justify-center transition-all duration-300 w-12 h-12 ${Y.relatedOuter.has(D.id)||te||L.activeElement.id===D.id?te?"bg-[#1037b9] hover:bg-[#1037b9]":"bg-[#214fc580] hover:bg-[#214fc580]":"bg-blue-900/20 opacity-40"} ${Y.relatedOuter.has(D.id)||te||L.activeElement.id===D.id?te?"bg-[#1037b9] hover:bg-[#1037b9]":"bg-[#214fc580] hover:bg-[#214fc580]":"bg-blue-900/20 opacity-40"} ${Y.relatedOuter.has(D.id)||te||L.activeElement.id===D.id?te?"bg-[#1037b9] hover:bg-[#1037b9]":"hover:bg-[#214fc580]":"hover:bg-blue-800/40"} cursor-pointer hover:scale-110 text-blue-100`,style:Y.relatedOuter.has(D.id)||D.id===39&&Y.relatedExpandable?.has(39)||te||L.activeElement.id===D.id?{animation:"pulseGlowCombo 1.5s infinite",border:te?"3px solid #1037b9":"3px solid #1D4ED8"}:{},children:[(D.id===39||D.id===40&&P(D.id).length>0||be(D.id,L.productId))&&a.jsx("div",{className:"absolute -top-3 -right-3 w-6 h-6 bg-blue-500 hover:bg-blue-400 transition-colors duration-200 rounded-full flex items-center justify-center text-white text-xs font-bold shadow-lg border border-white cursor-pointer z-10",onClick:de=>{de.stopPropagation(),T(D.id)},children:"+"}),a.jsx("img",{src:D.icon,alt:D.label,className:"w-8 h-8"})]}),a.jsx("div",{className:`absolute text-xs ${Y.relatedOuter.has(D.id)||te?"text-blue-100":"text-blue-100/40"} font-medium text-center`,style:{top:"30px",left:"50%",transform:"translateX(-50%)",textShadow:"0 0 5px rgba(0,0,0,0.8)",maxWidth:"120px"},children:D.label}),(Y.relatedOuter.has(D.id)||te)&&D.url&&a.jsx("div",{className:"absolute rounded-full flex items-center justify-center w-8 h-8 bg-[#000d3a] text-blue-500 cursor-pointer hover:scale-110 transition-all duration-300",style:{top:"-15px",right:"-55px",boxShadow:"0 0 10px rgba(0,180,255,0.6)",border:"1px solid rgba(0,220,255,0.8)",animation:"fadeIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards"},onClick:de=>ie(D.url,de),children:a.jsx(F.LinkIcon,{className:"w-4 h-4"})})]})})},D.id)})]})}),a.jsx("div",{className:"absolute pointer-events-none",style:{left:"50%",top:"50%",transform:"translate(-50%, -50%)"},children:L.showThirdRing&&L.expandedNodes&&L.expandedNodes.length>0&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"absolute pointer-events-none",style:{width:"1200px",height:"1200px",border:"1px dashed rgba(0, 180, 255, 0.4)",borderRadius:"50%",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}}),L.expandedNodes.map(D=>D.childNodes.map((B,te)=>{const de=D.childNodes.length,Me=Math.PI*.6,oe=0-Me/2+Me*te/(de-1||1),os=600,yo=os*Math.cos(oe),xo=os*Math.sin(oe);return a.jsx("div",{className:"absolute pointer-events-auto",style:{transform:`translate(${yo}px, ${xo}px)`},children:a.jsx("div",{style:{animation:"fadeIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards",animationDelay:`${te*50+600}ms`,opacity:0},children:a.jsxs("div",{className:"relative",children:[a.jsx("button",{onClick:()=>{ne(L.hotspotId,{type:"third",id:B.id})},className:`absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 ${B.id===N?"!bg-cyan-500 !border-blue-900":""} rounded-full flex items-center justify-center transition-all duration-300 w-12 h-12 ${jt(B.id,"")||Y.relatedExpandable.has(B.id)?"bg-[#214fc580] hover:bg-[#214fc580]":"bg-blue-900/20 opacity-40 hover:bg-blue-800/40"} cursor-pointer hover:scale-110 text-blue-100`,style:jt(B.id,"")||Y.relatedExpandable.has(B.id)?{boxShadow:"0 0 15px rgba(0, 180, 255, 0.8)",border:"3px solid #1D4ED8",animation:"pulseGlowCombo 1.5s infinite"}:{},children:a.jsx("img",{src:B.icon,alt:B.label,className:"w-8 h-8"})}),a.jsx("div",{className:`absolute text-xs ${jt(B.id,"")||Y.relatedExpandable.has(B.id)?"text-blue-100":"text-blue-100/40"} font-medium text-center`,style:{top:"30px",left:"50%",transform:"translateX(-50%)",textShadow:"0 0 5px rgba(0,0,0,0.8)",maxWidth:"120px"},children:B.label}),B.url&&(jt(B.id,"")||Y.relatedExpandable.has(B.id))&&a.jsx("div",{className:"absolute rounded-full flex items-center justify-center w-8 h-8 bg-[#000d3a] text-blue-500 cursor-pointer hover:scale-110 transition-all duration-300",style:{top:"-15px",right:"-55px",boxShadow:"0 0 10px rgba(0,180,255,0.6)",border:"1px solid rgba(0,220,255,0.8)",animation:"fadeIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards"},onClick:Mb=>ie(B.url||"",Mb),children:a.jsx(F.LinkIcon,{className:"w-4 h-4"})})]})})},`third-ring-${D.parentId}-${B.id}`)}))]})})]},L.hotspotId):null})}),x.length>0&&a.jsx("div",{className:"fixed bottom-16 left-0 right-0 flex justify-center items-center z-30 px-4 w-full",style:{animation:x.length>0?"fadeInUp 0.5s ease forwards":"fadeOutDown 0.5s ease forwards",display:A?"none":"flex"},children:a.jsxs("div",{className:"relative flex items-center w-full max-w-6xl px-12",ref:U,style:{paddingRight:"24px"},children:[j>0&&a.jsx("button",{onClick:_,className:"absolute left-0 z-10 flex items-center justify-center w-10 h-10 rounded-full text-blue-100",style:{background:"rgba(30, 64, 175, 0.3)",backdropFilter:"blur(8px)",border:"1px solid rgba(59, 130, 246, 0.3)",boxShadow:"0 0 15px rgba(0, 120, 255, 0.3)",marginLeft:"-5px"},children:a.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M15 18L9 12L15 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),a.jsx("div",{className:"overflow-hidden w-full",style:{background:"transparent"},children:a.jsx("div",{ref:J,className:"flex gap-4 transition-transform duration-300 py-3 justify-start w-full",style:{transform:`translateX(-${j}px)`,paddingRight:"50px"},children:t?.globalTags&&t.globalTags.map((L,X)=>a.jsx("span",{className:"whitespace-nowrap text-blue-100 rounded-full px-6 py-2 text-sm font-medium border border-blue-400/50 transition-all flex-shrink-0 opacity-70",style:{background:"rgba(30, 64, 175, 0.75)",backdropFilter:"blur(8px)",textShadow:"0 0 5px rgba(0, 180, 255, 0.5)",boxShadow:"0 0 10px rgba(0, 120, 255, 0.2), inset 0 0 5px rgba(0, 150, 255, 0.2)"},children:L.label},X))})}),j<Math.max(0,R-z+140)&&a.jsx("button",{onClick:M,className:"absolute right-0 z-10 flex items-center justify-center w-10 h-10 rounded-full text-blue-100",style:{background:"rgba(30, 64, 175, 0.3)",backdropFilter:"blur(8px)",border:"1px solid rgba(59, 130, 246, 0.3)",boxShadow:"0 0 15px rgba(0, 120, 255, 0.3)",marginRight:"-5px"},children:a.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M9 6L15 12L9 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]})})]}),a.jsx(ub,{showLinkModal:A,setShowLinkModal:k,modalUrl:E})]})}function mb({size:e}){const t=hm(0),n=r0();b.useEffect(()=>{n||ki(t,0,{duration:.5,ease:"easeInOut"});async function o(){await ki(t,1,{duration:.5,delay:.35,ease:[0,.55,.45,1]}),ki(t,[null,.7,1],{duration:15,repeat:Number.POSITIVE_INFINITY,repeatType:"loop",ease:"easeInOut"})}o()},[n]);const s=.75,i=.5,r=e.width/3;return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"gradient-container",children:[a.jsx(S.div,{className:"expanding-circle",initial:{scale:0,opacity:1},animate:{scale:10,opacity:.2,transition:{duration:s,opacity:{duration:s,ease:"easeInOut"}}},exit:{scale:0,opacity:1,transition:{duration:i}},style:{left:`calc(50% - ${r/2}px)`,top:`calc(50% - ${r/2}px)`,width:r,height:r,originX:.5,originY:.5}}),a.jsx(S.div,{className:"gradient-circle top-left",initial:{opacity:0},animate:{opacity:.9,transition:{duration:s}},exit:{opacity:0,transition:{duration:i}},style:{scale:t,width:e.width*2,height:e.width*2,top:-e.width,left:-e.width}}),a.jsx(S.div,{className:"gradient-circle bottom-right",initial:{opacity:0},animate:{opacity:.9,transition:{duration:s}},exit:{opacity:0,transition:{duration:i}},style:{scale:t,width:e.width*2,height:e.width*2,top:e.height-e.width,left:0}})]}),a.jsx("style",{children:`
400
400
  .gradient-container {
401
401
  position: absolute;
402
402
  top: 0;
@@ -516,4 +516,4 @@ React keys must be passed directly to JSX without using spread:
516
516
  bottom: 0;
517
517
  z-index: 999999;
518
518
  }
519
- `})]})})}const bu="app-font-size",bb="100",yb=()=>{const[e,t]=Se.useSearchParams(),n=e.get("size"),s=localStorage.getItem(bu);let i=bb;return n&&!isNaN(parseInt(n))?i=n:s&&!isNaN(parseInt(s))&&(i=s),b.useEffect(()=>{document.documentElement.style.fontSize=`${i}%`,n&&localStorage.setItem(bu,n)},[i,n,e,t]),null},yu=b.createContext(void 0),xb=({children:e})=>{const[t,n]=b.useState(!1),s=()=>n(i=>!i);return a.jsx(yu.Provider,{value:{isAutoMode:t,setIsAutoMode:n,toggleAutoMode:s},children:e})},lo=()=>{const e=b.useContext(yu);if(!e)throw new Error("useShowcase debe usarse dentro de un ShowcaseProvider");return e};function co(){const[e,t]=b.useState("physical"),[n,s]=b.useState(!1),[i,r]=b.useState(!1),[o,l]=b.useState("Navantia Global"),[c,u]=b.useState("high"),[d,f]=b.useState("es"),[h,m]=b.useState(!0),p=xe().controlPanelLevels,y=["physical","hybrid","digital"],v=["high","medium","low"],{t:x,i18n:C}=jt.useTranslation(),N=Se.useNavigate(),I=Se.useLocation(),{sendMessage:A}=Ut(),k=xe().wsRoom,{isAutoMode:E,toggleAutoMode:w}=lo();b.useEffect(()=>{C.changeLanguage(d)},[d]),b.useEffect(()=>{if(console.log("Location en control-panel: "+I.pathname),I.pathname!=="/"){const P=p.filter(_=>_.slug.length>1).find(_=>I.pathname.startsWith(_.slug));P&&(console.log("Se va a seleccionar "+P.title),l(P.title))}},[I]),b.useEffect(()=>{A({type:"publish",room:k,payload:{type:"layer",target:e}})},[e]);const j=()=>{t(P=>{const M=(y.indexOf(P)+1)%y.length;return y[M]})},$=()=>{f(P=>P==="es"?"en":"es")},z=()=>{w()},Q=()=>{switch(e){case"physical":return F.Box;case"hybrid":return F.GitMerge;case"digital":return F.Cpu;default:return F.Layers}},R=P=>{switch(P){case"low":return F.Zap;case"medium":return F.Scale;case"high":return F.Flame;default:return F.Gauge}},se=P=>{switch(P){case"Navantia Global":return F.Globe;case"Smart Catalogue":return F.BookOpen;case"Coex":return F.Network;case"Plataformas Navales":return F.Ship;case"Desarrollos tecnológicos":return F.Zap;default:return F.Layers}},U=()=>{switch(e){case"physical":return{bg:"bg-slate-700/90 hover:bg-slate-600/90",text:"text-blue-200",border:"border-slate-400/30 hover:border-slate-400/60",shadow:"shadow-lg hover:shadow-slate-500/50",badgeBg:"bg-slate-600/20",badgeText:"text-blue-200",badgeBorder:"border-slate-400/30"};case"hybrid":return{bg:"bg-teal-900/90 hover:bg-teal-800/90",text:"text-teal-300",border:"border-teal-400/30 hover:border-teal-400/60",shadow:"shadow-lg hover:shadow-teal-500/50",badgeBg:"bg-teal-500/20",badgeText:"text-teal-300",badgeBorder:"border-teal-400/30"};case"digital":return{bg:"bg-sky-900/90 hover:bg-sky-800/90",text:"text-sky-300",border:"border-sky-400/30 hover:border-sky-400/60",shadow:"shadow-lg hover:shadow-sky-500/50",badgeBg:"bg-sky-500/20",badgeText:"text-sky-300",badgeBorder:"border-sky-400/30"};default:return{bg:"bg-slate-800/90 hover:bg-slate-700/90",text:"text-cyan-300",border:"border-cyan-400/30 hover:border-cyan-400/60",shadow:"shadow-lg hover:shadow-cyan-500/50",badgeBg:"bg-cyan-500/20",badgeText:"text-cyan-300",badgeBorder:"border-cyan-400/30"}}},J=Q(),V=U();return a.jsxs(a.Fragment,{children:[a.jsxs(S.div,{className:"fixed bottom-8 left-8 z-40",initial:{opacity:0,y:50},animate:{opacity:h?0:1,y:0,x:h?-400:0,pointerEvents:h?"none":"auto"},transition:{delay:h?0:.3,duration:.6,ease:[.34,1.56,.64,1]},children:[a.jsx(Ce,{children:i&&a.jsx(S.div,{className:"absolute bottom-full left-0 mb-3 w-80",initial:{opacity:0,y:20,scale:.9},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:20,scale:.9},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:a.jsxs("div",{className:"relative",children:[a.jsx(S.div,{className:"absolute inset-0 bg-gradient-to-t from-red-500/20 via-amber-500/10 to-transparent rounded-3xl blur-xl",animate:{opacity:[.5,.8,.5],scale:[1,1.05,1]},transition:{duration:3,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}}),a.jsxs("div",{className:"relative bg-gradient-to-b from-slate-900/98 via-slate-800/95 to-slate-900/98 backdrop-blur-xl rounded-3xl border border-red-400/40 shadow-2xl overflow-hidden",children:[a.jsx("div",{className:"px-6 py-4 border-b border-red-400/20 bg-gradient-to-r from-red-500/10 to-amber-500/10",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("h3",{className:"text-red-300 font-semibold text-sm tracking-wider",children:"MODO DE RENDERIZADO"}),a.jsx(S.div,{className:"w-2 h-2 rounded-full bg-red-400",animate:{boxShadow:["0 0 10px rgba(248, 113, 113, 0.5)","0 0 20px rgba(248, 113, 113, 1)","0 0 10px rgba(248, 113, 113, 0.5)"]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}})]})}),a.jsx("div",{className:"p-4 space-y-3",children:v.map((P,_)=>{const M=c===P,T=R(P),O=(()=>{switch(P){case"low":return{bg:M?"bg-gradient-to-r from-green-500/30 via-emerald-500/30 to-green-500/30":"bg-slate-800/60",border:M?"border-2 border-green-400":"border border-green-400/20 hover:border-green-400/50",shadow:M?"shadow-lg shadow-green-500/50":"",iconBg:M?"bg-green-500":"bg-slate-700/80 group-hover:bg-slate-700",iconText:M?"text-slate-900":"text-green-300 group-hover:text-green-200",text:M?"text-white":"text-green-200 group-hover:text-green-100",indicator:"bg-green-400",glowColor:"rgba(34, 197, 94, 0.5)"};case"medium":return{bg:M?"bg-gradient-to-r from-amber-500/30 via-yellow-500/30 to-amber-500/30":"bg-slate-800/60",border:M?"border-2 border-amber-400":"border border-amber-400/20 hover:border-amber-400/50",shadow:M?"shadow-lg shadow-amber-500/50":"",iconBg:M?"bg-amber-500":"bg-slate-700/80 group-hover:bg-slate-700",iconText:M?"text-slate-900":"text-amber-300 group-hover:text-amber-200",text:M?"text-white":"text-amber-200 group-hover:text-amber-100",indicator:"bg-amber-400",glowColor:"rgba(251, 191, 36, 0.5)"};case"high":return{bg:M?"bg-gradient-to-r from-red-500/30 via-orange-500/30 to-red-500/30":"bg-slate-800/60",border:M?"border-2 border-red-400":"border border-red-400/20 hover:border-red-400/50",shadow:M?"shadow-lg shadow-red-500/50":"",iconBg:M?"bg-red-500":"bg-slate-700/80 group-hover:bg-slate-700",iconText:M?"text-slate-900":"text-red-300 group-hover:text-red-200",text:M?"text-white":"text-red-200 group-hover:text-red-100",indicator:"bg-red-400",glowColor:"rgba(239, 68, 68, 0.5)"}}})();return a.jsx(S.button,{onClick:()=>{u(P),r(!1)},className:`w-full text-left relative group ${M?"z-10":"z-0"}`,initial:{opacity:0,x:-50,rotateY:-20},animate:{opacity:1,x:0,rotateY:0},transition:{delay:_*.08,duration:.5,ease:[.34,1.56,.64,1]},whileHover:{scale:1.02,x:8},whileTap:{scale:.98},children:a.jsxs("div",{className:`relative rounded-2xl transition-all duration-500 ${O.bg} ${O.border} ${O.shadow} hover:bg-slate-800/80`,children:[M&&a.jsx(S.div,{className:"absolute inset-0 rounded-2xl",style:{background:`radial-gradient(circle at center, ${O.glowColor} 0%, transparent 70%)`},animate:{opacity:[.3,.6,.3]},transition:{duration:3,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}}),a.jsxs("div",{className:"relative flex items-center gap-4 px-4 py-3",children:[a.jsxs(S.div,{className:`flex-shrink-0 w-10 h-10 rounded-xl flex items-center justify-center font-bold text-lg relative ${O.iconBg} ${O.iconText}`,animate:M?{boxShadow:[`0 0 15px ${O.glowColor}`,`0 0 25px ${O.glowColor}`,`0 0 15px ${O.glowColor}`]}:{},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"},children:[a.jsx(T,{className:"w-5 h-5"}),M&&a.jsxs(a.Fragment,{children:[a.jsx(S.div,{className:"absolute inset-0 border-2 rounded-xl opacity-50",style:{borderColor:O.glowColor},animate:{scale:[1,1.3,1],opacity:[.5,0,.5]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeOut"}}),a.jsx(S.div,{className:"absolute inset-0 border-2 rounded-xl opacity-50",style:{borderColor:O.glowColor},animate:{scale:[1,1.5,1],opacity:[.5,0,.5]},transition:{duration:2,delay:.5,repeat:Number.POSITIVE_INFINITY,ease:"easeOut"}})]})]}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx(S.p,{className:`font-semibold text-sm transition-colors duration-300 ${O.text}`,animate:M?{textShadow:[`0 0 10px ${O.glowColor}`,`0 0 20px ${O.glowColor}`,`0 0 10px ${O.glowColor}`]}:{},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"},children:P}),M&&a.jsx(S.div,{className:"mt-1.5 h-1 bg-slate-700/50 rounded-full overflow-hidden",initial:{width:0},animate:{width:"100%"},transition:{duration:.5,delay:.2},children:a.jsx(S.div,{className:`h-full ${O.indicator}`,initial:{x:"-100%"},animate:{x:"0%"},transition:{duration:.8,delay:.3,ease:"easeOut"}})})]}),a.jsx(S.div,{className:`flex-shrink-0 w-3 h-3 rounded-full ${M?O.indicator:"bg-slate-600 group-hover:bg-slate-500"}`,animate:M?{scale:[1,1.3,1],boxShadow:[`0 0 10px ${O.glowColor}`,`0 0 20px ${O.glowColor}`,`0 0 10px ${O.glowColor}`]}:{},transition:{duration:1.5,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}})]}),a.jsx(S.div,{className:"absolute inset-0 rounded-2xl opacity-0 group-hover:opacity-100 transition-opacity duration-300",style:{background:`radial-gradient(circle at center, ${O.glowColor} 0%, transparent 70%)`}})]})},P)})}),a.jsx(S.div,{className:"px-6 py-3 border-t border-red-400/20 bg-gradient-to-r from-slate-900/50 to-slate-800/50",initial:{opacity:0},animate:{opacity:1},transition:{delay:.4},children:a.jsxs("p",{className:"text-xs text-red-300/80 text-center",children:[v.length," modos disponibles"]})})]})]})})}),a.jsx(Ce,{children:n&&a.jsx(S.div,{className:"absolute bottom-full left-0 mb-3 w-80",initial:{opacity:0,y:20,scale:.9},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:20,scale:.9},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:a.jsxs("div",{className:"relative",children:[a.jsx(S.div,{className:"absolute inset-0 bg-gradient-to-t from-cyan-500/20 via-teal-500/10 to-transparent rounded-3xl blur-xl",animate:{opacity:[.5,.8,.5],scale:[1,1.05,1]},transition:{duration:3,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}}),a.jsxs("div",{className:"relative bg-gradient-to-b from-slate-900/98 via-slate-800/95 to-slate-900/98 backdrop-blur-xl rounded-3xl border border-cyan-400/40 shadow-2xl overflow-hidden",children:[a.jsx("div",{className:"px-6 py-4 border-b border-cyan-400/20 bg-gradient-to-r from-cyan-500/10 to-teal-500/10",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("h3",{className:"text-cyan-300 font-semibold text-sm tracking-wider",children:"SELECCIONAR NIVEL"}),a.jsx(S.div,{className:"w-2 h-2 rounded-full bg-cyan-400",animate:{boxShadow:["0 0 10px rgba(34, 211, 238, 0.5)","0 0 20px rgba(34, 211, 238, 1)","0 0 10px rgba(34, 211, 238, 0.5)"]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}})]})}),a.jsxs("div",{className:"p-4 space-y-3 relative",children:[a.jsx(S.div,{className:"absolute left-10 top-8 bottom-8 w-0.5 bg-gradient-to-b from-cyan-500/50 via-teal-500/50 to-cyan-500/50",initial:{scaleY:0},animate:{scaleY:1},transition:{duration:.8,ease:"easeOut"}}),p.map((P,_)=>{const M=o===P.title,T=se(P.title);return a.jsx(S.button,{onClick:()=>{N(P.slug),l(P.title),s(!1)},className:`w-full text-left relative group ${M?"z-10":"z-0"}`,initial:{opacity:0,x:-50,rotateY:-20},animate:{opacity:1,x:0,rotateY:0},transition:{delay:_*.08,duration:.5,ease:[.34,1.56,.64,1]},whileHover:{scale:1.02,x:8},whileTap:{scale:.98},children:a.jsxs("div",{className:`relative rounded-2xl transition-all duration-500 ${M?"bg-gradient-to-r from-cyan-500/30 via-teal-500/30 to-cyan-500/30 border-2 border-cyan-400 shadow-lg shadow-cyan-500/50":"bg-slate-800/60 border border-cyan-400/20 hover:border-cyan-400/50 hover:bg-slate-800/80"}`,children:[M&&a.jsx(S.div,{className:"absolute inset-0 bg-gradient-to-r from-cyan-500/20 via-teal-500/20 to-cyan-500/20 rounded-2xl",animate:{opacity:[.5,.8,.5]},transition:{duration:3,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}}),a.jsxs("div",{className:"relative flex items-center gap-4 px-4 py-3",children:[a.jsxs(S.div,{className:`flex-shrink-0 w-10 h-10 rounded-xl flex items-center justify-center font-bold text-lg relative ${M?"bg-cyan-500 text-slate-900":"bg-slate-700/80 text-cyan-300 group-hover:bg-slate-700 group-hover:text-cyan-200"}`,animate:M?{boxShadow:["0 0 15px rgba(34, 211, 238, 0.5)","0 0 25px rgba(34, 211, 238, 0.8)","0 0 15px rgba(34, 211, 238, 0.5)"]}:{},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"},children:[a.jsx(T,{className:"w-5 h-5"}),M&&a.jsxs(a.Fragment,{children:[a.jsx(S.div,{className:"absolute inset-0 border-2 border-cyan-400/50 rounded-xl",animate:{scale:[1,1.3,1],opacity:[.5,0,.5]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeOut"}}),a.jsx(S.div,{className:"absolute inset-0 border-2 border-teal-400/50 rounded-xl",animate:{scale:[1,1.5,1],opacity:[.5,0,.5]},transition:{duration:2,delay:.5,repeat:Number.POSITIVE_INFINITY,ease:"easeOut"}})]})]}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx(S.p,{className:`font-semibold text-sm transition-colors duration-300 ${M?"text-white":"text-cyan-200 group-hover:text-cyan-100"}`,animate:M?{textShadow:["0 0 10px rgba(34, 211, 238, 0.3)","0 0 20px rgba(34, 211, 238, 0.6)","0 0 10px rgba(34, 211, 238, 0.3)"]}:{},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"},children:P.title}),M&&a.jsx(S.div,{className:"mt-1.5 h-1 bg-slate-700/50 rounded-full overflow-hidden",initial:{width:0},animate:{width:"100%"},transition:{duration:.5,delay:.2},children:a.jsx(S.div,{className:"h-full bg-gradient-to-r from-cyan-400 to-teal-400",initial:{x:"-100%"},animate:{x:"0%"},transition:{duration:.8,delay:.3,ease:"easeOut"}})})]}),a.jsx(S.div,{className:`flex-shrink-0 w-3 h-3 rounded-full ${M?"bg-cyan-400":"bg-slate-600 group-hover:bg-cyan-500/50"}`,animate:M?{scale:[1,1.3,1],boxShadow:["0 0 10px rgba(34, 211, 238, 0.5)","0 0 20px rgba(34, 211, 238, 1)","0 0 10px rgba(34, 211, 238, 0.5)"]}:{},transition:{duration:1.5,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}})]}),a.jsx(S.div,{className:"absolute inset-0 rounded-2xl opacity-0 group-hover:opacity-100 transition-opacity duration-300",style:{background:"radial-gradient(circle at center, rgba(34, 211, 238, 0.1) 0%, transparent 70%)"}})]})},P.title)})]}),a.jsx(S.div,{className:"px-6 py-3 border-t border-cyan-400/20 bg-gradient-to-r from-slate-900/50 to-slate-800/50",initial:{opacity:0},animate:{opacity:1},transition:{delay:.6},children:a.jsxs("p",{className:"text-xs text-cyan-300/80 text-center",children:[p.length," niveles disponibles"]})})]})]})})}),a.jsxs(S.button,{onClick:()=>s(!n),className:"flex items-center gap-3 px-6 py-3 bg-slate-800/90 hover:bg-slate-700/90 text-cyan-300 font-medium text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-cyan-500/50 border border-cyan-400/30 hover:border-cyan-400/60 mb-3 w-60",whileHover:{scale:1.02},whileTap:{scale:.98},animate:{borderColor:n?["rgba(34, 211, 238, 0.3)","rgba(34, 211, 238, 0.6)","rgba(34, 211, 238, 0.3)"]:"rgba(34, 211, 238, 0.3)"},transition:{borderColor:{duration:2,repeat:n?Number.POSITIVE_INFINITY:0,ease:"easeInOut"}},children:[a.jsx(Ce,{mode:"wait",children:a.jsx(S.div,{initial:{scale:0,rotate:-180,opacity:0,filter:"blur(10px)"},animate:{scale:1,rotate:0,opacity:1,filter:"blur(0px)"},exit:{scale:0,rotate:180,opacity:0,filter:"blur(10px)"},transition:{duration:.5,ease:[.34,1.56,.64,1],scale:{type:"spring",stiffness:300,damping:20}},children:a.jsx(F.Layers,{className:"w-5 h-5"})},n?"open":"closed")}),a.jsx("span",{children:x("control-panel.nivel")}),a.jsx(S.span,{className:"px-3 py-1 bg-cyan-500/20 text-cyan-300 rounded-full text-xs font-semibold border border-cyan-400/30 leading-3",initial:{opacity:0,scale:.8,y:-10},animate:{opacity:1,scale:1,y:0},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:o},`level-badge-${o}`)]}),a.jsxs(S.button,{onClick:j,className:`flex items-center gap-3 px-6 py-3 ${V.bg} ${V.text} font-medium text-sm rounded-full transition-all duration-300 ${V.shadow} border ${V.border} mb-3`,whileHover:{scale:1.05},whileTap:{scale:.95,rotate:15},animate:{scale:[1,1.02,1]},transition:{scale:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}},children:[a.jsx(Ce,{mode:"wait",children:a.jsx(S.div,{initial:{scale:0,rotate:-180,opacity:0,filter:"blur(10px)"},animate:{scale:1,rotate:0,opacity:1,filter:"blur(0px)"},exit:{scale:0,rotate:180,opacity:0,filter:"blur(10px)"},transition:{duration:.5,ease:[.34,1.56,.64,1],scale:{type:"spring",stiffness:300,damping:20}},children:a.jsx(J,{className:"w-5 h-5"})},e)}),a.jsx("span",{children:"Layer Switch"}),a.jsx(S.span,{className:`px-3 py-1 ${V.badgeBg} ${V.badgeText} rounded-full text-xs font-semibold border ${V.badgeBorder}`,initial:{opacity:0,scale:.8,y:-10},animate:{opacity:1,scale:1,y:0},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:x(`control-panel.layer.${e}`)},`badge-${e}`)]}),a.jsxs(S.button,{onClick:$,className:"flex items-center gap-3 px-6 py-3 bg-slate-800/90 hover:bg-slate-700/90 text-cyan-300 font-medium text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-cyan-500/50 border border-cyan-400/30 hover:border-cyan-400/60 mb-3",whileHover:{scale:1.05},whileTap:{scale:.95,rotate:15},animate:{scale:[1,1.02,1]},transition:{scale:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}},children:[a.jsx(Ce,{mode:"wait",children:a.jsx(S.div,{initial:{scale:0,rotate:-180,opacity:0,filter:"blur(10px)"},animate:{scale:1,rotate:0,opacity:1,filter:"blur(0px)"},exit:{scale:0,rotate:180,opacity:0,filter:"blur(10px)"},transition:{duration:.5,ease:[.34,1.56,.64,1],scale:{type:"spring",stiffness:300,damping:20}},children:a.jsx(F.Languages,{className:"w-5 h-5"})},d)}),a.jsx("span",{children:x("control-panel.idioma")}),a.jsx(S.span,{className:"px-3 py-1 bg-cyan-500/20 text-cyan-300 rounded-full text-xs font-semibold border border-cyan-400/30",initial:{opacity:0,scale:.8,y:-10},animate:{opacity:1,scale:1,y:0},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:d==="es"?"Español":"English"},`language-badge-${d}`)]}),a.jsxs(S.button,{onClick:z,className:"flex items-center gap-3 px-6 py-3 bg-slate-800/90 hover:bg-slate-700/90 text-cyan-300 font-medium text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-cyan-500/50 border border-cyan-400/30 hover:border-cyan-400/60",whileHover:{scale:1.05},whileTap:{scale:.95,rotate:15},animate:{scale:[1,1.02,1]},transition:{scale:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}},children:[a.jsx(Ce,{mode:"wait",children:a.jsx(S.div,{initial:{scale:0,rotate:-180,opacity:0,filter:"blur(10px)"},animate:{scale:1,rotate:0,opacity:1,filter:"blur(0px)"},exit:{scale:0,rotate:180,opacity:0,filter:"blur(10px)"},transition:{duration:.5,ease:[.34,1.56,.64,1],scale:{type:"spring",stiffness:300,damping:20}},children:a.jsx(F.Presentation,{className:"w-5 h-5"})},d)}),a.jsx("span",{children:x("control-panel.showcasemode")}),a.jsx(S.span,{className:"px-3 py-1 bg-cyan-500/20 text-cyan-300 rounded-full text-xs font-semibold border border-cyan-400/30",initial:{opacity:0,scale:.8,y:-10},animate:{opacity:1,scale:1,y:0},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:E?"ON":"OFF"},`showcase-badge-${E}`)]}),a.jsx(S.button,{onClick:()=>m(!h),className:"mt-3 p-2.5 bg-white/30 hover:bg-white/40 text-white rounded-full transition-all duration-300 backdrop-blur-md border-2 border-white/40 hover:border-white/60 z-[60] shadow-xl",animate:{x:[0,5,0]},transition:{x:{repeat:Number.POSITIVE_INFINITY,duration:1.5,ease:"easeInOut"}},whileHover:{scale:1.15},whileTap:{scale:.95},children:a.jsx(S.div,{animate:{rotate:h?180:0},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:a.jsx(F.ChevronLeft,{className:"w-5 h-5"})})})]}),a.jsx(Ce,{children:h&&a.jsx(S.button,{onClick:()=>m(!1),className:"fixed bottom-8 left-8 p-3 bg-white/10 hover:bg-white/20 text-white rounded-full transition-all duration-300 backdrop-blur-sm border border-white/10 hover:border-white/30 z-40",initial:{opacity:0,x:-50,scale:0},animate:{opacity:.6,x:0,scale:1},exit:{opacity:0,x:-50,scale:0},transition:{duration:.5,ease:[.34,1.56,.64,1]},whileHover:{scale:1.1,opacity:1,x:5},whileTap:{scale:.95},children:a.jsx(S.div,{animate:{x:[0,8,0]},transition:{repeat:Number.POSITIVE_INFINITY,duration:1.5,ease:"easeInOut"},children:a.jsx(F.ChevronRight,{className:"w-6 h-6"})})})})]})}function uo(){const{isConnected:e,reconnect:t}=Ut(),s={connected:{color:"bg-emerald-500",ringColor:"ring-emerald-500/30",label:"Conectado",animate:!0},connecting:{color:"bg-amber-500",ringColor:"ring-amber-500/30",label:"Conectando...",animate:!0},disconnected:{color:"bg-red-500",ringColor:"ring-red-500/30",label:"Desconectado",animate:!1}}[e?"connected":"disconnected"],i=!e&&t;return a.jsxs("div",{className:bn("fixed z-50 flex items-center gap-2 rounded-full bg-background/80 backdrop-blur-sm px-3 py-2 shadow-lg","top-1 right-2",i&&"cursor-pointer hover:bg-accent transition-colors"),onClick:i?t:void 0,role:i?"button":void 0,"aria-label":i?"Reconectar WebSocket":`Estado: ${s.label}`,children:[a.jsxs("div",{className:"relative flex items-center justify-center",children:[a.jsx("div",{className:bn("w-2.5 h-2.5 rounded-full",s.color,s.animate&&"animate-pulse")}),s.animate&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:bn("absolute w-2.5 h-2.5 rounded-full ring-2",s.ringColor,"animate-ping")}),a.jsx("div",{className:bn("absolute w-4 h-4 rounded-full ring-1",s.ringColor)})]})]}),a.jsx("div",{className:"flex items-center gap-1",children:a.jsx("div",{className:"h-0.5 w-8 relative overflow-hidden transition-all duration-500 bg-emerald-500",children:a.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-green-300 to-transparent animate-flow-right"})})}),a.jsx("div",{className:"relative flex items-center justify-center",children:a.jsx("div",{className:"w-2.5 h-2.5"})}),!1,!1]})}function fo({children:e}){const t=Ii();if(!t)return a.jsx(a.Fragment,{children:e});const{isMinimized:n}=t;return a.jsxs(a.Fragment,{children:[a.jsx(S.div,{className:"relative w-full h-full",initial:!1,animate:{scaleY:n?0:1,opacity:n?0:1},transition:{duration:.6,ease:[.4,0,.2,1]},style:{transformOrigin:"bottom"},children:e}),a.jsx(Np,{})]})}const ho=()=>{const{isAutoMode:e}=lo(),{pathname:t}=Se.useLocation(),n=Se.useNavigate(),s=b.useRef(null),i=xe()?.showcasesUrl??[],r=xe().showcasesWait??12e4,o=()=>{const d=(i.indexOf(t)+1)%i.length;n(i[d])},l=()=>{s.current&&clearInterval(s.current),s.current=setInterval(o,r)},c=()=>{s.current&&(clearInterval(s.current),s.current=null)};b.useEffect(()=>(e?l():c(),()=>c()),[e]),b.useEffect(()=>{e&&l()},[t,e])};function vb({showControlPanel:e=!0,iframeSrc:t=""}){return ho(),a.jsxs("div",{className:"relative w-full h-screen overflow-hidden bg-transparent",children:[a.jsx("div",{className:"z-1 fixed inset-0",children:a.jsx("iframe",{id:"vagonFrame",allow:"microphone *; clipboard-read *; clipboard-write *; encrypted-media *; fullscreen *;",className:"z-1 w-full h-screen",src:t})}),a.jsx(fo,{children:a.jsxs("div",{className:"relative z-10 h-full bg-transparent",children:[a.jsx(Se.Outlet,{}),e&&a.jsx(co,{})]})}),a.jsx(uo,{})]})}function wb({showControlPanel:e=!0}){return ho(),a.jsxs("div",{className:"relative w-full h-screen overflow-hidden bg-transparent",children:[a.jsx("div",{className:"pointer-events-none absolute top-0 left-0 w-full h-50 bg-gradient-to-b from-[#17252c]/70 to-transparent"}),a.jsx(fo,{children:a.jsxs("div",{className:"relative z-10 h-full bg-transparent",children:[a.jsx(Se.Outlet,{}),e&&a.jsx(co,{})]})}),a.jsx(uo,{})]})}function mo({items:e,parent:t,selectedShip:n,onShipSelect:s}){const[i,r]=b.useState(0),[o,l]=b.useState(!1),[c,u]=b.useState(6),[d,f]=b.useState(!0),[h,m]=b.useState(0),[p,y]=b.useState("slide"),[v,x]=b.useState(160),{t:C}=jt.useTranslation(),{lastEvent:N,internalEvent:I,setInternalEvent:A}=vt(),k=xe().cinematics??!1,E=xe().cinematicsOnChangeLocation??!1;k&&(b.useEffect(()=>{N?.payload?.type==="cinematics"&&N?.payload?.action==="end"&&f(!0)},[N]),b.useEffect(()=>{if(I?.payload?.type==="cinematics"){const V=I?.payload?.action;V==="start"&&f(!1),V==="end"&&f(!0)}},[I]));const w=V=>{const _=(Math.ceil(R.length/c)-1)*c*v;return V>0?0:Math.abs(V)>_?-_:V},j=V=>-(V*c*v),$=V=>{const P=Math.floor(c/2),_=Math.floor(V/c),M=(V-_*c-P)*v,T=-(_*c*v+M);return w(T)},z=Se.useNavigate(),Q=xe().baseUrl??"",R=e;b.useEffect(()=>{const V=()=>{let P;window.innerWidth<640?(u(2),P=120):window.innerWidth<768?(u(3),P=140):window.innerWidth<1024?(u(4),P=160):(u(6),P=180),x(P)};return V(),window.addEventListener("resize",V),()=>window.removeEventListener("resize",V)},[]),b.useEffect(()=>{if(!n){r(0),y("center"),m($(0));return}const V=R.findIndex(_=>_.slug===n);if(V===-1){r(0),y("center"),m($(0));return}const P=Math.floor(V/c);P!==i&&r(P),y("center"),m($(V))},[n,c,v,R]),b.useEffect(()=>{if(p==="slide")m(j(i));else{const V=R.findIndex(P=>P.slug===n);V!==-1&&m($(V))}},[c,v]);const se=V=>{s(V),y("center");const P=R.findIndex(_=>_.slug===V);P!==-1&&m($(P)),z(`${t?`/${t}/`:"/"}${V}`),k&&E&&A({...Yt})},U=()=>{const V=Math.ceil(R.length/c),P=(i+1)%V;y("slide"),r(P),m(j(P))},J=()=>{const V=Math.ceil(R.length/c),P=(i-1+V)%V;y("slide"),r(P),m(j(P))};return a.jsxs(Ce,{children:[d&&a.jsxs(S.div,{className:"absolute top-0 left-0 right-0 flex flex-col items-center justify-center z-10",initial:{opacity:0,y:-50},animate:{opacity:o?0:1,y:o?-200:0,pointerEvents:o?"none":"auto"},transition:{duration:.6,ease:[.34,1.56,.64,1]},exit:{opacity:0,y:-50,scale:.8},children:[a.jsxs(S.div,{className:"relative flex items-center justify-center w-full max-w-7xl",animate:{y:0},transition:{duration:.3,ease:"easeInOut"},children:[a.jsx(S.button,{className:"absolute left-1 sm:left-2 md:left-4 z-20 w-8 h-8 sm:w-10 sm:h-10 bg-slate-900/40 backdrop-blur-sm rounded-full border border-blue-400/20 hover:border-blue-400/40 flex items-center justify-center text-white/60 hover:text-white transition-all duration-300 hover:bg-slate-800/60",onClick:J,whileHover:{scale:1.05,x:-2},whileTap:{scale:.95},disabled:i===0,style:{opacity:i===0?.3:1,pointerEvents:i===0?"none":"auto"},children:a.jsx(F.ArrowLeft,{className:"w-3 h-3 sm:w-4 sm:h-4"})}),a.jsx("div",{className:"flex p-2 sm:p-4 mx-10 sm:mx-16 overflow-hidden",children:a.jsx(S.div,{className:"flex space-x-2 sm:space-x-4 md:space-x-8",animate:{x:h},transition:{duration:.6,ease:[.25,.46,.45,.94]},children:R.map((V,P)=>a.jsxs(S.div,{className:`flex flex-col gap-1 items-center cursor-pointer group min-w-[100px] sm:min-w-[120px] md:min-w-[144px] ${n===V.slug?"scale-110":""}`,onClick:()=>se(V.slug),whileHover:{scale:1.05,y:-4},whileTap:{scale:.98},initial:{opacity:0,y:20},animate:{opacity:1,y:0,transition:{delay:P*.1}},children:[a.jsxs("div",{className:`relative w-24 h-24 sm:w-28 sm:h-28 md:w-32 md:h-32 flex flex-col gap-1 align-bottom items-center justify-end py-2 sm:pt-4 rounded-lg transition-all duration-500 ${n===V.slug?"bg-blue-700/80 shadow-lg shadow-blue-500/30 border border-blue-400/50":"bg-zinc-500/1 hover:bg-blue-900/40 border border-transparent hover:border-blue-600/30"}`,children:[a.jsx("div",{className:"w-full h-12 sm:h-16 relative flex items-center justify-center px-4",children:a.jsx("img",{src:`${Q.replace(/\/$/,"")}/images/shapes/${V.icon??V.slug}.png`,alt:V.name,width:120,height:40,className:"object-contain brightness-200 filter transition-all duration-300 group-hover:brightness-300"})}),a.jsx("div",{className:" text-center",children:a.jsx("div",{className:"text-cyan-300 text-xs sm:text-sm font-medium transition-colors duration-300 group-hover:text-cyan-200",children:C(V.name)})})]}),V.label&&a.jsx("div",{className:"mt-1",children:a.jsx("span",{className:`text-[10px] sm:text-xs px-2 sm:px-3 py-1 rounded-md transition-all duration-300 ${n===V.slug?"bg-cyan-500/80 text-blue-900 shadow-md":"bg-blue-900/60 text-cyan-300 group-hover:bg-blue-800/70 group-hover:text-cyan-200"}`,children:V.label})})]},V.slug))})}),a.jsx(S.button,{className:"absolute right-1 sm:right-2 md:right-4 z-20 w-8 h-8 sm:w-10 sm:h-10 bg-slate-900/40 backdrop-blur-sm rounded-full border border-blue-400/20 hover:border-blue-400/40 flex items-center justify-center text-white/60 hover:text-white transition-all duration-300 hover:bg-slate-800/60",onClick:U,whileHover:{scale:1.05,x:2},whileTap:{scale:.95},disabled:i===Math.ceil(R.length/c)-1,style:{opacity:i===Math.ceil(R.length/c)-1?.3:1,pointerEvents:i===Math.ceil(R.length/c)-1?"none":"auto"},children:a.jsx(F.ArrowLeft,{className:"w-3 h-3 sm:w-4 sm:h-4 rotate-180"})})]}),a.jsx(S.button,{onClick:()=>l(!0),className:"p-2 bg-white/10 hover:bg-white/20 text-white rounded-full transition-all duration-300 backdrop-blur-sm border border-white/10 hover:border-white/30 z-50",initial:{opacity:0,scale:0},animate:{opacity:.6,scale:1,y:[0,5,0]},exit:{opacity:0,y:-50,scale:0},transition:{duration:.5,ease:[.34,1.56,.64,1]},whileHover:{scale:1.1,opacity:1},whileTap:{scale:.95},children:a.jsx(S.div,{animate:{rotate:o?180:0},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:a.jsx(F.ChevronUp,{className:"w-5 h-5"})})})]}),o&&a.jsx(S.button,{onClick:()=>l(!1),className:"absolute top-8 left-1/2 -translate-x-1/2 p-3 bg-white/10 hover:bg-white/20 text-white rounded-full transition-all duration-300 backdrop-blur-sm border border-white/10 hover:border-white/30 z-40",initial:{opacity:0,y:-50,scale:0},animate:{opacity:.6,y:0,scale:1},exit:{opacity:0,y:-50,scale:0},transition:{duration:.5,ease:[.34,1.56,.64,1]},whileHover:{scale:1.1,opacity:1,y:5},whileTap:{scale:.95},children:a.jsx(S.div,{animate:{y:[0,8,0]},transition:{repeat:Number.POSITIVE_INFINITY,duration:1.5,ease:"easeInOut"},children:a.jsx(F.ChevronDown,{className:"w-6 h-6"})})})]})}const Sb=({items:e,world:t,worldSlug:n=t})=>{const[s,i]=b.useState(""),r={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},o=Se.useLocation(),l=Se.useNavigate(),{t:c}=jt.useTranslation(),{setInternalEvent:u}=vt(),d=xe().cinematics??!1,f=xe().cinematicsOnChangeLocation??!1;b.useEffect(()=>{o.pathname===`/${n}`?i(""):o.pathname.startsWith(n?`/${n}/`:"/")&&i(o.pathname.replace(n?`/${n}/`:"/",""))},[o]),b.useEffect(()=>{const v=x=>{const C=["INPUT","TEXTAREA"].includes(x.target.tagName),N=document.querySelector(".yarl__container"),I=document.querySelector(".simulation-mode");C||N||I||(x.key==="ArrowLeft"?(x.preventDefault(),y()):x.key==="ArrowRight"&&(x.preventDefault(),p()))};return window.addEventListener("keydown",v),()=>{window.removeEventListener("keydown",v)}},[s]),b.useEffect(()=>{let v=0,x=0,C=!1;const N=k=>{const E=k.target,w=document.getElementById("ItemPage");C=E===w,C&&(v=k.changedTouches[0].screenX)},I=k=>{C&&(x=k.changedTouches[0].screenX,A())},A=()=>{const k=x-v;Math.abs(k)<50||(k>0?y():p())};return window.addEventListener("touchstart",N),window.addEventListener("touchend",I),()=>{window.removeEventListener("touchstart",N),window.removeEventListener("touchend",I)}},[s]);const h=()=>{const x=(e.findIndex(C=>C.slug===s)+1)%e.length;return e[x]},m=()=>{const x=(e.findIndex(C=>C.slug===s)-1+e.length)%e.length;return e[x]},p=()=>{const v=h();i(v.slug),l(`${n}/${v.slug}`),d&&f&&u({...Yt})},y=()=>{const v=m();i(v.slug),l(`${n}/${v.slug}`),d&&f&&u({...Yt})};return a.jsxs(S.div,{className:"relative w-full h-full",variants:r,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.8},children:[a.jsx(mo,{parent:n,items:e,onShipSelect:i,selectedShip:s}),s&&a.jsxs(a.Fragment,{children:[a.jsxs(S.button,{className:"absolute left-4 top-1/2 transform -translate-y-1/2 w-12 h-12 bg-slate-900/40 backdrop-blur-sm rounded-full border border-blue-400/20 hover:border-blue-400/60 flex items-center justify-center text-white/60 hover:text-white transition-all duration-300 hover:bg-slate-800/60 group z-30",initial:"initial",animate:"animate",whileHover:"hover",whileTap:{scale:.95},onClick:y,children:[a.jsx(F.ArrowLeft,{className:"w-6 h-6 transition-transform duration-300 group-hover:scale-110"}),a.jsxs(S.div,{className:"absolute left-16 top-1/2 transform -translate-y-1/2 bg-slate-900/95 backdrop-blur-md rounded-lg px-3 py-2 border border-blue-400/30 shadow-xl opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none whitespace-nowrap",children:[a.jsx("span",{className:"text-blue-100 font-medium text-sm",children:c("layout.anterior")}),a.jsx("div",{className:"absolute right-full top-1/2 transform -translate-y-1/2 w-0 h-0 border-t-4 border-b-4 border-r-4 border-transparent border-r-slate-900/95"})]}),a.jsx("div",{className:"absolute inset-0 rounded-full border border-blue-400/30 scale-0 group-hover:scale-125 opacity-0 group-hover:opacity-100 transition-all duration-500"})]}),a.jsxs(S.button,{className:"absolute right-4 top-1/2 transform -translate-y-1/2 w-12 h-12 bg-slate-900/40 backdrop-blur-sm rounded-full border border-blue-400/20 hover:border-blue-400/60 flex items-center justify-center text-white/60 hover:text-white transition-all duration-300 hover:bg-slate-800/60 group z-30",initial:"initial",animate:"animate",whileHover:"hover",whileTap:{scale:.95},onClick:p,children:[a.jsx(F.ArrowLeft,{className:"w-6 h-6 rotate-180 transition-transform duration-300 group-hover:scale-110"}),a.jsxs(S.div,{className:"absolute right-16 top-1/2 transform -translate-y-1/2 bg-slate-900/95 backdrop-blur-md rounded-lg px-3 py-2 border border-blue-400/30 shadow-xl opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none whitespace-nowrap",children:[a.jsx("span",{className:"text-blue-100 font-medium text-sm",children:c("layout.siguiente")}),a.jsx("div",{className:"absolute left-full top-1/2 transform -translate-y-1/2 w-0 h-0 border-t-4 border-b-4 border-l-4 border-transparent border-l-slate-900/95"})]}),a.jsx("div",{className:"absolute inset-0 rounded-full border border-blue-400/30 scale-0 group-hover:scale-125 opacity-0 group-hover:opacity-100 transition-all duration-500"})]})]}),a.jsx(Se.Outlet,{})]})},xu=b.createContext(void 0);function Tb({children:e}){const{isMobile:t}=Li(),n=xe().videosBaseUrl,s=t?"videos/movil":"videos",[i,r]=b.useState(""),[o,l]=b.useState(!1),c=(u,d=!0)=>{const f=`${n.replace(/\/$/,"")}/${s}/${u}`;f!==i&&(d?(l(!0),setTimeout(()=>{r(f),setTimeout(()=>l(!1),300)},150)):r(f))};return a.jsx(xu.Provider,{value:{currentVideo:i,setVideo:c,isTransitioning:o},children:e})}function vu(){const e=b.useContext(xu);return e===void 0?{currentVideo:"",setVideo:()=>{},isTransitioning:!1}:e}const po=({returnUrlOnEnded:e})=>{const{currentVideo:t,isTransitioning:n}=vu(),s=Se.useNavigate(),i=b.useRef(null),[r,o]=b.useState(t),l=()=>{e&&s(e)},c=u=>u.replace(/\.mp4$/i,".webp");return b.useEffect(()=>{t!==r&&(i.current&&(i.current.pause(),i.current.removeAttribute("src"),i.current.load()),o(t))},[t,r]),b.useEffect(()=>{i.current&&r&&i.current.play().catch(u=>{console.warn("Error al intentar autoPlay del video:",u)})},[r]),a.jsxs("div",{className:"absolute inset-0 w-full h-full",children:[a.jsx(Ce,{children:n&&a.jsx(S.div,{className:"absolute inset-0 bg-black z-10",initial:{opacity:0},animate:{opacity:.3},exit:{opacity:0},transition:{duration:.15}})}),a.jsx(S.video,{ref:i,autoPlay:!0,loop:!e,muted:!0,playsInline:!0,className:"absolute inset-0 w-full h-full object-cover",onEnded:l,initial:{opacity:0},animate:{opacity:1},transition:{duration:.3},src:r,poster:c(r)},r)]})};function Eb({className:e}){const n=e!==void 0?e:"fixed inset-0 overflow-hidden bg-slate-900";return a.jsxs("div",{className:n,children:[a.jsx(po,{}),a.jsx("div",{className:"relative z-10 h-full",children:a.jsx(Se.Outlet,{})})]})}function Cb({x:e,y:t,dest:n}){const s=Se.useNavigate(),i=r=>{s(`/product/${r}`)};return a.jsxs(S.button,{className:`absolute ${e} ${t} w-8 h-8 bg-gradient-to-br from-blue-500 to-indigo-700 rounded-full shadow-2xl border-2 border-blue-300/50 backdrop-blur-sm flex items-center justify-center group overflow-hidden`,initial:"initial",animate:"animate",whileHover:"hover",whileTap:"tap",onClick:()=>i(n),children:[a.jsx("div",{className:"absolute inset-1 bg-gradient-to-br from-blue-300/30 to-transparent rounded-full"}),a.jsx("div",{className:"relative w-2.5 h-2.5 bg-white rounded-full group-hover:scale-125 transition-all duration-300 shadow-lg",children:a.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-200 to-white rounded-full animate-pulse"})}),a.jsx("div",{className:"absolute inset-0 rounded-full border border-blue-300/60 animate-ping"}),a.jsx("div",{className:"absolute inset-1 rounded-full border border-blue-400/40 animate-pulse"}),a.jsx("div",{className:"absolute inset-0 rounded-full border border-transparent border-t-blue-300 animate-spin",style:{animationDuration:"3s"}}),a.jsxs(S.div,{className:"absolute right-12 top-1/2 transform -translate-y-1/2 bg-slate-900/95 backdrop-blur-md rounded-lg p-4 border border-blue-400/30 shadow-xl min-w-64 group-hover:opacity-100 transition-opacity duration-300",initial:{opacity:0,x:20,scale:.8},animate:{opacity:0,x:20,scale:.8},whileHover:{opacity:1,x:0,scale:1},transition:{duration:.3},style:{pointerEvents:"none"},children:[a.jsx("h3",{className:"text-blue-300 font-bold text-lg mb-1",children:"SUBMARINO S80"}),a.jsx("p",{className:"text-blue-100/80 text-sm leading-relaxed",children:"Submarino de propulsión AIP con capacidades stealth y sistemas de combate integrados de última generación."}),a.jsx("div",{className:"absolute left-full top-1/2 transform -translate-y-1/2 w-0 h-0 border-t-8 border-b-8 border-l-8 border-transparent border-l-slate-900/95"})]})]})}function go({home:e,item:t}){const[n,s]=b.useState({width:0,height:0}),[i,r]=b.useState(!0),[o,l]=b.useState(!1),[c,u]=b.useState(!1),[d,f]=b.useState(""),[h,m]=b.useState(!1),[p,y]=b.useState(!1),[v,x]=b.useState(!1),[C,N]=b.useState(!1),[I,A]=b.useState(!1),[k,E]=b.useState(""),[w,j]=b.useState(!1),$=Se.useNavigate(),{lastEvent:z,internalEvent:Q,setInternalEvent:R}=vt(),se=xe().cinematics??!1,U=xe().cinematicsOnChangeLocation??!1;se&&(b.useEffect(()=>{z?.payload?.type==="cinematics"&&z?.payload?.action==="end"&&r(!0)},[z]),b.useEffect(()=>{if(Q?.payload?.type==="cinematics"){const T=Q?.payload?.action;T==="start"&&r(!1),T==="end"&&r(!0)}},[Q])),b.useEffect(()=>{const T=()=>{s({width:window.innerWidth,height:window.innerHeight})};return T(),window.addEventListener("resize",T),()=>window.removeEventListener("resize",T)},[]);const J=()=>{l(!0),r(!1)},V=()=>{l(!1),r(!0)},P=T=>{$(T),se&&U&&R({...Yt})},_=T=>!!T?.trim(),M=T=>T?.endsWith(".webm")||T?.endsWith(".mp4");return a.jsxs(Ce,{children:[i&&a.jsx(S.div,{className:"absolute bottom-4 sm:bottom-6 md:bottom-10 left-1/2 transform -translate-x-1/2 w-full max-w-[90%] sm:max-w-[85%] md:max-w-4xl px-4 sm:px-6 md:px-8 z-9999",initial:{opacity:0,y:50},animate:{opacity:1,y:0},transition:{delay:.8,duration:.6},exit:{opacity:0,y:50,scale:.8,transition:{delay:0,duration:.6}},children:a.jsxs("div",{className:"flex flex-col gap-6 backdrop-blur-xs border p-3 sm:p-4 md:p-6 text-center border-transparent max-w-6xl mx-auto title-section bg-gradient-to-t from-[#17252c]/70 to-[#17252c]/5 rounded-xl sm:rounded-2xl",children:[a.jsx("h1",{className:"text-xl sm:text-3xl md:text-4xl lg:text-5xl font-light text-white mb-2 sm:mb-4 tracking-wide",children:t?.title}),a.jsx("p",{className:"text-xs sm:text-sm md:text-base text-blue-100/90 font-light leading-relaxed max-w-5xl mx-auto mb-3 sm:mb-4 md:mb-6",children:t?.subtitle}),a.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-2 sm:gap-3 md:gap-4",children:[!1,e&&a.jsxs(a.Fragment,{children:[a.jsx(S.button,{className:"inline-flex items-center gap-1 sm:gap-2 px-3 sm:px-4 md:px-6 py-2 sm:py-3 bg-slate-800/80 hover:bg-slate-700/80 text-cyan-300 font-medium text-xs sm:text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-slate-500/25 border border-cyan-400/30 hover:border-cyan-400/60",whileHover:{scale:1.05},whileTap:{scale:.95},initial:{opacity:0},animate:{opacity:1},transition:{delay:0,duration:.6},onClick:()=>{P(e)},children:a.jsx(F.Home,{className:"w-3 h-3 sm:w-4 sm:h-4"})}),t?.simulation&&a.jsx(xc,{onClick:()=>m(!0)}),_(t?.playMedia?.url)&&a.jsx(Pi,{Icon:F.Video,onClick:()=>{f(t.playMedia.url),u(!0)}}),t?.webUrl&&a.jsx(Pi,{Icon:F.ExternalLink,onClick:()=>x(!0)}),(t?.links?.length??0)>0&&t?.links?.map(T=>a.jsx(Un,{item:T,onClick:()=>{M(T.url)?(f(T.url.trim()),u(!0)):(E(T.url),A(T.transparent),N(!0)),T.transparent===!0&&se&&R({...Yt})}})),(t?.cards?.length??0)>0&&a.jsx(Wl,{onClick:()=>y(!0)}),(t?.nodesId??0)>0&&a.jsx(yc,{label:t?.shortName??t.title,onClick:J})]})]})]})}),o&&t?.nodesId&&a.jsx(gb,{isOpen:o,onClose:V,size:n,hotspot:t.nodesId}),c&&a.jsx(mu,{source:d,onClose:()=>u(!1)}),h&&a.jsx(gu,{item:t.simulation,onClose:()=>m(!1)},t?.slug),p&&a.jsx(vc,{cards:t.cards,onClose:()=>y(!1)}),v&&a.jsx(Ht,{src:t.webUrl,onClose:()=>x(!1)}),C&&a.jsx(Ht,{src:k,transparent:I,onClose:()=>{const T=I;N(!1),E(""),A(!1),T===!0&&se&&R({...gc})}}),w&&a.jsx(Pp,{onClose:()=>j(!1)})]})}const Nb=({video:e,returnUrl:t})=>{console.log(e);const n=Se.useNavigate(),s={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},i=()=>{n(t)},{t:r}=jt.useTranslation();return a.jsx(a.Fragment,{children:a.jsxs("div",{className:"fixed inset-0 overflow-hidden bg-slate-900",children:[a.jsx(po,{returnUrlOnEnded:t}),a.jsx("div",{className:"relative z-10 h-full",children:a.jsx(S.div,{className:"relative w-full h-full",variants:s,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.8},children:a.jsx(S.div,{className:"absolute inset-0 bg-black/20 flex items-center justify-center",initial:{opacity:0},animate:{opacity:1},transition:{duration:.5},children:a.jsx(S.button,{className:"absolute bottom-8 right-8 px-4 py-2 bg-slate-900/80 backdrop-blur-md rounded-lg text-white/90 text-sm border border-white/20 hover:border-white/40 hover:bg-slate-800/90 transition-all duration-300 hover:text-white",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:1},whileHover:{scale:1.05},whileTap:{scale:.95},onClick:i,children:r("layout.skip")})})})})]})})},kb=({world:e,worldSlug:t=e,overlay:n=!1,itemsData:s})=>{const[i,r]=b.useState(null),{itemSlug:o}=Se.useParams();b.useEffect(()=>{if(o){const c=s.find(u=>u.slug===o);c&&r(c)}},[o]);const l={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}};return i?a.jsx(a.Fragment,{children:a.jsxs(S.div,{className:"relative w-full h-full",variants:l,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.8},children:[n&&a.jsx("div",{id:"ItemPage",className:"absolute inset-0 bg-gradient-to-b from-slate-900/30 via-transparent to-slate-900/50"}),a.jsx(go,{home:`/${t}`,item:i})]})}):a.jsx("div",{className:"relative w-full h-screen overflow-hidden bg-slate-900 flex items-center justify-center",children:a.jsx("div",{className:"text-white text-2xl",children:"Producto no encontrado"})})},Pb=({world:e,worldSlug:t=e,overlay:n=!1,itemsData:s})=>{const[i,r]=b.useState(null),{itemSlug:o}=Se.useParams(),l=Se.useNavigate();b.useEffect(()=>{if(o){const u=s.find(d=>d.slug===o);u&&(r(u),console.log(JSON.stringify(u)))}},[o]);const c={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}};return i?a.jsx(a.Fragment,{children:a.jsxs(S.div,{className:"relative w-full h-full",variants:c,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.8},children:[n&&a.jsx("div",{id:"ItemPage",className:"absolute inset-0 bg-gradient-to-b from-slate-900/30 via-transparent to-slate-900/50"}),a.jsx(gu,{item:i.simulation,onClose:()=>l(`/${t}`)},o)]})}):a.jsx("div",{className:"relative w-full h-screen overflow-hidden bg-slate-900 flex items-center justify-center",children:a.jsx("div",{className:"text-white text-2xl",children:"Producto no encontrado"})})},jb=({items:e,world:t,overlay:n=!1,title:s})=>{const[i,r]=b.useState(""),o={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}};return a.jsx(Ce,{children:a.jsxs(S.div,{className:"relative w-full h-full",variants:o,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.8},children:[n&&a.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-slate-900/20 via-transparent to-slate-900/40"}),e&&a.jsx(mo,{parent:t,items:e,onShipSelect:r,selectedShip:i}),a.jsx(go,{home:"/",item:s})]})})},Ib=()=>{const e=Se.useLocation(),{sendMessage:t}=Ut(),n=xe().wsRoom;return b.useEffect(()=>{console.log("RouteListener: "+e.pathname+e.hash),t({type:"publish",room:n,payload:{type:"camera",target:pc(e.pathname)}})},[e]),null};q.CardsButton=Wl,q.ControlPanel=co,q.DynamicLucideIcon=Yl,q.EventProvider=Om,q.FontSizeManager=yb,q.FullScreenPage=Nb,q.IconButton=Pi,q.InfoCard=ao,q.ItemPage=kb,q.Layout=Eb,q.LayoutIframe=vb,q.LayoutTransparent=wb,q.LayoutWorld=Sb,q.LinkItemButton=Un,q.MinimizeProvider=Am,q.MinimizeWrapper=fo,q.NodosButton=yc,q.PointButton=Cb,q.RouteListener=Ib,q.ShipNavigation=mo,q.ShowcaseProvider=xb,q.SimulacionButton=xc,q.SlidePage=Pb,q.TabView=pu,q.TitleSection=go,q.VideoBackground=po,q.VideoProvider=Tb,q.WebSocketProvider=Cp,q.WebSocketStatusWidget=uo,q.WorldPage=jb,q.cinematicsEndEvent=gc,q.cinematicsStartEvent=Yt,q.cn=bn,q.codigoANombre=Tp,q.getConfig=xe,q.initLibConfig=Su,q.nombreACodigo=mc,q.toTarget=pc,q.toVideo=Ep,q.useAutoModeTimer=ho,q.useEvent=vt,q.useMinimize=Vm,q.useOptionalMinimize=Ii,q.useScreenSize=Li,q.useShowcase=lo,q.useVideo=vu,q.useWebSocket=Ut,Object.defineProperty(q,Symbol.toStringTag,{value:"Module"})}));
519
+ `})]})})}const bu="app-font-size",bb="100",yb=()=>{const[e,t]=Se.useSearchParams(),n=e.get("size"),s=localStorage.getItem(bu);let i=bb;return n&&!isNaN(parseInt(n))?i=n:s&&!isNaN(parseInt(s))&&(i=s),b.useEffect(()=>{document.documentElement.style.fontSize=`${i}%`,n&&localStorage.setItem(bu,n)},[i,n,e,t]),null},yu=b.createContext(void 0),xb=({children:e})=>{const[t,n]=b.useState(!1),s=()=>n(i=>!i);return a.jsx(yu.Provider,{value:{isAutoMode:t,setIsAutoMode:n,toggleAutoMode:s},children:e})},lo=()=>{const e=b.useContext(yu);if(!e)throw new Error("useShowcase debe usarse dentro de un ShowcaseProvider");return e};function co(){const[e,t]=b.useState("physical"),[n,s]=b.useState(!1),[i,r]=b.useState(!1),[o,l]=b.useState(0),[c,u]=b.useState("high"),[d,f]=b.useState("es"),[h,m]=b.useState(!0),p=xe().controlPanelLevels,y=["physical","hybrid","digital"],v=["high","medium","low"],{t:x,i18n:C}=ot.useTranslation(),N=Se.useNavigate(),I=Se.useLocation(),{sendMessage:A}=Ht(),k=xe().wsRoom,{isAutoMode:E,toggleAutoMode:w}=lo();b.useEffect(()=>{C.changeLanguage(d)},[d]),b.useEffect(()=>{if(console.log("Location en control-panel: "+I.pathname),I.pathname!=="/"){const P=p.filter(_=>_.slug.length>1).find(_=>I.pathname.startsWith(_.slug));P&&(console.log("Se va a seleccionar "+P.title),l(p.indexOf(P)))}},[I]),b.useEffect(()=>{A({type:"publish",room:k,payload:{type:"layer",target:e}})},[e]);const j=()=>{t(P=>{const M=(y.indexOf(P)+1)%y.length;return y[M]})},$=()=>{f(P=>P==="es"?"en":"es")},z=()=>{w()},Q=()=>{switch(e){case"physical":return F.Box;case"hybrid":return F.GitMerge;case"digital":return F.Cpu;default:return F.Layers}},R=P=>{switch(P){case"low":return F.Zap;case"medium":return F.Scale;case"high":return F.Flame;default:return F.Gauge}},se=P=>{switch(P){case"Navantia Global":return F.Globe;case"Smart Catalogue":return F.BookOpen;case"Coex":return F.Network;case"Plataformas Navales":return F.Ship;case"Desarrollos tecnológicos":return F.Zap;default:return F.Layers}},U=()=>{switch(e){case"physical":return{bg:"bg-slate-700/90 hover:bg-slate-600/90",text:"text-blue-200",border:"border-slate-400/30 hover:border-slate-400/60",shadow:"shadow-lg hover:shadow-slate-500/50",badgeBg:"bg-slate-600/20",badgeText:"text-blue-200",badgeBorder:"border-slate-400/30"};case"hybrid":return{bg:"bg-teal-900/90 hover:bg-teal-800/90",text:"text-teal-300",border:"border-teal-400/30 hover:border-teal-400/60",shadow:"shadow-lg hover:shadow-teal-500/50",badgeBg:"bg-teal-500/20",badgeText:"text-teal-300",badgeBorder:"border-teal-400/30"};case"digital":return{bg:"bg-sky-900/90 hover:bg-sky-800/90",text:"text-sky-300",border:"border-sky-400/30 hover:border-sky-400/60",shadow:"shadow-lg hover:shadow-sky-500/50",badgeBg:"bg-sky-500/20",badgeText:"text-sky-300",badgeBorder:"border-sky-400/30"};default:return{bg:"bg-slate-800/90 hover:bg-slate-700/90",text:"text-cyan-300",border:"border-cyan-400/30 hover:border-cyan-400/60",shadow:"shadow-lg hover:shadow-cyan-500/50",badgeBg:"bg-cyan-500/20",badgeText:"text-cyan-300",badgeBorder:"border-cyan-400/30"}}},J=Q(),V=U();return a.jsxs(a.Fragment,{children:[a.jsxs(S.div,{className:"fixed bottom-8 left-8 z-40",initial:{opacity:0,y:50},animate:{opacity:h?0:1,y:0,x:h?-400:0,pointerEvents:h?"none":"auto"},transition:{delay:h?0:.3,duration:.6,ease:[.34,1.56,.64,1]},children:[a.jsx(Ce,{children:i&&a.jsx(S.div,{className:"absolute bottom-full left-0 mb-3 w-80",initial:{opacity:0,y:20,scale:.9},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:20,scale:.9},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:a.jsxs("div",{className:"relative",children:[a.jsx(S.div,{className:"absolute inset-0 bg-gradient-to-t from-red-500/20 via-amber-500/10 to-transparent rounded-3xl blur-xl",animate:{opacity:[.5,.8,.5],scale:[1,1.05,1]},transition:{duration:3,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}}),a.jsxs("div",{className:"relative bg-gradient-to-b from-slate-900/98 via-slate-800/95 to-slate-900/98 backdrop-blur-xl rounded-3xl border border-red-400/40 shadow-2xl overflow-hidden",children:[a.jsx("div",{className:"px-6 py-4 border-b border-red-400/20 bg-gradient-to-r from-red-500/10 to-amber-500/10",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("h3",{className:"text-red-300 font-semibold text-sm tracking-wider",children:"MODO DE RENDERIZADO"}),a.jsx(S.div,{className:"w-2 h-2 rounded-full bg-red-400",animate:{boxShadow:["0 0 10px rgba(248, 113, 113, 0.5)","0 0 20px rgba(248, 113, 113, 1)","0 0 10px rgba(248, 113, 113, 0.5)"]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}})]})}),a.jsx("div",{className:"p-4 space-y-3",children:v.map((P,_)=>{const M=c===P,T=R(P),O=(()=>{switch(P){case"low":return{bg:M?"bg-gradient-to-r from-green-500/30 via-emerald-500/30 to-green-500/30":"bg-slate-800/60",border:M?"border-2 border-green-400":"border border-green-400/20 hover:border-green-400/50",shadow:M?"shadow-lg shadow-green-500/50":"",iconBg:M?"bg-green-500":"bg-slate-700/80 group-hover:bg-slate-700",iconText:M?"text-slate-900":"text-green-300 group-hover:text-green-200",text:M?"text-white":"text-green-200 group-hover:text-green-100",indicator:"bg-green-400",glowColor:"rgba(34, 197, 94, 0.5)"};case"medium":return{bg:M?"bg-gradient-to-r from-amber-500/30 via-yellow-500/30 to-amber-500/30":"bg-slate-800/60",border:M?"border-2 border-amber-400":"border border-amber-400/20 hover:border-amber-400/50",shadow:M?"shadow-lg shadow-amber-500/50":"",iconBg:M?"bg-amber-500":"bg-slate-700/80 group-hover:bg-slate-700",iconText:M?"text-slate-900":"text-amber-300 group-hover:text-amber-200",text:M?"text-white":"text-amber-200 group-hover:text-amber-100",indicator:"bg-amber-400",glowColor:"rgba(251, 191, 36, 0.5)"};case"high":return{bg:M?"bg-gradient-to-r from-red-500/30 via-orange-500/30 to-red-500/30":"bg-slate-800/60",border:M?"border-2 border-red-400":"border border-red-400/20 hover:border-red-400/50",shadow:M?"shadow-lg shadow-red-500/50":"",iconBg:M?"bg-red-500":"bg-slate-700/80 group-hover:bg-slate-700",iconText:M?"text-slate-900":"text-red-300 group-hover:text-red-200",text:M?"text-white":"text-red-200 group-hover:text-red-100",indicator:"bg-red-400",glowColor:"rgba(239, 68, 68, 0.5)"}}})();return a.jsx(S.button,{onClick:()=>{u(P),r(!1)},className:`w-full text-left relative group ${M?"z-10":"z-0"}`,initial:{opacity:0,x:-50,rotateY:-20},animate:{opacity:1,x:0,rotateY:0},transition:{delay:_*.08,duration:.5,ease:[.34,1.56,.64,1]},whileHover:{scale:1.02,x:8},whileTap:{scale:.98},children:a.jsxs("div",{className:`relative rounded-2xl transition-all duration-500 ${O.bg} ${O.border} ${O.shadow} hover:bg-slate-800/80`,children:[M&&a.jsx(S.div,{className:"absolute inset-0 rounded-2xl",style:{background:`radial-gradient(circle at center, ${O.glowColor} 0%, transparent 70%)`},animate:{opacity:[.3,.6,.3]},transition:{duration:3,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}}),a.jsxs("div",{className:"relative flex items-center gap-4 px-4 py-3",children:[a.jsxs(S.div,{className:`flex-shrink-0 w-10 h-10 rounded-xl flex items-center justify-center font-bold text-lg relative ${O.iconBg} ${O.iconText}`,animate:M?{boxShadow:[`0 0 15px ${O.glowColor}`,`0 0 25px ${O.glowColor}`,`0 0 15px ${O.glowColor}`]}:{},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"},children:[a.jsx(T,{className:"w-5 h-5"}),M&&a.jsxs(a.Fragment,{children:[a.jsx(S.div,{className:"absolute inset-0 border-2 rounded-xl opacity-50",style:{borderColor:O.glowColor},animate:{scale:[1,1.3,1],opacity:[.5,0,.5]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeOut"}}),a.jsx(S.div,{className:"absolute inset-0 border-2 rounded-xl opacity-50",style:{borderColor:O.glowColor},animate:{scale:[1,1.5,1],opacity:[.5,0,.5]},transition:{duration:2,delay:.5,repeat:Number.POSITIVE_INFINITY,ease:"easeOut"}})]})]}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx(S.p,{className:`font-semibold text-sm transition-colors duration-300 ${O.text}`,animate:M?{textShadow:[`0 0 10px ${O.glowColor}`,`0 0 20px ${O.glowColor}`,`0 0 10px ${O.glowColor}`]}:{},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"},children:P}),M&&a.jsx(S.div,{className:"mt-1.5 h-1 bg-slate-700/50 rounded-full overflow-hidden",initial:{width:0},animate:{width:"100%"},transition:{duration:.5,delay:.2},children:a.jsx(S.div,{className:`h-full ${O.indicator}`,initial:{x:"-100%"},animate:{x:"0%"},transition:{duration:.8,delay:.3,ease:"easeOut"}})})]}),a.jsx(S.div,{className:`flex-shrink-0 w-3 h-3 rounded-full ${M?O.indicator:"bg-slate-600 group-hover:bg-slate-500"}`,animate:M?{scale:[1,1.3,1],boxShadow:[`0 0 10px ${O.glowColor}`,`0 0 20px ${O.glowColor}`,`0 0 10px ${O.glowColor}`]}:{},transition:{duration:1.5,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}})]}),a.jsx(S.div,{className:"absolute inset-0 rounded-2xl opacity-0 group-hover:opacity-100 transition-opacity duration-300",style:{background:`radial-gradient(circle at center, ${O.glowColor} 0%, transparent 70%)`}})]})},P)})}),a.jsx(S.div,{className:"px-6 py-3 border-t border-red-400/20 bg-gradient-to-r from-slate-900/50 to-slate-800/50",initial:{opacity:0},animate:{opacity:1},transition:{delay:.4},children:a.jsxs("p",{className:"text-xs text-red-300/80 text-center",children:[v.length," modos disponibles"]})})]})]})})}),a.jsx(Ce,{children:n&&a.jsx(S.div,{className:"absolute bottom-full left-0 mb-3 w-80",initial:{opacity:0,y:20,scale:.9},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:20,scale:.9},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:a.jsxs("div",{className:"relative",children:[a.jsx(S.div,{className:"absolute inset-0 bg-gradient-to-t from-cyan-500/20 via-teal-500/10 to-transparent rounded-3xl blur-xl",animate:{opacity:[.5,.8,.5],scale:[1,1.05,1]},transition:{duration:3,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}}),a.jsxs("div",{className:"relative bg-gradient-to-b from-slate-900/98 via-slate-800/95 to-slate-900/98 backdrop-blur-xl rounded-3xl border border-cyan-400/40 shadow-2xl overflow-hidden",children:[a.jsx("div",{className:"px-6 py-4 border-b border-cyan-400/20 bg-gradient-to-r from-cyan-500/10 to-teal-500/10",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("h3",{className:"text-cyan-300 font-semibold text-sm tracking-wider",children:x("control-panel.seleccionar-nivel")}),a.jsx(S.div,{className:"w-2 h-2 rounded-full bg-cyan-400",animate:{boxShadow:["0 0 10px rgba(34, 211, 238, 0.5)","0 0 20px rgba(34, 211, 238, 1)","0 0 10px rgba(34, 211, 238, 0.5)"]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}})]})}),a.jsxs("div",{className:"p-4 space-y-3 relative",children:[a.jsx(S.div,{className:"absolute left-10 top-8 bottom-8 w-0.5 bg-gradient-to-b from-cyan-500/50 via-teal-500/50 to-cyan-500/50",initial:{scaleY:0},animate:{scaleY:1},transition:{duration:.8,ease:"easeOut"}}),p.map((P,_)=>{const M=o===_,T=se(P.title);return a.jsx(S.button,{onClick:()=>{N(P.slug),l(_),s(!1)},className:`w-full text-left relative group ${M?"z-10":"z-0"}`,initial:{opacity:0,x:-50,rotateY:-20},animate:{opacity:1,x:0,rotateY:0},transition:{delay:_*.08,duration:.5,ease:[.34,1.56,.64,1]},whileHover:{scale:1.02,x:8},whileTap:{scale:.98},children:a.jsxs("div",{className:`relative rounded-2xl transition-all duration-500 ${M?"bg-gradient-to-r from-cyan-500/30 via-teal-500/30 to-cyan-500/30 border-2 border-cyan-400 shadow-lg shadow-cyan-500/50":"bg-slate-800/60 border border-cyan-400/20 hover:border-cyan-400/50 hover:bg-slate-800/80"}`,children:[M&&a.jsx(S.div,{className:"absolute inset-0 bg-gradient-to-r from-cyan-500/20 via-teal-500/20 to-cyan-500/20 rounded-2xl",animate:{opacity:[.5,.8,.5]},transition:{duration:3,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}}),a.jsxs("div",{className:"relative flex items-center gap-4 px-4 py-3",children:[a.jsxs(S.div,{className:`flex-shrink-0 w-10 h-10 rounded-xl flex items-center justify-center font-bold text-lg relative ${M?"bg-cyan-500 text-slate-900":"bg-slate-700/80 text-cyan-300 group-hover:bg-slate-700 group-hover:text-cyan-200"}`,animate:M?{boxShadow:["0 0 15px rgba(34, 211, 238, 0.5)","0 0 25px rgba(34, 211, 238, 0.8)","0 0 15px rgba(34, 211, 238, 0.5)"]}:{},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"},children:[a.jsx(T,{className:"w-5 h-5"}),M&&a.jsxs(a.Fragment,{children:[a.jsx(S.div,{className:"absolute inset-0 border-2 border-cyan-400/50 rounded-xl",animate:{scale:[1,1.3,1],opacity:[.5,0,.5]},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeOut"}}),a.jsx(S.div,{className:"absolute inset-0 border-2 border-teal-400/50 rounded-xl",animate:{scale:[1,1.5,1],opacity:[.5,0,.5]},transition:{duration:2,delay:.5,repeat:Number.POSITIVE_INFINITY,ease:"easeOut"}})]})]}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx(S.p,{className:`font-semibold text-sm transition-colors duration-300 ${M?"text-white":"text-cyan-200 group-hover:text-cyan-100"}`,animate:M?{textShadow:["0 0 10px rgba(34, 211, 238, 0.3)","0 0 20px rgba(34, 211, 238, 0.6)","0 0 10px rgba(34, 211, 238, 0.3)"]}:{},transition:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"},children:x(P.title)}),M&&a.jsx(S.div,{className:"mt-1.5 h-1 bg-slate-700/50 rounded-full overflow-hidden",initial:{width:0},animate:{width:"100%"},transition:{duration:.5,delay:.2},children:a.jsx(S.div,{className:"h-full bg-gradient-to-r from-cyan-400 to-teal-400",initial:{x:"-100%"},animate:{x:"0%"},transition:{duration:.8,delay:.3,ease:"easeOut"}})})]}),a.jsx(S.div,{className:`flex-shrink-0 w-3 h-3 rounded-full ${M?"bg-cyan-400":"bg-slate-600 group-hover:bg-cyan-500/50"}`,animate:M?{scale:[1,1.3,1],boxShadow:["0 0 10px rgba(34, 211, 238, 0.5)","0 0 20px rgba(34, 211, 238, 1)","0 0 10px rgba(34, 211, 238, 0.5)"]}:{},transition:{duration:1.5,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}})]}),a.jsx(S.div,{className:"absolute inset-0 rounded-2xl opacity-0 group-hover:opacity-100 transition-opacity duration-300",style:{background:"radial-gradient(circle at center, rgba(34, 211, 238, 0.1) 0%, transparent 70%)"}})]})},P.title)})]}),a.jsx(S.div,{className:"px-6 py-3 border-t border-cyan-400/20 bg-gradient-to-r from-slate-900/50 to-slate-800/50",initial:{opacity:0},animate:{opacity:1},transition:{delay:.6},children:a.jsx("p",{className:"text-xs text-cyan-300/80 text-center",children:x("control-panel.niveles-disponibles",{numero:p.length})})})]})]})})}),a.jsxs(S.button,{onClick:()=>s(!n),className:"flex items-center gap-3 px-6 py-3 bg-slate-800/90 hover:bg-slate-700/90 text-cyan-300 font-medium text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-cyan-500/50 border border-cyan-400/30 hover:border-cyan-400/60 mb-3 w-60",whileHover:{scale:1.02},whileTap:{scale:.98},animate:{borderColor:n?["rgba(34, 211, 238, 0.3)","rgba(34, 211, 238, 0.6)","rgba(34, 211, 238, 0.3)"]:"rgba(34, 211, 238, 0.3)"},transition:{borderColor:{duration:2,repeat:n?Number.POSITIVE_INFINITY:0,ease:"easeInOut"}},children:[a.jsx(Ce,{mode:"wait",children:a.jsx(S.div,{initial:{scale:0,rotate:-180,opacity:0,filter:"blur(10px)"},animate:{scale:1,rotate:0,opacity:1,filter:"blur(0px)"},exit:{scale:0,rotate:180,opacity:0,filter:"blur(10px)"},transition:{duration:.5,ease:[.34,1.56,.64,1],scale:{type:"spring",stiffness:300,damping:20}},children:a.jsx(F.Layers,{className:"w-5 h-5"})},n?"open":"closed")}),a.jsx("span",{children:x("control-panel.nivel")}),a.jsx(S.span,{className:"px-3 py-1 bg-cyan-500/20 text-cyan-300 rounded-full text-xs font-semibold border border-cyan-400/30 leading-3",initial:{opacity:0,scale:.8,y:-10},animate:{opacity:1,scale:1,y:0},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:x(p[o].title)},`level-badge-${o}`)]}),a.jsxs(S.button,{onClick:j,className:`flex items-center gap-3 px-6 py-3 ${V.bg} ${V.text} font-medium text-sm rounded-full transition-all duration-300 ${V.shadow} border ${V.border} mb-3`,whileHover:{scale:1.05},whileTap:{scale:.95,rotate:15},animate:{scale:[1,1.02,1]},transition:{scale:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}},children:[a.jsx(Ce,{mode:"wait",children:a.jsx(S.div,{initial:{scale:0,rotate:-180,opacity:0,filter:"blur(10px)"},animate:{scale:1,rotate:0,opacity:1,filter:"blur(0px)"},exit:{scale:0,rotate:180,opacity:0,filter:"blur(10px)"},transition:{duration:.5,ease:[.34,1.56,.64,1],scale:{type:"spring",stiffness:300,damping:20}},children:a.jsx(J,{className:"w-5 h-5"})},e)}),a.jsx("span",{children:"Layer Switch"}),a.jsx(S.span,{className:`px-3 py-1 ${V.badgeBg} ${V.badgeText} rounded-full text-xs font-semibold border ${V.badgeBorder}`,initial:{opacity:0,scale:.8,y:-10},animate:{opacity:1,scale:1,y:0},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:x(`control-panel.layer.${e}`)},`badge-${e}`)]}),a.jsxs(S.button,{onClick:$,className:"flex items-center gap-3 px-6 py-3 bg-slate-800/90 hover:bg-slate-700/90 text-cyan-300 font-medium text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-cyan-500/50 border border-cyan-400/30 hover:border-cyan-400/60 mb-3",whileHover:{scale:1.05},whileTap:{scale:.95,rotate:15},animate:{scale:[1,1.02,1]},transition:{scale:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}},children:[a.jsx(Ce,{mode:"wait",children:a.jsx(S.div,{initial:{scale:0,rotate:-180,opacity:0,filter:"blur(10px)"},animate:{scale:1,rotate:0,opacity:1,filter:"blur(0px)"},exit:{scale:0,rotate:180,opacity:0,filter:"blur(10px)"},transition:{duration:.5,ease:[.34,1.56,.64,1],scale:{type:"spring",stiffness:300,damping:20}},children:a.jsx(F.Languages,{className:"w-5 h-5"})},d)}),a.jsx("span",{children:x("control-panel.idioma")}),a.jsx(S.span,{className:"px-3 py-1 bg-cyan-500/20 text-cyan-300 rounded-full text-xs font-semibold border border-cyan-400/30",initial:{opacity:0,scale:.8,y:-10},animate:{opacity:1,scale:1,y:0},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:d==="es"?"Español":"English"},`language-badge-${d}`)]}),a.jsxs(S.button,{onClick:z,className:"flex items-center gap-3 px-6 py-3 bg-slate-800/90 hover:bg-slate-700/90 text-cyan-300 font-medium text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-cyan-500/50 border border-cyan-400/30 hover:border-cyan-400/60",whileHover:{scale:1.05},whileTap:{scale:.95,rotate:15},animate:{scale:[1,1.02,1]},transition:{scale:{duration:2,repeat:Number.POSITIVE_INFINITY,ease:"easeInOut"}},children:[a.jsx(Ce,{mode:"wait",children:a.jsx(S.div,{initial:{scale:0,rotate:-180,opacity:0,filter:"blur(10px)"},animate:{scale:1,rotate:0,opacity:1,filter:"blur(0px)"},exit:{scale:0,rotate:180,opacity:0,filter:"blur(10px)"},transition:{duration:.5,ease:[.34,1.56,.64,1],scale:{type:"spring",stiffness:300,damping:20}},children:a.jsx(F.Presentation,{className:"w-5 h-5"})},d)}),a.jsx("span",{children:x("control-panel.showcasemode")}),a.jsx(S.span,{className:"px-3 py-1 bg-cyan-500/20 text-cyan-300 rounded-full text-xs font-semibold border border-cyan-400/30",initial:{opacity:0,scale:.8,y:-10},animate:{opacity:1,scale:1,y:0},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:E?"ON":"OFF"},`showcase-badge-${E}`)]}),a.jsx(S.button,{onClick:()=>m(!h),className:"mt-3 p-2.5 bg-white/30 hover:bg-white/40 text-white rounded-full transition-all duration-300 backdrop-blur-md border-2 border-white/40 hover:border-white/60 z-[60] shadow-xl",animate:{x:[0,5,0]},transition:{x:{repeat:Number.POSITIVE_INFINITY,duration:1.5,ease:"easeInOut"}},whileHover:{scale:1.15},whileTap:{scale:.95},children:a.jsx(S.div,{animate:{rotate:h?180:0},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:a.jsx(F.ChevronLeft,{className:"w-5 h-5"})})})]}),a.jsx(Ce,{children:h&&a.jsx(S.button,{onClick:()=>m(!1),className:"fixed bottom-8 left-8 p-3 bg-white/10 hover:bg-white/20 text-white rounded-full transition-all duration-300 backdrop-blur-sm border border-white/10 hover:border-white/30 z-40",initial:{opacity:0,x:-50,scale:0},animate:{opacity:.6,x:0,scale:1},exit:{opacity:0,x:-50,scale:0},transition:{duration:.5,ease:[.34,1.56,.64,1]},whileHover:{scale:1.1,opacity:1,x:5},whileTap:{scale:.95},children:a.jsx(S.div,{animate:{x:[0,8,0]},transition:{repeat:Number.POSITIVE_INFINITY,duration:1.5,ease:"easeInOut"},children:a.jsx(F.ChevronRight,{className:"w-6 h-6"})})})})]})}function uo(){const{isConnected:e,reconnect:t}=Ht(),s={connected:{color:"bg-emerald-500",ringColor:"ring-emerald-500/30",label:"Conectado",animate:!0},connecting:{color:"bg-amber-500",ringColor:"ring-amber-500/30",label:"Conectando...",animate:!0},disconnected:{color:"bg-red-500",ringColor:"ring-red-500/30",label:"Desconectado",animate:!1}}[e?"connected":"disconnected"],i=!e&&t;return a.jsxs("div",{className:yn("fixed z-50 flex items-center gap-2 rounded-full bg-background/80 backdrop-blur-sm px-3 py-2 shadow-lg","top-1 right-2",i&&"cursor-pointer hover:bg-accent transition-colors"),onClick:i?t:void 0,role:i?"button":void 0,"aria-label":i?"Reconectar WebSocket":`Estado: ${s.label}`,children:[a.jsxs("div",{className:"relative flex items-center justify-center",children:[a.jsx("div",{className:yn("w-2.5 h-2.5 rounded-full",s.color,s.animate&&"animate-pulse")}),s.animate&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:yn("absolute w-2.5 h-2.5 rounded-full ring-2",s.ringColor,"animate-ping")}),a.jsx("div",{className:yn("absolute w-4 h-4 rounded-full ring-1",s.ringColor)})]})]}),a.jsx("div",{className:"flex items-center gap-1",children:a.jsx("div",{className:"h-0.5 w-8 relative overflow-hidden transition-all duration-500 bg-emerald-500",children:a.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-green-300 to-transparent animate-flow-right"})})}),a.jsx("div",{className:"relative flex items-center justify-center",children:a.jsx("div",{className:"w-2.5 h-2.5"})}),!1,!1]})}function fo({children:e}){const t=Ii();if(!t)return a.jsx(a.Fragment,{children:e});const{isMinimized:n}=t;return a.jsxs(a.Fragment,{children:[a.jsx(S.div,{className:"relative w-full h-full",initial:!1,animate:{scaleY:n?0:1,opacity:n?0:1},transition:{duration:.6,ease:[.4,0,.2,1]},style:{transformOrigin:"bottom"},children:e}),a.jsx(Np,{})]})}const ho=()=>{const{isAutoMode:e}=lo(),{pathname:t}=Se.useLocation(),n=Se.useNavigate(),s=b.useRef(null),i=xe()?.showcasesUrl??[],r=xe().showcasesWait??12e4,o=()=>{const d=(i.indexOf(t)+1)%i.length;n(i[d])},l=()=>{s.current&&clearInterval(s.current),s.current=setInterval(o,r)},c=()=>{s.current&&(clearInterval(s.current),s.current=null)};b.useEffect(()=>(e?l():c(),()=>c()),[e]),b.useEffect(()=>{e&&l()},[t,e])};function vb({showControlPanel:e=!0,iframeSrc:t=""}){return ho(),a.jsxs("div",{className:"relative w-full h-screen overflow-hidden bg-transparent",children:[a.jsx("div",{className:"z-1 fixed inset-0",children:a.jsx("iframe",{id:"vagonFrame",allow:"microphone *; clipboard-read *; clipboard-write *; encrypted-media *; fullscreen *;",className:"z-1 w-full h-screen",src:t})}),a.jsx(fo,{children:a.jsxs("div",{className:"relative z-10 h-full bg-transparent",children:[a.jsx(Se.Outlet,{}),e&&a.jsx(co,{})]})}),a.jsx(uo,{})]})}function wb({showControlPanel:e=!0}){return ho(),a.jsxs("div",{className:"relative w-full h-screen overflow-hidden bg-transparent",children:[a.jsx("div",{className:"pointer-events-none absolute top-0 left-0 w-full h-50 bg-gradient-to-b from-[#17252c]/70 to-transparent"}),a.jsx(fo,{children:a.jsxs("div",{className:"relative z-10 h-full bg-transparent",children:[a.jsx(Se.Outlet,{}),e&&a.jsx(co,{})]})}),a.jsx(uo,{})]})}function mo({items:e,parent:t,selectedShip:n,onShipSelect:s}){const[i,r]=b.useState(0),[o,l]=b.useState(!1),[c,u]=b.useState(6),[d,f]=b.useState(!0),[h,m]=b.useState(0),[p,y]=b.useState("slide"),[v,x]=b.useState(160),{t:C}=ot.useTranslation(),{lastEvent:N,internalEvent:I,setInternalEvent:A}=wt(),k=xe().cinematics??!1,E=xe().cinematicsOnChangeLocation??!1;k&&(b.useEffect(()=>{N?.payload?.type==="cinematics"&&N?.payload?.action==="end"&&f(!0)},[N]),b.useEffect(()=>{if(I?.payload?.type==="cinematics"){const V=I?.payload?.action;V==="start"&&f(!1),V==="end"&&f(!0)}},[I]));const w=V=>{const _=(Math.ceil(R.length/c)-1)*c*v;return V>0?0:Math.abs(V)>_?-_:V},j=V=>-(V*c*v),$=V=>{const P=Math.floor(c/2),_=Math.floor(V/c),M=(V-_*c-P)*v,T=-(_*c*v+M);return w(T)},z=Se.useNavigate(),Q=xe().baseUrl??"",R=e;b.useEffect(()=>{const V=()=>{let P;window.innerWidth<640?(u(2),P=120):window.innerWidth<768?(u(3),P=140):window.innerWidth<1024?(u(4),P=160):(u(6),P=180),x(P)};return V(),window.addEventListener("resize",V),()=>window.removeEventListener("resize",V)},[]),b.useEffect(()=>{if(!n){r(0),y("center"),m($(0));return}const V=R.findIndex(_=>_.slug===n);if(V===-1){r(0),y("center"),m($(0));return}const P=Math.floor(V/c);P!==i&&r(P),y("center"),m($(V))},[n,c,v,R]),b.useEffect(()=>{if(p==="slide")m(j(i));else{const V=R.findIndex(P=>P.slug===n);V!==-1&&m($(V))}},[c,v]);const se=V=>{s(V),y("center");const P=R.findIndex(_=>_.slug===V);P!==-1&&m($(P)),z(`${t?`/${t}/`:"/"}${V}`),k&&E&&A({...Ut})},U=()=>{const V=Math.ceil(R.length/c),P=(i+1)%V;y("slide"),r(P),m(j(P))},J=()=>{const V=Math.ceil(R.length/c),P=(i-1+V)%V;y("slide"),r(P),m(j(P))};return a.jsxs(Ce,{children:[d&&a.jsxs(S.div,{className:"absolute top-0 left-0 right-0 flex flex-col items-center justify-center z-10",initial:{opacity:0,y:-50},animate:{opacity:o?0:1,y:o?-200:0,pointerEvents:o?"none":"auto"},transition:{duration:.6,ease:[.34,1.56,.64,1]},exit:{opacity:0,y:-50,scale:.8},children:[a.jsxs(S.div,{className:"relative flex items-center justify-center w-full max-w-7xl",animate:{y:0},transition:{duration:.3,ease:"easeInOut"},children:[a.jsx(S.button,{className:"absolute left-1 sm:left-2 md:left-4 z-20 w-8 h-8 sm:w-10 sm:h-10 bg-slate-900/40 backdrop-blur-sm rounded-full border border-blue-400/20 hover:border-blue-400/40 flex items-center justify-center text-white/60 hover:text-white transition-all duration-300 hover:bg-slate-800/60",onClick:J,whileHover:{scale:1.05,x:-2},whileTap:{scale:.95},disabled:i===0,style:{opacity:i===0?.3:1,pointerEvents:i===0?"none":"auto"},children:a.jsx(F.ArrowLeft,{className:"w-3 h-3 sm:w-4 sm:h-4"})}),a.jsx("div",{className:"flex p-2 sm:p-4 mx-10 sm:mx-16 overflow-hidden",children:a.jsx(S.div,{className:"flex space-x-2 sm:space-x-4 md:space-x-8",animate:{x:h},transition:{duration:.6,ease:[.25,.46,.45,.94]},children:R.map((V,P)=>a.jsxs(S.div,{className:`flex flex-col gap-1 items-center cursor-pointer group min-w-[100px] sm:min-w-[120px] md:min-w-[144px] ${n===V.slug?"scale-110":""}`,onClick:()=>se(V.slug),whileHover:{scale:1.05,y:-4},whileTap:{scale:.98},initial:{opacity:0,y:20},animate:{opacity:1,y:0,transition:{delay:P*.1}},children:[a.jsxs("div",{className:`relative w-24 h-24 sm:w-28 sm:h-28 md:w-32 md:h-32 flex flex-col gap-1 align-bottom items-center justify-end py-2 sm:pt-4 rounded-lg transition-all duration-500 ${n===V.slug?"bg-blue-700/80 shadow-lg shadow-blue-500/30 border border-blue-400/50":"bg-zinc-500/1 hover:bg-blue-900/40 border border-transparent hover:border-blue-600/30"}`,children:[a.jsx("div",{className:"w-full h-12 sm:h-16 relative flex items-center justify-center px-4",children:a.jsx("img",{src:`${Q.replace(/\/$/,"")}/images/shapes/${V.icon??V.slug}.png`,alt:V.name,width:120,height:40,className:"object-contain brightness-200 filter transition-all duration-300 group-hover:brightness-300"})}),a.jsx("div",{className:" text-center",children:a.jsx("div",{className:"text-cyan-300 text-xs sm:text-sm font-medium transition-colors duration-300 group-hover:text-cyan-200",children:C(V.name)})})]}),V.label&&a.jsx("div",{className:"mt-1",children:a.jsx("span",{className:`text-[10px] sm:text-xs px-2 sm:px-3 py-1 rounded-md transition-all duration-300 ${n===V.slug?"bg-cyan-500/80 text-blue-900 shadow-md":"bg-blue-900/60 text-cyan-300 group-hover:bg-blue-800/70 group-hover:text-cyan-200"}`,children:V.label})})]},V.slug))})}),a.jsx(S.button,{className:"absolute right-1 sm:right-2 md:right-4 z-20 w-8 h-8 sm:w-10 sm:h-10 bg-slate-900/40 backdrop-blur-sm rounded-full border border-blue-400/20 hover:border-blue-400/40 flex items-center justify-center text-white/60 hover:text-white transition-all duration-300 hover:bg-slate-800/60",onClick:U,whileHover:{scale:1.05,x:2},whileTap:{scale:.95},disabled:i===Math.ceil(R.length/c)-1,style:{opacity:i===Math.ceil(R.length/c)-1?.3:1,pointerEvents:i===Math.ceil(R.length/c)-1?"none":"auto"},children:a.jsx(F.ArrowLeft,{className:"w-3 h-3 sm:w-4 sm:h-4 rotate-180"})})]}),a.jsx(S.button,{onClick:()=>l(!0),className:"p-2 bg-white/10 hover:bg-white/20 text-white rounded-full transition-all duration-300 backdrop-blur-sm border border-white/10 hover:border-white/30 z-50",initial:{opacity:0,scale:0},animate:{opacity:.6,scale:1,y:[0,5,0]},exit:{opacity:0,y:-50,scale:0},transition:{duration:.5,ease:[.34,1.56,.64,1]},whileHover:{scale:1.1,opacity:1},whileTap:{scale:.95},children:a.jsx(S.div,{animate:{rotate:o?180:0},transition:{duration:.4,ease:[.34,1.56,.64,1]},children:a.jsx(F.ChevronUp,{className:"w-5 h-5"})})})]}),o&&a.jsx(S.button,{onClick:()=>l(!1),className:"absolute top-8 left-1/2 -translate-x-1/2 p-3 bg-white/10 hover:bg-white/20 text-white rounded-full transition-all duration-300 backdrop-blur-sm border border-white/10 hover:border-white/30 z-40",initial:{opacity:0,y:-50,scale:0},animate:{opacity:.6,y:0,scale:1},exit:{opacity:0,y:-50,scale:0},transition:{duration:.5,ease:[.34,1.56,.64,1]},whileHover:{scale:1.1,opacity:1,y:5},whileTap:{scale:.95},children:a.jsx(S.div,{animate:{y:[0,8,0]},transition:{repeat:Number.POSITIVE_INFINITY,duration:1.5,ease:"easeInOut"},children:a.jsx(F.ChevronDown,{className:"w-6 h-6"})})})]})}const Sb=({items:e,world:t,worldSlug:n=t})=>{const[s,i]=b.useState(""),r={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},o=Se.useLocation(),l=Se.useNavigate(),{t:c}=ot.useTranslation(),{setInternalEvent:u}=wt(),d=xe().cinematics??!1,f=xe().cinematicsOnChangeLocation??!1;b.useEffect(()=>{o.pathname===`/${n}`?i(""):o.pathname.startsWith(n?`/${n}/`:"/")&&i(o.pathname.replace(n?`/${n}/`:"/",""))},[o]),b.useEffect(()=>{const v=x=>{const C=["INPUT","TEXTAREA"].includes(x.target.tagName),N=document.querySelector(".yarl__container"),I=document.querySelector(".simulation-mode");C||N||I||(x.key==="ArrowLeft"?(x.preventDefault(),y()):x.key==="ArrowRight"&&(x.preventDefault(),p()))};return window.addEventListener("keydown",v),()=>{window.removeEventListener("keydown",v)}},[s]),b.useEffect(()=>{let v=0,x=0,C=!1;const N=k=>{const E=k.target,w=document.getElementById("ItemPage");C=E===w,C&&(v=k.changedTouches[0].screenX)},I=k=>{C&&(x=k.changedTouches[0].screenX,A())},A=()=>{const k=x-v;Math.abs(k)<50||(k>0?y():p())};return window.addEventListener("touchstart",N),window.addEventListener("touchend",I),()=>{window.removeEventListener("touchstart",N),window.removeEventListener("touchend",I)}},[s]);const h=()=>{const x=(e.findIndex(C=>C.slug===s)+1)%e.length;return e[x]},m=()=>{const x=(e.findIndex(C=>C.slug===s)-1+e.length)%e.length;return e[x]},p=()=>{const v=h();i(v.slug),l(`${n}/${v.slug}`),d&&f&&u({...Ut})},y=()=>{const v=m();i(v.slug),l(`${n}/${v.slug}`),d&&f&&u({...Ut})};return a.jsxs(S.div,{className:"relative w-full h-full",variants:r,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.8},children:[a.jsx(mo,{parent:n,items:e,onShipSelect:i,selectedShip:s}),s&&a.jsxs(a.Fragment,{children:[a.jsxs(S.button,{className:"absolute left-4 top-1/2 transform -translate-y-1/2 w-12 h-12 bg-slate-900/40 backdrop-blur-sm rounded-full border border-blue-400/20 hover:border-blue-400/60 flex items-center justify-center text-white/60 hover:text-white transition-all duration-300 hover:bg-slate-800/60 group z-30",initial:"initial",animate:"animate",whileHover:"hover",whileTap:{scale:.95},onClick:y,children:[a.jsx(F.ArrowLeft,{className:"w-6 h-6 transition-transform duration-300 group-hover:scale-110"}),a.jsxs(S.div,{className:"absolute left-16 top-1/2 transform -translate-y-1/2 bg-slate-900/95 backdrop-blur-md rounded-lg px-3 py-2 border border-blue-400/30 shadow-xl opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none whitespace-nowrap",children:[a.jsx("span",{className:"text-blue-100 font-medium text-sm",children:c("layout.anterior")}),a.jsx("div",{className:"absolute right-full top-1/2 transform -translate-y-1/2 w-0 h-0 border-t-4 border-b-4 border-r-4 border-transparent border-r-slate-900/95"})]}),a.jsx("div",{className:"absolute inset-0 rounded-full border border-blue-400/30 scale-0 group-hover:scale-125 opacity-0 group-hover:opacity-100 transition-all duration-500"})]}),a.jsxs(S.button,{className:"absolute right-4 top-1/2 transform -translate-y-1/2 w-12 h-12 bg-slate-900/40 backdrop-blur-sm rounded-full border border-blue-400/20 hover:border-blue-400/60 flex items-center justify-center text-white/60 hover:text-white transition-all duration-300 hover:bg-slate-800/60 group z-30",initial:"initial",animate:"animate",whileHover:"hover",whileTap:{scale:.95},onClick:p,children:[a.jsx(F.ArrowLeft,{className:"w-6 h-6 rotate-180 transition-transform duration-300 group-hover:scale-110"}),a.jsxs(S.div,{className:"absolute right-16 top-1/2 transform -translate-y-1/2 bg-slate-900/95 backdrop-blur-md rounded-lg px-3 py-2 border border-blue-400/30 shadow-xl opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none whitespace-nowrap",children:[a.jsx("span",{className:"text-blue-100 font-medium text-sm",children:c("layout.siguiente")}),a.jsx("div",{className:"absolute left-full top-1/2 transform -translate-y-1/2 w-0 h-0 border-t-4 border-b-4 border-l-4 border-transparent border-l-slate-900/95"})]}),a.jsx("div",{className:"absolute inset-0 rounded-full border border-blue-400/30 scale-0 group-hover:scale-125 opacity-0 group-hover:opacity-100 transition-all duration-500"})]})]}),a.jsx(Se.Outlet,{})]})},xu=b.createContext(void 0);function Tb({children:e}){const{isMobile:t}=Li(),n=xe().videosBaseUrl,s=t?"videos/movil":"videos",[i,r]=b.useState(""),[o,l]=b.useState(!1),c=(u,d=!0)=>{const f=`${n.replace(/\/$/,"")}/${s}/${u}`;f!==i&&(d?(l(!0),setTimeout(()=>{r(f),setTimeout(()=>l(!1),300)},150)):r(f))};return a.jsx(xu.Provider,{value:{currentVideo:i,setVideo:c,isTransitioning:o},children:e})}function vu(){const e=b.useContext(xu);return e===void 0?{currentVideo:"",setVideo:()=>{},isTransitioning:!1}:e}const po=({returnUrlOnEnded:e})=>{const{currentVideo:t,isTransitioning:n}=vu(),s=Se.useNavigate(),i=b.useRef(null),[r,o]=b.useState(t),l=()=>{e&&s(e)},c=u=>u.replace(/\.mp4$/i,".webp");return b.useEffect(()=>{t!==r&&(i.current&&(i.current.pause(),i.current.removeAttribute("src"),i.current.load()),o(t))},[t,r]),b.useEffect(()=>{i.current&&r&&i.current.play().catch(u=>{console.warn("Error al intentar autoPlay del video:",u)})},[r]),a.jsxs("div",{className:"absolute inset-0 w-full h-full",children:[a.jsx(Ce,{children:n&&a.jsx(S.div,{className:"absolute inset-0 bg-black z-10",initial:{opacity:0},animate:{opacity:.3},exit:{opacity:0},transition:{duration:.15}})}),a.jsx(S.video,{ref:i,autoPlay:!0,loop:!e,muted:!0,playsInline:!0,className:"absolute inset-0 w-full h-full object-cover",onEnded:l,initial:{opacity:0},animate:{opacity:1},transition:{duration:.3},src:r,poster:c(r)},r)]})};function Eb({className:e}){const n=e!==void 0?e:"fixed inset-0 overflow-hidden bg-slate-900";return a.jsxs("div",{className:n,children:[a.jsx(po,{}),a.jsx("div",{className:"relative z-10 h-full",children:a.jsx(Se.Outlet,{})})]})}function Cb({x:e,y:t,dest:n}){const s=Se.useNavigate(),i=r=>{s(`/product/${r}`)};return a.jsxs(S.button,{className:`absolute ${e} ${t} w-8 h-8 bg-gradient-to-br from-blue-500 to-indigo-700 rounded-full shadow-2xl border-2 border-blue-300/50 backdrop-blur-sm flex items-center justify-center group overflow-hidden`,initial:"initial",animate:"animate",whileHover:"hover",whileTap:"tap",onClick:()=>i(n),children:[a.jsx("div",{className:"absolute inset-1 bg-gradient-to-br from-blue-300/30 to-transparent rounded-full"}),a.jsx("div",{className:"relative w-2.5 h-2.5 bg-white rounded-full group-hover:scale-125 transition-all duration-300 shadow-lg",children:a.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-200 to-white rounded-full animate-pulse"})}),a.jsx("div",{className:"absolute inset-0 rounded-full border border-blue-300/60 animate-ping"}),a.jsx("div",{className:"absolute inset-1 rounded-full border border-blue-400/40 animate-pulse"}),a.jsx("div",{className:"absolute inset-0 rounded-full border border-transparent border-t-blue-300 animate-spin",style:{animationDuration:"3s"}}),a.jsxs(S.div,{className:"absolute right-12 top-1/2 transform -translate-y-1/2 bg-slate-900/95 backdrop-blur-md rounded-lg p-4 border border-blue-400/30 shadow-xl min-w-64 group-hover:opacity-100 transition-opacity duration-300",initial:{opacity:0,x:20,scale:.8},animate:{opacity:0,x:20,scale:.8},whileHover:{opacity:1,x:0,scale:1},transition:{duration:.3},style:{pointerEvents:"none"},children:[a.jsx("h3",{className:"text-blue-300 font-bold text-lg mb-1",children:"SUBMARINO S80"}),a.jsx("p",{className:"text-blue-100/80 text-sm leading-relaxed",children:"Submarino de propulsión AIP con capacidades stealth y sistemas de combate integrados de última generación."}),a.jsx("div",{className:"absolute left-full top-1/2 transform -translate-y-1/2 w-0 h-0 border-t-8 border-b-8 border-l-8 border-transparent border-l-slate-900/95"})]})]})}function go({home:e,item:t}){const[n,s]=b.useState({width:0,height:0}),[i,r]=b.useState(!0),[o,l]=b.useState(!1),[c,u]=b.useState(!1),[d,f]=b.useState(""),[h,m]=b.useState(!1),[p,y]=b.useState(!1),[v,x]=b.useState(!1),[C,N]=b.useState(!1),[I,A]=b.useState(!1),[k,E]=b.useState(""),[w,j]=b.useState(!1),$=Se.useNavigate(),{lastEvent:z,internalEvent:Q,setInternalEvent:R}=wt(),se=xe().cinematics??!1,U=xe().cinematicsOnChangeLocation??!1;se&&(b.useEffect(()=>{z?.payload?.type==="cinematics"&&z?.payload?.action==="end"&&r(!0)},[z]),b.useEffect(()=>{if(Q?.payload?.type==="cinematics"){const T=Q?.payload?.action;T==="start"&&r(!1),T==="end"&&r(!0)}},[Q])),b.useEffect(()=>{const T=()=>{s({width:window.innerWidth,height:window.innerHeight})};return T(),window.addEventListener("resize",T),()=>window.removeEventListener("resize",T)},[]);const J=()=>{l(!0),r(!1)},V=()=>{l(!1),r(!0)},P=T=>{$(T),se&&U&&R({...Ut})},_=T=>!!T?.trim(),M=T=>T?.endsWith(".webm")||T?.endsWith(".mp4");return a.jsxs(Ce,{children:[i&&a.jsx(S.div,{className:"absolute bottom-4 sm:bottom-6 md:bottom-10 left-1/2 transform -translate-x-1/2 w-full max-w-[90%] sm:max-w-[85%] md:max-w-4xl px-4 sm:px-6 md:px-8 z-9999",initial:{opacity:0,y:50},animate:{opacity:1,y:0},transition:{delay:.8,duration:.6},exit:{opacity:0,y:50,scale:.8,transition:{delay:0,duration:.6}},children:a.jsxs("div",{className:"flex flex-col gap-6 backdrop-blur-xs rounded-xl sm:rounded-2xl border p-3 sm:p-4 md:p-6 text-center border-transparent max-w-6xl mx-auto title-section",children:[a.jsx("h1",{className:"text-xl sm:text-3xl md:text-4xl lg:text-5xl font-light text-white mb-2 sm:mb-4 tracking-wide",children:t?.title}),a.jsx("p",{className:"text-xs sm:text-sm md:text-base text-blue-100/90 font-light leading-relaxed max-w-5xl mx-auto mb-3 sm:mb-4 md:mb-6",children:t?.subtitle}),a.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-2 sm:gap-3 md:gap-4",children:[!1,e&&a.jsxs(a.Fragment,{children:[a.jsx(S.button,{className:"inline-flex items-center gap-1 sm:gap-2 px-3 sm:px-4 md:px-6 py-2 sm:py-3 bg-slate-800/80 hover:bg-slate-700/80 text-cyan-300 font-medium text-xs sm:text-sm rounded-full transition-all duration-300 shadow-lg hover:shadow-slate-500/25 border border-cyan-400/30 hover:border-cyan-400/60",whileHover:{scale:1.05},whileTap:{scale:.95},initial:{opacity:0},animate:{opacity:1},transition:{delay:0,duration:.6},onClick:()=>{P(e)},children:a.jsx(F.Home,{className:"w-3 h-3 sm:w-4 sm:h-4"})}),t?.simulation&&a.jsx(xc,{onClick:()=>m(!0)}),_(t?.playMedia?.url)&&a.jsx(Pi,{Icon:F.Video,onClick:()=>{f(t.playMedia.url),u(!0)}}),t?.webUrl&&a.jsx(Pi,{Icon:F.ExternalLink,onClick:()=>x(!0)}),(t?.links?.length??0)>0&&t?.links?.map(T=>a.jsx(Un,{item:T,onClick:()=>{M(T.url)?(f(T.url.trim()),u(!0)):(E(T.url),A(T.transparent),N(!0)),T.transparent===!0&&se&&R({...Ut})}})),(t?.cards?.length??0)>0&&a.jsx(Wl,{onClick:()=>y(!0)}),(t?.nodesId??0)>0&&a.jsx(yc,{label:t?.shortName??t.title,onClick:J})]})]})]})}),o&&t?.nodesId&&a.jsx(gb,{isOpen:o,onClose:V,size:n,hotspot:t.nodesId}),c&&a.jsx(mu,{source:d,onClose:()=>u(!1)}),h&&a.jsx(gu,{item:t.simulation,onClose:()=>m(!1)},t?.slug),p&&a.jsx(vc,{cards:t.cards,onClose:()=>y(!1)}),v&&a.jsx(Xt,{src:t.webUrl,onClose:()=>x(!1)}),C&&a.jsx(Xt,{src:k,transparent:I,onClose:()=>{const T=I;N(!1),E(""),A(!1),T===!0&&se&&R({...gc})}}),w&&a.jsx(Pp,{onClose:()=>j(!1)})]})}const Nb=({video:e,returnUrl:t})=>{console.log(e);const n=Se.useNavigate(),s={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},i=()=>{n(t)},{t:r}=ot.useTranslation();return a.jsx(a.Fragment,{children:a.jsxs("div",{className:"fixed inset-0 overflow-hidden bg-slate-900",children:[a.jsx(po,{returnUrlOnEnded:t}),a.jsx("div",{className:"relative z-10 h-full",children:a.jsx(S.div,{className:"relative w-full h-full",variants:s,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.8},children:a.jsx(S.div,{className:"absolute inset-0 bg-black/20 flex items-center justify-center",initial:{opacity:0},animate:{opacity:1},transition:{duration:.5},children:a.jsx(S.button,{className:"absolute bottom-8 right-8 px-4 py-2 bg-slate-900/80 backdrop-blur-md rounded-lg text-white/90 text-sm border border-white/20 hover:border-white/40 hover:bg-slate-800/90 transition-all duration-300 hover:text-white",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:1},whileHover:{scale:1.05},whileTap:{scale:.95},onClick:i,children:r("layout.skip")})})})})]})})},kb=({world:e,worldSlug:t=e,overlay:n=!1,itemsData:s})=>{const[i,r]=b.useState(null),{itemSlug:o}=Se.useParams();b.useEffect(()=>{if(o){const c=s.find(u=>u.slug===o);c&&r(c)}},[o]);const l={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}};return i?a.jsx(a.Fragment,{children:a.jsxs(S.div,{className:"relative w-full h-full",variants:l,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.8},children:[n&&a.jsx("div",{id:"ItemPage",className:"absolute inset-0 bg-gradient-to-b from-slate-900/30 via-transparent to-slate-900/50"}),a.jsx(go,{home:`/${t}`,item:i})]})}):a.jsx("div",{className:"relative w-full h-screen overflow-hidden bg-slate-900 flex items-center justify-center",children:a.jsx("div",{className:"text-white text-2xl",children:"Producto no encontrado"})})},Pb=({world:e,worldSlug:t=e,overlay:n=!1,itemsData:s})=>{const[i,r]=b.useState(null),{itemSlug:o}=Se.useParams(),l=Se.useNavigate();b.useEffect(()=>{if(o){const u=s.find(d=>d.slug===o);u&&(r(u),console.log(JSON.stringify(u)))}},[o]);const c={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}};return i?a.jsx(a.Fragment,{children:a.jsxs(S.div,{className:"relative w-full h-full",variants:c,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.8},children:[n&&a.jsx("div",{id:"ItemPage",className:"absolute inset-0 bg-gradient-to-b from-slate-900/30 via-transparent to-slate-900/50"}),a.jsx(gu,{item:i.simulation,onClose:()=>l(`/${t}`)},o)]})}):a.jsx("div",{className:"relative w-full h-screen overflow-hidden bg-slate-900 flex items-center justify-center",children:a.jsx("div",{className:"text-white text-2xl",children:"Producto no encontrado"})})},jb=({items:e,world:t,overlay:n=!1,title:s})=>{const[i,r]=b.useState(""),o={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}};return a.jsx(Ce,{children:a.jsxs(S.div,{className:"relative w-full h-full",variants:o,initial:"initial",animate:"animate",exit:"exit",transition:{duration:.8},children:[n&&a.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-slate-900/20 via-transparent to-slate-900/40"}),e&&a.jsx(mo,{parent:t,items:e,onShipSelect:r,selectedShip:i}),a.jsx(go,{home:"/",item:s})]})})},Ib=()=>{const e=Se.useLocation(),{sendMessage:t}=Ht(),n=xe().wsRoom;return b.useEffect(()=>{console.log("RouteListener: "+e.pathname+e.hash),t({type:"publish",room:n,payload:{type:"camera",target:pc(e.pathname)}})},[e]),null};q.CardsButton=Wl,q.ControlPanel=co,q.DynamicLucideIcon=Yl,q.EventProvider=Om,q.FontSizeManager=yb,q.FullScreenPage=Nb,q.IconButton=Pi,q.InfoCard=ao,q.ItemPage=kb,q.Layout=Eb,q.LayoutIframe=vb,q.LayoutTransparent=wb,q.LayoutWorld=Sb,q.LinkItemButton=Un,q.MinimizeProvider=Am,q.MinimizeWrapper=fo,q.NodosButton=yc,q.PointButton=Cb,q.RouteListener=Ib,q.ShipNavigation=mo,q.ShowcaseProvider=xb,q.SimulacionButton=xc,q.SlidePage=Pb,q.TabView=pu,q.TitleSection=go,q.VideoBackground=po,q.VideoProvider=Tb,q.WebSocketProvider=Cp,q.WebSocketStatusWidget=uo,q.WorldPage=jb,q.cinematicsEndEvent=gc,q.cinematicsStartEvent=Ut,q.cn=yn,q.codigoANombre=Tp,q.getConfig=xe,q.initLibConfig=Su,q.nombreACodigo=mc,q.toTarget=pc,q.toVideo=Ep,q.useAutoModeTimer=ho,q.useEvent=wt,q.useMinimize=Vm,q.useOptionalMinimize=Ii,q.useScreenSize=Li,q.useShowcase=lo,q.useVideo=vu,q.useWebSocket=Ht,Object.defineProperty(q,Symbol.toStringTag,{value:"Module"})}));