https://app.radarpro.ai/_next/static/chunks/69497c06cc31ffb0.js?dpl=dpl_9CFRDT5M9UX8CBkBj4eBsQFfU8wx
1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,448876,e=>{"use strict";let t=(0,e.i(475254).default)("list-ordered",[["path",{d:"M11 5h10",key:"1cz7ny"}],["path",{d:"M11 12h10",key:"1438ji"}],["path",{d:"M11 19h10",key:"11t30w"}],["path",{d:"M4 4h1v5",key:"10yrso"}],["path",{d:"M4 9h2",key:"r1h2o0"}],["path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",key:"xtkcd5"}]]);e.s(["ListOrdered",()=>t],448876)},561659,e=>{"use strict";let t=(0,e.i(475254).default)("credit-card",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);e.s(["CreditCard",()=>t],561659)},403460,e=>{"use strict";var t=e.i(843476),i=e.i(271645),r=e.i(618566);let s=(0,e.i(770703).default)(()=>e.A(899564).then(e=>e.PricingModal),{loadableGenerated:{modules:[346704]},ssr:!1}),n=(0,i.createContext)(null);function a(){let e=(0,i.useContext)(n);if(!e)throw Error("usePricingModal must be used inside PricingModalProvider");return e}function o({children:e,currentPlan:a,isGuest:o,pausaHasta:l}){let[d,h]=(0,i.useState)(!1),u=(0,i.useCallback)(()=>h(!0),[]),c=(0,r.usePathname)();return(0,i.useEffect)(()=>{if("free"!==a)return;let e=()=>{"#planes"===window.location.hash&&(window.history.replaceState(null,"",window.location.pathname+window.location.search),h(!0))};return e(),window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[c,a]),(0,t.jsxs)(n.Provider,{value:{openPricingModal:u},children:[e,d&&(0,t.jsx)(s,{isOpen:!0,onClose:()=>h(!1),currentPlan:a,isGuest:o,pausaHasta:l})]})}e.s(["PricingModalProvider",()=>o,"usePricingModal",()=>a])},655900,204997,2157,292270,631031,e=>{"use strict";var t=e.i(475254);let i=(0,t.default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["ChevronUp",()=>i],655900);let r=(0,t.default)("log-in",[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]]);e.s(["LogIn",()=>r],204997);let s=(0,t.default)("life-buoy",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.93 4.93 4.24 4.24",key:"1ymg45"}],["path",{d:"m14.83 9.17 4.24-4.24",key:"1cb5xl"}],["path",{d:"m14.83 14.83 4.24 4.24",key:"q42g0n"}],["path",{d:"m9.17 14.83-4.24 4.24",key:"bqpfvv"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]]);e.s(["LifeBuoy",()=>s],2157);let n=(0,t.default)("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]);e.s(["LogOut",()=>n],292270);var a=e.i(95187);let o=(0,a.createServerReference)("40c026863a327460a780baab1893f9f2c3845da4dc",a.callServer,void 0,a.findSourceMapURL,"signOut");e.s(["signOut",()=>o],631031)},577714,e=>{"use strict";var t=e.i(843476),i=e.i(271645),r=e.i(174080),s=e.i(266027),n=e.i(245423);let a=(0,e.i(475254).default)("bell-off",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]]);var o=e.i(270756),l=e.i(37727),d=e.i(924447),h=e.i(664621),u=e.i(53548),c=e.i(424434),p=e.i(632036),m=e.i(75510),f=e.i(353998),v=e.i(941854);let x="radar_seen",g="radar-seen-change";function y({radarPrefs:e,isFree:y=!1,isGuest:b=!1,variant:w="navbar"}){let[j,k]=(0,d.useRadarActive)(),S=(0,v.useDesbloqueadas)(!b&&y),T=e&&Object.keys(e).length?e:null,P=T?new URLSearchParams(Object.entries(T).filter(([,e])=>e).map(([e,t])=>[e,String(t)])).toString():"",{data:C}=(0,s.useQuery)({queryKey:["radar-aviso",P],queryFn:async()=>{let e=await fetch(`/api/radar/search?${P}&sort=match&order=desc`);return e.ok?e.json():null},enabled:!b&&P.length>0,staleTime:3e5}),[A,M]=(0,i.useState)(null);(0,i.useEffect)(()=>{let e=()=>M(Number(localStorage.getItem(x)||0));return e(),window.addEventListener(g,e),()=>window.removeEventListener(g,e)},[]);let N=(0,i.useMemo)(()=>
1{if(!T||b)return[];let e=Date.now()-5184e6;return(C?.data||[]).filter(t=>(t.match??0)>=90&&new Date(t.publicado_at).getTime()>=e).sort((e,t)=>new Date(t.publicado_at).getTime()-new Date(e.publicado_at).getTime()).slice(0,50).map(e=>({op:e,m:e.match}))},[j,T,C,b]),E=(0,i.useMemo)(()=>null===A?0:N.filter(e=>new Date(e.op.publicado_at).getTime()>A).length,[N,A]),[V,R]=(0,i.useState)(!1),[D,L]=(0,i.useState)([]),[B,F]=(0,i.useState)(0),[O,I]=(0,i.useState)(!1);if((0,i.useEffect)(()=>I(!0),[]),!T)return null;let _=j?n.Bell:a,U=new Date;U.setHours(0,0,0,0);let W=U.getTime(),$=[{label:"Hoy",items:D.filter(e=>new Date(e.op.publicado_at).getTime()>=W)},{label:"Anteriores",items:D.filter(e=>new Date(e.op.publicado_at).getTime()<W)}].filter(e=>e.items.length>0);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{type:"button",className:`rb-trigger rb-${w}`,onClick:()=>{let e;L(N),F(A??0),R(!0),e=Date.now(),localStorage.setItem(x,String(e)),M(e),window.dispatchEvent(new Event(g))},"aria-label":j&&E>0?`Avisos: ${E} oportunidades nuevas con +90% de match`:"Avisos de tu radar",children:[(0,t.jsx)(_,{className:"rb-ico","aria-hidden":!0}),"desktop"===w&&(0,t.jsx)("span",{className:"rb-label",children:"Avisos"}),j&&E>0&&(0,t.jsx)("span",{className:"rb-badge","data-count":!0,children:E})]}),O&&V&&(0,r.createPortal)((0,t.jsx)("div",{className:"rbx",role:"dialog","aria-label":"Avisos de tu radar",onClick:()=>R(!1),children:(0,t.jsxs)("div",{className:"rb-card",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"rb-head",children:[(0,t.jsx)(_,{className:"rb-head-ico","aria-hidden":!0}),(0,t.jsx)("span",{className:"rb-lbl",children:"Avisos de tu radar"}),(0,t.jsx)("button",{type:"button",className:"rb-close",onClick:()=>R(!1),"aria-label":"Cerrar",children:(0,t.jsx)(l.X,{})})]}),(0,t.jsxs)("div",{className:"rb-body",children:[(0,t.jsxs)("div",{className:"rb-toggle",children:[(0,t.jsxs)("div",{className:"rb-toggle-txt",children:[(0,t.jsxs)("span",{className:"rb-toggle-h",children:["Radar ",j?"activo":"en pausa"]}),(0,t.jsx)("span",{className:"rb-toggle-sub",children:"Afecta al % en Oportunidades y a los avisos."})]}),(0,t.jsx)("button",{type:"button",role:"switch","aria-checked":j,"aria-label":j?"Pausar radar":"Activar radar",className:`rb-switch ${j?"on":""}`,onClick:()=>k(!j),children:(0,t.jsx)("span",{className:"rb-knob"})})]}),0===D.length?(0,t.jsxs)("div",{className:"rb-empty",children:[(0,t.jsx)("h2",{className:"rb-title",children:"Sin novedades ahora mismo"}),(0,t.jsx)("p",{className:"rb-empty-sub",children:"Tu radar sigue vigilando. Te avisaremos en cuanto aparezca algo con +90% de match."})]}):(0,t.jsx)("div",{className:"rb-feed",children:$.map(e=>(0,t.jsxs)("div",{className:"rb-group",children:[(0,t.jsx)("div",{className:"rb-group-h",children:e.label}),e.items.map(({op:e,m:i})=>{let r=(0,c.esVelada)(e),s=r?void 0:(0,u.resolveGalleryUrls)(e)[0],n=r?0:Math.round(Number(e.descuento)||0),a=r?(0,c.earlyAccessDaysLeft)(e.publicado_at):0,l=new Date(e.publicado_at).getTime()>B;return(0,t.jsxs)("button",{type:"button",className:`rb-row ${l?"unseen":""}`,onClick:()=>{R(!1),(0,h.abrirFicha)(e.id)},children:[(0,t.jsx)("span",{className:`rb-thumb${r?" velada":""}`,style:s?{backgroundImage:`url('${s}')`}:void 0,children:r&&(0,t.jsx)("img",{src:`/api/oportunidades/${e.id}/foto-velada`,alt:""})}),(0,t.jsxs)("span",{className:"rb-info",children:[(0,t.jsxs)("span",{className:`rb-ht${r?" velado":""}`,children:[(0,m.tipoLabel)(e)," en ",r?(0,t.jsx)("span",{className:"rb-tapado","aria-hidden":!0,children:"Municipio"}):e.municipio?(0,t.jsx)(f.VeloUbicacion,{velado:(0,f.ubicacionVelada)({isFree:y,isGuest:b,desbloqueada:S(e.id)}),children:e.municipio}):e.provincia||"â"]}),(0,t.jsxs)("span",{className:"rb-hs",children:[(0,t.jsx)("span",{className:"rb-price",children:e.precio?(0,p.formatCurrency)(e.precio):"A consultar"}),r?(0,t.jsxs)("span",{className:"rb-lock",children:[(0,t.jsx)(o.Lock,{"aria-hidden":!0}),"Gratis en ",a," ",1===a?"dÃa":"dÃas"]}):n>0&&(0,t.jsxs)("span",{className:"rb-disc",children:["â",n,"%"]})]}),(0,t.jsxs)("span",{className:"rb-time",children:["detectado ",function(e){let t=Math.floor((Date.now()-new Date(e).getTime())/6e4);if(t<1)return"ahora mismo";if(t<60)return`hace ${t} min`;let i=Math.floor(t/60);if(i<24)return`hace ${i} h`;let r=Math.floor(i/24);if(r<7)return`hace ${r} d\xeda${r>1?"s":""}`;if(r<60)return`hace ${Math.floor(r/7)} sem`;let s=Math.floor(r/30);return`hace ${s} mes${s>1?"es":""}`}(e.publicado_at)]})]}),(0,t.jsxs)("span",{className:"rb-match",children:[(0,t.jsx)("span",{className:"rb-dot"}),i,"%"]}),l&&(0,t.jsx)("span",{className:"rb-newdot","aria-label":"Nuevo"})]},e.id)})]},e.label))})]})]})}),document.body)]})}e.s(["RadarBell",()=>y],577714)},121392,e=>{"use strict";var t=e.i(843476),i=e.i(271645),r=e.i(770703),s=e.i(522016),n=e.i(283086),a=e.i(39312),o=e.i(975157),l=e.i(426515),d=e.i(403460);let h=(0,r.default)(()=>e.A(692726).then(e=>e.CreditsModal),{loadableGenerated:{modules:[773256]},ssr:!1}),u={normal:"h-[34px] gap-2 px-3.5 text-[12.5px] shadow-[0_4px_14px_-6px_rgba(15,23,42,0.14)]",compacta:"h-[30px] gap-1.5 px-2.5 text-[12px]"};
1function c({isGuest:e,isFree:r,pausaHasta:c,creditsRemaining:p,creditsResetDate:m,compacta:f=!1}){let{openPricingModal:v}=(0,d.usePricingModal)(),{credits:x}=(0,l.useCreditsSync)(p,m),[g,y]=(0,i.useState)(()=>!f&&!e&&"creditos"===new URLSearchParams(window.location.search).get("ampliar")),b=(0,o.cn)("inline-flex shrink-0 items-center rounded-full border border-[var(--color-border)] bg-[var(--color-card)] font-semibold whitespace-nowrap transition-colors",u[f?"compacta":"normal"]),w=x>=999999;if(e&&f)return null;let j=e||r?c?(0,t.jsx)(s.default,{href:"/perfil#suscripcion",className:(0,o.cn)(b,"text-[var(--color-gold)] hover:border-[var(--color-gold-border)]"),children:f?"En pausa":(0,t.jsxs)(t.Fragment,{children:["En pausa hasta el ",c," · ",(0,t.jsx)("b",{children:"Reanudar"})]})}):(0,t.jsxs)("button",{type:"button",onClick:()=>v(),className:(0,o.cn)(b,"border-transparent bg-[var(--color-brand)] text-on-brand hover:bg-[var(--color-brand-dark)]"),children:[!f&&(0,t.jsx)(n.Sparkles,{"aria-hidden":!0,className:"h-3.5 w-3.5",strokeWidth:2}),"Ver planes"]}):(0,t.jsxs)("span",{className:(0,o.cn)(b,"text-[var(--color-green)]"),children:[(0,t.jsxs)("span",{className:"relative flex h-2 w-2",children:[(0,t.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-[var(--color-green)] opacity-75 motion-reduce:hidden"}),(0,t.jsx)("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-[var(--color-green)]"})]}),f?"Activa":"Suscripción activa"]});return(0,t.jsxs)(t.Fragment,{children:[j,!e&&(0,t.jsxs)("button",{type:"button",onClick:()=>y(!0),title:"Análisis completo: 5 créditos · consulta al asesor: 1 crédito. Nunca caducan.","aria-label":f?`${w?"Créditos ilimitados":`${x} cr\xe9ditos disponibles`}. Comprar m\xe1s`:void 0,className:(0,o.cn)(b,"text-[var(--color-muted)] hover:border-[var(--color-brand-border)]"),children:[(0,t.jsx)(a.Zap,{"aria-hidden":!0,className:"h-3.5 w-3.5 fill-current text-[var(--color-brand)]"}),(0,t.jsx)("b",{className:(0,o.cn)("font-[family-name:var(--font-display)] font-bold tabular-nums",f?"text-[13px]":"text-[13.5px]",w||x>25?"text-[var(--color-green)]":x<=5?"text-[var(--color-danger)]":"text-[var(--color-gold)]"),children:w?"â":x}),!f&&(w?"créditos":1===x?"crédito disponible":"créditos disponibles")]}),g&&(0,t.jsx)(h,{isOpen:!0,onClose:()=>y(!1)})]})}e.s(["CuentaArriba",()=>c])},91976,e=>{"use strict";var t=e.i(843476),i=e.i(271645),r=e.i(770703),s=e.i(174080),n=e.i(522016),a=e.i(618566);let o=(0,e.i(475254).default)("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]);var l=e.i(37727),d=e.i(694351),h=e.i(448876),u=e.i(790597),c=e.i(245423),p=e.i(178583),m=e.i(921557),f=e.i(283086),v=e.i(284614),x=e.i(292270),g=e.i(39312),y=e.i(204997),b=e.i(561659),w=e.i(2157),j=e.i(6
155900),k=e.i(426515),S=e.i(403460);let T="flex h-[40px] w-full items-center justify-center gap-1.5 rounded-[10px] bg-[var(--color-brand)] text-[13px] font-bold text-on-brand transition-opacity hover:opacity-90",P=(0,t.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.9,className:"h-[13px] w-[13px]",children:(0,t.jsx)("path",{d:"m5 12 14 0M13 6l6 6-6 6"})});function C({pausaHasta:e=null,alPulsar:i}){let{openPricingModal:r}=(0,S.usePricingModal)();return(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"mb-1.5 text-[10.5px] font-bold uppercase tracking-[0.05em] text-[var(--color-muted)]",children:e?`En pausa hasta el ${e}`:"Sin suscripción"}),e?(0,t.jsxs)(n.default,{href:"/perfil#suscripcion",onClick:i,className:T,children:["Reanudar",P]}):(0,t.jsxs)("button",{type:"button",onClick:()=>{i?.(),r()},className:T,children:[(0,t.jsx)(f.Sparkles,{className:"h-3.5 w-3.5",strokeWidth:2}),"Ver planes",P]})]})}var A=e.i(631031);let M=(0,r.default)(()=>e.A(692726).then(e=>e.CreditsModal),{loadableGenerated:{modules:[773256]},ssr:!1}),N=(0,r.default)(()=>e.A(30539).then(e=>e.RegisterModal),{loadableGenerated:{modules:[420340]},ssr:!1}),E=[{name:"Inicio",href:"/inicio",icon:d.Home},{name:"Oportunidades",href:"/oportunidades",icon:h.ListOrdered},{name:"Favoritos",href:"/favoritos",icon:u.Heart},{name:"Alertas",href:"/alertas",icon:c.Bell},{name:"Mis análisis",href:"/perfil/mis-informes",icon:p.FileText},{name:"Calculadora",href:"/calculadora",icon:m.Calculator},{name:"Análisis",href:"/analisis-ia",icon:f.Sparkles}],V=new Set(["/inicio","/oportunidades"]);function R({email:e,isFree:r=!1,isGuest:d=!1,creditsRemaining:h=0,creditsResetDate:u=null,pausaHasta:c=null}){let[p,m]=(0,i.useState)(!1),[f,S]=(0,i.useState)(!1),[T,P]=(0,i.useState)(!1),[R,D]=(0,i.useState)(null),[L,B]=(0,i.useState)(!1),F=(0,a.usePathname)(),{credits:O}=(0,k.useCreditsSync)(h,u),I=O>=999999,_=!d&&!r,U=(e?.trim()?.[0]||"U").toUpperCase(),W=()=>{m(!1),B(!1)};(0,i.useEffect)(()=>{S(!0)},[]),(0,i.useEffect)(()=>{if(!p)return;let e=e=>{"Escape"===e.key&&W()};document.addEventListener("keydown",e);let t=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",e),document.body.style.overflow=t}},[p]);let $=(0,t.jsx)(C,{pausaHasta:c,alPulsar:W}),z=(0,t.jsxs)("div",{className:"fixed inset-0 z-[120] md:hidden",role:"dialog","aria-modal":"true","aria-label":"Menú",children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-black/40 animate-in fade-in duration-200 motion-reduce:animate-none",onClick:W}),(0,t.jsxs)("nav",{className:"absolute left-0 top-0 flex h-full w-[70vw] max-w-[244px] flex-col bg-[var(--color-card)] shadow-2xl animate-in slide-in-from-left duration-200 ease-out motion-reduce:animate-none",children:[(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-between border-b border-[var(--color-border)] px-5 py-4",children:[(0,t.jsx)("span",{className:"text-sm font-bold text-[var(--color-text)]",children:"Menú"}),(0,t.jsx)("button",{type:"button",onClick:W,"aria-label":"Cerrar menú",className:"grid h-8 w-8 place-items-center rounded-full text-[var(--color-muted)] hover:bg-[var(--color-dark2)]",children:(0,t.jsx)(l.X,{className:"h-5 w-5"})})]}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,t.jsx)("div",{className:"p-3",children:E.map(e=>{let i=F===e.href||F.startsWith(e.href+"/"),r=d&&!V.has(e.href),s=e.icon;return(0,t.jsxs)(n.default,{href:r?"#":e.href,onClick:e=>{r?(e.preventDefault(),W(),D("options")):W()},className:`flex items-center gap-3 rounded-[var(--radius-btn)] px-3 py-2.5 text-[14px] font-medium transition-colors ${i?"bg-[var(--color-brand-soft)] text-[var(--color-brand-dark)]":"text-[var(--color-text)] hover:bg-[var(--color-dark2)]"}`,children:[(0,t.jsx)(s,{className:"h-[18px] w-[18px]",strokeWidth:1.7}),e.name]},e.href)})})}),(0,t.jsx)("div",{className:"shrink-0 border-t border-[var(--color-border)] p-3 pb-[calc(12px+env(safe-area-inset-bottom))]",children:d?(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[$,(0,t.jsxs)("div",{className:"flex flex-col gap-2 border-t border-[var(--color-border)] pt-3",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{W(),D("options")},className:"flex h-[40px] w-full items-center justify-center rounded-[10px] bg-[var(--color-brand)] text-[13.5px] font-bold text-on-brand transition-opacity hover:opacity-90",children:"Crear cuenta gratis"}),(0,t.jsxs)("button",{type:"button",onClick:()=>{W(),D("login")},className:"flex h-[40px] w-full items-center justify-center gap-1.5 rounded-[10px] border border-[var(--color-border-strong)] text-[13.5px] font-bold text-[var(--color-text)] transition-colors hover:border-[var(--color-brand)] hover:bg-[var(--color-brand-soft)] hover:text-[var(--color-brand)]",children:[(0,t.jsx)(y.LogIn,{className:"h-[15p
1x] w-[15px]",strokeWidth:2}),"Iniciar sesión"]})]})]}):(0,t.jsxs)("div",{className:"flex flex-col gap-2.5",children:[_?(0,t.jsxs)("div",{className:"flex items-center gap-2.5 rounded-[var(--radius-btn)] border border-[var(--color-green-border)] bg-[var(--color-green-soft)] px-3 py-2.5",children:[(0,t.jsxs)("span",{className:"relative flex h-2.5 w-2.5 shrink-0",children:[(0,t.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-[var(--color-green)] opacity-75 motion-reduce:hidden"}),(0,t.jsx)("span",{className:"relative inline-flex h-2.5 w-2.5 rounded-full bg-[var(--color-green)]"})]}),(0,t.jsx)("span",{className:"text-[13px] font-bold text-[var(--color-green)]",children:"Suscripción activa"})]}):$,(0,t.jsxs)("div",{className:"rounded-[var(--radius-btn)] border border-[var(--color-border)] bg-[var(--color-dark)] p-3",children:[(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-[10.5px] font-bold uppercase tracking-[0.05em] text-[var(--color-muted)]",children:[(0,t.jsx)(g.Zap,{className:"h-3 w-3 fill-current text-[var(--color-brand)]"}),"Créditos"]}),(0,t.jsxs)("div",{className:"mb-2.5 mt-1.5 font-[family-name:var(--font-display)] text-[24px] font-bold leading-none tracking-[-0.02em] tabular-nums text-[var(--color-text)]",children:[I?"â":O,(0,t.jsx)("small",{className:"ml-1 text-[12px] font-semibold text-[var(--color-muted)]",children:I?"ilimitados":"disponibles"})]}),!I&&(0,t.jsxs)("button",{type:"button",onClick:()=>{W(),P(!0)},className:"flex h-9 w-full items-center justify-center gap-1.5 rounded-[var(--radius-btn)] border border-[var(--color-border-strong)] text-[12.5px] font-bold text-[var(--color-text)] transition-colors hover:border-[var(--color-brand)] hover:bg-[var(--color-brand-soft)] hover:text-[var(--color-brand)]",children:["Comprar más",(0,t.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.9,className:"h-[13px] w-[13px]",children:(0,t.jsx)("path",{d:"m5 12 14 0M13 6l6 6-6 6"})})]})]}),(0,t.jsxs)("div",{className:"relative",children:[L&&(0,t.jsxs)("div",{role:"menu",className:"absolute bottom-[calc(100%+8px)] left-0 right-0 z-20 flex flex-col gap-px rounded-[14px] border border-[var(--color-border-strong)] bg-[var(--color-card)] p-1.5 shadow-[0_16px_40px_rgba(15,23,42,0.18)]",children:[(0,t.jsxs)(n.default,{href:"/perfil",onClick:W,className:"flex items-center gap-2.5 rounded-[9px] px-2.5 py-2.5 text-[13px] font-medium text-[var(--color-text)] transition-colors hover:bg-[var(--color-dark2)]",children:[(0,t.jsx)(v.User,{className:"h-4 w-4 shrink-0 text-[var(--color-muted)]",strokeWidth:1.6}),"Mi perfil"]}),(0,t.jsxs)(n.default,{href:"/perfil#suscripcion",onClick:W,className:"flex items-center gap-2.5 rounded-[9px] px-2.5 py-2.5 text-[13px] font-medium text-[var(--color-text)] transition-colors hover:bg-[var(--color-dark2)]",children:[(0,t.jsx)(b.CreditCard,{className:"h-4 w-4 shrink-0 text-[var(--color-muted)]",strokeWidth:1.6}),"Plan y facturación"]}),(0,t.jsxs)(n.default,{href:"/perfil#ayuda",onClick:W,className:"flex items-center gap-2.5 rounded-[9px] px-2.5 py-2.5 text-[13px] font-medium text-[var(--color-text)] transition-colors hover:bg-[var(--color-dark2)]",children:[(0,t.jsx)(w.LifeBuoy,{className:"h-4 w-4 shrink-0 text-[var(--color-muted)]",strokeWidth:1.6}),"Ayuda y soporte"]}),(0,t.jsx)("div",{className:"mx-1 my-[5px] h-px bg-[var(--color-border)]"}),(0,t.jsx)("form",{action:A.signOut,children:(0,t.jsxs)("button",{type:"submit",className:"flex w-full items-center gap-2.5 rounded-[9px] px-2.5 py-2.5 text-[13px] font-medium text-[var(--color-danger)] transition-colors hover:bg-[var(--color-danger-soft)]",children:[(0,t.jsx)(x.LogOut,{className:"h-4 w-4 shrink-0",strokeWidth:1.6}),"Cerrar sesión"]})})]}),(0,t.jsxs)("button",{type:"button",onClick:()=>B(e=>!e),"aria-haspopup":"true","aria-expanded":L,className:"flex w-full items-center gap-2.5 rounded-[10px] border border-[var(--color-border)] px-2.5 py-2 text-left transition-colors hover:bg-[var(--color-dark2)]",children:[(0,t.jsx)("span",{className:"grid h-[30px] w-[30px] shrink-0 place-items-center rounded-full bg-gradient-to-br from-[var(--color-brand)] to-[var(--color-brand-dark)] text-[12px] font-semibold text-white",children:U}),(0,t.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,t.jsx)("span",{className:"block truncate text-[13px] font-bold text-[var(--color-text)]",children:e?.
1split("@")[0]||"Mi cuenta"}),(0,t.jsx)("span",{className:"block truncate text-[11px] text-[var(--color-muted)]",children:_?"Suscripción activa":c?"Suscripción en pausa":"Sin suscripción"})]}),(0,t.jsx)(j.ChevronUp,{className:`h-4 w-4 shrink-0 text-[var(--color-muted)] transition-transform ${!L?"rotate-180":""}`})]})]})]})})]})]});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",onClick:()=>m(!0),"aria-label":"Abrir menú","aria-expanded":p,className:"grid h-9 w-9 place-items-center rounded-[var(--radius-btn)] bg-[var(--color-brand)] text-white shadow-[0_2px_8px_rgba(255,77,28,0.28)] transition-transform active:scale-95",children:(0,t.jsx)(o,{className:"h-5 w-5",strokeWidth:2})}),f&&p&&(0,s.createPortal)(z,document.body),T&&(0,t.jsx)(M,{isOpen:!0,onClose:()=>P(!1)}),R&&(0,t.jsx)(N,{isOpen:!0,onClose:()=>D(null),feature:"general",initialView:R})]})}var D=e.i(577714),L=e.i(121392);function B({email:e,isFree:i=!1,creditsRemaining:r=0,creditsResetDate:s=null,isGuest:n=!1,radarPrefs:a=null,pausaHasta:o=null}){return(0,t.jsxs)("header",{className:"sticky top-0 z-30 flex h-[54px] items-center justify-between border-b border-[var(--color-border)] bg-[var(--color-card)] px-3.5 md:hidden relative shadow-[0_4px_12px_-8px_rgba(15,23,42,0.2)] before:pointer-events-none before:absolute before:inset-x-0 before:bottom-full before:h-[240px] before:bg-[var(--color-card)]",children:[(0,t.jsx)("a",{href:"https://radarpro.ai",className:"block",children:(0,t.jsx)("img",{src:"/logo-negro.webp",alt:"RadarPro",className:"h-[22px] w-auto object-contain"})}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(L.CuentaArriba,{compacta:!0,isGuest:n,isFree:i,pausaHasta:o,creditsRemaining:r,creditsResetDate:s}),!n&&(0,t.jsx)(D.RadarBell,{radarPrefs:a,isFree:i,isGuest:n,variant:"navbar"}),(0,t.jsx)(R,{email:e,isGuest:n,isFree:i,pausaHasta:o,creditsRemaining:r,creditsResetDate:s})]})]})}e.s(["Navbar",()=>B],91976)},695914,e=>{"use strict";var t=e.i(843476),i=e.i(271645),r=e.i(770703),s=e.i(522016),n=e.i(618566),a=e.i(655900),o=e.i(284614),l=e.i(475254);let d=(0,l.default)("user-plus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);var h=e.i(204997),u=e.i(561659),c=e.i(2157),p=e.i(292270),m=e.i(270756);let f=(0,l.default)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]);var v=e.i(975157),x=e.i(631031);let g=(0,r.default)(()=>e.A(30539).then(e=>e.RegisterModal),{loadableGenerated:{modules:[420340]},ssr:!1}),y=new Set(["/inicio","/oportunidades","/analisis-ia"]),b=[{name:"Inicio",href:"/inicio",paths:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("path",{d:"M3 12l9-9 9 9"}),(0,t.jsx)("path",{d:"M5 10v10h14V10"})]})},{name:"Oportunidades",href:"/oportunidades",paths:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("rect",{x:"3",y:"4",width:"18",height:"4",rx:"1"}),(0,t.jsx)("rect",{x:"3",y:"11",width:"18",height:"4",rx:"1"}),(0,t.jsx)("rect",{x:"3",y:"18",width:"18",height:"3",rx:"1"})]})},{name:"Favoritos",href:"/favoritos",badge:"favoritos",paths:(0,t.jsx)("path",{d:"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78L12 21.23l8.84-8.84a5.5 5.5 0 0 0 0-7.78z"})},{name:"Alertas",href:"/alertas",badge:"alertas",paths:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"}),(0,t.jsx)("path",{d:"M10 21a2 2 0 0 0 4 0"})]})},{name:"Mis análisis",href:"/perfil/mis-informes",paths:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),(0,t.jsx)("path",{d:"M14 2v6h6"}),(0,t.jsx)("path",{d:"M8 13h8M8 17h5"})]})},{name:"Calculadora",href:"/calculadora",paths:(0,t.jsxs)("g",{strokeLinecap:"round",children:[(0,t.jsx)("rect",{x:"4",y:"2",width:"16",height:"20",rx:"2"}),(0,t.jsx)("line",{x1:"8",y1:"6",x2:"16",y2:"6"}),(0,t.jsx)("line",{x1:"8",y1:"11",x2:"8",y2:"11"}),(0,t.jsx)("line",{x1:"12",y1:"11",x2:"12",y2:"11"}),(0,t.jsx)("line",{x1:"16",y1:"11",x2:"16",y2:"11"}),(0,t.jsx)("line",{x1:"8",y1:"15",x2:"8",y2:"15"}),(0,t.jsx)("line",{x1:"12",y1:"15",x2:"12",y2:"15"}),(0,t.jsx)("line",{x1:"16",y1:"15",x2:"16",y2:"18"})]})},{name:"Análisis",href:"/analisis-ia",paths:(0,t.jsx)("path",{d:"M12 2l2.39 4.84L20 8l-4 3.9.94 5.5L12 14.77l-4.94 2.63L8 11.9 4 8l5.61-1.16L12 2z"})}],w={mensual:"Suscripción Mensual",anual:"Suscripción Anual",Fundador:"Acceso Total Fundador",admin:"Plan Admin",vip:"Plan VIP"};function j({plan:e,email:r,isGuest:l=!1,favoritesCount:j=0,alertasCount:k=0,pausaHasta:S=null}){let T=(0,n.usePathname)(),P=(0,n.useRouter)(),C=(0,i.useRef)(new Set),A=e=>{!e||"#"===e||C.current.has(e)||(C.current.add(e),P.prefetch(e))},[M,N]=(0,i.useState)(!1),[E,V]=(0,i.useState)("options"),[R,D]=(0,i.useState)("general"),[L,B]=(0,i.useState)(!1),F=(0,i.useRef)(null),O=e&&w[e]?w[e]:null,I=(r?.trim()?.[0]||"U").toUpperCase(),_=(e,t="options")=>{D(e),V(t),N(!0)};return(0,i.useEffect)(()=>
1{if(!l||sessionStorage.getItem("hasSeenRegisterPopup"))return;let e=setTimeout(()=>{_("general"),sessionStorage.setItem("hasSeenRegisterPopup","true")},12e4);return()=>clearTimeout(e)},[l]),(0,i.useEffect)(()=>{if(!L)return;let e=e=>{F.current&&!F.current.contains(e.target)&&B(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[L]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("aside",{"data-barra":!0,onMouseLeave:()=>B(!1),className:"hidden md:flex fixed left-0 top-0 z-40 h-[100dvh] w-[var(--ancho-barra)] flex-col gap-[18px] overflow-x-hidden border-r border-[var(--color-border)] bg-[var(--color-card)] px-[14px] py-[18px] transition-[width,box-shadow] duration-200 ease-out hover:w-[220px] hover:shadow-[12px_0_32px_-16px_rgba(15,23,42,0.3)] has-[:focus-visible]:w-[220px] motion-reduce:transition-none",children:[(0,t.jsxs)("a",{href:"https://radarpro.ai",className:"flex h-[30px] shrink-0 items-center gap-[3.5px] px-1.5",children:[(0,t.jsx)("img",{src:"/icono.png",alt:"RadarPro",loading:"lazy",className:"ml-[0.5px] h-[25px] w-[25px] max-w-none shrink-0"}),(0,t.jsx)("img",{src:"/logo-letras.webp",alt:"",loading:"lazy",className:"h-[26px] w-auto max-w-none shrink-0 plegada:hidden"})]}),(0,t.jsx)("nav",{className:"flex flex-col gap-0.5",children:b.map(e=>{let i=T===e.href||T.startsWith(`${e.href}/`),r=l&&!y.has(e.href),n="favoritos"===e.badge?j:"alertas"===e.badge?k:0;return(0,t.jsxs)(s.default,{href:r?"#":e.href,onClick:t=>{r&&(t.preventDefault(),_("Favoritos"===e.name?"favorite":"Alertas"===e.name?"alert":"general"))},onMouseEnter:()=>!r&&A(e.href),onTouchStart:()=>!r&&A(e.href),className:(0,v.cn)("relative flex h-9 items-center gap-2.5 rounded-[10px] px-2.5 text-[13.5px] font-medium transition-colors plegada:justify-center plegada:px-0",i?"bg-[var(--color-dark2)] text-[var(--color-text)]":"text-[var(--color-muted)] hover:bg-[var(--color-dark2)] hover:text-[var(--color-text)]"),children:[(0,t.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.6,className:(0,v.cn)("h-[17px] w-[17px] shrink-0",i?"text-[var(--color-text)]":"text-[var(--color-muted)]"),children:e.paths}),(0,t.jsx)("span",{className:"flex-1 truncate plegada:sr-only",children:e.name}),!r&&n>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"inline-flex h-5 min-w-[20px] items-center justify-center rounded-full bg-[var(--color-dark2)] px-1.5 text-[11px] font-bold text-[var(--color-muted)] tabular-nums plegada:hidden",children:n}),(0,t.jsx)("span",{"aria-hidden":!0,className:"absolute right-[9px] top-[7px] hidden h-[7px] w-[7px] rounded-full bg-[var(--color-brand)] ring-2 ring-[var(--color-card)] plegada:block"})]}),r&&(0,t.jsx)(m.Lock,{className:"h-3.5 w-3.5 shrink-0 opacity-60 plegada:hidden"})]},e.href)})}),(0,t.jsx)("div",{className:"mt-auto flex flex-col gap-2.5 border-t border-[var(--color-border)] pt-3.5",children:l?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>_("general"),className:"flex h-10 w-full items-center justify-center overflow-hidden whitespace-nowrap rounded-[10px] bg-[var(--color-brand)] px-3 text-[13px] font-bold text-on-brand transition-opacity hover:opacity-90 plegada:px-0",children:[(0,t.jsx)(d,{"aria-hidden":!0,className:"hidden h-4 w-4 plegada:block"}),(0,t.jsx)("span",{className:"plegada:sr-only",children:"Crear cuenta gratis"})]}),(0,t.jsxs)("button",{type:"button",onClick:()=>_("general","login"),className:"flex h-10 w-full items-center justify-center overflow-hidden whitespace-nowrap rounded-[10px] border border-[var(--color-border-strong)] px-3 text-[13px] font-bold text-[var(--color-muted)] transition-colors hover:bg-[var(--color-dark2)] hover:text-[var(--color-text)] plegada:px-0",children:[(0,t.jsx)(h.LogIn,{"aria-hidden":!0,className:"hidden h-4 w-4 plegada:block"}),(0,t.jsx)("span",{className:"plegada:sr-only",children:"Iniciar sesión"})]})]}):(0,t.jsxs)("div",{ref:F,className:"relative",children:[L&&(0,t.jsxs)("div",{role:"menu",className:"absolute bottom-[calc(100%+8px)] left-0 right-0 z-20 flex flex-col gap-px rounded-[14px] border border-[var(--color-border-strong)] bg-[var(--color-card)] p-1.5 shadow-[0_16px_40px_rgba(15,23,42,0.18)]",children:[(0,t.jsxs)(s.default,{href:"/perfil",onClick:()=>B(!1),className:"flex items-center gap-2.5 rounded-[9px] px-2.5 py-2.5 text-[13px] font-medium text-[var(--color-text)] transition-colors hover:bg-[var(--color-dark2)]",children:[(0,t.jsx)(o.User,{className:"h-4 w-4 shrink-0 text-[var(--color-muted)]",strokeWidth:1.6}),"Mi perfil"]}),(0,t.jsxs)(s.default,{href:"/perfil#suscripcion",onClick:()=>B(!1),className:"flex items-center gap-2.5 rounded-[9px] px-2.5 py-2.5 text-[13px] font-medium text-[var(--color-text)] transition-colors hover:bg-[var(--color-dark2)]",children:[(0,t.jsx)(u.Credit
1Card,{className:"h-4 w-4 shrink-0 text-[var(--color-muted)]",strokeWidth:1.6}),"Plan y facturación"]}),(0,t.jsxs)(s.default,{href:"/perfil#ayuda",onClick:()=>B(!1),className:"flex items-center gap-2.5 rounded-[9px] px-2.5 py-2.5 text-[13px] font-medium text-[var(--color-text)] transition-colors hover:bg-[var(--color-dark2)]",children:[(0,t.jsx)(c.LifeBuoy,{className:"h-4 w-4 shrink-0 text-[var(--color-muted)]",strokeWidth:1.6}),"Ayuda y soporte"]}),"admin"===e&&(0,t.jsxs)(s.default,{href:"/correos",onClick:()=>B(!1),className:"flex items-center gap-2.5 rounded-[9px] px-2.5 py-2.5 text-[13px] font-medium text-[var(--color-text)] transition-colors hover:bg-[var(--color-dark2)]",children:[(0,t.jsx)(f,{className:"h-4 w-4 shrink-0 text-[var(--color-muted)]",strokeWidth:1.6}),"Correos"]}),(0,t.jsx)("div",{className:"mx-1 my-[5px] h-px bg-[var(--color-border)]"}),(0,t.jsx)("form",{action:x.signOut,children:(0,t.jsxs)("button",{type:"submit",className:"flex w-full items-center gap-2.5 rounded-[9px] px-2.5 py-2.5 text-[13px] font-medium text-[var(--color-danger)] transition-colors hover:bg-[var(--color-danger-soft)]",children:[(0,t.jsx)(p.LogOut,{className:"h-4 w-4 shrink-0",strokeWidth:1.6}),"Cerrar sesión"]})})]}),(0,t.jsxs)("button",{type:"button",onClick:()=>B(e=>!e),"aria-haspopup":"true","aria-expanded":L,className:"flex h-12 w-full items-center gap-2.5 rounded-[10px] border border-transparent px-2.5 text-left transition-colors hover:bg-[var(--color-dark2)] plegada:justify-center plegada:px-0",children:[(0,t.jsx)("span",{className:"grid h-[30px] w-[30px] shrink-0 place-items-center rounded-full bg-gradient-to-br from-[var(--color-brand)] to-[var(--color-brand-dark)] text-[12px] font-semibold text-white",children:I}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 plegada:sr-only",children:[(0,t.jsx)("span",{className:"block truncate text-[13px] font-bold text-[var(--color-text)]",children:r?.split("@")[0]||"Mi cuenta"}),(0,t.jsx)("span",{className:"block truncate text-[11px] text-[var(--color-muted)]",children:S?"Suscripción en pausa":O||"Sin suscripción"})]}),(0,t.jsx)(a.ChevronUp,{className:(0,v.cn)("h-4 w-4 shrink-0 text-[var(--color-muted)] transition-transform plegada:hidden",!L&&"rotate-180")})]})]})})]}),M&&(0,t.jsx)(g,{isOpen:!0,onClose:()=>N(!1),feature:R,initialView:E})]})}e.s(["Sidebar",()=>j],695914)},169134,e=>{"use strict";var t=e.i(843476);let i=(0,e.i(770703).default)(()=>e.A(699115).then(e=>
1e.FloatingAsesor),{loadableGenerated:{modules:[745531]},ssr:!1});function r(e){return(0,t.jsx)("div",{"data-asesor-flotante":!0,className:"contents",children:(0,t.jsx)(i,{...e})})}e.s(["FloatingAsesorLazy",()=>r])},739015,e=>{e.v({anillos:"icono-radar-module__J2G1AG__anillos",barrer:"icono-radar-module__J2G1AG__barrer",barrido:"icono-radar-module__J2G1AG__barrido",radar:"icono-radar-module__J2G1AG__radar"})},577165,e=>{e.v({boton:"boton-radar-module__BKbQFG__boton",disco:"boton-radar-module__BKbQFG__disco",etiqueta:"boton-radar-module__BKbQFG__etiqueta",flotante:"boton-radar-module__BKbQFG__flotante",unete:"boton-radar-module__BKbQFG__unete"})},981076,e=>{"use strict";var t=e.i(843476),i=e.i(271645),r=e.i(770703),s=e.i(522016),n=e.i(618566),a=e.i(975157),o=e.i(739015);function l({className:e,pausado:i=!1,lento:r=!1}){return(0,t.jsxs)("span",{className:(0,a.cn)(o.default.radar,e),"data-pausado":i||void 0,"data-lento":r||void 0,"aria-hidden":!0,children:[(0,t.jsx)("span",{className:o.default.barrido}),(0,t.jsxs)("svg",{className:o.default.anillos,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.6,children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"4.5"}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"1.2",fill:"currentColor",stroke:"none"})]})]})}var d=e.i(924447),h=e.i(577165);let u=(0,r.default)(()=>e.A(30539).then(e=>e.RegisterModal),{loadableGenerated:{modules:[420340]},ssr:!1});function c({isGuest:e,conEtiqueta:r=!1,className:o}){let c=(0,n.usePathname)(),[p]=(0,d.useRadarActive)(),[m,f]=(0,i.useState)(!1),v="/radar"===c||c.startsWith("/radar/");return e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{type:"button",onClick:()=>f(!0),"aria-label":"Crear cuenta gratis",className:(0,a.cn)(h.default.boton,o),children:[(0,t.jsx)("span",{className:(0,a.cn)(h.default.disco,h.default.unete),children:"Ãnete"}),r&&(0,t.jsx)("span",{className:h.default.etiqueta,"data-activa":!0,children:"Gratis"})]}),m&&(0,t.jsx)(u,{isOpen:!0,onClose:()=>f(!1),feature:"general",initialView:"options"})]}):(0,t.jsxs)(s.default,{href:"/radar","aria-label":"Radar","aria-current":v?"page":void 0,className:(0,a.cn)(h.default.boton,o),children:[(0,t.jsx)(l,{className:h.default.disco,pausado:!p,lento:!0}),r&&(0,t.jsx)("span",{className:h.default.etiqueta,"data-activa":v||void 0,children:"Radar"})]})}function p({isGuest:e}){return(0,n.usePathname)().startsWith("/ficha")?null:(0,t.jsx)(c,{isGuest:e,className:h.default.flotante})}e.s(["BotonRadar",()=>c,"BotonRadarEscritorio",()=>p],981076)},950971,e=>{"use strict";var t=e.i(843476),i=e.i(271645),r=e.i(522016),s=e.i(770703),n=e.i(618566),a=e.i(694351),o=e.i(448876),l=e.i(245423),d=e.i(790597),h=e.i(975157),u=e.i(981076);let c=(0,s.default)(()=>e.A(30539).then(e=>e.RegisterModal),{loadableGenerated:{modules:[420340]},ssr:!1}),p=new Set(["/inicio","/oportunidades"]),m=[{name:"Inicio",href:"/inicio",icon:a.Home},{name:"Oportunidades",href:"/oportunidades",icon:o.ListOrdered},{name:"Alertas",href:"/alertas",icon:l.Bell},{name:"Favoritos",href:"/favoritos",icon:d.Heart}];function f({isGuest:e=!1}){let s=(0,n.usePathname)(),[a,o]=(0,i.useState)(!1),[l,d]=(0,i.useState)("general"),f=i=>{let n=s===i.href||s.startsWith(`${i.href}/`),a=e&&!p.has(i.href),l=i.icon;return(0,t.jsxs)(r.default,{href:a?"#":i.href,onClick:e=>{a&&(e.preventDefault(),d("Alertas"===i.name?"alert":"general"),o(!0))},className:(0,h.cn)("flex flex-1 flex-col items-center justify-center gap-1 py-1 text-[11px] font-medium transition-colors",n?"text-[var(--color-brand)]":"text-[var(--color-muted)]"),children:[(0,t.jsx)(l,{className:"h-[22px] w-[22px]",strokeWidth:1.7}),i.name]},i.href)};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("nav",{className:"fixed inset-x-0 bottom-0 z-30 flex items-stretch border-t border-[var(--color-border)] bg-[var(--color-card)] px-1.5 pt-1.5 pb-[calc(6px+env(safe-area-inset-bottom))] backdrop-blur-[12px] backdrop-saturate-150 md:hidden",children:[f(m[0]),f(m[1]),(0,t.jsx)("div",{className:"relative flex flex-1 justify-center",children:(0,t.jsx)(u.BotonRadar,{isGuest:e,conEtiqueta:!0,className:"absolute bottom-0 left-1/2 -translate-x-1/2"})}),f(m[2]),f(m[3])]}),a&&(0,t.jsx)(c,{isOpen:!0,onClose:()=>o(!1),feature:l,initialView:"options"})]})}e.s(["BottomNav",()=>f])},835802,e=>{"use strict";var t=e.i(843476),i=e.i(271645),r=e.i(618566),s=e.i(283086),n=e.i(37727),a=e.i(972520),o=e.i(561659),l=e.i(39312);let d=(0,e.i(475254).default)("circle-pause",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]]);var h=e.i(975157),u=e.i(403460);let c={recovery:6048e5,"free-upgrade":6048e5,pausa:6048e5,"no-credits":null},p="banner_dismissed_at",m="banner_dismissed_session";function f({isFree:e,creditsRemaining:n,hasAbandonedCheckout:a,pagoFallidoUrl:h,pausaHasta:f=null}){let[v,g]=(0,i.useState)(!1),[y,b]=(0,i.useState)({}),{openPricingModal:w}=(0,u.usePricingModal)(),j=(0,r.useRouter)();(0,i.useEffect)(()=>{let e={};
1["recovery","pausa","no-credits","free-upgrade"].forEach(t=>{e[t]=function(e){let t=c[e];if(null===t)try{return JSON.parse(sessionStorage.getItem(m)||"[]").includes(e)}catch{return!1}try{let i=JSON.parse(localStorage.getItem(p)||"{}")[e];if(!i)return!1;return Date.now()-i<t}catch{return!1}}(t)}),b(e);let t=setTimeout(()=>g(!0),1e3);return()=>clearTimeout(t)},[]);let k=e=>{!function(e){if(null===c[e]){try{let t=JSON.parse(sessionStorage.getItem(m)||"[]");sessionStorage.setItem(m,JSON.stringify([...t,e]))}catch{}return}try{let t=JSON.parse(localStorage.getItem(p)||"{}");t[e]=Date.now(),localStorage.setItem(p,JSON.stringify(t))}catch{}}(e),b(t=>({...t,[e]:!0})),g(!1)};return v?h?(0,t.jsx)(x,{id:"pago-fallido",title:"No pudimos cobrar tu suscripción.",description:"Tu acceso queda suspendido hasta completar el pago. Suele ser cosa del banco y se resuelve en un minuto.",buttonText:"Completar el pago",href:h,icon:(0,t.jsx)(o.CreditCard,{className:"h-4 w-4 md:h-5 md:w-5"}),variant:"dunning"}):f?y.pausa?null:(0,t.jsx)(x,{id:"pausa",title:"Tu suscripción está en pausa.",description:`Vuelve sola el ${f}. Si quieres el acceso antes, puedes reanudarla ya.`,buttonText:"Reanudar",onButtonClick:()=>j.push("/perfil#suscripcion"),icon:(0,t.jsx)(d,{className:"h-4 w-4 md:h-5 md:w-5"}),variant:"upgrade",onClose:()=>k("pausa")}):a&&!y.recovery?(0,t.jsx)(x,{id:"recovery",title:"¿Tuviste algún problema con el pago?",description:"Vimos que intentaste suscribirte. Tu acceso completo te está esperando.",buttonText:"Ver Planes",onButtonClick:w,icon:(0,t.jsx)(o.CreditCard,{className:"h-4 w-4 md:h-5 md:w-5"}),variant:"recovery",onClose:()=>k("recovery")}):n<=0&&e&&!y["no-credits"]?(0,t.jsx)(x,{id:"no-credits",title:"Has agotado tus créditos de IA",description:"Actualiza tu plan para seguir analizando oportunidades sin lÃmites.",buttonText:"Ver Planes",onButtonClick:w,icon:(0,t.jsx)(l.Zap,{className:"h-4 w-4 md:h-5 md:w-5"}),variant:"nocredits",onClose:()=>k("no-credits")}):e&&!y["free-upgrade"]?(0,t.jsx)(x,{id:"free-upgrade",title:"Desbloquea el poder total de RadarPro",description:"Estás en la cuenta gratuita. Los suscriptores acceden a todas las propiedades y funciones exclusivas.",buttonText:"Ver Planes",onButtonClick:w,icon:(0,t.jsx)(s.Sparkles,{className:"h-4 w-4 md:h-5 md:w-5"}),variant:"upgrade",onClose:()=>k("free-upgrade")}):null:null}let v={recovery:{box:"bg-[var(--color-brand-soft)] border-[var(--color-brand-border)]",ico:"bg-[var(--color-card)] border border-[var(--color-brand-border)] text-[var(--color-brand)]",cta:"bg-[var(--color-brand)] text-white hover:bg-[var(--color-brand-dark)]"},upgrade:{box:"bg-[var(--color-card)] border-[var(--color-border)]",ico:"bg-[var(--color-brand-soft)] border border-[var(--color-brand-border)] text-[var(--color-brand)]",cta:"bg-[var(--color-card)] text-[var(--color-text)] border border-[var(--color-border-strong)] hover:bg-[var(--color-dark2)]"},nocredits:{box:"bg-[var(--color-gold-soft)] border-[var(--color-gold-border)]",ico:"bg-[var(--color-card)] border border-[var(--color-gold-border)] text-[var(--color-gold)]",cta:"bg-[var(--color-gold)] text-on-brand hover:opacity-90"},dunning:{box:"bg-[var(--color-danger-soft)] border-[var(--color-danger-border)]",ico:"bg-[var(--color-card)] border border-[var(--color-danger-border)] text-[var(--color-danger)]",cta:"bg-[var(--color-danger)] text-on-brand hover:opacity-90"}};function x({title:e,description:i,buttonText:r,onButtonClick:s,href:o,icon:l,variant:d,onClose:u}){let c=v[d],p=(0,h.cn)("flex h-9 shrink-0 items-center justify-center gap-1.5 rounded-[var(--radius-btn)] px-4 text-[13px] font-bold transition-colors cursor-pointer max-sm:order-5 max-sm:w-full",c.cta);return(0,t.jsxs)("div",{className:(0,h.cn)("mb-6 flex flex-wrap items-center gap-3.5 rounded-[var(--radius-card)] border px-4 py-3 text-[var(--color-text)] animate-in fade-in slide-in-from-top-4 duration-500",c.box),children:[(0,t.jsx)("span",{className:(0,h.cn)("flex h-9 w-9 shrink-0 items-center justify-center rounded-[11px]",c.ico),children:l}),(0,t.jsxs)("p",{className:"min-w-0 flex-1 text-[13.5px] leading-[1.45]",children:[(0,t.jsx)("b",{className:"font-bold",children:e})," ",(0,t.jsx)("span",{className:"text-[var(--color-muted)]",children:i})]}),o?(0,t.jsxs)("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:p,children:[r,(0,t.jsx)(a.ArrowRight,{className:"h-3.5 w-3.5"})]}):(0,t.jsxs)("button",{onClick:s,className:p,children:[r,(0,t.jsx)(a.ArrowRight,{className:"h-3.5 w-3.5"})]}),u&&(0,t.jsx)("button",{onClick:u,className:"grid h-[30px] w-[30px] shrink-0 place-items-center rounded-full text-[var(--color-muted)] opacity-60 transition-opacity hover:opacity-100 cursor-pointer","aria-label":"Cerrar",children:(0,t.jsx)(n.X,{className:"h-3.5 w-3.5"})})]})}e.s(["SmartBanners",()=>f],835802)},598753,e=>{"use strict";var t=e.i(843476),i=e.i(271645),r=e.i(770703),s=e.i(618566),n=e.i(426515),a=e.i(61203);let o=(0,r.default)(()=>e.A(692726).then(e=>e.CreditsModal),{loadableGenerated:{modules:[773256]},ssr:!1}),l=(0,r.default)(()=>e.A(313947).then(e=>
1e.PremiumModal),{loadableGenerated:{modules:[559625]},ssr:!1}),d="low_credits_modal_shown";function h({initialCreditsRemaining:e,initialResetDate:r,isFree:h,isAdmin:c}){let{credits:p,resetDate:m}=(0,n.useCreditsSync)(e,r),f=(0,s.useSearchParams)(),v=f?.get("coupon")?.trim()||null,x=(0,s.usePathname)(),[g,y]=(0,i.useState)(!1),[b,w]=(0,i.useState)(!1),j=(0,i.useRef)(!1);return(0,i.useEffect)(()=>{if(c||v||!("/oportunidades"===x||x.startsWith("/ficha")||x.startsWith("/analisis-ia")))return;let e=h&&p<=10,t=!h&&p>0&&p<=a.CREDIT_THRESHOLDS.LOW;if(!e&&!t||j.current)return;try{if(sessionStorage.getItem(d))return}catch{}let i=setTimeout(()=>{if(!j.current){j.current=!0,y(!0);try{sessionStorage.setItem(d,"1")}catch{}}},1500);return()=>clearTimeout(i)},[p,h,c,v,x]),(0,t.jsxs)(t.Fragment,{children:[b&&(0,t.jsx)(o,{isOpen:!0,onClose:()=>w(!1)}),g&&h&&(0,t.jsx)(l,{isOpen:!0,onClose:()=>y(!1),paywallType:"creditos",titulo:p>0?`Solo te quedan ${p} cr\xe9dito${1!==p?"s":""}`:"Te has quedado sin créditos"}),g&&!h&&(0,t.jsxs)("div",{className:"fixed inset-0 z-[200] flex items-center justify-center p-4","aria-modal":"true",role:"dialog",children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:()=>y(!1)}),(0,t.jsxs)("div",{className:"relative max-h-[90dvh] w-full max-w-md overflow-y-auto rounded-[18px] border border-[var(--color-border-strong)] bg-[var(--color-card)] shadow-[0_30px_80px_rgba(15,23,42,0.22)] animate-in fade-in zoom-in-95 duration-300",children:[(0,t.jsx)("div",{className:"h-1 w-full bg-[var(--color-brand)]"}),(0,t.jsx)("div",{className:"relative space-y-5 p-6 sm:p-8",children:(0,t.jsx)(u,{credits:p,resetDate:m,onClose:()=>y(!1),onBuyCredits:()=>{y(!1),w(!0)}})})]})]})]})}function u({credits:e,resetDate:i,onClose:r,onBuyCredits:s}){let n=i?new Date(i).toLocaleDateString("es-ES",{day:"numeric",month:"long"}):null;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,t.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-full border border-[var(--color-gold-border)] bg-[var(--color-gold-soft)] text-3xl",children:"â¡"}),(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full border border-[var(--color-gold-border)] bg-[var(--color-gold-soft)] px-3 py-1 text-xs font-bold text-[var(--color-gold)]",children:["Te quedan ",e," crédito",1!==e?"s":""]})]}),(0,t.jsxs)("div",{className:"space-y-2 text-center",children:[(0,t.jsx)("h2",{className:"text-xl font-bold",style:{fontFamily:"var(--font-display)"},children:"Tus créditos se están agotando"}),(0,t.jsx)("p",{className:"text-sm leading-relaxed text-[var(--color-muted)]",children:n?(0,t.jsxs)(t.Fragment,{children:["Se renuevan automáticamente el ",(0,t.jsx)("strong",{className:"text-[var(--color-text)]",children:n}),". Si necesitas más antes, puedes comprar un pack adicional sin cancelar tu plan."]}):(0,t.jsx)(t.Fragment,{children:"Si necesitas más créditos antes de la próxima renovación, puedes comprar un pack adicional sin cancelar tu plan."})})]}),(0,t.jsxs)("div",{className:"space-y-2 rounded-[var(--radius-card)] border border-[var(--color-gold-border)] bg-[var(--color-gold-soft)] p-4",children:[(0,t.jsx)("p",{className:"text-xs font-bold uppercase tracking-widest text-[var(--color-gold)]",children:"Los créditos extra"}),(0,t.jsx)("ul",{className:"space-y-1.5",children:["Se suman a tu saldo actual","Nunca caducan","No afectan a tu suscripción"].map(e=>(0,t.jsxs)("li",{className:"flex items-center gap-2 text-xs text-[var(--color-text)]",children:[(0,t.jsx)("span",{className:"shrink-0 font-bold text-[var(--color-green)]",children:"â"}),e]},e))})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,t.jsx)("button",{onClick:s,className:"inline-flex w-full items-center justify-center gap-2 rounded-[var(--radius-btn)] bg-[var(--color-brand)] px-6 py-3 text-sm font-bold text-white transition-colors hover:bg-[var(--color-brand-dark)] cursor-pointer",children:"â¡ Comprar créditos extra"}),(0,t.jsx)("button",{onClick:r,className:"w-full px-6 py-2 text-xs font-medium text-[var(--color-muted)] transition-colors hover:text-[var(--color-text)] cursor-pointer",children:"Seguir usando mis créditos"})]}),(0,t.jsx)("p",{className:"text-center text-xs text-[var(--color-muted)]",children:"Los créditos son acumulables y nunca caducan"})]})}e.s(["LowCreditsModal",()=>h])},635606,e=>{"use strict";let t,i,r,s;var n,a=e.i(843476),o=e.i(271645),l=e.i(618566);let d=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],h=new Set(d),u=(e,t,i)=>i>t?t:i<e?e:i,c={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},p={...c,transform:e=>u(0,1,e)},m={...c,default:1},f=e=>Math.round(1e5*e)/1e5,v=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,x=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,g=(e,t)=>i=>!!("string"==typeof i&&x.test(i)&&i.startsWith(e)||t&&null!=i&&Object.prototype.hasOwnProperty.call(i,t)),y=(e,t,i)=>r=>{if("string"!=typeof r)return r;let[s,n,a,o]=r.match(v);return{[e]:parseFloat(s),[t]:parseFloat(n),[i]:parseFloat(a),alpha:void 0!==o?parseFloat(o):1}},b={...c,transform:e=>Math.round(u(0,255,e))},w={test:g("rgb","red"),parse:y("red","green","blue"),transform:({red:e,green:t,blue:i,alpha:r=1})=>"rgba("+b.transform(e)+", "+b.transform(t)+", "+b.transform(i)+", "+f(p.transform(r))+")"},j={test:g("#"),parse:function(e){let t="",i="",r="",s="";return e.length>5?(t=e.substring(1,3),i=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),i=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,i+=i,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(i,16),blue:parseInt(r,16),alph
1a:s?parseInt(s,16)/255:1}},transform:w.transform},k=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),S=k("deg"),T=k("%"),P=k("px"),C=k("vh"),A=k("vw"),M={...T,parse:e=>T.parse(e)/100,transform:e=>T.transform(100*e)},N={test:g("hsl","hue"),parse:y("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:i,alpha:r=1})=>"hsla("+Math.round(e)+", "+T.transform(f(t))+", "+T.transform(f(i))+", "+f(p.transform(r))+")"},E={test:e=>w.test(e)||j.test(e)||N.test(e),parse:e=>w.test(e)?w.parse(e):N.test(e)?N.parse(e):j.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?w.transform(e):N.transform(e),getAnimatableNone:e=>{let t=E.parse(e);return t.alpha=0,E.transform(t)}},V=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,R="number",D="color",L=/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 B(e){let t=e.toString(),i=[],r={color:[],number:[],var:[]},s=[],n=0,a=t.replace(L,e=>(E.test(e)?(r.color.push(n),s.push(D),i.push(E.parse(e))):e.startsWith("var(")?(r.var.push(n),s.push("var"),i.push(e)):(r.number.push(n),s.push(R),i.push(parseFloat(e))),++n,"${}")).split("${}");return{values:i,split:a,indexes:r,types:s}}function F({split:e,types:t}){let i=e.length;return r=>{let s="";for(let n=0;n<i;n++)if(s+=e[n],void 0!==r[n]){let e=t[n];e===R?s+=f(r[n]):e===D?s+=E.transform(r[n]):s+=r[n]}return s}}let O={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(v)?.length||0)+(e.match(V)?.length||0)>0},parse:function(e){return B(e).values},createTransformer:function(e){return F(B(e))},getAnimatableNone:function(e){let t=B(e);return F(t)(t.values.map((e,i)=>((e,t)=>"number"==typeof e?t?.trim().endsWith("/")?e:0:"number"==typeof e?0:E.test(e)?E.getAnimatableNone(e):e)(e,t.split[i])))}},I=new Set(["brightness","contrast","saturate","opacity"]);function _(e){let[t,i]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[r]=i.match(v)||[];if(!r)return e;let s=i.replace(r,""),n=+!!I.has(t);return r!==i&&(n*=100),t+"("+n+s+")"}let U=/\b([a-z-]*)\(.*?\)/gu,W={...O,getAnimatableNone:e=>{let t=e.match(U);return t?t.map(_).join(" "):e}},$={...O,getAnimatableNone:e=>{let t=O.parse(e);return O.createTransformer(e)(t.map(e=>"number"==typeof e?0:"object"==typeof e?{...e,alpha:1}:e))}},z={...c,transform:Math.round},H={borderWidth:P,borderTopWidth:P,borderRightWidth:P,borderBottomWidth:P,borderLeftWidth:P,borderRadius:P,borderTopLeftRadius:P,borderTopRightRadius:P,borderBottomRightRadius:P,borderBottomLeftRadius:P,width:P,maxWidth:P,height:P,maxHeight:P,top:P,right:P,bottom:P,left:P,inset:P,insetBlock:P,insetBlockStart:P,insetBlockEnd:P,insetInline:P,insetInlineStart:P,insetInlineEnd:P,padding:P,paddingTop:P,paddingRight:P,paddingBottom:P,paddingLeft:P,paddingBlock:P,paddingBlockStart:P,paddingBlockEnd:P,paddingInline:P,paddingInlineStart:P,paddingInlineEnd:P,margin:P,marginTop:P,marginRight:P,marginBottom:P,marginLeft:P,marginBlock:P,marginBlockStart:P,marginBlockEnd:P,marginInline:P,marginInlineStart:P,marginInlineEnd:P,fontSize:P,backgroundPositionX:P,backgroundPositionY:P,rotate:S,rotateX:S,rotateY:S,rotateZ:S,scale:m,scaleX:m,scaleY:m,scaleZ:m,skew:S,skewX:S,skewY:S,distance:P,translateX:P,translateY:P,translateZ:P,x:P,y:P,z:P,perspective:P,transformPerspective:P,opacity:p,originX:M,originY:M,originZ:P,zIndex:z,fillOpacity:p,strokeOpacity:p,numOctaves:z},G={...H,color:E,backgroundColor:E,outlineColor:E,fill:E,stroke:E,borderColor:E,borderTopColor:E,borderRightColor:E,borderBottomColor:E,borderLeftColor:E,filter:W,WebkitFilter:W,mask:$,WebkitMask:$},q=e=>G[e],X=()=>({translate:0,scale:1,origin:0,originPoint:0}),Y=()=>({x:X(),y:X()}),K=()=>({min:0,max:0}),Z=()=>({x:K(),y:K()}),J=e=>!!(e&&e.getVelocity),Q=new Set(["width","height","top","left","right","bottom",...d]),ee=e=>t=>t.test(e),et=[c,P,T,S,A,C,{test:e=>"auto"===e,parse:e=>e}],ei=e=>et.find(ee(e));var er=e.i(247167);let es=()=>{},en=()=>{};er.default;let ea=e=>t=>"string"==typeof t&&t.startsWith(e),eo=ea("--"),el=ea("var(--"),ed=e=>!!el(e)&&eh.test(e.split("/*")[0].trim()),eh=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function eu(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}let ec=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,ep=e=>180*e/Math.PI,em=e=>ev(ep(Math.atan2(e[1],e[0]))),ef={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:em,rotateZ:em,skewX:e=>ep(Math.atan(e[1])),skewY:e=>ep(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},ev=e=>((e%=360)<0&&(e+=360),e),ex=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),eg=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),ey={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ex,scaleY:eg,scale:e=>(ex(e)+eg(e))/2,rotateX:e=>ev(ep(Math.atan2(e[6],e[5]))),rotateY:e=>ev(ep(Math.atan2(-e[2],e[0]))),rotateZ:em,rotate:em,skewX:e=>ep(Math.atan(e[4])),skewY:e=>ep(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function eb(e){return+!!e.includes("scale")}function ew(e,t){let i,r;if(!e||"none"===e)return eb(t);let s=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);if(s)i=ey,r=s;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=ef,r=t}if(!r)return eb(t);let n=i[t],a=r[1].split(",").map(ej);return"function"==typeof n?n(a):a[n]}function ej(e){return parseFloat(e.trim())}let ek=e=>e===c||e===P,eS=new Set(["x","y","z"]),eT=d.filter(e=>!eS.has(e)),eP={width:({x:e},{paddingLeft:t="0",paddingRight:i="0",boxSizing:r})=>{let s=e.max-e.min;return"border-box"===r?s:s-parseFloat(t)-parseFloat(i)},height:({y:e},{paddingTop:t="0",paddingBottom:i="0",boxSizing:r})=>{let s=e.max-e.min;return"border-box"===r?s:s-parseFloat(t)-parseFloat(i)},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})=>ew(t,"x"),y:(e,{transform:t})=>ew(t,"y")};eP.translateX=eP.x,eP.translateY=eP.y;let eC=e=>e,eA={},eM=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function eN(e,t){let i=!1,r=!0,s={delta:0,timestamp:0,isProcessing:!1},n=()=>i=!0,a=eM.reduce((e,i)=>(e[i]=function(e,t){let i=new Set,r=new Set,s=!1,n=!1,a=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1},l=0;function d(t){a.has(t)&&(h.schedule(t),e()),l++,t(o)}let h={schedule:(e,t=!1,n=!1)=>{let o=n&&s?i:r;return t&&a.add(e),o.add(e),e},cancel:e=>{r.delete(e),a.delete(e)},process:e=>{if(o=e,s){n=!0;return}s=!0;let a=i;
1i=r,r=a,i.forEach(d),t,l=0,i.clear(),s=!1,n&&(n=!1,h.process(e))}};return h}(n,t?i:void 0),e),{}),{setup:o,read:l,resolveKeyframes:d,preUpdate:h,update:u,preRender:c,render:p,postRender:m}=a,f=()=>{let n=eA.useManualTiming,a=n?s.timestamp:performance.now();i=!1,n||(s.delta=r?1e3/60:Math.max(Math.min(a-s.timestamp,40),1)),s.timestamp=a,s.isProcessing=!0,o.process(s),l.process(s),d.process(s),h.process(s),u.process(s),c.process(s),p.process(s),m.process(s),s.isProcessing=!1,i&&t&&(r=!1,e(f))};return{schedule:eM.reduce((t,n)=>{let o=a[n];return t[n]=(t,n=!1,a=!1)=>(!i&&(i=!0,r=!0,s.isProcessing||e(f)),o.schedule(t,n,a)),t},{}),cancel:e=>{for(let t=0;t<eM.length;t++)a[eM[t]].cancel(e)},state:s,steps:a}}let{schedule:eE,cancel:eV,state:eR,steps:eD}=eN("u">typeof requestAnimationFrame?requestAnimationFrame:eC,!0),eL=new Set,eB=!1,eF=!1,eO=!1;function eI(){if(eF){let e=Array.from(eL).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),i=new Map;t.forEach(e=>{let t,r=(t=[],eT.forEach(i=>{let r=e.getValue(i);void 0!==r&&(t.push([i,r.get()]),r.set(+!!i.startsWith("scale")))}),t);r.length&&(i.set(e,r),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=i.get(e);t&&t.forEach(([t,i])=>{e.getValue(t)?.set(i)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}eF=!1,eB=!1,eL.forEach(e=>e.complete(eO)),eL.clear()}function e_(){eL.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(eF=!0)})}class eU{constructor(e,t,i,r,s,n=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=i,this.motionValue=r,this.element=s,this.isAsync=n}scheduleResolve(){this.state="scheduled",this.isAsync?(eL.add(this),eB||(eB=!0,eE.read(e_),eE.resolveKeyframes(eI))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:i,motionValue:r}=this;if(null===e[0]){let s=r?.get(),n=e[e.length-1];if(void 0!==s)e[0]=s;else if(i&&t){let r=i.readValue(t,n);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=n),r&&void 0===s&&r.set(e[0])}for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),eL.delete(this)}cancel(){"scheduled"===this.state&&(eL.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}let eW=new Set([W,$]);function e$(e,t){let i=q(e);return eW.has(i)||(i=O),i.getAnimatableNone?i.getAnimatableNone(t):void 0}let ez=new Set(["auto","none","0"]);class eH extends eU{constructor(e,t,i,r,s){super(e,t,i,r,s,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:i}=this;if(!t||!t.current)return;super.readKeyframes();for(let i=0;i<e.length;i++){let r=e[i];if("string"==typeof r&&ed(r=r.trim())){let s=function e(t,i,r=1){en(r<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[s,n]=function(e){let t=ec.exec(e);if(!t)return[,];let[,i,r,s]=t;return[`--${i??r}`,s]}(t);if(!s)return;let a=window.getComputedStyle(i).getPropertyValue(s);if(a){let e=a.trim();return/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e)?parseFloat(e):e}return ed(n)?e(n,i,r+1):n}(r,t.current);void 0!==s&&(e[i]=s),i===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Q.has(i)||2!==e.length)return;let[r,s]=e,n=ei(r),a=ei(s);if(eu(r)!==eu(s)&&eP[i]){this.needsMeasurement=!0;return}if(n!==a)if(ek(n)&&ek(a))for(let t=0;t<e.length;t++){let i=e[t];"string"==typeof i&&(e[t]=parseFloat(i))}else eP[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,i=[];for(let t=0;t<e.length;t++)(null===e[t]||function(e){if("number"==typeof e)return 0===e;if(null===e)return!0;return"none"===e||"0"===e||/^0[^.\s]+$/u.test(e)}(e[t]))&&i.push(t);i.length&&function(e,t,i){let r,s=0;for(;s<e.length&&!r;){let t=e[s];"string"==typeof t&&!ez.has(t)&&B(t).values.length&&(r=e[s]),s++}if(r&&i)for(let s of t)e[s]=e$(i,r)}(e,i,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:i}=this;if(!e||!e.current)return;"height"===i&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=eP[i](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];void 0!==r&&e.getValue(i,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:i}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let s=i.length-1,n=i[s];i[s]=eP[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==n&&void 0===this.finalKeyframe&&(this.finalKeyframe=n),this.removedTransforms?.length&&this.removedTransforms.forEac
1h(([t,i])=>{e.getValue(t).set(i)}),this.resolveNoneKeyframes()}}let eG=e=>1e3*e;function eq(e,t){-1===e.indexOf(t)&&e.push(t)}function eX(e,t){let i=e.indexOf(t);i>-1&&e.splice(i,1)}class eY{constructor(){this.subscriptions=[]}add(e){return eq(this.subscriptions,e),()=>eX(this.subscriptions,e)}notify(e,t,i){let r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,i);else for(let s=0;s<r;s++){let r=this.subscriptions[s];r&&r(e,t,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function eK(e,t,i){t.startsWith("--")?e.style.setProperty(t,i):e.style[t]=i}function eZ(e){let t;return()=>(void 0===t&&(t=e()),t)}let eJ={};function eQ(e,t){let i=eZ(e);return()=>eJ[t]??i()}let e0=eQ(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),e1=e=>null!==e;function e2(e,{repeat:t,repeatType:i="loop"},r,s=1){let n=e.filter(e1),a=s<0||t&&"loop"!==i&&t%2==1?0:n.length-1;return a&&void 0!==r?r:n[a]}class e5{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}let e4={layout:0,mainThread:0,waapi:0},e3=e=>Array.isArray(e)&&"number"==typeof e[0],e6=eQ(()=>{try{document.createElement("div").animate({opacity:0}
1,{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),e7=(e,t,i=10)=>{let r="",s=Math.max(Math.round(t/i),2);for(let t=0;t<s;t++)r+=Math.round(1e4*e(t/(s-1)))/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},e9=([e,t,i,r])=>`cubic-bezier(${e}, ${t}, ${i}, ${r})`,e8={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:e9([0,.65,.55,1]),circOut:e9([.55,0,1,.45]),backIn:e9([.31,.01,.66,-.59]),backOut:e9([.33,1.53,.69,.99])};function te(e){return"function"==typeof e&&"applyToOptions"in e}class tt extends e5{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:t,name:i,keyframes:r,pseudoElement:s,allowFlatten:n=!1,finalKeyframe:a,onComplete:o}=e;this.isPseudoElement=!!s,this.allowFlatten=n,this.options=e,en("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const l=function({type:e,...t}){return te(e)&&e6()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=function(e,t,i,{delay:r=0,duration:s=300,repeat:n=0,repeatType:a="loop",ease:o="easeOut",times:l}={},d){let h={[t]:i};l&&(h.offset=l);let u=function e(t,i){if(t)return"function"==typeof t?e6()?e7(t,i):"ease-out":e3(t)?e9(t):Array.isArray(t)?t.map(t=>e(t,i)||e8.easeOut):e8[t]}(o,s);Array.isArray(u)&&(h.easing=u);let c={delay:r,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:n+1,direction:"reverse"===a?"alternate":"normal"};d&&(c.pseudoElement=d);let p=e.animate(h,c);return p}(t,i,r,l,s),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){let e=e2(r,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(e),eK(t,i,e),this.animation.cancel()}o?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){return Number(this.animation.effect?.getComputedTiming?.().duration||0)/1e3}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+e/1e3}get time(){return(Number(this.animation.currentTime)||0)/1e3}set time(e){let t=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=eG(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:i,observe:r}){return(this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&e0())?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),i&&(this.animation.rangeEnd=i),eC):r(this)}}let ti=new Set(["opacity","clipPath","filter","transform"]),{schedule:tr}=eN(queueMicrotask,!1);function ts(){t=void 0}let tn={now:()=>(void 0===t&&tn.set(eR.isProcessing||eA.useManualTiming?eR.timestamp:performance.now()),t),set:e=>{t=e,queueMicrotask(ts)}};class ta{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=tn.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=tn.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=!isNaN(parseFloat(this.current)))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new eY);let i=this.events[e].add(t);return"change"===e?()=>{i(),eE.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,i){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-i}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return s&&s.push(this),this.current}getPrevious(){return this.prev}getVelocity(){var e;let t=tn.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;let i=Math.min(this.updatedAt-this.prevUpdatedAt,30);return e=parseFloat(this.current)-parseFloat(this.prevFrameValue),i?1e3/i*e:0}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),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 to(e,t){return new ta(e,t)}let tl=[...et,E,O],td=new WeakMap;function th(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function tu(e){return"string"==typeof e||Array.isArray(e)}let tc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],tp=["initial",...tc];function tm(e){return th(e.animate)||tp.some(t=>tu(e[t]))}function tf(e){return!!(tm(e)||e.variants)}var tv=e.i(138544);function tx(e){let t=[{},{}];
1return e?.values.forEach((e,i)=>{t[0][i]=e.get(),t[1][i]=e.getVelocity()}),t}function tg(e,t,i,r){if("function"==typeof t){let[s,n]=tx(r);t=t(void 0!==i?i:e.custom,s,n)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){let[s,n]=tx(r);t=t(void 0!==i?i:e.custom,s,n)}return t}var ty=e.i(571164);let tb=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],tw={};class tj{scrapeMotionValuesFromProps(e,t,i){return{}}constructor({parent:e,props:t,presenceContext:i,reducedMotionConfig:r,skipAnimations:s,blockInitialAnimation:n,visualState:a},o={}){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=eU,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=()=>{let e=tn.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,eE.render(this.render,!1,!0))};const{latestValues:l,renderState:d}=a;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=d,this.parent=e,this.props=t,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=s,this.options=o,this.blockInitialAnimation=!!n,this.isControllingVariants=tm(t),this.isVariantNode=tf(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...u}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in u){const t=u[e];void 0!==l[e]&&J(t)&&t.set(l[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,td.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(ty.hasReducedMotionListener.current||(0,tv.initPrefersReducedMotion)(),this.shouldReduceMotion=ty.prefersReducedMotion.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){for(let e in this.projection&&this.projection.unmount(),eV(this.notifyUpdate),eV(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){let i;if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&ti.has(e)&&this.current instanceof HTMLElement){let{factory:i,keyframes:r,times:s,ease:n,duration:a}=t.accelerate,o=new tt({element:this.current,name:e,keyframes:r,times:s,ease:n,duration:eG(a)}),l=i(o);this.valueSubscriptions.set(e,()=>{l(),o.cancel()});return}let r=h.has(e);r&&this.onBindTransform&&this.onBindTransform();let s=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&eE.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});"u">typeof window&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{s(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in tw){let t=tw[e];if(!t)continue;let{isEnabled:i,Feature:r}=t;if(!this.features[e]&&r&&i(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];
1t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Z()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<tb.length;t++){let i=tb[t];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);let r=e["on"+i];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=function(e,t,i){for(let r in t){let s=t[r],n=i[r];if(J(s))e.addValue(r,s);else if(J(n))e.addValue(r,to(s,{owner:e}));else if(n!==s)if(e.hasValue(r)){let t=e.getValue(r);!0===t.liveStyle?t.jump(s):t.hasAnimated||t.set(s)}else{let t=e.getStaticValue(r);e.addValue(r,to(void 0!==t?t:s,{owner:e}))}}for(let r in i)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]: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(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let i=this.values.get(e);t!==i&&(i&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return void 0===i&&void 0!==t&&(i=to(null===t?void 0:t,{owner:this}),this.addValue(e,i)),i}readValue(e,t){let i=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];if(null!=i){let r,s;if("string"==typeof i&&(r=i,/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(r)||(s=i,/^0[^.\s]+$/u.test(s))))i=parseFloat(i);else{let r;r=i,!tl.find(ee(r))&&O.test(t)&&(i=e$(e,t))}this.setBaseTarget(e,J(i)?i.get():i)}return J(i)?i.get():i}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let t,{initial:i}=this.props;if("string"==typeof i||"object"==typeof i){let r=tg(this.props,i,this.presenceContext?.custom);r&&(t=r[e])}if(i&&void 0!==t)return t;let r=this.getBaseTargetFromProps(this.props,e);return void 0===r||J(r)?void 0!==this.initialValues[e]&&void 0===t?void 0:this.baseTarget[e]:r}on(e,t){return this.events[e]||(this.events[e]=new eY),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){tr.render(this.render)}}class tk extends tj{constructor(){super(...arguments),this.KeyframeResolver=eH}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){let i=e.style;return i?i[t]:void 0}removeValueFromRenderState(e,{vars:t,style:i}){delete t[e],delete i[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;J(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}function tS(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}let tT=(e,t)=>t&&"number"==typeof e?t.transform(e):e,tP={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},tC=d.length;function tA(e,t,i){let{style:r,vars:s,transformOrigin:n}=e,a=!1,o=!1;for(let e in t){let i=t[e];if(h.has(e)){a=!0;continue}if(eo(e)){s[e]=i;continue}{let t=tT(i,H[e]);e.startsWith("origin")?(o=!0,n[e]=t):r[e]=t}}if(!t.transform&&(a||i?r.transform=function(e,t,i){let r="",s=!0;for(let n=0;n<tC;n++){let a=d[n],o=e[a];if(void 0===o)continue;let l=!0;if("number"==typeof o)l=o===+!!a.startsWith("scale");else{let e=parseFloat(o);l=a.startsWith("scale")?1===e:0===e}if(!l||i){let e=tT(o,H[a]);if(!l){s=!1;let t=tP[a]||a;r+=`${t}(${e}) `}i&&(t[a]=e)}}return r=r.trim(),i?r=i(t,s?"":r):s&&(r="none"),r}(t,e.transform,i):r.transform&&(r.transform="none")),o){let{originX:e="50%",originY:t="50%",originZ:i=0}=n;r.transformOrigin=`${e} ${t} ${i}`}}let tM={offset:"stroke-dashoffset",array:"stroke-dasharray"},tN={offset:"strokeDashoffset",array:"strokeDasharray"},tE=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function tV(e,{attrX:t,attrY:i,attrScale:r,pathLength:s,pathSpacing:n=1,pathOffset:a=0,...o}
1,l,d,h){if(tA(e,o,d),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:u,style:c}=e;for(let e of(u.transform&&(c.transform=u.transform,delete u.transform),(c.transform||u.transformOrigin)&&(c.transformOrigin=u.transformOrigin??"50% 50%",delete u.transformOrigin),c.transform&&(c.transformBox=h?.transformBox??"fill-box",delete u.transformBox),tE))void 0!==u[e]&&(c[e]=u[e],delete u[e]);void 0!==t&&(u.x=t),void 0!==i&&(u.y=i),void 0!==r&&(u.scale=r),void 0!==s&&function(e,t,i=1,r=0,s=!0){e.pathLength=1;let n=s?tM:tN;e[n.offset]=`${-r}`,e[n.array]=`${t} ${i}`}(u,s,n,a,!1)}let tR=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"]),tD=e=>"string"==typeof e&&"svg"===e.toLowerCase();function tL(e,{style:t,vars:i},r,s){let n,a=e.style;for(n in t)a[n]=t[n];for(n in s?.applyProjectionStyles(a,r),i)a.setProperty(n,i[n])}function tB(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}let tF={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e)if(!P.test(e))return e;else e=parseFloat(e);let i=tB(e,t.target.x),r=tB(e,t.target.y);return`${i}% ${r}%`}},tO=(e,t,i)=>e+(t-e)*i,tI={borderRadius:{...tF,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:tF,borderTopRightRadius:tF,borderBottomLeftRadius:tF,borderBottomRightRadius:tF,boxShadow:{correct:(e,{treeScale:t,projectionDelta:i})=>{let r=O.parse(e);if(r.length>5)return e;let s=O.createTransformer(e),n=+("number"!=typeof r[0]),a=i.x.scale*t.x,o=i.y.scale*t.y;r[0+n]/=a,r[1+n]/=o;let l=tO(a,o,.5);return"number"==typeof r[2+n]&&(r[2+n]/=l),"number"==typeof r[3+n]&&(r[3+n]/=l),s(r)}}};function t_(e,{layout:t,layoutId:i}){return h.has(e)||e.startsWith("origin")||(t||void 0!==i)&&(!!tI[e]||"opacity"===e)}function tU(e,t,i){let r=e.style,s=t?.style,n={};if(!r)return n;for(let t in r)(J(r[t])||s&&J(s[t])||t_(t,e)||i?.getValue(t)?.liveStyle!==void 0)&&(n[t]=r[t]);return n}function tW(e,t,i){let r=tU(e,t,i);for(let i in e)(J(e[i])||J(t[i]))&&(r[-1!==d.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=e[i]);return r}class t$ extends tk{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Z}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(h.has(t)){let e=q(t);return e&&e.default||0}return t=tR.has(t)?t:tS(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,i){return tW(e,t,i)}build(e,t,i){tV(e,t,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(e,t,i,r){for(let i in tL(e,t,void 0,r),t.attrs)e.setAttribute(tR.has(i)?i:tS(i),t.attrs[i])}mount(e){this.isSVGTag=tD(e.tagName),super.mount(e)}}function tz({top:e,left:t,right:i,bottom:r}){return{x:{min:t,max:i},y:{min:e,max:r}}}function tH(e){return void 0===e||1===e}function tG({scale:e,scaleX:t,scaleY:i}){return!tH(e)||!tH(t)||!tH(i)}function tq(e){return tG(e)||tX(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function tX(e){var t,i;return(t=e.x)&&"0%"!==t||(i=e.y)&&"0%"!==i}function tY(e,t,i,r,s){return void 0!==s&&(e=r+s*(e-r)),r+i*(e-r)+t}function tK(e,t=0,i=1,r,s){e.min=tY(e.min,t,i,r,s),e.max=tY(e.max,t,i,r,s)}function tZ(e,{x:t,y:i}){tK(e.x,t.translate,t.scale,t.originPoint),tK(e.y,i.translate,i.scale,i.originPoint)}function tJ(e,t){e.min+=t,e.max+=t}function tQ(e,t,i,r,s=.5){let n=tO(e.min,e.max,s);tK(e,t,i,n,r)}function t0(e,t){return"string"==typeof e?parseFloat(e)/100*(t.max-t.min):e}function t1(e,t,i){let r=i??e;tQ(e.x,t0(t.x,r.x),t.scaleX,t.scale,t.originX),tQ(e.y,t0(t.y,r.y),t.scaleY,t.scale,t.originY)}function t2(e,t){return tz(function(e,t){if(!t)return e;let i=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:i.y,left:i.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}class t5 extends tk{constructor(){super(...arguments),this.type="html",this.renderInstance=tL}readValueFromInstance(e,t){if(h.has(t))return this.projection?.isProjecting?eb(t):((e,t)=>{let{transform:i="none"}=getComputedStyle(e);return ew(i,t)})(e,t);{let i=window.getComputedStyle(e),r=(eo(t)?i.getPropertyValue(t):i[t])||0;return"string"==typeof r?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return t2(e,t)}build(e,t,i){tA(e,t,i.transformTemplate)}scrapeMotionValuesFromProps(e,t,i){return tU(e,t,i)}}let t4=["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 t3(e){if("string"!=typeof e||e.includes("-"));else if(t4.indexOf(e)>-1||/[A-Z]/u.test(e))return!0;return!1}let t6=(0,o.createContext)({}),t7=(0,o.createContext)({strict:!1}),t9=(0,o.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),t8=(0,o.createContext)({});function ie(e){return Array.isArray(e)?e.join(" "):e}let it=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ii(e,t,i){for(let r in t)J(t[r])||t_(r,i)||(e[r]=t[r])}let ir=()=>({...it(),attrs:{}}),is=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 ia(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||is.has(e)}let io=e=>!ia(e);try{n=(()=>{let e=Error("Cannot find module '@emotion/is-prop-valid'");throw e.code="MODULE_NOT_FOUND",e})().default,"function"==typeof n&&(io=e=>e.startsWith("on")?!ia(e):n(e))}catch{}function il(e){return J(e)?e.get():e}let id=(0,o.createContext)(null),ih=e=>(t,i)=>{let r,s=(0,o.useContext)(t8),n=(0,o.useContext)(id),a=()=>(function({scrapeMotionValuesFromProps:e,createRenderState:t},i,r,s){return{latestValues:function(e,t,i,r){let s={},n=r(e,{});for(let e in n)s[e]=il(n[e]);let{initial:a,animate:o}=e,l=tm(e),d=tf(e);t&&d&&!l&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===o&&(o=t.animate));let h=!!i&&!1===i.initial,u=(h=h||!1===a)?o:a;if(u&&"boolean"!=typeof u&&!th(u)){let t=Array.isArray(u)?u:[u];for(let i=0;i<t.length;i++){let r=tg(e,t[i]);if(r){let{transitionEnd:e,transition:t,...i}=r;for(let e in i){let t=i[e];if(Array.isArray(t)){let e=h?t.length-1:0;t=t[e]}null!==t&&(s[e]=t)}for(let t in e)s[t]=e[t]}}}return s}(i,r,s,e),renderState:t()}})(e,t,s,n);return i?a():(null===(r=(0,o.useRef)(null)).current&&(r.current=a()),r.current)},iu=ih({scrapeMotionValuesFromProps:tU,createRenderState:it}),ic=ih({scrapeMotionValuesFromProps:tW,createRenderState:ir}),ip={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"]},im=!1;function iv(){return!function(){if(im)return;let e={};for(let t in ip)e[t]={isEnabled:e=>ip[t].some(t=>!!e[t])};tw=e,im=!0}(),tw}let ix=Symbol.for("motionComponentSymbol"),ig="data-"+tS("framerAppearId"),iy=(0,o.createContext)({});function ib(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}let iw="u">typeof window?o.useLayoutEffect:o.useEffect;function ij(e,{forwardMotionProps:t=!1,type:i}={},r,s){r&&function(e){let t=iv();for(let i in e)t[i]={...t[i],...e[i]};tw=t}(r);let n=i?"svg"===i:t3(e),l=n?ic:iu;function d(i,r){var d;let h,u,c,p={...(0,o.useContext)(t9),...i,layoutId:function({layoutId:e}){let t=(0,o.useContext)(t6).id;return t&&void 0!==e?t+"-"+e:e}(i)},{isStatic:m}=p,f=function(e){let{initial:t,animate:i}=function(e,t){if(tm(e)){let{initial:t,animate:i}=e;return{initial:!1===t||tu(t)?t:void 0,animate:tu(i)?i:void 0}}return!1!==e.inherit?t:{}}(e,(0,o.useContext)(t8));return(0,o.useMemo)(()=>({initial:t,animate:i}),[ie(t),ie(i)])}(i),v=l(i,m);if(!m&&"u">typeof window){(0,o.useContext)(t7).strict;let t=function(e){let{drag:t,layout:i}=iv();if(!t&&!i)return{};let r={...t,...i};return{MeasureLayout:t?.isEnabled(e)||i?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}
1(p);h=t.MeasureLayout,f.visualElement=function(e,t,i,r,s,n){let{visualElement:a}=(0,o.useContext)(t8),l=(0,o.useContext)(t7),d=(0,o.useContext)(id),h=(0,o.useContext)(t9),u=h.reducedMotion,c=h.skipAnimations,p=(0,o.useRef)(null),m=(0,o.useRef)(!1);r=r||l.renderer,!p.current&&r&&(p.current=r(e,{visualState:t,parent:a,props:i,presenceContext:d,blockInitialAnimation:!!d&&!1===d.initial,reducedMotionConfig:u,skipAnimations:c,isSVG:n}),m.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));let f=p.current,v=(0,o.useContext)(iy);f&&!f.projection&&s&&("html"===f.type||"svg"===f.type)&&function(e,t,i,r){let{layoutId:s,layout:n,drag:a,dragConstraints:o,layoutScroll:l,layoutRoot:d,layoutAnchor:h,layoutCrossfade:u}=t;e.projection=new i(e.latestValues,t["data-framer-portal-id"]?void 0:function e(t){if(t)return!1!==t.options.allowProjection?t.projection:e(t.parent)}(e.parent)),e.projection.setOptions({layoutId:s,layout:n,alwaysMeasureLayout:!!a||o&&ib(o),visualElement:e,animationType:"string"==typeof n?n:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:d,layoutAnchor:h})}(p.current,i,s,v);let x=(0,o.useRef)(!1);(0,o.useInsertionEffect)(()=>{f&&x.current&&f.update(i,d)});let g=i[ig],y=(0,o.useRef)(!!g&&"u">typeof window&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return iw(()=>{m.current=!0,f&&(x.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),f.scheduleRenderMicrotask(),y.current&&f.animationState&&f.animationState.animateChanges())}),(0,o.useEffect)(()=>{f&&(!y.current&&f.animationState&&f.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(g)}),y.current=!1),f.enteringChildren=void 0)}),f}(e,v,p,s,t.ProjectionNode,n)}return(0,a.jsxs)(t8.Provider,{value:f,children:[h&&f.visualElement?(0,a.jsx)(h,{visualElement:f.visualElement,...p}):null,function(e,t,i,{latestValues:r},s,n=!1,a){let l=(a??t3(e)?function(e,t,i,r){let s=(0,o.useMemo)(()=>{let i=ir();return tV(i,t,tD(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){let t={};ii(t,e.style,e),s.style={...t,...s.style}}return s}:function(e,t){let i,r,s={},n=(i=e.style||{},ii(r={},i,e),Object.assign(r,function({transformTemplate:e},t){return(0,o.useMemo)(()=>{let i=it();return tA(i,t,e),Object.assign({},i.vars,i.style)},[t])}(e,t)),r);return e.drag&&!1!==e.dragListener&&(s.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=!0===e.drag?"none":`pan-${"x"===e.drag?"y":"x"}`),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(s.tabIndex=0),s.style=n,s})(t,r,s,e),d=function(e,t,i){let r={};for(let s in e)("values"!==s||"object"!=typeof e.values)&&!J(e[s])&&(io(s)||!0===i&&ia(s)||!t&&!ia(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}(t,"string"==typeof e,n),h=e!==o.Fragment?{...d,...l,ref:i}:{},{children:u}=t,c=(0,o.useMemo)(()=>J(u)?u.get():u,[u]);return(0,o.createElement)(e,{...h,children:c})}(e,i,(d=f.visualElement,u=(0,o.useRef)(r),(0,o.useInsertionEffect)(()=>{u.current=r}),c=(0,o.useRef)(null),(0,o.useCallback)(e=>{e&&v.onMount?.(e);let t=u.current;if("function"==typeof t)if(e){let i=t(e);"function"==typeof i&&(c.current=i)}else c.current?(c.current(),c.current=null):t(e);else t&&(t.current=e);d&&(e?d.mount(e):d.unmount())},[d])),v,m,t,n)]})}d.displayName=`motion.${"string"==typeof e?e:`create(${e.displayName??e.name??""})`}`;let h=(0,o.forwardRef)(d);return h[ix]=e,h}class ik{constructor(e){this.isMounted=!1,this.node=e}update(){}}function iS(e,t,i){let r=e.getProps();return tg(r,t,void 0!==i?i:r.custom,e)}function iT(e,t){if(e?.inherit&&t){let{inherit:i,...r}=e;return{...t,...r}}return e}function iP(e,t){let i=e?.[t]??e?.default??e;return i!==e?iT(i,e):i}let iC=e=>Array.isArray(e);function iA(e,t){let i=e.getValue("willChange");if(J(i)&&i.add)return i.add(t);if(!i&&eA.WillChange){let i=new eA.WillChange("auto");e.addValue("willChange",i),i.add(t)}}let iM=(e,t)=>i=>t(e(i)),iN=(...e)=>e.reduce(iM);function iE(e,t,i){return(i<0&&(i+=1),i>1&&(i-=1),i<1/6)?e+(t-e)*6*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}function iV(e,t){return i=>i>0?t:e}let iR=(e,t,i)=>{let r=e*e,s=i*(t*t-r)+r;return s<0?0:Math.sqrt(s)},iD=[j,w,N];function iL(e){let t=iD.find(t=>t.test(e));if(es(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let i=t.parse(e);return t===N&&(i=function({hue:e,saturation:t,lightness:i,alpha:r}){e/=360,i/=100;let s=0,n=0,a=0;if(t/=100){let r=i<.5?i*(1+t):i+t-i*t,o=2*i-r;s=iE(o,r,e+1/3),n=iE(o,r,e),a=iE(o,r,e-1/3)}else s=n=a=i;return{red:Math.round(255*s),green:Math.round(255*n),blue:Math.round(255*a),alpha:r}}(i)),i}let iB=(e,t)=>{let i=iL(e),r=iL(t);if(!i||!r)return iV(e,t);let s={...i};return e=>(s.red=iR(i.red,r.red,e),s.green=iR(i.green,r.green,e),s.blue=iR(i.blue,r.blue,e),s.alpha=tO(i.alpha,r.alpha,e),w.transform(s))},iF=new Set(["none","hidden"]);function iO(e,t){return i=>tO(e,t,i)}function iI(e){return"number"==typeof e?iO:"string"==typeof e?ed(e)?iV:E.test(e)?iB:iW:Array.isArray(e)?i_:"object"==typeof e?E.test(e)?iB:iU:iV}function i_(e,t){let i=[...e],r=i.length,s=e.map((e,i)=>iI(e)(e,t[i]));return e=>{for(let t=0;t<r;t++)i[t]=s[t](e);return i}}function iU(e,t){let i={...e,...t},r={};for(let s in i)void 0!==e[s]&&void 0!==t[s]&&(r[s]=iI(e[s])(e[s],t[s]));return e=>{for(let t in r)i[t]=r[t](e);return i}}let iW=(e,t)=>
1{let i=O.createTransformer(t),r=B(e),s=B(t);if(!(r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length))return es(!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"),iV(e,t);if(iF.has(e)&&!s.values.length||iF.has(t)&&!r.values.length)return iF.has(e)?i=>i<=0?e:t:i=>i>=1?t:e;return iN(i_(function(e,t){let i=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){let n=t.types[s],a=e.indexes[n][r[n]],o=e.values[a]??0;i[s]=o,r[n]++}return i}(r,s),s.values),i)};function i$(e,t,i){return"number"==typeof e&&"number"==typeof t&&"number"==typeof i?tO(e,t,i):iI(e)(e,t)}let iz=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>eE.update(t,e),stop:()=>eV(t),now:()=>eR.isProcessing?eR.timestamp:tn.now()}};function iH(e){let t=0,i=e.next(t);for(;!i.done&&t<2e4;)t+=50,i=e.next(t);return t>=2e4?1/0:t}let iG=.01,iq=2,iX=.005,iY=.5;function iK(e,t){return e*Math.sqrt(1-t*t)}let iZ=["duration","bounce"],iJ=["stiffness","damping","mass"];function iQ(e,t){return t.some(t=>void 0!==e[t])}function i0(e=.3,t=.3){let i,r,s,n,a,o,l="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:d,restDelta:h}=l,c=l.keyframes[0],p=l.keyframes[l.keyframes.length-1],m={done:!1,value:c},{stiffness:f,damping:v,mass:x,duration:g,velocity:y,isResolvedFromDuration:b}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!iQ(e,iJ)&&iQ(e,iZ))if(t.velocity=0,e.visualDuration){let i=2*Math.PI/(1.2*e.visualDuration),r=i*i,s=2*u(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:1,stiffness:r,damping:s}}else{let i=function({duration:e=800,bounce:t=.3,velocity:i=0,mass:r=1}){let s,n;es(e<=eG(10),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-t;a=u(.05,1,a),e=u(.01,10,e/1e3),a<1?(s=t=>{let r=t*a,s=r*e;return .001-(r-i)/iK(t,a)*Math.exp(-s)},n=t=>{let r=t*a*e,n=Math.pow(a,2)*Math.pow(t,2)*e,o=Math.exp(-r),l=iK(Math.pow(t,2),a);return(r*i+i-n)*o*(-s(t)+.001>0?-1:1)/l}):(s=t=>-.001+Math.exp(-t*e)*((t-i)*e+1),n=t=>e*e*(i-t)*Math.exp(-t*e));let o=function(e,t,i){let r=i;for(let i=1;i<12;i++)r-=e(r)/t(r);return r}(s,n,5/e);if(e=eG(e),isNaN(o))return{stiffness:100,damping:10,duration:e};{let t=Math.pow(o,2)*r;return{stiffness:t,damping:2*a*Math.sqrt(r*t),duration:e}}}({...e,velocity:0});(t={...t,...i,mass:1}).isResolvedFromDuration=!0}return t}({...l,velocity:-((l.velocity||0)/1e3)}),w=y||0,j=v/(2*Math.sqrt(f*x)),k=p-c,S=Math.sqrt(f/x)/1e3,T=5>Math.abs(k);if(d||(d=T?iG:iq),h||(h=T?iX:iY),j<1)s=iK(S,j),n=(w+j*S*k)/s,i=e=>p-Math.exp(-j*S*e)*(n*Math.sin(s*e)+k*Math.cos(s*e)),a=j*S*n+k*s,o=j*S*k-n*s,r=e=>Math.exp(-j*S*e)*(a*Math.sin(s*e)+o*Math.cos(s*e));else if(1===j){i=e=>p-Math.exp(-S*e)*(k+(w+S*k)*e);let e=w+S*k;r=t=>Math.exp(-S*t)*(S*e*t-w)}else{let e=S*Math.sqrt(j*j-1);i=t=>{let i=Math.exp(-j*S*t),r=Math.min(e*t,300);return p-i*((w+j*S*k)*Math.sinh(r)+e*k*Math.cosh(r))/e};let t=(w+j*S*k)/e,s=j*S*t-k*e,n=j*S*k-t*e;r=t=>{let i=Math.exp(-j*S*t),r=Math.min(e*t,300);return i*(s*Math.sinh(r)+n*Math.cosh(r))}}let P={calculatedDuration:b&&g||null,velocity:e=>eG(r(e)),next:e=>{if(!b&&j<1){let t=Math.exp(-j*S*e),i=Math.sin(s*e),r=Math.cos(s*e),l=p-t*(n*i+k*r);return m.done=Math.abs(eG(t*(a*i+o*r)))<=d&&Math.abs(p-l)<=h,m.value=m.done?p:l,m}let t=i(e);return b?m.done=e>=g:m.done=Math.abs(eG(r(e)))<=d&&Math.abs(p-t)<=h,m.value=m.done?p:t,m},toString:()=>{let e=Math.min(iH(P),2e4),t=e7(t=>P.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return P}function i1(e,t,i){var r,s;let n=Math.max(t-5,0);return r=i-e(n),(s=t-n)?1e3/s*r:0}function i2({keyframes:e,velocity:t=0,power:i=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:n=500,modifyTarget:a,min:o,max:l,restDelta:d=.5,restSpeed:h}){let u,c,p=e[0],m={done:!1,value:p},f=i*t,v=p+f,x=void 0===a?v:a(v);x!==v&&(f=x-p);let g=e=>-f*Math.exp(-e/r),y=e=>x+g(e),b=e=>{let t=g(e),i=y(e);m.done=Math.abs(t)<=d,m.value=m.done?x:i},w=e=>{let t;if(t=m.value,void 0!==o&&t<o||void 0!==l&&t>l){var i;u=e,c=i0({keyframes:[m.value,(i=m.value,void 0===o?l:void 0===l||Math.abs(o-i)<Math.abs(l-i)?o:l)],velocity:i1(y,e,m.value),damping:s,stiffness:n,restDelta:d,restSpeed:h})}};return w(0),{calculatedDuration:null,next:e=>{let t=!1;return(c||void 0!==u||(t=!0,b(e),w(e)),void 0!==u&&e>=u)?c.next(e-u):(t||b(e),m)}}}i0.applyToOptions=e=>{let t=function(e,t=100,i){let r=i({...e,keyframes:[0,t]}),s=Math.min(iH(r),2e4);return{type:"keyframes",ease:e=>r.next(s*e).value/t,duration:s/1e3}}(e,100,i0);return e.ease=t.ease,e.duration=eG(t.duration),e.type="keyframes",e};let i5=(e,t,i)=>(((1-3*i+3*t)*e+(3*i-6*t))*e+3*t)*e;function i4(e,t,i,r){return e===t&&i===r?eC:s=>0===s||1===s?s:i5(function(e,t,i,r,s){let n,a,o=0;do(n=i5(a=t+(i-t)/2,r,s)-e)>0?i=a:t=a;while(Math.abs(n)>1e-7&&++o<12)return a}(s,0,1,e,i),t,r)}
1let i3=i4(.42,0,1,1),i6=i4(0,0,.58,1),i7=i4(.42,0,.58,1),i9=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,i8=e=>t=>1-e(1-t),re=i4(.33,1.53,.69,.99),rt=i8(re),ri=i9(rt),rr=e=>e>=1?1:(e*=2)<1?.5*rt(e):.5*(2-Math.pow(2,-10*(e-1))),rs=e=>1-Math.sin(Math.acos(e)),rn=i8(rs),ra=i9(rs),ro={linear:eC,easeIn:i3,easeInOut:i7,easeOut:i6,circIn:rs,circInOut:ra,circOut:rn,backIn:rt,backInOut:ri,backOut:re,anticipate:rr},rl=e=>{if(e3(e)){en(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,i,r,s]=e;return i4(t,i,r,s)}return"string"==typeof e?(en(void 0!==ro[e],`Invalid easing type '${e}'`,"invalid-easing-type"),ro[e]):e},rd=(e,t,i)=>{let r=t-e;return 0===r?1:(i-e)/r};function rh({duration:e=300,keyframes:t,times:i,ease:r="easeInOut"}){var s;let n,a=Array.isArray(r)&&"number"!=typeof r[0]?r.map(rl):rl(r),o={done:!1,value:t[0]},l=function(e,t,{clamp:i=!0,ease:r,mixer:s}={}){let n=e.length;if(en(n===t.length,"Both input and output ranges must be the same length","range-length"),1===n)return()=>t[0];if(2===n&&t[0]===t[1])return()=>t[1];let a=e[0]===e[1];e[0]>e[n-1]&&(e=[...e].reverse(),t=[...t].reverse());let o=function(e,t,i){let r=[],s=i||eA.mix||i$,n=e.length-1;for(let i=0;i<n;i++){let n=s(e[i],e[i+1]);t&&(n=iN(Array.isArray(t)?t[i]||eC:t,n)),r.push(n)}return r}(t,r,s),l=o.length,d=i=>{if(a&&i<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(i<e[r+1]);r++);let s=rd(e[r],e[r+1],i);return o[r](s)};return i?t=>d(u(e[0],e[n-1],t)):d}((s=i&&i.length===t.length?i:(!function(e,t){let i=e[e.length-1];for(let r=1;r<=t;r++){let s=rd(0,t,r);e.push(tO(i,1,s))}}(n=[0],t.length-1),n),s.map(t=>t*e)),t,{ease:Array.isArray(a)?a:t.map(()=>a||i7).splice(0,t.length-1)});return{calculatedDuration:e,next:t=>(o.value=l(t),o.done=t>=e,o)}}let ru={decay:i2,inertia:i2,tween:rh,keyframes:rh,spring:i0};function rc(e){"string"==typeof e.type&&(e.type=ru[e.type])}let rp=e=>e/100;class rm extends e5{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==tn.now()&&this.tick(tn.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},e4.mainThread++,this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){let{options:e}=this;rc(e);let{type:t=rh,repeat:i=0,repeatDelay:r=0,repeatType:s,velocity:n=0}=e,{keyframes:a}=e,o=t||rh;o!==rh&&"number"!=typeof a[0]&&(this.mixKeyframes=iN(rp,i$(a[0],a[1])),a=[0,100]);let l=o({...e,keyframes:a});"mirror"===s&&(this.mirroredGenerator=o({...e,keyframes:[...a].reverse(),velocity:-n})),null===l.calculatedDuration&&(l.calculatedDuration=iH(l));let{calculatedDuration:d}=l;this.calculatedDuration=d,this.resolvedDuration=d+r,this.totalDuration=this.resolvedDuration*(i+1)-r,this.generator=l}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){let i,{generator:r,totalDuration:s,mixKeyframes:n,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:l}=this;if(null===this.startTime)return r.next(0);let{delay:d=0,keyframes:h,repeat:c,repeatType:p,repeatDelay:m,type:f,onUpdate:v,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-s/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-d*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>s;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=s);let b=this.currentTime,w=r;if(c){let e=Math.min(this.currentTime,s)/o,t=Math.floor(e),i=e%1;!i&&e>=1&&(i=1),1===i&&t--,(t=Math.min(t,c+1))%2&&("reverse"===p?(i=1-i,m&&(i-=m/o)):"mirror"===p&&(w=a)),b=u(0,1,i)*o}y?(this.delayState.value=h[0],i=this.delayState):i=w.next(b),n&&!y&&(i.value=n(i.value));let{done:j}=i;y||null===l||(j=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);let k=null===this.holdTime&&("finished"===this.state||"running"===this.state&&j);return k&&f!==i2&&(i.value=e2(h,this.options,x,this.speed)),v&&v(i.value),k&&this.finish(),i}then(e,t){return this.finished.then(e,t)}get duration(){return this.calculatedDuration/1e3}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+e/1e3}get time(){return this.currentTime/1e3}set time(e){e=eG(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return i1(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(tn.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=this.currentTime/1e3)}play(){if(this.isStopped)return;let{driver:e=iz,startTime:t}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),this.options.onPlay?.();let i=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=i):null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime||(this.startTime=t??i),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(tn.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&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,e4.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}let rf={anticipate:rr,backInOut:ri,circInOut:ra};class rv extends tt{constructor(e){!function(e){"string"==typeof e.ease&&e.ease in rf&&(e.ease=rf[e.ease])}(e),rc(e),super(e),void 0!==e.startTime&&!1!==e.autoplay&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:i,onComplete:r,element:s,...n}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);let a=new rm({...n,autoplay:!1}),o=Math.max(10,tn.now()-this.startTime),l=u(0,10,o-10),d=a.sample(o).value,{name:h}=this.options;s&&h&&eK(s,h,d),t.setWithVelocity(a.sample(Math.max(0,o-l)).value,d,l),a.stop()}}let rx=(e,t)=>"zIndex"!==t&&!!("number"==typeof e||Array.isArray(e)||"string"==typeof e&&(O.test(e)||"0"===e)&&!e.startsWith("url("));function rg(e){e.duration=0,e.type="keyframes"}
1let ry=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/,rb=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),rw=eZ(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class rj extends e5{constructor({autoplay:e=!0,delay:t=0,type:i="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:n="loop",keyframes:a,name:o,motionValue:l,element:d,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=tn.now();const u={autoplay:e,delay:t,type:i,repeat:r,repeatDelay:s,repeatType:n,name:o,motionValue:l,element:d,...h},c=d?.KeyframeResolver||eU;this.keyframeResolver=new c(a,(e,t,i)=>this.onKeyframesResolved(e,t,u,!i),o,l,d),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,i,r){let s;this.keyframeResolver=void 0;let{name:n,type:a,velocity:o,delay:l,isHandoff:d,onUpdate:h}=i;this.resolvedAt=tn.now();let u=!0;!function(e,t,i,r){let s=e[0];if(null===s)return!1;if("display"===t||"visibility"===t)return!0;let n=e[e.length-1],a=rx(s,t),o=rx(n,t);return es(a===o,`You are trying to animate ${t} from "${s}" to "${n}". "${a?n:s}" is not an animatable value.`,"value-not-animatable"),!!a&&!!o&&(function(e){let t=e[0];if(1===e.length)return!0;for(let i=0;i<e.length;i++)if(e[i]!==t)return!0}(e)||("spring"===i||te(i))&&r)}(e,n,a,o)&&(u=!1,(eA.instantAnimations||!l)&&h?.(e2(e,i,t)),e[0]=e[e.length-1],rg(i),i.repeat=0);let c={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...i,keyframes:e},p=u&&!d&&function(e){let{motionValue:t,name:i,repeatDelay:r,repeatType:s,damping:n,type:a,keyframes:o}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:l,transformTemplate:d}=t.owner.getProps();return rw()&&i&&(ti.has(i)||rb.has(i)&&function(e){for(let t=0;t<e.length;t++)if("string"==typeof e[t]&&ry.test(e[t]))return!0;return!1}(o))&&("transform"!==i||!d)&&!l&&!r&&"mirror"!==s&&0!==n&&"inertia"!==a}(c),m=c.motionValue?.owner?.current;if(p)try{s=new rv({...c,element:m})}catch{s=new rm(c)}else s=new rm(c);s.finished.then(()=>{this.notifyFinished()}).catch(eC),this.pendingTimeline&&(this.stopTimeline=s.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=s}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),eO=!0,e_(),eI(),eO=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}let rk={type:"spring",stiffness:500,damping:25,restSpeed:10},rS={type:"keyframes",duration:.8},rT={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},rP=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]),rC=(e,t,i,r={},s,n)=>a=>{let o=iP(r,e)||{},l=o.delay||r.delay||0,{elapsed:d=0}=r;d-=eG(l);let u={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:t.getVelocity(),...o,delay:-d,onUpdate:e=>{t.set(e),o.onUpdate&&o.onUpdate(e)},onComplete:()=>{a(),o.onComplete&&o.onComplete()},name:e,motionValue:t,element:n?void 0:s};!function(e){for(let t in e)if(!rP.has(t))return!0;return!1}(o)&&Object.assign(u,((e,{keyframes:t})=>t.length>2?rS:h.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:rk:rT)(e,u)),u.duration&&(u.duration=eG(u.duration)),u.repeatDelay&&(u.repeatDelay=eG(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let c=!1;if(!1!==u.type&&(0!==u.duration||u.repeatDelay)||(rg(u),0===u.delay&&(c=!0)),(eA.instantAnimations||eA.skipAnimations||s?.shouldSkipAnimations)&&(c=!0,rg(u),u.delay=0),u.allowFlatten=!o.type&&!o.ease,c&&!n&&void 0!==t.get()){let e=e2(u.keyframes,o);if(void 0!==e)return void eE.update(()=>{u.onUpdate(e),u.onComplete()})}return o.isSync?new rm(u):new rj(u)};function rA(e,t,{delay:i=0,transitionOverride:r,type:s}={}){let{transition:n,transitionEnd:a,...o}=t,l=e.getDefaultTransition();n=n?iT(n,l):l;let d=n?.reduceMotion;r&&(n=r);let h=[],u=s&&e.animationState&&e.animationState.getState()[s];for(let t in o){let r=e.getValue(t,e.latestValues[t]??null),s=o[t];if(void 0===s||u&&function({protectedKeys:e,needsAnimating:t},i){let r=e.hasOwnProperty(i)&&!0!==t[i];return t[i]=!1,r}(u,t))continue;let a={delay:i,...iP(n||{},t)},l=r.get();if(void 0!==l&&!r.isAnimating()&&!Array.isArray(s)&&s===l&&!a.velocity){eE.update(()=>r.set(s));continue}let c=!1;if(window.MotionHandoffAnimation){let i=e.props[ig];if(i){let e=window.MotionHandoffAnimation(i,t,eE);null!==e&&(a.startTime=e,c=!0)}}iA(e,t);let p=d??e.shouldReduceMotion;r.start(rC(t,r,s,p&&Q.has(t)?{type:!1}:a,e,c));let m=r.animation;m&&h.push(m)}if(a){let t=()=>eE.update(()=>{a&&function(e,t){let{transitionEnd:i={},transition:r={},...s}=iS(e,t)||{};for(let t in s={...s,...i}){var n;let i=iC(n=s[t])?n[n.length-1]||0:n;e.hasValue(t)?e.getValue(t).set(i):e.addValue(t,to(i))}}(e,a)});h.length?Promise.all(h).then(t):t()}return h}function rM(e,t,i,r=0,s=1){let n=Array.from(e).sort((e,t)=>
1e.sortNodePosition(t)).indexOf(t),a=e.size,o=(a-1)*r;return"function"==typeof i?i(n,a):1===s?n*r:o-n*r}function rN(e,t,i={}){let r=iS(e,t,"exit"===i.type?e.presenceContext?.custom:void 0),{transition:s=e.getDefaultTransition()||{}}=r||{};i.transitionOverride&&(s=i.transitionOverride);let n=r?()=>Promise.all(rA(e,r,i)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:n=0,staggerChildren:a,staggerDirection:o}=s;return function(e,t,i=0,r=0,s=0,n=1,a){let o=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),o.push(rN(l,t,{...a,delay:i+("function"==typeof r?0:r)+rM(e.variantChildren,l,r,s,n)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(o)}(e,t,r,n,a,o,i)}:()=>Promise.resolve(),{when:o}=s;if(!o)return Promise.all([n(),a(i.delay)]);{let[e,t]="beforeChildren"===o?[n,a]:[a,n];return e().then(()=>t())}}let rE=tp.length;function rV(e,t){if(!Array.isArray(t))return!1;let i=t.length;if(i!==e.length)return!1;for(let r=0;r<i;r++)if(t[r]!==e[r])return!1;return!0}let rR=[...tc].reverse(),rD=tc.length;function rL(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function rB(){return{animate:rL(!0),whileInView:rL(),whileHover:rL(),whileTap:rL(),whileDrag:rL(),whileFocus:rL(),exit:rL()}}let rF=0;function rO(e){return[e("x"),e("y")]}function rI(e,t,i,r={passive:!0}){return e.addEventListener(t,i,r),()=>e.removeEventListener(t,i)}let r_={x:!1,y:!1};function rU(e){return e.max-e.min}function rW(e,t,i,r=.5){e.origin=r,e.originPoint=tO(t.min,t.max,e.origin),e.scale=rU(i)/rU(t),e.translate=tO(i.min,i.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function r$(e,t,i,r){rW(e.x,t.x,i.x,r?r.originX:void 0),rW(e.y,t.y,i.y,r?r.originY:void 0)}function rz(e,t,i,r=0){e.min=(r?tO(i.min,i.max,r):i.min)+t.min,e.max=e.min+rU(t)}function rH(e,t,i,r=0){let s=r?tO(i.min,i.max,r):i.min;e.min=t.min-s,e.max=e.min+rU(t)}function rG(e,t,i,r){rH(e.x,t.x,i.x,r?.x),rH(e.y,t.y,i.y,r?.y)}function rq(e){return"object"==typeof e&&null!==e}function rX(e){return rq(e)&&"ownerSVGElement"in e}function rY(e,t,i){if(null==e)return[];if(e instanceof EventTarget)return[e];if("string"==typeof e){let r=document;t&&(r=t.current);let s=i?.[e]??r.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(e=>null!=e)}let rK=new WeakMap,rZ=(e,t,i)=>(r,s)=>s&&s[0]?s[0][e+"Size"]:rX(r)&&"getBBox"in r?r.getBBox()[t]:r[i],rJ=rZ("inline","width","offsetWidth"),rQ=rZ("block","height","offsetHeight");function r0({target:e,borderBoxSize:t}){rK.get(e)?.forEach(i=>{i(e,{get width(){return rJ(e,t)},get height(){return rQ(e,t)}})})}function r1(e){e.forEach(r0)}let r2=new Set;function r5(e,t){let s;return"function"==typeof e?(r2.add(e),r||(r=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};r2.forEach(t=>t(e))},window.addEventListener("resize",r)),()=>{r2.delete(e),r2.size||"function"!=typeof r||(window.removeEventListener("resize",r),r=void 0)}):(!i&&"u">typeof ResizeObserver&&(i=new ResizeObserver(r1)),(s=rY(e)).forEac
1h(e=>{let r=rK.get(e);r||(r=new Set,rK.set(e,r)),r.add(t),i?.observe(e)}),()=>{s.forEach(e=>{let r=rK.get(e);r?.delete(t),r?.size||i?.unobserve(e)})})}let r4=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),r3=new Set(["INPUT","SELECT","TEXTAREA"]),r6=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function r7(e){return{point:{x:e.pageX,y:e.pageY}}}function r9(e,t,i,r){return rI(e,t,e=>r6(e)&&i(e,r7(e)),r)}let r8=({current:e})=>e?e.ownerDocument.defaultView:null,se=(e,t)=>Math.abs(e-t),st=new Set(["auto","scroll"]);class si{constructor(e,t,{transformPagePoint:i,contextWindow:r=window,dragSnapToOrigin:s=!1,distanceThreshold:n=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{var e,t;if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=sr(this.lastRawMoveEventInfo,this.transformPagePoint));let i=sn(this.lastMoveEventInfo,this.history),r=null!==this.startEvent,s=(e=i.offset,t={x:0,y:0},Math.sqrt(se(e.x,t.x)**2+se(e.y,t.y)**2)>=this.distanceThreshold);if(!r&&!s)return;let{point:n}=i,{timestamp:a}=eR;this.history.push({...n,timestamp:a});let{onStart:o,onMove:l}=this.handlers;r||(o&&o(this.lastMoveEvent,i),this.startEvent=this.lastMoveEvent),l&&l(this.lastMoveEvent,i)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=sr(t,this.transformPagePoint),eE.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:i,onSessionEnd:r,resumeAnimation:s}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&s&&s(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let n=sn("pointercancel"===e.type?this.lastMoveEventInfo:sr(t,this.transformPagePoint),this.history);this.startEvent&&i&&i(e,n),r&&r(e,n)},!r6(e))return;this.dragSnapToOrigin=s,this.handlers=t,this.transformPagePoint=i,this.distanceThreshold=n,this.contextWindow=r||window;const o=sr(r7(e),this.transformPagePoint),{point:l}=o,{timestamp:d}=eR;this.history=[{...l,timestamp:d}];const{onSessionStart:h}=t;h&&h(e,sn(o,this.history)),this.removeListeners=iN(r9(this.contextWindow,"pointermove",this.handlePointerMove),r9(this.contextWindow,"pointerup",this.handlePointerUp),r9(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(st.has(e.overflowX)||st.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let i=e===window,r=i?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},s={x:r.x-t.x,y:r.y-t.y};(0!==s.x||0!==s.y)&&(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(e,r),eE.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),eV(this.updatePoint)}}function sr(e,t){return t?{point:t(e.point)}:e}function ss(e,t){return{x:e.x-t.x,y:e.y-t.y}}function sn({point:e},t){return{point:e,delta:ss(e,sa(t)),offset:ss(e,t[0]),velocity:function(e,t){if(e.length<2)return{x:0,y:0};let i=e.length-1,r=null,s=sa(e);for(;i>=0&&(r=e[i],!(s.timestamp-r.timestamp>eG(.1)));)i--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&s.timestamp-r.timestamp>2*eG(.1)&&(r=e[1]);let n=(s.timestamp-r.timestamp)/1e3;if(0===n)return{x:0,y:0};let a={x:(s.x-r.x)/n,y:(s.y-r.y)/n};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}(t,.1)}}function sa(e){return e[e.length-1]}function so(e,t,i){return{min:void 0!==t?e.min+t:void 0,max:void 0!==i?e.max+i-(e.max-e.min):void 0}}function sl(e,t){let i=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([i,r]=[r,i]),{min:i,max:r}}function sd(e,t,i){return{min:sh(e,t),max:sh(e,i)}}function sh(e,t){return"number"==typeof e?e:e[t]||0}let su=new WeakMap;class sc{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Z(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:i}={}){let{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;let s=e=>{t&&this.snapToCursor(r7(e).point),this.stopAnimation()},n=(e,t)=>{let{drag:i,dragPropagation:r,onDragStart:s}=this.getProps();if(i&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=function(e){if("x"===e||"
1y"===e)if(r_[e])return null;else return r_[e]=!0,()=>{r_[e]=!1};return r_.x||r_.y?null:(r_.x=r_.y=!0,()=>{r_.x=r_.y=!1})}(i),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),rO(e=>{let t=this.getAxisMotionValue(e).get()||0;if(T.test(t)){let{projection:i}=this.visualElement;if(i&&i.layout){let r=i.layout.layoutBox[e];r&&(t=rU(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),s&&eE.update(()=>s(e,t),!1,!0),iA(this.visualElement,"transform");let{animationState:n}=this.visualElement;n&&n.setActive("whileDrag",!0)},a=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:i,dragDirectionLock:r,onDirectionLock:s,onDrag:n}=this.getProps();if(!i&&!this.openDragLock)return;let{offset:a}=t;if(r&&null===this.currentDirection){this.currentDirection=function(e,t=10){let i=null;return Math.abs(e.y)>t?i="y":Math.abs(e.x)>t&&(i="x"),i}(a),null!==this.currentDirection&&s&&s(this.currentDirection);return}this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),n&&eE.update(()=>n(e,t),!1,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:d}=this.getProps();this.panSession=new si(e,{onSessionStart:s,onStart:n,onMove:a,onSessionEnd:o,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:i,contextWindow:r8(this.visualElement),element:this.visualElement.current})}stop(e,t){let i=e||this.latestPointerEvent,r=t||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!r||!i)return;let{velocity:n}=r;this.startAnimation(n);let{onDragEnd:a}=this.getProps();a&&eE.postRender(()=>a(i,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,i){let{drag:r}=this.getProps();if(!i||!sm(e,r,this.currentDirection))return;let s=this.getAxisMotionValue(e),n=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(n=function(e,{min:t,max:i},r){return void 0!==t&&e<t?e=r?tO(t,e,r.min):Math.max(e,t):void 0!==i&&e>i&&(e=r?tO(i,e,r.max):Math.min(e,i)),e}(n,this.constraints[e],this.elastic[e])),s.set(n)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&ib(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&i?this.constraints=function(e,{top:t,left:i,bottom:r,right:s}){return{x:so(e.x,i,s),y:so(e.y,t,r)}}(i.layoutBox,e):this.constraints=!1,this.elastic=function(e=.35){return!1===e?e=0:!0===e&&(e=.35),{x:sd(e,"left","right"),y:sd(e,"top","bottom")}}(t),r!==this.constraints&&!ib(e)&&i&&this.constraints&&!this.hasMutatedConstraints&&rO(e=>{var t,r;let s;!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=(t=i.layoutBox[e],r=this.constraints[e],s={},void 0!==r.min&&(s.min=r.min-t.min),void 0!==r.max&&(s.max=r.max-t.min),s))})}resolveRefConstraints(){var e;let{dragConstraints:t,onMeasureDragConstraints:i}=this.getProps();if(!t||!ib(t))return!1;let r=t.current;en(null!==r,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:s}=this.visualElement;if(!s||!s.layout)return!1;let n=function(e,t,i){let r=t2(e,i),{scroll:s}=t;return s&&(tJ(r.x,s.offset.x),tJ(r.y,s.offset.y)),r}(r,s.root,this.visualElement.getTransformPagePoint()),a=(e=s.layout.layoutBox,{x:sl(e.x,n.x),y:sl(e.y,n.y)});if(i){let e=i(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(a));this.hasMutatedConstraints=!!e,e&&(a=tz(e))}return a}startAnimation(e){let{drag:t,dragMomentum:i,dragElastic:r,dragTransition:s,dragSnapToOrigin:n,onDragTransitionEnd:a}=this.getProps(),o=this.constraints||{};return Promise.all(rO(a=>{if(!sm(a,t,this.currentDirection))return;let l=o&&o[a]||{};(!0===n||n===a)&&(l={min:0,max:0});let d={type:"inertia",velocity:i?e[a]:0,bounceStiffness:r?200:1e6,bounceDamping:r?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(a,d)})).then(a)}startAxisValueAnimation(e,t){let i=this.getAxisMotionValue(e);return iA(this.visualElement,e),i.start(rC(e,i,0,t,this.visualElement,!1))}stopAnimation(){rO(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,i=this.visualElement.getProps();return i[t]||this.visualElement.getValue(e,(i.initial?i.initial[e]:void 0)||0)}snapToCursor(e){rO(t=>{let{drag:i}=this.getProps();if(!sm(t,i,this.currentDirection))return;let{projection:r}=this.visualElement,s=this.getAxisMotionValue(t);if(r&&r.layout){let{min:i,max:n}=r.layout.layoutBox[t],a=s.get()||0;s.set(e[t]-tO(i,n,.5)+a)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:i}=this.visualElement;if(!ib(t)||!i||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};rO(e=>{let t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){var i,s;let n,a,o,l=t.get();r[e]=(i={min:l,max:l},s=this.constraints[e],n=.5,a=rU(i),(o=rU(s))>a?n=rd(s.min,s.max-a,i.min):a>o&&(n=rd(i.min,i.max-o,s.min)),u(0,1,n))}});let{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),rO(t=>{if(!sm(t,e,null))return;let i=this.getAxisMotionValue(t),{min:s,max:n}=this.constraints[t];i.set(tO(s,n,r[t]))}),this.visualElement.render()}addListeners(){let e;if(!this.visualElement.current)return;su.set(this.visualElement,this);let t=this.visualElement.current,i=r9(t,"pointerdown",e=>{let{drag:i,dragListener:r=!0}=this.getProps(),s=e.target,n=s!==t&&(r3.has(s.tagName)||!0===s.isContentEditable);i&&r&&!n&&this.start(e)}),r=()=>{var i,r,s;let n,a,{dragConstraints:o}=this.getProps();ib(o)&&o.current&&(this.constraints=this.resolveRefConstraints(),e||(i=t,r=o.current,n=r5(i,sp(s=()=>this.scalePositionWithinConstraints())),a=r5(r,sp(s)),e=()=>{n(),a()}))},{projection:s}=this.visualElement,n=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),eE.read(r);let a=rI(window,"resize",()=>this.scalePositionWithinConstraints()),o=s.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(rO(t=>{let i=this.getAxisMotionValue(t);i&&(this.originPoint[t]+=e[t].translate,i.set(i.get()+e[t].translate))}),this.visualElement.render())});return()=>{a(),i(),n(),o&&o(),e&&e()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:i=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:n=.35,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:i,dragPropagation:r,dragConstraints:s,dragElastic:n,dragMomentum:a}}}function sp(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function sm(e,t,i){return(!0===t||t===e)&&(null===i||i===e)}let sf=e=>(t,i)=>{e&&eE.update(()=>e(t,i),!1,!0)},sv={hasAnimatedSinceResize:!0,hasEverUpdated:!1};var sx=o;let sg=!1;class sy extends sx.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:i,layoutId:r}=this.props,{projection:s}=e;s&&(t.group&&t.group.add(s),i&&i.register&&r&&i.register(s),sg&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),sv.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:i,drag:r,isPresent:s}=this.props,{projection:n}=i;return n&&(n.isPresent=s,e.layoutDependency!==t&&n.setOptions({...n.options,layoutDependency:t}),sg=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==s?n.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?n.promote():n.relegate()||eE.postRender(()=>{let e=n.getStack();e&&e.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:i}=e;i&&(i.options.layoutAnchor=t,i.root.didUpdate(),tr.postRender(()=>{!i.currentAnimation&&i.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:i}=this.props,{projection:r}=e;sg=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),i&&i.deregister&&i.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}}
1function sb(e){let[t,i]=function(e=!0){let t=(0,o.useContext)(id);if(null===t)return[!0,null];let{isPresent:i,onExitComplete:r,register:s}=t,n=(0,o.useId)();(0,o.useEffect)(()=>{if(e)return s(n)},[e]);let a=(0,o.useCallback)(()=>e&&r&&r(n),[n,r,e]);return!i&&r?[!1,a]:[!0]}(),r=(0,sx.useContext)(t6);return(0,a.jsx)(sy,{...e,layoutGroup:r,switchLayoutGroup:(0,sx.useContext)(iy),isPresent:t,safeToRemove:i})}let sw=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],sj=sw.length,sk=e=>"string"==typeof e?parseFloat(e):e,sS=e=>"number"==typeof e||P.test(e);function sT(e,t){return void 0!==e[t]?e[t]:e.borderRadius}let sP=sA(0,.5,rn),sC=sA(.5,.95,eC);function sA(e,t,i){return r=>r<e?0:r>t?1:i(rd(e,t,r))}function sM(e,t){e.min=t.min,e.max=t.max}function sN(e,t){sM(e.x,t.x),sM(e.y,t.y)}function sE(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function sV(e,t,i,r,s){return e-=t,e=r+1/i*(e-r),void 0!==s&&(e=r+1/s*(e-r)),e}function sR(e,t,[i,r,s],n,a){!function(e,t=0,i=1,r=.5,s,n=e,a=e){if(T.test(t)&&(t=parseFloat(t),t=tO(a.min,a.max,t/100)-a.min),"number"!=typeof t)return;let o=tO(n.min,n.max,r);e===n&&(o-=t),e.min=sV(e.min,t,i,o,s),e.max=sV(e.max,t,i,o,s)}(e,t[i],t[r],t[s],t.scale,n,a)}let sD=["x","scaleX","originX"],sL=["y","scaleY","originY"];function sB(e,t,i,r){sR(e.x,t,sD,i?i.x:void 0,r?r.x:void 0),sR(e.y,t,sL,i?i.y:void 0,r?r.y:void 0)}function sF(e){return 0===e.translate&&1===e.scale}function sO(e){return sF(e.x)&&sF(e.y)}function sI(e,t){return e.min===t.min&&e.max===t.max}function s_(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function sU(e,t){return s_(e.x,t.x)&&s_(e.y,t.y)}function sW(e){return rU(e.x)/rU(e.y)}function s$(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class sz{constructor(){this.members=[]}add(e){eq(this.members,e);for(let t=this.members.length-1;t>=0;t--){let i=this.members[t];if(i===e||i===this.lead||i===this.prevLead)continue;let r=i.instance;r&&!1!==r.isConnected||i.snapshot||(eX(this.members,i),i.unmount())}e.scheduleRender()}remove(e){if(eX(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(!1!==e.isPresent&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=i.options,{layoutDependency:s}=e.options;(void 0===r||r!==s)&&(e.resumeFrom=i,t&&(i.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),!1===e.options.crossfade&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}let sH=(e,t)=>e.depth-t.depth;class sG{constructor(){this.children=[],this.isDirty=!1}add(e){eq(this.children,e),this.isDirty=!0}remove(e){eX(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(sH),this.isDirty=!1,this.children.forEach(e)}}let sq=["","X","Y","Z"],sX=0;function sY(e,t,i,r){let{latestValues:s}=t;s[e]&&(i[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function sK({attachResizeListener:e,defaultParent:t,measureScroll:i,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(e={},i=t?.()){this.id=sX++,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=()=>
1{this.projectionUpdateScheduled=!1,this.nodes.forEach(sQ),this.nodes.forEach(s9),this.nodes.forEach(s8),this.nodes.forEach(s0)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new sG)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new eY),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let i=this.eventHandlers.get(e);i&&i.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=rX(t)&&!(rX(t)&&"svg"===t.tagName),this.instance=t;let{layoutId:i,layout:r,visualElement:s}=this.options;if(s&&!s.current&&s.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||i)&&(this.isLayoutDirty=!0),e){let i,r=0,s=()=>this.root.updateBlockedByResize=!1;eE.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;if(e!==r){let t,n;r=e,this.root.updateBlockedByResize=!0,i&&i(),t=tn.now(),n=({timestamp:e})=>{let i=e-t;i>=250&&(eV(n),s(i-250))},eE.setup(n,!0),i=()=>eV(n),sv.hasAnimatedSinceResize&&(sv.hasAnimatedSinceResize=!1,this.nodes.forEach(s7))}})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&s&&(i||r)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:i,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let n=this.options.transition||s.getDefaultTransition()||nn,{onLayoutAnimationStart:a,onLayoutAnimationComplete:o}=s.getProps(),l=!this.targetLayout||!sU(this.targetLayout,r),d=!t&&i;if(this.options.layoutRoot||this.resumeFrom||d||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...iP(n,"layout"),onPlay:a,onComplete:o};(s.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,d)}else t||s7(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),eV(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(ne),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function e(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;let{visualElement:i}=t.options;if(!i)return;let r=i.props[ig];if(window.MotionHasOptimisedAnimation(r,"transform")){let{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(r,"transform",eE,!(e||i))}let{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&e(s)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,("string"==typeof t.latestValues.x||"string"==typeof t.latestValues.y)&&(t.isLayoutDirty=!0),t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:i}=this.options;if(void 0===t&&!i)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEac
1h(s5),this.nodes.forEach(s2);return}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(s4);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(s3),this.nodes.forEach(s6),this.nodes.forEach(sZ),this.nodes.forEach(sJ)):this.nodes.forEach(s4),this.clearAllSnapshots();let e=tn.now();eR.delta=u(0,1e3/60,e-eR.timestamp),eR.timestamp=e,eR.isProcessing=!0,eD.update.process(eR),eD.preRender.process(eR),eD.render.process(eR),eR.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,tr.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(s1),this.sharedNodes.forEach(nt)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,eE.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){eE.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||rU(this.snapshot.measuredBox.x)||rU(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 e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Z()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:i(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!s)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!sO(this.projectionDelta),i=this.getTransformTemplate(),r=i?i(this.latestValues,""):void 0,n=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||tq(this.latestValues)||n)&&(s(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){var t;let i=this.measurePageBox(),r=this.removeElementScroll(i);return e&&(r=this.removeTransform(r)),nl((t=r).x),nl(t.y),{animationId:this.root.animationId,measuredBox:i,layoutBox:r,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return Z();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(nh))){let{scroll:e}=this.root;e&&(tJ(t.x,e.offset.x),tJ(t.y,e.offset.y))}return t}removeElementScroll(e){let t=Z();if(sN(t,e),this.scroll?.wasRoot)return t;for(let i=0;i<this.path.length;i++){let r=this.path[i],{scroll:s,options:n}=r;r!==this.root&&s&&n.layoutScroll&&(s.wasRoot&&sN(t,e),tJ(t.x,s.offset.x),tJ(t.y,s.offset.y))}return t}applyTransform(e,t=!1,i){let r=i||Z();sN(r,e);for(let e=0;e<this.path.length;e++){let i=this.path[e];!t&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(tJ(r.x,-i.scroll.offset.x),tJ(r.y,-i.scroll.offset.y)),tq(i.latestValues)&&t1(r,i.latestValues,i.layout?.layoutBox)}return tq(this.latestValues)&&t1(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=Z();sN(t,e);for(let e=0;e<this.path.length;e++){let i,r=this.path[e];tq(r.latestValues)&&(r.instance&&(tG(r.latestValues)&&r.updateSnapshot(),sN(i=Z(),r.measurePageBox())),sB(t,r.latestValues,r.snapshot?.layoutBox,i))}return tq(this.latestValues)&&sB(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}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!==eR.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.
1isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=t.isSharedProjectionDirty);let i=!!this.resumingFrom||this!==t;if(!(e||i&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:s}=this.options;if(!this.layout||!(r||s))return;this.resolvedRelativeTargetAt=eR.timestamp;let n=this.getClosestProjectingParent();if(n&&this.linkedParentVersion!==n.layoutVersion&&!n.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&n&&n.layout?this.createRelativeTarget(n,this.layout.layoutBox,n.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta){if(this.target||(this.target=Z(),this.targetWithTransforms=Z()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target){var a,o,l,d;this.forceRelativeParentToResolveTarget(),a=this.target,o=this.relativeTarget,l=this.relativeParent.target,d=this.options.layoutAnchor||void 0,rz(a.x,o.x,l.x,d?.x),rz(a.y,o.y,l.y,d?.y)}else this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):sN(this.target,this.layout.layoutBox),tZ(this.target,this.targetDelta)):sN(this.target,this.layout.layoutBox);this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&n&&!!n.resumingFrom==!!this.resumingFrom&&!n.options.layoutScroll&&n.target&&1!==this.animationProgress?this.createRelativeTarget(n,this.target,n.target):this.relativeParent=this.relativeTarget=void 0)}}getClosestProjectingParent(){if(!(!this.parent||tG(this.parent.latestValues)||tX(this.parent.latestValues)))if(this.parent.isProjecting())return this.parent;else return this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,i){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Z(),this.relativeTargetOrigin=Z(),rG(this.relativeTargetOrigin,t,i,this.options.layoutAnchor||void 0),sN(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,i=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(i=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===eR.timestamp&&(i=!1),i)return;let{layout:r,layoutId:s}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||s))return;sN(this.layoutCorrected,this.layout.layoutBox);let n=this.treeScale.x,a=this.treeScale.y;!function(e,t,i,r=!1){let s,n,a=i.length;if(a){t.x=t.y=1;for(let o=0;o<a;o++){n=(s=i[o]).projectionDelta;let{visualElement:a}=s.options;(!a||!a.props.style||"contents"!==a.props.style.display)&&(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&(tJ(e.x,-s.scroll.offset.x),tJ(e.y,-s.scroll.offset.y)),n&&(t.x*=n.x.scale,t.y*=n.y.scale,tZ(e,n)),r&&tq(s.latestValues)&&t1(e,s.latestValues,s.layout?.layoutBox))}t.x<1.0000000000001&&t.x>.999999999999&&(t.x=1),t.y<1.0000000000001&&t.y>.999999999999&&(t.y=1)}}(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=Z());let{target:o}=e;if(!o){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(sE(this.prevProjectionDelta.x,this.projectionDelta.x),sE(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),r$(this.projectionDelta,this.layoutCorrected,o,this.latestValues),this.treeScale.x===n&&this.treeScale.y===a&&s$(this.projectionDelta.x,this.prevProjectionDelta.x)&&s$(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",o))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Y(),this.projectionDelta=Y(),this.projectionDeltaWithTransform=Y()}setAnimationOrigin(e,t=!1){let i,r=this.snapshot,s=r?r.latestValues:{},n={...this.latestValues},a=Y();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=Z(),l=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),d=this.getStack(),h=!d||d.members.length<=1,u=!!(l&&!h&&
1!0===this.options.crossfade&&!this.path.some(ns));this.animationProgress=0,this.mixTargetDelta=t=>{let r=t/1e3;if(ni(a.x,e.x,r),ni(a.y,e.y,r),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var d,c,p,m,f,v;rG(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),p=this.relativeTarget,m=this.relativeTargetOrigin,f=o,v=r,nr(p.x,m.x,f.x,v),nr(p.y,m.y,f.y,v),i&&(d=this.relativeTarget,c=i,sI(d.x,c.x)&&sI(d.y,c.y))&&(this.isProjectionDirty=!1),i||(i=Z()),sN(i,this.relativeTarget)}l&&(this.animationValues=n,function(e,t,i,r,s,n){s?(e.opacity=tO(0,i.opacity??1,sP(r)),e.opacityExit=tO(t.opacity??1,0,sC(r))):n&&(e.opacity=tO(t.opacity??1,i.opacity??1,r));for(let s=0;s<sj;s++){let n=sw[s],a=sT(t,n),o=sT(i,n);(void 0!==a||void 0!==o)&&(a||(a=0),o||(o=0),0===a||0===o||sS(a)===sS(o)?(e[n]=Math.max(tO(sk(a),sk(o),r),0),(T.test(o)||T.test(a))&&(e[n]+="%")):e[n]=o)}(t.rotate||i.rotate)&&(e.rotate=tO(t.rotate||0,i.rotate||0,r))}(n,s,this.latestValues,r,u,h)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=r},this.mixTargetDelta(1e3*!!this.options.layoutRoot)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(eV(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=eE.update(()=>{var t,i,r;let s;sv.hasAnimatedSinceResize=!0,e4.layout++,this.motionValue||(this.motionValue=to(0)),this.motionValue.jump(0,!1),this.currentAnimation=(t=this.motionValue,i=[0,1e3],r={...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{e4.layout--},onComplete:()=>{e4.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}},(s=J(t)?t:to(t)).start(rC("",s,i,r)),s.animation),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:i,layout:r,latestValues:s}=e;if(t&&i&&r){if(this!==e&&this.layout&&r&&nd(this.options.animationType,this.layout.layoutBox,r.layoutBox)){i=this.target||Z();let t=rU(this.layout.layoutBox.x);i.x.min=e.target.x.min,i.x.max=i.x.min+t;let r=rU(this.layout.layoutBox.y);i.y.min=e.target.y.min,i.y.max=i.y.min+r}sN(t,i),t1(t,s),r$(this.projectionDeltaWithTransform,this.layoutCorrected,t,s)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new sz),this.sharedNodes.get(e).add(t);let i=t.options.initialPromotionConfig;t.promote({transition:i?i.transition:void 0,preserveFollowOpacity:i&&i.shouldPreserveFollowOpacity?i.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:i}={}){let r=this.getStack();r&&r.promote(this,i),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:i}=e;if((i.z||i.rotate||i.rotateX||i.rotateY||i.rotateZ||i.skewX||i.skewY)&&(t=!0),!t)return;let r={};i.z&&sY("z",e,r,this.animationValues);for(let t=0;t<sq.length;t++)sY(`rotate${sq[t]}`,e,r,this.animationValues),sY(`skew${sq[t]}`,e,r,this.animationValues);for(let t in e.render(),r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility="hidden";return}let i=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=il(t?.pointerEvents)||"",e.transform=i?i(this.latestValues,""):"none";return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=il(t?.pointerEvents)||""),this.hasProjected&&!tq(this.latestValues)&&(e.transform=i?i({},""):"none",this.hasProjected=!1);return}e.visibility="";let s=r.animationValues||r.latestValues;this.applyTransformsToTarget();let n=function(e,t,i){let r="",s=e.x.translate/t.x,n=e.y.translate/t.y,a=i?.z||0;if((s||n||a)&&(r=`translate3d(${s}px, ${n}px, ${a}px) `),(1!==t.x||1!==t.y)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),i){let{transformPerspective:e,rotate:t,rotateX:s,rotateY:n,skewX:a,skewY:o}=i;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),s&&(r+=`rotateX(${s}deg) `),n&&(r+=`rotateY(${n}deg) `),a&&(r+=`skewX(${a}deg) `),o&&(r+=`skewY(${o}deg) `)}let o=e.x.scale*t.x,l=e.y.scale*t.y;return(1!==o||1!==l)&&(r+=`scale(${o}, ${l}
1)`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,s);i&&(n=i(s,n)),e.transform=n;let{x:a,y:o}=this.projectionDelta;for(let t in e.transformOrigin=`${100*a.origin}% ${100*o.origin}% 0`,r.animationValues?e.opacity=r===this?s.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:e.opacity=r===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0,tI){if(void 0===s[t])continue;let{correct:i,applyTo:a,isCSSVariable:o}=tI[t],l="none"===n?s[t]:i(s[t],r);if(a){let t=a.length;for(let i=0;i<t;i++)e[a[i]]=l}else o?this.options.visualElement.renderState.vars[t]=l:e[t]=l}this.options.layoutId&&(e.pointerEvents=r===this?il(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(s2),this.root.sharedNodes.clear()}}}function sZ(e){e.updateLayout()}function sJ(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){let{layoutBox:i,measuredBox:r}=e.layout,{animationType:s}=e.options,n=t.source!==e.layout.source;if("size"===s)rO(e=>{let r=n?t.measuredBox[e]:t.layoutBox[e],s=rU(r);r.min=i[e].min,r.max=r.min+s});else if("x"===s||"y"===s){let e="x"===s?"y":"x";sM(n?t.measuredBox[e]:t.layoutBox[e],i[e])}else nd(s,t.layoutBox,i)&&rO(r=>{let s=n?t.measuredBox[r]:t.layoutBox[r],a=rU(i[r]);s.max=s.min+a,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+a)});let a=Y();r$(a,i,t.layoutBox);let o=Y();n?r$(o,e.applyTransform(r,!0),t.measuredBox):r$(o,i,t.layoutBox);let l=!sO(a),d=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:s,layout:n}=r;if(s&&n){let a=e.options.layoutAnchor||void 0,o=Z();rG(o,t.layoutBox,s.layoutBox,a);let l=Z();rG(l,i,n.layoutBox,a),sU(o,l)||(d=!0),r.options.layoutRoot&&(e.relativeTarget=l,e.relativeTargetOrigin=o,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:i,snapshot:t,delta:o,layoutDelta:a,hasLayoutChanged:l,hasRelativeLayoutChanged:d})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function sQ(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 s0(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function s1(e){e.clearSnapshot()}function s2(e){e.clearMeasurements()}function s5(e){e.isLayoutDirty=!0,e.updateLayout()}function s4(e){e.isLayoutDirty=!1}function s3(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function s6(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function s7(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function s9(e){e.resolveTargetDelta()}function s8(e){e.calcProjection()}function ne(e){e.resetSkewAndRotation()}function nt(e){e.removeLeadSnapshot()}function ni(e,t,i){e.translate=tO(t.translate,0,i),e.scale=tO(t.scale,1,i),e.origin=t.origin,e.originPoint=t.originPoint}function nr(e,t,i,r){e.min=tO(t.min,i.min,r),e.max=tO(t.max,i.max,r)}function ns(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}let nn={duration:.45,ease:[.4,0,.1,1]},na=e=>"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),no=na("applewebkit/")&&!na("chrome/")?Math.round:eC;function nl(e){e.min=no(e.min),e.max=no(e.max)}function nd(e,t,i){return"position"===e||"preserve-aspect"===e&&!(.2>=Math.abs(sW(t)-sW(i)))}function nh(e){return e!==e.root&&e.scroll?.wasRoot}let nu=sK({attachResizeListener:(e,t)=>rI(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),nc={current:void 0},np=sK({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!nc.current){let e=new nu({});e.mount(window),e.setOptions({layoutScroll:!0}),nc.current=e}return nc.current},resetTransform:(e,t)=>
1{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>"fixed"===window.getComputedStyle(e).position});function nm(e,t){let i=rY(e),r=new AbortController;return[i,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function nf(e,t,i){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===i);let s=r["onHover"+i];s&&eE.postRender(()=>s(t,r7(t)))}let nv=(e,t)=>!!t&&(e===t||nv(e,t.parentElement)),nx=new WeakSet;function ng(e){return t=>{"Enter"===t.key&&e(t)}}function ny(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function nb(e){return r6(e)&&!(r_.x||r_.y)}let nw=new WeakSet;function nj(e,t,i){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===i);let s=r["onTap"+("End"===i?"":i)];s&&eE.postRender(()=>s(t,r7(t)))}let nk=new WeakMap,nS=new WeakMap,nT=e=>{let t=nk.get(e.target);t&&t(e)},nP=e=>{e.forEach(nT)},nC={some:0,all:1},nA=function(e,t){if("u"<typeof Proxy)return ij;let i=new Map,r=(i,r)=>ij(i,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(s,n)=>"create"===n?r:(i.has(n)||i.set(n,ij(n,void 0,e,t)),i.get(n))})}({animation:{Feature:class extends ik{constructor(e){super(e),e.animationState||(e.animationState=function(e){let t=t=>Promise.all(t.map(({animation:t,options:i})=>(function(e,t,i={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t))r=Promise.all(t.map(t=>rN(e,t,i)));else if("string"==typeof t)r=rN(e,t,i);else{let s="function"==typeof t?iS(e,t,i.custom):t;r=Promise.all(rA(e,s,i))}return r.then(()=>{e.notify("AnimationComplete",t)})})(e,t,i))),i=rB(),r=!0,s=!1,n=t=>(i,r)=>{let s=iS(e,r,"exit"===t?e.presenceContext?.custom:void 0);if(s){let{transition:e,transitionEnd:t,...r}=s;i={...i,...r,...t}}return i};function a(a){let{props:o}=e,l=function e(t){if(!t)return;if(!t.isControllingVariants){let i=t.parent&&e(t.parent)||{};return void 0!==t.props.initial&&(i.initial=t.props.initial),i}let i={};for(let e=0;e<rE;e++){let r=tp[e],s=t.props[r];(tu(s)||!1===s)&&(i[r]=s)}return i}(e.parent)||{},d=[],h=new Set,u={},c=1/0;for(let t=0;t<rD;t++){var p,m;let f=rR[t],v=i[f],x=void 0!==o[f]?o[f]:l[f],g=tu(x),y=f===a?v.isActive:null;!1===y&&(c=t);let b=x===l[f]&&x!==o[f]&&g;if(b&&(r||s)&&e.manuallyAnimateOnMount&&(b=!1),v.protectedKeys={...u},!v.isActive&&null===y||!x&&!v.prevProp||th(x)||"boolean"==typeof x)continue;if("exit"===f&&v.isActive&&!0!==y){v.prevResolvedValues&&(u={...u,...v.prevResolvedValues});continue}let w=(p=v.prevProp,"string"==typeof(m=x)?m!==p:!!Array.isArray(m)&&!rV(m,p)),j=w||f===a&&v.isActive&&!b&&g||t>c&&g,k=!1,S=Array.isArray(x)?x:[x],T=S.reduce(n(f),{});!1===y&&(T={});let{prevResolvedValues:P={}}=v,C={...P,...T},A=t=>{j=!0,h.has(t)&&(k=!0,h.delete(t)),v.needsAnimating[t]=!0;let i=e.getValue(t);i&&(i.liveStyle=!1)};for(let e in C){let t=T[e],i=P[e];if(!u.hasOwnProperty(e))(iC(t)&&iC(i)?rV(t,i):t===i)?void 0!==t&&h.has(e)?A(e):v.protectedKeys[e]=!0:null!=t?A(e):h.add(e)}v.prevProp=x,v.prevResolvedValues=T,v.isActive&&(u={...u,...T}),(r||s)&&e.blockInitialAnimation&&(j=!1);let M=b&&w,N=!M||k;j&&N&&d.push(...S.map(t=>{let i={type:f};if("string"==typeof t&&(r||s)&&!M&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,s=iS(r,t);if(r.enteringChildren&&s){let{delayChildren:t}=s.transition||{};i.delay=rM(r.enteringChildren,e,t)}}return{animation:t,options:i}}))}if(h.size){let t={};if("boolean"!=typeof o.initial){let i=iS(e,Array.isArray(o.initial)?o.initial[0]:o.initial);i&&i.transition&&(t.transition=i.transition)}h.forEach(i=>{let r=e.getBaseTarget(i),s=e.getValue(i);s&&(s.liveStyle=!0),t[i]=r??null}),d.push({animation:t})}let f=!!d.length;return r&&(!1===o.initial||o.initial===o.animate)&&!e.manuallyAnimateOnMount&&(f=!1),r=!1,s=!1,f?t(d):Promise.resolve()}return{animateChanges:a,setActive:function(t,r){if(i[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),i[t].isActive=r;let s=a(t);for(let e in i)i[e].protectedKeys={};return s},setAnimateFunction:function(i){t=i(e)},getState:()=>i,reset:()=>{i=rB(),s=!0}}}(e))}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();th(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends ik{constructor(){super(...arguments),this.id=rF++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;if(e&&!1===i){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if("string"==typeof e){let i=iS(this.node,e,t);if(i){let{transition:e,transitionEnd:t,...r}=i;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>
1{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}},inView:{Feature:class extends ik{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var e;let t;this.stopObserver?.();let{viewport:i={}}=this.node.getProps(),{root:r,margin:s,amount:n="some",once:a}=i,o={root:r?r.current:void 0,rootMargin:s,threshold:"number"==typeof n?n:nC[n]},l=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,a&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);let{onViewportEnter:i,onViewportLeave:r}=this.node.getProps(),s=t?i:r;s&&s(e)};this.stopObserver=(e=this.node.current,t=function({root:e,...t}){let i=e||document;nS.has(i)||nS.set(i,{});let r=nS.get(i),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(nP,{root:e,...t})),r[s]}(o),nk.set(e,l),t.observe(e),()=>{nk.delete(e),t.unobserve(e)})}mount(){this.startObserver()}update(){if("u"<typeof IntersectionObserver)return;let{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return i=>e[i]!==t[i]}(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}},tap:{Feature:class extends ik{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:i}=this.node.props;this.unmount=function(e,t,i={}){let[r,s,n]=nm(e,i),a=e=>{let r=e.currentTarget;if(!nb(e)||nw.has(e))return;nx.add(r),i.stopPropagation&&nw.add(e);let n=t(r,e),a=(e,t)=>{window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",l),nx.has(r)&&nx.delete(r),nb(e)&&"function"==typeof n&&n(e,{success:t})},o=e=>{a(e,r===window||r===document||i.useGlobalTarget||nv(r,e.target))},l=e=>{a(e,!1)};window.addEventListener("pointerup",o,s),window.addEventListener("pointercancel",l,s)};return r.forEach(e=>{(i.useGlobalTarget?window:e).addEventListener("pointerdown",a,s),rq(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)&&(e.addEventListener("focus",e=>((e,t)=>{let i=e.currentTarget;if(!i)return;let r=ng(()=>{if(nx.has(i))return;ny(i,"down");let e=ng(()=>{ny(i,"up")});i.addEventListener("keyup",e,t),i.addEventListener("blur",()=>ny(i,"cancel"),t)});i.addEventListener("keydown",r,t),i.addEventListener("blur",()=>i.removeEventListener("keydown",r),t)})(e,s)),r4.has(e.tagName)||!0===e.isContentEditable||e.hasAttribute("tabindex")||(e.tabIndex=0))}),n}(e,(e,t)=>(nj(this.node,t,"Start"),(e,{success:t})=>nj(this.node,e,t?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:i?.tap===!1})}unmount(){}}},focus:{Feature:class extends ik{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&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=iN(rI(this.node.current,"focus",()=>this.onFocus()),rI(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends ik{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,i={}){let[r,s,n]=nm(e,i);return r.forEach(e=>{let i,r=!1,n=!1,a=t=>{i&&(i(t),i=void 0),e.removeEventListener("pointerleave",l)},o=e=>{r=!1,window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",o),n&&(n=!1,a(e))},l=e=>{if("touch"!==e.pointerType){if(r){n=!0;return}a(e)}};e.addEventListener("pointerenter",r=>{if("touch"===r.pointerType||r_.x||r_.y)return;n=!1;let a=t(e,r);"function"==typeof a&&(i=a,e.addEventListener("pointerleave",l,s))},s),e.addEventListener("pointerdown",()=>{r=!0,window.addEventListener("pointerup",o,s),window.addEventListener("pointercancel",o,s)},s)}),n}(e,(e,t)=>(nf(this.node,t,"Start"),e=>nf(this.node,e,"End"))))}unmount(){}}},pan:{Feature:class extends ik{constructor(){super(...arguments),this.removePointerDownListener=eC}onPointerDown(e){this.session=new si(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:r8(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:i,onPanEnd:r}=this.node.getProps();return{onSessionStart:sf(e),onStart:sf(t),onMove:sf(i),onEnd:(e,t)=>{delete this.session,r&&eE.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=r9(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends ik{constructor(e){super(e),this.removeGroupControls=eC,this.removeListeners=eC,this.controls=new sc(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||eC}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},ProjectionNode:np,MeasureLayout:sb},layout:{ProjectionNode:np,MeasureLayout:sb}},(e,t)=>t.isSVG??t3(e)?new t$(t):new t5(t,{allowProjection:e!==o.Fragment}));var nM=e.i(283086),nN=e.i(972520),nE=e.i(243088),nV=e.i(635910),nR=e.i(377057),nD=e.i(497058),nL=e.i(850471),nB=e.i(632036);function nF(){let e=(0,l.useRouter)(),t=(0,l.usePathname)(),[i,r]=(0,o.useState)(""),[s,n]=(0,o.useState)({}),d=(0,o.useRef)(null),[h,u]=(0,o.useState)(!1);(0,o.useEffect)(()=>{h&&d.current?.scrollIntoView({block:"start"})}
1,[h]);let c=(0,nR.nombreDeLaZonaDelRadar)(s),[p,m]=(0,o.useState)(!1),[f,v]=(0,o.useState)(!1),[x,g]=(0,o.useState)(!1),[y,b]=(0,o.useState)(null);if((0,o.useEffect)(()=>{x||fetch("/api/landing/metrics").then(e=>e.ok?e.json():null).then(e=>{e?.usuarios_activos&&b(e.usuarios_activos)}).catch(()=>{})},[x]),x||t.startsWith("/radar"))return null;let w=(0,nR.tieneZona)(s)&&!!i,j=async r=>{if(!w)return;let n={...s,objetivo:i};v(!0);try{await (0,nE.saveRadarPrefs)(n,{crearAlerta:p,fusionar:!0})}catch{}v(!1),g(!0),"radar"===r?e.push((0,nV.urlDelRadar)(t)):t.startsWith("/oportunidades")?e.replace((0,nV.urlDelListadoDelRadar)(n)):e.refresh()};return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:"fixed inset-0 z-[120] flex items-center justify-center p-4",role:"dialog","aria-modal":"true",children:[(0,a.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm","aria-hidden":"true"}),(0,a.jsxs)("div",{className:"relative flex max-h-[85dvh] md:max-h-[90dvh] w-full max-w-md flex-col overflow-hidden rounded-[18px] border border-[var(--color-border-strong)] bg-[var(--color-card)] shadow-[0_30px_80px_rgba(15,23,42,0.22)]",children:[(0,a.jsx)("span",{"aria-hidden":!0,className:"h-[3px] w-full shrink-0 bg-gradient-to-r from-[var(--color-brand)] to-[#ff7a4d]"}),(0,a.jsx)("div",{className:"hide-scrollbar overflow-y-auto p-5 sm:p-7 sm:pb-0",children:(0,a.jsxs)(nA.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.25,ease:"easeOut"},children:[(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("div",{className:"mx-auto mb-2.5 flex h-11 w-11 items-center justify-center rounded-2xl bg-[var(--color-brand-soft)] text-2xl sm:mb-3 sm:h-14 sm:w-14 sm:text-3xl",children:"ð¯"}),(0,a.jsx)("h2",{className:"text-xl font-bold tracking-tight text-balance sm:text-2xl",style:{fontFamily:"var(--font-display)"},children:"Bienvenido a RadarPro"}),(0,a.jsxs)("p",{className:"mt-3 inline-flex items-center gap-1.5 whitespace-nowrap rounded-full border border-[var(--color-green-border)] bg-[var(--color-green-soft)] px-2.5 py-1.5 text-[11.5px] font-semibold text-[var(--color-green)] sm:gap-2 sm:px-3 sm:text-xs",children:[(0,a.jsx)("span",{children:"ð 25 créditos gratis"}),y&&(0,a.jsx)("span",{className:"opacity-40",children:"·"}),y&&(0,a.jsxs)("span",{children:["ð¥ +",(0,nB.formatNumber)(y)," usuarios",(0,a.jsx)("span",{className:"max-sm:hidden",children:" activos"})]})]})]}),(0,a.jsx)("div",{className:"my-4 border-t border-[var(--color-border)] sm:my-5"}),(0,a.jsx)("h3",{className:"text-lg font-bold tracking-tight",style:{fontFamily:"var(--font-display)"},children:"¿Qué estás buscando?"}),(0,a.jsx)("div",{className:"mt-3 grid grid-cols-2 gap-2",role:"radiogroup","aria-label":"Qué estás buscando",children:nR.OBJETIVOS.map(e=>{let t=i===e.valor;return(0,a.jsxs)("button",{type:"button",role:"radio","aria-checked":t,onClick:()=>r(e.valor),className:`flex flex-col items-start gap-0.5 rounded-[var(--radius-btn)] border p-2.5 text-left transition-colors sm:p-3 ${t?"border-[var(--color-brand)] bg-[var(--color-brand-soft)]":"border-[var(--color-border-strong)] bg-[var(--color-card)] hover:border-[var(--color-brand-border)]"}`,children:[(0,a.jsx)("span",{className:"text-[13.5px] font-bold text-[var(--color-text)]",children:e.titulo}),(0,a.jsx)("span",{className:"text-[11px] leading-snug text-[var(--color-muted)]",children:e.detalle})]},e.valor)})}),(0,a.jsx)("h3",{className:"mt-5 text-lg font-bold tracking-tight",style:{fontFamily:"var(--font-display)"},children:"¿Dónde buscas?"}),(0,a.jsx)("p",{className:"mt-1 text-xs text-[var(--color-muted)]",children:"Una o varias zonas: comunidades, provincias, municipios, barrios o códigos postales."}),(0,a.jsx)("div",{ref:d,className:`mt-3 ${h?"pb-72":""}`,children:(0,a.jsx)(nL.ZoneSearchInput,{selected:(0,nD.buildZoneTokens)((0,nR.zonasDe)(s)),onAdd:e=>n(t=>(0,nR.aplicarCambios)(t,(0,nD.zoneAddPatch)((0,nR.zonasDe)(t),e))),onRemove:e=>n(t=>(0,nR.aplicarCambios)(t,(0,nD.zoneRemovePatch)((0,nR.zonasDe)(t),e))),onSugerencias:u})}),(0,nR.tieneZona)(s)&&(0,a.jsxs)("label",{className:"mt-4 flex cursor-pointer items-start gap-2.5 rounded-[var(--radius-btn)] border border-[var(--color-border)] bg-[var(--color-dark2)] p-3.5 transition-colors hover:border-[var(--color-brand-border)]",children:[(0,a.jsx)("input",{type:"checkbox",checked:p,onChange:e=>m(e.target.checked),className:"mt-0.5 h-4 w-4 shrink-0 accent-[var(--color-brand)]"}),(0,a.jsxs)("span",{className:"text-[13px] leading-[1.45] text-[var(--color-text)]",children:["AvÃsame por email cuando entre una oportunidad en ",(0,a.jsx)("b",{children:c})]})]})]})}),(0,a.jsxs)("div",{className:"shrink-0 border-t border-[var(--color-border)] px-5 py-4 sm:border-t-0 sm:px-7 sm:pb-7 sm:pt-6",children:[(0,a.jsx)("button",{onClick:()=>void j("listado"),disabled:f||!w,className:"flex w-full items-center justify-center gap-2.5 whitespace-nowrap rounded-[var(--radius-btn)] bg-[var(--color-brand)] px-6 py-4 text-[15px] font-bold text-white transition-colors hover:bg-[var(--color-brand-dark)] active:scale-[0.98] disabled:cursor-not-allowed disabled:opacity-40 disabled:active:scale-100",children:f?"Guardandoâ¦":(0,a.jsxs)(a.Fragment,{children:["Ver oportunidades ahora ",(0,a.jsx)(nN.ArrowRight,{className:"h-5 w-5"})]})}),(0,a.jsxs)("button",{onClick:()=>void j("radar"),disabled:f||!w,className:"mt-2 flex w-full items-center justify-center gap-2 rounded-[var(--radius-btn)] border border-[var(--color-border-strong)] px-6 py-3 text-sm font-bold text-[var(--color-text)] transition-colors hover:border-[var(--color-brand)] hover:bg-[var(--color-brand-soft)] disabled:cursor-not-allowed disabled:opacity-40",children:[(0,a.jsx)(nM.Sparkles,{className:"h-4 w-4 text-[var(--color-brand)]"}),"Completar radar"]})]})]})]})})}e.s(["OnboardingModal",()=>nF],635606)},628238,e=>{"use strict";var t=e.i(843476),i=e.i(271645),r=e.i(618566),s=e.i(95187);let n=(0,s.createServerReference)("00d62551538db32f426a4ec1e07bac00994eb6c851",
1s.callServer,void 0,s.findSourceMapURL,"aceptarTerminos");var a=e.i(776639);let o="font-semibold text-[var(--color-brand)] underline-offset-4 hover:underline";function l(){let e=(0,r.useRouter)(),[s,l]=(0,i.useState)("pendiente");if("hecho"===s)return null;let d=async()=>{l("guardando");try{let{ok:t}=await n();if(!t)return void l("error");l("hecho"),e.refresh()}catch{l("error")}};return(0,t.jsx)(a.Dialog,{open:!0,children:(0,t.jsx)(a.DialogContent,{showCloseButton:!1,overlayClassName:"supports-backdrop-filter:backdrop-blur-md bg-black/30",onEscapeKeyDown:e=>e.preventDefault(),onPointerDownOutside:e=>e.preventDefault(),className:"block w-full max-w-[92vw] overflow-hidden rounded-2xl border border-[var(--color-border-strong)] bg-[var(--color-card)] p-0 shadow-[0_30px_80px_rgba(15,23,42,0.22)] sm:max-w-[440px] sm:rounded-[18px]",children:(0,t.jsxs)("div",{className:"relative px-6 pb-7 pt-8 sm:px-10 sm:pb-9 sm:pt-10",children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"pointer-events-none absolute inset-x-0 top-0 h-[3px] bg-gradient-to-r from-[var(--color-brand)] to-[#ff7a4d]"}),(0,t.jsx)("img",{src:"/logo-negro.webp",alt:"RadarPro",width:110,height:28,className:"mb-6 h-6 w-auto object-contain sm:h-7"}),(0,t.jsxs)(a.DialogHeader,{className:"text-left",children:[(0,t.jsx)(a.DialogTitle,{className:"mb-2 text-xl font-bold tracking-tight [text-wrap:balance] sm:text-2xl",style:{fontFamily:"var(--font-display)"},children:"Acepta los Términos de Uso para seguir"}),(0,t.jsx)(a.DialogDescription,{className:"text-sm leading-relaxed text-[var(--color-muted)]",children:"Confirma que aceptas nuestros Términos de Uso y que has leÃdo la PolÃtica de Privacidad. Solo te lo pediremos una vez, salvo que los cambiemos."})]}),(0,t.jsxs)("p",{className:"mt-4 flex flex-wrap gap-x-5 gap-y-1 text-sm",children:[(0,t.jsx)("a",{href:"/terminos-de-uso",target:"_blank",rel:"noopener noreferrer",className:o,children:"Términos de Uso"}),(0,t.jsx)("a",{href:"/politica-privacidad",target:"_blank",rel:"noopener noreferrer",className:o,children:"PolÃtica de Privacidad"})]}),(0,t.jsx)("button",{type:"button",onClick:d,disabled:"guardando"===s,className:"mt-6 flex h-[46px] w-full items-center justify-center rounded-[var(--radius-btn)] bg-[var(--color-brand)] px-6 text-sm font-bold text-white transition-colors hover:bg-[var(--color-brand-dark)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-brand)] focus-visible:ring-offset-2 disabled:cursor-wait disabled:opacity-70",children:"guardando"===s?"Guardandoâ¦":"Acepto"}),"error"===s&&(0,t.jsx)("p",{role:"alert",className:"mt-3 text-xs font-semibold text-[var(--color-danger)]",children:"No hemos podido guardarlo. Revisa tu conexión e inténtalo de nuevo."})]})})})}e.s(["TerminosModal",()=>l],628238)}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.