1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PickupLocationsMap-Dag52fpg.js","assets/vendor-query-CniT1WJL.js","assets/vendor-react-69GsFwrV.js","assets/PickupLocationsMap-CIGW-MKW.css","assets/vida-chat-DUBcUOXh.js","assets/vendor-forms-q6h4WU-p.js","assets/supportApi-DX1gvRrR.js","assets/vendor-ui-Ad3ANzF6.js","assets/OrderStatusPill-CBg1Ze7d.js","assets/vida-file-markdown-CuljC9JM.js","assets/Register-pPPxBI6q.js","assets/PasswordStrength-CIBKcPci.js","assets/ForgotPassword-B5vKw0Fk.js","assets/ResetPassword-9yAHSlfI.js","assets/ConfirmEmail-CdA2TU6Y.js","assets/Account-COdR340W.js","assets/AccountNav-CGK2802V.js","assets/AccountSection-B7Ueu1lP.js","assets/initials-BymJflY_.js","assets/OrderRow-SbSokLqx.js","assets/useRedeemPointsAction-DaHEN51n.js","assets/ReferralCodeRow-CHmzEFCf.js","assets/PinSetup-d18BbVnx.js","assets/AccountOrders-DtZlxgKu.js","assets/AccountOrderDetail-BU_rmCUH.js","assets/AddressFormFields-Byy1VLUa.js","assets/api-BP6hRV2j.js","assets/AccountSupport-BGHEdJsR.js","assets/BusinessInvitation-BAj-LcpW.js","assets/AccountPoints-DleIdsQE.js","assets/AccountPrizes-CWGQY6Gz.js","assets/AccountReferral-B1Opwoyh.js","assets/AccountVidaForward-BVnpil3D.js","assets/prayer-bridge-xtgJoFug.js","assets/AccountContributions-BNZd2lVi.js","assets/AccountProfile-B2H0hbs0.js","assets/badge-DyGI04xR.js","assets/AccountAddresses--cAh64-U.js","assets/AddressUseSelect-6JVVOxBe.js","assets/AccountCompany-B5Y3xpHc.js","assets/CompanyPortalShell-S13F8qfG.js","assets/AccountCompanyStart-CkdKdthi.js","assets/AccountCompanyQuotes-Cuj4uwc1.js","assets/AccountCompanyOrders-YmTBblSk.js","assets/AccountCompanyQuote-DmZEyp2t.js","assets/CompanyPdfButton-BRIsZWze.js","assets/customer-error-copy-BMVNH5_E.js","assets/AccountCompanyInvoices-C2IRP10T.js","assets/AccountCompanyInvoice-A4LeWs7B.js","assets/AccountNotifications-CbEBzxU-.js","assets/PrivacyCenter-CfFZTNa6.js","assets/Research-BwTxDVaS.js","assets/CoaVerify-DxTqguh8.js","assets/VidaFiles-C0_MzZO0.js","assets/VidaFile--oPVSogf.js","assets/RequestedProducts-Bi1YN3ws.js","assets/radio-group-DbXbZG7k.js","assets/Quote-TrqB-ody.js","assets/PayLinkVidapayTile-COzDVRE7.js","assets/PaymentCard-CNmbrjef.js","assets/product-type-ELOBn7Yu.js","assets/PayLink-B7_8Xkt4.js","assets/PayLinkSummaryCard-Cm5xFSna.js","assets/pay-link-vidapay-return-DbOdzLly.js","assets/SupplierPurchaseOrder-BLWEVI5Y.js","assets/PaymentReturn-DoyMuxSd.js","assets/WalletApprove-79RcqVO_.js","assets/Club-DEqABgXM.js","assets/clubApi-JPjlrS4z.js","assets/ClubPaymentInstructions-C5MGRGrX.js","assets/ClubOrders-CMBMk7vj.js","assets/ClubOrderStatusPill-BJTLg4f2.js","assets/ClubOrder-D_wNzYGN.js","assets/Tools-BnomK64T.js","assets/popover-1k_eKzW4.js","assets/VidaCareShell-CnSAT6qE.js","assets/Legal-XYe4TvNr.js","assets/About-B1vcyYk6.js","assets/Promo-CP32vERt.js","assets/Play-B2R12t4s.js","assets/Rewards-BxiBItN0.js","assets/content-CEASlHUK.js","assets/VidaGrants-DYBAz2tH.js","assets/PartnerApply-DwG_U9Gd.js","assets/SupportApply-D1R55iNW.js","assets/ImpactPage-Cu9Kuz9m.js","assets/ContributionPage-1cvzCiL5.js","assets/VidaForwardLanding-BzOv5dXU.js","assets/PartnerSign-CfPEbUpy.js","assets/PartnerPortal-CngjNVB9.js","assets/PartnerNav-CPlF75u7.js","assets/PartnerResources-jECZ5T5D.js","assets/PartnerLeaderboard-uhPOfJQX.js","assets/PartnerPromotions-Clrww6Bn.js","assets/StatusPill-vvYW-7Fj.js","assets/shared-GtdCyG23.js","assets/PartnerPromotionCreate-Cw7IPJwm.js","assets/PartnerPromotionDetail-B7M3PP_L.js","assets/InvitePartner-tm5IOpxy.js","assets/SuppliersLanding-BVnCkC6P.js","assets/SupplierApply-DqPNBzmJ.js","assets/shared-DMAcxp5i.js","assets/SupplierApplicationStatus-Q2JKJqjC.js","assets/SupplierInvite-DGNZgoAz.js","assets/SupplierPortalPage-CywL-iCP.js","assets/VerifyEmail-A7t1Gt0J.js","assets/WelcomePage-DwyMaf0i.js","assets/Survey-_QLGzwsK.js","assets/Track-sqk_5WIu.js","assets/ShipmentHub-Bfpy4gNZ.js","assets/HubPaymentMethods-C96GeChS.js"])))=>i.map(i=>d[i]); 2var DA=e=>{throw TypeError(e)};var LA=(e,t,n)=>t.has(e)||DA("Cannot "+n);var ir=(e,t,n)=>(LA(e,t,"read from private field"),n?n.call(e):t.get(e)),qA=(e,t,n
vendor: 4,132 bytes, line 2
2)=>t.has(e)?DA("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ix=(e,t,n,r)=>(LA(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);import{j as s,u as Oe,a as _e,b as Mr,c as yq,Q as xq,d as vq,e as bq,f as wq}from"./vendor-query-CniT1WJL.js";import{a as Sq,c as b2,r as h,g as I0,R as Oc,d as ee,u as Hn,L as Ue,e as M0,f as D0,h as Cq,S as Nq,i as ve,j as Mi}from"./vendor-react-69GsFwrV.js";import{o as ei,n as fn,l as Wo,u as Aq,_ as L0,d as Eq,s as dn,a as jq,b as Kv,c as UA,e as zA,f as Yv,g as Wv,E as Tq,S as kq,h as VA,i as BA}from"./vendor-forms-q6h4WU-p.js";import{e as Rq,c as Pq,B as Qs,C as Oq,S as ya,a as _q,b as no,d as mn,f as dh,L as FA,T as el,M as $A,F as tl,g as er,K as HA,h as q0,P as w2,R as S2,i as ul,U as Wd,A as C2,j as Iq,k as Mq,l as Dq,m as Lq,X as ro,D as N2,n as qq,o as Uq,p as zq,q as A2,E as Vq,r as Bq,s as fh,H as Fq,t as nl,u as $q,v as mh,w as Hq,x as Gq,y as E2,z as j2,G as U0,I as Ap,J as Qd,N as Qv,O as T2,Q as Kq,V as Yq,W as Wq,Y as z0,Z as Xv,_ as Xi,$ as V0,a0 as k2,a1 as B0,a2 as _c,a3 as Yi,a4 as F0,a5 as Wi,a6 as R2,a7 as Zi,a8 as P2,a9 as O2,aa as Qq,ab as Xq,ac as Ic,ad as _2,ae as I2,af as dl,ag as $0,ah as Zq,ai as rl,aj as M2,ak as Jq,al as D2,am as L2,an as eU,ao as Md,ap as ao,aq as tU,ar as nU,as as GA,at as rU,au as q2,av as aU,aw as sU,ax as ph,ay as iU,az as oU,aA as lU,aB as cU,aC as uU,aD as dU,aE as fU,aF as mU,aG as pU,aH as hU,aI as U2,aJ as z2,aK as gU,aL as yU,aM as xU,aN as V2,aO as Ep,aP as vU,aQ as bU,aR as jp,aS as wU,aT as SU,aU as CU,aV as NU,aW as B2}from"./vendor-ui-Ad3ANzF6.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();var ox={exports:{}},Yu={},lx={exports:{}},cx={};var KA;function AU(){return KA||(KA=1,(function(e){function t(I,O){var F=I.length;I.push(O);e:for(;0<F;){var B=F-1>>>1,K=I[B];if(0<o(K,O))I[B]=O,I[F]=K,F=B;else break e}}function n(I){return I.length===0?null:I[0]}function r(I){if(I.length===0)return null;var O=I[0],F=I.pop();if(F!==O){I[0]=F;e:for(var B=0,K=I.length,le=K>>>1;B<le;){var Z=2*(B+1)-1,ie=I[Z],re=Z+1,de=I[re];if(0>o(ie,F))re<K&&0>o(de,ie)?(I[B]=de,I[re]=F,B=re):(I[B]=ie,I[Z]=F,B=Z);else if(re<K&&0>o(de,F))I[B]=de,I[re]=F,B=re;else break e}}return O}function o(I,O){var F=I.sortIndex-O.sortIndex;return F!==0?F:I.id-O.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var m=[],p=[],y=1,g=null,v=3,b=!1,S=!1,C=!1,N=!1,A=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function j(I){for(var O=n(p);O!==null;){if(O.callback===null)r(p);else if(O.startTime<=I)r(p),O.sortIndex=O.expirationTime,t(m,O);else break;O=n(p)}}function _(I){if(C=!1,j(I),!S)if(n(m)!==null)S=!0,R||(R=!0,$());else{var O=n(p);O!==null&&Q(_,O.startTime-I)}}var R=!1,P=-1,M=5,q=-1;function U(){return N?!0:!(e.unstable_now()-q<M)}function V(){if(N=!1,R){var I=e.unstable_now();q=I;var O=!0;try{e:{S=!1,C&&(C=!1,T(P),P=-1),b=!0;var F=v;try{t:{for(j(I),g=n(m);g!==null&&!(g.expirationTime>I&&U());){var B=g.callback;if(typeof B=="function"){g.callback=null,v=g.priorityLevel;var K=B(g.expirationTime<=I);if(I=e.unstable_now(),typeof K=="function"){g.callback=K,j(I),O=!0;break t}g===n(m)&&r(m),j(I)}else r(m);g=n(m)}if(g!==null)O=!0;else{var le=n(p);
vendor: 4,276 bytes, line 2
2le!==null&&Q(_,le.startTime-I),O=!1}}break e}finally{g=null,v=F,b=!1}O=void 0}}finally{O?$():R=!1}}}var $;if(typeof E=="function")$=function(){E(V)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,H=L.port2;L.port1.onmessage=V,$=function(){H.postMessage(null)}}else $=function(){A(V,0)};function Q(I,O){P=A(function(){I(e.unstable_now())},O)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(I){I.callback=null},e.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(I){switch(v){case 1:case 2:case 3:var O=3;break;default:O=v}var F=v;v=O;try{return I()}finally{v=F}},e.unstable_requestPaint=function(){N=!0},e.unstable_runWithPriority=function(I,O){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var F=v;v=I;try{return O()}finally{v=F}},e.unstable_scheduleCallback=function(I,O,F){var B=e.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?B+F:B):F=B,I){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=F+K,I={id:y++,callback:O,priorityLevel:I,startTime:F,expirationTime:K,sortIndex:-1},F>B?(I.sortIndex=F,t(p,I),n(m)===null&&I===n(p)&&(C?(T(P),P=-1):C=!0,Q(_,F-B))):(I.sortIndex=K,t(m,I),S||b||(S=!0,R||(R=!0,$()))),I},e.unstable_shouldYield=U,e.unstable_wrapCallback=function(I){var O=v;return function(){var F=v;v=O;try{return I.apply(this,arguments)}finally{v=F}}}})(cx)),cx}var YA;function EU(){return YA||(YA=1,lx.exports=AU()),lx.exports}var WA;function jU(){if(WA)return Yu;WA=1;var e=EU(),t=Sq(),n=b2();function r(a){var i="https://react.dev/errors/"+a;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)i+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+a+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function l(a){var i=a,u=a;if(a.alternate)for(;i.return;)i=i.return;else{a=i;do i=a,(i.flags&4098)!==0&&(u=i.return),a=i.return;while(a)}return i.tag===3?u:null}function c(a){if(a.tag===13){var i=a.memoizedState;if(i===null&&(a=a.alternate,a!==null&&(i=a.memoizedState)),i!==null)return i.dehydrated}return null}function d(a){if(l(a)!==a)throw Error(r(188))}function m(a){var i=a.alternate;if(!i){if(i=l(a),i===null)throw Error(r(188));return i!==a?null:a}for(var u=a,f=i;;){var x=u.return;if(x===null)break;var w=x.alternate;if(w===null){if(f=x.return,f!==null){u=f;continue}break}if(x.child===w.child){for(w=x.child;w;){if(w===u)return d(x),a;if(w===f)return d(x),i;w=w.sibling}throw Error(r(188))}if(u.return!==f.return)u=x,f=w;else{for(var k=!1,D=x.child;D;){if(D===u){k=!0,u=x,f=w;break}if(D===f){k=!0,f=x,u=w;break}D=D.sibling}if(!k){for(D=w.child;D;){if(D===u){k=!0,u=w,f=x;break}if(D===f){k=!0,f=w,u=x;break}D=D.sibling}if(!k)throw Error(r(189))}}if(u.alternate!==f)throw Error(r(190))}if(u.tag!==3)throw Error(r(188));return u.stateNode.current===u?a:i}function p(a){var i=a.tag;if(i===5||i===26||i===27||i===6)return a;for(a=a.child;a!==null;){if(i=p(a),i!==null)return i;a=a.sibling}return null}var y=Object.assign,g=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),A=Symbol.for("react.provider"),T=Symbol.for("react.consumer"),E=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),q=Symbol.for("react.activity"),U=Symbol.for("react.memo_cache_sentinel"),V=Symbol.iterator;function $(a){return a===null||typeof a!="object"?null:(a=V&&a[V]||a["@@iterator"],typeof a=="function"?a:null)}var L=Symbol.for("react.client.reference");
vendor: 15,556 bytes, lines 2-9
2function H(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===L?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case S:return"Fragment";case N:return"Profiler";case C:return"StrictMode";case _:return"Suspense";case R:return"SuspenseList";case q:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case b:return"Portal";case E:return(a.displayName||"Context")+".Provider";case T:return(a._context.displayName||"Context")+".Consumer";case j:var i=a.render;return a=a.displayName,a||(a=i.displayName||i.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case P:return i=a.displayName||null,i!==null?i:H(a.type)||"Memo";case M:i=a._payload,a=a._init;try{return H(a(i))}catch{}}return null}var Q=Array.isArray,I=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F={pending:!1,data:null,method:null,action:null},B=[],K=-1;function le(a){return{current:a}}function Z(a){0>K||(a.current=B[K],B[K]=null,K--)}function ie(a,i){K++,B[K]=a.current,a.current=i}var re=le(null),de=le(null),he=le(null),pe=le(null);function oe(a,i){switch(ie(he,i),ie(de,a),ie(re,null),i.nodeType){case 9:case 11:a=(a=i.documentElement)&&(a=a.namespaceURI)?uA(a):0;break;default:if(a=i.tagName,i=i.namespaceURI)i=uA(i),a=dA(i,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}Z(re),ie(re,a)}function ge(){Z(re),Z(de),Z(he)}function we(a){a.memoizedState!==null&&ie(pe,a);var i=re.current,u=dA(i,a.type);i!==u&&(ie(de,a),ie(re,u))}function be(a){de.current===a&&(Z(re),Z(de)),pe.current===a&&(Z(pe),Fu._currentValue=F)}var Me=Object.prototype.hasOwnProperty,ze=e.unstable_scheduleCallback,Ee=e.unstable_cancelCallback,Ct=e.unstable_shouldYield,Ft=e.unstable_requestPaint,pt=e.unstable_now,Gn=e.unstable_getCurrentPriorityLevel,Ht=e.unstable_ImmediatePriority,xe=e.unstable_UserBlockingPriority,He=e.unstable_NormalPriority,et=e.unstable_LowPriority,pn=e.unstable_IdlePriority,Gt=e.log,Lr=e.unstable_setDisableYieldValue,Ar=null,jt=null;function Tt(a){if(typeof Gt=="function"&&Lr(a),jt&&typeof jt.setStrictMode=="function")try{jt.setStrictMode(Ar,a)}catch{}}var Kt=Math.clz32?Math.clz32:hn,dr=Math.log,fr=Math.LN2;function hn(a){return a>>>=0,a===0?32:31-(dr(a)/fr|0)|0}var Zt=256,rr=4194304;function gn(a){var i=a&42;if(i!==0)return i;switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function qr(a,i,u){var f=a.pendingLanes;if(f===0)return 0;var x=0,w=a.suspendedLanes,k=a.pingedLanes;a=a.warmLanes;var D=f&134217727;return D!==0?(f=D&~w,f!==0?x=gn(f):(k&=D,k!==0?x=gn(k):u||(u=D&~a,u!==0&&(x=gn(u))))):(D=f&~w,D!==0?x=gn(D):k!==0?x=gn(k):u||(u=f&~a,u!==0&&(x=gn(u)))),x===0?0:i!==0&&i!==x&&(i&w)===0&&(w=x&-x,u=i&-i,w>=u||w===32&&(u&4194048)!==0)?i:x}function Kn(a,i){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&i)===0}function St(a,i){switch(a){case 1:case 2:case 4:case 8:case 64:return i+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Se(){var a=Zt;return Zt<<=1,(Zt&4194048)===0&&(Zt=256),a}function Xe(){var a=rr;return rr<<=1,(rr&62914560)===0&&(rr=4194304),a}function Ie(a){for(var i=[],u=0;31>u;u++)i.push(a);return i}function Fe(a,i){a.pendingLanes|=i,i!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function ht(a,i,u,f,x,w){var k=a.pendingLanes;a.pendingLanes=u,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=u,a.entangledLanes&=u,a.errorRecoveryDisabledLanes&=u,a.shellSuspendCounter=0;var D=a.entanglements,G=a.expirationTimes,ne=a.hiddenUpdates;for(u=k&~u;0<u;){var ue=31-Kt(u),me=1<<ue;D[ue]=0,G[ue]=-1;var ae=ne[ue];if(ae!==null)for(ne[ue]=null,ue=0;ue<ae.length;ue++){var se=ae[ue];se!==null&&(se.lane&=-536870913)}u&=~me}f!==0&&Ot(a,f,0),w!==0&&x===0&&a.tag!==0&&(a.suspendedLanes|=w&~(k&~i))}function Ot(a,i,u){a.pendingLanes|=i,a.suspendedLanes&=~i;var f=31-Kt(i);a.entangledLanes|=i,a.entanglements[f]=a.entanglements[f]|1073741824|u&4194090}function vt(a,i){var u=a.entangledLanes|=i;for(a=a.entanglements;u;){var f=31-Kt(u),x=1<<f;x&i|a[f]&i&&(a[f]|=i),u&=~x}}function Te(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function Ye(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function st(){var a=O.p;return a!==0?a:(a=window.event,a===void 0?32:RA(a.type))}function gt(a,i){var u=O.p;try{return O.p=a,i()}finally{O.p=u}}var lt=Math.random().toString(36).slice(2),Ke="__reactFiber$"+lt,ct="__reactProps$"+lt,Yt="__reactContainer$"+lt,Ur="__reactEvents$"+lt,Nn="__reactListeners$"+lt,Za="__reactHandles$"+lt,uo="__reactResources$"+lt,zr="__reactMarker$"+lt;function Ja(a){delete a[Ke],delete a[ct],delete a[Ur],delete a[Nn],delete a[Za]}function Ca(a){var i=a[Ke];if(i)return i;for(var u=a.parentNode;u;){if(i=u[Yt]||u[Ke]){if(u=i.alternate,i.child!==null||u!==null&&u.child!==null)for(a=hA(a);a!==null;){if(u=a[Ke])return u;a=hA(a)}return i}a=u,u=a.parentNode}return null}function Na(a){if(a=a[Ke]||a[Yt]){var i=a.tag;if(i===5||i===6||i===13||i===26||i===27||i===3)return a}return null}function An(a){var i=a.tag;if(i===5||i===26||i===27||i===6)return a.stateNode;throw Error(r(33))}function Yn(a){var i=a[uo];return i||(i=a[uo]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function Wt(a){a[zr]=!0}var W=new Set,Ne={};function it(a,i){Wn(a,i),Wn(a+"Capture",i)}function Wn(a,i){for(Ne[a]=i,a=0;a<i.length;a++)W.add(i[a])}var dt=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Ns={},As={};function Aa(a){return Me.call(As,a)?!0:Me.call(Ns,a)?!1:dt.test(a)?As[a]=!0:(Ns[a]=!0,!1)}function En(a,i,u){if(Aa(i))if(u===null)a.removeAttribute(i);else{switch(typeof u){case"undefined":case"function":case"symbol":a.removeAttribute(i);return;case"boolean":var f=i.toLowerCase().slice(0,5);if(f!=="data-"&&f!=="aria-"){a.removeAttribute(i);return}}a.setAttribute(i,""+u)}}function Er(a,i,u){if(u===null)a.removeAttribute(i);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(i);return}a.setAttribute(i,""+u)}}function ft(a,i,u,f){if(f===null)a.removeAttribute(u);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(u);return}a.setAttributeNS(i,u,""+f)}}var Qn,tt;function Ea(a){if(Qn===void 0)try{throw Error()}catch(u){var i=u.stack.trim().match(/\n( *(at )?)/);Qn=i&&i[1]||"",tt=-1<u.stack.indexOf(` 3 at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return` 4`+Qn+a+tt}var vl=!1;function ii(a,i){if(!a||vl)return"";vl=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var f={DetermineComponentFrameRoot:function(){try{if(i){var me=function(){throw Error()};if(Object.defineProperty(me.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(me,[])}catch(se){var ae=se}Reflect.construct(a,[],me)}else{try{me.call()}catch(se){ae=se}a.call(me.prototype)}}else{try{throw Error()}catch(se){ae=se}(me=a())&&typeof me.catch=="function"&&me.catch(function(){})}}catch(se){if(se&&ae&&typeof se.stack=="string")return[se.stack,ae.stack]}return[null,null]}};f.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var x=Object.getOwnPropertyDescriptor(f.DetermineComponentFrameRoot,"name");x&&x.configurable&&Object.defineProperty(f.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var w=f.DetermineComponentFrameRoot(),k=w[0],D=w[1];if(k&&D){var G=k.split(` 5`),ne=D.split(` 6`);for(x=f=0;f<G.length&&!G[f].includes("DetermineComponentFrameRoot");)f++;for(;x<ne.length&&!ne[x].includes("DetermineComponentFrameRoot");)x++;if(f===G.length||x===ne.length)for(f=G.length-1,x=ne.length-1;1<=f&&0<=x&&G[f]!==ne[x];)x--;for(;1<=f&&0<=x;f--,x--)if(G[f]!==ne[x]){if(f!==1||x!==1)do if(f--,x--,0>x||G[f]!==ne[x]){var ue=` 7`+G[f].replace(" at new "," at ");return a.displayName&&ue.includes("<anonymous>")&&(ue=ue.replace("<anonymous>",a.displayName)),ue}while(1<=f&&0<=x);break}}}finally{vl=!1,Error.prepareStackTrace=u}return(u=a?a.displayName||a.name:"")?Ea(u):""}function Xc(a){switch(a.tag){case 26:case 27:case 5:return Ea(a.type);case 16:return Ea("Lazy");case 13:return Ea("Suspense");case 19:return Ea("SuspenseList");case 0:case 15:return ii(a.type,!1);case 11:return ii(a.type.render,!1);case 1:return ii(a.type,!0);case 31:return Ea("Activity");default:return""}}function oi(a){try{var i="";do i+=Xc(a),a=a.return;while(a);return i}catch(u){return` 8Error generating stack: `+u.message+` 9`+u.stack}}function Dn(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function Es(a){var i=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function es(a){var i=Es(a)?"checked":"value",u=Object.getOwnPropertyDescriptor(a.constructor.prototype,i),f=""+a[i];if(!a.hasOwnProperty(i)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var x=u.get,w=u.set;return Object.defineProperty(a,i,{configurable:!0,get:function(){return x.call(this)},set:function(k){f=""+k,w.call(this,k)}}),Object.defineProperty(a,i,{enumerable:u.enumerable}),{getValue:function(){return f},setValue:function(k){f=""+k},stopTracking:function(){a._valueTracker=null,delete a[i]}}}}function fo(a){a._valueTracker||(a._valueTracker=es(a))}function Zc(a){if(!a)return!1;var i=a._valueTracker;if(!i)return!0;var u=i.getValue(),f="";return a&&(f=Es(a)?a.checked?"true":"false":a.value),a=f,a!==u?(i.setValue(a),!0):!1}function Ve(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var lg=/[\n"\\]/g;function mr(a){return a.replace(lg,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function Jc(a,i,u,f,x,w,k,D){a.name="",k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?a.type=k:a.removeAttribute("type"),i!=null?k==="number"?(i===0&&a.value===""||a.value!=i)&&(a.value=""+Dn(i)):a.value!==""+Dn(i)&&(a.value=""+Dn(i)):k!=="submit"&&k!=="reset"||a.removeAttribute("value"),i!=null?bl(a,k,Dn(i)):u!=null?bl(a,k,Dn(u)):f!=null&&a.removeAttribute("value"),x==null&&w!=null&&(a.defaultChecked=!!w),x!=null&&(a.checked=x&&typeof x!="function"&&typeof x!="symbol"),D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"?a.name=""+Dn(D):a.removeAttribute("name")}function eu(a,i,u,f,x,w,k,D){if(w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(a.type=w),i!=null||u!=null){if(!(w!=="submit"&&w!=="reset"||i!=null))return;u=u!=null?""+Dn(u):"",i=i!=null?""+Dn(i):u,D||i===a.value||(a.value=i),a.defaultValue=i}f=f??x,f=typeof f!="function"&&typeof f!="symbol"&&!!f,a.checked=D?a.checked:!!f,a.defaultChecked=!!f,k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(a.name=k)}function bl(a,i,u){i==="number"&&Ve(a.ownerDocument)===a||a.defaultValue===""+u||(a.defaultValue=""+u)}function pr(a,i,u,f){if(a=a.options,i){i={};for(var x=0;x<u.length;x++)i["$"+u[x]]=!0;for(u=0;u<a.length;u++)x=i.hasOwnProperty("$"+a[u].value),a[u].selected!==x&&(a[u].selected=x),x&&f&&(a[u].defaultSelected=!0)}else{for(u=""+Dn(u),i=null,x=0;x<a.length;x++){if(a[x].value===u){a[x].selected=!0,f&&(a[x].defaultSelected=!0);return}i!==null||a[x].disabled||(i=a[x])}i!==null&&(i.selected=!0)}}function ja(a,i,u){if(i!=null&&(i=""+Dn(i),i!==a.value&&(a.value=i),u==null)){a.defaultValue!==i&&(a.defaultValue=i);return}a.defaultValue=u!=null?""+Dn(u):""}function ta(a,i,u,f){if(i==null){if(f!=null){if(u!=null)throw Error(r(92));if(Q(f)){if(1<f.length)throw Error(r(93));f=f[0]}u=f}u==null&&(u=""),i=u}u=Dn(i),a.defaultValue=u,f=a.textContent,f===u&&f!==""&&f!==null&&(a.value=f)}function hr(a,i){if(i){var u=a.firstChild;if(u&&u===a.lastChild&&u.nodeType===3){u.nodeValue=i;return}}a.textContent=i}var mo=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function li(a,i,u){var f=i.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?f?a.setProperty(i,""):i==="float"?a.cssFloat="":a[i]="":f?a.setProperty(i,u):typeof u!="number"||u===0||mo.has(i)?i==="float"?a.cssFloat=u:a[i]=(""+u).trim():a[i]=u+"px"}function yf(a,i,u){if(i!=null&&typeof i!="object")throw Error(r(62));if(a=a.style,u!=null){for(var f in u)!u.hasOwnProperty(f)||i!=null&&i.hasOwnProperty(f)||(f.indexOf("--")===0?a.setProperty(f,""):f==="float"?a.cssFloat="":a[f]="");for(var x in i)f=i[x],i.hasOwnProperty(x)&&u[x]!==f&&li(a,x,f)}else for(var w in i)i.hasOwnProperty(w)&&li(a,w,i[w])}function tu(a){if(a.indexOf("-")===-1)return!1;switch(a){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var xf=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRen
9dering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),jn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function We(a){return jn.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}var nu=null;function ar(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var ts=null,ci=null;function vf(a){var i=Na(a);if(i&&(a=i.stateNode)){var u=a[ct]||null;e:switch(a=i.stateNode,i.type){case"input":if(Jc(a,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),i=u.name,u.type==="radio"&&i!=null){for(u=a;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+mr(""+i)+'"][type="radio"]'),i=0;i<u.length;i++){var f=u[i];if(f!==a&&f.form===a.form){var x=f[ct]||null;if(!x)throw Error(r(90));Jc(f,x.value,x.defaultValue,x.defaultValue,x.checked,x.defaultChecked,x.type,x.name)}}for(i=0;i<u.length;i++)f=u[i],f.form===a.form&&Zc(f)}break e;case"textarea":ja(a,u.value,u.defaultValue);break e;case"select":i=u.value,i!=null&&pr(a,!!u.multiple,i,!1)}}}var wl=!1;function po(a,i,u){if(wl)return a(i,u);wl=!0;try{var f=a(i);return f}finally{if(wl=!1,(ts!==null||ci!==null)&&(om(),ts&&(i=ts,a=ci,ci=ts=null,vf(i),a)))for(i=0;i<a.length;i++)vf(a[i])}}function ns(a,i){var u=a.stateNode;if(u===null)return null;var f=u[ct]||null;if(f===null)return null;u=f[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(a=a.type,f=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!f;break e;default:a=!1}if(a)return null;if(u&&typeof u!="function")throw Error(r(231,i,typeof u));return u}var Vr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ru=!1;if(Vr)try{var rs={};Object.defineProperty(rs,"passive",{get:function(){ru=!0}}),window.addEventListener("test",rs,rs),window.removeEventListener("test",rs,rs)}catch{ru=!1}var sn=null,as=null,ui=null;function bf(){if(ui)return ui;var a,i=as,u=i.length,f,x="value"in sn?sn.value:sn.textContent,w=x.length;for(a=0;a<u&&i[a]===x[a];a++);var k=u-a;for(f=1;f<=k&&i[u-f]===x[w-f];f++);return ui=x.slice(a,1<f?1-f:void 0)}function js(a){var i=a.keyCode;
vendor: 2,821 bytes, line 9
9return"charCode"in a?(a=a.charCode,a===0&&i===13&&(a=13)):a=i,a===10&&(a=13),32<=a||a===13?a:0}function di(){return!0}function Ta(){return!1}function Tn(a){function i(u,f,x,w,k){this._reactName=u,this._targetInst=x,this.type=f,this.nativeEvent=w,this.target=k,this.currentTarget=null;for(var D in a)a.hasOwnProperty(D)&&(u=a[D],this[D]=u?u(w):w[D]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?di:Ta,this.isPropagationStopped=Ta,this}return y(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=di)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=di)},persist:function(){},isPersistent:di}),i}var na={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ho=Tn(na),go=y({},na,{view:0,detail:0}),cg=Tn(go),ka,Sl,fi,ss=y({},go,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:su,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==fi&&(fi&&a.type==="mousemove"?(ka=a.screenX-fi.screenX,Sl=a.screenY-fi.screenY):Sl=ka=0,fi=a),ka)},movementY:function(a){return"movementY"in a?a.movementY:Sl}}),Cl=Tn(ss),yo=y({},ss,{dataTransfer:0}),xo=Tn(yo),ug=y({},go,{relatedTarget:0}),is=Tn(ug),Ra=y({},na,{animationName:0,elapsedTime:0,pseudoElement:0}),mi=Tn(Ra),wf=y({},na,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),dg=Tn(wf),Sf=y({},na,{data:0}),Cf=Tn(Sf),fg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Nf={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Af={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function au(a){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(a):(a=Af[a])?!!i[a]:!1}function su(){return au}var mg=y({},go,{key:function(a){if(a.key){var i=fg[a.key]||a.key;if(i!=="Unidentified")return i}
vendor: 5,185 bytes, line 9
9return a.type==="keypress"?(a=js(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?Nf[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:su,charCode:function(a){return a.type==="keypress"?js(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?js(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),Ef=Tn(mg),pg=y({},ss,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),jf=Tn(pg),hg=y({},go,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:su}),z=Tn(hg),ye=y({},na,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ae=Tn(ye),Be=y({},ss,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),_t=Tn(Be),on=y({},na,{newState:0,oldState:0}),ln=Tn(on),Ts=[9,13,27,32],iu=Vr&&"CompositionEvent"in window,ks=null;Vr&&"documentMode"in document&&(ks=document.documentMode);var bt=Vr&&"TextEvent"in window&&!ks,Br=Vr&&(!iu||ks&&8<ks&&11>=ks),Ln=" ",vo=!1;function S1(a,i){switch(a){case"keyup":return Ts.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function C1(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Nl=!1;function F5(a,i){switch(a){case"compositionend":return C1(i);case"keypress":return i.which!==32?null:(vo=!0,Ln);case"textInput":return a=i.data,a===Ln&&vo?null:a;default:return null}}function $5(a,i){if(Nl)return a==="compositionend"||!iu&&S1(a,i)?(a=bf(),ui=as=sn=null,Nl=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return Br&&i.locale!=="ko"?null:i.data;default:return null}}var H5={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function N1(a){var i=a&&a.nodeName&&a.nodeName.toLowerCase();return i==="input"?!!H5[a.type]:i==="textarea"}function A1(a,i,u,f){ts?ci?ci.push(f):ci=[f]:ts=f,i=mm(i,"onChange"),0<i.length&&(u=new ho("onChange","change",null,u,f),a.push({event:u,listeners:i}))}var ou=null,lu=null;function G5(a){sA(a,0)}function Tf(a){var i=An(a);if(Zc(i))return a}function E1(a,i){if(a==="change")return i}var j1=!1;if(Vr){var gg;if(Vr){var yg="oninput"in document;if(!yg){var T1=document.createElement("div");T1.setAttribute("oninput","return;"),yg=typeof T1.oninput=="function"}gg=yg}else gg=!1;j1=gg&&(!document.documentMode||9<document.documentMode)}function k1(){ou&&(ou.detachEvent("onpropertychange",R1),lu=ou=null)}function R1(a){if(a.propertyName==="value"&&Tf(lu)){var i=[];A1(i,lu,a,ar(a)),po(G5,i)}}function K5(a,i,u){a==="focusin"?(k1(),ou=i,lu=u,ou.attachEvent("onpropertychange",R1)):a==="focusout"&&k1()}function Y5(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Tf(lu)}function W5(a,i){if(a==="click")return Tf(i)}function Q5(a,i){if(a==="input"||a==="change")return Tf(i)}function X5(a,i){return a===i&&(a!==0||1/a===1/i)||a!==a&&i!==i}var Fr=typeof Object.is=="function"?Object.is:X5;function cu(a,i){if(Fr(a,i))return!0;if(typeof a!="object"||a===null||typeof i!="object"||i===null)return!1;var u=Object.keys(a),f=Object.keys(i);if(u.length!==f.length)return!1;for(f=0;f<u.length;f++){var x=u[f];if(!Me.call(i,x)||!Fr(a[x],i[x]))return!1}return!0}function P1(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function O1(a,i){var u=P1(a);a=0;for(var f;u;){if(u.nodeType===3){if(f=a+u.textContent.length,a<=i&&f>=i)return{node:u,offset:i-a};a=f}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=P1(u)}}function _1(a,i){return a&&i?a===i?!0:a&&a.nodeType===3?!1:i&&i.nodeType===3?_1(a,i.parentNode):"contains"in a?a.contains(i):a.compareDocumentPosition?!!(a.compareDocumentPosition(i)&16):!1:!1}function I1(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var i=Ve(a.document);i instanceof a.HTMLIFrameElement;){try{var u=typeof i.contentWindow.location.href=="string"}catch{u=!1}if(u)a=i.contentWindow;else break;i=Ve(a.document)}return i}function xg(a){var i=a&&a.nodeName&&a.nodeName.toLowerCase();return i&&(i==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||i==="textarea"||a.contentEditable==="true")}var Z5=Vr&&"documentMode"in document&&11>=document.documentMode,Al=null,vg=null,uu=null,bg=!1;function M1(a,i,u){var f=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;bg||Al==null||Al!==Ve(f)||(f=Al,"selectionStart"in f&&xg(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focu
vendor: 108,578 bytes, lines 9-10
9sNode:f.focusNode,focusOffset:f.focusOffset}),uu&&cu(uu,f)||(uu=f,f=mm(vg,"onSelect"),0<f.length&&(i=new ho("onSelect","select",null,i,u),a.push({event:i,listeners:f}),i.target=Al)))}function bo(a,i){var u={};return u[a.toLowerCase()]=i.toLowerCase(),u["Webkit"+a]="webkit"+i,u["Moz"+a]="moz"+i,u}var El={animationend:bo("Animation","AnimationEnd"),animationiteration:bo("Animation","AnimationIteration"),animationstart:bo("Animation","AnimationStart"),transitionrun:bo("Transition","TransitionRun"),transitionstart:bo("Transition","TransitionStart"),transitioncancel:bo("Transition","TransitionCancel"),transitionend:bo("Transition","TransitionEnd")},wg={},D1={};Vr&&(D1=document.createElement("div").style,"AnimationEvent"in window||(delete El.animationend.animation,delete El.animationiteration.animation,delete El.animationstart.animation),"TransitionEvent"in window||delete El.transitionend.transition);function wo(a){if(wg[a])return wg[a];if(!El[a])return a;var i=El[a],u;for(u in i)if(i.hasOwnProperty(u)&&u in D1)return wg[a]=i[u];return a}var L1=wo("animationend"),q1=wo("animationiteration"),U1=wo("animationstart"),J5=wo("transitionrun"),e4=wo("transitionstart"),t4=wo("transitioncancel"),z1=wo("transitionend"),V1=new Map,Sg="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Sg.push("scrollEnd");function Pa(a,i){V1.set(a,i),it(i,[a])}var B1=new WeakMap;function ra(a,i){if(typeof a=="object"&&a!==null){var u=B1.get(a);return u!==void 0?u:(i={value:a,source:i,stack:oi(i)},B1.set(a,i),i)}return{value:a,source:i,stack:oi(i)}}var aa=[],jl=0,Cg=0;function kf(){for(var a=jl,i=Cg=jl=0;i<a;){var u=aa[i];aa[i++]=null;var f=aa[i];aa[i++]=null;var x=aa[i];aa[i++]=null;var w=aa[i];if(aa[i++]=null,f!==null&&x!==null){var k=f.pending;k===null?x.next=x:(x.next=k.next,k.next=x),f.pending=x}w!==0&&F1(u,x,w)}}function Rf(a,i,u,f){aa[jl++]=a,aa[jl++]=i,aa[jl++]=u,aa[jl++]=f,Cg|=f,a.lanes|=f,a=a.alternate,a!==null&&(a.lanes|=f)}function Ng(a,i,u,f){return Rf(a,i,u,f),Pf(a)}function Tl(a,i){return Rf(a,null,null,i),Pf(a)}function F1(a,i,u){a.lanes|=u;var f=a.alternate;f!==null&&(f.lanes|=u);for(var x=!1,w=a.return;w!==null;)w.childLanes|=u,f=w.alternate,f!==null&&(f.childLanes|=u),w.tag===22&&(a=w.stateNode,a===null||a._visibility&1||(x=!0)),a=w,w=w.return;return a.tag===3?(w=a.stateNode,x&&i!==null&&(x=31-Kt(u),a=w.hiddenUpdates,f=a[x],f===null?a[x]=[i]:f.push(i),i.lane=u|536870912),w):null}function Pf(a){if(50<Mu)throw Mu=0,Ry=null,Error(r(185));for(var i=a.return;i!==null;)a=i,i=a.return;return a.tag===3?a.stateNode:null}var kl={};function n4(a,i,u,f){this.tag=a,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $r(a,i,u,f){return new n4(a,i,u,f)}function Ag(a){return a=a.prototype,!(!a||!a.isReactComponent)}function Rs(a,i){var u=a.alternate;return u===null?(u=$r(a.tag,i,a.key,a.mode),u.elementType=a.elementType,u.type=a.type,u.stateNode=a.stateNode,u.alternate=a,a.alternate=u):(u.pendingProps=i,u.type=a.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=a.flags&65011712,u.childLanes=a.childLanes,u.lanes=a.lanes,u.child=a.child,u.memoizedProps=a.memoizedProps,u.memoizedState=a.memoizedState,u.updateQueue=a.updateQueue,i=a.dependencies,u.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},u.sibling=a.sibling,u.index=a.index,u.ref=a.ref,u.refCleanup=a.refCleanup,u}function $1(a,i){a.flags&=65011714;var u=a.alternate;return u===null?(a.childLanes=0,a.lanes=i,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=u.childLanes,a.lanes=u.lanes,a.child=u.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=u.memoizedProps,a.memoizedState=u.memoizedState,a.updateQueue=u.updateQueue,a.type=u.type,i=u.dependencies,a.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),a}function Of(a,i,u,f,x,w){var k=0;if(f=a,typeof a=="function")Ag(a)&&(k=1);else if(typeof a=="string")k=aq(a,u,re.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case q:return a=$r(31,u,i,x),a.elementType=q,a.lanes=w,a;case S:return So(u.children,x,w,i);case C:k=8,x|=24;break;case N:return a=$r(12,u,i,x|2),a.elementType=N,a.lanes=w,a;case _:return a=$r(13,u,i,x),a.elementType=_,a.lanes=w,a;case R:return a=$r(19,u,i,x),a.elementType=R,a.lanes=w,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case A:case E:k=10;break e;case T:k=9;break e;case j:k=11;break e;case P:k=14;break e;case M:k=16,f=null;break e}k=29,u=Error(r(130,a===null?"null":typeof a,"")),f=null}return i=$r(k,u,i,x),i.elementType=a,i.type=f,i.lanes=w,i}function So(a,i,u,f){return a=$r(7,a,f,i),a.lanes=u,a}function Eg(a,i,u){return a=$r(6,a,null,i),a.lanes=u,a}function jg(a,i,u){return i=$r(4,a.children!==null?a.children:[],a.key,i),i.lanes=u,i.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},i}var Rl=[],Pl=0,_f=null,If=0,sa=[],ia=0,Co=null,Ps=1,Os="";function No(a,i){Rl[Pl++]=If,Rl[Pl++]=_f,_f=a,If=i}function H1(a,i,u){sa[ia++]=Ps,sa[ia++]=Os,sa[ia++]=Co,Co=a;var f=Ps;a=Os;var x=32-Kt(f)-1;f&=~(1<<x),u+=1;var w=32-Kt(i)+x;if(30<w){var k=x-x%5;w=(f&(1<<k)-1).toString(32),f>>=k,x-=k,Ps=1<<32-Kt(i)+x|u<<x|f,Os=w+a}else Ps=1<<w|u<<x|f,Os=a}function Tg(a){a.return!==null&&(No(a,1),H1(a,1,0))}function kg(a){for(;a===_f;)_f=Rl[--Pl],Rl[Pl]=null,If=Rl[--Pl],Rl[Pl]=null;for(;a===Co;)Co=sa[--ia],sa[ia]=null,Os=sa[--ia],sa[ia]=null,Ps=sa[--ia],sa[ia]=null}var gr=null,Jt=null,wt=!1,Ao=null,os=!1,Rg=Error(r(519));function Eo(a){var i=Error(r(418,""));throw mu(ra(i,a)),Rg}function G1(a){var i=a.stateNode,u=a.type,f=a.memoizedProps;switch(i[Ke]=a,i[ct]=f,u){case"dialog":at("cancel",i),at("close",i);break;case"iframe":case"object":case"embed":at("load",i);break;case"video":case"audio":for(u=0;u<Lu.length;u++)at(Lu[u],i);break;case"source":at("error",i);break;case"img":case"image":case"link":at("error",i),at("load",i);break;case"details":at("toggle",i);break;case"input":at("invalid",i),eu(i,f.value,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name,!0),fo(i);break;case"select":at("invalid",i);break;case"textarea":at("invalid",i),ta(i,f.value,f.defaultValue,f.children),fo(i)}u=f.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||i.textContent===""+u||f.suppressHydrationWarning===!0||cA(i.textContent,u)?(f.popover!=null&&(at("beforetoggle",i),at("toggle",i)),f.onScroll!=null&&at("scroll",i),f.onScrollEnd!=null&&at("scrollend",i),f.onClick!=null&&(i.onclick=pm),i=!0):i=!1,i||Eo(a)}function K1(a){for(gr=a.return;gr;)switch(gr.tag){case 5:case 13:os=!1;return;case 27:case 3:os=!0;return;default:gr=gr.return}}function du(a){if(a!==gr)return!1;if(!wt)return K1(a),wt=!0,!1;var i=a.tag,u;if((u=i!==3&&i!==27)&&((u=i===5)&&(u=a.type,u=!(u!=="form"&&u!=="button")||Gy(a.type,a.memoizedProps)),u=!u),u&&Jt&&Eo(a),K1(a),i===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));e:{for(a=a.nextSibling,i=0;a;){if(a.nodeType===8)if(u=a.data,u==="/$"){if(i===0){Jt=_a(a.nextSibling);break e}i--}else u!=="$"&&u!=="$!"&&u!=="$?"||i++;a=a.nextSibling}Jt=null}}else i===27?(i=Jt,ki(a.type)?(a=Qy,Qy=null,Jt=a):Jt=i):Jt=gr?_a(a.stateNode.nextSibling):null;return!0}function fu(){Jt=gr=null,wt=!1}function Y1(){var a=Ao;return a!==null&&(kr===null?kr=a:kr.push.apply(kr,a),Ao=null),a}function mu(a){Ao===null?Ao=[a]:Ao.push(a)}var Pg=le(null),jo=null,_s=null;function pi(a,i,u){ie(Pg,i._currentValue),i._currentValue=u}function Is(a){a._currentValue=Pg.current,Z(Pg)}function Og(a,i,u){for(;a!==null;){var f=a.alternate;if((a.childLanes&i)!==i?(a.childLanes|=i,f!==null&&(f.childLanes|=i)):f!==null&&(f.childLanes&i)!==i&&(f.childLanes|=i),a===u)break;a=a.return}}function _g(a,i,u,f){var x=a.child;for(x!==null&&(x.return=a);x!==null;){var w=x.dependencies;if(w!==null){var k=x.child;w=w.firstContext;e:for(;w!==null;){var D=w;w=x;for(var G=0;G<i.length;G++)if(D.context===i[G]){w.lanes|=u,D=w.alternate,D!==null&&(D.lanes|=u),Og(w.return,u,a),f||(k=null);break e}w=D.next}}else if(x.tag===18){if(k=x.return,k===null)throw Error(r(341));k.lanes|=u,w=k.alternate,w!==null&&(w.lanes|=u),Og(k,u,a),k=null}else k=x.child;if(k!==null)k.return=x;else for(k=x;k!==null;){if(k===a){k=null;break}if(x=k.sibling,x!==null){x.return=k.return,k=x;break}k=k.return}x=k}}function pu(a,i,u,f){a=null;for(var x=i,w=!1;x!==null;){if(!w){if((x.flags&524288)!==0)w=!0;else if((x.flags&262144)!==0)break}if(x.tag===10){var k=x.alternate;if(k===null)throw Error(r(387));if(k=k.memoizedProps,k!==null){var D=x.type;Fr(x.pendingProps.value,k.value)||(a!==null?a.push(D):a=[D])}}else if(x===pe.current){if(k=x.alternate,k===null)throw Error(r(387));k.memoizedState.memoizedState!==x.memoizedState.memoizedState&&(a!==null?a.push(Fu):a=[Fu])}x=x.return}a!==null&&_g(i,a,u,f),i.flags|=262144}function Mf(a){for(a=a.firstContext;a!==null;){if(!Fr(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function To(a){jo=a,_s=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function sr(a){return W1(jo,a)}function Df(a,i){return jo===null&&To(a),W1(a,i)}function W1(a,i){var u=i._currentValue;if(i={context:i,memoizedValue:u,next:null},_s===null){if(a===null)throw Error(r(308));_s=i,a.dependencies={lanes:0,firstContext:i},a.flags|=524288}else _s=_s.next=i;return u}var r4=typeof AbortController<"u"?AbortController:function(){var a=[],i=this.signal={aborted:!1,addEventListener:function(u,f){a.push(f)}};this.abort=function(){i.aborted=!0,a.forEach(function(u){return u()})}},a4=e.unstable_scheduleCallback,s4=e.unstable_NormalPriority,kn={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ig(){return{controller:new r4,data:new Map,refCount:0}}function hu(a){a.refCount--,a.refCount===0&&a4(s4,function(){a.controller.abort()})}var gu=null,Mg=0,Ol=0,_l=null;function i4(a,i){if(gu===null){var u=gu=[];Mg=0,Ol=Ly(),_l={status:"pending",value:void 0,then:function(f){u.push(f)}}}return Mg++,i.then(Q1,Q1),i}function Q1(){if(--Mg===0&&gu!==null){_l!==null&&(_l.status="fulfilled");var a=gu;gu=null,Ol=0,_l=null;for(var i=0;i<a.length;i++)(0,a[i])()}}function o4(a,i){var u=[],f={status:"pending",value:null,reason:null,then:function(x){u.push(x)}};return a.then(function(){f.status="fulfilled",f.value=i;for(var x=0;x<u.length;x++)(0,u[x])(i)},function(x){for(f.status="rejected",f.reason=x,x=0;x<u.length;x++)(0,u[x])(void 0)}),f}var X1=I.S;I.S=function(a,i){typeof i=="object"&&i!==null&&typeof i.then=="function"&&i4(a,i),X1!==null&&X1(a,i)};var ko=le(null);function Dg(){var a=ko.current;return a!==null?a:Dt.pooledCache}function Lf(a,i){i===null?ie(ko,ko.current):ie(ko,i.pool)}function Z1(){var a=Dg();return a===null?null:{parent:kn._currentValue,pool:a}}var yu=Error(r(460)),J1=Error(r(474)),qf=Error(r(542)),Lg={then:function(){}};function eC(a){return a=a.status,a==="fulfilled"||a==="rejected"}function Uf(){}function tC(a,i,u){switch(u=a[u],u===void 0?a.push(i):u!==i&&(i.then(Uf,Uf),i=u),i.status){case"fulfilled":return i.value;case"rejected":throw a=i.reason,rC(a),a;default:if(typeof i.status=="string")i.then(Uf,Uf);else{if(a=Dt,a!==null&&100<a.shellSuspendCounter)throw Error(r(482));a=i,a.status="pending",a.then(function(f){if(i.status==="pending"){var x=i;x.status="fulfilled",x.value=f}},function(f){if(i.status==="pending"){var x=i;x.status="rejected",x.reason=f}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw a=i.reason,rC(a),a}throw xu=i,yu}}var xu=null;function nC(){if(xu===null)throw Error(r(459));var a=xu;return xu=null,a}function rC(a){if(a===yu||a===qf)throw Error(r(483))}var hi=!1;function qg(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ug(a,i){a=a.updateQueue,i.updateQueue===a&&(i.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function gi(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function yi(a,i,u){var f=a.updateQueue;if(f===null)return null;if(f=f.shared,(Nt&2)!==0){var x=f.pending;return x===null?i.next=i:(i.next=x.next,x.next=i),f.pending=i,i=Pf(a),F1(a,null,u),i}return Rf(a,f,i,u),Pf(a)}function vu(a,i,u){if(i=i.updateQueue,i!==null&&(i=i.shared,(u&4194048)!==0)){var f=i.lanes;f&=a.pendingLanes,u|=f,i.lanes=u,vt(a,u)}}function zg(a,i){var u=a.updateQueue,f=a.alternate;if(f!==null&&(f=f.updateQueue,u===f)){var x=null,w=null;if(u=u.firstBaseUpdate,u!==null){do{var k={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};w===null?x=w=k:w=w.next=k,u=u.next}while(u!==null);w===null?x=w=i:w=w.next=i}else x=w=i;u={baseState:f.baseState,firstBaseUpdate:x,lastBaseUpdate:w,shared:f.shared,callbacks:f.callbacks},a.updateQueue=u;return}a=u.lastBaseUpdate,a===null?u.firstBaseUpdate=i:a.next=i,u.lastBaseUpdate=i}var Vg=!1;function bu(){if(Vg){var a=_l;if(a!==null)throw a}}function wu(a,i,u,f){Vg=!1;var x=a.updateQueue;hi=!1;var w=x.firstBaseUpdate,k=x.lastBaseUpdate,D=x.shared.pending;if(D!==null){x.shared.pending=null;var G=D,ne=G.next;G.next=null,k===null?w=ne:k.next=ne,k=G;var ue=a.alternate;ue!==null&&(ue=ue.updateQueue,D=ue.lastBaseUpdate,D!==k&&(D===null?ue.firstBaseUpdate=ne:D.next=ne,ue.lastBaseUpdate=G))}if(w!==null){var me=x.baseState;k=0,ue=ne=G=null,D=w;do{var ae=D.lane&-536870913,se=ae!==D.lane;if(se?(ut&ae)===ae:(f&ae)===ae){ae!==0&&ae===Ol&&(Vg=!0),ue!==null&&(ue=ue.next={lane:0,tag:D.tag,payload:D.payload,callback:null,next:null});e:{var $e=a,De=D;ae=i;var Pt=u;switch(De.tag){case 1:if($e=De.payload,typeof $e=="function"){me=$e.call(Pt,me,ae);break e}me=$e;break e;case 3:$e.flags=$e.flags&-65537|128;case 0:if($e=De.payload,ae=typeof $e=="function"?$e.call(Pt,me,ae):$e,ae==null)break e;me=y({},me,ae);break e;case 2:hi=!0}}ae=D.callback,ae!==null&&(a.flags|=64,se&&(a.flags|=8192),se=x.callbacks,se===null?x.callbacks=[ae]:se.push(ae))}else se={lane:ae,tag:D.tag,payload:D.payload,callback:D.callback,next:null},ue===null?(ne=ue=se,G=me):ue=ue.next=se,k|=ae;if(D=D.next,D===null){if(D=x.shared.pending,D===null)break;se=D,D=se.next,se.next=null,x.lastBaseUpdate=se,x.shared.pending=null}}while(!0);ue===null&&(G=me),x.baseState=G,x.firstBaseUpdate=ne,x.lastBaseUpdate=ue,w===null&&(x.shared.lanes=0),Ai|=k,a.lanes=k,a.memoizedState=me}}function aC(a,i){if(typeof a!="function")throw Error(r(191,a));a.call(i)}function sC(a,i){var u=a.callbacks;if(u!==null)for(a.callbacks=null,a=0;a<u.length;a++)aC(u[a],i)}var Il=le(null),zf=le(0);function iC(a,i){a=Vs,ie(zf,a),ie(Il,i),Vs=a|i.baseLanes}function Bg(){ie(zf,Vs),ie(Il,Il.current)}function Fg(){Vs=zf.current,Z(Il),Z(zf)}var xi=0,Ze=null,kt=null,yn=null,Vf=!1,Ml=!1,Ro=!1,Bf=0,Su=0,Dl=null,l4=0;function cn(){throw Error(r(321))}function $g(a,i){if(i===null)return!1;for(var u=0;u<i.length&&u<a.length;u++)if(!Fr(a[u],i[u]))return!1;return!0}function Hg(a,i,u,f,x,w){return xi=w,Ze=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,I.H=a===null||a.memoizedState===null?FC:$C,Ro=!1,w=u(f,x),Ro=!1,Ml&&(w=lC(i,u,f,x)),oC(a),w}function oC(a){I.H=Yf;var i=kt!==null&&kt.next!==null;if(xi=0,yn=kt=Ze=null,Vf=!1,Su=0,Dl=null,i)throw Error(r(300));a===null||qn||(a=a.dependencies,a!==null&&Mf(a)&&(qn=!0))}function lC(a,i,u,f){Ze=a;var x=0;do{if(Ml&&(Dl=null),Su=0,Ml=!1,25<=x)throw Error(r(301));if(x+=1,yn=kt=null,a.updateQueue!=null){var w=a.updateQueue;w.lastEffect=null,w.events=null,w.stores=null,w.memoCache!=null&&(w.memoCache.index=0)}I.H=h4,w=i(u,f)}while(Ml);return w}function c4(){var a=I.H,i=a.useState()[0];return i=typeof i.then=="function"?Cu(i):i,a=a.useState()[0],(kt!==null?kt.memoizedState:null)!==a&&(Ze.flags|=1024),i}function Gg(){var a=Bf!==0;return Bf=0,a}function Kg(a,i,u){i.updateQueue=a.updateQueue,i.flags&=-2053,a.lanes&=~u}function Yg(a){if(Vf){for(a=a.memoizedState;a!==null;){var i=a.queue;i!==null&&(i.pending=null),a=a.next}Vf=!1}xi=0,yn=kt=Ze=null,Ml=!1,Su=Bf=0,Dl=null}function jr(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return yn===null?Ze.memoizedState=yn=a:yn=yn.next=a,yn}function xn(){if(kt===null){var a=Ze.alternate;a=a!==null?a.memoizedState:null}else a=kt.next;var i=yn===null?Ze.memoizedState:yn.next;if(i!==null)yn=i,kt=a;else{if(a===null)throw Ze.alternate===null?Error(r(467)):Error(r(310));kt=a,a={memoizedState:kt.memoizedState,baseState:kt.baseState,baseQueue:kt.baseQueue,queue:kt.queue,next:null},yn===null?Ze.memoizedState=yn=a:yn=yn.next=a}return yn}function Wg(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Cu(a){var i=Su;return Su+=1,Dl===null&&(Dl=[]),a=tC(Dl,a,i),i=Ze,(yn===null?i.memoizedState:yn.next)===null&&(i=i.alternate,I.H=i===null||i.memoizedState===null?FC:$C),a}function Ff(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return Cu(a);if(a.$$typeof===E)return sr(a)}throw Error(r(438,String(a)))}function Qg(a){var i=null,u=Ze.updateQueue;if(u!==null&&(i=u.memoCache),i==null){var f=Ze.alternate;f!==null&&(f=f.updateQueue,f!==null&&(f=f.memoCache,f!=null&&(i={data:f.data.map(function(x){return x.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),u===null&&(u=Wg(),Ze.updateQueue=u),u.memoCache=i,u=i.data[i.index],u===void 0)for(u=i.data[i.index]=Array(a),f=0;f<a;f++)u[f]=U;return i.index++,u}function Ms(a,i){return typeof i=="function"?i(a):i}function $f(a){var i=xn();return Xg(i,kt,a)}function Xg(a,i,u){var f=a.queue;if(f===null)throw Error(r(311));f.lastRenderedReducer=u;var x=a.baseQueue,w=f.pending;if(w!==null){if(x!==null){var k=x.next;x.next=w.next,w.next=k}i.baseQueue=x=w,f.pending=null}if(w=a.baseState,x===null)a.memoizedState=w;else{i=x.next;var D=k=null,G=null,ne=i,ue=!1;do{var me=ne.lane&-536870913;if(me!==ne.lane?(ut&me)===me:(xi&me)===me){var ae=ne.revertLane;if(ae===0)G!==null&&(G=G.next={lane:0,revertLane:0,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null}),me===Ol&&(ue=!0);else if((xi&ae)===ae){ne=ne.next,ae===Ol&&(ue=!0);continue}else me={lane:0,revertLane:ne.revertLane,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null},G===null?(D=G=me,k=w):G=G.next=me,Ze.lanes|=ae,Ai|=ae;me=ne.action,Ro&&u(w,me),w=ne.hasEagerState?ne.eagerState:u(w,me)}else ae={lane:me,revertLane:ne.revertLane,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null},G===null?(D=G=ae,k=w):G=G.next=ae,Ze.lanes|=me,Ai|=me;ne=ne.next}while(ne!==null&&ne!==i);if(G===null?k=w:G.next=D,!Fr(w,a.memoizedState)&&(qn=!0,ue&&(u=_l,u!==null)))throw u;a.memoizedState=w,a.baseState=k,a.baseQueue=G,f.lastRenderedState=w}return x===null&&(f.lanes=0),[a.memoizedState,f.dispatch]}function Zg(a){var i=xn(),u=i.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=a;var f=u.dispatch,x=u.pending,w=i.memoizedState;if(x!==null){u.pending=null;var k=x=x.next;do w=a(w,k.action),k=k.next;while(k!==x);Fr(w,i.memoizedState)||(qn=!0),i.memoizedState=w,i.baseQueue===null&&(i.baseState=w),u.lastRenderedState=w}return[w,f]}function cC(a,i,u){var f=Ze,x=xn(),w=wt;if(w){if(u===void 0)throw Error(r(407));u=u()}else u=i();var k=!Fr((kt||x).memoizedState,u);k&&(x.memoizedState=u,qn=!0),x=x.queue;var D=fC.bind(null,f,x,a);if(Nu(2048,8,D,[a]),x.getSnapshot!==i||k||yn!==null&&yn.memoizedState.tag&1){if(f.flags|=2048,Ll(9,Hf(),dC.bind(null,f,x,u,i),null),Dt===null)throw Error(r(349));w||(xi&124)!==0||uC(f,i,u)}return u}function uC(a,i,u){a.flags|=16384,a={getSnapshot:i,value:u},i=Ze.updateQueue,i===null?(i=Wg(),Ze.updateQueue=i,i.stores=[a]):(u=i.stores,u===null?i.stores=[a]:u.push(a))}function dC(a,i,u,f){i.value=u,i.getSnapshot=f,mC(i)&&pC(a)}function fC(a,i,u){return u(function(){mC(i)&&pC(a)})}function mC(a){var i=a.getSnapshot;a=a.value;try{var u=i();return!Fr(a,u)}catch{return!0}}function pC(a){var i=Tl(a,2);i!==null&&Wr(i,a,2)}function Jg(a){var i=jr();if(typeof a=="function"){var u=a;if(a=u(),Ro){Tt(!0);try{u()}finally{Tt(!1)}}}return i.memoizedState=i.baseState=a,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ms,lastRenderedState:a},i}function hC(a,i,u,f){return a.baseState=u,Xg(a,kt,typeof f=="function"?f:Ms)}function u4(a,i,u,f,x){if(Kf(a))throw Error(r(485));if(a=i.action,a!==null){var w={payload:x,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(k){w.listeners.push(k)}};I.T!==null?u(!0):w.isTransition=!1,f(w),u=i.pending,u===null?(w.next=i.pending=w,gC(i,w)):(w.next=u.next,i.pending=u.next=w)}}function gC(a,i){var u=i.action,f=i.payload,x=a.state;if(i.isTransition){var w=I.T,k={};I.T=k;try{var D=u(x,f),G=I.S;G!==null&&G(k,D),yC(a,i,D)}catch(ne){ey(a,i,ne)}finally{I.T=w}}else try{w=u(x,f),yC(a,i,w)}catch(ne){ey(a,i,ne)}}function yC(a,i,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(f){xC(a,i,f)},function(f){return ey(a,i,f)}):xC(a,i,u)}function xC(a,i,u){i.status="fulfilled",i.value=u,vC(i),a.state=u,i=a.pending,i!==null&&(u=i.next,u===i?a.pending=null:(u=u.next,i.next=u,gC(a,u)))}function ey(a,i,u){var f=a.pending;if(a.pending=null,f!==null){f=f.next;do i.status="rejected",i.reason=u,vC(i),i=i.next;while(i!==f)}a.action=null}function vC(a){a=a.listeners;for(var i=0;i<a.length;i++)(0,a[i])()}function bC(a,i){return i}function wC(a,i){if(wt){var u=Dt.formState;if(u!==null){e:{var f=Ze;if(wt){if(Jt){t:{for(var x=Jt,w=os;x.nodeType!==8;){if(!w){x=null;break t}if(x=_a(x.nextSibling),x===null){x=null;break t}}w=x.data,x=w==="F!"||w==="F"?x:null}if(x){Jt=_a(x.nextSibling),f=x.data==="F!";break e}}Eo(f)}f=!1}f&&(i=u[0])}}return u=jr(),u.memoizedState=u.baseState=i,f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bC,lastRenderedState:i},u.queue=f,u=zC.bind(null,Ze,f),f.dispatch=u,f=Jg(!1),w=sy.bind(null,Ze,!1,f.queue),f=jr(),x={state:i,dispatch:null,action:a,pending:null},f.queue=x,u=u4.bind(null,Ze,x,w,u),x.dispatch=u,f.memoizedState=a,[i,u,!1]}function SC(a){var i=xn();return CC(i,kt,a)}function CC(a,i,u){if(i=Xg(a,i,bC)[0],a=$f(Ms)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var f=Cu(i)}catch(k){throw k===yu?qf:k}else f=i;i=xn();var x=i.queue,w=x.dispatch;return u!==i.memoizedState&&(Ze.flags|=2048,Ll(9,Hf(),d4.bind(null,x,u),null)),[f,w,a]}function d4(a,i){a.action=i}function NC(a){var i=xn(),u=kt;if(u!==null)return CC(i,u,a);xn(),i=i.memoizedState,u=xn();var f=u.queue.dispatch;return u.memoizedState=a,[i,f,!1]}function Ll(a,i,u,f){return a={tag:a,create:u,deps:f,inst:i,next:null},i=Ze.updateQueue,i===null&&(i=Wg(),Ze.updateQueue=i),u=i.lastEffect,u===null?i.lastEffect=a.next=a:(f=u.next,u.next=a,a.next=f,i.lastEffect=a),a}function Hf(){return{destroy:void 0,resource:void 0}}function AC(){return xn().memoizedState}function Gf(a,i,u,f){var x=jr();f=f===void 0?null:f,Ze.flags|=a,x.memoizedState=Ll(1|i,Hf(),u,f)}function Nu(a,i,u,f){var x=xn();f=f===void 0?null:f;var w=x.memoizedState.inst;kt!==null&&f!==null&&$g(f,kt.memoizedState.deps)?x.memoizedState=Ll(i,w,u,f):(Ze.flags|=a,x.memoizedState=Ll(1|i,w,u,f))}function EC(a,i){Gf(8390656,8,a,i)}function jC(a,i){Nu(2048,8,a,i)}function TC(a,i){return Nu(4,2,a,i)}function kC(a,i){return Nu(4,4,a,i)}function RC(a,i){if(typeof i=="function"){a=a();var u=i(a);return function(){typeof u=="function"?u():i(null)}}if(i!=null)return a=a(),i.current=a,function(){i.current=null}}function PC(a,i,u){u=u!=null?u.concat([a]):null,Nu(4,4,RC.bind(null,i,a),u)}function ty(){}function OC(a,i){var u=xn();i=i===void 0?null:i;var f=u.memoizedState;return i!==null&&$g(i,f[1])?f[0]:(u.memoizedState=[a,i],a)}function _C(a,i){var u=xn();i=i===void 0?null:i;var f=u.memoizedState;if(i!==null&&$g(i,f[1]))return f[0];if(f=a(),Ro){Tt(!0);try{a()}finally{Tt(!1)}}return u.memoizedState=[f,i],f}function ny(a,i,u){return u===void 0||(xi&1073741824)!==0?a.memoizedState=i:(a.memoizedState=u,a=DN(),Ze.lanes|=a,Ai|=a,u)}function IC(a,i,u,f){return Fr(u,i)?u:Il.current!==null?(a=ny(a,u,f),Fr(a,i)||(qn=!0),a):(xi&42)===0?(qn=!0,a.memoizedState=u):(a=DN(),Ze.lanes|=a,Ai|=a,i)}function MC(a,i,u,f,x){var w=O.p;O.p=w!==0&&8>w?w:8;var k=I.T,D={};I.T=D,sy(a,!1,i,u);try{var G=x(),ne=I.S;if(ne!==null&&ne(D,G),G!==null&&typeof G=="object"&&typeof G.then=="function"){var ue=o4(G,f);Au(a,i,ue,Yr(a))}else Au(a,i,f,Yr(a))}catch(me){Au(a,i,{then:function(){},status:"rejected",reason:me},Yr())}finally{O.p=w,I.T=k}}function f4(){}function ry(a,i,u,f){if(a.tag!==5)throw Error(r(476));var x=DC(a).queue;MC(a,x,i,F,u===null?f4:function(){return LC(a),u(f)})}function DC(a){var i=a.memoizedState;if(i!==null)return i;i={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ms,lastRenderedState:F},next:null};var u={};return i.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ms,lastRenderedState:u},next:null},a.memoizedState=i,a=a.alternate,a!==null&&(a.memoizedState=i),i}function LC(a){var i=DC(a).next.queue;Au(a,i,{},Yr())}function ay(){return sr(Fu)}function qC(){return xn().memoizedState}function UC(){return xn().memoizedState}function m4(a){for(var i=a.return;i!==null;){switch(i.tag){case 24:case 3:var u=Yr();a=gi(u);var f=yi(i,a,u);f!==null&&(Wr(f,i,u),vu(f,i,u)),i={cache:Ig()},a.payload=i;return}i=i.return}}function p4(a,i,u){var f=Yr();u={lane:f,revertLane:0,action:u,hasEagerState:!1,eagerState:null,next:null},Kf(a)?VC(i,u):(u=Ng(a,i,u,f),u!==null&&(Wr(u,a,f),BC(u,i,f)))}function zC(a,i,u){var f=Yr();Au(a,i,u,f)}function Au(a,i,u,f){var x={lane:f,revertLane:0,action:u,hasEagerState:!1,eagerState:null,next:null};if(Kf(a))VC(i,x);else{var w=a.alternate;if(a.lanes===0&&(w===null||w.lanes===0)&&(w=i.lastRenderedReducer,w!==null))try{var k=i.lastRenderedState,D=w(k,u);if(x.hasEagerState=!0,x.eagerState=D,Fr(D,k))return Rf(a,i,x,0),Dt===null&&kf(),!1}catch{}if(u=Ng(a,i,x,f),u!==null)return Wr(u,a,f),BC(u,i,f),!0}return!1}function sy(a,i,u,f){if(f={lane:2,revertLane:Ly(),action:f,hasEagerState:!1,eagerState:null,next:null},Kf(a)){if(i)throw Error(r(479))}else i=Ng(a,u,f,2),i!==null&&Wr(i,a,2)}function Kf(a){var i=a.alternate;return a===Ze||i!==null&&i===Ze}function VC(a,i){Ml=Vf=!0;var u=a.pending;u===null?i.next=i:(i.next=u.next,u.next=i),a.pending=i}function BC(a,i,u){if((u&4194048)!==0){var f=i.lanes;f&=a.pendingLanes,u|=f,i.lanes=u,vt(a,u)}}var Yf={readContext:sr,use:Ff,useCallback:cn,useContext:cn,useEffect:cn,useImperativeHandle:cn,useLayoutEffect:cn,useInsertionEffect:cn,useMemo:cn,useReducer:cn,useRef:cn,useState:cn,useDebugValue:cn,useDeferredValue:cn,useTransition:cn,useSyncExternalStore:cn,useId:cn,useHostTransitionStatus:cn,useFormState:cn,useActionState:cn,useOptimistic:cn,useMemoCache:cn,useCacheRefresh:cn},FC={readContext:sr,use:Ff,useCallback:function(a,i){return jr().memoizedState=[a,i===void 0?null:i],a},useContext:sr,useEffect:EC,useImperativeHandle:function(a,i,u){u=u!=null?u.concat([a]):null,Gf(4194308,4,RC.bind(null,i,a),u)},useLayoutEffect:function(a,i){return Gf(4194308,4,a,i)},useInsertionEffect:function(a,i){Gf(4,2,a,i)},useMemo:function(a,i){var u=jr();i=i===void 0?null:i;var f=a();if(Ro){Tt(!0);try{a()}finally{Tt(!1)}}return u.memoizedState=[f,i],f},useReducer:function(a,i,u){var f=jr();if(u!==void 0){var x=u(i);if(Ro){Tt(!0);try{u(i)}finally{Tt(!1)}}}else x=i;return f.memoizedState=f.baseState=x,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:x},f.queue=a,a=a.dispatch=p4.bind(null,Ze,a),[f.memoizedState,a]},useRef:function(a){var i=jr();return a={current:a},i.memoizedState=a},useState:function(a){a=Jg(a);var i=a.queue,u=zC.bind(null,Ze,i);return i.dispatch=u,[a.memoizedState,u]},useDebugValue:ty,useDeferredValue:function(a,i){var u=jr();return ny(u,a,i)},useTransition:function(){var a=Jg(!1);return a=MC.bind(null,Ze,a.queue,!0,!1),jr().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,i,u){var f=Ze,x=jr();if(wt){if(u===void 0)throw Error(r(407));u=u()}else{if(u=i(),Dt===null)throw Error(r(349));(ut&124)!==0||uC(f,i,u)}x.memoizedState=u;var w={value:u,getSnapshot:i};return x.queue=w,EC(fC.bind(null,f,w,a),[a]),f.flags|=2048,Ll(9,Hf(),dC.bind(null,f,w,u,i),null),u},useId:function(){var a=jr(),i=Dt.identifierPrefix;if(wt){var u=Os,f=Ps;u=(f&~(1<<32-Kt(f)-1)).toString(32)+u,i="«"+i+"R"+u,u=Bf++,0<u&&(i+="H"+u.toString(32)),i+="»"}else u=l4++,i="«"+i+"r"+u.toString(32)+"»";return a.memoizedState=i},useHostTransitionStatus:ay,useFormState:wC,useActionState:wC,useOptimistic:function(a){var i=jr();i.memoizedState=i.baseState=a;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=u,i=sy.bind(null,Ze,!0,u),u.dispatch=i,[a,i]},useMemoCache:Qg,useCacheRefresh:function(){return jr().memoizedState=m4.bind(null,Ze)}},$C={readContext:sr,use:Ff,useCallback:OC,useContext:sr,useEffect:jC,useImperativeHandle:PC,useInsertionEffect:TC,useLayoutEffect:kC,useMemo:_C,useReducer:$f,useRef:AC,useState:function(){return $f(Ms)},useDebugValue:ty,useDeferredValue:function(a,i){var u=xn();return IC(u,kt.memoizedState,a,i)},useTransition:function(){var a=$f(Ms)[0],i=xn().memoizedState;return[typeof a=="boolean"?a:Cu(a),i]},useSyncExternalStore:cC,useId:qC,useHostTransitionStatus:ay,useFormState:SC,useActionState:SC,useOptimistic:function(a,i){var u=xn();return hC(u,kt,a,i)},useMemoCache:Qg,useCacheRefresh:UC},h4={readContext:sr,use:Ff,useCallback:OC,useContext:sr,useEffect:jC,useImperativeHandle:PC,useInsertionEffect:TC,useLayoutEffect:kC,useMemo:_C,useReducer:Zg,useRef:AC,useState:function(){return Zg(Ms)},useDebugValue:ty,useDeferredValue:function(a,i){var u=xn();return kt===null?ny(u,a,i):IC(u,kt.memoizedState,a,i)},useTransition:function(){var a=Zg(Ms)[0],i=xn().memoizedState;return[typeof a=="boolean"?a:Cu(a),i]},useSyncExternalStore:cC,useId:qC,useHostTransitionStatus:ay,useFormState:NC,useActionState:NC,useOptimistic:function(a,i){var u=xn();return kt!==null?hC(u,kt,a,i):(u.baseState=a,[a,u.queue.dispatch])},useMemoCache:Qg,useCacheRefresh:UC},ql=null,Eu=0;function Wf(a){var i=Eu;return Eu+=1,ql===null&&(ql=[]),tC(ql,a,i)}function ju(a,i){i=i.props.ref,a.ref=i!==void 0?i:null}function Qf(a,i){throw i.$$typeof===g?Error(r(525)):(a=Object.prototype.toString.call(i),Error(r(31,a==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":a)))}function HC(a){var i=a._init;return i(a._payload)}function GC(a){function i(J,X){if(a){var te=J.deletions;te===null?(J.deletions=[X],J.flags|=16):te.push(X)}}function u(J,X){if(!a)return null;for(;X!==null;)i(J,X),X=X.sibling;return null}function f(J){for(var X=new Map;J!==null;)J.key!==null?X.set(J.key,J):X.set(J.index,J),J=J.sibling;return X}function x(J,X){return J=Rs(J,X),J.index=0,J.sibling=null,J}function w(J,X,te){return J.index=te,a?(te=J.alternate,te!==null?(te=te.index,te<X?(J.flags|=67108866,X):te):(J.flags|=67108866,X)):(J.flags|=1048576,X)}function k(J){return a&&J.alternate===null&&(J.flags|=67108866),J}function D(J,X,te,fe){return X===null||X.tag!==6?(X=Eg(te,J.mode,fe),X.return=J,X):(X=x(X,te),X.return=J,X)}function G(J,X,te,fe){var ke=te.type;return ke===S?ue(J,X,te.props.children,fe,te.key):X!==null&&(X.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===M&&HC(ke)===X.type)?(X=x(X,te.props),ju(X,te),X.return=J,X):(X=Of(te.type,te.key,te.props,null,J.mode,fe),ju(X,te),X.return=J,X)}function ne(J,X,te,fe){return X===null||X.tag!==4||X.stateNode.containerInfo!==te.containerInfo||X.stateNode.implementation!==te.implementation?(X=jg(te,J.mode,fe),X.return=J,X):(X=x(X,te.children||[]),X.return=J,X)}function ue(J,X,te,fe,ke){return X===null||X.tag!==7?(X=So(te,J.mode,fe,ke),X.return=J,X):(X=x(X,te),X.return=J,X)}function me(J,X,te){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return X=Eg(""+X,J.mode,te),X.return=J,X;if(typeof X=="object"&&X!==null){switch(X.$$typeof){case v:return te=Of(X.type,X.key,X.props,null,J.mode,te),ju(te,X),te.return=J,te;case b:return X=jg(X,J.mode,te),X.return=J,X;case M:var fe=X._init;return X=fe(X._payload),me(J,X,te)}if(Q(X)||$(X))return X=So(X,J.mode,te,null),X.return=J,X;if(typeof X.then=="function")return me(J,Wf(X),te);if(X.$$typeof===E)return me(J,Df(J,X),te);Qf(J,X)}return null}function ae(J,X,te,fe){var ke=X!==null?X.key:null;if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return ke!==null?null:D(J,X,""+te,fe);if(typeof te=="object"&&te!==null){switch(te.$$typeof){case v:return te.key===ke?G(J,X,te,fe):null;case b:return te.key===ke?ne(J,X,te,fe):null;case M:return ke=te._init,te=ke(te._payload),ae(J,X,te,fe)}if(Q(te)||$(te))return ke!==null?null:ue(J,X,te,fe,null);if(typeof te.then=="function")return ae(J,X,Wf(te),fe);if(te.$$typeof===E)return ae(J,X,Df(J,te),fe);Qf(J,te)}return null}function se(J,X,te,fe,ke){if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return J=J.get(te)||null,D(X,J,""+fe,ke);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case v:return J=J.get(fe.key===null?te:fe.key)||null,G(X,J,fe,ke);case b:return J=J.get(fe.key===null?te:fe.key)||null,ne(X,J,fe,ke);case M:var nt=fe._init;return fe=nt(fe._payload),se(J,X,te,fe,ke)}if(Q(fe)||$(fe))return J=J.get(te)||null,ue(X,J,fe,ke,null);if(typeof fe.then=="function")return se(J,X,te,Wf(fe),ke);if(fe.$$typeof===E)return se(J,X,te,Df(X,fe),ke);Qf(X,fe)}return null}function $e(J,X,te,fe){for(var ke=null,nt=null,Pe=X,qe=X=0,zn=null;Pe!==null&&qe<te.length;qe++){Pe.index>qe?(zn=Pe,Pe=null):zn=Pe.sibling;var yt=ae(J,Pe,te[qe],fe);if(yt===null){Pe===null&&(Pe=zn);break}a&&Pe&&yt.alternate===null&&i(J,Pe),X=w(yt,X,qe),nt===null?ke=yt:nt.sibling=yt,nt=yt,Pe=zn}if(qe===te.length)return u(J,Pe),wt&&No(J,qe),ke;if(Pe===null){for(;qe<te.length;qe++)Pe=me(J,te[qe],fe),Pe!==null&&(X=w(Pe,X,qe),nt===null?ke=Pe:nt.sibling=Pe,nt=Pe);return wt&&No(J,qe),ke}for(Pe=f(Pe);qe<te.length;qe++)zn=se(Pe,J,qe,te[qe],fe),zn!==null&&(a&&zn.alternate!==null&&Pe.delete(zn.key===null?qe:zn.key),X=w(zn,X,qe),nt===null?ke=zn:nt.sibling=zn,nt=zn);return a&&Pe.forEach(function(Ii){return i(J,Ii)}),wt&&No(J,qe),ke}function De(J,X,te,fe){if(te==null)throw Error(r(151));for(var ke=null,nt=null,Pe=X,qe=X=0,zn=null,yt=te.next();Pe!==null&&!yt.done;qe++,yt=te.next()){Pe.index>qe?(zn=Pe,Pe=null):zn=Pe.sibling;var Ii=ae(J,Pe,yt.value,fe);if(Ii===null){Pe===null&&(Pe=zn);break}a&&Pe&&Ii.alternate===null&&i(J,Pe),X=w(Ii,X,qe),nt===null?ke=Ii:nt.sibling=Ii,nt=Ii,Pe=zn}if(yt.done)return u(J,Pe),wt&&No(J,qe),ke;if(Pe===null){for(;!yt.done;qe++,yt=te.next())yt=me(J,yt.value,fe),yt!==null&&(X=w(yt,X,qe),nt===null?ke=yt:nt.sibling=yt,nt=yt);return wt&&No(J,qe),ke}for(Pe=f(Pe);!yt.done;qe++,yt=te.next())yt=se(Pe,J,qe,yt.value,fe),yt!==null&&(a&&yt.alternate!==null&&Pe.delete(yt.key===null?qe:yt.key),X=w(yt,X,qe),nt===null?ke=yt:nt.sibling=yt,nt=yt);return a&&Pe.forEach(function(gq){return i(J,gq)}),wt&&No(J,qe),ke}function Pt(J,X,te,fe){if(typeof te=="object"&&te!==null&&te.type===S&&te.key===null&&(te=te.props.children),typeof te=="object"&&te!==null){switch(te.$$typeof){case v:e:{for(var ke=te.key;X!==null;){if(X.key===ke){if(ke=te.type,ke===S){if(X.tag===7){u(J,X.sibling),fe=x(X,te.props.children),fe.return=J,J=fe;break e}}else if(X.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===M&&HC(ke)===X.type){u(J,X.sibling),fe=x(X,te.props),ju(fe,te),fe.return=J,J=fe;break e}u(J,X);break}else i(J,X);X=X.sibling}te.type===S?(fe=So(te.props.children,J.mode,fe,te.key),fe.return=J,J=fe):(fe=Of(te.type,te.key,te.props,null,J.mode,fe),ju(fe,te),fe.return=J,J=fe)}return k(J);case b:e:{for(ke=te.key;X!==null;){if(X.key===ke)if(X.tag===4&&X.stateNode.containerInfo===te.containerInfo&&X.stateNode.implementation===te.implementation){u(J,X.sibling),fe=x(X,te.children||[]),fe.return=J,J=fe;break e}else{u(J,X);break}else i(J,X);X=X.sibling}fe=jg(te,J.mode,fe),fe.return=J,J=fe}return k(J);case M:return ke=te._init,te=ke(te._payload),Pt(J,X,te,fe)}if(Q(te))return $e(J,X,te,fe);if($(te)){if(ke=$(te),typeof ke!="function")throw Error(r(150));return te=ke.call(te),De(J,X,te,fe)}if(typeof te.then=="function")return Pt(J,X,Wf(te),fe);if(te.$$typeof===E)return Pt(J,X,Df(J,te),fe);Qf(J,te)}return typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint"?(te=""+te,X!==null&&X.tag===6?(u(J,X.sibling),fe=x(X,te),fe.return=J,J=fe):(u(J,X),fe=Eg(te,J.mode,fe),fe.return=J,J=fe),k(J)):u(J,X)}return function(J,X,te,fe){try{Eu=0;var ke=Pt(J,X,te,fe);return ql=null,ke}catch(Pe){if(Pe===yu||Pe===qf)throw Pe;var nt=$r(29,Pe,null,J.mode);return nt.lanes=fe,nt.return=J,nt}}}var Ul=GC(!0),KC=GC(!1),oa=le(null),ls=null;function vi(a){var i=a.alternate;ie(Rn,Rn.current&1),ie(oa,a),ls===null&&(i===null||Il.current!==null||i.memoizedState!==null)&&(ls=a)}function YC(a){if(a.tag===22){if(ie(Rn,Rn.current),ie(oa,a),ls===null){var i=a.alternate;i!==null&&i.memoizedState!==null&&(ls=a)}}else bi()}function bi(){ie(Rn,Rn.current),ie(oa,oa.current)}function Ds(a){Z(oa),ls===a&&(ls=null),Z(Rn)}var Rn=le(0);function Xf(a){for(var i=a;i!==null;){if(i.tag===13){var u=i.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||u.data==="$?"||Wy(u)))return i}else if(i.tag===19&&i.memoizedProps.revealOrder!==void 0){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===a)break;for(;i.sibling===null;){if(i.return===null||i.return===a)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}function iy(a,i,u,f){i=a.memoizedState,u=u(f,i),u=u==null?i:y({},i,u),a.memoizedState=u,a.lanes===0&&(a.updateQueue.baseState=u)}var oy={enqueueSetState:function(a,i,u){a=a._reactInternals;var f=Yr(),x=gi(f);x.payload=i,u!=null&&(x.callback=u),i=yi(a,x,f),i!==null&&(Wr(i,a,f),vu(i,a,f))},enqueueReplaceState:function(a,i,u){a=a._reactInternals;var f=Yr(),x=gi(f);x.tag=1,x.payload=i,u!=null&&(x.callback=u),i=yi(a,x,f),i!==null&&(Wr(i,a,f),vu(i,a,f))},enqueueForceUpdate:function(a,i){a=a._reactInternals;var u=Yr(),f=gi(u);f.tag=2,i!=null&&(f.callback=i),i=yi(a,f,u),i!==null&&(Wr(i,a,u),vu(i,a,u))}};function WC(a,i,u,f,x,w,k){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(f,w,k):i.prototype&&i.prototype.isPureReactComponent?!cu(u,f)||!cu(x,w):!0}function QC(a,i,u,f){a=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(u,f),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(u,f),i.state!==a&&oy.enqueueReplaceState(i,i.state,null)}function Po(a,i){var u=i;if("ref"in i){u={};for(var f in i)f!=="ref"&&(u[f]=i[f])}if(a=a.defaultProps){u===i&&(u=y({},u));for(var x in a)u[x]===void 0&&(u[x]=a[x])}return u}var Zf=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)};function XC(a){Zf(a)}function ZC(a){console.error(a)}function JC(a){Zf(a)}function Jf(a,i){try{var u=a.onUncaughtError;u(i.value,{componentStack:i.stack})}catch(f){setTimeout(function(){throw f})}}function eN(a,i,u){try{var f=a.onCaughtError;f(u.value,{componentStack:u.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(x){setTimeout(function(){throw x})}}function ly(a,i,u){return u=gi(u),u.tag=3,u.payload={element:null},u.callback=function(){Jf(a,i)},u}function tN(a){return a=gi(a),a.tag=3,a}function nN(a,i,u,f){var x=u.type.getDerivedStateFromError;if(typeof x=="function"){var w=f.value;a.payload=function(){return x(w)},a.callback=function(){eN(i,u,f)}}var k=u.stateNode;k!==null&&typeof k.componentDidCatch=="function"&&(a.callback=function(){eN(i,u,f),typeof x!="function"&&(Ei===null?Ei=new Set([this]):Ei.add(this));var D=f.stack;this.componentDidCatch(f.value,{componentStack:D!==null?D:""})})}function g4(a,i,u,f,x){if(u.flags|=32768,f!==null&&typeof f=="object"&&typeof f.then=="function"){if(i=u.alternate,i!==null&&pu(i,u,x,!0),u=oa.current,u!==null){switch(u.tag){case 13:return ls===null?Oy():u.alternate===null&&en===0&&(en=3),u.flags&=-257,u.flags|=65536,u.lanes=x,f===Lg?u.flags|=16384:(i=u.updateQueue,i===null?u.updateQueue=new Set([f]):i.add(f),Iy(a,f,x)),!1;case 22:return u.flags|=65536,f===Lg?u.flags|=16384:(i=u.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([f])},u.updateQueue=i):(u=i.retryQueue,u===null?i.retryQueue=new Set([f]):u.add(f)),Iy(a,f,x)),!1}throw Error(r(435,u.tag))}return Iy(a,f,x),Oy(),!1}if(wt)return i=oa.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=x,f!==Rg&&(a=Error(r(422),{cause:f}),mu(ra(a,u)))):(f!==Rg&&(i=Error(r(423),{cause:f}),mu(ra(i,u))),a=a.current.alternate,a.flags|=65536,x&=-x,a.lanes|=x,f=ra(f,u),x=ly(a.stateNode,f,x),zg(a,x),en!==4&&(en=2)),!1;var w=Error(r(520),{cause:f});if(w=ra(w,u),Iu===null?Iu=[w]:Iu.push(w),en!==4&&(en=2),i===null)return!0;f=ra(f,u),u=i;do{switch(u.tag){case 3:return u.flags|=65536,a=x&-x,u.lanes|=a,a=ly(u.stateNode,f,a),zg(u,a),!1;case 1:if(i=u.type,w=u.stateNode,(u.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Ei===null||!Ei.has(w))))return u.flags|=65536,x&=-x,u.lanes|=x,x=tN(x),nN(x,a,u,f),zg(u,x),!1}u=u.return}while(u!==null);return!1}var rN=Error(r(461)),qn=!1;function Xn(a,i,u,f){i.child=a===null?KC(i,null,u,f):Ul(i,a.child,u,f)}function aN(a,i,u,f,x){u=u.render;var w=i.ref;if("ref"in f){var k={};for(var D in f)D!=="ref"&&(k[D]=f[D])}else k=f;return To(i),f=Hg(a,i,u,k,w,x),D=Gg(),a!==null&&!qn?(Kg(a,i,x),Ls(a,i,x)):(wt&&D&&Tg(i),i.flags|=1,Xn(a,i,f,x),i.child)}function sN(a,i,u,f,x){if(a===null){var w=u.type;return typeof w=="function"&&!Ag(w)&&w.defaultProps===void 0&&u.compare===null?(i.tag=15,i.type=w,iN(a,i,w,f,x)):(a=Of(u.type,null,f,i,i.mode,x),a.ref=i.ref,a.return=i,i.child=a)}if(w=a.child,!gy(a,x)){var k=w.memoizedProps;if(u=u.compare,u=u!==null?u:cu,u(k,f)&&a.ref===i.ref)return Ls(a,i,x)}return i.flags|=1,a=Rs(w,f),a.ref=i.ref,a.return=i,i.child=a}function iN(a,i,u,f,x){if(a!==null){var w=a.memoizedProps;if(cu(w,f)&&a.ref===i.ref)if(qn=!1,i.pendingProps=f=w,gy(a,x))(a.flags&131072)!==0&&(qn=!0);else return i.lanes=a.lanes,Ls(a,i,x)}return cy(a,i,u,f,x)}function oN(a,i,u){var f=i.pendingProps,x=f.children,w=a!==null?a.memoizedState:null;if(f.mode==="hidden"){if((i.flags&128)!==0){if(f=w!==null?w.baseLanes|u:u,a!==null){for(x=i.child=a.child,w=0;x!==null;)w=w|x.lanes|x.childLanes,x=x.sibling;i.childLanes=w&~f}else i.childLanes=0,i.child=null;return lN(a,i,f,u)}if((u&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},a!==null&&Lf(i,w!==null?w.cachePool:null),w!==null?iC(i,w):Bg(),YC(i);else return i.lanes=i.childLanes=536870912,lN(a,i,w!==null?w.baseLanes|u:u,u)}else w!==null?(Lf(i,w.cachePool),iC(i,w),bi(),i.memoizedState=null):(a!==null&&Lf(i,null),Bg(),bi());return Xn(a,i,x,u),i.child}function lN(a,i,u,f){var x=Dg();return x=x===null?null:{parent:kn._currentValue,pool:x},i.memoizedState={baseLanes:u,cachePool:x},a!==null&&Lf(i,null),Bg(),YC(i),a!==null&&pu(a,i,f,!0),null}function em(a,i){var u=i.ref;if(u===null)a!==null&&a.ref!==null&&(i.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(r(284));(a===null||a.ref!==u)&&(i.flags|=4194816)}}function cy(a,i,u,f,x){return To(i),u=Hg(a,i,u,f,void 0,x),f=Gg(),a!==null&&!qn?(Kg(a,i,x),Ls(a,i,x)):(wt&&f&&Tg(i),i.flags|=1,Xn(a,i,u,x),i.child)}function cN(a,i,u,f,x,w){return To(i),i.updateQueue=null,u=lC(i,f,u,x),oC(a),f=Gg(),a!==null&&!qn?(Kg(a,i,w),Ls(a,i,w)):(wt&&f&&Tg(i),i.flags|=1,Xn(a,i,u,w),i.child)}function uN(a,i,u,f,x){if(To(i),i.stateNode===null){var w=kl,k=u.contextType;typeof k=="object"&&k!==null&&(w=sr(k)),w=new u(f,w),i.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,w.updater=oy,i.stateNode=w,w._reactInternals=i,w=i.stateNode,w.props=f,w.state=i.memoizedState,w.refs={},qg(i),k=u.contextType,w.context=typeof k=="object"&&k!==null?sr(k):kl,w.state=i.memoizedState,k=u.getDerivedStateFromProps,typeof k=="function"&&(iy(i,u,k,f),w.state=i.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof w.getSnapshotBeforeUpdate=="function"||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(k=w.state,typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount(),k!==w.state&&oy.enqueueReplaceState(w,w.state,null),wu(i,f,w,x),bu(),w.state=i.memoizedState),typeof w.componentDidMount=="function"&&(i.flags|=4194308),f=!0}else if(a===null){w=i.stateNode;var D=i.memoizedProps,G=Po(u,D);w.props=G;var ne=w.context,ue=u.contextType;k=kl,typeof ue=="object"&&ue!==null&&(k=sr(ue));var me=u.getDerivedStateFromProps;ue=typeof me=="function"||typeof w.getSnapshotBeforeUpdate=="function",D=i.pendingProps!==D,ue||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(D||ne!==k)&&QC(i,w,f,k),hi=!1;var ae=i.memoizedState;w.state=ae,wu(i,f,w,x),bu(),ne=i.memoizedState,D||ae!==ne||hi?(typeof me=="function"&&(iy(i,u,me,f),ne=i.memoizedState),(G=hi||WC(i,u,G,f,ae,ne,k))?(ue||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(i.flags|=4194308)):(typeof w.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=f,i.memoizedState=ne),w.props=f,w.state=ne,w.context=k,f=G):(typeof w.componentDidMount=="function"&&(i.flags|=4194308),f=!1)}else{w=i.stateNode,Ug(a,i),k=i.memoizedProps,ue=Po(u,k),w.props=ue,me=i.pendingProps,ae=w.context,ne=u.contextType,G=kl,typeof ne=="object"&&ne!==null&&(G=sr(ne)),D=u.getDerivedStateFromProps,(ne=typeof D=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(k!==me||ae!==G)&&QC(i,w,f,G),hi=!1,ae=i.memoizedState,w.state=ae,wu(i,f,w,x),bu();var se=i.memoizedState;k!==me||ae!==se||hi||a!==null&&a.dependencies!==null&&Mf(a.dependencies)?(typeof D=="function"&&(iy(i,u,D,f),se=i.memoizedState),(ue=hi||WC(i,u,ue,f,ae,se,G)||a!==null&&a.dependencies!==null&&Mf(a.dependencies))?(ne||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(f,se,G),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(f,se,G)),typeof w.componentDidUpdate=="function"&&(i.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof w.componentDidUpdate!="function"||k===a.memoizedProps&&ae===a.memoizedState||(i.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||k===a.memoizedProps&&ae===a.memoizedState||(i.flags|=1024),i.memoizedProps=f,i.memoizedState=se),w.props=f,w.state=se,w.context=G,f=ue):(typeof w.componentDidUpdate!="function"||k===a.memoizedProps&&ae===a.memoizedState||(i.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||k===a.memoizedProps&&ae===a.memoizedState||(i.flags|=1024),f=!1)}return w=f,em(a,i),f=(i.flags&128)!==0,w||f?(w=i.stateNode,u=f&&typeof u.getDerivedStateFromError!="function"?null:w.render(),i.flags|=1,a!==null&&f?(i.child=Ul(i,a.child,null,x),i.child=Ul(i,null,u,x)):Xn(a,i,u,x),i.memoizedState=w.state,a=i.child):a=Ls(a,i,x),a}function dN(a,i,u,f){return fu(),i.flags|=256,Xn(a,i,u,f),i.child}var uy={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function dy(a){return{baseLanes:a,cachePool:Z1()}}function fy(a,i,u){return a=a!==null?a.childLanes&~u:0,i&&(a|=la),a}function fN(a,i,u){var f=i.pendingProps,x=!1,w=(i.flags&128)!==0,k;if((k=w)||(k=a!==null&&a.memoizedState===null?!1:(Rn.current&2)!==0),k&&(x=!0,i.flags&=-129),k=(i.flags&32)!==0,i.flags&=-33,a===null){if(wt){if(x?vi(i):bi(),wt){var D=Jt,G;if(G=D){e:{for(G=D,D=os;G.nodeType!==8;){if(!D){D=null;break e}if(G=_a(G.nextSibling),G===null){D=null;break e}}D=G}D!==null?(i.memoizedState={dehydrated:D,treeContext:Co!==null?{id:Ps,overflow:Os}:null,retryLane:536870912,hydrationErrors:null},G=$r(18,null,null,0),G.stateNode=D,G.return=i,i.child=G,gr=i,Jt=null,G=!0):G=!1}G||Eo(i)}if(D=i.memoizedState,D!==null&&(D=D.dehydrated,D!==null))return Wy(D)?i.lanes=32:i.lanes=536870912,null;Ds(i)}return D=f.children,f=f.fallback,x?(bi(),x=i.mode,D=tm({mode:"hidden",children:D},x),f=So(f,x,u,null),D.return=i,f.return=i,D.sibling=f,i.child=D,x=i.child,x.memoizedState=dy(u),x.childLanes=fy(a,k,u),i.memoizedState=uy,f):(vi(i),my(i,D))}if(G=a.memoizedState,G!==null&&(D=G.dehydrated,D!==null)){if(w)i.flags&256?(vi(i),i.flags&=-257,i=py(a,i,u)):i.memoizedState!==null?(bi(),i.child=a.child,i.flags|=128,i=null):(bi(),x=f.fallback,D=i.mode,f=tm({mode:"visible",children:f.children},D),x=So(x,D,u,null),x.flags|=2,f.return=i,x.return=i,f.sibling=x,i.child=f,Ul(i,a.child,null,u),f=i.child,f.memoizedState=dy(u),f.childLanes=fy(a,k,u),i.memoizedState=uy,i=x);else if(vi(i),Wy(D)){if(k=D.nextSibling&&D.nextSibling.dataset,k)var ne=k.dgst;k=ne,f=Error(r(419)),f.stack="",f.digest=k,mu({value:f,source:null,stack:null}),i=py(a,i,u)}else if(qn||pu(a,i,u,!1),k=(u&a.childLanes)!==0,qn||k){if(k=Dt,k!==null&&(f=u&-u,f=(f&42)!==0?1:Te(f),f=(f&(k.suspendedLanes|u))!==0?0:f,f!==0&&f!==G.retryLane))throw G.retryLane=f,Tl(a,f),Wr(k,a,f),rN;D.data==="$?"||Oy(),i=py(a,i,u)}else D.data==="$?"?(i.flags|=192,i.child=a.child,i=null):(a=G.treeContext,Jt=_a(D.nextSibling),gr=i,wt=!0,Ao=null,os=!1,a!==null&&(sa[ia++]=Ps,sa[ia++]=Os,sa[ia++]=Co,Ps=a.id,Os=a.overflow,Co=i),i=my(i,f.children),i.flags|=4096);return i}return x?(bi(),x=f.fallback,D=i.mode,G=a.child,ne=G.sibling,f=Rs(G,{mode:"hidden",children:f.children}),f.subtreeFlags=G.subtreeFlags&65011712,ne!==null?x=Rs(ne,x):(x=So(x,D,u,null),x.flags|=2),x.return=i,f.return=i,f.sibling=x,i.child=f,f=x,x=i.child,D=a.child.memoizedState,D===null?D=dy(u):(G=D.cachePool,G!==null?(ne=kn._currentValue,G=G.parent!==ne?{parent:ne,pool:ne}:G):G=Z1(),D={baseLanes:D.baseLanes|u,cachePool:G}),x.memoizedState=D,x.childLanes=fy(a,k,u),i.memoizedState=uy,f):(vi(i),u=a.child,a=u.sibling,u=Rs(u,{mode:"visible",children:f.children}),u.return=i,u.sibling=null,a!==null&&(k=i.deletions,k===null?(i.deletions=[a],i.flags|=16):k.push(a)),i.child=u,i.memoizedState=null,u)}function my(a,i){return i=tm({mode:"visible",children:i},a.mode),i.return=a,a.child=i}function tm(a,i){return a=$r(22,a,null,i),a.lanes=0,a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},a}function py(a,i,u){return Ul(i,a.child,null,u),a=my(i,i.pendingProps.children),a.flags|=2,i.memoizedState=null,a}function mN(a,i,u){a.lanes|=i;var f=a.alternate;f!==null&&(f.lanes|=i),Og(a.return,i,u)}function hy(a,i,u,f,x){var w=a.memoizedState;w===null?a.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:f,tail:u,tailMode:x}:(w.isBackwards=i,w.rendering=null,w.renderingStartTime=0,w.last=f,w.tail=u,w.tailMode=x)}function pN(a,i,u){var f=i.pendingProps,x=f.revealOrder,w=f.tail;if(Xn(a,i,f.children,u),f=Rn.current,(f&2)!==0)f=f&1|2,i.flags|=128;else{if(a!==null&&(a.flags&128)!==0)e:for(a=i.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&mN(a,u,i);else if(a.tag===19)mN(a,u,i);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===i)break e;for(;a.sibling===null;){if(a.return===null||a.return===i)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}f&=1}switch(ie(Rn,f),x){case"forwards":for(u=i.child,x=null;u!==null;)a=u.alternate,a!==null&&Xf(a)===null&&(x=u),u=u.sibling;u=x,u===null?(x=i.child,i.child=null):(x=u.sibling,u.sibling=null),hy(i,!1,x,u,w);break;case"backwards":for(u=null,x=i.child,i.child=null;x!==null;){if(a=x.alternate,a!==null&&Xf(a)===null){i.child=x;break}a=x.sibling,x.sibling=u,u=x,x=a}hy(i,!0,u,null,w);break;case"together":hy(i,!1,null,null,void 0);break;default:i.memoizedState=null}return i.child}function Ls(a,i,u){if(a!==null&&(i.dependencies=a.dependencies),Ai|=i.lanes,(u&i.childLanes)===0)if(a!==null){if(pu(a,i,u,!1),(u&i.childLanes)===0)return null}else return null;if(a!==null&&i.child!==a.child)throw Error(r(153));if(i.child!==null){for(a=i.child,u=Rs(a,a.pendingProps),i.child=u,u.return=i;a.sibling!==null;)a=a.sibling,u=u.sibling=Rs(a,a.pendingProps),u.return=i;u.sibling=null}return i.child}function gy(a,i){return(a.lanes&i)!==0?!0:(a=a.dependencies,!!(a!==null&&Mf(a)))}function y4(a,i,u){switch(i.tag){case 3:oe(i,i.stateNode.containerInfo),pi(i,kn,a.memoizedState.cache),fu();break;case 27:case 5:we(i);break;case 4:oe(i,i.stateNode.containerInfo);break;case 10:pi(i,i.type,i.memoizedProps.value);break;case 13:var f=i.memoizedState;if(f!==null)return f.dehydrated!==null?(vi(i),i.flags|=128,null):(u&i.child.childLanes)!==0?fN(a,i,u):(vi(i),a=Ls(a,i,u),a!==null?a.sibling:null);vi(i);break;case 19:var x=(a.flags&128)!==0;if(f=(u&i.childLanes)!==0,f||(pu(a,i,u,!1),f=(u&i.childLanes)!==0),x){if(f)return pN(a,i,u);i.flags|=128}if(x=i.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),ie(Rn,Rn.current),f)break;return null;case 22:case 23:return i.lanes=0,oN(a,i,u);case 24:pi(i,kn,a.memoizedState.cache)}return Ls(a,i,u)}function hN(a,i,u){if(a!==null)if(a.memoizedProps!==i.pendingProps)qn=!0;else{if(!gy(a,u)&&(i.flags&128)===0)return qn=!1,y4(a,i,u);qn=(a.flags&131072)!==0}else qn=!1,wt&&(i.flags&1048576)!==0&&H1(i,If,i.index);switch(i.lanes=0,i.tag){case 16:e:{a=i.pendingProps;var f=i.elementType,x=f._init;if(f=x(f._payload),i.type=f,typeof f=="function")Ag(f)?(a=Po(f,a),i.tag=1,i=uN(null,i,f,a,u)):(i.tag=0,i=cy(null,i,f,a,u));else{if(f!=null){if(x=f.$$typeof,x===j){i.tag=11,i=aN(null,i,f,a,u);break e}else if(x===P){i.tag=14,i=sN(null,i,f,a,u);break e}}throw i=H(f)||f,Error(r(306,i,""))}}return i;case 0:return cy(a,i,i.type,i.pendingProps,u);case 1:return f=i.type,x=Po(f,i.pendingProps),uN(a,i,f,x,u);case 3:e:{if(oe(i,i.stateNode.containerInfo),a===null)throw Error(r(387));f=i.pendingProps;var w=i.memoizedState;x=w.element,Ug(a,i),wu(i,f,null,u);var k=i.memoizedState;if(f=k.cache,pi(i,kn,f),f!==w.cache&&_g(i,[kn],u,!0),bu(),f=k.element,w.isDehydrated)if(w={element:f,isDehydrated:!1,cache:k.cache},i.updateQueue.baseState=w,i.memoizedState=w,i.flags&256){i=dN(a,i,f,u);break e}else if(f!==x){x=ra(Error(r(424)),i),mu(x),i=dN(a,i,f,u);break e}else for(a=i.stateNode.containerInfo,a.nodeType===9?a=a.body:a=a.nodeName==="HTML"?a.ownerDocument.body:a,Jt=_a(a.firstChild),gr=i,wt=!0,Ao=null,os=!0,u=KC(i,null,f,u),i.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(fu(),f===x){i=Ls(a,i,u);break e}Xn(a,i,f,u)}i=i.child}return i;case 26:return em(a,i),a===null?(u=vA(i.type,null,i.pendingProps,null))?i.memoizedState=u:wt||(u=i.type,a=i.pendingProps,f=hm(he.current).createElement(u),f[Ke]=i,f[ct]=a,Jn(f,u,a),Wt(f),i.stateNode=f):i.memoizedState=vA(i.type,a.memoizedProps,i.pendingProps,a.memoizedState),null;case 27:return we(i),a===null&&wt&&(f=i.stateNode=gA(i.type,i.pendingProps,he.current),gr=i,os=!0,x=Jt,ki(i.type)?(Qy=x,Jt=_a(f.firstChild)):Jt=x),Xn(a,i,i.pendingProps.children,u),em(a,i),a===null&&(i.flags|=4194304),i.child;case 5:return a===null&&wt&&((x=f=Jt)&&(f=H4(f,i.type,i.pendingProps,os),f!==null?(i.stateNode=f,gr=i,Jt=_a(f.firstChild),os=!1,x=!0):x=!1),x||Eo(i)),we(i),x=i.type,w=i.pendingProps,k=a!==null?a.memoizedProps:null,f=w.children,Gy(x,w)?f=null:k!==null&&Gy(x,k)&&(i.flags|=32),i.memoizedState!==null&&(x=Hg(a,i,c4,null,null,u),Fu._currentValue=x),em(a,i),Xn(a,i,f,u),i.child;case 6:return a===null&&wt&&((a=u=Jt)&&(u=G4(u,i.pendingProps,os),u!==null?(i.stateNode=u,gr=i,Jt=null,a=!0):a=!1),a||Eo(i)),null;case 13:return fN(a,i,u);case 4:return oe(i,i.stateNode.containerInfo),f=i.pendingProps,a===null?i.child=Ul(i,null,f,u):Xn(a,i,f,u),i.child;case 11:return aN(a,i,i.type,i.pendingProps,u);case 7:return Xn(a,i,i.pendingProps,u),i.child;case 8:return Xn(a,i,i.pendingProps.children,u),i.child;case 12:return Xn(a,i,i.pendingProps.children,u),i.child;case 10:return f=i.pendingProps,pi(i,i.type,f.value),Xn(a,i,f.children,u),i.child;case 9:return x=i.type._context,f=i.pendingProps.children,To(i),x=sr(x),f=f(x),i.flags|=1,Xn(a,i,f,u),i.child;case 14:return sN(a,i,i.type,i.pendingProps,u);case 15:return iN(a,i,i.type,i.pendingProps,u);case 19:return pN(a,i,u);case 31:return f=i.pendingProps,u=i.mode,f={mode:f.mode,children:f.children},a===null?(u=tm(f,u),u.ref=i.ref,i.child=u,u.return=i,i=u):(u=Rs(a.child,f),u.ref=i.ref,i.child=u,u.return=i,i=u),i;case 22:return oN(a,i,u);case 24:return To(i),f=sr(kn),a===null?(x=Dg(),x===null&&(x=Dt,w=Ig(),x.pooledCache=w,w.refCount++,w!==null&&(x.pooledCacheLanes|=u),x=w),i.memoizedState={parent:f,cache:x},qg(i),pi(i,kn,x)):((a.lanes&u)!==0&&(Ug(a,i),wu(i,null,null,u),bu()),x=a.memoizedState,w=i.memoizedState,x.parent!==f?(x={parent:f,cache:f},i.memoizedState=x,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=x),pi(i,kn,f)):(f=w.cache,pi(i,kn,f),f!==x.cache&&_g(i,[kn],u,!0))),Xn(a,i,i.pendingProps.children,u),i.child;case 29:throw i.pendingProps}throw Error(r(156,i.tag))}function qs(a){a.flags|=4}function gN(a,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!NA(i)){if(i=oa.current,i!==null&&((ut&4194048)===ut?ls!==null:(ut&62914560)!==ut&&(ut&536870912)===0||i!==ls))throw xu=Lg,J1;a.flags|=8192}}function nm(a,i){i!==null&&(a.flags|=4),a.flags&16384&&(i=a.tag!==22?Xe():536870912,a.lanes|=i,Fl|=i)}function Tu(a,i){if(!wt)switch(a.tailMode){case"hidden":i=a.tail;for(var u=null;i!==null;)i.alternate!==null&&(u=i),i=i.sibling;u===null?a.tail=null:u.sibling=null;break;case"collapsed":u=a.tail;for(var f=null;u!==null;)u.alternate!==null&&(f=u),u=u.sibling;f===null?i||a.tail===null?a.tail=null:a.tail.sibling=null:f.sibling=null}}function Qt(a){var i=a.alternate!==null&&a.alternate.child===a.child,u=0,f=0;if(i)for(var x=a.child;x!==null;)u|=x.lanes|x.childLanes,f|=x.subtreeFlags&65011712,f|=x.flags&65011712,x.return=a,x=x.sibling;else for(x=a.child;x!==null;)u|=x.lanes|x.childLanes,f|=x.subtreeFlags,f|=x.flags,x.return=a,x=x.sibling;return a.subtreeFlags|=f,a.childLanes=u,i}function x4(a,i,u){var f=i.pendingProps;switch(kg(i),i.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qt(i),null;case 1:return Qt(i),null;case 3:return u=i.stateNode,f=null,a!==null&&(f=a.memoizedState.cache),i.memoizedState.cache!==f&&(i.flags|=2048),Is(kn),ge(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(a===null||a.child===null)&&(du(i)?qs(i):a===null||a.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Y1())),Qt(i),null;case 26:return u=i.memoizedState,a===null?(qs(i),u!==null?(Qt(i),gN(i,u)):(Qt(i),i.flags&=-16777217)):u?u!==a.memoizedState?(qs(i),Qt(i),gN(i,u)):(Qt(i),i.flags&=-16777217):(a.memoizedProps!==f&&qs(i),Qt(i),i.flags&=-16777217),null;case 27:be(i),u=he.current;var x=i.type;if(a!==null&&i.stateNode!=null)a.memoizedProps!==f&&qs(i);else{if(!f){if(i.stateNode===null)throw Error(r(166));return Qt(i),null}a=re.current,du(i)?G1(i):(a=gA(x,f,u),i.stateNode=a,qs(i))}return Qt(i),null;case 5:if(be(i),u=i.type,a!==null&&i.stateNode!=null)a.memoizedProps!==f&&qs(i);else{if(!f){if(i.stateNode===null)throw Error(r(166));return Qt(i),null}if(a=re.current,du(i))G1(i);else{switch(x=hm(he.current),a){case 1:a=x.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:a=x.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":a=x.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":a=x.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":a=x.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild);break;case"select":a=typeof f.is=="string"?x.createElement("select",{is:f.is}):x.createElement("select"),f.multiple?a.multiple=!0:f.size&&(a.size=f.size);break;default:a=typeof f.is=="string"?x.createElement(u,{is:f.is}):x.createElement(u)}}a[Ke]=i,a[ct]=f;e:for(x=i.child;x!==null;){if(x.tag===5||x.tag===6)a.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===i)break e;for(;x.sibling===null;){if(x.return===null||x.return===i)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}i.stateNode=a;e:switch(Jn(a,u,f),u){case"button":case"input":case"select":case"textarea":a=!!f.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&qs(i)}}return Qt(i),i.flags&=-16777217,null;case 6:if(a&&i.stateNode!=null)a.memoizedProps!==f&&qs(i);else{if(typeof f!="string"&&i.stateNode===null)throw Error(r(166));if(a=he.current,du(i)){if(a=i.stateNode,u=i.memoizedProps,f=null,x=gr,x!==null)switch(x.tag){case 27:case 5:f=x.memoizedProps}a[Ke]=i,a=!!(a.nodeValue===u||f!==null&&f.suppressHydrationWarning===!0||cA(a.nodeValue,u)),a||Eo(i)}else a=hm(a).createTextNode(f),a[Ke]=i,i.stateNode=a}return Qt(i),null;case 13:if(f=i.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(x=du(i),f!==null&&f.dehydrated!==null){if(a===null){if(!x)throw Error(r(318));if(x=i.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(r(317));x[Ke]=i}else fu(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Qt(i),x=!1}else x=Y1(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=x),x=!0;if(!x)return i.flags&256?(Ds(i),i):(Ds(i),null)}if(Ds(i),(i.flags&128)!==0)return i.lanes=u,i;if(u=f!==null,a=a!==null&&a.memoizedState!==null,u){f=i.child,x=null,f.alternate!==null&&f.alternate.memoizedState!==null&&f.alternate.memoizedState.cachePool!==null&&(x=f.alternate.memoizedState.cachePool.pool);var w=null;f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(w=f.memoizedState.cachePool.pool),w!==x&&(f.flags|=2048)}return u!==a&&u&&(i.child.flags|=8192),nm(i,i.updateQueue),Qt(i),null;case 4:return ge(),a===null&&Vy(i.stateNode.containerInfo),Qt(i),null;case 10:return Is(i.type),Qt(i),null;case 19:if(Z(Rn),x=i.memoizedState,x===null)return Qt(i),null;if(f=(i.flags&128)!==0,w=x.rendering,w===null)if(f)Tu(x,!1);else{if(en!==0||a!==null&&(a.flags&128)!==0)for(a=i.child;a!==null;){if(w=Xf(a),w!==null){for(i.flags|=128,Tu(x,!1),a=w.updateQueue,i.updateQueue=a,nm(i,a),i.subtreeFlags=0,a=u,u=i.child;u!==null;)$1(u,a),u=u.sibling;return ie(Rn,Rn.current&1|2),i.child}a=a.sibling}x.tail!==null&&pt()>sm&&(i.flags|=128,f=!0,Tu(x,!1),i.lanes=4194304)}else{if(!f)if(a=Xf(w),a!==null){if(i.flags|=128,f=!0,a=a.updateQueue,i.updateQueue=a,nm(i,a),Tu(x,!0),x.tail===null&&x.tailMode==="hidden"&&!w.alternate&&!wt)return Qt(i),null}else 2*pt()-x.renderingStartTime>sm&&u!==536870912&&(i.flags|=128,f=!0,Tu(x,!1),i.lanes=4194304);x.isBackwards?(w.sibling=i.child,i.child=w):(a=x.last,a!==null?a.sibling=w:i.child=w,x.last=w)}return x.tail!==null?(i=x.tail,x.rendering=i,x.tail=i.sibling,x.renderingStartTime=pt(),i.sibling=null,a=Rn.current,ie(Rn,f?a&1|2:a&1),i):(Qt(i),null);case 22:case 23:return Ds(i),Fg(),f=i.memoizedState!==null,a!==null?a.memoizedState!==null!==f&&(i.flags|=8192):f&&(i.flags|=8192),f?(u&536870912)!==0&&(i.flags&128)===0&&(Qt(i),i.subtreeFlags&6&&(i.flags|=8192)):Qt(i),u=i.updateQueue,u!==null&&nm(i,u.retryQueue),u=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),f=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(f=i.memoizedState.cachePool.pool),f!==u&&(i.flags|=2048),a!==null&&Z(ko),null;case 24:return u=null,a!==null&&(u=a.memoizedState.cache),i.memoizedState.cache!==u&&(i.flags|=2048),Is(kn),Qt(i),null;case 25:return null;case 30:return null}throw Error(r(156,i.tag))}function v4(a,i){switch(kg(i),i.tag){case 1:return a=i.flags,a&65536?(i.flags=a&-65537|128,i):null;case 3:return Is(kn),ge(),a=i.flags,(a&65536)!==0&&(a&128)===0?(i.flags=a&-65537|128,i):null;case 26:case 27:case 5:return be(i),null;case 13:if(Ds(i),a=i.memoizedState,a!==null&&a.dehydrated!==null){if(i.alternate===null)throw Error(r(340));fu()}return a=i.flags,a&65536?(i.flags=a&-65537|128,i):null;case 19:return Z(Rn),null;case 4:return ge(),null;case 10:return Is(i.type),null;case 22:case 23:return Ds(i),Fg(),a!==null&&Z(ko),a=i.flags,a&65536?(i.flags=a&-65537|128,i):null;case 24:return Is(kn),null;case 25:return null;default:return null}}function yN(a,i){switch(kg(i),i.tag){case 3:Is(kn),ge();break;case 26:case 27:case 5:be(i);break;case 4:ge();break;case 13:Ds(i);break;case 19:Z(Rn);break;case 10:Is(i.type);break;case 22:case 23:Ds(i),Fg(),a!==null&&Z(ko);break;case 24:Is(kn)}}function ku(a,i){try{var u=i.updateQueue,f=u!==null?u.lastEffect:null;if(f!==null){var x=f.next;u=x;do{if((u.tag&a)===a){f=void 0;var w=u.create,k=u.inst;f=w(),k.destroy=f}u=u.next}while(u!==x)}}catch(D){It(i,i.return,D)}}function wi(a,i,u){try{var f=i.updateQueue,x=f!==null?f.lastEffect:null;if(x!==null){var w=x.next;f=w;do{if((f.tag&a)===a){var k=f.inst,D=k.destroy;if(D!==void 0){k.destroy=void 0,x=i;var G=u,ne=D;try{ne()}catch(ue){It(x,G,ue)}}}f=f.next}while(f!==w)}}catch(ue){It(i,i.return,ue)}}function xN(a){var i=a.updateQueue;if(i!==null){var u=a.stateNode;try{sC(i,u)}catch(f){It(a,a.return,f)}}}function vN(a,i,u){u.props=Po(a.type,a.memoizedProps),u.state=a.memoizedState;try{u.componentWillUnmount()}catch(f){It(a,i,f)}}function Ru(a,i){try{var u=a.ref;if(u!==null){switch(a.tag){case 26:case 27:case 5:var f=a.stateNode;break;case 30:f=a.stateNode;break;default:f=a.stateNode}typeof u=="function"?a.refCleanup=u(f):u.current=f}}catch(x){It(a,i,x)}}function cs(a,i){var u=a.ref,f=a.refCleanup;if(u!==null)if(typeof f=="function")try{f()}catch(x){It(a,i,x)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(x){It(a,i,x)}else u.current=null}function bN(a){var i=a.type,u=a.memoizedProps,f=a.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":u.autoFocus&&f.focus();break e;case"img":u.src?f.src=u.src:u.srcSet&&(f.srcset=u.srcSet)}}catch(x){It(a,a.return,x)}}function yy(a,i,u){try{var f=a.stateNode;z4(f,a.type,u,i),f[ct]=i}catch(x){It(a,a.return,x)}}function wN(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&ki(a.type)||a.tag===4}function xy(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||wN(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&ki(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function vy(a,i,u){var f=a.tag;if(f===5||f===6)a=a.stateNode,i?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(a,i):(i=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,i.appendChild(a),u=u._reactRootContainer,u!=null||i.onclick!==null||(i.onclick=pm));else if(f!==4&&(f===27&&ki(a.type)&&(u=a.stateNode,i=null),a=a.child,a!==null))for(vy(a,i,u),a=a.sibling;a!==null;)vy(a,i,u),a=a.sibling}function rm(a,i,u){var f=a.tag;if(f===5||f===6)a=a.stateNode,i?u.insertBefore(a,i):u.appendChild(a);else if(f!==4&&(f===27&&ki(a.type)&&(u=a.stateNode),a=a.child,a!==null))for(rm(a,i,u),a=a.sibling;a!==null;)rm(a,i,u),a=a.sibling}function SN(a){var i=a.stateNode,u=a.memoizedProps;try{for(var f=a.type,x=i.attributes;x.length;)i.removeAttributeNode(x[0]);Jn(i,f,u),i[Ke]=a,i[ct]=u}catch(w){It(a,a.return,w)}}var Us=!1,un=!1,by=!1,CN=typeof WeakSet=="function"?WeakSet:Set,Un=null;function b4(a,i){if(a=a.containerInfo,$y=wm,a=I1(a),xg(a)){if("selectionStart"in a)var u={start:a.selectionStart,end:a.selectionEnd};else e:{u=(u=a.ownerDocument)&&u.defaultView||window;var f=u.getSelection&&u.getSelection();if(f&&f.rangeCount!==0){u=f.anchorNode;var x=f.anchorOffset,w=f.focusNode;f=f.focusOffset;try{u.nodeType,w.nodeType}catch{u=null;break e}var k=0,D=-1,G=-1,ne=0,ue=0,me=a,ae=null;t:for(;;){for(var se;me!==u||x!==0&&me.nodeType!==3||(D=k+x),me!==w||f!==0&&me.nodeType!==3||(G=k+f),me.nodeType===3&&(k+=me.nodeValue.length),(se=me.firstChild)!==null;)ae=me,me=se;for(;;){if(me===a)break t;if(ae===u&&++ne===x&&(D=k),ae===w&&++ue===f&&(G=k),(se=me.nextSibling)!==null)break;me=ae,ae=me.parentNode}me=se}u=D===-1||G===-1?null:{start:D,end:G}}else u=null}u=u||{start:0,end:0}}else u=null;for(Hy={focusedElem:a,selectionRange:u},wm=!1,Un=i;Un!==null;)if(i=Un,a=i.child,(i.subtreeFlags&1024)!==0&&a!==null)a.return=i,Un=a;else for(;Un!==null;){switch(i=Un,w=i.alternate,a=i.flags,i.tag){case 0:break;case 11:case 15:break;case 1:if((a&1024)!==0&&w!==null){a=void 0,u=i,x=w.memoizedProps,w=w.memoizedState,f=u.stateNode;try{var $e=Po(u.type,x,u.elementType===u.type);a=f.getSnapshotBeforeUpdate($e,w),f.__reactInternalSnapshotBeforeUpdate=a}catch(De){It(u,u.return,De)}}break;case 3:if((a&1024)!==0){if(a=i.stateNode.containerInfo,u=a.nodeType,u===9)Yy(a);else if(u===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":Yy(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(r(163))}if(a=i.sibling,a!==null){a.return=i.return,Un=a;break}Un=i.return}}function NN(a,i,u){var f=u.flags;switch(u.tag){case 0:case 11:case 15:Si(a,u),f&4&&ku(5,u);break;case 1:if(Si(a,u),f&4)if(a=u.stateNode,i===null)try{a.componentDidMount()}catch(k){It(u,u.return,k)}else{var x=Po(u.type,i.memoizedProps);i=i.memoizedState;try{a.componentDidUpdate(x,i,a.__reactInternalSnapshotBeforeUpdate)}catch(k){It(u,u.return,k)}}f&64&&xN(u),f&512&&Ru(u,u.return);break;case 3:if(Si(a,u),f&64&&(a=u.updateQueue,a!==null)){if(i=null,u.child!==null)switch(u.child.tag){case 27:case 5:i=u.child.stateNode;break;case 1:i=u.child.stateNode}try{sC(a,i)}catch(k){It(u,u.return,k)}}break;case 27:i===null&&f&4&&SN(u);case 26:case 5:Si(a,u),i===null&&f&4&&bN(u),f&512&&Ru(u,u.return);break;case 12:Si(a,u);break;case 13:Si(a,u),f&4&&jN(a,u),f&64&&(a=u.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(u=k4.bind(null,u),K4(a,u))));break;case 22:if(f=u.memoizedState!==null||Us,!f){i=i!==null&&i.memoizedState!==null||un,x=Us;var w=un;Us=f,(un=i)&&!w?Ci(a,u,(u.subtreeFlags&8772)!==0):Si(a,u),Us=x,un=w}break;case 30:break;default:Si(a,u)}}function AN(a){var i=a.alternate;i!==null&&(a.alternate=null,AN(i)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(i=a.stateNode,i!==null&&Ja(i)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var $t=null,Tr=!1;function zs(a,i,u){for(u=u.child;u!==null;)EN(a,i,u),u=u.sibling}function EN(a,i,u){if(jt&&typeof jt.onCommitFiberUnmount=="function")try{jt.onCommitFiberUnmount(Ar,u)}catch{}switch(u.tag){case 26:un||cs(u,i),zs(a,i,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:un||cs(u,i);var f=$t,x=Tr;ki(u.type)&&($t=u.stateNode,Tr=!1),zs(a,i,u),Uu(u.stateNode),$t=f,Tr=x;break;case 5:un||cs(u,i);case 6:if(f=$t,x=Tr,$t=null,zs(a,i,u),$t=f,Tr=x,$t!==null)if(Tr)try{($t.nodeType===9?$t.body:$t.nodeName==="HTML"?$t.ownerDocument.body:$t).removeChild(u.stateNode)}catch(w){It(u,i,w)}else try{$t.removeChild(u.stateNode)}catch(w){It(u,i,w)}break;case 18:$t!==null&&(Tr?(a=$t,pA(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,u.stateNode),Ku(a)):pA($t,u.stateNode));break;case 4:f=$t,x=Tr,$t=u.stateNode.containerInfo,Tr=!0,zs(a,i,u),$t=f,Tr=x;break;case 0:case 11:case 14:case 15:un||wi(2,u,i),un||wi(4,u,i),zs(a,i,u);break;case 1:un||(cs(u,i),f=u.stateNode,typeof f.componentWillUnmount=="function"&&vN(u,i,f)),zs(a,i,u);break;case 21:zs(a,i,u);break;case 22:un=(f=un)||u.memoizedState!==null,zs(a,i,u),un=f;break;default:zs(a,i,u)}}function jN(a,i){if(i.memoizedState===null&&(a=i.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{Ku(a)}catch(u){It(i,i.return,u)}}function w4(a){switch(a.tag){case 13:case 19:var i=a.stateNode;return i===null&&(i=a.stateNode=new CN),i;case 22:return a=a.stateNode,i=a._retryCache,i===null&&(i=a._retryCache=new CN),i;default:throw Error(r(435,a.tag))}}function wy(a,i){var u=w4(a);i.forEach(function(f){var x=R4.bind(null,a,f);u.has(f)||(u.add(f),f.then(x,x))})}function Hr(a,i){var u=i.deletions;if(u!==null)for(var f=0;f<u.length;f++){var x=u[f],w=a,k=i,D=k;e:for(;D!==null;){switch(D.tag){case 27:if(ki(D.type)){$t=D.stateNode,Tr=!1;break e}break;case 5:$t=D.stateNode,Tr=!1;break e;case 3:case 4:$t=D.stateNode.containerInfo,Tr=!0;break e}D=D.return}if($t===null)throw Error(r(160));EN(w,k,x),$t=null,Tr=!1,w=x.alternate,w!==null&&(w.return=null),x.return=null}if(i.subtreeFlags&13878)for(i=i.child;i!==null;)TN(i,a),i=i.sibling}var Oa=null;function TN(a,i){var u=a.alternate,f=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:Hr(i,a),Gr(a),f&4&&(wi(3,a,a.return),ku(3,a),wi(5,a,a.return));break;case 1:Hr(i,a),Gr(a),f&512&&(un||u===null||cs(u,u.return)),f&64&&Us&&(a=a.updateQueue,a!==null&&(f=a.callbacks,f!==null&&(u=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=u===null?f:u.concat(f))));break;case 26:var x=Oa;if(Hr(i,a),Gr(a),f&512&&(un||u===null||cs(u,u.return)),f&4){var w=u!==null?u.memoizedState:null;if(f=a.memoizedState,u===null)if(f===null)if(a.stateNode===null){e:{f=a.type,u=a.memoizedProps,x=x.ownerDocument||x;t:switch(f){case"title":w=x.getElementsByTagName("title")[0],(!w||w[zr]||w[Ke]||w.namespaceURI==="http://www.w3.org/2000/svg"||w.hasAttribute("itemprop"))&&(w=x.createElement(f),x.head.insertBefore(w,x.querySelector("head > title"))),Jn(w,f,u),w[Ke]=a,Wt(w),f=w;break e;case"link":var k=SA("link","href",x).get(f+(u.href||""));if(k){for(var D=0;D<k.length;D++)if(w=k[D],w.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&w.getAttribute("rel")===(u.rel==null?null:u.rel)&&w.getAttribute("title")===(u.title==null?null:u.title)&&w.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){k.splice(D,1);break t}}w=x.createElement(f),Jn(w,f,u),x.head.appendChild(w);break;case"meta":if(k=SA("meta","content",x).get(f+(u.content||""))){for(D=0;D<k.length;D++)if(w=k[D],w.getAttribute("content")===(u.content==null?null:""+u.content)&&w.getAttribute("name")===(u.name==null?null:u.name)&&w.getAttribute("property")===(u.property==null?null:u.property)&&w.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&w.getAttribute("charset")===(u.charSet==null?null:u.charSet)){k.splice(D,1);break t}}w=x.createElement(f),Jn(w,f,u),x.head.appendChild(w);break;default:throw Error(r(468,f))}w[Ke]=a,Wt(w),f=w}a.stateNode=f}else CA(x,a.type,a.stateNode);else a.stateNode=wA(x,f,a.memoizedProps);else w!==f?(w===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):w.count--,f===null?CA(x,a.type,a.stateNode):wA(x,f,a.memoizedProps)):f===null&&a.stateNode!==null&&yy(a,a.memoizedProps,u.memoizedProps)}break;case 27:Hr(i,a),Gr(a),f&512&&(un||u===null||cs(u,u.return)),u!==null&&f&4&&yy(a,a.memoizedProps,u.memoizedProps);break;case 5:if(Hr(i,a),Gr(a),f&512&&(un||u===null||cs(u,u.return)),a.flags&32){x=a.stateNode;try{hr(x,"")}catch(se){It(a,a.return,se)}}f&4&&a.stateNode!=null&&(x=a.memoizedProps,yy(a,x,u!==null?u.memoizedProps:x)),f&1024&&(by=!0);break;case 6:if(Hr(i,a),Gr(a),f&4){if(a.stateNode===null)throw Error(r(162));f=a.memoizedProps,u=a.stateNode;try{u.nodeValue=f}catch(se){It(a,a.return,se)}}break;case 3:if(xm=null,x=Oa,Oa=gm(i.containerInfo),Hr(i,a),Oa=x,Gr(a),f&4&&u!==null&&u.memoizedState.isDehydrated)try{Ku(i.containerInfo)}catch(se){It(a,a.return,se)}by&&(by=!1,kN(a));break;case 4:f=Oa,Oa=gm(a.stateNode.containerInfo),Hr(i,a),Gr(a),Oa=f;break;case 12:Hr(i,a),Gr(a);break;case 13:Hr(i,a),Gr(a),a.child.flags&8192&&a.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(jy=pt()),f&4&&(f=a.updateQueue,f!==null&&(a.updateQueue=null,wy(a,f)));break;case 22:x=a.memoizedState!==null;var G=u!==null&&u.memoizedState!==null,ne=Us,ue=un;if(Us=ne||x,un=ue||G,Hr(i,a),un=ue,Us=ne,Gr(a),f&8192)e:for(i=a.stateNode,i._visibility=x?i._visibility&-2:i._visibility|1,x&&(u===null||G||Us||un||Oo(a)),u=null,i=a;;){if(i.tag===5||i.tag===26){if(u===null){G=u=i;try{if(w=G.stateNode,x)k=w.style,typeof k.setProperty=="function"?k.setProperty("display","none","important"):k.display="none";else{D=G.stateNode;var me=G.memoizedProps.style,ae=me!=null&&me.hasOwnProperty("display")?me.display:null;D.style.display=ae==null||typeof ae=="boolean"?"":(""+ae).trim()}}catch(se){It(G,G.return,se)}}}else if(i.tag===6){if(u===null){G=i;try{G.stateNode.nodeValue=x?"":G.memoizedProps}catch(se){It(G,G.return,se)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===a)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===a)break e;for(;i.sibling===null;){if(i.return===null||i.return===a)break e;u===i&&(u=null),i=i.return}u===i&&(u=null),i.sibling.return=i.return,i=i.sibling}f&4&&(f=a.updateQueue,f!==null&&(u=f.retryQueue,u!==null&&(f.retryQueue=null,wy(a,u))));break;case 19:Hr(i,a),Gr(a),f&4&&(f=a.updateQueue,f!==null&&(a.updateQueue=null,wy(a,f)));break;case 30:break;case 21:break;default:Hr(i,a),Gr(a)}}function Gr(a){var i=a.flags;if(i&2){try{for(var u,f=a.return;f!==null;){if(wN(f)){u=f;break}f=f.return}if(u==null)throw Error(r(160));switch(u.tag){case 27:var x=u.stateNode,w=xy(a);rm(a,w,x);break;case 5:var k=u.stateNode;u.flags&32&&(hr(k,""),u.flags&=-33);var D=xy(a);rm(a,D,k);break;case 3:case 4:var G=u.stateNode.containerInfo,ne=xy(a);vy(a,ne,G);break;default:throw Error(r(161))}}catch(ue){It(a,a.return,ue)}a.flags&=-3}i&4096&&(a.flags&=-4097)}function kN(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var i=a;kN(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),a=a.sibling}}function Si(a,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)NN(a,i.alternate,i),i=i.sibling}function Oo(a){for(a=a.child;a!==null;){var i=a;switch(i.tag){case 0:case 11:case 14:case 15:wi(4,i,i.return),Oo(i);break;case 1:cs(i,i.return);var u=i.stateNode;typeof u.componentWillUnmount=="function"&&vN(i,i.return,u),Oo(i);break;case 27:Uu(i.stateNode);case 26:case 5:cs(i,i.return),Oo(i);break;case 22:i.memoizedState===null&&Oo(i);break;case 30:Oo(i);break;default:Oo(i)}a=a.sibling}}function Ci(a,i,u){for(u=u&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var f=i.alternate,x=a,w=i,k=w.flags;switch(w.tag){case 0:case 11:case 15:Ci(x,w,u),ku(4,w);break;case 1:if(Ci(x,w,u),f=w,x=f.stateNode,typeof x.componentDidMount=="function")try{x.componentDidMount()}catch(ne){It(f,f.return,ne)}if(f=w,x=f.updateQueue,x!==null){var D=f.stateNode;try{var G=x.shared.hiddenCallbacks;if(G!==null)for(x.shared.hiddenCallbacks=null,x=0;x<G.length;x++)aC(G[x],D)}catch(ne){It(f,f.return,ne)}}u&&k&64&&xN(w),Ru(w,w.return);break;case 27:SN(w);case 26:case 5:Ci(x,w,u),u&&f===null&&k&4&&bN(w),Ru(w,w.return);break;case 12:Ci(x,w,u);break;case 13:Ci(x,w,u),u&&k&4&&jN(x,w);break;case 22:w.memoizedState===null&&Ci(x,w,u),Ru(w,w.return);break;case 30:break;default:Ci(x,w,u)}i=i.sibling}}function Sy(a,i){var u=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),a=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(a=i.memoizedState.cachePool.pool),a!==u&&(a!=null&&a.refCount++,u!=null&&hu(u))}function Cy(a,i){a=null,i.alternate!==null&&(a=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==a&&(i.refCount++,a!=null&&hu(a))}function us(a,i,u,f){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)RN(a,i,u,f),i=i.sibling}function RN(a,i,u,f){var x=i.flags;switch(i.tag){case 0:case 11:case 15:us(a,i,u,f),x&2048&&ku(9,i);break;case 1:us(a,i,u,f);break;case 3:us(a,i,u,f),x&2048&&(a=null,i.alternate!==null&&(a=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==a&&(i.refCount++,a!=null&&hu(a)));break;case 12:if(x&2048){us(a,i,u,f),a=i.stateNode;try{var w=i.memoizedProps,k=w.id,D=w.onPostCommit;typeof D=="function"&&D(k,i.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(G){It(i,i.return,G)}}else us(a,i,u,f);break;case 13:us(a,i,u,f);break;case 23:break;case 22:w=i.stateNode,k=i.alternate,i.memoizedState!==null?w._visibility&2?us(a,i,u,f):Pu(a,i):w._visibility&2?us(a,i,u,f):(w._visibility|=2,zl(a,i,u,f,(i.subtreeFlags&10256)!==0)),x&2048&&Sy(k,i);break;case 24:us(a,i,u,f),x&2048&&Cy(i.alternate,i);break;default:us(a,i,u,f)}}function zl(a,i,u,f,x){for(x=x&&(i.subtreeFlags&10256)!==0,i=i.child;i!==null;){var w=a,k=i,D=u,G=f,ne=k.flags;switch(k.tag){case 0:case 11:case 15:zl(w,k,D,G,x),ku(8,k);break;case 23:break;case 22:var ue=k.stateNode;k.memoizedState!==null?ue._visibility&2?zl(w,k,D,G,x):Pu(w,k):(ue._visibility|=2,zl(w,k,D,G,x)),x&&ne&2048&&Sy(k.alternate,k);break;case 24:zl(w,k,D,G,x),x&&ne&2048&&Cy(k.alternate,k);break;default:zl(w,k,D,G,x)}i=i.sibling}}function Pu(a,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var u=a,f=i,x=f.flags;switch(f.tag){case 22:Pu(u,f),x&2048&&Sy(f.alternate,f);break;case 24:Pu(u,f),x&2048&&Cy(f.alternate,f);break;default:Pu(u,f)}i=i.sibling}}var Ou=8192;function Vl(a){if(a.subtreeFlags&Ou)for(a=a.child;a!==null;)PN(a),a=a.sibling}function PN(a){switch(a.tag){case 26:Vl(a),a.flags&Ou&&a.memoizedState!==null&&iq(Oa,a.memoizedState,a.memoizedProps);break;case 5:Vl(a);break;case 3:case 4:var i=Oa;Oa=gm(a.stateNode.containerInfo),Vl(a),Oa=i;break;case 22:a.memoizedState===null&&(i=a.alternate,i!==null&&i.memoizedState!==null?(i=Ou,Ou=16777216,Vl(a),Ou=i):Vl(a));break;default:Vl(a)}}function ON(a){var i=a.alternate;if(i!==null&&(a=i.child,a!==null)){i.child=null;do i=a.sibling,a.sibling=null,a=i;while(a!==null)}}function _u(a){var i=a.deletions;if((a.flags&16)!==0){if(i!==null)for(var u=0;u<i.length;u++){var f=i[u];Un=f,IN(f,a)}ON(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)_N(a),a=a.sibling}function _N(a){switch(a.tag){case 0:case 11:case 15:_u(a),a.flags&2048&&wi(9,a,a.return);break;case 3:_u(a);break;case 12:_u(a);break;case 22:var i=a.stateNode;a.memoizedState!==null&&i._visibility&2&&(a.return===null||a.return.tag!==13)?(i._visibility&=-3,am(a)):_u(a);break;default:_u(a)}}function am(a){var i=a.deletions;if((a.flags&16)!==0){if(i!==null)for(var u=0;u<i.length;u++){var f=i[u];Un=f,IN(f,a)}ON(a)}for(a=a.child;a!==null;){switch(i=a,i.tag){case 0:case 11:case 15:wi(8,i,i.return),am(i);break;case 22:u=i.stateNode,u._visibility&2&&(u._visibility&=-3,am(i));break;default:am(i)}a=a.sibling}}function IN(a,i){for(;Un!==null;){var u=Un;switch(u.tag){case 0:case 11:case 15:wi(8,u,i);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var f=u.memoizedState.cachePool.pool;f!=null&&f.refCount++}break;case 24:hu(u.memoizedState.cache)}if(f=u.child,f!==null)f.return=u,Un=f;else e:for(u=a;Un!==null;){f=Un;var x=f.sibling,w=f.return;if(AN(f),f===u){Un=null;break e}if(x!==null){x.return=w,Un=x;break e}Un=w}}}var S4={getCacheForType:function(a){var i=sr(kn),u=i.data.get(a);return u===void 0&&(u=a(),i.data.set(a,u)),u}},C4=typeof WeakMap=="function"?WeakMap:Map,Nt=0,Dt=null,rt=null,ut=0,At=0,Kr=null,Ni=!1,Bl=!1,Ny=!1,Vs=0,en=0,Ai=0,_o=0,Ay=0,la=0,Fl=0,Iu=null,kr=null,Ey=!1,jy=0,sm=1/0,im=null,Ei=null,Zn=0,ji=null,$l=null,Hl=0,Ty=0,ky=null,MN=null,Mu=0,Ry=null;function Yr(){if((Nt&2)!==0&&ut!==0)return ut&-ut;if(I.T!==null){var a=Ol;return a!==0?a:Ly()}return st()}function DN(){la===0&&(la=(ut&536870912)===0||wt?Se():536870912);var a=oa.current;return a!==null&&(a.flags|=32),la}function Wr(a,i,u){(a===Dt&&(At===2||At===9)||a.cancelPendingCommit!==null)&&(Gl(a,0),Ti(a,ut,la,!1)),Fe(a,u),((Nt&2)===0||a!==Dt)&&(a===Dt&&((Nt&2)===0&&(_o|=u),en===4&&Ti(a,ut,la,!1)),ds(a))}function LN(a,i,u){if((Nt&6)!==0)throw Error(r(327));var f=!u&&(i&124)===0&&(i&a.expiredLanes)===0||Kn(a,i),x=f?E4(a,i):_y(a,i,!0),w=f;do{if(x===0){Bl&&!f&&Ti(a,i,0,!1);break}else{if(u=a.current.alternate,w&&!N4(u)){x=_y(a,i,!1),w=!1;continue}if(x===2){if(w=i,a.errorRecoveryDisabledLanes&w)var k=0;else k=a.pendingLanes&-536870913,k=k!==0?k:k&536870912?536870912:0;if(k!==0){i=k;e:{var D=a;x=Iu;var G=D.current.memoizedState.isDehydrated;if(G&&(Gl(D,k).flags|=256),k=_y(D,k,!1),k!==2){if(Ny&&!G){D.errorRecoveryDisabledLanes|=w,_o|=w,x=4;break e}w=kr,kr=x,w!==null&&(kr===null?kr=w:kr.push.apply(kr,w))}x=k}if(w=!1,x!==2)continue}}if(x===1){Gl(a,0),Ti(a,i,0,!0);break}e:{switch(f=a,w=x,w){case 0:case 1:throw Error(r(345));case 4:if((i&4194048)!==i)break;case 6:Ti(f,i,la,!Ni);break e;case 2:kr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((i&62914560)===i&&(x=jy+300-pt(),10<x)){if(Ti(f,i,la,!Ni),qr(f,0,!0)!==0)break e;f.timeoutHandle=fA(qN.bind(null,f,u,kr,im,Ey,i,la,_o,Fl,Ni,w,2,-0,0),x);break e}qN(f,u,kr,im,Ey,i,la,_o,Fl,Ni,w,0,-0,0)}}break}while(!0);ds(a)}function qN(a,i,u,f,x,w,k,D,G,ne,ue,me,ae,se){if(a.timeoutHandle=-1,me=i.subtreeFlags,(me&8192||(me&16785408)===16785408)&&(Bu={stylesheets:null,count:0,unsuspend:sq},PN(i),me=oq(),me!==null)){a.cancelPendingCommit=me(HN.bind(null,a,i,w,u,f,x,k,D,G,ue,1,ae,se)),Ti(a,w,k,!ne);return}HN(a,i,w,u,f,x,k,D,G)}function N4(a){for(var i=a;;){var u=i.tag;if((u===0||u===11||u===15)&&i.flags&16384&&(u=i.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var f=0;f<u.length;f++){var x=u[f],w=x.getSnapshot;x=x.value;try{if(!Fr(w(),x))return!1}catch{return!1}}if(u=i.child,i.subtreeFlags&16384&&u!==null)u.return=i,i=u;else{if(i===a)break;for(;i.sibling===null;){if(i.return===null||i.return===a)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function Ti(a,i,u,f){i&=~Ay,i&=~_o,a.suspendedLanes|=i,a.pingedLanes&=~i,f&&(a.warmLanes|=i),f=a.expirationTimes;for(var x=i;0<x;){var w=31-Kt(x),k=1<<w;f[w]=-1,x&=~k}u!==0&&Ot(a,u,i)}function om(){return(Nt&6)===0?(Du(0),!1):!0}function Py(){if(rt!==null){if(At===0)var a=rt.return;else a=rt,_s=jo=null,Yg(a),ql=null,Eu=0,a=rt;for(;a!==null;)yN(a.alternate,a),a=a.return;rt=null}}function Gl(a,i){var u=a.timeoutHandle;u!==-1&&(a.timeoutHandle=-1,B4(u)),u=a.cancelPendingCommit,u!==null&&(a.cancelPendingCommit=null,u()),Py(),Dt=a,rt=u=Rs(a.current,null),ut=i,At=0,Kr=null,Ni=!1,Bl=Kn(a,i),Ny=!1,Fl=la=Ay=_o=Ai=en=0,kr=Iu=null,Ey=!1,(i&8)!==0&&(i|=i&32);var f=a.entangledLanes;if(f!==0)for(a=a.entanglements,f&=i;0<f;){var x=31-Kt(f),w=1<<x;i|=a[x],f&=~w}return Vs=i,kf(),u}function UN(a,i){Ze=null,I.H=Yf,i===yu||i===qf?(i=nC(),At=3):i===J1?(i=nC(),At=4):At=i===rN?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,Kr=i,rt===null&&(en=1,Jf(a,ra(i,a.current)))}function zN(){var a=I.H;return I.H=Yf,a===null?Yf:a}function VN(){var a=I.A;return I.A=S4,a}function Oy(){en=4,Ni||(ut&4194048)!==ut&&oa.current!==null||(Bl=!0),(Ai&134217727)===0&&(_o&134217727)===0||Dt===null||Ti(Dt,ut,la,!1)}function _y(a,i,u){var f=Nt;Nt|=2;var x=zN(),w=VN();(Dt!==a||ut!==i)&&(im=null,Gl(a,i)),i=!1;var k=en;e:do try{if(At!==0&&rt!==null){var D=rt,G=Kr;switch(At){case 8:Py(),k=6;break e;case 3:case 2:case 9:case 6:oa.current===null&&(i=!0);var ne=At;if(At=0,Kr=null,Kl(a,D,G,ne),u&&Bl){k=0;break e}break;default:ne=At,At=0,Kr=null,Kl(a,D,G,ne)}}A4(),k=en;break}catch(ue){UN(a,ue)}while(!0);return i&&a.shellSuspendCounter++,_s=jo=null,Nt=f,I.H=x,I.A=w,rt===null&&(Dt=null,ut=0,kf()),k}function A4(){for(;rt!==null;)BN(rt)}function E4(a,i){var u=Nt;Nt|=2;var f=zN(),x=VN();Dt!==a||ut!==i?(im=null,sm=pt()+500,Gl(a,i)):Bl=Kn(a,i);e:do try{if(At!==0&&rt!==null){i=rt;var w=Kr;t:switch(At){case 1:At=0,Kr=null,Kl(a,i,w,1);break;case 2:case 9:if(eC(w)){At=0,Kr=null,FN(i);break}i=function(){At!==2&&At!==9||Dt!==a||(At=7),ds(a)},w.then(i,i);break e;case 3:At=7;break e;case 4:At=5;break e;case 7:eC(w)?(At=0,Kr=null,FN(i)):(At=0,Kr=null,Kl(a,i,w,7));break;case 5:var k=null;switch(rt.tag){case 26:k=rt.memoizedState;case 5:case 27:var D=rt;if(!k||NA(k)){At=0,Kr=null;var G=D.sibling;if(G!==null)rt=G;else{var ne=D.return;ne!==null?(rt=ne,lm(ne)):rt=null}break t}}At=0,Kr=null,Kl(a,i,w,5);break;case 6:At=0,Kr=null,Kl(a,i,w,6);break;case 8:Py(),en=6;break e;default:throw Error(r(462))}}j4();break}catch(ue){UN(a,ue)}while(!0);return _s=jo=null,I.H=f,I.A=x,Nt=u,rt!==null?0:(Dt=null,ut=0,kf(),en)}function j4(){for(;rt!==null&&!Ct();)BN(rt)}function BN(a){var i=hN(a.alternate,a,Vs);a.memoizedProps=a.pendingProps,i===null?lm(a):rt=i}function FN(a){var i=a,u=i.alternate;switch(i.tag){case 15:case 0:i=cN(u,i,i.pendingProps,i.type,void 0,ut);break;case 11:i=cN(u,i,i.pendingProps,i.type.render,i.ref,ut);break;case 5:Yg(i);default:yN(u,i),i=rt=$1(i,Vs),i=hN(u,i,Vs)}a.memoizedProps=a.pendingProps,i===null?lm(a):rt=i}function Kl(a,i,u,f){_s=jo=null,Yg(i),ql=null,Eu=0;var x=i.return;try{if(g4(a,x,i,u,ut)){en=1,Jf(a,ra(u,a.current)),rt=null;return}}catch(w){if(x!==null)throw rt=x,w;en=1,Jf(a,ra(u,a.current)),rt=null;return}i.flags&32768?(wt||f===1?a=!0:Bl||(ut&536870912)!==0?a=!1:(Ni=a=!0,(f===2||f===9||f===3||f===6)&&(f=oa.current,f!==null&&f.tag===13&&(f.flags|=16384))),$N(i,a)):lm(i)}function lm(a){var i=a;do{if((i.flags&32768)!==0){$N(i,Ni);return}a=i.return;var u=x4(i.alternate,i,Vs);if(u!==null){rt=u;return}if(i=i.sibling,i!==null){rt=i;return}rt=i=a}while(i!==null);en===0&&(en=5)}function $N(a,i){do{var u=v4(a.alternate,a);if(u!==null){u.flags&=32767,rt=u;return}if(u=a.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!i&&(a=a.sibling,a!==null)){rt=a;return}rt=a=u}while(a!==null);en=6,rt=null}function HN(a,i,u,f,x,w,k,D,G){a.cancelPendingCommit=null;do cm();while(Zn!==0);if((Nt&6)!==0)throw Error(r(327));if(i!==null){if(i===a.current)throw Error(r(177));if(w=i.lanes|i.childLanes,w|=Cg,ht(a,u,w,k,D,G),a===Dt&&(rt=Dt=null,ut=0),$l=i,ji=a,Hl=u,Ty=w,ky=x,MN=f,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,P4(He,function(){return QN(),null})):(a.callbackNode=null,a.callbackPriority=0),f=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||f){f=I.T,I.T=null,x=O.p,O.p=2,k=Nt,Nt|=4;try{b4(a,i,u)}finally{Nt=k,O.p=x,I.T=f}}Zn=1,GN(),KN(),YN()}}function GN(){if(Zn===1){Zn=0;var a=ji,i=$l,u=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||u){u=I.T,I.T=null;var f=O.p;O.p=2;var x=Nt;Nt|=4;try{TN(i,a);var w=Hy,k=I1(a.containerInfo),D=w.focusedElem,G=w.selectionRange;if(k!==D&&D&&D.ownerDocument&&_1(D.ownerDocument.documentElement,D)){if(G!==null&&xg(D)){var ne=G.start,ue=G.end;if(ue===void 0&&(ue=ne),"selectionStart"in D)D.selectionStart=ne,D.selectionEnd=Math.min(ue,D.value.length);else{var me=D.ownerDocument||document,ae=me&&me.defaultView||window;if(ae.getSelection){var se=ae.getSelection(),$e=D.textContent.length,De=Math.min(G.start,$e),Pt=G.end===void 0?De:Math.min(G.end,$e);!se.extend&&De>Pt&&(k=Pt,Pt=De,De=k);var J=O1(D,De),X=O1(D,Pt);if(J&&X&&(se.rangeCount!==1||se.anchorNode!==J.node||se.anchorOffset!==J.offset||se.focusNode!==X.node||se.focusOffset!==X.offset)){var te=me.createRange();te.setStart(J.node,J.offset),se.removeAllRanges(),De>Pt?(se.addRange(te),se.extend(X.node,X.offset)):(te.setEnd(X.node,X.offset),se.addRange(te))}}}}for(me=[],se=D;se=se.parentNode;)se.nodeType===1&&me.push({element:se,left:se.scrollLeft,top:se.scrollTop});for(typeof D.focus=="function"&&D.focus(),D=0;D<me.length;D++){var fe=me[D];fe.element.scrollLeft=fe.left,fe.element.scrollTop=fe.top}}wm=!!$y,Hy=$y=null}finally{Nt=x,O.p=f,I.T=u}}a.current=i,Zn=2}}function KN(){if(Zn===2){Zn=0;var a=ji,i=$l,u=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||u){u=I.T,I.T=null;var f=O.p;O.p=2;var x=Nt;Nt|=4;try{NN(a,i.alternate,i)}finally{Nt=x,O.p=f,I.T=u}}Zn=3}}function YN(){if(Zn===4||Zn===3){Zn=0,Ft();var a=ji,i=$l,u=Hl,f=MN;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?Zn=5:(Zn=0,$l=ji=null,WN(a,a.pendingLanes));var x=a.pendingLanes;if(x===0&&(Ei=null),Ye(u),i=i.stateNode,jt&&typeof jt.onCommitFiberRoot=="function")try{jt.onCommitFiberRoot(Ar,i,void 0,(i.current.flags&128)===128)}catch{}if(f!==null){i=I.T,x=O.p,O.p=2,I.T=null;try{for(var w=a.onRecoverableError,k=0;k<f.length;k++){var D=f[k];w(D.value,{componentStack:D.stack})}}finally{I.T=i,O.p=x}}(Hl&3)!==0&&cm(),ds(a),x=a.pendingLanes,(u&4194090)!==0&&(x&42)!==0?a===Ry?Mu++:(Mu=0,Ry=a):Mu=0,Du(0)}}function WN(a,i){(a.pooledCacheLanes&=i)===0&&(i=a.pooledCache,i!=null&&(a.pooledCache=null,hu(i)))}function cm(a){return GN(),KN(),YN(),QN()}function QN(){if(Zn!==5)return!1;var a=ji,i=Ty;Ty=0;var u=Ye(Hl),f=I.T,x=O.p;try{O.p=32>u?32:u,I.T=null,u=ky,ky=null;var w=ji,k=Hl;if(Zn=0,$l=ji=null,Hl=0,(Nt&6)!==0)throw Error(r(331));var D=Nt;if(Nt|=4,_N(w.current),RN(w,w.current,k,u),Nt=D,Du(0,!1),jt&&typeof jt.onPostCommitFiberRoot=="function")try{jt.onPostCommitFiberRoot(Ar,w)}catch{}return!0}finally{O.p=x,I.T=f,WN(a,i)}}function XN(a,i,u){i=ra(u,i),i=ly(a.stateNode,i,2),a=yi(a,i,2),a!==null&&(Fe(a,2),ds(a))}function It(a,i,u){if(a.tag===3)XN(a,a,u);else for(;i!==null;){if(i.tag===3){XN(i,a,u);break}else if(i.tag===1){var f=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(Ei===null||!Ei.has(f))){a=ra(u,a),u=tN(2),f=yi(i,u,2),f!==null&&(nN(u,f,i,a),Fe(f,2),ds(f));break}}i=i.return}}function Iy(a,i,u){var f=a.pingCache;if(f===null){f=a.pingCache=new C4;var x=new Set;f.set(i,x)}else x=f.get(i),x===void 0&&(x=new Set,f.set(i,x));x.has(u)||(Ny=!0,x.add(u),a=T4.bind(null,a,i,u),i.then(a,a))}function T4(a,i,u){var f=a.pingCache;f!==null&&f.delete(i),a.pingedLanes|=a.suspendedLanes&u,a.warmLanes&=~u,Dt===a&&(ut&u)===u&&(en===4||en===3&&(ut&62914560)===ut&&300>pt()-jy?(Nt&2)===0&&Gl(a,0):Ay|=u,Fl===ut&&(Fl=0)),ds(a)}function ZN(a,i){i===0&&(i=Xe()),a=Tl(a,i),a!==null&&(Fe(a,i),ds(a))}function k4(a){var i=a.memoizedState,u=0;i!==null&&(u=i.retryLane),ZN(a,u)}function R4(a,i){var u=0;switch(a.tag){case 13:var f=a.stateNode,x=a.memoizedState;x!==null&&(u=x.retryLane);break;case 19:f=a.stateNode;break;case 22:f=a.stateNode._retryCache;break;default:throw Error(r(314))}f!==null&&f.delete(i),ZN(a,u)}function P4(a,i){return ze(a,i)}var um=null,Yl=null,My=!1,dm=!1,Dy=!1,Io=0;function ds(a){a!==Yl&&a.next===null&&(Yl===null?um=Yl=a:Yl=Yl.next=a),dm=!0,My||(My=!0,_4())}function Du(a,i){if(!Dy&&dm){Dy=!0;do for(var u=!1,f=um;f!==null;){if(a!==0){var x=f.pendingLanes;if(x===0)var w=0;else{var k=f.suspendedLanes,D=f.pingedLanes;w=(1<<31-Kt(42|a)+1)-1,w&=x&~(k&~D),w=w&201326741?w&201326741|1:w?w|2:0}w!==0&&(u=!0,nA(f,w))}else w=ut,w=qr(f,f===Dt?w:0,f.cancelPendingCommit!==null||f.timeoutHandle!==-1),(w&3)===0||Kn(f,w)||(u=!0,nA(f,w));f=f.next}while(u);Dy=!1}}function O4(){JN()}function JN(){dm=My=!1;var a=0;Io!==0&&(V4()&&(a=Io),Io=0);for(var i=pt(),u=null,f=um;f!==null;){var x=f.next,w=eA(f,i);w===0?(f.next=null,u===null?um=x:u.next=x,x===null&&(Yl=u)):(u=f,(a!==0||(w&3)!==0)&&(dm=!0)),f=x}Du(a)}function eA(a,i){for(var u=a.suspendedLanes,f=a.pingedLanes,x=a.expirationTimes,w=a.pendingLanes&-62914561;0<w;){var k=31-Kt(w),D=1<<k,G=x[k];G===-1?((D&u)===0||(D&f)!==0)&&(x[k]=St(D,i)):G<=i&&(a.expiredLanes|=D),w&=~D}if(i=Dt,u=ut,u=qr(a,a===i?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),f=a.callbackNode,u===0||a===i&&(At===2||At===9)||a.cancelPendingCommit!==null)return f!==null&&f!==null&&Ee(f),a.callbackNode=null,a.callbackPriority=0;if((u&3)===0||Kn(a,u)){if(i=u&-u,i===a.callbackPriority)return i;switch(f!==null&&Ee(f),Ye(u)){case 2:case 8:u=xe;break;case 32:u=He;break;case 268435456:u=pn;break;default:u=He}return f=tA.bind(null,a),u=ze(u,f),a.callbackPriority=i,a.callbackNode=u,i}return f!==null&&f!==null&&Ee(f),a.callbackPriority=2,a.callbackNode=null,2}function tA(a,i){if(Zn!==0&&Zn!==5)return a.callbackNode=null,a.callbackPriority=0,null;var u=a.callbackNode;if(cm()&&a.callbackNode!==u)return null;var f=ut;return f=qr(a,a===Dt?f:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),f===0?null:(LN(a,f,i),eA(a,pt()),a.callbackNode!=null&&a.callbackNode===u?tA.bind(null,a):null)}function nA(a,i){if(cm())return null;LN(a,i,!0)}function _4(){F4(function(){(Nt&6)!==0?ze(Ht,O4):JN()})}function Ly(){return Io===0&&(Io=Se()),Io}function rA(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:We(""+a)}function aA(a,i){var u=i.ownerDocument.createElement("input");return u.name=i.name,u.value=i.value,a.id&&u.setAttribute("form",a.id),i.parentNode.insertBefore(u,i),a=new FormData(a),u.parentNode.removeChild(u),a}function I4(a,i,u,f,x){if(i==="submit"&&u&&u.stateNode===x){var w=rA((x[ct]||null).action),k=f.submitter;k&&(i=(i=k[ct]||null)?rA(i.formAction):k.getAttribute("formAction"),i!==null&&(w=i,k=null));var D=new ho("action","action",null,f,x);a.push({event:D,listeners:[{instance:null,listener:function(){if(f.defaultPrevented){if(Io!==0){var G=k?aA(x,k):new FormData(x);ry(u,{pending:!0,data:G,method:x.method,action:w},null,G)}}else typeof w=="function"&&(D.preventDefault(),G=k?aA(x,k):new FormData(x),ry(u,{pending:!0,data:G,method:x.method,action:w},w,G))},currentTarget:x}]})}}for(var qy=0;qy<Sg.length;qy++){var Uy=Sg[qy],M4=Uy.toLowerCase(),D4=Uy[0].toUpperCase()+Uy.slice(1);Pa(M4,"on"+D4)}Pa(L1,"onAnimationEnd"),Pa(q1,"onAnimationIteration"),Pa(U1,"onAnimationStart"),Pa("dblclick","onDoubleClick"),Pa("focusin","onFocus"),Pa("focusout","onBlur"),Pa(J5,"onTransitionRun"),Pa(e4,"onTransitionStart"),Pa(t4,"onTransitionCancel"),Pa(z1,"onTransitionEnd"),Wn("onMouseEnter",["mouseout","mouseover"]),Wn("onMouseLeave",["mouseout","mouseover"]),Wn("onPointerEnter",["pointerout","pointerover"]),Wn("onPointerLeave",["pointerout","pointerover"]),it("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),it("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),it("onBeforeInput",["compositionend","keypress","textInput","paste"]),it("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),it("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),it("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Lu="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),L4=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Lu));function sA(a,i){i=(i&4)!==0;for(var u=0;u<a.length;u++){var f=a[u],x=f.event;f=f.listeners;e:{var w=void 0;if(i)for(var k=f.length-1;0<=k;k--){var D=f[k],G=D.instance,ne=D.currentTarget;if(D=D.listener,G!==w&&x.isPropagationStopped())break e;w=D,x.currentTarget=ne;try{w(x)}catch(ue){Zf(ue)}x.currentTarget=null,w=G}else for(k=0;k<f.length;k++){if(D=f[k],G=D.instance,ne=D.currentTarget,D=D.listener,G!==w&&x.isPropagationStopped())break e;w=D,x.currentTarget=ne;try{w(x)}catch(ue){Zf(ue)}x.currentTarget=null,w=G}}}}function at(a,i){var u=i[Ur];u===void 0&&(u=i[Ur]=new Set);var f=a+"__bubble";u.has(f)||(iA(i,a,2,!1),u.add(f))}function zy(a,i,u){var f=0;i&&(f|=4),iA(u,a,f,i)}var fm="_reactListening"+Math.random().toString(36).slice(2);function Vy(a){if(!a[fm]){a[fm]=!0,W.forEach(function(u){u!=="selectionchange"&&(L4.has(u)||zy(u,!1,a),zy(u,!0,a))});var i=a.nodeType===9?a:a.ownerDocument;i===null||i[fm]||(i[fm]=!0,zy("selectionchange",!1,i))}}function iA(a,i,u,f){switch(RA(i)){case 2:var x=uq;break;case 8:x=dq;break;default:x=tx}u=x.bind(null,i,u,a),x=void 0,!ru||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(x=!0),f?x!==void 0?a.addEventListener(i,u,{capture:!0,passive:x}):a.addEventListener(i,u,!0):x!==void 0?a.addEventListener(i,u,{passive:x}):a.addEventListener(i,u,!1)}function By(a,i,u,f,x){var w=f;if((i&1)===0&&(i&2)===0&&f!==null)e:for(;;){if(f===null)return;var k=f.tag;if(k===3||k===4){var D=f.stateNode.containerInfo;if(D===x)break;if(k===4)for(k=f.return;k!==null;){var G=k.tag;if((G===3||G===4)&&k.stateNode.containerInfo===x)return;k=k.return}for(;D!==null;){if(k=Ca(D),k===null)return;if(G=k.tag,G===5||G===6||G===26||G===27){f=w=k;continue e}D=D.parentNode}}f=f.return}po(function(){var ne=w,ue=ar(u),me=[];e:{var ae=V1.get(a);if(ae!==void 0){var se=ho,$e=a;switch(a){case"keypress":if(js(u)===0)break e;case"keydown":case"keyup":se=Ef;break;case"focusin":$e="focus",se=is;break;case"focusout":$e="blur",se=is;break;case"beforeblur":case"afterblur":se=is;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":se=Cl;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":se=xo;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":se=z;break;case L1:case q1:case U1:se=mi;break;case z1:se=Ae;break;case"scroll":case"scrollend":se=cg;break;case"wheel":se=_t;break;case"copy":case"cut":case"paste":se=dg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":se=jf;break;case"toggle":case"beforetoggle":se=ln}var De=(i&4)!==0,Pt=!De&&(a==="scroll"||a==="scrollend"),J=De?ae!==null?ae+"Capture":null:ae;De=[];for(var X=ne,te;X!==null;){var fe=X;if(te=fe.stateNode,fe=fe.tag,fe!==5&&fe!==26&&fe!==27||te===null||J===null||(fe=ns(X,J),fe!=null&&De.push(qu(X,fe,te))),Pt)break;X=X.return}0<De.length&&(ae=new se(ae,$e,null,u,ue),me.push({event:ae,listeners:De}))}}if((i&7)===0){e:{if(ae=a==="mouseover"||a==="pointerover",se=a==="mouseout"||a==="pointerout",ae&&u!==nu&&($e=u.relatedTarget||u.fromElement)&&(Ca($e)||$e[Yt]))break e;if((se||ae)&&(ae=ue.window===ue?ue:(ae=ue.ownerDocument)?ae.defaultView||ae.parentWindow:window,se?($e=u.relatedTarget||u.toElement,se=ne,$e=$e?Ca($e):null,$e!==null&&(Pt=l($e),De=$e.tag,$e!==Pt||De!==5&&De!==27&&De!==6)&&($e=null)):(se=null,$e=ne),se!==$e)){if(De=Cl,fe="onMouseLeave",J="onMouseEnter",X="mouse",(a==="pointerout"||a==="pointerover")&&(De=jf,fe="onPointerLeave",J="onPointerEnter",X="pointer"),Pt=se==null?ae:An(se),te=$e==null?ae:An($e),ae=new De(fe,X+"leave",se,u,ue),ae.target=Pt,ae.relatedTarget=te,fe=null,Ca(ue)===ne&&(De=new De(J,X+"enter",$e,u,ue),De.target=te,De.relatedTarget=Pt,fe=De),Pt=fe,se&&$e)t:{for(De=se,J=$e,X=0,te=De;te;te=Wl(te))X++;for(te=0,fe=J;fe;fe=Wl(fe))te++;for(;0<X-te;)De=Wl(De),X--;for(;0<te-X;)J=Wl(J),te--;for(;X--;){if(De===J||J!==null&&De===J.alternate)break t;De=Wl(De),J=Wl(J)}De=null}else De=null;se!==null&&oA(me,ae,se,De,!1),$e!==null&&Pt!==null&&oA(me,Pt,$e,De,!0)}}e:{if(ae=ne?An(ne):window,se=ae.nodeName&&ae.nodeName.toLowerCase(),se==="select"||se==="input"&&ae.type==="file")var ke=E1;else if(N1(ae))if(j1)ke=Q5;else{ke=Y5;var nt=K5}else se=ae.nodeName,!se||se.toLowerCase()!=="input"||ae.type!=="checkbox"&&ae.type!=="radio"?ne&&tu(ne.elementType)&&(ke=E1):ke=W5;if(ke&&(ke=ke(a,ne))){A1(me,ke,u,ue);break e}nt&&nt(a,ae,ne),a==="focusout"&&ne&&ae.type==="number"&&ne.memoizedProps.value!=null&&bl(ae,"number",ae.value)}switch(nt=ne?An(ne):window,a){case"focusin":(N1(nt)||nt.contentEditable==="true")&&(Al=nt,vg=ne,uu=null);break;case"focusout":uu=vg=Al=null;break;case"mousedown":bg=!0;break;case"contextmenu":case"mouseup":case"dragend":bg=!1,M1(me,u,ue);break;case"selectionchange":if(Z5)break;case"keydown":case"keyup":M1(me,u,ue)}var Pe;if(iu)e:{switch(a){case"compositionstart":var qe="onCompositionStart";break e;case"compositionend":qe="onCompositionEnd";break e;case"compositionupdate":qe="onCompositionUpdate";break e}qe=void 0}else Nl?S1(a,u)&&(qe="onCompositionEnd"):a==="keydown"&&u.keyCode===229&&(qe="onCompositionStart");qe&&(Br&&u.locale!=="ko"&&(Nl||qe!=="onCompositionStart"?qe==="onCompositionEnd"&&Nl&&(Pe=bf()):(sn=ue,as="value"in sn?sn.value:sn.textContent,Nl=!0)),nt=mm(ne,qe),0<nt.length&&(qe=new Cf(qe,a,null,u,ue),me.push({event:qe,listeners:nt}),Pe?qe.data=Pe:(Pe=C1(u),Pe!==null&&(qe.data=Pe)))),(Pe=bt?F5(a,u):$5(a,u))&&(qe=mm(ne,"onBeforeInput"),0<qe.length&&(nt=new Cf("onBeforeInput","beforeinput",null,u,ue),me.push({event:nt,listeners:qe}),nt.data=Pe)),I4(me,a,ne,u,ue)}sA(me,i)})}function qu(a,i,u){return{instance:a,listener:i,currentTarget:u}}function mm(a,i){for(var u=i+"Capture",f=[];a!==null;){var x=a,w=x.stateNode;if(x=x.tag,x!==5&&x!==26&&x!==27||w===null||(x=ns(a,u),x!=null&&f.unshift(qu(a,x,w)),x=ns(a,i),x!=null&&f.push(qu(a,x,w))),a.tag===3)return f;a=a.return}return[]}function Wl(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function oA(a,i,u,f,x){for(var w=i._reactName,k=[];u!==null&&u!==f;){var D=u,G=D.alternate,ne=D.stateNode;if(D=D.tag,G!==null&&G===f)break;D!==5&&D!==26&&D!==27||ne===null||(G=ne,x?(ne=ns(u,w),ne!=null&&k.unshift(qu(u,ne,G))):x||(ne=ns(u,w),ne!=null&&k.push(qu(u,ne,G)))),u=u.return}k.length!==0&&a.push({event:i,listeners:k})}var q4=/\r\n?/g,U4=/\u0000|\uFFFD/g;function lA(a){return(typeof a=="string"?a:""+a).replace(q4,` 10`).replace(U4,"")}function cA(a,i){return i=lA(i),lA(a)===i}function pm(){}function Rt(a,i,u,f,x,w){switch(u){case"children":typeof f=="string"?i==="body"||i==="textarea"&&f===""||hr(a,f):(typeof f=="number"||typeof f=="bigint")&&i!=="body"&&hr(a,""+f);break;case"className":Er(a,"class",f);break;case"tabIndex":Er(a,"tabindex",f);break;case"dir":case"role":case"viewBox":case"width":case"height":Er(a,u,f);break;case"style":yf(a,f,w);break;case"data":if(i!=="object"){Er(a,"data",f);break}case"src":case"href":if(f===""&&(i!=="a"||u!=="href")){a.removeAttribute(u);break}if(f==null||typeof f=="function"||typeof f=="symbol"||typeof f=="boolean"){a.removeAttribute(u);break}f=We(""+f),a.setAttribute(u,f);break;case"action":case"formAction":if(typeof f=="function"){a.setAttribute(u,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof w=="function"&&(u==="formAction"?(i!=="input"&&Rt(a,i,"name",x.name,x,null),Rt(a,i,"formEncType",x.formEncType,x,null),Rt(a,i,"formMethod",x.formMethod,x,null),Rt(a,i,"formTarget",x.formTarget,x,null)):(Rt(a,i,"encType",x.encType,x,null),Rt(a,i,"method",x.method,x,null),Rt(a,i,"target",x.target,x,null)));if(f==null||typeof f=="symbol"||typeof f=="boolean"){a.removeAttribute(u);break}f=We(""+f),a.setAttribute(u,f);break;case"onClick":f!=null&&(a.onclick=pm);break;case"onScroll":f!=null&&at("scroll",a);break;case"onScrollEnd":f!=null&&at("scrollend",a);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(r(61));if(u=f.__html,u!=null){if(x.children!=null)throw Error(r(60));a.innerHTML=u}}break;case"multiple":a.multiple=f&&typeof f!="function"&&typeof f!="symbol";break;case"muted":a.muted=f&&typeof f!="function"&&typeof f!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(f==null||typeof f=="function"||typeof f=="boolean"||typeof f=="symbol"){a.removeAttribute("xlink:href");break}u=We(""+f),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":f!=null&&typeof f!="function"&&typeof f!="symbol"?a.setAttribute(u,""+f):a.removeAttribute(u);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInl
10ine":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":f&&typeof f!="function"&&typeof f!="symbol"?a.setAttribute(u,""):a.removeAttribute(u);break;case"capture":case"download":f===!0?a.setAttribute(u,""):f!==!1&&f!=null&&typeof f!="function"&&typeof f!="symbol"?a.setAttribute(u,f):a.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":f!=null&&typeof f!="function"&&typeof f!="symbol"&&!isNaN(f)&&1<=f?a.setAttribute(u,f):a.removeAttribute(u);break;case"rowSpan":case"start":f==null||typeof f=="function"||typeof f=="symbol"||isNaN(f)?a.removeAttribute(u):a.setAttribute(u,f);break;case"popover":at("beforetoggle",a),at("toggle",a),En(a,"popover",f);break;case"xlinkActuate":ft(a,"http://www.w3.org/1999/xlink","xlink:actuate",f);break;case"xlinkArcrole":ft(a,"http://www.w3.org/1999/xlink","xlink:arcrole",f);break;case"xlinkRole":ft(a,"http://www.w3.org/1999/xlink","xlink:role",f);break;case"xlinkShow":ft(a,"http://www.w3.org/1999/xlink","xlink:show",f);break;case"xlinkTitle":ft(a,"http://www.w3.org/1999/xlink","xlink:title",f);break;case"xlinkType":ft(a,"http://www.w3.org/1999/xlink","xlink:type",f);break;case"xmlBase":ft(a,"http://www.w3.org/XML/1998/namespace","xml:base",f);break;case"xmlLang":ft(a,"http://www.w3.org/XML/1998/namespace","xml:lang",f);break;case"xmlSpace":ft(a,"http://www.w3.org/XML/1998/namespace","xml:space",f);break;case"is":En(a,"is",f);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=xf.get(u)||u,En(a,u,f))}}function Fy(a,i,u,f,x,w){switch(u){case"style":yf(a,f,w);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(r(61));if(u=f.__html,u!=null){if(x.children!=null)throw Error(r(60));a.innerHTML=u}}break;case"children":typeof f=="string"?hr(a,f):(typeof f=="number"||typeof f=="bigint")&&hr(a,""+f);break;case"onScroll":f!=null&&at("scroll",a);break;case"onScrollEnd":f!=null&&at("scrollend",a);break;case"onClick":f!=null&&(a.onclick=pm);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ne.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(x=u.endsWith("Capture"),i=u.slice(2,x?u.length-7:void 0),w=a[ct]||null,w=w!=null?w[u]:null,typeof w=="function"&&a.removeEventListener(i,w,x),typeof f=="function")){typeof w!="function"&&w!==null&&(u in a?a[u]=null:a.hasAttribute(u)&&a.removeAttribute(u)),a.addEventListener(i,f,x);break e}u in a?a[u]=f:f===!0?a.setAttribute(u,""):En(a,u,f)}}}function Jn(a,i,u){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":at("error",a),at("load",a);var f=!1,x=!1,w;for(w in u)if(u.hasOwnProperty(w)){var k=u[w];if(k!=null)switch(w){case"src":f=!0;break;case"srcSet":x=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,i));default:Rt(a,i,w,k,u,null)}}x&&Rt(a,i,"srcSet",u.srcSet,u,null),f&&Rt(a,i,"src",u.src,u,null);return;case"input":at("invalid",a);var D=w=k=x=null,G=null,ne=null;for(f in u)if(u.hasOwnProperty(f)){var ue=u[f];if(ue!=null)switch(f){case"name":x=ue;break;case"type":k=ue;break;case"checked":G=ue;break;case"defaultChecked":ne=ue;break;case"value":w=ue;break;case"defaultValue":D=ue;break;case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(r(137,i));break;default:Rt(a,i,f,ue,u,null)}}eu(a,w,D,G,ne,k,x,!1),fo(a);return;case"select":at("invalid",a),f=k=w=null;for(x in u)if(u.hasOwnProperty(x)&&(D=u[x],D!=null))switch(x){case"value":w=D;break;case"defaultValue":k=D;break;case"multiple":f=D;default:Rt(a,i,x,D,u,null)}i=w,u=k,a.multiple=!!f,i!=null?pr(a,!!f,i,!1):u!=null&&pr(a,!!f,u,!0);return;case"textarea":at("invalid",a),w=x=f=null;for(k in u)if(u.hasOwnProperty(k)&&(D=u[k],D!=null))switch(k){case"value":f=D;break;case"defaultValue":x=D;break;case"children":w=D;break;case"dangerouslySetInnerHTML":if(D!=null)throw Error(r(91));break;default:Rt(a,i,k,D,u,null)}ta(a,f,x,w),fo(a);return;case"option":for(G in u)u.hasOwnProperty(G)&&(f=u[G],f!=null)&&(G==="selected"?a.selected=f&&typeof f!="function"&&typeof f!="symbol":Rt(a,i,G,f,u,null));return;case"dialog":at("beforetoggle",a),at("toggle",a),at("cancel",a),at("close",a);break;case"iframe":case"object":at("load",a);break;case"video":case"audio":for(f=0;f<Lu.length;f++)at(Lu[f],a);break;case"image":at("error",a),at("load",a);break;case"details":at("toggle",a);break;case"embed":case"source":case"link":at("error",a),at("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ne in u)if(u.hasOwnProperty(ne)&&(f=u[ne],f!=null))switch(ne){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,i));default:Rt(a,i,ne,f,u,null)}return;default:if(tu(i)){for(ue in u)u.hasOwnProperty(ue)&&(f=u[ue],f!==void 0&&Fy(a,i,ue,f,u,void 0));return}}for(D in u)u.hasOwnProperty(D)&&(f=u[D],f!=null&&Rt(a,i,D,f,u,null))}function z4(a,i,u,f){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var x=null,w=null,k=null,D=null,G=null,ne=null,ue=null;for(se in u){var me=u[se];if(u.hasOwnProperty(se)&&me!=null)switch(se){case"checked":break;case"value":break;case"defaultValue":G=me;default:f.hasOwnProperty(se)||Rt(a,i,se,null,f,me)}}for(var ae in f){var se=f[ae];if(me=u[ae],f.hasOwnProperty(ae)&&(se!=null||me!=null))switch(ae){case"type":w=se;break;case"name":x=se;break;case"checked":ne=se;break;case"defaultChecked":ue=se;break;case"value":k=se;break;case"defaultValue":D=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(r(137,i));break;default:se!==me&&Rt(a,i,ae,se,f,me)}}Jc(a,k,D,G,ne,ue,w,x);return;case"select":se=k=D=ae=null;for(w in u)if(G=u[w],u.hasOwnProperty(w)&&G!=null)switch(w){case"value":break;case"multiple":se=G;default:f.hasOwnProperty(w)||Rt(a,i,w,null,f,G)}for(x in f)if(w=f[x],G=u[x],f.hasOwnProperty(x)&&(w!=null||G!=null))switch(x){case"value":ae=w;break;case"defaultValue":D=w;break;case"multiple":k=w;default:w!==G&&Rt(a,i,x,w,f,G)}i=D,u=k,f=se,ae!=null?pr(a,!!u,ae,!1):!!f!=!!u&&(i!=null?pr(a,!!u,i,!0):pr(a,!!u,u?[]:"",!1));return;case"textarea":se=ae=null;for(D in u)if(x=u[D],u.hasOwnProperty(D)&&x!=null&&!f.hasOwnProperty(D))switch(D){case"value":break;case"children":break;default:Rt(a,i,D,null,f,x)}for(k in f)if(x=f[k],w=u[k],f.hasOwnProperty(k)&&(x!=null||w!=null))switch(k){case"value":ae=x;break;case"defaultValue":se=x;break;case"children":break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(r(91));break;default:x!==w&&Rt(a,i,k,x,f,w)}ja(a,ae,se);return;case"option":for(var $e in u)ae=u[$e],u.hasOwnProperty($e)&&ae!=null&&!f.hasOwnProperty($e)&&($e==="selected"?a.selected=!1:Rt(a,i,$e,null,f,ae));for(G in f)ae=f[G],se=u[G],f.hasOwnProperty(G)&&ae!==se&&(ae!=null||se!=null)&&(G==="selected"?a.selected=ae&&typeof ae!="function"&&typeof ae!="symbol":Rt(a,i,G,ae,f,se));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var De in u)ae=u[De],u.hasOwnProperty(De)&&ae!=null&&!f.hasOwnProperty(De)&&Rt(a,i,De,null,f,ae);for(ne in f)if(ae=f[ne],se=u[ne],f.hasOwnProperty(ne)&&ae!==se&&(ae!=null||se!=null))switch(ne){case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(r(137,i));break;default:Rt(a,i,ne,ae,f,se)}return;default:if(tu(i)){for(var Pt in u)ae=u[Pt],u.hasOwnProperty(Pt)&&ae!==void 0&&!f.hasOwnProperty(Pt)&&Fy(a,i,Pt,void 0,f,ae);for(ue in f)ae=f[ue],se=u[ue],!f.hasOwnProperty(ue)||ae===se||ae===void 0&&se===void 0||Fy(a,i,ue,ae,f,se);return}}for(var J in u)ae=u[J],u.hasOwnProperty(J)&&ae!=null&&!f.hasOwnProperty(J)&&Rt(a,i,J,null,f,ae);for(me in f)ae=f[me],se=u[me],!f.hasOwnProperty(me)||ae===se||ae==null&&se==null||Rt(a,i,me,ae,f,se)}var $y=null,Hy=null;function hm(a){return a.nodeType===9?a:a.ownerDocument}function uA(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function dA(a,i){if(a===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&i==="foreignObject"?0:a}function Gy(a,i){return a==="textarea"||a==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var Ky=null;function V4(){var a=window.event;return a&&a.type==="popstate"?a===Ky?!1:(Ky=a,!0):(Ky=null,!1)}var fA=typeof setTimeout=="function"?setTimeout:void 0,B4=typeof clearTimeout=="function"?clearTimeout:void 0,mA=typeof Promise=="function"?Promise:void 0,F4=typeof queueMicrotask=="function"?queueMicrotask:typeof mA<"u"?function(a){return mA.resolve(null).then(a).catch($4)}:fA;function $4(a){setTimeout(function(){throw a})}function ki(a){return a==="head"}function pA(a,i){var u=i,f=0,x=0;do{var w=u.nextSibling;if(a.removeChild(u),w&&w.nodeType===8)if(u=w.data,u==="/$"){if(0<f&&8>f){u=f;var k=a.ownerDocument;if(u&1&&Uu(k.documentElement),u&2&&Uu(k.body),u&4)for(u=k.head,Uu(u),k=u.firstChild;k;){var D=k.nextSibling,G=k.nodeName;k[zr]||G==="SCRIPT"||G==="STYLE"||G==="LINK"&&k.rel.toLowerCase()==="stylesheet"||u.removeChild(k),k=D}}if(x===0){a.removeChild(w),Ku(i);return}x--}else u==="$"||u==="$?"||u==="$!"?x++:f=u.charCodeAt(0)-48;else f=0;u=w}while(u);Ku(i)}function Yy(a){var i=a.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var u=i;switch(i=i.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":Yy(u),Ja(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}a.removeChild(u)}}function H4(a,i,u,f){for(;a.nodeType===1;){var x=u;if(a.nodeName.toLowerCase()!==i.toLowerCase()){if(!f&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(f){if(!a[zr])switch(i){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(w=a.getAttribute("rel"),w==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(w!==x.rel||a.getAttribute("href")!==(x.href==null||x.href===""?null:x.href)||a.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin)||a.getAttribute("title")!==(x.title==null?null:x.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(w=a.getAttribute("src"),(w!==(x.src==null?null:x.src)||a.getAttribute("type")!==(x.type==null?null:x.type)||a.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin))&&w&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(i==="input"&&a.type==="hidden"){var w=x.name==null?null:""+x.name;if(x.type==="hidden"&&a.getAttribute("name")===w)return a}else return a;
vendor: 1,968 bytes, line 10
10if(a=_a(a.nextSibling),a===null)break}return null}function G4(a,i,u){if(i==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!u||(a=_a(a.nextSibling),a===null))return null;return a}function Wy(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState==="complete"}function K4(a,i){var u=a.ownerDocument;if(a.data!=="$?"||u.readyState==="complete")i();else{var f=function(){i(),u.removeEventListener("DOMContentLoaded",f)};u.addEventListener("DOMContentLoaded",f),a._reactRetry=f}}function _a(a){for(;a!=null;a=a.nextSibling){var i=a.nodeType;if(i===1||i===3)break;if(i===8){if(i=a.data,i==="$"||i==="$!"||i==="$?"||i==="F!"||i==="F")break;if(i==="/$")return null}}return a}var Qy=null;function hA(a){a=a.previousSibling;for(var i=0;a;){if(a.nodeType===8){var u=a.data;if(u==="$"||u==="$!"||u==="$?"){if(i===0)return a;i--}else u==="/$"&&i++}a=a.previousSibling}return null}function gA(a,i,u){switch(i=hm(u),a){case"html":if(a=i.documentElement,!a)throw Error(r(452));return a;case"head":if(a=i.head,!a)throw Error(r(453));return a;case"body":if(a=i.body,!a)throw Error(r(454));return a;default:throw Error(r(451))}}function Uu(a){for(var i=a.attributes;i.length;)a.removeAttributeNode(i[0]);Ja(a)}var ca=new Map,yA=new Set;function gm(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var Bs=O.d;O.d={f:Y4,r:W4,D:Q4,C:X4,L:Z4,m:J4,X:tq,S:eq,M:nq};function Y4(){var a=Bs.f(),i=om();return a||i}function W4(a){var i=Na(a);i!==null&&i.tag===5&&i.type==="form"?LC(i):Bs.r(a)}var Ql=typeof document>"u"?null:document;function xA(a,i,u){var f=Ql;if(f&&typeof i=="string"&&i){var x=mr(i);x='link[rel="'+a+'"][href="'+x+'"]',typeof u=="string"&&(x+='[crossorigin="'+u+'"]'),yA.has(x)||(yA.add(x),a={rel:a,crossOrigin:u,href:i},f.querySelector(x)===null&&(i=f.createElement("link"),Jn(i,"link",a),Wt(i),f.head.appendChild(i)))}}function Q4(a){Bs.D(a),xA("dns-prefetch",a,null)}
vendor: 4,751 bytes, line 10
10function X4(a,i){Bs.C(a,i),xA("preconnect",a,i)}function Z4(a,i,u){Bs.L(a,i,u);var f=Ql;if(f&&a&&i){var x='link[rel="preload"][as="'+mr(i)+'"]';i==="image"&&u&&u.imageSrcSet?(x+='[imagesrcset="'+mr(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(x+='[imagesizes="'+mr(u.imageSizes)+'"]')):x+='[href="'+mr(a)+'"]';var w=x;switch(i){case"style":w=Xl(a);break;case"script":w=Zl(a)}ca.has(w)||(a=y({rel:"preload",href:i==="image"&&u&&u.imageSrcSet?void 0:a,as:i},u),ca.set(w,a),f.querySelector(x)!==null||i==="style"&&f.querySelector(zu(w))||i==="script"&&f.querySelector(Vu(w))||(i=f.createElement("link"),Jn(i,"link",a),Wt(i),f.head.appendChild(i)))}}function J4(a,i){Bs.m(a,i);var u=Ql;if(u&&a){var f=i&&typeof i.as=="string"?i.as:"script",x='link[rel="modulepreload"][as="'+mr(f)+'"][href="'+mr(a)+'"]',w=x;switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":w=Zl(a)}if(!ca.has(w)&&(a=y({rel:"modulepreload",href:a},i),ca.set(w,a),u.querySelector(x)===null)){switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Vu(w)))return}f=u.createElement("link"),Jn(f,"link",a),Wt(f),u.head.appendChild(f)}}}function eq(a,i,u){Bs.S(a,i,u);var f=Ql;if(f&&a){var x=Yn(f).hoistableStyles,w=Xl(a);i=i||"default";var k=x.get(w);if(!k){var D={loading:0,preload:null};if(k=f.querySelector(zu(w)))D.loading=5;else{a=y({rel:"stylesheet",href:a,"data-precedence":i},u),(u=ca.get(w))&&Xy(a,u);var G=k=f.createElement("link");Wt(G),Jn(G,"link",a),G._p=new Promise(function(ne,ue){G.onload=ne,G.onerror=ue}),G.addEventListener("load",function(){D.loading|=1}),G.addEventListener("error",function(){D.loading|=2}),D.loading|=4,ym(k,i,f)}k={type:"stylesheet",instance:k,count:1,state:D},x.set(w,k)}}}function tq(a,i){Bs.X(a,i);var u=Ql;if(u&&a){var f=Yn(u).hoistableScripts,x=Zl(a),w=f.get(x);w||(w=u.querySelector(Vu(x)),w||(a=y({src:a,async:!0},i),(i=ca.get(x))&&Zy(a,i),w=u.createElement("script"),Wt(w),Jn(w,"link",a),u.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},f.set(x,w))}}function nq(a,i){Bs.M(a,i);var u=Ql;if(u&&a){var f=Yn(u).hoistableScripts,x=Zl(a),w=f.get(x);w||(w=u.querySelector(Vu(x)),w||(a=y({src:a,async:!0,type:"module"},i),(i=ca.get(x))&&Zy(a,i),w=u.createElement("script"),Wt(w),Jn(w,"link",a),u.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},f.set(x,w))}}function vA(a,i,u,f){var x=(x=he.current)?gm(x):null;if(!x)throw Error(r(446));switch(a){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(i=Xl(u.href),u=Yn(x).hoistableStyles,f=u.get(i),f||(f={type:"style",instance:null,count:0,state:null},u.set(i,f)),f):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){a=Xl(u.href);var w=Yn(x).hoistableStyles,k=w.get(a);if(k||(x=x.ownerDocument||x,k={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},w.set(a,k),(w=x.querySelector(zu(a)))&&!w._p&&(k.instance=w,k.state.loading=5),ca.has(a)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},ca.set(a,u),w||rq(x,a,u,k.state))),i&&f===null)throw Error(r(528,""));return k}if(i&&f!==null)throw Error(r(529,""));return null;case"script":return i=u.async,u=u.src,typeof u=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Zl(u),u=Yn(x).hoistableScripts,f=u.get(i),f||(f={type:"script",instance:null,count:0,state:null},u.set(i,f)),f):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,a))}}function Xl(a){return'href="'+mr(a)+'"'}function zu(a){return'link[rel="stylesheet"]['+a+"]"}function bA(a){return y({},a,{"data-precedence":a.precedence,precedence:null})}function rq(a,i,u,f){a.querySelector('link[rel="preload"][as="style"]['+i+"]")?f.loading=1:(i=a.createElement("link"),f.preload=i,i.addEventListener("load",function(){return f.loading|=1}),i.addEventListener("error",function(){return f.loading|=2}),Jn(i,"link",u),Wt(i),a.head.appendChild(i))}function Zl(a){return'[src="'+mr(a)+'"]'}function Vu(a){return"script[async]"+a}function wA(a,i,u){if(i.count++,i.instance===null)switch(i.type){case"style":var f=a.querySelector('style[data-href~="'+mr(u.href)+'"]');if(f)return i.instance=f,Wt(f),f;var x=y({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return f=(a.ownerDocument||a).createElement("style"),Wt(f),Jn(f,"style",x),ym(f,u.precedence,a),i.instance=f;case"stylesheet":x=Xl(u.href);var w=a.querySelector(zu(x));if(w)return i.state.loading|=4,i.instance=w,Wt(w),w;
vendor: 11,588 bytes, line 10
10f=bA(u),(x=ca.get(x))&&Xy(f,x),w=(a.ownerDocument||a).createElement("link"),Wt(w);var k=w;return k._p=new Promise(function(D,G){k.onload=D,k.onerror=G}),Jn(w,"link",f),i.state.loading|=4,ym(w,u.precedence,a),i.instance=w;case"script":return w=Zl(u.src),(x=a.querySelector(Vu(w)))?(i.instance=x,Wt(x),x):(f=u,(x=ca.get(w))&&(f=y({},u),Zy(f,x)),a=a.ownerDocument||a,x=a.createElement("script"),Wt(x),Jn(x,"link",f),a.head.appendChild(x),i.instance=x);case"void":return null;default:throw Error(r(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(f=i.instance,i.state.loading|=4,ym(f,u.precedence,a));return i.instance}function ym(a,i,u){for(var f=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),x=f.length?f[f.length-1]:null,w=x,k=0;k<f.length;k++){var D=f[k];if(D.dataset.precedence===i)w=D;else if(w!==x)break}w?w.parentNode.insertBefore(a,w.nextSibling):(i=u.nodeType===9?u.head:u,i.insertBefore(a,i.firstChild))}function Xy(a,i){a.crossOrigin==null&&(a.crossOrigin=i.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=i.referrerPolicy),a.title==null&&(a.title=i.title)}function Zy(a,i){a.crossOrigin==null&&(a.crossOrigin=i.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=i.referrerPolicy),a.integrity==null&&(a.integrity=i.integrity)}var xm=null;function SA(a,i,u){if(xm===null){var f=new Map,x=xm=new Map;x.set(u,f)}else x=xm,f=x.get(u),f||(f=new Map,x.set(u,f));if(f.has(a))return f;for(f.set(a,null),u=u.getElementsByTagName(a),x=0;x<u.length;x++){var w=u[x];if(!(w[zr]||w[Ke]||a==="link"&&w.getAttribute("rel")==="stylesheet")&&w.namespaceURI!=="http://www.w3.org/2000/svg"){var k=w.getAttribute(i)||"";k=a+k;var D=f.get(k);D?D.push(w):f.set(k,[w])}}return f}function CA(a,i,u){a=a.ownerDocument||a,a.head.insertBefore(u,i==="title"?a.querySelector("head > title"):null)}function aq(a,i,u){if(u===1||i.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;return i.rel==="stylesheet"?(a=i.disabled,typeof i.precedence=="string"&&a==null):!0;case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function NA(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}var Bu=null;function sq(){}function iq(a,i,u){if(Bu===null)throw Error(r(475));var f=Bu;if(i.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var x=Xl(u.href),w=a.querySelector(zu(x));if(w){a=w._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(f.count++,f=vm.bind(f),a.then(f,f)),i.state.loading|=4,i.instance=w,Wt(w);return}w=a.ownerDocument||a,u=bA(u),(x=ca.get(x))&&Xy(u,x),w=w.createElement("link"),Wt(w);var k=w;k._p=new Promise(function(D,G){k.onload=D,k.onerror=G}),Jn(w,"link",u),i.instance=w}f.stylesheets===null&&(f.stylesheets=new Map),f.stylesheets.set(i,a),(a=i.state.preload)&&(i.state.loading&3)===0&&(f.count++,i=vm.bind(f),a.addEventListener("load",i),a.addEventListener("error",i))}}function oq(){if(Bu===null)throw Error(r(475));var a=Bu;return a.stylesheets&&a.count===0&&Jy(a,a.stylesheets),0<a.count?function(i){var u=setTimeout(function(){if(a.stylesheets&&Jy(a,a.stylesheets),a.unsuspend){var f=a.unsuspend;a.unsuspend=null,f()}},6e4);return a.unsuspend=i,function(){a.unsuspend=null,clearTimeout(u)}}:null}function vm(){if(this.count--,this.count===0){if(this.stylesheets)Jy(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var bm=null;function Jy(a,i){a.stylesheets=null,a.unsuspend!==null&&(a.count++,bm=new Map,i.forEach(lq,a),bm=null,vm.call(a))}function lq(a,i){if(!(i.state.loading&4)){var u=bm.get(a);if(u)var f=u.get(null);else{u=new Map,bm.set(a,u);for(var x=a.querySelectorAll("link[data-precedence],style[data-precedence]"),w=0;w<x.length;w++){var k=x[w];(k.nodeName==="LINK"||k.getAttribute("media")!=="not all")&&(u.set(k.dataset.precedence,k),f=k)}f&&u.set(null,f)}x=i.instance,k=x.getAttribute("data-precedence"),w=u.get(k)||f,w===f&&u.set(null,x),u.set(k,x),this.count++,f=vm.bind(this),x.addEventListener("load",f),x.addEventListener("error",f),w?w.parentNode.insertBefore(x,w.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(x,a.firstChild)),i.state.loading|=4}}var Fu={$$typeof:E,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function cq(a,i,u,f,x,w,k,D){this.tag=1,this.containerInfo=a,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ie(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ie(0),this.hiddenUpdates=Ie(null),this.identifierPrefix=f,this.onUncaughtError=x,this.onCaughtError=w,this.onRecoverableError=k,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=D,this.incompleteTransitions=new Map}function AA(a,i,u,f,x,w,k,D,G,ne,ue,me){return a=new cq(a,i,u,k,D,G,ne,me),i=1,w===!0&&(i|=24),w=$r(3,null,null,i),a.current=w,w.stateNode=a,i=Ig(),i.refCount++,a.pooledCache=i,i.refCount++,w.memoizedState={element:f,isDehydrated:u,cache:i},qg(w),a}function EA(a){return a?(a=kl,a):kl}function jA(a,i,u,f,x,w){x=EA(x),f.context===null?f.context=x:f.pendingContext=x,f=gi(i),f.payload={element:u},w=w===void 0?null:w,w!==null&&(f.callback=w),u=yi(a,f,i),u!==null&&(Wr(u,a,i),vu(u,a,i))}function TA(a,i){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var u=a.retryLane;a.retryLane=u!==0&&u<i?u:i}}function ex(a,i){TA(a,i),(a=a.alternate)&&TA(a,i)}function kA(a){if(a.tag===13){var i=Tl(a,67108864);i!==null&&Wr(i,a,67108864),ex(a,67108864)}}var wm=!0;function uq(a,i,u,f){var x=I.T;I.T=null;var w=O.p;try{O.p=2,tx(a,i,u,f)}finally{O.p=w,I.T=x}}function dq(a,i,u,f){var x=I.T;I.T=null;var w=O.p;try{O.p=8,tx(a,i,u,f)}finally{O.p=w,I.T=x}}function tx(a,i,u,f){if(wm){var x=nx(f);if(x===null)By(a,i,f,Sm,u),PA(a,f);else if(mq(x,a,i,u,f))f.stopPropagation();else if(PA(a,f),i&4&&-1<fq.indexOf(a)){for(;x!==null;){var w=Na(x);if(w!==null)switch(w.tag){case 3:if(w=w.stateNode,w.current.memoizedState.isDehydrated){var k=gn(w.pendingLanes);if(k!==0){var D=w;for(D.pendingLanes|=2,D.entangledLanes|=2;k;){var G=1<<31-Kt(k);D.entanglements[1]|=G,k&=~G}ds(w),(Nt&6)===0&&(sm=pt()+500,Du(0))}}break;case 13:D=Tl(w,2),D!==null&&Wr(D,w,2),om(),ex(w,2)}if(w=nx(f),w===null&&By(a,i,f,Sm,u),w===x)break;x=w}x!==null&&f.stopPropagation()}else By(a,i,f,null,u)}}function nx(a){return a=ar(a),rx(a)}var Sm=null;function rx(a){if(Sm=null,a=Ca(a),a!==null){var i=l(a);if(i===null)a=null;else{var u=i.tag;if(u===13){if(a=c(i),a!==null)return a;a=null}else if(u===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;a=null}else i!==a&&(a=null)}}return Sm=a,null}function RA(a){switch(a){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Gn()){case Ht:return 2;case xe:return 8;case He:case et:return 32;case pn:return 268435456;default:return 32}default:return 32}}var ax=!1,Ri=null,Pi=null,Oi=null,$u=new Map,Hu=new Map,_i=[],fq="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function PA(a,i){switch(a){case"focusin":case"focusout":Ri=null;break;case"dragenter":case"dragleave":Pi=null;break;case"mouseover":case"mouseout":Oi=null;break;case"pointerover":case"pointerout":$u.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Hu.delete(i.pointerId)}}function Gu(a,i,u,f,x,w){return a===null||a.nativeEvent!==w?(a={blockedOn:i,domEventName:u,eventSystemFlags:f,nativeEvent:w,targetContainers:[x]},i!==null&&(i=Na(i),i!==null&&kA(i)),a):(a.eventSystemFlags|=f,i=a.targetContainers,x!==null&&i.indexOf(x)===-1&&i.push(x),a)}function mq(a,i,u,f,x){switch(i){case"focusin":return Ri=Gu(Ri,a,i,u,f,x),!0;case"dragenter":return Pi=Gu(Pi,a,i,u,f,x),!0;case"mouseover":return Oi=Gu(Oi,a,i,u,f,x),!0;case"pointerover":var w=x.pointerId;return $u.set(w,Gu($u.get(w)||null,a,i,u,f,x)),!0;case"gotpointercapture":return w=x.pointerId,Hu.set(w,Gu(Hu.get(w)||null,a,i,u,f,x)),!0}return!1}function OA(a){var i=Ca(a.target);if(i!==null){var u=l(i);if(u!==null){if(i=u.tag,i===13){if(i=c(u),i!==null){a.blockedOn=i,gt(a.priority,function(){if(u.tag===13){var f=Yr();f=Te(f);var x=Tl(u,f);x!==null&&Wr(x,u,f),ex(u,f)}});return}}else if(i===3&&u.stateNode.current.memoizedState.isDehydrated){a.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}a.blockedOn=null}function Cm(a){if(a.blockedOn!==null)return!1;for(var i=a.targetContainers;0<i.length;){var u=nx(a.nativeEvent);if(u===null){u=a.nativeEvent;var f=new u.constructor(u.type,u);nu=f,u.target.dispatchEvent(f),nu=null}else return i=Na(u),i!==null&&kA(i),a.blockedOn=u,!1;i.shift()}return!0}function _A(a,i,u){Cm(a)&&u.delete(i)}function pq(){ax=!1,Ri!==null&&Cm(Ri)&&(Ri=null),Pi!==null&&Cm(Pi)&&(Pi=null),Oi!==null&&Cm(Oi)&&(Oi=null),$u.forEach(_A),Hu.forEach(_A)}function Nm(a,i){a.blockedOn===i&&(a.blockedOn=null,ax||(ax=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,pq)))}var Am=null;function IA(a){Am!==a&&(Am=a,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Am===a&&(Am=null);for(var i=0;i<a.length;i+=3){var u=a[i],f=a[i+1],x=a[i+2];if(typeof f!="function"){if(rx(f||u)===null)continue;break}var w=Na(u);w!==null&&(a.splice(i,3),i-=3,ry(w,{pending:!0,data:x,method:u.method,action:f},f,x))}}))}function Ku(a){function i(G){return Nm(G,a)}Ri!==null&&Nm(Ri,a),Pi!==null&&Nm(Pi,a),Oi!==null&&Nm(Oi,a),$u.forEach(i),Hu.forEach(i);for(var u=0;u<_i.length;u++){var f=_i[u];f.blockedOn===a&&(f.blockedOn=null)}for(;0<_i.length&&(u=_i[0],u.blockedOn===null);)OA(u),u.blockedOn===null&&_i.shift();if(u=(a.ownerDocument||a).$$reactFormReplay,u!=null)for(f=0;f<u.length;f+=3){var x=u[f],w=u[f+1],k=x[ct]||null;if(typeof w=="function")k||IA(u);else if(k){var D=null;if(w&&w.hasAttribute("formAction")){if(x=w,k=w[ct]||null)D=k.formAction;else if(rx(x)!==null)continue}else D=k.action;
vendor: 5,334 bytes, line 10
10typeof D=="function"?u[f+1]=D:(u.splice(f,3),f-=3),IA(u)}}}function sx(a){this._internalRoot=a}Em.prototype.render=sx.prototype.render=function(a){var i=this._internalRoot;if(i===null)throw Error(r(409));var u=i.current,f=Yr();jA(u,f,a,i,null,null)},Em.prototype.unmount=sx.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var i=a.containerInfo;jA(a.current,2,null,a,null,null),om(),i[Yt]=null}};function Em(a){this._internalRoot=a}Em.prototype.unstable_scheduleHydration=function(a){if(a){var i=st();a={blockedOn:null,target:a,priority:i};for(var u=0;u<_i.length&&i!==0&&i<_i[u].priority;u++);_i.splice(u,0,a),u===0&&OA(a)}};var MA=t.version;if(MA!=="19.1.0")throw Error(r(527,MA,"19.1.0"));O.findDOMNode=function(a){var i=a._reactInternals;if(i===void 0)throw typeof a.render=="function"?Error(r(188)):(a=Object.keys(a).join(","),Error(r(268,a)));return a=m(i),a=a!==null?p(a):null,a=a===null?null:a.stateNode,a};var hq={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var jm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!jm.isDisabled&&jm.supportsFiber)try{Ar=jm.inject(hq),jt=jm}catch{}}return Yu.createRoot=function(a,i){if(!o(a))throw Error(r(299));var u=!1,f="",x=XC,w=ZC,k=JC,D=null;return i!=null&&(i.unstable_strictMode===!0&&(u=!0),i.identifierPrefix!==void 0&&(f=i.identifierPrefix),i.onUncaughtError!==void 0&&(x=i.onUncaughtError),i.onCaughtError!==void 0&&(w=i.onCaughtError),i.onRecoverableError!==void 0&&(k=i.onRecoverableError),i.unstable_transitionCallbacks!==void 0&&(D=i.unstable_transitionCallbacks)),i=AA(a,1,!1,null,null,u,f,x,w,k,D,null),a[Yt]=i.current,Vy(a),new sx(i)},Yu.hydrateRoot=function(a,i,u){if(!o(a))throw Error(r(299));var f=!1,x="",w=XC,k=ZC,D=JC,G=null,ne=null;return u!=null&&(u.unstable_strictMode===!0&&(f=!0),u.identifierPrefix!==void 0&&(x=u.identifierPrefix),u.onUncaughtError!==void 0&&(w=u.onUncaughtError),u.onCaughtError!==void 0&&(k=u.onCaughtError),u.onRecoverableError!==void 0&&(D=u.onRecoverableError),u.unstable_transitionCallbacks!==void 0&&(G=u.unstable_transitionCallbacks),u.formState!==void 0&&(ne=u.formState)),i=AA(a,1,!0,i,u??null,f,x,w,k,D,G,ne),i.context=EA(null),u=i.current,f=Yr(),f=Te(f),x=gi(f),x.callback=null,yi(u,x,f),u=f,i.current.lanes=u,Fe(i,u),ds(i),a[Yt]=i.current,Vy(a),new Em(i)},Yu.version="19.1.0",Yu}var QA;function TU(){if(QA)return ox.exports;QA=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),ox.exports=jU(),ox.exports}var kU=TU();const RU="modulepreload",PU=function(e){return"/"+e},XA={},Ce=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){let m=function(p){return Promise.all(p.map(y=>Promise.resolve(y).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),d=c?.nonce||c?.getAttribute("nonce");o=m(n.map(p=>{if(p=PU(p),p in XA)return;XA[p]=!0;const y=p.endsWith(".css"),g=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${g}`))return;const v=document.createElement("link");if(v.rel=y?"stylesheet":RU,y||(v.as="script"),v.crossOrigin="",v.href=p,d&&v.setAttribute("nonce",d),document.head.appendChild(v),y)return new Promise((b,S)=>{v.addEventListener("load",b),v.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${p}`)))})}))}function l(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return o.then(c=>{for(const d of c||[])d.status==="rejected"&&l(d.reason);return t().catch(l)})},OU=["display","t1","t2","t3","bodylg","body","caption","overline"],_U=Rq({extend:{classGroups:{"font-size":[{text:[...OU]}]}}});function Y(...e){return _U(Pq(e))}const ZA={"bpc-157":"#2E6FB0","tb-500":"#7A4FB6","bpc-tb-blend":"#2E8A5F","bpc-157-tb-500":"#2E8A5F","bpc-157-tb-500-blend":"#2E8A5F",semaglutide:"#C23A5E",tirzepatide:"#C2543A",retatrutide:"#A03A8C","cjc-1295":"#3A8AC2","cjc-1295-no-dac":"#3A8AC2",ipamorelin:"#41A1A8","ghk-cu":"#3AA86E","nad-plus":"#B0892E",nad:"#B0892E","mots-c":"#5E6FC2",epithalon:"#6E7E76","bac-water":"#8A98A4","bacteriostatic-water":"#8A98A4","sterile-vials":"#9AA6B0","sterile-empty-vials":"#9AA6B0"},JA=["#2E6FB0","#7A4FB6","#C23A5E","#3A8AC2","#41A1A8","#3AA86E","#B0892E","#5E6FC2","#A03A8C","#C2543A"];function ux(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function hh(e,t){const n=e?ZA[ux(e)]:void 0;if(n)return n;if(t){const l=ZA[ux(t)];if(l)return l}const r=ux(e||t||"vial");let o=0;for(let l=0;l<r.length;l++)o=o*31+r.charCodeAt(l)>>>0;return JA[o%JA.length]}const IU=120,Wu=64,Qu=40,MU=[".vp-sc-cover{transition:opacity 420ms cubic-bezier(0.22,1,0.36,1),filter 420ms cubic-bezier(0.22,1,0.36,1)}",".vp-sc-gone{opacity:0;filter:blur(6px);pointer-events:none}",".vp-sc-cue{transition:opacity 200ms ease-out}","@media (prefers-reduced-motion:reduce){",".vp-sc-cover{transition:opacity 120ms linear}",".vp-sc-gone{filter:none}","}"].join("");function F2({children:e,cover:t,coverSrc:n,cue:r,revealLabel:o="Reveal without scratching",ski
10pVariant:l="visible",threshold:c=.55,brushRadius:d=22,disabled:m=!1,onRevealed:p,className:y}){const g=h.useRef(null),v=h.useRef(null),b=h.useRef(null),S=h.useRef(0),C=h.useRef(!1),N=h.useRef(!1),[A,T]=h.useState(!1),E=h.useRef(!1),[j,_]=h.useState(!0),P=`vp-sc-live-${h.useId().replace(/[^a-zA-Z0-9]/g,"")}`,M=h.useCallback(()=>{E.current||(E.current=!0,T(!0),p?.())},[p]),q=h.useCallback(()=>{const I=g.current;if(!I||N.current)return;const O=I.getBoundingClientRect();if(O.width===0||O.height===0){typeof ResizeObserver>"u"&&(_(!1),M());return}const F=Math.min(window.devicePixelRatio||1,3);I.width=Math.round(O.width*F),I.height=Math.round(O.height*F);const B=I.getContext("2d");if(!B){_(!1),M();return}if(B.setTransform(F,0,0,F,0,0),n){const pe=new Image;pe.decoding="async",pe.onload=()=>{const oe=g.current?.getContext("2d");!oe||N.current||(oe.setTransform(F,0,0,F,0,0),oe.drawImage(pe,0,0,O.width,O.height),oe.strokeStyle=t.edge,oe.lineWidth=2,oe.strokeRect(1,1,O.width-2,O.height-2),N.current=!0)},pe.onerror=()=>{},pe.src=n}const K=O.width,le=O.height;let Z=2654435769;const ie=()=>(Z=Z*1664525+1013904223>>>0,Z/4294967296),re=B.createLinearGradient(0,0,K*.4,le);re.addColorStop(0,t.speck),re.addColorStop(.45,t.base),re.addColorStop(1,t.edge),B.fillStyle=re,B.fillRect(0,0,K,le);for(const[pe,oe,ge,we]of[[26,le*.22,le*.5,.16],[70,6,20,.2],[150,1,3.4,.3]])for(let be=0;be<pe;be+=1){const Me=ie()*K,ze=ie()*le,Ee=oe+ie()*(ge-oe),Ct=ie()>.5;B.globalAlpha=we*(.5+ie()*.5),B.fillStyle=Ct?t.speck:t.edge,B.beginPath(),B.ellipse(Me,ze,Ee,Ee*(.6+ie()*.6),ie()*Math.PI,0,Math.PI*2),B.fill()}B.globalAlpha=1;for(let pe=0;pe<9;pe+=1){const oe=14+ie()*(K-28),ge=12+ie()*(le-24),we=13+ie()*16,be=ie()*Math.PI*2;B.save(),B.translate(oe,ge),B.rotate(be),B.globalAlpha=.3,B.fillStyle=t.edge,B.beginPath(),B.ellipse(1.5,2.5,we,we*.36,0,0,Math.PI*2),B.fill(),B.globalAlpha=.55+ie()*.3,B.fillStyle=ie()>.5?t.speck:t.base,B.beginPath(),B.ellipse(0,0,we,we*.36,0,0,Math.PI*2),B.fill(),B.globalAlpha=.35,B.strokeStyle=t.edge,B.lineWidth=.9,B.beginPath(),B.moveTo(-we*.92,0),B.lineTo(we*.92,0),B.stroke(),B.restore()}B.globalAlpha=1;const de=34;B.globalAlpha=.1,B.fillStyle=t.speck;for(let pe=0;pe*de<le+de;pe+=1)for(let oe=0;oe*de<K+de;oe+=1){const ge=oe*de+(pe%2?de/2:0),we=pe*de;B.save(),B.translate(ge,we),B.rotate((oe+pe)%4*.22-.33),B.beginPath(),B.ellipse(0,1.6,4.4,5.4,0,0,Math.PI*2),B.fill(),B.fillRect(-5,-5.4,10,3.1),B.restore()}B.globalAlpha=1;for(const[pe,oe]of[[-.15,.16],[.35,.1]]){const ge=B.createLinearGradient(K*pe,0,K*(pe+.5),le);ge.addColorStop(0,"rgba(255,255,255,0)"),ge.addColorStop(.5,`rgba(255,255,255,${oe})`),ge.addColorStop(1,"rgba(255,255,255,0)"),B.fillStyle=ge,B.fillRect(0,0,K,le)}const he=B.createRadialGradient(K*.36,le*.3,4,K*.5,le*.5,Math.max(K,le)*.78);he.addColorStop(0,"rgba(255,255,255,0.1)"),he.addColorStop(.55,"rgba(0,0,0,0)"),he.addColorStop(1,"rgba(0,0,0,0.42)"),B.fillStyle=he,B.fillRect(0,0,K,le),B.strokeStyle="rgba(255,255,255,0.22)",B.lineWidth=1.5,B.beginPath(),B.moveTo(1,le-1),B.lineTo(1,1),B.lineTo(K-1,1),B.stroke(),B.strokeStyle="rgba(0,0,0,0.4)",B.beginPath(),B.moveTo(K-1,1),B.lineTo(K-1,le-1),B.lineTo(1,le-1),B.stroke(),B.save(),B.setLineDash([5,4]),B.strokeStyle="rgba(255,255,255,0.3)",B.lineWidth=1,B.strokeRect(7.5,7.5,K-15,le-15),B.restore(),N.current=!0},[t.base,t.edge,t.speck,n,M]);h.useEffect(()=>{q();const I=g.current;if(!I||typeof ResizeObserver>"u")return;const O=new ResizeObserver(()=>q());return O.observe(I),()=>O.disconnect()},[q]);const U=h.useCallback(()=>{const I=g.current;if(!I)return 0;let O=v.current;O||(O=document.createElement("canvas"),O.width=Wu,O.height=Qu,v.current=O);const F=O.getContext("2d",{willReadFrequently:!0});if(!F)return 0;F.clearRect(0,0,Wu,Qu),F.drawImage(I,0,0,Wu,Qu);const{data:B}=F.getImageData(0,0,Wu,Qu);let K=0;for(let le=3;le<B.length;le+=4)B[le]<128&&(K+=1);return K/(Wu*Qu)},[]),V=h.useCallback((I,O)=>{const B=g.current?.getContext("2d");if(!B)return;B.globalCompositeOperation="destination-out";const K=b.current;if(K){const le=I-K.x,Z=O-K.y,ie=Math.hypot(le,Z),re=Math.max(d/3,2),de=Math.ceil(ie/re);for(let he=1;he<=de;he+=1){const pe=he/de;B.beginPath(),B.arc(K.x+le*pe,K.y+Z*pe,d,0,Math.PI*2),B.fill()}}B.beginPath(),B.arc(I,O,d,0,Math.PI*2),B.fill(),B.globalCompositeOperation="source-over",b.current={x:I,y:O}},[d]),$=I=>{const O=I.currentTarget.getBoundingClientRect();return{x:I.clientX-O.left,y:I.clientY-O.top}},L=I=>{if(m||A||!j)return;I.currentTarget.setPointerCapture(I.pointerId),C.current=!0,b.current=null;const O=$(I);V(O.x,O.y)},H=I=>
10{if(!C.current||m||A)return;const O=$(I);V(O.x,O.y);const F=I.timeStamp;F-S.current<IU||(S.current=F,U()>=c&&M())},Q=()=>{C.current&&(C.current=!1,b.current=null,!A&&U()>=c&&M())};return s.jsxs("div",{className:y,style:{position:"relative"},children:[s.jsx("style",{children:MU}),s.jsx("div",{style:{position:"relative",zIndex:0},children:e}),s.jsx("canvas",{ref:g,"aria-hidden":"true",className:`vp-sc-cover${A?" vp-sc-gone":""}`,onPointerDown:L,onPointerMove:H,onPointerUp:Q,onPointerCancel:Q,onPointerLeave:Q,style:{position:"absolute",inset:0,width:"100%",height:"100%",borderRadius:"inherit",zIndex:1,touchAction:"none",cursor:m||A?"default":"grab"}}),!A&&s.jsxs("div",{className:"vp-sc-cue","aria-hidden":"true",style:{position:"absolute",inset:0,zIndex:2,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",pointerEvents:"none",gap:8,fontSize:16,fontWeight:800,letterSpacing:"-0.01em",color:"#fff",textShadow:"0 2px 6px rgba(0,0,0,0.6)"},children:[r?s.jsxs("svg",{width:"30",height:"30",viewBox:"0 0 30 30","aria-hidden":"true",children:[s.jsx("title",{children:"Scratch"}),s.jsx("ellipse",{cx:"15",cy:"16.5",rx:"9",ry:"9",fill:"rgba(0,0,0,0.3)"}),s.jsx("ellipse",{cx:"15",cy:"15",rx:"9",ry:"9",fill:"var(--pg-lining, #f0c868)"}),s.jsx("ellipse",{cx:"15",cy:"15",rx:"6.2",ry:"6.2",fill:"none",stroke:"rgba(0,0,0,0.25)"}),s.jsx("path",{d:"M11 15h8",stroke:"rgba(0,0,0,0.35)",strokeWidth:"1.6",strokeLinecap:"round"})]}):null,r]}),!A&&s.jsx("button",{type:"button",disabled:m,onClick:M,style:l==="hidden"?{...eE,cursor:m?"default":"pointer"}:{position:"absolute",left:"50%",bottom:-34,transform:"translateX(-50%)",zIndex:3,minHeight:44,padding:"0 12px",background:"transparent",border:0,color:"var(--pg-ink-muted, #9fb8ab)",fontSize:13,textDecoration:"underline",textUnderlineOffset:3,cursor:m?"default":"pointer"},children:o}),s.jsx("p",{id:P,"aria-live":"polite",style:eE,children:A?"Revealed.":""})]})}const eE={position:"absolute",width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap",border:0};function DU(e){const t=e.trim().replace(/^#/,""),n=t.length===3?t.split("").map(o=>o+o).join(""):t;if(!/^[0-9a-fA-F]{6}$/.test(n))throw new Error(`Not a hex color: ${JSON.stringify(e)}`);const r=Number.parseInt(n,16);return{r:r>>16&255,g:r>>8&255,b:r&255}}function tE(e){const{r:t,g:n,b:r}=DU(e),o=l=>{const c=l/255;return c<=.03928?c/12.92:((c+.055)/1.055)**2.4};return .2126*o(t)+.7152*o(n)+.0722*o(r)}function nE(e,t){const n=tE(e),r=tE(t),[o,l]=n>=r?[n,r]:[r,n];return(o+.05)/(l+.05)}const H0=ei({mechanic:Wo("scratch"),revealThreshold:fn().min(.25).max(.85).default(.55),brushRadius:fn().int().min(10).max(48).default(22)}),G0=ei({mechanic:Wo("match"),panels:Aq([Wo(6),Wo(9)]).default(6),matchCount:fn().int().min(2).max(3).default(3),revealThreshold:fn().min(.25).max(.85).default(.5),brushRadius:fn().int().min(8).max(32).default(14)}),Tp=ei({mechanic:Wo("wheel"),wedges:fn().int().min(4).max(12).default(8),minTurns:fn().int().min(2).max(6).default(3),spinMs:fn().int().min(1800).max(6e3).default(3600)}),K0=ei({mechanic:Wo("drop"),planters:fn().int().min(3).max(9).default(5),dropMs:fn().int().min(1600).max(6e3).default(3e3),fall:L0(["samara","plinko"]).default("samara"),pegRows:fn().int().min(3).max(8).default(5)}),LU=Eq("mechanic",[H0,G0,Tp,K0]),qU=["percent","fixed","free_shipping","points","vida_credit","product","merch"],UU=["product","merch"],zU=ei({id:dn().min(1),label:dn().min(1).max(60),rewardType:L0(qU),weight:fn().int().min(1).max(1e6),valueBps:fn().int().min(1).max(1e4).nullable().default(null),valueCents:fn().int().min(1).nullable().default(null),points:fn().int().min(1).nullable().default(null),productVariantId:fn().int().positive().nullable().default(null),remaining:fn().int().min(0).nullable().default(null),expiryDays:fn().int().min(1).max(365).default(30),sortOrder:fn().int().default(0)}).superRefine((e,t)=>{const n=o=>{e[o]==null&&t.addIssue({code:"custom",path:[o],message:`${e.rewardType} tier requires ${o}`})},r=o=>{e[o]!=null&&t.addIssue({code:"custom",path:[o],message:`${e.rewardType} tier must not set ${o}`})};switch(e.rewardType){case"percent":n("valueBps"),r("valueCents"),r("points"),r("productVariantId");break;case"fixed":case"vida_credit":n("valueCents"),r("valueBps"),r("points"),r("productVariantId");break;case"points":n("points"),r("valueBps"),r("valueCents"),r("productVariantId");break;case"free_shipping":r("valueBps"),r("valueCents"),r("points"),r("productVariantId");break;case"product":case"merch":n("productVariantId"),r("valueBps"),r("points");break}}),VU=["member_daily","post_order","public_email","campaign_token","order_threshold","easter_egg"];ei({slug:dn().min(2).max(64).regex(/^[a-z0-9-]+$/,"slug is lowercase letters, digits and hyphens"),title:dn().min(1).max(120),themeId:dn().min(1),mechanic:LU,entryModes:zA(L0(VU)).min(1),prizes:zA(zU).min(2).max(24),startsAt:UA().nullable().default(null),endsAt:UA().nullable().default(null),enabled:Kv().default(!1),budgetDiscountCents:fn().int().min(0).nullable().default(null),officialRulesUrl:jq().nullable().default(null),approvedByAdminId:fn().int().positive().nullable().default(null)}).superRefine((e,t)=>
10{e.endsAt&&e.startsAt&&e.endsAt<=e.startsAt&&t.addIssue({code:"custom",path:["endsAt"],message:"endsAt must be after startsAt"});for(const n of BU(e))t.addIssue({code:"custom",path:n.path,message:n.message})});function BU(e){const t=[];return e.prizes.some(r=>UU.includes(r.rewardType))&&e.enabled&&(e.officialRulesUrl||t.push({path:["officialRulesUrl"],message:"A game with a product or merch prize needs an official rules URL before it can be enabled."}),e.approvedByAdminId==null&&t.push({path:["approvedByAdminId"],message:"A game with a product or merch prize needs a named admin approval before it can be enabled."})),t}const rE="#0c2a1f",aE="#123528",sE="#18432f",FU="#266b4c",Di="#9bdcc0",Tm="#dff2e9",iE="#d9a63f",vn="#f0c868",Jl="#f6f7f5",Xu="#0e1f18",oE="#f0c674",lE="#9fb8ab",$U="#a8b6cb",HU="#a6adb8",GU="#c0ab93",KU=[{id:"evergreen",name:"Evergreen",blurb:"The house look. Use it when the campaign has no occasion of its own.",surface:{bgFrom:aE,bgTo:rE,bgGlow:"#1c5a3f",panel:"#153c2c",ink:Jl,inkMuted:lE},accent:{primary:Di,onPrimary:Xu,lining:vn},cover:{kind:"soil",base:"#3d2f21",speck:"#5a4632",edge:"#241a12"},wheel:{palette:["#14563a","#f0c868","#f4ecdc","#2f8f63","#b5562c"],ringLight:"#caa477",ringDark:"#8a6a45",bark:"#4a3a28",pointer:vn},confetti:{kind:"seeds",palette:[Di,Tm,vn,"#7a9e81"]},host:"lab",copy:{greeting:"Professor Vida buried something here.",cue:"Brush away the soil",winLead:"Found it.",smallWinLead:"A small find."}},{id:"vidaday",name:"VidaDay (June 1)",blurb:"Vida's birthday. Warm, gold-lined, the loudest the house look ever gets.",surface:{bgFrom:sE,bgTo:rE,bgGlow:"#2c6b4a",panel:"#1a4a35",ink:Jl,inkMuted:"#b6cfc0"},accent:{primary:Di,onPrimary:Xu,lining:vn},cover:{kind:"soil",base:"#43341f",speck:"#6b5330",edge:"#2a2013"},wheel:{palette:["#1f6b47","#9bdcc0","#f0c868","#fdf6e6","#0f4630"],ringLight:"#d8b489",ringDark:"#94714a",bark:"#513c26",pointer:vn},confetti:{kind:"petals",palette:[vn,iE,Tm,"#f7ecd2"]},host:"party",copy:{greeting:"It is VidaDay. The Professor is handing out her cache.",cue:"Brush away the soil",winLead:"Happy VidaDay.",smallWinLead:"A little something for VidaDay."}},{id:"july4",name:"Fourth of July",blurb:"Navy, cream and one red accent. Shares its palette with the patriotic banner.",surface:{bgFrom:"#0a3161",bgTo:"#0a2547",bgGlow:"#14498c",panel:"#123258",ink:"#f4efe6",inkMuted:$U},accent:{primary:"#b3392e",onPrimary:"#ffffff",lining:vn},cover:{kind:"foil",base:"#48566b",speck:"#6c7c93",edge:"#2b3543"},wheel:{palette:["#b3392e","#f4efe6","#28457e","#f0c868","#7fa3d6"],ringLight:"#c9b79a",ringDark:"#8b7a5f",bark:"#4a4234",pointer:"#f4efe6"},confetti:{kind:"sparks",palette:["#f4efe6","#b3392e",vn,"#7fa3d6"]},host:"party",copy:{greeting:"The Professor packed her cache for the Fourth.",cue:"Scratch to open",winLead:"Found it.",smallWinLead:"A small find."}},{id:"christmas",name:"Christmas",blurb:"Snow over deep evergreen. The cover is snow, so the reveal reads as a thaw.",surface:{bgFrom:"#0b2a1c",bgTo:"#071c13",bgGlow:"#175c3c",panel:"#0f3625",ink:Jl,inkMuted:lE},accent:{primary:Di,onPrimary:Xu,lining:vn},cover:{kind:"snow",base:"#dde6ea",speck:"#ffffff",edge:"#a9bcc6"},wheel:{palette:["#a32b26","#f6f2e6","#1c5c3c","#f0c868","#2f8f63"],ringLight:"#cfae83",ringDark:"#8d6c47",bark:"#463726",pointer:vn},confetti:{kind:"snow",palette:["#ffffff","#dde6ea",Tm,vn]},host:"winter",copy:{greeting:"Something is buried under the snow.",cue:"Clear the snow",winLead:"Found it.",smallWinLead:"A small find."}},{id:"newyear",name:"New Year",blurb:"Near-black with gold lining. Quietest palette, loudest confetti.",surface:{bgFrom:"#101820",bgTo:"#05080b",bgGlow:"#1e3040",panel:"#161f29",ink:Jl,inkMuted:HU},accent:{primary:Di,onPrimary:Xu,lining:vn},cover:{kind:"foil",base:"#2c333c",speck:"#4a545f",edge:"#171c22"},wheel:{palette:["#f0c868","#171d1a","#f6f2e6","#1f6b47","#9bdcc0"],ringLight:"#c2a887",ringDark:"#7d6a45",bark:"#3a332b",pointer:vn},confetti:{kind:"sparks",palette:[vn,iE,"#ffffff",Di]},host:"party",copy:{greeting:"One more dig before the year turns.",cue:"Scratch to open",winLead:"Found it.",smallWinLead:"A small find."}},{id:"harvest",name:"Harvest",blurb:"Deep soil and dry leaves. The autumn campaign, and the most literal cache.",surface:{bgFrom:"#2b1d10",bgTo:"#17100a",bgGlow:"#4a3016",panel:"#332415",ink:Jl,inkMuted:GU},accent:{primary:oE,onPrimary:"#17100a",lining:vn}
10,cover:{kind:"leaves",base:"#6b4a22",speck:"#8f6a34",edge:"#3d2a13"},wheel:{palette:["#d98324","#2b5d3f","#f2e3c6","#a8431c","#f0c868"],ringLight:"#d9b98d",ringDark:"#916f45",bark:"#4c3720",pointer:vn},confetti:{kind:"leaves",palette:[oE,"#c8873f","#8f6a34",vn]},host:"lab",copy:{greeting:"The Professor has been busy all autumn.",cue:"Rake back the leaves",winLead:"Found it.",smallWinLead:"A small find."}},{id:"welcome",name:"Welcome",blurb:"For first-time visitors. Brighter, and the copy assumes nothing is known yet.",surface:{bgFrom:sE,bgTo:aE,bgGlow:FU,panel:"#1b4d38",ink:Jl,inkMuted:"#b6cfc0"},accent:{primary:Di,onPrimary:Xu,lining:vn},cover:{kind:"soil",base:"#3d2f21",speck:"#5a4632",edge:"#241a12"},wheel:{palette:["#f0c868","#1f6b47","#fdf6e6","#f2a93b","#9bdcc0"],ringLight:"#caa477",ringDark:"#8a6a45",bark:"#4a3a28",pointer:vn},confetti:{kind:"seeds",palette:[Di,Tm,vn,"#7a9e81"]},host:"lab",copy:{greeting:"Professor Vida buries things and forgets where.",cue:"Brush away the soil",winLead:"Found it. Welcome to Vida.",smallWinLead:"A small find to start with."}}];new Map(KU.map(e=>[e.id,e]));const YU=[{id:"scratch",name:"Scratch",sceneName:"Acorn Cache",blurb:"A patch of ground over something buried. Best on a phone, and the fastest to understand.",slotCount:()=>1,defaults:()=>H0.parse({mechanic:"scratch"})},{id:"match",name:"Scratch and match",sceneName:"Forager's Ticket",blurb:"A real scratch ticket: six panels, three of a kind wins. The longest-lasting of the four, and the one people finish.",slotCount:e=>e.mechanic==="match"?e.panels:1,defaults:()=>G0.parse({mechanic:"match"})},{id:"wheel",name:"Spin",sceneName:"Ring Wheel",blurb:"A trunk cross-section whose growth rings are the wheel. Shows every prize at once, so it reads as generous.",slotCount:e=>e.mechanic==="wheel"?e.wedges:1,defaults:()=>Tp.parse({mechanic:"wheel"})},{id:"drop",name:"Drop",sceneName:"Samara Drop",blurb:"Something falls into one of the planters: a maple seed that drifts, or an acorn that bounces down through pegs. Both animate the same decided slot.",slotCount:e=>e.mechanic==="drop"?e.planters:1,defaults:()=>K0.parse({mechanic:"drop"})}];new Map(YU.map(e=>[e.id,e]));function WU(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function QU(e){let t=e>>>0;return()=>{t=t+1831565813>>>0;let n=t;return n=Math.imul(n^n>>>15,n|1),n^=n+Math.imul(n^n>>>7,n|61),((n^n>>>14)>>>0)/4294967296}}function kp(e){return QU(WU(e))}function XU(e,t,n,r){const o=360/t,l=e*o+o/2,c=(r()-.5)*o*.6;return n*360+(360-l)+c}const Zv=["acorn","leaf","seed","sprout","pinecone","mushroom","berry","chestnut"];function cE(e){return Zv[e%Zv.length]}function ZU(e,t,n,r,o){const l=kp(`${n}:grid`),c=Math.max(0,e.findIndex(S=>S.id===t)),d=cE(c),m=[];e.forEach((S,C)=>{const N=cE(C);N!==d&&m.push(N)});for(const S of Zv)S!==d&&!m.includes(S)&&m.push(S);const p=new Array(r).fill(null),y=[...p.keys()];for(let S=0;S<Math.min(o,r);S+=1){const C=Math.floor(l()*y.length)%y.length,N=y.splice(C,1)[0];p[N]={symbol:d,winning:!0}}const g=[...m];for(let S=g.length-1;S>0;S-=1){const C=Math.floor(l()*(S+1))%(S+1);[g[S],g[C]]=[g[C],g[S]]}const v=new Map;let b=0;for(const S of y){let C=g[b%g.length],N=0;for(;(v.get(C)??0)>=o-1&&N<g.length;)b+=1,C=g[b%g.length],N+=1;v.set(C,(v.get(C)??0)+1),p[S]={symbol:C,winning:!1},b+=1}return{cells:p.map((S,C)=>{if(!S)throw new Error(`Match grid cell ${C} was left empty.`);return S}),winningSymbol:d,winningTierIndex:c}}const Zu=2400,uE=.42,dE=4,JU=1/3,fE=.5,e6=3.4,t6=16,n6=74,r6=46;function $2(e){const t=Math.max(1,Math.round(e.lanes)),n=Math.max(1,Math.round(e.rows)),r=e.width,o=e.height,l=r/t,c=l/2,d=t>=2?1:0,m=2*t-d,p=Math.round(o*.3),y=n>1?o-n6:p,g=n>1?(y-p)/(n-1):0,v=Math.max(2,Math.min(3.4,c*.16)),b=Math.max(.55,Math.min(1,Math.min(c,n>1?g:c)/26)),S=[];for(let C=0;C<n;C+=1){const N=(n+1+C)%2,A=p+g*C;for(let T=N===d%2?d:d+1;T<=m;T+=2)S.push({row:C,halfIndex:T,x:T*c,y:A,key:`p${C}-${T}`})}return{width:r,height:o,lanes:t,rows:n,laneWidth:l,halfLane:c,loHalf:d,hiHalf:m,releaseY:t6,pegTopY:p,pegBottomY:y,rowGap:g,landY:o-r6,pegRadius:v,fallerScale:b,pegs:S}}function H2(e,t){if(t<0||t>e)return 0;let n=1;for(let r=0;r<t;r+=1)n=n*(e-r)/(r+1);return Math.round(n)}function mE(e,t){return Math.abs(t)>e||(e+t&1)!==0?0:H2(e,(e+t)/2)}function a6(e,t,n,r,o,l){const c=n,d=Math.max(1,Math.round(t*JU)),m=Math.min(d,Math.floor(t/2)),p=t-m,y=Math.min(Math.max((e-c+t)/2,m),p),g=Math.round(y-t/2),v=[],b=[];let S=0;for(let N=m;N<=p;N+=1){const A=e-(2*N-t);if(A<r||A>o)continue;const T=H2(t,N-g);v.push(A),b.push(T),S+=T}if(v.length===0)return e;if(S<=0)return v[Math.floor(l()*v.length)%v.length];let C=l()*S;for(let N=0;N<v.length;N+=1)if(C-=b[N],C<0)return v[N];return v[v.length-1]}function s6(e,t,n,r,o,l){const c=[];let d=e,m=0;for(let p=0;p<n;p+=1){const y=n-p-1;let g=d+1<=o?mE(y,t-(d+1)):0,v=d-1>=r?mE(y,t-(d-1)):0;m===1&&(g*=fE),m===-1&&(v*=fE),g<=0&&v<=0&&(g=t>d?1:0,v=g===1?0:1);const S=l()*(g+v)<g?1:-1;c.push(S),m=S,d+=S}return c}function i6(e,t){const n=$2(e),{lanes:r,rows:o,halfLane:l,rowGap:c,pegTopY:d,releaseY:m,landY:p}=n,g=2*Math.min(Math.max(Math.round(e.landingSlot),0),r-1)+1,v=a6(g,o,r,n.loHalf,n.hiHalf,t),b=s6(v,g,o,n.loHalf,n.hiHalf,t),S=(t()*2-1)*26,C=l*e6,N=[{drop:d-m,dx:0,spin:S}];for(let O=1;O<o;O+=1)N.push({drop:c,dx:b[O-1]*l,spin:b[O-1]*C});N.push({drop:p-n.pegBottomY,dx:b[o-1]*l,spin:b[o-1]*C});const A=2,T=[],E=[];let j=0;for(const O of N){const F=Math.sqrt(j*j+2*Zu*O.drop);T.push((j+F)/Zu),E.push(j),j=uE*F}const _=[],R=[];for(let O=0;O<A;O+=1)R.push(j),_.push(2*j/Zu),j*=uE;const P=T.reduce((O,F)=>O+F,0)+_.reduce((O,F)=>O+F,0)||1,M=[],q=[];let U=0,V=v*l,$=m,L=0;M.push({t:0,x:V,y:$,angle:L});const H=(O,F,B)=>{const K=V,le=$,Z=L,ie=[],re=F/Zu;re>1e-4&&re<B&&ie.push(re);for(let de=1;de<=dE;de+=1)ie.push(B*de/dE);ie.sort((de,he)=>de-he);for(const de of ie){const he=B>0?de/B:1,pe=de>=B-1e-9,oe=pe?K+O.dx:K+O.dx*he,ge=pe?le+O.drop:le-F*de+.5*Zu*de*de,we=Z+O.spin*he,be=(U+de)/P,Me=M[M.length-1];be-Me.t<1e-6||M.push({t:be,x:oe,y:ge,angle:we})}U+=B,V=K+O.dx,$=le+O.drop,L=Z+O.spin};for(let O=0;O<N.length;O+=1)if(H(N[O],E[O],T[O]),O<o){const F=v+b.slice(0,O).reduce((B,K)=>B+K,0);q.push({row:O,halfIndex:F,x:F*l,y:d+c*O,t:U/P,dir:b[O]})}for(let O=0;O<A;O+=1)H({drop:0,dx:0,spin:0},R[O],_[O]);const Q=g*l,I=M[M.length-1];return I.t<1-1e-9?M.push({t:1,x:Q,y:p,angle:L}):(I.t=1,I.x=Q,I.y=p),{board:n,frames:M,hits:q,startX:v*l,landX:Q,landY:p}}function G2(e){switch(e){case"ticket":return"chestnut";case"rings":return"leaf";case"samara":return"seed";default:return"acorn"}}const Lt=(e,t,n,r={},o=30)=>({label:e,rewardType:t,weight:n,valueBps:r.valueBps??null,valueCents:r.valueCents??null,points:r.points??null,productVariantId:null,remaining:r.remaining??null,expiryDays:o,sortOrder:0}),o6=[{id:"daily-dig",name:"Daily Dig",blurb:"One scratch per member per day. The cheapest way to give people a reason to open the app.",themeId:"evergreen",mechanic:H0.parse({mechanic:"scratch"}),entryModes:["member_daily"],budgetDiscountCents:15e4,assumedBasketCents:12e3,assumedShippingCents:900,prizes:[Lt("50 Vida Points","points",40,{points:50}),Lt("100 Vida Points","points",28,{points:100}),Lt("$5 VidaCredit","vida_credit",22,{valueCents:500}
10,60),Lt("5% off","percent",7,{valueBps:500}),Lt("10% off","percent",2,{valueBps:1e3}),Lt("$10 VidaCredit","vida_credit",1,{valueCents:1e3},60)]},{id:"thank-you-spin",name:"Thank-you Spin",blurb:"One spin per paid order, on the confirmation page. Lands while someone is already happy, and pulls the next order forward.",themeId:"harvest",mechanic:Tp.parse({mechanic:"wheel",wedges:8}),entryModes:["post_order"],budgetDiscountCents:5e5,assumedBasketCents:18e3,assumedShippingCents:900,prizes:[Lt("100 Vida Points","points",50,{points:100}),Lt("$5 VidaCredit","vida_credit",25,{valueCents:500},60),Lt("5% off","percent",18,{valueBps:500}),Lt("$10 VidaCredit","vida_credit",5,{valueCents:1e3},60),Lt("10% off","percent",2,{valueBps:1e3})]},{id:"welcome-drop",name:"Welcome Drop",blurb:"One drop per email address, no account needed. The winner signs in to keep it, which is the point.",themeId:"welcome",mechanic:K0.parse({mechanic:"drop",planters:5,fall:"plinko",pegRows:5}),entryModes:["public_email"],budgetDiscountCents:35e4,assumedBasketCents:9e3,assumedShippingCents:900,prizes:[Lt("100 Vida Points","points",45,{points:100}),Lt("5% off","percent",30,{valueBps:500}),Lt("$5 VidaCredit","vida_credit",18,{valueCents:500},60),Lt("10% off","percent",6,{valueBps:1e3}),Lt("$20 VidaCredit","vida_credit",1,{valueCents:2e3,remaining:25},60)]},{id:"vidaday",name:"VidaDay",blurb:"June 1, Vida's birthday. A generous one-day wheel, budgeted to be spent rather than to last.",themeId:"vidaday",mechanic:Tp.parse({mechanic:"wheel",wedges:10}),entryModes:["member_daily","post_order"],budgetDiscountCents:3e5,assumedBasketCents:15e3,assumedShippingCents:900,prizes:[Lt("100 Vida Points","points",40,{points:100}),Lt("5% off","percent",30,{valueBps:500}),Lt("$10 VidaCredit","vida_credit",18,{valueCents:1e3},60),Lt("10% off","percent",10,{valueBps:1e3}),Lt("25% off","percent",2,{valueBps:2500,remaining:30},14)]},{id:"foragers-ticket",name:"Forager's Ticket",blurb:"Six panels, three of a kind wins. The one people actually finish, and the cheapest per play of the five.",themeId:"evergreen",mechanic:G0.parse({mechanic:"match",panels:6,matchCount:3}),entryModes:["member_daily","post_order"],budgetDiscountCents:15e4,assumedBasketCents:12e3,assumedShippingCents:900,prizes:[Lt("50 Vida Points","points",38,{points:50}),Lt("100 Vida Points","points",30,{points:100}),Lt("$5 VidaCredit","vida_credit",22,{valueCents:500},60),Lt("5% off","percent",8,{valueBps:500}),Lt("10% off","percent",2,{valueBps:1e3})]}];new Map(o6.map(e=>[e.id,e]));const pE="#1b1410",Jv="#fdf8ef";function hE(e){return nE(pE,e)>=nE(Jv,e)?pE:Jv}function l6(e,t){const n=e.filter(Boolean);if(n.length===0)return Array.from({length:t},()=>({fill:"#1f6b47",ink:Jv}));if(n.length===1)return Array.from({length:t},()=>({fill:n[0],ink:hE(n[0])}));const r=[];for(let o=0;o<t;o+=1){let l=n[o%n.length];const c=r[o-1],d=o===t-1?r[0]:void 0;if(l===c||l===d){const m=n.find(p=>p!==c&&p!==d);m&&(l=m)}r.push(l)}return r.map(o=>({fill:o,ink:hE(o)}))}const c6=[".vp-rw-rotor{transform-origin:50% 50%}",".vp-rw-pointer{transform-origin:50% 12%}",".vp-rw-tick{animation:vp-rw-tick 220ms cubic-bezier(0.33,1,0.68,1)}","@keyframes vp-rw-tick{0%{transform:rotate(0deg)}40%{transform:rotate(-9deg)}100%{transform:rotate(0deg)}}","@media (prefers-reduced-motion:reduce){",".vp-rw-rotor{transition:none !important}",".vp-rw-tick{animation:none}","}"].join(""),u6="cubic-bezier(0.22, 1, 0.36, 1)";function d6({slots:e,palette:t=["#1f6b47","#f0c868","#e9dcc3","#2f8f63","#c8873f"],restAngle:n,spinMs:r=3600,faceSrc:o,disabled:l=!1,spinLabel:c="Spin",onSettled:d,className:m,size:p=300}){const[y,g]=h.useState(0),[v,b]=h.useState(!1),[S,C]=h.useState(r),N=h.useRef(null),A=h.useId().replace(/[^a-zA-Z0-9]/g,""),T=Math.max(e.length,1),E=360/T,j=h.useCallback((O=0)=>{l||v||(b(!0),g(n+O*360),C(r+O*420))},[l,n,r,v]),_=O=>{l||v||(N.current={t:O.timeStamp,x:O.clientX,y:O.clientY})},R=O=>{const F=N.current;if(N.current=null,!F||l||v)return;const B=Math.max(O.timeStamp-F.t,1),le=Math.hypot(O.clientX-F.x,O.clientY-F.y)/B;j(Math.min(3,Math.floor(le/.6)))};h.useEffect(()=>{if(!v)return;const O=setTimeout(()=>{b(!1),d?.()},S+60);return()=>clearTimeout(O)}
10,[v,S,d]);const P=50,M=50,q=48,U=42,V=7.5,$=V+2.5,L=U-3,H=h.useMemo(()=>l6(t,T),[t,T]),Q=Math.max(T*2,16),I=O=>{const F=(O*E-90)*Math.PI/180,B=((O+1)*E-90)*Math.PI/180,K=E>180?1:0,le=P+Math.cos(F)*U,Z=M+Math.sin(F)*U,ie=P+Math.cos(B)*U,re=M+Math.sin(B)*U;return`M${P} ${M} L${le} ${Z} A${U} ${U} 0 ${K} 1 ${ie} ${re} Z`};return s.jsxs("div",{className:m,style:{position:"relative",width:p,height:p+34},children:[s.jsx("style",{children:c6}),s.jsxs("svg",{viewBox:"0 0 100 100",width:p,height:p,role:"img","aria-label":`Prize wheel with ${T} segments`,style:{display:"block",touchAction:"none",overflow:"visible"},onPointerDown:_,onPointerUp:R,children:[s.jsx("title",{children:"Prize wheel"}),s.jsxs("defs",{children:[s.jsxs("radialGradient",{id:`rw-face-${A}`,cx:"38%",cy:"28%",r:"80%",children:[s.jsx("stop",{offset:"0%",stopColor:"#fff",stopOpacity:.13}),s.jsx("stop",{offset:"58%",stopColor:"#fff",stopOpacity:0}),s.jsx("stop",{offset:"100%",stopColor:"#000",stopOpacity:.22})]}),s.jsxs("radialGradient",{id:`rw-rim-${A}`,cx:"36%",cy:"26%",r:"80%",children:[s.jsx("stop",{offset:"0%",stopColor:"#fff",stopOpacity:.3}),s.jsx("stop",{offset:"60%",stopColor:"#fff",stopOpacity:0}),s.jsx("stop",{offset:"100%",stopColor:"#000",stopOpacity:.45})]}),s.jsx("filter",{id:`rw-drop-${A}`,x:"-30%",y:"-30%",width:"160%",height:"160%",children:s.jsx("feDropShadow",{dx:"0",dy:"1.1",stdDeviation:"1.1",floodOpacity:"0.45"})}),s.jsxs("linearGradient",{id:`rw-metal-${A}`,x1:"0",y1:"0",x2:"0.7",y2:"1",children:[s.jsx("stop",{offset:"0%",stopColor:"#fbe6ab"}),s.jsx("stop",{offset:"34%",stopColor:"var(--pg-lining, #f0c868)"}),s.jsx("stop",{offset:"66%",stopColor:"#a97f2c"}),s.jsx("stop",{offset:"100%",stopColor:"#6d4f16"})]}),s.jsxs("radialGradient",{id:`rw-bulb-${A}`,cx:"38%",cy:"34%",r:"70%",children:[s.jsx("stop",{offset:"0%",stopColor:"#fffdf4"}),s.jsx("stop",{offset:"55%",stopColor:"#ffe9a8"}),s.jsx("stop",{offset:"100%",stopColor:"#d9a63a"})]}),s.jsxs("linearGradient",{id:`rw-gloss-${A}`,x1:"0",y1:"0",x2:"0.4",y2:"1",children:[s.jsx("stop",{offset:"0%",stopColor:"#fff",stopOpacity:.3}),s.jsx("stop",{offset:"42%",stopColor:"#fff",stopOpacity:.05}),s.jsx("stop",{offset:"43%",stopColor:"#fff",stopOpacity:0})]})]}),s.jsx("circle",{cx:P,cy:M,r:q+1.4,fill:"var(--pg-bark, #4a3a28)",opacity:.9}),s.jsx("circle",{cx:P,cy:M,r:q,fill:`url(#rw-metal-${A})`}),s.jsx("circle",{cx:P,cy:M,r:q,fill:`url(#rw-rim-${A})`}),s.jsx("circle",{cx:P,cy:M,r:U+.9,fill:"none",stroke:"#5c410f",strokeWidth:.8,opacity:.55}),Array.from({length:Q},(O,F)=>{const B=(F/Q*360-90)*(Math.PI/180),K=P+Math.cos(B)*(q-2.9),le=M+Math.sin(B)*(q-2.9);return s.jsxs("g",{children:[s.jsx("circle",{cx:K,cy:le,r:1.9,fill:"#00000055"}),s.jsx("circle",{cx:K,cy:le,r:1.55,fill:`url(#rw-bulb-${A})`})]},`bulb-${F}`)}),s.jsxs("g",{className:"vp-rw-rotor",style:{transform:`rotate(${y}deg)`,transition:v?`transform ${S}ms ${u6}`:"none"},children:[e.map((O,F)=>s.jsx("path",{d:I(F),fill:H[F].fill},`wedge-${O.prizeId}-${F}`)),Array.from({length:6},(O,F)=>s.jsx("circle",{cx:P,cy:M,r:V+(U-V)*(F+1)/6.5,fill:"none",stroke:"#000",strokeWidth:F%2===0?.4:.22,opacity:.13},`ring-${F}`)),o?s.jsx("image",{href:o,x:P-U,y:M-U,width:U*2,height:U*2,clipPath:`circle(${U}px at ${U}px ${U}px)`}):null,s.jsx("circle",{cx:P,cy:M,r:U,fill:`url(#rw-face-${A})`}),s.jsx("circle",{cx:P,cy:M,r:U,fill:`url(#rw-gloss-${A})`}),e.map((O,F)=>{const B=(F*E-90)*Math.PI/180;return s.jsx("line",{x1:P+Math.cos(B)*V,y1:M+Math.sin(B)*V,x2:P+Math.cos(B)*U,y2:M+Math.sin(B)*U,stroke:"var(--pg-lining, #f0c868)",strokeWidth:.4,opacity:.5},`spoke-${O.prizeId}-${F}`)}),e.map((O,F)=>{const B=F*E+E/2;let K=((B-90)%360+360)%360;K>90&&K<270&&(K-=180);const Z=(B-90)*Math.PI/180,ie=($+L)/2,re=P+Math.cos(Z)*ie,de=M+Math.sin(Z)*ie;return s.jsx("text",{x:re,y:de,fontSize:5.2,fontWeight:800,textAnchor:"middle",dominantBaseline:"central",fill:H[F].ink,transform:`rotate(${K} ${re} ${de})`,style:{letterSpacing:"-0.02em"},children:O.label},`label-${O.prizeId}-${F}`)}),s.jsx("circle",{cx:P,cy:M,r:V,fill:"var(--pg-bark, #4a3a28)",filter:`url(#rw-drop-${A})`}),s.jsx("circle",{cx:P,cy:M,r:V-1.1,fill:"none",stroke:"var(--pg-lining, #f0c868)",strokeWidth:.6,opacity:.9}),s.jsxs("g",{transform:`translate(${P} ${M})`,children:[s.jsx("path",{d:"M0 -3.9 C2.7 -3.9 3.9 -1.6 3.9 0.5 C3.9 3 2 4.6 0 4.6 C-2 4.6 -3.9 3 -3.9 0.5 C-3.9 -1.6 -2.7 -3.9 0 -3.9 Z",fill:"var(--pg-lining, #f0c868)"}),s.jsx("path",{d:"M-4 -3 H4 A1 1 0 0 1 4 -1.2 H-4 A1 1 0 0 1 -4 -3 Z",fill:"var(--pg-bark, #4a3a28)",opacity:.9}),s.jsx("path",{d:"M0 -3.9 V-5.4",stroke:"var(--pg-bark, #4a3a28)",strokeWidth:.7})]})]}),s.jsxs("g",{className:v?"vp-rw-pointer vp-rw-tick":"vp-rw-pointer",filter:`url(#rw-drop-${A})`,children:[s.jsx("path",{d:"M43.6 2.2 H56.4 L58 6.4 L50 15.4 L42 6.4 Z",fill:"var(--pg-pointer, #f0c868)",stroke:"#5c410f",strokeWidth:.6,strokeLinejoin:"round"}),s.jsx("path",{d:"M43.6 2.2 H50 L50 15.4 L42 6.4 Z",fill:"#fff",opacity:.28}),s.jsx("path",{d:"M50 2.2 H56.4 L58 6.4 L50 15.4 Z",fill:"#000",opacity:.16}),s.jsx("path",{d:"M42 6.4 H58",stroke:"#5c410f",strokeWidth:.45,opacity:.5})]})]}),s.jsx("button",{type:"button",disabled:l||v,onClick:()=>j(0),style:{position:"absolute",left:"50%",bottom:0,transform:"translateX(-50%)",minHeight:44,minWidth:148,padding:"0 22px",borderRadius:999,border:"1px solid color-mix(in srgb, var(--pg-lining, #f0c868) 55%, transparent)",background:"var(--pg-accent, #9bdcc0)",color:"var(--pg-on-accent, #0e1f18)",fontSize:16,fontWeight:800,letterSpacing:"-0.01em",curs
10or:l||v?"default":"pointer",opacity:l?.55:1},children:v?"Spinning":c})]})}const f6=[".vp-gs{position:relative;isolation:isolate}",".vp-gs-reveal{animation:vp-gs-rise 420ms cubic-bezier(0.22,1,0.36,1) both}","@keyframes vp-gs-rise{from{transform:translateY(10px);opacity:0}to{transform:translateY(0);opacity:1}}","@media (prefers-reduced-motion:reduce){",".vp-gs-reveal{animation:none}","}"].join("");function m6({vars:e,host:t,greeting:n,children:r,reveal:o,closedMessage:l,reserveStage:c=!0,className:d}){const m={...e,background:"radial-gradient(120% 80% at 50% 18%, var(--pg-bg-glow) 0%, transparent 58%), linear-gradient(170deg, var(--pg-bg-from) 0%, var(--pg-bg-to) 100%)",color:"var(--pg-ink)"};return s.jsxs("section",{className:`vp-gs ${d??""}`,style:m,children:[s.jsx("style",{children:f6}),s.jsxs("div",{style:{margin:"0 auto",maxWidth:420,minHeight:c?430:0,maxHeight:"calc(100dvh - 24px)",padding:"16px 18px 24px",display:"grid",gridTemplateRows:c?"auto 1fr":"auto auto",gap:12},children:[s.jsxs("header",{style:{textAlign:"center"},children:[t,n?s.jsx("p",{style:{margin:"10px 0 0",fontSize:16,lineHeight:1.45,textWrap:"balance",color:"var(--pg-ink)"},children:n}):null]}),s.jsx("div",{style:{display:"grid",placeItems:"center",paddingBottom:8},children:o?s.jsx("div",{className:"vp-gs-reveal",children:o}):l?s.jsx("p",{style:{margin:0,fontSize:15,textAlign:"center",color:"var(--pg-ink-muted)",maxWidth:"32ch"},children:l}):r})]})]})}function p6({headline:e,prize:t,instruction:n,code:r,expiry:o,claimPrompt:l,cta:c,className:d}){const[m,p]=h.useState(!1),y=async()=>{if(r)try{await navigator.clipboard.writeText(r),p(!0),window.setTimeout(()=>p(!1),1600)}catch{}};return s.jsxs("div",{className:d,style:{width:"100%",maxWidth:360,padding:"22px 20px",borderRadius:14,background:"var(--pg-panel)",boxShadow:"inset 0 0 0 1px color-mix(in srgb, var(--pg-lining) 45%, transparent)",textAlign:"center"},children:[s.jsx("p",{style:{margin:0,fontSize:14,letterSpacing:"0.01em",color:"var(--pg-ink-muted)"},children:e}),s.jsx("p",{style:{margin:"8px 0 0",fontSize:26,lineHeight:1.2,fontWeight:800,letterSpacing:"-0.02em",textWrap:"balance",color:"var(--pg-ink)"},children:t}),s.jsx("p",{style:{margin:"12px 0 0",fontSize:14,lineHeight:1.5,color:"var(--pg-ink-muted)"},children:n}),l?s.jsx("div",{style:{marginTop:16},children:l}):null,r?s.jsx("button",{type:"button",onClick:y,style:{marginTop:16,minHeight:48,width:"100%",borderRadius:10,border:"1px dashed color-mix(in srgb, var(--pg-lining) 60%, transparent)",background:"transparent",color:"var(--pg-ink)",fontSize:18,fontWeight:700,letterSpacing:"0.08em",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",cursor:"pointer"},"aria-label":`Copy code ${r}`,children:m?"Copied":r}):null,o?s.jsx("p",{style:{margin:"10px 0 0",fontSize:12.5,color:"var(--pg-ink-muted)"},children:o}):null,c?s.jsx("div",{style:{marginTop:18},children:c}):null]})}function h6(e){return Math.round(e*.86)+10}function g6(e,t){const r=(e+24)/6;let o=`M-12 -10 L${e+12} -10 L${e+12} ${t*.52}`;for(let l=6;l>0;l-=1){const c=-12+r*l,d=-12+r*(l-1),m=t*(l%2===0?.98:.8);o+=` Q${(c+d)/2} ${m} ${d} ${t*.52}`}return`${o} Z`}const y6=[".vp-sd-seed{will-change:transform}",".vp-sd-spin{animation:vp-sd-spin 620ms linear infinite}","@keyframes vp-sd-spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}",".vp-sd-ping{opacity:0;animation:vp-sd-ping 460ms ease-out both}","@keyframes vp-sd-ping{0%{opacity:0}12%{opacity:0.75}100%{opacity:0}}",".vp-sd-lit{opacity:0.85;animation:vp-sd-lit 460ms ease-out both}","@keyframes vp-sd-lit{0%{opacity:0.85}12%{opacity:1}100%{opacity:0.85}}","@media (prefers-reduced-motion:reduce){",".vp-sd-seed,.vp-sd-roll{transition:none !important;animation:none !important}",".vp-sd-spin,.vp-sd-ping,.vp-sd-lit{animation:none}",".vp-sd-ping{opacity:0}","}"].join(""),x6="cubic-bezier(0.37, 0, 0.63, 1)";function v6(e,t,n){const r=n*.58;if(e.length*r<=t)return[e];const o=e.lastIndexOf(" ");return o<=0?[e]:[e.slice(0,o),e.slice(o+1)]}function b6({planters:e,landingSlot:t,seed:n="drop",dropMs:r=3e3,fall:o="samara",pegRows:l=5,disabled:c=!1,dropLabel:d="Let it fall",onSettled:m,className:p,width:y=320}){const[g,v]=h.useState(!1),[b,S]=h.useState(!1),C=h.useId().replace(/[^a-zA-Z0-9]/g,""),N=Math.max(e.length,1),A=Math.min(Math.max(t,0),N-1),T=h6(y),E=y/N,j=E*A+E/2,_=o==="plinko",R=
10h.useMemo(()=>_?i6({width:y,height:T,lanes:N,rows:l,landingSlot:A},kp(`${n}:fall`)):null,[_,y,T,N,l,A,n]),P=h.useMemo(()=>_?$2({width:y,height:T,lanes:N,rows:l}):null,[_,y,T,N,l]),M=h.useMemo(()=>y*(.18+kp(`${n}:drift`)()*.64),[n,y]),q=h.useMemo(()=>{if(!R)return null;const O=`vp-sd-fall-${C}`,F=`vp-sd-roll-${C}`,B=Z=>(Z*100).toFixed(4),K=R.frames.map(Z=>`${B(Z.t)}%{transform:translate(${Z.x.toFixed(2)}px,${Z.y.toFixed(2)}px)}`).join(""),le=R.frames.map(Z=>`${B(Z.t)}%{transform:rotate(${Z.angle.toFixed(1)}deg)}`).join("");return{name:O,rollName:F,css:`@keyframes ${O}{${K}}@keyframes ${F}{${le}}`}},[R,C]),U=h.useMemo(()=>{const O=new Map;for(const F of R?.hits??[])O.set(`p${F.row}-${F.halfIndex}`,F.t);return O},[R]),V=h.useCallback(()=>{c||g||b||v(!0)},[c,g,b]);h.useEffect(()=>{if(!g)return;const O=setTimeout(()=>{v(!1),S(!0),m?.()},r+60);return()=>clearTimeout(O)},[g,r,m]);const $=g||b,L=R?R.landX:j,H=R?R.landY:T-46,Q=$?L:R?R.startX:M,I=$?H:P?.releaseY??16;return s.jsxs("div",{className:p,style:{position:"relative",width:y,paddingBottom:56,"--pg-canopy-hi":"color-mix(in srgb, var(--pg-accent, #9bdcc0) 42%, #0b2418)","--pg-canopy-lo":"color-mix(in srgb, var(--pg-accent, #9bdcc0) 12%, #0b2418)","--pg-pot":"color-mix(in srgb, var(--pg-cover-base, #6b4a22) 70%, #b4602f)","--pg-acorn-body":"#c97b2f","--pg-acorn-cap":"#6b4118"},children:[s.jsx("style",{children:y6}),q?s.jsx("style",{children:q.css}):null,s.jsxs("svg",{width:y,height:T,viewBox:`0 0 ${y} ${T}`,role:"img","aria-label":`A seed falling toward ${N} planters`,style:{display:"block",overflow:"visible"},children:[s.jsx("title",{children:"Samara drop"}),s.jsxs("defs",{children:[s.jsxs("linearGradient",{id:`sd-canopy-${C}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[s.jsx("stop",{offset:"0%",stopColor:"var(--pg-canopy-hi)"}),s.jsx("stop",{offset:"100%",stopColor:"var(--pg-canopy-lo)"})]}),s.jsxs("linearGradient",{id:`sd-pot-${C}`,x1:"0",y1:"0",x2:"1",y2:"0",children:[s.jsx("stop",{offset:"0%",stopColor:"#fff",stopOpacity:.22}),s.jsx("stop",{offset:"42%",stopColor:"#fff",stopOpacity:0}),s.jsx("stop",{offset:"100%",stopColor:"#000",stopOpacity:.3})]}),s.jsxs("linearGradient",{id:`sd-shaft-${C}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[s.jsx("stop",{offset:"0%",stopColor:"var(--pg-lining, #f0c868)",stopOpacity:.1}),s.jsx("stop",{offset:"100%",stopColor:"var(--pg-lining, #f0c868)",stopOpacity:0})]}),s.jsxs("linearGradient",{id:`sd-nut-${C}`,x1:"0",y1:"0",x2:"1",y2:"1",children:[s.jsx("stop",{offset:"0%",stopColor:"#e8a24f"}),s.jsx("stop",{offset:"52%",stopColor:"var(--pg-acorn-body)"}),s.jsx("stop",{offset:"100%",stopColor:"#8f4f18"})]}),s.jsx("filter",{id:`sd-shadow-${C}`,x:"-40%",y:"-40%",width:"180%",height:"180%",children:s.jsx("feDropShadow",{dx:"0",dy:"2",stdDeviation:"2.4",floodOpacity:"0.42"})})]}),s.jsxs("g",{children:[s.jsx("path",{d:g6(y,T*(_?.26:.34)),fill:`url(#sd-canopy-${C})`,filter:`url(#sd-shadow-${C})`}),s.jsx("path",{d:`M${y*.5} ${T*.2} q ${y*.06} ${T*.05} ${y*.02} ${T*.1}`,stroke:"var(--pg-bark, #4a3a28)",strokeWidth:2,fill:"none",strokeLinecap:"round",opacity:.85}),(_?[]:[.2,.44,.7]).map(O=>s.jsx("path",{d:`M${y*O-7} ${T*.3} L${y*O+7} ${T*.3} L${y*O+17} ${T*.66} L${y*O-17} ${T*.66} Z`,fill:`url(#sd-shaft-${C})`},`shaft-${O}`))]}),P?P.pegs.map(O=>{const F=U.get(O.key),B=F!=null&&$,K=`${Math.round((F??0)*r)}ms`;return s.jsxs("g",{children:[B?s.jsx("circle",{className:"vp-sd-ping",cx:O.x,cy:O.y,r:P.pegRadius*3,fill:"var(--pg-lining, #f0c868)",style:{animationDelay:K}}):null,s.jsx("circle",{cx:O.x,cy:O.y+1,r:P.pegRadius+.2,fill:"#000",opacity:.3}),s.jsx("circle",{className:B?"vp-sd-lit":void 0,cx:O.x,cy:O.y,r:P.pegRadius,fill:"var(--pg-lining, #f0c868)",opacity:.85,style:B?{animationDelay:K}:void 0}),s.jsx("circle",{cx:O.x-P.pegRadius*.3,cy:O.y-P.pegRadius*.34,r:P.pegRadius*.36,fill:"#fff",opacity:.6})]},O.key)}):null,e.map((O,F)=>{const B=E*F+E/2,K=Math.min(E*.82,62),le=40,Z=T-le-20,ie=8,re=F===A&&b;return s.jsxs("g",{children:[re?s.jsx("ellipse",{cx:B,cy:Z+le+3,rx:K*.72,ry:7,fill:"var(--pg-lining, #f0c868)",opacity:.28}):null,s.jsx("path",{d:`M${B-K/2+3} ${Z+ie} L${B+K/2-3} ${Z+ie} L${B+K*.32} ${Z+le} L${B-K*.32} ${Z+le} Z`,fill:"var(--pg-pot, #a8542e)",filter:`url(#sd-shadow-${C})`}),s.jsx("path",{d:`M${B-K/2+3} ${Z+ie} L${B+K/2-3} ${Z+ie} L${B+K*.32} ${Z+le} L${B-K*.32} ${Z+le} Z`,fill:`url(#sd-pot-${C})`}),s.jsx("rect",{x:B-K/2+3.5,y:Z+ie-4,width:K-7,height:5,fill:"var(--pg-cover-edge, #3d2a13)"}),s.jsx("rect",{x:B-K/2,y:Z,width:K,height:ie,rx:2,fill:"var(--pg-pot, #a8542e)",
10stroke:re?"var(--pg-lining, #f0c868)":"rgba(0,0,0,0.25)",strokeWidth:re?1.6:.8}),(()=>{const de=Math.max(8,Math.min(11,E*.2)),he=v6(O.label,E-2,de);return s.jsx("text",{x:B,y:T-4-(he.length-1)*(de+1),fontSize:de,fontWeight:800,style:{letterSpacing:"-0.03em"},textAnchor:"middle",fill:re?"var(--pg-lining, #f0c868)":"var(--pg-ink, #f6f7f5)",opacity:re?1:.82,children:he.map((pe,oe)=>s.jsx("tspan",{x:B,dy:oe===0?0:de+1,children:pe},pe))})})()]},`${O.prizeId}-${F}`)}),s.jsx("g",{className:"vp-sd-seed",style:q&&$?{animation:`${q.name} ${r}ms linear forwards`,transform:`translate(${L}px, ${H}px)`}:{transform:`translate(${Q}px, ${I}px)`,transition:g?`transform ${r}ms ${x6}`:"none"},children:_?s.jsx("g",{className:"vp-sd-roll",style:q&&$?{animation:`${q.rollName} ${r}ms linear forwards`}:void 0,children:s.jsxs("g",{filter:`url(#sd-shadow-${C})`,transform:`scale(${(P?.fallerScale??1).toFixed(3)})`,children:[s.jsx("path",{d:"M-6.2 -1 C-6.2 6.2 -3.1 10.8 0 10.8 C3.1 10.8 6.2 6.2 6.2 -1 Z",fill:`url(#sd-nut-${C})`}),s.jsx("path",{d:"M-3.4 0.4 C-3.4 5.4 -1.8 8.6 -0.4 9.6 C-2.6 9 -4.6 5.4 -4.6 0.4 Z",fill:"#fff",opacity:.3}),s.jsx("path",{d:"M-7.2 -5.8 H7.2 A2 2 0 0 1 7.2 -1 H-7.2 A2 2 0 0 1 -7.2 -5.8 Z",fill:"var(--pg-acorn-cap)"}),s.jsx("path",{d:"M-6.2 -4.7 H6.2 M-6.2 -2.7 H6.2 M-4 -5.8 V-1 M0 -5.8 V-1 M4 -5.8 V-1",stroke:"#000",strokeOpacity:.2,strokeWidth:.6}),s.jsx("path",{d:"M0 -5.8 V-8.6",stroke:"var(--pg-acorn-cap)",strokeWidth:1.6,strokeLinecap:"round"})]})}):s.jsxs("g",{className:g?"vp-sd-spin":void 0,children:[s.jsx("ellipse",{cx:0,cy:0,rx:3.4,ry:3.4,fill:"var(--pg-bark, #4a3a28)"}),s.jsx("path",{d:"M2 -1 Q16 -8 21 -1 Q16 4 2 2 Z",fill:"var(--pg-accent, #9bdcc0)",opacity:.92}),s.jsx("path",{d:"M-2 1 Q-16 8 -21 1 Q-16 -4 -2 -2 Z",fill:"var(--pg-accent, #9bdcc0)",opacity:.72})]})})]}),s.jsx("button",{type:"button",disabled:c||g||b,onClick:V,style:{position:"absolute",left:"50%",bottom:0,transform:"translateX(-50%)",minHeight:44,minWidth:140,borderRadius:999,border:0,background:"var(--pg-accent, #9bdcc0)",color:"var(--pg-on-accent, #0e1f18)",fontSize:15,fontWeight:700,cursor:c||g||b?"default":"pointer"},children:g?"Falling":d})]})}const w6="data:image/webp;base64,UklGRpoKAABXRUJQVlA4II4KAADQLwCdASqgAKAAPkkijkUioiEUKdykKASEoA1iQGe3ebHXn79+GOEMpby6uZ+dN+hfYE/VzphftV6gP17/Zn3XP8r+1Xu0/wXqAf0T/XdZ76BP69em77In9i/5v7ce1V//9aA3h5IfentJye4inyj79/reGP1ZeoF68/zv5UcPGAD6p/7Lw4tSy624/ugJ/Nf6f/2P8B7Hmi76y9g/+W/1//p9jnyZimpKcOiKwrkFMxZVVoimCQWp9J/+IqKhWoStEdm8tkRN1nipL/82s/lBB8Pay8YTSo+m88LJRFNJNKNN9RB/TWsLCRW3pMBmmmw77bR6najY904QqquMApctqSlWMpjrcvYqRvkW3srFLihWwXhTJMvq/qye428yKf4upGpWU/BCIsjMkR4qMKK4v90Zw0XwPMXk/yf4eTWH4amvvrvylg84EijtKhtqapEWEQn1vIaZow4GwrRb/YUiIfK/w0QkL2r3UU4urcsASGhY14KqNtLmFaAWQ4zljBbwIwAf3JIAAP74fLMv+5G3//5PP4U+13RhjgBHlQBarrgtqdSzauWDyP/IdwAlEGrZOGQKsjPXyOMDRyLoVLMZVtPWnsCJcINticENsERofKIWVAOdhXboYL7Ra9xh5ys7W0nhBYFArK02XbsPAq/JAhvf+ZwOcRZQLQF9xRjw1U4iV2EOSH/ZbslQR1yzNZl+0tpbZju6X2UShtimUWpRHc1g+2YJk+ckHcNeQNyUWMe6M/me867HLGojCRttPssEh3PQJuM1tliGScDNa2wRg5WIwmg4ZCpX77OozTQdvoCYnseg6sM3zKfFXLX7rvz3Jzb4eo2ocCj/5yRBZYR8JXsigL/FThyY5PnoCXVVwJ01ovKsJf//38ovwwidl8H4s5kqS12+mSoeoS8xV51G255awmNSAvX7QHGzr25pVBqH6t9/ki9P7Tt2SETuWgZDaicMXTu+3n2Vg+jbelMclCInf9HZZdoGLF1jq1cBma1T8zX4tOMDVEu0F8nMoagl0CNu1ef8G13P5Pd6F+rXzsyZHXMboRuJq8QpTRMghA9Rw6iBYFUC68YzpfkbvtIenbM7tVRJVEI1r4b0c0oZpu7YHqsDHY2tSW7Sx7mi3/kFo30sOXVBfeRBDbvhou2YTuj7miXxDfWgZTXauexct2K1s4W/1J9EOFS+6qvtvnNezOX7GeuwVMehVgPXbMhCm6v4B0+iMNbeE5cTlk77E0b36ViPVI3Sh4Wi3tG+cnlrEB7R3Y+mdqn0/KuR8HGxOHE9A4Am5K2ZXizCCaivmij/ibQ6SjaUEXJiIsoa3+qbfnA3087kXfZK0+5ROIZuIKqSDrP8T8/xzRCCnJJg1iW2bdgX86r/CtzTtwcqMlOKye1M6uDQXuh58YvIQmDuYETCzu47rydIjCf/8aTlG2YpCJzjitzPFecZuta7OxbboBws4hn12ynzPH7CK8dal14f9bR3apGFjCjyfYJwiS849qJut43aY3dXv/pe00fmemW3hNptv10J1IxL68EPfiRfpHzvUrTdRiAQRYXiFYO53D3VNfuDBDf794r68ys6Oojx5SbqUY7LLII2JdZllL0TMk21Cf1kaw3DjRnwVenSDR/WscX8CL4u9J8/zhmUssqyWvQH+N0nntfjkIXOkm6TYqSyBeQng9P+yNXmPd8qdyVTXhLvkIqY/rxSGRnGVUyVcE934QZwb5eXHSfdL+B1f3e/Yp9r97AFstg+dLerUZ+Kdk2gasjiObXftRzxIbSio+GDt8xk6bP94h4AmzRLwj39DHzPyuzle71qax9Tbg0SyLQLEtr45pNhhLEvJdFwHZcvZrDkgttKasWH+3h79wWacaQ/0plYb4e05f/BU4G1awf4TOe6yD1UTYuH39L62BTh5YDHFvtsIrmLxfO+z4rL0/PLmjZ4Zpdgd3KybKNlbv+P+baFkrZPQCdB9n4vCQmhrgLw7HhIb42FQMH7qlBdCXwgmebwbIRpQdSnabr6F/O+TKXqAHa+A1cZEcRXrq9AHeixNDS973Z85AA72FvVifotMnkxnLOeJ5LdsaFB+vWvSsCKp4whAk8r3NN1kHQjh6XrP5+xtazIgjFYLKvKfcO9zyLAA/LN/WlcMCciuetKZRRzqA38p1VwnT8VLyt+iqvL6qviwsiDnNgv3vzwWnS/XWcq3iR/5YgxGh/OuFlHj7bFslKGix//lTBaqe7sHZGLIoey6C0zs9MpyiUBxNMWgeyf67UN4c/SplJzg5w55wSf/+jFn3/K3T7wuBmyssp7FRdt/D/Muxj/aqx+GmOc5YI38gpk4TD8TPfmhHf37xjvuHpl1XLsQgPMHNIb3dXGYjMeFJlU8ps2iPs6fyfMjrvIyK58v35gptZ3ms5/a3y8XwJxUGrxo8K8kHX+df4861C82a0uolOL8gzD5Ag2G6Q0K/GYy79Exd3S7zeYu2AUfFlc7mJNslbt3e7QsLs3ftuCgeRi+/B4OPNdkr1rdMNYupsnGYPfOpGOCXcVr3eZffqRrlUMESVKSk0d85JF/W03g/FABDM76M4ipnDwUFzklQx/3zyA5hA/mrahxfgIuWmq+FlwHt2n8w076eBVf0heGr59bAIWBpnIw0HTOfMIj3t+Q4Axq4f0n2dc4kDQuQvmmZb/iZSP1m6L7irTNFSmObbyZ3D1vv5kMFIYXTmVipotaQOoKJQALJN3mfVjfoA9dPdz9ZkOlebGe9Ls7C0YSMzExN9q90fmJsBP4u/Y9CD42Y2IuWwhdH4HujH5ok1NG/ZTO/4eyZnut/9A+rvkdtGZ1GUwkBs3yW+SVDy1/u7u+Ur8fgCGGydog+fbLA7JhtuGjuE3joSOn7LfVuvQDPGT6Zz6Mq79P3D0d62U9ip0Cq5oZONzh4vQYC1S7F/3QZet4T4DTsAEntre4ry30+Gp6TcY0Rhoa9W5et5yOyCMjtcEeRTuWqo0qkIq+aXQOUjCAd8mxy22GPTyOJ0xYR52Pj9ala/uUkSe8HPk1oDm6PRvEuAziMlAEs+xOu80JdacvGkNUiu/N/c4WH4gcr82zMr6fza1ectfhxpx9QU62J19wOwByOp7PKyD5+3ev/rPSceJz88/6JAerXrYHkqeiP8WlCiWHNgVHBRcylLyEUTzBYkiAmb0rRy/76bj3Z0X+Z8i7oqhp+cEI2bVo2/x3M2VCUFEbs/CGyzi5s0++SnonAxvtzKb+2iJEosQhyP1v8sylD2v35H8nVF5ZPpKZO8FBeLxz9U6QeXy9Z6uLRyihsANw5RaT1TrVlmcVGxSY/tY37fD45pe+7XDapt8xHEdMAsCh78LlzQUgpMsrKC26n9xTomYIO8W76zDtKCIUzjNZ+h9g+SyO1D8luemP8vV7vXgQRGAJTfM0MY2kBw9AA0JdDA3/tD4K3iEG7hN/hXNRhglqcAmbXl4dlzn2ybHiErDkR7znHHolmdAyT8PsCsEuiO25zvy2622HqyaKbclpSxgAQe07sI/1vvQQQtQqDvbZx30kSmLrZfSy6p2gf8ldTpM/tQQDttZc6H8oZnPLvsIfUKJYQ33Fff65hjgAF9x7JUAAAAAAA==",S6="data:image/webp;base64,UklGRsgGAABXRUJQVlA4ILwGAAAwJQCdASqgAKAAPkkkj0UioiETCbUUKASEpu3V6HKr2tm7+38h/yr4m5uhI3Yz+59A3+M9n/3Qe4B+lvTX8xH64/s97yv+K9VX+A9QD+2/8jrDvQg8tj2SP3F9JKLIGR90fh2rNHKRL0+wLUpEvT62P1sv0SBnc8XklePo92CokEa4z6sSRkPLzUOaOmjyWCPk1TaSK6TWfvnCB9ZRortnypv3lFx7HJ1PxVnWdi1lEcNDSzUeOLmI2PwDf8PvESxd9cLAp87NR2rk1/g2jNqdKh+VF62tieS+dPk+nom86Lfi3hRDDVugqHAAbav4dkFaEOlt1GIyoQJLZtoQ377ZbCpGsEvBL05GVs0jQsveD9q+DJ5ucu5byI4r+z80wmSdWdyWthbQdm0X+G4wviiOSAAA/vkeWfKsMf/x/evbPUlAAAAAEq3lV7/iUutSV4HF75LsBzUWzR1IF4lDiNtjil91VKjuY9mEszsOhgOuHwxj+cIFb91jzoSIq/am2hRpXRtpIgGCGCQV8yn4lr6uPoOQCA1/UpFk2qAZO3AKqaXtX2SQZ8Lexi+9kTkH9ZyvqM4LJ2fh8DQf0is3G2g6AMxXHqxi5r9h4IOEugsws7RNuQWeIy7RRJ/mFKVO81uk9Joz7tD+NGzixr3DYV4+os4QXVSM686YFqjJ9XQs4wbI4uIlcgI39RupA6ZdF2qgrOTzsSthoI8aFly+WWSQKA+LK9en2BllgBUZ0boPyo6QA2eb8jvv3wS1RrXhxccIR5i7tPRa8sLuF8dXTReZ9DJMpG+ypiZz90QAEC3qMYTThdaivM0MG/V1vHsOl504psfAMcCWZ7u3bttVHZQMOJJB1/yb2bNcbyqa0yzM7lWLBY4
10yNaD37GykyEwss9BMtGG+M7ostueeMccdJY+bNk4OlaZ70yWcD/mOQM2fGpIAk9biKsrF8RuiYKKjJLMOC2fOTMNi0JN321s5oJwNfnajrWAog+mCG+e2j+ZkdcWc9oY9hLwiqzd3aE5qN0aVTKOG3feYBKx8PCXUkhoKKzaReLb7nLEVH3Uq3y2Lk69UyPs/av/GF8xPwSKXp3Je3uk+m0tOW0ve3rs5xUkez15dnVVTOfn+JoeiHEatlI34IlDO8XEI96NTm9h57S25peEbMvw58ntaYb1qISQD07fjzJ2XCR8aM5irKwrm4xM1+9kOcWsYatxxsD67UxvBu2wPzrzaPpZA+cm58e0XqUCFF80ajQ4crvqzbB4ewO77dHQ2eIeU1Nn2KLLSl0zTomKmTRre2PsDUUr2afSBnThSgQCmcik+n5JCPB78u3Ff2A1G0miKFmpbiLI/yWch6Wo5xSrh5VrdpEgaTD9gtcIFLGqOoku1OOJF5v2k3h+IqqN0niaUxVOo93n34mljkdkAqb/SFWvR1oXTcIeYo0DCtL2XbRTi4Zwq/gq/9Opt1Rk9U/IS1pWa1WAsct3mINIJDCRrqjc58vBIGP7sc7brYCNPEQFFzDQSwIEYZf+ogd73bEoOflPoQLH/8Is2DtcKyfxBITmpnffEuObsSfWOxIEc+4al/HEW2aeLjaCx2tC6Quwsk0H5R1V1G1uJ20zgzVh5VN4I9lb45kE/E+rgMJcim6XLuosXJXEauH1Z4m7kxU0+sMYHrp4BQlPulGHG8DGERn8V5YtrdqJvpY/AA8BG80geCP6qUpKa/viMEIa3tV54+1cOCwLCFn89vyTpZK3Jhc2U6mQZYY2m/vE2We4MmmxgocBHRJ+q/EArORnPaeX0nkYPedAEP2+za4WOUzeZaIZVgc5U+CyF7+9W0DVegnuSQigljIgeoBC1bGiD/IsKS7CUcpnL6FbG4G8tHZoesjuHJS+97JSStyZku/Tjud9QAx6GAPZRfMZsO5ZjVAjYae5v1gljmPLF7ATjWYvzgxRE17nwFe9czLUIqyXUCAJ+CFFZTmZPjWQ+/FL1pm1g6eHEOPa8HTKlYVB8cwTsmzU3etrpF14hQjf8EN0RwYpEChyQxDVw9HZ9pvCm05pKgs/g/tBN23a2Yfp/zCjhzzTqra14xBVUFItiQirTCFS/0BrBoN92gJMoEY1c8w2eixYnHwlpYRc31bMnuGfdeEuvINdPQTjzXR7fF4fHymCPGkTPDxZKBWmgXxcY+vRr38Mk3XiI3lx8i/CN6LVSNSEEeCT8YKFKOShBU0ZA92OksM1u/VXNmPHws8JNHKs8VoqV+bt4fi2lHZ39ORkXE44TLAVfYa7R2oW8AXU+cdxr+yCQeCC8mhjxaHO1/wAAAAAAAA==",C6="data:image/webp;base64,UklGRhQHAABXRUJQVlA4IAgHAACwJgCdASqgAKAAPkkkj0UioiGSutUcKASEsYBnrEz+t/IDoUO+pVT+TnX5Se2j5gH6Z9PbzIefD6UP8v6hn9p/2PWbegB5bfspftj+53tTarxe6U7PCPReFGnUmleWD6o9gv9ZN9cKInmC/pEneq64F9b72M1sDeBJfbPb4Gov4JyX7ZPSbhQ1QPtAwTEk1f3GVdVJ37uZPBX2yphZKbqbV0lFMi9o3iKzF/zcvDyRwnPVcGNV0YPWXq6GP7JrZBu/hT4RrSnLi6MuzO8fnzlaQlGnuHFssIc5R1fmbyv3EicXrBpNxygeDV794n6VDAnUmew2y5e4jQlpdWzJvZGOxKS5oLlRBroW1XAm+10EzfNEJPsqbOZBPil//icxNsc312fCqF1X/Yi67c6jBTBk6aC2DASS6ScpDCof0gAA/vlPPiEiT//+UNq8Z9LQvLJxYvaxp3H6eWZ/kkFpJ7ZdJJOoyHm9Zos9RYlfN761CVwf2jjSYbmP/s+IbalWeV5+vMXZQx27vpPbk5wgBWD4K7NqfNfpyyQT3xa7pUlUwyOgsDxpV2LBQvZBcd39JbE2d1byhUxZiUlMseypxdizA2U4oRXNIuFbKgetbU6N4f72sR588hx7Os2FBqcg3oTK9J8xmaeSMcGrzSnM0LRDcRJKEvKDH2sDlFi2bDZN2yDmXxOCqyQa0+Bbtnd5XlDsbJqEr5MmZ6COHN4w8gegW0UQZnVBk93VcoJJeSeqv7aoqg6vzzYoO0D2xLIbz4SW4FnDtxXtru8vf5PGkI6m3LmOoPKYNe2sUS503RskS8zyj9sWkBViu/hBzox8CfQwe8D7QzJr2fvd0HzEx/MhfNBT0PvNTpof2Ev+xL7Jrzwq9mHKZP1QNbbZYpJJP/v2Ed4jPwgCgLM7T+J2ARQuNnHCNVl7/4mPI8VhcVDqb0YtuczORZ5VQatEHd+D+YkPCgAeIobgd749n50+gtaIMl9N2Y+RtNocJ+UWd8TmjH6zSiMImrOSU+ODKFGcQDdeOvQ/8Q/N5E6o6vHxCHXMyWQ45vKPUKmnKVrin4Nl6LcTRj+zDXjXY6Zf8b4SPGGr7Ep9e4d6fo+MKsFn5MTKL403/eSREDuSp3AeEkvIVjBr4HxM/g60RER4v0T/gY66Wmre0L+hhNgNY1Rz7efgfRLmkIeT1PbLPFmx+M/WCKWnyE37pD5U3m2fuR4KgUUvH1Sf8y8lUa3kt6JPgWZRGK6pmMJp5b6PJCTJyoekO7hmqZ4oViKn/oIgP5sSUs1gT9dDsJaZzgz2epy/Z0Lh2hp681t+3s0t7fF2swAUYE4Plbsk4uQzbXQmO0cLd3kr9djf8oYQ7pfES+4dGLbtWP+PQWPT1MruAV3OYC6bpLLA5nV+pyYNBde3/opqkcANOvXsHoMlKH9W1F9D5LAPmZHoN96/FO2ISZObGKKTBbtzmAEbLHMXVNyUgAbaOmG6jE+FKaAlW3UCGfUQn2QQgmE1uNvjJsJfPlgRNhsue46YmZlRLOus9BjbcA6MQT25mOUq0lDGWHrp9VNLmIe7S1j+3O8IDnGI370xkLfw+oZZnpDeR1iW9K6iLtpUoNqfTf5wZFGnsA8Ev/qLTYtK/xpR3EDt04LQXvf5h/WQZhKxyIpdsU0XO5bfecVECBXOHcelDMwK9u7969npsMLpIymm/efZGsD8I4rMFa0k2OXQ7BeXVTeVmO6O7oDl3RhOc7hg5B5LB/OhRFZOjm64r079PBrjjwhumRuNUOOxliD9+SgQoCUFhTEV4vJn3VmpdSQ280d1aGD74D28Nl/yQI85byHV7WZBH22b6eCrIjpLWag+dV8In7WIn8ysQyWjCWAE6EWaaTSzLh7zy2mWOzUAYSj2HJ+JZ2vkRGuQ0GglqDDwtX81FzcVBxM7f2nlywpMY8hSXveiRemhpnAmfnY4kfy5U8GYw1NGqXf+WwWbORvWpQ8X2/X+yPPNPAOVa1xTLFuI7Nz1BM1Rm5nh+iRl+qaAEVus8zvqKIQNtNcs52OKGZmM+FV847L54SRvdvQvgyad8sKFxIxMM06/0t2821uN7JJCkiJF7W/TJVxu72AXF2JkVhRuRoIwnH7KUkDAoGTBgKD4HwokdfbfSddZ8VN986/hJihGCkNGspDR7/3Ix5BlmBfG2JSi6muBhIuqa2a0+uzv//8ws63eJgfbH4Xm+AzQnDhkJ2OLWQoSJ9f0i1LeDNCi14WqQ2lEKG2+x/yv7aVq+VXh0kYtF/VGTxMVWk/aYmX6tgo0i4cTemf5HrrkgW6ANCDhulL8Tv1tHtVVwlkOCJsSnKxxuNJJYXf3o78UI9Jip9jFalZRUV1hzyxPqFAT8+6Dc7f8j+4FvknCAijbzxpM9DAJ58KooMfQAAA=",N6="data:image/webp;base64,UklGRlQKAABXRUJQVlA4IEgKAABQLgCdASqgAKAAPkkij0UioiGUKdzsKASEpu3rAN0bx30n5Je1nYX7n+OfRm8b41vZF/L+6r5t/5T/Aey39Cf7f3Bv0z/XHrZ+YD9mP2I93r/aep3+/eob/Mv9D1nXoHfsL6cf7qfB9+4P7Ve0l//62z0W/AJVLf1qQdtb+vACeJ2gUDRdSckdQA/QHox6Pfq72D/1g60XpAFraO7KyJi89prrhlv+6GQxKPaDBmQPfIJonael8/30QJnO7gUayfXeKVqSBo3VKbWRxPCvlY088hYbcN5PWetEw6X6GXp3zhIhJCBh2FWh8qMzDyyTw14fAUVz1P4WX7KWNM8S3PtANlxU9DPhRzfGqaJBvm3dGE5gvV4FOlAdfGNT+/JJKNFxGqwRTLIGM7w9jArLUTLVZzSGM4OrFiXkCu4Fn5/l/3+5DpdsDEZLzXME7exodnaayrCA4vVC+YD3snlf0W7pS5tEydU3C/5G98qbFF2KPAR/ELcZfrSa26gAAP746vFcN8R//5eFZtXMqHVJL9ccjubTaRTk9opycxq51JE6L2XSablmtRsrX79/8ZY5MeMpU3N8S9cW2cnHiONrf4e8zYgD053Kd9Xs6a4Lc+e5pDLA0wv5ctYTz+pg2k32xCJot35jgckWh6Pia+HpHJwIfRGR5jDJF+QRCEc4dW9mO6rAr24Yww8RJQG3/9XW8JLpdfIwLvm1Hbhfn/fnup1KDmVLlf9zbJRsZBdEPPcc6A3zhcHRn6FiEaYjtRrZhwPCKd19NkfkxLBFSx3qlaSaS9Pee+Gq/Lpf7IfH4SOK6fFtDjoeSweiSn9kbI2QTtKtChgbdBe99C9FKzDmXCQ0LWG9cQ+rYvLJ0ej/yr9SbndusHXuURfx2mEoPqgpSvsqChkaPZvKojglL3sDQBuq+q3YlIWGNI83whrSe8jczwQjJUi4RYbEh4v2kWFG2mr4nEWmyc1tq+/+g4XW9U0rY9FXYnRjHKQrmQvIwqRaJ0+snlzwvy+OJ8tviWQoTeZC/Tk+2HC3D/WrOY4h7IfiYGl7ubkPpC6Iq+fqPzv4pfVnuLTRB0lgCcSOVQyFszfmz/KFom4Xu07+s9hw3Xbm/wb3n2u7f4tsBzZpK12wQSBrn8NtH+SdrnD21gI4xptSAQQS7//zJpfJd97clun97nXilKIONmP3AzxUqTGtNvOKfWKLXIH38lRSEoN21WdBEJHiNIMKoDEMOHOd48EF+D+bHUMUaTZWtRACcQ5sP1TdO2bm3KsymAhg/xDpKvj5kdoLmedVrOL7SLMMM6fT9gB83Hf2MAJa2ia8iVqESoe61e3ZJ6ESqvtNJlS7ygCyaxrAYG2Of15ECEK1E/4S9ux2B4+DigADHLyPniIGOSof13T9J01REeN0BFokAWoUESLTb+cvlyK79pZF/LgWfNqM10BH9Ri0jYAvbaecLEMH+u60kyb/yP5Ye9XAY3aKqqdZLBkMTl2zKK0sRSjcKW1UROHUJf1qTIObVev+pVcviq1Qy+bB2IhF1TOajzadEoAZr2pDT2adz18B/znLXx7ETq4ye/8d63tPoOc43z31NHOKV/gicKMtZVkbp6EBUZxSbb0BXxaXeNWaewO2mMr/Ckq5jcIdMw9G0yD7Tc++S7Ha1ElbazLiFenUZcNp5Y/PHnpcvyAK+K3QfxfVqsPBk4HK9Wctcnsb5Eos9lj6ghIxyQ9Yw8LC2YAOffzphq35ooYrNk9wxyGDc98VOaOTWMVTIFXmQj7mpd8aYqHmlBOC0bRvfLOdGhIeEokrXK4KQVulwIrOYkCQxeBIYMZtsK6QwxfTnsX+VnE/922IO+rdC+9Xk9gucZoLI9TkDttr3XtGLmrmOHbudud/YxlY/rNlhYTH5h9KZ17zVEgc6w0aLG6J1jAOHGc7BA8GpsCmzOTCOUc1HdK4fkLoa4LznnBOMW/lFN4xxUj9C8dMcY9JyX0KlM1rnGXdsdcwrKkOd84UqKtZkVYgBQVs+OfXEmXdXzQo7TCiLoJGlxVYLvvx+wpGqbyaLz8MBaZxyTCJ3K+hy9/8HLRuSF42IMyoE48v8vReO9MdIDIxkgmmJiOy2jmhPBeK76Hn6nCvt8s/EU6AnfeqyjgQzVFeNKWS37OJ6RopO6/dTtJ4G4Lr9szl5yeeFCZ3sxSqMHGOvUJG4Ihtx9v0Y+blGj1Nw//b6z9RXr2E2XUTFGDyMwLK4GrkdEnhyIofdqCmHOEWEkB7UZpt8qLgTCLsoUb4kSMzWQck8RKJCT73B+Znffz9uNASrxz01HOQQea/UmaxPexneYwYOO883q3fJVfAuL9ytZZw0J48+YB5l9BPiNl7iEqXL5gW5Ee0z9dtKTb1mbDW3UGB393bIWkC08v2o3ruQ+uu9o/mKFxy/zFpXVREf5O36h843Ha8dQYg747+PYeTIQnuvPLHi1nlff6VzOTGAAoVAXl/qbMR7yGf0XjEovsu/Fnb1kHy7GaXL+PJSDMkhLXAjtM/dxAOFkF48ulOkGWZ6RKkMFj0o45b19vipt6u/uAhbso5IYPCoViAjm6E/tIcOhAruqlVUd8qtMG3s3tsAWyc2j6JZ+ls+ulsF16Ens8YsvvNc6cNqNTf+fXG3EfAIReTkPngb19tI8MdFPWV+WZa4mWBquo5t22oWHrT6wE3D6B8p2KHh+k7lVtNgE/4Ibab8tcRC/2ypziSerJ9ZJdPeO63+uXQ1HoQs
1051TKwDJd6iUcFVXoWwlzUOS5hJXPmUJvI2n3oLLUcQt0ZnOhMou844QABgEYW8Oe9Py/DPKUFvQgfS5HsVPHB5p+G4xNef8ri2IlPayuhrWPdW1T8QstLWDVlsSTm3ctlPzFFrS5Nn6xlmR3TAq+C+gFJaVrzHYmKeQC98WNzds5cg1rR5eXrIjeV1aJZAWdYyJIF7GM/jidxXytonmbODKTO1Mrap0MOZAkp7e4Ek23A0bFZetFlUWWprblrgQsdtr7aEe/rKEFi8sYjPn3tBP/5+GqSl7y4JqFpZYBtoYH9sqOkTEJJjsT1p/RaFYtuRGSemiuohBo+K7J5NYyFcMbN/Zm8Ki032iiTxMiy/YA3JniNNVL+AtCK0EUqnxpTwIvgo6MhQuhmalChoZ2Rv/tCYDpmLe2Os7AP+buENoz/9PqatLbDT3eOzZznZ+bYPTQ8mv09M6llGEn4YPzzXFPGipvPYSZCA0FxJcAfD618yMYtcM6ieldkE2X2CIounSJRhzNwCN4tj3rgqDP1fqtw5E5k8JrXkhjDUH1qkNsKOzArrvhqVlkcMaWoXvuACv/4J5Yw3wUFDb/CTnyi/xd+XhBoaeMJLLGVn6rTSTlykRnXA0q4FFMeWHspnTUDLGPSzvMJO8tPB3oAH66Yu06bqrC9k58ej61PzfHeJRP9C8lBOUyvzMfhi/rP/SykuqIb2mSLE7hQXwjHAOHjg0oiRK7/mXgwHUEvjW70rqxuzngF8wtLdYS+iUUXhzH8U2O4AA",A6="data:image/webp;base64,UklGRh4LAABXRUJQVlA4IBILAACQMgCdASqgAKAAPkkijkSioiGVyKzQKASEsQBpNyq/juzo455TzwrA/TfwL+Q/ThHy7Df1H3T/CX1Y/pT/Ve4B+n3+z/tH9p7LXmJ/ZX9oPeU/0f7Ae7v/I+oB/Zf7n//+xI9AD9xvTU/c/4Tv25/az2ov//rEzOv9b3Efb6l3kvf7Xhr4AXrreAwAfNVxwaU3H76En1J6VPqT2EP1n9Lzqejds4FqlH7Zrku/wBra8x9h1LtmrQZztffCGYJ9C7ggNUHlZUgUg0Erpr0RELCeKpimyyM5OYpIlsSpaDOKDtslr9WzGvtMR2UXLhFQSzPuyNtJVBPYSr5M/6nFZohymHMwZ10DnXSnfSwu9iOYmDrnPyawvVLtSDWcydRRrrBSVEN+yJZSuIJ1clt+FYyrYqcQoP+ZQofs7QKkN6luqhfEknxJMtu7kfcIKuPpug1sQF/JtPs2tvLr8VjeS/XQT3QzXPgj/uziYM4fL1zbXOtVcomXWZqD746XT4DFiP4KluqxYECBoPXdbfJ7EqG8regBvm/j6MN20GeqgAD++M/4WjW/ygnn958z4ppcokdPx8ZlUWWAeu+jtE/ldimb9bbo4aqBVsIMvqAlwlxDZ+Eg6rXCo7XnlIV6/7xanRZCTEkObR55J1mHScB/nBUsWGm+3fRbmEteSseuM2LeFSvog3yIXftrd1nfSREqoxcDTZ7kfNGoR2wyerFfEMR/0HKO1impivFV0xuudcunXZaSZUbfOAwzX7Kqmku9NgL713sIDem0WzfaGLLJqYgij20TUQ7kTCYRTfgjD6kLyFFVVUF9PiKHAcXSzz12wmLPtvDPftobX5qqK5JZxvCRVcG3NeIzRoyW6c1Ra7qRDgV3CQTO02cUoLxVJD982tXLf3RHk9SjjSTy7fw2HCxgYoox61gjws4gLBM2a2s2X/8USR5ylha1EpiNbvGmOdKoB+wNT4OeWs5zHMZyLsn0QjX910V3pOP5IM7Q9n/Al/WcNw+gjERJrg0ipVszzFrJF91Y/4JC365Xuw4TURCiIBhAhMFYgdVSvl5pOXOsPs5HVHOy0OfKuX4ti0p/DCuBmjOqiLZ4vlNcR4552emKn/RqII0znivYBz1YqezrUdcY6goIYG+wbZFjHduzlgwQ5fK0n0h4K93jGVrI0xLAKlTvz6QdSj6e1TKdeu8ShU/ohxA6G6x2ZMMw4Iu01pWJc4fP+puj0Lw59KJT+9s3Z+UcDqcHbK8Anf/aHp5SvvMCbFqXIKj1tghxfm55cLo8FB3NBEcLq7F0DNnsvGSSQPyRPTqMOlbs0Sb/RXJFPrQ2vLe7m5KdiFw1tMrGVCYfsaYmNhssNMICz7dWsjj3S/Uj7E8B53xjJliLewTov3FslW20FPLJ53Eh7iCLn4ae3MtCAaNHZnebE+LOyHw1onSqrdB8b/Ps8HbhhzAtSGXrxh0lUbQv8F+W/XaIlyT+0f/NQzdmaPa/jY60sguoSX/cQMNazuM7mXfjdWR6pPiq3Sfdobqu9+zp2lN0eLp/zpiXviwKNe/+RgChVb2l9n3IOkvUz+68ZxVuRpfNn5/7as2pIpkmeFKC2gnM6Q4z4DzxlRWZcyuA136gnkd9cqLlODD37oj6R8bmd5aJ8BT7KPxfTounPOorcF4BnquCGdVVQ0uEHerqAPfgJahPgrQ6Qy49lHrSdfTRyHP2eGprZsv6L8FiPuWv0XqVNjIUc0EweXg9TwD6X379f40N4+qA5Mn/fw9Q5jGwNyUXPFTADemCa0Bd95Lv9ye9Xrz49PqJmM7InDhzANOa+MRUtVlszKhcZi9cx8Cbc0LGvIlbfk/qisDQW5mEDNyDEMcfN9DhkacelvpfCQoI5MX3h9QFkGgAFjcnkCbuTxDo58fyemiY69fn6IOQMbWxCr42ihpQWgGX2n+JLJ4VL+eUJ+tObVqnyQynOputbXi9pjJwKpmKbPEI8I5TBbg4hm/6/ubQCYXffPNBRZFKnMaDCb9Cd1AK9TrK0iiH5xlxdrsI6TdrtbruBhleuWN7DN/zF6DbefBJnjwU7mdFCm4Ytk1l0cfEcgilMth6GJFtL93XzUoN8NjdYzCux4vtOXbuACOFVD8KeqlnEEbhxZPfP0jxLH7neajaupqeSpRb7wfXPFx7Pd6mtb/Pt2s64WHp1RSXI6xnh+NelsmGP5YawBNzvKwt+d99gQeWicKsmlxulfWEQe7LYHIHMLJ8/5kIdms/LVNsmWWjPLf/OCxgSdLPmFfwm9KY0eosltvlGpOUP2eOYCgfJxUdqifCOTbNN4EJbnCIHhwFZXkqHaz3+IYNsCEft0Lulxmy+LInucmqXHuybZ060iBU88xZftguFc/0RSG+bl1hFzxAC2PXKjIWCTHhdChTQl9Hhapo1rADLgRM7Z4VveHCJDaK/8rF8B/o13gTtJfQ/if/M1KIhF//E3hfmyOLs/QaUuQEK8tQ8akPcUGTIntv2SvoVgx2KT6UyfJsC6No00FVftvG6qaVr7+Jofo3z9n8DtUqiDca4R2CPMVQY7yssEbKiVDoFyGAoO/oymCIAC/gTde1NA291OVT2J2gCHyzKzeap74eYaTVgNP/mbrGopPh76EyNFLPNhJ5ryMM0mvelgc//3vCbKtCiqixZ6/99ahE+7dylTpNaoUvYKQjzeATSXUSyjaaPsSdDK1hcZpuOo/IFcvlx1Sl2G4j2k14238j0BUgwwkvnWRYpGEkk3nqmg58P1xvrTpDAiXpIs9nY+Kdnt7KzemBYoTnASEXrijypPZgO2JcortczmS1hBOWi8TJWY3eSL8ml+qw17XVxU8egQHxfyZ9RaI3/wsDUPcuA/pWcCsejumuI69uX0z/+Kf8yvO4/BDMNXsR4wL32nWwrZO4Pa3AWbEswb5+S1X3b4HROmX9WSPtd7xc5Yh6ai3OBvszG8+aQqMW9KKl5MCMwz8z9coOKCQT6wnmgIx+RvTfE5ewuiEad0+9kVzlAd/4fXkdSIA4pEEmkR4r6ttr8D836DnQswjMO75GfnEqQOrJki3CBDtLIXC1ou1+HdTUPtjz/2tydelHGEcLhTelinG7ntLTt1hlKIIGQ/OZ2kX4pPETd1deijqULsD+Dthmtkpu7UUKzLd2cbPnFVVUV4mdJWhULOqZthH1zB8Hz0jVU4fiFI0DfBqYdjYMtXvj+zn7/Ktt/70/cvzqbBk4BExARKD2hmkzZfX/rCg9Zs4noHe+9T1vKs/+uTx34FrrurySiMFTqQK/5Cf6lU+Qqx2NkYvJlcdayuivypTcIQCc6GtNZNseZKDVNEaVOS37hPlek0hqa/QKxDvb6MlLJ7LMo0csixLbqKs7lBRte21rnOYZS11n6FAeexnJIqTh8mFX0s9Bxm8EhiKpgY00kAvJzwVdDoIge7Gv7YybUHy1W9xXobKPzPB/Wnjr5IpyBzDsMmmWVp6RlEnJPjUVSLFQFEgBONjNk0J3VeoIaYVJHdAFCobzpMA6ohYi/eZ2ckJpjQc/cXT/eFnLuR6BoU0eHQx+0BxVhNgfGPX2YTW541y2/yUZR+sgLTqbj/M8nzBckVk9jy1XMdD/VjuvmdkR5/+wJ
10wASaI+AScCcDODMIsQRJIXFf2DnpkntB880ZvJoC18JTLecCZWX6tmHAqqP7eIcmGe4sLGLHKFn7qhk6Dq/lylbQ+rgHdnl6Rhzos6Tj4sBSHNqoWV8tOfuZF6OkpzIeC8IIKP1JU1o36MivVE1IweIUudAAIelSesAAA==",E6="data:image/webp;base64,UklGRiwNAABXRUJQVlA4ICANAABwNgCdASqgAKAAPkkijkSioiGVmzScKASEsgBoKIq7Ad1j8svZyrz+h/rn6y5gWrfKu54+aP5if5T1IeYT+rX+k9a/on8x/7P+sz/r/VB/rvUA/wH+q6y30AP2A9Oz9xPhB/tn/b/cf2l+va6S7NBmt+HyY3CTUy+TfjSI74yZL94NAF+if2zzsZxOQBwRZn7Rn9c+wf+uZaIyOeoG4OdaXK2xbFlTk9a3cQ4ogGs8XaxPbJcw945ck9GrpBCkfD2IJbQyIc76PbvBZ4SBAmI4bWpSXaQ61k8NvgzG/v+tYr+vJfr+mW4J8JwaqV9LpiD9SmKbYCI88QdOdgvK8s4TUXwuqCC2qPXaN1l/f4Gr907602Xi4ucY/pb/kAfxh8d1F4fic54dAvUIFbe1kH0LzH9S9/kTBbAPCCzgy3TjF0nVlMqNXQQIaM95G5CG6DPsH4n5uUK6cx6ElPY5WpufddTNyChuxqTbs6A+AKWTNsSqMBVuTDisqRVa3M9rVdasCRYVwMmbtB2Jr/oPP9a0frM1vr3l+3Ph566asdL3qGPt+XgrOg3psxtx5VOmHOCx7xPp+OiB4GQqCgAA/vjqfJzIJw3/5dhkvq4KiISAwZtEm98JYSRMzXq2zs3V6g1dVhihPJFzeOZmtlLFvm49uX0vCgKZJesqupqt6GorCg5ZQ5ajYApmD2nlbz9br8iCzz7VUoLRWwQi82uu1uPQvt/iqW2debgtInBQSvt/r8VvG0/HWaBnZzkRQVh6csPWhA00ZnP1Ku9tGBds5ZooArwctC+9gEzajxG2pcPRm34bdqaR+uk3vJvd9I6d5HtMm1pQZDDkX1/iY0MRfyih046QciEGCIQ0x9jy/dVEqxbYtRixzXQf7KMlBouSoV6mVsW7mAwbVHKS79mcCeTxqZvuzLVPrcscDezKNfpjekXyUnZU/3yk6uNFmw4NglEWfWsPu7N3E2pVNVtJ+nWoOWeCNCqVM0SqGdpSS4gaS4KDZMieJiFOsSydauihbDRz0F7f8IWyLQP4inUt2upWM79wvB/wLq2s95cIJ22gMU9q5LKwoBvFucD2DXznxrvk+WSqjoxkO2uFK4MzhNP3h0uReUUZ0Z8xKWUGD2Zhq0BwQf/nyyUxOv0Cm8ZSDKEpdZfv33mtcvnWp5q5WtVqBRNXAKV5ldqkMYd/kOcxdhQ9lmXATsA+SuJwcidfMhnmGzVi7bWgUw+LncwGb2mAhADonVgkKNMWd425DZuagUTYSQQ7JWSTeRmp02q0om/Npg5398hJSpIhkakxjRi/tYZZ0l+eNdWj+on9DLGhM/CDJzgWF2VszLWbR1V2r9RmegzxumvMxNgflidebjoKA0uAp7rVwhZYmS73L6pphaPNvxwJiKUC1C52eX4S6lZi8yNlNp+23vsILOhcG24PhYstNshjT9oOxVT75VzEP0A0SkBqklS1JvTqSNuVcEeB4jLaIN989pOhOUCzav9w+ti9Z6x172X48fOm7YgeU46mJ0ZvsqXJvoJmit1yDeZpolw3YZdGgbebWOn0l8j33BE3vJKk8VlU/uEs1cEJIb8+wPoF+kYh7QrX+4GkfyeVkd0jkpXC4Xq28ITVkc+F05O2kkpuYtjHvks3wxeJeaGfhqFX2FV4CfbeupAhzERgW68S2fluqnjKwh2mh7CUjD7A6zdbzWoT6w+bkrRgEDgXT89cnNO2UCxlIckaUkCGgKpMJGJ3i8Ln5PXVK9fU5niwuVjo/jiGvmwBI9Ppt8nLP3gk9EYxYRLmhni1Xqd9Um1q1lc56mzS7+g8nsoz7VEisMt8wm5raXCMHlShKhPKbQAocwdTL4fUFAxrtrqn4CHi2p0zujYLxImXFOjbtJgHPKcKJEnOMRs1rz/wE+S58XjS8h48CMNQOIPMfIvpINshXrH0MlZ2sSTo56PY5V8wKn1mg8tdZyjTprInT8GFk4X4r7KC5N/FwjWSr1Nyo5+KDHH3PMj9W0TrOAG2Cx23DzREVdDVbLH3mGP85QsN1tihLMa5HDLNA/adqN2nm/qv6BtiXy0JPtI3tCopTnnDnhMwSaiuILx4JyADhF/X81p49xn+YfdK/WSBTMpTbZ7B2b8ZNR7vdAfbwfe5YMI6smCTMUkcr+5n16zluPVdOuCkrNcH29VXjmX07M4OrblUMcmbxeW6PHVnhHIbEg98uxHrBTxI0T+glb7fZbwUVgg71mPXJtNgAGArSH3DWhAgUyoAf5hz8jekDQHnfGFfKFBLaKRhnlpxyTOe8T5KfNR3HYSrlRfxfFcYnXHmqpazOQZ2Guo9EBkOZnsDN2a1qssG3RQsNVYCuTJhjRFdYRDPXhuck6Q3kgWHLnpkVBr+ka2twzO7xeYnQRUY5Q8R36kItwYohxE/lX15wAt0ZJKjKnRXxlpmFX3wvhhZvSZq6dl299Yrh7cX9ViALCnOea6iJDVIqM29kGLWgzYTPKxJpNX1dOhH+kNUjHpUHz+q0OXs1uuFaWcATEpIVuEw5zNAlhUpkh1/HMMCG4+tK9RlD0reJcWfibyMS0KDRNaLJhzx/Ss185Qh6EtTNK/LSq7ERGZv5H0M/sFZnFO4PFrjdJAGoqng5Wr9nThOm3XlJd/+69uvHVUdcvRwZe2mkm/fKhhYybvpquHCi2OQy7NesjCH6bv4koTHzvPXoMu6jSkcF4QyhGrzmeiifOLPwulRnuZ7O9l+5Ohu0CS5mKoXCxPfSOkooXmwsPfKP10kB8KMo2gwKcMLSNPny9CHdvxDZTReIj4f/ZNFw5iEVJgo8UcAvF0J3gMZ7ef2ZdA7qFFayWr/PFFJtGBG2sCr5LIw4trI7ozHgX62/ZW4vcROuJHkxJxrBf5LPAD2dp5Oj7DO5NmC3STW/Qkdx7LaO92JPRwLX65L2wuAWy8rXjwwjEeEBilzzpb1vmzmaesIAKjDBticGSZxhauWUVcdyvz92/NoxfZOf4Cm17Vxj/7RihOJGCWijQbtXU4WTYMFZizDtLq9I3Y00vDe04zJnPYoxc9pVntF4kxh5VI1FXz5bxdczaVrCBUi/sY+6UvfJ9C+IWbdK2ws76PeS88B+4TDT5WRvK7OkNmcxVK9S32hKEkdwVvwyR/h9Y5awbmlMfEzwDtR3HqSB5zES6zcVaAQCj11pnF/3U4Tm+/SGUcQkwYyLaCGI3gW9sWn7M09GBuZHpQmHDcCacaotNflccN20nRhuYQq2k2S/MtH+ULNrfXMlt9IHy7KqBtTbGACm4JJhQsCE3l6rSwVf+ZuXV8K0feZ0PEvfUqWGE2ZN0iKz+jOlWsZuMqlXDhsTwcLc2ui8oH2Gm3CNQgU2Ml0siaOGUP84mLV98ADeBppQywE/47HCV6uaUvavfDYm0caflsb1C46+GmfYTxxUU13F4/1F4PdVxpvmiq9b7U+3L0jxiopcBkxdzB9QKpcr/fVE6Jcl7jYibIuzza0LdkuF1M3gTyA6I/7gcN4b/2MWLr+3JNOa8hbv7M9DJvTjx0H4EN94G4nLFLUIpA+dgTWbFQLYqq8llKu6gKT9eBfriLcen1osdbHHq+XYqMachAzYC0bxX4jL72jcrY8Aay4BTHCR/K0MbSDQNVUOPIIknn3ERDsH15e71RP5wUHAYgf3krhngs/b+SC6U67ZFlNhuY4EJrIyyzguwRFvHpoGXvKKCW9L/E5XV/oY7s/1r209V64LBJg2wXNs+eQKpZ/dpawPBnCiO4BF60ro2J/Yg9gnu/fOEZdOPZyLLnM0bVbZzehzrxyu/Sja3E3pP/xAaWdGeI3C1pDjOUKoIVufjDapEgt7ckMo8yDK5qYn9HDrKCJiyqWZjVwu7wUO6ISCxWwFnqr0x
10Reu+ZStU9n76wn7QdRsBVnzd1YP8XyJbyOh1mLm09uvGtsSOtq+mubtF6u8ONyPMnibrDlJp0kay0rsJtC83eKz8Af4rTv5dtnaJQqPpsp+8iEsk4KITk8gjtwdu+4VOgHKhk0ndtnqisWbCGeoJAuvecs1ih2xB1YUSWFgsnamK2SfKZZEn/wE+WOB7gp/2T3xCflSoOAEn8uOSYzNADn11byQGA9dB+nwUhx6ekFGtbRwrWcjVRyuwOdVREc9W8WApZzVo/74APHcxUcPLloQiMpNj1Slc9U3uwE7+zeygfZzkCUIJDt8d68z9uz3ujNU+0jlmjtjSf/82fbVS7pvJyOcMMBNDkPej0pnbk390/bqR2hTui1ngDPrZL9tMBCvH9IjAj9cgjwk4OuWsO7xpTsAvoJB7SH6IFBAR81WVEE977mJobK7KCyGWpurJCAsBm4bRFgzDftwGGF9KNMoo+sYBiQtPOMQCdNaYImCay5Dd6RcZgAx/n23K1iQqNe5ZiYHoNK2DwvYkCSPP12eH/vfMKYzRcjkyvyqRQeH6kZHp3UAn8mzXFOearRv7X1wu4QUpQAfbXLrDR+1TiPwC/oAAA=",j6="data:image/webp;base64,UklGRhYJAABXRUJQVlA4IAoJAACwKgCdASqgAKAAPkkkj0UioiES6V04KASEoA1IpkfwGuZeA86muf3D8EctKfXrmnf+YP+nn639dPzCftr60HpM9AD+j/8XrH/QA/bf02v3S+EX9wv3G9pXVbGYf5fpRBH54r63h/3hH9E3isAH1ktfs0TyW/nP+N9g79XP+fwMP7OFfb80VxBmtSU0+S7rzeIfSgUBIvwBzJc3QTq+9RT0Rh+1QvR8ay3ztfwoWNpG62URMNK4VrZvEaZpiO0HxNlv8NYm7FzDESX4OsG7Wn5oIbKt1BLLVsXEQO7Qa9UdggtWulPxW9Ot3nNmgas1nFC0HK2n+qxBiG6fkdfvsFpd94Mve4rC2GFqQQYF3mdVdNfGN9G7l8MiZItPfRkRTY7DT2y4IJKgZRIz/zo/mLP87vjE9T0rtE6q3B+2rIWmnOkBt6lwriAmlGN809vR1MU04x9YOHlzXAHlxrvcFAD++O6J6lCEf4+rvn8aekOvY/qvcUU3qSd1Dmaa3ytwfYxIVpbScGOSnGAI3w7frF7TIEsuGwOGF8tZfmGvSIfWNPIGbtKn8SJOPuc2/5TP7tKfF3jpYH656OSMZPjCZg/0KVUS66lzyP/zft6tGECvS4UXOkcjQBAnkD5Uw/0fHMFbfpPr6ixCkwgeDNshSl3f9U2+bU1gz2Cn8oTlC0I//lUWXUjKBEXMk9+bGAgo0K+slXAIPn75AZftnKX+9h6E6EVGyO75msynqYEv/z7gknGplGijj9E3OI4FM6nZgPxs5a3J0k3hm9T3rCZRjzpRRy9C5pNX42gxADJ+570yYoddcbusAmHjaZuqfp9Xfn1XOjWOcoFb3+y3+fZHuS56o0ifoimLw41i7lfNBt7BnXqbpZ9cOs5wR055kjjkOmAP6Iv/bHOOYhAmMyxZmri4KykR/g1MpmDL0+xon0gBg8A+by85O4qjub+/djS3kvAhiPPgWkWA/+qwBYay79U6ET4LPtbPR5MuIRNLteT9H3K7l2oJ/JdiY4RNk2clQ8/xXwlXEDzSf0isXa5D7J6/a/nHsXTYTe6ubR9BhqLbORkJC4urHJJa4LKx40d9M+ELfzA3TZP3+SIX2xc5BCCfDQybzSN2Fl9ICFY5LqcS+W6fenCnQ01smw53yeLYClVZpYVwR5p7IaKGIqRLBUtPJz2Y8Tg1WGQETdMwKLwc7yaSLmC3w0OT7Emu7JExn8mWJcV5knQ9JFb0TpO6FcH+O8RMJUGfQaEmUCh/qjsTQ2BVKBVZbMAyYbYmXomMtUy6QH9U/cSkRQOeIwqyH2rAYWs0qHwQCogoXCv5fWLN4IUtrF5/ulLSDHuyia8An9swBE1tRQnV//tz5N/wdK+Eo8rwRFr9iydnBVdvxvMLw7pz2qZT0pPWn4bBuzLpQ/lU9SkamFcKrHBYDoaz1PTJrCgHy3YmlM2C9fzFNzaaP8x6xyHyhgXTayRKcqWT7iR51I9CH19SsOJCoGn2XhWUfeTodrRrF8Wi9nPdmZy1as4XNPYi4Ng3Tfo/F48qtgqZTMWz3GcR6MmQm1TNAMKW3fCWfndv8Ykjdjd28lFIPwf9Kx1XwVDL6utgwQ98IRwe/1GtziCLm97/h4g2AKbgwlUmt47KwwPwkdjS2pS4qu5rZhDgCLIv3+Wflf7HAvKUi4KxFmgBlUAzN+KnOT5PA45haQginBGEMfDKcCvZ3AaSy0weUH03IKMohHSvLVA6CECIJbwDBZJwI57H0lea53/G3I/x/S/TjCjQv1wvtEdt4B6MlyQ83Bd32mH8MjGXKOTTsf6pCQsGEtRxYmC9z21IpDwZLZrjHN2zHNUie3Z12E/wBzR+Mg4/dWtTNDFTp91PNKhksdxlC2c7/LdAj/qOZWNOh2SUcwBr+a1bERtle6aPU2SxaQpbLWmD+HIs1QV0u7/Q56Gpxfg9v78r34Lx8aDyPZXC8avlsVi7ZdfRu6a8b2eq7T0XQVHUu9MSr7aw/NmUOQRhJy9/EX0nfj7/fuDJi5E7KxvfJDlcnDdiS1HA/e/5JlCQ0b+zKXZXDId+cWjg3ZCPePWL3Q1fU70iVlqzYPUdyg3z9D9EoRSmKmK6N1Xqlla+sye98iUKrTheh1dxyYUL29OQiMDBOdndxrl7vvtCK912a/Y2TQDukdnj2iAUaGjswdLjzMP4bILvxQU2PsQPE8MAVXtsOPjFyQs+aBAbElhAs0UgVMSPPSDuLOQkUR4+t0xH2MpcXyTrmXwfov4mHxPj6rk93b+jIXDxMtvoGf5Vy+Smjlp6tLBH8oil16VckLpzieZO71cvfKJmaVcnHeHY5nZ/mr4ELeE9no5N3C8TSO9H2Z+Ilm07+EFNyznW9Nxi1LzCMSGvHovMFX+QH/+IMT8pFaKy/SKT6wBsbJTJ+3m76lkg22cR+bpWJ+o80sOWg2eTOeh8Xk48/9i3qy1FA6uczqv2rg/nIT8w4Z4JvMu4tOcnnMlODBXrWUF7jPK/7GWQBe5+4zUXT/GbZnOkfIe0Mp/S3K9EBK2Kq9En+tEDUHVGbpyV8mpBLvXoIR13Wj8qMyre/BomsWji6Ilscrn94rhmfkEGh9QnrGbexlcaYaoOBXkAAGyYIcSGTQZqClvjDyRZ2vJtZsjgdKUHXbXMTCyCn8b1sAyMbT3aCMOxP6GW82NqrArWIgz0IN8Uum9bC5/dFA8s9O0r8DuBMc2uPFRGf3algLg1cr6hsL2ntdf+YxbDUr+jCXHVcv9SGoeWDo/7MSltHWpHg5KzH9FpT86+K4cm/Po5qyM1nqD8igfj/fl5T0O5vl2oYi3EbtRllvv5cHBaPPI08OQE6eQQxqsLZrW11pqLEvHWv5LPugFYdffGiSyVC4LJL15W7co6Ob/gC23H2qSWtYREOnfNHEKQPT7Ppv58K0BTUbzZDX/IFG+LxH88zKmAMABujV1WNpZ4Ot9hiJi89ECJEAK7A2vbAlN9k97Ix/XZcmPkxYfD8pgMSo6Xbf5oluvOPAK6BQwFNyCpZoB9Ycemz9n7Om77hNig05neWtTbJmUlbDj3VB1D3F1uTEAEMJI8cAntGkMJcRFFQAAA",T6="data:image/webp;base64,UklGRkQHAABXRUJQVlA4IDgHAACQJQCdASqgAKAAPkkijkUioiEUekysKASEsbdurX6unJAeATYH3nNv++6U3mAfp30zfMB+33rM9IB/UP8v1k3oAftj6aXst/tj6TGqrVFRIawB0x5Xwy0wE1jzM5tAsnrYh+NX2D1AaSSC8pzVfJes2KnOR2QSQGQ9EuyCT3YLk0YQBOPpnw95BXG7pjUjPVdUmnVzJAaONG3DQIxcV0o2eLljioYKP+rtp1Dglky2jVBbI5q40mmSsHAJN8xlB5zS9J/pQrfSsEoWbPX6EwYN9Mtxnqldp7yATE+MBscK5VsRzKCnXPGVxaxdBBTRauJ1Su76Ynmm2Hgo6rz010x8NM8+VepJpaa1sen3UFP+JNxopYLxlra9rUD1c4PNcgapDEN3NbtWHCYPbaqAPWVBuUy+4wAA/vc0e0HyQh//x931z/O5FhmcuKoz3ShdKiGSmeZqj9vyab7wvZuMsRYRABf9hNDVDddYhj5kjzFPO+3+H4boiDJEa1mB/8uJx/m6o28Yv+7DH0CdM5HxdRUcTBj+/sDf/8Q4W8li65cRfeMfxPy9h6lxr3znNmHORuVp1wtxbQzqNtnsySlRkjYP4RSkVvhUf5FclBBWrA0WZr0szjiv6yx3YVECDLOgotbxjKn9h5zNOzIr/nTp8gapeO7I1aprzfIWcbZVnqEVBRhddWBSGOE2x5PRYY8NyzsoN3g1tuRb8bSHwdLIEytWGO0H7Zb+NR71Gffe8ksQ1ZAIfaNco2UQ5o9TjeO4BymOr/t+mjb7GGw7Vlp1D3tfv0WYwEpHQAx2RfmnemF+0X/zwjPZ+r+YDkv
10E5+lOwf81QO3snpSl2PAu603s7r3U9fvmD5MIT5GatKe3DxF5dBvqo8TwPiyJSi2GEsHQiQ0PmSAO51ObQJp7X+m3uUvhMMhaUfCyZ3tRoogMfDhdKUui8B8u5SZqlfljvPLjWZdZcIrEA5lYSwlYbSBWvFmZNsJTfb7d8ekjTGYhShkMVFZRC0T/9h4MwyKtzLXOFNQ8Je+7PU/9UkSPD+S2vRGwD3+Kn9nxNzH083n4JuIfkFExkd253NCD+73fZkofy9DkrW/ZC+rxDgrbnBPTGtk8/mfm2sbR8WRW23de4kzdvu0PK9QL72qU/6P6c1ufrYeLfMxF7Q/Z8v+PyvPHZDD0COEh/vDwiuawxj/gahjgh6G0fr+GoAW6afwyBspoGJiEN+vYJ4mUr0GAmxqko/2zw3Z0+i68MY76kyFFHgW/3daF8fz2sxQeGpSU2gMhx8MQ3haOYOggXyiV3u2c5njLoqgrM74lk8h7rMiCJv8KkS6SlhFaNttHPC6uo4yM1Nsupapb/pvzYobggOv6rFpQv1kaTC7sWuV0O+gcqq5bgnIlHd2pPj+y6NkvSO2AhSUO8/wRr29mxt4vZEwQWwJ/+Tgq36GWC/8R7QJPIeGKvugXx8WrszXMxaPWMMZI6/6W1xrdPpZB/YovawcY1AszWzk8UzBAP/c9mb4KB+V8OCW52iUs4CPQOGEomE+QRwdaD+WFFSvnWHEcGTWkXN6jiYUb+GgwUBnufC/TFHwZqs7ZZw8/4QhlEV9j4TNAYqko6yE1S97+JzL11qTf+ZN/wLccrwDzQbOFd4F/+8OZNYrvjcGy1IFie2ybnsIxDa3odGyjla5o9jMM/5X+J1v88NyzL6WIJ7GJVQjrTxWyKx7Y0XAOFcRYvs9Toz6012vyikDCZjIOREPfTXOyA7/I5HkhXp4+Uoye4T+TVMMqCsGCcX0vNnwcYkNTg5m7PfMhS+aVbtBfEj/NzqhAOfe7s3VJvBsGwOGQe8CA4IvgKoFn3uosoZifzPEIfEJnKTceJYb/GK/iPKgpbXUScyyNAzMckkg7eUUpiS33sT275VfzOESHXm+RbQp67caWcG3NuBAyBaJocXvEUvectfQctkJo3TzRyoO6hNDub4EJgB8VfkFmSb//7PqftZr/0e4UDHFMdW1dclH8pSWxtONh7foZzvdrEhsOSWkEzmMot7ZmurzCzL/K9rD45A7acjOTmBMA4K3gUElwCFFEZUOtZVyvspHhtcJI+X9CjjbdIMnpl3R/rWNSMxOIy1ryw78cmPkL7FucLibkJFQ49ImUpAQVAQAcvskYvHhCWLG9ot6DWO95wpEhXD6JfZ51IO9/BTYz933OdqxVOqZozv9NfMu7/oMU6C8jjU9rU7ZrCD4M56Bo1rq5a/PMwWYJvhXdNBOIANcD70qEbzgxm78cElPfJgfAC71LaDCBpTlpNa+TJyyJtKduLUkGbVvEKyvucZng1Mg68poiFxgfKR6BDSLGi0qLnFVeQuTKl6FF09BDPGLdaivIvmzGeZgbkt7dS7jV1hG770Bc5eAlFwZOJjNQiaUycEy86LDxKHiiQ3U9uzOTGNKXIXpFyz8FwLjn0I215B1KISakRcydljaDDwy7xXIAAAA=",Y0={acorn:w6,leaf:N6,seed:j6,sprout:T6,pinecone:E6,mushroom:A6,berry:S6,chestnut:C6},k6=768;function R6(e){const[t,n]=h.useState(void 0);return h.useEffect(()=>{const r=window.matchMedia(`(max-width: ${e-1}px)`),o=()=>{n(window.innerWidth<e)};return r.addEventListener("change",o),n(window.innerWidth<e),()=>r.removeEventListener("change",o)},[e]),!!t}function K2(){return R6(k6)}var P6=Object.defineProperty,Mc=(e,t)=>P6(e,"name",{value:t,configurable:!0}),Y2=!!(typeof window<"u"&&window.document&&window.document.createElement);function je(e,t,{checkForDefaultPrevented:n=!0}={}){return Mc(function(o){if(e?.(o),n===!1||!o||!o.defaultPrevented)return t?.(o)},"handleEvent")}Mc(je,"composeEventHandlers");function O6(e){if(!Y2)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}Mc(O6,"getOwnerWindow");function eb(e){if(!Y2)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}Mc(eb,"getOwnerDocument");function W2(e,t=!1){const{activeElement:n}=eb(e);if(!n?.nodeName)return null;if(Q2(n)&&n.contentDocument)return W2(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const o=eb(n).getElementById(r);if(o)return o}}return n}Mc(W2,"getActiveElement");function Q2(e){return e.tagName==="IFRAME"}Mc(Q2,"isFrame");var _6=Object.defineProperty,W0=(e,t)=>_6(e,"name",{value:t,configurable:!0});function tb(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}W0(tb,"setRef");function X2(...e){return t=>{let n=!1;const r=e.map(o=>{const l=tb(o,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let o=0;o<r.length;o++){const l=r[o];typeof l=="function"?l():tb(e[o],null)}}}}W0(X2,"composeRefs");function Qe(...e){return h.useCallback(X2(...e),e)}W0(Qe,"useComposedRefs");var I6=Object.defineProperty,da=(e,t)=>I6(e,"name",{value:t,configurable:!0});function M6(e,t){const n=h.createContext(t);n.displayName=e+"Context";const r=da(l=>{const{children:c,...d}=l,m=h.useMemo(()=>d,Object.values(d));return s.jsx(n.Provider,{value:m,children:c})},"Provider");r.displayName=e+"Provider";function o(l,c={}){const{optional:d=!1}=c,m=h.useContext(n);if(m)return m;if(t!==void 0)return t;if(!d)throw new Error(`\`${l}\` must be used within \`${e}\``)}return da(o,"useContext"),[r,o]}da(M6,"createContext");function nr(e,t=[]){let n=[];function r(l,c){const d=h.createContext(c);d.displayName=l+"Context";const m=n.length;n=[...n,c];const p=da(g=>{const{scope:v,children:b,...S}=g,C=v?.[e]?.[m]||d,N=h.useMemo(()=>S,Object.values(S));return s.jsx(C.Provider,{value:N,children:b})},"Provider");p.displayName=l+"Provider";function y(g,v,b={}){const{optional:S=!1}=b,C=v?.[e]?.[m]||d,N=h.useContext(C);if(N)return N;if(c!==void 0)return c;if(!S)throw new Error(`\`${g}\` must be used within \`${l}\``)}return da(y,"useContext"),[p,y]}da(r,"createContext");const o=da(()=>{const l=n.map(c=>h.createContext(c));return da(function(d){const m=d?.[e]||l;return h.useMemo(()=>({[`__scope${e}`]:{...d,[e]:m}}),[d,m])},"useScope")},"createScope");return o.scopeName=e,[r,Z2(o,...t)]}da(nr,"createContextScope");function Z2(...e){const t=e[0];if(e.length===1)return t;const n=da(()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return da(function(l){const c=r.reduce((d,{useScope:m,scopeName:p})=>{const g=m(l)[`__scope${p}`];return{...d,...g}},{});return h.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}da(Z2,"composeContextScopes");var Dc=b2();const D6=I0(Dc);var L6=Object.defineProperty,Wa=(e,t)=>L6(e,"name",{value:t,configurable:!0});function Ha(e){const t=h.forwardRef((n,r)=>{let{children:o,...l}=n,c=null,d=!1;const m=[];nb(o)&&typeof km=="function"&&(o=km(o._payload)),h.Children.forEac
10h(o,v=>{if(rP(v)){d=!0;const b=v;let S="child"in b.props?b.props.child:b.props.children;nb(S)&&typeof km=="function"&&(S=km(S._payload)),c=q6(b,S),m.push(c?.props?.children)}else m.push(v)}),c?c=h.cloneElement(c,void 0,m):!d&&h.Children.count(o)===1&&h.isValidElement(o)&&(c=o);const p=c?nP(c):void 0,y=Qe(r,p);if(!c){if(o||o===0)throw new Error(d?V6(e):z6(e));return o}const g=tP(l,c.props??{});return c.type!==h.Fragment&&(g.ref=r?y:p),h.cloneElement(c,g)});return t.displayName=`${e}.Slot`,t}Wa(Ha,"createSlot");var Q0=Ha("Slot"),J2=Symbol.for("radix.slottable");function eP(e){const t=Wa(n=>"child"in n?n.children(n.child):n.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=J2,t}Wa(eP,"createSlottable");var q6=Wa((e,t)=>{if("child"in e.props){const n=e.props.child;return h.isValidElement(n)?h.cloneElement(n,void 0,e.props.children(n.props.children)):null}return h.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function tP(e,t){const n={...t};for(const r in t){const o=e[r],l=t[r];/^on[A-Z]/.test(r)?o&&l?n[r]=(...d)=>{const m=l(...d);return o(...d),m}:o&&(n[r]=o):r==="style"?n[r]={...o,...l}:r==="className"&&(n[r]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}Wa(tP,"mergeProps");function nP(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Wa(nP,"getElementRef");function rP(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===J2}Wa(rP,"isSlottable");var U6=Symbol.for("react.lazy");function nb(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===U6&&"_payload"in e&&aP(e._payload)}Wa(nb,"isLazyComponent");function aP(e){return typeof e=="object"&&e!==null&&"then"in e}Wa(aP,"isPromiseLike");var z6=Wa(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),V6=Wa(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),km=Oc[" use ".trim().toString()],B6=Object.defineProperty,F6=(e,t)=>B6(e,"name",{value:t,configurable:!0}),$6=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ge=$6.reduce((e,t)=>{const n=Ha(`Primitive.${t}`),r=h.forwardRef((o,l)=>{const{asChild:c,...d}=o,m=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(m,{...d,ref:l})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function X0(e,t){e&&Dc.flushSync(()=>e.dispatchEvent(t))}F6(X0,"dispatchDiscreteCustomEvent");var H6=Object.defineProperty,G6=(e,t)=>H6(e,"name",{value:t,configurable:!0});function Jr(e){const t=h.useRef(e);return h.useEffect(()=>{t.current=e}),h.useMemo(()=>((...n)=>t.current?.(...n)),[])}G6(Jr,"useCallbackRef");var K6=Object.defineProperty,Bn=(e,t)=>K6(e,"name",{value:t,configurable:!0}),rb="dismissableLayer.update",Y6="dismissableLayer.pointerDownOutside",W6="dismissableLayer.focusOutside",gE,sP=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Xd=h.forwardRef(Bn(function(t,n){const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:o=!1,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:m,onDismiss:p,...y}=t,g=h.useContext(sP),[v,b]=h.useState(null),S=v?.ownerDocument??globalThis?.document,[,C]=h.useState({}),N=Qe(n,b),A=Array.from(g.layers),[T]=[...g.layersWithOutsidePointerEventsDisabled].slice(-1),E=T?A.indexOf(T):-1,j=v?A.indexOf(v):-1,_=g.layersWithOutsidePointerEventsDisabled.size>0,R=j>=E,P=h.useRef(!1),M=oP($=>{c?.($),m?.($),$.defaultPrevented||p?.()},{ownerDocument:S,deferPointerDownOutside:o,isDeferredPointerDownOutsideRef:P,dismissableSurfaces:g.dismissableSurfaces,shouldHandlePointerDownOutside:h.useCallback($=>{if(!($ instanceof Node))return!1;const L=[...g.branches].some(H=>H.contains($));return R&&!L},[g.branches,R])}),q=lP($=>{if(o&&P.current)return;const L=$.target;[...g.branches].some(Q=>Q.contains(L))||(d?.($),m?.($),$.defaultPrevented||p?.())},S),U=v?j===A.length-1:!1,V=Jr($=>{$.key==="Escape"&&(l?.($),!$.defaultPrevented&&p&&($.preventDefault(),p()))});return h.useEffect(()=>{if(U)return S.addEventListener("keydown",V,{capture:!0}),()=>S.removeEventListener("keydown",V,{capture:!0})},[S,U,V]),h.useEffect(()=>{if(v)return r&&(g.layersWithOutsidePointerEventsDisabled.size===0&&(gE=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),g.layersWithOutsidePointerEventsDisabled.add(v)),g.layers.add(v),ab(),()=>{r&&(g.layersWithOutsidePointerEventsDisabled.delete(v),g.layersWithOutsidePointerEventsDisabled.size===0&&(S.body.style.pointerEvents=gE))}},[v,S,r,g]),h.useEffect(()=>()=>{v&&(g.layers.delete(v),g.layersWithOutsidePointerEventsDisabled.delete(v),ab())},[v,g]),h.useEffect(()=>{const $=Bn(()=>C({}),"handleUpdate");return document.addEventListener(rb,$),()=>document.removeEventListener(rb,$)},[]),s.jsx(Ge.div,{...y,ref:N,style:{pointerEvents:_?R?"auto":"none":void 0,...t.style}
10,onFocusCapture:je(t.onFocusCapture,q.onFocusCapture),onBlurCapture:je(t.onBlurCapture,q.onBlurCapture),onPointerDownCapture:je(t.onPointerDownCapture,M.onPointerDownCapture)})},"DismissableLayer"));function iP(){const e=h.useContext(sP),[t,n]=h.useState(null);return h.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}Bn(iP,"useDismissableLayerSurface");var Q6=Bn(()=>!0,"IS_TRUE");function oP(e,t){const{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:o,dismissableSurfaces:l,shouldHandlePointerDownOutside:c=Q6}=t,d=Jr(e),m=h.useRef(!1),p=h.useRef(!1),y=h.useRef(new Map),g=h.useRef(()=>{});return h.useEffect(()=>{function v(){p.current=!1,o.current=!1,y.current.clear()}Bn(v,"resetOutsideInteraction");function b(){return Array.from(y.current.values()).some(Boolean)}Bn(b,"isOutsideInteractionIntercepted");function S(E){if(!p.current)return;const j=E.target;j instanceof Node&&[...l].some(R=>R.contains(j))||y.current.set(E.type,!0),E.type==="click"&&window.setTimeout(()=>{p.current&&g.current()},0)}Bn(S,"handleInteractionCapture");function C(E){p.current&&y.current.set(E.type,!1)}Bn(C,"handleInteractionBubble");const N=Bn(E=>{if(E.target&&!m.current){let j=function(){n.removeEventListener("click",g.current);const R=b();v(),R||Z0(Y6,d,_,{discrete:!0})};if(Bn(j,"handleAndDispatchPointerDownOutsideEvent"),!c(E.target)){n.removeEventListener("click",g.current),v(),m.current=!1;return}const _={originalEvent:E};p.current=!0,o.current=r&&E.button===0,y.current.clear(),!r||E.button!==0?j():(n.removeEventListener("click",g.current),g.current=j,n.addEventListener("click",g.current,{once:!0}))}else n.removeEventListener("click",g.current),v();m.current=!1},"handlePointerDown"),A=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const E of A)n.addEventListener(E,S,!0),n.addEventListener(E,C);const T=window.setTimeout(()=>{n.addEventListener("pointerdown",N)},0);return()=>{window.clearTimeout(T),n.removeEventListener("pointerdown",N),n.removeEventListener("click",g.current);for(const E of A)n.removeEventListener(E,S,!0),n.removeEventListener(E,C)}},[n,d,r,o,l,c]),{onPointerDownCapture:Bn(()=>m.current=!0,"onPointerDownCapture")}}Bn(oP,"usePointerDownOutside");function lP(e,t=globalThis?.document){const n=Jr(e),r=h.useRef(!1);return h.useEffect(()=>{const o=Bn(l=>{l.target&&!r.current&&Z0(W6,n,{originalEvent:l},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:Bn(()=>r.current=!0,"onFocusCapture"),onBlurCapture:Bn(()=>r.current=!1,"onBlurCapture")}}Bn(lP,"useFocusOutside");function ab(){const e=new CustomEvent(rb);document.dispatchEvent(e)}Bn(ab,"dispatchUpdate");function Z0(e,t,n,{discrete:r}){const o=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?X0(o,l):o.dispatchEvent(l)}Bn(Z0,"handleAndDispatchCustomEvent");var X6=Object.defineProperty,J0=(e,t)=>X6(e,"name",{value:t,configurable:!0}),Rm=0,ec=null;function Z6(e){return Lc(),e.children}J0(Z6,"FocusGuards");function Lc(){h.useEffect(()=>{ec||(ec={start:sb(),end:sb()});const{start:e,end:t}=ec;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),Rm++,()=>{Rm===1&&(ec?.start.remove(),ec?.end.remove(),ec=null),Rm=Math.max(0,Rm-1)}},[])}J0(Lc,"useFocusGuards");function sb(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}J0(sb,"createFocusGuard");var J6=Object.defineProperty,vr=(e,t)=>J6(e,"name",{value:t,configurable:!0}),dx="focusScope.autoFocusOnMount",fx="focusScope.autoFocusOnUnmount",yE={bubbles:!1,cancelable:!0},gh=h.forwardRef(vr(function(t,n){const{loop:r=!1,trapped:o=!1,onMountAutoFocus:l,onUnmountAutoFocus:c,...d}=t,[m,p]=h.useState(null),y=Jr(l),g=Jr(c),v=h.useRef(null),b=Qe(n,p),S=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(o){let N=function(j){if(S.paused||!m)return;const _=j.target;m.contains(_)?v.current=_:Hs(v.current,{select:!0})},A=function(j){if(S.paused||!m)return;const _=j.relatedTarget;_!==null&&(m.contains(_)||Hs(v.current,{select:!0}))},T=function(j){if(document.activeElement===document.body)for(const R of j)R.removedNodes.length>0&&Hs(m)};vr(N,"handleFocusIn"),vr(A,"handleFocusOut"),vr(T,"handleMutations"),document.addEventListener("focusin",N),document.addEventListener("focusout",A);const E=new MutationObserver(T);return m&&E.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",N),document.removeEventListener("focusout",A),E.disconnect()}}},[o,m,S.paused]),h.useEffect(()=>{if(m){xE.add(S);const N=document.activeElement;if(!m.contains(N)){const T=new CustomEvent(dx,yE);m.addEventListener(dx,y),m.dispatchEvent(T),T.defaultPrevented||(cP(pP(ew(m)),{select:!0}),document.activeElement===N&&Hs(m))}return()=>{m.removeEventListener(dx,y),setTimeout(()=>{const T=new CustomEvent(fx,yE);m.addEventListener(fx,g),m.dispatchEvent(T),T.defaultPrevented||Hs(N??document.body,{select:!0}),m.removeEventListener(fx,g),xE.remove(S)},0)}}},[m,y,g,S]);const C=h.useCallback(N=>{if(!r&&!o||S.paused)return;
10const A=N.key==="Tab"&&!N.altKey&&!N.ctrlKey&&!N.metaKey,T=document.activeElement;if(A&&T){const E=N.currentTarget,[j,_]=uP(E);j&&_?!N.shiftKey&&T===_?(N.preventDefault(),r&&Hs(j,{select:!0})):N.shiftKey&&T===j&&(N.preventDefault(),r&&Hs(_,{select:!0})):T===E&&N.preventDefault()}},[r,o,S.paused]);return s.jsx(Ge.div,{tabIndex:-1,...d,ref:b,onKeyDown:C})},"FocusScope"));function cP(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Hs(r,{select:t}),document.activeElement!==n)return}vr(cP,"focusFirst");function uP(e){const t=ew(e),n=ib(t,e),r=ib(t.reverse(),e);return[n,r]}vr(uP,"getTabbableEdges");function ew(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:vr(r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}vr(ew,"getTabbableCandidates");function ib(e,t){const n=typeof t.checkVisibility=="function"&&t.checkVisibility({checkVisibilityCSS:!0});for(const r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):dP(r,{upTo:t})))return r}vr(ib,"findVisible");function dP(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}vr(dP,"isHidden");function fP(e){return e instanceof HTMLInputElement&&"select"in e}vr(fP,"isSelectableInput");function Hs(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&fP(e)&&t&&e.select()}}vr(Hs,"focus");var xE=mP();function mP(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=ob(e,t),e.unshift(t)},remove(t){e=ob(e,t),e[0]?.resume()}}}vr(mP,"createFocusScopesStack");function ob(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}vr(ob,"arrayRemove");function pP(e){return e.filter(t=>t.tagName!=="A")}vr(pP,"removeLinks");var Vt=globalThis?.document?h.useLayoutEffect:()=>{},ez=Object.defineProperty,tz=(e,t)=>ez(e,"name",{value:t,configurable:!0}),nz=Oc[" useId ".trim().toString()]||(()=>{}),rz=0;function ha(e){const[t,n]=h.useState(nz());return Vt(()=>{e||n(r=>r??String(rz++))},[e]),e||(t?`radix-${t}`:"")}tz(ha,"useId");const hP=["top","right","bottom","left"],vE=["start","end"],bE=hP.reduce((e,t)=>e.concat(t,t+"-"+vE[0],t+"-"+vE[1]),[]),Ga=Math.min,ga=Math.max,Rp=Math.round,Pm=Math.floor,Ks=e=>({x:e,y:e}),az={left:"right",right:"left",bottom:"top",top:"bottom"};function gP(e,t,n){return ga(e,Ga(t,n))}function Ka(e,t){return typeof e=="function"?e(t):e}function xa(e){return e.split("-")[0]}function Ba(e){return e.split("-")[1]}function tw(e){return e==="x"?"y":"x"}function nw(e){return e==="y"?"height":"width"}function za(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function rw(e){return tw(za(e))}function yP(e,t,n){n===void 0&&(n=!1);const r=Ba(e),o=rw(e),l=nw(o);let c=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(c=Op(c)),[c,Op(c)]}function sz(e){const t=Op(e);return[Pp(e),t,Pp(t)]}function Pp(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const wE=["left","right"],SE=["right","left"],iz=["top","bottom"],oz=["bottom","top"];function lz(e,t,n){switch(e){case"top":case"bottom":return n?t?SE:wE:t?wE:SE;case"left":case"right":return t?iz:oz;default:return[]}}function cz(e,t,n,r){const o=Ba(e);let l=lz(xa(e),n==="start",r);return o&&(l=l.map(c=>c+"-"+o),t&&(l=l.concat(l.map(Pp)))),l}function Op(e){const t=xa(e);return az[t]+e.slice(t.length)}function uz(e){var t,n,r,o;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(o=e.left)!=null?o:0}}function aw(e){return typeof e!="number"?uz(e):{top:e,right:e,bottom:e,left:e}}function Qi(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function CE(e,t,n){let{reference:r,floating:o}=e;const l=za(t),c=rw(t),d=nw(c),m=xa(t),p=l==="y",y=r.x+r.width/2-o.width/2,g=r.y+r.height/2-o.height/2,v=r[d]/2-o[d]/2;let b;switch(m){case"top":b={x:y,y:r.y-o.height};break;case"bottom":b={x:y,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y:g};break;case"left":b={x:r.x-o.width,y:g};break;default:b={x:r.x,y:r.y}}const S=Ba(t);return S&&(b[c]+=v*(S==="end"?1:-1)*(n&&p?-1:1)),b}async function dz(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:l,rects:c,elements:d,strategy:m}=e,{boundary:p="clippingAncestors",rootBoundary:y="viewport",elementContext:g="floating",altBoundary:v=!1,padding:b=0}=Ka(t,e),S=aw(b),N=d[v?g==="floating"?"reference":"floating":g],A=Qi(await l.getClippingRect
10({element:(n=await(l.isElement==null?void 0:l.isElement(N)))==null||n?N:N.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(d.floating)),boundary:p,rootBoundary:y,strategy:m})),T=g==="floating"?{x:r,y:o,width:c.floating.width,height:c.floating.height}:c.reference,E=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d.floating)),j=await(l.isElement==null?void 0:l.isElement(E))&&await(l.getScale==null?void 0:l.getScale(E))||{x:1,y:1},_=Qi(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:T,offsetParent:E,strategy:m}):T);return{top:(A.top-_.top+S.top)/j.y,bottom:(_.bottom-A.bottom+S.bottom)/j.y,left:(A.left-_.left+S.left)/j.x,right:(_.right-A.right+S.right)/j.x}}const fz=50,mz=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:l=[],platform:c}=n,d=c.detectOverflow?c:{...c,detectOverflow:dz},m=await(c.isRTL==null?void 0:c.isRTL(t));let p=await c.getElementRects({reference:e,floating:t,strategy:o}),{x:y,y:g}=CE(p,r,m),v=r,b=0;const S={};for(let C=0;C<l.length;C++){const N=l[C];if(!N)continue;const{name:A,fn:T}=N,{x:E,y:j,data:_,reset:R}=await T({x:y,y:g,initialPlacement:r,placement:v,strategy:o,middlewareData:S,rects:p,platform:d,elements:{reference:e,floating:t}});y=E??y,g=j??g,S[A]={...S[A],..._},R&&b<fz&&(b++,typeof R=="object"&&(R.placement&&(v=R.placement),R.rects&&(p=R.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:y,y:g}=CE(p,v,m)),C=-1)}return{x:y,y:g,placement:v,strategy:o,middlewareData:S}},pz=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:l,platform:c,elements:d,middlewareData:m}=t,{element:p,padding:y=0}=Ka(e,t)||{};if(p==null)return{};const g=aw(y),v={x:n,y:r},b=rw(o),S=nw(b),C=await c.getDimensions(p),N=b==="y",A=N?"top":"left",T=N?"bottom":"right",E=N?"clientHeight":"clientWidth",j=l.reference[S]+l.reference[b]-v[b]-l.floating[S],_=v[b]-l.reference[b],R=await(c.getOffsetParent==null?void 0:c.getOffsetParent(p));let P=R?R[E]:0;(!P||!await(c.isElement==null?void 0:c.isElement(R)))&&(P=d.floating[E]||l.floating[S]);const M=j/2-_/2,q=P/2-C[S]/2-1,U=Ga(g[A],q),V=Ga(g[T],q),$=P-C[S]-V,L=P/2-C[S]/2+M,H=gP(U,L,$),Q=!m.arrow&&Ba(o)!=null&&L!==H&&l.reference[S]/2-(L<U?U:V)-C[S]/2<0,I=Q?L<U?L-U:L-$:0;return{[b]:v[b]+I,data:{[b]:H,centerOffset:L-H-I,...Q&&{alignmentOffset:I}},reset:Q}}});function hz(e,t,n){return(e?[...n.filter(o=>Ba(o)===e),...n.filter(o=>Ba(o)!==e)]:n.filter(o=>xa(o)===o)).filter(o=>e?Ba(o)===e||(t?Pp(o)!==o:!1):!0)}const gz=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;const{rects:l,middlewareData:c,placement:d,platform:m,elements:p}=t,{crossAxis:y=!1,alignment:g,allowedPlacements:v=bE,autoAlignment:b=!0,...S}=Ka(e,t),C=g!==void 0||v===bE?hz(g||null,b,v):v,N=((n=c.autoPlacement)==null?void 0:n.index)||0,A=C[N];if(A==null)return{};if(d!==A)return{reset:{placement:C[0]}};const T=await m.detectOverflow(t,S),E=yP(A,l,await(m.isRTL==null?void 0:m.isRTL(p.floating))),j=[T[xa(A)],T[E[0]],T[E[1]]],_=[...((r=c.autoPlacement)==null?void 0:r.overflows)||[],{placement:A,overflows:j}],R=C[N+1];if(R)return{data:{index:N+1,overflows:_},reset:{placement:R}};const P=_.map(U=>{const V=Ba(U.placement);return[U.placement,V&&y?U.overflows.slice(0,2).reduce(($,L)=>$+L,0):U.overflows[0],U.overflows]}).sort((U,V)=>U[1]-V[1]),q=((o=P.filter(U=>U[2].slice(0,Ba(U[0])?2:3).every(V=>V<=0))[0])==null?void 0:o[0])||P[0][0];return q!==d?{data:{index:N+1,overflows:_},reset:{placement:q}}:{}}}},yz=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:l,rects:c,initialPlacement:d,platform:m,elements:p}=t,{mainAxis:y=!0,crossAxis:g=!0,fallbackPlacements:v,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:C=!0,...N}=Ka(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const A=xa(o),T=za(d),E=xa(d)===d,j=await(m.isRTL==null?void 0:m.isRTL(p.floating)),_=v||(E||!C?[Op(d)]:sz(d)),R=S!=="none";!v&&R&&_.push(...cz(d,C,S,j));const P=[d,..._],M=await m.detectOverflow(t,N),q=[];let U=((r=l.flip)==null?void 0:r.overflows)||[];if(y&&q.push(M[A]),g){const H=yP(o,c,j);q.push(M[H[0]],M[H[1]])}if(U=[...U,{placement:o,overflows:q}],!q.every(H=>H<=0)){var V,$;const H=(((V=l.flip)==null?void 0:V.index)||0)+1,Q=P[H];if(Q&&(!(g==="alignment"?T!==za(Q):!1)||U.every(F=>
10za(F.placement)===T?F.overflows[0]>0:!0)))return{data:{index:H,overflows:U},reset:{placement:Q}};let I=($=U.filter(O=>O.overflows[0]<=0).sort((O,F)=>O.overflows[1]-F.overflows[1])[0])==null?void 0:$.placement;if(!I)switch(b){case"bestFit":{var L;const O=(L=U.filter(F=>{if(R){const B=za(F.placement);return B===T||B==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(B=>B>0).reduce((B,K)=>B+K,0)]).sort((F,B)=>F[1]-B[1])[0])==null?void 0:L[0];O&&(I=O);break}case"initialPlacement":I=d;break}if(o!==I)return{reset:{placement:I}}}return{}}}};function NE(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function AE(e){return hP.some(t=>e[t]>=0)}const xz=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...l}=Ka(e,t);switch(o){case"referenceHidden":{const c=await r.detectOverflow(t,{...l,elementContext:"reference"}),d=NE(c,n.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:AE(d)}}}case"escaped":{const c=await r.detectOverflow(t,{...l,altBoundary:!0}),d=NE(c,n.floating);return{data:{escapedOffsets:d,escaped:AE(d)}}}default:return{}}}}};function xP(e){const t=Ga(...e.map(l=>l.left)),n=Ga(...e.map(l=>l.top)),r=ga(...e.map(l=>l.right)),o=ga(...e.map(l=>l.bottom));return{x:t,y:n,width:r-t,height:o-n}}function vz(e){const t=e.slice().sort((o,l)=>o.y-l.y),n=[];let r=null;for(let o=0;o<t.length;o++){const l=t[o];!r||l.y-r.y>r.height/2?n.push([l]):n[n.length-1].push(l),r=l}return n.map(o=>Qi(xP(o)))}const bz=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:r,rects:o,platform:l,strategy:c}=t,{padding:d=2,x:m,y:p}=Ka(e,t),y=Array.from(await(l.getClientRects==null?void 0:l.getClientRects(r.reference))||[]);if(!y.length)return{};const g=vz(y),v=Qi(xP(y)),b=aw(d);function S(){if(g.length===2&&(g[0].left>g[1].right||g[1].left>g[0].right)&&m!=null&&p!=null)return g.find(N=>m>N.left-b.left&&m<N.right+b.right&&p>N.top-b.top&&p<N.bottom+b.bottom)||v;if(g.length>=2){if(za(n)==="y"){const R=g[0],P=g[g.length-1],M=xa(n)==="top",q=R.top,U=P.bottom,V=M?R.left:P.left,$=M?R.right:P.right;return Qi({x:V,y:q,width:$-V,height:U-q})}const N=xa(n)==="left",A=ga(...g.map(R=>R.right)),T=Ga(...g.map(R=>R.left)),E=g.filter(R=>N?R.left===T:R.right===A),j=E[0].top,_=E[E.length-1].bottom;return Qi({x:T,y:j,width:A-T,height:_-j})}return v}const C=await l.getElementRects({reference:{getBoundingClientRect:S},floating:r.floating,strategy:c});return o.reference.x!==C.reference.x||o.reference.y!==C.reference.y||o.reference.width!==C.reference.width||o.reference.height!==C.reference.height?{reset:{rects:C}}:{}}}},vP=new Set(["left","top"]);async function wz(e,t){const{placement:n,platform:r,elements:o}=e,l=await(r.isRTL==null?void 0:r.isRTL(o.floating)),c=xa(n),d=Ba(n),m=za(n)==="y",p=vP.has(c)?-1:1,y=l&&m?-1:1,g=Ka(t,e);let{mainAxis:v,crossAxis:b,alignmentAxis:S}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return d&&typeof S=="number"&&(b=d==="end"?S*-1:S),m?{x:b*y,y:v*p}:{x:v*p,y:b*y}}const Sz=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:l,placement:c,middlewareData:d}=t,m=await wz(t,e);return c===((n=d.offset)==null?void 0:n.placement)&&(r=d.arrow)!=null&&r.alignmentOffset?{}:{x:o+m.x,y:l+m.y,data:{...m,placement:c}}}}},Cz=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:l}=t,{mainAxis:c=!0,crossAxis:d=!1,limiter:m={fn:T=>{let{x:E,y:j}=T;return{x:E,y:j}}},...p}=Ka(e,t),y={x:n,y:r},g=await l.detectOverflow(t,p),v=za(o),b=tw(v);let S=y[b],C=y[v];const N=(T,E)=>gP(E+g[T==="y"?"top":"left"],E,E-g[T==="y"?"bottom":"right"]);c&&(S=N(b,S)),d&&(C=N(v,C));const A=m.fn({...t,[b]:S,[v]:C});return{...A,data:{x:A.x-n,y:A.y-r,enabled:{[b]:c,[v]:d}}}}}},Nz=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:o,y:l,placement:c,rects:d,middlewareData:m}=t,{offset:p=0,mainAxis:y=!0,crossAxis:g=!0}=Ka(e,t),v={x:o,y:l},b=za(c),S=tw(b);let C=v[S],N=v[b];const A=Ka(p,t),T=typeof A=="number"?{mainAxis:A,crossAxis:0}:{mainAxis:(n=A.mainAxis)!=null?n:0,crossAxis:(r=A.crossAxis)!=null?r:0};if(y){const _=S==="y"?"height":"width",R=d.reference[S]-d.floating[_]+T.mainAxis,P=d.reference[S]+d.reference[_]-T.mainAxis;C<R?C=R:C>P&&(C=P)}if(g){var E,j;const _=S==="y"?"width":"height",R=vP.has(xa(c)),P=d.reference[b]-d.floating[_]+(R&&((E=m.offset)==null?void 0:E[b])||0)+(R?0:T.crossAxis),M=d.reference[b]+d.reference[_]+(R?0:((j=m.offset)==null?void 0:j[b])||0)-(R?T.crossAxis:0);N<P?N=P:N>M&&(N=M)}return{[S]:C,[b]:N}}}},Az=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:l}=t,{apply:c=()=>{},...d}=Ka(e,t),m=await o.detectOverflow(t,d),p=xa(n),y=Ba(n),g=za(n)==="y",{width:v,height:b}=r.floating;let S,C;p==="top"||p==="bottom"?(S=p,C=y===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(C=p,S=y==="end"?"top":"bottom");const N=b-m.top-m.bottom,A=v-m.left-m.right,T=Ga(b-m[S],N),E=Ga(v-m[C],A),j=t.middlewareData.shift,_=!j;let R=T,P=E;j!=null&&j.enabled.x&&(P=A),j!=null&&j.enabled.y&&(R=N),_&&!y&&(g?P=v-2*ga(m.left,m.right):R=b-2*ga(m.top,m.bottom)),await c({...t,availableWidth:P,availableHeight:R});const M=await o.getDimensions(l.floating);return v!==M.width||b!==M.height?{reset:{rects:!0}}:{}}}};function yh(){return typeof window<"u"}function qc(e){return bP(e)?(e.nodeName||"").toLowerCase():"#document"}function _r(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ti(e){var t;return(t=(bP(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function bP(e){return yh()?e instanceof Node||e instanceof _r(e).Node:!1}function ws(e){return yh()?e instanceof Element||e instanceof _r(e).Element:!1}function so(e){return yh()?e instanceof HTMLElement||e instanceof _r(e).HTMLElement:!1}function EE(e){return!yh()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof _r(e).ShadowRoot}function xh(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ss(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function Ez(e){return/^(table|td|th)$/.test(qc(e))}function vh(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const jz=/transform|translate|scale|rotate|perspective|filter/,Tz=/paint|layout|strict|content/,Mo=e=>!!e&&e!=="none";let mx;function sw(e){const t=ws(e)?Ss(e):e;return Mo(t.transform)||Mo(t.translate)||Mo(t.scale)||Mo(t.rotate)||Mo(t.perspective)||!iw()&&(Mo(t.backdropFilter)||Mo(t.filter))||jz.test(t.willChange||"")||Tz.test(t.contain||"")}function kz(e){let t=al(e);for(;so(t)&&!Dd(t);){if(sw(t))return t;if(vh(t))return null;t=al(t)}return null}function iw(){return mx==null&&(mx=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),mx}function Dd(e){return/^(html|body|#document)$/.test(qc(e))}function Ss(e){return _r(e).getComputedStyle(e)}function bh(e){return ws(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function al(e){if(qc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||EE(e)&&e.host||ti(e);return EE(t)?t.host:t}function wP(e){const t=al(e);return Dd(t)?(e.ownerDocument||e).body:so(t)&&xh(t)?t:wP(t)}function Ld(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=wP(e),l=o===((r=e.ownerDocument)==null?void 0:r.body),c=_r(o);if(l){const d=lb(c);
10return t.concat(c,c.visualViewport||[],xh(o)?o:[],d&&n?Ld(d):[])}else return t.concat(o,Ld(o,[],n))}function lb(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function SP(e){const t=Ss(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=so(e),l=o?e.offsetWidth:n,c=o?e.offsetHeight:r,d=Rp(n)!==l||Rp(r)!==c;return d&&(n=l,r=c),{width:n,height:r,$:d}}function ow(e){return ws(e)?e:e.contextElement}function yc(e){const t=ow(e);if(!so(t))return Ks(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:l}=SP(t);let c=(l?Rp(n.width):n.width)/r,d=(l?Rp(n.height):n.height)/o;return(!c||!Number.isFinite(c))&&(c=1),(!d||!Number.isFinite(d))&&(d=1),{x:c,y:d}}const Rz=Ks(0);function CP(e){const t=_r(e);return!iw()||!t.visualViewport?Rz:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Pz(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===_r(e)}function sl(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),l=ow(e);let c=Ks(1);t&&(r?ws(r)&&(c=yc(r)):c=yc(e));const d=Pz(l,n,r)?CP(l):Ks(0);let m=(o.left+d.x)/c.x,p=(o.top+d.y)/c.y,y=o.width/c.x,g=o.height/c.y;if(l&&r){const v=_r(l),b=ws(r)?_r(r):r;let S=v,C=lb(S);for(;C&&b!==S;){const N=yc(C),A=C.getBoundingClientRect(),T=Ss(C),E=A.left+(C.clientLeft+parseFloat(T.paddingLeft))*N.x,j=A.top+(C.clientTop+parseFloat(T.paddingTop))*N.y;m*=N.x,p*=N.y,y*=N.x,g*=N.y,m+=E,p+=j,S=_r(C),C=lb(S)}}return Qi({width:y,height:g,x:m,y:p})}function wh(e,t){const n=bh(e).scrollLeft;return t?t.left+n:sl(ti(e)).left+n}function NP(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-wh(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Oz(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const l=o==="fixed",c=ti(r),d=t?vh(t.floating):!1;if(r===c||d&&l)return n;let m={scrollLeft:0,scrollTop:0},p=Ks(1);const y=Ks(0),g=so(r);if((g||!l)&&((qc(r)!=="body"||xh(c))&&(m=bh(r)),g)){const b=sl(r);p=yc(r),y.x=b.x+r.clientLeft,y.y=b.y+r.clientTop}const v=c&&!g&&!l?NP(c,m):Ks(0);return{width:n.width*p.x,height:n.height*p.y,x:n.x*p.x-m.scrollLeft*p.x+y.x+v.x,y:n.y*p.y-m.scrollTop*p.y+y.y+v.y}}function _z(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Iz(e){const t=bh(e),n=e.ownerDocument.body,r=ga(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),o=ga(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let l=-t.scrollLeft+wh(e);const c=-t.scrollTop;return Ss(n).direction==="rtl"&&(l+=ga(e.clientWidth,n.clientWidth)-r),{width:r,height:o,x:l,y:c}}const Mz=25;function Dz(e,t,n){n===void 0&&(n="viewport");const r=n==="layoutViewport",o=_r(e),l=ti(e),c=o.visualViewport;let d=l.clientWidth,m=l.clientHeight,p=0,y=0;if(c){const v=!iw()||t==="fixed";r?v||(p=-c.offsetLeft,y=-c.offsetTop):(d=c.width,m=c.height,v&&(p=c.offsetLeft,y=c.offsetTop))}if(wh(l)<=0){const v=l.ownerDocument,b=v.body,S=getComputedStyle(b),C=v.compatMode==="CSS1Compat"&&parseFloat(S.marginLeft)+parseFloat(S.marginRight)||0,N=Math.abs(l.clientWidth-b.clientWidth-C),A=getComputedStyle(l).scrollbarGutter==="stable both-edges"?N/2:N;A<=Mz&&(d-=A)}return{width:d,height:m,x:p,y}}function Lz(e,t){const n=sl(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,l=yc(e),c=e.clientWidth*l.x,d=e.clientHeight*l.y,m=o*l.x,p=r*l.y;return{width:c,height:d,x:m,y:p}}function jE(e,t,n){let r;if(t==="viewport"||t==="layoutViewport")r=Dz(e,n,t);
10else if(t==="document")r=Iz(ti(e));else if(ws(t))r=Lz(t,n);else{const o=CP(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Qi(r)}function qz(e,t){const n=t.get(e);if(n)return n;let r=Ld(e,[],!1).filter(d=>ws(d)&&qc(d)!=="body"),o=null;const l=Ss(e).position==="fixed";let c=l?al(e):e;for(;ws(c)&&!Dd(c);){const d=Ss(c),m=sw(c),p=o?o.position:l?"fixed":"";!m&&(p==="fixed"||p==="absolute"&&d.position==="static")?r=r.filter(g=>g!==c):o=d,c=al(c)}return t.set(e,r),r}function Uz(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const c=[...n==="clippingAncestors"?vh(t)?[]:qz(t,this._c):[].concat(n),r],d=jE(t,c[0],o);let m=d.top,p=d.right,y=d.bottom,g=d.left;for(let v=1;v<c.length;v++){const b=jE(t,c[v],o);m=ga(b.top,m),p=Ga(b.right,p),y=Ga(b.bottom,y),g=ga(b.left,g)}return{width:p-g,height:y-m,x:g,y:m}}function zz(e){const{width:t,height:n}=SP(e);return{width:t,height:n}}function Vz(e,t,n){const r=so(t),o=ti(t),l=n==="fixed",c=sl(e,!0,l,t);let d={scrollLeft:0,scrollTop:0};const m=Ks(0);if((r||!l)&&((qc(t)!=="body"||xh(o))&&(d=bh(t)),r)){const v=sl(t,!0,l,t);m.x=v.x+t.clientLeft,m.y=v.y+t.clientTop}!r&&o&&(m.x=wh(o));const p=o&&!r&&!l?NP(o,d):Ks(0),y=c.left+d.scrollLeft-m.x-p.x,g=c.top+d.scrollTop-m.y-p.y;return{x:y,y:g,width:c.width,height:c.height}}function px(e){return Ss(e).position==="static"}function TE(e,t){if(!so(e)||Ss(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ti(e)===n&&(n=n.ownerDocument.body),n}function AP(e,t){const n=_r(e);if(vh(e))return n;if(!so(e)){let o=al(e);for(;o&&!Dd(o);){if(ws(o)&&!px(o))return o;o=al(o)}return n}let r=TE(e,t);for(;r&&Ez(r)&&px(r);)r=TE(r,t);return r&&Dd(r)&&px(r)&&!sw(r)?n:r||kz(e)||n}const Bz=async function(e){const t=this.getOffsetParent||AP,n=this.getDimensions,r=await n(e.floating);return{reference:Vz(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Fz(e){return Ss(e).direction==="rtl"}const $z={convertOffsetParentRelativeRectToViewportRelativeRect:Oz,getDocumentElement:ti,getClippingRect:Uz,getOffsetParent:AP,getElementRects:Bz,getClientRects:_z,getDimensions:zz,getScale:yc,isElement:ws,isRTL:Fz};function EP(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Hz(e,t,n){let r=null,o;const l=ti(e);function c(){var y;clearTimeout(o),(y=r)==null||y.disconnect(),r=null}function d(y,g){y===void 0&&(y=!1),g===void 0&&(g=1),c();const v=e.getBoundingClientRect(),{left:b,top:S,width:C,height:N}=v;if(y||t(),!C||!N)return;const A=Pm(S),T=Pm(l.clientWidth-(b+C)),E=Pm(l.clientHeight-(S+N)),j=Pm(b),R={rootMargin:-A+"px "+-T+"px "+-E+"px "+-j+"px",threshold:ga(0,Ga(1,g))||1};let P=!0;function M(q){const U=q[0].intersectionRatio;if(!EP(v,e.getBoundingClientRect()))return d();if(U!==g){if(!P)return d();U?d(!1,U):o=setTimeout(()=>{d(!1,1e-7)},1e3)}P=!1}try{r=new IntersectionObserver(M,{...R,root:l.ownerDocument})}catch{r=new IntersectionObserver(M,R)}r.observe(e)}const m=_r(e),p=()=>d(n);return m.addEventListener("resize",p),d(!0),()=>{m.removeEventListener("resize",p),c()}}function Gz(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:l=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:m=!1}=r,p=ow(e),y=o||l?[...p?Ld(p):[],...t?Ld(t):[]]:[];y.forEach(A=>{o&&A.addEventListener("scroll",n),l&&A.addEventListener("resize",n)});const g=p&&d?Hz(p,n,l):null;let v=-1,b=null;c&&(b=new ResizeObserver(A=>{let[T]=A;T&&T.target===p&&b&&t&&(b.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var E;(E=b)==null||E.observe(t)})),n()}),p&&!m&&b.observe(p),t&&b.observe(t));let S,C=m?sl(e):null;m&&N();function N(){const A=sl(e);C&&!EP(C,A)&&n(),C=A,S=requestAnimationFrame(N)}return n(),()=>{var A;y.forEach(T=>{o&&T.removeEventListener("scroll",n),l&&T.removeEventListener("resize",n)}),g?.(),(A=b)==null||A.disconnect(),b=null,m&&cancelAnimationFrame(S)}}const Kz=Sz,qve=gz,Yz=Cz,Wz=yz,Qz=Az,Xz=xz,kE=pz,Uve=bz,Zz=Nz,Jz=(e,t,n)=>{const r=new Map,o=n??{},l={...$z,...o.platform,_c:r};return mz(e,t,{...o,platform:l})};var eV=typeof document<"u",tV=function(){},ip=eV?h.useLayoutEffect:tV;function _p(e,t){if(e===t)return!0;
vendor: 4,380 bytes, line 10
10if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!_p(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const l=o[r];if(!(l==="_owner"&&e.$$typeof)&&!_p(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function jP(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function RE(e,t){const n=jP(e);return Math.round(t*n)/n}function hx(e){const t=h.useRef(e);return ip(()=>{t.current=e}),t}function nV(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:l,floating:c}={},transform:d=!0,whileElementsMounted:m,open:p}=e,[y,g]=h.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,b]=h.useState(r);_p(v,r)||b(r);const[S,C]=h.useState(null),[N,A]=h.useState(null),T=h.useCallback(F=>{F!==R.current&&(R.current=F,C(F))},[]),E=h.useCallback(F=>{F!==P.current&&(P.current=F,A(F))},[]),j=l||S,_=c||N,R=h.useRef(null),P=h.useRef(null),M=h.useRef(y),q=m!=null,U=hx(m),V=hx(o),$=hx(p),L=h.useCallback(()=>{if(!R.current||!P.current)return;const F={placement:t,strategy:n,middleware:v};V.current&&(F.platform=V.current),Jz(R.current,P.current,F).then(B=>{const K={...B,isPositioned:$.current!==!1};H.current&&!_p(M.current,K)&&(M.current=K,Dc.flushSync(()=>{g(K)}))})},[v,t,n,V,$]);ip(()=>{p===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,g(F=>({...F,isPositioned:!1})))},[p]);const H=h.useRef(!1);ip(()=>(H.current=!0,()=>{H.current=!1}),[]),ip(()=>{if(j&&(R.current=j),_&&(P.current=_),j&&_){if(U.current)return U.current(j,_,L);L()}},[j,_,L,U,q]);const Q=h.useMemo(()=>({reference:R,floating:P,setReference:T,setFloating:E}),[T,E]),I=h.useMemo(()=>({reference:j,floating:_}),[j,_]),O=h.useMemo(()=>{const F={position:n,left:0,top:0};if(!I.floating)return F;const B=RE(I.floating,y.x),K=RE(I.floating,y.y);return d?{...F,transform:"translate("+B+"px, "+K+"px)",...jP(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:B,top:K}},[n,d,I.floating,y.x,y.y]);return h.useMemo(()=>({...y,update:L,refs:Q,elements:I,floatingStyles:O}),[y,L,Q,I,O])}const rV=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?kE({element:r.current,padding:o}).fn(n):{}:r?kE({element:r,padding:o}).fn(n):{}}}},aV=(e,t)=>{const n=Kz(e);return{name:n.name,fn:n.fn,options:[e,t]}},sV=(e,t)=>{const n=Yz(e);return{name:n.name,fn:n.fn,options:[e,t]}},iV=(e,t)=>({fn:Zz(e).fn,options:[e,t]}),oV=(e,t)=>{const n=Wz(e);return{name:n.name,fn:n.fn,options:[e,t]}},lV=(e,t)=>{const n=Qz(e);return{name:n.name,fn:n.fn,options:[e,t]}},cV=(e,t)=>{const n=Xz(e);return{name:n.name,fn:n.fn,options:[e,t]}},uV=(e,t)=>{const n=rV(e);return{name:n.name,fn:n.fn,options:[e,t]}};var dV=Object.defineProperty,fV=(e,t)=>dV(e,"name",{value:t,configurable:!0}),mV=h.forwardRef(fV(function(t,n){const{children:r,width:o=10,height:l=5,...c}=t;return s.jsx(Ge.svg,{...c,ref:n,width:o,height:l,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:s.jsx("polygon",{points:"0,0 30,0 15,10"})})},"Arrow")),pV=mV,hV=Object.defineProperty,gV=(e,t)=>hV(e,"name",{value:t,configurable:!0});function Sh(e){const[t,n]=h.useState(void 0);return Vt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const l=o[0];let c,d;if("borderBoxSize"in l){const m=l.borderBoxSize,p=Array.isArray(m)?m[0]:m;c=p.inlineSize,d=p.blockSize}else c=e.offsetWidth,d=e.offsetHeight;n({width:c,height:d})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}gV(Sh,"useSize");var yV=Object.defineProperty,Ys=(e,t)=>yV(e,"name",{value:t,configurable:!0}),TP="Popper",[kP,io]=nr(TP),[xV,RP]=kP(TP),vV=Ys(e=>{const{__scopePopper:t,children:n}=e,[r,o]=h.useState(null),[l,c]=h.useState(void 0);return s.jsx(xV,{scope:t,anchor:r,onAnchorChange:o,placementState:l,setPlacementState:c,children:n})},"Popper"),bV="PopperAnchor",wV=h.forwardRef(Ys(function(t,n){const{__scopePopper:r,virtualRef:o,...l}
10=t,c=RP(bV,r),d=h.useRef(null),m=c.onAnchorChange,p=h.useCallback(C=>{d.current=C,C&&m(C)},[m]),y=Qe(n,p),g=h.useRef(null);h.useEffect(()=>{if(!o)return;const C=g.current;g.current=o.current,C!==g.current&&m(g.current)});const v=c.placementState&&Ch(c.placementState),b=v?.[0],S=v?.[1];return o?null:s.jsx(Ge.div,{"data-radix-popper-side":b,"data-radix-popper-align":S,...l,ref:y})},"PopperAnchor")),PP="PopperContent",[SV,CV]=kP(PP),NV=h.forwardRef(Ys(function(t,n){const{__scopePopper:r,side:o="bottom",sideOffset:l=0,align:c="center",alignOffset:d=0,arrowPadding:m=0,avoidCollisions:p=!0,collisionBoundary:y=[],collisionPadding:g=0,sticky:v="partial",hideWhenDetached:b=!1,updatePositionStrategy:S="optimized",onPlaced:C,...N}=t,A=RP(PP,r),[T,E]=h.useState(null),j=Qe(n,E),[_,R]=h.useState(null),P=Sh(_),M=P?.width??0,q=P?.height??0,U=o+(c!=="center"?"-"+c:""),V=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},$=Array.isArray(y)?y:[y],L=$.length>0,H={padding:V,boundary:$.filter(OP),altBoundary:L},{refs:Q,floatingStyles:I,placement:O,isPositioned:F,middlewareData:B}=nV({strategy:"fixed",placement:U,whileElementsMounted:Ys((...ge)=>Gz(...ge,{animationFrame:S==="always"}),"whileElementsMounted"),elements:{reference:A.anchor},middleware:[aV({mainAxis:l+q,alignmentAxis:d}),p&&sV({mainAxis:!0,crossAxis:!1,limiter:v==="partial"?iV():void 0,...H}),p&&oV({...H}),lV({...H,apply:Ys(({elements:ge,rects:we,availableWidth:be,availableHeight:Me})=>{const{width:ze,height:Ee}=we.reference,Ct=ge.floating.style;Ct.setProperty("--radix-popper-available-width",`${be}px`),Ct.setProperty("--radix-popper-available-height",`${Me}px`),Ct.setProperty("--radix-popper-anchor-width",`${ze}px`),Ct.setProperty("--radix-popper-anchor-height",`${Ee}px`)},"apply")}),_&&uV({element:_,padding:m}),TV({arrowWidth:M,arrowHeight:q}),b&&cV({strategy:"referenceHidden",...H,boundary:L?H.boundary:void 0})]}),K=A.setPlacementState;Vt(()=>(K(O),()=>{K(void 0)}),[O,K]);const[le,Z]=Ch(O),ie=Jr(C);Vt(()=>{F&&ie?.()},[F,ie]);const re=B.arrow?.x,de=B.arrow?.y,he=B.arrow?.centerOffset!==0,[pe,oe]=h.useState();return Vt(()=>{T&&oe(window.getComputedStyle(T).zIndex)},[T]),s.jsx("div",{ref:Q.setFloating,"data-radix-popper-content-wrapper":"",style:{...I,transform:F?I.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:pe,"--radix-popper-transform-origin":[B.transformOrigin?.x,B.transformOrigin?.y].join(" "),...B.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:s.jsx(SV,{scope:r,placedSide:le,placedAlign:Z,onArrowChange:R,arrowX:re,arrowY:de,shouldHideArrow:he,children:s.jsx(Ge.div,{"data-side":le,"data-align":Z,...N,ref:j,style:{...N.style,animation:F?N.style?.animation:"none"}})})})},"PopperContent")),AV="PopperArrow",EV={top:"bottom",right:"left",bottom:"top",left:"right"},jV=h.forwardRef(Ys(function(t,n){const{__scopePopper:r,...o}=t,l=CV(AV,r),c=EV[l.placedSide];return s.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:s.jsx(pV,{...o,ref:n,style:{...o.style,display:"block"}})})},"PopperArrow"));function OP(e){return e!==null}Ys(OP,"isNotNull");var TV=Ys(e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,c=o.arrow?.centerOffset!==0,d=c?0:e.arrowWidth,m=c?0:e.arrowHeight,[p,y]=Ch(n),g={start:"0%",center:"50%",end:"100%"}[y],v=(o.arrow?.x??0)+d/2,b=(o.arrow?.y??0)+m/2;let S="",C="";return p==="bottom"?(S=c?g:`${v}px`,C=`${-m}px`):p==="top"?(S=c?g:`${v}px`,C=`${r.floating.height+m}px`):p==="right"?(S=`${-m}px`,C=c?g:`${b}px`):p==="left"&&(S=`${r.floating.width+m}px`,C=c?g:`${b}px`),{data:{x:S,y:C}}}}),"transformOrigin");function Ch(e){const[t,n="center"]=e.split("-");return[t,n]}Ys(Ch,"getSideAndAlignFromPlacement");var lw=vV,cw=wV,Nh=NV,kV=jV,RV=Object.defineProperty,PV=(e,t)=>RV(e,"name",{value:t,configurable:!0}),Zd=h.forwardRef(PV(function(t,n){const{container:r,...o}=t,[l,c]=h.useState(!1);Vt(()=>c(!0),[]);const d=r||l&&globalThis?.document?.body;return d?Dc.createPortal(s.jsx(Ge.div,{...o,ref:n}),d):null},"Portal")),OV=Object.defineProperty,Xs=(e,t)=>OV(e,"name",{value:t,configurable:!0});function _P(e,t){return h.useReducer((n,r)=>t[n][r]??n,e)}Xs(_P,"useStateMachine");var Dr=Xs(e=>{const{present:t,children:n}=e,r=IP(t),o=typeof n=="function"?n({present:r.isPresent}):h.Children.only(n),l=MP(r.ref,DP(o));return typeof n=="function"||r.isPresent?h.cloneElement(o,{ref:l}):null},"Presence");function IP(e){const[t,n]=h.useState(),r=h.useRef(null),o=h.useRef(e),l=h.useRef("none"),c=h.useRef(void 0),d=e?"mounted":"unmounted",[m,p]=_P(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{m==="mounted"?(l.current=c.current??lc(r.current),c.current=void 0):l.current="none"},[m]),Vt(()=>{const y=r.current,g=o.current;if(g!==e){const b=l.current,S=lc(y);e?(c.current=S,p("MOUNT")):S==="none"||y?.display==="none"?p("UNMOUNT"):p(g&&b!==S?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,p]),Vt(()=>{if(t){let y;const g=t.ownerDocument.defaultView??window,v=Xs(S=>{const N=lc(r.current).includes(CSS.escape(S.animationName));if(S.target===t&&N&&(p("ANIMATION_END"),!o.current)){const A=t.style.animationFillMode;t.style.animationFillMode="forwards",y=g.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=A)})}},"handleAnimationEnd"),b=Xs(S=>{S.target===t&&(l.current=lc(r.current))},"handleAnimationStart");return t.addEventListener("animationstart",b),t.addEventListener("animationcancel",v),t.addEventListener("animationend",v),()=>{g.clearTimeout(y),t.removeEventListener("animationstart",b),t.removeEventListener("animationcancel",v),t.removeEventListener("animationend",v)}}else p("ANIMATION_END")}
10,[t,p]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:h.useCallback(y=>{if(y){const g=getComputedStyle(y);r.current=g,c.current=lc(g)}else r.current=null;n(y)},[])}}Xs(IP,"usePresence");function cb(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}Xs(cb,"setRef");function MP(...e){const t=h.useRef(e);return t.current=e,h.useCallback(n=>{const r=t.current;let o=!1;const l=r.map(c=>{const d=cb(c,n);return!o&&typeof d=="function"&&(o=!0),d});if(o)return()=>{for(let c=0;c<l.length;c++){const d=l[c];typeof d=="function"?d():cb(r[c],null)}}},[])}Xs(MP,"useStableComposedRefs");function lc(e){return e?.animationName||"none"}Xs(lc,"getAnimationName");function DP(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Xs(DP,"getElementRef");var _V=Object.defineProperty,IV=(e,t)=>_V(e,"name",{value:t,configurable:!0}),PE=Oc[" useEffectEvent ".trim().toString()],OE=Oc[" useInsertionEffect ".trim().toString()];function LP(e){if(typeof PE=="function")return PE(e);const t=h.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof OE=="function"?OE(()=>{t.current=e}):Vt(()=>{t.current=e}),h.useMemo(()=>((...n)=>t.current?.(...n)),[])}IV(LP,"useEffectEvent");var MV=Object.defineProperty,Jd=(e,t)=>MV(e,"name",{value:t,configurable:!0}),DV=Oc[" useInsertionEffect ".trim().toString()]||Vt;function va({prop:e,defaultProp:t,onChange:n=Jd(()=>{},"onChange"),caller:r}){const[o,l,c]=qP({defaultProp:t,onChange:n}),d=e!==void 0,m=d?e:o,p=h.useCallback(y=>{if(d){const g=UP(y)?y(e):y;g!==e&&c.current?.(g)}else l(y)},[d,e,l,c]);return[m,p]}Jd(va,"useControllableState");function qP({defaultProp:e,onChange:t}){const[n,r]=h.useState(e),o=h.useRef(n),l=h.useRef(t);return DV(()=>{l.current=t},[t]),h.useEffect(()=>{o.current!==n&&(l.current?.(n),o.current=n)},[n,o]),[n,r,l]}Jd(qP,"useUncontrolledState");function UP(e){return typeof e=="function"}Jd(UP,"isFunction");var _E=Symbol("RADIX:SYNC_STATE");function LV(e,t,n,r){const{prop:o,defaultProp:l,onChange:c,caller:d}=t,m=o!==void 0,p=LP(c),y=[{...n,state:l}];r&&y.push(r);const[g,v]=h.useReducer((N,A)=>{if(A.type===_E)return{...N,state:A.state};const T=e(N,A);return m&&!Object.is(T.state,N.state)&&p(T.state),T},...y),b=g.state,S=h.useRef(b);h.useEffect(()=>{S.current!==b&&(S.current=b,m||p(b))},[b,S,m]);const C=h.useMemo(()=>o!==void 0?{...g,state:o}:g,[g,o]);return h.useEffect(()=>{m&&!Object.is(o,g.state)&&v({type:_E,state:o})},[o,g.state,m]),[C,v]}Jd(LV,"useControllableStateReducer");var qV=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},tc=new WeakMap,Om=new WeakMap,_m={},gx=0,zP=function(e){return e&&(e.host||zP(e.parentNode))},UV=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=zP(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},zV=function(e,t,n,r){var o=UV(t,Array.isArray(e)?e:[e]);_m[n]||(_m[n]=new WeakMap);var l=_m[n],c=[],d=new Set,m=new Set(o),p=function(g){!g||d.has(g)||(d.add(g),p(g.parentNode))};o.forEach(p);var y=function(g){!g||m.has(g)||Array.prototype.forEach.call(g.children,function(v){if(d.has(v))y(v);else try{var b=v.getAttribute(r),S=b!==null&&b!=="false",C=(tc.get(v)||0)+1,N=(l.get(v)||0)+1;tc.set(v,C),l.set(v,N),c.push(v),C===1&&S&&Om.set(v,!0),N===1&&v.setAttribute(n,"true"),S||v.setAttribute(r,"true")}catch(A){console.error("aria-hidden: cannot operate on ",v,A)}})};return y(t),d.clear(),gx++,function(){c.forEach(function(g){var v=tc.get(g)-1,b=l.get(g)-1;tc.set(g,v),l.set(g,b),v||(Om.has(g)||g.removeAttribute(r),Om.delete(g)),b||g.removeAttribute(n)}),gx--,gx||(tc=new WeakMap,tc=new WeakMap,Om=new WeakMap,_m={})}},Ah=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=qV(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),zV(r,o,n,"aria-hidden")):function(){return null}},xs=function(){return xs=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},xs.apply(this,arguments)};function VP(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function VV(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,l;r<o;r++)(l||!(r in t))&&(l||(l=Array.prototype.slice.call(t,0,r)),l[r]=t[r]);return e.concat(l||Array.prototype.slice.call(t))}var op="right-scroll-bar-position",lp="width-before-scroll-bar",BV="with-scroll-bars-hidden",FV="--removed-body-scroll-bar-size";function yx(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function $V(e,t){var n=h.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var HV=typeof window<"u"?h.useLayoutEffect:h.useEffect,IE=new WeakMap;function GV(e,t){var n=$V(null,function(r){return e.forEach(function(o){return yx(o,r)})});return HV(function(){var r=IE.get(n);
vendor: 4,244 bytes, lines 10-25
10if(r){var o=new Set(r),l=new Set(e),c=n.current;o.forEach(function(d){l.has(d)||yx(d,null)}),l.forEach(function(d){o.has(d)||yx(d,c)})}IE.set(n,e)},[e]),n}function KV(e){return e}function YV(e,t){t===void 0&&(t=KV);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(l){var c=t(l,r);return n.push(c),function(){n=n.filter(function(d){return d!==c})}},assignSyncMedium:function(l){for(r=!0;n.length;){var c=n;n=[],c.forEach(l)}n={push:function(d){return l(d)},filter:function(){return n}}},assignMedium:function(l){r=!0;var c=[];if(n.length){var d=n;n=[],d.forEach(l),c=n}var m=function(){var y=c;c=[],y.forEach(l)},p=function(){return Promise.resolve().then(m)};p(),n={push:function(y){c.push(y),p()},filter:function(y){return c=c.filter(y),n}}}};return o}function WV(e){e===void 0&&(e={});var t=YV(null);return t.options=xs({async:!0,ssr:!1},e),t}var BP=function(e){var t=e.sideCar,n=VP(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return h.createElement(r,xs({},n))};BP.isSideCarExport=!0;function QV(e,t){return e.useMedium(t),BP}var FP=WV(),xx=function(){},Eh=h.forwardRef(function(e,t){var n=h.useRef(null),r=h.useState({onScrollCapture:xx,onWheelCapture:xx,onTouchMoveCapture:xx}),o=r[0],l=r[1],c=e.forwardProps,d=e.children,m=e.className,p=e.removeScrollBar,y=e.enabled,g=e.shards,v=e.sideCar,b=e.noRelative,S=e.noIsolation,C=e.inert,N=e.allowPinchZoom,A=e.as,T=A===void 0?"div":A,E=e.gapMode,j=VP(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=v,R=GV([n,t]),P=xs(xs({},j),o);return h.createElement(h.Fragment,null,y&&h.createElement(_,{sideCar:FP,removeScrollBar:p,shards:g,noRelative:b,noIsolation:S,inert:C,setCallbacks:l,allowPinchZoom:!!N,lockRef:n,gapMode:E}),c?h.cloneElement(h.Children.only(d),xs(xs({},P),{ref:R})):h.createElement(T,xs({},P,{className:m,ref:R}),d))});Eh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Eh.classNames={fullWidth:lp,zeroRight:op};var XV=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ZV(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=XV();return t&&e.setAttribute("nonce",t),e}function JV(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function eB(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var tB=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ZV())&&(JV(t,n),eB(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},nB=function(){var e=tB();return function(t,n){h.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},$P=function(){var e=nB(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},rB={left:0,top:0,right:0,gap:0},vx=function(e){return parseInt(e||"",10)||0},aB=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[vx(n),vx(r),vx(o)]},sB=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return rB;var t=aB(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},iB=$P(),xc="data-scroll-locked",oB=function(e,t,n,r){var o=e.left,l=e.top,c=e.right,d=e.gap;return n===void 0&&(n="margin"),` 11 .`.concat(BV,` { 12 overflow: hidden `).concat(r,`; 13 padding-right: `).concat(d,"px ").concat(r,`; 14 } 15 body[`).concat(xc,`] { 16 overflow: hidden `).concat(r,`; 17 overscroll-behavior: contain; 18 `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` 19 padding-left: `.concat(o,`px; 20 padding-top: `).concat(l,`px; 21 padding-right: `).concat(c,`px; 22 margin-left:0; 23 margin-top:0; 24 margin-right: `).concat(d,"px ").concat(r,`; 25 `),n==="padding"&&"padding-right: ".concat(d,"px ").concat(r,";
25")].filter(Boolean).join(""),` 26 } 27 28 .`).concat(op,` { 29 right: `).concat(d,"px ").concat(r,`; 30 } 31 32 .`).concat(lp,` { 33 margin-right: `).concat(d,"px ").concat(r,`; 34 } 35 36 .`).concat(op," .").concat(op,` { 37 right: 0 `).concat(r,`; 38 } 39 40 .`).concat(lp," .").concat(lp,` { 41 margin-right: 0 `).concat(r,`; 42 } 43 44 body[`).concat(xc,`] { 45 `).concat(FV,": ").concat(d,`px; 46 } 47`)},ME=function(){var e=parseInt(document.body.getAttribute(xc)||"0",10);return isFinite(e)?e:0},lB=function(){h.useEffect(function(){return document.body.setAttribute(xc,(ME()+1).toString()),function(){var e=ME()-1;e<=0?document.body.removeAttribute(xc):document.body.setAttribute(xc,e.toString())}},[])},cB=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;lB();var l=h.useMemo(function(){return sB(o)},[o]);return h.createElement(iB,{styles:oB(l,!t,o,n?"":"!important")})},ub=!1;if(typeof window<"u")try{var Im=Object.defineProperty({},"passive",{get:function(){return ub=!0,!0}});window.addEventListener("test",Im,Im),window.removeEventListener("test",Im,Im)}catch{ub=!1}var nc=ub?{passive:!1}:!1,uB=function(e){return e.tagName==="TEXTAREA"},HP=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!uB(e)&&n[t]==="visible")},dB=function(e){return HP(e,"overflowY")},fB=function(e){return HP(e,"overflowX")},DE=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=GP(e,r);if(o){var l=KP(e,r),c=l[1],d=l[2];if(c>d)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},mB=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},pB=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},GP=function(e,t){return e==="v"?dB(t):fB(t)},KP=function(e,t){return e==="v"?mB(t):pB(t)},hB=function(e,t){return e==="h"&&t==="rtl"?-1:1},gB=function(e,t,n,r,o){var l=hB(e,window.getComputedStyle(t).direction),c=l*r,d=n.target,m=t.contains(d),p=!1,y=c>0,g=0,v=0;do{if(!d)break;var b=KP(e,d),S=b[0],C=b[1],N=b[2],A=C-N-l*S;(S||A)&&GP(e,d)&&(g+=A,v+=S);var T=d.parentNode;d=T&&T.nodeType===Node.DOCUMENT_FRAGMENT_NODE?T.host:T}while(!m&&d!==document.body||m&&(t.contains(d)||t===d));return(y&&Math.abs(g)<1||!y&&Math.abs(v)<1)&&(p=!0),p},Mm=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},LE=function(e){return[e.deltaX,e.deltaY]},qE=function(e){return e&&"current"in e?e.current:e},yB=function(e,t){return e[0]===t[0]&&e[1]===t[1]},xB=function(e){return` 48 .block-interactivity-`.concat(e,` {pointer-events: none;} 49 .allow-interactivity-`).concat(e,` {pointer-events: all;} 50`)},vB=0,rc=[];function bB(e){var t=h.useRef([]),n=h.useRef([0,0]),r=h.useRef(),o=h.useState(vB++)[0],l=h.useState($P)[0],c=h.useRef(e);h.useEffect(function(){c.current=e},[e]),h.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var C=VV([e.lockRef.current],(e.shards||[]).map(qE),!0).filter(Boolean);
vendor: 5,335 bytes, line 50
50return C.forEach(function(N){return N.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),C.forEach(function(N){return N.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var d=h.useCallback(function(C,N){if("touches"in C&&C.touches.length===2||C.type==="wheel"&&C.ctrlKey)return!c.current.allowPinchZoom;var A=Mm(C),T=n.current,E="deltaX"in C?C.deltaX:T[0]-A[0],j="deltaY"in C?C.deltaY:T[1]-A[1],_,R=C.target,P=Math.abs(E)>Math.abs(j)?"h":"v";if("touches"in C&&P==="h"&&R.type==="range")return!1;var M=window.getSelection(),q=M&&M.anchorNode,U=q?q===R||q.contains(R):!1;if(U)return!1;var V=DE(P,R);if(!V)return!0;if(V?_=P:(_=P==="v"?"h":"v",V=DE(P,R)),!V)return!1;if(!r.current&&"changedTouches"in C&&(E||j)&&(r.current=_),!_)return!0;var $=r.current||_;return gB($,N,C,$==="h"?E:j)},[]),m=h.useCallback(function(C){var N=C;if(!(!rc.length||rc[rc.length-1]!==l)){var A="deltaY"in N?LE(N):Mm(N),T=t.current.filter(function(_){return _.name===N.type&&(_.target===N.target||N.target===_.shadowParent)&&yB(_.delta,A)})[0];if(T&&T.should){N.cancelable&&N.preventDefault();return}if(!T){var E=(c.current.shards||[]).map(qE).filter(Boolean).filter(function(_){return _.contains(N.target)}),j=E.length>0?d(N,E[0]):!c.current.noIsolation;j&&N.cancelable&&N.preventDefault()}}},[]),p=h.useCallback(function(C,N,A,T){var E={name:C,delta:N,target:A,should:T,shadowParent:wB(A)};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(j){return j!==E})},1)},[]),y=h.useCallback(function(C){n.current=Mm(C),r.current=void 0},[]),g=h.useCallback(function(C){p(C.type,LE(C),C.target,d(C,e.lockRef.current))},[]),v=h.useCallback(function(C){p(C.type,Mm(C),C.target,d(C,e.lockRef.current))},[]);h.useEffect(function(){return rc.push(l),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:v}),document.addEventListener("wheel",m,nc),document.addEventListener("touchmove",m,nc),document.addEventListener("touchstart",y,nc),function(){rc=rc.filter(function(C){return C!==l}),document.removeEventListener("wheel",m,nc),document.removeEventListener("touchmove",m,nc),document.removeEventListener("touchstart",y,nc)}},[]);var b=e.removeScrollBar,S=e.inert;return h.createElement(h.Fragment,null,S?h.createElement(l,{styles:xB(o)}):null,b?h.createElement(cB,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function wB(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const SB=QV(FP,bB);var ef=h.forwardRef(function(e,t){return h.createElement(Eh,xs({},e,{ref:t,sideCar:SB}))});ef.classNames=Eh.classNames;var CB=Object.defineProperty,ni=(e,t)=>CB(e,"name",{value:t,configurable:!0}),uw="Popover",[YP,zve]=nr(uw,[io]),jh=io(),[NB,Uc]=YP(uw),AB=ni(e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:l,modal:c=!1}=e,d=jh(t),m=h.useRef(null),[p,y]=h.useState(!1),[g,v]=va({prop:r,defaultProp:o??!1,onChange:l,caller:uw});return s.jsx(lw,{...d,children:s.jsx(NB,{scope:t,contentId:ha(),triggerRef:m,open:g,onOpenChange:v,onOpenToggle:h.useCallback(()=>v(b=>!b),[v]),hasCustomAnchor:p,onCustomAnchorAdd:h.useCallback(()=>y(!0),[]),onCustomAnchorRemove:h.useCallback(()=>y(!1),[]),modal:c,children:n})})},"Popover"),EB="PopoverTrigger",jB=h.forwardRef(ni(function(t,n){const{__scopePopover:r,...o}=t,l=Uc(EB,r),c=jh(r),d=Qe(n,l.triggerRef),m=s.jsx(Ge.button,{type:"button","aria-haspopup":"dialog","aria-expanded":l.open,"aria-controls":l.open?l.contentId:void 0,"data-state":dw(l.open),...o,ref:d,onClick:je(t.onClick,l.onOpenToggle)});return l.hasCustomAnchor?m:s.jsx(cw,{asChild:!0,...c,children:m})},"PopoverTrigger")),WP="PopoverPortal",[TB,kB]=YP(WP,{forceMount:void 0}),RB=ni(e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,l=Uc(WP,t);return s.jsx(TB,{scope:t,forceMount:n,children:s.jsx(Dr,{present:n||l.open,children:s.jsx(Zd,{asChild:!0,container:o,children:r})})})},"PopoverPortal"),qd="PopoverContent",PB=h.forwardRef(ni(function(t,n){const r=kB(qd,t.__scopePopover),{forceMount:o=r.forceMount,...l}=t,c=Uc(qd,t.__scopePopover);return s.jsx(Dr,{present:o||c.open,children:c.modal?s.jsx(_B,{...l,ref:n}):s.jsx(IB,{...l,ref:n})})},"PopoverContent")),OB=Ha("PopoverContent.RemoveScroll"),_B=h.forwardRef(ni(function(t,n){const r=Uc(qd,t.__scopePopover),o=h.useRef(null),l=Qe(n,o),c=h.useRef(!1);return h.useEffect(()=>{const d=o.current;if(d)return Ah(d)},[]),s.jsx(ef,{as:OB,allowPinchZoom:!0,children:s.jsx(QP,{...t,ref:l,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:je(t.onCloseAutoFocus,d=>{d.preventDefault(),c.current||r.triggerRef.current?.focus()}),onPointerDownOutside:je(t.onPointerDownOutside,d=>{const m=d.detail.originalEvent,p=m.button===0&&m.ctrlKey===!0,y=m.button===2||p;c.current=y},{checkForDefaultPrevented:!1}),onFocusOutside:je(t.onFocusOutside,d=>d.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),IB=h.forwardRef(ni(function(t,n){const r=Uc(qd,t.__scopePopover),o=h.useRef(!1),l=h.useRef(!1);return s.jsx(QP,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{t.onCloseAutoFocus?.(c),c.defaultPrevented||(o.current||r.triggerRef.current?.focus(),c.preventDefault()),o.current=!1,l.current=!1},onInteractOutside:c=>
50{t.onInteractOutside?.(c),c.defaultPrevented||(o.current=!0,c.detail.originalEvent.type==="pointerdown"&&(l.current=!0));const d=c.target;r.triggerRef.current?.contains(d)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&l.current&&c.preventDefault()}})},"PopoverContentNonModal")),QP=h.forwardRef(ni(function(t,n){const{__scopePopover:r,trapFocus:o,onOpenAutoFocus:l,onCloseAutoFocus:c,disableOutsidePointerEvents:d,onEscapeKeyDown:m,onPointerDownOutside:p,onFocusOutside:y,onInteractOutside:g,...v}=t,b=Uc(qd,r),S=jh(r);return Lc(),s.jsx(gh,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:l,onUnmountAutoFocus:c,children:s.jsx(Xd,{asChild:!0,disableOutsidePointerEvents:d,onInteractOutside:g,onEscapeKeyDown:m,onPointerDownOutside:p,onFocusOutside:y,onDismiss:()=>b.onOpenChange(!1),deferPointerDownOutside:!0,children:s.jsx(Nh,{"data-state":dw(b.open),role:"dialog",id:b.contentId,...S,...v,ref:n,style:{...v.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})},"PopoverContentImpl")),MB=h.forwardRef(ni(function(t,n){const{__scopePopover:r,...o}=t,l=jh(r);return s.jsx(kV,{...l,...o,ref:n})},"PopoverArrow"));function dw(e){return e?"open":"closed"}ni(dw,"getState");var DB=AB,LB=jB,qB=RB,UB=PB,zB=MB;function VB(e){const t=new Date(e).getTime();if(Number.isNaN(t))return"";const n=Date.now()-t,r=Math.round(n/1e3);if(r<45)return"just now";const o=Math.round(r/60);if(o<60)return`${o}m`;const l=Math.round(o/60);if(l<24)return`${l}h`;const c=Math.round(l/24);return c<7?`${c}d`:new Date(e).toLocaleDateString(void 0,{month:"short",day:"numeric"})}const BB={icon:Qs,label:"Notification"};function FB({row:e,meta:t,onActivate:n}){const r=e.readAt==null,o=t.icon,l=t.tone==="danger";return s.jsxs("button",{type:"button",onClick:()=>n(e),"data-testid":`bell-item-${String(e.id)}`,className:Y("flex w-full items-start gap-2.5 rounded-xl px-3 py-2.5 text-left","motion-safe:transition-colors hover:bg-muted",r&&"bg-accent/60"),children:[s.jsx("span",{title:t.label,className:Y("mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-lg",l?"bg-danger/10 text-danger":r?"bg-primary/10 text-primary":"bg-muted text-ink-3"),children:s.jsx(o,{className:"size-4","aria-hidden":!0})}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsxs("span",{className:"flex items-baseline justify-between gap-2",children:[s.jsx("span",{className:Y("truncate text-sm text-ink",r?"font-semibold":"font-medium"),children:e.title}),s.jsx("span",{className:"shrink-0 text-caption text-ink-3 tabular-nums",children:VB(e.createdAt)})]}),e.body?s.jsx("span",{className:"mt-0.5 line-clamp-2 block text-caption text-ink-2",children:e.body}):null]})]})}function $B({unreadCount:e,items:t,isLoading:n,hasNextPage:r,isFetchingNextPage:o,typeMeta:l,prompt:c,emptyTitle:d="You're all caught up.",emptySubtitle:m="New alerts show up here.",settings:p,markAllReadBusy:y,onActivate:g,onMarkAllRead:v,onLoadMore:b,open:S,onOpenChange:C,triggerClassName:N,triggerLabel:A,triggerTestId:T="nav-notifications"}){return s.jsxs(DB,{open:S,onOpenChange:C,children:[s.jsx(LB,{asChild:!0,children:s.jsxs("button",{type:"button","data-testid":T,"aria-label":A??(e>0?`Notifications, ${e} unread`:"Notifications"),className:Y("relative flex size-[42px] items-center justify-center rounded-pill bg-ink/5 text-ink motion-safe:transition-colors hover:bg-ink/10","dark:bg-white/10 dark:text-white dark:hover:bg-white/15",N),children:[s.jsx(Qs,{className:"size-5","aria-hidden":"true"}),e>0&&s.jsx("span",{className:"absolute -right-1 -top-1 flex h-[18px] min-w-[18px] items-center justify-center rounded-pill bg-destructive px-1 text-[11px] font-bold leading-none text-destructive-foreground","data-testid":"bell-unread-badge",children:e>9?"9+":e})]})}),s.jsx(qB,{children:s.jsxs(UB,{align:"end",sideOffset:8,"data-testid":"bell-panel",className:Y("z-50 w-[22rem] max-w-[calc(100vw-1.5rem)] rounded-2xl border border-border bg-popover p-2 shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2"),children:[s.jsxs("div",{className:"flex items-center justify-between gap-2 px-1.5 pb-1.5 pt-0.5",children:[s.jsx("p",{className:"text-sm font-semibold text-ink",children:"Notifications"}),e>0&&v?s.jsxs("button",{type:"button",onClick:v,disabled:y,"data-testid":"bell-mark-all-read",className:"inline-flex items-center gap-1 text-caption font-semibold text-primary hover:text-primary/80 disabled:opacity-60",children:[s.jsx(Oq,{className:"size-3.5","aria-hidden":"true"}),"Mark all read"]}):null]}),c?s.jsx("div",{className:"px-1 pb-1.5",children:c}
50):null,s.jsx("div",{className:"max-h-[22rem] overflow-y-auto overscroll-contain px-1",children:n?s.jsx("div",{className:"space-y-2 py-2",children:Array.from({length:4}).map((E,j)=>s.jsx("div",{className:"h-12 animate-pulse rounded-xl bg-muted"},j))}):t.length===0?s.jsxs("div",{className:"py-8 text-center",children:[s.jsx(ya,{className:"mx-auto mb-2 size-7 text-ink-3","aria-hidden":"true"}),s.jsx("p",{className:"text-sm text-ink-2",children:d}),s.jsx("p",{className:"mt-0.5 text-caption text-ink-3",children:m})]}):s.jsxs("div",{className:"flex flex-col",children:[t.map(E=>s.jsx(FB,{row:E,meta:l?.[E.type]??BB,onActivate:g},E.id)),r?s.jsx("button",{type:"button",onClick:b,disabled:o,"data-testid":"bell-load-more",className:"mt-1 rounded-xl py-2 text-caption font-semibold text-primary hover:bg-muted disabled:opacity-60",children:o?"Loadingâ¦":"Load older"}):null]})}),p?s.jsx("div",{className:"mt-1 border-t border-card-border px-1 pt-1.5",children:s.jsxs("a",{href:p.href,onClick:E=>{p.onClick&&(E.preventDefault(),p.onClick())},"data-testid":"bell-settings-link",className:"flex items-center gap-2 rounded-xl px-2 py-2 text-sm font-medium text-ink-2 motion-safe:transition-colors hover:bg-muted hover:text-ink",children:[s.jsx(_q,{className:"size-4 text-ink-3","aria-hidden":"true"}),p.label]})}):null,s.jsx(zB,{className:"fill-popover"})]})})]})}function HB(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const GB=e=>{switch(e){case"success":return WB;case"info":return XB;case"warning":return QB;case"error":return ZB;default:return null}},KB=Array(12).fill(0),YB=({visible:e,className:t})=>ee.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ee.createElement("div",{className:"sonner-spinner"},KB.map((n,r)=>ee.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),WB=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},ee.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),QB=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},ee.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),XB=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},ee.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),ZB=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},ee.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),JB=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},ee.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ee.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),e8=()=>{const[e,t]=ee.useState(document.hidden);return ee.useEffect(()=>{const n=()=>{t(document.hidden)};
50return document.addEventListener("visibilitychange",n),()=>document.removeEventListener("visibilitychange",n)},[]),e};let t8=1;const n8=100,UE=e=>{var t;return typeof e?.id=="number"||(e==null||(t=e.id)==null?void 0:t.length)>0?e.id:t8++};class r8{constructor(){this.subscribe=t=>(this.subscribers.push(t),this.getActiveToasts().forEach(n=>t(n)),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t],this.trimHistory()},this.trimHistory=()=>{let t=this.toasts.length-n8;t<=0||(this.toasts=this.toasts.filter(n=>t>0&&this.dismissedToasts.has(n.id)?(this.dismissedToasts.delete(n.id),t--,!1):!0))},this.create=t=>{const{message:n,...r}=t,o=UE(t),l=this.pendingDismissals.get(o);l!==void 0&&(cancelAnimationFrame(l),this.pendingDismissals.delete(o),this.dismissedToasts.delete(o));const c=this.dismissedToasts.has(o),d=t.dismissible===void 0?!0:t.dismissible;return c&&(this.dismissedToasts.delete(o),this.toasts=this.toasts.filter(p=>p.id!==o)),(c?void 0:this.toasts.find(p=>p.id===o))?this.toasts=this.toasts.map(p=>p.id===o?(this.publish({...p,...t,id:o,title:n}
50),{...p,...t,id:o,dismissible:d,title:n}):p):this.addToast({title:n,...r,dismissible:d,id:o}),o},this.dismiss=t=>{if(t==null)return this.getActiveToasts().forEach(r=>{this.dismissedToasts.add(r.id),this.subscribers.forEach(o=>o({id:r.id,dismiss:!0}))}),t;this.dismissedToasts.add(t);const n=this.pendingDismissals.get(t);return n!==void 0&&cancelAnimationFrame(n),this.pendingDismissals.set(t,requestAnimationFrame(()=>{this.pendingDismissals.delete(t),this.subscribers.forEach(r=>r({id:t,dismiss:!0}))})),t},this.message=(t,n)=>this.create({...n,message:t,type:void 0}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let l=r!==void 0,c;const d=o.then(async p=>{if(c=["resolve",p],ee.isValidElement(p))l=!1,this.create({id:r,type:"default",message:p});else if(s8(p)&&!p.ok){l=!1;const g=typeof n.error=="function"?await n.error(`HTTP error! status: ${p.status}`):n.error,v=typeof n.description=="function"?await n.description(`HTTP error! status: ${p.status}`):n.description,S=typeof g=="object"&&!ee.isValidElement(g)?g:{message:g};this.create({id:r,type:"error",description:v,...S})}else if(p instanceof Error){l=!1;const g=typeof n.error=="function"?await n.error(p):n.error,v=typeof n.description=="function"?await n.description(p):n.description,S=typeof g=="object"&&!ee.isValidElement(g)?g:{message:g};this.create({id:r,type:"error",description:v,...S})}else if(n.success!==void 0){l=!1;const g=typeof n.success=="function"?await n.success(p):n.success,v=typeof n.description=="function"?await n.description(p):n.description,S=typeof g=="object"&&!ee.isValidElement(g)?g:{message:g};this.create({id:r,type:"success",description:v,...S})}}).catch(async p=>{if(c=["reject",p],n.error!==void 0){l=!1;const y=typeof n.error=="function"?await n.error(p):n.error,g=typeof n.description=="function"?await n.description(p):n.description,b=typeof y=="object"&&!ee.isValidElement(y)?y:{message:y};this.create({id:r,type:"error",description:g,...b})}}).finally(()=>{l&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),m=()=>new Promise((p,y)=>d.then(()=>c[0]==="reject"?y(c[1]):p(c[1])).catch(y));return typeof r!="string"&&typeof r!="number"?{unwrap:m}:Object.assign(r,{unwrap:m})},this.custom=(t,n)=>{const r=UE(n);return this.create({...n,jsx:t(r),id:r,type:void 0}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}}const Pr=new r8,a8=(e,t)=>Pr.message(e,t),s8=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",i8=a8,o8=()=>Pr.toasts,l8=()=>Pr.getActiveToasts(),Ji=Object.assign(i8,{success:Pr.success,info:Pr.info,warning:Pr.warning,error:Pr.error,custom:Pr.custom,message:Pr.message,promise:Pr.promise,dismiss:Pr.dismiss,loading:Pr.loading},{getHistory:o8,getToasts:l8});HB
vendor: 14,921 bytes, line 50
50("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");
vendor: 754 bytes, line 50
50function Dm(e){return e.label!==void 0}const c8=3,u8="24px",d8="16px",zE=4e3,f8=356,m8=14,p8=45,h8=200;function fs(...e){return e.filter(Boolean).join(" ")}function g8(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const y8=e=>{var t,n,r,o,l,c,d,m,p;const{invert:y,toast:g,unstyled:v,interacting:b,setHeights:S,visibleToasts:C,heights:N,index:A,toasts:T,expanded:E,removeToast:j,defaultRichColors:_,closeButton:R,style:P,cancelButtonStyle:M,actionButtonStyle:q,className:U="",descriptionClassName:V="",duration:$,position:L,gap:H,expandByDefault:Q,classNames:I,icons:O,closeButtonAriaLabel:F="Close toast"}=e,[B,K]=ee.useState(null),[le,Z]=ee.useState(null),[ie,re]=ee.useState(!1),[de,he]=ee.useState(!1),[pe,oe]=ee.useState(!1),[ge,
vendor: 8,362 bytes, line 50
50we]=ee.useState(!1),[be,Me]=ee.useState(!1),[ze,Ee]=ee.useState(0),[Ct,Ft]=ee.useState(0),pt=ee.useRef(g.duration||$||zE),Gn=ee.useRef(null),Ht=ee.useRef(null),xe=A===0,He=A+1<=C,et=g.type,pn=et??"default",Gt=g.dismissible!==!1,Lr=g.className||"",Ar=g.descriptionClassName||"",jt=ee.useMemo(()=>N.findIndex(Te=>Te.toastId===g.id)||0,[N,g.id]),Tt=ee.useMemo(()=>{var Te;return(Te=g.closeButton)!=null?Te:R},[g.closeButton,R]),Kt=ee.useMemo(()=>g.duration||$||zE,[g.duration,$]),dr=ee.useRef(0),fr=ee.useRef(0),hn=ee.useRef(0),Zt=ee.useRef(null),[rr,gn]=L.split("-"),qr=ee.useMemo(()=>N.reduce((Te,Ye,st)=>st>=jt?Te:Te+Ye.height,0),[N,jt]),Kn=e8(),St=ee.useMemo(()=>{var Te;return(Te=e.swipeDirections)!=null?Te:g8(L)},[e.swipeDirections,L]),Se=g.invert||y,Xe=et==="loading";fr.current=ee.useMemo(()=>jt*H+qr,[jt,qr]),ee.useEffect(()=>{pt.current=Kt},[Kt]),ee.useEffect(()=>{re(!0)},[]),ee.useEffect(()=>{const Te=Ht.current;if(Te){const Ye=Te.getBoundingClientRect().height;return Ft(Ye),S(st=>[{toastId:g.id,height:Ye,position:g.position},...st]),()=>S(st=>st.filter(gt=>gt.toastId!==g.id))}},[S,g.id]),ee.useLayoutEffect(()=>{if(!ie)return;const Te=Ht.current,Ye=Te.style.height;Te.style.height="auto";const st=Te.getBoundingClientRect().height;Te.style.height=Ye,Ft(st),S(gt=>gt.find(Ke=>Ke.toastId===g.id)?gt.map(Ke=>Ke.toastId===g.id?{...Ke,height:st}:Ke):[{toastId:g.id,height:st,position:g.position},...gt])},[ie,g.title,g.description,S,g.id,g.jsx,g.action,g.cancel]);const Ie=ee.useCallback(()=>{he(!0),Ee(fr.current),S(Te=>Te.filter(Ye=>Ye.toastId!==g.id)),setTimeout(()=>{j(g)},h8)},[g,j,S,fr]);ee.useEffect(()=>{if(g.promise&&et==="loading"||g.duration===1/0||g.type==="loading")return;let Te;return E||b||Kn?(()=>{if(hn.current<dr.current){const gt=new Date().getTime()-dr.current;pt.current=pt.current-gt}hn.current=new Date().getTime()})():pt.current!==1/0&&(dr.current=new Date().getTime(),Te=setTimeout(()=>{g.onAutoClose==null||g.onAutoClose.call(g,g),Ie()},pt.current)),()=>clearTimeout(Te)},[E,b,g,et,Kn,Ie]),ee.useEffect(()=>{g.delete&&(Ie(),g.onDismiss==null||g.onDismiss.call(g,g))},[Ie,g.delete]);function Fe(){var Te;if(O?.loading){var Ye;return ee.createElement("div",{className:fs(I?.loader,g==null||(Ye=g.classNames)==null?void 0:Ye.loader,"sonner-loader"),"data-visible":et==="loading"},O.loading)}return ee.createElement(YB,{className:fs(I?.loader,g==null||(Te=g.classNames)==null?void 0:Te.loader),visible:et==="loading"})}const ht=g.icon||O?.[et]||GB(et);var Ot,vt;return ee.createElement("li",{tabIndex:0,ref:Ht,className:fs(U,Lr,I?.toast,g==null||(t=g.classNames)==null?void 0:t.toast,I?.[pn],g==null||(n=g.classNames)==null?void 0:n[pn]),"data-sonner-toast":"","data-rich-colors":(Ot=g.richColors)!=null?Ot:_,"data-styled":!(g.jsx||g.unstyled||v),"data-mounted":ie,"data-promise":!!g.promise,"data-swiped":be,"data-removed":de,"data-visible":He,"data-y-position":rr,"data-x-position":gn,"data-index":A,"data-front":xe,"data-swiping":pe,"data-dismissible":Gt,"data-type":et,"data-invert":Se,"data-swipe-out":ge,"data-swipe-direction":le,"data-expanded":!!(E||Q&&ie),"data-testid":g.testId,style:{"--index":A,"--toasts-before":A,"--z-index":T.length-A,"--offset":`${de?ze:fr.current}px`,"--initial-height":Q?"auto":`${Ct}px`,...P,...g.style},onDragEnd:()=>{oe(!1),K(null),Zt.current=null},onPointerDown:Te=>{Te.button!==2&&(Xe||!Gt||(Gn.current=new Date,Ee(fr.current),Te.target.setPointerCapture(Te.pointerId),Te.target.tagName!=="BUTTON"&&(oe(!0),Zt.current={x:Te.clientX,y:Te.clientY})))},onPointerUp:()=>{var Te,Ye,st;if(ge||!Gt)return;Zt.current=null;const gt=Number(((Te=Ht.current)==null?void 0:Te.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),lt=Number(((Ye=Ht.current)==null?void 0:Ye.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ke=new Date().getTime()-((st=Gn.current)==null?void 0:st.getTime()),ct=B==="x"?gt:lt,Yt=Math.abs(ct)/Ke;if((B==="x"?St.includes(gt>0?"right":"left"):St.includes(lt>0?"bottom":"top"))&&(Math.abs(ct)>=p8||Yt>.11)){Ee(fr.current),g.onDismiss==null||g.onDismiss.call(g,g),Z(B==="x"?gt>0?"right":"left":lt>0?"down":"up"),Ie(),we(!0);return}else{var Nn,Za;(Nn=Ht.current)==null||Nn.style.setProperty("--swipe-amount-x","0px"),(Za=Ht.current)==null||Za.style.setProperty("--swipe-amount-y","0px")}Me(!1),oe(!1),K(null)},onPointerMove:Te=>{var Ye,st,gt;if(!Zt.current||!Gt||((Ye=window.getSelection())==null?void 0:Ye.toString().length)>0)return;const Ke=Te.clientY-Zt.current.y,ct=Te.clientX-Zt.current.x;!B&&(Math.abs(ct)>1||Math.abs(Ke)>1)&&K(Math.abs(ct)>Math.abs(Ke)?"x":"y");let Yt={x:0,y:0};const Ur=Nn=>1/(1.5+Math.abs(Nn)/20);if(B==="y"){if(St.includes("top")||St.includes("bottom"))if(St.includes("top")&&Ke<0||St.includes("bottom")&&Ke>0)Yt.y=Ke;else{const Nn=Ke*Ur(Ke);Yt.y=Math.abs(Nn)<Math.abs(Ke)?Nn:Ke}}else if(B==="x"&&(St.includes("left")||St.includes("right")))if(St.includes("left")&&ct<0||St.includes("right")&&ct>0)Yt.x=ct;else{const Nn=ct*Ur(ct);Yt.x=Math.abs(Nn)<Math.abs(ct)?Nn:ct}(Math.abs(Yt.x)>0||Math.abs(Yt.y)>0)&&Me(!0),(st=Ht.current)==null||st.style.setProperty("--swipe-amount-x",`${Yt.x}px`),(gt=Ht.current)==null||gt.style.setProperty("--swipe-amount-y",`${Yt.y}px`)}},Tt&&!g.jsx&&et!=="loading"?ee.createElement("button",{"aria-label":F,"data-disabled":Xe,"data-close-button":!0,onClick:Xe||!Gt?()=>{}:()=>{Ie(),g.onDismiss==null||g.onDismiss.call(g,g)},className:fs(I?.closeButton,g==null||(r=g.classNames)==null?void 0:r.closeButton)},(vt=O?.close)!=null?vt:JB):null,(et||g.icon||g.promise)&&g.icon!==null&&(O?.[et]!==null||g.icon)?ee.createElement("div",{"data-icon":"",className:fs(I?.icon,g==null||(o=g.classNames)==null?void 0:o.icon)},et==="loading"?g.icon||Fe():g.promise?Fe():null,et!=="loading"?ht:null):null,ee.createElement("div",{"data-content":"",className:fs(I?.content,g==null||(l=g.classNames)==null?void 0:l.content)},ee.createElement("div",{"data-title":"",className:fs(I?.title,g==null||(c=g.classNames)==null?void 0:c.title)},g.jsx?g.jsx:typeof g.title=="function"?g.title():g.title),g.description?ee.createElement("div",{"data-description":"",className:fs(V,Ar,I?.description,g==null||(d=g.classNames)==null?void 0:d.description)},typeof g.description=="function"?g.description():g.description):null),ee.isValidElement(g.cancel)?g.cancel:g.cancel&&Dm(g.cancel)?ee.createElement("button",{"data-button":!0,"data-cancel":!0,style:g.cancelButtonStyle||M,onClick:Te=>{Dm(g.cancel)&&Gt&&(g.cancel.onClick==null||g.cancel.onClick.call(g.cancel,Te),Ie())},className:fs(I?.cancelButton,g==null||(m=g.classNames)==null?void 0:m.cancelButton)},g.cancel.label):null,ee.isValidElement(g.action)?g.action:g.action&&Dm(g.action)?ee.createElement("button",{"data-button":!0,"data-action":!0,style:g.actionButtonStyle||q,onClick:Te=>{Dm(g.action)&&(g.action.onClick==null||g.action.onClick.call(g.action,Te),!Te.defaultPrevented&&Ie())},className:fs(I?.actionButton,g==null||(p=g.classNames)==null?void 0:p.actionButton)},g.action.label):null)};function VE(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function x8(e,t){const n={};return[e,t].forEach((r,o)=>{const l=o===1,c=l?"--mobile-offset":"--offset",d=l?d8:u8;function m(p){["top","right","bottom","left"].forEach(y=>{n[`${c}-${y}`]=typeof p=="number"?`${p}px`:p})}typeof r=="number"||typeof r=="string"?m(r):typeof r=="object"?["top","right","bottom","left"].forEach(p=>{r[p]===void 0?n[`${c}-${p}`]=d:n[`${c}-${p}`]=typeof r[p]=="number"?`${r[p]}px`:r[p]}):m(d)}),n}const v8=ee.forwardRef(function(t,n){const{id:r,invert:o,position:l="bottom-right",hotkey:c=["altKey","KeyT"],expand:d,closeButton:m,className:p,offset:y,mobileOffset:g,theme:v="light",richColors:b,duration:S,style:C,visibleToasts:N=c8,toastOptions:A,dir:T=VE(),gap:E=m8,icons:j,customAriaLabel:_,containerAriaLabel:R="Notifications"}=t,[P,M]=ee.useState([]),q=ee.useMemo(()=>r?P.filter(re=>re.toasterId===r):P.filter(re=>!re.toasterId),[P,r]),U=ee.useMemo(()=>Array.from(new Set([l].concat(q.filter(re=>re.position).map(re=>re.position)))),[q,l]),[V,$]=ee.useState([]),[L,H]=ee.useState(!1),[Q,I]=ee.useState(!1),[O,F]=ee.useState(v!=="system"?v:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
50k":"light"),B=ee.useRef(null),K=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),le=ee.useRef(null),Z=ee.useRef(!1),ie=ee.useCallback(re=>{M(de=>{var he;return(he=de.find(pe=>pe.id===re.id))!=null&&he.delete||Pr.dismiss(re.id),de.filter(({id:pe})=>pe!==re.id)})},[]);return ee.useEffect(()=>Pr.subscribe(re=>{if(re.dismiss){requestAnimationFrame(()=>{M(de=>de.map(he=>he.id===re.id?{...he,delete:!0}:he))});return}setTimeout(()=>{D6.flushSync(()=>{M(de=>{const he=de.findIndex(pe=>pe.id===re.id);return he!==-1?[...de.slice(0,he),{...de[he],...re},...de.slice(he+1)]:[re,...de]})})})}),[]),ee.useEffect(()=>{if(v!=="system"){F(v);return}if(v==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?F("dark"):F("light")),typeof window>"u")return;const re=window.matchMedia("(prefers-color-scheme: dark)");try{re.addEventListener("change",({matches:de})=>{F(de?"dark":"light")})}catch{re.addListener(({matches:he})=>{try{F(he?"dark":"light")}catch(pe){console.error(pe)}})}},[v]),ee.useEffect(()=>{P.length<=1&&H(!1)},[P]),ee.useEffect(()=>{const re=de=>{var he;if(c.length>0&&c.every(ge=>de[ge]||de.code===ge)){var oe;H(!0),(oe=B.current)==null||oe.focus()}de.code==="Escape"&&(document.activeElement===B.current||(he=B.current)!=null&&he.contains(document.activeElement))&&H(!1)};return document.addEventListener("keydown",re),()=>document.removeEventListener("keydown",re)},[c]),ee.useEffect(()=>{if(B.current)return()=>{le.current&&(le.current.focus({preventScroll:!0}),le.current=null,Z.current=!1)}},[B.current]),ee.createElement("section",{ref:n,"aria-label":_??`${R} ${K}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},U.map((re,de)=>{var he;const[pe,oe]=re.split("-");return q.length?ee.createElement("ol",{key:re,dir:T==="auto"?VE():T,tabIndex:-1,ref:B,className:p,"data-sonner-toaster":!0,"data-sonner-theme":O,"data-y-position":pe,"data-x-position":oe,style:{"--front-toast-height":`${((he=V[0])==null?void 0:he.height)||0}px`,"--width":`${f8}px`,"--gap":`${E}px`,...C,...x8(y,g)},onBlur:ge=>{Z.current&&!ge.currentTarget.contains(ge.relatedTarget)&&(Z.current=!1,le.current&&(le.current.focus({preventScroll:!0}),le.current=null))},onFocus:ge=>{ge.target instanceof HTMLElement&&ge.target.dataset.dismissible==="false"||Z.current||(Z.current=!0,le.current=ge.relatedTarget)},onMouseEnter:()=>H(!0),onMouseMove:()=>H(!0),onMouseLeave:()=>{Q||H(!1)},onDragEnd:()=>H(!1),onPointerDown:ge=>{ge.target instanceof HTMLElement&&ge.target.dataset.dismissible==="false"||I(!0)},onPointerUp:()=>I(!1)},q.filter(ge=>!ge.position&&de===0||ge.position===re).map((ge,we)=>{var be,Me;return ee.createElement(y8,{key:ge.id,icons:j,index:we,toast:ge,defaultRichColors:b,duration:(be=A?.duration)!=null?be:S,className:A?.className,descriptionClassName:A?.descriptionClassName,invert:o,visibleToasts:N,closeButton:(Me=A?.closeButton)!=null?Me:m,interacting:Q,position:re,style:A?.style,unstyled:A?.unstyled,classNames:A?.classNames,cancelButtonStyle:A?.cancelButtonStyle,actionButtonStyle:A?.actionButtonStyle,closeButtonAriaLabel:A?.closeButtonAriaLabel,removeToast:ie,toasts:q.filter(ze=>ze.position==ge.position),heights:V.filter(ze=>ze.position==ge.position),setHeights:$,expandByDefault:d,gap:E,expanded:L,swipeDirections:t.swipeDirections})})):null}))});function b8({theme:e="system",offset:t,mobileOffset:n,...r}){return s.jsx(v8,{theme:e,position:"bottom-right",offset:t??{bottom:24,right:24},mobileOffset:n??{bottom:"calc(var(--vp-tabbar-h, 78px) + env(safe-area-inset-bottom) + 12px)",left:12,right:12},duration:4e3,visibleToasts:3,gap:8,closeButton:!0,richColors:!0,toastOptions:{classNames:{toast:"rounded-card text-sm",title:"font-semibold"}},...r})}function BE(e,t){const{title:n,description:r,variant:o,duration:l,action:c}=e,d=n??r??"",m={id:t,description:n?r:void 0,duration:l,action:c};return o==="destructive"?Ji.error(d,m):Ji(d,m)}function tf(e){const t=BE(e);return{id:t,dismiss:()=>Ji.dismiss(t),update:n=>{BE(n,t)}}}function Th(e){return{description:e?.description,duration:e?.duration,action:e?.action}}tf.success=(e,t)=>Ji.success(e,Th(t));tf.error=(e,t)=>
50Ji.error(e,Th(t));tf.info=(e,t)=>Ji.info(e,Th(t));tf.warning=(e,t)=>Ji.warning(e,Th(t));function Nr(){return{toast:tf,dismiss:e=>Ji.dismiss(e)}}function w8({symbol:e,size:t=44}){return s.jsx("img",{src:Y0[e],alt:"","aria-hidden":"true",width:t,height:t,draggable:!1,style:{display:"block",borderRadius:8,width:t,height:t}})}const S8={position:"absolute",width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap",border:0};function C8({prizes:e,wonPrizeId:t,playSeed:n,panels:r,matchCount:o,cover:l,threshold:c=.5,brushRadius:d=14,disabled:m=!1,onRevealed:p,className:y}){const g=h.useMemo(()=>ZU(e,t,n,r,o),[e,t,n,r,o]),[v,b]=h.useState(()=>new Array(r).fill(!1)),[S,C]=h.useState(!1),N=h.useCallback(E=>{b(j=>{if(j[E])return j;const _=[...j];return _[E]=!0,g.cells.reduce((P,M,q)=>M.winning&&_[q]?P+1:P,0)>=o&&!S&&(C(!0),window.setTimeout(()=>p?.(),420)),_})},[S,g.cells,o,p]),A=3,T=Math.floor((300-(A-1)*10)/A);return s.jsxs("div",{className:y,style:{width:320},children:[s.jsxs("div",{style:{borderRadius:18,padding:12,background:"radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--pg-accent) 20%, var(--pg-panel)) 0%, var(--pg-panel) 68%)",boxShadow:"inset 0 0 0 1.5px color-mix(in srgb, var(--pg-lining) 55%, transparent), 0 8px 24px rgba(0,0,0,0.32)"},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:8,paddingBottom:10,marginBottom:10,borderBottom:"1px dashed color-mix(in srgb, var(--pg-lining) 45%, transparent)",color:"var(--pg-lining)",fontSize:11,fontWeight:800,letterSpacing:"0.14em",textTransform:"uppercase"},children:["Match ",o," to win"]}),s.jsx("div",{style:{display:"grid",gridTemplateColumns:`repeat(${A}, ${T}px)`,gap:10,justifyContent:"center"},children:g.cells.map((E,j)=>s.jsx(F2,{cover:l,cue:"",revealLabel:`Uncover panel ${j+1}`,skipVariant:"hidden",threshold:c,brushRadius:d,disabled:m,onRevealed:()=>N(j),className:"rounded-lg",children:s.jsx("div",{style:{width:T,height:T,display:"grid",placeItems:"center",borderRadius:10,background:"var(--pg-bg-to)",overflow:"hidden",boxShadow:E.winning&&S?"inset 0 0 0 2px var(--pg-lining), inset 0 10px 20px rgba(0,0,0,0.22), 0 0 16px color-mix(in srgb, var(--pg-lining) 35%, transparent)":"inset 0 0 0 1px rgba(255,255,255,0.08), inset 0 10px 20px rgba(0,0,0,0.3)",transition:"background 260ms ease-out, box-shadow 260ms ease-out"},children:s.jsx(w8,{symbol:E.symbol,size:T})})},`cell-${j}`))})]}),s.jsx("p",{style:{margin:"12px 0 0",textAlign:"center",fontSize:14,fontWeight:600,color:"var(--pg-ink-muted)"},children:S?`${o} of a kind.`:"Scratch the panels."}),s.jsx("button",{type:"button",onClick:()=>{for(let E=0;E<r;E+=1)N(E)},disabled:m,style:S8,children:"Uncover every panel"})]})}function N8(e){const n=Math.ceil(e/3),r=Math.floor(280/3);return n*r+(n-1)*10+24+34}function A8({mechanic:e,cover:t,cue:n,palette:r,boardSlots:o,prizes:l,outcome:c,onRevealed:d,faceSrc:m,coverSrc:p}){const y=h.useMemo(()=>{const g=c?.slots??o,v=new Map(l.map(b=>[b.id,b]));return g.map(b=>({prizeId:b,label:v.get(b)?.short??"Prize"}))},[o,c?.slots,l]);return e.mechanic==="match"?c?s.jsx(C8,{prizes:l,wonPrizeId:c.prizeId,playSeed:c.playSeed,panels:e.panels,matchCount:e.matchCount,cover:t,threshold:e.revealThreshold,brushRadius:e.brushRadius,disabled:!1,onRevealed:d}):s.jsx("div",{style:{width:300,height:N8(e.panels)},"aria-hidden":"true"}):e.mechanic==="wheel"?s.jsx(d6,{slots:y,palette:r,restAngle:c?XU(c.landingSlot,Math.max(y.length,1),e.minTurns,kp(c.playSeed)):0,spinMs:e.spinMs,faceSrc:m,disabled:!c,onSettled:d}):e.mechanic==="drop"?s.jsx(b6,{planters:y,landingSlot:c?.landingSlot??0,seed:c?.playSeed??"drop",dropMs:e.dropMs,fall:e.fall,pegRows:e.pegRows,disabled:!c,onSettled:d}):s.jsx(F2,{cover:t,coverSrc:p,cue:n,threshold:e.revealThreshold,brushRadius:e.brushRadius,skipVariant:"hidden",disabled:!c,onRevealed:d,className:"w-[320px] rounded-2xl",children:s.jsx("div",{className:"grid h-[220px] w-[320px] place-items-center rounded-2xl px-5 text-center",style:{background:"radial-gradient(120% 100% at 50% 0%, color-mix(in srgb, var(--pg-accent, #9bdcc0) 22%, var(--pg-panel, #123024)) 0%, var(--pg-panel, #123024) 70%)",boxShadow:"inset 0 0 0 1px color-mix(in srgb, var(--pg-lining, #f0c868) 45%, transparent)"},children:s.jsxs("div",{className:"flex flex-col items-center gap-2",children:[s.jsx("span",{"aria-hidden":"true",className:"h-px w-16",style:{background:"linear-gradient(90deg, transparent, var(--pg-lining, #f0c868), transparent)"}}),s.jsx("span",{className:"text-[28px] font-extrabold leading-tight",style:{color:"var(--pg-ink)",textWrap:"balance",letterSpacing:"-0.02em"},children:c?.short??""}),s.jsx("span",{"aria-hidden":"true",className:"h-px w-16",style:{background:"linear-gradient(90deg, transparent, var(--pg-lining, #f0c868), transparent)"}})]})})})}const E8=[".vp-gm-back{animation:vp-gm-fade 200ms ease-out both}",".vp-gm-card{animation:vp-gm-rise 320ms cubic-bezier(0.22,1,0.36,1) both}","@keyframes vp-gm-fade{from{opacity:0}
50to{opacity:1}}","@keyframes vp-gm-rise{from{transform:translateY(14px) scale(0.985);opacity:0}to{transform:none;opacity:1}}","@media (prefers-reduced-motion:reduce){.vp-gm-back,.vp-gm-card{animation:none}}"].join("");function XP({open:e,onClose:t,label:n,children:r,footer:o,className:l}){const c=h.useRef(null),d=h.useRef(null),m=h.useRef(null),p=h.useCallback(y=>{if(y.key==="Escape"){y.stopPropagation(),t();return}if(y.key!=="Tab"||!c.current)return;const g=c.current.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex="-1"])');if(g.length===0)return;const v=g[0],b=g[g.length-1];y.shiftKey&&document.activeElement===v?(y.preventDefault(),b.focus()):!y.shiftKey&&document.activeElement===b&&(y.preventDefault(),v.focus())},[t]);return h.useEffect(()=>{if(!e)return;m.current=document.activeElement;const{overflow:y}=document.body.style;return document.body.style.overflow="hidden",document.addEventListener("keydown",p,!0),d.current?.focus(),()=>{document.body.style.overflow=y,document.removeEventListener("keydown",p,!0),m.current?.focus?.()}},[e,p]),e?s.jsxs("div",{className:"vp-gm-back",style:{position:"fixed",inset:0,zIndex:80,display:"grid",placeItems:"center",padding:"max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom))",background:"rgba(6, 14, 10, 0.72)",backdropFilter:"blur(6px)",overflowY:"auto"},onPointerDown:y=>{y.target===y.currentTarget&&t()},children:[s.jsx("style",{children:E8}),s.jsxs("div",{ref:c,className:`vp-gm-card ${l??""}`,role:"dialog","aria-modal":"true","aria-label":n,style:{position:"relative",width:"100%",maxWidth:420},children:[s.jsx("button",{ref:d,type:"button",onClick:t,"aria-label":"Close",style:{position:"absolute",top:8,right:8,zIndex:1,width:44,height:44,borderRadius:999,border:0,display:"grid",placeItems:"center",background:"rgba(0,0,0,0.35)",color:"#fff",cursor:"pointer"},children:s.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24","aria-hidden":"true",children:s.jsx("path",{d:"M6 6l12 12M18 6L6 18",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round"})})}),s.jsx("div",{style:{borderRadius:20,overflow:"hidden"},children:r}),o?s.jsx("div",{style:{marginTop:10,textAlign:"center"},children:o}):null]})]}):null}function j8(e){const t=e.trim().toLowerCase().replace(/:\d+$/,"");let n=2166136261;for(let r=0;r<t.length;r+=1)n^=t.charCodeAt(r),n=Math.imul(n,16777619)>>>0;return n.toString(16).padStart(8,"0")}const T8=["091869ce","b8aceb0d","13f1d6ee","b6899bb6","73d3e24c","c87e0f7c","4fae5d44","aa651315","46d90bf7","b9aaaadc","24076164","394c72b3","9c648bd9","e722469c","7e73c00c","656b1007","add16537"],k8={c2679a65:"091869ce",dabcc2b5:"73d3e24c"};function ZP(e){const t=e.trim().toLowerCase().replace(/:\d+$/,"");if(!t)return!1;const n=j8(t),r=k8[n]??n;return T8.includes(r)}function R8(e){return ZP(e)?null:`Google sign-in is hidden on "${e}": https://${e}/api/auth/callback/google is not a registered redirect URI on the Vida OAuth client, so the button would fail at Google with redirect_uri_mismatch. Register it in the Google console (docs/OWNER-ACTIONS.md section 1), or add the host to AUTH_HOSTS if it is new. Run \`pnpm run verify:google\` to confirm.`}function Bi(e,t="/account"){return e&&e.startsWith("/")&&!e.startsWith("//")&&!e.startsWith("/\\")?e:t}const P8=/^\/(?:login|sign-in|register|forgot-password|reset-password)(?:[/?#]|$)/i;function O8(e,t,n){return e!=="loading"||t?e:n?"authenticated":"anonymous"}function JP(e,t="/account"){const n=Bi(e,t);return P8.test(n)?t:n}function db(e){const t=new URLSearchParams(e);if(!t.has("sig"))return null;const n=t.getAll("ba_param");if(n.length===0)return null;const r=new Set(n),o=new URLSearchParams;for(const[l,c]of t.entries())(l==="sig"||l==="ba_param"||r.has(l))&&o.append(l,c);return o.toString()}function FE(e,t=Date.now()){const n=new URLSearchParams(e),r=n.getAll("ba_param"),o=n.getAll("exp");if(!n.has("sig")||r.filter(c=>c==="exp").length!==1||o.length!==1||!/^[1-9]\d*$/.test(o[0]??""))return!1;const l=Number(o[0]);return Number.isSafeInteger(l)&&t<l*1e3}const _8=/^[A-Za-z0-9._~-]{1,256}$/,I8=2048;function M8(e){return!e||e.length>I8||!e.startsWith("/")||e.startsWith("//")||e.startsWith("/\\")||/[\u0000-\u001f\u007f]/.test(e)?null:e}function $E(e,t){const n=new URLSearchParams(e),r=n.getAll("ba_param"),o=n.getAll("client_id");if(n.getAll("sig").length!==1||r.filter(d=>d==="client_id").length!==1||o.length!==1||!_8.test(o[0]??""))return null;const l=new URLSearchParams({client_id:o[0]}),c=M8(t);return c&&l.set("next",c),`/api/identity/restart-oidc?${l.toString()}`}function cc(e,t="/"){return`${Bi(t,"/").replace(/\/+$/,"")}${e}`||"/"}function HE(e,t,n,r){const o=new URL(Bi(e,"/login"),n);return!r&&t!=="/account"&&o.searchParams.set("redirect",t),o.toString()}function eO(e,t="/account",n=window.location,r="/"){n.replace(cc(JP(e,t),r))}function D8({isLoading:e,isAuthenticated:t,destination:n,fallback:r="/account",basePath:o="/",location:l=window.location}){const[c,d]=h.useState("loading");return h.useEffect(()=>{e||d(m=>O8(m,!1,t))},[t,e]),h.useEffect(()=>{c==="authenticated"&&eO(n,r,l,o)},[o,n,c,r,l]),c}const fb="vidapeps.auth.provider-recovery",L8="vidapeps.auth.signup-handoff.",q8="vidapeps.auth.2fa-pending.",U8="vidapeps.sentinel.visitorId",z8="vidapeps.sentinel.visitorId.v2",V8={access_de
50nied:{title:"Sign-in was canceled",description:"Try again or use your email, password, code, or another connected method."},account_not_linked:{title:"That sign-in method is not connected",description:"Use your email, password, code, or another connected method to continue."},oauth_account_not_linked:{title:"That sign-in method is not connected",description:"Use your email, password, code, or another connected method to continue."},unable_to_link_account:{title:"We couldn't connect that sign-in method",description:"Use your email, password, code, or another connected method to continue."},account_already_linked:{title:"That sign-in method is already connected",description:"Use your email, password, code, or another connected method to continue."},account_already_linked_to_different_user:{title:"That sign-in method is already connected",description:"Use your email, password, code, or another connected method to continue."},email_does_not_match:{title:"That sign-in method could not be matched",description:"Use your email, password, code, or another connected method to continue."},email_doesnt_match:{title:"That sign-in method could not be matched",description:"Use your email, password, code, or another connected method to continue."}};function tO(e){const t=new URLSearchParams(e.replace(/^\?/,""));return t.has("sig")?new Set(t.getAll("ba_param")):new Set}function nO(e){const t=e.replace(/^\?/,""),n=new URLSearchParams(t);if(tO(t).has("error"))return null;const r=n.getAll("error");if(r.length!==1)return null;const o=V8[r[0]??""];return o?{code:r[0],...o}:null}function B8(e){const t=e.split("=",1)[0]??"";try{return decodeURIComponent(t.replace(/\+/g," "))}catch{return null}}function rO(e,t){const n=e.replace(/^\?/,""),r=tO(n);return n.split("&").filter(o=>{const l=B8(o);return!(l!==null&&t.has(l)&&!r.has(l))}).join("&")}function F8(e){return rO(e,new Set(["error","error_description"]))}function $8(e){return rO(e,new Set(["verified"]))}const H8=600*1e3;function G8(e,t,n,r=Date.now()){try{e.setItem(fb,JSON.stringify({scope:t,code:n.code,createdAt:r}))}catch{}}function K8(e,t,n=Date.now()){try{const r=e.getItem(fb);if(!r)return null;const o=JSON.parse(r);return o?.scope!==t||typeof o.code!="string"||typeof o.createdAt!="number"||o.createdAt>n||n-o.createdAt>=H8?(e.removeItem(fb),null):nO(`error=${encodeURIComponent(o.code)}`)}catch{return null}}const aO="vida_signup_state",Y8="x-vida-verification-return",W8=1800*1e3,Ip=new Map;function sO(){try{return typeof sessionStorage>"u"?null:sessionStorage}catch{return null}}function iO(e){return typeof e=="string"&&/^[A-Za-z0-9_-]{16,128}$/.test(e)}function Q8(){try{if(typeof crypto>"u")return null;if(typeof crypto.randomUUID=="function")return crypto.randomUUID();const e=new Uint8Array(16);return crypto.getRandomValues(e),[...e].map(t=>t.toString(16).padStart(2,"0")).join("")}catch{return null}}function fw(e){return`${L8}${e}`}function X8(e,t,n){const r=JSON.stringify(t);Ip.set(e,r);try{n?.setItem(fw(e),r)}catch{}}function Z8(e,t){try{return t?.getItem(fw(e))??Ip.get(e)??null}catch{return Ip.get(e)??null}}function GE(e,t){Ip.delete(e);try{t?.removeItem(fw(e))}catch{}}function oO(e,t,n){const r=n.handoffStateId??Q8(),o=t.trim();return!iO(r)||!o?null:(X8(r,{version:1,purpose:e,email:o,createdAt:Date.now()},n.handoffStorage??sO()),r)}function KE(e,t,n=sO()){const o=new URLSearchParams(e.replace(/^#/,"")).get(aO);if(!iO(o))return null;const l=Z8(o,n);if(!l)return null;try{const c=JSON.parse(l),d=c?.createdAt;return c?.version!==1||c.purpose!=="account-recovery"&&c.purpose!=="verification-pending"||typeof c.email!="string"||!c.email.trim()||typeof d!="number"||d>Date.now()+6e4||Date.now()-d>W8?(GE(o,n),null):c.purpose!==t?null:{stateId:o,purpose:t,email:c.email.trim()}}catch{return GE(o,n),null}}function Mp(e,t){return t?`${e}#${new URLSearchParams({[aO]:t}).toString()}`:e}const J8=new Set(["PASSWORD_COMPROMISED","PASSWORD_CHECK_UNAVAILABLE","PASSWORD_TOO_SHORT","PASSWORD_TOO_LONG","DISPOSABLE_EMAIL","INVALID_EMAIL","TOO_MANY_REQUESTS"]);function YE(e){if(e?.code==="EMAIL_DOMAIN_TYPO")return{kind:"email-typo",title:"Check your email address",description:e.message?.trim()||"That email domain looks like a typo, and you would not receive the verification email."};if(e?.code==="USER_ALREADY_EXISTS"||e?.code==="USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL")return{kind:"account-recovery",t
50itle:"Welcome back",description:"This email already has a Vida account."};const t=e?.message?.trim();return t&&(J8.has(e?.code??"")||typeof e?.status=="number"&&e.status>=500)?{kind:"generic",title:"Registration failed",description:t}:{kind:"generic",title:"Registration failed",description:"We couldn't create your account. Please try again."}}function Vve(e){const t=e.oauthContinuation?.replace(/^\?/,"")??"",n=oO("account-recovery",e.email,e);if(t)return Mp(`/login?${t}`,n);const r=new URLSearchParams;e.redirectTo!=="/products"&&r.set("redirect",e.redirectTo);const o=r.size>0?`/login?${r.toString()}`:"/login";return Mp(o,n)}function Bve(e){const t=e.oauthContinuation?.replace(/^\?/,"")??"",n=oO("verification-pending",e.email,e);if(t)return Mp(`/login?${t}`,n);const r=new URLSearchParams;e.redirectTo!=="/products"&&r.set("redirect",e.redirectTo);const o=r.size>0?`/login?${r.toString()}`:"/login";return Mp(o,n)}function bx(e){const t=e.oauthContinuation?.replace(/^\?/,"")??"";if(t)return`/verify-email?verified=1&${t}`;const n=new URLSearchParams({verified:"1"});return e.redirectTo!=="/products"&&n.set("redirect",e.redirectTo),`/verify-email?${n.toString()}`}const eF=no("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground border border-primary-border",destructive:"bg-destructive text-destructive-foreground shadow-sm border-destructive-border",outline:"border shadow-xs active:shadow-none",secondary:"border bg-secondary text-secondary-foreground border-secondary-border",ghost:"border border-transparent",link:"text-primary underline-offset-4 hover:underline"},size:{default:"min-h-9 px-4 py-2",sm:"min-h-8 rounded-md px-3 text-xs",lg:"min-h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),ua=h.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},l)=>{const c=r?Q0:"button";return s.jsx(c,{className:Y(eF({variant:t,size:n,className:e})),ref:l,...o})});ua.displayName="Button";const Rr=h.forwardRef(({className:e,type:t,...n},r)=>s.jsx("input",{type:t,className:Y("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));Rr.displayName="Input";var tF=Object.defineProperty,nF=(e,t)=>tF(e,"name",{value:t,configurable:!0}),rF=h.forwardRef(nF(function(t,n){return s.jsx(Ge.label,{...t,ref:n,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(t.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}})},"Label")),kh=rF;const aF=no("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Fs=h.forwardRef(({className:e,...t},n)=>s.jsx(kh,{ref:n,className:Y(aF(),e),...t}));Fs.displayName=kh.displayName;function sF(e){return[{label:"At least 8 characters",ok:e.length>=8},{label:"Upper & lowercase letters",ok:/[a-z]/.test(e)&&/[A-Z]/.test(e)},{label:"At least one number",ok:/[0-9]/.test(e)}]}function wx(e){return e.length>=8}function WE({value:e,className:t}){return e?s.jsx("ul",{className:Y("mt-1.5 space-y-1",t),"data-testid":"password-criteria",children:sF(e).map(n=>s.jsxs("li",{className:Y("flex items-center gap-1.5 text-xs",n.ok?"text-vida-green-700":"text-muted-foreground"),children:[n.ok?s.jsx(mn,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":"true"}):s.jsx(dh,{className:"h-3 w-3 shrink-0","aria-hidden":"true"}),n.label]},n.label))}):null}function iF({password:e,confirm:t,className:n}){if(!t||!e)return null;const r=e===t;return s.jsxs("p",{className:Y("mt-1.5 flex items-center gap-1.5 text-xs",r?"text-vida-green-700":"text-destructive",n),"data-testid":"password-match",children:[r?s.jsx(mn,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":"true"}):s.jsx(dh,{className:"h-3 w-3 shrink-0","aria-hidden":"true"}),r?"Passwords match":"Passwords don't match yet"]})}const mw=dn().email("Valid email required");async function oF(e){const{phone:t,wantsSms:n,wantsSmsMarketing:r,smsPolicyHref:o,toast:l}=e;try{const c=await fetch("/api/users/me/profile",{method:"PATCH",credentials:"include",headers:{"content-type":"application/json"},body:JSON.stringify({phone:t})});if(!c.ok){const d=await c.json().catch(()=>({}));l({title:"Phone not saved",description:d.error??"We couldn't save your number. Add it later from your account.",variant:"destructive"});return}if(n){const d=fF(o);await fetch("/api/users/me/consent",{method:"POST",credentials:"include",headers:{"content-type":"application/json"},body:JSON.stringify({consentType:"sms_transactional",action:"granted",disclosureSnapshot:d,channel:"signup"})}).catch(()=>{})}if(r){const d=mF(o);await fetch("/api/users/me/consent",{method:"POST",credentials:"include",headers:{"content-type":"application/json"},body:JSON.stringify({consentType:"sms_marketing",action:"granted",disclosureSnapshot:d,channel:"signup"})}).catch(()=>{})}await fetch("/api/users/me/phone/send-otp",{method:"POST",credentials:"include"}).catch(()=>{})}catch{l({title:"Phone not saved",description:"You can add a number from your account later."})}}const lF=600*1e3,Dp=new Map;function cF(e){const t=Dp.get(e);return t===void 0?!1:Date.now()-t>lF?(Dp.delete(e),!1):!0}function Sx(e,t){t?Dp.set(e,Date.now()):Dp.delete(e)}const uF=ei({email:mw,password:dn().min(1,"Password required")}),dF=ei({email:mw,password:dn().min(8,"At least 8 characters"),confirmPassword:dn().min(1,"Confirm your password"),firstName:dn().max(100).optional(),lastName:dn().max(100).optional(),phone:dn().optional().refine(e=>!e||e.replace(/\D/g,"").length>=10,"Enter a valid phone number (at least 10 digits)"),smsOptIn:Kv().optional(),smsMarketingOptIn:Kv().optional()}).refine(e=>e.password===e.confirmPassword,{message:"Passwords do not match",path:["confirmPassword"]}).refine(e=>!e.smsOptIn||(e.phone??"").trim().length>0,{message:"Add a phone number to opt in to texts",path:["smsOptIn"]}).refine(e=>!e.smsMarketingOptIn||(e.phone??"").trim().length>0,{message:"Add a phone number to opt in to texts",path:["smsMarketingOptIn"]}),Fi={lead:"Send me account & security texts (login codes, password resets, payment approvals, support replies).",optional:"C
50onsent is optional and never required to use Vida.",stop:"Reply STOP to cancel. Msg & data rates may apply.",policy:"See our SMS Policy"},$i={lead:"Send me product, event & community texts (new drops, restock alerts, events, offers).",optional:"Consent is optional and never required to use Vida.",stop:"Reply STOP to cancel. Msg & data rates may apply.",policy:"See our SMS Policy"};function fF(e){return`${Fi.lead} ${Fi.optional} ${Fi.stop} ${Fi.policy}: ${e}.`}function mF(e){return`${$i.lead} ${$i.optional} ${$i.stop} ${$i.policy}: ${e}.`}function pF({productName:e,tagline:t="One Vida account for everything.",accent:n="green",googleEnabled:r=!1,logoSrc:o,logoAlt:l,hideMark:c=!1,redirectTo:d,verificationReturnTo:m,resolveAuthRedirect:p,resolveVerificationReturn:y,magicLinkErrorPath:g,authClient:v,onAuthenticated:b,onTwoFactorRequired:S,onTwoFactorVerify:C,onEmailSignIn:N,onPasskeySignIn:A,enableSignUp:T=!0,enablePasswordless:E=!0,passkeyEnabled:j=!0,trustDeviceByDefault:_=!0,sessionExpired:R=!1,passwordlessNeedsRegistrationHref:P,needsVerificationEmail:M,onResendVerification:q,enablePhoneCapture:U=!1,smsPolicyHref:V="/policies/sms-messaging",initialMode:$="signin"}){const{toast:L}=Nr(),H=typeof window>"u"?!0:ZP(window.location.hostname),Q=r&&H;h.useEffect(()=>{!r||H||typeof window>"u"||console.warn(`[auth] ${R8(window.location.hostname)}`)},[r,H]);const I=Bi(d,"/account"),O=Bi(m,I),F=()=>Bi(p?.(),I),B=()=>Bi(y?.(),O),K=Bi(g,"/login"),[le]=h.useState(()=>{if(typeof window>"u")return null;const W=window.location.search,Ne=db(W)??`redirect:${I}`,it=nO(W);return it?(G8(sessionStorage,Ne,it),it):K8(sessionStorage,Ne)}),[Z]=h.useState(()=>{if(typeof window>"u")return!1;const W=new URLSearchParams(window.location.search);return W.get("verified")==="1"&&!W.has("error")});h.useEffect(()=>{if(typeof window>"u")return;const W=window.location.search.replace(/^\?/,""),Ne=$8(F8(W));Ne!==W&&window.history.replaceState(window.history.state,"",`${window.location.pathname}${Ne?`?${Ne}`:""}${window.location.hash}`)},[]);const ie=typeof window>"u"?null:KE(window.location.hash,"account-recovery"),re=typeof window>"u"||ie?null:KE(window.location.hash,"verification-pending"),de=ie?.email??re?.email??"",he=ie?{...YE({code:"USER_ALREADY_EXISTS"}),email:de}:null,pe=`${q8}${e}`,[oe,ge]=h.useState(()=>cF(pe)?"2fa":$),[we,be]=h.useState(!1),[Me,ze]=h.useState(!1),[Ee,Ct]=h.useState(!1),[Ft,pt]=h.useState(re?.email??null),[Gn,Ht]=h.useState(!!re),[xe,He]=h.useState(he),[et,pn]=h.useState(""),[Gt,Lr]=h.useState(_),[Ar,jt]=h.useState(null),[Tt,Kt]=h.useState(""),[dr,fr]=h.useState(""),[hn,Zt]=h.useState(!1),[rr,gn]=h.useState(""),[qr,Kn]=h.useState(!1),St=Yv({defaultValues:{email:de,password:""},validators:{onChange:uF},onSubmit:async({value:W})=>{await Ke(W)}}),Se=Yv({validators:{onChange:dF},onSubmit:async({value:W})=>{await ct(W)},defaultValues:{email:"",password:"",confirmPassword:"",firstName:"",lastName:"",phone:"",smsOptIn:!1,smsMarketingOptIn:!1}}),Xe=Wv(St.store,W=>W.values.email),Ie=Wv(Se.store,W=>W.values.phone),Fe=()=>(St.state.values.email??"").trim(),[ht,Ot]=h.useState(null),vt=(W,Ne=null)=>{const it=W.trim();St.reset(),St.setFieldValue("email",it),Se.reset(),Se.setFieldValue("email",it),Zt(!1),gn(""),Kn(!1),ze(!1),He(Ne),ge("signin")},Te=async()=>{b?.()},Ye=W=>{L({title:"Verify your email to sign in",description:"Your password is correct. We just sent a verification link. Check your inbox (and spam folder)."})},st=W=>{jt(W),ge("force-change")},gt=!!(C??v.twoFactor?.verifyTotp),lt=()=>{gt&&Sx(pe,!0),ge("2fa")};h.useEffect(()=>{oe!=="2fa"&&Sx(pe,!1)},[oe,pe]);const Ke=async W=>{be(!0),ge("signin");try{const Ne=B(),it={headers:{[Y8]:Ne}};if(N){const{error:Aa,twoFactorRedirect:En,forcePasswordChange:Er}=await N({email:W.email,password:W.password,verificationReturnTo:Ne,fetchOptions:it});if(Aa){if(Aa.code==="EMAIL_NOT_VERIFIED"){Ye(W.email);return}L({title:"Sign in failed",description:Aa.message??"Check your email and password.",variant:"destructive"});return}if(En){lt();return}if(Er){st(W.password);return}await Te();return}const{data:Wn,error:dt}=await v.signIn.email({email:W.email,password:W.password,rememberMe:!0,fetchOptions:it});if(dt){if(dt.code==="EMAIL_NOT_VERIFIED"){Ye(W.email);return}L({title:"Sign in failed",description:dt.message??"Check your email and password.",variant:"destructive"});return}if(Wn?.twoFactorRedirect){if(C){lt();return}if(S){S();return}lt();return}if((v.getSession?await v.getSession():null)?.data?.user?.mustChangePassword){st(W.password);return}await Te()}finally{be(!1)}},ct=async W=>{be(!0);try{const Ne=`${W.firstName??""} ${W.lastName??""}`.trim()||W.email,{data:it,error:Wn}=await v.signUp.email({email:W.email,password:W.password,name:Ne,firstName:W.firstName,lastName:W.lastName,callbackURL:B()});if(Wn){const En=YE(Wn);if(En.kind==="account-recovery"){const Er=W.email.trim();pt(null),Ht(!1),vt(Er,{...En,email:Er});return}if(En.kind==="email-typo"){Ot(En.description),document.querySelector('[data-testid="input-signup-email"]')?.focus();return}
50L({title:En.title,description:En.description,variant:"destructive"});return}const dt=it?.token;let Ns=typeof dt=="string"&&dt.trim().length>0;if(dt===void 0&&v.getSession){const Er=(await v.getSession()).data?.user,ft=typeof Er?.email=="string"?Er.email.trim().toLowerCase():"";Ns=ft!==""&&ft===W.email.trim().toLowerCase()}if(!Ns){const En=W.email.trim();vt(En),Ht(!0),pt(En),L({title:"Check your email to continue",description:"Check your inbox if a verification message arrives. Otherwise use another sign-in method below."});return}const As=(W.phone??"").trim(),Aa=W.smsOptIn===!0;U&&As&&await oF({phone:As,wantsSms:Aa,wantsSmsMarketing:W.smsMarketingOptIn===!0,smsPolicyHref:V,toast:L}),Ht(!1),pt(W.email),L({title:"Account created",description:`We sent a verification link to ${W.email}. Check your inbox (and spam folder) to confirm your address.`}),await Te()}finally{be(!1)}},Yt=async()=>{const W=Xe;if(!W||!mw.safeParse(W).success){L({title:"Enter a valid email",description:"We need your email to send the reset link.",variant:"destructive"});return}be(!0);try{const{error:Ne}=await v.requestPasswordReset({email:W,redirectTo:"/reset-password"});if(Ne){L({title:"Could not send reset link",description:Ne.message??"Please try again.",variant:"destructive"});return}ze(!0),L({title:"Check your email",description:"A reset link is on its way."})}finally{be(!1)}},Ur=async()=>{be(!0);try{const{error:W}=await v.signIn.social({provider:"google",callbackURL:F(),errorCallbackURL:HE(K,I,window.location.origin,!!g)});W&&L({title:"Google sign-in failed",description:W.message??"Please try again.",variant:"destructive"})}finally{be(!1)}},Nn=async()=>{const W=C??v.twoFactor?.verifyTotp;if(W){be(!0);try{const{error:Ne}=await W({code:et.trim(),trustDevice:Gt});if(Ne){L({title:"Invalid code",description:Ne.message??"Check your authenticator and try again.",variant:"destructive"});return}Sx(pe,!1),await Te()}finally{be(!1)}}},Za=async()=>{if(!(!Ar||!v.changePassword)){if(!wx(Tt)){L({title:"Password too short",description:"At least 8 characters.",variant:"destructive"});return}if(Tt!==dr){L({title:"Passwords don't match",variant:"destructive"});return}be(!0);try{const{error:W}=await v.changePassword({currentPassword:Ar,newPassword:Tt,revokeOtherSessions:!0});if(W){L({title:"Couldn't update password",description:W.message??"Please try again.",variant:"destructive"});return}L({title:"Password updated",description:"You're all set."}),jt(null),ge("signin"),await Te()}finally{be(!1)}}},uo=async()=>{const W=A??v.signIn.passkey;if(W){be(!0);try{const{error:Ne}=await W();if(Ne){L({title:"Passkey sign-in failed",description:Ne.message??"Use another sign-in method or try again.",variant:"destructive"});return}await Te()}finally{be(!1)}}},zr=async()=>{const W=Fe();if(!W){L({title:"Enter your email first",variant:"destructive"});return}if(v.signIn.emailOtp){be(!0);try{const{error:Ne}=await v.signIn.emailOtp({email:W,otp:rr.trim()});if(Ne){L({title:"Invalid or expired code",description:Ne.message??"Request a new code.",variant:"destructive"});return}await Te()}finally{be(!1)}}},Ja=async()=>{const W=Fe();if(!W){L({title:"Enter your email first",variant:"destructive"});return}const Ne=v.emailOtp;if(Ne){be(!0);try{const{error:it}=await Ne.sendVerificationOtp({email:W,type:"sign-in"});if(it){L({title:"Couldn't send code",description:it.message??"Please try again.",variant:"destructive"});return}Zt(!0),L({title:"Check your email",description:"If that email is connected to an account, we'll send a 6-digit sign-in code."})}finally{be(!1)}}},Ca=async()=>{const W=Fe();if(!W){L({title:"Enter your email first",variant:"destructive"});return}if(v.signIn.magicLink){be(!0);try{const Ne=`${window.location.origin}${F()}`,{error:it}=await v.signIn.magicLink({email:W,callbackURL:Ne,errorCallbackURL:HE(K,I,window.location.origin,!!g)});if(it){L({title:"Couldn't send link",description:it.message??"Please try again.",variant:"destructive"});return}Kn(!0),L({title:"Check your email",description:"If that email is connected to an account, we'll send a one-time sign-in link."})}finally{be(!1)}}},Na=async()=>{const W=M??Ft??St.state.values.email;if(W){Ct(!0);try{const Ne=B();if(q){await q(W.trim(),Ne);return}if(v.sendVerificationEmail){const{error:it}=await v.sendVerificationEmail({email:W,callbackURL:Ne});if(it){L({title:"Couldn't send verification email",description:it.message??"Please try again in a moment.",variant:"destructive"});return}}L({title:"Verification email sent",description:"Check your inbox (and spam folder) for the link."})}finally{Ct(!1)}}},An=n==="gold"?"bg-vida-gold-700/10 text-vida-gold-700":"bg-vida-mint-soft text-vida-green-700",Yn=M??Ft,Wt=()=>{if(!Yn)return null;const W=!!M,Ne=Gn&&!W;return s.jsxs("div",{className:"flex flex-col gap-3 rounded-2xl bg-vida-mint-soft px-4 py-3 text-sm r
50ing-1 ring-vida-green-700/20 mb-6",children:[s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx($A,{className:"mt-0.5 h-5 w-5 shrink-0 text-vida-green-700","aria-hidden":"true"}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"font-semibold text-ink",children:W?"Your password is correct":Ne?"Check your email to continue":"Account created - confirm your email"}),s.jsx("p",{className:"mt-0.5 text-ink-2",children:W?s.jsxs(s.Fragment,{children:["We need to confirm your email address before you can sign in. A verification link was just sent to ",s.jsx("span",{className:"font-medium text-ink",children:Yn}),"."]}):Ne?s.jsxs(s.Fragment,{children:["Check your inbox if a verification message arrives. Otherwise use another sign-in method below. Email: ",s.jsx("span",{className:"font-medium text-ink",children:Yn}),"."]}):s.jsxs(s.Fragment,{children:["We sent a verification link to"," ",s.jsx("span",{className:"font-medium text-ink",children:Yn}),". Click it to confirm your address - checkout requires a verified email."]})})]})]}),s.jsxs(ua,{type:"button",variant:"outline",size:"sm",className:"w-full",onClick:Na,disabled:Ee,children:[s.jsx(S2,{className:"mr-2 h-4 w-4","aria-hidden":"true"}),Ee?"Sending...":"Resend verification email"]})]})};if(oe==="2fa")return s.jsx("div",{className:"flex min-h-[70vh] flex-col items-center justify-center px-4 py-8",children:s.jsxs("div",{className:"w-full max-w-sm",children:[s.jsxs("div",{className:"mb-8 text-center",children:[!c&&s.jsx("div",{className:`inline-flex items-center justify-center rounded-pill p-3 ${An}`,children:s.jsx(FA,{className:"h-7 w-7","aria-hidden":"true"})}),s.jsx("h1",{className:"mt-4 font-display text-t2 text-ink",children:"Two-factor verification"}),s.jsx("p",{className:"mt-1 text-sm text-ink-3",children:"Enter the 6-digit code from your authenticator app."})]}),s.jsxs("form",{className:"space-y-4 rounded-card bg-card p-6 ring-1 ring-[var(--vp-hairline)]",onSubmit:W=>{W.preventDefault(),!we&&et.length>=6&&Nn()},children:[s.jsx(Rr,{inputMode:"numeric",maxLength:6,value:et,onChange:W=>pn(W.target.value.replace(/\D/g,"")),placeholder:"123456",className:"text-center text-lg tracking-[0.5em]",autoFocus:!0}),s.jsx(ua,{type:"submit",className:"w-full",disabled:we||et.length<6,children:we?"Verifyingâ¦":"Verify & sign in"}),s.jsxs("label",{className:"flex items-start gap-2 text-xs text-ink-3",children:[s.jsx("input",{type:"checkbox",checked:Gt,onChange:W=>Lr(W.target.checked),className:"mt-0.5"}),s.jsx("span",{children:"Remember this device for 30 days"})]}),s.jsx("button",{type:"button",className:"w-full text-xs text-ink-3 hover:text-ink",onClick:()=>{ge("signin"),pn("")},children:"Back to sign in"})]})]})});if(oe==="force-change"){const W=Tt.length>0&&Tt===dr;return s.jsx("div",{className:"flex min-h-[70vh] flex-col items-center justify-center px-4 py-8",children:s.jsxs("div",{className:"w-full max-w-sm",children:[s.jsxs("div",{className:"mb-8 text-center",children:[!c&&s.jsx("div",{className:`inline-flex items-center justify-center rounded-pill p-3 ${An}`,children:s.jsx(FA,{className:"h-7 w-7","aria-hidden":"true"})}),s.jsx("h1",{className:"mt-4 font-display text-t2 text-ink",children:"Set a new password"}),s.jsx("p",{className:"mt-1 text-sm text-ink-3",children:"Your account used a temporary password. Choose a new one to continue."})]}),s.jsxs("form",{className:"space-y-4 rounded-card bg-card p-6 ring-1 ring-[var(--vp-hairline)]",onSubmit:Ne=>{Ne.preventDefault(),!we&&wx(Tt)&&W&&Za()},children:[s.jsxs("div",{children:[s.jsxs("label",{htmlFor:"hub-fc-new",className:"text-sm font-medium text-ink-2",children:["New password ",s.jsx("span",{className:"font-normal text-ink-3",children:"(8+ characters)"})]}),s.jsx(Rr,{id:"hub-fc-new",type:"password",autoComplete:"new-password",value:Tt,onChange:Ne=>Kt(Ne.target.value),className:"mt-1.5"}),s.jsx(WE,{value:Tt})]}),s.jsxs("div",{children:[s.jsx("label",{htmlFor:"hub-fc-confirm",className:"text-sm font-medium text-ink-2",children:"Confirm new password"}),s.jsx(Rr,{id:"hub-fc-confirm",type:"password",autoComplete:"new-password",value:dr,onChange:Ne=>fr(Ne.target.value),className:"mt-1.5"}),s.jsx(iF,{password:Tt,confirm:dr})]}),s.jsx(ua,{type:"submit",className:"w-full",disabled:we||!wx(Tt)||!W,children:we?"Updatingâ¦":"Update password"})]})]})})}return s.jsx("div",{className:"flex min-h-[70vh] flex-col items-center justify-center px-5 py-8",children:s.jsxs("div",{className:"w-full max-w-sm",children:[R&&s.jsxs("div",{className:"mb-6 flex items-start gap-3 rounded-2xl bg-amber-tint px-4 py-3 text-sm text-amber ring-1 ring-amber/20",children:[s.jsx(el,{className:"mt-0.5 h-4 w-4 shrink-0","aria-hidden":"true"}),s.jsx("span",{children:"Your session has expired. Please sign in again to continue."})]}),le&&s.jsxs("div",{className:"mb-6 rounded-2xl bg-vida-mint-soft px-4 py-3 text-sm r
50ing-1 ring-vida-green-700/20",role:"status","data-testid":"provider-signin-recovery",children:[s.jsx("p",{className:"font-semibold text-ink",children:le.title}),s.jsx("p",{className:"mt-1 text-ink-2",children:le.description})]}),Z&&s.jsxs("div",{className:"mb-6 flex items-start gap-3 rounded-2xl bg-vida-mint-soft px-4 py-3 text-sm ring-1 ring-vida-green-700/20",role:"status","data-testid":"email-verified-acknowledgement",children:[s.jsx($A,{className:"mt-0.5 h-4 w-4 shrink-0 text-vida-green-700","aria-hidden":"true"}),s.jsxs("span",{className:"text-ink-2",children:[s.jsx("span",{className:"font-semibold text-ink",children:"Email verified."})," Sign in to continue. Your password and any second factor are still required."]})]}),P&&s.jsxs("div",{className:"mb-6 flex items-start gap-3 rounded-2xl bg-amber-tint px-4 py-3 text-sm text-amber ring-1 ring-amber/20",role:"alert",children:[s.jsx(el,{className:"mt-0.5 h-4 w-4 shrink-0","aria-hidden":"true"}),s.jsxs("span",{children:["That sign-in link is not connected to an existing account."," ",s.jsx("a",{href:P,className:"font-semibold underline",children:"Create an account"}),"."]})]}),Wt(),s.jsxs("div",{className:"text-center",children:[!c&&s.jsx("div",{className:`inline-flex items-center justify-center rounded-pill p-3 ${An}`,children:o?s.jsx("img",{src:o,alt:l??e,className:"h-10 w-auto"}):s.jsx(tl,{className:"h-7 w-7","aria-hidden":"true"})}),s.jsx("h1",{className:"mt-4 font-display text-t2 text-ink",children:oe==="forgot"?"Reset password":`Sign in to ${e}`}),s.jsx("p",{className:"mt-1 text-sm text-ink-3",children:t})]}),oe==="forgot"?s.jsxs("div",{className:"mt-6 space-y-4 rounded-card bg-card p-6 ring-1 ring-[var(--vp-hairline)]",children:[Me?s.jsx("p",{className:"text-center text-sm text-ink-2",children:"If that email is connected to an account, a reset link is on its way."}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{htmlFor:"hub-forgot-email",className:"text-sm font-medium text-ink",children:"Email"}),s.jsx(Rr,{id:"hub-forgot-email",type:"email",value:Xe,onChange:W=>St.setFieldValue("email",W.target.value),placeholder:"[email protected]"})]}),s.jsxs(ua,{className:"w-full",onClick:Yt,disabled:we,children:[we?s.jsx(er,{className:"mr-2 size-4 animate-spin","aria-hidden":"true"}):null,"Send reset link"]})]}),s.jsx("button",{type:"button",onClick:()=>{ge("signin"),ze(!1)},className:"w-full text-center text-sm text-primary hover:underline",children:"Back to sign in"})]}):oe==="signin"?s.jsxs("div",{className:"mt-6 space-y-4",children:[xe&&s.jsxs("div",{className:"rounded-2xl bg-vida-mint-soft px-4 py-3 text-sm ring-1 ring-vida-green-700/20",role:"status",children:[s.jsx("p",{className:"font-semibold text-ink",children:xe.title}),s.jsx("p",{className:"mt-1 text-ink-2",children:xe.description}),s.jsx("p",{className:"mt-2 text-ink-2",children:Q?"If you originally used Google, continue with Google. Otherwise enter your password, use an email code or link, or choose Forgot password to set or recover one.":"Enter your password, use an email code or link, or choose Forgot password to set or recover one."})]}),Q&&s.jsxs(ua,{type:"button",variant:"outline",className:"w-full",onClick:Ur,disabled:we,children:[s.jsxs("svg",{className:"mr-2 size-4",viewBox:"0 0 24 24","aria-hidden":"true",children:[s.jsx("path",{fill:"currentColor",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),s.jsx("path",{fill:"currentColor",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),s.jsx("path",{fill:"currentColor",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),s.jsx("path",{fill:"currentColor",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]}),"Continue with Google"]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"h-px flex-1 bg-[var(--vp-
50hairline)]"}),s.jsx("span",{className:"text-xs text-ink-3",children:"or use email"}),s.jsx("div",{className:"h-px flex-1 bg-[var(--vp-hairline)]"})]}),s.jsxs("form",{onSubmit:W=>{W.preventDefault(),W.stopPropagation(),St.handleSubmit()},className:"space-y-4",children:[s.jsx(St.Field,{name:"email",children:W=>s.jsxs("div",{className:"space-y-2",children:[s.jsx(Fs,{htmlFor:W.name,children:"Email"}),s.jsx(Rr,{id:W.name,name:W.name,"data-testid":"input-signin-email",type:"email",value:W.state.value??"",onBlur:W.handleBlur,onChange:Ne=>W.handleChange(Ne.target.value)}),(W.state.meta.isTouched||St.state.submissionAttempts>0)&&W.state.meta.errors.length>0?s.jsx("p",{className:"text-[0.8rem] font-medium text-destructive",children:String(W.state.meta.errors[0]?.message??W.state.meta.errors[0])}):null]})}),s.jsx(St.Field,{name:"password",children:W=>s.jsxs("div",{className:"space-y-2",children:[s.jsx(Fs,{htmlFor:W.name,children:"Password"}),s.jsx(Rr,{id:W.name,name:W.name,"data-testid":"input-signin-password",type:"password",value:W.state.value??"",onBlur:W.handleBlur,onChange:Ne=>W.handleChange(Ne.target.value)}),(W.state.meta.isTouched||St.state.submissionAttempts>0)&&W.state.meta.errors.length>0?s.jsx("p",{className:"text-[0.8rem] font-medium text-destructive",children:String(W.state.meta.errors[0]?.message??W.state.meta.errors[0])}):null]})}),s.jsx("div",{className:"flex justify-end",children:s.jsx("button",{type:"button",onClick:()=>ge("forgot"),className:"text-sm text-primary hover:underline",children:"Forgot password?"})}),s.jsxs(ua,{type:"submit",className:"w-full",disabled:we,children:[we&&s.jsx(er,{className:"mr-2 size-4 animate-spin","aria-hidden":"true"}),"Sign in"]})]}),E&&s.jsxs("div",{className:"rounded-card bg-card p-6 ring-1 ring-[var(--vp-hairline)]",children:[s.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[s.jsx("div",{className:"h-px flex-1 bg-[var(--vp-hairline)]"}),s.jsx("span",{className:"text-xs text-ink-3",children:"or sign in without a password"}),s.jsx("div",{className:"h-px flex-1 bg-[var(--vp-hairline)]"})]}),qr?s.jsx("p",{className:"text-center text-sm text-ink-2",children:"If that email is connected to an account, a one-time sign-in link is on its way."}):hn?s.jsxs("div",{className:"space-y-3",children:[s.jsx("p",{className:"text-sm font-medium text-ink-2",children:"Enter the 6-digit code if one arrives"}),s.jsx(Rr,{inputMode:"numeric",maxLength:6,value:rr,onChange:W=>gn(W.target.value.replace(/\D/g,"")),onKeyDown:W=>{W.key==="Enter"&&rr.length>=6&&!we&&zr()},placeholder:"123456",className:"text-center text-lg tracking-[0.5em]",autoFocus:!0}),s.jsx(ua,{className:"w-full",onClick:zr,disabled:we||rr.length<6,children:we?"Verifyingâ¦":"Verify & sign in"}),s.jsx("button",{type:"button",className:"w-full text-xs text-ink-3 hover:text-ink",onClick:()=>{Zt(!1),gn("")},children:"Use a different method"})]}):s.jsxs("div",{className:"space-y-2",children:[j&&v.signIn.passkey&&s.jsxs(ua,{type:"button",variant:"outline",className:"w-full",onClick:uo,disabled:we,children:[s.jsx(HA,{className:"mr-2 size-4","aria-hidden":"true"}),"Use a passkey"]}),v.emailOtp&&s.jsxs(ua,{type:"button",variant:"outline",className:"w-full",onClick:Ja,disabled:we,children:[s.jsx(HA,{className:"mr-2 size-4","aria-hidden":"true"}),"Email me a sign-in code"]}),v.signIn.magicLink&&s.jsxs(ua,{type:"button",variant:"outline",className:"w-full",onClick:Ca,disabled:we,children:[s.jsx(q0,{className:"mr-2 size-4","aria-hidden":"true"}),"Email me a sign-in link"]})]})]}),T&&s.jsxs("p",{className:"text-center text-sm text-ink-3",children:["No account?"," ",s.jsx("button",{type:"button",onClick:()=>{He(null),ge("signup")},className:"font-medium text-primary hover:underline",children:"Create one"})]})]}):s.jsxs("div",{className:"mt-6 space-y-4",children:[s.jsxs("form",{onSubmit:W=>{W.preventDefault(),W.stopPropagation(),Ot(null),Se.handleSubmit()},className:"space-y-4",children:[s.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[s.jsx(Se.Field,{name:"firstName",children:W=>s.jsxs("div",{className:"space-y-2",children:[s.jsx(Fs,{htmlFor:W.name,children:"First name"}),s.jsx(Rr,{id:W.name,name:W.name,"data-testid":"input-signup-firstname",value:W.state.value??"",onBlur:W.handleBlur,onChange:Ne=>W.handleChange(Ne.target.value)}),(W.state.meta.isTouched||Se.state.submissionAttempts>0)&&W.state.meta.errors.length>0?s.jsx("p",{className:"text-[0.8rem] font-medium text-destructive",children:String(W.
50state.meta.errors[0]?.message??W.state.meta.errors[0])}):null]})}),s.jsx(Se.Field,{name:"lastName",children:W=>s.jsxs("div",{className:"space-y-2",children:[s.jsx(Fs,{htmlFor:W.name,children:"Last name"}),s.jsx(Rr,{id:W.name,name:W.name,"data-testid":"input-signup-lastname",value:W.state.value??"",onBlur:W.handleBlur,onChange:Ne=>W.handleChange(Ne.target.value)}),(W.state.meta.isTouched||Se.state.submissionAttempts>0)&&W.state.meta.errors.length>0?s.jsx("p",{className:"text-[0.8rem] font-medium text-destructive",children:String(W.state.meta.errors[0]?.message??W.state.meta.errors[0])}):null]})})]}),s.jsx(Se.Field,{name:"email",children:W=>s.jsxs("div",{className:"space-y-2",children:[s.jsx(Fs,{htmlFor:W.name,children:"Email"}),s.jsx(Rr,{id:W.name,name:W.name,"data-testid":"input-signup-email",type:"email",value:W.state.value??"",onBlur:W.handleBlur,onChange:Ne=>{Ot(null),W.handleChange(Ne.target.value)}}),ht?s.jsx("p",{className:"text-[0.8rem] font-medium text-destructive",role:"alert",children:ht}):null,(W.state.meta.isTouched||Se.state.submissionAttempts>0)&&W.state.meta.errors.length>0?s.jsx("p",{className:"text-[0.8rem] font-medium text-destructive",children:String(W.state.meta.errors[0]?.message??W.state.meta.errors[0])}):null]})}),s.jsx(Se.Field,{name:"password",children:W=>s.jsxs("div",{className:"space-y-2",children:[s.jsx(Fs,{htmlFor:W.name,children:"Password"}),s.jsx(Rr,{id:W.name,name:W.name,"data-testid":"input-signup-password",type:"password",value:W.state.value??"",onBlur:W.handleBlur,onChange:Ne=>W.handleChange(Ne.target.value)}),s.jsx(WE,{value:W.state.value??""}),(W.state.meta.isTouched||Se.state.submissionAttempts>0)&&W.state.meta.errors.length>0?s.jsx("p",{className:"text-[0.8rem] font-medium text-destructive",children:String(W.state.meta.errors[0]?.message??W.state.meta.errors[0])}):null]})}),s.jsx(Se.Field,{name:"confirmPassword",children:W=>s.jsxs("div",{className:"space-y-2",children:[s.jsx(Fs,{htmlFor:W.name,children:"Confirm password"}),s.jsx(Rr,{id:W.name,name:W.name,"data-testid":"input-signup-confirmpassword",type:"password",value:W.state.value??"",onBlur:W.handleBlur,onChange:Ne=>W.handleChange(Ne.target.value)}),(W.state.meta.isTouched||Se.state.submissionAttempts>0)&&W.state.meta.errors.length>0?s.jsx("p",{className:"text-[0.8rem] font-medium text-destructive",children:String(W.state.meta.errors[0]?.message??W.state.meta.errors[0])}):null]})}),U&&s.jsxs(s.Fragment,{children:[s.jsx(Se.Field,{name:"phone",children:W=>s.jsxs("div",{className:"space-y-2",children:[s.jsxs(Fs,{htmlFor:W.name,children:["Mobile number ",s.jsx("span",{className:"font-normal text-ink-3",children:"(optional)"})]}),s.jsxs("div",{className:"relative",children:[s.jsx(w2,{className:"pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-ink-3","aria-hidden":"true"}),s.jsx(Rr,{id:W.name,name:W.name,"data-testid":"input-signup-phone",type:"tel",autoComplete:"tel-national",placeholder:"+1 (555) 000-0000",className:"pl-9",value:W.state.value??"",onBlur:W.handleBlur,onChange:Ne=>W.handleChange(Ne.target.value)})]}),(W.state.meta.isTouched||Se.state.submissionAttempts>0)&&W.state.meta.errors.length>0?s.jsx("p",{className:"text-[0.8rem] font-medium text-destructive",children:String(W.state.meta.errors[0]?.message??W.state.meta.errors[0])}):null]})}),s.jsx(Se.Field,{name:"smsOptIn",children:W=>{const it=(Ie??"").trim().length===0;return s.jsx("div",{className:"space-y-2",children:s.jsxs("label",{className:"flex items-start gap-2.5 cursor-pointer",children:[s.jsx("input",{type:"checkbox",checked:!!W.state.value,onChange:Wn=>W.handleChange(Wn.target.checked),disabled:it,"data-testid":"checkbox-sms-optin",className:"mt-0.5 h-4 w-4 accent-[hsl(var(--primary))]"}),s.jsxs("span",{className:"text-xs text-ink-3 leading-snug",children:[Fi.lead," ",s.jsx("strong",{children:Fi.optional})," ",Fi.stop," ",s.jsx("a",{href:V,className:"font-medium text-primary hover:underline",children:Fi.policy}),"."]})]})})}}),s.jsx(Se.Field,{name:"smsMarketingOptIn",children:W=>{const it=(Ie??"").trim().length===0;return s.jsx("div",{className:"space-y-2",children:s.jsxs("label",{className:"flex items-start gap-2.5 cursor-pointer",children:[s.jsx("input",{type:"checkbox",checked:!!W.state.value,onChange:Wn=>W.handleChange(Wn.target.checked),disabled:it,"data-testid":"checkbox-sms-marketing-optin",className:"mt-0.5 h-4 w-4 accent-[hsl(var(--primary))]"}),s.jsxs("span",{className:"text-xs text-ink-3 leading-snug",children:[$i.lead," ",s.jsx("strong",{children:$i.optional})," ",$i.stop," ",s.jsx("a",{href:V,className:"font-medium text-primary hover:underline",children:$i.policy}),"."]})]})})}})]}),s.jsxs(ua,{type:"submit",className:"w-full",disabled:we,children:[we&&s.jsx(er,{className:"mr-2 size-4 animate-spin","aria-hidden":"true"}),"Create account"]})]}),s.jsxs("p",{className:"text-center text-sm text-ink-3",children:["Already have an account?"," ",s.jsx("button",{type:"button",onClick:()=>ge("signin"),className:"font-medium text-primary hover:underline",children:"Sign in"})]})]}),s.jsx("p",{className:"mt-6 text-center text-xs text-ink-3",children:"One Vida account works across all Vida services."})]})})}function hF(e){const t=e.trim().toLowerCase().replace(/:\d+$/,"");let n=2166136261;for(let r=0;r<t.length;r+=1)n^=t.charCodeAt(r),n=Math.imul(n,16777619)>>>0;return n.toString(16).padStart(8,"0")}function gF(e){return String(e??"").split(",")[0].trim().toLowerCase().replace(/:\d+$/,"").replace(/\.$/,"")}function yF(e){const t=[];let n=e;for(;n;){t.push(hF(n));const r=n.indexOf(".");if(r===-1)break;n=n.slice(r+1)}return t}const xF=[["tools",["73d3e24c","e722469c"]],["care",["c87e0f7c","7e73c00c"]],["glow",["4fae5d44"]]];function pw(e){const t=gF(e);if(!t)return null;const n=yF(t);for(const[r,o]of xF)if(n.some(l=>o.includes(l)))return r;return null}function vF(e){const t=(typeof window>"u"?"":window.location.hostname).toLowerCase();return t?pw(t):null}function bF(e){return`/api/hub/oidc/logout?client=${encodeURIComponent(e)}`}const wF="vida.sso.signedout";function SF(){try{return typeof window>"u"?null:window.localStorage}catch{return null}}function lO(){try{SF()?.setItem(wF,String(Date.now()))}catch{}}async function CF(e,t){lO();try{await t()}catch{}typeof window<"u"&&window.location.assign(bF(e))}var NF=Object.defineProperty,Fn=(e,t)=>NF(e,"name",{value:t,configurable:!0});function nf(e){const t=e+"CollectionProvider",[n,r]=nr(t),[o,l]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=Fn(C=>{const{scope:N,children:A}=C,T=h.useRef(null),E=h.useRef(new Map).current;return s.jsx(o,{scope:N,itemMap:E,collectionRef:T,children:A})},"CollectionProvider");c.displayName=t;const d=e+"CollectionSlot",m=Ha(d),p=h.forwardRef((C,N)=>{const{scope:A,children:T}=C,E=l(d,A),j=Qe(N,E.collectionRef);return s.jsx(m,{ref:j,children:T})});p.displayName=d;const y=e+"CollectionItemSlot",g="data-radix-collection-item",v=Ha(y),b=h.forwardRef((C,N)=>{const{scope:A,children:T,...E}=C,j=h.useRef(null),_=Qe(N,j),R=l(y,A);return h.useEffect(()=>(R.itemMap.set(j,{ref:j,...E}),()=>{R.itemMap.delete(j)})),s.jsx(v,{[g]:"",ref:_,children:T})});b.displayName=y;function S(C){const N=l(e+"CollectionConsumer",C);return h.useCallback(()=>{const T=N.collectionRef.current;if(!T)return[];const E=Array.from(T.querySelectorAll(`[${g}]`));return Array.from(N.itemMap.values()).sort((R,P)=>E.indexOf(R.ref.current)-E.indexOf(P.ref.current))},[N.collectionRef,N.itemMap])}return Fn(S,"useCollection"),[{Provider:c,Slot:p,ItemSlot:b},S,r]}Fn(nf,"createCollection");var QE=new WeakMap,bn,Qr,Cx=(Qr=class extends Map{constructor(n){super(n);qA(this,bn);ix(this,bn,[...super.keys()]),QE.set(this,!0)}set(n,r){return QE.get(this)&&(this.has(n)?ir(this,bn)[ir(this,bn).indexOf(n)]=n:ir(this,bn).push(n)),super.set(n,r),this}insert(n,r,o){const l=this.has(r),c=ir(this,bn).length,d=hw(n);let m=d>=0?d:c+d;const p=m<0||m>=c?-1:m;if(p===this.size||l&&p===this.size-1||p===-1)return this.set(r,o),this;const y=this.size+(l?0:1);d<0&&m++;const g=[...ir(this,bn)];let v,b=!1;for(let S=m;S<y;S++)if(m===S){let C=g[S];g[S]===r&&(C=g[S+1]),l&&this.delete(r),v=this.get(C),this.set(r,o)}else{!b&&g[S-1]===r&&(b=!0);const C=g[b?S:S-1],N=v;v=this.get(C),this.delete(C),this.set(C,N)}return this}with(n,r,o){const l=new Qr(this);return l.insert(n,r,o),l}before(n){const r=ir(this,bn).indexOf(n)-1;if(!(r<0))return this.entryAt(r)}setBefore(n,r,o){const l=ir(this,bn).indexOf(n);return l===-1?this:this.insert(l,r,o)}after(n){let r=ir(this,bn).indexOf(n);if(r=r===-1||r===this.size-1?-1:r+1,r!==-1)return this.entryAt(r)}setAfter(n,r,o){const l=ir(this,bn).indexOf(n);return l===-1?this:this.insert(l+1,r,o)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return ix(this,bn,[]),super.clear()}delete(n){const r=super.delete(n);return r&&ir(this,bn).splice(ir(this,bn).indexOf(n),1),r}deleteAt(n){const r=this.keyAt(n);return r!==void 0?this.delete(r):!1}at(n){const r=cp(ir(this,bn),n);if(r!==void 0)return this.get(r)}entryAt(n){const r=cp(ir(this,bn),n);if(r!==void 0)return[r,this.get(r)]}indexOf(n){return ir(this,bn).indexOf(n)}keyAt(n){return cp(ir(this,bn),n)}from(n,r){const o=this.indexOf(n);if(o===-1)return;let l=o+r;return l<0&&(l=0),l>=this.size&&(l=this.size-1),this.at(l)}keyFrom(n,r){const o=this.indexOf(n);if(o===-1)return;let l=o+r;return l<0&&(l=0),l>=this.size&&(l=this.size-1),this.keyAt(l)}find(n,r){let o=0;for(const l of this){if(Reflect.apply(n,r,[l,o,this]))return l;o++}}findIndex(n,r){let o=0;for(const l of this){if(Reflect.apply(n,r,[l,o,this]))return o;o++}return-1}filter(n,r){const o=[];let l=0;for(const c of this)Reflect.apply(n,r,[c,l,this])&&o.push(c),l++;return new Qr(o)}map(n,r){const o=[];let l=0;for(const c of this)o.push([c[0],Reflect.apply(n,r,[c,l,this])]),l++;return new Qr(o)}reduce(...n){const[r,o]=n;let l=0,c=o??this.at(0);for(const d of this)l===0&&n.length===1?c=d:c=Reflect.apply(r,this,[c,d,l,this]),l++;return c}reduceRight(...n){const[r,o]=n;let l=o??this.at(-1);for(let c=this.size-1;c>=0;c--){const d=this.at(c);c===this.size-1&&n.length===1?l=d:l=Reflect.apply(r,this,[l,d,c,this])}return l}toSorted(n){const r=[...this.entries()].sort(n);return new Qr(r)}toReversed(){const n=new Qr;for(let r=this.size-1;r>=0;r--){const o=this.keyAt(r),l=this.get(o);n.set(o,l)}return n}toSpliced(...n){const r=[...this.entries()];return r.splice(...n),new Qr(r)}slice(n,r){const o=new Qr;let l=this.size-1;if(n===void 0)return o;n<0&&(n=n+this.size),r!==void 0&&r>0&&(l=r-1);for(let c=n;c<=l;c++){const d=this.keyAt(c),m=this.get(d);o.set(d,m)}return o}every(n,r){let o=0;for(const l of this){if(!Reflect.apply(n,r,[l,o,this]))return!1;o++}return!0}some(n,r){let o=0;for(const l of this){if(Reflect.apply(n,r,[l,o,this]))return!0;o++}return!1}},bn=new WeakMap,Fn(Qr,"OrderedDict"),Qr);function cp(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);const n=cO(e,t);return n===-1?void 0:e[n]}Fn(cp,"at");function cO(e,t){const n=e.length,r=hw(t),o=r>=0?r:n+r;return o<0||o>=n?-1:o}Fn(cO,"toSafeIndex");function hw(e){return e!==e||e===0?0:Math.trunc(e)}Fn(hw,"toSafeInteger");function AF(e){const t=e+"CollectionProvider",[n,r]=nr(t),[o,l]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Cx,setItemMap:Fn(()=>{},"setItemMap")}),c=Fn(({state:E,...j})=>E?s.jsx(m,{...j,state:E}):s.jsx(d,{...j}),"CollectionProvider");c.displayName=t;const d=Fn(E=>{const j=N();return s.jsx(m,{...E,state:j})},"CollectionInit");d.displayName=t+"Init";const m=Fn(E=>{const{scope:j,children:_,state:R}=E,P=h.useRef(null),[M,q]=h.useState(null),U=Qe(P,q),[V,$]=R;return h.useEffect(()=>{if(!M)return;const L=fO(()=>{});return L.observe(M,{childList:!0,subtree:!0}),()=>{L.disconnect()}},[M]),s.jsx(o,{scope:j,itemMap:V,setItemMap:$,collectionRef:U,collectionRefObject:P,collectionElement:M,children:_})},"CollectionProviderImpl");m.displayName=t+"Impl";const p=e+"CollectionSlot",y=Ha(p),g=h.forwardRef((E,j)=>{const{scope:_,children:R}=E,P=l(p,_),M=Qe(j,P.collectionRef);return s.jsx(y,{ref:M,children:R})});g.displayName=p;const v=e+"CollectionItemSlot",b="data-radix-collection-item",S=Ha(v),C=h.forwardRef((E,j)=>{const{scope:_,children:R,...P}=E,M=h.useRef(null),[q,U]=h.useState(null),V=Qe(j,M,U),$=l(v,_),{setItemMap:L}=$,H=h.useRef(P);uO(H.current,P)||(H.current=P);const Q=H.current;return h.useEffect(()=>{const I=Q;return L(O=>q?O.has(q)?O.set(q,{...I,element:q}).toSorted(mb):(O.set(q,{...I,element:q}),O.toSorted(mb)):O),()=>{L(O=>!q||!O.has(q)?O:(O.delete(q),new Cx(O)))}},[q,Q,L]),s.jsx(S,{[b]:"",ref:V,children:R})});C.displayName=v;function N(){return h.useState(new Cx)}Fn(N,"useInitCollection");function A(E){const{itemMap:j}=l(e+"CollectionConsumer",E);return j}return Fn(A,"useCollection"),[{Provider:c,Slot:g,ItemSlot:C}
50,{createCollectionScope:r,useCollection:A,useInitCollection:N}]}Fn(AF,"createCollection");function uO(e,t){if(e===t)return!0;if(typeof e!="object"||typeof t!="object"||e==null||t==null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n)if(!Object.prototype.hasOwnProperty.call(t,o)||e[o]!==t[o])return!1;return!0}Fn(uO,"shallowEqual");function dO(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Fn(dO,"isElementPreceding");function mb(e,t){return!e[1].element||!t[1].element?0:dO(e[1].element,t[1].element)?-1:1}Fn(mb,"sortByDocumentPosition");function fO(e){return new MutationObserver(n=>{for(const r of n)if(r.type==="childList"){e();return}})}Fn(fO,"getChildListObserver");var EF=Object.defineProperty,jF=(e,t)=>EF(e,"name",{value:t,configurable:!0}),TF=h.createContext(void 0);function rf(e){const t=h.useContext(TF);return e||t||"ltr"}jF(rf,"useDirection");var kF=Object.defineProperty,gw=(e,t)=>kF(e,"name",{value:t,configurable:!0}),Nx=!1;function mO(){const[e,t]=h.useState(Nx);return h.useEffect(()=>{Nx||(Nx=!0,t(!0))},[]),e}gw(mO,"useIsHydrated");var pO=Oc[" useSyncExternalStore ".trim().toString()];function hO(){return()=>{}}gw(hO,"subscribe");function gO(){return pO(hO,()=>!0,()=>!1)}gw(gO,"useIsHydratedModern");var RF=typeof pO=="function"?gO:mO,PF=Object.defineProperty,fl=(e,t)=>PF(e,"name",{value:t,configurable:!0}),Ax="rovingFocusGroup.onEntryFocus",OF={bubbles:!1,cancelable:!0},Rh="RovingFocusGroup",[pb,yO,_F]=nf(Rh),[IF,xO]=nr(Rh,[_F]),[MF,DF]=IF(Rh),LF=h.forwardRef(fl(function(t,n){return s.jsx(pb.Provider,{scope:t.__scopeRovingFocusGroup,children:s.jsx(pb.Slot,{scope:t.__scopeRovingFocusGroup,children:s.jsx(qF,{...t,ref:n})})})},"RovingFocusGroup")),qF=h.forwardRef(fl(function(t,n){const{__scopeRovingFocusGroup:r,orientation:o,loop:l=!1,dir:c,currentTabStopId:d,defaultCurrentTabStopId:m,onCurrentTabStopIdChange:p,onEntryFocus:y,preventScrollOnEntryFocus:g=!1,...v}=t,b=h.useRef(null),S=Qe(n,b),C=rf(c),[N,A]=va({prop:d,defaultProp:m??null,onChange:p,caller:Rh}),[T,E]=h.useState(!1),j=Jr(y),_=yO(r),R=h.useRef(!1),[P,M]=h.useState(0);return h.useEffect(()=>{const q=b.current;if(q)return q.addEventListener(Ax,j),()=>q.removeEventListener(Ax,j)},[j]),s.jsx(MF,{scope:r,orientation:o,dir:C,loop:l,currentTabStopId:N,onItemFocus:h.useCallback(q=>A(q),[A]),onItemShiftTab:h.useCallback(()=>E(!0),[]),onFocusableItemAdd:h.useCallback(()=>M(q=>q+1),[]),onFocusableItemRemove:h.useCallback(()=>M(q=>q-1),[]),children:s.jsx(Ge.div,{tabIndex:T||P===0?-1:0,"data-orientation":o,...v,ref:S,style:{outline:"none",...t.style},onMouseDown:je(t.onMouseDown,()=>{R.current=!0}),onFocus:je(t.onFocus,q=>{const U=!R.current;if(q.target===q.currentTarget&&U&&!T){const V=new CustomEvent(Ax,OF);if(q.currentTarget.dispatchEvent(V),!V.defaultPrevented){const $=_().filter(O=>O.focusable),L=$.find(O=>O.active),H=$.find(O=>O.id===N),I=[L,H,...$].filter(Boolean).map(O=>O.ref.current);yw(I,g)}}R.current=!1}),onBlur:je(t.onBlur,()=>E(!1))})})},"RovingFocusGroupImpl")),UF="RovingFocusGroupItem",zF=h.forwardRef(fl(function(t,n){const{__scopeRovingFocusGroup:r,focusable:o=!0,active:l=!1,tabStopId:c,children:d,...m}=t,p=ha(),y=c||p,g=DF(UF,r),v=g.currentTabStopId===y,b=yO(r),{onFocusableItemAdd:S,onFocusableItemRemove:C,currentTabStopId:N}=g,A=RF();return Vt(()=>{if(!(!A||!o))return S(),()=>C()},[A,o,S,C]),h.useEffect(()=>{if(!(A||!o))return S(),()=>C()},[A,o,S,C]),s.jsx(pb.ItemSlot,{scope:r,id:y,focusable:o,active:l,children:s.jsx(Ge.span,{tabIndex:v?0:-1,"data-orientation":g.orientation,...m,ref:n,onMouseDown:je(t.onMouseDown,T=>{o?g.onItemFocus(y):T.preventDefault()}),onFocus:je(t.onFocus,()=>g.onItemFocus(y)),onKeyDown:je(t.onKeyDown,T=>{if(T.key==="Tab"&&T.shiftKey){g.onItemShiftTab();return}if(T.target!==T.currentTarget)return;const E=bO(T,g.orientation,g.dir);if(E!==void 0){if(T.metaKey||T.ctrlKey||T.altKey||T.shiftKey)return;T.preventDefault();let _=b().filter(R=>R.focusable).map(R=>R.ref.current);if(E==="last")_.reverse();else if(E==="prev"||E==="next"){E==="prev"&&_.reverse();const R=_.indexOf(T.currentTarget);_=g.loop?wO(_,R+1):_.slice(R+1)}setTimeout(()=>yw(_))}}),children:typeof d=="function"?d({isCurrentTabStop:v,hasTabStop:N!=null}):d})})},"RovingFocusGroupItem")),VF={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function vO(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}fl(vO,"getDirectionAwareKey");function bO(e,t,n){const r=vO(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return VF[r]}fl(bO,"getFocusIntent");function yw(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}fl(yw,"focusFirst");function wO(e,t){return e.map((n,r)=>e[(t+r)%e.length])}fl(wO,"wrapArray");var BF=LF,FF=zF,$F=Object.defineProperty,xt=(e,t)=>
vendor: 10,771 bytes, line 50
50$F(e,"name",{value:t,configurable:!0}),hb=["Enter"," "],HF=["ArrowDown","PageUp","Home"],SO=["ArrowUp","PageDown","End"],GF=[...HF,...SO],KF={ltr:[...hb,"ArrowRight"],rtl:[...hb,"ArrowLeft"]},YF={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ph="Menu",[Ud,WF,QF]=nf(Ph),[ml,CO]=nr(Ph,[QF,io,xO]),xw=io(),NO=xO(),[XF,pl]=ml(Ph),[ZF,af]=ml(Ph),JF=xt(e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:l,modal:c=!0}=e,d=xw(t),[m,p]=h.useState(null),y=h.useRef(!1),g=Jr(l),v=rf(o);return h.useEffect(()=>{const b=xt(()=>{y.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},"handleKeyDown"),S=xt(()=>y.current=!1,"handlePointer");return document.addEventListener("keydown",b,{capture:!0}),()=>{document.removeEventListener("keydown",b,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),h.useEffect(()=>{if(!n)return;const b=xt(()=>g(!1),"handleBlur");return window.addEventListener("blur",b),()=>window.removeEventListener("blur",b)},[n,g]),s.jsx(lw,{...d,children:s.jsx(XF,{scope:t,open:n,onOpenChange:g,content:m,onContentChange:p,children:s.jsx(ZF,{scope:t,onClose:h.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:y,dir:v,modal:c,children:r})})})},"Menu"),AO=h.forwardRef(xt(function(t,n){const{__scopeMenu:r,...o}=t,l=xw(r);return s.jsx(cw,{...l,...o,ref:n})},"MenuAnchor")),EO="MenuPortal",[e9,jO]=ml(EO,{forceMount:void 0}),t9=xt(e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,l=pl(EO,t);return s.jsx(e9,{scope:t,forceMount:n,children:s.jsx(Dr,{present:n||l.open,children:s.jsx(Zd,{asChild:!0,container:o,children:r})})})},"MenuPortal"),Fa="MenuContent",[n9,vw]=ml(Fa),r9=h.forwardRef(xt(function(t,n){const r=jO(Fa,t.__scopeMenu),{forceMount:o=r.forceMount,...l}=t,c=pl(Fa,t.__scopeMenu),d=af(Fa,t.__scopeMenu);return s.jsx(Ud.Provider,{scope:t.__scopeMenu,children:s.jsx(Dr,{present:o||c.open,children:s.jsx(Ud.Slot,{scope:t.__scopeMenu,children:d.modal?s.jsx(a9,{...l,ref:n}):s.jsx(s9,{...l,ref:n})})})})},"MenuContent")),a9=h.forwardRef(xt(function(t,n){const r=pl(Fa,t.__scopeMenu),o=h.useRef(null),l=Qe(n,o);return h.useEffect(()=>{const c=o.current;if(c)return Ah(c)},[]),s.jsx(bw,{...t,ref:l,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:je(t.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})},"MenuRootContentModal")),s9=h.forwardRef(xt(function(t,n){const r=pl(Fa,t.__scopeMenu);return s.jsx(bw,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})},"MenuRootContentNonModal")),i9=Ha("MenuContent.ScrollLock"),bw=h.forwardRef(xt(function(t,n){const{__scopeMenu:r,loop:o=!1,trapFocus:l,onOpenAutoFocus:c,onCloseAutoFocus:d,disableOutsidePointerEvents:m,onEntryFocus:p,onEscapeKeyDown:y,onPointerDownOutside:g,onFocusOutside:v,onInteractOutside:b,onDismiss:S,disableOutsideScroll:C,...N}=t,A=pl(Fa,r),T=af(Fa,r),E=xw(r),j=NO(r),_=WF(r),[R,P]=h.useState(null),M=h.useRef(null),q=Qe(n,M,A.onContentChange),U=h.useRef(0),V=h.useRef(""),$=h.useRef(0),L=h.useRef(null),H=h.useRef("right"),Q=h.useRef(0),I=C?ef:h.Fragment,O=C?{as:i9,allowPinchZoom:!0}:void 0,F=xt(K=>{const le=V.current+K,Z=_().filter(oe=>!oe.disabled),ie=document.activeElement,re=Z.find(oe=>oe.ref.current===ie)?.textValue,de=Z.map(oe=>oe.textValue),he=IO(de,le,re),pe=Z.find(oe=>oe.textValue===he)?.ref.current;xt((function oe(ge){V.current=ge,window.clearTimeout(U.current),ge!==""&&(U.current=window.setTimeout(()=>oe(""),1e3))}),"updateSearch")(le),pe&&setTimeout(()=>pe.focus())},"handleTypeaheadSearch");h.useEffect(()=>()=>window.clearTimeout(U.current),[]),Lc();const B=h.useCallback(K=>H.current===L.current?.side&&DO(K,L.current?.area),[]);return s.jsx(n9,{scope:r,searchRef:V,onItemEnter:h.useCallback(K=>{B(K)&&K.preventDefault()},[B]),onItemLeave:h.useCallback(K=>{B(K)||(M.current?.focus(),P(null))},[B]),onTriggerLeave:h.useCallback(K=>{B(K)&&K.preventDefault()},[B]),pointerGraceTimerRef:$,onPointerGraceIntentChange:h.useCallback(K=>{L.current=K},[]),children:s.jsx(I,{...O,children:s.jsx(gh,{asChild:!0,trapped:l,onMountAutoFocus:je(c,K=>{K.preventDefault(),M.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:d,children:s.jsx(Xd,{asChild:!0,disableOutsidePointerEvents:m,onEscapeKeyDown:y,onPointerDownOutside:g,onFocusOutside:v,onInteractOutside:b,onDismiss:S,children:s.jsx(BF,{asChild:!0,...j,dir:T.dir,orientation:"vertical",loop:o,currentTabStopId:R,onCurrentTabStopIdChange:P,onEntryFocus:je(p,K=>{T.isUsingKeyboardRef.current||K.preventDefault()}),preventScrollOnEntryFocus:!0,children:s.jsx(Nh,{role:"menu","aria-orientation":"vertical","data-state":Sw(A.open),"data-radix-menu-content":"",dir:T.dir,...E,...N,ref:q,style:{outline:"none",...N.style},onKeyDown:je(N.onKeyDown,K=>{const Z=K.target.closest("[data-radix-menu-content]")===K.currentTarget,ie=K.ctrlKey||K.altKey||K.metaKey,re=K.key.length===1;Z&&(K.key==="Tab"&&K.preventDefault(),!ie&&re&&F(K.key));const de=M.current;if(K.target!==de||!GF.includes(K.key))return;K.preventDefault();const pe=_().filter(oe=>!oe.disabled).map(oe=>oe.ref.current);SO.includes(K.key)&&pe.reverse(),OO(pe)}),onBlur:je(t.onBlur,K=>{K.currentTarget.contains(K.target)||(window.clearTimeout(U.current),V.current="")}),onPointerMove:je(t.onPointerMove,bc(K=>{const le=K.target,Z=Q.current!==K.clientX;if(K.currentTarget.contains(le)&&Z){const ie=K.clientX>Q.current?"right":"left";H.current=ie,Q.current=K.clientX}}))})})})})})})},"MenuContentImpl")),o9=h.forwardRef(xt(function(t,n){const{__scopeMenu:r,...o}=t;return s.jsx(Ge.div,{...o,ref:n})},"MenuLabel")),gb="MenuItem",XE="menu.itemSelect",ww=h.forwardRef(xt(function(t,n){const{disabled:r=!1,onSelect:o,...l}=t,c=h.useRef(null),d=af(gb,t.__scopeMenu),m=vw(gb,t.__scopeMenu),p=Qe(n,c),y=h.useRef(!1),g=xt(()=>{const v=c.current;if(!r&&v){const b=new CustomEvent(XE,{bubbles:!0,cancelable:!0});v.addEventListener(XE,S=>o?.(S),{once:!0}),X0(v,b),b.defaultPrevented?y.current=!1:d.onClose()}},"handleSelect");return s.jsx(TO,{...l,ref:p,disabled:r,onClick:je(t.onClick,g),onPointerDown:v=>{t.onPointerDown?.(v),y.current=!0},onPointerUp:je(t.onPointerUp,v=>{y.current||v.currentTarget?.click()}),onKeyDown:je(t.onKeyDown,v=>{r||v.target!==v.currentTarget||m.searchRef.current!==""&&v.key===" "||hb.includes(v.key)&&(v.currentTarget.click(),v.preventDefault())})})},"MenuItem")),TO=h.forwardRef(xt(function(t,n){const{__scopeMenu:r,disabled:o=!1,textValue:l,...c}=t,d=vw(gb,r),m=NO(r),p=h.useRef(null),y=Qe(n,p),[g,v]=h.useState(!1),[b,S]=h.useState("");return h.useEffect(()=>{const C=p.current;C&&S((C.textContent??"").trim())},[c.children]),s.jsx(Ud.ItemSlot,{scope:r,disabled:o,textValue:l??b,children:s.jsx(FF,{asChild:!0,...m,focusable:!o,children:s.jsx(Ge.div,{role:"menuitem","data-highlighted":g?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...c,ref:y,onPointerMove:je(t.onPointerMove,bc(C=>{o?d.onItemLeave(C):(d.onItemEnter(C),C.defaultPrevented||C.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:je(t.onPointerLeave,bc(C=>d.onItemLeave(C))),onFocus:je(t.onFocus,()=>v(!0)),onBlur:je(t.onBlur,()=>v(!1))})})})},"MenuItemImpl")),l9=h.forwardRef(xt(function(t,n){const{checked:r=!1,onCheckedChange:o,...l}=t;return s.jsx(RO,{scope:t.__scopeMenu,checked:r,children:s.jsx(ww,{role:"menuitemcheckbox","aria-checked":zd(r)?"mixed":r,...l,ref:n,"data-state":Oh(r),onSelect:je(l.onSelect,()=>o?.(zd(r)?!0:!r),{checkForDefaultPrevented:!1})})})},"MenuCheckboxItem")),c9="MenuRadioGroup",[Fve,u9]=ml(c9,{value:void 0,onValueChange:xt(()=>{},"onValueChange")}),d9="MenuRadioItem",f9=h.forwardRef(xt(function(t,n){const{value:r,...o}=t,l=u9(d9,t.__scopeMenu),c=r===l.value;return s.jsx(RO,{scope:t.__scopeMenu,checked:c,children:s.jsx(ww,{role:"menuitemradio","aria-checked":c,...o,ref:n,"data-state":Oh(c),onSelect:je(o.onSelect,()=>l.onValueChange?.(r),{checkForDefaultPrevented:!1})})})},"MenuRadioItem")),kO="MenuItemIndicator",[RO,m9]=ml(kO,{checked:!1}),p9=h.forwardRef(xt(function(t,n){const{__scopeMenu:r,forceMount:o,...l}=t,c=m9(kO,r);return s.jsx(Dr,{present:o||zd(c.checked)||c.checked===!0,children:s.jsx(Ge.span,{...l,ref:n,"data-state":Oh(c.checked)})})},"MenuItemIndicator")),h9=h.forwardRef(xt(function(t,n){const{__scopeMenu:r,...o}=t;return s.jsx(Ge.div,{role:"separator","aria-orientation":"horizontal",...o,ref:n})},"MenuSeparator")),g9="MenuSub",[$ve,PO]=ml(g9),Lm="MenuSubTrigger",y9=h.forwardRef(xt(function(t,n){const r=pl(Lm,t.__scopeMenu),o=af(Lm,t.__scopeMenu),l=PO(Lm,t.__scopeMenu),c=vw(Lm,t.__scopeMenu),d=h.useRef(null),{pointerGraceTimerRef:m,onPointerGraceIntentChange:p}=c,y={__scopeMenu:t.__scopeMenu},g=h.useCallback(()=>{d.current&&window.clearTimeout(d.current),d.current=null},[]);h.useEffect(()=>g,[g]),h.useEffect(()=>{const b=m.current;return()=>{window.clearTimeout(b),p(null)}},[m,p]);const v=Qe(n,l.onTriggerChange);return s.jsx(AO,{asChild:!0,...y,children:s.jsx(TO,{id:l.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":r.open?l.contentId:void 0,"data-state":Sw(r.open),...t,ref:v,onClick:b=>{t.onClick?.(b),!(t.disabled||b.defaultPrevented)&&(b.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:je(t.onPointerMove,bc(b=>{c.onItemEnter(b),!b.defaultPrevented&&!t.disabled&&!r.open&&!d.current&&(c.onPointerGraceIntentChange(null),d.current=window.setTimeout(()=>{r.onOpenChange(!0),g()},100))})),onPointerLeave:je(t.onPointerLeave,bc(b=>{g();const S=r.content?.getBoundingClientRect();if(S){const C=r.content?.dataset.side,N=C==="right",A=N?-5:5,T=S[N?"left":"right"],E=S[N?"right":"left"];c.onPointerGraceIntentChange({area:[{x:b.clientX+A,y:b.clientY},{x:T,y:S.top},{x:E,y:S.top},{x:E,y:S.bottom},{x:T,y:S.bottom}],side:C}),window.clearTimeout(m.current),m.current=window.setTimeout(()=>c.onPointerGraceIntentChange(null),300)}else{if(c.onTriggerLeave(b),b.defaultPrevented)return;c.onPointerGraceIntentChange(null)}})),onKeyDown:je(t.onKeyDown,b=>{t.disabled||b.target!==b.currentTarget||c.searchRef.current!==""&&b.key===" "||KF[o.dir].includes(b.key)&&(r.onOpenChange(!0),r.content?.focus(),b.preventDefault())})})})},"MenuSubTrigger")),x9="MenuSubContent",v9=h.forwardRef(xt(function(t,n){const r=jO(Fa,t.__scopeMenu),{forceMount:o=r.forceMount,align:l="start",...c}=t,d=pl(Fa,t.__scopeMenu),m=af(Fa,t.__scopeMenu),p=PO(x9,t.__scopeMenu),y=h.useRef(null),g=Qe(n,y);return s.jsx(Ud.Provider,{scope:t.__scopeMenu,children:s.jsx(Dr,{present:o||d.open,children:s.jsx(Ud.Slot,{scope:t.__scopeMenu,children:s.jsx(bw,{id:p.contentId,"aria-labelledby":p.triggerId,...c,ref:g,align:l,side:m.dir==="rtl"?"left"
50:"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:v=>{m.isUsingKeyboardRef.current&&y.current?.focus(),v.preventDefault()},onCloseAutoFocus:v=>v.preventDefault(),onFocusOutside:je(t.onFocusOutside,v=>{v.target!==p.trigger&&d.onOpenChange(!1)}),onEscapeKeyDown:je(t.onEscapeKeyDown,v=>{m.onClose(),v.preventDefault()}),onKeyDown:je(t.onKeyDown,v=>{const b=v.currentTarget.contains(v.target),S=YF[m.dir].includes(v.key);b&&S&&(d.onOpenChange(!1),p.trigger?.focus(),v.preventDefault())})})})})})},"MenuSubContent"));function Sw(e){return e?"open":"closed"}xt(Sw,"getOpenState");function zd(e){return e==="indeterminate"}xt(zd,"isIndeterminate");function Oh(e){return zd(e)?"indeterminate":e?"checked":"unchecked"}xt(Oh,"getCheckedState");function OO(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}xt(OO,"focusFirst");function _O(e,t){return e.map((n,r)=>e[(t+r)%e.length])}xt(_O,"wrapArray");function IO(e,t,n){const o=t.length>1&&Array.from(t).every(p=>p===t[0])?t[0]:t,l=n?e.indexOf(n):-1;let c=_O(e,Math.max(l,0));o.length===1&&(c=c.filter(p=>p!==n));const m=c.find(p=>p.toLowerCase().startsWith(o.toLowerCase()));return m!==n?m:void 0}xt(IO,"getNextMatch");function MO(e,t){const{x:n,y:r}=e;let o=!1;for(let l=0,c=t.length-1;l<t.length;c=l++){const d=t[l],m=t[c],p=d.x,y=d.y,g=m.x,v=m.y;y>r!=v>r&&n<(g-p)*(r-y)/(v-y)+p&&(o=!o)}return o}xt(MO,"isPointInPolygon");function DO(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return MO(n,t)}xt(DO,"isPointerInGraceArea");function bc(e){return t=>t.pointerType==="mouse"?e(t):void 0}xt(bc,"whenMouse");var b9=JF,w9=AO,S9=t9,C9=r9,N9=o9,A9=ww,E9=l9,j9=f9,T9=p9,k9=h9,R9=y9,P9=v9,O9=Object.defineProperty,wa=(e,t)=>O9(e,"name",{value:t,configurable:!0}),Cw="DropdownMenu",[_9,Hve]=nr(Cw,[CO]),Sa=CO(),[I9,LO]=_9(Cw),M9=wa(e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:l,onOpenChange:c,modal:d=!0}=e,m=Sa(t),p=h.useRef(null),[y,g]=va({prop:o,defaultProp:l??!1,onChange:c,caller:Cw});return s.jsx(I9,{scope:t,triggerId:ha(),triggerRef:p,contentId:ha(),open:y,onOpenChange:g,onOpenToggle:h.useCallback(()=>g(v=>!v),[g]),modal:d,children:s.jsx(b9,{...m,open:y,onOpenChange:g,dir:r,modal:d,children:n})})},"DropdownMenu"),D9="DropdownMenuTrigger",L9=h.forwardRef(wa(function(t,n){const{__scopeDropdownMenu:r,disabled:o=!1,...l}=t,c=LO(D9,r),d=Sa(r),m=Qe(n,c.triggerRef);return s.jsx(w9,{asChild:!0,...d,children:s.jsx(Ge.button,{type:"button",id:c.triggerId,"aria-haspopup":"menu","aria-expanded":c.open,"aria-controls":c.open?c.contentId:void 0,"data-state":c.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...l,ref:m,onPointerDown:je(t.onPointerDown,p=>{!o&&p.button===0&&p.ctrlKey===!1&&(c.onOpenToggle(),c.open||p.preventDefault())}),onKeyDown:je(t.onKeyDown,p=>{o||(["Enter"," "].includes(p.key)&&c.onOpenToggle(),p.key==="ArrowDown"&&c.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(p.key)&&p.preventDefault())})})})},"DropdownMenuTrigger")),q9=wa(e=>{const{__scopeDropdownMenu:t,...n}=e,r=Sa(t);return s.jsx(S9,{...r,...n})},"DropdownMenuPortal"),U9="DropdownMenuContent",z9=h.forwardRef(wa(function(t,n){const{__scopeDropdownMenu:r,...o}=t,l=LO(U9,r),c=Sa(r),d=h.useRef(!1);return s.jsx(C9,{id:l.contentId,"aria-labelledby":l.triggerId,...c,...o,ref:n,onCloseAutoFocus:je(t.onCloseAutoFocus,m=>{d.current||l.triggerRef.current?.focus(),d.current=!1,m.preventDefault()}),onInteractOutside:je(t.onInteractOutside,m=>{const p=m.detail.originalEvent,y=p.button===0&&p.ctrlKey===!0,g=p.button===2||y;(!l.modal||g)&&(d.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuContent")),V9=h.forwardRef(wa(function(t,n){const{__scopeDropdownMenu:r,...o}=t,l=Sa(r);return s.jsx(N9,{...l,...o,ref:n})},"DropdownMenuLabel")),B9=h.forwardRef(wa(function(t,n){const{__scopeDropdownMenu:r,...o}=t,l=Sa(r);return s.jsx(A9,{...l,...o,ref:n})},"DropdownMenuItem")),F9=h.forwardRef(wa(function(t,n){const{__scopeDropdownMenu:r,...o}=t,l=Sa(r);return s.jsx(E9,{...l,...o,ref:n})},"DropdownMenuCheckboxItem")),$9=h.forwardRef(wa(function(t,n){const{__scopeDropdownMenu:r,...o}=t,l=Sa(r);return s.jsx(j9,{...l,...o,ref:n})},"DropdownMenuRadioItem")),H9=h.forwardRef(wa(function(t,n){const{__scopeDropdownMenu:r,...o}=t,l=Sa(r);return s.jsx(T9,{...l,...o,ref:n})},"DropdownMenuItemIndicator")),G9=h.forwardRef(wa(function(t,n){const{__scopeDropdownMenu:r,...o}=t,l=Sa(r);return s.jsx(k9,{...l,...o,ref:n})},"DropdownMenuSeparator")),K9=h.forwardRef(wa(function(t,n){const{__scopeDropdownMenu:r,...o}=t,l=Sa(r);return s.jsx(R9,{...l,...o,ref:n})},"DropdownMenuSubTrigger")),Y9=h.forwardRef(wa(function(t,n){const{__scopeDropdownMenu:r,...o}=t,l=Sa(r);return s.jsx(P9,{...l,...o,ref:n,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuSubContent")),W9=M9,Q9=L9,X9=q9,qO=z9,UO=V9,zO=B9,VO=F9,BO=$9,FO=H9,$O=G9,HO=K9,GO=Y9;const Nw=W9,Aw=Q9,Z9=h.forwardRef(({className:e,inset:t,children:n,...r},o)=>s.jsxs(HO,{ref:o,className:Y("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[n,s.jsx(ul,{className:"ml-auto"})]}));Z9.displayName=HO.displayName;const J9=h.forwardRef(({className:e,...t},n)=>s.jsx(GO,{ref:n,className:Y("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
50de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...t}));J9.displayName=GO.displayName;const _h=h.forwardRef(({className:e,sideOffset:t=4,...n},r)=>s.jsx(X9,{children:s.jsx(qO,{ref:r,sideOffset:t,className:Y("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...n})}));_h.displayName=qO.displayName;const fa=h.forwardRef(({className:e,inset:t,...n},r)=>s.jsx(zO,{ref:r,className:Y("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...n}));fa.displayName=zO.displayName;const e$=h.forwardRef(({className:e,children:t,checked:n,...r},o)=>s.jsxs(VO,{ref:o,className:Y("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(FO,{children:s.jsx(mn,{className:"h-4 w-4"})})}),t]}));e$.displayName=VO.displayName;const t$=h.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(BO,{ref:r,className:Y("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(FO,{children:s.jsx(dh,{className:"h-2 w-2 fill-current"})})}),t]}));t$.displayName=BO.displayName;const KO=h.forwardRef(({className:e,inset:t,...n},r)=>s.jsx(UO,{ref:r,className:Y("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));KO.displayName=UO.displayName;const Vi=h.forwardRef(({className:e,...t},n)=>s.jsx($O,{ref:n,className:Y("-mx-1 my-1 h-px bg-muted",e),...t}));Vi.displayName=$O.displayName;var n$=Object.defineProperty,Zs=(e,t)=>n$(e,"name",{value:t,configurable:!0}),YO="Avatar",[r$,Gve]=nr(YO),a$=[0,()=>{}],[s$,WO]=r$(YO),QO=h.forwardRef(Zs(function(t,n){const{__scopeAvatar:r,...o}=t,[l,c]=h.useState("idle"),[d,m]=e_();return s.jsx(s$,{scope:r,imageLoadingStatus:l,setImageLoadingStatus:c,imageCount:d,setImageCount:m,children:s.jsx(Ge.span,{...o,ref:n})})},"Avatar")),i$="AvatarImage",XO=h.forwardRef(Zs(function(t,n){const{__scopeAvatar:r,src:o,onLoadingStatusChange:l,...c}=t,d=WO(i$,r);d.setImageCount;const m=JO(o,{referrerPolicy:c.referrerPolicy,crossOrigin:c.crossOrigin,loadingStatus:d.imageLoadingStatus,setLoadingStatus:d.setImageLoadingStatus}),p=Jr(g=>{l?.(g)}),y=h.useRef(m);return Vt(()=>{const g=y.current;y.current=m,m!==g&&p(m)},[m,p]),m==="loaded"?s.jsx(Ge.img,{...c,ref:n,src:o}):null},"AvatarImage")),o$="AvatarFallback",ZO=h.forwardRef(Zs(function(t,n){const{__scopeAvatar:r,delayMs:o,...l}=t,c=WO(o$,r),[d,m]=h.useState(o===void 0);return h.useEffect(()=>{if(o!==void 0){const p=window.setTimeout(()=>m(!0),o);return()=>window.clearTimeout(p)}},[o]),d&&c.imageLoadingStatus!=="loaded"?s.jsx(Ge.span,{...l,ref:n}):null},"AvatarFallback"));function JO(e,{loadingStatus:t,setLoadingStatus:n,referrerPolicy:r,crossOrigin:o}){return Vt(()=>{if(!e){n("error");return}const l=new window.Image,c=Zs(m=>{const p=m.currentTarget;n(yb(p))},"handleLoad"),d=Zs(()=>n("error"),"handleError");return l.addEventListener("load",c),l.addEventListener("error",d),r&&(l.referrerPolicy=r),l.crossOrigin=o??null,l.src=e,n(yb(l)),()=>{l.removeEventListener("load",c),l.removeEventListener("error",d),n("idle")}},[e,o,r,n]),t}Zs(JO,"useImageLoadingStatus");
50function yb(e){return e.complete?e.naturalWidth>0?"loaded":"error":"loading"}Zs(yb,"getImageLoadingStatus");function e_(){return a$}Zs(e_,"useImageCount");function l$(e){}Zs(l$,"useUpdateImageCount");const xb=h.forwardRef(({className:e,...t},n)=>s.jsx(QO,{ref:n,className:Y("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));xb.displayName=QO.displayName;const vb=h.forwardRef(({className:e,...t},n)=>s.jsx(XO,{ref:n,className:Y("aspect-square h-full w-full",e),...t}));vb.displayName=XO.displayName;const bb=h.forwardRef(({className:e,...t},n)=>s.jsx(ZO,{ref:n,className:Y("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));bb.displayName=ZO.displayName;const t_=["en","es"],wc="en",c$={en:{endonym:"English",english:"English"},es:{endonym:"Español",english:"Spanish"}};function u$(e){return typeof e=="string"&&t_.includes(e)}function Lp(e){if(typeof e!="string")return null;const t=e.trim().toLowerCase().split(/[-_]/)[0];return u$(t)?t:null}function n_(e){if(typeof e!="string"||e.trim()==="")return null;const t=[];return e.split(",").forEach((r,o)=>{const[l,...c]=r.split(";"),d=Lp(l);if(!d)return;let m=1;for(const p of c){const[y,g]=p.split("=");if(y?.trim().toLowerCase()!=="q")continue;const v=Number.parseFloat(String(g));Number.isFinite(v)&&(m=Math.min(1,Math.max(0,v)))}t.push({language:d,q:m,order:o})}),t.filter(r=>r.q>0).sort((r,o)=>o.q-r.q||r.order-o.order)[0]?.language??null}function d$(e){return Lp(e.requested)??Lp(e.stored)??n_(e.acceptLanguage)??wc}function f$(e,t){return t?e.replace(/\{(\w+)\}/g,(n,r)=>r in t?String(t[r]):n):e}function r_(e,t,n,r){const l=(e[t]??e[wc])?.[n]??e[wc]?.[n]??n;return f$(l,r)}const m$={"common.loading":"Loading","common.retry":"Try again","common.close":"Close","common.cancel":"Cancel","common.save":"Save","common.saved":"Saved","common.somethingWentWrong":"Something went wrong.","common.signIn":"Sign in","common.signOut":"Sign out","language.label":"Language","language.help":"We will use this across the site and for Vida, on any device you sign in on.","cart.title":"Your cart","cart.empty.title":"Your cart is empty","cart.empty.body":"Anything you add will show up here.","cart.empty.action":"Browse the catalog","cart.subtotal":"Subtotal","cart.checkout":"Check out","cart.remove":"Remove","cart.quantity":"Quantity","cart.itemCount.one":"1 item","cart.itemCount.many":"{count} items","cart.preorderLine":"Pre-order","checkout.title":"Checkout","checkout.total":"Total","checkout.shipping":"Shipping","checkout.discount":"Discount","checkout.storeCredit":"VidaCredit","checkout.promoPlaceholder":"Promo code","checkout.promoApply":"Apply","checkout.placeOrder":"Place order","account.title":"Your account","account.orders":"Orders","account.addresses":"Addresses","account.settings":"Settings","account.preferences":"Preferences","vida.open":"Open Vida Assistant","vida.close":"Close","vida.send":"Send message","vida.input":"Message Vida","vida.history":"History","vida.newChat":"Start a new chat","vida.pastChats":"Your past chats","vida.noPastChats":"This is your first chat with Vida. From now on they will be here.","vida.historyFailed":"We could not load your past chats just now. Your conversations are still saved.","vida.human":"Human"},p$={"common.loading":"Cargando","common.retry":"Inténtalo de nuevo","common.close":"Cerrar","common.cancel":"Cancelar","common.save":"Guardar","common.saved":"Guardado","common.somethingWentWrong":"Algo salió mal.","common.signIn":"Iniciar sesión","common.signOut":"Cerrar sesión","language.label":"Idioma","language.help":"Lo usaremos en todo el sitio y con Vida, en cualquier dispositivo donde inicies sesion.","cart.title":"Tu carrito","cart.empty.title":"Tu carrito está vacÃo","cart.empty.body":"Lo que agregues aparecerá aquÃ.","cart.empty.action":"Ver el catálogo","cart.subtotal":"Subtotal","cart.checkout":"Pagar","cart.remove":"Quitar","cart.quantity":"Cantidad","cart.itemCount.one":"1 artÃculo","cart.itemCount.many":"{count} artÃculos","cart.preorderLine":"Pedido anticipado","checkout.title":"Pago","checkout.total":"Total","checkout.shipping":"EnvÃo","checkout.discount":"Descuento","checkout.storeCredit":"VidaCredit","checkout.promoPlaceholder":"Código promocional","checkout.promoApply":"Aplicar","checkout.placeOrder":"Realizar pedido","account.title":"Tu cuenta","account.orders":"Pedidos","account.addresses":"Direcciones","account.settings":"Configuración","account.preferences":"Preferencias","vida.open":"Abrir el asistente Vida","vida.close":"Cerrar","vida.send":"Enviar mensaje","vida.input":"Escribir a Vida","vida.history":"Historial","vida.newChat":"Empezar un chat nuevo","vida.pastChats":"Tus chats anteriores","vida.noPastChats":"Este es tu primer chat con Vida. A partir de ahora estarán aquÃ.","vida.historyFailed":"No pudimos cargar tus chats anteriores ahora mismo. Tus conversaciones siguen guardadas.","vida.human":"Persona"},a_={en:m$,es:p$},s_=h.createContext({language:wc,t:(e,t)=>r_(a_,wc,e,t),setLanguage:null});function h$(){if(typeof navigator>"u")return null;const e=Array.isArray(navigator.languages)?navigator.languages:[navigator.language];return n_(e.filter(Boolean).join(","))}function g$({language:e,setLanguage:t=null,children:n}){const r=h.useCallback((l,c)=>r_(a_,e,l,c),[e]),o=h.useMemo(()=>({language:e,t:r,setLanguage:t}),[e,r,t]);return s.jsx(s_.Provider,{value:o,children:n})}function Ih(){return h.useContext(s_)}function y$(){return s.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"size-3",children:[s.jsx("title",{children:"Language"}),s.jsx("circle",{cx:"12",cy:"12",r:"10"}),s.jsx("path",{d:"M2 12h20M12 2a15 15 0 0 1 0 20a15 15 0 0 1 0-20"})]})}function x$(){return s.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",className:"size-3.5","aria-hidden":"true",children:s.jsx("path",{d:"M20 6 9 17l-5-5"})})}const v$={light:{label:"text-muted-foreground",active:"border-primary bg-primary/10 text-foreground",idle:"border-border text-muted-foreground hover:bg-muted"},dark:{label:"text-vida-gold-300",active:"border-vida-mint/60 bg-vida-mint/15 text-white",idle:"border-white/15 bg-white/5 text-white/75 hover:border-vida-mint/50 hover:text-white"}};function i_({tone:e="light",hideLabel:t=!1,className:n}){const{language:r,setLanguage:o,t:l}=Ih();if(!o)return null;const c=v$[e];return s.jsxs("div",{className:["flex flex-col gap-1.5",n].filter(
50Boolean).join(" "),children:[t?null:s.jsxs("p",{className:`flex items-center gap-1.5 text-[10px] font-semibold uppercase tracking-wider ${c.label}`,children:[s.jsx(y$,{}),l("language.label")]}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:t_.map(d=>s.jsxs("button",{type:"button",onClick:()=>o(d),"aria-current":d===r,lang:d,className:["inline-flex items-center gap-1.5 rounded-lg border px-3 py-1.5","coarse:min-h-11 text-xs font-medium transition-colors",d===r?c.active:c.idle].join(" "),children:[d===r?s.jsx(x$,{}):null,c$[d].endonym]},d))}),t?null:s.jsx("p",{className:`text-[11px] leading-snug ${e==="dark"?"text-white/60":"text-muted-foreground"}`,children:l("language.help")})]})}function Ex(e){if(e)return e.startsWith("/objects/")?`/api/storage${e}`:e}function b$(e,t){return Ex(e)??Ex(t?.avatarUrl)??Ex(t?.image)}const w$=["staff","admin","owner"],S$=new Set(w$);function Ew(e){return e?typeof e.role=="string"&&S$.has(e.role):!1}function C$(e,t){return{hasSettled:t||!e.isPending,data:e.data,error:e.error??null,isInitializing:e.isPending&&!t,isRefetching:e.isRefetching??e.isPending,refetch:e.refetch}}function N$(e){const t=h.useRef(!1),{hasSettled:n,...r}=C$(e,t.current);return t.current=n,h.useMemo(()=>r,[r.data,r.error,r.isInitializing,r.isRefetching,r.refetch])}const Vd="https://hub.myvida.tools",A$="https://pay.myvida.tools",ZE="%%VP_STORE_ORIGIN%%",JE="%%VP_STORE_NAME%%";function o_(e){return e.indexOf("%")===-1}const jw=o_(ZE)?ZE:"https://vidapeps.com",E$=o_(JE)?JE:"VidaPeps";function ej(e){return jw.replace("https://",`https://${e}.`)}const l_=[{id:"shop",label:E$,blurb:"Shop, orders and referrals",origin:jw,sessionScope:"cookie",kind:"service"},{id:"care",label:"VidaCare",blurb:"Wellness coaching and lab testing",origin:"https://myvida.care",sessionScope:"oidc",kind:"service"},{id:"tools",label:"VidaTools",blurb:"Wallet, payments and credit",origin:Vd,sessionScope:"oidc",kind:"service"},{id:"toolsApp",label:"VidaTools app",blurb:"Planner, protocols and calculator",origin:"https://app.myvida.tools",sessionScope:"oidc",kind:"deepLink"},{id:"prayer",label:"VidaPray",blurb:"Prayer wall and requests",origin:ej("pray"),sessionScope:"cookie",kind:"service"},{id:"glow",label:"glow.",blurb:"Skin care, by Vida",origin:"https://glowbyvida.com",sessionScope:"oidc",kind:"deepLink"},{id:"admin",label:"VidaAdmin",blurb:"Operations dashboard",origin:ej("admin"),sessionScope:"cookie",kind:"service",adminOnly:!0}];function wb(e){const t=l_.find(n=>n.id===e);if(!t)throw new Error(`unknown Vida service: ${e}`);return t}function j$(e){const t=new URL(jw).hostname;let n;try{n=new URL(e.origin).hostname}catch{return!1}return n===t||n.endsWith(`.${t}`)}function T$(e,t={}){return l_.filter(n=>n.kind==="service"&&n.id!==e&&(!n.adminOnly||t.isAdmin===!0)&&!(e==="care"&&j$(n)))}function Kve(e){const t=[],n=wb("toolsApp");return t.push(e==="tools"?{...n,origin:"/app"}:n),e!=="care"&&t.push(wb("care")),t}function k$(e){if(!e)return"";const t=(e.firstName??"").trim(),n=(e.lastName??"").trim();if(t||n)return`${t.charAt(0)}${n.charAt(0)}`.toUpperCase()||"V";const r=(e.name??"").trim();if(r){const l=r.split(/\s+/);return`${l[0]?.charAt(0)??""}${l.length>1?l.at(-1)?.charAt(0)??"":""}`.toUpperCase().slice(0,2)}return((e.email??"").split("@")[0]??"").slice(0,2).toUpperCase()||"V"}function R$(e){return e?[e.firstName,e.lastName].filter(Boolean).join(" ").trim()||(e.name??"").trim()||(e.email??""):""}function P$({href:e,className:t,children:n}){return s.jsx("a",{href:e,className:t,children:n})}function O$({service:e,user:t,avatarUrl:n,signInHref:r,items:o,children:l,footer:c,showServiceSwitcher:d=!0,hasNotification:m=!1,onSignOut:p,linkComponent:y,className:g}){const v=y??P$;if(!t)return s.jsxs(v,{href:r,className:Y("inline-flex min-h-11 items-center gap-1.5 rounded-pill bg-muted px-3 text-sm font-medium text-ink","motion-safe:transition-colors hover:bg-muted/80","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),children:[s.jsx(Wd,{className:"size-4","aria-hidden":"true"}),"Sign in"]});const b=R$(t),S=k$(t),C=b$(n,t),N=d?T$(e,{isAdmin:Ew(t)}):[];return s.jsxs(Nw,{children:[s.jsx(Aw,{asChild:!0,children:s.jsxs("button",{type:"button","data-testid":"vida-account-menu","aria-label":m?"Account menu, unread notifications":"Account menu",className:Y("relative flex size-[42px] shrink-0 items-center justify-center rounded-pill text-sm font-bold","bg-primary text-primary-foreground motion-safe:transition-colors hover:bg-primary/90","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",g),children:[C?s.jsxs(xb,{className:"size-full",children:[s.jsx(vb,{src:C,alt:""}),s.jsx(bb,{className:"bg-primary text-sm font-bold text-primary-foreground",children:S})]}):S,m&&s.jsx("span",{"data-testid":"vida-account-menu-dot","aria-hidden":"true",className:"absolute -right-0.5 -top-0.5 size-2.5 rounded-pill bg-destructive ring-2 ring-card"})]})}
50),s.jsxs(_h,{align:"end",sideOffset:8,className:"w-64 rounded-2xl p-1.5",children:[s.jsxs("div",{className:"flex items-center gap-3 px-2.5 py-2",children:[s.jsxs(xb,{className:"size-9 shrink-0",children:[C?s.jsx(vb,{src:C,alt:""}):null,s.jsx(bb,{className:"bg-primary text-xs font-bold text-primary-foreground",children:S})]}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"truncate text-sm font-semibold text-ink",children:b}),t.email&&b!==t.email?s.jsx("p",{className:"truncate text-xs text-ink-3",children:t.email}):null]})]}),l?s.jsxs(s.Fragment,{children:[s.jsx(Vi,{}),s.jsx("div",{className:"px-1 py-1",children:l})]}):null,o&&o.length>0?s.jsxs(s.Fragment,{children:[s.jsx(Vi,{}),o.map(A=>{const T=A.icon;return s.jsx(fa,{asChild:!0,className:"gap-2.5 rounded-xl py-2",children:s.jsxs(v,{href:A.href,children:[T?s.jsx(T,{className:"size-4 text-ink-3","aria-hidden":"true"}):null,s.jsx("span",{className:"text-sm",children:A.label}),A.badge?s.jsx("span",{className:"ml-auto",children:A.badge}):null]})},A.href)})]}):null,N.length>0?s.jsxs(s.Fragment,{children:[s.jsx(Vi,{}),s.jsx(KO,{className:"px-2.5 pb-1 pt-1.5 text-overline uppercase tracking-wide text-ink-3",children:"Your Vida account"}),N.map(A=>s.jsx(fa,{asChild:!0,className:"gap-2.5 rounded-xl py-2",children:s.jsxs("a",{href:A.origin,children:[s.jsx(C2,{className:"size-4 text-ink-3","aria-hidden":"true"}),s.jsxs("span",{className:"min-w-0",children:[s.jsx("span",{className:"block truncate text-sm",children:A.label}),s.jsx("span",{className:"block truncate text-xs text-ink-3",children:A.blurb})]})]})},A.id))]}):null,c?s.jsxs(s.Fragment,{children:[s.jsx(Vi,{}),c]}):null,s.jsx(Vi,{}),s.jsx("div",{className:"px-2.5 py-1.5",children:s.jsx(i_,{})}),s.jsx(Vi,{}),s.jsxs(fa,{onClick:p,className:"gap-2.5 rounded-xl py-2 text-danger focus:bg-danger/10 focus:text-danger",children:[s.jsx(Iq,{className:"size-4","aria-hidden":"true"}),s.jsx("span",{className:"text-sm",children:"Sign out"})]})]})]})}const _$=[{value:"light",label:"Light",icon:Mq},{value:"dark",label:"Dark",icon:Dq},{value:"system",label:"System",icon:Lq}];function I$({theme:e,setTheme:t,label:n="Theme"}){return s.jsxs("div",{className:"px-2 py-1.5",children:[s.jsx("p",{className:"mb-1.5 px-0.5 text-overline uppercase tracking-wide text-ink-3",children:n}),s.jsx("div",{className:"grid grid-cols-3 gap-1 rounded-xl bg-muted p-1",children:_$.map(r=>{const o=r.icon,l=e===r.value;return s.jsxs("button",{type:"button",onClick:()=>t(r.value),"aria-pressed":l,className:Y("flex flex-col items-center gap-1 rounded-lg py-1.5 text-[11px] font-medium motion-safe:transition-colors",l?"bg-card text-ink shadow-sm":"text-ink-3 hover:text-ink"),children:[s.jsx(o,{className:"size-4","aria-hidden":"true"}),r.label]},r.value)})})]})}const M$=["1","2","3","4","5","6","7","8","9","","0","â«"];function D$(e){return e instanceof Element?e.matches("input, textarea, select")?!0:e.closest('[contenteditable]:not([contenteditable="false"])')!==null:!1}function L$({length:e=6,onComplete:t,confirmEntry:n=!0,error:r,busy:o=!1,title:l="Choose a PIN",rule:c,className:d}){const[m,p]=h.useState("enter"),[y,g]=h.useState(""),[v,b]=h.useState(""),[S,C]=h.useState(!1),[N,A]=h.useState(!1),T=h.useRef(!1),E=h.useRef(r),j=h.useRef(o),_=h.useCallback(()=>{T.current=!1,p("enter"),g(""),b(""),C(!1),A(!!r)},[r]),R=h.useCallback(U=>{o||(C(!1),A(!0),b(V=>V.length>=e?V:V+U))},[o,e]),P=h.useCallback(()=>{o||(C(!1),A(!0),b(U=>U.slice(0,-1)))},[o]);h.useEffect(()=>{if(v.length===e){if(!n){if(T.current)return;T.current=!0,t(v),g(""),b(""),p("enter");return}if(m==="enter"){g(v),b(""),p("confirm");return}if(v===y){if(T.current)return;T.current=!0,t(v),g(""),b(""),p("enter");return}C(!0),g(""),b(""),p("enter")}},[v,e,m,y,t,n]),h.useEffect(()=>{m==="enter"&&v.length===0&&(T.current=!1)},[m,v]),h.useEffect(()=>{const U=r!==E.current,V=j.current&&!o&&!!r;E.current=r,j.current=o,(U&&r||V)&&(T.current=!1,p("enter"),g(""),b(""),C(!1),A(!1))},[o,r]),h.useEffect(()=>{const U=V=>{D$(V.target)||(V.key>="0"&&V.key<="9"?(V.preventDefault(),R(V.key)):V.key==="Backspace"&&(V.preventDefault(),P()))};
50return window.addEventListener("keydown",U),()=>window.removeEventListener("keydown",U)},[R,P]);const M=m==="enter"||!n?l:"Enter it again",q=S?"Those did not match. Choose a PIN again.":N?null:r??null;return s.jsxs("div",{className:d,children:[s.jsxs("div",{className:"text-center",children:[s.jsx("h2",{className:"text-lg font-medium",children:M}),m==="enter"&&c?s.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:c}):null,n&&m==="confirm"?s.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"So a typo is caught here, not at a register."}):null]}),s.jsx("div",{className:"mt-6 flex justify-center gap-3",role:"status","aria-live":"polite","aria-label":`${v.length} of ${e} digits entered`,children:Array.from({length:e},(U,V)=>s.jsx("span",{className:`h-3.5 w-3.5 rounded-full border ${V<v.length?"bg-foreground border-foreground":"border-muted-foreground/40"}`},`dot-${m}-${V}`))}),q?s.jsx("p",{className:"mt-4 text-center text-sm text-destructive",role:"alert",children:q}):null,s.jsx("div",{className:"mx-auto mt-6 grid max-w-xs grid-cols-3 gap-3",children:M$.map((U,V)=>U===""?s.jsx("span",{},`sp-${V}`):s.jsx("button",{type:"button",disabled:o,className:"h-16 rounded-xl border text-xl font-medium active:scale-95 disabled:opacity-50",onClick:()=>U==="â«"?P():R(U),"aria-label":U==="â«"?"Delete":U,children:U},U))}),n&&m==="confirm"&&!o?s.jsx("div",{className:"mt-4 text-center",children:s.jsx("button",{type:"button",className:"text-sm underline min-h-[44px]",onClick:_,children:"Start over"})}):null]})}class Ju extends Error{constructor(){super("PIN entry was cancelled."),this.name="PinCancelledError"}}const q$=h.createContext(null),U$={house_draw:"Authorise this draw",pos_void:"Authorise this void",pos_price_override:"Authorise this pricing change",pos_no_sale:"Authorise opening the drawer",admin_month_close:"Authorise closing the month",admin_staff_revoke:"Authorise revoking access",admin_batch_delete:"Authorise deleting this lot",clinical_cosign:"Countersign this record"};function Sc(e){if(typeof e!="object"||e===null||Array.isArray(e))return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Sb(e){return typeof e=="string"&&e.length>0&&e===e.trim()}function qp(e,t){const n=Object.keys(e).sort();return n.length===t.length&&n.every((r,o)=>r===t[o])}const c_=/^[0-9a-f]{48}$/,u_=/^[0-9a-f]{64}$/,z$=/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9][.][0-9]{3}Z$/;function V$(e){const t=Date.parse(e);return z$.test(e)&&Number.isFinite(t)&&new Date(t).toISOString()===e}function B$(e,t,n,r){return!Sc(e)||!qp(e,["expiresAt","intentDigest","maxValueCents","operationId","purpose","status","token"])||e.status!=="authorized"||e.purpose!==t||!Sb(e.token)||!Sb(e.expiresAt)||e.operationId!==n||!c_.test(n)||typeof e.intentDigest!="string"||!u_.test(e.intentDigest)||r!==null&&e.intentDigest!==r||!Number.isSafeInteger(e.maxValueCents)||Number(e.maxValueCents)<0||!V$(e.expiresAt)?null:{ticket:e.token,operationId:n,intentDigest:e.intentDigest}}function F$(e,t){return!Sc(e)||!qp(e,["code","intentDigest","message","operationId","status","thresholdCents","valueCents"])||e.status!=="countersign_required"||e.code!=="COUNTERSIGN_REQUIRED"||!Sb(e.message)||e.operationId!==t||!c_.test(t)||typeof e.intentDigest!="string"||!u_.test(e.intentDigest)||!Number.isSafeInteger(e.valueCents)||Number(e.valueCents)<0||!Number.isSafeInteger(e.thresholdCents)||Number(e.thresholdCents)<0||Number(e.valueCents)<Number(e.thresholdCents)?null:{valueCents:Number(e.valueCents),thresholdCents:Number(e.thresholdCents),intentDigest:e.intentDigest}}function $$(e){return!Sc(e)||e.status!=="denied"||!Sc(e.error)||e.error.code!=="PIN_DENIED"||e.error.message!=="PIN not accepted."?null:e.error.message}function H$(e){return!Sc(e)||!qp(e,["error"])||!Sc(e.error)?!1:qp(e.error,["code","message"])&&e.error.code==="PIN_RATE_LIMITED"&&e.error.message==="Too many PIN attempts. Try again later."}function tj(e){return/^[0-9]{6}$/.test(e)}async function G$(e,t,n){const r=await fetch(`${e}/api/pins/authorize`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),signal:n});return{status:r.status,body:await r.json().catch(()=>null)}}function K$({children:e,apiBase:t="",recoveryPrincipal:n=null,transport:r}){const o=typeof n=="string"&&n.length>0&&n.length<=128&&n===n.trim()?n:null,[l,c]=h.useState(null),[d,m]=h.useState("primary"),[p,y]=h.useState(""),[g,v]=h.useState(0),[b,S]=h.useState(null),[C,N]=h.useState(!1),A=h.useRef(!0),T=h.useRef(0),E=h.useRef(null),j=h.useRef(null),_=h.useRef(""),R=h.useRef(null),P=h.useRef(new Map),M=h.useCallback(F=>{F?.signal&&F.abortListener&&F.signal.removeEventListener("abort",F.abortListener)},[]),q=h.useCallback(()=>{_.current="",R.current=null,y("")},[]),U=h.useCallback(()=>{c(null),m("primary"),S(null),N(!1),v(F=>F+1)},[]),V=h.useCallback((F,B)=>{const K=E.current;j.current?.abort(),j.current=null,E.current=null,M(K),_.current="",R.current=null,B&&(q(),U()),K?.reject(F)},[q,M,U]);h.useEffect(()=>(A.current=!0,()=>{A.current=!1,V(new Ju,!1)}),[V]),h.useEffect(()=>{P.current.clear()}
50,[o]);const $=h.useCallback(F=>new Promise((B,K)=>{if(V(new Ju,!0),F.signal?.aborted){K(new Ju);return}const le={...F,id:++T.current,resolve:B,reject:K};F.signal&&(le.abortListener=()=>{E.current?.id===le.id&&V(new Ju,!0)},F.signal.addEventListener("abort",le.abortListener,{once:!0})),E.current=le,c(le),m("primary"),y(""),S(null),N(!1),v(Z=>Z+1)}),[V]),L=h.useCallback(async F=>{const B=E.current;if(!B)return;const K=d==="primary"?F:_.current,le=p.trim();if(!tj(F)||!tj(K)){S("Enter exactly 6 digits."),v(re=>re+1);return}if(d==="countersign"&&le.length===0){S("Enter the countersigner's email."),v(re=>re+1);return}const Z=new AbortController;j.current?.abort(),j.current=Z,N(!0),S(null);const ie={purpose:B.intent.purpose,intent:B.intent.intent,operationId:B.operationId,primaryPin:K,...d==="countersign"?{countersign:{identifier:le,pin:F}}:{}};try{const re=await(r?r(ie,Z.signal):G$(t,ie,Z.signal));if(!A.current||Z.signal.aborted||E.current?.id!==B.id||j.current!==Z)return;const de=re.status===200?B$(re.body,ie.purpose,ie.operationId,R.current):null;if(de){const pe=B.resolve;j.current=null,E.current=null,M(B),q(),U(),pe(de);return}const he=re.status===409?F$(re.body,ie.operationId):null;if(d==="primary"&&he){_.current=F,R.current=he.intentDigest,j.current=null,m("countersign"),N(!1),v(pe=>pe+1);return}j.current=null,N(!1),S((re.status===429&&H$(re.body)?"Too many PIN attempts. Try again later.":$$(re.body))??(re.status===200?"The authorisation response was invalid. Nothing was authorised.":"That PIN was not accepted.")),v(pe=>pe+1)}catch{if(!A.current||Z.signal.aborted||E.current?.id!==B.id||j.current!==Z)return;j.current=null,N(!1),S("Couldn't reach the server. Nothing was authorised."),v(de=>de+1)}},[t,q,p,M,U,d,r]),H=h.useCallback(()=>{V(new Ju,!0)},[V]),Q=h.useCallback(F=>{L(F)},[L]),I=h.useMemo(()=>({requirePin:$,recoveryPrincipal:o,deliveredOperationsRef:P}),[o,$]),O=l?l.title??U$[l.intent.purpose]??"Authorise this action":"Authorise this action";return s.jsxs(q$.Provider,{value:I,children:[e,l?s.jsx("div",{role:"dialog","aria-modal":"true","aria-label":O,className:"fixed inset-0 z-[100] flex items-end justify-center bg-black/50 p-0 shell:items-center shell:p-4",children:s.jsxs("div",{className:"w-full max-w-sm rounded-t-2xl bg-background p-5 shadow-lg shell:rounded-2xl",children:[s.jsx("h2",{className:"text-base font-medium",children:O}),l.description?s.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:l.description}):null,d==="primary"&&l.subjectLabel?s.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:["Enter ",s.jsx("strong",{children:l.subjectLabel}),"'s PIN. It is their PIN that authorises this, not yours."]}):null,d==="countersign"?s.jsxs("div",{className:"mt-3 space-y-2",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"A second authorised person must countersign this action."}),s.jsx("label",{className:"block text-sm font-medium",htmlFor:"pin-countersigner-email",children:"Countersigner email"}),s.jsx("input",{id:"pin-countersigner-email",type:"email",autoComplete:"off",disabled:C,value:p,onChange:F=>y(F.target.value),className:"min-h-[44px] w-full rounded-md border px-3 py-2 text-base"})]}
50):null,s.jsx("div",{className:"mt-4",children:s.jsx(L$,{busy:C,confirmEntry:!1,error:b,title:d==="primary"?"Enter PIN":"Enter countersigner PIN",onComplete:Q},`${d}-${g}`)}),s.jsx("button",{type:"button",className:"mt-3 min-h-[44px] w-full text-sm text-muted-foreground underline",onClick:H,children:"Cancel"})]})}):null]})}function Y$(e){const t=N$(e),n=t.data?.user??null;return h.useMemo(()=>({user:n,isPending:t.isInitializing,isSignedIn:!!n,isAdmin:Ew(n),error:t.error,isRefetching:t.isRefetching,refetch:t.refetch}),[n,t.isInitializing,t.error,t.isRefetching,t.refetch])}const d_="vp-theme",f_=h.createContext(null);function W$(){return typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches}function nj(){if(typeof window>"u")return"system";const e=window.localStorage.getItem(d_);return e==="light"||e==="dark"||e==="system"?e:"system"}function jx(e){const t=e==="system"?W$()?"dark":"light":e;return typeof document<"u"&&(document.documentElement.classList.toggle("dark",t==="dark"),document.documentElement.style.colorScheme=t),t}function Q$({children:e}){const[t,n]=h.useState(()=>nj()),[r,o]=h.useState(()=>jx(nj())),l=h.useCallback(d=>{n(d),typeof window<"u"&&window.localStorage.setItem(d_,d),o(jx(d))},[]);h.useEffect(()=>{if(t!=="system"||typeof window>"u")return;const d=window.matchMedia("(prefers-color-scheme: dark)"),m=()=>o(jx("system"));return d.addEventListener("change",m),()=>d.removeEventListener("change",m)},[t]);const c=h.useMemo(()=>({theme:t,resolvedTheme:r,setTheme:l}),[t,r,l]);return s.jsx(f_.Provider,{value:c,children:e})}function Mh(){const e=h.useContext(f_);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}function X$(e){const{resolvedTheme:t}=Mh();return s.jsx(b8,{theme:t,...e})}var Z$=Object.defineProperty,J$=(e,t)=>Z$(e,"name",{value:t,configurable:!0}),m_=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),e7=h.forwardRef(J$(function(t,n){return s.jsx(Ge.span,{...t,ref:n,style:{...m_,...t.style}})},"VisuallyHidden")),t7=e7,n7=Object.defineProperty,br=(e,t)=>n7(e,"name",{value:t,configurable:!0}),[Tw,Yve]=nr("Tooltip",[io]),r7=io(),a7="TooltipProvider",s7=700,rj="tooltip.open",[i7,o7]=Tw(a7),l7=br(e=>{const{__scopeTooltip:t,delayDuration:n=s7,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:l}=e,c=h.useRef(!0),d=h.useRef(!1),m=h.useRef(0);return h.useEffect(()=>{const p=m.current;return()=>window.clearTimeout(p)},[]),s.jsx(i7,{scope:t,isOpenDelayedRef:c,delayDuration:n,onOpen:h.useCallback(()=>{r<=0||(window.clearTimeout(m.current),c.current=!1)},[r]),onClose:h.useCallback(()=>{r<=0||(window.clearTimeout(m.current),m.current=window.setTimeout(()=>c.current=!0,r))},[r]),isPointerInTransitRef:d,onPointerInTransitChange:h.useCallback(p=>{d.current=p},[]),disableHoverableContent:o,children:l})},"TooltipProvider"),c7="Tooltip",[Wve,Dh]=Tw(c7),p_="TooltipPortal",[u7,d7]=Tw(p_,{forceMount:void 0}),f7=br(e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,l=Dh(p_,t);return s.jsx(u7,{scope:t,forceMount:n,children:s.jsx(Dr,{present:n||l.open,children:s.jsx(Zd,{asChild:!0,container:o,children:r})})})},"TooltipPortal"),Bd="TooltipContent",m7=h.forwardRef(br(function(t,n){const r=d7(Bd,t.__scopeTooltip),{forceMount:o=r.forceMount,side:l="top",...c}=t,d=Dh(Bd,t.__scopeTooltip);return s.jsx(Dr,{present:o||d.open,children:d.disableHoverableContent?s.jsx(h_,{side:l,...c,ref:n}):s.jsx(p7,{side:l,...c,ref:n})})},"TooltipContent")),p7=h.forwardRef(br(function(t,n){const r=Dh(Bd,t.__scopeTooltip),o=o7(Bd,t.__scopeTooltip),l=h.useRef(null),c=Qe(n,l),[d,m]=h.useState(null),{trigger:p,onClose:y}=r,g=l.current,{onPointerInTransitChange:v}=o,b=h.useCallback(()=>{m(null),v(!1)},[v]),S=h.useCallback((C,N)=>{const A=C.currentTarget,T={x:C.clientX,y:C.clientY},E=g_(T,A.getBoundingClientRect()),j=y_(T,E),_=x_(N.getBoundingClientRect()),R=b_([...j,..._]);m(R),v(!0)},[v]);return h.useEffect(()=>()=>b(),[b]),h.useEffect(()=>{if(p&&g){const C=br(A=>S(A,g),"handleTriggerLeave"),N=br(A=>S(A,p),"handleContentLeave");return p.addEventListener("pointerleave",C),g.addEventListener("pointerleave",N),()=>{p.removeEventListener("pointerleave",C),g.removeEventListener("pointerleave",N)}}},[p,g,S,b]),h.useEffect(()=>{if(d){const C=br(N=>{const A=N.target,T={x:N.clientX,y:N.clientY},E=p?.contains(A)||g?.contains(A),j=!v_(T,d);E?b():j&&(b(),y())},"handleTrackPointerGrace");return document.addEventListener("pointermove",C),()=>document.removeEventListener("pointermove",C)}},[p,g,d,y,b]),s.jsx(h_,{...t,ref:c})},"TooltipContentHoverable")),h7=eP("TooltipContent"),h_=h.forwardRef(br(function(t,n){const{__scopeTooltip:r,children:o,"aria-label":l,id:c,onEscapeKeyDown:d,onPointerDownOutside:m,...p}=t,y=Dh(Bd,r),g=r7(r),{onClose:v}=y;h.useEffect(()=>(document.addEventListener(rj,v),()=>document.removeEventListener(rj,v)),[v]),h.useEffect(()=>{if(y.trigger){const S=br(C=>{C.target instanceof Node&&C.target.contains(y.trigger)&&v()},"handleScroll");return window.addEventListener("scroll",S,{capture:!0}),()=>window.removeEventListener("scroll",S,{capture:!0})}},[y.trigger,v]);const{setContentId:b}=y;return Vt(()=>(b(c),()=>{b(void 0)}),[c,b]),s.jsx(Xd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:S=>S.preventDefault(),onDismiss:v,children:s.jsxs(Nh,{"data-state":y.stateAttribute,role:l?void 0:"tooltip",id:l?void 0:y.contentId,...g,...p,ref:n,style:{...p.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[s.jsx(h7,{children:o}),l?s.jsx(t7,{id:y.contentId,role:"tooltip",children:l}):null]})})},"TooltipContentImpl"));function g_(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),l=Math.abs(t.left-e.x);switch(Math.min(n,r,o,l)){case l:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}br(g_,"getExitSideFromRect");function y_(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}br(y_,"getPaddedExitPoints");function x_(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}br(x_,"getPointsFromRect");function v_(e,t){const{x:n,y:r}=e;let o=!1;for(let l=0,c=t.length-1;l<t.length;c=l++){const d=t[l],m=t[c],p=d.x,y=d.y,g=m.x,v=m.y;y>r!=v>r&&n<(g-p)*(r-y)/(v-y)+p&&(o=!o)}return o}br(v_,"isPointInPolygon");function b_(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),w_(t)}br(b_,"getHull");function w_(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const l=t[t.length-1],c=t[t.length-2];if((l.x-c.x)*(o.y-c.y)>=(l.y-c.y)*(o.x-c.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const l=n[n.length-1],c=n[n.length-2];if((l.x-c.x)*(o.y-c.y)>=(l.y-c.y)*(o.x-c.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}br(w_,"getHullPresorted");var g7=l7,y7=f7,S_=m7;const x7=g7,v7=h.forwardRef(({className:e,sideOffset:t=4,...n},r)=>
50s.jsx(y7,{children:s.jsx(S_,{ref:r,sideOffset:t,className:Y("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",e),...n})}));v7.displayName=S_.displayName;const b7=new Set([204,205,304]),w7="application/json, application/problem+json";let Cb=null;function aj(e){Cb=e}function sj(e){if(typeof e!="object"||e===null||Array.isArray(e))return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function ij(e,t){const n=Object.keys(e).sort(),r=[...t].sort();return n.length===r.length&&n.every((o,l)=>o===r[l])}function S7(e){if(!sj(e)||!ij(e,["error"]))return!1;const t=e.error;return sj(t)&&ij(t,["code","message"])&&t.code==="PIN_REQUIRED"&&t.message==="PIN authorisation required."}let Nb=null;function C7(e){Nb=e}let C_=null;function N7(e){C_=e}function N_(e){return typeof Request<"u"&&e instanceof Request}function A7(e,t){return t?t.toUpperCase():N_(e)?e.method.toUpperCase():"GET"}function E7(e){return typeof URL<"u"&&e instanceof URL}function j7(e){return typeof e=="string"?e:E7(e)?e.toString():e.url}function T7(...e){const t=new Headers;for(const n of e)n&&new Headers(n).forEach((r,o)=>{t.set(o,r)});return t}function kw(e){const t=e.get("content-type");return t?t.split(";",1)[0].trim().toLowerCase():null}function Ab(e){return e==="application/json"||!!e?.endsWith("+json")}function A_(e){return!!(e&&(e.startsWith("text/")||e==="application/xml"||e==="text/xml"||e.endsWith("+xml")||e==="application/x-www-form-urlencoded"))}function E_(e,t){return!!(t==="HEAD"||b7.has(e.status)||e.headers.get("content-length")==="0"||e.body===null)}function j_(e){return e.charCodeAt(0)===65279?e.slice(1):e}function T_(e){const t=e.trimStart();return t.startsWith("{")||t.startsWith("[")}function ed(e,t){if(!e||typeof e!="object")return;const n=e[t];if(typeof n!="string")return;const r=n.trim();return r===""?void 0:r}function k7(e,t=300){return e.length>t?`${e.slice(0,t-1)}â¦`:e}const R7=new Set([502,503,504]);function P7(e){const t=e.slice(0,200).trimStart().toLowerCase();return t.startsWith("<!doctype html")||t.startsWith("<html")}function O7(e,t){const n=`HTTP ${e.status} ${e.statusText}`;if(R7.has(e.status))return`The server is momentarily unavailable (HTTP ${e.status}). This usually means it is restarting after a deploy. Nothing was saved or charged - retry in a few seconds.`;if(typeof t=="string"){const c=t.trim();return P7(c)?`${n}: the server returned a web page instead of data`:c?`${n}: ${k7(c)}`:n}const r=ed(t,"title"),o=ed(t,"detail"),l=ed(t,"message")??ed(t,"error_description")??ed(t,"error");return r&&o?`${n}: ${r} - ${o}`:o?`${n}: ${o}`:l?`${n}: ${l}`:r?`${n}: ${r}`:n}class Rw extends Error{name="ApiError";status;statusText;data;headers;response;method;url;constructor(t,n,r){super(O7(t,n)),Object.setPrototypeOf(this,new.target.prototype),this.status=t.status,this.statusText=t.statusText,this.data=n,this.headers=t.headers,this.response=t,this.method=r.method,this.url=t.url||r.url}}class k_ extends Error{name="ResponseParseError";status;statusText;headers;response;method;url;rawBody;cause;constructor(t,n,r,o){super(`Failed to parse response from ${o.method} ${t.url||o.url} (${t.status} ${t.statusText}) as JSON`),Object.setPrototypeOf(this,new.target.prototype),this.status=t.status,this.statusText=t.statusText,this.headers=t.headers,this.response=t,this.method=o.method,this.url=t.url||o.url,this.rawBody=n,this.cause=r}}async function _7(e,t){const n=await e.text(),r=j_(n);if(r.trim()==="")return null;try{return JSON.parse(r)}catch(o){throw new k_(e,n,o,t)}}async function I7(e,t){if(E_(e,t))return null;const n=kw(e.headers);if(n&&!Ab(n)&&!A_(n))return typeof e.blob=="function"?e.blob():e.text();const r=await e.text(),o=j_(r);if(o.trim()==="")return null;
50if(Ab(n)||T_(o))try{return JSON.parse(o)}catch{return r}return r}function M7(e){const t=kw(e.headers);return Ab(t)?"json":A_(t)||t==null?"text":"blob"}async function D7(e,t,n){if(E_(e,n.method))return null;const r=t==="auto"?M7(e):t;if(t==="auto"&&kw(e.headers)==="text/html"){const o=await e.text();throw new k_(e,o,new Error("Expected a JSON API response but received text/html"),n)}switch(r){case"json":return _7(e,n);case"text":{const o=await e.text();return o===""?null:o}case"blob":if(typeof e.blob!="function")throw new TypeError('Blob responses are not supported in this runtime. Use responseType "json" or "text" instead.');return e.blob()}}async function ce(e,t={}){e=e;const{responseType:n="auto",omitCartToken:r=!1,headers:o,...l}=t,c=A7(e,l.method);if(l.body!=null&&(c==="GET"||c==="HEAD"))throw new TypeError(`customFetch: ${c} requests cannot have a body.`);const d=T7(N_(e)?e.headers:void 0,o);if(typeof l.body=="string"&&!d.has("content-type")&&T_(l.body)&&d.set("content-type","application/json"),n==="json"&&!d.has("accept")&&d.set("accept",w7),r)d.delete("x-cart-token");else if(Nb&&!d.has("x-cart-token")){const y=Nb();y&&d.set("x-cart-token",y)}const m={method:c,url:j7(e)},p=await(C_??fetch)(e,{...l,method:c,headers:d});if(!p.ok){const y=await I7(p,c);throw p.status===401&&Cb&&!S7(y)&&Cb(),new Rw(p,y,m)}return await D7(p,n,m)}const Je=(e,t)=>{const n={queryKey:t};for(const r of Object.keys(e))r!=="queryKey"&&Object.defineProperty(n,r,{enumerable:!0,configurable:!0,get:()=>e[r]});return n},L7=e=>{const t=new URLSearchParams;Object.entries(e||{}).forEach(([r,o])=>{o!==void 0&&t.append(r,o===null?"null":String(o))});const n=t.toString();return n.length>0?`/api/invoices?${n}`:"/api/invoices"},q7=async(e,t)=>ce(L7(e),{...t,method:"GET"}),U7=e=>["/api/invoices",...e?[e]:[]],z7=(e,t)=>{const{query:n,request:r}=t??{};return{queryKey:n?.queryKey??U7(e),queryFn:({signal:c})=>q7(e,{signal:c,...r}),...n}};function Qve(e,t){const n=z7(e,t),r=Oe(n);return Je(r,n.queryKey)}const V7=e=>`/api/invoices/${encodeURIComponent(String(e))}`,B7=async(e,t)=>ce(V7(e),{...t,method:"GET"}),F7=e=>[`/api/invoices/${e}`],$7=(e,t)=>{const{query:n,request:r}=t??{};return{queryKey:n?.queryKey??F7(e),queryFn:({signal:c})=>B7(e,{signal:c,...r}),enabled:e!=null,...n}};function Xve(e,t){const n=$7(e,t),r=Oe(n);return Je(r,n.queryKey)}const H7=e=>`/api/invoices/${encodeURIComponent(String(e))}/pay-link`,G7=async(e,t)=>ce(H7(e),{...t,method:"POST"}),K7=e=>{const t=["createCompanyInvoicePayLink"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{id:c}=l??{};return G7(c,r)},...n}},Zve=e=>_e(K7()),Y7=(e,t)=>{const n=new URLSearchParams;Object.entries(t||{}).forEach(([o,l])=>{l!==void 0&&n.append(o,l===null?"null":String(l))});const r=n.toString();return r.length>0?`/api/invoices/${encodeURIComponent(String(e))}/versions/current.pdf?${r}`:`/api/invoices/${encodeURIComponent(String(e))}/versions/current.pdf`},Jve=async(e,t,n)=>ce(Y7(e,t),{...n,method:"GET"}),W7=()=>["/api/research-tools/catalog-context"],Q7=()=>["/api/research-tools/compounds"],X7=()=>["/api/research-plans"],Z7=e=>[`/api/research-plans/${e}`],J7=()=>["/api/research-inventory"],eH=()=>["/api/research-journal"],tH=()=>["/api/entitlements/me"],nH=()=>["/api/users/me/points"],rH=()=>["/api/users/me/points/ledger"],aH=()=>"/api/users/me/points/redeem",sH=async(e,t)=>ce(aH(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)}),iH=e=>{const t=["postUsersMePointsRedeem"],{mutation:n,request:r}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{data:c}=l??{};return sH(c,r)},...n}},oH=e=>_e(iH(e)),lH=()=>"/api/checkout/quote",cH=async(e,t)=>ce(lH(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)}),Pw=e=>["POST","/api/checkout/quote",e],uH=(e,t)=>{const{query:n,request:r}=t??{};return{queryKey:n?.queryKey??Pw(e),queryFn:({signal:c})=>cH(e,{signal:c,...r}),...n}};function dH(e,t){const n=uH(e,t),r=Oe(n);return Je(r,n.queryKey)}const fH=()=>["/api/users/me/referral"],mH=()=>["/api/users/me/subscriptions"],pH=()=>"/api/coa/labs",ebe=async e=>ce(pH(),{...e,method:"GET"}),hH=()=>["/api/users/me/profile"],gH=e=>["/api/research-library",...e?[e]:[]],yH=e=>[`/api/research-library/${e}`],xH=e=>[`/api/products/${e}/research`],R_=()=>
50["/api/stacks"],vH=e=>[`/api/products/${e}/stacks`],bH=()=>["/api/research-corner"],wH=()=>["/api/users/me/consent"],SH=()=>"/api/users/me/consent",tbe=async(e,t)=>ce(SH(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)}),CH=()=>"/api/partners/status",nbe=async e=>ce(CH(),{...e,method:"GET"}),NH=()=>["/api/partners/status"],AH=()=>["/api/club-access/status"],EH=e=>`/api/pay/${encodeURIComponent(String(e))}/access/challenge`,jH=async(e,t,n)=>ce(EH(e),{...n,method:"POST",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)}),TH=e=>{const t=["startPayLinkDisclosureChallenge"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{token:c,data:d}=l??{};return jH(c,d,r)},...n}},rbe=e=>_e(TH()),kH=e=>`/api/pay/${encodeURIComponent(String(e))}/access/verify`,RH=async(e,t,n)=>ce(kH(e),{...n,method:"POST",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)}),PH=e=>{const t=["verifyPayLinkDisclosureCode"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{token:c,data:d}=l??{};return RH(c,d,r)},...n}},abe=e=>_e(PH()),OH=e=>`/api/pay/${encodeURIComponent(String(e))}`,sbe=async(e,t)=>ce(OH(e),{...t,method:"GET"}),ibe=e=>[`/api/pay/${e}`],_H=e=>`/api/pay/${encodeURIComponent(String(e))}/pay`,obe=async(e,t,n)=>ce(_H(e),{...n,method:"POST",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)}),IH=e=>`/api/pay/${encodeURIComponent(String(e))}/payer-claim`,lbe=async(e,t,n)=>ce(IH(e),{...n,method:"POST",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)}),MH=e=>`/api/orders/${encodeURIComponent(String(e))}/payment/payer-claim`,DH=async(e,t,n)=>ce(MH(e),{...n,method:"POST",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)}),LH=(e,t)=>{const n=new URLSearchParams;Object.entries(t||{}).forEach(([o,l])=>{l!==void 0&&n.append(o,l===null?"null":String(l))});const r=n.toString();return r.length>0?`/api/support/contribution/${encodeURIComponent(String(e))}/payer-claim?${r}`:`/api/support/contribution/${encodeURIComponent(String(e))}/payer-claim`},cbe=async(e,t,n,r)=>ce(LH(e,n),{...r,method:"POST",headers:{"Content-Type":"application/json",...r?.headers},body:JSON.stringify(t)}),qH=e=>`/api/pay/${encodeURIComponent(String(e))}/vidapay`,ube=async(e,t,n)=>ce(qH(e),{...n,method:"POST",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)}),UH=e=>`/api/business-account-invitations/${encodeURIComponent(String(e))}`,dbe=async(e,t)=>ce(UH(e),{...t,method:"GET"}),zH=e=>`/api/business-account-invitations/${encodeURIComponent(String(e))}/accept`,VH=async(e,t)=>ce(zH(e),{...t,method:"POST"}),BH=e=>{const t=["acceptBusinessAccountInvitation"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{invitationId:c}=l??{};return VH(c,r)},...n}},fbe=e=>_e(BH()),FH=e=>`/api/business-account-invitations/${encodeURIComponent(String(e))}/reject`,$H=async(e,t)=>ce(FH(e),{...t,method:"POST"}),HH=e=>{const t=["rejectBusinessAccountInvitation"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{invitationId:c}=l??{};return $H(c,r)},...n}},mbe=e=>_e(HH()),GH=()=>"/api/company/memberships",KH=async e=>ce(GH(),{...e,method:"GET"}),P_=()=>["/api/company/memberships"],YH=e=>{const{query:t,request:n}=e??{};return{queryKey:t?.queryKey??P_(),queryFn:({signal:l})=>KH({signal:l,...n}),...t}};function WH(e){const t=YH(e),n=Oe(t);return Je(n,t.queryKey)}const QH=()=>"/api/company/start",XH=async(e,t)=>ce(QH(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)}),ZH=e=>{const t=["startCompany"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{data:c}=l??{};return XH(c,r)},...n}},pbe=e=>_e(ZH()),JH=()=>"/api/company/profile",eG=async e=>ce(JH(),{...e,method:"GET"}),tG=()=>["/api/company/profile"],nG=e=>{const{query:t,request:n}=e??{};return{queryKey:t?.queryKey??tG(),queryFn:({signal:l})=>eG({signal:l,...n}),...t}};function hbe(e){const t=nG(e),n=Oe(t);return Je(n,t.queryKey)}const rG=()=>"/api/company/profile",aG=async(e,t)=>ce(rG(),{...t,method:"PATCH",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)}),sG=e=>{const t=["updateCompanyProfile"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{data:c}=l??{};return aG(c,r)},...n}},gbe=e=>_e(sG()),iG=()=>"/api/company/profile/contacts",oG=async(e,t)=>ce(iG(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)}),lG=e=>{const t=["createCompanyContact"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{data:c}=l??{};return oG(c,r)},...n}},ybe=e=>_e(lG()),cG=e=>`/api/company/profile/contacts/${encodeURIComponent(String(e))}`,uG=async(e,t,n)=>ce(cG(e),{...n,method:"PATCH",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)}),dG=e=>{const t=["updateCompanyContact"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{contactId:c,data:d}=l??{};return uG(c,d,r)},...n}},xbe=e=>_e(dG()),fG=e=>`/api/company/profile/contacts/${encodeURIComponent(String(e))}/archive`,mG=async(e,t)=>ce(fG(e),{...t,method:"POST"}),pG=e=>{const t=["archiveCompanyContact"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{contactId:c}=l??{};return mG(c,r)},...n}},vbe=e=>_e(pG()),hG=()=>"/api/company/profile/addresses",gG=async(e,t)=>ce(hG(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)}),yG=e=>{const t=["createCompanyAddress"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{data:c}=l??{};return gG(c,r)},...n}},bbe=e=>_e(yG()),xG=e=>`/api/company/profile/addresses/${encodeURIComponent(String(e))}`,vG=async(e,t,n)=>
50ce(xG(e),{...n,method:"PATCH",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)}),bG=e=>{const t=["updateCompanyAddress"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{addressId:c,data:d}=l??{};return vG(c,d,r)},...n}},wbe=e=>_e(bG()),wG=e=>`/api/company/profile/addresses/${encodeURIComponent(String(e))}/archive`,SG=async(e,t)=>ce(wG(e),{...t,method:"POST"}),CG=e=>{const t=["archiveCompanyAddress"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{addressId:c}=l??{};return SG(c,r)},...n}},Sbe=e=>_e(CG()),NG=e=>{const t=new URLSearchParams;Object.entries(e||{}).forEach(([r,o])=>{o!==void 0&&t.append(r,o===null?"null":String(o))});const n=t.toString();return n.length>0?`/api/company/quotes?${n}`:"/api/company/quotes"},AG=async(e,t)=>ce(NG(e),{...t,method:"GET"}),EG=e=>["/api/company/quotes",...e?[e]:[]],jG=(e,t)=>{const{query:n,request:r}=t??{};return{queryKey:n?.queryKey??EG(e),queryFn:({signal:c})=>AG(e,{signal:c,...r}),...n}};function Cbe(e,t){const n=jG(e,t),r=Oe(n);return Je(r,n.queryKey)}const TG=e=>`/api/company/quotes/${encodeURIComponent(String(e))}`,kG=async(e,t)=>ce(TG(e),{...t,method:"GET"}),RG=e=>[`/api/company/quotes/${e}`],PG=(e,t)=>{const{query:n,request:r}=t??{};return{queryKey:n?.queryKey??RG(e),queryFn:({signal:c})=>kG(e,{signal:c,...r}),enabled:e!=null,...n}};function Nbe(e,t){const n=PG(e,t),r=Oe(n);return Je(r,n.queryKey)}const OG=e=>`/api/company/quotes/${encodeURIComponent(String(e))}/pay-link`,_G=async(e,t)=>ce(OG(e),{...t,method:"POST"}),IG=e=>{const t=["createCompanyQuotePayLink"],{mutation:n,request:r}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{quoteId:c}=l??{};return _G(c,r)},...n}},Abe=e=>_e(IG(e)),MG=(e,t)=>
50{const n=new URLSearchParams;Object.entries(t||{}).forEach(([o,l])=>{l!==void 0&&n.append(o,l===null?"null":String(l))});const r=n.toString();return r.length>0?`/api/company/quotes/${encodeURIComponent(String(e))}/versions/current.pdf?${r}`:`/api/company/quotes/${encodeURIComponent(String(e))}/versions/current.pdf`},Ebe=async(e,t,n)=>ce(MG(e,t),{...n,method:"GET"}),DG=e=>{const t=new URLSearchParams;Object.entries(e||{}).forEach(([r,o])=>{o!==void 0&&t.append(r,o===null?"null":String(o))});const n=t.toString();return n.length>0?`/api/company/orders?${n}`:"/api/company/orders"},LG=async(e,t)=>ce(DG(e),{...t,method:"GET"}),qG=e=>["/api/company/orders",...e?[e]:[]],UG=(e,t)=>{const{query:n,request:r}=t??{};return{queryKey:n?.queryKey??qG(e),queryFn:({signal:c})=>LG(e,{signal:c,...r}),...n}};function jbe(e,t){const n=UG(e,t),r=Oe(n);return Je(r,n.queryKey)}const zG=e=>{const t=new URLSearchParams;Object.entries(e||{}).forEach(([r,o])=>{o!==void 0&&t.append(r,o===null?"null":String(o))});const n=t.toString();return n.length>0?`/api/categories?${n}`:"/api/categories"},VG=async(e,t)=>ce(zG(e),{...t,method:"GET"}),BG=e=>["/api/categories",...e?[e]:[]],FG=(e,t)=>{const{query:n,request:r}={};return{queryKey:n?.queryKey??BG(e),queryFn:({signal:c})=>VG(e,{signal:c,...r}),...n}};function O_(e,t){const n=FG(e),r=Oe(n);return Je(r,n.queryKey)}const $G=e=>{const t=new URLSearchParams;Object.entries(e||{}).forEach(([r,o])=>{o!==void 0&&t.append(r,o===null?"null":String(o))});const n=t.toString();return n.length>0?`/api/products?${n}`:"/api/products"},HG=async(e,t)=>ce($G(e),{...t,method:"GET"}),Ow=e=>["/api/products",...e?[e]:[]],GG=(e,t)=>{const{query:n,request:r}=t??{};return{queryKey:n?.queryKey??Ow(e),queryFn:({signal:c})=>HG(e,{signal:c,...r}),...n}};function Lh(e,t){const n=GG(e,t),r=Oe(n);return Je(r,n.queryKey)}const KG=(e,t)=>{const n=new URLSearchParams;Object.entries(t||{}).forEach(([o,l])=>{l!==void 0&&n.append(o,l===null?"null":String(l))});const r=n.toString();return r.length>0?`/api/products/${encodeURIComponent(String(e))}?${r}`:`/api/products/${encodeURIComponent(String(e))}`},_w=async(e,t,n)=>ce(KG(e,t),{...n,method:"GET"}),qh=(e,t)=>[`/api/products/${e}`,...t?[t]:[]],YG=(e,t,n)=>{const{query:r,request:o}=n??{};return{queryKey:r?.queryKey??qh(e,t),queryFn:({signal:d})=>_w(e,t,{signal:d,...o}),enabled:e!=null,...r}},WG=(e,t,n)=>{const{query:r,request:o}=n??{};return{queryKey:r?.queryKey??qh(e,t),queryFn:({signal:d})=>_w(e,t,{signal:d,...o}),...r}},QG=e=>{const t=new URLSearchParams;Object.entries({}).forEach(([r,o])=>{o!==void 0&&t.append(r,o===null?"null":String(o))});const n=t.toString();return n.length>0?`/api/featured-products?${n}`:"/api/featured-products"},XG=async(e,t)=>ce(QG(),{...t,method:"GET"}),ZG=e=>["/api/featured-products"],JG=(e,t)=>{const{query:n,request:r}={};return{queryKey:n?.queryKey??ZG(),queryFn:({signal:c})=>XG(e,{signal:c,...r}),...n}};function eK(e,t){const n=JG(e),r=Oe(n);return Je(r,n.queryKey)}const tK=()=>"/api/partners/resources",Tbe=async e=>ce(tK(),{...e,method:"GET"}),nK=e=>`/api/partners/resources/collections/${encodeURIComponent(String(e))}`,kbe=async(e,t)=>ce(nK(e),{...t,method:"GET"}),rK=e=>`/api/partners/resources/assets/${encodeURIComponent(String(e))}/download`,Rbe=async(e,t)=>ce(rK(e),{...t,method:"GET"}),aK=e=>`/api/partners/resources/canva/${encodeURIComponent(String(e))}/open`,Pbe=async(e,t)=>ce(aK(e),{...t,method:"POST"}),sK=e=>`/api/partners/resources/resources/${encodeURIComponent(String(e))}/copy`,Obe=async(e,t)=>ce(sK(e),{...t,method:"POST"}),iK=e=>`/api/partners/resources/videos/${encodeURIComponent(String(e))}/play`,_be=async(e,t)=>ce(iK(e),{...t,method:"POST"}),oK=()=>"/api/restock/subscribe",lK=async(e,t)=>ce(oK(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)}),cK=e=>{const t=new URLSearchParams;Object.entries(e||{}).forEach(([r,o])=>{o!==void 0&&t.append(r,o===null?"null":String(o))});const n=t.toString();return n.length>0?`/api/requests/match?${n}`:"/api/requests/match"},uK=async(e,t)=>ce(cK(e),{...t,method:"GET"}),dK=()=>"/api/requests",fK=async e=>ce(dK(),{...e,method:"GET"}),mK=()=>["/api/requests"],pK=e=>{const{query:t,request:n}={};return{queryKey:t?.queryKey??mK(),queryFn:({signal:l})=>fK({signal:l,...n}),...t}};function Ibe(e){const t=pK(),n=Oe(t);return Je(n,t.queryKey)}const hK=()=>"/api/requests",gK=async(e,t)=>ce(hK(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)}),yK=e=>{const t=["fileRequest"],{mutation:n,request:r}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{data:c}=l??{};return gK(c,r)},...n}},Mbe=e=>_e(yK(e)),xK=()=>"/api/requests/grove",vK=async e=>ce(xK(),{...e,method:"GET"}),bK=()=>["/api/requests/grove"],wK=e=>{const{query:t,request:n}=e??{};return{queryKey:t?.queryKey??bK(),queryFn:({signal:l})=>vK({signal:l,...n}),...t}};function Dbe(e){const t=wK(e),n=Oe(t);return Je(n,t.queryKey)}const SK=e=>`/api/requests/${encodeURIComponent(String(e))}/vote`,CK=async(e,t)=>ce(SK(e),{...t,method:"POST"}),NK=e=>{const t=["voteRequest"],{mutation:n,request:r}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{id:c}=l??{};return CK(c,r)},...n}},Lbe=e=>_e(NK(e)),AK=e=>`/api/products/${encodeURIComponent(String(e))}/reviews`,EK=async(e,t)=>ce(AK(e),{...t,method:"GET"}),__=e=>[`/api/products/${e}/reviews`],jK=(e,t)=>{const{query:n,request:r}=t??{};return{queryKey:n?.queryKey??__(e),queryFn:({signal:c})=>EK(e,{signal:c,...r}),enabled:e!=null,...n}};function TK(e,t){const n=jK(e,t),r=Oe(n);return Je(r,n.queryKey)}const kK=e=>`/api/products/${encodeURIComponent(String(e))}/reviews`,RK=async(e,t,n)=>ce(kK(e),{...n,method:"POST",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)}),PK=e=>{const t=["submitProductReview"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{id:c,data:d}=l??{};return RK(c,d,r)},...n}},OK=e=>_e(PK()),_K=()=>"/api/cart",IK=async e=>ce(_K(),{...e,method:"GET"}),Cd=()=>["/api/cart"],MK=e=>{const{query:t,request:n}={};return{queryKey:t?.queryKey??Cd(),queryFn:({signal:l})=>IK({signal:l,...n}),...t}};function DK(e){const t=MK(),n=Oe(t);return Je(n,t.queryKey)}const LK=()=>"/api/cart",qK=async e=>ce(LK(),{...e,method:"DELETE"}),UK=e=>{const t=["clearCart"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:()=>qK(r),...n}},zK=e=>_e(UK()),VK=()=>"/api/cart/promo-code",BK=async(e,t)=>ce(VK(),{...t,method:"PUT",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)}),FK=e=>{const t=["setCartPromoCode"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{data:c}=l??{};return BK(c,r)},...n}},$K=e=>_e(FK()),HK=()=>"/api/cart/promo-code",GK=async e=>ce(HK(),{...e,method:"DELETE"}),KK=e=>{const t=["clearCartPromoCode"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:()=>GK(r),...n}},YK=e=>_e(KK()),WK=e=>`/api/cart/prize/${encodeURIComponent(String(e))}
50/apply`,QK=async(e,t)=>ce(WK(e),{...t,method:"POST"}),XK=e=>{const t=["applyCartPrize"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{playId:c}=l??{};return QK(c,r)},...n}},ZK=e=>_e(XK()),JK=()=>"/api/cart/gift",eY=async(e,t)=>ce(JK(),{...t,method:"PUT",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)}),tY=e=>{const t=["chooseCartGift"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{data:c}=l??{};return eY(c,r)},...n}},nY=e=>_e(tY()),rY=()=>"/api/cart/items",aY=async(e,t)=>ce(rY(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)}),sY=e=>{const t=["addCartItem"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{data:c}=l??{};return aY(c,r)},...n}},iY=e=>_e(sY()),oY=()=>"/api/cart/items/batch",lY=async(e,t)=>ce(oY(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)}),cY=e=>{const t=["addCartItemsBatch"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{data:c}=l??{};return lY(c,r)},...n}},uY=e=>_e(cY()),dY=()=>"/api/cart/mix-quote",fY=async(e,t)=>ce(dY(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)}),mY=e=>`/api/cart/items/${encodeURIComponent(String(e))}`,pY=async(e,t,n)=>ce(mY(e),{...n,method:"PUT",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)}),hY=e=>{const t=["updateCartItem"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{itemId:c,data:d}=l??{};return pY(c,d,r)},...n}},gY=e=>_e(hY()),yY=e=>`/api/cart/items/${encodeURIComponent(String(e))}`,xY=async(e,t)=>ce(yY(e),{...t,method:"DELETE"}),vY=e=>{const t=["removeCartItem"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{itemId:c}=l??{};return xY(c,r)},...n}},bY=e=>_e(vY()),wY=()=>"/api/shipping/quotes",SY=async(e,t)=>ce(wY(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)}),CY=e=>{const t=["createCustomerShippingQuotes"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{data:c}=l??{};return SY(c,r)},...n}},NY=e=>_e(CY()),AY=()=>"/api/checkout",EY=async(e,t)=>ce(AY(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)}),jY=e=>{const t=["placeOrder"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{data:c}=l??{};return EY(c,r)},...n}},TY=e=>_e(jY()),kY=()=>"/api/payment-methods",RY=async e=>ce(kY(),{...e,method:"GET"}),I_=()=>["/api/payment-methods"],PY=e=>{const{query:t,request:n}=e??{};return{queryKey:t?.queryKey??I_(),queryFn:({signal:l})=>RY({signal:l,...n}),...t}};function M_(e){const t=PY(e),n=Oe(t);return Je(n,t.queryKey)}const OY=(e,t)=>{const n=new URLSearchParams;Object.entries({}).forEach(([o,l])=>{l!==void 0&&n.append(o,l===null?"null":String(l))});const r=n.toString();return r.length>0?`/api/orders/${encodeURIComponent(String(e))}/payment?${r}`:`/api/orders/${encodeURIComponent(String(e))}/payment`},_Y=async(e,t,n)=>ce(OY(e),{...n,method:"GET"}),Eb=(e,t)=>[`/api/orders/${e}/payment`],IY=(e,t,n)=>{const{query:r,request:o}=n??{};return{queryKey:r?.queryKey??Eb(e),queryFn:({signal:d})=>_Y(e,t,{signal:d,...o}),enabled:e!=null,...r}};function MY(e,t,n){const r=IY(e,t,n),o=Oe(r);return Je(o,r.queryKey)}const DY=()=>"/api/orders",LY=async e=>ce(DY(),{...e,method:"GET"}),jb=()=>["/api/orders"],qY=e=>{const{query:t,request:n}=e??{};return{queryKey:t?.queryKey??jb(),queryFn:({signal:l})=>LY({signal:l,...n}),...t}};function qbe(e){const t=qY(e),n=Oe(t);return Je(n,t.queryKey)}const UY=e=>`/api/orders/${encodeURIComponent(String(e))}`,zY=async(e,t)=>ce(UY(e),{...t,method:"GET"}),Up=e=>[`/api/orders/${e}`],VY=(e,t)=>{const{query:n,request:r}=t??{};return{queryKey:n?.queryKey??Up(e),queryFn:({signal:c})=>zY(e,{signal:c,...r}),enabled:e!=null,...n}};function BY(e,t){const n=VY(e,t),r=Oe(n);return Je(r,n.queryKey)}const FY=e=>`/api/orders/${encodeURIComponent(String(e))}/pickup`,$Y=async(e,t,n)=>ce(FY(e),{...n,method:"PATCH",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)}),HY=e=>{const t=["reschedulePickup"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{id:c,data:d}=l??{};return $Y(c,d,r)},...n}},Ube=e=>_e(HY()),GY=e=>`/api/orders/${encodeURIComponent(String(e))}/fulfillment`,KY=async(e,t,n)=>ce(GY(e),{...n,method:"POST",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)}),YY=e=>{const t=["convertOrderFulfillment"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{id:c,data:d}=l??{};return KY(c,d,r)},...n}},zbe=e=>_e(YY()),WY=()=>"/api/pickup/settings",QY=async e=>ce(WY(),{...e,method:"GET"}),D_=()=>["/api/pickup/settings"],XY=e=>{const{query:t,request:n}=e??{};return{queryKey:t?.queryKey??D_(),queryFn:({signal:l})=>QY({signal:l,...n}),...t}};function ZY(e){const t=XY(e),n=Oe(t);return Je(n,t.queryKey)}const JY=()=>"/api/pickup/eligibility",eW=async(e,t)=>ce(JY(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)}),tW=e=>{const t=["checkPickupZipEligibility"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{data:c}=l??{};return eW(c,r)},...n}},nW=e=>_e(tW()),rW=()=>"/api/pickup/locations",aW=async e=>ce(rW(),{...e,method:"GET"}),L_=()=>["/api/pickup/locations"],sW=e=>{const{query:t,request:n}=e??{};return{queryKey:t?.queryKey??L_(),queryFn:({signal:l})=>aW({signal:l,...n}),...t}};function iW(e){const t=sW(e),n=Oe(t);return Je(n,t.queryKey)}const oW=(e,t)=>
50{const n=new URLSearchParams;Object.entries(t||{}).forEach(([o,l])=>{l!==void 0&&n.append(o,l===null?"null":String(l))});const r=n.toString();return r.length>0?`/api/pickup/locations/${encodeURIComponent(String(e))}/availability?${r}`:`/api/pickup/locations/${encodeURIComponent(String(e))}/availability`},lW=async(e,t,n)=>ce(oW(e,t),{...n,method:"GET"}),cW=(e,t)=>[`/api/pickup/locations/${e}/availability`,...t?[t]:[]],uW=(e,t,n)=>{const{query:r,request:o}={};return{queryKey:r?.queryKey??cW(e,t),queryFn:({signal:d})=>lW(e,t,{signal:d,...o}),enabled:e!=null,...r}};function dW(e,t,n){const r=uW(e,t),o=Oe(r);return Je(o,r.queryKey)}const fW=()=>"/api/delivery/available",mW=async e=>ce(fW(),{...e,method:"GET"}),q_=()=>["/api/delivery/available"],pW=e=>{const{query:t,request:n}=e??{};return{queryKey:t?.queryKey??q_(),queryFn:({signal:l})=>mW({signal:l,...n}),...t}};function hW(e){const t=pW(e),n=Oe(t);return Je(n,t.queryKey)}const gW=()=>"/api/delivery/check",yW=async(e,t)=>ce(gW(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)}),xW=e=>{const t=["checkDelivery"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{data:c}=l??{};return yW(c,r)},...n}},vW=e=>_e(xW()),bW=()=>"/api/users/me/addresses",wW=async e=>ce(bW(),{...e,method:"GET"}),U_=()=>["/api/users/me/addresses"],SW=e=>{const{query:t,request:n}=e??{};return{queryKey:t?.queryKey??U_(),queryFn:({signal:l})=>wW({signal:l,...n}),...t}};function CW(e){const t=SW(e),n=Oe(t);return Je(n,t.queryKey)}const NW=()=>"/api/users/me/addresses",AW=async(e,t)=>ce(NW(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)}),EW=e=>{const t=["createAddress"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{data:c}=l??{};return AW(c,r)},...n}},Vbe=e=>_e(EW()),jW=e=>`/api/users/me/addresses/${encodeURIComponent(String(e))}`,TW=async(e,t,n)=>ce(jW(e),{...n,method:"PUT",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)}),kW=e=>{const t=["updateAddress"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{id:c,data:d}=l??{};return TW(c,d,r)},...n}},Bbe=e=>_e(kW()),RW=e=>`/api/users/me/addresses/${encodeURIComponent(String(e))}`,PW=async(e,t)=>ce(RW(e),{...t,method:"DELETE"}),OW=e=>{const t=["deleteAddress"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{id:c}=l??{};return PW(c,r)},...n}},Fbe=e=>_e(OW()),_W=(e,t)=>{const n=new URLSearchParams;Object.entries(t||{}).forEach(([o,l])=>{l!==void 0&&n.append(o,l===null?"null":String(l))});const r=n.toString();return r.length>0?`/api/quotes/${encodeURIComponent(String(e))}?${r}`:`/api/quotes/${encodeURIComponent(String(e))}`},IW=async(e,t,n)=>ce(_W(e,t),{...n,method:"GET"}),MW=(e,t)=>[`/api/quotes/${e}
50`,...t?[t]:[]],$be=(e,t,n)=>{const{query:r,request:o}=n??{};return{queryKey:r?.queryKey??MW(e,t),queryFn:({signal:d})=>IW(e,t,{signal:d,...o}),enabled:e!=null,...r}},DW=e=>`/api/quotes/${encodeURIComponent(String(e))}/approve`,LW=async(e,t,n)=>ce(DW(e),{...n,method:"POST",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)}),qW=e=>{const t=["approvePublicBulkQuote"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{token:c,data:d}=l??{};return LW(c,d,r)},...n}},Hbe=e=>_e(qW()),UW=e=>`/api/quotes/${encodeURIComponent(String(e))}/pay`,zW=async(e,t,n)=>ce(UW(e),{...n,method:"POST",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)}),VW=e=>{const t=["payPublicBulkQuote"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{token:c,data:d}=l??{};return zW(c,d,r)},...n}},Gbe=e=>_e(VW()),BW=e=>`/api/coa/${encodeURIComponent(String(e))}`,FW=async(e,t)=>ce(BW(e),{...t,method:"GET"}),$W=e=>[`/api/coa/${e}`],Kbe=(e,t)=>{const{query:n,request:r}=t??{};return{queryKey:n?.queryKey??$W(e),queryFn:({signal:c})=>FW(e,{signal:c,...r}),enabled:e!=null,...n}},HW=()=>"/api/promo/validate",GW=async(e,t)=>ce(HW(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)}),KW=()=>"/api/referrals/me/funnel",YW=async e=>ce(KW(),{...e,method:"GET"}),WW=()=>["/api/referrals/me/funnel"],QW=e=>{const{query:t,request:n}=e??{};return{queryKey:t?.queryKey??WW(),queryFn:({signal:l})=>YW({signal:l,...n}),...t}};function Ybe(e){const t=QW(e),n=Oe(t);return Je(n,t.queryKey)}const XW=()=>"/api/promotions/active",ZW=async e=>ce(XW(),{...e,method:"GET"}),z_=()=>["/api/promotions/active"],JW=e=>{const{query:t,request:n}=e??{};return{queryKey:t?.queryKey??z_(),queryFn:({signal:l})=>ZW({signal:l,...n}),...t}};function eQ(e){const t=JW(e),n=Oe(t);return Je(n,t.queryKey)}const tQ=()=>"/api/address/validate",nQ=async(e,t)=>ce(tQ(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)}),rQ=()=>"/api/support/apply",aQ=async(e,t)=>ce(rQ(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)}),sQ=e=>{const t=["supportApply"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{data:c}=l??{};return aQ(c,r)},...n}},Wbe=e=>_e(sQ()),iQ=()=>"/api/support/my-application",oQ=async e=>ce(iQ(),{...e,method:"GET"}),lQ=()=>["/api/support/my-application"],cQ=e=>{const{query:t,request:n}=e??{};return{queryKey:t?.queryKey??lQ(),queryFn:({signal:l})=>oQ({signal:l,...n}),...t}};function Qbe(e){const t=cQ(e),n=Oe(t);return Je(n,t.queryKey)}const uQ=e=>`/api/support/campaigns/by-code/${encodeURIComponent(String(e))}`,dQ=async(e,t)=>ce(uQ(e),{...t,method:"GET"}),V_=e=>[`/api/support/campaigns/by-code/${e}`],fQ=(e,t)=>{const{query:n,request:r}=t??{};return{queryKey:n?.queryKey??V_(e),queryFn:({signal:c})=>dQ(e,{signal:c,...r}),enabled:e!=null,...n}};function mQ(e,t){const n=fQ(e,t),r=Oe(n);return Je(r,n.queryKey)}const pQ=e=>`/api/support/campaigns/${encodeURIComponent(String(e))}`,hQ=async(e,t)=>ce(pQ(e),{...t,method:"GET"}),gQ=e=>[`/api/support/campaigns/${e}`],yQ=(e,t)=>{const{query:n,request:r}=t??{};return{queryKey:n?.queryKey??gQ(e),queryFn:({signal:c})=>hQ(e,{signal:c,...r}),enabled:e!=null,...n}};function Xbe(e,t){const n=yQ(e,t),r=Oe(n);return Je(r,n.queryKey)}const xQ=e=>{const t=new URLSearchParams;Object.entries(e||{}).forEach(([r,o])=>{o!==void 0&&t.append(r,o===null?"null":String(o))});const n=t.toString();return n.length>0?`/api/support/availability?${n}`:"/api/support/availability"},vQ=async(e,t)=>ce(xQ(e),{...t,method:"GET"}),bQ=e=>["/api/support/availability",...e?[e]:[]],wQ=(e,t)=>{const{query:n,request:r}=t??{};return{queryKey:n?.queryKey??bQ(e),queryFn:({signal:c})=>vQ(e,{signal:c,...r}),...n}};function Zbe(e,t){const n=wQ(e,t),r=Oe(n);return Je(r,n.queryKey)}const SQ=e=>{const t=new URLSearchParams;Object.entries(e||{}).forEach(([r,o])=>{o!==void 0&&t.append(r,o===null?"null":String(o))});const n=t.toString();return n.length>0?`/api/support/campaigns?${n}`:"/api/support/campaigns"},CQ=async(e,t)=>ce(SQ(e),{...t,method:"GET"}),NQ=e=>["/api/support/campaigns",...e?[e]:[]],AQ=(e,t)=>{const{query:n,request:r}=t??{};return{queryKey:n?.queryKey??NQ(e),queryFn:({signal:c})=>CQ(e,{signal:c,...r}),...n}};function Jbe(e,t){const n=AQ(e,t),r=Oe(n);return Je(r,n.queryKey)}const EQ=()=>
50"/api/support/campaigns",jQ=async(e,t)=>ce(EQ(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)}),TQ=e=>{const t=["supportCreateCampaign"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{data:c}=l??{};return jQ(c,r)},...n}},e0e=e=>_e(TQ()),kQ=()=>"/api/support/my-campaigns",RQ=async e=>ce(kQ(),{...e,method:"GET"}),PQ=()=>["/api/support/my-campaigns"],OQ=e=>{const{query:t,request:n}=e??{};return{queryKey:t?.queryKey??PQ(),queryFn:({signal:l})=>RQ({signal:l,...n}),...t}};function t0e(e){const t=OQ(e),n=Oe(t);return Je(n,t.queryKey)}const _Q=()=>"/api/support/my-contributions",IQ=async e=>ce(_Q(),{...e,method:"GET"}),MQ=()=>["/api/support/my-contributions"],DQ=e=>{const{query:t,request:n}=e??{};return{queryKey:t?.queryKey??MQ(),queryFn:({signal:l})=>IQ({signal:l,...n}),...t}};function n0e(e){const t=DQ(e),n=Oe(t);return Je(n,t.queryKey)}const LQ=e=>`/api/support/my-campaigns/${encodeURIComponent(String(e))}`,qQ=async(e,t,n)=>ce(LQ(e),{...n,method:"PATCH",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)}),UQ=e=>{const t=["supportUpdateMyCampaign"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{id:c,data:d}=l??{};return qQ(c,d,r)},...n}},r0e=e=>_e(UQ()),zQ=e=>`/api/support/my-campaigns/${encodeURIComponent(String(e))}/go-live`,VQ=async(e,t)=>ce(zQ(e),{...t,method:"POST"}),BQ=e=>{const t=["supportTakeMyCampaignLive"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{id:c}=l??{};return VQ(c,r)},...n}},a0e=e=>_e(BQ()),FQ=()=>"/api/storage/campaign-uploads/request-url",$Q=async(e,t)=>ce(FQ(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)}),HQ=e=>{const t=["supportRequestCampaignImageUpload"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{data:c}=l??{};return $Q(c,r)},...n}},s0e=e=>_e(HQ()),GQ=e=>`/api/support/my-campaigns/${encodeURIComponent(String(e))}/media/commit`,KQ=async(e,t,n)=>ce(GQ(e),{...n,method:"POST",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)}),YQ=e=>{const t=["supportCommitCampaignMedia"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{id:c,data:d}=l??{};return KQ(c,d,r)},...n}},i0e=e=>_e(YQ()),WQ=e=>`/api/support/my-campaigns/${encodeURIComponent(String(e))}/updates`,QQ=async(e,t,n)=>ce(WQ(e),{...n,method:"POST",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)}),XQ=e=>{const t=["supportPostCampaignUpdate"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{id:c,data:d}=l??{};return QQ(c,d,r)},...n}},o0e=e=>_e(XQ()),ZQ=()=>"/api/support/rails",JQ=async e=>ce(ZQ(),{...e,method:"GET"}),eX=()=>["/api/support/rails"],tX=e=>{const{query:t,request:n}=e??{};return{queryKey:t?.queryKey??eX(),queryFn:({signal:l})=>JQ({signal:l,...n}),...t}};function l0e(e){const t=tX(e),n=Oe(t);return Je(n,t.queryKey)}const nX=e=>`/api/support/campaigns/${encodeURIComponent(String(e))}/leafs`,rX=async(e,t,n)=>ce(nX(e),{...n,method:"POST",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)}),aX=e=>{const t=["supportPurchaseLeaf"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{slug:c,data:d}=l??{};return rX(c,d,r)},...n}},c0e=e=>_e(aX()),sX=(e,t)=>{const n=new URLSearchParams;Object.entries(t||{}).forEach(([o,l])=>{l!==void 0&&n.append(o,l===null?"null":String(l))});const r=n.toString();return r.length>0?`/api/support/contribution/${encodeURIComponent(String(e))}?${r}`:`/api/support/contribution/${encodeURIComponent(String(e))}`},iX=async(e,t,n)=>ce(sX(e,t),{...n,method:"GET"}),oX=(e,t)=>[`/api/support/contribution/${e}`,...t?[t]:[]],lX=(e,t,n)=>{const{query:r,request:o}=n??{};return{queryKey:r?.queryKey??oX(e,t),queryFn:({signal:d})=>iX(e,t,{signal:d,...o}),enabled:e!=null,...r}};
50function u0e(e,t,n){const r=lX(e,t,n),o=Oe(r);return Je(o,r.queryKey)}const cX=e=>`/api/support/campaigns/${encodeURIComponent(String(e))}/wishes`,uX=async(e,t,n)=>ce(cX(e),{...n,method:"POST",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)}),dX=e=>{const t=["supportCreateWish"],{mutation:n,request:r}={mutation:{mutationKey:t},request:void 0};return{mutationFn:l=>{const{slug:c,data:d}=l??{};return uX(c,d,r)},...n}},d0e=e=>_e(dX()),fX=e=>`/api/wallet-approval/${encodeURIComponent(String(e))}`,f0e=async(e,t)=>ce(fX(e),{...t,method:"GET"}),m0e=e=>[`/api/wallet-approval/${e}`],mX=e=>`/api/wallet-approval/${encodeURIComponent(String(e))}/approve`,p0e=async(e,t,n)=>ce(mX(e),{...n,method:"POST",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)}),pX=e=>`/api/wallet-approval/${encodeURIComponent(String(e))}/decline`,h0e=async(e,t)=>ce(pX(e),{...t,method:"POST"}),hX=()=>"/api/ai/vida/threads",gX=async e=>ce(hX(),{...e,method:"GET"}),yX=()=>["/api/ai/vida/threads"],xX=e=>{const{query:t,request:n}={};return{queryKey:t?.queryKey??yX(),queryFn:({signal:l})=>gX({signal:l,...n}),...t}};function g0e(e){const t=xX(),n=Oe(t);return Je(n,t.queryKey)}const vX=()=>"/api/vida-files/current",bX=async e=>ce(vX(),{...e,method:"GET"}),B_=()=>["/api/vida-files/current"],wX=e=>{const{query:t,request:n}=e??{};return{queryKey:t?.queryKey??B_(),queryFn:({signal:l})=>bX({signal:l,...n}),...t}};function SX(e){const t=wX(e),n=Oe(t);return Je(n,t.queryKey)}const CX=e=>{const t=new URLSearchParams;Object.entries(e||{}).forEach(([r,o])=>{o!==void 0&&t.append(r,o===null?"null":String(o))});const n=t.toString();return n.length>0?`/api/vida-files?${n}`:"/api/vida-files"},NX=async(e,t)=>ce(CX(e),{...t,method:"GET"}),AX=e=>["/api/vida-files",...e?[e]:[]],EX=(e,t)=>{const{query:n,request:r}=t??{};return{queryKey:n?.queryKey??AX(e),queryFn:({signal:c})=>NX(e,{signal:c,...r}),...n}};function y0e(e,t){const n=EX(e,t),r=Oe(n);return Je(r,n.queryKey)}const jX=e=>`/api/vida-files/${encodeURIComponent(String(e))}`,TX=async(e,t)=>ce(jX(e),{...t,method:"GET"}),kX=e=>[`/api/vida-files/${e}`],RX=(e,t)=>{const{query:n,request:r}=t??{};return{queryKey:n?.queryKey??kX(e),queryFn:({signal:c})=>TX(e,{signal:c,...r}),enabled:e!=null,...n}};function x0e(e,t){const n=RX(e,t),r=Oe(n);return Je(r,n.queryKey)}const v0e={billing:"billing",shipping:"shipping",both:"both"},b0e={qr:"qr",email:"email",sms:"sms"},ma={price_asc:"price_asc",price_desc:"price_desc",name_asc:"name_asc",newest:"newest"},F_={pathRoutes:[{id:"supplier-application",templates:["/suppliers/status/:token","/api/supplier-portal/application/:token"]},{id:"supplier-invite",templates:["/suppliers/invite/:token","/api/supplier-portal/invite/:token"]},{id:"wallet-approval",templates:["/wallet-approve/:token","/api/wallet-approval/:token"]},{id:"partner-invite",templates:["/partners/invite/:token","/api/partners/invite/:token"]},{id:"care-invite",templates:["/invite/:token","/api/care/invite/:token"]},{id:"supplier-purchase-order",templates:["/po/:token","/api/po/:token"]},{id:"shipment-hub",templates:["/s/:token","/s/:token/lines","/s/:token/coas"]},{id:"quote",templates:["/quote/:token","/api/quotes/:token"]},{id:"pay-link",templates:["/pay/:token","/api/pay/:token"],excludedTokenSegments:["frame","complete"]},{id:"partner-overlay",templates:["/overlay/:token"]},{id:"shipment-tracking",templates:["/track/:trackingNumber","/api/track/:trackingNumber"],parameter:"trackingNumber",redaction:"trackingNumber"},{id:"better-auth-password-reset-callback",templates:["/api/auth/reset-password/:token"]}],queryRoutes:[{id:"support-contribution",templates:["/support/contribution/:leafId","/api/support/contribution/:leafId"],queryParameters:["t"]},{id:"account-email-alias-confirmation",templates:["/confirm-email","/api/account/login-aliases/preview","/api/account/login-aliases/verify"],queryParameters:["token"]},{id:"account-password-reset",templates:["/reset-password","/api/auth/reset-password"],queryParameters:["token"]},{id:"account-email-verification",templates:["/verify-email","/api/auth/verify-email"],queryParameters:["token"]},{id:"account-magic-link",templates:["/api/auth/magic-link/verify"],queryParameters:["token"]},{id:"pin-enrollment",templates:["/pin-setup","/api/account/pin/enrollment","/api/admin/pin-enrollment"],queryParameters:["token"]},{id:"email-unsubscribe",templates:["/api/email/unsubscribe"],queryParameters:["token"]},{id:"pickup-calendar",templates:["/api/admin/pickup/calendar.ics"],queryParameters:["token"]},{id:"chatwoot-webhook",templates:["/api/webhooks/chatwoot"],queryParameters:["token"]},{id:"prayer-guest-management",templates:["/p/:slug","/api/prayer/requests/:slug/manage","/api/prayer/requests/:slug/bridge"],queryParameters:["k"]},{id:"hub-session-handoff",templates:["/auth/handoff"],queryParameters:["code","state"]}
50,{id:"hub-oidc-callback",templates:["/api/hub/oidc/callback"],queryParameters:["code","state"]},{id:"stripe-payment-frame",templates:["/pay/frame"],queryParameters:["cs"]}]},$_="[a-z0-9._~-]+",Tb=[{slash:"%252F",question:"%253F",fragment:"%2523",equals:"%253D",ampersand:"%2526",placeholder:"%253Atoken"},{slash:"%2F",question:"%3F",fragment:"%23",equals:"%3D",ampersand:"%26",placeholder:"%3Atoken"},{slash:"/",question:"?",fragment:"#",equals:"=",ampersand:"&",placeholder:":token"}];function lr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function PX(e,t){return e.split("/").map(n=>lr(n)).join(lr(t.slash))}function OX(e,t){return e.split("/").map(n=>n.startsWith(":")?$_:lr(n)).join(lr(t.slash))}function H_(e){let t=e;const n=[...F_.pathRoutes].sort((r,o)=>Math.max(...o.templates.map(l=>l.length))-Math.max(...r.templates.map(l=>l.length)));for(const r of Tb){const o=lr(r.slash),l=lr(r.question),c=lr(r.fragment);for(const d of n)for(const m of[...d.templates].sort((p,y)=>y.length-p.length)){const y=`:${d.parameter??"token"}`,g=m.indexOf(y);if(g<0)continue;const v=m.slice(0,g),b=v.split("/").join(r.slash),S=new RegExp(`${PX(v,r)}(${$_})(?=${o}|${l}|${c}|[?/#&\\s"'<>]|$)`,"gi");t=t.replace(S,(C,N)=>{if(N.startsWith(":")||d.excludedTokenSegments?.some(j=>j.toLowerCase()===N.toLowerCase()))return C;const A=r.slash==="/"?"/":C.match(new RegExp(lr(r.slash),"i"))?.[0]??r.slash,T=d.redaction??"token",E=r.placeholder.replace(/token$/u,T);return`${b.split(r.slash).join(A)}${E}`})}}return t}function _X(e){let t=e;for(const[n,r]of Tb.entries()){const o=lr(r.question),l=lr(r.fragment),c=lr(r.ampersand),d=lr(r.equals),p=`(?:${Tb.slice(n).flatMap(g=>[lr(g.ampersand),lr(g.fragment)]).join("|")})`,y=`(?:(?!${p})[^\\s"'<>])+`;for(const g of F_.queryRoutes)for(const v of g.templates){const b=new RegExp(`(${OX(v,r)}(?:${lr(r.slash)})?(?:${o}|${l}))([^\\s"'<>]*)`,"gi");t=t.replace(b,(S,C,N)=>{let A=N;for(const T of g.queryParameters){const E=new RegExp(`(^|${c}|${l})(${lr(T)})${d}(${y})(?=${p}|[\\s"'<>]|$)`,"gi");A=A.replace(E,(j,_,R)=>`${_}${R}${r.equals}${r.placeholder}`)}return`${C}${A}`})}}return t}function Iw(e){return _X(H_(e))}function G_(e){return Iw(e)!==e}function oj(e){const t=e.split(/[?#]/,1)[0]??e;return H_(t)}function kb(e,t=new Set){return typeof e=="string"?G_(e):!e||typeof e!="object"||t.has(e)?!1:(t.add(e),Array.isArray(e)?e.some(n=>kb(n,t)):Object.values(e).some(n=>kb(n,t)))}function Rb(e,t=new Map){if(typeof e=="string")return Iw(e);if(!e||typeof e!="object"||!Array.isArray(e)&&Object.getPrototypeOf(e)!==Object.prototype&&Object.getPrototypeOf(e)!==null)return e;if(t.has(e))return t.get(e);if(Array.isArray(e)){const r=[];t.set(e,r);for(const o of e)r.push(Rb(o,t));return r}const n={};t.set(e,n);for(const[r,o]of Object.entries(e))n[r]=Rb(o,t);return n}const Hi="vidapeps-cart-token",IX="vidapeps-consent",MX="vidapeps-consent-cats",DX="vidapeps-gpc-recorded",LX="vidapeps-promo-code",qX="vidapeps-promo-dismissed";function UX(e){return e.endsWith("vidapeps.com")}const K_="2026-06-15",Uh=IX,Y_=MX,zX="pv-gate-ok",zp="vp_vid",Mw="vp_anon",Pb="vp_anon_s",lj="vp_sid",W_=20,Q_=4e3,X_=3600*24*396,cj="vp_attr",VX=128;function td(e){const t=(e??"").trim().slice(0,VX);return t.length>0?t:void 0}function BX(e){try{const t=new URL(e).hostname.toLowerCase();if(!t||!/^[a-z0-9.-]{1,255}$/.test(t))return;const n=typeof location<"u"?location.hostname.toLowerCase():"";return t===n||n&&t.endsWith(`.${n}`)||UX(t)?void 0:t}catch{return}}function Z_(){try{const t=sessionStorage.getItem(cj);if(t)return JSON.parse(t)}catch{}const e={};try{const t=new URLSearchParams(location.search);e.utmSource=td(t.get("utm_source")),e.utmMedium=td(t.get("utm_medium")),e.utmCampaign=td(t.get("utm_campaign")),e.utmTerm=td(t.get("utm_term")),e.utmContent=td(t.get("utm_content")),typeof document<"u"&&document.referrer&&(e.referrer=BX(document.referrer))}catch{}for(const t of Object.keys(e))e[t]===void 0&&delete e[t];try{sessionStorage.setItem(cj,JSON.stringify(e))}catch{}return e}const Dw="vp_evq",FX=200,$X=64*1024,Ob="/api/c/collect";function J_(){return typeof navigator<"u"&&navigator.globalPrivacyControl
50===!0}function eI(){try{return localStorage.getItem(zX)==="1"}catch{return!0}}function Lw(){try{const e=localStorage.getItem(Y_);if(e){const n=JSON.parse(e);if(n&&typeof n=="object")return{preferences:!!n.preferences,statistics:!!n.statistics,marketing:!!n.marketing}}const t=localStorage.getItem(Uh);if(t==="accepted")return{preferences:!0,statistics:!0,marketing:!0};if(t==="essential")return{preferences:!1,statistics:!1,marketing:!1}}catch{}return J_()?{preferences:!1,statistics:!1,marketing:!1}:null}function Vp(e){return e==="necessary"?!0:Lw()?.[e]===!0}function HX(){const e=Lw();return e?e.statistics?"accepted":"essential":null}function il(){return Vp("statistics")}function tI(e,t=!0){try{localStorage.setItem(Y_,JSON.stringify(e)),localStorage.setItem(Uh,e.statistics?"accepted":"essential")}catch{}e.statistics?rI():(XX(),Bp()),t&&nI(e)}function w0e(e,t,n=!1){const r=Lw()??{preferences:!1,statistics:!1,marketing:!1};tI({...r,[e]:t},n)}function uj(e){if(typeof document>"u")return;const t=typeof location<"u"&&location.protocol==="https:"?"; Secure":"";document.cookie=`${Mw}=${e}; Max-Age=${X_}; Path=/; SameSite=Lax${t}`}function GX(){const e=zh(Mw);if(e)return uj(e),e;let t=null;try{t=sessionStorage.getItem(Pb)}catch{}const n=t??qw();if(Vp("preferences")||Vp("statistics"))uj(n);else try{sessionStorage.setItem(Pb,n)}catch{}return n}function KX(){const e=zh(Mw);if(e)return e;try{return sessionStorage.getItem(Pb)}catch{return null}}function YX(){if(typeof window>"u")return;const e=KX(),t=zh(zp);if(!(!e&&!t))try{fetch("/api/identity/reconcile",{method:"POST",headers:{"content-type":"application/json"},credentials:"include",keepalive:!0,body:JSON.stringify({...e?{anonId:e}:{},...t?{visitorId:t}:{}})}).catch(()=>{})}catch{}}function nI(e){if(typeof window>"u")return;const t=GX(),n=JSON.stringify({categories:{preferences:e.preferences,statistics:e.statistics,marketing:e.marketing},anonymousId:t,policyVersion:K_,disclosureSnapshot:`Cookie banner - preferences:${e.preferences} statistics:${e.statistics} marketing:${e.marketing}`});try{fetch("/api/consent/cookies",{method:"POST",headers:{"content-type":"application/json"},credentials:"include",keepalive:!0,body:n}).catch(()=>{})}catch{}}const dj=DX;function WX(){if(!(typeof window>"u"||!J_())){try{if(localStorage.getItem(Uh)||localStorage.getItem(dj))return;localStorage.setItem(dj,"1")}catch{return}nI({preferences:!1,statistics:!1,marketing:!1})}}function qw(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`v-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,12)}`}const fj="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function QX(){let e=Date.now(),t="";for(let r=0;r<10;r++)t=fj[e%32]+t,e=Math.floor(e/32);let n="";for(let r=0;r<16;r++)n+=fj[Math.floor(Math.random()*32)];return t+n}function zh(e){if(typeof document>"u")return null;for(const t of document.cookie.split(";")){const n=t.indexOf("=");if(n!==-1&&t.slice(0,n).trim()===e)try{return decodeURIComponent(t.slice(n+1).trim())||null}catch{return null}}return null}function rI(){const e=zh(zp)??qw(),t=typeof location<"u"&&location.protocol==="https:"?"; Secure":"";return document.cookie=`${zp}=${e}; Max-Age=${X_}; Path=/; SameSite=Lax${t}`,e}function XX(){typeof document>"u"||(document.cookie=`${zp}=; Max-Age=0; Path=/; SameSite=Lax`)}function ZX(){try{let e=sessionStorage.getItem(lj);return e||(e=qw(),sessionStorage.setItem(lj,e)),e}catch{return"no-session"}}const In=[];let Qo=null;function aI(e){return e.slice(0,512)}function Vh(e){if(e.startsWith("/")){const t=e.split(/[?#]/,1)[0]??e;if(/^\/pay\/(?:frame|complete)\/?$/i.test(t))return t;const n=oj(t);if(n!==t)return n}try{const t=new URL(e).pathname,n=oj(t);if(n!==t)return n}catch{}return aI(Iw(e))}function Uw(e){return typeof e.path=="string"?{...e,path:Vh(e.path)}:e}function zw(){try{for(let t=0;t<In.length;t+=1){const n=In[t];n&&(In[t]=Uw(n))}for(;In.length>FX;)In.shift();let e=JSON.stringify(In);for(;e.length>$X&&In.length>1;)In.shift(),e=JSON.stringify(In);localStorage.setItem(Dw,e)}catch{}}function JX(){try{const e=localStorage.getItem(Dw);if(!e)return;const t=JSON.parse(e);if(!Array.isArray(t))return;for(const n of t)n&&typeof n.type=="string"&&typeof n.sessionId=="string"&&typeof n.idempotencyKey=="string"&&In.push(Uw(n))}catch{}}function Bp(){In.length=0;try{localStorage.removeItem(Dw)}catch{}}function zc(e){if(!(typeof window>"u"||!eI()||!il())){if(rI(),In.push({...Z_(),...e,sessionId:ZX(),idempotencyKey:QX()}),zw(),In.length>=W_){ol();return}Qo===null&&(Qo=window.setTimeout(()=>
50ol(),Q_))}}const eZ="anon-aggregate";function Bh(e,t){if(typeof window>"u"||!eI()||il())return;const n=JSON.stringify([{type:e,sessionId:eZ,...t?{path:Vh(t)}:{}}]);fetch(Ob,{method:"POST",headers:{"content-type":"application/json"},credentials:"omit",keepalive:!0,body:n}).catch(()=>{})}function mj(e){In.push(...e),zw(),Qo===null&&typeof window<"u"&&(Qo=window.setTimeout(()=>ol(),Q_))}function ol(e=!1){if(Qo!==null&&(window.clearTimeout(Qo),Qo=null),!(typeof window>"u")){if(!il()){Bp();return}for(;In.length>0;){const t=In.slice(0,W_).map(Uw),n=JSON.stringify(t);if(e&&typeof navigator<"u"&&"sendBeacon"in navigator&&navigator.sendBeacon(Ob,new Blob([n],{type:"application/json"}))){In.splice(0,t.length);continue}In.splice(0,t.length),fetch(Ob,{method:"POST",headers:{"content-type":"application/json"},credentials:"same-origin",keepalive:!0,body:n}).then(r=>{!r.ok&&r.status>=500&&mj(t)}).catch(()=>mj(t))}zw()}}typeof window<"u"&&(Z_(),JX(),In.length>0&&(il()?ol():Bp()),window.addEventListener("online",()=>ol()),window.addEventListener("storage",e=>{e.key===Uh&&e.newValue!=="accepted"&&Bp()}));typeof document<"u"&&(document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&ol(!0)}),window.addEventListener("pagehide",()=>ol(!0)));function tZ(e){const t=Vh(e);zc({type:"page_view",path:t}),Bh("page_view",t)}function nZ(e,t){const n=t?Vh(t):void 0;zc({type:"product_view",productId:e,path:n}),Bh("product_view",n)}function pj(e){zc({type:"add_to_cart",...e}),Bh("add_to_cart")}function rZ(e){zc({type:"remove_from_cart",...e})}function aZ(e){zc({type:"begin_checkout",path:"/checkout",valueCents:e}),Bh("begin_checkout","/checkout")}function sZ(e){const t=e.trim();t&&zc({type:"search",path:aI(`/products?q=${encodeURIComponent(t)}`),query:t.slice(0,120)})}const Vw="vp-recently-viewed",sI=12;function iI(){if(typeof window>"u")return[];try{const e=window.localStorage.getItem(Vw);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(n=>typeof n=="string"&&n.trim().length>0).slice(0,sI):[]}catch{return[]}}function iZ(e){const t=e?.trim();if(!(!t||typeof window>"u"||!Vp("preferences")))try{const n=[t,...iI().filter(r=>r!==t)].slice(0,sI);window.localStorage.setItem(Vw,JSON.stringify(n))}catch{}}function oZ(e){const t=iI();return e?t.filter(n=>n!==e):t}function Tx(){if(!(typeof window>"u"))try{window.localStorage.removeItem(Vw)}catch{}}const lZ="anonymous";function cZ(e){if(!e||typeof e!="object")return;const{status:t,statusCode:n}=e;return typeof t=="number"?t:typeof n=="number"?n:void 0}function hj(e){if(e.isPending)return{status:"unresolved"};if(!e.error)return{status:"settled",userId:e.userId};const t=cZ(e.error);return t===401||t===403?{status:"settled",userId:null}:{status:"unresolved"}}function uZ(e){return e==null?lZ:`user:${String(e)}`}function dZ(e){let t;return{synchronize(n){if(n.status==="unresolved")return"unresolved";const r=uZ(n.userId);return t===void 0?(t=r,"initialized"):t===r?"stable":(t=r,e.clear(),"cleared")},clearForConfirmedAuthBoundary(){e.clear()}}}var fZ={};const up=Object.create(null),nd=e=>fZ||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?up:globalThis),Ui=new Proxy(up,{get(e,t){return nd()[t]??up[t]},has(e,t){return t in nd()||t in up},set(e,t,n){const r=nd(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;const n=nd(!0);return delete n[t],!0},ownKeys(){const e=nd(!0);return Object.keys(e)}});Ui.NODE_ENV;function Bw(e){return Object.fromEntries(Object.entries(e).map(([t,n])=>[t,{code:t,message:n,toString:()=>t}]))}var Nd=class extends Error{constructor(e,t){super(e,t),this.name="BetterAuthError",this.message=e,this.stack=""}};const mZ=47;function oI(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===mZ;)t--;return t===e.length?e:e.slice(0,t)}function pZ(e){try{return(oI(new URL(e).pathname)||"/")!=="/"}catch{throw new Nd(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function hZ(e){try{const t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")throw new Nd(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof Nd?t:new Nd(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function kx(e,t="/api/auth"){if(hZ(e),pZ(e))return e;const n=oI(e);return!t||t==="/"?n:(t=t.startsWith("/")?t:`/${t}`,`${n}${t}`)}function gZ(e,t,n,r,o){if(e)return kx(e,t);{const l=Ui.BETTER_AUTH_URL||Ui.NEXT_PUBLIC_BETTER_AUTH_URL||Ui.PUBLIC_BETTER_AUTH_URL||Ui.NUXT_PUBLIC_BETTER_AUTH_URL||Ui.NUXT_PUBLIC_AUTH_URL||(Ui.BASE_URL!=="/"?Ui.BASE_URL:void 0);if(l)return kx(l,t)}if(typeof window<"u"&&window.location)return kx(window.location.origin,t)}const yZ={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},xZ=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,gj={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},vZ=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function bZ(e){return e instanceof Date&&!isNaN(e.getTime())}function wZ(e){const t=vZ.exec(e);if(!t)return null;const[,n,r,o,l,c,d,m,p,y,g]=t,v=new Date(Date.UTC(parseInt(n,10),parseInt(r,10)-1,parseInt(o,10),parseInt(l,10),parseInt(c,10),parseInt(d,10),m?parseInt(m.padEnd(3,"0"),10):0));if(p){const b=(parseInt(y,10)*60+parseInt(g,10))*(p==="+"?-1:1);v.setUTCMinutes(v.getUTCMinutes()+b)}return bZ(v)?v:null}function SZ(e,t={}){const{strict:n=!1,warnings:r=!1,reviver:o,parseDates:l=!0}=t;if(typeof e!="string")return e;const c=e.trim(),d=c.toLowerCase();if(d.length<=9&&d in gj)return gj[d];if(!xZ.test(c)){if(n)throw new SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(yZ).some(([m,p])=>{const y=p.test(c);return y&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${m} pattern`),y})&&n)throw new Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(c,(p,y)=>{if(p==="__proto__"||p==="constructor"&&y&&typeof y=="object"&&"prototype"in y){r&&console.warn(`[better-json] Dropping "${p}" key to prevent prototype pollution`);return}if(l&&typeof y=="string"){const g=wZ(y);if(g)return g}return o?o(p,y):y})}catch(m){if(n)throw m;return e}}function CZ(e,t={strict:!0}){return SZ(e,t)}const NZ=["javascript:","data:","vbscript:"];function AZ(e){let t;try{t=new URL(e)}catch{return!0}return!NZ.includes(t.protocol)}const EZ={id:"redirect",name:"Redirect",hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&AZ(e.data.url)&&typeof window<"u"&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}};let Ua=[],zi=0;const dp=4,jZ=globalThis.nanostoresGlobal||={epoch:0};let TZ=()=>{let e;for(zi=0;zi<Ua.length;zi+=dp)try{Ua[zi](Ua[zi+1].value,Ua[zi+2],Ua[zi+3])}catch(t){e=t}if(Ua.length=0,e)throw e};const Gi=e=>{let t=[],n={eq:Object.is,get(){return n.lc||n.listen(()=>{})(),n.value},init:e,lc:0,listen(r){return n.lc=t.push(r),()=>{for(let l=zi+dp;l<Ua.length;)Ua[l]===r?Ua.splice(l,dp):l+=dp;let o=t.indexOf(r);~o&&(t.splice(o,1),--n.lc||n.off())}},notify(r,o){jZ.epoch++;let l=!Ua.length&&!0;for(let c of t)Ua.push(c,n,r,o);l&&TZ()},off(){},set(r){let o=n.value;n.eq(o,r)||(n.value=r,n.notify(o))},subscribe(r){let o=n.listen(r);return r(n.value),o},value:e};return n},kZ=2,RZ=5,qm=6,Um=10;let lI=(e,t,n,r)=>(e.events=e.events||{}
50,e.events[n+Um]||(e.events[n+Um]=r(o=>{e.events[n].reduceRight((l,c)=>(c(l),l),{shared:{},...o})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let o=e.events[n],l=o.indexOf(t);o.splice(l,1),o.length||(delete e.events[n],e.events[n+Um](),delete e.events[n+Um])}),PZ=(e,t)=>lI(e,t,kZ,n=>{let r=e.set,o=e.setKey;return e.setKey&&(e.setKey=(l,c)=>{let d;if(n({abort:()=>{d=!0},changed:l,newValue:{...e.value,[l]:c}}),!d)return o(l,c)}),e.set=l=>{let c;if(n({abort:()=>{c=!0},newValue:l}),!c)return r(l)},()=>{e.set=r,e.setKey=o}});const cI=1e3;let uI=(e,t)=>lI(e,r=>{let o=t(r);o&&e.events[qm].push(o)},RZ,r=>{let o=e.listen;e.listen=(...c)=>(!e.lc&&!e.active&&(e.active=!0,r()),o(...c));let l=e.off;return e.events[qm]=[],e.off=()=>{l(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let c of e.events[qm])c();e.events[qm]=[]}},cI)},()=>{e.listen=o,e.off=l}});function yj(e,t){let n=OZ(t),r=e;for(let o of n){if(r==null)return;r=r[o]}return r}const xj=/(.*)\[(\d+)\]/;function OZ(e){return e.split(".").flatMap(t=>dI(t))}function dI(e){if(xj.test(e)){let[,t,n]=e.match(xj);return[...dI(t),n]}return[e]}function _Z(e,t,n){let r=new Set(t);return e.listen((o,l,c)=>{(c===void 0?t.some(d=>o[d]!==l[d]||yj(o,d)!==yj(l,d)):r.has(c)||r.has(c.split(/\.|\[/)[0]))&&n(o,l,c)})}function vj(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Cc(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Cc(e[n],t[n]))return!1;return!0}if(vj(e)&&vj(t)){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n)if(!(o in t)||!Cc(e[o],t[o]))return!1;return!0}return!1}function fI(e,t){return PZ(e,({newValue:n,abort:r})=>{t(e.value,n)&&r()})}const Rx=Symbol.for("better-auth:broadcast-channel"),IZ=()=>Math.floor(Date.now()/1e3);var MZ=class{listeners=new Set;name;constructor(e="better-auth.message"){this.name=e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if(!(typeof window>"u"))try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:IZ()}))}catch{}}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const e=t=>{if(t.key!==this.name)return;const n=JSON.parse(t.newValue??"{}");n?.event!=="session"||!n?.data||this.listeners.forEach(r=>r(n))};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}};function Px(e="better-auth.message"){return globalThis[Rx]||(globalThis[Rx]=new MZ(e)),globalThis[Rx]}const Ox=Symbol.for("better-auth:focus-manager");var DZ=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setFocused(e){this.listeners.forEach(t=>t(e))}setup(){if(typeof window>"u"||typeof document>"u"||typeof window.addEventListener>"u")return()=>{};const e=()=>{document.visibilityState==="visible"&&this.setFocused(!0)};return document.addEventListener("visibilitychange",e,!1),()=>{document.removeEventListener("visibilitychange",e,!1)}}};function bj(){return globalThis[Ox]||(globalThis[Ox]=new DZ),globalThis[Ox]}const _x=Symbol.for("better-auth:online-manager");var LZ=class{listeners=new Set;isOnline=typeof navigator<"u"?navigator.onLine:!0;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e))}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const e=()=>this.setOnline(!0),t=()=>this.setOnline(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",t,!1),()=>{window.removeEventListener("online",e,!1),window.removeEventListener("offline",t,!1)}}};function Ix(){return globalThis[_x]||(globalThis[_x]=new LZ),globalThis[_x]}const Mx=()=>Math.floor(Date.now()/1e3),qZ=5;function UZ(e){const{fetchSession:t,shouldPollSession:n=()=>!0,sessionSignal:r,options:o={}}=e,l=o.sessionOptions?.refetchInterval??0,c=o.sessionOptions?.refetchOnWindowFocus??!0,d=o.sessionOptions?.refetchWhenOffline??!1,m={isInitialized:!1,lastSessionRequest:0},p=()=>d||Ix().isOnline,y=E=>{if(p()){if(E?.event==="storage"){t();return}if(E?.event==="poll"){m.lastSessionRequest=Mx(),t();return}if(E?.event==="visibilitychange"){if(Mx()-m.lastSessionRequest<qZ)return;m.lastSessionRequest=Mx(),t();return}t()}},g=E=>{Px().post({event:"session",data:{trigger:E},clientId:Math.random().toString(36).substring(7)})},v=()=>{l&&l>0&&(m.pollInterval=setInterval(()=>{n()&&y({event:"poll"})},l*1e3))},b=()=>{m.unsubscribeBroadcast=Px().subscribe(()=>{y({event:"storage"})})},S=()=>{c&&(m.unsubscribeFocus=bj().subscribe(()=>{y({event:"visibilitychange"})}))},C=()=>{m.unsubscribeOnline=Ix().subscribe(E=>{E&&y({event:"visibilitychange"})})},N=()=>{m.unsubscribeSignal=r.listen(()=>{t()})};return{init:()=>{m.isInitialized||(m.isInitialized=!0,v(),b(),S(),C(),N(),m.cleanupBroadcastSetup=Px().setup(),m.cleanupFocusSetup=bj().setup(),m.cleanupOnlineSetup=Ix().setup())},cleanup:()=>{m.isInitialized&&(m.pollInterval&&(clearInterval(m.pollInterval),m.pollInterval=void 0),m.unsubscribeBroadcast&&(m.unsubscribeBroadcast(),m.unsubscribeBroadcast=void 0),m.unsubscribeFocus&&(m.unsubscribeFocus(),m.unsubscribeFocus=void 0),m.unsubscribeOnline&&(m.unsubscribeOnline(),m.unsubscribeOnline=void 0),m.unsubscribeSignal&&(m.unsubscribeSignal(),m.unsubscribeSignal=void 0),m.cleanupBroadcastSetup&&(m.cleanupBroadcastSetup(),m.cleanupBroadcastSetup=void 0),m.cleanupFocusSetup&&(m.cleanupFocusSetup(),m.cleanupFocusSetup=void 0),m.cleanupOnlineSetup&&(m.cleanupOnlineSetup(),m.cleanupOnlineSetup=void 0),m.isInitialized=!1,m.lastSessionRequest=0)},triggerRefetch:y,broadcastSessionUpdate:g}}const zZ=()=>typeof window>"u",VZ=cI;function wj(e){return typeof e=="object"&&e!==null&&"data"in e&&"error"in e?e:{data:e,error:null}}function BZ(e){return!e||e.session===null&&e.user===null?null:e}function FZ(e,t){return Cc(e.data,t.data)&&e.error===t.error&&e.isPending===t.isPending&&e.isRefetching===t.isRefetching&&e.refetch===t.refetch}function $Z(e,t){const n=Gi(!1);let r,o=0,l=0;n.listen(()=>{l++,o=0});const c=b=>y(b),d=Gi({data:null,error:null,isPending:!0,isRefetching:!1,refetch:c});fI(d,FZ);const m=async(b,S)=>{const C=d.value;if(d.set({...C,isPending:C.data===null,isRefetching:!0,error:null,refetch:c}),b.aborted)return"aborted";try{const N=await e("/get-session",{method:"GET",query:S?.query,signal:b});if(b.aborted)return"aborted";let{data:A,error:T}=wj(N),E="fresh";if(A?.needsRefresh)try{const P=await e("/get-session",{method:"POST",signal:b});if(b.aborted)return"aborted";({data:A,error:T}=wj(P))}catch{if(b.aborted)return"aborted";E="stale"}if(T){const P=d.value,M=T?.status===401;return d.set({data:M?null:P.data,error:T,isPending:!1,isRefetching:!1,refetch:c}),"failed"}const j=BZ(A),_=d.value,R=_.data!=null&&j!=null&&Cc(_.data,j)?_.data:j;return d.set({data:R,error:null,isPending:!1,isRefetching:!1,refetch:c}),E}catch(N){if(b.aborted)return"aborted";const A=d.value;return d.set({data:A.data,error:N,isPending:!1,isRefetching:!1,refetch:c}),"failed"}},p=()=>{const b=d.value.data?.session?.expiresAt,S=b instanceof Date?b.getTime():Number.POSITIVE_INFINITY;return Math.min(Date.now()+VZ,S)},y=b=>{o=0,r?.cancel();const S=new AbortController,C={cancel:()=>S.abort(),promise:Promise.resolve().then(()=>S.signal.aborted?"aborted":m(S.signal,b)),revision:l};r=C;const N=A=>{r===C&&(r=void 0,A==="fresh"&&C.revision===l&&(o=p()))};return C.promise.then(N,()=>N("failed")),C.promise.then(()=>{})},g=()=>r?.revision===l?r.promise.then(()=>{}):Date.now()<o?Promise.resolve():y();let v=()=>{};return uI(d,()=>{let b;zZ()||(b=setTimeout(()=>{g()},0));const S=UZ({fetchSession:y,shouldPollSession:()=>d.value.data!=null,sessionSignal:n,options:t});return S.init(),v=S.broadcastSessionUpdate,()=>{b&&clearTimeout(b),S.cleanup()}}),{session:d,$sessionSignal:n,broadcastSessionUpdate:b=>v(b)}}function Dx(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function _b(e,t,n=".",r){if(!Dx(t))return _b(e,{},n,r);const o={...t};for(const l of Object.keys(e)){if(l==="__proto__"||l==="constructor")continue;const c=e[l];c!=null&&(r&&r(o,l,c,n)||(Array.isArray(c)&&Array.isArray(o[l])?o[l]=[...c,...o[l]]:Dx(c)&&Dx(o[l])?o[l]=_b(c,o[l],(n?`${n}.`:"")+l.toString(),r):o[l]=c))}return o}function HZ(e){return(...t)=>t.reduce((n,r)=>_b(n,r,"",e),{})}const GZ=HZ();var KZ=Object.defineProperty,YZ=Object.defineProperties,WZ=Object.getOwnPropertyDescriptors,Sj=Object.getOwnPropertySymbols,QZ=Object.prototype.hasOwnProperty,XZ=Object.prototype.propertyIsEnumerable,Cj=(e,t,n)=>t in e?KZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qa=(e,t)=>{for(var n in t||(t={}))QZ.call(t,n)&&Cj(e,n,t[n]);if(Sj)for(var n of Sj(t))XZ.call(t,n)&&Cj(e,n,t[n]);return e},gs=(e,t)=>
50YZ(e,WZ(t)),ZZ=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n,Error.captureStackTrace(this,this.constructor)}},JZ=async(e,t)=>{var n,r,o,l,c,d;let m=t||{};const p={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:m,hooks:p};for(const y of t?.plugins||[]){if(y.init){const g=await((n=y.init)==null?void 0:n.call(y,e.toString(),t));m=g.options||m,e=g.url}p.onRequest.push((r=y.hooks)==null?void 0:r.onRequest),p.onResponse.push((o=y.hooks)==null?void 0:o.onResponse),p.onSuccess.push((l=y.hooks)==null?void 0:l.onSuccess),p.onError.push((c=y.hooks)==null?void 0:c.onError),p.onRetry.push((d=y.hooks)==null?void 0:d.onRetry)}return{url:e,options:m,hooks:p}},Nj=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},eJ=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function tJ(e){if(typeof e=="number")return new Nj({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new Nj(e);case"exponential":return new eJ(e);default:throw new Error("Invalid retry strategy")}}var nJ=async e=>{const t={},n=async r=>typeof r=="function"?await r():r;if(e?.auth){if(e.auth.type==="Bearer"){const r=await n(e.auth.token);if(!r)return t;t.authorization=`Bearer ${r}`}else if(e.auth.type==="Basic"){const[r,o]=await Promise.all([n(e.auth.username),n(e.auth.password)]);if(!r||!o)return t;t.authorization=`Basic ${btoa(`${r}:${o}`)}`}else if(e.auth.type==="Custom"){const[r,o]=await Promise.all([n(e.auth.prefix),n(e.auth.value)]);if(!o)return t;t.authorization=`${r??""} ${o}`}}return t},rJ=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function aJ(e){const t=e.headers.get("content-type"),n=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!t)return"json";const r=t.split(";").shift()||"";return rJ.test(r)?"json":n.has(r)||r.startsWith("text/")?"text":"blob"}function sJ(e){try{return JSON.parse(e),!0}catch{return!1}}function mI(e){if(e===void 0)return!1;const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t===null?!0:t!=="object"?!1:Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}function Aj(e){try{return JSON.parse(e)}catch{return e}}function Ej(e){return typeof e=="function"}function iJ(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<"u"&&Ej(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&Ej(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}function pI(...e){const t={};for(const n of e)if(n)if(n instanceof Headers)n.forEach((r,o)=>{t[o]=r});else{const r=Array.isArray(n)?n:Object.entries(n);for(const[o,l]of r)l!=null&&(t[o]=l)}return t}async function oJ(e){const t=new Headers(pI(e?.headers,await nJ(e)));if(!t.has("content-type")){const n=lJ(e?.body);n&&t.set("content-type",n)}return t}function lJ(e){return mI(e)?"application/json":null}function cJ(e){const t=e.get("content-type");return t?t.split(";")[0].trim().toLowerCase():null}function uJ(e,t){const{body:n}=e;return n?!mI(n)||typeof n=="string"?n:cJ(t)==="application/x-www-form-urlencoded"?new URLSearchParams(n).toString():JSON.stringify(n):null}function dJ(e,t){var n;if(t?.method)return t.method.toUpperCase();if(e.startsWith("@")){const r=(n=e.split("@")[1])==null?void 0:n.split("/")[0];return gI.includes(r)?r.toUpperCase():t?.body?"POST":"GET"}return t?.body?"POST":"GET"}function fJ(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}
50var mJ=class hI extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,hI.prototype)}};async function gd(e,t){const n=await e["~standard"].validate(t);if(n.issues)throw new mJ(n.issues);return n.value}var gI=["get","post","put","patch","delete"],pJ=e=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(t,n){var r,o,l,c;const d=((o=(r=e.plugins)==null?void 0:r.find(m=>{var p;return(p=m.schema)!=null&&p.config?t.startsWith(m.schema.config.baseURL||"")||t.startsWith(m.schema.config.prefix||""):!1}))==null?void 0:o.schema)||e.schema;if(d){let m=t;(l=d.config)!=null&&l.prefix&&m.startsWith(d.config.prefix)&&(m=m.replace(d.config.prefix,""),d.config.baseURL&&(t=t.replace(d.config.prefix,d.config.baseURL))),(c=d.config)!=null&&c.baseURL&&m.startsWith(d.config.baseURL)&&(m=m.replace(d.config.baseURL,"")),m.startsWith("/")&&m.charAt(1)==="@"&&(m=m.substring(1));const p=d.schema[m];if(p){let y=n?.headers;if(p.headers&&!n?.disableValidation){const v={};if(n?.headers){if(n.headers instanceof Headers)n.headers.forEach((C,N)=>{v[N.toLowerCase()]=C});else if(typeof n.headers=="object")for(const[C,N]of Object.entries(n.headers))N!=null&&(v[C.toLowerCase()]=N)}const b=await gd(p.headers,v),S={};for(const[C,N]of Object.entries(b))S[C.toLowerCase()]=N;y=S}let g=gs(qa({},n),{method:p.method,output:p.output,headers:y});return n?.disableValidation||(g=gs(qa({},g),{body:p.input?await gd(p.input,n?.body):n?.body,params:p.params?await gd(p.params,n?.params):n?.params,query:p.query?await gd(p.query,n?.query):n?.query})),{url:t,options:g}}}return{url:t,options:n}}}),hJ=e=>{async function t(n,r){const o=gs(qa(qa({},e),r),{headers:pI(e?.headers,r?.headers),plugins:[...e?.plugins||[],pJ(e||{}),...r?.plugins||[]]});if(e?.catchAllError)try{return await Ib(n,o)}catch(l){return{data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:l}}}return await Ib(n,o)}return t},gJ=e=>e==="."||e==="..";function yJ(e,t){let n=e;for(const[r,o]of t)n=n.replace(r,o);if(gJ(n))throw new TypeError("Path parameters cannot be reserved path segments");return encodeURIComponent(n)}function xJ(e,t){const{baseURL:n,params:r,query:o}=t||{query:{},params:{},baseURL:""};let l=e.startsWith("http")?e.split("/").slice(0,3).join("/"):n||"";if(e.startsWith("@")){const v=e.toString().split("@")[1].split("/")[0];gI.includes(v)&&(e=e.replace(`@${v}/`,"/"))}l.endsWith("/")||(l+="/");let[c,d]=e.replace(l,"").split("?");const m=new URLSearchParams(d);for(const[v,b]of Object.entries(o||{})){if(b==null)continue;let S;if(typeof b=="string")S=b;else if(Array.isArray(b)){for(const C of b)m.append(v,C);continue}else S=JSON.stringify(b);m.set(v,S)}const p=new Map;if(r)if(Array.isArray(r)){const v=c.split("/").filter(b=>b.startsWith(":"));for(const[b,S]of v.entries()){const C=r[b];p.set(S,String(C))}}else for(const[v,b]of Object.entries(r))p.set(`:${v}`,String(b));c=c.split("/").map(v=>yJ(v,p)).join("/"),c=c.replace(/^\/+/,"");let y=m.toString();return y=y.length>0?`?${y}`.replace(/\+/g,"%20"):"",l.startsWith("http")?new URL(`${c}${y}`,l):`${l}${c}${y}`}var Ib=async(e,t)=>{var n,r,o,l,c,d,m,p;const{hooks:y,url:g,options:v}=await JZ(e,t),b=iJ(v),S=new AbortController,C=(n=v.signal)!=null?n:S.signal,N=xJ(g,v),A=await oJ(v),T=uJ(v,A),E=dJ(g,v),j=gs(qa({},v),{url:N,headers:A,body:T,method:E,signal:C});for(const L of y.onRequest)if(L){const H=await L(j);typeof H=="object"&&H!==null&&Object.assign(j,H)}("pipeTo"in j&&typeof j.pipeTo=="function"||typeof((r=t?.body)==null?void 0:r.pipe)=="function")&&("duplex"in j||(j.duplex="half"));const{clearTimeout:_}=fJ(v,S);let R=await b(j.url,j);_();const P={response:R,request:j};for(const L of y.onResponse)if(L){const H=await L(gs(qa({},P),{response:(o=t?.hookOptions)!=null&&o.cloneResponse?R.clone():R}));H instanceof Response?R=H:typeof H=="object"&&H!==null&&(R=H.response)}if(R.ok){if(!(j.method!=="HEAD"))return{data:"",error:null};const H=aJ(R),Q={data:null,response:R,request:j};if(H==="json"||H==="text"){const I=await R.text(),O=(l=j.jsonParser)!=null?l:Aj;Q.data=await O(I)}else Q.data=await R[H]();j?.output&&j.output&&!j.disableValidation&&(Q.data=await gd(j.output,Q.data));for(const I of y.onSuccess)I&&await I(gs(qa({},Q),{response:(c=t?.hookOptions)!=null&&c.cloneResponse?R.clone():R}));return t?.throw?Q.data:{data:Q.data,error:null}}const M=(d=t?.jsonParser)!=null?d:Aj,q=await R.text(),U=sJ(q),V=U?await M(q):null,$={response:R,responseText:q,request:j,error:gs(qa({},V),{status:R.status,statusText:R.statusText})};for(const L of y.onError)L&&await L(gs(qa({},$),{response:(m=t?.hookOptions)!=null&&m.cloneResponse?R.clone():R}));if(t?.retry){const L=tJ(t.retry),H=(p=t.retryAttempt)!=null?p:0;
50if(await L.shouldAttemptRetry(H,R)){for(const I of y.onRetry)I&&await I(P);const Q=L.getDelay(H);return await new Promise(I=>setTimeout(I,Q)),await Ib(e,gs(qa({},t),{retryAttempt:H+1}))}}if(t?.throw)throw new ZZ(R.status,R.statusText,U?V:q);return{data:null,error:gs(qa({},V),{status:R.status,statusText:R.statusText})}},Do={};const vJ=e=>{if(typeof process>"u")return;const t=e??"/api/auth";if(Do.NEXT_PUBLIC_AUTH_URL)return Do.NEXT_PUBLIC_AUTH_URL;if(typeof window>"u"){if(Do.NEXTAUTH_URL)try{return Do.NEXTAUTH_URL}catch{}if(Do.VERCEL_URL)try{const n=Do.VERCEL_URL.startsWith("http")?"":"https://";return`${new URL(`${n}${Do.VERCEL_URL}`).origin}${t}`}catch{}}},bJ=(e,t)=>{const n="credentials"in Request.prototype,r=gZ(e?.baseURL,e?.basePath)??vJ(e?.basePath)??"/api/auth",o=e?.plugins?.flatMap(_=>_.fetchPlugins).filter(_=>_!==void 0)||[],l={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:c,onError:d,onRequest:m,onResponse:p,...y}=e?.fetchOptions||{},g=hJ({baseURL:r,...n?{credentials:"include"}:{},method:"GET",jsonParser(_){return _?CZ(_,{strict:!1}):null},customFetchImpl:fetch,...y,plugins:[l,...y.plugins||[],...e?.disableDefaultFetchPlugins?[]:[EZ],...o]}),{$sessionSignal:v,session:b,broadcastSessionUpdate:S}=$Z(g,e),C=e?.plugins||[];let N={};const A={$sessionSignal:v,session:b},T={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"},E=[{signal:"$sessionSignal",matcher(_){return _==="/sign-out"||_==="/update-user"||_==="/update-session"||_==="/sign-up/email"||_==="/sign-in/email"||_==="/delete-user"||_==="/verify-email"||_==="/revoke-sessions"||_==="/revoke-session"||_==="/revoke-other-sessions"||_==="/change-email"||_==="/change-password"},callback(_){_==="/sign-out"?S("signout"):(_==="/update-user"||_==="/update-session")&&S("updateUser")}}];for(const _ of C)_.getAtoms&&Object.assign(A,_.getAtoms?.(g)),_.pathMethods&&Object.assign(T,_.pathMethods),_.atomListeners&&E.push(..._.atomListeners);const j={notify:_=>{A[_].set(!A[_].get())},listen:(_,R)=>{A[_].subscribe(R)},atoms:A};for(const _ of C)_.getActions&&(N=GZ(_.getActions?.(g,j,e)??{},N));return{get baseURL(){return r},pluginsActions:N,pluginsAtoms:A,pluginPathMethods:T,atomListeners:E,$fetch:g,$store:j}};function wJ(e){return typeof e=="object"&&e!==null&&"get"in e&&typeof e.get=="function"&&"lc"in e&&typeof e.lc=="number"}function SJ(e){return e.charAt(0).toUpperCase()+e.slice(1)}const CJ=new RegExp("[\\p{Ll}\\d]+|\\p{Lu}+(?!\\p{Ll})|\\p{Lu}[\\p{Ll}\\d]+|\\p{Lo}+","gu"),NJ=/['\u2019]/g;function AJ(e){return e.replace(NJ,"").match(CJ)??[]}function EJ(e){return AJ(e).map(t=>t.toLowerCase()).join("-")}function jJ(e,t,n){const r=t[e],{fetchOptions:o,query:l,...c}=n||{};return r||(o?.method?o.method:c&&Object.keys(c).length>0?"POST":"GET")}function TJ(e,t,n,r,o){function l(c=[]){return new Proxy(function(){},{get(d,m){if(typeof m!="string"||m==="then"||m==="catch"||m==="finally")return;const p=[...c,m];let y=e;for(const g of p)if(y&&typeof y=="object"&&g in y)y=y[g];else{y=void 0;break}return typeof y=="function"||wJ(y)?y:l(p)},apply:async(d,m,p)=>{const y="/"+c.map(EJ).join("/"),g=p[0]||{},v=p[1]||{},{query:b,fetchOptions:S,...C}=g,N={...v,...S},A=jJ(y,n,g);return await t(y,{...N,body:A==="GET"?void 0:{...C,...N?.body||{}},query:b||N?.query,method:A,async onSuccess(T){if(await N?.onSuccess?.(T),!o||N.disableSignal)return;const E=o.filter(_=>_.matcher(y));if(!E.length)return;const j=new Set;for(const _ of E){const R=r[_.signal];if(!R)return;if(j.has(_.signal))continue;j.add(_.signal);const P=R.get();setTimeout(()=>{R.set(!P)},10),_.callback?.(y)}}})}})}return l()}function kJ(e,t={}){const n=h.useRef(e.get()),{keys:r,deps:o=[e,r]}=t,l=h.useCallback(d=>{const m=p=>{n.current!==p&&(n.current=p,d())};return m(e.value),r?.length?_Z(e,r,m):e.listen(m)},o),c=()=>n.current;return h.useSyncExternalStore(l,c,c)}function RJ(e){return`use${SJ(e)}`}function PJ(e){const{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,$fetch:o,$store:l,atomListeners:c}=bJ(e),d={};for(const[m,p]of Object.entries(r))d[RJ(m)]=()=>kJ(p);return TJ({...n,...d,$fetch:o,$store:l},o,t,r,c)}var OJ="1.6.29";const sf=OJ,_J=e=>({id:"additional-fields-client",version:sf,$InferServerPlugin:{}});function IJ(e){return{success:!1,error:`You are not allowed to access resource: ${e}`}}function MJ(e){return{success:!1,error:`unauthorized to access resource "${e}"`}}function jj(e){return e==="OR"?"OR":"AND"}function Tj(e){return Array.isArray(e)}function DJ(e){if(Tj(e))return{actions:e,connector:"AND"};if(!e||typeof e!="object")throw new Nd("Invalid access control request");const{actions:t,connector:n}=e;return Tj(t)?{actions:t,connector:jj(n)}:{actions:[],connector:jj(n)}}function kj(e,t){return typeof t=="string"&&e.includes(t)}function LJ(e,{actions:t,connector:n}){return t.length===0?!1:n==="OR"?t.some(r=>kj(e,r)):t.every(r=>kj(e,r))}function qJ(e){return{authorize(t,n="AND"){let r=!1;for(const[o,l]of Object.entries(t)){const c=e[o];if(!c){if(n==="AND")return IJ(o);continue}const d=LJ(c,DJ(l));if(d&&(r=!0),d&&n==="OR")return{success:!0};if(!d&&n==="AND")return MJ(o)}return r?{success:!0}:{success:!1,error:"Not authorized"}},statements:e}}function yI(e){return{newRole(t){return qJ(t)},statements:e}}const UJ=Bw({OTP_EXPIRED:"OTP expired",INVALID_OTP:"Invalid OTP",TOO_MANY_ATTEMPTS:"Too many attempts"}),zJ=()=>
50({id:"email-otp",version:sf,$InferServerPlugin:{},atomListeners:[{matcher:e=>e==="/email-otp/verify-email"||e==="/sign-in/email-otp"||e==="/email-otp/request-email-change",signal:"$sessionSignal"}],$ERROR_CODES:UJ}),VJ=()=>({id:"magic-link",version:sf,$InferServerPlugin:{}}),BJ=Bw({YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION:"You are not allowed to create a new organization",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS:"You have reached the maximum number of organizations",ORGANIZATION_ALREADY_EXISTS:"Organization already exists",ORGANIZATION_SLUG_ALREADY_TAKEN:"Organization slug already taken",ORGANIZATION_NOT_FOUND:"Organization not found",USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION:"User is not a member of the organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION:"You are not allowed to update this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION:"You are not allowed to delete this organization",NO_ACTIVE_ORGANIZATION:"No active organization",USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION:"User is already a member of this organization",MEMBER_NOT_FOUND:"Member not found",ROLE_NOT_FOUND:"Role not found",YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM:"You are not allowed to create a new team",TEAM_ALREADY_EXISTS:"Team already exists",TEAM_NOT_FOUND:"Team not found",YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER:"You cannot leave the organization as the only owner",YOU_CANNOT_LEAVE_THE_ORGANIZATION_WITHOUT_AN_OWNER:"You cannot leave the organization without an owner",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER:"You are not allowed to delete this member",YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION:"You are not allowed to invite users to this organization",USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION:"User is already invited to this organization",INVITATION_NOT_FOUND:"Invitation not found",YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION:"You are not the recipient of the invitation",EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION:"Email verification required before accepting or rejecting invitation",EMAIL_VERIFICATION_REQUIRED_FOR_INVITATION:"Email verification required to view or list invitations for the session email",YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION:"You are not allowed to cancel this invitation",INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION:"Inviter is no longer a member of the organization",YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE:"You are not allowed to invite a user with this role",FAILED_TO_RETRIEVE_INVITATION:"Failed to retrieve invitation",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS:"You have reached the maximum number of teams",UNABLE_TO_REMOVE_LAST_TEAM:"Unable to remove last team",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER:"You are not allowed to update this member",ORGANIZATION_MEMBERSHIP_LIMIT_REACHED:"Organization membership limit reached",YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to create teams in this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to delete teams in this organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM:"You are not allowed to update this team",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM:"You are not allowed to delete this team",INVITATION_LIMIT_REACHED:"Invitation limit reached",TEAM_MEMBER_LIMIT_REACHED:"Team member limit reached",USER_IS_NOT_A_MEMBER_OF_THE_TEAM:"User is not a member of the team",YOU_CAN_NOT_ACCESS_THE_MEMBERS_OF_THIS_TEAM:"You are not allowed to list the members of this team",YOU_DO_NOT_HAVE_AN_ACTIVE_TEAM:"You do not have an active team",YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM_MEMBER:"You are not allowed to create a new member",YOU_ARE_NOT_ALLOWED_TO_REMOVE_A_TEAM_MEMBER:"You are not allowed to remove a team member",YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION:"You are not allowed to access this organization as an owner",YOU_ARE_NOT_A_MEMBER_OF_THIS_ORGANIZATION:"You are not a member of this organization",MISSING_AC_INSTANCE:"Dynamic Access Control requires a pre-defined ac instance on the server auth plugin. Read server logs for more information",YOU_MUST_BE_IN_AN_ORGANIZATION_TO_CREATE_A_ROLE:"You must be in an organization to create a role",YOU_ARE_NOT_ALLOWED_TO_CREATE_A_ROLE:"You are not allowed to create a role",YOU_ARE_NOT_ALLOWED_TO_UPDATE_A_ROLE:"You are not allowed to update a role",YOU_ARE_NOT_ALLOWED_TO_DELETE_A_ROLE:"You are not allowed to delete a role",YOU_ARE_NOT_ALLOWED_TO_READ_A_ROLE:"You are not allowed to read a role",YOU_ARE_NOT_ALLOWED_TO_LIST_A_ROLE:"You are not allowed to list a role",YOU_ARE_NOT_ALLOWED_TO_GET_A_ROLE:"You are not allowed to get a role",TOO_MANY_ROLES:"This organization has too many roles",INVALID_RESOURCE:"The provided permission includes an invali
50d resource",ROLE_NAME_IS_ALREADY_TAKEN:"That role name is already taken",CANNOT_DELETE_A_PRE_DEFINED_ROLE:"Cannot delete a pre-defined role",ROLE_IS_ASSIGNED_TO_MEMBERS:"Cannot delete a role that is assigned to members. Please reassign the members to a different role first",INVALID_TEAM_ID:"Team id contains a reserved character"}),FJ=()=>typeof window>"u";function $J(e,t){return Cc(e.data,t.data)&&e.error===t.error&&e.isPending===t.isPending&&e.isRefetching===t.isRefetching&&e.refetch===t.refetch}const yd=(e,t,n,r)=>{const o=Gi({data:null,error:null,isPending:!0,isRefetching:!1,refetch:y=>l(y)});fI(o,$J);const l=async y=>new Promise(g=>{const v=typeof r=="function"?r({data:o.get().data,error:o.get().error,isPending:o.get().isPending}):r;n(t,{...v,query:{...v?.query,...y?.query},async onSuccess(b){const S=o.get(),C=S.data!=null&&b.data!=null&&Cc(S.data,b.data)?S.data:b.data;o.set({data:C,error:null,isPending:!1,isRefetching:!1,refetch:o.value.refetch}),await v?.onSuccess?.(b)},async onError(b){const{request:S}=b,C=typeof S.retry=="number"?S.retry:S.retry?.attempts,N=S.retryAttempt||0;if(C&&N<C)return;const A=b.error.status===401;o.set({error:b.error,data:A?null:o.get().data,isPending:!1,isRefetching:!1,refetch:o.value.refetch}),await v?.onError?.(b)},async onRequest(b){const S=o.get();o.set({isPending:S.data===null,data:S.data,error:null,isRefetching:!0,refetch:o.value.refetch}),await v?.onRequest?.(b)}}).catch(b=>{o.set({error:b,data:o.get().data,isPending:!1,isRefetching:!1,refetch:o.value.refetch})}).finally(()=>{g(void 0)})});e=Array.isArray(e)?e:[e];let c=!1,d=!1,m=!1;const p=()=>{if(c){m=!0;return}c=!0,l().finally(()=>{c=!1;const y=m&&d;m=!1,y&&p()})};return uI(o,()=>{if(FJ())return;d=!0;let y=!1,g;const v=e.map(b=>b.listen(()=>{y?l():(y=!0,clearTimeout(g),p())}));return g=setTimeout(()=>{y=!0,p()},0),()=>{d=!1;for(const b of v)b();clearTimeout(g)}}),o},xI={organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]},Fw=yI(xI),$w=Fw.newRole({organization:["update"],invitation:["create","cancel"],member:["create","update","delete"],team:["create","update","delete"],ac:["create","read","update","delete"]}),Hw=Fw.newRole({organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]}),of=Fw.newRole({organization:[],member:[],invitation:[],team:[],ac:["read"]}),HJ={admin:$w,owner:Hw,member:of},GJ=(e,t)=>{if(!e.permissions)return!1;const n=e.role.split(","),r=e.options.creatorRole||"owner",o=n.includes(r),l=e.allowCreatorAllPermissions||!1;if(o&&l)return!0;for(const c of n)if(t[c]?.authorize(e.permissions)?.success)return!0;return!1},KJ=e=>GJ(e,e.options.roles||HJ),YJ=e=>{const t=Gi(!1),n=Gi(!1),r=Gi(!1),o=Gi(!1),l={admin:$w,member:of,owner:Hw,...e?.roles};return{id:"organization",version:sf,$InferServerPlugin:{},getActions:(c,d,m)=>({$Infer:{ActiveOrganization:{},Organization:{},Invitation:{},Member:{},Team:{}},organization:{checkRolePermission:p=>KJ({role:p.role,options:{ac:e?.ac,roles:l},permissions:p.permissions})}}),getAtoms:c=>{const d=yd(t,"/organization/list",c,{method:"GET"});return{$listOrg:t,$activeOrgSignal:n,$activeMemberSignal:r,$activeMemberRoleSignal:o,activeOrganization:yd([n],"/organization/get-full-organization",c,()=>({method:"GET"})),listOrganizations:d,activeMember:yd([n,r],"/organization/get-active-member",c,{method:"GET"}),activeMemberRole:yd([n,o],"/organization/get-active-member-role",c,{method:"GET"})}},pathMethods:{"/organization/get-full-organization":"GET","/organization/list-user-teams":"GET"},atomListeners:[{matcher(c){return c==="/organization/create"||c==="/organization/delete"||c==="/organization/update"},signal:"$listOrg"},{matcher(c){return c==="/sign-out"||c.startsWith("/organization")},signal:"$activeOrgSignal"},{matcher(c){return c.startsWith("/organization/set-active")||c==="/organization/create"||c==="/organization/delete"||c==="/organization/remove-member"||c==="/organization/leave"||c==="/organization/accept-invitation"},signal:"$sessionSignal"},{matcher(c){return c.includes("/organization/update-member-role")||c.startsWith("/organization/set-active")},signal:"$activeMemberSignal"},{matcher(c){return c.includes("/organization/update-member-role")||c.startsWith("/organization/set-active")},signal:"$activeMemberRoleSignal"}],$ERROR_CODES:BJ}},WJ=Bw({OTP_NOT_ENABLED:"OTP not enabled",OTP_HAS_EXPIRED:"OTP has expired",TOTP_NOT_ENABLED:"TOTP not enabled",TWO_FACTOR_NOT_ENABLED:"Two factor isn't enabled",BACKUP_CODES_NOT_ENABLED:"Backup codes aren't enabled",INVALID_BACKUP_CODE:"Invalid backup code",INVALID_CODE:"Invalid code",TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE:"Too many attempts. Please request a new code.",ACCOUNT_TEMPORARILY_LOCKED:"Too many failed verification attempts. Your account is temporarily locked. Please try again later.",INVALID_TWO_FACTOR_COOKIE:"Invalid two factor cookie"}),QJ=e=>({id:"two-factor",version:sf,$InferServerPlugin:{},atomListeners:[{matcher:t=>t.startsWith("/two-factor/"),signal:"$sessionSignal"}],pathMethods:{"/two-factor/disable":"POST","/two-factor/enable":"POST","/two-factor/send-otp":"PO
50ST","/two-factor/generate-backup-codes":"POST","/two-factor/get-totp-uri":"POST","/two-factor/verify-totp":"POST","/two-factor/verify-otp":"POST","/two-factor/verify-backup-code":"POST"},fetchPlugins:[{id:"two-factor",name:"two-factor",hooks:{async onSuccess(t){t.data?.twoFactorRedirect}}}],$ERROR_CODES:WJ});function XJ(e){return Object.fromEntries(Object.entries(e).map(([t,n])=>[t,{code:t,message:n,toString:()=>t}]))}const uc=XJ({CHALLENGE_NOT_FOUND:"Challenge not found",YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY:"You are not allowed to register this passkey",FAILED_TO_VERIFY_REGISTRATION:"Failed to verify registration",PASSKEY_NOT_FOUND:"Passkey not found",AUTHENTICATION_FAILED:"Authentication failed",UNABLE_TO_CREATE_SESSION:"Unable to create session",FAILED_TO_UPDATE_PASSKEY:"Failed to update passkey",PREVIOUSLY_REGISTERED:"Previously registered",REGISTRATION_CANCELLED:"Registration cancelled",AUTH_CANCELLED:"Auth cancelled",UNKNOWN_ERROR:"Unknown error",SESSION_REQUIRED:"Passkey registration requires an authenticated session",RESOLVE_USER_REQUIRED:"Passkey registration requires either an authenticated session or a resolveUser callback when requireSession is false",RESOLVED_USER_INVALID:"Resolved user is invalid"}),ZJ="1.6.29";function vs(e){const t=new Uint8Array(e);let n="";for(const o of t)n+=String.fromCharCode(o);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Fp(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=(4-t.length%4)%4,r=t.padEnd(t.length+n,"="),o=atob(r),l=new ArrayBuffer(o.length),c=new Uint8Array(l);for(let d=0;d<o.length;d++)c[d]=o.charCodeAt(d);return l}function Gw(){return JJ.stubThis(globalThis?.PublicKeyCredential!==void 0&&typeof globalThis.PublicKeyCredential=="function")}const JJ={stubThis:e=>e};function vI(e){const{id:t}=e;return{...e,id:Fp(t),transports:e.transports}}function bI(e){return e==="localhost"||/^((xn--[a-z0-9-]+|[a-z0-9]+(-[a-z0-9]+)*)\.)+([a-z]{2,}|xn--[a-z0-9-]+)$/i.test(e)}class _n extends Error{constructor({message:t,code:n,cause:r,name:o}){super(t,{cause:r}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=o??r.name,this.code=n}}function eee({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new _n({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(n.authenticatorSelection?.requireResidentKey===!0)return new _n({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&n.authenticatorSelection?.userVerification==="required")return new _n({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(n.authenticatorSelection?.userVerification==="required")return new _n({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new _n({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new _n({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return n.pubKeyCredParams.filter(o=>o.type==="public-key").length===0?new _n({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new _n({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const r=globalThis.location.hostname;if(bI(r)){if(n.rp.id!==r)return new _n({message:`The RP ID "${n.rp.id}
50" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new _n({message:`${globalThis.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(n.user.id.byteLength<1||n.user.id.byteLength>64)return new _n({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new _n({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return e}class tee{constructor(){Object.defineProperty(this,"controller",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const wI=new tee,nee=["cross-platform","platform"];function SI(e){if(e&&!(nee.indexOf(e)<0))return e}async function ree(e){!e.optionsJSON&&e.challenge&&(console.warn("startRegistration() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."),e={optionsJSON:e});const{optionsJSON:t,useAutoRegister:n=!1}=e;if(!Gw())throw new Error("WebAuthn is not supported in this browser");const r={...t,challenge:Fp(t.challenge),user:{...t.user,id:Fp(t.user.id)},excludeCredentials:t.excludeCredentials?.map(vI)},o={};n&&(o.mediation="conditional"),o.publicKey=r,o.signal=wI.createNewAbortSignal();let l;try{l=await navigator.credentials.create(o)}catch(S){throw eee({error:S,options:o})}if(!l)throw new Error("Registration was not completed");const{id:c,rawId:d,response:m,type:p}=l;let y;typeof m.getTransports=="function"&&(y=m.getTransports());let g;if(typeof m.getPublicKeyAlgorithm=="function")try{g=m.getPublicKeyAlgorithm()}catch(S){Lx("getPublicKeyAlgorithm()",S)}let v;if(typeof m.getPublicKey=="function")try{const S=m.getPublicKey();S!==null&&(v=vs(S))}catch(S){Lx("getPublicKey()",S)}let b;if(typeof m.getAuthenticatorData=="function")try{b=vs(m.getAuthenticatorData())}catch(S){Lx("getAuthenticatorData()",S)}return{id:c,rawId:vs(d),response:{attestationObject:vs(m.attestationObject),clientDataJSON:vs(m.clientDataJSON),transports:y,publicKeyAlgorithm:g,publicKey:v,authenticatorData:b},type:p,clientExtensionResults:l.getClientExtensionResults(),authenticatorAttachment:SI(l.authenticatorAttachment)}}function Lx(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them. 51`,t)}function aee(){if(!Gw())return qx.stubThis(new Promise(t=>t(!1)));const e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?qx.stubThis(new Promise(t=>t(!1))):qx.stubThis(e.isConditionalMediationAvailable())}const qx={stubThis:e=>e};function see({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new _n({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new _n({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const r=globalThis.location.hostname;if(bI(r)){if(n.rpId!==r)return new _n({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new _n({message:`${globalThis.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new _n({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ER
51ROR",cause:e})}return e}async function iee(e){!e.optionsJSON&&e.challenge&&(console.warn("startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."),e={optionsJSON:e});const{optionsJSON:t,useBrowserAutofill:n=!1,verifyBrowserAutofillInput:r=!0}=e;if(!Gw())throw new Error("WebAuthn is not supported in this browser");let o;t.allowCredentials?.length!==0&&(o=t.allowCredentials?.map(vI));const l={...t,challenge:Fp(t.challenge),allowCredentials:o},c={};if(n){if(!await aee())throw Error("Browser does not support WebAuthn autofill");if(document.querySelectorAll("input[autocomplete$='webauthn']").length<1&&r)throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');c.mediation="conditional",l.allowCredentials=[]}c.publicKey=l,c.signal=wI.createNewAbortSignal();let d;try{d=await navigator.credentials.get(c)}catch(b){throw see({error:b,options:c})}if(!d)throw new Error("Authentication was not completed");const{id:m,rawId:p,response:y,type:g}=d;let v;return y.userHandle&&(v=vs(y.userHandle)),{id:m,rawId:vs(p),response:{authenticatorData:vs(y.authenticatorData),clientDataJSON:vs(y.clientDataJSON),signature:vs(y.signature),userHandle:v},type:g,clientExtensionResults:d.getClientExtensionResults(),authenticatorAttachment:SI(d.authenticatorAttachment)}}const oee=(e,{$listPasskeys:t,$store:n})=>({signIn:{passkey:async(l,c)=>{const d=await e("/passkey/generate-authenticate-options",{method:"GET",throw:!1});if(!d.data)return d;const m=d.data.extensions||l?.extensions?{...d.data.extensions||{},...l?.extensions||{}}:void 0;let p;try{p=await iee({optionsJSON:{...d.data,extensions:m},useBrowserAutofill:l?.autoFill})}catch(y){return{data:null,error:{code:y instanceof _n?y.code:"AUTH_CANCELLED",message:uc.AUTH_CANCELLED.message,status:400,statusText:"BAD_REQUEST"}}}try{const{clientExtensionResults:y,...g}=p,v=await e("/passkey/verify-authentication",{body:{response:g},...l?.fetchOptions,...c,method:"POST",throw:!1});return t.set(Math.random()),n.notify("$sessionSignal"),l?.returnWebAuthnResponse?{...v,webauthn:{response:p,clientExtensionResults:y}}:v}catch(y){return console.error("[Better Auth] Error verifying passkey",y),{data:null,error:{code:"AUTH_CANCELLED",message:uc.AUTH_CANCELLED.message,status:400,statusText:"BAD_REQUEST"}}}}},passkey:{addPasskey:async(l,c)=>{const d=await e("/passkey/generate-register-options",{method:"GET",query:{...l?.authenticatorAttachment&&{authenticatorAttachment:l.authenticatorAttachment},...l?.name&&{name:l.name},...l?.context&&{context:l.context}},throw:!1});if(!d.data)return d;try{const m=d.data.extensions||l?.extensions?{...d.data.extensions||{},...l?.extensions||{}}:void 0,p=await ree({optionsJSON:{...d.data,extensions:m},useAutoRegister:l?.useAutoRegister}),{clientExtensionResults:y,...g}=p,v=await e("/passkey/verify-registration",{...l?.fetchOptions,...c,body:{response:g,name:l?.name},method:"POST",throw:!1});return v.data?(t.set(Math.random()),l?.returnWebAuthnResponse?{...v,webauthn:{response:p,clientExtensionResults:y}}:v):v}catch(m){return m instanceof _n?m.code==="ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED"?{data:null,error:{code:m.code,message:uc.PREVIOUSLY_REGISTERED.message,status:400,statusText:"BAD_REQUEST"}}:m.code==="ERROR_CEREMONY_ABORTED"?{data:null,error:{code:m.code,message:uc.REGISTRATION_CANCELLED.message,status:400,statusText:"BAD_REQUEST"}}:{data:null,error:{code:m.code,message:m.message,status:400,statusText:"BAD_REQUEST"}}:{data:null,error:{code:"UNKNOWN_ERROR",message:m instanceof Error?m.message:uc.UNKNOWN_ERROR.message,status:500,statusText:"INTERNAL_SERVER_ERROR"}}}}},$Infer:{}}),lee=()=>{const e=Gi();return{id:"passkey",version:ZJ,$InferServerPlugin:{},getActions:(t,n)=>oee(t,{$listPasskeys:e,$store:n}),getAtoms(t){return{listPasskeys:yd(e,"/passkey/list-user-passkeys",t,{method:"GET"}),$listPasskeys:e}},pathMethods:{"/passkey/register":"POST","/passkey/authenticate":"POST"},atomListeners:[{matcher(t){return t==="/passkey/verify-registration"||t==="/passkey/delete-passkey"||t==="/passkey/update-passkey"||t==="/sign-out"},signal:"$listPasskeys"},{matcher:t=>t==="/passkey/verify-authentication",signal:"$sessionSignal"}],$ERROR_CODES:uc}},cee=["owner","manager","billing_manager","purchaser","viewer"],uee=new Set(cee);function CI(e){return typeof e=="string"&&!e.includes(",")&&uee.has(e)}const dee={...xI,businessAccount:["read","update"],businessProfile:["read","update"],businessContact:["create","read","update","delete"],businessAddress:["create","read","update","delete"],quote:["create","read","update","cancel"],order:["create","read","update","cancel"],invoice:["read","pay"],payment:["create","read"]},Vc=yI(dee),NI={businessAccount:["read","update"],businessProfile:["read","update"],businessContact:["create","read","update","delete"],businessAddress:["create","read","update","delete"],quote:["create","read","update","cancel"],order:["create","read","update","cancel"],invoice:["read","pay"],payment:["create","read"]},fee=Vc.newRole({...Hw.statements,organization:["update"],team:[],...NI}),mee=Vc.newRole({...$w.statements,team:[],...NI}),pee=Vc.newRole({...of.statements,businessAccount:["read","update"],businessProfile:["read","update"],businessContact:["create","read","update","delete"],businessAddress:["create","read","update","delete"],quote:["read"],order:["read"],invoice:["read","pay"],payment:["create","read"]}),hee=Vc.newRole({...of.statements,businessAccount:["read"],businessProfile:["read"],businessContact:["read"],businessAddress:["read"],quote:["create","read","update","cancel"],order:["create","read","update","cancel"],invoice:["read"],payment:["read"]}),gee=Vc.newRole({...of.statements,businessAccount:["read"],businessProfile:["read"],businessContact:["read"],businessAddress:["read"],quote:["read"],order:["read"],invoice:["read"],payment:["read"]}),yee={owner:fee,manager:mee,billing_manager:pee,purchaser:hee,viewer:gee},xee=U8,Rj=z8,vee=3;let zm=null,rd=null;async function AI(e){const t=await crypto.subtle.digest("SHA-256",
51new TextEncoder().encode(e));return[...new Uint8Array(t)].map(n=>n.toString(16).padStart(2,"0")).join("")}function bee(e){const t=new Uint8Array(e);return crypto.getRandomValues(t),[...t].map(n=>n.toString(16).padStart(2,"0")).join("").slice(0,e)}async function wee(){if(zm)return zm;try{const t=localStorage.getItem(Rj);if(t&&/^[0-9a-f]{20}$/.test(t))return zm=t,t}catch{}let e;try{e=bee(20)}catch{e=`${Date.now().toString(16)}${Math.random().toString(16).slice(2)}`.replace(/[^0-9a-f]/g,"").slice(0,20).padEnd(20,"0")}zm=e;try{localStorage.setItem(Rj,e),localStorage.removeItem(xee)}catch{}return e}async function See(){if(rd)return rd;try{const e=navigator,t=JSON.stringify({sr:`${screen.width}x${screen.height}x${screen.colorDepth}`,tz:Intl.DateTimeFormat().resolvedOptions().timeZone,pl:e.platform,lang:e.languages?.join(",")??e.language,hc:e.hardwareConcurrency??0,dm:e.deviceMemory??0,tp:e.maxTouchPoints??0});rd=(await AI(t)).slice(0,20)}catch{rd=""}return rd}function Cee(e,t){const n=t>>2,r=t&3;for(let o=0;o<n;o++)if(e[o]!=="0")return!1;return!(r&&parseInt(e[n]??"f",16)>(1<<4-r)-1)}async function Nee(e){let t=0;for(;;){if(Cee(await AI(`${e.nonce}:${t}`),e.difficulty))return{nonce:e.nonce,counter:t};if(t+=1,t%2e3===0&&await new Promise(n=>setTimeout(n,0)),t>1e8)throw new Error("PoW took too long")}}const Aee=e=>btoa(JSON.stringify(e)),Eee=e=>JSON.parse(atob(e));async function jee(e){const[t,n]=await Promise.all([wee(),See()]),r=new Headers(e.headers);return r.set("X-Visitor-Id",t),n&&r.set("X-Visitor-Fp",n),r.set("X-Request-Id",crypto.randomUUID()),r}async function EI(e,t,n){const r=await jee(t),o=n?{...t,credentials:n,headers:r}:{...t,headers:r};let l=await fetch(e,o);for(let c=0;c<vee&&l.status===423;c++){const d=l.headers.get("X-PoW-Challenge");if(!d)break;let m;try{m=await Nee(Eee(d))}catch{break}r.set("X-PoW-Solution",Aee(m)),l=await fetch(e,n?{...t,credentials:n,headers:r}:{...t,headers:r})}return l}async function Tee(e,t={}){return EI(e,t,"include")}async function $p(e,t={}){return EI(e,t,void 0)}function kee(){return typeof window<"u"?`${window.location.origin}/api/auth`:"http://localhost/api/auth"}function Ree(){return[QJ(),lee(),zJ(),VJ(),YJ({ac:Vc,roles:yee}),_J()]}function Pee(e){return{baseURL:e.baseURL??kee(),fetchOptions:{customFetchImpl:(t,n)=>Tee(t,n??{})}}}function Oee(e={}){return PJ({...Pee(e),plugins:[...Ree()]})}const cr=Oee(),{signIn:S0e,signUp:C0e,signOut:N0e,useSession:_ee,getSession:A0e}=cr,jI=h.createContext({user:null,token:null,isLoading:!0,login:()=>{},logout:()=>{},isAuthenticated:!1,emailVerified:!1,preferredLanguage:null,avatarUrl:null,refetch:()=>Promise.resolve()}),Iee=1e4;function Mee(e){return e?{id:Number(e.id),email:e.email,firstName:e.firstName??null,lastName:e.lastName??null,isAdmin:Ew(e),createdAt:typeof e.createdAt=="string"?e.createdAt:e.createdAt?.toISOString()??""}:null}function Dee({children:e}){const t=cr.useSession(),n=Y$(t),r=n.user??void 0,o=h.useMemo(()=>Mee(r),[r]),l=!!r,c=r?.emailVerified===!0,d=r?.preferredLanguage??null,m=r?.avatarUrl??r?.image??null,p=n.isPending,y=Mr(),g=h.useMemo(()=>dZ(y),[y]);h.useLayoutEffect(()=>{g.synchronize(hj({isPending:p,userId:r?.id,error:n.error}))},[p,g,n.error,r?.id]);const v=h.useRef(!1);v.current=l;const b=h.useRef(null),S=h.useRef(0),C=h.useCallback(async()=>{await n.refetch?.()},[n.refetch]),N=h.useRef(()=>{}),A=h.useCallback(()=>{g.clearForConfirmedAuthBoundary();const _=vF();if(_){Tx(),CF(_,()=>cr.signOut());return}lO(),cr.signOut().finally(()=>{Tx(),n.refetch?.()})},[g,n]);N.current=A;const T=h.useCallback(()=>{n.refetch?.()},[n]),E=h.useRef(!1);h.useEffect(()=>{l&&!E.current?(E.current=!0,YX()):l||(E.current=!1)},[l]),h.useEffect(()=>(aj(()=>{if(!v.current)return;const _=Date.now();if(b.current||_-S.current<Iee)return;S.current=_;const R=cr.getSession().then(({data:P,error:M})=>{const q=hj({isPending:!1,userId:P?.user?.id,error:M});q.status!=="settled"||q.userId!=null||(g.clearForConfirmedAuthBoundary(),cr.signOut().finally(()=>{Tx();const U="/".replace(/\/$/,"")??"";window.location.href=`${U}/login?session_expired=1`}))}).catch(()=>{}).finally(()=>{b.current===R&&(b.current=null)});b.current=R}),()=>aj(null)),[g]);const j=h.useMemo(()=>({user:o,token:null,isLoading:p,login:T,logout:A,isAuthenticated:l,emailVerified:c,preferredLanguage:d,avatarUrl:m,refetch:C}),[o,p,T,A,l,c,d,m,C]);return s.jsx(jI.Provider,{value:j,children:e})}function Bt(){return h.useContext(jI)}const TI="vp.lang";function kI(){try{return Lp(localStorage.getItem(TI))}catch{return null}}function Pj(e){try{localStorage.setItem(TI,e)}catch{}}function Oj(e){return d$({requested:kI(),stored:e??null,acceptLanguage:h$()})}function Lee({preferredLanguage:e,isAuthenticated:t,children:n}){const[r,o]=h.useState(null),l=r??Oj(e);h.useEffect(()=>{e&&(kI()||Pj(Oj(e)))},[e]);const c=h.useCallback(d=>{Pj(d),o(d),t&&fetch("/api/account/language",{method:"PUT",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({language:d})}).catch(()=>{})},[t]);return s.jsx(g$,{language:l,setLanguage:c,children:n})}function qee({children:e}){const{preferredLanguage:t,isAuthenticated:n}=Bt();return s.jsx(Lee,{preferredLanguage:t,isAuthenticated:n,children:e})}function Hp(){return typeof window>"u"?!1:pw(window.location.hostname)==="care"}function E0e(){h.useEffect(()=>{const e=document.querySelector('link[rel="manifest"]'),t=document.querySelector('meta[name="apple-mobile-web-app-title"]'),n=e?.getAttribute("href")??null,r=t?.getAttribute("content")??null;return e&&e.setAttribute("href","/vidacare.webmanifest"),t&&t.setAttribute("content","VidaCare"),()=>{e&&n&&e.setAttribute("href",n),t&&r&&t.setAttribute("content",r)}},[])}const Lo={title:"VidaCare | Wellness Coaching, Lab Testing, Products and Supplies",description:"VidaCare is the wellness coaching practice of MyVida: coaching interviews, at-home lab testing, personal plans, and member products and supplies.",ogImage:"/vidacare-logo-mark.png?v=2"};function j0e(){h.useEffect(()=>{const e=(r,o,l,c)=>{let d=document.head.querySelector(r),m=!1;d||(d=document.createElement("meta"),d.setAttribute(o,l),document.head.appendChild(d),m=!0);const p=d.getAttribute("content");return d.setAttribute("content",c),()=>{m?d?.remove():p!=null&&d?.setAttribute("content",p)}},t=document.title;document.title=Lo.title;const n=[e('meta[name="description"]',"name","description",Lo.description),e('meta[property="og:title"]',"property","og:title",Lo.title),e('meta[property="og:description"]',"property","og:description",Lo.description),e('meta[property="og:image"]',"property","og:image",Lo.ogImage),e('meta[name="twitter:title"]',"name","twitter:title",Lo.title),e('meta[name="twitter:description"]',"name","twitter:description",Lo.description)];return()=>{document.title=t;for(const r of n)r()}},[])}const Vm={sessionToken:"",storefrontKey:null,items:[],unavailableItems:[],subtotalCents:0,itemCount:0},RI=h.createContext({cart:void 0,isLoading:!1,itemCount:0,isCartOpen:!1,openCart:()=>{},closeCart:()=>{},addItem:async()=>Vm,addItems:async()=>Vm,updateItem:async()=>Vm,removeItem:async()=>Vm,clearCart:async()=>{},setPromoCode:async()=>{},applyPrize:async()=>{},chooseGift:async()=>{}});function Uee({children:e}){const t=Mr(),{data:n,isLoading:r}=DK(),[o,l]=h.useState(!1),c=n&&Array.isArray(n.items)?n:void 0;
51c?.sessionToken&&localStorage.setItem(Hi,c.sessionToken);const d=iY(),m=uY(),p=gY(),y=bY(),g=zK(),v=h.useCallback(()=>{t.invalidateQueries({queryKey:Cd()})},[t]),b=$K(),S=YK(),C=h.useCallback(async V=>{try{V?await b.mutateAsync({data:{code:V}}):await S.mutateAsync()}catch{}v()},[b,S,v]),N=ZK(),A=h.useCallback(async V=>{await N.mutateAsync({playId:V}),v()},[N,v]),T=nY(),E=h.useCallback(async V=>{await T.mutateAsync({data:{variantId:V}}),v()},[T,v]),j=h.useCallback(()=>l(!0),[]),_=h.useCallback(()=>l(!1),[]),R=h.useCallback(async(V,$,L=!1)=>{const H=await d.mutateAsync({data:{variantId:V,quantity:$,...L?{preorder:!0}:{},...Hp()?{brand:"vidacare"}:{}}});H?.sessionToken&&localStorage.setItem(Hi,H.sessionToken);const Q=H?.items?.find(I=>I.variantId===V);return pj({productId:Q?.productId,variantId:V,quantity:$,valueCents:Q?Q.priceCents*$:void 0}),v(),H},[d,v]),P=h.useCallback(async V=>{const $=await m.mutateAsync({data:{items:V,...Hp()?{brand:"vidacare"}:{}}});$?.sessionToken&&localStorage.setItem(Hi,$.sessionToken);for(const{variantId:L,quantity:H}of V){const Q=$?.items?.find(I=>I.variantId===L);pj({productId:Q?.productId,variantId:L,quantity:H,valueCents:Q?Q.priceCents*H:void 0})}return v(),$},[m,v]),M=h.useCallback(async(V,$)=>{const L=await p.mutateAsync({itemId:V,data:{quantity:$}});return v(),L},[p,v]),q=h.useCallback(async V=>{const $=c?.items.find(H=>H.id===V),L=await y.mutateAsync({itemId:V});return $&&rZ({productId:$.productId,variantId:$.variantId,quantity:$.quantity,valueCents:$.priceCents*$.quantity}),v(),L},[y,v,c]),U=h.useCallback(async()=>{await g.mutateAsync({}),localStorage.removeItem(Hi),v()},[g,v]);return s.jsx(RI.Provider,{value:{cart:c,isLoading:r,itemCount:c?.itemCount??0,isCartOpen:o,openCart:j,closeCart:_,addItem:R,addItems:P,updateItem:M,removeItem:q,clearCart:U,setPromoCode:C,applyPrize:A,chooseGift:E},children:e})}function oo(){return h.useContext(RI)}var zee=Object.defineProperty,ea=(e,t)=>zee(e,"name",{value:t,configurable:!0}),Kw="Dialog",[PI,OI]=nr(Kw),[Vee,Qa]=PI(Kw),Fh=ea(e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:l,modal:c=!0}=e,d=h.useRef(null),m=h.useRef(null),[p,y]=va({prop:r,defaultProp:o??!1,onChange:l,caller:Kw}),[g,v]=h.useState(0),[b,S]=h.useState(0);return s.jsx(Vee,{scope:t,triggerRef:d,contentRef:m,contentId:ha(),titleId:ha(),descriptionId:ha(),titlePresent:g>0,descriptionPresent:b>0,setTitleCount:v,setDescriptionCount:S,open:p,onOpenChange:y,onOpenToggle:h.useCallback(()=>y(C=>!C),[y]),modal:c,children:n})},"Dialog"),Bee="DialogTrigger",_I=h.forwardRef(ea(function(t,n){const{__scopeDialog:r,...o}=t,l=Qa(Bee,r),c=Qe(n,l.triggerRef);return s.jsx(Ge.button,{type:"button","aria-haspopup":"dialog","aria-expanded":l.open,"aria-controls":l.open?l.contentId:void 0,"data-state":Hh(l.open),...o,ref:c,onClick:je(t.onClick,l.onOpenToggle)})},"DialogTrigger")),II="DialogPortal",[Fee,MI]=PI(II,{forceMount:void 0}),$h=ea(e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,l=Qa(II,t);return s.jsx(Fee,{scope:t,forceMount:n,children:h.Children.map(r,c=>s.jsx(Dr,{present:n||l.open,children:s.jsx(Zd,{asChild:!0,container:o,children:c})}))})},"DialogPortal"),Mb="DialogOverlay",Bc=h.forwardRef(ea(function(t,n){const r=MI(Mb,t.__scopeDialog),{forceMount:o=r.forceMount,...l}=t,c=Qa(Mb,t.__scopeDialog);return c.modal?s.jsx(Dr,{present:o||c.open,children:s.jsx(Hee,{...l,ref:n})}):null},"DialogOverlay")),$ee=Ha("DialogOverlay.RemoveScroll"),Hee=h.forwardRef(ea(function(t,n){const{__scopeDialog:r,...o}=t,l=Qa(Mb,r),c=iP(),d=Qe(n,c);return s.jsx(ef,{as:$ee,allowPinchZoom:!0,shards:[l.contentRef],children:s.jsx(Ge.div,{"data-state":Hh(l.open),...o,ref:d,style:{pointerEvents:"auto",...o.style}})})},"DialogOverlayImpl")),Fd="DialogContent",Fc=h.forwardRef(ea(function(t,n){const r=MI(Fd,t.__scopeDialog),{forceMount:o=r.forceMount,...l}=t,c=Qa(Fd,t.__scopeDialog);return s.jsx(Dr,{present:o||c.open,children:c.modal?s.jsx(Gee,{...l,ref:n}):s.jsx(Kee,{...l,ref:n})})},"DialogContent")),Gee=h.forwardRef(ea(function(t,n){const r=Qa(Fd,t.__scopeDialog),o=h.useRef(null),l=Qe(n,r.contentRef,o);return h.useEffect(()=>{const c=o.current;if(c)return Ah(c)},[]),s.jsx(DI,{...t,ref:l,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:je(t.onCloseAutoFocus,c=>{c.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:je(t.onPointerDownOutside,c=>{const d=c.detail.originalEvent,m=d.button===0&&d.ctrlKey===!0;(d.button===2||m)&&c.preventDefault()}),onFocusOutside:je(t.onFocusOutside,c=>c.preventDefault())})},"DialogContentModal")),Kee=h.forwardRef(ea(function(t,n){const r=Qa(Fd,t.__scopeDialog),o=h.useRef(!1),l=h.useRef(!1);return s.jsx(DI,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{t.onCloseAutoFocus?.(c),c.defaultPrevented||(o.current||r.triggerRef.current?.focus(),c.preventDefault()),o.current=!1,l.current=!1},onInteractOutside:c=>
51{t.onInteractOutside?.(c),c.defaultPrevented||(o.current=!0,c.detail.originalEvent.type==="pointerdown"&&(l.current=!0));const d=c.target;r.triggerRef.current?.contains(d)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&l.current&&c.preventDefault()}})},"DialogContentNonModal")),DI=h.forwardRef(ea(function(t,n){const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:l,onCloseAutoFocus:c,...d}=t,m=Qa(Fd,r);return Lc(),s.jsx(s.Fragment,{children:s.jsx(gh,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:l,onUnmountAutoFocus:c,children:s.jsx(Xd,{role:"dialog",id:m.contentId,"aria-describedby":m.descriptionPresent?m.descriptionId:void 0,"aria-labelledby":m.titlePresent?m.titleId:void 0,"data-state":Hh(m.open),...d,ref:n,deferPointerDownOutside:!0,onDismiss:()=>m.onOpenChange(!1)})})})},"DialogContentImpl")),Yee="DialogTitle",$c=h.forwardRef(ea(function(t,n){const{__scopeDialog:r,...o}=t,l=Qa(Yee,r),{setTitleCount:c}=l;return Vt(()=>(c(d=>d+1),()=>c(d=>d-1)),[c]),s.jsx(Ge.h2,{id:l.titleId,...o,ref:n})},"DialogTitle")),Wee="DialogDescription",Hc=h.forwardRef(ea(function(t,n){const{__scopeDialog:r,...o}=t,l=Qa(Wee,r),{setDescriptionCount:c}=l;return Vt(()=>(c(d=>d+1),()=>c(d=>d-1)),[c]),s.jsx(Ge.p,{id:l.descriptionId,...o,ref:n})},"DialogDescription")),Qee="DialogClose",lf=h.forwardRef(ea(function(t,n){const{__scopeDialog:r,...o}=t,l=Qa(Qee,r);return s.jsx(Ge.button,{type:"button",...o,ref:n,onClick:je(t.onClick,()=>l.onOpenChange(!1))})},"DialogClose"));function Hh(e){return e?"open":"closed"}ea(Hh,"getState");var Xee=Object.defineProperty,ri=(e,t)=>Xee(e,"name",{value:t,configurable:!0}),Zee="AlertDialog",[Jee,T0e]=nr(Zee,[OI]),ai=OI(),ete=ri(e=>{const{__scopeAlertDialog:t,...n}=e,r=ai(t);return s.jsx(Fh,{...r,...n,modal:!0})},"AlertDialog");h.forwardRef(ri(function(t,n){const{__scopeAlertDialog:r,...o}=t,l=ai(r);return s.jsx(_I,{...l,...o,ref:n})},"AlertDialogTrigger"));var tte=ri(e=>{const{__scopeAlertDialog:t,...n}=e,r=ai(t);return s.jsx($h,{...r,...n})},"AlertDialogPortal"),nte=h.forwardRef(ri(function(t,n){const{__scopeAlertDialog:r,...o}=t,l=ai(r);return s.jsx(Bc,{...l,...o,ref:n})},"AlertDialogOverlay")),rte="AlertDialogContent",[ate,ste]=Jee(rte),ite=h.forwardRef(ri(function(t,n){const{__scopeAlertDialog:r,children:o,...l}=t,c=ai(r),d=h.useRef(null),m=Qe(n,d),p=h.useRef(null);return s.jsx(ate,{scope:r,cancelRef:p,children:s.jsx(Fc,{role:"alertdialog",...c,...l,ref:m,onOpenAutoFocus:je(l.onOpenAutoFocus,y=>{y.preventDefault(),p.current?.focus({preventScroll:!0})}),onPointerDownOutside:y=>y.preventDefault(),onInteractOutside:y=>y.preventDefault(),children:o})})},"AlertDialogContent")),ote=h.forwardRef(ri(function(t,n){const{__scopeAlertDialog:r,...o}=t,l=ai(r);return s.jsx($c,{...l,...o,ref:n})},"AlertDialogTitle")),lte=h.forwardRef(ri(function(t,n){const{__scopeAlertDialog:r,...o}=t,l=ai(r);return s.jsx(Hc,{...l,...o,ref:n})},"AlertDialogDescription")),cte=h.forwardRef(ri(function(t,n){const{__scopeAlertDialog:r,...o}=t,l=ai(r);return s.jsx(lf,{...l,...o,ref:n})},"AlertDialogAction")),ute="AlertDialogCancel",dte=h.forwardRef(ri(function(t,n){const{__scopeAlertDialog:r,...o}=t,{cancelRef:l}=ste(ute,r),c=ai(r),d=Qe(n,l);return s.jsx(lf,{...c,...o,ref:d})},"AlertDialogCancel")),fte=ete,mte=tte,LI=nte,qI=ite,UI=cte,zI=dte,VI=ote,BI=lte;const Yw=no("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover-elevate active-elevate-2",{variants:{variant:{default:"bg-primary text-primary-foreground border border-primary-border",destructive:"bg-destructive text-destructive-foreground shadow-sm border-destructive-border",outline:" border [border-color:var(--button-outline)] shadow-xs active:shadow-none ",secondary:"border bg-secondary text-secondary-foreground border border-secondary-border ",ghost:"border border-transparent",link:"text-primary underline-offset-4 hover:underline"},size:{default:"min-h-9 coarse:min-h-11 px-4 py-2",sm:"min-h-8 coarse:min-h-11 rounded-md px-3 text-xs",lg:"min-h-10 coarse:min-h-11 rounded-md px-8",icon:"h-9 w-9 coarse:size-11"}},defaultVariants:{variant:"default",size:"default"}}),Cr=h.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},l)=>{const c=r?Q0:"button";return s.jsx(c,{className:Y(Yw({variant:t,size:n,className:e})),ref:l,...o})});Cr.displayName="Button";const pte=fte,hte=mte,FI=h.forwardRef(({className:e,...t},n)=>s.jsx(LI,{className:Y("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));FI.displayName=LI.displayName;const $I=h.forwardRef(({className:e,...t},n)=>s.jsxs(hte,{children:[s.jsx(FI,{}),s.jsx(qI,{ref:n,className:Y("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
51nded-lg",e),...t})]}));$I.displayName=qI.displayName;const HI=({className:e,...t})=>s.jsx("div",{className:Y("flex flex-col space-y-2 text-center sm:text-left",e),...t});HI.displayName="AlertDialogHeader";const GI=({className:e,...t})=>s.jsx("div",{className:Y("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});GI.displayName="AlertDialogFooter";const KI=h.forwardRef(({className:e,...t},n)=>s.jsx(VI,{ref:n,className:Y("text-lg font-semibold",e),...t}));KI.displayName=VI.displayName;const YI=h.forwardRef(({className:e,...t},n)=>s.jsx(BI,{ref:n,className:Y("text-sm text-muted-foreground",e),...t}));YI.displayName=BI.displayName;const WI=h.forwardRef(({className:e,...t},n)=>s.jsx(UI,{ref:n,className:Y(Yw(),e),...t}));WI.displayName=UI.displayName;const QI=h.forwardRef(({className:e,...t},n)=>s.jsx(zI,{ref:n,className:Y(Yw({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));QI.displayName=zI.displayName;const yr=h.forwardRef(({className:e,type:t,...n},r)=>s.jsx("input",{type:t,className:Y("flex h-9 coarse:h-11 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));yr.displayName="Input";const gte=no("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),xr=h.forwardRef(({className:e,...t},n)=>s.jsx(kh,{ref:n,className:Y(gte(),e),...t}));xr.displayName=kh.displayName;const XI=h.createContext(null);function yte({children:e}){const[t,n]=h.useState(null),[r,o]=h.useState(""),l=h.useRef(null),c=h.useCallback(S=>{const C=l.current;l.current=null,n(null),o(""),C&&(C.kind==="confirm"?C.resolve(S===!0):C.resolve(typeof S=="string"?S:null))},[]),d=h.useCallback(S=>new Promise(C=>{const N={kind:"confirm",options:S,resolve:C};l.current=N,n(N)}),[]),m=h.useCallback(S=>new Promise(C=>{const N={kind:"prompt",options:S,resolve:C};l.current=N,o(S.defaultValue??""),n(N)}),[]),p=h.useMemo(()=>({confirm:d,prompt:m}),[d,m]),y=t?.options,g=t?.kind==="prompt",v=g?y:null,b=!!v?.required&&r.trim().length===0;return s.jsxs(XI.Provider,{value:p,children:[e,s.jsx(pte,{open:t!=null,onOpenChange:S=>{S||c(g?null:!1)},children:s.jsxs($I,{children:[s.jsxs(HI,{children:[s.jsx(KI,{children:y?.title}),y?.description?s.jsx(YI,{children:y.description}):null]}),y?.details?s.jsx("p",{className:"text-xs text-muted-foreground whitespace-pre-line",children:y.details}):null,v?s.jsxs("div",{className:"space-y-2",children:[v.label?s.jsx(xr,{htmlFor:"confirm-dialog-input",children:v.label}):null,s.jsx(yr,{id:"confirm-dialog-input",autoFocus:!0,value:r,maxLength:v.maxLength,placeholder:v.placeholder,onChange:S=>o(S.target.value),onKeyDown:S=>{S.key==="Enter"&&!b&&(S.preventDefault(),c(r))}})]}):null,s.jsxs(GI,{children:[s.jsx(QI,{onClick:()=>c(g?null:!1),children:y?.cancelLabel??"Cancel"}),s.jsx(WI,{disabled:b,className:y?.destructive?"bg-destructive text-destructive-foreground hover:bg-destructive/90":void 0,onClick:S=>{S.preventDefault(),c(g?r:!0)},children:y?.confirmLabel??(g?"Save":"Continue")})]})]})})]})}function ZI(){const e=h.useContext(XI);if(!e)throw new Error("useConfirm/usePrompt require <ConfirmDialogProvider> above them in the tree");return e}function xte(){return ZI().confirm}function k0e(){return ZI().prompt}const vte="https://us.i.posthog.com",bte="https://us.posthog.com";function _j(e){if(typeof e!="string")return null;const t=e.trim().replace(/\/+$/,"");return t===""?null:t}function wte(e){return{apiHost:_j(e.VITE_POSTHOG_HOST)??vte,uiHost:_j(e.VITE_POSTHOG_UI_HOST)??bte}}const Ste={VITE_POSTHOG_HOST:"https://us.i.posthog.com"};let Or=null,$d=!1,Ux=!1,Fo=null;const Cte=["$current_url","$pathname"];function Gp(){if(typeof window>"u")return Fo??"";const e=window.location?.pathname??"",t=`${window.location?.search??""}${window.location?.hash??""}`;return Fo===null?`${e}${t}`:!/[?#]/.test(Fo)&&Fo===e?`${Fo}${t}`:Fo}function ll(e){return G_(e)}function Nte(e){return Cte.some(t=>{const n=e.properties[t];return typeof n=="string"&&ll(n)})}function Ate(e,t=Gp()){return!e||ll(t)||Nte(e)||e.event==="$snapshot"&&
51kb(e)?null:Rb(e)}function Ww(){const e="phc_BWJLB8L3u57YrqgUZ4oxXaWHEcLK7VpkxKb67mi5vvmh",{apiHost:t,uiHost:n}=wte(Ste);$d||Ux||!il()||ll(Gp())||(Ux=!0,Ce(()=>import("./module-6uiZCBwb.js"),[]).then(r=>{Or=r.posthog,Or.init(e,{api_host:t,ui_host:n,autocapture:!1,capture_pageview:!1,respect_dnt:!0,disable_session_recording:!0,before_send:Ate,session_recording:{blockSelector:".ph-no-capture",maskAllInputs:!0},loaded:o=>{il()&&!ll(Gp())?(o.opt_in_capturing(),o.startSessionRecording()):(o.stopSessionRecording(),o.opt_out_capturing())}}),$d=!0}).catch(()=>{Ux=!1,Or=null}))}function Ete(e){if(Fo=e,!$d){ll(e)||Ww();return}if(Or){if(ll(e)){Or.stopSessionRecording(),Or.opt_out_capturing();return}il()&&(Or.opt_in_capturing(),Or.startSessionRecording())}}function jte(e){if(e&&!$d){Ww();return}!$d||!Or||(e&&!ll(Gp())?(Or.opt_in_capturing(),Or.startSessionRecording(),Or.capture("$pageview",{source:"consent_grant"})):(Or.stopSessionRecording(),Or.opt_out_capturing()))}const Qw="vp-referral-code";function Tte(){if(!(typeof window>"u"))try{const e=new URLSearchParams(window.location.search),t=e.get("r")??e.get("ref");t?.trim()&&window.sessionStorage.setItem(Qw,t.trim())}catch{}}function R0e(){if(typeof window>"u")return;const e=new URLSearchParams(window.location.search),t=e.get("r")??e.get("ref");if(t?.trim())return t.trim();try{return window.sessionStorage.getItem(Qw)?.trim()||void 0}catch{return}}function P0e(){try{window.sessionStorage.removeItem(Qw)}catch{}}function kte(e){h.useEffect(()=>{const t=e.current;if(!t||typeof ResizeObserver>"u")return;const n=document.documentElement,r=()=>{n.style.setProperty("--vp-header-h",`${Math.round(t.offsetHeight)}px`)};r();const o=new ResizeObserver(r);return o.observe(t),()=>{o.disconnect(),n.style.removeProperty("--vp-header-h")}},[e])}const Ij="/api/overlay-impressions";function Rte(){try{if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID()}catch{}return`i${Date.now().toString(36)}${Math.random().toString(36).slice(2,12)}`}function Pte(e){const t=JSON.stringify(e);try{if(typeof navigator<"u"&&typeof navigator.sendBeacon=="function"){const n=new Blob([t],{type:"application/json"});if(navigator.sendBeacon(Ij,n))return}}catch{}try{if(typeof fetch!="function")return;fetch(Ij,{method:"POST",headers:{"Content-Type":"application/json"},body:t,keepalive:!0,credentials:"same-origin"}).catch(()=>{})}catch{}}function Ote(e=Pte){let t=null,n=!1;const r=(o,l)=>{t&&e({impressionKey:t.key,overlayId:t.overlayId,...t.subjectRef?{subjectRef:t.subjectRef}:{},surface:l,outcome:o})};return{show(o,l,c){t&&!n&&t.overlayId===o&&t.subjectRef===l||(t={key:Rte(),overlayId:o,subjectRef:l},n=!1,r("shown",c))},settle(o,l){!t||n||(n=!0,r(o,l))},leave(o){!t||n||(n=!0,r("expired",o),t=null)}}}function Bm(){try{return typeof window<"u"&&window.location?.pathname?window.location.pathname.slice(0,512):"/"}catch{return"/"}}function JI(e,t,n){const r=h.useRef(Ote());return h.useEffect(()=>{if(!n)return;const o=r.current;return o.show(e,t,Bm()),()=>o.leave(Bm())},[n,e,t]),h.useEffect(()=>{if(!n)return;const o=r.current,l=()=>o.leave(Bm());return window.addEventListener("pagehide",l),()=>window.removeEventListener("pagehide",l)},[n]),h.useCallback(o=>{r.current.settle(o,Bm())},[])}const fp={"consent-gate":0,"promo-modal":10,"game-invite":20},_te=["promo-modal","game-invite"],Db=new Set(_te);function Ite(e,t){const n=Object.keys(fp).filter(o=>e[o]).sort((o,l)=>fp[o]-fp[l]),r=n[0];return r?Db.has(r)?n.some(o=>!Db.has(o))?null:t.grantedThisView===r?r:t.grantedThisView!==null||t.yielded?null:r:r:null}const eM=h.createContext(null);function Mte({children:e}){const[t]=Hn(),[n,r]=h.useState({}),[o,l]=h.useState(null),[c,d]=h.useState(!1),m=h.useRef({});h.useEffect(()=>{l(null),d(!1)},[t]),h.useEffect(()=>{const v=m.current;for(const b of Object.keys(fp))if(v[b]&&!n[b]){d(!0);break}m.current=n},[n]);const p=h.useMemo(()=>Ite(n,{grantedThisView:o,yielded:c}),[n,o,c]);h.useEffect(()=>{p&&Db.has(p)&&l(p)},[p]);const y=h.useCallback((v,b)=>{r(S=>S[v]===b?S:{...S,[v]:b})},[]),g=h.useMemo(()=>({activeId:p,want:y}),[p,y]);return s.jsx(eM.Provider,{value:g,children:e})}
51function Xw(e,t){const n=h.useContext(eM),r=n?.want;return h.useEffect(()=>{if(r)return r(e,t),()=>r(e,!1)},[r,e,t]),n?n.activeId===e:t}function tM(e){const t=e.trim();if(!t)return null;if(t.startsWith("/"))return t;try{const n=new URL(t);return n.protocol==="https:"||n.protocol==="http:"?t:null}catch{return null}}const Ut=h.forwardRef(({className:e,tone:t="default",goldLining:n=!1,unpadded:r=!1,...o},l)=>s.jsx("div",{ref:l,className:Y("rounded-card",t==="default"&&"vp-glass",t==="strong"&&"vp-glass-strong",t==="dark"&&"vp-glass-dark",t==="solid"&&"border border-card-border bg-card text-card-foreground shadow-sm",n&&"ring-1 ring-vida-gold-500/40",!r&&"p-5 sm:p-6",e),...o}));Ut.displayName="GlassCard";const Dte=h.forwardRef(({className:e,tone:t="strong",...n},r)=>s.jsx("div",{ref:r,className:Y("rounded-xl p-6 sm:p-8",t==="default"&&"vp-glass",t==="strong"&&"vp-glass-strong",t==="dark"&&"vp-glass-dark",e),...n}));Dte.displayName="GlassPanel";const Lte=no("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-pill font-semibold tracking-[-0.01em] select-none motion-safe:transition-[transform,box-shadow,background-color,opacity] motion-safe:duration-200 active:scale-[0.97] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-45 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{primary:"bg-primary text-primary-foreground shadow-lg hover:bg-primary/90 hover:shadow-xl",primaryOnDark:"border border-white/20 bg-vida-green-700 text-white ring-1 ring-vida-mint/35 shadow-[0_10px_30px_color-mix(in_srgb,var(--vp-green-950)_35%,transparent)] hover:bg-vida-green-600 hover:border-white/30 hover:shadow-[0_12px_36px_color-mix(in_srgb,var(--vp-green-950)_40%,transparent)]",light:"bg-card text-primary shadow-sm hover:shadow-md",ghost:"bg-muted text-ink hover:bg-muted/80",glass:"border border-white/40 bg-white/22 text-white backdrop-blur-md [text-shadow:0_1px_2px_rgba(0,0,0,0.35)] hover:bg-white/32",glassLight:"border border-white/60 bg-white/55 text-vida-green-800 shadow-sm backdrop-blur-md hover:bg-white/80 hover:shadow-md dark:border-white/15 dark:bg-white/10 dark:text-white dark:hover:bg-white/20",gold:"bg-transparent text-vida-gold-700 ring-1 ring-vida-gold-500/50 hover:bg-vida-gold-500/10 dark:text-vida-gold-300 dark:ring-vida-gold-300/40 dark:hover:bg-vida-gold-300/10",goldSolid:"bg-vida-gold-500 text-vida-green-950 shadow-lg ring-1 ring-vida-gold-300/50 hover:bg-vida-gold-300 hover:text-vida-green-900 hover:shadow-xl active:bg-vida-gold-200",destructive:"bg-danger text-white shadow-sm hover:bg-danger/90"},size:{sm:"min-h-9 px-4 text-sm",default:"min-h-12 px-6 text-body",lg:"min-h-13 px-8 text-body",icon:"size-11"},block:{true:"w-full",false:""}},defaultVariants:{variant:"primary",size:"default",block:!1}}),Le=h.forwardRef(({className:e,variant:t,size:n,block:r,asChild:o=!1,...l},c)=>{const d=o?Q0:"button";return s.jsx(d,{ref:c,className:Y(Lte({variant:t,size:n,block:r}),e),...l})});Le.displayName="VPButton";const qte=no("inline-flex items-center gap-1.5 rounded-pill px-3 py-1 text-overline normal-case tracking-[0.02em] font-semibold",{variants:{variant:{neutral:"bg-ink/5 text-ink-2 dark:bg-white/10 dark:text-white/80",mint:"bg-vida-mint-soft text-vida-green-800 ring-1 ring-vida-green-800/10 dark:bg-vida-green-700 dark:text-vida-mint dark:ring-white/15",green:"bg-primary text-primary-foreground",gold:"bg-transparent text-vida-gold-700 ring-1 ring-vida-gold-500/40 dark:text-vida-gold-300 dark:ring-vida-gold-300/40",research:"bg-amber-tint text-amber ring-1 ring-amber/20",dark:"bg-white/15 text-white ring-1 ring-white/20",outline:"bg-transparent text-ink-2 ring-1 ring-ink/15 dark:text-white/80 dark:ring-white/20"},interactive:{true:"cursor-pointer motion-safe:transition-colors hover:bg-ink/10 dark:hover:bg-white/15",false:""}},defaultVariants:{variant:"neutral",interactive:!1}}),zt=h.forwardRef(({className:e,variant:t,interactive:n,...r},o)=>s.jsx("span",{ref:o,className:Y(qte({variant:t,interactive:n}),e),...r}));zt.displayName="Pill";const si=h.forwardRef(({className:e,overline:t,title:n,sub:r,dark:o=!1,center:l=!1,as:c="h2",...d},m)=>{const p=c;return s.jsxs("header",{ref:m,className:Y("max-w-2xl",l&&"mx-auto text-center",e),...d,children:[t?s.jsx("p",{className:Y("text-overline uppercase mb-2.5",o?"text-vida-mint":"text-primary"),children:t}):null,s.jsx(p,{className:Y("font-display text-t1",o?"text-white":"text-ink"),children:n}),r?s.jsx("p",{className:Y("text-bodylg mt-3",o?"text-white/70":"text-ink-2"),children:r}):null]})});si.displayName="SectionHeading";const Ute=h.forwardRef(({className:e,label:t,value:n,icon:r,dark:o=!1,...l},c)=>s.jsxs("div",{ref:c,className:Y("inline-flex items-center gap-2.5 rounded-pill px-4 py-2",o?"bg-white/10 ring-1 ring-white/15":"bg-card shadow-xs ring-1 ring-ink/10",e),...l,children:[r?s.jsx("span",{className:Y("shrink-0 [&_svg]:size-4",o?"text-vida-mint":"text-primary"),children:r}):null,s.jsxs("span",{className:"flex flex-col leading-none",children:[s.jsx("span",{className:Y("text-[11px] font-semibold uppercase tracking-[0.08em]",o?"text-white/60":"text-ink-3"),children:t}),s.jsx("span",{className:Y("font-mono text-caption font-semibold tabular-nums mt-1",o?"text-white":"text-ink"),children:n})]})]}));Ute.displayName="StatChip";const nM=!0,rM="Research use only",zte="Research use only.",Mj="Sold as a chemical reference material for in-vitro laboratory research only. Not for human or veterinary use. By adding to cart you affirm you are a qualified researcher, 21+.",zx="Accept the research-use terms",Vte="Confirm the research-use certification before continuing to payment.",Dj="Confirm the research-use certification before placing your order.",Bte="Accept the research-use terms below to finish your order.",Fte="Tap OK, then accept the research-use terms and tap Complete order.",$te="By placing this order, you certify that you are at least 21 years of age and a qualified researcher (or purchasing on behalf of a research institution, laboratory, or organization), and that this purchase is strictly for lawful in-vitro laboratory research. Products are not for human or veterinary use of any kind and are not a drug, food, supplement, or cosmetic. You accept our Terms of Service, all-sales-final Refund Policy, and Research Use & FDA Disclaimer, and you assume all responsibility for the safe handling, storage, use, and disposal of these materials.",Hte="Match the lot number on your label to the COA before any research use.",Lj="Researcher reviews",Gte="What researchers say",Kte="Verified-member reviews of packaging, fulfillment, documentation, and material condition. Moderated for research-use compliance before they appear.",Yte="researcher",Wte="Approved & moderated for research-use compliance.",Qte="Your review is in the queue. A moderator reviews it for research-use compliance before it appears here, usually within a business day.",Xte="Research use only.",Zte="Research compounds",Jte="Research-use compounds with analytical lot documentation.",O0e="Research Use Only. Vida answers catalog, order, and policy questions, and can bring in a human. Not medical advice.";function ene(e){return`${e} is supplied as a reference compound for in-vitro and laboratory research.`}const Nc=h.forwardRef(({className:e,cap:t="#2E8A5F",label:n="",sub:r="",size:o=96,tilt:l=0,withShadow:c=!0,style:d,...m},p)=>{const y=o,g=y*2.3;return s.jsxs("div",{ref:p,role:"img","aria-label":n?`${n} research vial`:"Research vial",className:Y("relative shrink-0 select-none",e),style:{width:y,height:g,transform:l?`rotate(${l}deg)`:void 0,...d}
51,...m,children:[s.jsx("div",{className:"absolute",style:{top:0,left:"11%",width:"78%",height:"11%",background:`linear-gradient(180deg, ${t} 0%, color-mix(in oklab, ${t} 72%, black) 100%)`,borderRadius:`${y*.09}px ${y*.09}px ${y*.03}px ${y*.03}px`,boxShadow:"inset 0 2px 3px rgba(255,255,255,.35), inset 0 -2px 4px rgba(0,0,0,.25)"}}),s.jsx("div",{className:"absolute",style:{top:"10.4%",left:"8%",width:"84%",height:"7%",background:"linear-gradient(90deg,#9aa4a0 0%,#e8edeb 18%,#b9c2be 38%,#f2f5f4 55%,#a8b2ae 78%,#cfd6d3 100%)",borderRadius:y*.04}}),s.jsxs("div",{className:"absolute overflow-hidden",style:{top:"16.5%",left:0,width:"100%",height:"83.5%",background:"linear-gradient(90deg, rgba(214,226,222,.92) 0%, rgba(244,249,247,.96) 22%, rgba(255,255,255,.98) 40%, rgba(228,237,234,.92) 70%, rgba(203,216,212,.9) 100%)",borderRadius:`${y*.13}px ${y*.13}px ${y*.18}px ${y*.18}px`,boxShadow:"inset 0 0 0 1px rgba(14,31,24,.07), inset 6px 0 10px rgba(255,255,255,.7), inset -7px -4px 12px rgba(14,31,24,.10)"},children:[s.jsx("div",{className:"absolute",style:{bottom:0,left:0,width:"100%",height:"26%",background:"linear-gradient(180deg, rgba(255,255,255,.65), rgba(241,244,242,.95))",borderTop:"1px solid rgba(14,31,24,.05)"}}),s.jsxs("div",{className:"absolute flex flex-col items-center justify-center text-center",style:{top:"18%",left:"6%",width:"88%",height:"52%",background:"#fff",borderRadius:y*.06,boxShadow:"0 1px 3px rgba(14,31,24,.10)",gap:y*.04,padding:y*.06},children:[s.jsx("div",{style:{width:"46%",height:3,borderRadius:2,background:t,opacity:.9}}),y>=40&&s.jsxs(s.Fragment,{children:[n?s.jsx("div",{className:"font-display",style:{fontWeight:700,fontSize:Math.max(9,y*.115),letterSpacing:"-0.01em",color:"var(--vp-green-900)",lineHeight:1.1},children:n}):null,r?s.jsx("div",{style:{fontSize:Math.max(8,y*.095),fontWeight:600,color:"var(--vp-ink-3)"},children:r}):null,s.jsx("div",{className:"uppercase",style:{fontSize:Math.max(6,y*.066),fontWeight:650,letterSpacing:"0.06em",color:"var(--vp-warn-ink)"},children:rM})]})]}),s.jsx("div",{className:"absolute",style:{top:0,left:"14%",width:"9%",height:"100%",background:"linear-gradient(180deg, rgba(255,255,255,.85), rgba(255,255,255,.25))",borderRadius:99,filter:"blur(1px)"}})]}),c&&s.jsx("div",{className:"absolute",style:{bottom:-y*.14,left:"6%",width:"88%",height:y*.16,background:"radial-gradient(ellipse at center, rgba(14,31,24,.22), transparent 70%)",borderRadius:"50%"}})]})});Nc.displayName="VialAvatar";const aM="FOR LABORATORY RESEARCH USE ONLY. Not for human or veterinary use. Not a drug, food, supplement, or cosmetic.",sM="vp-ruo-ribbon-dismissed";function tne(){if(typeof window>"u")return!1;try{return window.sessionStorage.getItem(sM)==="1"}catch{return!1}}function nne(){try{window.sessionStorage.setItem(sM,"1")}catch{}}function rne({compact:e=!1,dismissible:t=!1,className:n}){const[r,o]=h.useState(tne);return t&&r?null:s.jsxs("div",{role:"note","data-testid":"banner-disclaimer",className:Y("text-center font-semibold tracking-[0.02em] text-white/90",t?"relative border-b border-white/10 bg-vida-green-950/80 backdrop-blur-md supp
51orts-[backdrop-filter]:bg-vida-green-950/75":"bg-vida-green-950",e?"px-3.5 py-[7px] text-[11.5px] leading-[1.4]":"px-4 py-2 text-[12.5px] leading-[1.4]",t&&"pr-10",n),children:[s.jsxs("span",{"aria-hidden":"true",className:"text-vida-mint",children:["â "," "]}),aM,t&&s.jsx("button",{type:"button","data-testid":"button-dismiss-ruo","aria-label":"Dismiss research-use notice for this session",onClick:()=>{nne(),o(!0)},className:"absolute top-1/2 right-2 grid size-6 -translate-y-1/2 place-items-center rounded-pill text-white/70 hover:bg-white/10 hover:text-white focus-visible:ring-2 focus-visible:ring-vida-mint focus-visible:outline-none",children:s.jsx(ro,{"aria-hidden":"true",className:"size-3.5"})})]})}function qj(e){if(typeof e=="string")return e;const t=Math.round(e*100)%100!==0;return`$${e.toFixed(t?2:0)}`}const Zw=h.forwardRef(({className:e,price:t,compareAt:n,suffix:r,size:o="default",dark:l=!1,...c},d)=>s.jsxs("span",{ref:d,className:Y("inline-flex items-baseline gap-1.5 tabular-nums",e),...c,children:[s.jsx("span",{className:Y("font-display font-bold tracking-[-0.015em]",o==="sm"&&"text-body",o==="default"&&"text-t3",o==="lg"&&"text-t2",l?"text-white":"text-ink"),children:qj(t)}),n!==void 0&&s.jsx("s",{className:Y("text-caption font-medium",l?"text-white/50":"text-ink-3"),children:qj(n)}),r?s.jsx("span",{className:Y("text-caption",l?"text-white/60":"text-ink-3"),children:r}):null]}));Zw.displayName="PriceTag";function ane(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const iM=ee.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),cf=()=>{const e=ee.useContext(iM);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};ane(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not( 52[data-state=closed] 53){opacity:0}
53[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function sne(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function ine(){return Jw(/^Mac/)}function one(){return Jw(/^iPhone/)}function Uj(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function lne(){return Jw(/^iPad/)||ine()&&navigator.maxTouchPoints>1}function oM(){return one()||lne()}function Jw(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const cne=24,une=typeof window<"u"?h.useLayoutEffect:h.useEffect;function zj(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const Vx=typeof document<"u"&&window.visualViewport;function Vj(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function lM(e){for(Vj(e)&&(e=e.parentElement);e&&!Vj(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const dne=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let Fm=0,Bx;function fne(e={}){let{isDisabled:t}=e;une(()=>{if(!t)return Fm++,Fm===1&&oM()&&(Bx=mne()),()=>{Fm--,Fm===0&&Bx?.()}},[t])}function mne(){let e,t=0,n=g=>{e=lM(g.target),!(e===document.documentElement&&e===document.body)&&(t=g.changedTouches[0].pageY)},r=g=>{if(!e||e===document.documentElement||e===document.body){g.preventDefault();return}let v=g.changedTouches[0].pageY,b=e.scrollTop,S=e.scrollHeight-e.clientHeight;S!==0&&((b<=0&&v>t||b>=S&&v<t)&&g.preventDefault(),t=v)},o=g=>{let v=g.target;Lb(v)&&v!==document.activeElement&&(g.preventDefault(),v.style.transform="translateY(-2000px)",v.focus(),requestAnimationFrame(()=>{v.style.transform=""}))},l=g=>{let v=g.target;Lb(v)&&(v.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{v.style.transform="",Vx&&(Vx.height<window.innerHeight?requestAnimationFrame(()=>{Bj(v)}):Vx.addEventListener("resize",()=>Bj(v),{once:!0}))}))},c=()=>{window.scrollTo(0,0)},d=window.pageXOffset,m=window.pageYOffset,p=zj(pne(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let y=zj(ad(document,"touchstart",n,{passive:!1,capture:!0}),ad(document,"touchmove",r,{passive:!1,capture:!0}),ad(document,"touchend",o,{passive:!1,capture:!0}),ad(document,"focus",l,!0),ad(window,"scroll",c));return()=>{p(),y(),window.scrollTo(d,m)}}function pne(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function ad(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Bj(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=lM(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,o=e.getBoundingClientRect().top,l=e.getBoundingClientRect().bottom;const c=n.getBoundingClientRect().bottom+cne;l>c&&(n.scrollTop+=o-r)}e=n.parentElement}}
53function Lb(e){return e instanceof HTMLInputElement&&!dne.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function hne(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function gne(...e){return t=>e.forEach(n=>hne(n,t))}function cM(...e){return h.useCallback(gne(...e),e)}const uM=new WeakMap;function Pn(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([o,l])=>{if(o.startsWith("--")){e.style.setProperty(o,l);return}r[o]=e.style[o],e.style[o]=l}),!n&&uM.set(e,r)}function yne(e,t){if(!e||!(e instanceof HTMLElement))return;let n=uM.get(e);n&&(e.style[t]=n[t])}const wn=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function $m(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let o=r.match(/^matrix3d\((.+)\)$/);return o?parseFloat(o[1].split(", ")[wn(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[wn(t)?5:4]):null)}function xne(e){return 8*(Math.log(e+1)-2)}function Fx(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function vne(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const Xt={DURATION:.5,EASE:[.32,.72,0,1]},dM=.4,bne=.25,wne=100,fM=8,qo=16,qb=26,$x="vaul-dragging";function mM(e){const t=ee.useRef(e);return ee.useEffect(()=>{t.current=e}),ee.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function Sne({defaultProp:e,onChange:t}){const n=ee.useState(e),[r]=n,o=ee.useRef(r),l=mM(t);return ee.useEffect(()=>{o.current!==r&&(l(r),o.current=r)},[r,o,l]),n}function pM({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Sne({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:r,d=mM(n),m=ee.useCallback(p=>{if(l){const g=typeof p=="function"?p(e):p;g!==e&&d(g)}else o(p)},[l,e,o,d]);return[c,m]}function Cne({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:o,fadeFromIndex:l,onSnapPointChange:c,direction:d="bottom",container:m,snapToSequentialPoint:p}){const[y,g]=pM({prop:e,defaultProp:n?.[0],onChange:t}),[v,b]=ee.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);ee.useEffect(()=>{function P(){b({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",P),()=>window.removeEventListener("resize",P)},[]);const S=ee.useMemo(()=>y===n?.[n.length-1]||null,[n,y]),C=ee.useMemo(()=>{var P;return(P=n?.findIndex(M=>M===y))!=null?P:null},[n,y]),N=n&&n.length>0&&(l||l===0)&&!Number.isNaN(l)&&n[l]===y||!n,A=ee.useMemo(()=>{const P=m?{width:m.getBoundingClientRect().width,height:m.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var M;return(M=n?.map(q=>{const U=typeof q=="string";let V=0;if(U&&(V=parseInt(q,10)),wn(d)){const L=U?V:v?q*P.height:0;return v?d==="bottom"?P.height-L:-P.height+L:L}const $=U?V:v?q*P.width:0;return v?d==="right"?P.width-$:-P.width+$:$}))!=null?M:[]},[n,v,m]),T=ee.useMemo(()=>C!==null?A?.[C]:null,[A,C]),E=ee.useCallback(P=>{var M;const q=(M=A?.findIndex(U=>U===P))!=null?M:null;c(q),Pn(r.current,{transition:`transform ${Xt.DURATION}s cubic-bezier(${Xt.EASE.join(",")})`,transform:wn(d)?`translate3d(0, ${P}px, 0)`:`translate3d(${P}px, 0, 0)`}),A&&q!==A.length-1&&l!==void 0&&q!==l&&q<l?Pn(o.current,{transition:`opacity ${Xt.DURATION}s cubic-bezier(${Xt.EASE.join(",")})`,opacity:"0"}):Pn(o.current,{transition:`opacity ${Xt.DURATION}s cubic-bezier(${Xt.EASE.join(",")})`,opacity:"1"}),g(n?.[Math.max(q,0)])},[r.current,n,A,l,o,g]);ee.useEffect(()=>{if(y||e){var P;const M=(P=n?.findIndex(q=>q===e||q===y))!=null?P:-1;A&&M!==-1&&typeof A[M]=="number"&&E(A[M])}},[y,e,n,A,E]);function j({draggedDistance:P,closeDrawer:M,velocity:q,dismissible:U}){if(l===void 0)return;const V=d==="bottom"||d==="right"?(T??0)-P:(T??0)+P,$=C===l-1,L=C===0,H=P>0;if($&&Pn(o.current,{transition:`opacity ${Xt.DURATION}s cubic-bezier(${Xt.EASE.join(",")})`}),!p&&q>2&&!H){U?M():E(A[0]);return}if(!p&&q>2&&H&&A&&n){E(A[n.length-1]);return}const Q=A?.reduce((O,F)=>typeof O!="number"||typeof F!="number"?O:Math.abs(F-V)<Math.abs(O-V)?F:O),I=wn(d)?window.innerHeight:window.innerWidth;if(q>dM&&Math.abs(P)<I*.4){const O=H?1:-1;
53if(O>0&&S&&n){E(A[n.length-1]);return}if(L&&O<0&&U&&M(),C===null)return;E(A[C+O]);return}E(Q)}function _({draggedDistance:P}){if(T===null)return;const M=d==="bottom"||d==="right"?T-P:T+P;(d==="bottom"||d==="right")&&M<A[A.length-1]||(d==="top"||d==="left")&&M>A[A.length-1]||Pn(r.current,{transform:wn(d)?`translate3d(0, ${M}px, 0)`:`translate3d(${M}px, 0, 0)`})}function R(P,M){if(!n||typeof C!="number"||!A||l===void 0)return null;const q=C===l-1;if(C>=l&&M)return 0;if(q&&!M)return 1;if(!N&&!q)return null;const V=q?C+1:C-1,$=q?A[V]-A[V-1]:A[V+1]-A[V],L=P/Math.abs($);return q?1-L:L}return{isLastSnapPoint:S,activeSnapPoint:y,shouldFade:N,getPercentageDragged:R,setActiveSnapPoint:g,activeSnapPointIndex:C,onRelease:j,onDrag:_,snapPointsOffset:A}}const Nne=()=>()=>{};function Ane(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:o}=cf(),l=ee.useRef(null),c=h.useMemo(()=>document.body.style.backgroundColor,[]);function d(){return(window.innerWidth-qb)/window.innerWidth}ee.useEffect(()=>{if(t&&n){l.current&&clearTimeout(l.current);const m=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!m)return;vne(r&&!o?Fx(document.body,{background:"black"}):Nne,Fx(m,{transformOrigin:wn(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${Xt.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Xt.EASE.join(",")})`}));const p=Fx(m,{borderRadius:`${fM}px`,overflow:"hidden",...wn(e)?{transform:`scale(${d()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${d()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{p(),l.current=window.setTimeout(()=>{c?document.body.style.background=c:document.body.style.removeProperty("background")},Xt.DURATION*1e3)}}},[t,n,c])}let sd=null;function Ene({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:o,noBodyStyles:l}){const[c,d]=ee.useState(()=>typeof window<"u"?window.location.href:""),m=ee.useRef(0),p=ee.useCallback(()=>{if(Uj()&&sd===null&&e&&!l){sd={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:g,innerHeight:v}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-m.current}px`,left:`${-g}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const b=v-window.innerHeight;b&&m.current>=v&&(document.body.style.top=`${-(m.current+b)}px`)}),300)}},[e]),y=ee.useCallback(()=>{if(Uj()&&sd!==null&&!l){const g=-parseInt(document.body.style.top,10),v=-parseInt(document.body.style.left,10);Object.assign(document.body.style,sd),window.requestAnimationFrame(()=>{if(o&&c!==window.location.href){d(window.location.href);return}window.scrollTo(v,g)}),sd=null}},[c]);return ee.useEffect(()=>{function g(){m.current=window.scrollY}return g(),window.addEventListener("scroll",g),()=>{window.removeEventListener("scroll",g)}},[]),ee.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||y()}},[t,y]),ee.useEffect(()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&p(),t||window.setTimeout(()=>{y()},500)):y())},[e,r,c,t,n,p,y]),{restorePositionSetting:y}}function jne({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:o,snapPoints:l,shouldScaleBackground:c=!1,setBackgroundColorOnScale:d=!0,closeThreshold:m=bne,scrollLockTimeout:p=wne,dismissible:y=!0,handleOnly:g=!1,fadeFromIndex:v=l&&l.length-1,activeSnapPoint:b,setActiveSnapPoint:S,fixed:C,modal:N=!0,onClose:A,nested:T,noBodyStyles:E=!1,direction:j="bottom",defaultOpen:_=!1,disablePreventScroll:R=!0,snapToSequentialPoint:P=!1,preventScrollRestoration:M=!1,repositionInputs:q=!0,onAnimationEnd:U,container:V,autoFocus:$=!1}){var L,H;const[Q=!1,I]=pM({defaultProp:_,prop:e,onChange:Se=>{t?.(Se),!Se&&!T&&jt(),setTimeout(()=>{U?.(Se)},Xt.DURATION*1e3),Se&&!N&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),Se||(document.body.style.pointerEvents="auto")}}),[O,F]=ee.useState(!1),[B,K]=ee.useState(!1),[le,Z]=ee.useState(!1),ie=ee.useRef(null),re=ee.useRef(null),de=ee.useRef(null),he=ee.useRef(null),pe=ee.useRef(null),oe=ee.useRef(!1),ge=ee.useRef(null),we=ee.useRef(0),be=ee.useRef(!1),Me=ee.useRef(!_),ze=ee.useRef(0),Ee=ee.useRef(null),Ct=ee.useRef(((L=Ee.current)==null?void 0:L.getBoundingClientRect().height)||0),Ft=ee.useRef(((H=Ee.current)==null?void 0:H.getBoundingClientRect().width)||0),pt=ee.useRef(0),Gn=ee.useCallback(Se=>
53{l&&Se===pn.length-1&&(re.current=new Date)},[]),{activeSnapPoint:Ht,activeSnapPointIndex:xe,setActiveSnapPoint:He,onRelease:et,snapPointsOffset:pn,onDrag:Gt,shouldFade:Lr,getPercentageDragged:Ar}=Cne({snapPoints:l,activeSnapPointProp:b,setActiveSnapPointProp:S,drawerRef:Ee,fadeFromIndex:v,overlayRef:ie,onSnapPointChange:Gn,direction:j,container:V,snapToSequentialPoint:P});fne({isDisabled:!Q||B||!N||le||!O||!q||!R});const{restorePositionSetting:jt}=Ene({isOpen:Q,modal:N,nested:T??!1,hasBeenOpened:O,preventScrollRestoration:M,noBodyStyles:E});function Tt(){return(window.innerWidth-qb)/window.innerWidth}function Kt(Se){var Xe,Ie;!y&&!l||Ee.current&&!Ee.current.contains(Se.target)||(Ct.current=((Xe=Ee.current)==null?void 0:Xe.getBoundingClientRect().height)||0,Ft.current=((Ie=Ee.current)==null?void 0:Ie.getBoundingClientRect().width)||0,K(!0),de.current=new Date,oM()&&window.addEventListener("touchend",()=>oe.current=!1,{once:!0}),Se.target.setPointerCapture(Se.pointerId),we.current=wn(j)?Se.pageY:Se.pageX)}function dr(Se,Xe){var Ie;let Fe=Se;const ht=(Ie=window.getSelection())==null?void 0:Ie.toString(),Ot=Ee.current?$m(Ee.current,j):null,vt=new Date;if(Fe.tagName==="SELECT"||Fe.hasAttribute("data-vaul-no-drag")||Fe.closest("[data-vaul-no-drag]"))return!1;if(j==="right"||j==="left")return!0;if(re.current&&vt.getTime()-re.current.getTime()<500)return!1;if(Ot!==null&&(j==="bottom"?Ot>0:Ot<0))return!0;if(ht&&ht.length>0)return!1;if(pe.current&&vt.getTime()-pe.current.getTime()<p&&Ot===0||Xe)return pe.current=vt,!1;for(;Fe;){if(Fe.scrollHeight>Fe.clientHeight){if(Fe.scrollTop!==0)return pe.current=new Date,!1;if(Fe.getAttribute("role")==="dialog")return!0}Fe=Fe.parentNode}return!0}function fr(Se){if(Ee.current&&B){const Xe=j==="bottom"||j==="right"?1:-1,Ie=(we.current-(wn(j)?Se.pageY:Se.pageX))*Xe,Fe=Ie>0,ht=l&&!y&&!Fe;if(ht&&xe===0)return;const Ot=Math.abs(Ie),vt=document.querySelector("[data-vaul-drawer-wrapper]"),Te=j==="bottom"||j==="top"?Ct.current:Ft.current;let Ye=Ot/Te;const st=Ar(Ot,Fe);if(st!==null&&(Ye=st),ht&&Ye>=1||!oe.current&&!dr(Se.target,Fe))return;if(Ee.current.classList.add($x),oe.current=!0,Pn(Ee.current,{transition:"none"}),Pn(ie.current,{transition:"none"}),l&&Gt({draggedDistance:Ie}),Fe&&!l){const lt=xne(Ie),Ke=Math.min(lt*-1,0)*Xe;Pn(Ee.current,{transform:wn(j)?`translate3d(0, ${Ke}px, 0)`:`translate3d(${Ke}px, 0, 0)`});return}const gt=1-Ye;if((Lr||v&&xe===v-1)&&(r?.(Se,Ye),Pn(ie.current,{opacity:`${gt}`,transition:"none"},!0)),vt&&ie.current&&c){const lt=Math.min(Tt()+Ye*(1-Tt()),1),Ke=8-Ye*8,ct=Math.max(0,14-Ye*14);Pn(vt,{borderRadius:`${Ke}px`,transform:wn(j)?`scale(${lt}) translate3d(0, ${ct}px, 0)`:`scale(${lt}) translate3d(${ct}px, 0, 0)`,transition:"none"},!0)}if(!l){const lt=Ot*Xe;Pn(Ee.current,{transform:wn(j)?`translate3d(0, ${lt}px, 0)`:`translate3d(${lt}px, 0, 0)`})}}}ee.useEffect(()=>{window.requestAnimationFrame(()=>{Me.current=!0})},[]),ee.useEffect(()=>{var Se;
53function Xe(){if(!Ee.current||!q)return;const Ie=document.activeElement;if(Lb(Ie)||be.current){var Fe;const ht=((Fe=window.visualViewport)==null?void 0:Fe.height)||0,Ot=window.innerHeight;let vt=Ot-ht;const Te=Ee.current.getBoundingClientRect().height||0,Ye=Te>Ot*.8;pt.current||(pt.current=Te);const st=Ee.current.getBoundingClientRect().top;if(Math.abs(ze.current-vt)>60&&(be.current=!be.current),l&&l.length>0&&pn&&xe){const gt=pn[xe]||0;vt+=gt}if(ze.current=vt,Te>ht||be.current){const gt=Ee.current.getBoundingClientRect().height;let lt=gt;gt>ht&&(lt=ht-(Ye?st:qb)),C?Ee.current.style.height=`${gt-Math.max(vt,0)}px`:Ee.current.style.height=`${Math.max(lt,ht-st)}px`}else sne()||(Ee.current.style.height=`${pt.current}px`);l&&l.length>0&&!be.current?Ee.current.style.bottom="0px":Ee.current.style.bottom=`${Math.max(vt,0)}px`}}return(Se=window.visualViewport)==null||Se.addEventListener("resize",Xe),()=>{var Ie;return(Ie=window.visualViewport)==null?void 0:Ie.removeEventListener("resize",Xe)}},[xe,l,pn]);function hn(Se){rr(),A?.(),Se||I(!1),setTimeout(()=>{l&&He(l[0])},Xt.DURATION*1e3)}function Zt(){if(!Ee.current)return;const Se=document.querySelector("[data-vaul-drawer-wrapper]"),Xe=$m(Ee.current,j);Pn(Ee.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${Xt.DURATION}s cubic-bezier(${Xt.EASE.join(",")})`}),Pn(ie.current,{transition:`opacity ${Xt.DURATION}s cubic-bezier(${Xt.EASE.join(",")})`,opacity:"1"}),c&&Xe&&Xe>0&&Q&&Pn(Se,{borderRadius:`${fM}px`,overflow:"hidden",...wn(j)?{transform:`scale(${Tt()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${Tt()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${Xt.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Xt.EASE.join(",")})`},!0)}function rr(){!B||!Ee.current||(Ee.current.classList.remove($x),oe.current=!1,K(!1),he.current=new Date)}function gn(Se){if(!B||!Ee.current)return;Ee.current.classList.remove($x),oe.current=!1,K(!1),he.current=new Date;const Xe=$m(Ee.current,j);
53if(!Se||!dr(Se.target,!1)||!Xe||Number.isNaN(Xe)||de.current===null)return;const Ie=he.current.getTime()-de.current.getTime(),Fe=we.current-(wn(j)?Se.pageY:Se.pageX),ht=Math.abs(Fe)/Ie;if(ht>.05&&(Z(!0),setTimeout(()=>{Z(!1)},200)),l){et({draggedDistance:Fe*(j==="bottom"||j==="right"?1:-1),closeDrawer:hn,velocity:ht,dismissible:y}),o?.(Se,!0);return}if(j==="bottom"||j==="right"?Fe>0:Fe<0){Zt(),o?.(Se,!0);return}if(ht>dM){hn(),o?.(Se,!1);return}var Ot;const vt=Math.min((Ot=Ee.current.getBoundingClientRect().height)!=null?Ot:0,window.innerHeight);var Te;const Ye=Math.min((Te=Ee.current.getBoundingClientRect().width)!=null?Te:0,window.innerWidth),st=j==="left"||j==="right";if(Math.abs(Xe)>=(st?Ye:vt)*m){hn(),o?.(Se,!1);return}o?.(Se,!0),Zt()}ee.useEffect(()=>(Q&&(Pn(document.documentElement,{scrollBehavior:"auto"}),re.current=new Date),()=>{yne(document.documentElement,"scrollBehavior")}),[Q]);function qr(Se){const Xe=Se?(window.innerWidth-qo)/window.innerWidth:1,Ie=Se?-qo:0;ge.current&&window.clearTimeout(ge.current),Pn(Ee.current,{transition:`transform ${Xt.DURATION}s cubic-bezier(${Xt.EASE.join(",")})`,transform:wn(j)?`scale(${Xe}) translate3d(0, ${Ie}px, 0)`:`scale(${Xe}) translate3d(${Ie}px, 0, 0)`}),!Se&&Ee.current&&(ge.current=setTimeout(()=>{const Fe=$m(Ee.current,j);Pn(Ee.current,{transition:"none",transform:wn(j)?`translate3d(0, ${Fe}px, 0)`:`translate3d(${Fe}px, 0, 0)`})},500))}function Kn(Se,Xe){if(Xe<0)return;const Ie=(window.innerWidth-qo)/window.innerWidth,Fe=Ie+Xe*(1-Ie),ht=-qo+Xe*qo;Pn(Ee.current,{transform:wn(j)?`scale(${Fe}) translate3d(0, ${ht}px, 0)`:`scale(${Fe}) translate3d(${ht}px, 0, 0)`,transition:"none"})}function St(Se,Xe){const Ie=wn(j)?window.innerHeight:window.innerWidth,Fe=Xe?(Ie-qo)/Ie:1,ht=Xe?-qo:0;Xe&&Pn(Ee.current,{transition:`transform ${Xt.DURATION}s cubic-bezier(${Xt.EASE.join(",")})`,transform:wn(j)?`scale(${Fe}) translate3d(0, ${ht}px, 0)`:`scale(${Fe}) translate3d(${ht}px, 0, 0)`})}return ee.useEffect(()=>{N||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[N]),ee.createElement(Fh,{defaultOpen:_,onOpenChange:Se=>{!y&&!Se||(Se?F(!0):hn(!0),I(Se))},open:Q},ee.createElement(iM.Provider,{value:{activeSnapPoint:Ht,snapPoints:l,setActiveSnapPoint:He,drawerRef:Ee,overlayRef:ie,onOpenChange:t,onPress:Kt,onRelease:gn,onDrag:fr,dismissible:y,shouldAnimate:Me,handleOnly:g,isOpen:Q,isDragging:B,shouldFade:Lr,closeDrawer:hn,onNestedDrag:Kn,onNestedOpenChange:qr,onNestedRelease:St,keyboardIsOpen:be,modal:N,snapPointsOffset:pn,activeSnapPointIndex:xe,direction:j,shouldScaleBackground:c,setBackgroundColorOnScale:d,noBodyStyles:E,container:V,autoFocus:$}},n))}const hM=ee.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:o,shouldFade:l,isOpen:c,modal:d,shouldAnimate:m}=cf(),p=cM(t,n),y=r&&r.length>0;if(!d)return null;const g=ee.useCallback(v=>o(v),[o]);return ee.createElement(Bc,{onMouseUp:g,ref:p,"data-vaul-overlay":"","data-vaul-snap-points":c&&y?"true":"false","data-vaul-snap-points-overlay":c&&l?"true":"false","data-vaul-animate":m?.current?"true":"false",...e})});hM.displayName="Drawer.Overlay";const gM=ee.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},o){const{drawerRef:l,onPress:c,onRelease:d,onDrag:m,keyboardIsOpen:p,snapPointsOffset:y,activeSnapPointIndex:g,modal:v,isOpen:b,direction:S,snapPoints:C,container:N,handleOnly:A,shouldAnimate:T,autoFocus:E}=cf(),[j,_]=ee.useState(!1),R=cM(o,l),P=ee.useRef(null),M=ee.useRef(null),q=ee.useRef(!1),U=C&&C.length>0;Ane();const V=(L,H,Q=0)=>{if(q.current)return!0;const I=Math.abs(L.y),O=Math.abs(L.x),F=O>I,B=["bottom","right"].includes(H)?1:-1;if(H==="left"||H==="right"){if(!(L.x*B<0)&&O>=0&&O<=Q)return F}else if(!(L.y*B<0)&&I>=0&&I<=Q)return!F;return q.current=!0,!0};ee.useEffect(()=>{U&&window.requestAnimationFrame(()=>{_(!0)})},[]);function $(L){P.current=null,q.current=!1,d(L)}return ee.createElement(Fc,{"data-vaul-drawer-direction":S,"data-vaul-drawer":"","data-vaul-delayed-snap-points":j?"true":"false","data-vaul-snap-points":b&&U?"true":"false","data-vaul-custom-container":N?"true":"false","data-vaul-animate":T?.current?"true":"false",...r,ref:R,style:y&&y.length>0?{"--snap-point-height":`${y[g??0]}px`,...t}:t,onPointerDown:L=>{A||(r.onPointerDown==null||r.onPointerDown.call(r,L),P.current={x:L.pageX,y:L.pageY},c(L))},onOpenAutoFocus:L=>{n?.(L),E||L.preventDefault()},onPointerDownOutside:L=>{if(e?.(L),!v||L.defaultPrevented){L.preventDefault();return}p.current&&(p.current=!1)},onFocusOutside:L=>{if(!v){L.preventDefault();return}},onPointerMove:L=>{if(M.current=L,A||(r.onPointerMove==null||r.onPointerMove.call(r,L),!P.current))return;const H=L.pageY-P.current.y,Q=L.pageX-P.current.x,I=L.pointerType==="touch"?10:2;V({x:Q,y:H},S,I)?m(L):(Math.abs(Q)>I||Math.abs(H)>I)&&(P.current=null)},onPointerUp:L=>{r.onPointerUp==null||r.onPointerUp.call(r,L),P.current=null,q.current=!1,d(L)},onPointerOut:L=>{r.onPointerOut==null||r.onPointerOut.call(r,L),$(M.current)},onContextMenu:L=>{r.onContextMenu==null||r.onContextMenu.call(r,L),M.current&&$(M.current)}})});gM.displayName="Drawer.Content";const Tne=250,kne=120,Rne=ee.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:o,isDragging:l,snapPoints:c,activeSnapPoint:d,setActiveSnapPoint:m,dismissible:p,handleOnly:y,isOpen:g,onPress:v,onDrag:b}=cf(),S=ee.useRef(null),C=ee.useRef(!1);function N(){if(C.current){E();return}window.setTimeout(()=>{A()},kne)}function A(){if(l||e||C.current){E();return}if(E(),!c||c.length===0){p||o();return}if(d===c[c.length-1]&&p){o();return}const _=c.findIndex(P=>P===d);if(_===-1)return;const R=c[_+1];m(R)}function T(){S.current=window.setTimeout(()=>{C.current=!0},Tne)}function E(){S.current&&window.clearTimeout(S.current),C.current=!1}return ee.createElement("div",{onClick:N,onPointerCancel:E,onPointerDown:j=>{y&&v(j),T()},onPointerMove:j=>{y&&b(j)},ref:r,"data-vaul-drawer-visible":g?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},ee.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});Rne.displayName="Drawer.Handle";function Pne(e){const t=cf(),{container:n=t.container,...r}=e;return ee.createElement($h,{container:n,...r})}const Xa={Root:jne,Content:gM,Overlay:hM,Trigger:_I,Portal:Pne,Close:lf,Title:$c,Description:Hc}
53,Gh=({shouldScaleBackground:e=!0,...t})=>s.jsx(Xa.Root,{shouldScaleBackground:e,...t});Gh.displayName="Drawer";const yM=Xa.Trigger,One=Xa.Portal,_ne=Xa.Close,xM=h.forwardRef(({className:e,...t},n)=>s.jsx(Xa.Overlay,{ref:n,className:Y("fixed inset-0 z-50 bg-black/80",e),...t}));xM.displayName=Xa.Overlay.displayName;const Kh=h.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(One,{children:[s.jsx(xM,{}),s.jsxs(Xa.Content,{ref:r,className:Y("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",e),...n,children:[s.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]}));Kh.displayName="DrawerContent";const Yh=h.forwardRef(({className:e,...t},n)=>s.jsx(Xa.Title,{ref:n,className:Y("text-lg font-semibold leading-none tracking-tight",e),...t}));Yh.displayName=Xa.Title.displayName;const eS=h.forwardRef(({className:e,...t},n)=>s.jsx(Xa.Description,{ref:n,className:Y("text-sm text-muted-foreground",e),...t}));eS.displayName=Xa.Description.displayName;const vM=Fh,Ine=$h,bM=h.forwardRef(({className:e,...t},n)=>s.jsx(Bc,{ref:n,className:Y("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));bM.displayName=Bc.displayName;const tS=h.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(Ine,{children:[s.jsx(bM,{}),s.jsxs(Fc,{ref:r,className:Y("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,s.jsxs(lf,{className:"absolute right-4 top-4 roun
53ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[s.jsx(ro,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));tS.displayName=Fc.displayName;const wM=({className:e,...t})=>s.jsx("div",{className:Y("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});wM.displayName="DialogHeader";const Mne=({className:e,...t})=>s.jsx("div",{className:Y("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Mne.displayName="DialogFooter";const nS=h.forwardRef(({className:e,...t},n)=>s.jsx($c,{ref:n,className:Y("text-lg font-semibold leading-none tracking-tight",e),...t}));nS.displayName=$c.displayName;const rS=h.forwardRef(({className:e,...t},n)=>s.jsx(Hc,{ref:n,className:Y("text-sm text-muted-foreground",e),...t}));rS.displayName=Hc.displayName;function SM(){if(typeof window>"u")return!1;const e=window.location.hostname.toLowerCase();return e==="vidapeps.tools"||e.endsWith(".vidapeps.tools")||e==="myvida.tools"||e.endsWith(".myvida.tools")}const Ub=e=>`pwa-installed:${e}`;function Dne(e){try{return localStorage.getItem(Ub(e))==="1"}catch{return!1}}function Hm(e,t){try{t?localStorage.setItem(Ub(e),"1"):localStorage.removeItem(Ub(e))}catch{}}let Ad=null,zb=!1;const Vb=new Set,Kp=()=>{for(const e of Vb)e()};typeof window<"u"&&(window.addEventListener("beforeinstallprompt",e=>{e.preventDefault(),Ad=e,Kp()}),window.addEventListener("appinstalled",()=>{zb=!0,Ad=null,Kp()}));function Fj(e){return Vb.add(e),()=>Vb.delete(e)}function $j(){return typeof window>"u"?!1:window.matchMedia?.("(display-mode: standalone)").matches||window.navigator.standalone===!0}function Lne(){const[e,t]=h.useState($j);return h.useEffect(()=>{const n=window.matchMedia?.("(display-mode: standalone)");if(!n)return;const r=()=>t($j());return n.addEventListener?.("change",r),()=>n.removeEventListener?.("change",r)},[]),e}
53function qne(){if(typeof navigator>"u")return!1;const e=navigator.userAgent;return/iphone|ipad|ipod/i.test(e)||/Macintosh/.test(e)&&typeof document<"u"&&"ontouchend"in document}function Une(e="vp"){const t=h.useSyncExternalStore(Fj,()=>Ad!==null),n=h.useSyncExternalStore(Fj,()=>zb),[r,o]=h.useState(()=>Dne(e)?!0:null),l=Lne();h.useEffect(()=>{n?(o(!0),Hm(e,!0)):t&&(o(!1),Hm(e,!1))},[t,n,e]),h.useEffect(()=>{const d=navigator;if(typeof d.getInstalledRelatedApps!="function")return;const m=window.setTimeout(()=>{d.getInstalledRelatedApps?.().then(p=>{p.length>0&&(o(!0),Hm(e,!0))}).catch(()=>{})},600);return()=>window.clearTimeout(m)},[e]);const c=h.useCallback(async()=>{const d=Ad;if(!d)return!1;await d.prompt();const m=await d.userChoice;Ad=null,Kp();const p=m.outcome==="accepted";return p&&(zb=!0,Kp(),o(!0),Hm(e,!0)),p},[e]);return{canInstall:t&&!l,installed:n,installedOnDevice:l||n?!0:r,isStandalone:l,isIOS:qne(),promptInstall:c}}const zne=[{icon:qq,text:"Open this app in Safari"},{icon:Uq,text:"Tap the Share button"},{icon:zq,text:"Scroll and choose Add to Home Screen"},{icon:mn,text:"Tap Add to finish"}],Vne=[{icon:A2,text:"Open this app in Chrome"},{icon:Vq,text:"Tap the 3-dot menu"},{icon:N2,text:"Choose Install app or Add to Home screen"},{icon:mn,text:"Tap Install to confirm"}],Bne=[{icon:A2,text:"Open this site in Chrome or Edge"},{icon:Bq,text:"Click the install icon at the right of the address bar"},{icon:mn,text:"Click Install to confirm"}];function Fne({steps:e}){return s.jsx("ol",{className:"space-y-2",children:e.map((t,n)=>s.jsxs("li",{className:"flex items-center gap-3 rounded-xl border border-[var(--vp-hairline)] bg-card p-3",children:[s.jsx("span",{className:"flex size-6 shrink-0 items-center justify-center rounded-full bg-vida-mint-soft text-xs font-bold text-vida-green-800 tabular-nums",children:n+1}),s.jsx("span",{className:"flex-1 text-sm text-ink",children:t.text}),s.jsx(t.icon,{className:"size-5 shrink-0 text-vida-green-700","aria-hidden":"true"})]},t.text))})}function Hj({appName:e,logoSrc:t,appKey:n,onOpenChange:r,TitleComponent:o,DescriptionComponent:l}){const{canInstall:c,promptInstall:d,isStandalone:m,installedOnDevice:p,isIOS:y}=Une(n),g=K2(),v=m||p===!0,b=y?zne:g?Vne:Bne,S=y?"Safari is preferred on iPhone and iPad for installing and notifications.":g?"You can install this app from Chrome for quick access and notifications.":"Install for quick access, offline use, and notifications.";return s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[s.jsx("span",{className:"flex size-20 items-center justify-center rounded-full bg-vida-mint-soft",children:s.jsx("img",{src:t,alt:"","aria-hidden":"true",className:"size-14 rounded-xl object-contain"})}),s.jsx(o,{className:"font-display text-t3 leading-tight text-ink",children:m?`You are using the ${e} app`:v?`${e} is already installed`:"This app is installable on your device"}),s.jsx(l,{className:"max-w-[34ch] text-sm text-ink-3",children:m?"You are all set. Everything here works offline-first and stays in sync.":v?`Open ${e} from your home screen or app launcher for the full app experience.`:S})]}),v?m?null:s.jsxs("div",{className:"flex items-center gap-3 rounded-xl border border-[var(--vp-hairline)] bg-card p-3",children:[s.jsx(fh,{className:"size-5 shrink-0 text-vida-green-700","aria-hidden":"true"}),s.jsxs("span",{className:"text-sm text-ink",children:["Look for the ",e," icon on your home screen. Installed apps open full screen with their own icon."]})]}):s.jsxs(s.Fragment,{children:[c?s.jsxs(Cr,{onClick:async()=>{await d()&&r(!1)},size:"lg",className:"w-full gap-2","data-testid":"install-native",children:[s.jsx(N2,{className:"size-4","aria-hidden":"true"}),"Install ",e]}):null,s.jsx(Fne,{steps:b})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[s.jsx(Cr,{variant:"outline",size:"lg",onClick:()=>r(!1),"data-testid":"install-not-now",children:v?"Close":"Not now"}),s.jsx(Cr,{size:"lg",onClick:async()=>{if(c&&!v){await d()&&r(!1);return}r(!1)},"data-testid":"install-primary",children:c&&!v?"Install":"Got it"})]})]})}function $ne({open:e,onOpenChange:t,appName:n,logoSrc:r,appKey:o="vp"}){return K2()?s.jsx(Gh,{open:e,onOpenChange:t,children:s.jsx(Kh,{className:"rounded-t-card border-x-0 border-b-0 bg-background",children:s.jsx("div",{className:"mx-auto w-full max-w-md overflow-y-auto px-5 pb-[max(20px,env(safe-area-inset-bottom))] pt-4",children:s.jsx(Hj,{appName:n,logoSrc:r,appKey:o,onOpenChange:t,TitleComponent:Yh,DescriptionComponent:eS})})})}):s.jsx(vM,{open:e,onOpenChange:t,children:s.jsx(tS,{className:"max-h-[90vh] overflow-y-auto sm:max-w-sm",children:s.jsx(Hj,{appName:n,logoSrc:r,appKey:o,onOpenChange:t,TitleComponent:nS,DescriptionComponent:rS})})})}const Gj="%%VP_STORE_ORIGIN%%";function Hne(e){return e.indexOf("%")===-1}const Gne=Hne(Gj)?Gj:"https://vidapeps.com",Kne=Gne.replace("https://","");function Bb(e){return`${e}.${Kne}`}const Yne=[{path:"/club",icon:ya,label:"VidaPeps Club",sub:"Member pre-orders"},{path:"/forward",icon:mh,label:"Forward",sub:"Community campaigns"},{path:`https://${Bb("pray")}`,icon:Hq,label:"Prayer",sub:"Share what's on your heart",external:!0},{path:"/requested",icon:Gq,label:"Requested Products",sub:"Vote for restocks"},{path:"/research",icon:E2,label:"Research",sub:"Library & lab results"},{path:"/tools",icon:j2,label:"Tools",sub:"Free calculators"},{path:"/account/support",icon:U0,label:"Support",sub:"Tickets & contact"},{path:"/about",icon:Ap,label:"About",sub:"Who we are"}],Wne=["/club","/forward","/blog","/requested","/research","/coa","/tools","/vidatools","/rewards","/membership","/partners","/about"],Kj=e=>Y("flex flex-col items-center justify-center gap-1 motion-safe:transition-[color,transform] motion-safe:duration-150 active:scale-95",e?"text-primary":"text-ink-3 dark:text-white/55");function Qne(){const[e]=Hn(),{itemCount:t}=oo(),{isAuthenticated:n}=Bt(),[r,o]=h.useState(!1),[l,c]=h.useState(!1),d=[{path:"/",icon:Fq,label:"Home",exact:!0},{path:"/products",icon:tl,label:"Shop",matchPath:["/products","/categories"]},{path:"/cart",icon:nl,label:"Cart",badge:t},{path:n?"/account":"/login",icon:Wd,label:n?"Account":"Login",matchPath:["/account","/login","/register"]}];function m(y){return y.matchPath?y.matchPath.some(g=>e.startsWith(g)):y.exact?e===y.path:e.startsWith(y.path)}const p=Wne.some(y=>e.startsWith(y));return s.jsxs("nav",{"aria-label":"Tab bar",className:"vp-glass-strong fixed bottom-0 left-0 right-0 z-50 grid grid-cols-5 rounded-none border-x-0 border-b-0 border-t [border-top-color:var(--gold-hairline)] shell:hidden",style:{height:"calc(var(--vp-tabbar-h) + env(safe-area-inset-bottom))",paddingBottom:"env(safe-area-inset-bottom)"},children:[d.map(y=>{const g=m(y);return s.jsxs(Ue,{href:y.path,"aria-label":y.label,"aria-current":g?"page":void 0,"data-testid":`tab-${y.label.toLowerCase()}`,className:Kj(g),children:[s.jsxs("span",{className:"relative inline-flex",children:[s.jsx(y.icon,{className:Y("size-[23px]",g?"stroke-[2.1]":"stroke-[1.7]")}),y.badge!==void 0&&y.badge>0&&s.jsx("span",{className:"absolute -right-2 -top-1.5 flex h-[18px] min-w-[18px] items-center justify-center rounded-pill bg-primary px-1 text-[11px] font-bold leading-none text-primary-foreground",children:y.badge>9?"9+":y.badge})]}),s.jsx("span",{className:"text-[11px] font-[650] tracking-[0.01em]",children:y.label}),s.jsx("span",{"aria-hidden":"true",className:Y("h-1 w-1 rounded-pill bg-vida-gold-500 motion-safe:transition-opacity",g?"opacity-100":"opacity-0")})]},y.label)}),s.jsxs(Gh,{open:r,onOpenChange:o,children:[s.jsxs(yM,{"aria-label":"More","data-testid":"tab-more",className:Kj(p||r),children:[s.jsx($q,{className:Y("size-[23px]",p?"stroke-[2.1]":"stroke-[1.7]")}),s.jsx("span",{className:"text-[11px] font-[650] tracking-[0.01em]",children:"More"}),s.jsx("span",{"aria-hidden":"true",className:Y("h-1 w-1 rounded-pill bg-vida-gold-500 motion-safe:transition-opacity",p||r?"opacity-100":"opacity-0")})]}),s.jsxs(Kh,{className:"vp-glass-strong rounded-t-card border-x-0 border-b-0 pb-[max(20px,env(safe-area-inset-bottom))]",children:[s.jsxs("div",{className:"px-5 pt-2",children:[s.jsx(Yh,{className:"font-display text-t3 text-ink dark:text-white",children:"More"}),s.jsx(eS,{className:"mt-0.5 text-caption text-ink-3 dark:text-white/55",children:"Programs, research and company"})]}),s.jsxs("ul",{className:"mt-3 px-3",children:[Yne.map(({path:y,icon:g,label:v,sub:b,external:S})=>{const C=!S&&e.startsWith(y),N={onClick:()=>o(!1),"data-testid":`more-${v.toLowerCase().replace(/\s+/g,"-")}`,className:Y("flex items-center gap-3.5 rounded-xl px-3 py-3 motion-safe:transition-colors",C?"bg-vida-green-700/10 dark:bg-white/10":"active:bg-ink/5 dark:active:bg-white/10")},A=s.jsxs(s.Fragment,{children:[s.jsx("span",{"aria-hidden":"true",className:"flex size-10 shrink-0 items-center justify-center rounded-xl bg-vida-mint-soft text-vida-green-700 dark:bg-white/10 dark:text-vida-mint",children:s.jsx(g,{className:"size-[18px]"})}),s.jsxs("span",{className:"min-w-0",children:[s.jsx("span",{className:"block text-body font-semibold text-ink dark:text-white",children:v}),s.jsx("span",{className:"block text-caption text-ink-3 dark:text-white/55",children:b})]})]});return s.jsx("li",{children:S?s.jsx("a",{href:y,...N,children:A}):s.jsx(Ue,{href:y,...N,"aria-current":C?"page":void 0,children:A})},y)}),s.jsx("li",{children:s.jsxs("button",{type:"button",onClick:()=>{o(!1),c(!0)},"data-testid":"more-install-app",className:"flex w-full items-center gap-3.5 rounded-xl px-3 py-3 text-left active:bg-ink/5 dark:active:bg-white/10",children:[s.jsx("span",{"aria-hidden":"true",className:"flex size-10 shrink-0 items-center justify-center rounded-xl bg-vida-mint-soft text-vida-green-700 dark:bg-white/10 dark:text-vida-mint",children:s.jsx(fh,{className:"size-[18px]"})}),s.jsxs("span",{className:"min-w-0",children:[s.jsx("span",{className:"block text-body font-semibold text-ink dark:text-white",children:"Install app"}),s.jsx("span",{className:"block text-caption text-ink-3 dark:text-white/55",children:"Add VidaPeps to your home screen"})]})]})})]})]})]}),s.jsx($ne,{open:l,onOpenChange:c,appName:"VidaPeps",logoSrc:"/icons/pwa-192.png"})]})}const aS=["notifications"],sS=[...aS,"list"],iS=[...aS,"unread-count"],CM=[...aS,"preferences"],Xne=20;function NM(e){const{data:t}=Oe({queryKey:iS,queryFn:()=>ce("/api/notifications/unread-count"),enabled:e,refetchInterval:6e4,staleTime:3e4});return t?.count??0}function Zne(e){const t=yq({queryKey:sS,enabled:e,initialPageParam:null,queryFn:({pageParam:o})=>{const l=new URLSearchParams({limit:String(Xne)});return o!=null&&l.set("cursor",String(o)),ce(`/api/notifications?${l.toString()}`)},getNextPageParam:o=>o.nextCursor}),n=t.data?.pages.flatMap(o=>o.items)??[],r=t.data?.pages[0]?.unreadCount??0;return{items:n,unreadCount:r,isLoading:t.isLoading,isError:t.isError,fetchNextPage:t.fetchNextPage,hasNextPage:t.hasNextPage,isFetchingNextPage:t.is
53FetchingNextPage,refetch:t.refetch}}function Jne(){const e=Mr();return _e({mutationFn:t=>ce(`/api/notifications/${t}/read`,{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:sS}),e.invalidateQueries({queryKey:iS})}})}function ere(){const e=Mr();return _e({mutationFn:()=>ce("/api/notifications/read-all",{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:sS}),e.invalidateQueries({queryKey:iS})}})}function _0e(e){return Oe({queryKey:CM,enabled:e,queryFn:()=>ce("/api/notifications/preferences")})}function I0e(){const e=Mr();return _e({mutationFn:t=>ce("/api/notifications/preferences",{method:"PUT",body:JSON.stringify(t),headers:{"content-type":"application/json"}}),onSuccess:()=>{e.invalidateQueries({queryKey:CM})}})}function id(e){if(!e)return null;const t=[...e.items].sort((n,r)=>n.id-r.id).map(n=>`${n.id}:${n.variantId}:${n.quantity}:${n.priceCents}:${n.stockQuantity}`).join("|");return`${e.itemCount}:${e.subtotalCents}:${t}`}function tre(e,t){if(!(!e&&!t))return{...e?{q:e}:{},...t?{category:t}:{}}}const[nre,rre]=Pw(),are=[nre,rre];function AM(e){return{...e.promoCode?{promoCode:e.promoCode}:{},...e.storefrontKey?{storefrontKey:e.storefrontKey}:{},...e.fulfillmentMethod?{fulfillmentMethod:e.fulfillmentMethod}:{},...e.shippingQuoteId?{shippingQuoteId:e.shippingQuoteId}:{},...e.shippingAddress?{shippingAddress:e.shippingAddress}:{}}}const Yj={proStatus:()=>tH(),catalog:()=>W7(),plans:()=>X7(),plan:e=>Z7(e),inventory:()=>J7(),journal:()=>eH(),compounds:()=>Q7(),stacks:()=>R_(),disabledPlan:()=>["disabled-query","GET","/api/research-plans/:id"],mixGroups:()=>["local-request","GET","/api/research-tools/mix-groups"],mixGroup:e=>["local-request","GET",`/api/research-tools/mix-groups/${e}`],disabledMixGroup:()=>["disabled-query","GET","/api/research-tools/mix-groups/:id"]},Wj=["local-request","GET","/api/research-tools/logs"],EM={doseGuidelines:e=>["local-request","GET","/api/research-tools/dose-guidelines",{category:e??null}],doseGuideline:e=>["local-request","GET","/api/research-tools/dose-guidelines/:slug",{slug:e}],protocols:e=>["local-request","GET","/api/research-tools/protocols",{category:e??null}],protocol:e=>["local-request","GET",`/api/research-tools/protocols/${e}`],suggestedProtocols:()=>["local-request","GET","/api/research-tools/suggested-protocols"],disabledProtocol:()=>["disabled-query","GET","/api/research-tools/protocols/:slug"],logs:e=>e?[...Wj,{type:e}]:Wj,logStats:()=>["local-request","GET","/api/research-tools/logs/stats"],reminderRules:()=>["local-request","GET","/api/research-tools/reminder-rules"],supplyLinks:()=>["local-request","GET","/api/research-tools/supply-links"]},Qj=["local-request","GET","/api/coa/catalog"],M0e={labs:()=>["local-request","GET","/api/coa/labs"],catalog:e=>e?[...Qj,{q:e}]:Qj},Fb={points:nH(),pointsLedger:rH(),referral:fH(),subscriptions:mH(),profile:hH(),research:(e,t)=>gH(tre(e,t)),researchEntry:e=>yH(e),productResearch:e=>xH(e),stacks:R_(),productStacks:e=>vH(e),researchCorner:bH(),consent:wH(),partnerStatus:NH(),referredBy:["local-request","GET","/api/users/me/referred-by"],checkoutQuoteRoot:are,checkoutQuote:e=>[...Pw(AM(e)),{userId:e.userId,cartFingerprint:e.cartFingerprint}]},D0e=AH(),L0e={detail:(e,t,n)=>["local-request","GET",`/api/surveys/${e}`,{src:t??null,oid:n??null}]};async function oS(e,t){return ce(`/api${e}`,t)}function q0e(e){const t=e?.trim()??"";return Oe({queryKey:t?[...Yj.catalog(),"q",t]:Yj.catalog(),queryFn:()=>oS(`/research-tools/catalog-context${t?`?q=${encodeURIComponent(t)}`:""}`),placeholderData:n=>n})}function U0e(e){return Oe({queryKey:EM.doseGuidelines(e),queryFn:()=>oS("/research-tools/dose-guidelines")})}function sre(e=!0){return Oe({queryKey:EM.reminderRules(),queryFn:()=>oS("/research-tools/reminder-rules"),enabled:e})}let ac;function jM(){const e=navigator.userAgent;return/iPad|iPhone|iPod/.test(e)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1}function ire(){return window.matchMedia("(display-mode: standalone)").matches||window.matchMedia("(display-mode: fullscreen)").matches||window.navigator.standalone===!0}
53function Hd(){return"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window}function TM(){return jM()&&!ire()}function z0e(){return Hd()?Notification.permission:"unsupported"}function ore(e){const t="=".repeat((4-e.length%4)%4),n=(e+t).replace(/-/g,"+").replace(/_/g,"/"),r=atob(n),o=new Uint8Array(new ArrayBuffer(r.length));for(let l=0;l<r.length;l++)o[l]=r.charCodeAt(l);return o}async function kM(){if(ac!==void 0)return ac;try{const e=await fetch("/api/push/vapid-public-key",{credentials:"include"});if(!e.ok)return ac=null,null;const t=await e.json();return ac=t.configured&&t.publicKey?t.publicKey:null,ac}catch{return ac=null,null}}async function lre(){if(!Hd())return{ok:!1,reason:"unsupported"};if(TM())return{ok:!1,reason:"install-required"};let e;try{e=await Notification.requestPermission()}catch{return{ok:!1,reason:"denied"}}if(e!=="granted")return{ok:!1,reason:"denied"};const t=await kM();if(!t)return{ok:!1,reason:"not-configured"};let n;try{const r=await navigator.serviceWorker.ready;n=await r.pushManager.getSubscription()??await r.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:ore(t)})}catch(r){return console.warn("[push] pushManager.subscribe failed:",r),{ok:!1,reason:"push-service-error"}}try{if(!(await fetch("/api/push/subscribe",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(n.toJSON())})).ok)return{ok:!1,reason:"save-failed"}}catch{return{ok:!1,reason:"save-failed"}}return{ok:!0}}async function V0e(){try{const t=await(await navigator.serviceWorker.ready).pushManager.getSubscription();if(!t)return;if(await fetch("/api/push/unsubscribe",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({endpoint:t.endpoint})}),!jM())try{await t.unsubscribe()}catch{}}catch{}}async function cre(){if(!Hd())return!1;try{return!!await(await navigator.serviceWorker.ready).pushManager.getSubscription()&&Notification.permission==="granted"}catch{return!1}}const Xj="Install VidaPeps to your Home Screen (Share, then Add to Home Screen) to get notifications.",ure={order_placed:{icon:V0,label:"Order placed"},order_paid:{icon:Xi,label:"Order confirmed"},order_shipped:{icon:Xv,label:"Order shipped"},order_in_transit:{icon:Xv,label:"Order in transit"},order_delivered:{icon:z0,label:"Order delivered"},order_exception:{icon:el,label:"Delivery issue",tone:"danger"},restock:{icon:Wq,label:"Back in stock"},club_run:{icon:Yq,label:"VidaPeps Club"},loyalty:{icon:ya,label:"Vida Points"},price_drop:{icon:Kq,label:"Price drop"},promo:{icon:T2,label:"Promotion"},account:{icon:Ap,label:"Account and security"},review:{icon:Qv,label:"Review"},system:{icon:Ap,label:"System"},reminder:{icon:Qd,label:"Reminder"}};function dre({onEnabled:e}){const{toast:t}=Nr(),[n,r]=h.useState(!1);if(TM())return s.jsx("p",{className:"rounded-xl bg-muted px-3 py-2 text-caption text-ink-2",children:Xj});const o=async()=>{r(!0);const l=await lre();if(r(!1),l.ok){t({title:"Notifications enabled",description:"We'll keep you posted on this device."}),e();return}t({title:"Couldn't enable notifications",description:{denied:"Permission was blocked. You can re-enable it in your browser settings.","not-configured":"Notifications are not available right now. Please try again later.","save-failed":"We couldn't save your subscription. Please try again.",unsupported:"This browser doesn't support push notifications.","install-required":Xj}[l.reason]??"Please try again.",variant:"destructive"})};return s.jsxs("button",{type:"button",onClick:o,disabled:n,"data-testid":"bell-enable-push",className:Y("flex w-full items-center gap-2.5 rounded-xl bg-accent px-3 py-2 text-left","motion-safe:transition-colors hover:bg-secondary disabled:opacity-60"),children:[s.jsx(k2,{className:"size-4 shrink-0 text-primary","aria-hidden":"true"}),s.jsxs("span",{className:"min-w-0",children:[s.jsx("span",{className:"block text-sm font-semibold text-ink",children:n?"Enablingâ¦":"Enable notifications"}),s.jsx("span",{className:"block text-caption text-ink-3",children:"Get order, shipping, and restock alerts on this device."})]})]})}function fre({triggerClassName:e,onReminderClick:t}){const{isAuthenticated:n}=Bt(),[r,o]=Hn(),[l,c]=h.useState(!1),[d,m]=h.useState(null),p=r.startsWith("/vidatools"),y=sre(p&&n),g=NM(n),{items:v,isLoading:b,hasNextPage:S,fetchNextPage:C,isFetchingNextPage:N}=Zne(n&&l),A=Jne(),T=ere();h.useEffect(()=>{kM()},[]),h.useEffect(()=>{if(!n||!Hd()){m(!1);return}let M=!0;return cre().then(q=>{M&&m(q)}
53),()=>{M=!1}},[n,l]);const E=h.useMemo(()=>{if(!p)return[];const M=y.data??[],q=new Date;return q.setHours(23,59,59,999),M.filter(U=>U.active&&U.nextFireAt!=null&&new Date(U.nextFireAt).getTime()<=q.getTime()).map(U=>({id:`reminder-${U.id}`,type:"reminder",title:U.label||"Protocol reminder",body:`Due ${new Date(U.nextFireAt).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}`,url:"/vidatools",readAt:null,createdAt:U.nextFireAt??new Date().toISOString()}))},[p,y.data]),j=h.useMemo(()=>[...E,...v??[]],[E,v]),_=g+E.length;if(!n)return null;const R=Hd()&&d===!1,P=M=>{if(M.type==="reminder"){c(!1),t?.();return}M.readAt==null&&A.mutate(M.id),c(!1),M.url&&(M.url.startsWith("/")?o(M.url):window.location.href=M.url)};return s.jsx($B,{open:l,onOpenChange:c,unreadCount:_,items:j,isLoading:b,hasNextPage:S,isFetchingNextPage:N,typeMeta:ure,prompt:R?s.jsx(dre,{onEnabled:()=>m(!0)}):void 0,emptySubtitle:"New alerts about your orders and the Club show up here.",settings:{href:"/account/notifications",label:"Notification settings",onClick:()=>{c(!1),o("/account/notifications")}},markAllReadBusy:T.isPending,onActivate:P,onMarkAllRead:()=>T.mutate(),onLoadMore:()=>C(),triggerClassName:e})}const mre={};function Yp(e,t,n){const r=wb(e);return{url:n??r.origin,icon:t,label:r.label,hint:r.blurb}}const RM=[{href:"/account",icon:B0,label:"Overview",longLabel:"Overview"},{href:"/account/orders",icon:Zi,label:"Orders",longLabel:"Orders & subscriptions"},{href:"/account/profile",icon:Wd,label:"Profile",longLabel:"Researcher profile"},{href:"/account/addresses",icon:Yi,label:"Addresses",longLabel:"Address book"},{href:"/account/points",icon:ya,label:"Vida Points",longLabel:"Vida Points"},{href:"/account/prizes",icon:ya,label:"Finds",longLabel:"Your finds"},{href:"/account/referral",icon:Wi,label:"Referrals",longLabel:"Referrals"},{href:"/account/company",icon:P2,label:"Company",longLabel:"Company account",hint:"Billing profile, quotes, invoices & payments"},{href:"/account/forward",icon:mh,label:"Forward",longLabel:"VidaForward Campaigns",hint:"Your campaigns & application"},{href:"/account/contributions",icon:O2,label:"Contributions",longLabel:"VidaForward contributions",hint:"VidaLeafs you have contributed"},{href:"/partners/portal",icon:Qq,label:"Partners",longLabel:"Vida Partners",partnerOnly:!0},{href:"/partners/resources",icon:Xq,label:"Resources",longLabel:"Partner Resource Hub",partnerOnly:!0},{href:"/account/notifications",icon:Qs,label:"Notifications",longLabel:"Notifications"},{href:"/account/support",icon:U0,label:"Support",longLabel:"Support"},{href:"/account/privacy",icon:Ic,label:"Privacy",longLabel:"Privacy & consent"}],pre=[{href:"/hub",icon:B0,label:"Overview",longLabel:"Overview"},{href:"/wallet",icon:_c,label:"Wallet",longLabel:"VidaCredit wallet",hint:"VidaCredit balance & history"},{href:"/pro",icon:ya,label:"Pro",longLabel:"VidaTools Pro",hint:"Unlock exports, analytics & more"},{href:"/addresses",icon:Yi,label:"Addresses",longLabel:"Address book",hint:"Shipping addresses"},{href:"/profile",icon:Wd,label:"Profile",longLabel:"Profile & security",hint:"Contact info, 2FA, passkeys"},{href:"/payment-methods",icon:F0,label:"Payments",longLabel:"Payment methods",hint:"Manage saved cards"},{href:"/support",icon:U0,label:"Support",longLabel:"Support",hint:"Your conversations with our team"},{href:"/vidagrants",icon:Wi,label:"VidaGrants",longLabel:"VidaGrants",hint:"Buy VidaCredit or gift a VidaCode"},{href:"/redeem",icon:R2,label:"Redeem",longLabel:"Redeem a VidaCode",hint:"Add credit from a code"}],hre={surfaceId:"store",items:RM,primaryHrefs:["/account","/account/orders","/account/profile","/account/addresses","/account/points","/account/notifications"],rootHref:"/account",externalItems:[{url:`${Vd}/hub`,icon:B0,label:"Account hub",hint:"Wallet, addresses & security on VidaTools"},{url:`${Vd}/wallet`,icon:_c,label:"Wallet",hint:"VidaCredit balance & history"},Yp("care",I2)]},Zj={surfaceId:"tools",items:pre,primaryHrefs:["/hub","/wallet","/pro","/addresses","/profile","/payment-methods"],rootHref:"/hub",externalItems:[Yp("toolsApp",_2,"https://app.myvida.tools"),Yp("care",I2)]},gre={surfaceId:"care",items:[{href:"/account",icon:Wd,label:"Profile",longLabel:"Profile & security"}],primaryHrefs:["/account"],rootHref:"/account",externalItems:[{url:`${Vd}/wallet`,icon:_c,label:"Wallet",hint:"VidaCredit balance & history"},{url:`${Vd}/addresses`,icon:Yi,label:"Addresses",hint:"Address book"},Yp("toolsApp",_2)]};function B0e(e){if(mre?.VITE_HUB_BRAND==="VidaTools")return Zj;const t=pw(e);return t==="care"?gre:t==="tools"?Zj:hre}function F0e(e,t,n="/account"){return e===n?t===n:t===e||t.startsWith(`${e}/`)}const Wp=[{slug:"seed",name:"Seed",metal:"bronze",multiplierLabel:"1Ã",minPoints:0,tagline:"Start earning points on every order.",perks:["1 pt per $1 spent","Member-only restock alerts"]},{slug:"sprout",name:"Sprout",metal:"silver",multiplierLabel:"1.1Ã",minPoints:500,tagline:"Boosted points on every order.",perks:["1.1Ã points per $1","Member-only restock alerts","Early access to new lots"]},{slug:"canopy",name:"Canopy",metal:"gold",multiplierLabel:"1.25Ã",minPoints:2e3,tagline:"Multiplied points + first access.",perks:["1.25Ã points per $1","Early access to new lots","Member-only restock alerts","Priority support"]},{slug:"helix",name:"Helix",metal:"elite",multiplierLabel:"1.4Ã",minPoints:5e3,tagline:"Accelerated points, first in line.",perks:["1.4Ã points per $1","Priority fulfillment (ships first)","Early access + limited lots","Dedicated support line"]}
53,{slug:"apex",name:"Apex",metal:"apex",multiplierLabel:"1.8Ã",minPoints:1e4,tagline:"The summit: maximum points, VIP everything.",perks:["1.8à points per $1","VIP concierge support","First access to every limited lot","Exclusive member pricing & early drops"]}],$0e={bronze:"neutral",silver:"mint",gold:"gold",elite:"green",apex:"gold"};function Jj(e){return Wp.find(t=>t.slug===e)??Wp[0]}function eT(e,t="1Ã"){if(!e||e<=0)return t;const n=e/1e4;return`${Number.isInteger(n)?n.toFixed(0):String(n)}Ã`}function yre(e){const t=Jj(e?.tier?.slug),n=e?.nextTier?Jj(e.nextTier.slug):null,r=eT(e?.tier?.multiplierBips,t.multiplierLabel),o=e?.nextTier&&n?eT(e.nextTier.multiplierBips,n.multiplierLabel):null,l=e?.balance??0,c=e?.tier?.minPoints??t.minPoints,d=e?.nextTier?.minPoints??null,m=!e?.nextTier,p=e?.tierProgressPoints??e?.lifetimeEarned??0,y=d!==null&&d>c?Math.min(100,Math.max(0,Math.round((p-c)/(d-c)*100))):100,g=e?.storeCreditCents??0;return{balance:l,visual:t,nextVisual:n,multiplier:r,nextMultiplier:o,pointsToNext:e?.pointsToNext??0,progress:y,isTopTier:m,storeCreditCents:g,storeCredit:(g/100).toFixed(2)}}function xre(e){if(e)return e.startsWith("/objects/")?`/api/storage${e}`:e}function vre(e){const t=e.toLowerCase().split(":")[0]??"";return t==="vidapeps.care"||t.endsWith(".vidapeps.care")?"care":t==="vidapeps.tools"||t.endsWith(".vidapeps.tools")?"tools":t===Bb("pray")||t.startsWith("pray.")?"prayer":t===Bb("admin")||t.startsWith("admin.")?"admin":"shop"}function bre(){return typeof window>"u"?"shop":vre(window.location.hostname)}const wre={vialSizes:["2R","3R","4R","6R","8R","10R","15R","20R","25R","30R","50R","100R","1 mL","2 mL","3 mL","5 mL","10 mL","15 mL","20 mL","30 mL","50 mL","100 mL"]};function xd(e){if(!Number.isFinite(e)||e<=0)return null;const t=`${e} mL`;return wre.vialSizes.includes(t)?t:null}const Sre=[2,3,4,6,8,10,15,20,25,30,50,100],Cre={2:4,3:5,4:6,6:10,8:11.5,10:13.5,15:19,20:26},Nre={2:"16 à 35 mm",4:"16 à 45 mm",6:"22 à 40 mm",8:"22 à 45 mm",10:"24 à 45 mm",15:"24 à 60 mm",20:"30 à 55 mm"},Are={3:'Brimful 5 mL - a vendor quoting brimful will call this a "5 mL vial".',4:"Takes a 5 mL fill when headspace is tight.",6:'The usual home for a 5 mL FILL, since ISO publishes no 5R. Also sold as "6 mL".'},Ere=Sre.map(e=>{const t=Nre[e],n=Cre[e]??null,r=n?` · ${n} mL brimful`:"";return{code:`${e}R`,label:t?`${e}R - ${e} mL fill${r} · ${t}`:`${e}R - ${e} mL fill tubing vial`,family:"vial",material:"glass",standard:"ISO 8362-1",tradeNote:Are[e]??null,nominalMl:e,brimfulMl:n,chambers:1,axiomVialSize:`${e}R`}}),jre=[3,5,10,20,30],Tre=jre.map(e=>({code:`PV-${e}ML`,label:`${e} mL plastic vial - no ISO series applies`,family:"vial",material:"plastic",standard:null,tradeNote:"Sold by true capacity; no R designation, because ISO 8362-1 governs glass.",nominalMl:e,brimfulMl:null,chambers:1,axiomVialSize:xd(e)})),kre=[{code:"1.5ML-SC",label:"1.5 mL single-chamber cartridge - compound only",family:"cartridge",material:"glass",standard:"ISO 11608-3",tradeNote:null,brimfulMl:null,nominalMl:1.5,chambers:1,axiomVialSize:xd(1.5)},{code:"1.5ML-DC",label:"1.5 mL dual-chamber cartridge - compound + diluent",family:"cartridge",material:"glass",standard:"ISO 11608-3",tradeNote:null,brimfulMl:null,nominalMl:1.5,chambers:2,axiomVialSize:xd(1.5)},{code:"3.0ML-SC",label:"3.0 mL single-chamber cartridge - compound only",family:"cartridge",material:"glass",standard:"ISO 11608-3",tradeNote:null,brimfulMl:null,nominalMl:3,chambers:1,axiomVialSize:xd(3)}
53,{code:"3.0ML-DC",label:"3.0 mL dual-chamber cartridge - compound + diluent",family:"cartridge",material:"glass",standard:"ISO 11608-3",tradeNote:null,brimfulMl:null,nominalMl:3,chambers:2,axiomVialSize:xd(3)}],Rre=[...Ere,...Tre,...kre];Rre.map(e=>e.code).slice().sort();const Pre="Vida";function PM(e){return(e??"").trim().toLowerCase()===Pre.toLowerCase()}function OM(e){const t=(e??"").trim();return!t||PM(t)?null:t}function _M(e){const t=(e.brandName??"").trim()||e.name.trim(),n=(e.manufacturer??"").trim();return!n||PM(n)||t.toLowerCase().endsWith(`(${n.toLowerCase()})`)?t:`${t} (${n})`}const Ore={en:{coa_pending:"In third-party testing. Ships once its COA clears",inbound:"On order. Ships when the shipment arrives",unbacked:"Not yet ordered. Charged now, ships when stock arrives"},es:{coa_pending:"En pruebas de laboratorio independiente. Se envÃa en cuanto se apruebe su COA",inbound:"Pedido al proveedor. Se envÃa cuando llegue el envÃo",unbacked:"Aún no pedido. Se cobra ahora y se envÃa cuando llegue el inventario"}};function tT(e,t=wc){return e===null?null:Ore[t][e]??null}const _re="2026-08-13",Ire=[{id:"payment-now",heading:"You are paying now, in full",body:"A pre-order is charged at checkout, exactly like any other order. We are not holding a card or reserving a spot for later payment."},{id:"not-yet-released",heading:"The product has not passed testing yet",body:"These units are physically in our facility, but their certificate of analysis is still outstanding. We cannot sell them until that testing returns, and we cannot tell you in advance when it will."},{id:"store-credit-on-failure",heading:"If the lot fails testing, you receive VidaCredit - not a refund",body:"This is the risk you are accepting. If the lot does not pass, your payment is converted to VidaCredit (store credit) for the full amount you paid, and we will email you when that happens. The money is not returned to your original payment method."},{id:"no-cash-refunds",heading:"Vida does not issue cash refunds",body:"Because of the nature of these products, our remedies are VidaCredit or exchange. VidaCredit never expires and can be spent on anything we sell, including a different product than the one you pre-ordered."},{id:"queue-order",heading:"Units are allocated in the order they were paid for",body:"If the lot passes but yields fewer units than were pre-ordered, they go to the earliest pre-orders first. Anyone left unfilled receives VidaCredit for the full amount, on the same terms above."}],Mre="I understand this item has not passed testing, and I accept that if the lot fails my payment becomes VidaCredit rather than a refund.",Hx={caps:[{name:"Red",hex:"#D32F2F",aliases:[],finish:"opaque",isCommon:!0},{name:"Rusty Orange",hex:"#BF4F1F",aliases:[],finish:"opaque",isCommon:!1},{name:"Translucent Red",hex:"#E05252",aliases:["Clear Red"],finish:"translucent",isCommon:!1},{name:"Orange Peel",hex:"#FB8C00",aliases:["Orange"],finish:"opaque",isCommon:!0},{name:"Translucent Light Red",hex:"#F08A8A",aliases:["Clear Light Red","Translucent Rose"],finish:"translucent",isCommon:!1},{name:"Light Orange",hex:"#FFB74D",aliases:[],finish:"opaque",isCommon:!1},{name:"Marigold",hex:"#EBA937",aliases:["Golden Yellow"],finish:"opaque",isCommon:!1},{name:"Yellow",hex:"#FBC02D",aliases:["Lemon","Canary"],finish:"opaque",isCommon:!0},{name:"Gold",hex:"#C9A227",aliases:["Golden","Brass"],finish:"metallic",isCommon:!0},{name:"Ochre",hex:"#C58A1E",aliases:["Mustard","Dark Yellow"],finish:"opaque",isCommon:!1},{name:"Translucent Amber",hex:"#D9A441",aliases:["Clear Amber","Translucent Yellow"],finish:"translucent",isCommon:!1},{name:"Willow Green",hex:"#9ACD32",aliases:["Green Willow","Lime Green","Lime","Chartreuse","Yellow Green"],finish:"opaque",isCommon:!1},{name:"Avocado Green",hex:"#6B8E23",aliases:[],finish:"opaque",isCommon:!1},{name:"Green",hex:"#2E7D32",aliases:["Emerald"],finish:"opaque",isCommon:!0},{name:"Translucent Lime Green",hex:"#A8E063",aliases:["Neon Green","Translucent Green","Clear Lime","Fluorescent Green","Translucent Neon Green"],finish:"translucent",isCommon:!1},{name:"Faded Light Green",hex:"#A5D6A7",aliases:[],finish:"opaque",isCommon:!1},{name:"Hunter Green",hex:"#245336",aliases:["Forest Green","Dark Green"],finish:"opaque",isCommon:!1},{name:"Teal",hex:"#008080",aliases:[],finish:"opaque",isCommon:!1},{name:"Slate Blue Green",hex:"#4E7F7B",aliases:[],finish:"opaque",isCommon:!1},{name:"Faded Turquoise Blue",hex:"#5FB6C4",aliases:[],finish:"opaque",isCommon:!1},{name:"Aqua",hex:"#29B6C9",aliases:["Cyan","Aquamarine","Blue Cool","Turquoise"],finish:"opaque",isCommon:!1},{name:"Light Blue",hex:"#4FC3F7",aliases:["Baby Blue","Pale Blue","Powder Blue"],finish:"opaque",isCommon:!0},{name:"Sky Blue",hex:"#87CEEB",aliases:[],finish:"opaque",isCommon:!1},{name:"Translucent Blue",hex:"#5AA9E6",aliases:["Clear Blue"],finish:"translucent",isCommon:!1},{name:"Royal Blue",hex:"#2541B2",aliases:["Medium Blue"],finish:"opaque",isCommon:!0},{name:"Translucent Light Blue",hex:"#8ED0F0",aliases:["Clear Light Blue"],finish:"translucent",isCommon:!1},{name:"Blue",hex:"#1E40AF",aliases:[],finish:"opaque",isCommon:!0},{name:"Dark Blue",hex:"#1A237E",aliases:[],finish:"opaque",isCommon:!1},{name:"Navy",hex:"#0B1F4D",aliases:["Navy Blue","Midnight Blue"],finish:"opaque",isCommon:!1},{name:"Translucent Dark Blue",hex:"#2A4C8F",aliases:["Clear Dark Blue"],finish:"translucent",isCommon:!1},{name:"Purple",hex:"#7B1FA2",aliases:["Violet"],finish:"opaque",isCommon:!0},{name:"Lavender Violet",hex:"#9575CD",aliases:[],finish:"opaque",isCommon:!1},{name:"Translucent Purple",hex:"#A579D6",aliases:["Clear Purple","Translucent Violet"],finish:"translucent",isCommon:!1},{name:"Burgundy Violet",hex:"#6A1B3A",aliases:[],finish:"opaque",isCommon:!1},{name:"Magenta",hex:"#C2185B",aliases:[],finish:"opaque",isCommon:!1},{name:"Gloss Pink",hex:"#F06292",aliases:["Pink","Hot Pink","Light Pink","Rose"],finish:"opaque",isCommon:!0},{name:"Peach",hex:"#FFCC9E",aliases:[],finish:"opaque",isCommon:!1},{name:"Translucent Pink",hex:"#F5A0C0",aliases:["Clear Pink"],finish:"translucent",isCommon:!1},{name:"Maroon",hex:"#800000",aliases:["Burgundy","Wine"],finish:"opaque",isCommon:!1},{name:"Rose Gold",hex:"#B76E79",aliases:["Pink Gold","Copper Pink"],finish:"metallic",isCommon:!1},{name:"Brown",hex:"#6D4C41",aliases:["Chocolate"],finish:"opaque",isCommon:!1},{name:"Coffee",hex:"#4B3621",aliases:["Dark Brown","Espresso"],finish:"opaque",isCommon:!1},{name:"Copper",hex:"#B87333",aliases:["Bronze"],finish:"metallic",isCommon:!1},{name:"Beige",hex:"#D8C9A8",aliases:["Sand","Ecru","Buff"],finish:"opaque",isCommon:!1},{name:"Tan",hex:"#D2B48C",aliases:[],finish:"opaque",isCommon:!1},{name:"White",hex:"#FFFFFF",aliases:["Off-white","Off White","Ivory","Cream"],finish:"opaque",isCommon:!0},{name:"Clear",hex:"#E8EAF0",aliases:["Transparent","Colorless","Colourless","Natural","Uncolored","Uncoloured"],finish:"translucent",isCommon:!0}
53,{name:"Light Gray",hex:"#C4C4C4",aliases:["Pale Gray","Pale Grey","Light Grey"],finish:"opaque",isCommon:!1},{name:"Misty Gray",hex:"#9E9E9E",aliases:["Gray","Grey","Gray Mist","Mist"],finish:"opaque",isCommon:!1},{name:"Dark Gray",hex:"#4A4A4A",aliases:["Charcoal","Dark Grey","Graphite","Gunmetal","Slate Gray"],finish:"opaque",isCommon:!1},{name:"Silver",hex:"#BFC1C2",aliases:["Aluminum","Aluminium","Metallic","Chrome"],finish:"metallic",isCommon:!0},{name:"Black",hex:"#1A1A1A",aliases:["Matte Black","Jet Black"],finish:"opaque",isCommon:!0}],crimps:[{name:"Silver / Aluminum",hex:"#C0C2C4",aliases:["Silver","Aluminum","Aluminium","Metallic","Chrome","Silver/Aluminium","Natural","Natural (uncolored)","Uncolored","Uncoloured","Clear","Clear 1000","Colorless","Colourless","Transparent","None","Plain","Bare"],finish:"metallic",isCommon:!0},{name:"Gold",hex:"#C9A227",aliases:["Golden","Brass"],finish:"metallic",isCommon:!0},{name:"Bronze",hex:"#B87333",aliases:["Copper","Antique Gold"],finish:"metallic",isCommon:!1},{name:"Blue",hex:"#1E40AF",aliases:["Medium Blue","Blue Cool"],finish:"opaque",isCommon:!0},{name:"Green",hex:"#2E7D32",aliases:["Dark Green","Emerald"],finish:"opaque",isCommon:!0},{name:"Red",hex:"#D32F2F",aliases:["Maroon","Burgundy","Crimson"],finish:"opaque",isCommon:!0},{name:"Black",hex:"#1A1A1A",aliases:["Matte Black","Jet Black"],finish:"opaque",isCommon:!0},{name:"White",hex:"#FFFFFF",aliases:["Off-white","Off White","Ivory"],finish:"opaque",isCommon:!0},{name:"Purple",hex:"#7B1FA2",aliases:["Plum"],finish:"opaque",isCommon:!1},{name:"Pink",hex:"#F06292",aliases:["Gloss Pink","Rose","Hot Pink"],finish:"opaque",isCommon:!1},{name:"Misty Gray",hex:"#9E9E9E",aliases:["Gray","Grey","Gray Mist","Mist","Slate"],finish:"opaque",isCommon:!1},{name:"Yellow",hex:"#FBC02D",aliases:["Lemon"],finish:"opaque",isCommon:!1},{name:"Orange",hex:"#FB8C00",aliases:["Amber Orange"],finish:"opaque",isCommon:!1},{name:"Burnt Orange",hex:"#CC5500",aliases:["Orange Burnt","Rusty Orange","Rust"],finish:"opaque",isCommon:!1},{name:"Orange Peel",hex:"#FB8C00",aliases:["Light Orange"],finish:"opaque",isCommon:!1},{name:"Ochre",hex:"#C58A1E",aliases:["Mustard","Dark Yellow","Marigold"],finish:"opaque",isCommon:!1},{name:"Tan",hex:"#D2B48C",aliases:["Sand","Buff"],finish:"opaque",isCommon:!1},{name:"Beige",hex:"#D8C9A8",aliases:["Ecru","Cream"],finish:"opaque",isCommon:!1},{name:"Brown",hex:"#6D4C41",aliases:["Brown Medium","Chocolate","Coffee"],finish:"opaque",isCommon:!1},{name:"Willow Green",hex:"#9ACD32",aliases:["Green Willow","Lime","Lime Green","Chartreuse"],finish:"opaque",isCommon:!1},{name:"Teal",hex:"#008080",aliases:["Blue Green","Sea Green"],finish:"opaque",isCommon:!1},{name:"Aqua",hex:"#29B6C9",aliases:["Cyan","Turquoise","Aquamarine"],finish:"opaque",isCommon:!1},{name:"Light Blue",hex:"#4FC3F7",aliases:["Sky Blue","Baby Blue","Pale Blue"],finish:"opaque",isCommon:!1},{name:"Dark Blue",hex:"#1A237E",aliases:["Navy","Navy Blue","Midnight Blue"],finish:"opaque",isCommon:!1},{name:"Lilac",hex:"#C8A2C8",aliases:["Light Purple","Pale Violet"],finish:"opaque",isCommon:!1},{name:"Violet",hex:"#7F4FC9",aliases:["Lavender","Lavender Violet"],finish:"opaque",isCommon:!1},{name:"Magenta",hex:"#C2185B",aliases:["Fuchsia"],finish:"opaque",isCommon:!1},{name:"Dark Gray",hex:"#4A4A4A",aliases:["Charcoal","Dark Grey","Graphite","Gunmetal"],finish:"opaque",isCommon:!1},{name:"Warm Gray",hex:"#A79C90",aliases:["Gray Warm","Grey Warm","Taupe"],finish:"opaque",isCommon:!1},{name:"Rose Gold",hex:"#B76E79",aliases:["Pink Gold","Copper Pink"],finish:"metallic",isCommon:!1}],contents:[{name:"White",hex:"#FFFFFF",aliases:["Pure White","Powder White","Bright White"],finish:"opaque",isCommon:!0},{name:"Off-white/Cream",hex:"#F3EEE2",aliases:["Off-white","Off White","Offwhite","Cream","Ivory","Beige","Eggshell"],finish:"opaque",isCommon:!0},{name:"Clear/Translucent",hex:"#E7EAF0",aliases:["Clear","Translucent","Transparent","Colorless","Colourless","Water clear"],finish:"opaque",isCommon:!0},{name:"Yellow",hex:"#FBC02D",aliases:["Pale Yellow","Lemon","Straw"],finish:"opaque",isCommon:!0},{name:"Amber",hex:"#C98A2B",aliases:["Honey","Golden","Amber Oil"],finish:"opaque",isCommon:!0},{name:"Blue",hex:"#1E88E5",aliases:["Pale Blue","Light Blue","Royal Blue","Copper Blue"],finish:"opaque",isCommon:!0},{name:"Green",hex:"#2E7D32",aliases:["Pale Green","Olive"],finish:"opaque",isCommon:!1},{name:"Pink",hex:"#F06292",aliases:["Rose","Pale Pink"],finish:"opaque",isCommon:!1},{name:"Red",hex:"#D32F2F",aliases:["Crimson","Pink-red"],finish:"opaque",isCommon:!1},{name:"Orange",hex:"#FB8C00",aliases:["Peach","Apricot"],finish:"opaque",isCommon:!1},{name:"Purple",hex:"#7B1FA2",aliases:["Violet","Lavender"],finish:"opaque",isCommon:!1},{name:"Brown",hex:"#6D4C41",aliases:["Tan","Caramel"],finish:"opaque",isCommon:!1},{name:"Gray",hex:"#9E9E9E",aliases:["Grey","Ash","Slate"],finish:"opaque",isCommon:!1},{name:"Black",hex:"#1A1A1A",aliases:["Charcoal"],finish:"opaque",isCommon:!1}]};function nT(e){return e.normalize("NFKD").toLowerCase().replace(/[^a-z0-9]+/g,"")}function Gx(e){const t=new Map,n=new Map;for(const r of e)t.set(nT(r.name),r.name);for(const r of e)for(const o of r.aliases){const l=nT(o);t.has(l)||n.set(l,r.name)}
53return{colors:e,byName:t,byAlias:n}}Gx(Hx.caps),Gx(Hx.crimps),Gx(Hx.contents);const rT={id:"vial-lyophilised",label:"Vial, lyophilised powder",geometry:"a squat ISO tubing vial, flat-shouldered, with a crimped aluminium seal over a grey butyl stopper",material:"clear borosilicate glass",contents:"a white lyophilised cake sitting as a flat disc at the bottom, not a loose powder",never:["a liquid meniscus","a needle","a syringe"]},Dre={id:"vial-liquid",label:"Vial, solution",geometry:"a squat ISO tubing vial, flat-shouldered, with a crimped aluminium seal over a grey butyl stopper",material:"clear borosilicate glass",contents:"a clear colourless solution with a visible meniscus and a small headspace above it",never:["a lyophilised cake","a needle","a syringe"]},Lre={id:"cartridge-single-chamber",label:"Cartridge, single chamber",geometry:"a slim cylindrical pen cartridge: a crimped aluminium collar and septum at the needle end, a straight glass barrel, and one rubber plunger closing the rear",material:"clear glass barrel with a grey rubber plunger",contents:"one continuous fill occupying the whole barrel ahead of the plunger",never:["a second chamber","a divider partway along the barrel","a bypass channel"]},qre={id:"raw-material-jar",label:"Raw material, bulk jar",geometry:"a wide-mouth screw-cap jar, short and broad rather than vial-shaped, with a tamper band under the cap",material:"clear glass or clear PET with a white cap",contents:"loose fine powder filling the lower part of the jar, with a settled surface",never:["a lyophilised cake (bulk material is loose, not cake-formed)","a crimped seal","a stopper"]},aT={id:"oral-bottle",label:"Capsules or tablets, bottle",geometry:"an upright pharmacy bottle with a white child-resistant cap and a shoulder label panel",material:"amber or white HDPE",contents:"capsules or tablets visible only if the bottle is shown open or alongside a few loose units",never:["a vial","a stopper","a crimped seal","a syringe"]},Ure={id:"accessory",label:"Accessory / equipment",geometry:"the item itself on a plain surface, shown at a three-quarter angle",material:"as manufactured",contents:null,never:["a vial","a cartridge","implied dosage content"]},zre={powder:rT,liquid:Dre,vial_unspecified:rT,cartridge:Lre,capsule:aT,tablet:aT,raw_material:qre,not_applicable:Ure};Object.keys(zre).sort();const IM=[{code:"usps",label:"USPS",region:"domestic",aliases:["usps","us postal service","united states postal service","postal service"],easypost:"USPS",patterns:[/^(94|93|92|95)\d{18,20}$/,/^[A-Z]{2}\d{9}US$/],trackingUrl:e=>`https://tools.usps.com/go/TrackConfirmAction?tLabels=${Ia(e)}`},{code:"ups",label:"UPS",region:"domestic",aliases:["ups","united parcel service"],easypost:"UPS",patterns:[/^1Z[0-9A-Z]{16}$/],trackingUrl:e=>`https://www.ups.com/track?tracknum=${Ia(e)}`},{code:"fedex",label:"FedEx",region:"domestic",aliases:["fedex","fed ex","federal express"],easypost:"FedEx",patterns:[/^\d{12}$/,/^\d{15}$/,/^\d{20}$/],trackingUrl:e=>`https://www.fedex.com/fedextrack/?trknbr=${Ia(e)}`},{code:"dhl_express",label:"DHL Express",region:"international",aliases:["dhl","dhl express","dhl-express"],easypost:"DHLExpress",patterns:[/^\d{10}$/,/^\d{12}$/],trackingUrl:e=>`https://www.dhl.com/en/express/tracking.html?AWB=${Ia(e)}`},{code:"dhl_ecommerce",label:"DHL eCommerce",region:"international",aliases:["dhl ecommerce","dhl e-commerce","dhl global mail","dhl gm"],easypost:"DHLGlobalMail",patterns:[/^GM\d{16,20}$/],trackingUrl:e=>`https://www.dhl.com/en/express/tracking.html?AWB=${Ia(e)}`},{code:"ems",label:"EMS (postal express)",region:"international",aliases:["ems","ems china","epacket","e-packet"],easypost:"EMS",patterns:[/^E[A-Z]\d{9}[A-Z]{2}$/],trackingUrl:e=>`https://www.17track.net/en/track?nums=${Ia(e)}`},{code:"china_post",label:"China Post",region:"international",aliases:["china post","chinapost","china ems","cn post"],easypost:null,patterns:[/^[A-Z]{2}\d{9}CN$/],trackingUrl:e=>`https://www.17track.net/en/track?nums=${Ia(e)}`},{code:"sf_express",label:"SF Express",region:"international",aliases:["sf express","sf-express","shunfeng","s.f. express","sf"],easypost:null,patterns:[/^SF\d{10,13}$/],trackingUrl:e=>`https://www.sf-international.com/us/en/dynamic_function/waybill/#search/bill-number/${Ia(e)}`},{code:"yunexpress",label:"YunExpress",region:"international",aliases:["yunexpress","yun express","yt express"],easypost:null,patterns:[/^YT\d{13,18}$/],trackingUrl:e=>`https://www.17track.net/en/track?nums=${Ia(e)}`}
53,{code:"cainiao",label:"Cainiao",region:"international",aliases:["cainiao","aliexpress standard","cainiao super economy"],easypost:null,patterns:[/^LP\d{14,16}$/],trackingUrl:e=>`https://www.17track.net/en/track?nums=${Ia(e)}`},{code:"ontrac",label:"OnTrac",region:"domestic",aliases:["ontrac","on trac"],easypost:"OnTrac",patterns:[/^(C|D)\d{14}$/],trackingUrl:e=>`https://www.ontrac.com/tracking/?number=${Ia(e)}`},{code:"hand_carried",label:"Hand-carried / collected",region:"domestic",aliases:["hand carried","hand-carried","pickup","picked up","collected","in person"],easypost:null,patterns:[],trackingUrl:()=>""}];function Ia(e){return encodeURIComponent(Vre(e))}new Map(IM.map(e=>[e.code,e]));const sT=new Map;for(const e of IM){sT.set(e.code,e);for(const t of e.aliases)sT.set(t,e)}function Vre(e){return e.replace(/^\s*(?:tracking|track|trk|awb|waybill|no|number|#)\s*[:.#]*\s*/i,"").replace(/[\s\u00A0\u200B\u2010-\u2015-]/g,"").toUpperCase().trim()}const Bre=["cmp_acetic_acid_0_6_solution","cmp_bacteriostatic_0_9_sodium_chloride_injection_usp_benzyl_alcohol_9_mg_ml_added","cmp_bacteriostatic_water_for_injection_usp_0_9_benzyl_alcohol_added","cmp_benzyl_alcohol","cmp_sodium_chloride_0_9_sterile_saline","cmp_sterile_water_for_injection","cmp_tris_buffered_diluent_ph_8_0_benzyl_alcohol_9_0_mg_ml_total_tris_20_mm"];new Set(Bre);const Fre="/research/vida-files";function $re(e){return`${Fre}/${encodeURIComponent(e)}`}const Hre=["gold","red","purple","blue","green","black","pink"],MM=[{quantity:1,discountPercent:0,penPriceCents:2500,syringePriceCents:2e3},{quantity:2,discountPercent:5,penPriceCents:4750,syringePriceCents:3800},{quantity:3,discountPercent:10,penPriceCents:6750,syringePriceCents:5400},{quantity:4,discountPercent:15,penPriceCents:8500,syringePriceCents:6800},{quantity:5,discountPercent:20,penPriceCents:9900,syringePriceCents:8e3}],Gre=[29,30,31].flatMap(e=>[{capacityMl:.3,units:30},{capacityMl:.5,units:50},{capacityMl:1,units:100}].map(t=>({gauge:e,...t})));Hre.flatMap(e=>MM.map(t=>({color:e,quantity:t.quantity,discountPercent:t.discountPercent,priceCents:t.penPriceCents,sizeLabel:t.quantity===1?"1 pen":`${t.quantity} pens`,publicationState:"priced_for_catalog"})));Gre.flatMap(e=>MM.map(t=>({...e,boxes:t.quantity,unitsPerBox:100,containedSyringes:t.quantity*100,discountPercent:t.discountPercent,priceCents:t.syringePriceCents,sizeLabel:`${e.gauge}G / ${e.capacityMl.toFixed(1)} mL (${e.units} unit) / ${t.quantity} ${t.quantity===1?"box":"boxes"}`,publicationState:"priced_for_catalog"})));const Kre={blue:"#1f4fd1",black:"#1d1d1b",gold:"#e0a64a",pink:"#e27aa6",green:"#0f6b3c",red:"#c0141b",purple:"#8f4fc4"};function Yre(e){const t=e/100;return`${Number.isInteger(t)?t:t.toFixed(2).replace(/0+$/,"").replace(/\.$/,"")}%`}async function Mn(e,t){return ce(`/api${e}`,t)}const $n=Fb,Wre=(e=!0)=>Oe({queryKey:$n.points,queryFn:()=>Mn("/users/me/points"),enabled:e}),H0e=(e=!0)=>Oe({queryKey:$n.pointsLedger,queryFn:()=>Mn("/users/me/points/ledger"),enabled:e}),Qre=e=>dH(AM(e),{query:{queryKey:$n.checkoutQuote(e),enabled:e.enabled,staleTime:3e4,refetchOnWindowFocus:!1}}),G0e=()=>{const e=Mr();return oH({mutation:{onSuccess:()=>{e.invalidateQueries({queryKey:$n.points}),e.invalidateQueries({queryKey:$n.pointsLedger}),e.invalidateQueries({queryKey:$n.checkoutQuoteRoot})}}})},K0e=(e=!0)=>Oe({queryKey:$n.referral,queryFn:()=>Mn("/users/me/referral"),enabled:e}),Y0e=(e=!0)=>Oe({queryKey:$n.referredBy,queryFn:()=>Mn("/users/me/referred-by"),enabled:e}),W0e=(e=!0)=>Oe({queryKey:$n.subscriptions,queryFn:()=>Mn("/users/me/subscriptions"),enabled:e}),Q0e=()=>{const e=Mr();return _e({mutationFn:({id:t,...n})=>Mn(`/users/me/subscriptions/${t}`,{method:"PATCH",body:JSON.stringify(n)}),onSuccess:()=>e.invalidateQueries({queryKey:$n.subscriptions})})},Xre=(e=!0)=>Oe({queryKey:$n.profile,queryFn:()=>Mn("/users/me/profile"),enabled:e}),X0e=()=>{const e=Mr();return _e({mutationFn:t=>Mn("/users/me/profile",{method:"PATCH",body:JSON.stringify(t)}),onSuccess:()=>e.invalidateQueries({queryKey:$n.profile})})},Zre="image/jpeg,image/png,image/webp,image/heic,image/heif",Jre=5*1024*1024;async function Z0e(e){if(!Zre.split(",").includes(e.type))throw new Error("Use a JPEG, PNG, WebP, or HEIC image.");if(e.size>Jre)throw new Error("Image must be 5 MB or smaller.");const{uploadURL:t,srcKey:n}=await Mn("/users/me/avatar/upload-url",{method:"POST",body:JSON.stringify({contentType:e.type,size:e.size})}),r=await fetch(t,{method:"PUT",headers:{"content-type":e.type},body:e});if(!r.ok)throw new Error(`Upload failed (HTTP ${r.status}).`);const{avatarUrl:o}=await Mn("/users/me/avatar/commit",{method:"POST",body:JSON.stringify({srcKey:n})});return o}const J0e=(e,t)=>Oe({queryKey:$n.research(e,t),queryFn:()=>{const n=new URLSearchParams;e&&n.set("q",e),t&&n.set("category",t);const r=n.toString();return Mn(`/research-library${r?`?${r}`:""}`)}}),eae=e=>Oe({queryKey:$n.productResearch(e),queryFn:()=>Mn(`/products/${e}/research`),enabled:!!e}),ewe=()=>Oe({queryKey:$n.researchCorner,queryFn:()=>Mn("/research-corner")}),twe=(e=!0)=>Oe({queryKey:$n.consent,queryFn:()=>Mn("/users/me/consent"),enabled:e}),nwe=()=>{const e=Mr();return _e({mutationFn:t=>Mn("/users/me/consent",{method:"POST",body:JSON.stringify(t)}),onSuccess:()=>e.invalidateQueries({queryKey:$n.consent})})},tae=(e=!0)=>
53Oe({queryKey:$n.partnerStatus,queryFn:()=>Mn("/partners/status"),enabled:e});function nae(e){const t=[...new Set(e.filter(n=>Number.isInteger(n)&&n>0))].sort((n,r)=>n-r);return Oe({queryKey:["preorder-availability",t],enabled:t.length>0,staleTime:6e4,queryFn:async()=>{const n=await Mn(`/preorder/availability?variantIds=${t.join(",")}`);return new Map(n.items.map(r=>[r.variantId,r]))}})}const DM={kind:"personal",organizationId:null,role:null},rae=new Set(["owner","manager","billing_manager"]),aae=new Set(["owner","manager","purchaser"]);let vd=DM;const $b=new Set;function rwe(e){const t=e!==null&&rae.has(e);return{canEditProfile:t,canEditContacts:t,canEditAddresses:t,canPayInvoices:t,canCreateOrders:e!==null&&aae.has(e)}}function sae(){return vd}function iae(e){return $b.add(e),()=>$b.delete(e)}function Kx(e){if(!(vd.kind===e.kind&&vd.organizationId===e.organizationId&&vd.role===e.role)){vd=e;for(const t of $b)t()}}function awe(){return h.useSyncExternalStore(iae,sae,()=>DM)}const Qp="__vida_personal_context__",lS="__vida_checking_context__",Xp="__vida_unavailable_context__",oae={owner:"Owner",manager:"Manager",billing_manager:"Billing manager",purchaser:"Purchaser",viewer:"Viewer"};function mp(e){if(typeof e=="number")return Number.isSafeInteger(e)&&e>0?String(e):null;if(typeof e!="string"||!/^[1-9]\d*$/.test(e))return null;const t=Number(e);return Number.isSafeInteger(t)?e:null}function lae(e){return CI(e)?oae[e]:"Role unavailable"}function cae(e,t){const n=new Set,r=[];for(const o of e){const l=mp(o.id);if(!l||n.has(l))continue;n.add(l);const c=t[l];r.push({id:l,name:o.name.trim()||"Company",role:c,roleLabel:c===void 0?"Checking access":c===null?"Access unavailable":lae(c),selectable:c!=null})}return r.toSorted((o,l)=>o.name.localeCompare(l.name,void 0,{sensitivity:"base"}))}function uae(e,t,n){if(e===null)return{value:Qp,kind:"personal"};const r=t.find(o=>o.id===e);return r?r.role===void 0?{value:r.id,kind:"checking"}:r.role===null?{value:Xp,kind:"unavailable"}:{value:r.id,kind:"company"}:n?{value:lS,kind:"checking"}:{value:Xp,kind:"unavailable"}}const LM=h.createContext(null);function dae({children:e}){const{refetch:t}=Bt(),n=Mr(),r=cr.useSession(),o=cr.useListOrganizations(),l=r.data,c=mp(l?.session?.activeOrganizationId),d=o.data??[],m=d.map(P=>mp(P.id)).filter(P=>P!==null).join("\0"),[p,y]=h.useState({}),[g,v]=h.useState(!1),[b,S]=h.useState(null);h.useEffect(()=>{if(o.isPending)return;let P=!1;return y({}),Promise.all((m?m.split("\0"):[]).map(async M=>{try{const U=(await cr.organization.getActiveMemberRole({query:{organizationId:M}})).data?.role;return[M,CI(U)?U:null]}catch{return[M,null]}})).then(M=>{if(P)return;const q={};for(const U of M)U&&(q[U[0]]=U[1]);y(q)}),()=>{P=!0}},[c,m,o.isPending,l?.user?.id]);const C=h.useMemo(()=>cae(d,p),[d,p]),N=uae(c,C,o.isPending||r.isPending),A=C.find(P=>P.id===c),T=h.useRef(c);h.useEffect(()=>{if(T.current!==c&&(T.current=c,n.removeQueries({predicate:P=>{const M=P.queryKey[0];return typeof M=="string"&&M.startsWith("/api/company/")}})),N.kind==="company"&&A?.role){Kx({kind:N.kind,organizationId:c,role:A.role});return}Kx({kind:N.kind,organizationId:N.kind==="personal"?null:c,role:null})},[A?.role,c,n,N.kind]),h.useEffect(()=>()=>{Kx({kind:"personal",organizationId:null,role:null})},[]);const E=async P=>{if(g||P===N.value||P===lS||P===Xp)return;const M=P===Qp?null:mp(P);if(!(P!==Qp&&M===null)){S(null),v(!0);try{if((await cr.organization.setActive({organizationId:M})).error)throw new Error("ACTIVE_COMPANY_SWITCH_FAILED");await t(),await o.refetch?.()}catch{S("We could not change the active account. Try again."),await t().catch(()=>{})}finally{v(!1)}}},j=!!o.error&&!o.isPending,_=!j&&!o.isPending&&d.length===0,R=g?"Changing active account...":b||(j?"Company memberships are unavailable right now.":N.kind==="unavailable"?"Your previous company access is no longer available. Choose Personal account to reset this session.":N.kind==="checking"?"Checking company access...":N.kind==="company"&&A?`${A.roleLabel} access. Company quotes, orders, invoices, and payments use this context.`:_?"No company memberships. Your session is personal.":"Personal activity stays separate from company records.");return s.jsx(LM.Provider,{value:{options:C,selection:N,switching:g,pending:o.isPending||r.isPending,listFailed:j,switchError:b,statusText:R,switchContext:E},children:e})}function fae(){const e=h.useContext(LM),t=WH({query:{queryKey:P_()}}),n=h.useMemo(()=>{const S=new Set;for(const C of t.data?.memberships??[])C.status==="pending_approval"&&S.add(String(C.organizationId));return S},[t.data?.memberships]),[,r]=Hn();if(!e)return null;const{options:o,selection:l,switching:c,pending:d,listFailed:m,switchError:p,statusText:y,switchContext:g}=e,v=l.kind==="company"?o.find(S=>S.id===l.value):void 0,b=l.kind==="personal"?"Personal account":l.kind==="checking"?"Checking active company...":l.kind==="unavailable"?"Company access unavailable":v?`${v.name} · ${v.roleLabel}`:"Personal account";return s.jsxs("section",{className:"rounded-xl border border-border/70 bg-muted/60 p-2.5","aria-label":"Account context",children:[s.jsxs("span",{id:"active-company-label",className:"mb-1.5 flex items-center gap-1.5 text-overline uppercase tracking-wide text-ink-3",children:[s.jsx(P2,{className:"size-3.5","aria-hidden":"true"}),"Working as"]}),s.jsxs(Nw,{children:[s.jsxs(Aw,{"data-testid":"active-company-switcher",disabled:c||d,"aria-labelledby":"active-company-label","aria-describedby":"active-company-status",className:"flex min-h-10 w-full items-center justify-between gap-2 rounded-lg border border-border bg-card py-2 pl-2.5 pr-2.5 text-sm font-semibold text-ink outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-wait disabled:opacity-70",children:[s.jsx("span",{className:"truncate",children:b}),c?s.jsx(er,{className:"size-4 shrink-0 animate-spin text-ink-3","aria-hidden":"true"}):s.jsx(dl,{className:"size-4 shrink-0 text-ink-3","aria-hidden":"true"})]}),s.jsxs(_h,{align:"start",className:"w-[var(--radix-dropdown-menu-trigger-width)] rounded-lg border-border bg-card p-1",children:[s.jsxs(fa,{className:"flex items-center justify-between gap-2 text-sm",onSelect:()=>{g(Qp)},children:[s.jsx("span",{children:"Personal account"}),l.kind==="personal"?s.jsx(mn,{className:"size-4 text-primary","aria-hidden":"true"}):null]}),l.value===lS?s.jsx(fa,{disabled:!0,className:"text-sm",children:"Checking active company..."}):null,l.value===Xp?s.jsx(fa,{disabled:!0,className:"text-sm",children:"Company access unavailable"}):null,o.map(S=>s.jsxs(fa,{disabled:!S.selectable,className:"flex items-center justify-between gap-2 text-sm",onSelect:()=>{g(S.id)},children:[s.jsxs("span",{className:"truncate",children:[S.name,n.has(S.id)?" · pen
53ding approval":""]}),s.jsxs("span",{className:"flex shrink-0 items-center gap-1.5 text-xs text-ink-3",children:[S.roleLabel,l.kind==="company"&&l.value===S.id?s.jsx(mn,{className:"size-4 text-primary","aria-hidden":"true"}):null]})]},S.id)),s.jsx(Vi,{}),s.jsxs(fa,{className:"flex items-center gap-2 text-sm",onSelect:()=>r("/account/company/start"),children:[s.jsx($0,{className:"size-4","aria-hidden":"true"}),"Start a company"]})]})]}),s.jsx("p",{id:"active-company-status",role:p||m?"alert":"status",className:`mt-1.5 text-[11px] leading-snug ${p||m||l.kind==="unavailable"?"text-danger":"text-ink-3"}`,children:y})]})}function mae(){const{data:e,isLoading:t}=Wre(!0),{balance:n,multiplier:r,nextVisual:o,pointsToNext:l,progress:c,isTopTier:d,storeCredit:m}=yre(e);return s.jsxs(Ue,{href:"/account/points","data-testid":"dropdown-points-widget",className:"block rounded-xl bg-accent px-3 py-2.5 motion-safe:transition-colors hover:bg-secondary",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsxs("span",{className:"inline-flex items-center gap-1.5 text-overline uppercase text-primary",children:[s.jsx(ya,{className:"size-3.5","aria-hidden":"true"}),"Vida Points"]}),s.jsx(ul,{className:"size-3.5 text-ink-3","aria-hidden":"true"})]}),t?s.jsx("p",{className:"mt-1 text-sm text-ink-3",children:"Loadingâ¦"}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"mt-1 flex items-baseline justify-between gap-2",children:[s.jsxs("span",{className:"font-display text-t3 font-bold text-ink tabular-nums",children:[n.toLocaleString(),s.jsx("span",{className:"ml-1 text-caption font-semibold text-ink-3",children:"pts"})]}),s.jsxs("span",{className:"text-caption text-ink-2 tabular-nums",children:["= ",s.jsxs("strong",{className:"text-ink",children:["$",m]}
53)," VidaCredit"]})]}),s.jsx("div",{className:"mt-2 h-1.5 w-full overflow-hidden rounded-pill bg-card",children:s.jsx("div",{className:"h-full rounded-pill bg-primary motion-safe:transition-[width] motion-safe:duration-500",style:{width:`${c}%`}})}),s.jsx("p",{className:"mt-1.5 text-caption text-ink-3 tabular-nums",children:d||!o?`${r} points · top tier reached`:`${l.toLocaleString()} pts to ${o.name}`})]})]})}function pae(){const{user:e,isAuthenticated:t,logout:n}=Bt(),{theme:r,setTheme:o}=Mh(),l=bre(),{data:c}=Xre(t),d=NM(t),{data:m}=tae(t),p=!!m?.status,y=RM.filter(v=>v.href!=="/account/points").filter(v=>!v.partnerOnly||p).map(v=>({href:v.href,label:v.longLabel,icon:v.icon,badge:v.href==="/account/notifications"&&d>0?s.jsx("span",{"data-testid":"dropdown-unread-pill",className:"inline-flex min-w-[18px] items-center justify-center rounded-pill bg-destructive px-1.5 py-0.5 text-[11px] font-semibold leading-none text-destructive-foreground tabular-nums",children:d>9?"9+":d}):void 0})),g=s.jsxs(O$,{service:l,user:t?e:null,avatarUrl:c?.avatarUrl?xre(c.avatarUrl):null,signInHref:"/login",items:y,showServiceSwitcher:l!=="tools",hasNotification:d>0,linkComponent:Ue,onSignOut:n,footer:s.jsx(I$,{theme:r,setTheme:o}),children:[l==="shop"?s.jsx(fae,{}):null,s.jsx(mae,{})]});return l==="shop"&&t?s.jsx(dae,{children:g}):g}const hae=[{href:"/products",label:"Shop",testId:"nav-products",match:["/products","/categories","/requested"],icon:V0},{href:"/club",label:"Club",testId:"nav-club",match:["/club"],icon:ya},{href:"/forward",label:"Forward",testId:"nav-forward",match:["/forward"],icon:mh},{href:"/research",label:"Research",testId:"nav-research",match:["/research","/coa"],icon:E2},{href:"/rewards",label:"Rewards",testId:"nav-rewards",match:["/rewards","/membership","/partners"],icon:Zq},{href:"/about",label:"About",testId:"nav-about",match:["/about","/contact"],icon:Ap}];function gae(){const[e]=Hn(),{itemCount:t,openCart:n}=oo(),[r,o]=h.useState(!1);h.useEffect(()=>{const m=()=>o(window.scrollY>8);return m(),window.addEventListener("scroll",m,{passive:!0}),()=>window.removeEventListener("scroll",m)},[]);const l=h.useRef(t),[c,d]=h.useState(0);return h.useEffect(()=>{t>l.current&&d(m=>m+1),l.current=t},[t]),s.jsx("header",{className:Y("sticky top-0 z-50 rounded-none border-x-0 border-t-0 border-b motion-safe:transition-[box-shadow,border-color]",r?"vp-glass-strong shadow-md [border-bottom-color:var(--gold-hairline)]":"vp-glass shadow-none border-b-transparent"),children:s.jsxs("div",{className:"mx-auto flex h-[var(--vp-nav-h)] w-full max-w-[var(--vp-content-max)] items-center justify-between gap-3 px-5",children:[s.jsx(Ue,{href:"/","aria-label":"VidaPeps home",className:"flex shrink-0 items-center motion-safe:transition-opacity hover:opacity-80",children:s.jsx("img",{src:"/vidapeps-logo.svg",alt:"VidaPeps",className:"h-7 w-auto dark:brightness-0 dark:invert"})}),s.jsx("nav",{"aria-label":"Primary",className:"hidden min-w-0 items-center gap-1 overflow-x-auto shell:flex [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:hae.map(m=>{const p=m.match.some(g=>e.startsWith(g)),y=m.icon;return s.jsxs(Ue,{href:m.href,"data-testid":m.testId,className:Y("inline-flex shrink-0 items-center gap-1.5 whitespace-nowrap rounded-pill px-3 py-2 text-sm font-semibold motion-safe:transition-colors shell-wide:px-3.5",p?"bg-primary text-primary-foreground":"text-ink-2 hover:bg-ink/5 hover:text-ink dark:text-white/70 dark:hover:bg-white/10 dark:hover:text-white"),children:[y&&s.jsx(y,{className:"hidden size-4 shell-wide:block","aria-hidden":"true"}),m.label]},m.href)})}),s.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[s.jsx(fre,{}),s.jsx(pae,{}),s.jsxs("button",{type:"button",onClick:n,"data-testid":"nav-cart","aria-label":`Cart, ${t} items`,className:Y("relative flex size-[42px] items-center justify-center rounded-pill bg-ink/5 text-ink motion-safe:transition-colors hover:bg-ink/10","dark:bg-white/10 dark:text-white dark:hover:bg-white/15"),children:[s.jsx(nl,{className:"size-5"}),t>0&&s.jsx("span",{className:Y("absolute -right-1 -top-1 flex h-[18px] min-w-[18px] items-center justify-center rounded-pill bg-primary px-1 text-[11px] font-bold leading-none text-primary-foreground",c>0&&"motion-safe:animate-[vp-cart-pop_0.45s_ease-out]"),children:t>9?"9+":t},c)]})]})]})})}const ur=h.forwardRef(({className:e,width:t="default",padY:n=!1,...r},o)=>s.jsx("div",{ref:o,className:Y("mx-auto w-full px-5",t==="default"&&"max-w-[var(--vp-content-max)]",t==="narrow"&&"max-w-3xl",t==="wide"&&"max-w-[1320px]",n&&"py-8 md:py-12",e),...r}));ur.displayName="PageContainer";function yae({children:e,className:t,as:n,showAffordance:r=!0,forwardedRef:o,"aria-label":l,...c}){const d=n??"div",m=h.useRef(null),[p,y]=h.useState(!1),g=h.useCallback(b=>{m.current=b,typeof o=="function"?o(b):o&&(o.current=b)},[o]),v=h.useCallback(()=>{const b=m.current;if(!b||!r)return;const S=b.scrollLeft+b.clientWidth>=b.scrollWidth-1;y(b.scrollWidth>b.clientWidth+1&&!S)},[r]);return h.useEffect(()=>{const b=m.current;if(!b||!r)return;v(),b.addEventListener("scroll",v,{passive:!0});let S;if(typeof ResizeObserver<"u"){S=new ResizeObserver(v),S.observe(b);for(const C of Array.from(b.children))S.observe(C)}return()=>{b.removeEventListener("scroll",v),S?.disconnect()}},[v,r]),s.jsxs("div",{className:"relative",children:[s.jsx(d,{ref:g,"aria-label":l,role:l&&!n?"group":void 0,className:Y("overflow-x-auto [-webkit-overflow-scrolling:touch] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",t),...c,children:e}),r&&s.jsx("div",{"aria-hidden":"true",className:Y("pointer-events-none absolute inset-y-0 right-0 flex items-center pl-8 pr-1","bg-gradient-to-l from-bone via-bone/80 to-transparent","motion-safe:transition-opacity motion-safe:duration-200",p?"opacity-100":"opacity-0"),children:s.jsx(ul,{className:"size-5 text-ink-2"})})]})}var iT={};const oT="%%VP_STORE_MAIL_HOST%%";function xae(e){return e.indexOf("%")===-1}const Ho=xae(oT)?oT:"vidapeps.com",vae={support:`support@${Ho}`,payments:`payments@${Ho}`,compliance:`compliance@${Ho}`,orders:`orders@${Ho}`},bae={noreply:`noreply@${Ho}`,testing:`testing@${Ho}`,shipments:`shipments@${Ho}`}
53,lT="myvida.care",swe={help:`help@${lT}`,coach:`coach@${lT}`},wae={support:"VP_SUPPORT_EMAIL",payments:"VP_PAYMENTS_EMAIL",compliance:"VP_COMPLIANCE_EMAIL",orders:"VP_ORDERS_EMAIL",noreply:"VP_NOREPLY_EMAIL",testing:"VP_TESTING_EMAIL",shipments:"VP_SHIPMENTS_EMAIL"},Sae=typeof process<"u"&&iT?iT:{},Cae=new Proxy({...vae,...bae},{get(e,t){if(typeof t!="string")return;const n=wae[t],r=n?Sae[n]?.trim():void 0;return r&&r.length>0?r:e[t]}});function cS(e){return Cae[e]}const Nae=cS("support"),Aae=cS("payments"),Eae=cS("compliance"),jae="1-833-408-7377",Tae="+18334087377",kae="June 15, 2026",uS=Nae,vc=Eae,qM=Aae,iwe=[{key:"support",label:"Support",email:uS,blurb:"Orders, shipping, lots & COAs"},{key:"compliance",label:"Compliance",email:vc,blurb:"Researcher qualification, policy & legal"},{key:"payments",label:"Payments",email:qM,blurb:"Billing, refunds & payment issues"}],Rae={disclaimer:"disclaimer","research-use":"disclaimer",fda:"disclaimer",terms:"terms",tos:"terms",privacy:"privacy",refunds:"refunds",refund:"refunds",returns:"refunds",shipping:"shipping",cookies:"cookies",cookie:"cookies","cookie-policy":"cookies"},owe=new Set(["sms","sms-policy","text-messages","text-message","messaging","texts"]),lwe="/policies/sms-messaging";function cwe(e){return e?Rae[e.toLowerCase()]??"disclaimer":"disclaimer"}const UM="VidaPeps is a research-supply company only. We do not provide usage instructions, dosing guidance, or any advice regarding the application or administration of our products.",Pae={slug:"disclaimer",title:"Research Use & FDA Disclaimer",navLabel:"Research Disclaimer",sections:[{h:"Research Use Only",body:["All products sold by VidaPeps are furnished strictly as reference compounds for in-vitro laboratory research and development by qualified professionals. Products are NOT intended for human or veterinary use of any kind, including but not limited to: ingestion, injection, topical application, inhalation, or any other route of administration to humans or animals.","No product sold on this site is offered, labeled, or intended for use as a drug, food, dietary supplement, cosmetic, or medical device, and nothing on this site may be construed as encouraging or enabling any such use."]},{h:"Not Evaluated by the FDA",body:["Statements regarding these products have not been evaluated by the U.S. Food and Drug Administration. These products are not drugs and are not intended to diagnose, treat, cure, mitigate, or prevent any disease or medical condition.","Any reference on this site to published scientific literature is provided solely for research context. Such references are not claims of efficacy, safety, or suitability for any human or veterinary application and must not be read as such."]},{h:"Purchaser Qualification & Professional Attestation",body:["By purchasing, you represent and warrant that: (a) you are at least 21 years of age; (b) you are a trained researcher, or you are purchasing on behalf of a research institution, laboratory, or organization; (c) you have the knowledge, training, equipment, and facilities required to safely receive, store, and handle research compounds; and (d) all products will be used exclusively for lawful, legitimate in-vitro research purposes.","This attestation is renewed and reaffirmed with every order you place. VidaPeps may require documentary evidence of research credentials (institutional affiliation, laboratory address, or equivalent professional qualification) at any time, before or after accepting an order."]},{h:"No Medical Advice",body:["Nothing on this website constitutes medical, diagnostic, or therapeutic advice. Product descriptions reference published scientific literature for research context only. VidaPeps does not provide, and its staff are not permitted to provide, any guidance regarding administration of any product to humans or animals. No such use is permitted under any circumstances."]},{h:"Prohibited Uses",body:["Without limitation, the following uses are expressly prohibited: administration to humans or animals by any route; incorporation into any food, beverage, drug, dietary supplement, cosmetic, or medical device; resale or transfer to any party who has not made equivalent research-use attestations; and any use that violates applicable federal, state, or local law or regulation.","Suspected intent of personal consumption, or of resale for consumption, will result in immediate order cancellation and a permanent purchasing ban."]},{h:"Assumption of Risk & Indemnification",body:["The purchaser assumes all responsibility and liability for the proper transport, storage, handling, use, and disposal of products from the moment of delivery. Research compounds are experimental materials whose properties may not be fully characterized; the purchaser acknowledges and accepts these risks in full.","The purchaser agrees to indemnify, defend, and hold harmless VidaPeps, its owners, officers, employees, contractors, and agents from and against any and all claims, damages, liabilities, losses, costs, and expenses (including reasonable attorneys' fees) arising from or related to the purchase, possession, handling, use, or misuse of any product, including any use contrary to this Disclaimer."]},{h:"Right to Refuse & Compliance Monitoring",body:["VidaPeps reserves the right, at its sole discretion, to refuse or cancel any order, to limit quantities, to decline service to any person or organization, and to require evidence of research credentials before releasing a shipment. We actively monitor orders for indicators of non-research intent and report unlawful activity to the appropriate authorities where required."]}]},Oae={slug:"terms",title:"Terms of Service",navLabel:"Terms",sections:[{h:"1. Acceptance of Terms",body:['By accessing vidapeps.com (the "Site") or purchasing from VidaPeps ("we," "us," "our"), you agree to be bound by these Terms of Service, our Privacy Policy, Shipping Policy, Refund Policy, and Research Use & FDA Disclaimer, each of which is incorporated into these Terms by reference. If you do not agree, do not use the Site or place an order.']},{h:"2. Eligibility",body:["Use of the Site is limited to individuals 21 years of age or older who are qualified researchers, or who are purchasing on behalf of a laboratory, academic institution, or research organization. We may require verification of age, identity, or professional credentials at any time, and may suspend fulfillment until verification is complete."]},{h:"3. Research Use Only",body:["Every product is sold solely for in-vitro laboratory research and is not for human or veterinary use. Your purchase constitutes a binding, renewed certification that products will not be administered to humans or animals and will not be used in or as any food, drug, dietary supplement, cosmetic, or medical device. Breach of this certification is a material breach of these Terms."]},{h:"4. Account Responsibilities",body:["You are responsible for safeguarding your account credentials and for all activity occurring under your account. Notify us immediately of any unauthorized use. We may suspend or terminate accounts that violate these Terms, misrepresent qualification, or show indicators of prohibited use."]},{h:"5. Orders & Pricing",body:["All orders are offers to purchase, subject to our acceptance. We may cancel any order prior to shipment, including for suspected misuse, failed qualification, pricing or listing errors, or stock issues; cancelled orders are settled as VidaCredit (store credit) for the full amount paid. We do not issue cash refunds; see our Refund Policy. Prices are stated in USD, do not include any applicable taxes, and may change without notice. Where we are required to collect sales tax, it will be shown at checkout; you remain responsible for any other taxes, duties, or fees that may apply to your purchase."]},{h:"6. Membership, Points & Referrals",body:["Loyalty points and referral credits are promotional in nature: they have no cash value, are non-transferable, may not be sold or exch
53anged, and may be adjusted or revoked in cases of fraud, abuse, order cancellation, or program changes. We may modify or discontinue the program at any time with reasonable notice."]},{h:"7. Intellectual Property",body:["All Site content, including text, graphics, logos, product imagery, data, and software, is the property of VidaPeps or its licensors and is protected by applicable intellectual-property laws. You may not reproduce, distribute, scrape, or create derivative works from Site content without our prior written consent."]},{h:"8. Prohibited Conduct",body:["You agree not to: misrepresent your identity, age, or research credentials; purchase products for human or veterinary consumption or for resale toward such purposes; circumvent qualification or verification controls; interfere with the operation or security of the Site; or use the Site in violation of any applicable law or regulation."]},{h:"9. Certificates of Analysis",body:["Each lot we release is accompanied by a Certificate of Analysis. A supplier certificate is available at release; an independent third-party certificate is added as testing completes and is published on the batch's verification page. COA data describes the identity and purity of the tested lot for research purposes only and does not constitute a warranty of fitness for any particular use."]},{h:"10. Disclaimer of Warranties",body:['THE SITE AND ALL PRODUCTS ARE PROVIDED "AS IS" AND "AS AVAILABLE." EXCEPT AS EXPRESSLY STATED IN A CERTIFICATE OF ANALYSIS, WE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.']},{h:"11. Limitation of Liability",body:["TO THE MAXIMUM EXTENT PERMITTED BY LAW, VIDAPEPS SHALL NOT BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES, OR FOR LOST PROFITS, DATA, OR RESEARCH OUTCOMES. OUR TOTAL AGGREGATE LIABILITY FOR ANY CLAIM SHALL NOT EXCEED THE AMOUNT YOU PAID FOR THE PRODUCT GIVING RISE TO THE CLAIM."]},{h:"12. Indemnification",body:["You agree to indemnify, defend, and hold harmless VidaPeps and its owners, officers, employees, and agents from any claims, losses, liabilities, or expenses (including reasonable attorneys' fees) arising out of your breach of these Terms, your misuse of any product, or your violation of any law or third-party right."]},{h:"13. Governing Law & Dispute Resolution",body:["These Terms are governed by the laws of the United States and of the state in which VidaPeps is organized and maintains its principal place of business, without regard to conflict-of-law principles. Any dispute arising from these Terms or your purchase shall be resolved by binding arbitration on an individual basis; class actions and jury trials are waived to the maximum extent permitted by law. Venue for any matter not subject to arbitration lies exclusively in the state and federal courts of that jurisdiction."]},{h:"14. Changes to These Terms",body:["We may update these Terms at any time. The current version, with its effective date, is always posted on this page. Continued use of the Site after changes are posted constitutes acceptance of the revised Terms."]}]},_ae={slug:"privacy",title:"Privacy Policy",navLabel:"Privacy",sections:[{h:"1. Information We Collect",body:["We collect information you provide directly (name, email, shipping address, phone number if you choose to provide one, institution or organization, order history, researcher-qualification details, your communication and consent preferences, and communications with our team) and information collected automatically, such as device data, approximate location, and on-site browsing activity via cookies and similar technologies (subject to your cookie choices; see the Cookie Policy).","We also keep an auditable record of the consents you give or withdraw (what you agreed to, when, and the version of the policy shown) so we can honor your choices and demonstrate compliance.","Payment card data is handled end-to-end by our payment processors and is never stored on VidaPeps servers."]},{h:"2. How We Use Information",body:["We use your information to process and ship orders, verify researcher qual
53ification and age eligibility, operate the membership, points, and referral programs, provide support, maintain lot-level traceability records, prevent fraud and prohibited use, comply with legal obligations, and, only with your consent, send marketing communications."]},{h:"3. Sharing",body:["We do not sell your personal information. We share data only with service providers necessary to operate the business (payment processing, shipping carriers, first-party analytics, and email/SMS delivery), in connection with legal compliance, or as part of a business transfer. All service providers are bound by confidentiality obligations.","We never sell, rent, or share your mobile phone number, and your SMS opt-in (text-message consent) is never shared with third parties or affiliates for their own marketing. Phone numbers are used only to deliver the message programs you asked for, through our messaging provider."]},{h:"4. Cookies & Tracking",body:["We use first-party cookies and similar technologies grouped into four categories: Necessary (always on: cart, session, checkout, security), Preferences (remembering UI choices), Statistics (anonymous on-site analytics so we can improve the Site), and Marketing (none are in use today). Non-essential categories are off until you opt in.","All analytics are first-party. We set no third-party advertising trackers, and we do not store your IP address with your on-site activity. You can accept, reject, or customize non-essential cookies when you first visit and change your choice at any time via âYour Privacy Choices,â and we honor Global Privacy Control (GPC) browser signals. Full detail is in our Cookie Policy (/legal/cookies).","Independent of any cookie choice, we keep two non-behavioral first-party records under our legitimate interest in operating and securing the Site: (1) account & order events (signup, login, and completed purchases) as a transaction/security record tied to your account, and (2) pre-aggregated, non-identifying visit counts (day, page area, referring site, device type, and country from our network edge) that contain no identifier and n
53o per-person row. Neither writes a cookie or stores your IP address."]},{h:"5. Data Retention",body:["We retain order and account records for as long as needed for legitimate business purposes and legal compliance, including tax recordkeeping and product-traceability requirements that apply to research materials, and then delete or anonymize them."]},{h:"6. Security",body:["We use industry-standard safeguards, including TLS encryption in transit, encrypted storage of sensitive fields, and role-based access controls. No method of transmission or storage is 100% secure; we cannot guarantee absolute security, but we act promptly on any suspected incident."]},{h:"7. Your Rights",body:[`Depending on your jurisdiction, you may have rights to access, correct, delete, or port your personal information, to opt out of the sale or sharing of personal information, and to opt out of marketing at any time. You can exercise most of these yourself from âYour Privacy Choicesâ in your account (the Privacy & Consent Center), including downloading your data and a record of your consents. You may also submit a request to ${vc}; we verify your identity before acting and respond within the period required by law (e.g., 45 days under U.S. state privacy laws). We will not discriminate against you for exercising a right.`,"Some records may be retained where required by law or to establish, exercise, or defend legal claims; for example, we keep a record of your messaging and marketing consents after you withdraw them or close your account, so we can prove your choices were honored."]},{h:"8. Children",body:["The Site is not directed to, and may not be used by, anyone under 21 years of age. We do not knowingly collect information from minors, and we delete any such data upon discovery."]},{h:"9. Text Messages (SMS)",body:["If you opt in, we send text messages to the mobile number you provide. We offer two separate programs you can choose independently: account & security texts (one-time login codes, password resets, VidaPay approvals, and support replies) and product & community texts (occasional offers and news). Each requires its own affirmative opt-in.","Consent to receive texts is never a condition of creating a Vida account, purchasing, or using any Vida service. Message frequency varies; message and data rates may apply. Reply STOP to any message to cancel, or HELP for help. You can also manage texts anytime from Your Privacy Choices in your account. See our SMS & Messaging Policy (/policies/sms-messaging) for full terms."]},{h:"10. Your Privacy Choices",body:["You control your privacy from a single place: âYour Privacy Choicesâ in your account (the Privacy & Consent Center). There you can: opt in or out of marketing email and each SMS program, change your cookie categories, review and re-accept policy versions, download your data and consent history, and request account deletion.",`To exercise âDo Not Sell or Share My Personal Information,â use Your Privacy Choices, send a request to ${vc}, or enable Global Privacy Control (GPC) in your browser. We treat a GPC signal as a valid opt-out of sale/sharing. (We do not sell personal information, and our analytics are first-party.)`]},{h:"11. Changes & Contact",body:[`We may update this policy; material changes will be posted on this page with a new effective date, and where required we will ask you to re-acknowledge them. Questions about this policy or our data practices: ${vc}.`]}]},Iae={slug:"refunds",title:"Refund Policy",navLabel:"Refunds",warningBadge:"All sales final. Read carefully.",sections:[{h:"All Sales Final",body:["Due to the nature of research compounds, which require verified chain of custody, controlled storage, and batch integrity, ALL SALES ARE FINAL. We cannot accept returns of any product once it has left our facility, whether opened or unopened. This policy is strictly enforced without exception.","We do not issue cash refunds. Where we owe you value under this policy, whether for a cancelled order, a pre-ordered lot that failed testing, or a verified claim, it is settled as VidaCredit (store credit) or as a replacement. VidaCredit is issued to your account for the full amount owed, does not expire, and may be spent on anything we sell."]},{h:"Why Returns Are Not Accepted",body:["Once a product leaves our temperature- and access-controlled facility, we can no longer guarantee its identity, purity, or storage history. Accepting returns would compromise the integrity of our inventory and the reliability of the research community we serve. A no-returns policy is the only way to guarantee that every vial we ship matches its Certificate of Analysis."]},{h:"Damaged or Incorrect Shipments",body:[`If your order arrives damaged, defective, or incorrect, contact ${uS} within 48 hours of delivery with your order number and clear photographs of the packaging and product.
53Verified claims will be resolved with a replacement of the same item or VidaCredit (store credit), at our discretion. Replacements are the sole remedy; cash refunds are not provided for delivered goods.`]},{h:"Lost Shipments",body:["If tracking shows no movement for 10 business days (domestic), contact us and we will open a carrier investigation. Confirmed lost shipments are replaced once. Orders marked as delivered by the carrier are not eligible for replacement; if your delivery location is not secure, consider requiring a signature on delivery."]},{h:"Order Cancellations",body:["Orders may be cancelled only before they are processed for shipment. Once a shipping label is created, the order cannot be cancelled. A cancelled order is settled as VidaCredit (store credit) for the full amount paid, issued to your account immediately; we do not return funds to the original payment method. Refused or undeliverable shipments are not cancellable and are not settled."]},{h:"Pre-Orders",body:["A pre-order is charged in full at checkout against a lot that has not yet completed third-party testing. If that lot does not pass, we will not ship it, and your payment is settled as VidaCredit for the full amount you paid, together with an email telling you it happened. Your VidaCredit does not expire and may be spent on anything we sell, including a different product than the one you pre-ordered.","Where a lot passes but yields fewer units than were pre-ordered, units are allocated to the earliest pre-orders first, and any pre-order left unfilled is settled as VidaCredit on the same terms.","You accept these terms explicitly at checkout before any pre-order payment is taken."]},{h:"Chargebacks",body:["Initiating a chargeback in lieu of following this policy constitutes a breach of our Terms of Service. Accounts associated with fraudulent chargebacks are permanently banned, and claims are pursued to the full extent permitted by law."]},{h:"Quality Guarantee",body:["Every lot ships with a Certificate of Analysis. If independent testing of an unopened vial from the same lot demonstrates the product does not meet its stated purity, we will replace the lot. This is our sole quality remedy."]}]},Mae={slug:"shipping",title:"Shipping Policy",navLabel:"Shipping",sections:[{h:"Processing Time",body:["Orders placed before 2:00 PM ET on business days ship the same day. Orders placed after the cutoff, on weekends, or on holidays ship the next business day. Orders held for researcher-qualification review ship upon clearance."]},{h:"Domestic Shipping",body:["We ship from our U.S. facility. Free shipping on all U.S. orders. Transit typically takes 2â5 business days. Tracking is emailed when your label is created."]},{h:"Packaging & Stability",body:["Peptides are lyophilized (freeze-dried) for shelf stability and shipped in protective, discreet packaging. Lyophilized peptides tolerate ambient shipping temperatures; refrigerate upon receipt and store per the product data sheet for your lot."]},{h:"Address Accuracy",body:["You are responsible for providing a complete, accurate shipping address. Shipments returned or lost due to an incorrect address may be reshipped at your expense; they are not settled or replaced."]},{h:"International Orders",body:["We currently ship within the United States only. Orders placed with international shipping addresses will be cancelled and settled as VidaCredit (store credit) for the full amount paid."]},{h:"Risk of Loss",body:["Title and risk of loss pass to you upon our delivery of the package to the carrier, except as covered under the Lost Shipments provision of our Refund Policy."]},{h:"Shipping Restrictions",body:["We do not ship to states or jurisdictions where the sale of a given research compound is restricted. Affected items will be removed from your order and their value settled as VidaCredit (store credit); we will notify you before the remainder ships."]}]},Dae={slug:"cookies",title:"Cookie Policy",navLabel:"Cookies",sections:[{h:"1. What Cookies Are",body:["Cookies and similar technologies (such as local storage) are small data files stored on your device. We use them to run the Site, remember your choices, and understand (anonymously) how the Site is used. We use only first-party technologies; we set no third-party advertising or cross-site tracking cookies."]},{h:"2. Categories We Use",body:["Necessary (always on): authentication and session, cart, checkout, and security/fraud-prevention. The Site cannot function without these, so they do not require consent.","Preferences (optional): remember interface choices, such as recently-viewed items and layout.","Statistics (optional): a single first-party identifier plus on-site events (page and product views, search, add-to-cart) so we can measure and improve the Site. We do not store your IP address with this activity, and the data is shared with no one.","Marketing (optional): advertising or retargeting cookies. We do not currently use any; the category is listed for transparency and your future choice.","Server-side records (no cookie, not consent-gated): under our legitimate interest we keep account/order events (signup, login, purchase) as a transaction and security record, and pre-aggregated, non-identifying visit counts (day, page area, referrer host, device type, edge-derived country: no identifier, no per-person row). These are NOT cookies and are unaffected by your Statistics choice; we never store your IP address with them."]},{h:"3. Your Choices",body:["When you first visit, you can Accept all, Reject non-e
53ssential, or Customize by category. You can change your choice at any time from Your Privacy Choices in your account or from the cookie banner. Non-essential categories stay off until you opt in.","We honor Global Privacy Control (GPC): if your browser sends a GPC signal, we automatically treat it as opting out of the Marketing category and of any sale or sharing of personal information."]},{h:"4. Managing Cookies in Your Browser",body:["You can also block or delete cookies through your browser settings. Note that blocking Necessary cookies may prevent the cart or checkout from working."]},{h:"5. Changes & Contact",body:[`We may update this policy as our use of cookies changes; the effective date above reflects the latest version. Questions: ${vc}. See also our Privacy Policy (/legal/privacy).`]}]},uwe={disclaimer:Pae,terms:Oae,privacy:_ae,cookies:Dae,refunds:Iae,shipping:Mae},dwe=["disclaimer","terms","privacy","cookies","refunds","shipping"],fwe={body:["VidaPeps supplies U.S. laboratories and independent researchers with rigorously verified peptide reference materials.","Every compound we stock is synthesized to â¥99% purity and ships with a Certificate of Analysis. A supplier COA is available at release; we add an independent third-party COA (HPLC and mass spectrometry) as our partner labs return results, working toward third-party testing on every lot.","We exist because research outcomes are only as reliable as the materials behind them. Our obligations are to accuracy, transparency, and the integrity of the research supply chain, which is why we enforce strict research-use qualification on every order."],stats:[{value:"â¥99%",label:"minimum purity, every lot"},{value:"4Ã",label:"testing standard (identity · purity · mass · sterility screen)"},{value:"US",label:"stocked & shipped"}]};var Lae=Object.defineProperty,eo=(e,t)=>Lae(e,"name",{value:t,configurable:!0}),dS="Switch",[qae,mwe]=nr(dS),[Uae,fS]=qae(dS);function zM(e){const{__scopeSwitch:t,checked:n,children:r,defaultChecked:o,disabled:l,form:c,name:d,onCheckedChange:m,required:p,value:y="on",internal_do_not_use_render:g}=e,[v,b]=va({prop:n,defaultProp:o??!1,onChange:m,caller:dS}),[S,C]=h.useState(null),[N,A]=h.useState(null),T=h.useRef(!1),[E,j]=h.useReducer(P=>P+1,0),_=S?!!c||!!S.closest("form"):!0,R={checked:v,setChecked:b,disabled:l,control:S,setControl:C,name:d,form:c,value:y,hasConsumerStoppedPropagationRef:T,userInteractionCount:E,onUserInteraction:j,required:p,defaultChecked:o,isFormControl:_,bubbleInput:N,setBubbleInput:A};return s.jsx(Uae,{scope:t,...R,children:BM(g)?g(R):r})}eo(zM,"SwitchProvider");var zae="SwitchTrigger",Vae=h.forwardRef(eo(function({__scopeSwitch:t,onClick:n,...r},o){const{control:l,form:c,value:d,disabled:m,checked:p,required:y,setControl:g,setChecked:v,hasConsumerStoppedPropagationRef:b,onUserInteraction:S,isFormControl:C,bubbleInput:N}=fS(zae,t),A=Qe(o,g),T=h.useRef(p);return h.useEffect(()=>{const E=c?l?.ownerDocument.getElementById(c):l?.form;if(E instanceof HTMLFormElement){const j=eo(()=>v(T.current),"reset");return E.addEventListener("reset",j),()=>E.removeEventListener("reset",j)}},[l,c,v]),s.jsx(Ge.button,{type:"button",role:"switch","aria-checked":p,"aria-required":y,"data-state":mS(p),"data-disabled":m?"":void 0,disabled:m,value:d,...r,ref:A,onClick:je(n,E=>{S(),v(j=>!j),N&&C&&(b.current=E.isPropagationStopped(),b.current||E.stopPropagation())})})},"SwitchTrigger")),VM=h.forwardRef(eo(function(t,n){const{__scopeSwitch:r,name:o,checked:l,defaultChecked:c,required:d,disabled:m,value:p,onCheckedChange:y,form:g,...v}=t;return s.jsx(zM,{__scopeSwitch:r,checked:l,defaultChecked:c,disabled:m,required:d,onCheckedChange:y,name:o,form:g,value:p,internal_do_not_use_render:({isFormControl:b})=>s.jsxs(s.Fragment,{children:[s.jsx(Vae,{...v,ref:n,__scopeSwitch:r}),b&&s.jsx(Hae,{__scopeSwitch:r})]})})},"Switch")),Bae="SwitchThumb",Fae=h.forwardRef(eo(function(t,n){const{__scopeSwitch:r,...o}=t,l=fS(Bae,r);return s.jsx(Ge.span,{"data-state":mS(l.checked),"data-disabled":l.disabled?"":void 0,...o,ref:n})},"SwitchThumb")),$ae="SwitchBubbleInput",Hae=h.forwardRef(eo(function({__scopeSwitch:t,onClick:n,...r},o){const{control:l,hasConsumerStoppedPropagationRef:c,userInteractionCount:d,checked:m,defaultChecked:p,required:y,disabled:g,name:v,value:b,form:S,bubbleInput:C,setBubbleInput:N}=fS($ae,t),A=Qe(o,N),T=Sh(l),E=h.useRef(!1),j=h.useRef(m),_=h.useRef(d);h.useEffect(()=>{const P=C;if(!P)return;const M=window.HTMLInputElement.prototype,U=Object.getOwnPropertyDescriptor(M,"checked").set,V=d!==_.current;_.current=d;const $=j.current!==m;j.current=m;const L=!(V&&c.current);if($&&U){E.current=!V;const H=new Event("click",{bubbles:L});U.call(P,m),P.dispatchEvent(H),E.current=!1}},[C,m,c,d]);const R=h.useRef(m);return s.jsx(Ge.input,{type:"checkbox","aria-hidden":!0,defaultChecked:p??R.current,required:y,disabled:g,name:v,value:b,form:S,...r,tabIndex:-1,ref:A,onClick:je(n,P=>{E.current&&P.stopPropagation()}),style:{...r.style,...T,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})}
53,"SwitchBubbleInput"));function BM(e){return typeof e=="function"}eo(BM,"isFunction");function mS(e){return e?"checked":"unchecked"}eo(mS,"getState");const FM=h.forwardRef(({className:e,...t},n)=>s.jsx(VM,{className:Y("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:s.jsx(Fae,{className:Y("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));FM.displayName=VM.displayName;function Gm({label:e,description:t,checked:n,locked:r,onChange:o}){return s.jsxs("div",{className:"flex items-start justify-between gap-3 border-b border-border/40 py-2.5 last:border-0",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"text-sm font-medium text-ink",children:e}),s.jsx("p",{className:"text-[11px] leading-snug text-ink-3",children:t})]}),r?s.jsx("span",{className:"text-overline mt-0.5 shrink-0 rounded-full bg-vida-mint-soft/70 px-2 py-0.5 text-primary",children:"Always on"}):s.jsx(FM,{checked:n,onCheckedChange:l=>o?.(l===!0),"aria-label":e,className:"mt-0.5 shrink-0"})]})}function Gae(){const[e,t]=h.useState(()=>HX()!==null),[n,r]=h.useState(!1),[o,l]=h.useState(!1),[c,d]=h.useState(!1),[m,p]=h.useState(!1);if(e)return null;const y=S=>{tI(S),jte(S.statistics),t(!0)},g=()=>y({preferences:!0,statistics:!0,marketing:!0}),v=()=>y({preferences:!1,statistics:!1,marketing:!1}),b=()=>y({preferences:o,statistics:c,marketing:m});return s.jsx("section",{"aria-label":"Cookie consent","data-testid":"consent-banner",className:"fixed left-1/2 z-[60] w-[min(94vw,600px)] -translate-x-1/2 bottom-[calc(var(--vp-tabbar-h)+env(safe-area-inset-bottom)+12px)] shell:bottom-5",children:s.jsxs("div",{className:"vp-glass-strong rounded-card p-4 shadow-lg",children:[n?s.jsxs(s.Fragment,{children:[s.jsxs("div",{"data-testid":"consent-customize-panel",children:[s.jsx(Gm,{label:"Necessary",description:"Cart, sign-in, checkout, security. Required for the site to work.",checked:!0,locked:!0}),s.jsx(Gm,{label:"Preferences",description:"Remembers UI choices like recently-viewed items.",checked:o,onChange:l}),s.jsx(Gm,{label:"Statistics",description:"Anonymous on-site analytics so we can improve VidaPeps.",checked:c,onChange:d}),s.jsx(Gm,{label:"Marketing",description:"Advertising / retargeting. We don't use any today.",checked:m,onChange:p})]}),s.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[s.jsx(Le,{size:"sm",variant:"ghost","data-testid":"button-consent-back",onClick:()=>r(!1),children:"Back"}),s.jsx(Le,{size:"sm","data-testid":"button-consent-save",onClick:b,children:"Save preferences"})]})]}):s.jsxs(s.Fragment,{children:[s.jsxs("p",{className:"text-caption leading-relaxed text-ink-2",children:["We use first-party cookies to understand which research compounds get attention. No third-party trackers, no ads, IP addresses never stored. You can accept all, keep only what's essential, or choose category by category. We still keep anonymous account/order records and pre-aggregated, non-identifying visit counts."," ",s.jsx(Ue,{href:"/legal/cookies",className:"font-semibold whitespace-nowrap text-primary hover:text-primary",children:"Cookie policy"})]}),s.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[s.jsx(Le,{size:"sm",variant:"ghost","data-testid":"button-consent-reject",onClick:v,children:"Reject non-essential"}),s.jsx(Le,{size:"sm",variant:"ghost","data-testid":"button-consent-customize",onClick:()=>r(!0),children:"Customize"}),s.jsx(Le,{size:"sm","data-testid":"button-consent-accept",onClick:g,children:"Accept all"})]})]}),s.jsxs("p",{className:"mt-2.5 text-[10px] text-ink-3",children:["Cookie Policy v",K_," · effective ",kae]})]})})}var Kae=Object.defineProperty,Js=(e,t)=>Kae(e,"name",{value:t,configurable:!0}),pS="Checkbox",[Yae,pwe]=nr(pS),[Wae,hS]=Yae(pS);function $M(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:l,form:c,name:d,onCheckedChange:m,required:p,value:y="on",internal_do_not_use_render:g}=e,[v,b]=va({prop:n,defaultProp:o??!1,onChange:m,caller:pS}
53),[S,C]=h.useState(null),[N,A]=h.useState(null),T=h.useRef(!1),[E,j]=h.useReducer(P=>P+1,0),_=S?!!c||!!S.closest("form"):!0,R={checked:v,disabled:l,setChecked:b,control:S,setControl:C,name:d,form:c,value:y,hasConsumerStoppedPropagationRef:T,userInteractionCount:E,onUserInteraction:j,required:p,defaultChecked:Ws(o)?!1:o,isFormControl:_,bubbleInput:N,setBubbleInput:A};return s.jsx(Wae,{scope:t,...R,children:GM(g)?g(R):r})}Js($M,"CheckboxProvider");var Qae="CheckboxTrigger",Xae=h.forwardRef(Js(function({__scopeCheckbox:t,onKeyDown:n,onClick:r,...o},l){const{control:c,value:d,disabled:m,checked:p,required:y,setControl:g,setChecked:v,hasConsumerStoppedPropagationRef:b,onUserInteraction:S,isFormControl:C,bubbleInput:N}=hS(Qae,t),A=Qe(l,g),T=h.useRef(p);return h.useEffect(()=>{const E=c?.form;if(E){const j=Js(()=>v(T.current),"reset");return E.addEventListener("reset",j),()=>E.removeEventListener("reset",j)}},[c,v]),s.jsx(Ge.button,{type:"button",role:"checkbox","aria-checked":Ws(p)?"mixed":p,"aria-required":y,"data-state":gS(p),"data-disabled":m?"":void 0,disabled:m,value:d,...o,ref:A,onKeyDown:je(n,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:je(r,E=>{S(),v(j=>Ws(j)?!0:!j),N&&C&&(b.current=E.isPropagationStopped(),b.current||E.stopPropagation())})})},"CheckboxTrigger")),HM=h.forwardRef(Js(function(t,n){const{__scopeCheckbox:r,name:o,checked:l,defaultChecked:c,required:d,disabled:m,value:p,onCheckedChange:y,form:g,...v}=t;return s.jsx($M,{__scopeCheckbox:r,checked:l,defaultChecked:c,disabled:m,required:d,onCheckedChange:y,name:o,form:g,value:p,internal_do_not_use_render:({isFormControl:b})=>s.jsxs(s.Fragment,{children:[s.jsx(Xae,{...v,ref:n,__scopeCheckbox:r}),b&&s.jsx(tse,{__scopeCheckbox:r})]})})},"Checkbox")),Zae="CheckboxIndicator",Jae=h.forwardRef(Js(function(t,n){const{__scopeCheckbox:r,forceMount:o,...l}=t,c=hS(Zae,r);return s.jsx(Dr,{present:o||Ws(c.checked)||c.checked===!0,children:s.jsx(Ge.span,{"data-state":gS(c.checked),"data-disabled":c.disabled?"":void 0,...l,ref:n,style:{pointerEvents:"none",...t.style}})})},"CheckboxIndicator")),ese="CheckboxBubbleInput",tse=h.forwardRef(Js(function({__scopeCheckbox:t,onClick:n,...r},o){const{control:l,hasConsumerStoppedPropagationRef:c,userInteractionCount:d,checked:m,defaultChecked:p,required:y,disabled:g,name:v,value:b,form:S,bubbleInput:C,setBubbleInput:N}=hS(ese,t),A=Qe(o,N),T=Sh(l),E=h.useRef(!1),j=h.useRef(m),_=h.useRef(d);h.useEffect(()=>{const P=C;if(!P)return;const M=window.HTMLInputElement.prototype,U=Object.getOwnPropertyDescriptor(M,"checked").set,V=d!==_.current;_.current=d;const $=j.current!==m;j.current=m;const L=!(V&&c.current);if($&&U){E.current=!V;const H=new Event("click",{bubbles:L});P.indeterminate=Ws(m),U.call(P,Ws(m)?!1:m),P.dispatchEvent(H),E.current=!1}},[C,m,c,d]);const R=h.useRef(Ws(m)?!1:m);return s.jsx(Ge.input,{type:"checkbox","aria-hidden":!0,defaultChecked:p??R.current,required:y,disabled:g,name:v,value:b,form:S,...r,tabIndex:-1,ref:A,onClick:je(n,P=>{E.current&&P.stopPropagation()}),style:{...r.style,...T,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"CheckboxBubbleInput"));function GM(e){return typeof e=="function"}Js(GM,"isFunction");function Ws(e){return e==="indeterminate"}Js(Ws,"isIndeterminate");function gS(e){return Ws(e)?"indeterminate":e?"checked":"unchecked"}Js(gS,"getState");const Hb=h.forwardRef(({className:e,...t},n)=>s.jsx(HM,{ref:n,className:Y("grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:s.jsx(Jae,{className:Y("grid place-content-center text-current"),children:s.jsx(mn,{className:"h-4 w-4"})})}));Hb.displayName=HM.displayName;const nse=h.forwardRef(({className:e,...t},n)=>s.jsx("textarea",{className:Y("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));nse.displayName="Textarea";const Gb="pv-gate-ok";function rse(){try{return localStorage.getItem(Gb)==="1"}catch{return!0}}function ase(){const[e,t]=h.useState(!1),[n,r]=h.useState(!1),[o,l]=h.useState(!1);h.useEffect(()=>{rse()||t(!0)},[]);const c=Xw("consent-gate",e);if(!e||!c)return null;const d=n&&o,m=()=>{if(d){try{localStorage.setItem(Gb,"1"),document.cookie=`${Gb}=1; path=/; max-age=${3600*24*365}; samesite=lax`}catch{}try{window.dispatchEvent(new Event("vp-consent-accepted"))}catch{}t(!1)}};return s.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center overflow-y-auto bg-vida-green-950/65 px-4 py-8 backdrop-blur-md",role:"dialog","aria-modal":"true","aria-labelledby":"
53consent-gate-title","data-testid":"consent-gate",children:s.jsx("div",{className:"relative w-full max-w-md",children:s.jsxs("div",{className:"relative overflow-hidden rounded-card vp-stage-gradient p-6 text-white shadow-[inset_0_0_0_1px_rgba(201,169,97,0.4),0_0_30px_-4px_rgba(201,169,97,0.4),0_22px_60px_-16px_rgba(201,169,97,0.26),0_40px_90px_-24px_rgba(0,0,0,0.8)] ring-1 ring-vida-gold-500/80 sm:p-8",children:[s.jsx("div",{className:"vp-gold-divider absolute inset-x-0 top-0 opacity-90","aria-hidden":"true"}),s.jsxs("div",{className:"mb-6 text-center",children:[s.jsx("div",{className:"mb-4 flex justify-center",children:s.jsx("img",{src:"/vidapeps-logo.svg",alt:"VidaPeps",className:"h-16 w-auto brightness-0 invert drop-shadow-[0_2px_10px_rgba(201,169,97,0.25)]"})}),s.jsx(zt,{variant:"research",className:"mb-3",children:"Research use only"}),s.jsx("h1",{id:"consent-gate-title",className:"font-display text-t2 text-white",children:"Welcome to VidaPeps"}),s.jsx("p",{className:"text-caption mt-2 text-white/70",children:"VidaPeps supplies reference compounds intended strictly for laboratory and in-vitro research use. Please confirm the statements below to continue."})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-start gap-3 rounded-[14px] border border-vida-gold-500/30 bg-black/25 p-3.5 transition-colors hover:border-vida-gold-500/55 hover:bg-black/30",children:[s.jsx(Hb,{id:"gate-age",checked:n,onCheckedChange:p=>r(p===!0),className:"mt-0.5 border-vida-gold-500/70 data-[state=checked]:border-vida-gold-500 data-[state=checked]:bg-vida-gold-500 data-[state=checked]:text-vida-green-950","data-testid":"gate-checkbox-age"}),s.jsx(xr,{htmlFor:"gate-age",className:"cursor-pointer text-sm font-normal leading-snug text-white/90",children:"I confirm that I am 21 years of age or older."})]}),s.jsxs("div",{className:"flex items-start gap-3 rounded-[14px] border border-vida-gold-500/30 bg-black/25 p-3.5 transition-colors hover:border-vida-gold-500/55 hover:bg-black/30",children:[s.jsx(Hb,{id:"gate-researcher",checked:o,onCheckedChange:p=>l(p===!0),className:"mt-0.5 border-vida-gold-500/70 data-[state=checked]:border-vida-gold-500 data-[state=checked]:bg-vida-gold-500 data-[state=checked]:text-vida-green-950","data-testid":"gate-checkbox-researcher"}),s.jsx(xr,{htmlFor:"gate-researcher",className:"cursor-pointer text-sm font-normal leading-snug text-white/90",children:"I am a qualified researcher and will use all products for in-vitro laboratory research only, not for human or veterinary use."})]})]}),s.jsx("div",{className:"mt-6",children:s.jsx(Le,{block:!0,disabled:!d,onClick:m,"data-testid":"gate-enter",className:"ring-1 ring-vida-gold-500/60 shadow-[0_0_22px_-2px_rgba(201,169,97,0.65),0_10px_26px_-8px_rgba(201,169,97,0.55)] hover:shadow-[0_0_34px_0_rgba(201,169,97,0.9),0_12px_30px_-8px_rgba(201,169,97,0.6)]",children:"Enter site"})}),s.jsxs("p",{className:"mt-5 text-center text-[11px] leading-relaxed text-white/55",children:["For laboratory research use only. Not for human or veterinary use. Not a drug, food, supplement, or cosmetic. ",UM]}),s.jsxs("p",{className:"mt-2.5 text-center text-[11px] leading-relaxed text-white/55",children:["By entering, you acknowledge you have read and agree to our"," ",s.jsx("a",{href:"/legal/terms",target:"_blank",rel:"noopener noreferrer",className:"text-white/80 underline decoration-vida-gold-500/50 underline-offset-2 transition-colors hover:text-vida-gold-300 hover:decoration-vida-gold-300","data-testid":"gate-link-terms",children:"Terms of Service"})," ","and"," ",s.jsx("a",{href:"/legal/disclaimer",target:"_blank",rel:"noopener noreferrer",className:"text-white/80 underline decoration-vida-gold-500/50 underline-offset-2 transition-colors hover:text-vida-gold-300 hover:decoration-vida-gold-300","data-testid":"gate-link-disclaimer",children:"Research-Use & FDA Disclaimer"}),"."]})]})})})}function KM(e){const{data:t}=eQ({query:{queryKey:z_(),staleTime:6e4}});return(t??[]).find(o=>e==="modal"?o.showModal:o.showBanner)??null}function YM(e){return`vp-promo-banner-dismissed-${e}`}function Yx(e){if(typeof window>"u")return!1;try{return window.sessionStorage.getItem(YM(e))==="1"}catch{return!1}}function sse(e){try{window.sessionStorage.setItem(YM(e),"1")}catch{}}const cT={brand:"bg-vida-green-900 text-white",patriotic:"bg-[linear-gradient(90deg,#7a1420_0%,#0a3161_50%,#7a1420_100%)] text-white",minimal:"bg-neutral-900 text-white"},uT={brand:"bg-vida-gold-500/20 text-vida-gold-200 ring-1 ring-vida-gold-500/40",patriotic:"bg-white/20 text-white ring-1 ring-white/40",minimal:"bg-white/15 text-white ring-1 ring-white/30"};function ise(){const e=KM("banner"),[t,n]=h.useState(()=>e?Yx(e.id):!1);if(h.useEffect(()=>{n(e?Yx(e.id):!1)},[e?.id]),!e||t||Yx(e.id))return null;const r=cT[e.theme]??cT.brand,o=uT[e.theme]??uT.brand,l=e.bannerText?.trim()||e.title,c=e.ctaLabel?.trim()||"Shop now",d=e.ctaHref?tM(e.ctaHref):null,m=d?d.startsWith("/")?s.jsxs(Ue,{href:d,className:"group inline-flex items-center gap-1 font-semibold underline-offset-2 hover:underline","data-testid":"promo-banner-cta",children:[c,s.jsx(rl,{className:"size-3 transition-transform group-hover:translate-x-0.5"})]}):s.jsxs("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:"group inline-flex items-center gap-1 font-semibold underline-offset-2 hover:underline","data-testid":"promo-banner-cta",children:[c,s.jsx(rl,{className:"size-3 transition-transform group-hover:translate-x-0.5"})]}):null;return s.jsxs("div",{role:"note","data-testid":"promo-banner",className:Y("relative px-9 py-[7px] text-center text-[11.5px] leading-[1.4] font-medium tracking-[0.01em]",r),children:[s.jsxs("span",{className:"inline-flex flex-wrap items-center justify-center gap-x-2 gap-y-0.5",children:[s.jsx("span",{children:l}),e.promoCode&&e.codeIsAutomatic===!0?s.jsx("span",{className:Y("rounded-pill px-2 py-0.5 text-[10.5px] tracking-wide",o),children:"no code needed"}):e.promoCode?s.jsx("span",{className:Y("rounded-pill px-2 py-0.5 font-mono text-[10.5px] tracking-wider",o),children:e.promoCode}):null,m]}),s.jsx("button",{type:"button","data-testid":"promo-banner-dismiss","aria-label":"Dismiss promotion for this session",onClick:()=>{sse(e.id),n(!0)},className:"absolute top-1/2 right-2 grid size-6 -translate-y-1/2 place-items-center rounded-pill text-white/70 hover:bg-white/10 hover:text-white focus-visible:ring-2 focus-visible:ring-white/60 focus-visible:outline-none",children:s.jsx(ro,{"aria-hidden":"true",className:"size-3.5"})})]})}const ose={popup_hero:{role:"popup_hero",label:"Popup hero (21:9)",width:1260,height:540,aspect:"21:9",fit:"cover",maxCandidates:4,maxHolding:12},vida_hero:{role:"vida_hero",label:"Vida File hero (16:10)",width:1600,height:1e3,aspect:"16:10",fit:"cover",maxCandidates:4,maxHolding:12},vida_card:{role:"vida_card",label:"Vida File card (16:9)",width:1600,height:900,aspect:"16:9",fit:"cover",maxCandidates:4,maxHolding:12},email_header:{role:"email_header",label:"Email header (3:1)",width:1200,height:400,aspect:"3:1",fit:"cover",maxCandidates:4,maxHolding:12},social_feed:{role:"social_feed",label:"Social feed (4:5)",width:1080,height:1350,aspect:"4
53:5",fit:"cover",maxCandidates:4,maxHolding:12},social_square:{role:"social_square",label:"Social square (1:1)",width:1080,height:1080,aspect:"1:1",fit:"cover",maxCandidates:4,maxHolding:12},social_story:{role:"social_story",label:"Social story (9:16)",width:1080,height:1920,aspect:"9:16",fit:"cover",maxCandidates:4,maxHolding:12},og_card:{role:"og_card",label:"Link preview card (40:21)",width:1200,height:630,aspect:"40:21",fit:"cover",maxCandidates:4,maxHolding:12}};function WM(e){const t=typeof e=="string"?ose[e]:e;return{aspectRatio:`${t.width} / ${t.height}`}}const lse="--vp-slot-aspect";function dT(e){return{[lse]:WM(e).aspectRatio}}const QM="pv-gate-ok",cse=1440*60*1e3,use=1200;function dse(){try{return localStorage.getItem(QM)==="1"}catch{return!0}}function XM(e){return`vp-promo-modal-${e}`}function ZM(e){return`vp-promo-modal-shown-${e}`}function fse(e){try{return window.sessionStorage.getItem(ZM(e))==="1"}catch{return!1}}function mse(e){if(fse(e.id))return!1;if(e.popupFrequencyDays<=0)return!0;let t=null;try{t=localStorage.getItem(XM(e.id))}catch{return!0}if(!t)return!0;const n=Number(t);return Number.isFinite(n)?Date.now()-n>=e.popupFrequencyDays*cse:!0}function JM(e){try{window.sessionStorage.setItem(ZM(e),"1")}catch{}}function fT(e){try{localStorage.setItem(XM(e),String(Date.now()))}catch{}JM(e)}const mT={brand:{overlay:"bg-vida-green-950/65",card:"vp-stage-gradient text-white ring-1 ring-vida-gold-500/80",body:"text-white/75",divider:!0},patriotic:{overlay:"bg-[#0a2547]/70",card:"bg-[linear-gradient(160deg,#0a3161_0%,#0a2547_58%,#5e1019_150%)] text-white ring-1 ring-white/25",body:"text-white/80",divider:!1},minimal:{overlay:"bg-black/50",card:"bg-card text-foreground ring-1 ring-border shadow-2xl",body:"text-muted-foreground",divider:!1}};function pse(e){return e.startsWith("/")}function hse(){const[e]=Hn(),t=e==="/",n=KM("modal"),[r,o]=h.useState(!1),[l,c]=h.useState(!1);h.useEffect(()=>{if(!t||!n)return;let A=!1,T;const E=()=>{window.removeEventListener("vp-consent-accepted",_),window.removeEventListener("storage",R)},j=()=>A?!0:dse()?(mse(n)&&(T=setTimeout(()=>{A||o(!0)},use)),!0):!1;function _(){j()&&E()}function R(P){P.key===QM&&_()}return j()||(window.addEventListener("vp-consent-accepted",_),window.addEventListener("storage",R)),()=>{A=!0,T&&clearTimeout(T),E()}},[t,n]);const d=Xw("promo-modal",r&&!!n),m=r&&!!n&&d;h.useEffect(()=>{m&&n&&JM(n.id)},[m,n]);const p=JI("promo-modal",n?String(n.id):null,m);if(!n||!m)return null;const y=mT[n.theme]??mT.brand,g=n.ctaLabel?.trim()||"Shop now",v=n.codeIsAutomatic===!0,b=(n.ctaHref?tM(n.ctaHref):null)??"/products",S=()=>{p("dismissed"),fT(n.id),o(!1)},C=()=>{p("accepted"),fT(n.id),o(!1)},N=async()=>{if(n.promoCode)try{await navigator.clipboard.writeText(n.promoCode),c(!0),setTimeout(()=>c(!1),1600)}catch{}};return s.jsx("div",{className:Y("fixed inset-0 z-[90] flex items-center justify-center overflow-y-auto px-4 py-8 backdrop-blur-md",y.overlay),role:"dialog","aria-modal":"true","aria-labelledby":"promo-modal-title","data-testid":"promo-modal",onClick:A=>{A.target===A.currentTarget&&S()},children:s.jsxs("div",{className:Y("relative w-full max-w-md overflow-hidden rounded-card shadow-[0_40px_90px_-24px_rgba(0,0,0,0.7)]",y.card),children:[y.divider&&s.jsx("div",{className:"vp-gold-divider absolute inset-x-0 top-0 z-10 opacity-90","aria-hidden":"true"}),s.jsx("button",{type:"button","data-testid":"promo-modal-dismiss","aria-label":"Dismiss promotion",onClick:S,className:"absolute top-2.5 right-2.5 z-20 grid size-8 place-items-center rounded-pill bg-black/25 text-white/80 backdrop-blur-sm hover:bg-black/40 hover:text-white focus-visible:ring-2 focus-visible:ring-white/60 focus-visible:outline-none",children:s.jsx(ro,{"aria-hidden":"true",className:"size-4"})}),n.imageUrl?s.jsx("div",{className:"w-full overflow-hidden",style:WM("popup_hero"),children:s.jsx("img",{src:n.imageUrl,alt:"",className:"h-full w-full object-cover",loading:"eager"})}):null,s.jsxs("div",{className:"p-6 text-center sm:p-7",children:[n.promoCode?s.jsx(zt,{variant:"research",className:"mb-3",children:"Limited time"}):null,s.jsx("h2",{id:"promo-modal-title",className:"font-display text-t2",children:n.title}),n.body?s.jsx("p",{className:Y("mt-2 text-sm leading-relaxed",y.body),children:n.body}):null,n.promoCode&&v?s.jsxs("p",{"data-testid":"promo-modal-automatic",className:"mt-4 inline-flex items-center gap-2 rounded-pill border border-dashed border-current/40 px-4 py-2 text-sm",children:[s.jsx(mn,{className:"size-3.5 text-vida-mint","aria-hidden":"true"}),s.jsx("span",{className:"font-semibold",children:"Applied automatically"}),s.jsx("span",{className:"opacity-70",children:"no code needed"})]}):n.promoCode?s.jsxs("button",{type:"button",onClick:N,"data-testid":"promo-modal-code",className:"mt-4 inline-flex items-center gap-2 rounded-pill border border-dashed border-current/40 px-4 py-2 font-mono text-sm tracking-wider transition-colors hover:border-current/70","aria-label":`Copy promo code ${n.promoCode}`,children:[s.jsx("span",{className:"opacity-70",children:"Code"}),s.jsx("span",{className:"font-semibold",children:n.promoCode}),l?s.jsx(mn,{className:"size-3.5 text-vida-mint","aria-hidden":"true"}):s.jsx(M2,{className:"size-3.5 opacity-70","aria-hidden":"true"})]}
53):null,s.jsx("div",{className:"mt-6",children:s.jsx(Le,{asChild:!0,block:!0,onClick:C,"data-testid":"promo-modal-cta",children:pse(b)?s.jsx(Ue,{href:b,children:g}):s.jsx("a",{href:b,target:"_blank",rel:"noopener noreferrer",children:g})})}),s.jsx("button",{type:"button",onClick:S,className:Y("mt-3 text-xs underline-offset-2 hover:underline",y.body),children:"Maybe later"})]})]})})}function gse({prize:e}){const t=e.expiresAt?new Date(e.expiresAt):null,n=t&&!Number.isNaN(t.getTime())?t.toLocaleDateString("en-US",{month:"short",day:"numeric"}):null;return s.jsxs("div",{className:"flex max-w-[34ch] flex-col items-center gap-3 text-center",children:[s.jsxs("p",{className:"text-[17px] font-extrabold leading-tight",style:{color:"var(--pg-ink)"},children:["You still have ",e.label," waiting."]}),s.jsx("p",{className:"text-sm",style:{color:"var(--pg-ink-muted)"},children:"One find at a time, so nothing sits in a pile going stale. Spend this one and the next dig is yours."}),e.code?s.jsx("span",{className:"rounded-lg px-3 py-1.5 font-mono text-sm font-bold tracking-wider",style:{color:"var(--pg-lining, #f0c868)",boxShadow:"inset 0 0 0 1px color-mix(in srgb, var(--pg-lining, #f0c868) 55%, transparent)"},children:e.code}):null,n?s.jsxs("p",{className:"text-xs",style:{color:"var(--pg-ink-muted)"},children:["Good until ",n]}):null,s.jsx(Le,{asChild:!0,variant:"primary",children:s.jsx(Ue,{href:"/products",children:"Use it"})})]})}const pT={out_of_stock:"Every last acorn has been dug up. Check back for the next one.",budget_exhausted:"This one is finished for now. Check back for the next one.",too_few_prizes:"This one is finished for now. Check back for the next one."};function yse(e,t,n,r,o){return e.includes("easter_egg")&&o?t?{kind:"ready",body:{entryMode:"easter_egg",productSlug:o}}:{kind:"needs-signin",because:"Sign in to open what you found."}:e.includes("campaign_token")&&r?{kind:"ready",body:{entryMode:"campaign_token",token:r}}:e.includes("post_order")&&n?t?{kind:"ready",body:{entryMode:"post_order",orderId:n}}:{kind:"needs-signin",because:"This one comes with your order."}:e.includes("member_daily")&&t?{kind:"ready",body:{entryMode:"member_daily"}}:e.includes("public_email")?{kind:"needs-email"}:e.includes("member_daily")?{kind:"needs-signin",because:"This one is for members."}:e.includes("post_order")?{kind:"needs-order"}:{kind:"unavailable"}}function xse({slug:e,onClose:t,footer:n}){const r=M0(),{isAuthenticated:o}=Bt(),[l,c]=h.useState(null),[d,m]=h.useState(null),[p,y]=h.useState(null),[g,v]=h.useState(!1),[b,S]=h.useState(!1),[C,N]=h.useState(null),[A,T]=h.useState(null),[E,j]=h.useState(""),_=h.useRef(!1),R=h.useRef(null),P=h.useRef(null),M=h.useMemo(()=>new URLSearchParams(r),[r]),q=Number(M.get("order"))||null,U=M.get("t"),V=M.get("found");h.useEffect(()=>{let I=!1;return(async()=>{try{const O=await fetch(`/api/games/${encodeURIComponent(e)}`);
53if(!O.ok){I||m(O.status===404?"We could not find that one.":O.status===429?"Too many tries from this connection. Give it a minute and reload.":"Something went wrong at our end. Try again in a moment.");return}const F=await O.json();I||c(F)}catch{I||m("We could not reach the burrow. Try again in a moment.")}})(),()=>{I=!0}},[e]);const $=h.useMemo(()=>yse(l?.entryModes??[],o,q,U,V),[l?.entryModes,o,q,U,V]),L=h.useCallback(async I=>{if(_.current||R.current)return R.current;_.current=!0,v(!0),N(null),T(null);try{const O=await fetch(`/api/games/${encodeURIComponent(e)}/plays`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(I)}),F=await O.json();if(!O.ok){const B=F?.heldPrize;return F?.reason==="prize_held"&&B?(T(B),null):(N(O.status===429?"Too many tries from this connection. Give it a minute and try again.":String(F?.error??"That did not work.")),null)}return R.current=F,y(F),F}catch{return N("We could not reach the burrow. Try again in a moment."),null}finally{_.current=!1,v(!1)}},[e]);if(h.useEffect(()=>{if(!l?.open||$.kind!=="ready")return;const I=`${e}:${JSON.stringify($.body)}`;P.current!==I&&(P.current=I,L($.body))},[l?.open,$,L,e]),d)return s.jsxs("div",{className:"mx-auto max-w-md p-6 text-center",children:[s.jsx("p",{className:"text-muted-foreground",children:d}),s.jsx(Ue,{href:"/",className:"mt-4 inline-block underline",children:"Back to the shop"})]});if(!l)return s.jsx("div",{className:"mx-auto min-h-[70vh] max-w-md animate-pulse","aria-hidden":"true"});const H=l.theme,Q=p?.tone==="small"?H.copy.smallWinLead:H.copy.winLead;return s.jsx(XP,{open:!0,onClose:t,label:l.title,footer:n,children:s.jsx(m6,{reserveStage:!!p||$.kind==="ready",vars:H.vars,greeting:H.copy.greeting,closedMessage:l.open?null:pT[l.closedBecause??""]??pT.out_of_stock,host:s.jsx("img",{src:"/media/vida-avatar.webp",alt:"Professor Vida",width:96,height:96,style:{borderRadius:"50%",display:"block",margin:"0 auto"}}),reveal:b&&p?s.jsx(p6,{headline:Q,prize:p.prize.label,instruction:p.needsClaim?"Sign in and it is yours.":p.prize.rewardType==="points"?"Added to your points balance.":p.prize.rewardType==="vida_credit"?"Your VidaCode is in your account, ready to redeem.":"It is already in your cart. You will see it applied at checkout.",code:p.code??p.vidaCode,expiry:p.expiresAt?`Use it by ${new Date(p.expiresAt).toLocaleDateString("en-US",{month:"short",day:"numeric",timeZone:"UTC"})}`:"",claimPrompt:p.needsClaim?s.jsx(Le,{asChild:!0,variant:"primary",children:s.jsx(Ue,{href:`/register?claim=${p.playId}`,children:"Claim it"})}):null,cta:p.needsClaim?null:s.jsx(Le,{asChild:!0,variant:"primary",children:s.jsx(Ue,{href:"/products",children:"Start shopping"})})}):null,children:A?s.jsx(gse,{prize:A}):C?s.jsxs("div",{className:"flex max-w-[32ch] flex-col items-center gap-4 text-center",children:[s.jsx("p",{className:"text-sm",style:{color:"var(--pg-ink-muted)"},children:C}),$.kind==="ready"?s.jsx(Le,{variant:"primary",disabled:g,onClick:()=>{L($.body)},children:g?"Diggingâ¦":"Try again"}):null]}):p||$.kind==="ready"?s.jsx(A8,{mechanic:l.mechanic,cover:{base:H.vars["--pg-cover-base"],speck:H.vars["--pg-cover-speck"],edge:H.vars["--pg-cover-edge"]},cue:H.copy.cue,palette:H.wheelPalette,boardSlots:l.slots,prizes:l.prizes,outcome:p?{prizeId:p.prize.id,short:p.prize.short,landingSlot:p.landingSlot,slots:p.slots,playSeed:p.playSeed}:null,onRevealed:()=>S(!0)}):$.kind==="needs-email"?s.jsxs("form",{className:"w-full max-w-[320px] text-center",onSubmit:I=>{I.preventDefault(),E.trim()&&L({entryMode:"public_email",email:E.trim()})},children:[s.jsx("label",{htmlFor:"pg-email",className:"block text-sm",style:{color:"var(--pg-ink-muted)"},children:"Where should we send it?"}),s.jsx("input",{id:"pg-email",type:"email",required:!0,autoComplete:"email",inputMode:"email",value:E,onChange:I=>j(I.target.value),placeholder:"[email protected]",className:"mt-2 w-full rounded-xl px-4 text-base",style:{minHeight:48,background:"var(--pg-panel)",color:"var(--pg-ink)",border:"1px solid color-mix(in srgb, var(--pg-lining) 45%, transparent)"}}),s.jsx("button",{type:"submit",disabled:g,className:"mt-3 w-full rounded-full text-base font-bold",style:{minHeight:48,border:0,background:"var(--pg-accent)",color:"var(--pg-on-accent)"},children:g?"One moment":"Let me at it"}),s.jsx("p",{className:"mt-2 text-xs",style:{color:"var(--pg-ink-muted)"},children:"One play per address. You will see what you won straight away."})]}):$.kind==="needs-signin"?s.jsxs("div",{className:"max-w-[32ch] text-center",children:[s.jsx("p",{className:"text-sm",style:{color:"var(--pg-ink-muted)"},children:$.because}),s.jsx(Le,{asChild:!0,variant:"primary",className:"mt-3",children:s.jsx(Ue,{href:`/login?next=${encodeURIComponent(`/play/${e}`)}`,children:"Sign in to play"})})]}):$.kind==="needs-order"?s.jsx("p",{className:"max-w-[32ch] text-center text-sm",style:{color:"var(--pg-ink-muted)"},children:"This one is played from an order. Open it from your order
53confirmation and it will be waiting."}):$.kind==="unavailable"?s.jsx("p",{className:"max-w-[32ch] text-center text-sm",style:{color:"var(--pg-ink-muted)"},children:"This one is not open to play right now."}):null})})}const hT=2500,vse=["/cart","/checkout","/play","/pay","/wallet-approval","/quote"],gT="vp.game.visitor",yT="vp.game.day",eD=e=>`vp.game.invite.${e}`,Wx="pv-gate-ok";function Ed(e){try{return localStorage.getItem(e)}catch{return null}}function Kb(e,t){try{localStorage.setItem(e,t)}catch{}}function bse(){const e=Ed(gT);if(e)return e;const t=typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`b${Math.random().toString(36).slice(2)}${Date.now().toString(36)}`;return Kb(gT,t),t}function wse(e,t){const n=Ed(eD(e));if(!n)return!1;const r=Number(n);return Number.isFinite(r)?Date.now()-r<Math.max(1,t)*864e5:!0}function Sse(){const[e]=Hn(),{isAuthenticated:t}=Bt(),[n,r]=h.useState(null),[o,l]=h.useState(!1),[c,d]=h.useState(!1),[m,p]=h.useState(!1),y=h.useRef(!1),g=h.useMemo(()=>vse.some(E=>e===E||e.startsWith(`${E}/`)),[e]),[v,b]=h.useState(()=>Ed(Wx)==="1");h.useEffect(()=>{if(v)return;const E=()=>b(Ed(Wx)==="1"),j=_=>{_.key===Wx&&E()};return window.addEventListener("vp-consent-accepted",E),window.addEventListener("storage",j),()=>{window.removeEventListener("vp-consent-accepted",E),window.removeEventListener("storage",j)}},[v]),h.useEffect(()=>{n||m||(y.current=!1)},[t,n,m]),h.useEffect(()=>{if(g||m||y.current||!v)return;let E=!1;const j=setTimeout(async()=>{y.current=!0;try{const _=t?"member_daily":"public_email",R=new URLSearchParams({entryMode:_,visitor:bse(),lastDay:Ed(yT)??""}),P=await fetch(`/api/games/current?${R.toString()}`);if(!P.ok)return;const M=await P.json();if(E||!M)return;M.dayKey&&Kb(yT,M.dayKey);const q=M.game;if(!q||wse(q.slug,q.frequencyDays))return;r(q)}catch{}},hT);return()=>{E=!0,clearTimeout(j)}},[g,m,t,v]),h.useEffect(()=>{if(!n||o||m)return;const E=setTimeout(()=>l(!0),Math.max(0,n.dwellMs-hT));return()=>clearTimeout(E)},[n,o,m]);const S=Xw("game-invite",!!n&&o&&!m&&!g);h.useEffect(()=>{S&&n&&Kb(eD(n.slug),String(Date.now()))},[S,n]);const C=!!n&&o&&!m&&!g&&S,N=C&&!c,A=JI("game-invite",n?.slug??null,N),T=h.useCallback(()=>{A("dismissed"),p(!0)},[A]);return!n||!C?null:c?s.jsx(xse,{slug:n.slug,onClose:()=>{d(!1),p(!0)}}):s.jsx(XP,{open:!0,onClose:T,label:n.title,footer:s.jsx("button",{type:"button",onClick:T,className:"text-caption text-[#9fbfae] underline underline-offset-2 hover:text-[#e8f2ec]",children:"Not now"}),children:s.jsxs("div",{className:"flex flex-col items-center gap-3 bg-[#0f2a1f] px-6 py-8 text-center",children:[s.jsx("img",{src:Y0[G2(n.object??"acorn")],alt:"",width:96,height:96,className:"h-24 w-24 rounded-2xl"}),s.jsx("p",{className:"text-[15px] leading-snug text-[#e8f2ec]",children:n.greeting}),n.teaser?s.jsx("p",{className:"text-[13px] font-bold tracking-tight text-[#f0c868]",children:n.teaser}):null,s.jsx("button",{type:"button",onClick:()=>{A("accepted"),d(!0)},className:"mt-1 min-h-11 w-full max-w-[15rem] rounded-full bg-[#f0c868] px-5 text-[15px] font-bold text-[#123024]",children:n.cta??"Have a dig"})]})})}const Cse=Fh,Nse=$h,tD=h.forwardRef(({className:e,...t},n)=>s.jsx(Bc,{className:Y("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));tD.displayName=Bc.displayName;const Ase=no("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),nD=h.forwardRef(({side:e="right",className:t,children:n,...r},o)=>s.jsxs(Nse,{children:[s.jsx(tD,{}),s.jsxs(Fc,{ref:o,className:Y(Ase({side:e}),t),...r,children:[s.jsxs(lf,{className:"absolute right-4 top-4 roun
53ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[s.jsx(ro,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"Close"})]}),n]})]}));nD.displayName=Fc.displayName;const rD=({className:e,...t})=>s.jsx("div",{className:Y("flex flex-col space-y-2 text-center sm:text-left",e),...t});rD.displayName="SheetHeader";const aD=h.forwardRef(({className:e,...t},n)=>s.jsx($c,{ref:n,className:Y("text-lg font-semibold text-foreground",e),...t}));aD.displayName=$c.displayName;const Ese=h.forwardRef(({className:e,...t},n)=>s.jsx(Hc,{ref:n,className:Y("text-sm text-muted-foreground",e),...t}));Ese.displayName=Hc.displayName;function Wh(e){switch(e.productType){case"compound":return{isCompound:!0,fallbackSubtitle:"Research compound",imageFallback:"vial",catalogNoun:"compound",backLabel:"All compounds",typeLabel:"Research compound",variantLabel:"Vial size",variantPlural:"vial sizes",selectionLabel:"Select size",rewardNoun:"vial"};case"diluent":return{isCompound:!1,fallbackSubtitle:"Diluent / solution",imageFallback:"package",catalogNoun:"product",backLabel:"All products",typeLabel:"Diluent / solution",variantLabel:"Bottle size",variantPlural:"bottle sizes",selectionLabel:"Select bottle size",rewardNoun:"product"};case"device":return{isCompound:!1,fallbackSubtitle:"Device",imageFallback:"package",catalogNoun:"product",backLabel:"All products",typeLabel:"Device",variantLabel:"Device option",variantPlural:"device options",selectionLabel:"Select option",rewardNoun:"product"};case"consumable":return{isCompound:!1,fallbackSubtitle:"Consumable",imageFallback:"package",catalogNoun:"product",backLabel:"All products",typeLabel:"Consumable",variantLabel:"Pack size",variantPlural:"pack sizes",selectionLabel:"Select pack size",rewardNoun:"product"};case"container":return{isCompound:!1,fallbackSubtitle:"Container / closure",imageFallback:"package",catalogNoun:"product",backLabel:"All products",typeLabel:"Container / closure",variantLabel:"Container option",variantPlural:"container options",selectionLabel:"Select option",rewardNoun:"product"};case"equipment":return{isCompound:!1,fallbackSubtitle:"Storage and custody equipment",imageFallback:"package",catalogNoun:"product",backLabel:"All products",typeLabel:"Storage and custody equipment",variantLabel:"Product option",variantPlural:"product options",selectionLabel:"Select option",rewardNoun:"product"};case"packaging":return{isCompound:!1,fallbackSubtitle:"Packaging",imageFallback:"package",catalogNoun:"product",backLabel:"All products",typeLabel:"Packaging",variantLabel:"Package option",variantPlural:"package options",selectionLabel:"Select option",rewardNoun:"product"};case"bundle":return{isCompound:!1,fallbackSubtitle:"Bundle",imageFallback:"package",catalogNoun:"product",backLabel:"All products",typeLabel:"Bundle",variantLabel:"Bundle option",variantPlural:"bundle options",selectionLabel:"Select option",rewardNoun:"product"};case"apparel":return{isCompound:!1,fallbackSubtitle:"Apparel",imageFallback:"package",catalogNoun:"product",backLabel:"All products",typeLabel:"Apparel",variantLabel:"Size",variantPlural:"sizes",selectionLabel:"Select size",rewardNoun:"product"};case"merch":return{isCompound:!1,fallbackSubtitle:"Merchandise",imageFallback:"package",catalogNoun:"product",backLabel:"All products",typeLabel:"Merchandise",variantLabel:"Product variant",variantPlural:"variants",selectionLabel:"Select variant",rewardNoun:"product"};default:return{isCompound:!1,fallbackSubtitle:"Product",imageFallback:"package",catalogNoun:"product",backLabel:"All products",typeLabel:"Product",variantLabel:"Product variant",variantPlural:"variants",selectionLabel:"Select variant",rewardNoun:"product"}}}function sD(e){return Wh(e).isCompound?"compounds":"gear"}function jse(e,t,n){const r=new Map(e.map(l=>[l.id,l])),o=new Set;for(const l of t){if(sD(l)!==n||l.categoryId==null)continue;let c=r.get(l.categoryId);const d=new Set;for(;c?.parentId!=null&&!d.has(c.id);)d.add(c.id),c=r.get(c.parentId);c&&c.parentId==null&&o.add(c.id)}return e.filter(l=>l.parentId==null&&o.has(l.id))}const Tse=[{key:"compounds",title:Zte,sub:Jte},{key:"gear",title:"Equipment & merchandise",sub:"Storage and custody equipment, apparel, and merchandise."}],kse=[{key:"compounds",title:"Compounds",sub:"Compound products available from VidaCare."},{key:"gear",title:"Products & supplies",sub:"Solutions, devices, consumables, containers, equipment, and other products."}];function Rse(e){return e==="vidacare"?kse:Tse}function xT({categories:e,active:t,onSelect:n,className:r,markedSlug:o}){const l=[{slug:"",name:"All"},...e];return s.jsx("div",{role:"group","aria-label":"Filter by category","data-testid":"filter-categories",className:Y("flex gap-2 overflow-x-auto py-1.5 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden","sm:flex-wrap sm:overflow-visible",r),children:l.map(c=>{const d=t===c.slug,m=!!o&&c.slug===o;return s.jsxs("button",{type:"button","aria-pressed":d,"data-testid":`pill-cat-${c.slug||"all"}`,onClick:()=>n(c.slug),className:Y("relative shrink-0 whitespace-nowrap rounded-pill border px-4 py-2 text-sm font-semibold","motion-safe:transition-colors",d?"border-primary bg-primary text-primary-foreground shadow-md":"border-card-border bg-card text-ink-2 hover:bg-muted hover:text-ink",m&&!d&&"border-gold/60"),children:[c.name,m?s.jsxs(s.Fragment,{children:[s.jsx("span",{"aria-hidden":"true","data-testid":`pill-cat-marked-${c.slug||"all"}`,className:"absolute top-1 right-1 size-1.5 rounded-full bg-gold motion-safe:animate-pulse"}),s.jsx("span",{className:"sr-only",children:" (a hidden acorn is somewhere in here)"})]}):null]},c.slug||"all")})})}function Pse({groups:e,active:t,onSelect:n,className:r}){const o=e.filter(l=>l.key===""||l.count>0);return s.jsx("div",{role:"group","aria-label":"Filter by catalog group","data-testid":"filter-shop-groups",className:Y("flex gap-2 overflow-x-auto py-1.5 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden","sm:flex-wrap sm:overflow-visible",r),children:o.map(l
53=>{const c=t===l.key;return s.jsxs("button",{type:"button","aria-pressed":c,"data-testid":`tab-group-${l.key||"all"}`,onClick:()=>n(l.key),className:Y("inline-flex shrink-0 items-center gap-2 whitespace-nowrap rounded-pill border px-4.5 py-2 text-sm font-semibold","motion-safe:transition-colors",c?"border-primary bg-primary text-primary-foreground shadow-md ring-1 ring-vida-gold-500/30":"border-card-border bg-card text-ink-2 hover:bg-muted hover:text-ink"),children:[l.name,s.jsx("span",{className:Y("inline-flex min-w-5 items-center justify-center rounded-pill px-1.5 text-overline tabular-nums",c?"bg-white/20 text-primary-foreground":"bg-ink/[0.06] text-ink-3 dark:bg-white/10 dark:text-white/70"),children:l.count})]},l.key||"all")})})}const Ose=[{key:"catalog",label:"Catalog",to:"/products"},{key:"requests",label:"Requests",to:"/requested"}];function _se({active:e,className:t}){return s.jsx("nav",{"aria-label":"Shop sections","data-testid":"shop-tabs",className:Y("grid max-w-sm grid-cols-2 gap-1 rounded-pill bg-muted p-1",t),children:Ose.map(n=>{const r=n.key===e;return s.jsx(Ue,{to:n.to,"aria-current":r?"page":void 0,"data-testid":`shop-tab-${n.key}`,className:Y("rounded-pill px-4 py-2 text-center text-sm font-semibold motion-safe:transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",r?"bg-card text-ink shadow-sm":"text-ink-3 hover:text-ink"),children:n.label},n.key)})})}const Ise=[{value:ma.name_asc,label:"Name AâZ"},{value:ma.price_asc,label:"Price: Low to High"},{value:ma.price_desc,label:"Price: High to Low"},{value:ma.newest,label:"Newest"}];function Mse({availableOnly:e,setAvailableOnly:t,availableCount:n,categories:r,categorySlug:o,setCategorySlug:l,sort:c,setSort:d,shownCount:m,className:p}){const y=(e?1:0)+(o?1:0),g=[{slug:"",name:"All"},...r];return s.jsxs(Gh,{children:[s.jsx(yM,{asChild:!0,children:s.jsxs("button",{type:"button","data-testid":"shop-filters-trigger",className:Y("inline-flex h-11 shrink-0 items-center gap-2 rounded-pill border border-[var(--vp-hairline)] bg-card px-4 text-sm font-semibold text-ink-2 motion-safe:transition-colors hover:bg-muted hover:text-ink",y>0&&"border-primary text-ink",p),children:[s.jsx(Jq,{className:"size-4"}),"Filters",y>0&&s.jsx("span",{className:"inline-flex min-w-5 items-center justify-center rounded-pill bg-primary px-1.5 text-overline font-bold tabular-nums text-primary-foreground",children:y})]})}),s.jsx(Kh,{className:"vp-glass-strong rounded-t-card border-x-0 border-b-0 pb-[max(20px,env(safe-area-inset-bottom))]",children:s.jsxs("div",{className:"max-h-[85vh] space-y-4 overflow-y-auto px-5 pt-2 pb-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(Yh,{className:"font-display text-t3 font-semibold text-ink",children:"Filters"}),s.jsx("button",{type:"button",onClick:()=>{t(!1),l(""),d(ma.name_asc)},className:"text-caption font-semibold text-ink-3 motion-safe:transition-colors hover:text-ink disabled:opacity-40",disabled:y===0&&c===ma.name_asc,children:"Clear all"})]}),s.jsxs("button",{type:"button","aria-pressed":e,onClick:()=>t(!e),"data-testid":"sheet-filter-available",className:Y("flex w-full items-center justify-between rounded-card border p-3.5 text-left motion-safe:transition-colors",e?"border-primary bg-primary/5":"border-card-border bg-card hover:bg-muted"),children:[s.jsxs("span",{className:"flex items-center gap-2.5 text-sm font-semibold text-ink",children:[s.jsx(z0,{className:"size-4.5 text-primary"}),"In stock only",s.jsxs("span",{className:"text-caption font-normal text-ink-3 tabular-nums",children:[n," available"]})]}),s.jsx("span",{className:Y("relative h-6 w-10 shrink-0 rounded-pill motion-safe:transition-colors",e?"bg-primary":"bg-ink/15 dark:bg-white/20"),children:s.jsx("span",{className:Y("absolute top-0.5 size-5 rounded-full bg-white shadow-sm motion-safe:transition-all",e?"left-[1.125rem]":"left-0.5")})})]}),r.length>0&&s.jsxs("div",{children:[s.jsx("p",{className:"mb-2.5 text-caption font-semibold text-ink-3 uppercase tracking-wide",children:"Category"}),s.jsx("div",{className:"-mx-5 overflow-x-auto px-5 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:s.jsx("div",{className:"flex w-max gap-2",children:g.map(v=>{const b=o===v.slug;return s.jsxs("button",{type:"button","aria-pressed":b,onClick:()=>l(v.slug),className:Y("inline-flex shrink-0 items-center gap-1.5 whitespace-nowrap rounded-pill border px-3.5 py-2 text-sm font-semibold motion-safe:transition-colors",b?"border-primary bg-primary text-primary-foreground":"border-card-border bg-card text-ink-2 hover:bg-muted hover:text-ink"),children:[v.name,b&&s.jsx(mn,{className:"size-3.5"})]},v.slug||"all")})})})]}),s.jsxs("div",{children:[s.jsx("p",{className:"mb-2.5 text-caption font-semibold text-ink-3 uppercase tracking-wide",children:"Sort by"}),s.jsx("div",{className:"grid grid-cols-2 gap-2",children:Ise.map(v=>{const b=c===v.value;return s.jsxs("button",{type:"button","aria-pressed":b,onClick:()=>d(v.value),className:Y("flex items-center justify-between gap-1.5 rounded-card border px-3.5 py-2.5 text-left text-sm font-semibold motion-safe:transition-colors",b?"border-primary bg-primary/5 text-ink":"border-card-border bg-card text-ink-2 hover:bg-muted hover:text-ink"),children:[s.jsx("span",{className:"min-w-0 truncate",children:v.label}),b&&s.jsx(mn,{className:"size-4 shrink-0 text-primary"})]},v.value)})})]}),s.jsx(_ne,{asChild:!0,children:s.jsxs("button",{type:"button",className:"w-full rounded-pill bg-primary py-3 text-sm font-bold text-primary-foreground shadow-md motion-safe:transition-transform active:scale-[0.99]",children:["Show ",m," item",m!==1?"s":""]})})]})})]})}const Dse=new Set(["3x","4x","7x","8x"]);function Yb({tier:e,result:t,className:n}){if(t==="fail")return null;const r=e&&Dse.has(e.toLowerCase())?e.toUpperCase():null;return r?s.jsxs(zt,{variant:"gold",className:Y("gap-1 bg-card/90 px-2.5 py-0.5 backdrop-blur-sm",n),title:`${r} third-party COA, verified`,children:[s.jsx(D2,{className:"size-3.5","aria-hidden":"true"}),s.jsx("span",{children:"COA"}),s.jsx("span",{className:"font-mono tracking-tight",children:r})]}):null}function Lse(e){const t=e.testTier?e.testTier.toUpperCase():null;return e.coaResult==="fail"?{label:"FAIL",tone:"fail"}:e.thirdPartyHasCoa?{label:e.coaResult==="pass"&&t?`${t} PASS`:t??"3rd-party COA",tone:"gold"}:e.coaStatus==="waived"?{label:"Not third-party tested",tone:"secondary"}:e.supplierHasCoa?{label:"Supplier COA",tone:"secondary"}:{label:"Testing pending",tone:"muted"}}function qse(e){const t=Lse(e);return{label:t.label,gold:t.tone==="gold"}}function Use(e){const[t,n]=e.split("-").map(Number);return!t||!n?e:new Date(t,n-1,1).toLocaleDateString("en-US",{month:"short",year:"numeric"})}function zse({lots:e}){const[t,n]=h.useState(!1);return s.jsxs("div",{className:"mt-3 rounded-2xl bg-card/70 ring-1 ring-ink/10",children:[s.jsxs("button",{type:"button",onClick:()=>n(r=>!r),"aria-expanded":t,"data-testid":"button-past-lots-toggle",className:"flex min-h-11 w-full items-center justify-between gap-3 px-3.5 py-2.5 text-left",children:[s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(tU,{className:"size-4 text-ink-3","aria-hidden":"true"}),s.jsxs("span",{className:"text-sm font-semibold text-ink",children:["Past lots (",e.length,")"]})]}),s.jsx(dl,{className:Y("size-4 text-ink-3 transition-transform",t&&"rotate-180"),"aria-hidden":"true"})]}),t&&s.jsx("ul",{className:"space-y-1.5 px-3.5 pb-3",children:e.map(r=>{const o=qse(r);return s.jsx("li",{children:s.jsxs(Ue,{href:`/coa/${encodeURIComponent(r.batchNumber)}`,"data-testid":"link-past-lot",className:"flex min-h-11 items-center justify-between gap-2 rounded-xl bg-ink/[0.03] px-3 py-2 transition-colors hover:bg-ink/[0.06]",children:[s.jsxs("span",{className:"min-w-0",children:[s.jsx("span",{className:"block truncate font-mono text-caption font-semibold tabular-nums text-ink",children:r.batchNumber}),s.jsxs("span",{className:"text-[11px] text-ink-3",children:["Received ",Use(r.receivedOn)]})]}),s.jsxs("span",{className:"flex shrink-0 items-center gap-1.5",children:[s.jsx(zt,{variant:o.gold?"gold":"neutral",className:"text-[10px]",children:o.label}),s.jsx(ao,{className:"size-3.5 text-ink-3","aria-hidden":"true"})]})]})},r.batchNumber)})})]})}function Vse({batchNumber:e,coaHref:t,coaFileName:n,lots:r,className:o}){const l=(r??[]).filter(c=>!c.inStock);return s.jsxs(Ut,{goldLining:!0,className:o,"data-testid":"card-coa-explainer",children:[s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:"flex size-10 shrink-0 items-center justify-center rounded-2xl bg-vida-mint-soft text-vida-green-700",children:s.jsx(L2,{className:"size-5"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-display text-t3 text-ink",children:"Verified, every lot"}),s.jsx("p",{className:"text-caption text-ink-3",children:"Scan the vial label to confirm this batch."})]})]}),t?s.jsxs(zt,{variant:"gold",className:"shrink-0",children:[s.jsx(Ic,{className:"size-3","aria-hidden":"true"})," Third-party verified"]}):s.jsx(zt,{variant:"neutral",className:"shrink-0",children:"COA issued per lot"})]}),s.jsx("ol",{className:"mt-4 space-y-2.5",children:[["1","Every vial label carries a QR code unique to its production lot."],["2","Scanning opens this batch's Certificate of Analysis: the supplier COA now, plus our independent third-party COA when it returns."],["3",Hte]].map(([c,d])=>s.jsxs("li",{className:"flex gap-3 text-caption leading-relaxed text-ink-2",children:[s.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center rounded-pill bg-ink/[0.05] font-mono text-[11px] font-bold text-primary",children:c}),d]},c))}),e&&s.jsxs("div",{className:"mt-4 flex items-center justify-between gap-3 rounded-2xl bg-card/70 px-3.5 py-2.5 ring-1 ring-ink/10",children:[s.jsxs("span",{className:"flex flex-col leading-none",children:[s.jsx("span",{className:"text-[10.5px] font-semibold uppercase tracking-[0.08em] text-ink-3",children:"Current batch"}),s.jsx("span",{className:"mt-1 font-mono text-caption font-semibold tabular-nums text-ink",children:e})]}),s.jsxs(Ue,{href:`/coa/${encodeURIComponent(e)}
53`,"data-testid":"link-verify-batch",className:"inline-flex items-center gap-1.5 text-sm font-semibold text-primary hover:text-primary",children:[s.jsx(eU,{className:"size-4","aria-hidden":"true"})," Verify batch"]})]}),t&&s.jsxs("a",{href:t,target:"_blank",rel:"noopener noreferrer","data-testid":"link-coa-download",className:"mt-3 inline-flex items-center gap-1.5 text-sm font-semibold text-primary hover:text-primary",children:[s.jsx(Md,{className:"size-4","aria-hidden":"true"}),n??"Download lot certificate",s.jsx(ao,{className:"size-3.5 text-ink-3","aria-hidden":"true"})]}),l.length>0&&s.jsx(zse,{lots:l})]})}const yS=h.forwardRef(({className:e,detail:t=!1,...n},r)=>s.jsx("div",{ref:r,className:Y("flex items-center justify-center [background:radial-gradient(90%_80%_at_50%_20%,#ffffff_0%,var(--vp-mint-soft)_100%)]",t?"rounded-[30px] border border-[var(--vp-hairline)] px-4 pt-12 pb-14":"border-b border-[var(--vp-hairline)] pt-7 pb-9",e),...n}));yS.displayName="ProductArtWell";const vT={sale:"bg-card text-danger shadow-sm ring-1 ring-danger/40",bogo:"bg-card text-vida-gold-700 shadow-sm ring-1 ring-vida-gold-500/60 dark:text-vida-gold-300 dark:ring-vida-gold-300/50",new:"bg-vida-mint-soft text-vida-green-800 dark:bg-vida-green-700 dark:text-vida-mint",custom:"bg-card text-ink-2 shadow-sm ring-1 ring-ink/10 dark:text-white/80 dark:ring-white/15"};function xS({badge:e,className:t}){return s.jsx("span",{"data-testid":`badge-${e.variant}-${e.id}`,className:Y("inline-flex items-center rounded-pill px-2.5 py-0.5 text-overline font-bold tracking-[0.06em] uppercase",vT[e.variant]??vT.custom,t),children:e.label})}function Ac({value:e,onChange:t,min:n=1,max:r,size:o="default",className:l,valueTestId:c,decreaseTestId:d,increaseTestId:m,itemLabel:p}){const y=Y("flex items-center justify-center rounded-pill text-ink-2 motion-safe:transition-colors hover:bg-ink/10 active:scale-95 disabled:opacity-35 disabled:pointer-events-none",o==="sm"?"size-8":"size-10");return s.jsxs("div",{className:Y("inline-flex items-center gap-0.5 rounded-pill bg-card shadow-xs ring-1 ring-ink/10",o==="sm"?"p-0.5":"p-1",l),children:[s.jsx("button",{type:"button","aria-label":p?`Remove one ${p}`:"Decrease quantity","data-testid":d,className:y,disabled:e<=n,onClick:()=>t(Math.max(n,e-1)),children:s.jsx(nU,{className:o==="sm"?"size-3.5":"size-4"})}),s.jsx("span",{"data-testid":c,className:Y("min-w-7 text-center font-mono font-semibold tabular-nums text-ink",o==="sm"?"text-sm":"text-body"),children:e}),s.jsx("button",{type:"button","aria-label":p?`Add one ${p}`:"Increase quantity","data-testid":m,className:y,disabled:r!==void 0&&e>=r,onClick:()=>t(r!==void 0?Math.min(r,e+1):e+1),children:s.jsx($0,{className:o==="sm"?"size-3.5":"size-4"})})]})}function iD({className:e,bare:t=!1}){return t?s.jsx("p",{"data-testid":"text-ruo-note",className:Y("text-caption leading-relaxed text-ink-2",e),children:Mj}):s.jsx("div",{role:"note","data-testid":"text-ruo-note",className:Y("rounded-2xl border border-amber/20 bg-amber-tint px-4 py-3",e),children:s.jsxs("p",{className:"text-caption leading-relaxed text-amber",children:[s.jsx("span",{className:"font-semibold",children:zte})," ",Mj]})})}const oD=h.createContext("vidapeps");function hwe({brand:e,children:t}){return s.jsx(oD.Provider,{value:e,children:t})}function Gc(){return h.useContext(oD)}function Kc(){const e=Gc();return e==="vidapeps"?void 0:e}const Bse="VidaPeps";function Fse(e){return e==="vidacare"?"VidaCare":Bse}function $se(){return s.jsx("svg",{viewBox:"0 0 24 24",className:"size-4 fill-current","aria-hidden":"true",focusable:"false",children:s.jsx("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})})}function Hse({productName:e,url:t,className:n}){const{toast:r}=Nr(),[o,l]=h.useState(!1),c=Fse(Gc()),d=t??(typeof window<"u"?window.location.href:""),m=`${e} on ${c}`,p=typeof navigator<"u"&&typeof navigator.share=="function",y=async()=>{try{await navigator.share({title:m,text:m,url:d})}catch{}},g=async()=>{try{await navigator.clipboard.writeText(d),l(!0),r({title:"Link copied",description:"Share it anywhere you like."}),window.setTimeout(()=>l(!1),2e3)}catch{r({title:"Couldn't copy the link",variant:"destructive"})}},v=`https://twitter.com/intent/tweet?url=${encodeURIComponent(d)}&text=${encodeURIComponent(m)}`,b=`https://t.me/share/url?url=${encodeURIComponent(d)}&text=${encodeURIComponent(m)}`;return p?s.jsxs(Le,{type:"button",variant:"ghost",size:"sm",onClick:y,className:n,"aria-label":`Share ${e}`,"data-testid":"button-share",children:[s.jsx(GA,{className:"size-4","aria-hidden":"true"}),"Share"]}):s.jsxs(Nw,{children:[s.jsx(Aw,{asChild:!0,children:s.jsxs(Le,{type:"button",variant:"ghost",size:"sm",className:n,"aria-label":`Share ${e}`,"data-testid":"button-share",children:[s.jsx(GA,{className:"size-4","aria-hidden":"true"}),"Share"]})}),s.jsxs(_h,{align:"end",className:"w-48",children:[s.jsxs(fa,{onSelect:g,children:[o?s.jsx(mn,{className:"size-4 text-primary","aria-hidden":"true"}):s.jsx(rU,{className:"size-4","aria-hidden":"true"}),o?"Copied":"Copy link"]}),s.jsx(fa,{asChild:!0,children:s.jsxs("a",{href:v,target:"_blank",rel:"noopener noreferrer",children:[s.jsx($se,{}
53),"Share on X"]})}),s.jsx(fa,{asChild:!0,children:s.jsxs("a",{href:b,target:"_blank",rel:"noopener noreferrer",children:[s.jsx(q2,{className:"size-4","aria-hidden":"true"}),"Share on Telegram"]})})]})]})}const jd="grid gap-3 [grid-template-columns:repeat(2,minmax(0,1fr))] sm:gap-4 sm:[grid-template-columns:repeat(auto-fill,minmax(250px,1fr))]",lD=()=>_e({mutationFn:e=>lK(e)}),gwe=e=>uK({q:e}),cD={getProduct:{staleTimeMs:3e4},getPublicBulkQuote:{staleTimeMs:0,gcTimeMs:0}};function Gse(e,t){return t}const uD=cD.getProduct.staleTimeMs;function dD(e){return e?{brand:e}:void 0}function Kse(e,t){const n=dD(t);return YG(e,n,{query:{queryKey:qh(e,n),staleTime:uD}})}function Yse(e,t){const n=dD(t);return WG(e,n,{query:{queryKey:qh(e,n),staleTime:uD}})}function Wse(e,t,n,r){return Gse(cD.getProduct,n)?e.prefetchQuery(Kse(t,r)):Promise.resolve()}function fD(e){const t=Mr(),{isAuthenticated:n}=Bt(),r=Kc();return h.useCallback(()=>{Wse(t,e,n,r)},[r,n,t,e])}const pp=h.forwardRef(({className:e,label:t,value:n,...r},o)=>s.jsxs("span",{ref:o,className:Y("inline-flex items-center gap-1.5 rounded-pill bg-ink/[0.045] px-2.5 py-1",e),...r,children:[s.jsx("span",{className:"text-[10.5px] font-semibold uppercase tracking-[0.07em] text-ink-3",children:t}),s.jsx("span",{className:"font-mono text-[11.5px] font-semibold tabular-nums text-ink",children:n})]}));pp.displayName="SpecChip";function Wb({product:e,cas:t}){const[,n]=Hn(),r=Kc(),[o,l]=h.useState(!1),c=`/products/${e.slug}`,d=fD(e.slug),m=lD(),{toast:p}=Nr(),y=`vp_restock_${e.slug}`,[g,v]=h.useState(!1),[b,S]=h.useState(!1);h.useEffect(()=>{try{v(localStorage.getItem(y)==="1")}catch{}},[y]);const C=async()=>{if(!(g||b)){S(!0);try{const H=await _w(e.slug,r?{brand:r}:void 0),Q=(H.variants??[]).find(I=>I.stockQuantity===0)??H.variants?.[0];if(!Q){n(c);return}await m.mutateAsync({variantId:Q.id});try{localStorage.setItem(y,"1")}catch{}v(!0),p({title:"You're on the list",description:`We'll alert you the moment ${e.name} is back in stock.`})}catch{p({title:"Couldn't set the alert",description:"Please try again from the product page.",variant:"destructive"}),n(c)}finally{S(!1)}}},N=OM(e.manufacturer),A=_M({name:e.name,manufacturer:e.manufacturer}),T=hh(e.slug,e.name),E=e.descriptor,j=Wh(e),_=j.isCompound,R=e.minPriceCents??e.priceCents,P=e.maxPriceCents??e.priceCents,M=R!=null&&P!=null,q=e.variantCount>0&&M,U=q&&e.stockQuantity===0,V=!q,$=!U&&e.stockQuantity<=10,L=M&&R!==P;return s.jsxs(Ut,{unpadded:!0,tone:"solid","data-testid":`card-product-${e.id}`,className:"group @container/card flex h-full flex-col overflow-hidden ring-1 ring-vida-gold-500/45 motion-safe:transition-[transform,box-shadow] motion-safe:duration-300 motion-safe:[transition-timing-function:cubic-bezier(0.22,1,0.36,1)] hover:-translate-y-0.5 hover:shadow-lg hover:ring-vida-gold-500/70",children:[s.jsxs(Ue,{href:c,className:"block flex-1 text-left",onPointerEnter:d,onFocus:d,children:[s.jsxs(yS,{className:"relative aspect-square overflow-hidden",children:[e.primaryImage?.url&&!o?s.jsx("img",{src:e.primaryImage.url,srcSet:e.primaryImage.derivatives?.length?e.primaryImage.derivatives.map(H=>`${H.url} ${H.width}w`).join(", "):void 0,sizes:"(min-width: 40rem) 250px, 50vw",alt:e.name,loading:"lazy",width:e.primaryImage.width??void 0,height:e.primaryImage.height??void 0,onError:()=>l(!0),className:"absolute inset-0 size-full object-cover object-center"}):_?s.jsx(Nc,{cap:T,label:e.name,size:74,withShadow:!1,className:"motion-safe:transition-transform motion-safe:duration-300 group-hover:scale-[1.04]"}):s.jsx(Zi,{className:"size-16 text-vida-green-700 motion-safe:transition-transform motion-safe:duration-300 group-hover:scale-[1.04]","aria-label":`${j.fallbackSubtitle} image unavailable`}),s.jsxs("div",{className:"absolute top-1.5 left-1.5 flex max-w-[72%] flex-wrap gap-1 @min-[13rem]/card:top-3 @min-[13rem]/card:left-3 @min-[13rem]/card:gap-1.5",children:[(e.badges??[]).map(H=>s.jsx(xS,{badge:H},H.id)),e.isFeatured&&s.jsx(zt,{variant:"mint",children:"Featured"})]}),V?s.jsx(zt,{variant:"neutral",className:"absolute top-1.5 right-1.5 bg-card/90 text-ink ring-1 ring-card-border backdrop-blur-sm @min-[13rem]/card:top-3 @min-[13rem]/card:right-3",children:"Not available"}):U?s.jsx(zt,{variant:"neutral",className:"absolute top-1.5 right-1.5 bg-card/90 text-ink ring-1 ring-card-border backdrop-blur-sm @min-[13rem]/card:top-3 @min-[13rem]/card:right-3",children:"Out of stock"}):$&&s.jsx(zt,{variant:"research",className:"absolute top-1.5 right-1.5 @min-[13rem]/card:top-3 @min-[13rem]/card:right-3",children:"Low stock"}),_&&s.jsx(Yb,{tier:e.coaTestTier,className:"absolute right-1.5 bottom-1.5 @min-[13rem]/card:right-3 @min-[13rem]/card:bottom-3"})]}),s.jsxs("div",{className:"px-3 pt-3 pb-1 @min-[13rem]/card:px-4.5 @min-[13rem]/card:pt-4 @min-[13rem]/card:pb-1.5",children:[s.jsxs("div",{className:"flex flex-col items-start gap-0.5 @min-[13rem]/card:flex-row @min-[13rem]/card:items-baseline @min-[13rem]/card:justify-between @min-[13rem]/card:gap-2",children:[s.jsx("h3",{className:"font-display text-[13px] leading-tight font-semibold tracking-[-0.015em] text-ink @min-[13rem]/card:text-[17px] @min-[13rem]/card:leading-normal",children:A}),M?s.jsx(Zw,{size:"sm",price:R/100,compareAt:void 0,suffix:L?"+":void 0,"data-testid":`text-price-${e.id}`,className:"shrink-0 [&>span]:text-vida-gold-700 dark:[&>span]:text-vida-gold-300"}):s.jsx("span",{className:"shrink-0 text-[11px] font-semibold text-ink-3",children:"Price unavailable"})]}),s.jsxs("p",{className:"mt-0.5 line-clamp-2 text-[11px] leading-snug text-ink-3 @min-[13rem]/card:mt-1 @min-[13rem]/card:line-clamp-none @min-[13rem]/card:text-caption",children:[N?`by ${N}
53 · `:"",_?E??e.categoryName??j.fallbackSubtitle:j.fallbackSubtitle,e.variantCount>1?` · ${e.variantCount} ${j.variantPlural}`:""]}),_&&s.jsxs("div",{className:"mt-2.5 hidden flex-wrap gap-1.5 @min-[13rem]/card:flex",children:[s.jsx(pp,{label:"QC",value:"Lot COA"}),t?s.jsx(pp,{label:"CAS",value:t}):s.jsx(pp,{label:"COA",value:"Every lot"})]})]})]}),s.jsxs("div",{className:"flex gap-2 px-3 pt-2 pb-3 @min-[13rem]/card:px-4.5 @min-[13rem]/card:pt-2.5 @min-[13rem]/card:pb-4.5",children:[V?s.jsx(Le,{size:"sm",variant:"ghost",className:"flex-1","data-testid":`button-unavailable-${e.id}`,disabled:!0,children:"Unavailable"}):U?s.jsxs(Le,{size:"sm",variant:g?"ghost":"glassLight",className:"flex-1","data-testid":`button-notify-${e.id}`,disabled:b,"aria-pressed":g,onClick:g?void 0:C,children:[s.jsx(Qs,{className:Y("size-4",g&&"fill-current")}),g?"Notified":b?"Settingâ¦":"Notify me"]}):s.jsxs(Le,{size:"sm",className:"flex-1","data-testid":`button-addcart-${e.id}`,onClick:()=>n(c),onPointerEnter:d,onFocus:d,children:[s.jsx("span",{className:"@min-[13rem]/card:hidden",children:"View"}),s.jsx("span",{className:"hidden @min-[13rem]/card:inline",children:e.variantCount>1?j.selectionLabel:"View product"})]}),s.jsx(Le,{size:"icon",variant:"ghost","aria-label":`View ${A}`,className:"hidden size-11 shrink-0 @min-[13rem]/card:inline-flex",onClick:()=>n(c),onPointerEnter:d,onFocus:d,children:s.jsx(ul,{className:"size-4"})})]})]})}function mD({name:e,totalCents:t,qty:n,onAdd:r,disabled:o=!1,adding:l=!1,justAdded:c=!1,disabledLabel:d="Out of stock"}){return s.jsx("div",{className:"fixed inset-x-0 bottom-[calc(var(--vp-tabbar-h)+env(safe-area-inset-bottom))] z-40 px-3 pb-2 md:hidden","data-testid":"bar-sticky-addtocart",children:s.jsxs("div",{className:"vp-glass-strong mx-auto flex max-w-xl items-center gap-3 rounded-card p-3",children:[s.jsxs("div",{className:"min-w-0 flex-1 pl-1.5",children:[s.jsxs("p",{className:"truncate text-[12px] font-semibold text-ink-3",children:[e,n>1?` à ${n}`:""]}),s.jsxs("p",{className:"font-display text-t3 font-bold tabular-nums text-ink",children:["$",(t/100).toFixed(2)]})]}),s.jsxs(Le,{onClick:r,disabled:o||l,className:"shrink-0","data-testid":"button-sticky-addtocart",children:[c?s.jsx(mn,{className:"size-4","aria-hidden":"true"}):s.jsx(nl,{className:"size-4","aria-hidden":"true"}),o?d:c?"Added":l?"Addingâ¦":"Add to cart"]})]})})}const vS=LX,bS=qX;function Qse(){try{return sessionStorage.getItem(vS)}catch{return null}}function pD(e){try{sessionStorage.setItem(vS,e),sessionStorage.removeItem(bS)}catch{}}function hD(e){try{sessionStorage.setItem(bS,e.toUpperCase())}catch{}}function Xse(){try{return sessionStorage.getItem(bS)}catch{return null}}function Td(){try{sessionStorage.removeItem(vS)}catch{}}function ywe(e){pD(e.trim().toUpperCase())}const Zse={invalid_code:"That code isn't valid. Check the spelling and try again.",not_started:"This code isn't active yet.",expired:"This code has expired.",min_order_not_met:"Your order doesn't meet this code's minimum yet.",limit_reached:"This code has reached its redemption limit.",already_used:"You've already used this code.",new_customers_only:"This code is for first orders only.",not_for_cart_items:"This code doesn't apply to the items in your cart.",not_enough_items:"Add more of the qualifying items to unlock this offer.",already_automatic:"Good news, this offer is already on your order. No code needed."};function Jse(e){return e.charAt(0).toLowerCase()+e.slice(1)}function eie(e,t,n){const[r,o]=h.useState(null),[l,c]=h.useState(null),[d,m]=h.useState(!1),p=h.useRef(0),y=h.useCallback(async(b,S)=>{const C=++p.current;m(!0),S.revalidation||c(null);try{const N=await GW({code:b,subtotalCents:e,...t?{email:t}:{}});if(C!==p.current)return;const A=b.toUpperCase();if(N.valid)pD(A),o({code:A,discountCents:N.discountCents}),c(null);else{Td(),o(null);const T=Zse[N.reason??"invalid_code"];c(S.revalidation?`Promo ${A} was removed: ${Jse(T)}`:T)}}catch{if(C!==p.current)return;c("We couldn't check that code right now. Please try again.")}finally{C===p.current&&m(!1)}},[e,t]);h.useEffect(()=>{const b=Qse();if(b){e>0&&y(b,{revalidation:!0}
53);return}!n||e<=0||Xse()!==n.toUpperCase()&&y(n,{revalidation:!1})},[y,e,n]);const g=h.useCallback(b=>{const S=b.trim();S&&y(S,{revalidation:!1})},[y]),v=h.useCallback(()=>{p.current+=1,r&&hD(r.code),Td(),o(null),c(null),m(!1)},[r]);return{applied:r,error:l,isValidating:d,apply:g,remove:v}}function gD({subtotalCents:e,email:t,onAppliedChange:n,autoApplyCode:r,className:o}){const{applied:l,error:c,isValidating:d,apply:m,remove:p}=eie(e,t,r),[y,g]=h.useState(""),v=h.useRef(n);if(h.useEffect(()=>{v.current=n}),h.useEffect(()=>{v.current?.(l)},[l]),l)return s.jsx("div",{className:o,children:s.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-xl bg-vida-mint-soft px-3.5 py-2.5 ring-1 ring-vida-green-600/30","data-testid":"row-promo-applied",children:[s.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[s.jsx(aU,{className:"size-4 shrink-0 text-vida-green-700","aria-hidden":"true"}),s.jsx("span",{className:"truncate font-mono text-sm font-semibold tracking-[0.04em] text-vida-green-800",children:l.code}),s.jsx("span",{className:"text-caption text-vida-green-700",children:"applied"})]}),s.jsx("button",{type:"button","aria-label":`Remove promo ${l.code}`,onClick:p,className:"shrink-0 rounded-pill p-1.5 text-ink-3 motion-safe:transition-colors hover:bg-ink/10 hover:text-ink","data-testid":"button-remove-promo",children:s.jsx(ro,{className:"size-3.5","aria-hidden":"true"})})]})});const b=()=>{y.trim()&&!d&&m(y)};return s.jsxs("div",{className:o,children:[s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{value:y,onChange:S=>g(S.target.value),onKeyDown:S=>{S.key==="Enter"&&(S.preventDefault(),b())},placeholder:"Promo code",autoCapitalize:"characters",autoCorrect:"off",spellCheck:!1,enterKeyHint:"done","aria-label":"Promo code","aria-invalid":!!c,className:Y("min-h-11 w-full min-w-0 flex-1 rounded-xl border border-input bg-transparent px-3.5 font-mono text-sm font-semibold uppercase tracking-[0.04em] text-ink","placeholder:font-sans placeholder:font-normal placeholder:normal-case placeholder:tracking-normal placeholder:text-ink-3","focus:outline-none focus:ring-2 focus:ring-ring",c?"border-danger/50 focus:border-danger":"focus:border-ring"),"data-testid":"input-promo-code"}),s.jsx(Le,{type:"button",variant:"ghost",size:"sm",className:"min-h-11 shrink-0 px-4",disabled:!y.trim()||d,onClick:b,"data-testid":"button-apply-promo",children:d?"Checkingâ¦":"Apply"})]}),c?s.jsx("p",{className:"mt-1.5 text-caption text-danger",role:"alert","data-testid":"text-promo-error",children:c}):s.jsx("p",{className:"mt-1.5 text-caption text-ink-3",children:"One promo code per order."})]})}function bd(e){return`$${(e/100).toFixed(2)}`}function yD(e){const t=e??{},n=Array.isArray(t.discounts)?t.discounts:[],r=typeof t.savingsCents=="number"?t.savingsCents:n.reduce((o,l)=>o+(l?.discountCents??0),0);return{discounts:n,savingsCents:r,estimatedTotalCents:typeof t.estimatedTotalCents=="number"?t.estimatedTotalCents:Math.max(0,(t.subtotalCents??0)-r),bogoProgress:Array.isArray(t.bogoProgress)?t.bogoProgress:[],prizes:Array.isArray(t.prizes)?t.prizes:[],gift:t.gift??null}}function xD(e){const t=e??{};return{discountCents:typeof t.discountCents=="number"?t.discountCents:0,freeUnits:typeof t.freeUnits=="number"?t.freeUnits:0}}function vD({subtotalCents:e,itemCount:t,discounts:n=[],savingsCents:r,estimatedTotalCents:o,bogoProgress:l=[],showPromoInput:c=!0,onAppliedChange:d,children:m,className:p,density:y="page"}){const{setPromoCode:g}=oo(),v=r??n.reduce((A,T)=>A+T.discountCents,0),b=o??Math.max(0,e-v),S=n.length>0,C=y==="drawer",N=C?"text-[13px]":"text-[15px]";return s.jsxs("div",{className:p,"data-testid":"cart-summary",children:[s.jsxs("div",{className:Y("flex items-baseline justify-between",N),children:[s.jsxs("span",{className:"text-ink-2",children:["Subtotal (",t," item",t!==1?"s":"",")"]}),s.jsx("span",{className:Y("font-display font-bold tabular-nums",C?"text-base":"text-t3"),"data-testid":"text-subtotal",children:bd(e)})]}),n.map(A=>s.jsxs("div",{className:Y("mt-1.5 flex items-baseline justify-between gap-2",N),"data-testid":`row-discount-${A.code}`,children:[s.jsxs("span",{className:"flex min-w-0 items-center gap-1.5 text-ink-2",children:[s.jsx(T2,{className:"size-3.5 shrink-0 text-primary","aria-hidden":"true"}),s.jsx("span",{className:"truncate",children:A.label})]}),A.discountCents>0?s.jsxs("span",{className:"font-display font-bold tabular-nums text-primary",children:["â",bd(A.discountCents)]}):s.jsx("span",{className:"shrink-0 text-caption font-medium text-ink-3",children:"applied"})]},`${A.code}-${A.source}`)),l.map(A=>s.jsxs("div",{className:"mt-2 flex items-start gap-2 rounded-lg bg-primary/10 px-2.5 py-2 text-[12px] text-ink-2","data-testid":`bogo-progress-${A.code}`,children:[s.jsx(Wi,{className:"mt-px size-3.5 shrink-0 text-primary","aria-hidden":"true"}),s.jsxs("span",{children:[A.freeUnits>0&&s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"font-semibold text-ink",children:[A.freeUnits," free ",A.freeUnits===1?"item":"items"]})," ","in your cart."," "]}),"Add ",s.jsxs("span",{className:"font-semibold text-ink",children:[A.unitsToNextFree," more"]})," to get another free."]})]},A.code)),S&&s.jsxs("div",{className:Y("mt-1.5 flex items-baseline justify-between border-t border-[--vp-hairline] pt-1.5",N),children:[s.jsx("span",{className:"font-semibold text-ink",children:"Estimated total"}),s.jsx("span",{className:Y("font-display font-bold tabular-nums",C?"text-base":"text-t3"),"data-testid":"text-estimated-total",children:bd(b)})]}),v>0&&s.jsxs("p",{className:"mt-1 text-caption font-semibold text-primary","data-testid":"text-cart-savings",children:["You save ",bd(v)]}),s.jsx("p",{className:"mt-1 text-caption text-ink-3",children:"Free U.S. shipping"}),m,c&&s.jsx(gD,{className:C?"mt-3":"mt-4",subtotalCents:e,onAppliedChange:A=>{g(A?.code??null),d?.(A)}})]})}function bD({discountCents:e,freeUnits:t,className:n}){return e<=0&&t<=0?null:s.jsxs("span",{className:Y("mt-1 inline-flex items-center gap-1 rounded-pill bg-primary/15 px-2 py-0.5 text-[11px] font-semibold text-primary",n),"data-testid":"line-discount",children:[t>0&&s.jsxs(s.Fragment,{children:[s.jsx(Wi,{className:"size-3","aria-hidden":"true"}),t," free"]}),t>0&&e>0&&s.jsx("span",{"aria-hidden":"true",children:"·"}),e>0&&s.jsxs(s.Fragment,{children:["â",bd(e)]})]})}function bT(e){return`$${(e/100).toFixed(2)}`}function wD({prizes:e,onApply:t,compact:n=!1,className:r}){const[o,l]=h.useState(null);return e.length===0?null:s.jsx("div",{className:Y("space-y-2",r),"data-testid":"cart-prizes",children:e.map(c=>{const d=c.isApplied,m=c.canApply&&!d&&c.worthCents<=0,p=c.canApply&&!d&&!m;return s.jsx("div",{className:Y("rounded-xl border p-3",d?"border-emerald-500/40 bg-emerald-500/10":p?"border-vida-gold-500/50 bg-vida-gold-500/10":"border-border bg-muted/40"),"data-testid":`cart-prize-${c.playId}`,children:s.jsxs("div",{className:"flex items-start gap-2.5",children:[d?s.jsx(mn,{className:"mt-0.5 size-4 shrink-0 text-emerald-600","aria-hidden":"true"}):s.jsx(ya,{className:Y("mt-0.5 size-4 shrink-0",p?"text-vida-gold-600":"text-ink-3"),"aria-hidden":"true"}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("p",{className:Y("font-semibold text-ink",n?"text-[13px]":"text-sm"),children:[s.jsx(Wi,{className:"mr-1 inline size-3.5 align-[-2px]","aria-hidden":"true"}),"You won: ",c.label]}),d?s.jsxs("p",{className:"mt-0.5 text-[12px] text-ink-2",children:["Applied - taking ",bT(c.worthCents)," off this order."]}):p?s.jsxs("p",{className:"mt-0.5 text-[12px] text-ink-2",children:["Worth ",s.jsx("span",{className:"font-semibold text-ink",children:bT(c.worthCents)})," on this cart. It can only be used once."]}):s.jsx("p",{className:"mt-0.5 text-[12px] text-ink-3","data-testid":"cart-prize-reason",children:c.reason??"This one is worth nothing on your current cart - it is still yours to use later."})]}),p&&s.jsx(Le,{size:"sm",disabled:o===c.playId,"data-testid":`cart-prize-apply-${c.playId}`,onClick:async()=>
53{l(c.playId);try{await t(c.playId)}finally{l(null)}},children:o===c.playId?"Applyingâ¦":"Apply"})]})},c.playId)})})}function Km(e){return`$${(e/100).toFixed(2)}`}function SD({gift:e,onChoose:t,compact:n=!1,className:r}){const[o,l]=h.useState(!1);if(!e)return null;const c=e.options.find(m=>m.variantId===e.chosenVariantId)??null,d=e.thresholdCents>0?Math.min(100,Math.round((e.thresholdCents-e.amountToQualifyCents)/e.thresholdCents*100)):100;return s.jsxs("div",{className:Y("rounded-xl border p-3",e.qualified?"border-primary/40 bg-primary/10":"border-border bg-muted/40",r),"data-testid":"cart-gift-offer",children:[s.jsxs("p",{className:Y("flex items-center gap-1.5 font-semibold text-ink",n?"text-[13px]":"text-sm"),children:[s.jsx(Wi,{className:"size-4 shrink-0 text-primary","aria-hidden":"true"}),e.headline]}),!e.qualified&&s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"mt-1 text-[12px] text-ink-2","data-testid":"cart-gift-shortfall",children:c?s.jsxs(s.Fragment,{children:["Add"," ",s.jsx("span",{className:"font-semibold text-ink",children:Km(e.amountToQualifyCents)})," ","to keep your free item."]}):s.jsxs(s.Fragment,{children:["Add"," ",s.jsx("span",{className:"font-semibold text-ink",children:Km(e.amountToQualifyCents)})," ","more to unlock it."]})}),s.jsx("div",{className:"mt-2 h-1.5 overflow-hidden rounded-pill bg-border",children:s.jsx("div",{className:"h-full rounded-pill bg-primary transition-all",style:{width:`${d}%`}})})]}),c&&s.jsxs("div",{className:Y("mt-2.5 flex items-center gap-2.5 rounded-lg bg-background/60 p-2",!e.qualified&&"opacity-55"),"data-testid":"cart-gift-chosen",children:[c.imageUrl?s.jsx("img",{src:c.imageUrl,alt:"",className:"size-10 shrink-0 rounded-md object-cover"}):s.jsx("div",{className:"grid size-10 shrink-0 place-items-center rounded-md bg-bone",children:s.jsx(Wi,{className:"size-4 text-ink-3","aria-hidden":"true"})}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("p",{className:"truncate text-[13px] font-semibold text-ink",children:[c.productName," ",s.jsxs("span",{className:"font-normal text-ink-3",children:["· ",c.size,c.unit]})]}),s.jsx("p",{className:"text-[11px] font-semibold text-primary",children:e.qualified?s.jsxs(s.Fragment,{children:["FREE"," ",s.jsx("span",{className:"font-normal text-ink-3 line-through",children:Km(c.listPriceCents)})]}):s.jsxs("span",{className:"inline-flex items-center gap-1 text-ink-3",children:[s.jsx(sU,{className:"size-3","aria-hidden":"true"})," Not unlocked yet"]})})]}),e.options.length>1&&s.jsx("button",{type:"button",className:"shrink-0 text-[11px] font-semibold text-primary hover:underline","data-testid":"cart-gift-change",onClick:()=>{t(null)},children:"Change"})]}),e.requiresChoice&&s.jsxs("div",{className:"mt-2.5 space-y-1.5","data-testid":"cart-gift-chooser",children:[s.jsx("p",{className:"text-[12px] font-medium text-ink",children:"Pick your free item:"}),e.options.map(m=>s.jsxs("button",{type:"button",disabled:o,"data-testid":`cart-gift-option-${m.variantId}`,onClick:async()=>{l(!0);try{await t(m.variantId)}finally{l(!1)}},className:"flex w-full items-center gap-2.5 rounded-lg border border-border bg-background/60 p-2 text-left transition-colors hover:border-primary/50 hover:bg-primary/5 disabled:opacity-60",children:[m.imageUrl?s.jsx("img",{src:m.imageUrl,alt:"",className:"size-9 shrink-0 rounded-md object-cover"}):s.jsx("div",{className:"grid size-9 shrink-0 place-items-center rounded-md bg-bone",children:s.jsx(Wi,{className:"size-4 text-ink-3","aria-hidden":"true"})}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsxs("span",{className:"block truncate text-[13px] font-semibold text-ink",children:[m.productName," ",s.jsxs("span",{className:"font-normal text-ink-3",children:["· ",m.size,m.unit]})]}),s.jsx("span",{className:"text-[11px] text-ink-3 line-through",children:Km(m.listPriceCents)})]}),s.jsx(Le,{size:"sm",asChild:!0,children:s.jsx("span",{children:"Choose"})})]},m.variantId))]})]})}function uf(e){const t=e.color?.trim()||null;let r=e.sizeLabel?.trim()||null;if(!r&&Number.isFinite(e.size)&&e.size>0&&(r=`${e.size} ${e.unit}`.trim()),!r&&e.packageQuantity!=null&&e.packageQuantity>0){const o=e.packageType?.trim(),l=e.packageUnit?.trim(),c=l?`${l}${e.packageQuantity===1||l.endsWith("s")?"":"s"}`:"units",d=`${e.packageQuantity} ${c}`;r=o?`${o.charAt(0).toUpperCase()}${o.slice(1)} · ${d}`:d}return t&&r?`${t} · ${r}`:t??r}function CD(e){return e.some(t=>typeof t=="object"&&t!==null&&"productType"in t&&t.productType==="compound")}function tie(e){const t=e?.unavailableItems;return Array.isArray(t)?t.flatMap(n=>{if(!n||typeof n!="object"||n.unavailable!==!0)return[];const r=n.id;return Number.isInteger(r)&&Number(r)>0?[{id:Number(r),unavailable:!0}]:[]}):[]}function nie({item:e,onRemove:t}){return s.jsxs("div",{className:"flex items-center gap-3 py-2.5","data-testid":`drawer-unavailable-${e.id}`,children:[s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"text-sm font-medium",children:"Item no longer available"}),s.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:"Remove this item to continue."})]}),s.jsx("button",{type:"button","aria-label":"Remove unavailable item",onClick:t,className:"text-muted-foreground transition-colors hover:text-destructive","data-testid":`drawer-remove-unavailable-${e.id}`,children:s.jsx(ph,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]})}function rie(){const{cart:e,isCartOpen:t,closeCart:n,updateItem:r,removeItem:o,applyPrize:l,chooseGift:c}=oo(),{t:d}=Ih(),[,m]=Hn(),{toast:p}=Nr(),y=yD(e),g=tie(e),v=()=>{n(),m("/checkout")};return s.jsx(Cse,{open:t,onOpenChange:b=>{b||n()},children:s.jsxs(nD,{side:"right",className:"w-full max-w-[360px] flex flex-col p-0 gap-0","data-testid":"cart-drawer",children:[s.jsx(rD,{className:"px-4 py-2.5 border-b border-border shrink-0",children:s.jsxs(aD,{className:"font-serif text-base flex items-center gap-2",children:[s.jsx(nl,{className:"w-4 h-4 text-primary"}),"Cart"," ",e&&e.itemCount>0&&s.jsxs("span",{className:"text-muted-foreground font-normal text-sm",children:["(",e.itemCount,")"]})]})}),!e||e.items.length===0&&g.length===0?s.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center px-5 py-10 text-center",children:[s.jsx(nl,{className:"w-10 h-10 text-muted-foreground mb-3"}),s.jsx("p",{className:"font-medium text-muted-foreground mb-1",children:d("cart.empty.title")}),s.jsx("p",{className:"text-xs text-muted-foreground mb-4",children:d("cart.empty.body")}),s.jsx(Cr,{asChild:!0,onClick:n,size:"sm",children:s.jsx(Ue,{href:"/products",children:d("cart.empty.action")})})]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-1",children:[s.jsx(wD,{compact:!0,className:"pt-2",prizes:y.prizes,onApply:l}),s.jsx(SD,{compact:!0,className:"mt-2",gift:y.gift,onChoose:c}),s.jsxs("div",{className:"divide-y divide-border",children:[g.map(b=>s.jsx(nie,{item:b,onRemove:async()=>{await o(b.id),p({title:"Unavailable item removed"})}},`unavailable-${b.id}`)),e.items.map(b=>{const S=uf(b);return s.jsxs("div",{className:"flex gap-3 py-2.5","data-testid":`drawer-item-${b.id}
53`,children:[s.jsx("div",{className:"w-14 h-14 rounded-md overflow-hidden bg-muted flex-shrink-0 border border-border",children:b.primaryImageUrl?s.jsx("img",{src:b.primaryImageUrl,alt:b.productName,className:"w-full h-full object-cover"}):s.jsx("div",{className:"w-full h-full flex items-center justify-center text-xs text-muted-foreground",children:"·"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx(Ue,{href:`/products/${b.productSlug}`,onClick:n,children:s.jsxs("p",{className:"font-medium text-sm hover:underline leading-tight line-clamp-2",children:[b.productName,S?s.jsxs("span",{className:"text-muted-foreground",children:[" · ",S]}):null]})}),s.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5",children:["$",(b.priceCents/100).toFixed(2)," each"]}),s.jsx(bD,{...xD(b)}),s.jsxs("div",{className:"flex items-center gap-2 mt-1.5",children:[s.jsx(Ac,{size:"sm",value:b.quantity,min:0,max:b.stockQuantity??void 0,valueTestId:`drawer-qty-${b.id}`,decreaseTestId:`drawer-decrease-${b.id}`,increaseTestId:`drawer-increase-${b.id}`,onChange:async C=>{C<=0?(await o(b.id),p({title:"Removed from cart"})):await r(b.id,C)}}),s.jsx("button",{onClick:async()=>{await o(b.id),p({title:"Removed"})},className:"text-muted-foreground hover:text-destructive transition-colors","data-testid":`drawer-remove-${b.id}`,children:s.jsx(ph,{className:"w-3.5 h-3.5"})})]})]}),s.jsx("div",{className:"flex-shrink-0 text-right pt-0.5",children:s.jsxs("p",{className:"font-bold text-sm",children:["$",(b.priceCents*b.quantity/100).toFixed(2)]})})]},b.id)})]})]}),s.jsxs("div",{className:"shrink-0 border-t border-border px-4 pt-3 pb-4",children:[s.jsx(vD,{density:"drawer",subtotalCents:e.subtotalCents,itemCount:e.itemCount,discounts:y.discounts,savingsCents:y.savingsCents,estimatedTotalCents:y.estimatedTotalCents,bogoProgress:y.bogoProgress}),s.jsxs(Cr,{className:"w-full mt-3",disabled:e.items.length===0||g.length>0,onClick:v,"data-testid":"drawer-checkout-button",children:["Checkout ",s.jsx(rl,{className:"ml-2 w-4 h-4"})]}),s.jsx(Cr,{variant:"ghost",className:"w-full mt-0.5 h-8 text-xs text-muted-foreground",asChild:!0,onClick:n,children:s.jsx(Ue,{href:"/cart",children:"View full cart"})})]})]})]})})}const aie=[{href:"/products",label:"All products"},{href:"/requested",label:"Requested Products"},{href:"/research",label:"Research Library"},{href:"/tools",label:"Lab Calculators"},{href:"/vidagrants",label:"VidaGrants"},{href:"/account",label:"Account"}],wT=[{href:"/rewards",label:"Rewards"},{href:"/rewards?tab=partners",label:"Vida Partners"},{href:"/forward",label:"Forward"},{href:"https://pray.vidapeps.com",label:"Prayer",external:!0}],sie=[{href:"/account/points",label:"Your points & tier"},{href:"/account/referral",label:"Referral dashboard"}],iie=[{href:"/about",label:"About Us"},{href:"/about#contact",label:"Contact & support"},{href:"/research?tab=lab",label:"Lab Results"}],oie=[{href:"/legal/research-use",label:"Research-Use Policy"},{href:"/legal/fda",label:"FDA Disclaimer"},{href:"/legal/terms",label:"Terms of Service"},{href:"/legal/privacy",label:"Privacy Policy"},{href:"/legal/cookies",label:"Cookie Policy"},{href:"/policies/sms-messaging",label:"SMS & Messaging",external:!0},{href:"/legal/refund",label:"Refund Policy"},{href:"/legal/shipping",label:"Shipping Policy"}],lie=[{label:"VidaPeps on TikTok",href:"https://www.tiktok.com/@vidapeps",path:"M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z"},{label:"VidaPeps on Instagram",href:"https://www.instagram.com/vidapeps",path:"M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0-2.163C8.741 0 8.332.014 7.052.072 2.695.272.273 2.69.073 7.052.014 8.332 0 8.741 0 12c0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98C8.332 23.986 8.741 24 12 24c3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0zm0 5.838a6.162 6.162 0 100 12.324 6.162 6.162 0 000-12.324zM12 16a4 4 0 110-8 4 4 0 010 8zm6.406-11.845a1.44 1.44 0 100 2.881 1.44 1.44 0 000-2.881z"},{label:"VidaPeps on X",href:"https://x.com/vidapeps",path:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"}];function cie(){return s.jsx("div",{className:"mt-6 flex items-center gap-2.5",children:lie.map(({label:e,href:t,path:n,viewBox:r})=>s.jsxs("a",{href:t,target:"_blank",rel:"noopener noreferrer","aria-label":e,className:"grid size-9 place-items-center rounded-full border border-white/15 bg-white/5 text-white/75 motion-safe:transition-colors hover:border-vida-mint/50 hover:bg-white/10 hover:text-white",children:[s.jsx("svg",{viewBox:r??"0 0 24 24",className:"size-4 fill-current","aria-hidden":"true",focusable:"false",children:s.jsx("path",{d:n})}),s.jsx("span",{className:"sr-only",children:e})]},t))})}function Qx({label:e,links:t}){return s.jsxs("nav",{"aria-label":e,children:[s.jsx("p",{className:"text-overline uppercase text-vida-gold-300",children:e}),s.jsx("ul",{className:"mt-3.5 flex flex-col gap-2.5",children:t.map(n=>s.jsx("li",{children:n.external?s.jsx("a",{href:n.href,className:"text-[14.5px] text-white/75 motion-safe:transition-colors hover:text-vida-mint",children:n.label}):s.jsx(Ue,{href:n.href,className:"text-[14.5px] text-white/75 motion-safe:transition-colors hover:text-vida-mint",children:n.label})},n.href))})]})}function uie(){const{isAuthenticated:e}=Bt(),[t,n]=h.useState(""),[r,o]=h.useState("idle");if(e)return null;async function l(c){if(c.preventDefault(),!(!t||r==="submitting")){o("submitting");try{if(!(await fetch("/api/email-capture",{method:"POST",headers:{"content-type":"application/json"},credentials:"include",body:JSON.stringify({email:t,source:"footer"})})).ok)throw new Error("HTTP");o("done"),n("")}catch{o("error")}}}return r==="done"?s.jsx("div",{className:"mt-5 rounded-md border border-white/15 bg-white/5 p-3 text-left",children:s.jsxs("p",{className:"text-xs text-white/80 flex items-start gap-2",children:[s.jsx(Xi,{className:"size-4 text-vida-mint shrink-0 mt-0.5","aria-hidden":"true"}),s.jsx("span",{children:"Thanks! We'll send new-arrival + browse-follow-up updates. Create an account anytime to manage preferences."})]})}):s.jsxs("form",{onSubmit:l,className:"mt-5 space-y-1.5",children:[s.jsx("label",{htmlFor:"footer-email",className:"block text-overline uppercase text-vida-gold-300",children:"Get product updates"}),s.jsxs("div",{className:"flex gap-1.5",children:[s.jsx("input",{id:"footer-email",type:"email",required:!0,placeholder:"[email protected]",value:t,onChange:c=>{n(c.target.value),r==="error"&&o("idle")},className:"min-w-0 flex-1 rounded-md border border-white/15 bg-white/5 px-3 py-2 text-sm text-white placeholder:text-white/40 focus:outline-none focus:border-vida-mint/60","aria-label":"Email address"}),s.jsxs("button",{type:"submit",disabled:r==="submitting"||!t,className:"shrink-0 inline-flex items-center justify-center rounded-md bg-vida-mint px-3 py-2 text-xs font-medium text-vida-green-950 hover:bg-vida-mint/90 disabled:opacity-50",children:[s.jsx(q2,{className:"size-3.5","aria-hidden":"true"}),s.jsx("span",{className:"sr-only",children:"Subscribe"})]})]}),r==="error"&&s.jsx("p",{className:"text-[11px] text-rose-300",children:"Couldn't subscribe. Check the email and try again."})]})}function die(){const{isAuthenticated:e}=Bt(),t=e?[...wT,...sie]:wT;return s.jsxs("footer",{className:"mt-10 bg-vida-green-950 text-white/80",children:[s.jsx("div",{className:"vp-gold-divider opacity-60","aria-hidden":"true"}),s.jsxs("div",{className:"mx-auto w-full max-w-[var(--vp-content-max)] px-5 pb-7 pt-12 md:pt-16",children:[s.jsxs("div",{className:"grid gap-9 sm:grid-cols-2 lg:grid-cols-[1.4fr_1fr_1fr_1fr_1fr]",children:[s.jsxs("div",{className:"max-w-xs sm:col-span-2 lg:col-span-1",children:[s.jsx("img",{src:"/vidapeps-logo.svg",alt:"VidaPeps",className:"h-8 w-auto brightness-0 invert"}),s.jsx("p",{className:"mt-3.5 text-[13.5px] leading-relaxed text-white/60",children:"Research-grade peptides. Verified purity. A Certificate of Analysis for every lot."}),s.jsx("div",{className:"mt-5 flex flex-col gap-2 text-[13px] text-white/60",children:[{icon:Ic,text:"COA on every lot"},{icon:tl,text:"HPLC + MS Certificate of Analysis"},{icon:Zi,text:"Discreet, temp-aware shipping"}].map(({icon:n,text:r})=>s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(n,{className:"size-4 text-vida-mint","aria-hidden":"true"}),r]},r))}),s.jsx(uie,{}),s.jsx(i_,{tone:"dark",className:"mt-6"}),s.jsx(cie,{})]}),s.jsx(Qx,{label:"Shop",links:aie}),s.jsx(Qx,{label:"Programs",links:t}),s.jsxs("nav",{"aria-label":"Company",children:[s.jsx("p",{className:"text-overline uppercase text-vida-gold-300",children:"Company"}),s.jsxs("ul",{className:"mt-3.5 flex flex-col gap-2.5 text-[14.5px]",children:[iie.map(n=>s.jsx("li",{children:s.jsx(Ue,{href:n.href,className:"text-white/75 motion-safe:transition-colors hover:text-vida-mint",children:n.label})},n.href)),[{email:uS,label:"Support"},{email:vc,label:"Compliance"},{email:qM,label:"Payments"}].map(({email:n,label:r})=>s.jsx("li",{children:s.jsxs("a",{href:`mailto:${n}`,className:"flex items-center gap-2 text-white/75 motion-safe:transition-colors hover:text-vida-mint",children:[s.jsx(q0,{className:"size-4 shrink-0 text-vida-mint","aria-hidden":"true"}),s.jsxs("span",{children:[s.jsxs("span",{className:"text-white/50",children:[r,":"]})," ",n]})]})}
53,n)),s.jsx("li",{children:s.jsxs("a",{href:`tel:${Tae}`,className:"flex items-center gap-2 text-white/75 motion-safe:transition-colors hover:text-vida-mint",children:[s.jsx(w2,{className:"size-4 shrink-0 text-vida-mint","aria-hidden":"true"}),jae]})})]})]}),s.jsx(Qx,{label:"Legal",links:oie})]}),s.jsxs("div",{className:"mt-9 border-t border-white/10 pt-6",children:[s.jsxs("p",{className:"max-w-4xl text-xs leading-relaxed text-white/50",children:[aM," All products offered by VidaPeps are intended exclusively for laboratory and in-vitro research by qualified, competent individuals trained in laboratory procedures. Products have not been evaluated by the U.S. FDA and are not intended to diagnose, treat, cure, or prevent any disease. The purchaser affirms research-use intent and assumes full responsibility for safe handling, lawful use, and disposal. ",UM]}),s.jsxs("p",{className:"mt-3 text-xs text-white/60",children:["© ",new Date().getFullYear()," VidaPeps. All rights reserved. For research purposes only."]})]})]})]})}const ST=["pushState","replaceState","popstate","hashchange"],fie=12,mie=50;function pie(){const[e]=Hn(),t=h.useRef("");return h.useEffect(()=>{const n=()=>{const{pathname:r,hash:o}=window.location,l=r+o;if(l===t.current)return;if(t.current=l,!o){window.scrollTo(0,0);return}const c=decodeURIComponent(o.slice(1));let d=0;const m=()=>{const p=document.getElementById(c);if(p){p.scrollIntoView({block:"start"});return}if(d++<fie){setTimeout(m,mie);return}window.scrollTo(0,0)};m()};n();for(const r of ST)window.addEventListener(r,n);return()=>{for(const r of ST)window.removeEventListener(r,n)}},[e]),null}function hie(){const{data:e}=_ee(),[t,n]=h.useState(!1),o=e?.session?.impersonatedBy,l=e?.user?.name||e?.user?.email||"this user";if(!o)return null;async function c(){n(!0);try{await fetch("/api/auth/admin/stop-impersonating",{method:"POST",credentials:"include",headers:{"content-type":"application/json"},body:"{}"})}catch{}window.location.href="/"}return s.jsxs("div",{className:"fixed inset-x-0 top-0 z-[100] flex flex-wrap items-center justify-center gap-x-3 gap-y-1 bg-amber-500 px-4 py-1.5 text-center text-sm font-medium text-amber-950",role:"status",children:[s.jsxs("span",{children:["Admin view - you are viewing the portal as ",s.jsx("strong",{children:l}),"."]}),s.jsx("button",{type:"button",onClick:()=>{c()},disabled:t,className:"rounded bg-amber-950/10 px-2 py-0.5 font-semibold underline underline-offset-2 hover:bg-amber-950/20 disabled:opacity-60",children:t?"Returningâ¦":"Return to admin"})]})}var gie=Object.defineProperty,yie=(e,t)=>gie(e,"name",{value:t,configurable:!0});function Qb(e,[t,n]){return Math.min(n,Math.max(t,e))}yie(Qb,"clamp");var xie=Object.defineProperty,vie=(e,t)=>xie(e,"name",{value:t,configurable:!0});function ND(e){const t=h.useRef({value:e,previous:e});return h.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}vie(ND,"usePrevious");var bie=Object.defineProperty,ot=(e,t)=>bie(e,"name",{value:t,configurable:!0}),wie=[" ","Enter","ArrowUp","ArrowDown"],Sie=[" ","Enter"],Ec="Select",[Qh,Xh,Cie]=nf(Ec),[hl,xwe]=nr(Ec,[Cie,io]),wS=io(),[Nie,lo]=hl(Ec),[Aie,Eie]=hl(Ec);function AD(e){const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:l,value:c,defaultValue:d,onValueChange:m,dir:p,name:y,autoComplete:g,disabled:v,required:b,form:S,internal_do_not_use_render:C}=e,N=wS(t),[A,T]=h.useState(null),[E,j]=h.useState(null),[_,R]=h.useState(!1),P=rf(p),[M,q]=va({prop:r,defaultProp:o??!1,onChange:l,caller:Ec}),[U,V]=va({prop:c,defaultProp:d,onChange:m,caller:Ec}),$=h.useRef(null),L=h.useRef(U);h.useEffect(()=>{const Z=S?A?.ownerDocument.getElementById(S):A?.form;if(Z instanceof HTMLFormElement){const ie=ot(()=>V(L.current),"reset");return Z.addEventListener("reset",ie),()=>Z.removeEventListener("reset",ie)}},[S,A,V]);const H=A?!!S||!!A.closest("form"):!0,[Q,I]=h.useState(new Set),O=ha(),F=Array.from(Q).map(Z=>Z.props.value).join(";"),B=h.useCallback(Z=>{I(ie=>new Set(ie).add(Z))},[]),K=h.useCallback(Z=>{I(ie=>{const re=new Set(ie);return re.delete(Z),re})},[]),le={required:b,trigger:A,onTriggerChange:T,valueNode:E,onValueNodeChange:j,valueNodeHasChildren:_,onValueNodeHasChildrenChange:R,contentId:O,value:U,onValueChange:V,open:M,onOpenChange:q,dir:P,triggerPointerDownPosRef:$,disabled:v,name:y,autoComplete:g,form:S,nativeOptions:Q,nativeSelectKey:F,isFormControl:H};return s.jsx(lw,{...N,children:s.jsx(Nie,{scope:t,...le,children:s.jsx(Qh.Provider,{scope:t,children:s.jsx(Aie,{scope:t,onNativeOptionAdd:B,onNativeOptionRemove:K,children:DD(C)?C(le):n})})})})}ot(AD,"SelectProvider");var jie=ot(e=>{const{__scopeSelect:t,children:n,...r}=e;return s.jsx(AD,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:o})=>s.jsxs(s.Fragment,{children:[n,o?s.jsx(Qie,{__scopeSelect:t}):null]})})},"Select"),Tie="SelectTrigger",ED=h.forwardRef(ot(function(t,n){const{__scopeSelect:r,disabled:o=!1,...l}=t,c=wS(r),d=lo(Tie,r),m=d.disabled||o,p=Qe(n,d.onTriggerChange),y=Xh(r),g=h.useRef("touch"),[v,b,S]=CS(N=>{const A=y().filter(j=>!j.disabled),T=A.find(j=>j.value===d.value),E=NS(A,N,T);E!==void 0&&d.onValueChange(E.value)}
53),C=ot(N=>{m||(d.onOpenChange(!0),S()),N&&(d.triggerPointerDownPosRef.current={x:Math.round(N.pageX),y:Math.round(N.pageY)})},"handleOpen");return s.jsx(cw,{asChild:!0,...c,children:s.jsx(Ge.button,{type:"button",role:"combobox","aria-controls":d.open?d.contentId:void 0,"aria-expanded":d.open,"aria-required":d.required,"aria-autocomplete":"none",dir:d.dir,"data-state":d.open?"open":"closed",disabled:m,"data-disabled":m?"":void 0,"data-placeholder":df(d.value)?"":void 0,...l,ref:p,onClick:je(l.onClick,N=>{N.currentTarget.focus(),g.current!=="mouse"&&C(N)}),onPointerDown:je(l.onPointerDown,N=>{g.current=N.pointerType;const A=N.target;A.hasPointerCapture(N.pointerId)&&A.releasePointerCapture(N.pointerId),N.button===0&&N.ctrlKey===!1&&N.pointerType==="mouse"&&(C(N),N.preventDefault())}),onKeyDown:je(l.onKeyDown,N=>{const A=v.current!=="";!(N.ctrlKey||N.altKey||N.metaKey)&&N.key.length===1&&b(N.key),!(A&&N.key===" ")&&wie.includes(N.key)&&(C(),N.preventDefault())})})})},"SelectTrigger")),kie="SelectValue",Rie=h.forwardRef(ot(function(t,n){const{__scopeSelect:r,className:o,style:l,children:c,placeholder:d="",...m}=t,p=lo(kie,r),{onValueNodeHasChildrenChange:y}=p,g=c!==void 0,v=Qe(n,p.onValueNodeChange);Vt(()=>{y(g)},[y,g]);const b=df(p.value);return s.jsx(Ge.span,{...m,asChild:b?!1:m.asChild,ref:v,style:{pointerEvents:"none"},children:s.jsx(h.Fragment,{children:b?d:c},b?"placeholder":"value")})},"SelectValue")),Pie=h.forwardRef(ot(function(t,n){const{__scopeSelect:r,children:o,...l}=t;return s.jsx(Ge.span,{"aria-hidden":!0,...l,ref:n,children:o||"â¼"})},"SelectIcon")),Oie="SelectPortal",[_ie,Iie]=hl(Oie,{forceMount:void 0}),Mie=ot(e=>{const{__scopeSelect:t,forceMount:n,...r}=e;return s.jsx(_ie,{scope:e.__scopeSelect,forceMount:n,children:s.jsx(Zd,{asChild:!0,...r})})},"SelectPortal"),cl="SelectContent",jD=h.forwardRef(ot(function(t,n){const r=Iie(cl,t.__scopeSelect),{forceMount:o=r.forceMount,...l}=t,c=lo(cl,t.__scopeSelect),[d,m]=h.useState();return Vt(()=>{m(new DocumentFragment)},[]),s.jsx(Dr,{present:o||c.open,children:({present:p})=>p?s.jsx(qie,{...l,ref:n}):s.jsx(Die,{...l,fragment:d})})},"SelectContent")),Die=h.forwardRef(ot(function(t,n){const{__scopeSelect:r,children:o,fragment:l}=t;return l?Dc.createPortal(s.jsx(TD,{scope:r,children:s.jsx(Qh.Slot,{scope:r,children:s.jsx("div",{ref:n,children:o})})}),l):null},"SelectContentFragment")),Da=10,[TD,gl]=hl(cl),Lie=Ha("SelectContent.RemoveScroll"),qie=h.forwardRef(ot(function(t,n){const{__scopeSelect:r}=t,{position:o="item-aligned",onCloseAutoFocus:l,onEscapeKeyDown:c,onPointerDownOutside:d,side:m,sideOffset:p,align:y,alignOffset:g,arrowPadding:v,collisionBoundary:b,collisionPadding:S,sticky:C,hideWhenDetached:N,avoidCollisions:A,...T}=t,E=lo(cl,r),[j,_]=h.useState(null),[R,P]=h.useState(null),M=Qe(n,_),[q,U]=h.useState(null),[V,$]=h.useState(null),L=Xh(r),[H,Q]=h.useState(!1),I=h.useRef(!1);h.useEffect(()=>{if(j)return Ah(j)},[j]),Lc();const O=h.useCallback(oe=>{const[ge,...we]=L().map(ze=>ze.ref.current),[be]=we.slice(-1),Me=document.activeElement;for(const ze of oe)if(ze===Me||(ze?.scrollIntoView({block:"nearest"}),ze===ge&&R&&(R.scrollTop=0),ze===be&&R&&(R.scrollTop=R.scrollHeight),ze?.focus(),document.activeElement!==Me))return},[L,R]),F=h.useCallback(()=>O([q,j]),[O,q,j]);h.useEffect(()=>{H&&F()},[H,F]);const{onOpenChange:B,triggerPointerDownPosRef:K}=E;h.useEffect(()=>{if(j){let oe={x:0,y:0};const ge=ot(be=>{oe={x:Math.abs(Math.round(be.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(be.pageY)-(K.current?.y??0))}},"handlePointerMove"),we=ot(be=>{oe.x<=10&&oe.y<=10?be.preventDefault():be.composedPath().includes(j)||B(!1),document.removeEventListener("pointermove",ge),K.current=null},"handlePointerUp");return K.current!==null&&(document.addEventListener("pointermove",ge),document.addEventListener("pointerup",we,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ge),document.removeEventListener("pointerup",we,{capture:!0})}}},[j,B,K]),h.useEffect(()=>{const oe=ot(()=>B(!1),"close");return window.addEventListener("blur",oe),window.addEventListener("resize",oe),()=>{window.removeEventListener("blur",oe),window.removeEventListener("resize",oe)}},[B]);const[le,Z]=CS(oe=>{const ge=L().filter(Me=>!Me.disabled),we=ge.find(Me=>Me.ref.current===document.activeElement),be=NS(ge,oe,we);be&&setTimeout(()=>be.ref.current?.focus())}),ie=h.useCallback((oe,ge,we)=>{const be=!I.current&&!we;(E.value!==void 0&&E.value===ge||be)&&(U(oe),be&&(I.current=!0))},[E.value]),re=h.useCallback(()=>j?.focus(),[j]),de=h.useCallback((oe,ge,we)=>{const be=!I.current&&!we;(E.value!==void 0&&E.value===ge||be)&&$(oe)},[E.value]),he=o==="popper"?CT:Uie,pe=he===CT?{side:m,sideOffset:p,align:y,alignOffset:g,arrowPadding:v,collisionBoundary:b,collisionPadding:S,sticky:C,hideWhenDetached:N,avoidCollisions:A}:{};return s.jsx(TD,{scope:r,content:j,viewport:R,onViewportChange:P,itemRefCallback:ie,selectedItem:q,onItemLeave:re,itemTextRefCallback:de,focusSelectedItem:F,selectedItemText:V,position:o,isPositioned:H,searchRef:le,children:s.jsx(ef,{as:Lie,allowPinchZoom:!0,children:s.jsx(gh,{asChild:!0,trapped:E.open,onMountAutoFocus:oe=>{oe.preventDefault()},onUnmountAutoFocus:je(l,oe=>{E.trigger?.focus({preventScroll:!0}),oe.preventDefault()}),children:s.jsx(Xd,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:oe=>oe.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:s.jsx(he,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:oe=>oe.preventDefault(),...T,...pe,onPlaced:()=>Q(!0),ref:M,style:{display:"flex",flexDirection:"column",outline:"none",...T.style},onKeyDown:je(T.onKeyDown,oe=>{const ge=oe.ctrlKey||oe.altKey||oe.metaKey;if(oe.key==="Tab"&&oe.preventDefault(),!ge&&oe.key.length===1&&Z(oe.key),["ArrowUp","ArrowDown","Home","End"].includes(oe.key)){let be=L().filter(Me=>!Me.disabled).map(Me=>Me.ref.current);
vendor: 4,158 bytes, line 53
53if(["ArrowUp","End"].includes(oe.key)&&(be=be.slice().reverse()),["ArrowUp","ArrowDown"].includes(oe.key)){const Me=oe.target,ze=be.indexOf(Me);be=be.slice(ze+1)}setTimeout(()=>O(be)),oe.preventDefault()}})})})})})})},"SelectContentImpl")),Uie=h.forwardRef(ot(function(t,n){const{__scopeSelect:r,onPlaced:o,...l}=t,c=lo(cl,r),d=gl(cl,r),[m,p]=h.useState(null),[y,g]=h.useState(null),v=Qe(n,g),b=Xh(r),S=h.useRef(!1),C=h.useRef(!0),{viewport:N,selectedItem:A,selectedItemText:T,focusSelectedItem:E}=d,j=h.useCallback(()=>{if(c.trigger&&c.valueNode&&m&&y&&N&&A&&T){const M=c.trigger.getBoundingClientRect(),q=y.getBoundingClientRect(),U=c.valueNode.getBoundingClientRect(),V=T.getBoundingClientRect();if(c.dir!=="rtl"){const Me=V.left-q.left,ze=U.left-Me,Ee=M.left-ze,Ct=M.width+Ee,Ft=Math.max(Ct,q.width),pt=window.innerWidth-Da,Gn=Qb(ze,[Da,Math.max(Da,pt-Ft)]);m.style.minWidth=Ct+"px",m.style.left=Gn+"px"}else{const Me=q.right-V.right,ze=window.innerWidth-U.right-Me,Ee=window.innerWidth-M.right-ze,Ct=M.width+Ee,Ft=Math.max(Ct,q.width),pt=window.innerWidth-Da,Gn=Qb(ze,[Da,Math.max(Da,pt-Ft)]);m.style.minWidth=Ct+"px",m.style.right=Gn+"px"}const $=b(),L=window.innerHeight-Da*2,H=N.scrollHeight,Q=window.getComputedStyle(y),I=parseInt(Q.borderTopWidth,10),O=parseInt(Q.paddingTop,10),F=parseInt(Q.borderBottomWidth,10),B=parseInt(Q.paddingBottom,10),K=I+O+H+B+F,le=Math.min(A.offsetHeight*5,K),Z=window.getComputedStyle(N),ie=parseInt(Z.paddingTop,10),re=parseInt(Z.paddingBottom,10),de=M.top+M.height/2-Da,he=L-de,pe=A.offsetHeight/2,oe=A.offsetTop+pe,ge=I+O+oe,we=K-ge;if(ge<=de){const Me=$.length>0&&A===$[$.length-1].ref.current;m.style.bottom="0px";const ze=y.clientHeight-N.offsetTop-N.offsetHeight,Ee=Math.max(he,pe+(Me?re:0)+ze+F),Ct=ge+Ee;m.style.height=Ct+"px"}else{const Me=$.length>0&&A===$[0].ref.current;m.style.top="0px";const Ee=Math.max(de,I+N.offsetTop+(Me?ie:0)+pe)+we;m.style.height=Ee+"px",N.scrollTop=ge-de+N.offsetTop}m.style.margin=`${Da}px 0`,m.style.minHeight=le+"px",m.style.maxHeight=L+"px",o?.(),requestAnimationFrame(()=>S.current=!0)}},[b,c.trigger,c.valueNode,m,y,N,A,T,c.dir,o]);Vt(()=>j(),[j]);const[_,R]=h.useState();Vt(()=>{y&&R(window.getComputedStyle(y).zIndex)},[y]);const P=h.useCallback(M=>{M&&C.current===!0&&(j(),E?.(),C.current=!1)},[j,E]);return s.jsx(zie,{scope:r,contentWrapper:m,shouldExpandOnScrollRef:S,onScrollButtonChange:P,children:s.jsx("div",{ref:p,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:s.jsx(Ge.div,{...l,ref:v,style:{boxSizing:"border-box",maxHeight:"100%",...l.style}})})})},"SelectItemAlignedPosition")),CT=h.forwardRef(ot(function(t,n){const{__scopeSelect:r,align:o="start",collisionPadding:l=Da,...c}=t,d=wS(r);return s.jsx(Nh,{...d,...c,ref:n,align:o,collisionPadding:l,style:{boxSizing:"border-box",...c.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition")),[zie,SS]=hl(cl,{}),NT="SelectViewport",Vie=h.forwardRef(ot(function(t,n){const{__scopeSelect:r,nonce:o,...l}=t,c=gl(NT,r),d=SS(NT,r),m=Qe(n,c.onViewportChange),p=h.useRef(0);return s.jsxs(s.Fragment,{children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),s.jsx(Qh.Slot,{scope:r,children:s.jsx(Ge.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:m,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:je(l.onScroll,y=>{const g=y.currentTarget,{contentWrapper:v,shouldExpandOnScrollRef:b}=d;if(b?.current&&v){const S=Math.abs(p.current-g.scrollTop);if(S>0){const C=window.innerHeight-Da*2,N=parseFloat(v.style.minHeight),A=parseFloat(v.style.height),T=Math.max(N,A);if(T<C){const E=T+S,j=Math.min(C,E),_=E-j;
53v.style.height=j+"px",v.style.bottom==="0px"&&(g.scrollTop=_>0?_:0,v.style.justifyContent="flex-end")}}}p.current=g.scrollTop})})})]})},"SelectViewport")),Bie="SelectGroup",[vwe,Fie]=hl(Bie),$ie="SelectLabel",kD=h.forwardRef(ot(function(t,n){const{__scopeSelect:r,...o}=t,l=Fie($ie,r);return s.jsx(Ge.div,{id:l.id,...o,ref:n})},"SelectLabel")),Xb="SelectItem",[Hie,RD]=hl(Xb),PD=h.forwardRef(ot(function(t,n){const{__scopeSelect:r,value:o,disabled:l=!1,textValue:c,...d}=t,m=lo(Xb,r),p=gl(Xb,r),y=m.value===o,[g,v]=h.useState(c??""),[b,S]=h.useState(!1),C=Jr(j=>p.itemRefCallback?.(j,o,l)),N=Qe(n,C),A=ha(),T=h.useRef("touch"),E=ot(()=>{l||(m.onValueChange(o),m.onOpenChange(!1))},"handleSelect");return s.jsx(Hie,{scope:r,value:o,disabled:l,textId:A,isSelected:y,onItemTextChange:h.useCallback(j=>{v(_=>_||(j?.textContent??"").trim())},[]),children:s.jsx(Qh.ItemSlot,{scope:r,value:o,disabled:l,textValue:g,children:s.jsx(Ge.div,{role:"option","aria-labelledby":A,"data-highlighted":b?"":void 0,"aria-selected":y&&b,"data-state":y?"checked":"unchecked","aria-disabled":l||void 0,"data-disabled":l?"":void 0,tabIndex:l?void 0:-1,...d,ref:N,onFocus:je(d.onFocus,()=>S(!0)),onBlur:je(d.onBlur,()=>S(!1)),onClick:je(d.onClick,()=>{T.current!=="mouse"&&E()}),onPointerUp:je(d.onPointerUp,()=>{T.current==="mouse"&&E()}),onPointerDown:je(d.onPointerDown,j=>{T.current=j.pointerType}),onPointerMove:je(d.onPointerMove,j=>{T.current=j.pointerType,l?p.onItemLeave?.():T.current==="mouse"&&j.currentTarget.focus({preventScroll:!0})}),onPointerLeave:je(d.onPointerLeave,j=>{j.currentTarget===document.activeElement&&p.onItemLeave?.()}),onKeyDown:je(d.onKeyDown,j=>{l||j.target!==j.currentTarget||p.searchRef?.current!==""&&j.key===" "||(Sie.includes(j.key)&&E(),j.key===" "&&j.preventDefault())})})})})},"SelectItem")),Ym="SelectItemText",Gie=h.forwardRef(ot(function(t,n){const{__scopeSelect:r,className:o,style:l,...c}=t,d=lo(Ym,r),m=gl(Ym,r),p=RD(Ym,r),y=Eie(Ym,r),[g,v]=h.useState(null),b=Jr(E=>m.itemTextRefCallback?.(E,p.value,p.disabled)),S=Qe(n,v,p.onItemTextChange,b),C=g?.textContent,N=h.useMemo(()=>s.jsx("option",{value:p.value,disabled:p.disabled,children:C},p.value),[p.disabled,p.value,C]),{onNativeOptionAdd:A,onNativeOptionRemove:T}=y;return Vt(()=>(A(N),()=>T(N)),[A,T,N]),s.jsxs(s.Fragment,{children:[s.jsx(Ge.span,{id:p.textId,...c,ref:S}),p.isSelected&&d.valueNode&&!d.valueNodeHasChildren&&!df(d.value)?Dc.createPortal(c.children,d.valueNode):null]})},"SelectItemText")),Kie="SelectItemIndicator",Yie=h.forwardRef(ot(function(t,n){const{__scopeSelect:r,...o}=t;return RD(Kie,r).isSelected?s.jsx(Ge.span,{"aria-hidden":!0,...o,ref:n}):null},"SelectItemIndicator")),AT="SelectScrollUpButton",OD=h.forwardRef(ot(function(t,n){const r=gl(AT,t.__scopeSelect),o=SS(AT,t.__scopeSelect),[l,c]=h.useState(!1),d=Qe(n,o.onScrollButtonChange);return Vt(()=>{if(r.viewport&&r.isPositioned){let m=function(){const y=p.scrollTop>0;c(y)};ot(m,"handleScroll");const p=r.viewport;return m(),p.addEventListener("scroll",m),()=>p.removeEventListener("scroll",m)}},[r.viewport,r.isPositioned]),l?s.jsx(ID,{...t,ref:d,onAutoScroll:()=>{const{viewport:m,selectedItem:p}=r;m&&p&&(m.scrollTop=m.scrollTop-p.offsetHeight)}}):null},"SelectScrollUpButton")),ET="SelectScrollDownButton",_D=h.forwardRef(ot(function(t,n){const r=gl(ET,t.__scopeSelect),o=SS(ET,t.__scopeSelect),[l,c]=h.useState(!1),d=Qe(n,o.onScrollButtonChange);return Vt(()=>{if(r.viewport&&r.isPositioned){let m=function(){const y=p.scrollHeight-p.clientHeight,g=Math.ceil(p.scrollTop)<y;c(g)};ot(m,"handleScroll");const p=r.viewport;return m(),p.addEventListener("scroll",m),()=>p.removeEventListener("scroll",m)}},[r.viewport,r.isPositioned]),l?s.jsx(ID,{...t,ref:d,onAutoScroll:()=>{const{viewport:m,selectedItem:p}=r;m&&p&&(m.scrollTop=m.scrollTop+p.offsetHeight)}}):null},"SelectScrollDownButton")),ID=h.forwardRef(ot(function(t,n){const{__scopeSelect:r,onAutoScroll:o,...l}=t,c=gl("SelectScrollButton",r),d=h.useRef(null),m=Xh(r),p=h.useCallback(()=>{d.current!==null&&(window.clearInterval(d.current),d.current=null)},[]);return h.useEffect(()=>()=>
53p(),[p]),Vt(()=>{m().find(g=>g.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[m]),s.jsx(Ge.div,{"aria-hidden":!0,...l,ref:n,style:{flexShrink:0,...l.style},onPointerDown:je(l.onPointerDown,()=>{d.current===null&&(d.current=window.setInterval(o,50))}),onPointerMove:je(l.onPointerMove,()=>{c.onItemLeave?.(),d.current===null&&(d.current=window.setInterval(o,50))}),onPointerLeave:je(l.onPointerLeave,()=>{p()})})},"SelectScrollButtonImpl")),MD=h.forwardRef(ot(function(t,n){const{__scopeSelect:r,...o}=t;return s.jsx(Ge.div,{"aria-hidden":!0,...o,ref:n})},"SelectSeparator")),Wie="SelectBubbleInput",Qie=h.forwardRef(ot(function({__scopeSelect:t,...n},r){const o=lo(Wie,t),{value:l,onValueChange:c,required:d,disabled:m,name:p,autoComplete:y,form:g}=o,{nativeOptions:v,nativeSelectKey:b}=o,S=h.useRef(null),C=Qe(r,S),N=l??"",A=ND(N),T=Array.from(v).some(E=>(E.props.value??"")==="");return h.useEffect(()=>{const E=S.current;if(!E)return;const j=window.HTMLSelectElement.prototype,R=Object.getOwnPropertyDescriptor(j,"value").set;if(A!==N&&R){const P=new Event("change",{bubbles:!0});R.call(E,N),E.dispatchEvent(P)}},[A,N]),s.jsxs(Ge.select,{"aria-hidden":!0,required:d,tabIndex:-1,name:p,autoComplete:y,disabled:m,form:g,onChange:E=>c(E.target.value),...n,style:{...m_,...n.style},ref:C,defaultValue:N,children:[df(l)&&!T?s.jsx("option",{value:""}):null,Array.from(v)]},b)},"SelectBubbleInput"));function DD(e){return typeof e=="function"}ot(DD,"isFunction");function df(e){return e===""||e===void 0}ot(df,"shouldShowPlaceholder");function CS(e){const t=Jr(e),n=h.useRef(""),r=h.useRef(0),o=h.useCallback(c=>{const d=n.current+c;t(d),ot((function m(p){n.current=p,window.clearTimeout(r.current),p!==""&&(r.current=window.setTimeout(()=>m(""),1e3))}),"updateSearch")(d)},[t]),l=h.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return h.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,l]}ot(CS,"useTypeaheadSearch");function NS(e,t,n){const o=t.length>1&&Array.from(t).every(p=>p===t[0])?t[0]:t,l=n?e.indexOf(n):-1;let c=LD(e,Math.max(l,0));o.length===1&&(c=c.filter(p=>p!==n));const m=c.find(p=>p.textValue.toLowerCase().startsWith(o.toLowerCase()));return m!==n?m:void 0}ot(NS,"findNextItem");function LD(e,t){return e.map((n,r)=>e[(t+r)%e.length])}ot(LD,"wrapArray");const qD=jie,UD=Rie,AS=h.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(ED,{ref:r,className:Y("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,s.jsx(Pie,{asChild:!0,children:s.jsx(dl,{className:"h-4 w-4 opacity-50"})})]}));AS.displayName=ED.displayName;const zD=h.forwardRef(({className:e,...t},n)=>s.jsx(OD,{ref:n,className:Y("flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(iU,{className:"h-4 w-4"})}));zD.displayName=OD.displayName;const VD=h.forwardRef(({className:e,...t},n)=>s.jsx(_D,{ref:n,className:Y("flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(dl,{className:"h-4 w-4"})}));VD.displayName=_D.displayName;const ES=h.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>s.jsx(Mie,{children:s.jsxs(jD,{ref:o,className:Y("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[s.jsx(zD,{}),s.jsx(Vie,{className:Y("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),s.jsx(VD,{})]})}));ES.displayName=jD.displayName;const Xie=h.forwardRef(({className:e,...t},n)=>s.jsx(kD,{ref:n,className:Y("px-2 py-1.5 text-sm font-semibold",e),...t}));Xie.displayName=kD.displayName;const Go=h.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(PD,{ref:r,className:Y("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[s.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(Yie,{children:s.jsx(mn,{className:"h-4 w-4"})})}),s.jsx(Gie,{children:t})]}));Go.displayName=PD.displayName;const Zie=h.forwardRef(({className:e,...t},n)=>s.jsx(MD,{ref:n,className:Y("-mx-1 my-1 h-px bg-muted",e),...t}));Zie.displayName=MD.displayName;const Zb="vp_view_as_partner";function Jie(){const e=new RegExp(`(?:^|;\\s*)${Zb}=(\\d{1,9})(?:\\s*;|$)`).exec(document.cookie),t=e?Number(e[1]):NaN;return Number.isInteger(t)&&t>0?t:null}function jT(e){const{hostname:t,protocol:n}=window.location,r=t.split(".").slice(-2).join("."),o=t.includes(".")?`; domain=.${r}`:"";return`; path=/; max-age=${e}; SameSite=Lax${n==="https:"?"; Secure":""}${o}`}function eoe(){const[e,t]=h.useState(()=>typeof document>"u"?null:Jie()),[n,r]=h.useState(null);if(h.useEffect(()=>{e!=null&&fetch("/api/partners/view-as/options",{credentials:"include"}).then(m=>m.ok?m.json():Promise.reject(new Error(String(m.status)))).then(m=>r(m.partners)).catch(()=>r(null))},[e]),e==null||n===null)return null;const o=n.find(m=>m.id===e),l=o?.name||o?.email||`Partner #${e}`;function c(m){document.cookie=`${Zb}=${m}${jT(14400)}`,t(m),window.location.href="/partners/portal"}function d(){document.cookie=`${Zb}=${jT(0)}`,t(null),window.location.reload()}return s.jsxs("div",{className:"fixed inset-x-0 top-0 z-[100] flex flex-wrap items-center justify-center gap-x-3 gap-y-1 bg-indigo-600 px-4 py-1.5 text-center text-sm font-medium text-white",role:"status",children:[s.jsxs("span",{children:["Admin partner view - seeing the portal of ",s.jsx("strong",{children:l})," (read-only)."]}),s.jsxs("div",{className:"inline-flex items-center gap-1.5",children:[s.jsx("span",{className:"text-xs opacity-80",children:"Switch:"}),s.jsxs(qD,{value:String(e),onValueChange:m=>c(Number(m)),children:[s.jsx(AS,{"aria-label":"Switch partner",className:"max-w-48 rounded bg-white/15 px-1.5 py-0.5 text-sm text-white",children:s.jsx(UD,{})}
53),s.jsxs(ES,{children:[!o&&s.jsxs(Go,{value:String(e),children:["Partner #",e]}),n.map(m=>s.jsx(Go,{value:String(m.id),children:m.name||m.email},m.id))]})]})]}),s.jsx("button",{type:"button",onClick:d,className:"rounded bg-white/15 px-2 py-0.5 font-semibold underline underline-offset-2 hover:bg-white/25",children:"Exit partner view"})]})}const TT="vp-verify-banner-dismissed";function toe(){const{isAuthenticated:e,isLoading:t,emailVerified:n,user:r}=Bt(),{toast:o}=Nr(),[l]=Hn(),[c,d]=h.useState(()=>{try{return sessionStorage.getItem(TT)==="1"}catch{return!1}}),[m,p]=h.useState(!1),[y,g]=h.useState(!1);if(t||!e||n||!r?.email||c||l.startsWith("/verify-email"))return null;const v=()=>{try{sessionStorage.setItem(TT,"1")}catch{}d(!0)},b=async()=>{p(!0);try{const{error:S}=await cr.sendVerificationEmail({email:r.email,callbackURL:"/verify-email"});if(S){o({title:"Couldn't send verification email",description:S.message??"Please try again in a moment.",variant:"destructive"});return}g(!0),o({title:"Verification email sent",description:"Check your inbox (and spam folder) for the link."})}finally{p(!1)}};return s.jsx("div",{className:"bg-amber-tint/60 text-ink ring-1 ring-amber/20","data-testid":"banner-email-verification",role:"status",children:s.jsxs("div",{className:"mx-auto flex max-w-[var(--vp-content-max)] items-center gap-2 px-4 py-1.5 text-xs",children:[s.jsx(oU,{className:"size-3.5 shrink-0 text-amber","aria-hidden":"true"}),s.jsxs("p",{className:"min-w-0 flex-1 truncate",children:["Confirm your email - we sent a verification link to"," ",s.jsx("span",{className:"font-medium",children:r.email}),"."]}),y?s.jsx("span",{className:"shrink-0 font-medium text-primary","data-testid":"text-banner-resent",children:"Sent"}):s.jsxs("button",{type:"button",onClick:b,disabled:m,className:"inline-flex shrink-0 items-center gap-1 font-medium text-primary hover:underline disabled:opacity-60","data-testid":"button-banner-resend-verification",children:[s.jsx(S2,{className:`size-3 ${m?"animate-spin":""}`,"aria-hidden":"true"}),m?"Sendingâ¦":"Resend"]}),s.jsx("button",{type:"button",onClick:v,"aria-label":"Dismiss email verification notice",className:"shrink-0 rounded p-0.5 text-ink-3 hover:text-ink","data-testid":"button-dismiss-verify-banner",children:s.jsx(ro,{className:"size-3.5","aria-hidden":"true"})})]})})}function noe(e){return e==="/cart"||e.startsWith("/checkout")||e.startsWith("/order-confirmation")||e.startsWith("/products")||e.startsWith("/categories")||e.startsWith("/play/")}function roe({children:e}){const[t]=Hn(),n=h.useRef(null);kte(n),h.useEffect(()=>{if(typeof document>"u")return;const o=window.setTimeout(()=>{!document.querySelector('[data-radix-popper-content-wrapper], [role="dialog"][data-state="open"], [data-state="open"][role="menu"]')&&document.body.style.pointerEvents==="none"&&(document.body.style.pointerEvents="")},0);return()=>window.clearTimeout(o)},[t]);const r=t.startsWith("/play/");return s.jsx(Mte,{children:s.jsxs("div",{className:"flex min-h-screen flex-col bg-background",children:[s.jsx(hie,{}),s.jsx(eoe,{}),s.jsx(pie,{}),s.jsxs("div",{ref:n,className:"sticky top-0 z-50 pt-[env(safe-area-inset-top)]",children:[s.jsx(rne,{compact:!0,dismissible:!noe(t)}),s.jsx(ise,{}),s.jsx(toe,{}),s.jsx(gae,{})]}),s.jsxs("main",{className:r?"flex-1":"flex-1 pb-[calc(var(--vp-tabbar-h)+env(safe-area-inset-bottom))] shell:pb-0",children:[e,!r&&s.jsx(die,{})]}),!r&&s.jsx(Qne,{}),s.jsx(rie,{}),s.jsx(Sse,{}),!t.startsWith("/promo")&&!t.startsWith("/play/")&&s.jsx(Gae,{}),!t.startsWith("/suppliers")&&!t.startsWith("/promo")&&!t.startsWith("/forward")&&!t.startsWith("/play/")&&s.jsx(ase,{}),s.jsx(hse,{})]})})}function qt({children:e}){const{isAuthenticated:t,isLoading:n}=Bt(),[r,o]=Hn(),l=M0();return h.useEffect(()=>{if(!n&&!t){const c=encodeURIComponent(l?`${r}?${l}`:r);o(`/login?redirect=${c}`)}},[n,t,r,l,o]),n||!t?s.jsxs("div",{className:"mx-auto w-full max-w-[var(--vp-content-max)] px-5 py-16","aria-busy":"true",children:[s.jsx("span",{role:"status",className:"sr-only",children:"Checking your sessionâ¦"}),s.jsx("div",{className:"vp-glass h-40 animate-pulse rounded-card"})]}):s.jsx(s.Fragment,{children:e})}function aoe(){return s.jsx("div",{className:"flex min-h-[60vh] w-full items-center justify-center bg-background px-4",children:s.jsxs("div",{className:"vp-glass w-full max-w-md rounded-card p-6",children:[s.jsxs("div",{className:"mb-4 flex items-center gap-2",children:[s.jsx(lU,{className:"h-8 w-8 text-danger","aria-hidden":"true"}),s.jsx("h1",{className:"font-display text-t3 text-ink",children:"404: Page not found"})]}),s.jsx("p",{className:"mt-2 text-sm text-ink-2",children:"The page you're looking for doesn't exist or has moved."}),s.jsx(Ue,{href:"/",className:"mt-4 inline-block text-sm font-semibold text-primary hover:text-primary/80",children:"Back to home"})]})})}const BD=h.createContext({});function jc(e){const t=h.useRef(null);return t.current===null&&(t.current=e()),t.current}const soe=typeof window<"u",jS=soe?h.useLayoutEffect:h.useEffect,TS=h.createContext(null);function kS(e,t){e.indexOf(t)===-1&&e.push(t)}function Zp(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Ya=(e,t,n)=>n>t?t:n<e?e:n;let Zh=()=>{};const to={},FD=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),$D=e=>typeof e=="object"&&e!==null,HD=e=>/^0[^.\s]+$/u.test(e);function GD(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ir=e=>e,ff=(...e)=>e.reduce((t,n)=>r=>n(t(r))),Tc=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1};class RS{constructor(){this.subscriptions=[]}add(t){return kS(this.subscriptions,t),()=>Zp(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let l=0;l<o;l++){const c=this.subscriptions[l];c&&c(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Xr=e=>e*1e3,pa=e=>e/1e3,PS=(e,t)=>t?e*(1e3/t):0,KD=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,ioe=1e-7,ooe=12;function loe(e,t,n,r,o){let l,c,d=0;do c=t+(n-t)/2,l=KD(c,r,o)-e,l>0?n=c:t=c;while(Math.abs(l)>ioe&&++d<ooe);return c}function mf(e,t,n,r){if(e===t&&n===r)return Ir;
vendor: 97,369 bytes, line 53
53const o=l=>loe(l,0,1,e,n);return l=>l===0||l===1?l:KD(o(l),t,r)}const YD=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,WD=e=>t=>1-e(1-t),QD=mf(.33,1.53,.69,.99),OS=WD(QD),XD=YD(OS),ZD=e=>e>=1?1:(e*=2)<1?.5*OS(e):.5*(2-Math.pow(2,-10*(e-1))),_S=e=>1-Math.sin(Math.acos(e)),JD=WD(_S),eL=YD(_S),coe=mf(.42,0,1,1),uoe=mf(0,0,.58,1),tL=mf(.42,0,.58,1),doe=e=>Array.isArray(e)&&typeof e[0]!="number",nL=e=>Array.isArray(e)&&typeof e[0]=="number",foe={linear:Ir,easeIn:coe,easeInOut:tL,easeOut:uoe,circIn:_S,circInOut:eL,circOut:JD,backIn:OS,backInOut:XD,backOut:QD,anticipate:ZD},moe=e=>typeof e=="string",kT=e=>{if(nL(e)){Zh(e.length===4);const[t,n,r,o]=e;return mf(t,n,r,o)}else if(moe(e))return foe[e];return e},Wm=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function poe(e){let t=new Set,n=new Set,r=!1,o=!1;const l=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1};function d(p){l.has(p)&&(m.schedule(p),e()),p(c)}const m={schedule:(p,y=!1,g=!1)=>{const b=g&&r?t:n;return y&&l.add(p),b.add(p),p},cancel:p=>{n.delete(p),l.delete(p)},process:p=>{if(c=p,r){o=!0;return}r=!0;const y=t;t=n,n=y,t.forEach(d),t.clear(),r=!1,o&&(o=!1,m.process(p))}};return m}const hoe=40;function rL(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},l=()=>n=!0,c=Wm.reduce((E,j)=>(E[j]=poe(l),E),{}),{setup:d,read:m,resolveKeyframes:p,preUpdate:y,update:g,preRender:v,render:b,postRender:S}=c,C=()=>{const E=to.useManualTiming,j=E?o.timestamp:performance.now();n=!1,E||(o.delta=r?1e3/60:Math.max(Math.min(j-o.timestamp,hoe),1)),o.timestamp=j,o.isProcessing=!0,d.process(o),m.process(o),p.process(o),y.process(o),g.process(o),v.process(o),b.process(o),S.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(C))},N=()=>{n=!0,r=!0,o.isProcessing||e(C)};return{schedule:Wm.reduce((E,j)=>{const _=c[j];return E[j]=(R,P=!1,M=!1)=>(n||N(),_.schedule(R,P,M)),E},{}),cancel:E=>{for(let j=0;j<Wm.length;j++)c[Wm[j]].cancel(E)},state:o,steps:c}}const{schedule:mt,cancel:ba,state:Vn,steps:Xx}=rL(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ir,!0);let hp;function goe(){hp=void 0}const wr={now:()=>(hp===void 0&&wr.set(Vn.isProcessing||to.useManualTiming?Vn.timestamp:performance.now()),hp),set:e=>{hp=e,queueMicrotask(goe)}},aL=e=>t=>typeof t=="string"&&t.startsWith(e),sL=aL("--"),yoe=aL("var(--"),IS=e=>yoe(e)?xoe.test(e.split("/*")[0].trim()):!1,xoe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function RT(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Yc={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Gd={...Yc,transform:e=>Ya(0,1,e)},Qm={...Yc,default:1},kd=e=>Math.round(e*1e5)/1e5,MS=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function voe(e){return e==null}const boe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,DS=(e,t)=>n=>!!(typeof n=="string"&&boe.test(n)&&n.startsWith(e)||t&&!voe(n)&&Object.prototype.hasOwnProperty.call(n,t)),iL=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,l,c,d]=r.match(MS);return{[e]:parseFloat(o),[t]:parseFloat(l),[n]:parseFloat(c),alpha:d!==void 0?parseFloat(d):1}},woe=e=>Ya(0,255,e),Zx={...Yc,transform:e=>Math.round(woe(e))},Ko={test:DS("rgb","red"),parse:iL("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Zx.transform(e)+", "+Zx.transform(t)+", "+Zx.transform(n)+", "+kd(Gd.transform(r))+")"};function Soe(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Jb={test:DS("#"),parse:Soe,transform:Ko.transform},pf=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),$s=pf("deg"),bs=pf("%"),Re=pf("px"),Coe=pf("vh"),Noe=pf("vw"),PT={...bs,parse:e=>bs.parse(e)/100,transform:e=>bs.transform(e*100)},mc={test:DS("hsl","hue"),parse:iL("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+bs.transform(kd(t))+", "+bs.transform(kd(n))+", "+kd(Gd.transform(r))+")"},Sn={test:e=>Ko.test(e)||Jb.test(e)||mc.test(e),parse:e=>Ko.test(e)?Ko.parse(e):mc.test(e)?mc.parse(e):Jb.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ko.transform(e):mc.transform(e),getAnimatableNone:e=>{const t=Sn.parse(e);return t.alpha=0,Sn.transform(t)}},Aoe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Eoe(e){return isNaN(e)&&typeof e=="string"&&(e.match(MS)?.length||0)+(e.match(Aoe)?.length||0)>0}const oL="number",lL="color",joe="var",Toe="var(",OT="${}",koe=/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 kc(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let l=0;const d=t.replace(koe,m=>(Sn.test(m)?(r.color.push(l),o.push(lL),n.push(Sn.parse(m))):m.startsWith(Toe)?(r.var.push(l),o.push(joe),n.push(m)):(r.number.push(l),o.push(oL),n.push(parseFloat(m))),++l,OT)).split(OT);return{values:n,split:d,indexes:r,types:o}}function Roe(e){return kc(e).values}function cL({split:e,types:t}){const n=e.length;return r=>{let o="";for(let l=0;l<n;l++)if(o+=e[l],r[l]!==void 0){const c=t[l];c===oL?o+=kd(r[l]):c===lL?o+=Sn.transform(r[l]):o+=r[l]}return o}}function Poe(e){return cL(kc(e))}const Ooe=e=>typeof e=="number"?0:Sn.test(e)?Sn.getAnimatableNone(e):e,_oe=(e,t)=>typeof e=="number"?t?.trim().endsWith("/")?e:0:Ooe(e);function Ioe(e){const t=kc(e);return cL(t)(t.values.map((r,o)=>_oe(r,t.split[o])))}const $a={test:Eoe,parse:Roe,createTransformer:Poe,getAnimatableNone:Ioe};function Jx(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Moe({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,l=0,c=0;if(!t)o=l=c=n;else{const d=n<.5?n*(1+t):n+t-n*t,m=2*n-d;o=Jx(m,d,e+1/3),l=Jx(m,d,e),c=Jx(m,d,e-1/3)}return{red:Math.round(o*255),green:Math.round(l*255),blue:Math.round(c*255),alpha:r}}function Jp(e,t){return n=>n>0?t:e}const Mt=(e,t,n)=>e+(t-e)*n,ev=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},Doe=[Jb,Ko,mc],Loe=e=>Doe.find(t=>t.test(e));function _T(e){const t=Loe(e);if(!t)return!1;let n=t.parse(e);return t===mc&&(n=Moe(n)),n}const IT=(e,t)=>{const n=_T(e),r=_T(t);if(!n||!r)return Jp(e,t);const o={...n};return l=>(o.red=ev(n.red,r.red,l),o.green=ev(n.green,r.green,l),o.blue=ev(n.blue,r.blue,l),o.alpha=Mt(n.alpha,r.alpha,l),Ko.transform(o))},e0=new Set(["none","hidden"]);function qoe(e,t){return e0.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Uoe(e,t){return n=>Mt(e,t,n)}function LS(e){return typeof e=="number"?Uoe:typeof e=="string"?IS(e)?Jp:Sn.test(e)?IT:Boe:Array.isArray(e)?uL:typeof e=="object"?Sn.test(e)?IT:zoe:Jp}function uL(e,t){const n=[...e],r=n.length,o=e.map((l,c)=>LS(l)(l,t[c]));return l=>{for(let c=0;c<r;c++)n[c]=o[c](l);return n}}function zoe(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=LS(e[o])(e[o],t[o]));return o=>{for(const l in r)n[l]=r[l](o);return n}}function Voe(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const l=t.types[o],c=e.indexes[l][r[l]],d=e.values[c]??0;n[o]=d,r[l]++}return n}const Boe=(e,t)=>{const n=$a.createTransformer(t),r=kc(e),o=kc(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?e0.has(e)&&!o.values.length||e0.has(t)&&!r.values.length?qoe(e,t):ff(uL(Voe(r,o),o.values),n):Jp(e,t)};function dL(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Mt(e,t,n):LS(e)(e,t)}const Foe=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>mt.update(t,n),stop:()=>ba(t),now:()=>Vn.isProcessing?Vn.timestamp:wr.now()}},fL=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let l=0;l<o;l++)r+=Math.round(e(l/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},eh=2e4;function qS(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<eh;)t+=n,r=e.next(t);return t>=eh?1/0:t}function $oe(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(qS(r),eh);return{type:"keyframes",ease:l=>r.next(o*l).value/t,duration:pa(o)}}const nn={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function t0(e,t){return e*Math.sqrt(1-t*t)}const Hoe=12;function Goe(e,t,n){let r=n;for(let o=1;o<Hoe;o++)r=r-e(r)/t(r);return r}const tv=.001;function Koe({duration:e=nn.duration,bounce:t=nn.bounce,velocity:n=nn.velocity,mass:r=nn.mass}){let o,l,c=1-t;c=Ya(nn.minDamping,nn.maxDamping,c),e=Ya(nn.minDuration,nn.maxDuration,pa(e)),c<1?(o=p=>{const y=p*c,g=y*e,v=y-n,b=t0(p,c),S=Math.exp(-g);return tv-v/b*S},l=p=>{const g=p*c*e,v=g*n+n,b=Math.pow(c,2)*Math.pow(p,2)*e,S=Math.exp(-g),C=t0(Math.pow(p,2),c);return(-o(p)+tv>0?-1:1)*((v-b)*S)/C}):(o=p=>{const y=Math.exp(-p*e),g=(p-n)*e+1;return-tv+y*g},l=p=>{const y=Math.exp(-p*e),g=(n-p)*(e*e);return y*g});const d=5/e,m=Goe(o,l,d);if(e=Xr(e),isNaN(m))return{stiffness:nn.stiffness,damping:nn.damping,duration:e};{const p=Math.pow(m,2)*r;return{stiffness:p,damping:c*2*Math.sqrt(r*p),duration:e}}}const Yoe=["duration","bounce"],Woe=["stiffness","damping","mass"];function MT(e,t){return t.some(n=>e[n]!==void 0)}function Qoe(e){let t={velocity:nn.velocity,stiffness:nn.stiffness,damping:nn.damping,mass:nn.mass,isResolvedFromDuration:!1,...e};if(!MT(e,Woe)&&MT(e,Yoe))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,l=2*Ya(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:nn.mass,stiffness:o,damping:l}}else{const n=Koe({...e,velocity:0});t={...t,...n,mass:nn.mass},t.isResolvedFromDuration=!0}return t}function th(e=nn.visualDuration,t=nn.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const l=n.keyframes[0],c=n.keyframes[n.keyframes.length-1],d={done:!1,value:l},{stiffness:m,damping:p,mass:y,duration:g,velocity:v,isResolvedFromDuration:b}=Qoe({...n,velocity:-pa(n.velocity||0)}),S=v||0,C=p/(2*Math.sqrt(m*y)),N=c-l,A=pa(Math.sqrt(m/y)),T=Math.abs(N)<5;r||(r=T?nn.restSpeed.granular:nn.restSpeed.default),o||(o=T?nn.restDelta.granular:nn.restDelta.default);let E,j,_,R,P,M;if(C<1)_=t0(A,C),R=(S+C*A*N)/_,E=U=>{const V=Math.exp(-C*A*U);return c-V*(R*Math.sin(_*U)+N*Math.cos(_*U))},P=C*A*R+N*_,M=C*A*N-R*_,j=U=>Math.exp(-C*A*U)*(P*Math.sin(_*U)+M*Math.cos(_*U));else if(C===1){E=V=>c-Math.exp(-A*V)*(N+(S+A*N)*V);const U=S+A*N;j=V=>Math.exp(-A*V)*(A*U*V-S)}else{const U=A*Math.sqrt(C*C-1);E=H=>{const Q=Math.exp(-C*A*H),I=Math.min(U*H,300);return c-Q*((S+C*A*N)*Math.sinh(I)+U*N*Math.cosh(I))/U};const V=(S+C*A*N)/U,$=C*A*V-N*U,L=C*A*N-V*U;j=H=>{const Q=Math.exp(-C*A*H),I=Math.min(U*H,300);return Q*($*Math.sinh(I)+L*Math.cosh(I))}}const q={calculatedDuration:b&&g||null,velocity:U=>Xr(j(U)),next:U=>{if(!b&&C<1){const $=Math.exp(-C*A*U),L=Math.sin(_*U),H=Math.cos(_*U),Q=c-$*(R*L+N*H),I=Xr($*(P*L+M*H));return d.done=Math.abs(I)<=r&&Math.abs(c-Q)<=o,d.value=d.done?c:Q,d}const V=E(U);if(b)d.done=U>=g;else{const $=Xr(j(U));d.done=Math.abs($)<=r&&Math.abs(c-V)<=o}return d.value=d.done?c:V,d},toString:()=>{const U=Math.min(qS(q),eh),V=fL($=>q.next(U*$).value,U,30);return U+"ms "+V},toTransition:()=>{}};return q}th.applyToOptions=e=>{const t=$oe(e,100,th);return e.ease=t.ease,e.duration=Xr(t.duration),e.type="keyframes",e};const Xoe=5;function mL(e,t,n){const r=Math.max(t-Xoe,0);return PS(n-e(r),t-r)}function n0({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:l=500,modifyTarget:c,min:d,max:m,restDelta:p=.5,restSpeed:y}){const g=e[0],v={done:!1,value:g},b=M=>d!==void 0&&M<d||m!==void 0&&M>m,S=M=>d===void 0?m:m===void 0||Math.abs(d-M)<Math.abs(m-M)?d:m;let C=n*t;const N=g+C,A=c===void 0?N:c(N);A!==N&&(C=A-g);const T=M=>-C*Math.exp(-M/r),E=M=>A+T(M),j=M=>{const q=T(M),U=E(M);v.done=Math.abs(q)<=p,v.value=v.done?A:U};let _,R;const P=M=>{b(v.value)&&(_=M,R=th({keyframes:[v.value,S(v.value)],velocity:mL(E,M,v.value),damping:o,stiffness:l,restDelta:p,restSpeed:y}))};return P(0),{calculatedDuration:null,next:M=>{let q=!1;return!R&&_===void 0&&(q=!0,j(M),P(M)),_!==void 0&&M>=_?R.next(M-_):(!q&&j(M),v)}}}function Zoe(e,t,n){const r=[],o=n||to.mix||dL,l=e.length-1;for(let c=0;c<l;c++){let d=o(e[c],e[c+1]);if(t){const m=Array.isArray(t)?t[c]||Ir:t;d=ff(m,d)}r.push(d)}return r}function US(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const l=e.length;if(Zh(l===t.length),l===1)return()=>t[0];if(l===2&&t[0]===t[1])return()=>t[1];const c=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),t=[...t].reverse());const d=Zoe(t,r,o),m=d.length,p=y=>{if(c&&y<e[0])return t[0];let g=0;if(m>1)for(;g<e.length-2&&!(y<e[g+1]);g++);const v=Tc(e[g],e[g+1],y);return d[g](v)};return n?y=>p(Ya(e[0],e[l-1],y)):p}function Joe(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Tc(0,t,r);e.push(Mt(n,1,o))}}function pL(e){const t=[0];return Joe(t,e.length-1),t}function ele(e,t){return e.map(n=>n*t)}function tle(e,t){return e.map(()=>t||tL).splice(0,e.length-1)}function Rd({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=doe(r)?r.map(kT):kT(r),l={done:!1,value:t[0]},c=ele(n&&n.length===t.length?n:pL(t),e),d=US(c,t,{ease:Array.isArray(o)?o:tle(t,o)});return{calculatedDuration:e,next:m=>(l.value=d(m),l.done=m>=e,l)}}const nle=e=>e!==null;function Jh(e,{repeat:t,repeatType:n="loop"},r,o=1){const l=e.filter(nle),d=o<0||t&&n!=="loop"&&t%2===1?0:l.length-1;return!d||r===void 0?l[d]:r}const rle={decay:n0,inertia:n0,tween:Rd,keyframes:Rd,spring:th};function hL(e){typeof e.type=="string"&&(e.type=rle[e.type])}class zS{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const ale=e=>e/100;class nh extends zS{constructor(t){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=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==wr.now()&&this.tick(wr.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;hL(t);const{type:n=Rd,repeat:r=0,repeatDelay:o=0,repeatType:l,velocity:c=0}=t;let{keyframes:d}=t;const m=n||Rd;m!==Rd&&typeof d[0]!="number"&&(this.mixKeyframes=ff(ale,dL(d[0],d[1])),d=[0,100]);const p=m({...t,keyframes:d});l==="mirror"&&(this.mirroredGenerator=m({...t,keyframes:[...d].reverse(),velocity:-c})),p.calculatedDuration===null&&(p.calculatedDuration=qS(p));const{calculatedDuration:y}=p;this.calculatedDuration=y,this.resolvedDuration=y+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=p}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:l,mirroredGenerator:c,resolvedDuration:d,calculatedDuration:m}=this;if(this.startTime===null)return r.next(0);const{delay:p=0,keyframes:y,repeat:g,repeatType:v,repeatDelay:b,type:S,onUpdate:C,finalKeyframe:N}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const A=this.currentTime-p*(this.playbackSpeed>=0?1:-1),T=this.playbackSpeed>=0?A<0:A>o;this.currentTime=Math.max(A,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let E=this.currentTime,j=r;if(g){const M=Math.min(this.currentTime,o)/d;let q=Math.floor(M),U=M%1;!U&&M>=1&&(U=1),U===1&&q--,q=Math.min(q,g+1),q%2&&(v==="reverse"?(U=1-U,b&&(U-=b/d)):v==="mirror"&&(j=c)),E=Ya(0,1,U)*d}let _;T?(this.delayState.value=y[0],_=this.delayState):_=j.next(E),l&&!T&&(_.value=l(_.value));let{done:R}=_;!T&&m!==null&&(R=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const P=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&R);return P&&S!==n0&&(_.value=Jh(y,this.options,N,this.speed)),C&&C(_.value),P&&this.finish(),_}then(t,n){return this.finished.then(t,n)}get duration(){return pa(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+pa(t)}get time(){return pa(this.currentTime)}set time(t){t=Xr(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return mL(r=>this.generator.next(r).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(wr.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=pa(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Foe,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(wr.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function sle(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Yo=e=>e*180/Math.PI,r0=e=>{const t=Yo(Math.atan2(e[1],e[0]));return a0(t)},ile={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:r0,rotateZ:r0,skewX:e=>Yo(Math.atan(e[1])),skewY:e=>Yo(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},a0=e=>(e=e%360,e<0&&(e+=360),e),DT=r0,LT=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),qT=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),ole={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:LT,scaleY:qT,scale:e=>(LT(e)+qT(e))/2,rotateX:e=>a0(Yo(Math.atan2(e[6],e[5]))),rotateY:e=>a0(Yo(Math.atan2(-e[2],e[0]))),rotateZ:DT,rotate:DT,skewX:e=>Yo(Math.atan(e[4])),skewY:e=>Yo(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function s0(e){return e.includes("scale")?1:0}function i0(e,t){if(!e||e==="none")return s0(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=ole,o=n;else{const d=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=ile,o=d}if(!o)return s0(t);const l=r[t],c=o[1].split(",").map(cle);return typeof l=="function"?l(c):c[l]}const lle=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return i0(n,t)};function cle(e){return parseFloat(e.trim())}const Wc=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Qc=new Set([...Wc,"pathRotation"]),UT=e=>e===Yc||e===Re,ule=new Set(["x","y","z"]),dle=Wc.filter(e=>!ule.has(e));function fle(e){const t=[];return dle.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Ki={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const o=e.max-e.min;return r==="border-box"?o:o-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const o=e.max-e.min;return r==="border-box"?o:o-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>i0(t,"x"),y:(e,{transform:t})=>i0(t,"y")};Ki.translateX=Ki.x;Ki.translateY=Ki.y;const Xo=new Set;let o0=!1,l0=!1,c0=!1;function gL(){if(l0){const e=Array.from(Xo).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=fle(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([l,c])=>{r.getValue(l)?.set(c)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}l0=!1,o0=!1,Xo.forEach(e=>e.complete(c0)),Xo.clear()}function yL(){Xo.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(l0=!0)})}function mle(){c0=!0,yL(),gL(),c0=!1}class VS{constructor(t,n,r,o,l,c=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=l,this.isAsync=c}scheduleResolve(){this.state="scheduled",this.isAsync?(Xo.add(this),o0||(o0=!0,mt.read(yL),mt.resolveKeyframes(gL))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const l=o?.get(),c=t[t.length-1];if(l!==void 0)t[0]=l;else if(r&&n){const d=r.readValue(n,c);d!=null&&(t[0]=d)}t[0]===void 0&&(t[0]=c),o&&l===void 0&&o.set(t[0])}sle(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Xo.delete(this)}cancel(){this.state==="scheduled"&&(Xo.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const ple=e=>e.startsWith("--");function xL(e,t,n){ple(t)?e.style.setProperty(t,n):e.style[t]=n}const hle={};function BS(e,t){const n=GD(e);return()=>hle[t]??n()}const FS=BS(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),vL=BS(()=>window.ViewTimeline!==void 0,"viewTimeline"),bL=BS(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),wd=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,zT={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:wd([0,.65,.55,1]),circOut:wd([.55,0,1,.45]),backIn:wd([.31,.01,.66,-.59]),backOut:wd([.33,1.53,.69,.99])};function wL(e,t){if(e)return typeof e=="function"?bL()?fL(e,t):"ease-out":nL(e)?wd(e):Array.isArray(e)?e.map(n=>wL(n,t)||zT.easeOut):zT[e]}function gle(e,t,n,{delay:r=0,duration:o=300,repeat:l=0,repeatType:c="loop",ease:d="easeOut",times:m}={},p=void 0){const y={[t]:n};m&&(y.offset=m);const g=wL(d,o);Array.isArray(g)&&(y.easing=g);const v={delay:r,duration:o,easing:Array.isArray(g)?"linear":g,fill:"both",iterations:l+1,direction:c==="reverse"?"alternate":"normal"};return p&&(v.pseudoElement=p),e.animate(y,v)}function SL(e){return typeof e=="function"&&"applyToOptions"in e}function yle({type:e,...t}){return SL(e)&&bL()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class CL extends zS{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:l,allowFlatten:c=!1,finalKeyframe:d,onComplete:m}=t;this.isPseudoElement=!!l,this.allowFlatten=c,this.options=t,Zh(typeof t.type!="string");const p=yle(t);this.animation=gle(n,r,o,p,l),p.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!l){const y=Jh(o,this.options,d,this.speed);this.updateMotionValue&&this.updateMotionValue(y),xL(n,r,y),this.animation.cancel()}m?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return pa(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+pa(t)}get time(){return pa(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Xr(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:r,observe:o}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&FS()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),Ir):o(this)}}const NL={anticipate:ZD,backInOut:XD,circInOut:eL};function xle(e){return e in NL}function vle(e){typeof e.ease=="string"&&xle(e.ease)&&(e.ease=NL[e.ease])}const nv=10;class ble extends CL{constructor(t){vle(t),hL(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:l,...c}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const d=new nh({...c,autoplay:!1}),m=Math.max(nv,wr.now()-this.startTime),p=Ya(0,nv,m-nv),y=d.sample(m).value,{name:g}=this.options;l&&g&&xL(l,g,y),n.setWithVelocity(d.sample(Math.max(0,m-p)).value,y,p),d.stop()}}const VT=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&($a.test(e)||e==="0")&&!e.startsWith("url("));function wle(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Sle(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const l=e[e.length-1],c=VT(o,t),d=VT(l,t);return!c||!d?!1:wle(e)||(n==="spring"||SL(n))&&r}function u0(e){e.duration=0,e.type="keyframes"}const AL=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Cle=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Nle(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&Cle.test(e[t]))return!0;return!1}const Ale=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Ele=GD(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function jle(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:l,type:c,keyframes:d}=e,m=t?.owner?.current;if(!(m instanceof HTMLElement)&&!(m instanceof SVGElement))return!1;const{onUpdate:p,transformTemplate:y}=t.owner.getProps();return Ele()&&n&&(AL.has(n)||Ale.has(n)&&Nle(d))&&(n!=="transform"||!y)&&!p&&!r&&o!=="mirror"&&l!==0&&c!=="inertia"}const Tle=40;class kle extends zS{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:l=0,repeatType:c="loop",keyframes:d,name:m,motionValue:p,element:y,...g}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=wr.now();const v={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:l,repeatType:c,name:m,motionValue:p,element:y,...g},b=y?.KeyframeResolver||VS;this.keyframeResolver=new b(d,(S,C,N)=>this.onKeyframesResolved(S,C,v,!N),m,p,y),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:l,type:c,velocity:d,delay:m,isHandoff:p,onUpdate:y}=r;this.resolvedAt=wr.now();let g=!0;Sle(t,l,c,d)||(g=!1,(to.instantAnimations||!m)&&y?.(Jh(t,r,n)),t[0]=t[t.length-1],u0(r),r.repeat=0);const b={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>Tle?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},S=g&&!p&&jle(b),C=b.motionValue?.owner?.current;let N;if(S)try{N=new ble({...b,element:C})}catch{N=new nh(b)}else N=new nh(b);N.finished.then(()=>{this.notifyFinished()}).catch(Ir),this.pendingTimeline&&(this.stopTimeline=N.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=N}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),mle()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function EL(e,t,n,r=0,o=1){const l=Array.from(e).sort((p,y)=>p.sortNodePosition(y)).indexOf(t),c=e.size,d=(c-1)*r;return typeof n=="function"?n(l,c):o===1?l*r:d-l*r}const BT=30,Rle=e=>!isNaN(parseFloat(e)),Pd={current:void 0};class Ple{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const o=wr.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=wr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Rle(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new RS);const r=this.events[t].add(n);return t==="change"?()=>{r(),mt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return Pd.current&&Pd.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=wr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>BT)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,BT);return PS(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Va(e,t){return new Ple(e,t)}function jL(e,t){if(e?.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function $S(e,t){const n=e?.[t]??e?.default??e;return n!==e?jL(n,e):n}const Ole={type:"spring",stiffness:500,damping:25,restSpeed:10},_le=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Ile={type:"keyframes",duration:.8},Mle={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Dle=(e,{keyframes:t})=>t.length>2?Ile:Qc.has(e)?e.startsWith("scale")?_le(t[1]):Ole:Mle,Lle=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function qle(e){for(const t in e)if(!Lle.has(t))return!0;return!1}const HS=(e,t,n,r={},o,l)=>c=>{const d=$S(r,e)||{},m=d.delay||r.delay||0;let{elapsed:p=0}=r;p=p-Xr(m);const y={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...d,delay:-p,onUpdate:v=>{t.set(v),d.onUpdate&&d.onUpdate(v)},onComplete:()=>{c(),d.onComplete&&d.onComplete()},name:e,motionValue:t,element:l?void 0:o};qle(d)||Object.assign(y,Dle(e,y)),y.duration&&(y.duration=Xr(y.duration)),y.repeatDelay&&(y.repeatDelay=Xr(y.repeatDelay)),y.from!==void 0&&(y.keyframes[0]=y.from);let g=!1;if((y.type===!1||y.duration===0&&!y.repeatDelay)&&(u0(y),y.delay===0&&(g=!0)),(to.instantAnimations||to.skipAnimations||o?.shouldSkipAnimations||d.skipAnimations)&&(g=!0,u0(y),y.delay=0),y.allowFlatten=!d.type&&!d.ease,g&&!l&&t.get()!==void 0){const v=Jh(y.keyframes,d);if(v!==void 0){mt.update(()=>{y.onUpdate(v),y.onComplete()});return}}return d.isSync?new nh(y):new kle(y)},Ule=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function zle(e){const t=Ule.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}function TL(e,t,n=1){const[r,o]=zle(e);if(!r)return;const l=window.getComputedStyle(t).getPropertyValue(r);if(l){const c=l.trim();return FD(c)?parseFloat(c):c}return IS(o)?TL(o,t,n+1):o}function FT(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function GS(e,t,n,r){if(typeof t=="function"){const[o,l]=FT(r);t=t(n!==void 0?n:e.custom,o,l)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,l]=FT(r);t=t(n!==void 0?n:e.custom,o,l)}return t}function Zo(e,t,n){const r=e.getProps();return GS(r,t,n!==void 0?n:r.custom,e)}const kL=new Set(["width","height","top","left","right","bottom",...Wc]),d0=e=>Array.isArray(e);function Vle(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Va(n))}function Ble(e){return d0(e)?e[e.length-1]||0:e}function Fle(e,t){const n=Zo(e,t);let{transitionEnd:r={},transition:o={},...l}=n||{};l={...l,...r};for(const c in l){const d=Ble(l[c]);Vle(e,c,d)}}const tr=e=>!!(e&&e.getVelocity);function $le(e){return!!(tr(e)&&e.add)}function f0(e,t){const n=e.getValue("willChange");if($le(n))return n.add(t);if(!n&&to.WillChange){const r=new to.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function KS(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Hle="framerAppearId",RL="data-"+KS(Hle);function PL(e){return e.props[RL]}function Gle({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function OL(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:l,transitionEnd:c,...d}=t;const m=e.getDefaultTransition();l=l?jL(l,m):m;const p=l?.reduceMotion,y=l?.skipAnimations;r&&(l=r);const g=[],v=o&&e.animationState&&e.animationState.getState()[o],b=l?.path;b&&b.animateVisualElement(e,d,l,n,g);for(const S in d){const C=e.getValue(S,e.latestValues[S]??null),N=d[S];if(N===void 0||v&&Gle(v,S))continue;const A={delay:n,...$S(l||{},S)};y&&(A.skipAnimations=!0);const T=C.get();if(T!==void 0&&!C.isAnimating()&&!Array.isArray(N)&&N===T&&!A.velocity){mt.update(()=>C.set(N));continue}let E=!1;if(window.MotionHandoffAnimation){const R=PL(e);if(R){const P=window.MotionHandoffAnimation(R,S,mt);P!==null&&(A.startTime=P,E=!0)}}f0(e,S);const j=p??e.shouldReduceMotion;C.start(HS(S,C,N,j&&kL.has(S)?{type:!1}:A,e,E));const _=C.animation;_&&g.push(_)}if(c){const S=()=>mt.update(()=>{c&&Fle(e,c)});g.length?Promise.all(g).then(S):S()}return g}function m0(e,t,n={}){const r=Zo(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const l=r?()=>Promise.all(OL(e,r,n)):()=>Promise.resolve(),c=e.variantChildren&&e.variantChildren.size?(m=0)=>{const{delayChildren:p=0,staggerChildren:y,staggerDirection:g}=o;return Kle(e,t,m,p,y,g,n)}:()=>Promise.resolve(),{when:d}=o;if(d){const[m,p]=d==="beforeChildren"?[l,c]:[c,l];return m().then(()=>p())}else return Promise.all([l(),c(n.delay)])}function Kle(e,t,n=0,r=0,o=0,l=1,c){const d=[];for(const m of e.variantChildren)m.notify("AnimationStart",t),d.push(m0(m,t,{...c,delay:n+(typeof r=="function"?0:r)+EL(e.variantChildren,m,r,o,l)}).then(()=>m.notify("AnimationComplete",t)));return Promise.all(d)}function Yle(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(l=>m0(e,l,n));r=Promise.all(o)}else if(typeof t=="string")r=m0(e,t,n);else{const o=typeof t=="function"?Zo(e,t,n.custom):t;r=Promise.all(OL(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const Wle={test:e=>e==="auto",parse:e=>e},_L=e=>t=>t.test(e),IL=[Yc,Re,bs,$s,Noe,Coe,Wle],$T=e=>IL.find(_L(e));function Qle(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||HD(e):!0}const Xle=new Set(["brightness","contrast","saturate","opacity"]);function Zle(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(MS)||[];if(!r)return e;const o=n.replace(r,"");let l=Xle.has(t)?1:0;return r!==n&&(l*=100),t+"("+l+o+")"}const Jle=/\b([a-z-]*)\(.*?\)/gu,p0={...$a,getAnimatableNone:e=>{const t=e.match(Jle);return t?t.map(Zle).join(" "):e}},h0={...$a,getAnimatableNone:e=>{const t=$a.parse(e);return $a.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},HT={...Yc,transform:Math.round},ece={rotate:$s,pathRotation:$s,rotateX:$s,rotateY:$s,rotateZ:$s,scale:Qm,scaleX:Qm,scaleY:Qm,scaleZ:Qm,skew:$s,skewX:$s,skewY:$s,distance:Re,translateX:Re,translateY:Re,translateZ:Re,x:Re,y:Re,z:Re,perspective:Re,transformPerspective:Re,opacity:Gd,originX:PT,originY:PT,originZ:Re},rh={borderWidth:Re,borderTopWidth:Re,borderRightWidth:Re,borderBottomWidth:Re,borderLeftWidth:Re,borderRadius:Re,borderTopLeftRadius:Re,borderTopRightRadius:Re,borderBottomRightRadius:Re,borderBottomLeftRadius:Re,width:Re,maxWidth:Re,height:Re,maxHeight:Re,top:Re,right:Re,bottom:Re,left:Re,inset:Re,insetBlock:Re,insetBlockStart:Re,insetBlockEnd:Re,insetInline:Re,insetInlineStart:Re,insetInlineEnd:Re,padding:Re,paddingTop:Re,paddingRight:Re,paddingBottom:Re,paddingLeft:Re,paddingBlock:Re,paddingBlockStart:Re,paddingBlockEnd:Re,paddingInline:Re,paddingInlineStart:Re,paddingInlineEnd:Re,margin:Re,marginTop:Re,marginRight:Re,marginBottom:Re,marginLeft:Re,marginBlock:Re,marginBlockStart:Re,marginBlockEnd:Re,marginInline:Re,marginInlineStart:Re,marginInlineEnd:Re,fontSize:Re,backgroundPositionX:Re,backgroundPositionY:Re,...ece,zIndex:HT,fillOpacity:Gd,strokeOpacity:Gd,numOctaves:HT},tce={...rh,color:Sn,backgroundColor:Sn,outlineColor:Sn,fill:Sn,stroke:Sn,borderColor:Sn,borderTopColor:Sn,borderRightColor:Sn,borderBottomColor:Sn,borderLeftColor:Sn,filter:p0,WebkitFilter:p0,mask:h0,WebkitMask:h0},ML=e=>tce[e],nce=new Set([p0,h0]);function DL(e,t){let n=ML(e);return nce.has(n)||(n=$a),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const rce=new Set(["auto","none","0"]);function ace(e,t,n){let r=0,o;for(;r<e.length&&!o;){const l=e[r];typeof l=="string"&&!rce.has(l)&&kc(l).values.length&&(o=e[r]),r++}if(o&&n)for(const l of t)e[l]=DL(n,o)}class sce extends VS{constructor(t,n,r,o,l){super(t,n,r,o,l,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let y=0;y<t.length;y++){let g=t[y];if(typeof g=="string"&&(g=g.trim(),IS(g))){const v=TL(g,n.current);v!==void 0&&(t[y]=v),y===t.length-1&&(this.finalKeyframe=g)}}if(this.resolveNoneKeyframes(),!kL.has(r)||t.length!==2)return;const[o,l]=t,c=$T(o),d=$T(l),m=RT(o),p=RT(l);if(m!==p&&Ki[r]){this.needsMeasurement=!0;return}if(c!==d)if(UT(c)&&UT(d))for(let y=0;y<t.length;y++){const g=t[y];typeof g=="string"&&(t[y]=parseFloat(g))}else Ki[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||Qle(t[o]))&&r.push(o);r.length&&ace(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ki[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const l=r.length-1,c=r[l];r[l]=Ki[n](t.measureViewportBox(),window.getComputedStyle(t.current)),c!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=c),this.removedTransforms?.length&&this.removedTransforms.forEach(([d,m])=>{t.getValue(d).set(m)}),this.resolveNoneKeyframes()}}const YS=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function LL(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){const o=document.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(r=>r!=null)}const g0=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function qL(e){return $D(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Rc,cancel:UL}=rL(queueMicrotask,!1),La={x:!1,y:!1};function zL(){return La.x||La.y}function ice(e){return e==="x"||e==="y"?La[e]?null:(La[e]=!0,()=>{La[e]=!1}):La.x||La.y?null:(La.x=La.y=!0,()=>{La.x=La.y=!1})}function VL(e,t){const n=LL(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function oce(e){return!(e.pointerType==="touch"||zL())}function lce(e,t,n={}){const[r,o,l]=VL(e,n);return r.forEach(c=>{let d=!1,m=!1,p;const y=()=>{c.removeEventListener("pointerleave",S)},g=N=>{p&&(p(N),p=void 0),y()},v=N=>{d=!1,window.removeEventListener("pointerup",v),window.removeEventListener("pointercancel",v),m&&(m=!1,g(N))},b=()=>{d=!0,window.addEventListener("pointerup",v,o),window.addEventListener("pointercancel",v,o)},S=N=>{if(N.pointerType!=="touch"){if(d){m=!0;return}g(N)}},C=N=>{if(!oce(N))return;m=!1;const A=t(c,N);typeof A=="function"&&(p=A,c.addEventListener("pointerleave",S,o))};c.addEventListener("pointerenter",C,o),c.addEventListener("pointerdown",b,o)}),l}const BL=(e,t)=>t?e===t?!0:BL(e,t.parentElement):!1,WS=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,cce=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function uce(e){return cce.has(e.tagName)||e.isContentEditable===!0}const dce=new Set(["INPUT","SELECT","TEXTAREA"]);function fce(e){return dce.has(e.tagName)||e.isContentEditable===!0}const gp=new WeakSet;function GT(e){return t=>{t.key==="Enter"&&e(t)}}function rv(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const mce=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=GT(()=>{if(gp.has(n))return;rv(n,"down");const o=GT(()=>{rv(n,"up")}),l=()=>rv(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",l,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function KT(e){return WS(e)&&!zL()}const YT=new WeakSet;function pce(e,t,n={}){const[r,o,l]=VL(e,n),c=d=>{const m=d.currentTarget;if(!KT(d)||YT.has(d))return;gp.add(m),n.stopPropagation&&YT.add(d);const p=t(m,d),y={...o,capture:!0},g=(S,C)=>{window.removeEventListener("pointerup",v,y),window.removeEventListener("pointercancel",b,y),gp.has(m)&&gp.delete(m),KT(S)&&typeof p=="function"&&p(S,{success:C})},v=S=>{g(S,m===window||m===document||n.useGlobalTarget||BL(m,S.target))},b=S=>{g(S,!1)};window.addEventListener("pointerup",v,y),window.addEventListener("pointercancel",b,y)};return r.forEach(d=>{(n.useGlobalTarget?window:d).addEventListener("pointerdown",c,o),qL(d)&&(d.addEventListener("focus",p=>mce(p,o)),!uce(d)&&!d.hasAttribute("tabindex")&&(d.tabIndex=0))}),l}function QS(e){return $D(e)&&"ownerSVGElement"in e}const yp=new WeakMap;let xp;const FL=(e,t,n)=>(r,o)=>o&&o[0]?o[0][e+"Size"]:QS(r)&&"getBBox"in r?r.getBBox()[t]:r[n],hce=FL("inline","width","offsetWidth"),gce=FL("block","height","offsetHeight");function yce({target:e,borderBoxSize:t}){yp.get(e)?.forEach(n=>{n(e,{get width(){return hce(e,t)},get height(){return gce(e,t)}})})}function xce(e){e.forEach(yce)}function vce(){typeof ResizeObserver>"u"||(xp=new ResizeObserver(xce))}function bce(e,t){xp||vce();const n=LL(e);return n.forEach(r=>{let o=yp.get(r);o||(o=new Set,yp.set(r,o)),o.add(t),xp?.observe(r)}),()=>{n.forEach(r=>{const o=yp.get(r);o?.delete(t),o?.size||xp?.unobserve(r)})}}const vp=new Set;let pc;function wce(){pc=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};vp.forEach(t=>t(e))},window.addEventListener("resize",pc)}function Sce(e){return vp.add(e),pc||wce(),()=>{vp.delete(e),!vp.size&&typeof pc=="function"&&(window.removeEventListener("resize",pc),pc=void 0)}}function y0(e,t){return typeof e=="function"?Sce(e):bce(e,t)}function $L(e,t){let n;const r=()=>{const{currentTime:o}=t,c=(o===null?0:o.value)/100;n!==c&&e(c),n=c};return mt.preUpdate(r,!0),()=>ba(r)}function Cce(e){return QS(e)&&e.tagName==="svg"}function Nce(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],l=e[2+n],c=e[3+n],d=US(o,l,c);return t?d(r):d}const Ace=[...IL,Sn,$a],Ece=e=>Ace.find(_L(e)),WT=()=>({translate:0,scale:1,origin:0,originPoint:0}),hc=()=>({x:WT(),y:WT()}),QT=()=>({min:0,max:0}),On=()=>({x:QT(),y:QT()}),jce=new WeakMap;function eg(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Kd(e){return typeof e=="string"||Array.isArray(e)}const XS=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ZS=["initial",...XS];function tg(e){return eg(e.animate)||ZS.some(t=>Kd(e[t]))}function HL(e){return!!(tg(e)||e.variants)}function Tce(e,t,n){for(const r in t){const o=t[r],l=n[r];if(tr(o))e.addValue(r,o);else if(tr(l))e.addValue(r,Va(o,{owner:e}));else if(l!==o)if(e.hasValue(r)){const c=e.getValue(r);c.liveStyle===!0?c.jump(o):c.hasAnimated||c.set(o)}else{const c=e.getStaticValue(r);e.addValue(r,Va(c!==void 0?c:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const ah={current:null},JS={current:!1},kce=typeof window<"u";function GL(){if(JS.current=!0,!!kce)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ah.current=e.matches;e.addEventListener("change",t),t()}else ah.current=!1}const XT=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let sh={};function KL(e){sh=e}function Rce(){return sh}class Pce{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,skipAnimations:l,blockInitialAnimation:c,visualState:d},m={}){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=VS,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const b=wr.now();this.renderScheduledAt<b&&(this.renderScheduledAt=b,mt.render(this.render,!1,!0))};const{latestValues:p,renderState:y}=d;this.latestValues=p,this.baseTarget={...p},this.initialValues=n.initial?{...p}:{},this.renderState=y,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.skipAnimationsConfig=l,this.options=m,this.blockInitialAnimation=!!c,this.isControllingVariants=tg(n),this.isVariantNode=HL(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:g,...v}=this.scrapeMotionValuesFromProps(n,{},this);for(const b in v){const S=v[b];p[b]!==void 0&&tr(S)&&S.set(p[b])}}mount(t){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=t,jce.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(JS.current||GL(),this.shouldReduceMotion=ah.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),ba(this.notifyUpdate),ba(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&AL.has(t)&&this.current instanceof HTMLElement){const{factory:c,keyframes:d,times:m,ease:p,duration:y}=n.accelerate,g=new CL({element:this.current,name:t,keyframes:d,times:m,ease:p,duration:Xr(y)}),v=c(g);this.valueSubscriptions.set(t,()=>{v(),g.cancel()});return}const r=Qc.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",c=>{this.latestValues[t]=c,this.props.onUpdate&&mt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let l;typeof window<"u"&&window.MotionCheckAppearSync&&(l=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),l&&l()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in sh){const n=sh[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const l=this.features[t];l.isMounted?l.update():(l.mount(),l.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):On()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<XT.length;r++){const o=XT[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const l="on"+o,c=t[l];c&&(this.propEventSubscriptions[o]=this.on(o,c))}this.prevMotionValues=Tce(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Va(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(FD(r)||HD(r))?r=parseFloat(r):!Ece(r)&&$a.test(n)&&(r=DL(t,n)),this.setBaseTarget(t,tr(r)?r.get():r)),tr(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const l=GS(this.props,n,this.presenceContext?.custom);l&&(r=l[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!tr(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new RS),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Rc.render(this.render)}}class YL extends Pce{constructor(){super(...arguments),this.KeyframeResolver=sce}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;tr(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class co{constructor(t){this.isMounted=!1,this.node=t}update(){}}function WL({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Oce({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function _ce(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function av(e){return e===void 0||e===1}function x0({scale:e,scaleX:t,scaleY:n}){return!av(e)||!av(t)||!av(n)}function $o(e){return x0(e)||QL(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function QL(e){return ZT(e.x)||ZT(e.y)}function ZT(e){return e&&e!=="0%"}function ih(e,t,n){const r=e-n,o=t*r;return n+o}function JT(e,t,n,r,o){return o!==void 0&&(e=ih(e,o,r)),ih(e,n,r)+t}function v0(e,t=0,n=1,r,o){e.min=JT(e.min,t,n,r,o),e.max=JT(e.max,t,n,r,o)}function XL(e,{x:t,y:n}){v0(e.x,t.translate,t.scale,t.originPoint),v0(e.y,n.translate,n.scale,n.originPoint)}const ek=.999999999999,tk=1.0000000000001;function Ice(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let l,c;for(let d=0;d<o;d++){l=n[d],c=l.projectionDelta;const{visualElement:m}=l.options;m&&m.props.style&&m.props.style.display==="contents"||(r&&l.options.layoutScroll&&l.scroll&&l!==l.root&&(ys(e.x,-l.scroll.offset.x),ys(e.y,-l.scroll.offset.y)),c&&(t.x*=c.x.scale,t.y*=c.y.scale,XL(e,c)),r&&$o(l.latestValues)&&bp(e,l.latestValues,l.layout?.layoutBox))}t.x<tk&&t.x>ek&&(t.x=1),t.y<tk&&t.y>ek&&(t.y=1)}function ys(e,t){e.min+=t,e.max+=t}function nk(e,t,n,r,o=.5){const l=Mt(e.min,e.max,o);v0(e,t,n,l,r)}function rk(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function bp(e,t,n){const r=n??e;nk(e.x,rk(t.x,r.x),t.scaleX,t.scale,t.originX),nk(e.y,rk(t.y,r.y),t.scaleY,t.scale,t.originY)}function ZL(e,t){return WL(_ce(e.getBoundingClientRect(),t))}function Mce(e,t,n){const r=ZL(e,n),{scroll:o}=t;return o&&(ys(r.x,o.offset.x),ys(r.y,o.offset.y)),r}const Dce={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Lce=Wc.length;function qce(e,t,n){let r="",o=!0;for(let c=0;c<Lce;c++){const d=Wc[c],m=e[d];if(m===void 0)continue;let p=!0;if(typeof m=="number")p=m===(d.startsWith("scale")?1:0);else{const y=parseFloat(m);p=d.startsWith("scale")?y===1:y===0}if(!p||n){const y=g0(m,rh[d]);if(!p){o=!1;const g=Dce[d]||d;r+=`${g}(${y}) `}n&&(t[d]=y)}}const l=e.pathRotation;return l&&(o=!1,r+=`rotate(${g0(l,rh.pathRotation)}) `),r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function e1(e,t,n){const{style:r,vars:o,transformOrigin:l}=e;let c=!1,d=!1;for(const m in t){const p=t[m];if(Qc.has(m)){c=!0;continue}else if(sL(m)){o[m]=p;continue}else{const y=g0(p,rh[m]);m.startsWith("origin")?(d=!0,l[m]=y):r[m]=y}}if(t.transform||(c||n?r.transform=qce(t,e.transform,n):r.transform&&(r.transform="none")),d){const{originX:m="50%",originY:p="50%",originZ:y=0}=l;r.transformOrigin=`${m} ${p} ${y}`}}function JL(e,{style:t,vars:n},r,o){const l=e.style;let c;for(c in t)l[c]=t[c];o?.applyProjectionStyles(l,r);for(c in n)l.setProperty(c,n[c])}function ak(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const od={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Re.test(e))e=parseFloat(e);else return e;const n=ak(e,t.target.x),r=ak(e,t.target.y);return`${n}% ${r}%`}},Uce={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=$a.parse(e);if(o.length>5)return r;const l=$a.createTransformer(e),c=typeof o[0]!="number"?1:0,d=n.x.scale*t.x,m=n.y.scale*t.y;o[0+c]/=d,o[1+c]/=m;const p=Mt(d,m,.5);return typeof o[2+c]=="number"&&(o[2+c]/=p),typeof o[3+c]=="number"&&(o[3+c]/=p),l(o)}},b0={borderRadius:{...od,applyTo:[...YS]},borderTopLeftRadius:od,borderTopRightRadius:od,borderBottomLeftRadius:od,borderBottomRightRadius:od,boxShadow:Uce};function e3(e,{layout:t,layoutId:n}){return Qc.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!b0[e]||e==="opacity")}function t1(e,t,n){const r=e.style,o=t?.style,l={};if(!r)return l;for(const c in r)(tr(r[c])||o&&tr(o[c])||e3(c,e)||n?.getValue(c)?.liveStyle!==void 0)&&(l[c]=r[c]);return l}function zce(e){return window.getComputedStyle(e)}class Vce extends YL{constructor(){super(...arguments),this.type="html",this.renderInstance=JL}mount(t){Zh(!!t.style),super.mount(t)}readValueFromInstance(t,n){if(Qc.has(n))return this.projection?.isProjecting?s0(n):lle(t,n);{const r=zce(t),o=(sL(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return ZL(t,n)}build(t,n,r){e1(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return t1(t,n,r)}}const Bce={offset:"stroke-dashoffset",array:"stroke-dasharray"},Fce={offset:"strokeDashoffset",array:"strokeDasharray"};function $ce(e,t,n=1,r=0,o=!0){e.pathLength=1;const l=o?Bce:Fce;e[l.offset]=`${-r}`,e[l.array]=`${t} ${n}`}const Hce=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function t3(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:l=1,pathOffset:c=0,...d},m,p,y){if(e1(e,d,p),m){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:g,style:v}=e;g.transform&&(v.transform=g.transform,delete g.transform),(v.transform||g.transformOrigin)&&(v.transformOrigin=g.transformOrigin??"50% 50%",delete g.transformOrigin),v.transform&&(v.transformBox=y?.transformBox??"fill-box",delete g.transformBox);for(const b of Hce)g[b]!==void 0&&(v[b]=g[b],delete g[b]);t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),r!==void 0&&(g.scale=r),o!==void 0&&$ce(g,o,l,c,!1)}const n3=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"]),r3=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Gce(e,t,n,r){JL(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(n3.has(o)?o:KS(o),t.attrs[o])}function a3(e,t,n){const r=t1(e,t,n);for(const o in e)if(tr(e[o])||tr(t[o])){const l=Wc.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[l]=e[o]}return r}class Kce extends YL{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=On}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Qc.has(n)){const r=ML(n);return r&&r.default||0}return n=n3.has(n)?n:KS(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return a3(t,n,r)}build(t,n,r){t3(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){Gce(t,n,r,o)}mount(t){this.isSVGTag=r3(t.tagName),super.mount(t)}}const Yce=ZS.length;function s3(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?s3(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Yce;n++){const r=ZS[n],o=e.props[r];(Kd(o)||o===!1)&&(t[r]=o)}return t}function i3(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const Wce=[...XS].reverse(),Qce=XS.length;function Xce(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Yle(e,n,r)))}function Zce(e){let t=Xce(e),n=sk(),r=!0,o=!1;const l=p=>(y,g)=>{const v=Zo(e,g,p==="exit"?e.presenceContext?.custom:void 0);if(v){const{transition:b,transitionEnd:S,...C}=v;y={...y,...C,...S}}return y};function c(p){t=p(e)}function d(p){const{props:y}=e,g=s3(e.parent)||{},v=[],b=new Set;let S={},C=1/0;for(let A=0;A<Qce;A++){const T=Wce[A],E=n[T],j=y[T]!==void 0?y[T]:g[T],_=Kd(j),R=T===p?E.isActive:null;R===!1&&(C=A);let P=j===g[T]&&j!==y[T]&&_;if(P&&(r||o)&&e.manuallyAnimateOnMount&&(P=!1),E.protectedKeys={...S},!E.isActive&&R===null||!j&&!E.prevProp||eg(j)||typeof j=="boolean")continue;if(T==="exit"&&E.isActive&&R!==!0){E.prevResolvedValues&&(S={...S,...E.prevResolvedValues});continue}const M=Jce(E.prevProp,j);let q=M||T===p&&E.isActive&&!P&&_||A>C&&_,U=!1;const V=Array.isArray(j)?j:[j];let $=V.reduce(l(T),{});R===!1&&($={});const{prevResolvedValues:L={}}=E,H={...L,...$},Q=F=>{q=!0,b.has(F)&&(U=!0,b.delete(F)),E.needsAnimating[F]=!0;const B=e.getValue(F);B&&(B.liveStyle=!1)};for(const F in H){const B=$[F],K=L[F];if(S.hasOwnProperty(F))continue;let le=!1;d0(B)&&d0(K)?le=!i3(B,K)||M:le=B!==K,le?B!=null?Q(F):b.add(F):B!==void 0&&b.has(F)?Q(F):E.protectedKeys[F]=!0}E.prevProp=j,E.prevResolvedValues=$,E.isActive&&(S={...S,...$}),(r||o)&&e.blockInitialAnimation&&(q=!1);const I=P&&M;q&&(!I||U)&&v.push(...V.map(F=>{const B={type:T};if(typeof F=="string"&&(r||o)&&!I&&e.manuallyAnimateOnMount&&e.parent){const{parent:K}=e,le=Zo(K,F);if(K.enteringChildren&&le){const{delayChildren:Z}=le.transition||{};B.delay=EL(K.enteringChildren,e,Z)}}return{animation:F,options:B}}))}if(b.size){const A={};if(typeof y.initial!="boolean"){const T=Zo(e,Array.isArray(y.initial)?y.initial[0]:y.initial);T&&T.transition&&(A.transition=T.transition)}b.forEach(T=>{const E=e.getBaseTarget(T),j=e.getValue(T);j&&(j.liveStyle=!0),A[T]=E??null}),v.push({animation:A})}let N=!!v.length;return r&&(y.initial===!1||y.initial===y.animate)&&!e.manuallyAnimateOnMount&&(N=!1),r=!1,o=!1,N?t(v):Promise.resolve()}function m(p,y){if(n[p].isActive===y)return Promise.resolve();e.variantChildren?.forEach(v=>v.animationState?.setActive(p,y)),n[p].isActive=y;const g=d(p);for(const v in n)n[v].protectedKeys={};return g}return{animateChanges:d,setActive:m,setAnimateFunction:c,getState:()=>n,reset:()=>{n=sk(),o=!0}}}function Jce(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!i3(t,e):!1}function Uo(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function sk(){return{animate:Uo(!0),whileInView:Uo(),whileHover:Uo(),whileTap:Uo(),whileDrag:Uo(),whileFocus:Uo(),exit:Uo()}}function w0(e,t){e.min=t.min,e.max=t.max}function Ma(e,t){w0(e.x,t.x),w0(e.y,t.y)}function ik(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const o3=1e-4,eue=1-o3,tue=1+o3,l3=.01,nue=0-l3,rue=0+l3;function Sr(e){return e.max-e.min}function aue(e,t,n){return Math.abs(e-t)<=n}function ok(e,t,n,r=.5){e.origin=r,e.originPoint=Mt(t.min,t.max,e.origin),e.scale=Sr(n)/Sr(t),e.translate=Mt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=eue&&e.scale<=tue||isNaN(e.scale))&&(e.scale=1),(e.translate>=nue&&e.translate<=rue||isNaN(e.translate))&&(e.translate=0)}function Od(e,t,n,r){ok(e.x,t.x,n.x,r?r.originX:void 0),ok(e.y,t.y,n.y,r?r.originY:void 0)}function lk(e,t,n,r=0){const o=r?Mt(n.min,n.max,r):n.min;e.min=o+t.min,e.max=e.min+Sr(t)}function sue(e,t,n,r){lk(e.x,t.x,n.x,r?.x),lk(e.y,t.y,n.y,r?.y)}function ck(e,t,n,r=0){const o=r?Mt(n.min,n.max,r):n.min;e.min=t.min-o,e.max=e.min+Sr(t)}function oh(e,t,n,r){ck(e.x,t.x,n.x,r?.x),ck(e.y,t.y,n.y,r?.y)}function uk(e,t,n,r,o){return e-=t,e=ih(e,1/n,r),o!==void 0&&(e=ih(e,1/o,r)),e}function iue(e,t=0,n=1,r=.5,o,l=e,c=e){if(bs.test(t)&&(t=parseFloat(t),t=Mt(c.min,c.max,t/100)-c.min),typeof t!="number")return;let d=Mt(l.min,l.max,r);e===l&&(d-=t),e.min=uk(e.min,t,n,d,o),e.max=uk(e.max,t,n,d,o)}function dk(e,t,[n,r,o],l,c){iue(e,t[n],t[r],t[o],t.scale,l,c)}const oue=["x","scaleX","originX"],lue=["y","scaleY","originY"];function fk(e,t,n,r){dk(e.x,t,oue,n?n.x:void 0,r?r.x:void 0),dk(e.y,t,lue,n?n.y:void 0,r?r.y:void 0)}function mk(e){return e.translate===0&&e.scale===1}function c3(e){return mk(e.x)&&mk(e.y)}function pk(e,t){return e.min===t.min&&e.max===t.max}function cue(e,t){return pk(e.x,t.x)&&pk(e.y,t.y)}function hk(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function u3(e,t){return hk(e.x,t.x)&&hk(e.y,t.y)}function gk(e){return Sr(e.x)/Sr(e.y)}function yk(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function ps(e){return[e("x"),e("y")]}function uue(e,t,n){let r="";const o=e.x.translate/t.x,l=e.y.translate/t.y,c=n?.z||0;if((o||l||c)&&(r=`translate3d(${o}px, ${l}px, ${c}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:p,rotate:y,pathRotation:g,rotateX:v,rotateY:b,skewX:S,skewY:C}=n;p&&(r=`perspective(${p}px) ${r}`),y&&(r+=`rotate(${y}deg) `),g&&(r+=`rotate(${g}deg) `),v&&(r+=`rotateX(${v}deg) `),b&&(r+=`rotateY(${b}deg) `),S&&(r+=`skewX(${S}deg) `),C&&(r+=`skewY(${C}deg) `)}const d=e.x.scale*t.x,m=e.y.scale*t.y;return(d!==1||m!==1)&&(r+=`scale(${d}, ${m})`),r||"none"}const due=YS.length,xk=e=>typeof e=="string"?parseFloat(e):e,vk=e=>typeof e=="number"||Re.test(e);function fue(e,t,n,r,o,l){o?(e.opacity=Mt(0,n.opacity??1,mue(r)),e.opacityExit=Mt(t.opacity??1,0,pue(r))):l&&(e.opacity=Mt(t.opacity??1,n.opacity??1,r));for(let c=0;c<due;c++){const d=YS[c];let m=bk(t,d),p=bk(n,d);if(m===void 0&&p===void 0)continue;m||(m=0),p||(p=0),m===0||p===0||vk(m)===vk(p)?(e[d]=Math.max(Mt(xk(m),xk(p),r),0),(bs.test(p)||bs.test(m))&&(e[d]+="%")):e[d]=p}(t.rotate||n.rotate)&&(e.rotate=Mt(t.rotate||0,n.rotate||0,r))}function bk(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const mue=d3(0,.5,JD),pue=d3(.5,.95,Ir);function d3(e,t,n){return r=>r<e?0:r>t?1:n(Tc(e,t,r))}function hue(e,t,n){const r=tr(e)?e:Va(e);return r.start(HS("",r,t,n)),r.animation}function Yd(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}const gue=(e,t)=>e.depth-t.depth;class yue{constructor(){this.children=[],this.isDirty=!1}add(t){kS(this.children,t),this.isDirty=!0}remove(t){Zp(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(gue),this.isDirty=!1,this.children.forEach(t)}}function xue(e,t){const n=wr.now(),r=({timestamp:o})=>{const l=o-n;l>=t&&(ba(r),e(l-t))};return mt.setup(r,!0),()=>ba(r)}function wp(e){return tr(e)?e.get():e}class vue{constructor(){this.members=[]}add(t){kS(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const o=r.instance;(!o||o.isConnected===!1)&&!r.snapshot&&(Zp(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(Zp(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){for(let n=this.members.indexOf(t)-1;n>=0;n--){const r=this.members[n];if(r.isPresent!==!1&&r.instance?.isConnected!==!1)return this.promote(r),!0}return!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.updateSnapshot(),t.scheduleRender();const{layoutDependency:o}=r.options,{layoutDependency:l}=t.options;(o===void 0||o!==l)&&(t.resumeFrom=r,n&&(r.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const Sp={hasAnimatedSinceResize:!0,hasEverUpdated:!1},sv=["","X","Y","Z"],bue=1e3;let wue=0;function iv(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function f3(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=PL(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:l}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",mt,!(o||l))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&f3(r)}function m3({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(c={},d=t?.()){this.id=wue++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Nue),this.nodes.forEach(Rue),this.nodes.forEach(Pue),this.nodes.forEach(Aue)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=c,this.root=d?d.root||d:this,this.path=d?[...d.path,d]:[],this.parent=d,this.depth=d?d.depth+1:0;for(let m=0;m<this.path.length;m++)this.path[m].shouldResetTransform=!0;this.root===this&&(this.nodes=new yue)}addEventListener(c,d){return this.eventHandlers.has(c)||this.eventHandlers.set(c,new RS),this.eventHandlers.get(c).add(d)}notifyListeners(c,...d){const m=this.eventHandlers.get(c);m&&m.notify(...d)}hasListeners(c){return this.eventHandlers.has(c)}mount(c){if(this.instance)return;this.isSVG=QS(c)&&!Cce(c),this.instance=c;const{layoutId:d,layout:m,visualElement:p}=this.options;if(p&&!p.current&&p.mount(c),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(m||d)&&(this.isLayoutDirty=!0),e){let y,g=0;const v=()=>this.root.updateBlockedByResize=!1;mt.read(()=>{g=window.innerWidth}),e(c,()=>{const b=window.innerWidth;b!==g&&(g=b,this.root.updateBlockedByResize=!0,y&&y(),y=xue(v,250),Sp.hasAnimatedSinceResize&&(Sp.hasAnimatedSinceResize=!1,this.nodes.forEach(Ck)))})}d&&this.root.registerSharedNode(d,this),this.options.animate!==!1&&p&&(d||m)&&this.addEventListener("didUpdate",({delta:y,hasLayoutChanged:g,hasRelativeLayoutChanged:v,layout:b})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const S=this.options.transition||p.getDefaultTransition()||Due,{onLayoutAnimationStart:C,onLayoutAnimationComplete:N}=p.getProps(),A=!this.targetLayout||!u3(this.targetLayout,b),T=!g&&v;if(this.options.layoutRoot||this.resumeFrom||T||g&&(A||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const E={...$S(S,"layout"),onPlay:C,onComplete:N};(p.shouldReduceMotion||this.options.layoutRoot)&&(E.delay=0,E.type=!1),this.startAnimation(E),this.setAnimationOrigin(y,T,E.path)}else g||Ck(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=b})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const c=this.getStack();c&&c.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ba(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(Oue),this.animationId++)}getTransformTemplate(){const{visualElement:c}=this.options;return c&&c.getProps().transformTemplate}willUpdate(c=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&f3(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let y=0;y<this.path.length;y++){const g=this.path[y];g.shouldResetTransform=!0,(typeof g.latestValues.x=="string"||typeof g.latestValues.y=="string")&&(g.isLayoutDirty=!0),g.updateScroll("snapshot"),g.options.layoutRoot&&g.willUpdate(!1)}const{layoutId:d,layout:m}=this.options;if(d===void 0&&!m)return;const p=this.getTransformTemplate();this.prevTransformTemplateValue=p?p(this.latestValues,""):void 0,this.updateSnapshot(),c&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const m=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),m&&this.nodes.forEach(jue),this.nodes.forEach(wk);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Sk);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Tue),this.nodes.forEach(kue),this.nodes.forEach(Sue),this.nodes.forEach(Cue)):this.nodes.forEach(Sk),this.clearAllSnapshots();const d=wr.now();Vn.delta=Ya(0,1e3/60,d-Vn.timestamp),Vn.timestamp=d,Vn.isProcessing=!0,Xx.update.process(Vn),Xx.preRender.process(Vn),Xx.render.process(Vn),Vn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Rc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Eue),this.sharedNodes.forEach(_ue)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,mt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){mt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Sr(this.snapshot.measuredBox.x)&&!Sr(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 m=0;m<this.path.length;m++)this.path[m].updateScroll();const c=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=On()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:d}=this.options;d&&d.notify("LayoutMeasure",this.layout.layoutBox,c?c.layoutBox:void 0)}updateScroll(c="measure"){let d=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===c&&(d=!1),d&&this.instance){const m=r(this.instance);this.scroll={animationId:this.root.animationId,phase:c,isRoot:m,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:m}}}resetTransform(){if(!o)return;const c=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,d=this.projectionDelta&&!c3(this.projectionDelta),m=this.getTransformTemplate(),p=m?m(this.latestValues,""):void 0,y=p!==this.prevTransformTemplateValue;c&&this.instance&&(d||$o(this.latestValues)||y)&&(o(this.instance,p),this.shouldResetTransform=!1,this.scheduleRender())}measure(c=!0){const d=this.measurePageBox();let m=this.removeElementScroll(d);return c&&(m=this.removeTransform(m)),Lue(m),{animationId:this.root.animationId,measuredBox:d,layoutBox:m,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:c}=this.options;if(!c)return On();const d=c.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(que))){const{scroll:p}=this.root;p&&(ys(d.x,p.offset.x),ys(d.y,p.offset.y))}return d}removeElementScroll(c){const d=On();if(Ma(d,c),this.scroll?.wasRoot)return d;for(let m=0;m<this.path.length;m++){const p=this.path[m],{scroll:y,options:g}=p;p!==this.root&&y&&g.layoutScroll&&(y.wasRoot&&Ma(d,c),ys(d.x,y.offset.x),ys(d.y,y.offset.y))}return d}applyTransform(c,d=!1,m){const p=m||On();Ma(p,c);for(let y=0;y<this.path.length;y++){const g=this.path[y];!d&&g.options.layoutScroll&&g.scroll&&g!==g.root&&(ys(p.x,-g.scroll.offset.x),ys(p.y,-g.scroll.offset.y)),$o(g.latestValues)&&bp(p,g.latestValues,g.layout?.layoutBox)}return $o(this.latestValues)&&bp(p,this.latestValues,this.layout?.layoutBox),p}removeTransform(c){const d=On();Ma(d,c);for(let m=0;m<this.path.length;m++){const p=this.path[m];if(!$o(p.latestValues))continue;let y;p.instance&&(x0(p.latestValues)&&p.updateSnapshot(),y=On(),Ma(y,p.measurePageBox())),fk(d,p.latestValues,p.snapshot?.layoutBox,y)}return $o(this.latestValues)&&fk(d,this.latestValues),d}setTargetDelta(c){this.targetDelta=c,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(c){this.options={...this.options,...c,crossfade:c.crossfade!==void 0?c.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Vn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(c=!1){const d=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=d.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=d.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=d.isSharedProjectionDirty);const m=!!this.resumingFrom||this!==d;if(!(c||m&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:y,layoutId:g}=this.options;if(!this.layout||!(y||g))return;this.resolvedRelativeTargetAt=Vn.timestamp;const v=this.getClosestProjectingParent();v&&this.linkedParentVersion!==v.layoutVersion&&!v.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&v&&v.layout?this.createRelativeTarget(v,this.layout.layoutBox,v.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=On(),this.targetWithTransforms=On()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),sue(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Ma(this.target,this.layout.layoutBox),XL(this.target,this.targetDelta)):Ma(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&v&&!!v.resumingFrom==!!this.resumingFrom&&!v.options.layoutScroll&&v.target&&this.animationProgress!==1?this.createRelativeTarget(v,this.target,v.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||x0(this.parent.latestValues)||QL(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(c,d,m){this.relativeParent=c,this.linkedParentVersion=c.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=On(),this.relativeTargetOrigin=On(),oh(this.relativeTargetOrigin,d,m,this.options.layoutAnchor||void 0),Ma(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const c=this.getLead(),d=!!this.resumingFrom||this!==c;let m=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(m=!1),d&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(m=!1),this.resolvedRelativeTargetAt===Vn.timestamp&&(m=!1),m)return;const{layout:p,layoutId:y}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(p||y))return;Ma(this.layoutCorrected,this.layout.layoutBox);const g=this.treeScale.x,v=this.treeScale.y;Ice(this.layoutCorrected,this.treeScale,this.path,d),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox,c.targetWithTransforms=On());const{target:b}=c;if(!b){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(ik(this.prevProjectionDelta.x,this.projectionDelta.x),ik(this.prevProjectionDelta.y,this.projectionDelta.y)),Od(this.projectionDelta,this.layoutCorrected,b,this.latestValues),(this.treeScale.x!==g||this.treeScale.y!==v||!yk(this.projectionDelta.x,this.prevProjectionDelta.x)||!yk(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",b))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(c=!0){if(this.options.visualElement?.scheduleRender(),c){const d=this.getStack();d&&d.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=hc(),this.projectionDelta=hc(),this.projectionDeltaWithTransform=hc()}setAnimationOrigin(c,d=!1,m){const p=this.snapshot,y=p?p.latestValues:{},g={...this.latestValues},v=hc();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!d;const b=On(),S=p?p.source:void 0,C=this.layout?this.layout.source:void 0,N=S!==C,A=this.getStack(),T=!A||A.members.length<=1,E=!!(N&&!T&&this.options.crossfade===!0&&!this.path.some(Mue));this.animationProgress=0;let j;const _=m?.interpolateProjection(c);this.mixTargetDelta=R=>{const P=R/1e3,M=_?.(P);M?(v.x.translate=M.x,v.x.scale=Mt(c.x.scale,1,P),v.x.origin=c.x.origin,v.x.originPoint=c.x.originPoint,v.y.translate=M.y,v.y.scale=Mt(c.y.scale,1,P),v.y.origin=c.y.origin,v.y.originPoint=c.y.originPoint):(Nk(v.x,c.x,P),Nk(v.y,c.y,P)),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(oh(b,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Iue(this.relativeTarget,this.relativeTargetOrigin,b,P),j&&cue(this.relativeTarget,j)&&(this.isProjectionDirty=!1),j||(j=On()),Ma(j,this.relativeTarget)),N&&(this.animationValues=g,fue(g,y,this.latestValues,P,E,T)),M&&M.rotate!==void 0&&(this.animationValues||(this.animationValues=g),this.animationValues.pathRotation=M.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(c){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(ba(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=mt.update(()=>{Sp.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Va(0)),this.motionValue.jump(0,!1),this.currentAnimation=hue(this.motionValue,[0,1e3],{...c,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),c.onUpdate&&c.onUpdate(d)},onComplete:()=>{c.onComplete&&c.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const c=this.getStack();c&&c.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(bue),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const c=this.getLead();let{targetWithTransforms:d,target:m,layout:p,latestValues:y}=c;if(!(!d||!m||!p)){if(this!==c&&this.layout&&p&&p3(this.options.animationType,this.layout.layoutBox,p.layoutBox)){m=this.target||On();const g=Sr(this.layout.layoutBox.x);m.x.min=c.target.x.min,m.x.max=m.x.min+g;const v=Sr(this.layout.layoutBox.y);m.y.min=c.target.y.min,m.y.max=m.y.min+v}Ma(d,m),bp(d,y),Od(this.projectionDeltaWithTransform,this.layoutCorrected,d,y)}}registerSharedNode(c,d){this.sharedNodes.has(c)||this.sharedNodes.set(c,new vue),this.sharedNodes.get(c).add(d);const p=d.options.initialPromotionConfig;d.promote({transition:p?p.transition:void 0,preserveFollowOpacity:p&&p.shouldPreserveFollowOpacity?p.shouldPreserveFollowOpacity(d):void 0})}isLead(){const c=this.getStack();return c?c.lead===this:!0}getLead(){const{layoutId:c}=this.options;return c?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:c}=this.options;return c?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:c}=this.options;if(c)return this.root.sharedNodes.get(c)}promote({needsReset:c,transition:d,preserveFollowOpacity:m}={}){const p=this.getStack();p&&p.promote(this,m),c&&(this.projectionDelta=void 0,this.needsReset=!0),d&&this.setOptions({transition:d})}relegate(){const c=this.getStack();return c?c.relegate(this):!1}resetSkewAndRotation(){const{visualElement:c}=this.options;if(!c)return;let d=!1;const{latestValues:m}=c;if((m.z||m.rotate||m.rotateX||m.rotateY||m.rotateZ||m.skewX||m.skewY)&&(d=!0),!d)return;const p={};m.z&&iv("z",c,p,this.animationValues);for(let y=0;y<sv.length;y++)iv(`rotate${sv[y]}`,c,p,this.animationValues),iv(`skew${sv[y]}`,c,p,this.animationValues);c.render();for(const y in p)c.setStaticValue(y,p[y]),this.animationValues&&(this.animationValues[y]=p[y]);c.scheduleRender()}applyProjectionStyles(c,d){if(!this.instance||this.isSVG)return;if(!this.isVisible){c.visibility="hidden";return}const m=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,c.visibility="",c.opacity="",c.pointerEvents=wp(d?.pointerEvents)||"",c.transform=m?m(this.latestValues,""):"none";return}const p=this.getLead();if(!this.projectionDelta||!this.layout||!p.target){this.options.layoutId&&(c.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,c.pointerEvents=wp(d?.pointerEvents)||""),this.hasProjected&&!$o(this.latestValues)&&(c.transform=m?m({},""):"none",this.hasProjected=!1);return}c.visibility="";const y=p.animationValues||p.latestValues;this.applyTransformsToTarget();let g=uue(this.projectionDeltaWithTransform,this.treeScale,y);m&&(g=m(y,g)),c.transform=g;const{x:v,y:b}=this.projectionDelta;c.transformOrigin=`${v.origin*100}% ${b.origin*100}% 0`,p.animationValues?c.opacity=p===this?y.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:y.opacityExit:c.opacity=p===this?y.opacity!==void 0?y.opacity:"":y.opacityExit!==void 0?y.opacityExit:0;for(const S in b0){if(y[S]===void 0)continue;const{correct:C,applyTo:N,isCSSVariable:A}=b0[S],T=g==="none"?y[S]:C(y[S],p);if(N){const E=N.length;for(let j=0;j<E;j++)c[N[j]]=T}else A?this.options.visualElement.renderState.vars[S]=T:c[S]=T}this.options.layoutId&&(c.pointerEvents=p===this?wp(d?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(c=>c.currentAnimation?.stop()),this.root.nodes.forEach(wk),this.root.sharedNodes.clear()}}}function Sue(e){e.updateLayout()}function Cue(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:o}=e.options,l=t.source!==e.layout.source;if(o==="size")ps(y=>{const g=l?t.measuredBox[y]:t.layoutBox[y],v=Sr(g);g.min=n[y].min,g.max=g.min+v});else if(o==="x"||o==="y"){const y=o==="x"?"y":"x";w0(l?t.measuredBox[y]:t.layoutBox[y],n[y])}else p3(o,t.layoutBox,n)&&ps(y=>{const g=l?t.measuredBox[y]:t.layoutBox[y],v=Sr(n[y]);g.max=g.min+v,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[y].max=e.relativeTarget[y].min+v)});const c=hc();Od(c,n,t.layoutBox);const d=hc();l?Od(d,e.applyTransform(r,!0),t.measuredBox):Od(d,n,t.layoutBox);const m=!c3(c);let p=!1;if(!e.resumeFrom){const y=e.getClosestProjectingParent();if(y&&!y.resumeFrom){const{snapshot:g,layout:v}=y;if(g&&v){const b=e.options.layoutAnchor||void 0,S=On();oh(S,t.layoutBox,g.layoutBox,b);const C=On();oh(C,n,v.layoutBox,b),u3(S,C)||(p=!0),y.options.layoutRoot&&(e.relativeTarget=C,e.relativeTargetOrigin=S,e.relativeParent=y)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:d,layoutDelta:c,hasLayoutChanged:m,hasRelativeLayoutChanged:p})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function Nue(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 Aue(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Eue(e){e.clearSnapshot()}function wk(e){e.clearMeasurements()}function jue(e){e.isLayoutDirty=!0,e.updateLayout()}function Sk(e){e.isLayoutDirty=!1}function Tue(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function kue(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ck(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Rue(e){e.resolveTargetDelta()}function Pue(e){e.calcProjection()}function Oue(e){e.resetSkewAndRotation()}function _ue(e){e.removeLeadSnapshot()}function Nk(e,t,n){e.translate=Mt(t.translate,0,n),e.scale=Mt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Ak(e,t,n,r){e.min=Mt(t.min,n.min,r),e.max=Mt(t.max,n.max,r)}function Iue(e,t,n,r){Ak(e.x,t.x,n.x,r),Ak(e.y,t.y,n.y,r)}function Mue(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Due={duration:.45,ease:[.4,0,.1,1]},Ek=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),jk=Ek("applewebkit/")&&!Ek("chrome/")?Math.round:Ir;function Tk(e){e.min=jk(e.min),e.max=jk(e.max)}function Lue(e){Tk(e.x),Tk(e.y)}function p3(e,t,n){return e==="position"||e==="preserve-aspect"&&!aue(gk(t),gk(n),.2)}function que(e){return e!==e.root&&e.scroll?.wasRoot}const Uue=m3({attachResizeListener:(e,t)=>Yd(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),ov={current:void 0},h3=m3({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ov.current){const e=new Uue({});e.mount(window),e.setOptions({layoutScroll:!0}),ov.current=e}return ov.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),n1=h.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function zue(e=!0){const t=h.useContext(TS);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,l=h.useId();h.useEffect(()=>{if(e)return o(l)},[e]);const c=h.useCallback(()=>e&&r&&r(l),[l,r,e]);return!n&&r?[!1,c]:[!0]}const g3=h.createContext({strict:!1}),kk={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Rk=!1;function Vue(){if(Rk)return;const e={};for(const t in kk)e[t]={isEnabled:n=>kk[t].some(r=>!!n[r])};KL(e),Rk=!0}function y3(){return Vue(),Rce()}function Bue(e){const t=y3();for(const n in e)t[n]={...t[n],...e[n]};KL(t)}const Fue=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 lh(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Fue.has(e)}let x3=e=>!lh(e);function $ue(e){typeof e=="function"&&(x3=t=>t.startsWith("on")?!lh(t):e(t))}try{$ue(require("@emotion/is-prop-valid").default)}catch{}function Hue(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||tr(e[o])||(x3(o)||n===!0&&lh(o)||!t&&!lh(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const ng=h.createContext({});function Gue(e,t){if(tg(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Kd(n)?n:void 0,animate:Kd(r)?r:void 0}}return e.inherit!==!1?t:{}}function Kue(e){const{initial:t,animate:n}=Gue(e,h.useContext(ng));return h.useMemo(()=>({initial:t,animate:n}),[Pk(t),Pk(n)])}function Pk(e){return Array.isArray(e)?e.join(" "):e}const r1=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function v3(e,t,n){for(const r in t)!tr(t[r])&&!e3(r,n)&&(e[r]=t[r])}function Yue({transformTemplate:e},t){return h.useMemo(()=>{const n=r1();return e1(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Wue(e,t){const n=e.style||{},r={};return v3(r,n,e),Object.assign(r,Yue(e,t)),r}function Que(e,t){const n={},r=Wue(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}
53`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const b3=()=>({...r1(),attrs:{}});function Xue(e,t,n,r){const o=h.useMemo(()=>{const l=b3();return t3(l,t,r3(r),e.transformTemplate,e.style),{...l.attrs,style:{...l.style}}},[t]);if(e.style){const l={};v3(l,e.style,e),o.style={...l,...o.style}}return o}const Zue=["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 a1(e){return typeof e!="string"||e.includes("-")?!1:!!(Zue.indexOf(e)>-1||/[A-Z]/u.test(e))}function Jue(e,t,n,{latestValues:r},o,l=!1,c){const m=(c??a1(e)?Xue:Que)(t,r,o,e),p=Hue(t,typeof e=="string",l),y=e!==h.Fragment?{...p,...m,ref:n}:{},{children:g}=t,v=h.useMemo(()=>tr(g)?g.get():g,[g]);return h.createElement(e,{...y,children:v})}function ede({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:tde(n,r,o,e),renderState:t()}}function tde(e,t,n,r){const o={},l=r(e,{});for(const v in l)o[v]=wp(l[v]);let{initial:c,animate:d}=e;const m=tg(e),p=HL(e);t&&p&&!m&&e.inherit!==!1&&(c===void 0&&(c=t.initial),d===void 0&&(d=t.animate));let y=n?n.initial===!1:!1;y=y||c===!1;const g=y?d:c;if(g&&typeof g!="boolean"&&!eg(g)){const v=Array.isArray(g)?g:[g];for(let b=0;b<v.length;b++){const S=GS(e,v[b]);if(S){const{transitionEnd:C,transition:N,...A}=S;for(const T in A){let E=A[T];if(Array.isArray(E)){const j=y?E.length-1:0;E=E[j]}E!==null&&(o[T]=E)}
vendor: 20,692 bytes, line 53
53for(const T in C)o[T]=C[T]}}}return o}const w3=e=>(t,n)=>{const r=h.useContext(ng),o=h.useContext(TS),l=()=>ede(e,t,r,o);return n?l():jc(l)},nde=w3({scrapeMotionValuesFromProps:t1,createRenderState:r1}),rde=w3({scrapeMotionValuesFromProps:a3,createRenderState:b3}),ade=Symbol.for("motionComponentSymbol");function sde(e,t,n){const r=h.useRef(n);h.useInsertionEffect(()=>{r.current=n});const o=h.useRef(null);return h.useCallback(l=>{l&&e.onMount?.(l),t&&(l?t.mount(l):t.unmount());const c=r.current;if(typeof c=="function")if(l){const d=c(l);typeof d=="function"&&(o.current=d)}else o.current?(o.current(),o.current=null):c(l);else c&&(c.current=l)},[t])}const S3=h.createContext({});function dc(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function ide(e,t,n,r,o,l){const{visualElement:c}=h.useContext(ng),d=h.useContext(g3),m=h.useContext(TS),p=h.useContext(n1),y=p.reducedMotion,g=p.skipAnimations,v=h.useRef(null),b=h.useRef(!1);r=r||d.renderer,!v.current&&r&&(v.current=r(e,{visualState:t,parent:c,props:n,presenceContext:m,blockInitialAnimation:m?m.initial===!1:!1,reducedMotionConfig:y,skipAnimations:g,isSVG:l}),b.current&&v.current&&(v.current.manuallyAnimateOnMount=!0));const S=v.current,C=h.useContext(S3);S&&!S.projection&&o&&(S.type==="html"||S.type==="svg")&&ode(v.current,n,o,C);const N=h.useRef(!1);h.useInsertionEffect(()=>{S&&N.current&&S.update(n,m)});const A=n[RL],T=h.useRef(!!A&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(A)&&window.MotionHasOptimisedAnimation?.(A));return jS(()=>{b.current=!0,S&&(N.current=!0,window.MotionIsMounted=!0,S.updateFeatures(),S.scheduleRenderMicrotask(),T.current&&S.animationState&&S.animationState.animateChanges())}),h.useEffect(()=>{S&&(!T.current&&S.animationState&&S.animationState.animateChanges(),T.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(A)}),T.current=!1),S.enteringChildren=void 0)}),S}function ode(e,t,n,r){const{layoutId:o,layout:l,drag:c,dragConstraints:d,layoutScroll:m,layoutRoot:p,layoutAnchor:y,layoutCrossfade:g}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:C3(e.parent)),e.projection.setOptions({layoutId:o,layout:l,alwaysMeasureLayout:!!c||d&&dc(d),visualElement:e,animationType:typeof l=="string"?l:"both",initialPromotionConfig:r,crossfade:g,layoutScroll:m,layoutRoot:p,layoutAnchor:y})}function C3(e){if(e)return e.options.allowProjection!==!1?e.projection:C3(e.parent)}function lv(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&Bue(r);const l=n?n==="svg":a1(e),c=l?rde:nde;function d(p,y){let g;const v={...h.useContext(n1),...p,layoutId:lde(p)},{isStatic:b}=v,S=Kue(p),C=c(p,b);if(!b&&typeof window<"u"){cde();const N=ude(v);g=N.MeasureLayout,S.visualElement=ide(e,C,v,o,N.ProjectionNode,l)}return s.jsxs(ng.Provider,{value:S,children:[g&&S.visualElement?s.jsx(g,{visualElement:S.visualElement,...v}):null,Jue(e,p,sde(C,S.visualElement,y),C,b,t,l)]})}d.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const m=h.forwardRef(d);return m[ade]=e,m}function lde({layoutId:e}){const t=h.useContext(BD).id;return t&&e!==void 0?t+"-"+e:e}function cde(e,t){h.useContext(g3).strict}function ude(e){const t=y3(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function dde(e,t){if(typeof Proxy>"u")return lv;const n=new Map,r=(l,c)=>lv(l,c,e,t),o=(l,c)=>r(l,c);return new Proxy(o,{get:(l,c)=>c==="create"?r:(n.has(c)||n.set(c,lv(c,void 0,e,t)),n.get(c))})}const fde=(e,t)=>t.isSVG??a1(e)?new Kce(t):new Vce(t,{allowProjection:e!==h.Fragment});class mde extends co{constructor(t){super(t),t.animationState||(t.animationState=Zce(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();eg(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let pde=0;class hde extends co{constructor(){super(...arguments),this.id=pde++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;if(t&&r===!1){if(this.isExitComplete){const{initial:l,custom:c}=this.node.getProps();if(typeof l=="string"||typeof l=="object"&&l!==null&&!Array.isArray(l)){const d=Zo(this.node,l,c);if(d){const{transition:m,transitionEnd:p,...y}=d;for(const g in y)this.node.getValue(g)?.jump(y[g])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const gde={animation:{Feature:mde},exit:{Feature:hde}};function hf(e){return{point:{x:e.pageX,y:e.pageY}}}const yde=e=>t=>WS(t)&&e(t,hf(t));function _d(e,t,n,r){return Yd(e,t,yde(n),r)}const N3=({current:e})=>e?e.ownerDocument.defaultView:null,Ok=(e,t)=>Math.abs(e-t);function xde(e,t){const n=Ok(e.x,t.x),r=Ok(e.y,t.y);return Math.sqrt(n**2+r**2)}const _k=new Set(["auto","scroll"]);class A3{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:l=!1,distanceThreshold:c=3,element:d}={}){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=S=>{this.handleScroll(S.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Xm(this.lastRawMoveEventInfo,this.transformPagePoint));const S=cv(this.lastMoveEventInfo,this.history),C=this.startEvent!==null,N=xde(S.offset,{x:0,y:0})>=this.distanceThreshold;if(!C&&!N)return;const{point:A}=S,{timestamp:T}=Vn;this.history.push({...A,timestamp:T});const{onStart:E,onMove:j}=this.handlers;C||(E&&E(this.lastMoveEvent,S),this.startEvent=this.lastMoveEvent),j&&j(this.lastMoveEvent,S)},this.handlePointerMove=(S,C)=>{this.lastMoveEvent=S,this.lastRawMoveEventInfo=C,this.lastMoveEventInfo=Xm(C,this.transformPagePoint),mt.update(this.updatePoint,!0)},this.handlePointerUp=(S,C)=>{this.end();const{onEnd:N,onSessionEnd:A,resumeAnimation:T}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&T&&T(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const E=cv(S.type==="pointercancel"?this.lastMoveEventInfo:Xm(C,this.transformPagePoint),this.history);this.startEvent&&N&&N(S,E),A&&A(S,E)},!WS(t))return;this.dragSnapToOrigin=l,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=c,this.contextWindow=o||window;const m=hf(t),p=Xm(m,this.transformPagePoint),{point:y}=p,{timestamp:g}=Vn;this.history=[{...y,timestamp:g}];const{onSessionStart:v}=n;v&&v(t,cv(p,this.history));const b={passive:!0,capture:!0};this.removeListeners=ff(_d(this.contextWindow,"pointermove",this.handlePointerMove,b),_d(this.contextWindow,"pointerup",this.handlePointerUp,b),_d(this.contextWindow,"pointercancel",this.handlePointerUp,b)),d&&this.startScrollTracking(d)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(_k.has(r.overflowX)||_k.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},l={x:o.x-n.x,y:o.y-n.y};l.x===0&&l.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=l.x,this.lastMoveEventInfo.point.y+=l.y):this.history.length>0&&(this.history[0].x-=l.x,this.history[0].y-=l.y),this.scrollPositions.set(t,o),mt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ba(this.updatePoint)}}function Xm(e,t){return t?{point:t(e.point)}:e}function Ik(e,t){return{x:e.x-t.x,y:e.y-t.y}}function cv({point:e},t){return{point:e,delta:Ik(e,E3(t)),offset:Ik(e,vde(t)),velocity:bde(t,.1)}}function vde(e){return e[0]}function E3(e){return e[e.length-1]}function bde(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=E3(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Xr(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&o.timestamp-r.timestamp>Xr(t)*2&&(r=e[1]);const l=pa(o.timestamp-r.timestamp);if(l===0)return{x:0,y:0};const c={x:(o.x-r.x)/l,y:(o.y-r.y)/l};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}function wde(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Mt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Mt(n,e,r.max):Math.min(e,n)),e}function Mk(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Sde(e,{top:t,left:n,bottom:r,right:o}){return{x:Mk(e.x,n,o),y:Mk(e.y,t,r)}}function Dk(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Cde(e,t){return{x:Dk(e.x,t.x),y:Dk(e.y,t.y)}}function Nde(e,t){let n=.5;const r=Sr(e),o=Sr(t);return o>r?n=Tc(t.min,t.max-r,e.min):r>o&&(n=Tc(e.min,e.max-o,t.min)),Ya(0,1,n)}function Ade(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const S0=.35;function Ede(e=S0){return e===!1?e=0:e===!0&&(e=S0),{x:Lk(e,"left","right"),y:Lk(e,"top","bottom")}}function Lk(e,t,n){return{min:qk(e,t),max:qk(e,n)}}function qk(e,t){return typeof e=="number"?e:e[t]||0}const jde=new WeakMap;class Tde{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=On(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const l=g=>{n&&this.snapToCursor(hf(g).point),this.stopAnimation()},c=(g,v)=>{const{drag:b,dragPropagation:S,onDragStart:C}=this.getProps();if(b&&!S&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ice(b),!this.openDragLock))return;this.latestPointerEvent=g,this.latestPanInfo=v,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ps(A=>{let T=this.getAxisMotionValue(A).get()||0;if(bs.test(T)){const{projection:E}=this.visualElement;if(E&&E.layout){const j=E.layout.layoutBox[A];j&&(T=Sr(j)*(parseFloat(T)/100))}}this.originPoint[A]=T}),C&&mt.update(()=>C(g,v),!1,!0),f0(this.visualElement,"transform");const{animationState:N}=this.visualElement;N&&N.setActive("whileDrag",!0)},d=(g,v)=>{this.latestPointerEvent=g,this.latestPanInfo=v;const{dragPropagation:b,dragDirectionLock:S,onDirectionLock:C,onDrag:N}=this.getProps();if(!b&&!this.openDragLock)return;const{offset:A}=v;if(S&&this.currentDirection===null){this.currentDirection=Rde(A),this.currentDirection!==null&&C&&C(this.currentDirection);return}this.updateAxis("x",v.point,A),this.updateAxis("y",v.point,A),this.visualElement.render(),N&&mt.update(()=>N(g,v),!1,!0)},m=(g,v)=>{this.latestPointerEvent=g,this.latestPanInfo=v,this.stop(g,v),this.latestPointerEvent=null,this.latestPanInfo=null},p=()=>{const{dragSnapToOrigin:g}=this.getProps();(g||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:y}=this.getProps();this.panSession=new A3(t,{onSessionStart:l,onStart:c,onMove:d,onSessionEnd:m,resumeAnimation:p},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:y,distanceThreshold:r,contextWindow:N3(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,l=this.isDragging;if(this.cancel(),!l||!o||!r)return;const{velocity:c}=o;this.startAnimation(c);const{onDragEnd:d}=this.getProps();d&&mt.postRender(()=>d(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Zm(t,o,this.currentDirection))return;const l=this.getAxisMotionValue(t);let c=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(c=wde(c,this.constraints[t],this.elastic[t])),l.set(c)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&dc(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=Sde(r.layoutBox,t):this.constraints=!1,this.elastic=Ede(n),o!==this.constraints&&!dc(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&ps(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=Ade(r.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!dc(t))return!1;const r=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;o.root&&(o.root.scroll=void 0,o.root.updateScroll());const l=Mce(r,o.root,this.visualElement.getTransformPagePoint());let c=Cde(o.layout.layoutBox,l);if(n){const d=n(Oce(c));this.hasMutatedConstraints=!!d,d&&(c=WL(d))}return c}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:l,dragSnapToOrigin:c,onDragTransitionEnd:d}=this.getProps(),m=this.constraints||{},p=ps(y=>{if(!Zm(y,n,this.currentDirection))return;let g=m&&m[y]||{};(c===!0||c===y)&&(g={min:0,max:0});const v=o?200:1e6,b=o?40:1e7,S={type:"inertia",velocity:r?t[y]:0,bounceStiffness:v,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...l,...g};return this.startAxisValueAnimation(y,S)});return Promise.all(p).then(d)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return f0(this.visualElement,t),r.start(HS(t,r,0,n,this.visualElement,!1))}stopAnimation(){ps(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,o=this.visualElement.getProps()[n];return o||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor(t){ps(n=>{const{drag:r}=this.getProps();if(!Zm(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,l=this.getAxisMotionValue(n);if(o&&o.layout){const{min:c,max:d}=o.layout.layoutBox[n],m=l.get()||0;l.set(t[n]-Mt(c,d,.5)+m)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!dc(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};ps(c=>{const d=this.getAxisMotionValue(c);if(d&&this.constraints!==!1){const m=d.get();o[c]=Nde({min:m,max:m},this.constraints[c])}});const{transformTemplate:l}=this.visualElement.getProps();this.visualElement.current.style.transform=l?l({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),ps(c=>{if(!Zm(c,t,null))return;const d=this.getAxisMotionValue(c),{min:m,max:p}=this.constraints[c];d.set(Mt(m,p,o[c]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;jde.set(this.visualElement,this);const t=this.visualElement.current,n=_d(t,"pointerdown",p=>{const{drag:y,dragListener:g=!0}=this.getProps(),v=p.target,b=v!==t&&fce(v);y&&g&&!b&&this.start(p)});let r;const o=()=>{const{dragConstraints:p}=this.getProps();dc(p)&&p.current&&(this.constraints=this.resolveRefConstraints(),r||(r=kde(t,p.current,()=>this.scalePositionWithinConstraints())))},{projection:l}=this.visualElement,c=l.addEventListener("measure",o);l&&!l.layout&&(l.root&&l.root.updateScroll(),l.updateLayout()),mt.read(o);const d=Yd(window,"resize",()=>this.scalePositionWithinConstraints()),m=l.addEventListener("didUpdate",(({delta:p,hasLayoutChanged:y})=>{this.isDragging&&y&&(ps(g=>{const v=this.getAxisMotionValue(g);v&&(this.originPoint[g]+=p[g].translate,v.set(v.get()+p[g].translate))}),this.visualElement.render())}));return()=>{d(),n(),c(),m&&m(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:l=!1,dragElastic:c=S0,dragMomentum:d=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:l,dragElastic:c,dragMomentum:d}}}function Uk(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function kde(e,t,n){const r=y0(e,Uk(n)),o=y0(t,Uk(n));return()=>{r(),o()}}function Zm(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Rde(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Pde extends co{constructor(t){super(t),this.removeGroupControls=Ir,this.removeListeners=Ir,this.controls=new Tde(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ir}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const uv=e=>(t,n)=>{e&&mt.update(()=>e(t,n),!1,!0)};class Ode extends co{constructor(){super(...arguments),this.removePointerDownListener=Ir}onPointerDown(t){this.session=new A3(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:N3(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:uv(t),onStart:uv(n),onMove:uv(r),onEnd:(l,c)=>{delete this.session,o&&mt.postRender(()=>o(l,c))}}}mount(){this.removePointerDownListener=_d(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let dv=!1;class _de extends h.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:l}=t;l&&(n.group&&n.group.add(l),r&&r.register&&o&&r.register(l),dv&&l.root.didUpdate(),l.addEventListener("animationComplete",()=>{this.safeToRemove()}),l.setOptions({...l.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Sp.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:l}=this.props,{projection:c}=r;return c&&(c.isPresent=l,t.layoutDependency!==n&&c.setOptions({...c.options,layoutDependency:n}),dv=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==l?c.willUpdate():this.safeToRemove(),t.isPresent!==l&&(l?c.promote():c.relegate()||mt.postRender(()=>{const d=c.getStack();(!d||!d.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),Rc.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;dv=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function j3(e){const[t,n]=zue(),r=h.useContext(BD);return s.jsx(_de,{...e,layoutGroup:r,switchLayoutGroup:h.useContext(S3),isPresent:t,safeToRemove:n})}const Ide={pan:{Feature:Ode},drag:{Feature:Pde,ProjectionNode:h3,MeasureLayout:j3}};
vendor: 1,028 bytes, line 53
53function zk(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,l=r[o];l&&mt.postRender(()=>l(t,hf(t)))}class Mde extends co{mount(){const{current:t}=this.node;t&&(this.unmount=lce(t,(n,r)=>(zk(this.node,r,"Start"),o=>zk(this.node,o,"End"))))}unmount(){}}class Dde extends co{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ff(Yd(this.node.current,"focus",()=>this.onFocus()),Yd(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Vk(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");
53const o="onTap"+(n==="End"?"":n),l=r[o];l&&mt.postRender(()=>l(t,hf(t)))}class Lde extends co{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=pce(t,(o,l)=>(Vk(this.node,l,"Start"),(c,{success:d})=>Vk(this.node,c,d?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:r?.tap===!1})}unmount(){}}const C0=new WeakMap,fv=new WeakMap,qde=e=>{const t=C0.get(e.target);t&&t(e)},Ude=e=>{e.forEach(qde)};function zde({root:e,...t}){const n=e||document;fv.has(n)||fv.set(n,{});const r=fv.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(Ude,{root:e,...t})),r[o]}function Vde(e,t,n){const r=zde(t);return C0.set(e,n),r.observe(e),()=>{C0.delete(e),r.unobserve(e)}}const Bde={some:0,all:1};class Fde extends co{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:l}=t,c={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:Bde[o]},d=m=>{const{isIntersecting:p}=m;if(this.isInView===p||(this.isInView=p,l&&!p&&this.hasEnteredView))return;p&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",p);const{onViewportEnter:y,onViewportLeave:g}=this.node.getProps(),v=p?y:g;v&&v(m)};this.stopObserver=Vde(this.node.current,c,d)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some($de(t,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function $de({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Hde={inView:{Feature:Fde},tap:{Feature:Lde},focus:{Feature:Dde},hover:{Feature:Mde}},Gde={layout:{ProjectionNode:h3,MeasureLayout:j3}},Kde={...gde,...Hde,...Ide,...Gde},rg=dde(Kde,fde);function ch(e){return typeof window>"u"?!1:e?vL():FS()}const Yde=50,Bk=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),Wde=()=>({time:0,x:Bk(),y:Bk()}),Qde={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Fk(e,t,n,r){const o=n[t],{length:l,position:c}=Qde[t],d=o.current,m=n.time;o.current=Math.abs(e[`scroll${c}`]),o.scrollLength=e[`scroll${l}`]-e[`client${l}`],o.offset.length=0,o.offset[0]=0,o.offset[1]=o.scrollLength,o.progress=Tc(0,o.scrollLength,o.current);const p=r-m;o.velocity=p>Yde?0:PS(o.current-d,p)}function Xde(e,t,n){Fk(e,"x",t,n),Fk(e,"y",t,n),t.time=n}function Zde(e,t){const n={x:0,y:0};let r=e;for(;r&&r!==t;)if(qL(r))n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;else if(r.tagName==="svg"){const o=r.getBoundingClientRect();r=r.parentElement;const l=r.getBoundingClientRect();n.x+=o.left-l.left,n.y+=o.top-l.top}else if(r instanceof SVGGraphicsElement){const{x:o,y:l}=r.getBBox();n.x+=o,n.y+=l;let c=null,d=r.parentNode;for(;!c;)d.tagName==="svg"&&(c=d),d=r.parentNode;r=c}else break;return n}const N0={start:0,center:.5,end:1};function $k(e,t,n=0){let r=0;if(e in N0&&(e=N0[e]),typeof e=="string"){const o=parseFloat(e);e.endsWith("px")?r=o:e.endsWith("%")?e=o/100:e.endsWith("vw")?r=o/100*document.documentElement.clientWidth:e.endsWith("vh")?r=o/100*document.documentElement.clientHeight:e=o}return typeof e=="number"&&(r=t*e),n+r}const Jde=[0,0];function efe(e,t,n,r){let o=Array.isArray(e)?e:Jde,l=0,c=0;return typeof e=="number"?o=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?o=e.split(" "):o=[e,N0[e]?e:"0"]),l=$k(o[0],n,r),c=$k(o[1],t),l-c}const Sd={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},tfe={x:0,y:0};function nfe(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function rfe(e,t,n){const{offset:r=Sd.All}=n,{target:o=e,axis:l="y"}=n,c=l==="y"?"height":"width",d=o!==e?Zde(o,e):tfe,m=o===e?{width:e.scrollWidth,height:e.scrollHeight}:nfe(o),p={width:e.clientWidth,height:e.clientHeight};t[l].offset.length=0;let y=!t[l].interpolate;const g=r.length;for(let v=0;v<g;v++){const b=efe(r[v],p[c],m[c],d[l]);
53!y&&b!==t[l].interpolatorOffsets[v]&&(y=!0),t[l].offset[v]=b}y&&(t[l].interpolate=US(t[l].offset,pL(r),{clamp:!1}),t[l].interpolatorOffsets=[...t[l].offset]),t[l].progress=Ya(0,1,t[l].interpolate(t[l].current))}function afe(e,t=e,n){if(n.x.targetOffset=0,n.y.targetOffset=0,t!==e){let r=t;for(;r&&r!==e;)n.x.targetOffset+=r.offsetLeft,n.y.targetOffset+=r.offsetTop,r=r.offsetParent}n.x.targetLength=t===e?t.scrollWidth:t.clientWidth,n.y.targetLength=t===e?t.scrollHeight:t.clientHeight,n.x.containerLength=e.clientWidth,n.y.containerLength=e.clientHeight}function sfe(e,t,n,r={}){return{measure:o=>{afe(e,r.target,n),Xde(e,n,o),(r.offset||r.target)&&rfe(e,n,r)},notify:()=>t(n)}}const sc=new WeakMap,Hk=new WeakMap,mv=new WeakMap,Gk=new WeakMap,Jm=new WeakMap,Kk=e=>e===document.scrollingElement?window:e;function T3(e,{container:t=document.scrollingElement,trackContentSize:n=!1,...r}={}){if(!t)return Ir;let o=mv.get(t);o||(o=new Set,mv.set(t,o));const l=Wde(),c=sfe(t,e,l,r);if(o.add(c),!sc.has(t)){const m=()=>{for(const v of o)v.measure(Vn.timestamp);mt.preUpdate(p)},p=()=>{for(const v of o)v.notify()},y=()=>mt.read(m);sc.set(t,y);const g=Kk(t);window.addEventListener("resize",y),t!==document.documentElement&&Hk.set(t,y0(t,y)),g.addEventListener("scroll",y),y()}if(n&&!Jm.has(t)){const m=sc.get(t),p={width:t.scrollWidth,height:t.scrollHeight};Gk.set(t,p);const y=()=>{const v=t.scrollWidth,b=t.scrollHeight;(p.width!==v||p.height!==b)&&(m(),p.width=v,p.height=b)},g=mt.read(y,!0);Jm.set(t,g)}const d=sc.get(t);return mt.read(d,!1,!0),()=>{ba(d);const m=mv.get(t);if(!m||(m.delete(c),m.size))return;const p=sc.get(t);sc.delete(t),p&&(Kk(t).removeEventListener("scroll",p),Hk.get(t)?.(),window.removeEventListener("resize",p));const y=Jm.get(t);y&&(ba(y),Jm.delete(t)),Gk.delete(t)}}const ife=[[Sd.Enter,"entry"],[Sd.Exit,"exit"],[Sd.Any,"cover"],[Sd.All,"contain"]],Yk={start:0,end:1};function ofe(e){const t=e.trim().split(/\s+/);if(t.length!==2)return;const n=Yk[t[0]],r=Yk[t[1]];if(!(n===void 0||r===void 0))return[n,r]}function lfe(e){if(e.length!==2)return;const t=[];for(const n of e)if(Array.isArray(n))t.push(n);else if(typeof n=="string"){const r=ofe(n);if(!r)return;t.push(r)}else return;return t}function cfe(e,t){const n=lfe(e);if(!n)return!1;for(let r=0;r<2;r++){const o=n[r],l=t[r];if(o[0]!==l[0]||o[1]!==l[1])return!1}return!0}function s1(e){if(!e)return{rangeStart:"contain 0%",rangeEnd:"contain 100%"};for(const[t,n]of ife)if(cfe(e,t))return{rangeStart:`${n} 0%`,rangeEnd:`${n} 100%`}}const Wk=new Map;function Qk(e){const t={value:0},n=T3(r=>
53{t.value=r[e.axis].progress*100},e);return{currentTime:t,cancel:n}}function k3({source:e,container:t,...n}){const{axis:r}=n;e&&(t=e);let o=Wk.get(t);o||(o=new Map,Wk.set(t,o));const l=n.target??"self";let c=o.get(l);c||(c={},o.set(l,c));const d=r+(n.offset??[]).join(",");return c[d]||(n.target&&ch(n.target)?s1(n.offset)?c[d]=new ViewTimeline({subject:n.target,axis:r}):c[d]=Qk({container:t,...n}):ch()?c[d]=new ScrollTimeline({source:t,axis:r}):c[d]=Qk({container:t,...n})),c[d]}function ufe(e,t){const n=k3(t),r=t.target?s1(t.offset):void 0,o=t.target?ch(t.target)&&!!r:ch();return e.attachTimeline({timeline:o?n:void 0,...r&&o&&{rangeStart:r.rangeStart,rangeEnd:r.rangeEnd},observe:l=>(l.pause(),$L(c=>{l.time=l.iterationDuration*c},n))})}function dfe(e){return e&&(e.target||e.offset)}function ffe(e){return e.length===2}function mfe(e,t){return ffe(e)||dfe(t)?T3(n=>{e(n[t.axis].progress,n)},t):$L(e,k3(t))}function R3(e,{axis:t="y",container:n=document.scrollingElement,...r}={}){if(!n)return Ir;const o={axis:t,container:n,...r};return typeof e=="function"?mfe(e,o):ufe(e,o)}const pfe=()=>({scrollX:Va(0),scrollY:Va(0),scrollXProgress:Va(0),scrollYProgress:Va(0)}),gc=e=>e?!e.current:!1;function Xk(e,t,n,r){return{factory:o=>{let l;const c=()=>{if(gc(n)||gc(r)){Rc.read(c);return}l=R3(o,{...t,axis:e,container:n?.current||void 0,target:r?.current||void 0})};return Rc.read(c),()=>{UL(c),l?.()}},times:[0,1],keyframes:[0,1],ease:o=>o,duration:1}}function hfe(e,t){return typeof window>"u"?!1:e?vL()&&!!s1(t):FS()}function P3({container:e,target:t,...n}={}){const r=jc(pfe);hfe(t,n.offset)&&(r.scrollXProgress.accelerate=Xk("x",n,e,t),r.scrollYProgress.accelerate=Xk("y",n,e,t));const o=h.useRef(null),l=h.useRef(!1),c=h.useCallback(()=>(o.current=R3((d,{x:m,y:p})=>{r.scrollX.set(m.current),r.scrollXProgress.set(m.progress),r.scrollY.set(p.current),r.scrollYProgress.set(p.progress)},{...n,container:e?.current||void 0,target:t?.current||void 0}),()=>{o.current?.()}),[e,t,JSON.stringify(n.offset)]);return jS(()=>{if(l.current=!1,gc(e)||gc(t)){l.current=!0;return}else return c()},[c]),h.useEffect(()=>{if(!l.current)return;let d;const m=()=>{const p=gc(e),y=gc(t);!p&&!y&&(d=c())};return Rc.read(m),()=>{UL(m),d?.()}},[c]),r}function gfe(e){const t=jc(()=>Va(e)),{isStatic:n}=h.useContext(n1);if(n){const[,r]=h.useState(e);h.useEffect(()=>t.on("change",r),[])}return t}function O3(e,t){const n=gfe(t()),r=()=>n.set(t());return r(),jS(()=>{const o=()=>mt.preRender(r,!1,!0),l=e.map(c=>c.on("change",o));return()=>{l.forEach(c=>c()),ba(r)}}),n}function yfe(e){Pd.current=[],e();const t=O3(Pd.current,e);return Pd.current=void 0,t}function Gs(e,t,n,r){if(typeof e=="function")return yfe(e);if(n!==void 0&&!Array.isArray(n)&&typeof t!="function")return xfe(e,t,n,r);const c=typeof t=="function"?t:Nce(t,n,r),d=Array.isArray(e)?Zk(e,c):Zk([e],([p])=>c(p)),m=Array.isArray(e)?void 0:e.accelerate;return m&&!m.isTransformed&&typeof t!="function"&&Array.isArray(n)&&r?.clamp!==!1&&(d.accelerate={...m,times:t,keyframes:n,isTransformed:!0}),d}function Zk(e,t){const n=jc(()=>[]);return O3(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function xfe(e,t,n,r){const o=jc(()=>Object.keys(n)),l=jc(()=>({}));for(const c of o)l[c]=Gs(e,t,n[c],r);return l}function i1(){!JS.current&&GL();const[e]=h.useState(ah.current);return e}const vfe=[["â¥99%","verified purity"],["COA","on every batch"],["Same-day","shipping"]],bfe=[{src:"/media/vial-bpc.webp",ar:.443,h:"90%",cx:"50%",bottom:"3%",rot:2,z:3},{src:"/media/vial-sema.webp",ar:.439,h:"74%",cx:"20%",bottom:"0%",rot:-9,z:2},{src:"/media/vial-ghk.webp",ar:.443,h:"74%",cx:"80%",bottom:"1%",rot:10,z:1}];function wfe(){const e=i1()??!1,{scrollYProgress:t}=P3(),n=Gs(t,[0,.12],["0vh","-6vh"]),r=Gs(t,[0,.07,.12],[1,.7,0]),o=Gs(t,[0,.12],[1,.94]);return s.jsx(rg.div,{"aria-hidden":"true",style:e?void 0:{y:n,opacity:r,scale:o},className:"pointer-events-none relative mx-auto h-[clamp(300px,72vw,420px)] w-full max-w-[440px] lg:mx-0 lg:h-[clamp(340px,36vw,500px)] lg:max-w-none",children:bfe.map(l=>
53s.jsx("img",{src:l.src,alt:"",draggable:!1,className:"absolute select-none object-contain",style:{height:l.h,aspectRatio:l.ar,left:l.cx,bottom:l.bottom,transform:`translateX(-50%) rotate(${l.rot}deg)`,zIndex:l.z,filter:"drop-shadow(0 26px 30px color-mix(in srgb, var(--vp-green-950) 42%, transparent))"}},l.src))})}function Sfe(){const{isAuthenticated:e}=Bt();return s.jsxs("section",{className:"vp-stage-gradient relative overflow-hidden text-white",children:[s.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 top-0 z-20 h-px",style:{background:"var(--gold-sheen)",opacity:.6}}),s.jsxs("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0",children:[s.jsx("div",{className:"absolute -top-[12%] -right-[6%] size-[clamp(280px,38vw,520px)] rounded-full blur-[2px]",style:{background:"radial-gradient(circle, color-mix(in srgb, var(--vp-mint) 30%, transparent), transparent 65%)"}}),s.jsx("div",{className:"absolute -bottom-[18%] -left-[8%] size-[clamp(320px,42vw,560px)] rounded-full blur-[2px]",style:{background:"radial-gradient(circle, color-mix(in srgb, var(--vp-green-500) 35%, transparent), transparent 65%)"}})]}),s.jsxs("div",{className:"relative z-10 mx-auto grid w-full max-w-[1640px] items-center gap-x-8 gap-y-6 px-[clamp(20px,5vw,72px)] pt-[clamp(40px,7vw,84px)] pb-[clamp(40px,8vw,104px)] lg:grid-cols-[minmax(0,1fr)_minmax(0,44%)]",children:[s.jsxs("div",{className:"relative z-10 max-w-xl",children:[s.jsxs(zt,{variant:"dark",className:"mb-5",children:[s.jsx(tl,{"aria-hidden":"true",className:"size-3.5 text-vida-mint"}),"For laboratory research use only"]}),s.jsxs("h1",{className:"mb-6 font-display text-display text-balance",children:["Research-grade peptides.",s.jsx("br",{}),s.jsx("span",{className:"vp-gold-text",children:"Verified, every lot."})]}),s.jsx("div",{className:"mb-8",children:s.jsx(Le,{asChild:!0,variant:"primaryOnDark",size:"lg",className:"border-[color:var(--gold-hairline)] hover:border-vida-gold-500/70",children:s.jsxs(Ue,{href:e?"/products":"/login?redirect=%2Fproducts","data-testid":"link-browse-catalog",children:[e?"Shop research peptides":"Sign in to shop",s.jsx(ul,{"aria-hidden":"true",className:"size-4"})]})})}),s.jsx("div",{className:"flex flex-wrap items-center gap-x-6 gap-y-3",children:vfe.map(([t,n])=>s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{className:"text-[17px] font-mono font-bold tracking-[-0.01em] tabular-nums",children:t}),s.jsx("span",{className:"text-[12.5px] text-white/60",children:n})]},t))})]}),s.jsx(wfe,{})]})]})}const Cfe=[{src:"/media/vial-sema.webp",ar:.439,side:"left",width:"clamp(150px, 17vw, 300px)",bleed:"clamp(-60px, -2.5vw, -16px)",win:[.08,.2,.4],baseRotate:-7},{src:"/media/vial-bpc.webp",ar:.443,side:"right",width:"clamp(140px, 16vw, 280px)",bleed:"clamp(-60px, -2.5vw, -16px)",win:[.36,.5,.7],baseRotate:8},{src:"/media/vial-ghk.webp",ar:.443,side:"left",width:"clamp(140px, 16vw, 280px)",bleed:"clamp(-60px, -2.5vw, -16px)",win:[.64,.78,.98],baseRotate:-9}];function Nfe({v:e,progress:t}){const[n,r,o]=e.win,l=Gs(t,[n,r,(r+o)/2,o],[0,1,1,0]),c=Gs(t,[n,r],[.72,1.06]),d=Gs(t,[n,o],["-14vh","62vh"]),m=e.side==="left"?["-4vw","0vw"]:["4vw","0vw"],p=Gs(t,[n,r],m);return s.jsx(rg.div,{className:"absolute top-[12vh]",style:{[e.side]:e.bleed,width:e.width,aspectRatio:e.ar,opacity:l,scale:c,x:p,y:d,rotate:e.baseRotate,filter:"drop-shadow(0 26px 30px color-mix(in srgb, var(--vp-green-950) 32%, transparent))"},children:s.jsx("img",{src:e.src,alt:"",draggable:!1,className:"size-full select-none object-contain"})})}function Afe(){const e=i1()??!1,{scrollYProgress:t}=P3(),n=Gs(t,[.84,.93],[1,0]);return e?null:s.jsx(rg.div,{"aria-hidden":"true",style:{opacity:n},className:"pointer-events-none fixed inset-0 z-0 overflow-hidden",children:Cfe.map(r=>s.jsx(Nfe,{v:r,progress:t},r.src))})}const Efe=[{key:"coa",icon:cU,title:"COA on every batch",body:"Every lot ships with a Certificate of Analysis. Scan the QR for the supplier COA now. Our independent third-party COA is added as it returns."},{key:"qr",icon:L2,title:"Batch QR on every vial",body:"Scan the QR on your vial to pull the certificate for your exact lot: identity, purity, mass, and a sterility screen."},{key:"purity",icon:Ic,title:"â¥99% purity, enforced",body:"Lots that miss specification never ship. Research-use qualification is required on every order."}];function jfe(){return s.jsx(ur,{className:"pt-[clamp(40px,6vw,72px)]",children:s.jsx("div",{className:"grid gap-4 md:grid-cols-3",children:Efe.map(({key:e,icon:t,title:n,body:r},o)=>s.jsxs(Ut,{className:"vp-reveal px-6 py-[26px]",style:{transitionDelay:`${o*.08}s`},children:[s.jsx("div",{className:"mb-4 flex size-[46px] items-center justify-center rounded-[14px] bg-vida-mint-soft text-vida-green-700",children:s.jsx(t,{"aria-hidden":"true",className:"size-[22px]"})}),s.jsx("h3",{className:"font-display text-t3 mb-2 text-ink",children:n}),s.jsx("p",{className:"text-[15px] leading-relaxed text-ink-2",children:r})]},e))})})}function Cn({className:e,...t}){return s.jsx("div",{className:Y("animate-pulse rounded-md bg-primary/10",e),...t})}function Tfe({product:e}){const t=fD(e.slug),n=hh(e.slug,e.name),r=e.minPriceCents??e.priceCents,o=e.maxPriceCents??e.priceCents,l=r!=null&&o!=null,c=l&&r!==o,d="stockQuantity"in e?e.stockQuantity>0:e.isAvailable===!0,m=e.variantCount>0&&l,p=Wh(e);return s.jsx(Ue,{href:`/products/${e.slug}`,"data-testid":`card-product-${e.id}`,className:"group block h-full snap-start",onPointerEnter:t,onFocus:t,children:s.jsxs(Ut,{unpadded:!0,tone:"solid",className:"flex h-full flex-col overflow-hidden ring-1 ring-vida-gold-500/45 motion-safe:transition-[transform,box-shadow] motion-safe:duration-300 group-hover:-translate-y-[3px] group-hover:shadow-lg group-hover:ring-vida-gold-500/70",children:[s.jsxs("div",{className:"relative aspect-square overflow-hidden border-b border-[var(--vp-
53hairline)]",style:{background:"radial-gradient(90% 80% at 50% 20%, #ffffff 0%, var(--vp-mint-soft) 100%)"},children:[e.primaryImage?.url?s.jsx("img",{src:e.primaryImage.url,alt:e.name,loading:"lazy",className:"absolute inset-0 size-full object-cover"}):p.imageFallback==="vial"?s.jsx("div",{className:"flex size-full items-center justify-center",children:s.jsx(Nc,{cap:n,label:e.baseAcronym||e.name,size:84})}):s.jsx("div",{className:"flex size-full items-center justify-center",children:s.jsx(Zi,{className:"size-16 text-vida-green-700","aria-label":`${p.fallbackSubtitle} image unavailable`})}),s.jsx("div",{className:"absolute top-3 left-3 flex max-w-[72%] flex-wrap gap-1.5",children:(e.badges??[]).slice(0,2).map(y=>s.jsx(xS,{badge:y},y.id))})]}),s.jsxs("div",{className:"flex flex-1 flex-col gap-1.5 p-4",children:[e.categoryName?s.jsx("p",{className:"text-overline uppercase text-primary",children:e.categoryName}):null,s.jsx("h3",{className:"font-display text-t3 leading-tight text-ink",children:e.name}),s.jsxs("div",{className:"mt-auto flex items-end justify-between gap-2 pt-2",children:[l?s.jsx("span",{"data-testid":`text-price-${e.id}`,children:s.jsx(Zw,{price:r/100,suffix:c?"+":void 0,size:"default",className:"[&>span]:text-vida-gold-700 dark:[&>span]:text-vida-gold-300"})}):s.jsx("span",{className:"text-caption text-ink-3",children:"Price unavailable"}),m?d?s.jsx(zt,{variant:"mint",children:"In stock"}):s.jsx(zt,{variant:"outline",children:"Out of stock"}):s.jsx(zt,{variant:"outline",children:"Not available"})]})]})]})})}function o1({products:e,ariaLabel:t,autoAdvanceMs:n=0,className:r,testId:o}){const l=i1(),c=h.useRef(null),[d,m]=h.useState(0),p=h.useRef(0),[y,g]=h.useState(!1),[v,b]=h.useState(!1),[S,C]=h.useState(!1),[N,A]=h.useState(!1),[T,E]=h.useState(!1),j=h.useRef({pointerId:-1,startX:0,startScroll:0,moved:!1}),_=e.length;h.useEffect(()=>{p.current=d},[d]);const R=h.useCallback(()=>{const I=c.current;if(!I)return 0;let O=0,F=Number.POSITIVE_INFINITY;for(let B=0;B<I.children.length;B++){const K=I.children[B],le=Math.abs(K.offsetLeft-I.scrollLeft);le<F&&(F=le,O=B)}return O},[]),P=h.useCallback(I=>{const O=c.current;if(!O)return;const F=O.children[Math.max(0,Math.min(_-1,I))];F&&O.scrollTo({left:F.offsetLeft,behavior:l?"auto":"smooth"})},[_,l]);h.useEffect(()=>{const I=c.current;if(!I)return;let O=0;const F=()=>{cancelAnimationFrame(O),O=requestAnimationFrame(()=>m(R()))};return I.addEventListener("scroll",F,{passive:!0}),()=>{I.removeEventListener("scroll",F),cancelAnimationFrame(O)}},[R]),h.useEffect(()=>{const I=c.current;if(!I||n<=0||typeof IntersectionObserver>"u")return;const O=new IntersectionObserver(F=>E(F[0]?.isIntersecting??!1),{threshold:.35});return O.observe(I),()=>O.disconnect()},[n]);const M=N||S,q=n>0&&!l&&_>1,U=q&&T&&!v&&!M&&!y;h.useEffect(()=>{if(!U)return;const I=window.setInterval(()=>{document.visibilityState==="visible"&&P((p.current+1)%_)},n);return()=>window.clearInterval(I)},[U,n,_,P]);const V=I=>{C(!0),P(I)},$=I=>{if(I.pointerType==="touch"){C(!0);return}if(I.pointerType!=="mouse"||I.button!==0)return;const O=c.current;O&&(j.current={pointerId:I.pointerId,startX:I.clientX,startScroll:O.scrollLeft,moved:!1},g(!0))},L=I=>{const O=c.current;if(!O||j.current.pointerId!==I.pointerId)return;const F=I.clientX-j.current.startX;!j.current.moved&&Math.abs(F)>5&&(j.current.moved=!0,C(!0),O.setPointerCapture(I.pointerId)),j.current.moved&&(O.scrollLeft=j.current.startScroll-F)},H=I=>{const O=c.current;if(!O||j.current.pointerId!==I.pointerId)return;const F=j.current.moved;j.current.pointerId=-1,g(!1),O.hasPointerCapture(I.pointerId)&&O.releasePointerCapture(I.pointerId),F&&requestAnimationFrame(()=>P(R()))},Q=I=>{j.current.moved&&(I.preventDefault(),I.stopPropagation(),j.current.moved=!1)};return _===0?null:s.jsxs("section",{"aria-roledescription":"carousel","aria-label":t,"data-testid":o,className:Y("relative",r),onPointerEnter:I=>I.pointerType==="mouse"&&b(!0),onPointerLeave:I=>I.pointerType==="mouse"&&b(!1),onFocus:()=>b(!0),onBlur:I=>{I.currentTarget.contains(I.relatedTarget)||b(!1)},children:[s.jsx(yae,{as:"ul",forwardedRef:c,showAffordance:!1,"aria-live":U?"off":"polite",className:Y("relative flex list-none select-none gap-4 px-1 pt-1 pb-2",y?"snap-none md:cursor-grabbing":"snap-x snap-mandatory md:cursor-grab"),onPointerDown:$,onPointerMove:L,onPointerUp:H,onPointerCancel:H,onClickCapture:Q,onDragStart:I=>{j.current.pointerId!==-1&&I.preventDefault()},children:e.map((I,O)=>s.jsx(rg.li,{"aria-roledescription":"slide","aria-label":`${O+1} of ${_}`,className:"w-[min(78vw,270px)] flex-none snap-start",initial:l?!1:{opacity:0,x:28},whileInView:l?void 0:{opacity:1,x:0},viewport:{once:!0,amount:.25},transition:{duration:.5,ease:[.22,1,.36,1],delay:Math.min(O*.06,.3)},children:s.jsx(Tfe,{product:I})},I.id))}),_>1&&s.jsxs(s.Fragment,{children:[s.jsx(Jk,{dir:"prev",disabled:d<=0,onClick:()=>V(d-1),ariaLabel:`Previous products in ${t}`}),s.jsx(Jk,{dir:"next",disabled:d>=_-1,onClick:()=>V(d+1),ariaLabel:`Next products in ${t}`}),s.jsxs("div",{className:"mt-3 flex items-center justify-center gap-1",children:[q&&s.jsx("button",{type:"button","aria-label":M?`Resume automatic rotation of ${t}`:`Pause automatic rotation of ${t}`,"data-testid":o?`${o}-autoplay-toggle`:void 0,onClick:()=>{M?(C(!1),A(!1)):A(!0)},className:"mr-1.5 grid size-6 place-items-center rounded-pill text-ink-2 motion-safe:transition-colors hover:text-ink",children:M?s.jsx(uU,{"aria-hidden":"true",className:"size-3.5 fill-current"}):s.jsx(dU,{"aria-hidden":"true",className:"size-3.5 fill-current"})}),e.map((I,O)=>s.jsx("button",{type:"button","aria-label":`Go to ${I.name} (${O+1} of ${_})`,"aria-current":O===d?"true":void 0,onClick:()=>V(O),className:"group/dot grid size-6 place-items-center",children:s.jsx("span",{className:Y("h-1.5 rounded-pill motion-safe:transition-all motion-safe:duration-300",O===d?"w-5 bg-vida-green-600":"w-1.5 bg-ink/50 group-hover/dot:bg-ink/70")})},I.id))]})]})]})}function Jk({dir:e,disabled:t,onClick:n,ariaLabel:r}){const o=e==="prev"?fU:ul;return s.jsx("button",{type:"button","aria-label":r,disabled:t,onClick:n,className:Y("vp-glass-strong absolute top-[40%] z-10 hidden size-11 -translate-y-1/2 place-items-center rounded-full text-ink shadow-md md:grid","motion-safe:transition-[opacity,box-shadow,transform] hover:shadow-lg motion-safe:hover:scale-[1.04]","disabled:pointer-events-none disabled:opacity-30",e==="prev"?"-left-2 lg:-left-5":"-right-2 lg:-right-5"),children:s.jsx(o,{"aria-hidden":"true",className:"size-5"})})}const kfe=["a","b","c","d"];function Rfe(){const{isAuthenticated:e}=Bt(),{data:t,isLoading:n}=eK(),r=t?.items??[];return s.jsxs(ur,{className:"pt-[clamp(48px,7vw,88px)]",children:[s.jsxs("div",{className:"mb-6 flex items-end justify-between gap-4",children:[s.jsx(si,{overline:"Catalog",title:"Featured products",className:"[&>p:first-child]:text-vida-gold-700 dark:[&>p:first-child]:text-vida-gold-300"}),s.jsx(Le,{asChild:!0,variant:"ghost",size:"sm",className:"shrink-0",children:s.jsxs(Ue,{href:e?"/products":"/login?redirect=%2Fproducts","data-testid":"link-view-all",children:[e?"View all":"Sign in to view all",s.jsx(ul,{"aria-hidden":"true",className:"size-3.5"})]})})]}),n?s.jsx("div",{className:"flex gap-4 overflow-hidden px-1 pt-1 pb-2",children:kfe.map(o=>s.jsx(Cn,{className:"h-72 w-[min(78vw,270px)] flex-none rounded-card"},o))}):r.length===0?s.jsx("p",{className:"text-caption text-ink-3",children:"No featured products at this time."}):s.jsx(o1,{products:r,ariaLabel:"Featured products",autoAdvanceMs:5500,testId:"carousel-featured"})]})}function Pfe(){const{isAuthenticated:e}=Bt(),t={limit:24},{data:n}=Lh(t,{query:{enabled:e,queryKey:Ow(t)}}),r=(n?.items??[]).filter(o=>(o.badges?.length??0)>0);return r.length===0?null:s.jsxs(ur,{className:"pt-[clamp(40px,6vw,72px)]",children:[s.jsx(si,{overline:"Limited time",title:"Featured offers",sub:"Current catalog promotions. Every lot ships with its Certificate of Analysis. For laboratory research use only.",className:"[&>p:first-child]:text-vida-gold-700 dark:[&>p:first-child]:text-vida-gold-300"}),s.jsx(o1,{products:r.slice(0,8),ariaLabel:"Featured offers",testId:"carousel-offers",className:"mt-6"})]})}function Ofe(e){if(!e||e<=0)return null;const t=e/100,n=Math.round(t*10)/10;return`${Number.isInteger(n)?n.toFixed(0):n.toFixed(1)}%`}function _fe(e){if(!e.isLive)return null;const t=Ofe(e.discountBps);return t?`${t} off while the feature runs`:null}function pv(e,t){const n=new Date(e);return Number.isNaN(n.getTime())?"":n.toLocaleDateString("en-US",{month:"short",day:"numeric",...t?{year:"numeric"}:{}})}function Ife(e){const t=e.startsAt?pv(e.startsAt,!1):"",n=e.startsAt?pv(e.startsAt,!0):"",r=e.endsAt?pv(e.endsAt,!0):"";return t&&r?`${t} to ${r}`:n?`From ${n}`:r?`Through ${r}`:""}function wwe(e){if(e.isLive)return"Live now";const t=Date.now(),n=e.startsAt?new Date(e.startsAt).getTime():Number.NaN;return!Number.isNaN(n)&&n>t?"Coming up":"Past feature"}function Mfe(){const{isAuthenticated:e}=Bt(),{data:t}=SX({query:{enabled:e,queryKey:B_()}}),n=t?.file??null;if(!e||!n)return null;const r=_fe(n),o=Ife(n);return s.jsxs(ur,{className:"pt-[clamp(40px,6vw,72px)]",children:[s.jsx(si,{overline:"This week's Vida File",title:"One peptide, one write-up, one week.",sub:"A members-only deep dive on a single research compound, with an automatic offer on that peptide while the feature runs. For laboratory research use only."}),s.jsx(Ut,{tone:"strong",unpadded:!0,className:"mt-6 overflow-hidden","data-testid":"vida-file-spotlight",children:s.jsxs("div",{className:"grid gap-0 md:grid-cols-[1fr_1.2fr]",children:[n.heroImageUrl?s.jsx("div",{className:"aspect-(--vp-slot-aspect) overflow-hidden bg-muted md:aspect-auto md:min-
53h-[260px]",style:dT("vida_hero"),children:s.jsx("img",{src:n.heroImageUrl,alt:"",loading:"lazy",className:"h-full w-full object-cover"})}):s.jsx("div",{className:"flex aspect-(--vp-slot-aspect) items-center justify-center bg-vida-mint-soft dark:bg-vida-green-700 md:aspect-auto md:min-h-[260px]",style:dT("vida_hero"),children:s.jsx(Md,{"aria-hidden":"true",className:"size-12 text-vida-green-800 dark:text-vida-mint"})}),s.jsxs("div",{className:"flex flex-col justify-center p-5 sm:p-7",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsx(zt,{variant:"mint",children:"Live now"}),n.badgeLabel?s.jsx(zt,{variant:"gold",children:n.badgeLabel}):null]}),s.jsx("h3",{className:"font-display text-t2 mt-3 text-ink",children:n.title}),n.productName?s.jsxs("p",{className:"text-caption mt-1 text-ink-3",children:["Featuring ",n.productName]}):null,n.summary?s.jsx("p",{className:"text-body mt-3 line-clamp-3 text-ink-2",children:n.summary}):null,r||o?s.jsx("p",{className:"text-caption mt-3 font-semibold text-vida-green-800 dark:text-vida-mint",children:r??o}):null,s.jsxs("div",{className:"mt-5 flex flex-col gap-3 sm:flex-row",children:[s.jsx(Le,{asChild:!0,size:"sm",children:s.jsxs(Ue,{to:$re(n.slug),"data-testid":"link-vida-file-spotlight",children:["Read the Vida File",s.jsx(rl,{"aria-hidden":"true",className:"size-4"})]})}),n.productSlug?s.jsx(Le,{asChild:!0,size:"sm",variant:"ghost",children:s.jsxs(Ue,{to:`/products/${n.productSlug}`,children:["Shop ",n.productName??"the featured peptide"]})}):null]})]})]})})]})}function _3({excludeSlug:e,contained:t=!0,className:n}){const r=h.useMemo(()=>oZ(e),[e]),{isAuthenticated:o}=Bt(),l=Kc(),c={sort:ma.name_asc,...l?{brand:l}:{}},{data:d}=Lh(c,{query:{enabled:o&&r.length>0,queryKey:Ow(c)}}),m=h.useMemo(()=>{if(!d)return[];const y=new Map(d.items.map(g=>[g.slug,g]));return r.map(g=>y.get(g)).filter(g=>g!==void 0)},[d,r]);if(m.length===0)return null;const p=s.jsxs(s.Fragment,{children:[s.jsx(si,{overline:"Recently viewed",title:"Continue browsing",className:"mb-6 [&>p:first-child]:text-vida-gold-700 dark:[&>p:first-child]:text-vida-gold-300"}),s.jsx(o1,{products:m,ariaLabel:"Recently viewed products",testId:"carousel-recently-viewed"})]});return t?s.jsx(ur,{className:Y("pt-[clamp(48px,7vw,88px)]",n),children:p}):s.jsx("div",{className:n,children:p})}const Dfe=[["Compound","BPC-157"],["Lot","VP-2606-118"],["Identity (MS)","Confirmed"],["Purity (HPLC)","99.34%",!0],["Net peptide (mass)","Pass"],["Sterility screen","Pass"]];function Lfe(){return s.jsx("section",{className:"pt-[clamp(56px,8vw,104px)]",children:s.jsx(ur,{children:s.jsxs("div",{className:"vp-reveal vp-panel-gradient relative overflow-hidden rounded-xl p-[clamp(36px,5vw,64px)] text-white",children:[s.jsx("div",{"aria-hidden":"true",className:"absolute -top-[30%] -right-[5%] size-[380px] rounded-full blur-[2px]",style:{background:"radial-gradient(circle, color-mix(in srgb, var(--vp-mint) 25%, transparent), transparent 65%)"}}),s.jsxs("div",{className:"relative grid items-center gap-x-8 gap-y-7 md:grid-cols-[1.25fr_minmax(0,360px)]",children:[s.jsxs("div",{className:"max-w-2xl",children:[s.jsx("p",{className:"text-overline uppercase mb-3 text-vida-gold-300",children:"Quality you can audit"}),s.jsx("h2",{className:"font-display text-t1 mb-4",children:"Every lot ships with its own COA."}),s.jsx("img",{src:"/media/vial-coa.webp",alt:"VidaPeps research vial showing its full gold-foil label",className:"mx-auto mb-4 block w-40 drop-shadow-[0_24px_30px_rgba(8,30,22,0.5)] md:float-right md:mt-1 md:mb-2 md:ml-7 md:w-[clamp(150px,15vw,210px)]"}),s.jsx("p",{className:"text-bodylg mb-7 text-white/75",children:"Pull the Certificate of Analysis for your exact lot: the supplier's HPLC/MS now, plus an independent third-party COA as it returns from our partner labs. Download from any product page, or scan the QR on your vial."}),s.jsx(Le,{asChild:!0,variant:"glass",children:s.jsx(Ue,{href:"/products","data-testid":"link-browse-lots",children:"Browse verified lots"})})]}),s.jsxs(Ut,{tone:"dark",goldLining:!0,"aria-hidden":"true",className:"relative z-10 w-full max-w-sm justify-self-end px-6 py-[22px]",children:[s.jsxs("div",{className:"mb-4 flex items-center gap-2.5",children:[s.jsx(Md,{"aria-hidden":"true",className:"size-5 text-vida-mint"}),s.jsx("span",{className:"text-sm font-semibold",children:"Certificate of Analysis"})]}),Dfe.map(([e,t,n])=>s.jsxs("div",{className:"flex justify-between border-b border-white/10 py-[9px] text-[13.5px]",children:[s.jsx("span",{className:"text-white/60",children:e}),s.jsx("span",{className:`font-mono font-semibold tabular-nums ${n?"text-vida-mint":"text-white"}`,children:t})]},e))]})]})]})})})}const qfe={seed:U2,sprout:O2,canopy:hU,helix:pU,apex:mU},Ufe=[{icon:V0,figure:"$100",label:"research order"}
53,{icon:z2,figure:"100 pts",label:"earned at Seed 1Ã"},{icon:_c,figure:"$2",label:"VidaCredit"}],zfe=[{key:"referral",icon:gU,title:"Refer a colleague",body:"Share your code. When their first order of $50+ is placed and paid, you both earn 250 bonus points ($5 VidaCredit)."},{key:"subscriptions",icon:yU,title:"Subscribe and stay stocked",body:"Put recurring research orders on a schedule. Your lab never runs dry and every renewal still earns points."}];function Vfe(){return s.jsxs(ur,{className:"pt-[clamp(56px,8vw,104px)]",children:[s.jsx(si,{center:!0,overline:"VidaPeps Rewards",title:"Earn on every order. Climb every tier.",sub:"A free account earns points on each dollar, multiplies them as you climb, and turns them into VidaCredit at checkout.",className:"vp-reveal [&>p:first-child]:text-vida-gold-700 dark:[&>p:first-child]:text-vida-gold-300"}),s.jsxs("section",{"aria-labelledby":"rewards-tier-ladder",className:"vp-panel-gradient vp-reveal relative mt-9 overflow-hidden rounded-card p-6 text-white sm:p-8",children:[s.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute -top-[40%] -right-[8%] size-[360px] rounded-full blur-[2px]",style:{background:"radial-gradient(circle, color-mix(in srgb, var(--vp-mint) 22%, transparent), transparent 65%)"}}),s.jsxs("div",{className:"relative",children:[s.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-x-6 gap-y-2",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-overline uppercase text-vida-mint",children:"Member tiers"}),s.jsx("h3",{id:"rewards-tier-ladder",className:"font-display text-t2 mt-1.5",children:"Five tiers. One ladder."})]}),s.jsx("p",{className:"text-caption text-white/60",children:"Multipliers apply to every point you earn."})]}),s.jsx("div",{"aria-hidden":"true",className:"mt-7 hidden h-px bg-gradient-to-r from-white/15 via-vida-mint/50 to-vida-gold-300/70 lg:block"}),s.jsx("ol",{className:"mt-4 grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-5",children:Wp.map((e,t)=>{const n=qfe[e.slug]??U2,r=t===Wp.length-1;return s.jsxs("li",{className:Y("vp-glass-dark rounded-[16px] px-4 py-4 sm:px-5",r&&"ring-1 ring-vida-gold-300/45"),children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(n,{"aria-hidden":"true",className:"size-[18px] text-vida-mint"}),s.jsxs("span",{className:"text-overline uppercase tabular-nums text-white/45",children:["0",t+1]})]}),s.jsx("p",{className:"font-display text-t3 mt-3.5",children:e.name}),s.jsx("p",{className:Y("font-display mt-0.5 text-[clamp(24px,3vw,30px)] font-bold tracking-[-0.02em] tabular-nums",r?"text-vida-gold-300":"text-vida-mint"),children:e.multiplierLabel}),s.jsx("p",{className:"text-caption mt-1 text-white/60",children:e.minPoints===0?"From your first order":`From ${e.minPoints.toLocaleString()} pts`})]},e.slug)})})]})]}),s.jsxs("div",{className:"mt-4 grid gap-4 md:grid-cols-3",children:[s.jsxs(Ut,{tone:"strong",className:"vp-reveal px-6 py-[26px]",children:[s.jsx("div",{className:"mb-4 flex size-[46px] items-center justify-center rounded-[14px] bg-vida-mint-soft text-vida-green-700",children:s.jsx(z2,{"aria-hidden":"true",className:"size-[22px]"})}),s.jsx("h3",{className:"font-display text-t3 mb-2 text-ink",children:"Points, in practice"}),s.jsx("p",{className:"text-[15px] leading-relaxed text-ink-2",children:"Earn 1 point per dollar. Redeem 100 points for $2 in VidaCredit at checkout."}),s.jsx("div",{className:"mt-5 flex items-center justify-between gap-1 rounded-[16px] bg-ink/[0.03] px-3 py-3.5",children:Ufe.map((e,t)=>s.jsxs(h.Fragment,{children:[t>0?s.jsx(rl,{"aria-hidden":"true",className:"size-4 shrink-0 text-primary/60"}):null,s.jsxs("div",{className:"flex flex-1 flex-col items-center text-center",children:[s.jsx(e.icon,{"aria-hidden":"true",className:"mb-1.5 size-[18px] text-primary"}),s.jsx("span",{className:"font-display text-t3 tabular-nums text-ink",children:e.figure}),s.jsx("span",{className:"text-caption text-ink-3",children:e.label})]})]},e.label))})]}),zfe.map(({key:e,icon:t,title:n,body:r},o)=>s.jsxs(Ut,{className:"vp-reveal px-6 py-[26px]",style:{transitionDelay:`${(o+1)*.08}s`},children:[s.jsx("div",{className:"mb-4 flex size-[46px] items-center justify-center rounded-[14px] bg-vida-mint-soft text-vida-green-700",children:s.jsx(t,{"aria-hidden":"true",className:"size-[22px]"})}),s.jsx("h3",{className:"font-display text-t3 mb-2 text-ink",children:n}),s.jsx("p",{className:"text-[15px] leading-relaxed text-ink-2",children:r})]},e))]}),s.jsxs("div",{className:"vp-reveal mt-8 flex flex-col items-center justify-center gap-3 sm:flex-row",children:[s.jsx(Le,{asChild:!0,variant:"primary",size:"lg",className:"w-full sm:w-auto",children:s.jsxs(Ue,{href:"/register","data-testid":"link-join-rewards",children:["Create a free account",s.jsx(rl,{"aria-hidden":"true",className:"size-4"})]})}),s.jsx(Le,{asChild:!0,variant:"glassLight",size:"lg",className:"w-full sm:w-auto",children:s.jsx(Ue,{href:"/rewards","data-testid":"link-referral-program",children:"Explore the referral program"})})]})]})}function Bfe(){return s.jsx(ur,{className:"pt-[clamp(56px,8vw,104px)] pb-[clamp(64px,8vw,110px)]",children:s.jsxs("div",{"data-testid":"banner-ruo-landing",className:"vp-reveal flex flex-wrap items-start gap-5 rounded-xl border border-amber/20 bg-amber-tint p-[clamp(28px,4vw,44px)]",children:[s.jsx("div",{className:"flex size-13 shrink-0 items-center justify-center rounded-2xl bg-amber/10 text-amber",children:s.jsx(el,{"aria-hidden":"true",className:"size-[26px]"})}),s.jsxs("div",{className:"min-w-0 flex-[1_1_420px]",children:[s.jsx("h2",{className:"font-display text-t2 mb-2.5 text-amber",children:"Strictly for laboratory research."}),s.jsx("p",{className:"text-body mb-4 max-w-2xl text-amber",children:"VidaPeps products are chemical reference materials for in-vitro research by qualified professionals. They are not for human or veterinary use of any kind, are not dietary supplements, and have not been evaluated by the FDA. Every order requires an affirmation of research-use intent, and we enforce it."}),s.jsxs("div",{className:"flex flex-wrap gap-2.5",children:[s.jsx(Le,{asChild:!0,size:"sm",className:"bg-amber text-white shadow-sm hover:bg-amber/90",children:s.jsx(Ue,{href:"/legal/disclaimer","data-testid":"link-full-disclaimer",children:"Read the full disclaimer"})}),s.jsx(Le,{asChild:!0,size:"sm",variant:"ghost",className:"text-amber dark:text-amber-bright",children:s.jsx(Ue,{href:"/legal/terms","data-testid":"link-terms",children:"Terms of Service"})})]})]})]})})}function Ffe(){const e=h.useRef(null);return h.useEffect(()=>{const t=e.current;if(!t)return;if(typeof IntersectionObserver>"u"){for(const l of t.querySelectorAll(".vp-reveal"))l.classList.add("in");return}const n=new IntersectionObserver(l=>{for(const c of l)c.isIntersecting&&(c.target.classList.add("in"),n.unobserve(c.target))},{threshold:.12,rootMargin:"0px 0px -8% 0px"}),r=()=>{for(const l of t.querySelectorAll(".vp-reveal:not(.in)"))n.observe(l)};r();const o=new MutationObserver(r);return o.observe(t,{childList:!0,subtree:!0}),()=>{o.disconnect(),n.disconnect()}},[]),e}function zo(e,t,n){let r=document.querySelector(`meta[${e}="${t}"]`);r||(r=document.createElement("meta"),r.setAttribute(e,t),document.head.appendChild(r)),r.setAttribute("content",n)}function $fe({title:e,description:t,ogImage:n="/vidapeps-logo.png"}){h.useEffect(()=>{document.title=e;const r=t.slice(0,160);zo("name","description",r),zo("property","og:title",e),zo("property","og:description",r),zo("property","og:image",n),zo("name","twitter:title",e),zo("name","twitter:description",r),zo("name","twitter:image",n)},[e,t,n])}function Hfe(){const e=Ffe();return $fe({title:"VidaPeps | Research Peptides, COA-Verified and U.S. Tested",description:"Research peptides with batch-specific U.S. certificates of analysis, 8x purity testing, same-day shipping, and clinic-backed research support. For laboratory research use only."}),s.jsxs("div",{ref:e,className:"relative",children:[s.jsx(Afe,{}),s.jsxs("div",{className:"relative z-10",children:[s.jsx(Sfe,{}),s.jsx("div",{className:"vp-gold-divider opacity-70","aria-hidden":"true"}),s.jsx(jfe,{}),s.jsx(Mfe,{}),s.jsx(Pfe,{}),s.jsx(Rfe,{}),s.jsx(_3,{}),s.jsx(Lfe,{}),s.jsx(Vfe,{}),s.jsx(Bfe,{})]})]})}const Gfe=h.createContext(null);function Kfe(){return h.useContext(Gfe)?.defaultOptions??{}}function Yfe(e){return typeof e=="function"}function eR(e,...t){return Yfe(e)?e(...t):e}
53const Wfe=new Map;function Qfe(e,t){Wfe.set(e,t)}function tR(e){if(e!==void 0)try{return JSON.parse(JSON.stringify(e))}catch{return null}}function Xfe(e){return typeof e.get=="function"?e.get():e.state}function Zfe(e){return{key:e.key,store:{state:tR(Xfe(e.store))},options:tR(e.options)}}var Jfe=class extends Tq{constructor(e){super({pluginId:"pacer",debug:e?.debug,reconnectEveryMs:1e3})}};const eme=(e,t)=>{const n=t.key;n&&(Qfe(n,t),I3.emit(e,Zfe({...t,key:n})))},I3=new Jfe;function nR(){return{canLeadingExecute:!0,executionCount:0,isPending:!1,lastArgs:void 0,status:"idle",maybeExecuteCount:0}}const tme={enabled:!0,leading:!1,trailing:!0,wait:0};var nme=class{#t;constructor(e,t){this.fn=e,this.store=new kq(nR()),this.setOptions=n=>{this.options={...this.options,...n},this.#n()||this.cancel()},this.#e=n=>{this.store.setState(r=>{const o={...r,...n},{isPending:l}=o;return{...o,status:this.#n()?l?"pending":"idle":"disabled"}}),eme("Debouncer",this)},this.#n=()=>!!eR(this.options.enabled,this),this.#s=()=>eR(this.options.wait,this),this.maybeExecute=(...n)=>{if(!this.#n())return;this.#e({maybeExecuteCount:this.store.state.maybeExecuteCount+1});let r=!1;this.options.leading&&this.store.state.canLeadingExecute&&(this.#e({canLeadingExecute:!1}),r=!0,this.#r(...n)),this.options.trailing&&this.#e({isPending:!0,lastArgs:n}),this.#t&&clearTimeout(this.#t),this.#t=setTimeout(()=>{this.#e({canLeadingExecute:!0}),this.options.trailing&&!r&&this.#r(...n)},this.#s())},this.#r=(...n)=>{this.#n()&&(this.fn(...n),this.#e({executionCount:this.store.state.executionCount+1,isPending:!1,lastArgs:void 0}),this.options.onExecute?.(n,this))},this.flush=()=>{this.store.state.isPending&&this.store.state.lastArgs&&(this.#a(),this.#r(...this.store.state.lastArgs))},this.#a=()=>{this.#t&&(clearTimeout(this.#t),this.#t=void 0)},this.cancel=()=>{this.#a(),this.#e({canLeadingExecute:!0,isPending:!1})},this.reset=()=>{this.#e(nR())},this.key=t.key,this.options={...tme,...t},this.#e(this.options.initialState??{}),this.key&&I3.on("d-Debouncer",n=>{n.payload.key===this.key&&(this.#e(n.payload.store.state),this.setOptions(n.payload.options))})}#e;#n;#s;#r;#a};function rme(e,t,n=()=>({})){const r={...Kfe().debouncer,...t},[o]=h.useState(()=>{const c=new nme(e,r);return c.Subscribe=function(m){const p=VA(c.store,m.selector,{compare:BA});return typeof m.children=="function"?m.children(p):m.children},c});o.fn=e,o.setOptions(r),h.useEffect(()=>()=>{r.onUnmount?r.onUnmount(o):o.cancel()},[]);const l=VA(o.store,n,{compare:BA});return h.useMemo(()=>({...o,state:l}),[o,l])}function ame(e,t,n){const[r,o]=h.useState(e),l=rme(o,t,n);return[r,l.maybeExecute,l]}function sme(e,t,n){const[r,o,l]=ame(e,t,n);return h.useEffect(()=>{o(e)},[e,o]),[r,l]}var ime=Object.defineProperty,gf=(e,t)=>ime(e,"name",{value:t,configurable:!0}),l1="Collapsible",[ome,M3]=nr(l1),[lme,c1]=ome(l1),cme=h.forwardRef(gf(function(t,n){const{__scopeCollapsible:r,open:o,defaultOpen:l,disabled:c,onOpenChange:d,...m}=t,[p,y]=va({prop:o,defaultProp:l??!1,onChange:d,caller:l1});return s.jsx(lme,{scope:r,disabled:c,contentId:ha(),open:p,onOpenToggle:h.useCallback(()=>y(g=>!g),[y]),children:s.jsx(Ge.div,{"data-state":ag(p),"data-disabled":c?"":void 0,...m,ref:n})})},"Collapsible")),ume="CollapsibleTrigger",dme=h.forwardRef(gf(function(t,n){const{__scopeCollapsible:r,...o}=t,l=c1(ume,r);return s.jsx(Ge.button,{type:"button","aria-controls":l.open?l.contentId:void 0,"aria-expanded":l.open||!1,"data-state":ag(l.open),"data-disabled":l.disabled?"":void 0,disabled:l.disabled,...o,ref:n,onClick:je(t.onClick,l.onOpenToggle)})},"CollapsibleTrigger")),D3="CollapsibleContent",fme=h.forwardRef(gf(function(t,n){const{forceMount:r,...o}=t,l=c1(D3,t.__scopeCollapsible);return s.jsx(Dr,{present:r||l.open,children:({present:c})=>s.jsx(mme,{...o,ref:n,present:c})})},"CollapsibleContent")),mme=h.forwardRef(gf(function(t,n){const{__scopeCollapsible:r,present:o,children:l,...c}=t,d=c1(D3,r),[m,p]=h.useState(o),y=h.useRef(null),g=Qe(n,y),v=h.useRef(0),b=v.current,S=h.useRef(0),C=S.current,N=d.open||m,A=h.useRef(N),T=h.useRef(void 0);return h.useEffect(()=>{const E=requestAnimationFrame(()=>A.current=!1);return()=>cancelAnimationFrame(E)},[]),Vt(()=>{const E=y.current;if(E){T.current=T.current||{transitionDuration:E.style.transitionDuration,animationName:E.style.animationName},E.style.transitionDuration="0s",E.style.animationName="none";const j=E.getBoundingClientRect();v.current=j.height,S.current=j.width,A.current||(E.style.transitionDuration=T.current.transitionDuration,E.style.animationName=T.current.animationName),p(o)}},[d.open,o]),s.jsx(Ge.div,{"data-state":ag(d.open),"data-disabled":d.disabled?"":void 0,id:d.contentId,hidden:!N,...c,ref:g,style:{"--radix-collapsible-content-height":b?`${b}px`:void 0,"--radix-collapsible-content-width":C?`${C}px`:void 0,...t.style},children:N&&l})},"CollapsibleContentImpl"));function ag(e){return e?"open":"closed"}gf(ag,"getState");var pme=cme,hme=dme,gme=fme,yme=Object.defineProperty,Zr=(e,t)=>
53yme(e,"name",{value:t,configurable:!0}),Cs="Accordion",xme=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[u1,vme,bme]=nf(Cs),[sg,Swe]=nr(Cs,[bme,M3]),d1=M3(),wme=h.forwardRef(Zr(function(t,n){const{type:r,...o}=t,l=o,c=o;return s.jsx(u1.Provider,{scope:t.__scopeAccordion,children:r==="multiple"?s.jsx(Ame,{...c,ref:n}):s.jsx(Nme,{...l,ref:n})})},"Accordion")),[L3,Sme]=sg(Cs),[q3,Cme]=sg(Cs,{collapsible:!1}),Nme=h.forwardRef(Zr(function(t,n){const{value:r,defaultValue:o,onValueChange:l=Zr(()=>{},"onValueChange"),collapsible:c=!1,...d}=t,[m,p]=va({prop:r,defaultProp:o??"",onChange:l,caller:Cs});return s.jsx(L3,{scope:t.__scopeAccordion,value:h.useMemo(()=>m?[m]:[],[m]),onItemOpen:p,onItemClose:h.useCallback(()=>c&&p(""),[c,p]),children:s.jsx(q3,{scope:t.__scopeAccordion,collapsible:c,children:s.jsx(U3,{...d,ref:n})})})},"AccordionImplSingle")),Ame=h.forwardRef(Zr(function(t,n){const{value:r,defaultValue:o,onValueChange:l=Zr(()=>{},"onValueChange"),...c}=t,[d,m]=va({prop:r,defaultProp:o??[],onChange:l,caller:Cs}),p=h.useCallback(g=>m((v=[])=>[...v,g]),[m]),y=h.useCallback(g=>m((v=[])=>v.filter(b=>b!==g)),[m]);return s.jsx(L3,{scope:t.__scopeAccordion,value:d,onItemOpen:p,onItemClose:y,children:s.jsx(q3,{scope:t.__scopeAccordion,collapsible:!0,children:s.jsx(U3,{...c,ref:n})})})},"AccordionImplMultiple")),[Eme,ig]=sg(Cs),U3=h.forwardRef(Zr(function(t,n){const{__scopeAccordion:r,disabled:o,dir:l,orientation:c="vertical",...d}=t,m=h.useRef(null),p=Qe(m,n),y=vme(r),v=rf(l)==="ltr",b=je(t.onKeyDown,S=>{if(!xme.includes(S.key))return;const C=S.target,N=y().filter(q=>!q.ref.current?.disabled),A=N.findIndex(q=>q.ref.current===C),T=N.length;if(A===-1)return;S.preventDefault();let E=A;const j=0,_=T-1,R=Zr(()=>{E=A+1,E>_&&(E=j)},"moveNext"),P=Zr(()=>{E=A-1,E<j&&(E=_)},"movePrev");switch(S.key){case"Home":E=j;break;case"End":E=_;break;case"ArrowRight":c==="horizontal"&&(v?R():P());break;case"ArrowDown":c==="vertical"&&R();break;case"ArrowLeft":c==="horizontal"&&(v?P():R());break;case"ArrowUp":c==="vertical"&&P();break}const M=E%T;N[M].ref.current?.focus()});return s.jsx(Eme,{scope:r,disabled:o,direction:l,orientation:c,children:s.jsx(u1.Slot,{scope:r,children:s.jsx(Ge.div,{...d,"data-orientation":c,ref:p,onKeyDown:o?void 0:b})})})},"AccordionImpl")),A0="AccordionItem",[jme,f1]=sg(A0),Tme=h.forwardRef(Zr(function(t,n){const{__scopeAccordion:r,value:o,...l}=t,c=ig(A0,r),d=Sme(A0,r),m=d1(r),p=ha(),y=o&&d.value.includes(o)||!1,g=c.disabled||t.disabled;return s.jsx(jme,{scope:r,open:y,disabled:g,triggerId:p,children:s.jsx(pme,{"data-orientation":c.orientation,"data-state":m1(y),...m,...l,ref:n,disabled:g,open:y,onOpenChange:v=>{v?d.onItemOpen(o):d.onItemClose(o)}})})},"AccordionItem")),kme="AccordionHeader",Rme=h.forwardRef(Zr(function(t,n){const{__scopeAccordion:r,...o}=t,l=ig(Cs,r),c=f1(kme,r);return s.jsx(Ge.h3,{"data-orientation":l.orientation,"data-state":m1(c.open),"data-disabled":c.disabled?"":void 0,...o,ref:n})},"AccordionHeader")),rR="AccordionTrigger",Pme=h.forwardRef(Zr(function(t,n){const{__scopeAccordion:r,...o}=t,l=ig(Cs,r),c=f1(rR,r),d=Cme(rR,r),m=d1(r);return s.jsx(u1.ItemSlot,{scope:r,children:s.jsx(hme,{"aria-disabled":c.open&&!d.collapsible||void 0,"data-orientation":l.orientation,id:c.triggerId,...m,...o,ref:n})})},"AccordionTrigger")),Ome="AccordionContent",_me=h.forwardRef(Zr(function(t,n){const{__scopeAccordion:r,...o}=t,l=ig(Cs,r),c=f1(Ome,r),d=d1(r);return s.jsx(gme,{role:"region","aria-labelledby":c.triggerId,"data-orientation":l.orientation,...d,...o,ref:n,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}})},"AccordionContent"));function m1(e){return e?"open":"closed"}Zr(m1,"getState");var Ime=wme,Mme=Tme,Dme=Rme,z3=Pme,V3=_me;const Lme=Ime,B3=h.forwardRef(({className:e,...t},n)=>s.jsx(Mme,{ref:n,className:Y("border-b",e),...t}));B3.displayName="AccordionItem";const F3=h.forwardRef(({className:e,children:t,...n},r)=>s.jsx(Dme,{className:"flex",children:s.jsxs(z3,{ref:r,className:Y("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,s.jsx(dl,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));F3.displayName=z3.displayName;const $3=h.forwardRef(({className:e,children:t,...n},r)=>s.jsx(V3,{ref:r,className:"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:s.jsx("div",{className:Y("pb-4 pt-0",e),children:t})}));$3.displayName=V3.displayName;function p1(){return Gc()==="vidapeps"}function qme(){return Gc()==="vidapeps"}function H3(){return Gc()==="vidapeps"}function Ume(){const{isAuthenticated:e}=Bt(),t=p1(),[n,r]=h.useState(null),o=h.useRef(!1);return h.useEffect(()=>{if(!t||!e||o.current)return;o.current=!0;let l=!1;return(async()=>{try{const c=await fetch("/api/games/hunt/hint",{credentials:"include"});if(!c.ok)return;const d=await c.json();!l&&d.hunting&&d.hint&&d.game&&r({hint:d.hint,game:d.game})}catch{}})(),()=>{l=!0}},[t,e]),n}function G3(){const[e,t]=h.useState(""),[n,r]=h.useState(""),[o,l]=h.useState(""),[c,d]=h.useState(ma.name_asc),[m,p]=h.useState(!1),[y]=sme(e,{wait:300}),g=Kc(),v=Rse(g),b=Ume(),S=qme(),{data:C,isLoading:N,isError:A,refetch:T}=Lh({search:y||void 0,sort:c,limit:100,...g?{brand:g}:{}}),{data:E}=O_(g?{brand:g}:void 0),j=C?.items??[],_=h.useMemo(()=>j.filter(Q=>(Q.stockQuantity??0)>0).length,[j]),R=h.useMemo(()=>m?j.filter(Q=>(Q.stockQuantity??0)>0):j,[j,m]),P=h.useMemo(()=>{const Q={compounds:[],gear:[]};for(const I of R)Q[sD(I)].push(I);return Q},[R]),M=h.useMemo(()=>jse(E??[],j,"compounds").filter(Q=>Q.slug!=="lab-supplies"),[E,j]),q=h.useMemo(()=>M.find(Q=>Q.slug===n)?.id??null,[M,n]);h.useEffect(()=>{const Q=e.trim();if(!Q)return;const I=window.setTimeout(()=>sZ(Q),900);return()=>window.clearTimeout(I)},[e]);
53const U=!!y,V=v.filter(Q=>(o===""||o===Q.key)&&P[Q.key].length>0),$=v.filter(Q=>P[Q.key].length>0),L=$.length>1?[{key:"",name:"All",count:R.length},...$.map(Q=>({key:Q.key,name:Q.title,count:P[Q.key].length}))]:[],H=m?R.length:C?.total??R.length;return s.jsxs(ur,{className:"pt-7 pb-20",children:[s.jsx("h1",{className:"sr-only",children:"Shop Catalog"}),S?s.jsx(_se,{active:"catalog",className:"mb-4"}):null,L.length>0&&s.jsx(Pse,{groups:L,active:o,onSelect:l}),b?s.jsxs("p",{"data-testid":"hunt-banner",className:"mt-3 rounded-card border border-gold/40 bg-gold/5 px-4 py-2.5 text-caption text-ink-2",children:[s.jsx("span",{className:"font-semibold text-ink",children:"An acorn is hidden in the catalogue."})," It is tucked into one product page, and it is somewhere in"," ",s.jsx("span",{className:"font-semibold text-ink",children:b.hint.categoryName}),". That is"," ",b.hint.productCount," ",b.hint.productCount===1?"page":"pages"," to look through. Find it and it is yours to scratch."]}):null,M.length>1&&!U&&s.jsx(xT,{categories:M,active:n,onSelect:r,markedSlug:b?.hint.categorySlug,className:"mb-3 sm:hidden"}),s.jsxs("div",{className:"mt-3 flex flex-col gap-2 sm:flex-row sm:items-center",children:[s.jsxs("div",{className:"relative sm:flex-1",children:[s.jsx(xU,{className:"pointer-events-none absolute top-1/2 left-4 size-4 -translate-y-1/2 text-ink-3"}),s.jsx("input",{type:"search",placeholder:"Search the catalogâ¦","aria-label":"Search the catalog",value:e,onChange:Q=>t(Q.target.value),"data-testid":"input-search",className:"h-11 w-full rounded-pill border border-[var(--vp-hairline)] bg-card pr-4 pl-10.5 text-base text-ink placeholder:text-ink-3 focus:border-ring focus:ring-[3px] focus:ring-ring/20 focus:outline-none"})]}),s.jsxs("div",{className:"flex items-center gap-2 sm:hidden",children:[s.jsx(Mse,{availableOnly:m,setAvailableOnly:p,availableCount:_,categories:M,categorySlug:n,setCategorySlug:r,sort:c,setSort:d,shownCount:H}),s.jsx("p",{className:"ml-auto text-caption text-ink-3 tabular-nums","aria-live":"polite",children:C?`${H} item${H!==1?"s":""}`:" "})]}),s.jsxs("div",{className:"hidden items-center gap-3 sm:flex",children:[s.jsxs("button",{type:"button","aria-pressed":m,onClick:()=>p(Q=>!Q),"data-testid":"filter-available",className:Y("inline-flex h-11 shrink-0 items-center gap-2 rounded-pill border px-4 text-sm font-semibold motion-safe:transition-colors",m?"border-primary bg-primary text-primary-foreground shadow-sm":"border-[var(--vp-hairline)] bg-card text-ink-2 hover:bg-muted hover:text-ink"),children:[s.jsx(z0,{className:"size-4"}),"In stock",s.jsx("span",{className:Y("inline-flex min-w-5 items-center justify-center rounded-pill px-1.5 text-overline tabular-nums",m?"bg-white/20 text-primary-foreground":"bg-ink/[0.06] text-ink-3 dark:bg-white/10 dark:text-white/70"),children:_})]}),s.jsxs(qD,{value:c,onValueChange:Q=>d(Q),children:[s.jsx(AS,{className:"h-11 w-44 rounded-pill border-[var(--vp-hairline)] bg-card font-medium","data-testid":"select-sort",children:s.jsx(UD,{})}),s.jsxs(ES,{children:[s.jsx(Go,{value:ma.name_asc,children:"Name AâZ"}),s.jsx(Go,{value:ma.price_asc,children:"Price: Low to High"}),s.jsx(Go,{value:ma.price_desc,children:"Price: High to Low"}),s.jsx(Go,{value:ma.newest,children:"Newest"})]})]})]})]}),s.jsx("p",{className:"mt-2 hidden text-caption text-ink-3 sm:block","aria-live":"polite",children:C?`${H} ${m?"in-stock item":"item"}${H!==1?"s":""}`:" "}),N?s.jsx("div",{className:`mt-6 ${jd}`,children:Array.from({length:8}).map((Q,I)=>s.jsx(Cn,{className:"h-80 rounded-card"},I))}):A?s.jsxs("div",{className:"vp-glass mt-6 rounded-card py-20 text-center",role:"alert",children:[s.jsx(tl,{className:"mx-auto mb-3 size-10 text-ink-3"}),s.jsx("p",{className:"font-semibold text-ink",children:"We couldnât load the catalog."}),s.jsx("p",{className:"mt-1 text-caption text-ink-3",children:"Your products are still here. Try again."}),s.jsx("button",{type:"button",onClick:()=>{T()},className:"mt-5 inline-flex min-h-11 items-center rounded-pill bg-primary px-5 text-sm font-semibold text-primary-foreground",children:"Try again"})]}):R.length===0?s.jsxs("div",{className:"vp-glass mt-6 rounded-card py-20 text-center",children:[s.jsx(tl,{className:"mx-auto mb-3 size-10 text-ink-3"}),s.jsx("p",{className:"font-semibold text-ink",children:"Nothing found."}),s.jsx("p",{className:"mt-1 text-caption text-ink-3",children:m?"Nothing in stock matches. Turn off âIn stockâ to see the full catalog.":g==="vidacare"&&!y?"No active products are currently assigned to the VidaCare storefront.":"Try adjusting your search or group."})]}):U?s.jsx("div",{className:`mt-6 ${jd}`,children:R.map(Q=>s.jsx(Wb,{product:Q},Q.id))}):s.jsx(Lme,{type:"multiple",defaultValue:["compounds","gear"],className:"mt-6 space-y-3",children:V.map(Q=>
53{const I=P[Q.key],O=Q.key==="compounds",F=O&&q!==null?I.filter(B=>B.categoryId===q):I;return s.jsxs(B3,{value:Q.key,className:"overflow-hidden rounded-card border-b-0","data-testid":`group-${Q.key}`,children:[s.jsx(F3,{className:"py-4 hover:no-underline",children:s.jsxs("span",{className:"flex flex-1 items-baseline gap-2.5",children:[s.jsx("span",{className:"font-display text-t3 font-semibold tracking-[-0.015em] text-ink",children:Q.title}),s.jsx("span",{className:"text-caption text-ink-3 tabular-nums",children:I.length}),s.jsxs("span",{className:"hidden truncate text-caption text-ink-3 sm:inline",children:["· ",Q.sub]})]})}),s.jsxs($3,{className:"pb-5",children:[O&&M.length>0&&s.jsx("div",{className:"hidden sm:block",children:s.jsx(xT,{categories:M,active:n,onSelect:r,markedSlug:b?.hint.categorySlug,className:"mb-4"})}),F.length>0?s.jsx("div",{className:jd,children:F.map(B=>s.jsx(Wb,{product:B},B.id))}):s.jsx("p",{className:"py-6 text-center text-caption text-ink-3",children:"No items in this group yet."})]})]},Q.key)})})]})}const Cwe=Object.freeze(Object.defineProperty({__proto__:null,default:G3},Symbol.toStringTag,{value:"Module"}));function aR(e){return!e||typeof e!="object"||!("status"in e)?null:typeof e.status=="number"?e.status:null}class zme extends h.Component{state={error:null};static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,n){aR(t)!==404&&console.error("[ProductDetailQueryBoundary]",t,n.componentStack)}retry=()=>{this.props.onReset(),this.setState({error:null})};render(){return this.state.error===null?this.props.children:aR(this.state.error)===404?s.jsx(sR,{title:"Product not found.",children:s.jsx("a",{href:"/products",className:"mt-3 inline-block font-semibold text-primary hover:text-primary",children:"Back to all products"})}):s.jsxs(sR,{title:"We couldn't load this product.",role:"alert",children:[s.jsx("p",{className:"mt-2 text-sm text-ink-3",children:"Please try the request again."}),s.jsx("button",{type:"button",onClick:this.retry,className:"mt-4 min-h-10 rounded-pill bg-primary px-5 text-sm font-semibold text-white hover:bg-primary/90",children:"Try again"}),s.jsx("a",{href:"/products",className:"mt-3 block text-sm font-semibold text-primary hover:text-primary",children:"Back to all products"})]})}}function sR({children:e,role:t,title:n}){return s.jsxs("div",{className:"mx-auto w-full max-w-3xl px-5 py-16 text-center",role:t,children:[s.jsx("p",{className:"text-body text-ink-2",children:n}),e]})}function Vme({children:e,fallback:t,slug:n}){return s.jsx(xq,{children:({reset:r})=>s.jsx(zme,{onReset:r,children:s.jsx(h.Suspense,{fallback:t,children:e})})},n)}const iR=[1,2,3,4,5];function h1({value:e,onChange:t,size:n=16,className:r,label:o,labelledBy:l}){const c=h.useId(),[d,m]=h.useState(null),p=typeof t=="function",y=Math.round(e),g=p&&d!==null?d:y;return p?s.jsx("div",{className:Y("inline-flex items-center gap-1",r),role:"radiogroup","aria-label":l?void 0:o??"Your rating","aria-labelledby":l,onMouseLeave:()=>m(null),children:iR.map(v=>{const b=v<=g;return s.jsx("button",{type:"button",role:"radio","aria-checked":e===v,"aria-label":`${v} star${v===1?"":"s"}`,id:`${c}-${v}`,"data-testid":`star-${v}`,onClick:()=>t?.(v),onMouseEnter:()=>m(v),onFocus:()=>m(v),onBlur:()=>m(null),className:"grid place-items-center rounded-pill p-0.5 text-ink-3 motion-safe:transition-colors hover:text-vida-gold-700 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:s.jsx(Qv,{"aria-hidden":"true",style:{width:n,height:n},className:Y(b&&"fill-current text-vida-gold-700")})},v)})}):s.jsx("span",{className:Y("inline-flex items-center gap-0.5",r),role:"img","aria-label":o??`${y} out of 5 stars`,children:iR.map(v=>s.jsx(Qv,{"aria-hidden":"true",style:{width:n,height:n},className:Y(v<=y?"fill-current text-vida-gold-700":"text-ink-3")},v))})}const oR=50,Bme=160,Fme=5e3;function $me({productId:e,productName:t,variantId:n,className:r}){const{isAuthenticated:o,isLoading:l}=Bt(),c=TK(e,{query:{enabled:o&&e>0,queryKey:__(e)}}),d=c.data,m=d?.items??[],p=d?.ratingCount??0,y=d?.averageRating??0;return s.jsxs("section",{id:"reviews","aria-label":`${Lj} for ${t}`,className:Y("scroll-mt-24",r),children:[s.jsx(si,{overline:Lj,title:Gte,sub:Kte}),!l&&!o?s.jsx(Ut,{className:"mt-6 max-w-2xl",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("span",{className:"flex size-9 shrink-0 items-center justify-center rounded-xl bg-vida-green-700/10 text-vida-green-700",children:s.jsx(V2,{className:"size-4","aria-hidden":"true"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-semibold text-ink",children:"Member reviews are research-verified"}),s.jsx("p",{className:"mt-0.5 text-caption text-ink-3",children:"Sign in to read researcher reviews and share fulfillment and quality notes."}),s.jsx(Le,{size:"sm",asChild:!0,className:"mt-3",children:s.jsx(Ue,{href:`/login?redirect=${encodeURIComponent("/products")}`,children:"Sign in to view reviews"})})]})]})}):s.jsxs("div",{className:"mt-6 grid gap-6 md:grid-cols-[1.1fr_0.9fr] md:items-start",children:[s.jsxs("div",{children:[c.isLoading?s.jsxs(Ut,{className:"animate-pulse",children:[s.jsx("div",{className:"h-6 w-40 rounded-pill bg-ink/5"}),s.jsx("div",{className:"mt-3 h-4 w-3/4 rounded-pill bg-ink/5"})]}):c.isError?s.jsx(Ut,{className:"text-sm text-ink-2",children:"We couldn't load reviews right now. Please try again shortly."}):p>0?s.jsxs(Ut,{tone:"strong",className:"flex items-center gap-4",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"font-display text-[34px] font-bold leading-none text-ink tabular-nums",children:y.toFixed(1)}),s.jsx(h1,{value:y,size:14,className:"mt-1.5 justify-center",label:`Average ${y.toFixed(1)} out of 5 stars`})]}
53),s.jsxs("div",{className:"border-l border-[var(--vp-hairline)] pl-4",children:[s.jsxs("p",{className:"text-sm font-semibold text-ink",children:[p," ",Yte," ",p===1?"review":"reviews"]}),s.jsx("p",{className:"mt-0.5 text-caption text-ink-3",children:Wte})]})]}):s.jsx(Ut,{className:"text-sm text-ink-2",children:"No approved reviews yet. Be the first researcher to share packaging and material-condition notes."}),m.length>0&&s.jsx("ul",{className:"mt-4 space-y-3",children:m.map(g=>s.jsx("li",{children:s.jsx(Hme,{review:g})},g.id))})]}),s.jsx(Gme,{productId:e,variantId:n})]})]})}function Hme({review:e}){const t=Kme(e.createdAt);return s.jsxs(Ut,{unpadded:!0,className:"p-4",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(h1,{value:e.rating,size:14}),e.verifiedPurchase&&s.jsxs(zt,{variant:"mint",className:"px-2 py-0.5",children:[s.jsx(D2,{className:"size-3","aria-hidden":"true"})," Verified purchase"]})]}),t&&s.jsx("time",{className:"shrink-0 text-[11px] text-ink-3 tabular-nums",dateTime:e.createdAt,children:t})]}),e.title&&s.jsx("p",{className:"mt-2 text-sm font-semibold text-ink",children:e.title}),e.body&&s.jsx("p",{className:"mt-1 text-body leading-relaxed text-ink-2",children:e.body}),s.jsx("p",{className:"mt-2 text-caption text-ink-3",children:e.authorName})]})}function Gme({productId:e,variantId:t}){const{toast:n}=Nr(),r=OK(),[o,l]=h.useState(0),[c,d]=h.useState(""),[m,p]=h.useState(""),[y,g]=h.useState(!1),v=o>=1&&o<=5&&!r.isPending,b=S=>{S.preventDefault(),v&&r.mutate({id:e,data:{rating:o,title:c.trim()||void 0,body:m.trim()||void 0,variantId:t??void 0}},{onSuccess:()=>{g(!0),n({title:"Review submitted",description:"Thanks! It will appear once a moderator approves it."})},onError:C=>n({title:"Could not submit review",description:C instanceof Error?C.message:"Please try again.",variant:"destructive"})})};return y?s.jsxs(Ut,{tone:"strong",className:"h-fit",children:[s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("span",{className:"flex size-9 shrink-0 items-center justify-center rounded-xl bg-vida-mint-soft text-vida-green-700",children:s.jsx(V2,{className:"size-4","aria-hidden":"true"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-semibold text-ink",children:"Awaiting moderation"}),s.jsx("p",{className:"mt-0.5 text-caption text-ink-3",children:Qte})]})]}),s.jsxs("div",{className:"mt-4 flex items-center gap-2.5 rounded-2xl bg-vida-mint-soft px-4 py-3",children:[s.jsx(ya,{className:"size-4 shrink-0 text-vida-green-700","aria-hidden":"true"}),s.jsxs("p",{className:"text-caption text-vida-green-800",children:["You'll earn ",s.jsxs("strong",{className:"tabular-nums",children:["+",oR," Vida Points"]})," ","once your review is approved."]})]})]}):s.jsxs(Ut,{tone:"strong",className:"h-fit","data-testid":"review-form-card",children:[s.jsx("h3",{className:"font-display text-t3 text-ink",children:"Write a review"}),s.jsxs("div",{className:"mt-2 flex items-center gap-2.5 rounded-2xl bg-vida-mint-soft px-4 py-3",children:[s.jsx(ya,{className:"size-4 shrink-0 text-vida-green-700","aria-hidden":"true"}),s.jsxs("p",{className:"text-caption text-vida-green-800",children:["Earn ",s.jsxs("strong",{className:"tabular-nums",children:["+",oR," Vida Points"]})," when your review is approved."]})]}),s.jsxs("form",{onSubmit:b,className:"mt-4 space-y-4",children:[s.jsxs("div",{children:[s.jsx("span",{id:"review-rating-label",className:"block text-overline uppercase text-ink-3",children:"Your rating"}),s.jsx(h1,{value:o,onChange:l,size:26,labelledBy:"review-rating-label",className:"mt-1.5"})]}),s.jsxs("div",{children:[s.jsxs("label",{htmlFor:"review-title",className:"block text-overline uppercase text-ink-3",children:["Title ",s.jsx("span",{className:"normal-case text-ink-3",children:"(optional)"})]}),s.jsx("input",{id:"review-title",type:"text",value:c,maxLength:Bme,onChange:S=>d(S.target.value),placeholder:"Secure packaging and clear lot records","data-testid":"input-review-title",className:"mt-1.5 w-full rounded-2xl border border-[var(--vp-
53hairline)] bg-card px-3.5 py-2.5 text-sm text-ink placeholder:text-ink-3 focus-visible:border-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"})]}),s.jsxs("div",{children:[s.jsxs("label",{htmlFor:"review-body",className:"block text-overline uppercase text-ink-3",children:["Your notes ",s.jsx("span",{className:"normal-case text-ink-3",children:"(optional)"})]}),s.jsx("textarea",{id:"review-body",value:m,rows:4,maxLength:Fme,onChange:S=>p(S.target.value),placeholder:"Notes on packaging, fulfillment, documentation, and material condition.","data-testid":"input-review-body",className:"mt-1.5 w-full resize-y rounded-2xl border border-[var(--vp-hairline)] bg-card px-3.5 py-2.5 text-sm leading-relaxed text-ink placeholder:text-ink-3 focus-visible:border-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"})]}),s.jsx("div",{role:"note","data-testid":"review-ruo-note",className:"rounded-2xl border border-amber/20 bg-amber-tint px-4 py-3",children:s.jsxs("p",{className:"text-caption leading-relaxed text-amber",children:[s.jsx("span",{className:"font-semibold",children:Xte})," Reviews must describe packaging, fulfillment, documentation, and material condition only. Preparation, administration, regimen, human or veterinary use, and health-outcome content is rejected."]})}),s.jsx(Le,{type:"submit",block:!0,disabled:!v,"data-testid":"button-submit-review",children:r.isPending?s.jsxs(s.Fragment,{children:[s.jsx(er,{className:"size-4 animate-spin","aria-hidden":"true"})," Submittingâ¦"]}):"Submit review"}),o<1&&s.jsx("p",{className:"text-center text-caption text-ink-3",children:"Pick a star rating to submit."})]})]})}function Kme(e){const t=new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}function Yme({open:e,onOpenChange:t,variantId:n,variantLabel:r,productName:o}){const{isAuthenticated:l}=Bt(),{toast:c}=Nr(),d=lD(),[m,p]=h.useState(""),[y,g]=h.useState(!1);h.useEffect(()=>{e&&(g(!1),p(""),d.reset())},[e]);const v=!l,b=m.trim(),S=!d.isPending&&(!v||b.length>3),C=N=>{N.preventDefault(),S&&d.mutate({variantId:n,...v?{email:b}:{}},{onSuccess:()=>{g(!0),c({title:"You're on the list ð",description:`${o} (${r})`})}})};return s.jsx(vM,{open:e,onOpenChange:t,children:s.jsxs(tS,{className:"vp-glass-strong max-w-md border-white/40 sm:rounded-[20px]",children:[s.jsxs(wM,{children:[s.jsx("div",{className:"mb-1 flex justify-center",children:s.jsxs(zt,{variant:"research",className:"gap-1.5",children:[y?s.jsx(k2,{className:"h-3.5 w-3.5"}):s.jsx(Qs,{className:"h-3.5 w-3.5"}),"Restock alert"]})}),s.jsx(nS,{className:"text-center font-display text-t3 text-ink",children:y?"You're on the list ð":"Notify me when it's back"}),s.jsx(rS,{className:"text-center text-caption text-ink-2",children:y?`We'll email you the moment ${o} (${r}) is back in stock.`:`Get notified when ${o} (${r}) is back.`})]}),y?s.jsx(Le,{block:!0,className:"mt-4",onClick:()=>t(!1),children:"Done"}):s.jsxs("form",{onSubmit:C,className:"mt-2 space-y-4",children:[v&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(xr,{htmlFor:"restock-email",className:"text-xs font-medium text-ink-2",children:"Email address"}),s.jsx(yr,{id:"restock-email",type:"email",required:!0,autoFocus:!0,placeholder:"[email protected]",value:m,onChange:N=>p(N.target.value),className:"bg-background/50","data-testid":"restock-email-input"})]}),d.isError&&s.jsx("p",{className:"text-caption text-danger",role:"alert",children:"Something went wrong. Please try again."}),s.jsx(Le,{type:"submit",block:!0,disabled:!S,"data-testid":"restock-submit",children:d.isPending?s.jsxs(s.Fragment,{children:[s.jsx(er,{className:"h-4 w-4 animate-spin"}),"Subscribingâ¦"]}):s.jsxs(s.Fragment,{children:[s.jsx(Qs,{className:"h-4 w-4"}),"Notify me"]})})]})]})})}function K3(e,t){const n=Math.max(0,Math.trunc(e));return Math.min(n,Math.max(0,Math.trunc(t)))}function Wme(e,t,n){const r=n?.variantIds?new Set(n.variantIds):null;let o=0,l=0,c=0;const d=[];for(const m of e){const p=K3(t[m.id]??0,m.stockQuantity);if(p===0)continue;const y=m.priceCents*p;o+=p,c+=y,(!r||r.has(m.id))&&(l+=p),d.push({variantId:m.id,quantity:p})}return{units:o,tierUnits:l,subtotalCents:c,lines:d}}function Qme(e){return e.minQty<=0?0:Math.ceil((e.subtotalCents-e.discountCents)/e.minQty)}function Xme(e,t,n){const r=e.filter(d=>d.discountBps>0);if(r.length===0)return"";if(t===0)return`Mix any ${n} to save`;const o=r.find(d=>d.minQty>t);if(!o)return"Best price unlocked";const l=o.discountBps/100,c=Number.isInteger(l)?`${l}%`:`${l.toFixed(1)}%`;return`Add ${o.minQty-t} more to save ${c}`}
53function Zme(e,t=Jme){const n=(e?.tiers??[]).map(r=>r.minQty);return[...new Set([1,...t,...n])].sort((r,o)=>r-o)}const Jme=[1,3,5,10];function epe(e,t){const n=c=>/(s|x|ch|sh)$/.test(c)?`${c}es`:`${c}s`;if(t.length>0&&t.every(c=>c.packageType?.trim().toLowerCase()==="box"))return{one:"box",many:"boxes"};const r=t[0]?.packageUnit?.trim().toLowerCase();if(r&&r!=="unit"&&t.every(c=>c.packageUnit?.trim().toLowerCase()===r))return{one:r,many:n(r)};const o=e.trim().split(/\s+/).pop()?.toLowerCase().replace(/[^a-z-]/g,"")||"item",l=o.endsWith("s")?o.slice(0,-1):o;return{one:l,many:n(l)}}function hv(e){const t=e.color?.trim();if(t)return{name:t.charAt(0).toUpperCase()+t.slice(1),sub:null};const n=e.sizeLabel?.trim();if(n){const r=/^([\d.]+\s*[a-zA-Z]+)\s*\(([^)]+)\)/.exec(n);return r?{name:r[1],sub:r[2]}:{name:n.split(",")[0].trim(),sub:null}}return{name:`${e.size} ${e.unit}`.trim(),sub:null}}const tpe=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}),ld=e=>tpe.format(e/100);function npe({productId:e,productName:t,variants:n,offer:r,variantImages:o,activeVariantId:l,onActiveVariantChange:c,onNotify:d,unitNoun:m}){const{addItems:p,itemCount:y}=oo(),g=n.length===1?n[0]:null,[v,b]=h.useState(()=>g&&g.stockQuantity>0?{[g.id]:1}:{}),[S,C]=h.useState(!1),[N,A]=h.useState(null),T=h.useMemo(()=>Wme(n,v,r),[n,v,r]),E=Z=>Z===1?m.one:m.many,j=n[0]?.priceCents??0,_=g?Zme(r):[],R=JSON.stringify([T.lines,y]),[P,M]=h.useState(null),[q,U]=h.useState(null);h.useEffect(()=>{let Z=!0;const ie=setTimeout(()=>{fY({productId:e,items:T.lines,...Hp()?{brand:"vidacare"}:{}}).then(re=>{Z&&(M({key:R,data:re}),U(re.rungs))}).catch(()=>{Z&&M({key:R,data:null})})},250);return()=>{Z=!1,clearTimeout(ie)}},[e,R]);const V=P?.key===R?P.data:null,$=T.units>0&&V===null&&P?.key!==R,L=V?.discountCents??0,H=V?V.totalCents:T.subtotalCents,Q=q??[],I=[{minQty:1,subtotalCents:j,discountCents:0,discountBps:0,base:!0},...Q.filter(Z=>Z.minQty>1)];function O(Z,ie){A(null),b(re=>({...re,[Z.id]:K3(ie,Z.stockQuantity)})),c(Z.id)}async function F(){if(T.lines.length!==0){C(!0),A(null);try{await p(T.lines),A({kind:"ok",text:`Added ${T.units} ${E(T.units)} to your cart.`}),g||b({})}catch(Z){const ie=Z instanceof Rw?Z.data:null,re=n.find(de=>de.id===ie?.variantId);A({kind:"error",text:re?`Nothing was added. ${hv(re).name} does not have ${v[re.id]??""} available right now, so your cart is unchanged. Lower it and try again.`:"Nothing was added and your cart is unchanged. Please try again."})}finally{C(!1)}}}const B=q?Xme(Q,T.tierUnits,m.many):"Checking pricesâ¦",K=q===null||Q.some(Z=>Z.discountBps>0),le=T.lines.map(Z=>{const ie=n.find(re=>re.id===Z.variantId);return ie?`${Z.quantity} ${hv(ie).name}`:null}).filter(Boolean).join(", ");return s.jsxs("div",{className:"mt-5 space-y-3","data-testid":"mix-builder",children:[K&&s.jsxs("section",{"aria-labelledby":"mix-ladder-h",className:"rounded-xl bg-card p-2.5 ring-1 ring-border",children:[s.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-x-3 gap-y-1 px-1 pb-2",children:[s.jsx("h2",{id:"mix-ladder-h",className:"text-caption font-semibold text-foreground",children:"Mix and match savings"}),s.jsx("span",{"aria-live":"polite",className:"text-caption font-semibold text-primary","data-testid":"mix-nudge",children:B})]}),s.jsx("ol",{className:"grid gap-1",style:{gridTemplateColumns:`repeat(${I.length}, minmax(0, 1fr))`},children:I.map((Z,ie)=>{const re=ie===I.length-1,de=T.tierUnits>=Z.minQty,he=de&&(re||T.tierUnits<I[ie+1].minQty);return s.jsxs("li",{"aria-current":he?"step":void 0,className:Y("rounded-lg px-1 py-1.5 text-center leading-snug motion-safe:transition-colors",he?"bg-primary text-primary-foreground":de?"bg-primary/15 text-foreground":"text-muted-foreground ring-1 ring-border"),children:[s.jsxs("span",{className:"block text-[12px]",children:[Z.minQty,re?"+":"",Z.discountBps>0?` · ${Yre(Z.discountBps)} off`:""]}),s.jsx("span",{className:"block text-caption font-bold tabular-nums",children:Z.base||q?ld(Qme(Z)):"â¦"})]},Z.minQty)})})]}),g?s.jsxs("fieldset",{children:[s.jsx("legend",{className:"mb-1.5 text-overline uppercase text-muted-foreground",children:"Pack size"}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[_.map(Z=>{const ie=(v[g.id]??0)===Z,re=Z>g.stockQuantity;return s.jsx("button",{type:"button","aria-pressed":ie,disabled:re,onClick:()=>O(g,Z),className:Y("min-h-11 min-w-16 rounded-lg px-3 text-caption font-semibold ring-1 motion-safe:transition-colors disabled:opacity-45",ie?"bg-primary text-primary-foreground ring-primary":"bg-card text-foreground ring-border hover:ring-ring"),"data-testid":`mix-preset-${Z}`,children:Z===1?"Single":`${Z}-pack`},Z)}),s.jsx(Ac,{value:v[g.id]??0,onChange:Z=>O(g,Z),min:g.stockQuantity>0?1:0,max:g.stockQuantity,size:"sm",itemLabel:m.one})]}),_.some(Z=>Z>g.stockQuantity)&&s.jsx("p",{className:"mt-1.5 text-caption text-muted-foreground",children:g.stockQuantity>0?`Only ${g.stockQuantity} in stock, so larger packs are unavailable right now.`:"Sold out right now."})]}):s.jsxs("fieldset",{children:[s.jsxs("legend",{className:"mb-1.5 text-overline uppercase text-muted-foreground",children:["Choose ",n.some(Z=>Z.color)?"colours":"sizes"," and how many of each"]}),s.jsx("ul",{className:"grid gap-1.5 sm:grid-cols-2",children:n.map(Z=>{const ie=v[Z.id]??0,re=Z.stockQuantity===0,de=!re&&Z.stockQuantity<=Z.lowStockThreshold,{name:he,sub:pe}=hv(Z),oe=Z.color?Kre[Z.color.toLowerCase()]:void 0,ge=o.get(Z.id);return s.jsxs("li",{className:Y("flex min-h-14 items-center gap-2 rounded-xl bg-card py-1.5 pl-2 pr-1.5 ring-1 motion-safe:transition-shadow",ie>0||l===Z.id?"ring-2 ring-primary":"ring-border"),"data-testid":`mix-option-${Z.id}`,children:[s.jsxs("button",{type:"button",onClick:()=>c(Z.id),"aria-label":`View ${he}${re?", sold out":""}`,className:"flex min-h-11 min-w-0 flex-1 items-center gap-2 rounded-lg text-start",children:[ge?s.jsx("span",{className:"grid size-9 shrink-0 place-items-center overflow-hidden rounded-md bg-white ring-1 ring-border",children:s.jsx("img",{src:ge,alt:"",width:32,height:32,className:"max-h-8 w-auto object-contain"})}):oe?s.jsx("span",{"aria-hidden":"true",className:"size-6 shrink-0 rounded-full ring-1 ring-border",style:{background:oe}}
53):null,s.jsxs("span",{className:"min-w-0 leading-snug",title:pe?`${he}, ${pe}`:he,children:[s.jsx("span",{className:Y("block truncate text-body font-semibold",re?"text-muted-foreground":"text-foreground"),children:he}),(pe||re||de)&&s.jsx("span",{className:Y("block truncate text-[12px]",de?"font-semibold text-vida-gold-700 dark:text-vida-gold-500":"text-muted-foreground"),children:re?"Sold out":de?`Only ${Z.stockQuantity} left`:pe})]})]}),re?s.jsxs("button",{type:"button",onClick:()=>d(Z),className:"inline-flex min-h-11 shrink-0 items-center gap-1 rounded-lg px-2.5 text-caption font-semibold text-foreground ring-1 ring-border hover:ring-ring",children:[s.jsx(Qs,{className:"size-3.5","aria-hidden":"true"})," Notify"]}):s.jsx(Ac,{value:ie,onChange:we=>O(Z,we),min:0,max:Z.stockQuantity,size:"sm",itemLabel:he,className:"shrink-0"})]},Z.id)})})]}),s.jsxs("section",{"aria-labelledby":"mix-summary-h",className:"rounded-xl bg-card p-3 shadow-sm ring-1 ring-border md:sticky md:bottom-3 md:z-10",children:[s.jsx("h2",{id:"mix-summary-h",className:"sr-only",children:"Your selection"}),s.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2",children:[s.jsxs("div",{className:"min-w-0 flex-1","aria-live":"polite",children:[s.jsxs("p",{className:"flex flex-wrap items-baseline gap-x-2 text-foreground",children:[s.jsx("span",{className:"text-t3 font-bold tabular-nums",children:ld(H)}),L>0&&s.jsx("span",{className:"text-caption tabular-nums text-muted-foreground line-through",children:ld(T.subtotalCents)}),L>0&&s.jsxs("span",{className:"text-caption font-semibold tabular-nums text-primary",children:["Save ",ld(L)]}),$&&s.jsx("span",{className:"text-caption text-muted-foreground","data-testid":"mix-pricing",children:"Checking your priceâ¦"})]}),s.jsx("p",{className:"truncate text-[12px] text-muted-foreground",title:le||void 0,children:T.units?`${T.units} ${E(T.units)}: ${le}`:`Use + to choose ${m.many}`})]}),s.jsxs(Le,{onClick:F,disabled:S||T.units===0,className:"shrink-0","data-testid":"button-mix-addtocart",children:[N?.kind==="ok"?s.jsx(mn,{className:"size-4","aria-hidden":"true"}):s.jsx(nl,{className:"size-4","aria-hidden":"true"}),S?"Addingâ¦":T.units===0?`Choose ${m.many}`:`Add ${T.units} ${E(T.units)}`]})]}),(N||!g&&T.units>0)&&s.jsxs("div",{className:"mt-2 flex items-center justify-between gap-3",children:[s.jsx("p",{role:"status","aria-live":"polite",className:Y("text-caption font-semibold",N?.kind==="error"?"text-destructive":"text-primary"),"data-testid":"mix-status",children:N?.text??""}),!g&&T.units>0&&s.jsx("button",{type:"button",onClick:()=>{b({}),A(null)},className:"min-h-9 shrink-0 rounded-md px-2 text-caption font-semibold text-muted-foreground underline-offset-2 hover:text-foreground hover:underline",children:"Clear"})]})]}),s.jsx(mD,{name:L>0?`${T.units} ${E(T.units)} · save ${ld(L)}`:`${t}${T.units?` · ${T.units} ${E(T.units)}`:""}`,totalCents:H,qty:1,onAdd:F,disabled:T.units===0,disabledLabel:`Choose ${m.many}`,adding:S,justAdded:N?.kind==="ok"})]})}const rpe="vial";function Y3(e){const t=e.form;return t==null||t==="vial_unspecified"?rpe:t}
53function ape(e){switch(e){case"powder":return"Lyophilized vial";case"liquid":return"Solution vial";case"cartridge":return"Cartridge";case"capsule":return"Capsules";case"tablet":return"Tablets";case"raw_material":return"Raw powder";case"not_applicable":return"Packaged unit";default:return"Vial"}}function spe(e){const t=new Map;for(const n of e){const r=Y3(n),o=t.get(r);o?o.push(n):t.set(r,[n])}return[...t.entries()].map(([n,r])=>({key:n,label:ape(n),variants:r,inStockCount:r.filter(o=>o.stockQuantity>0).length}))}function ipe(e){return e.variants.find(t=>t.stockQuantity>0)??e.variants[0]}function ope({productSlug:e}){const{isAuthenticated:t}=Bt(),n=p1(),[r,o]=h.useState(null),l=h.useRef(null);return h.useEffect(()=>{if(!n||!t||!e||l.current===e)return;l.current=e,o(null);let c=!1;return(async()=>{try{const d=await fetch(`/api/games/hunt?slug=${encodeURIComponent(e)}`,{credentials:"include"});if(!d.ok)return;const m=await d.json();!c&&m.here&&m.game&&o(m.game)}catch{}})(),()=>{c=!0}},[n,t,e]),r?s.jsx(Ue,{href:`/play/${r.slug}?found=${encodeURIComponent(e)}`,"aria-label":`You found a hidden acorn. Open ${r.title}.`,className:"group inline-flex min-h-11 min-w-11 items-center justify-center rounded-full align-middle transition-transform hover:scale-110 focus-visible:ring-2 focus-visible:ring-[#f0c868] focus-visible:outline-none","data-testid":"hidden-acorn",children:s.jsxs("svg",{width:"26",height:"30",viewBox:"-9 -10 18 22","aria-hidden":"true",children:[s.jsx("title",{children:"A hidden acorn"}),s.jsxs("g",{className:"opacity-70 transition-opacity group-hover:opacity-100",children:[s.jsx("path",{d:"M-6.2 -1 C-6.2 6.2 -3.1 10.8 0 10.8 C3.1 10.8 6.2 6.2 6.2 -1 Z",fill:"#c97b2f"}),s.jsx("path",{d:"M-3.4 0.4 C-3.4 5.4 -1.8 8.6 -0.4 9.6 C-2.6 9 -4.6 5.4 -4.6 0.4 Z",fill:"#fff",opacity:.3}),s.jsx("path",{d:"M-7.2 -5.8 H7.2 A2 2 0 0 1 7.2 -1 H-7.2 A2 2 0 0 1 -7.2 -5.8 Z",fill:"#6b4118"}),s.jsx("path",{d:"M-6.2 -4.7 H6.2 M-6.2 -2.7 H6.2",stroke:"#000",strokeOpacity:.2,strokeWidth:.6}),s.jsx("path",{d:"M0 -5.8 V-8.6",stroke:"#6b4118",strokeWidth:1.6,strokeLinecap:"round"})]})]})}):null}const lpe=new Set(["marketplace"]),cpe={hero:0,tile:1,lifestyle:3},lR=2;function cR(e){const t=e.scene??null;return t===null?lR:cpe[t]??lR}function upe(e){return e.filter(t=>!lpe.has(t.scene??""))}function dpe(e,t){if(e.length===0)return-1;if(t!=null){let r=-1;for(let o=0;o<e.length;o++)e[o].variantId===t&&(r===-1||cR(e[o])<cR(e[r]))&&(r=o);if(r>=0)return r}const n=e.findIndex(r=>
53r.isPrimary);return n>=0?n:0}function fpe(e,t){return e.filter(n=>n.variantId==null||n.variantId===t)}const mpe={per_vial:"/vial",per_ml:"/mL",per_capsule:"/capsule",per_tablet:"/tablet",per_kit:"/kit"};function ppe(e){return e.includes(".")?e.replace(/0+$/,"").replace(/\.$/,""):e}function uR(e,t,n){return e===null||t===null?"Amount undisclosed":`${ppe(e)} ${t}${mpe[n]??""}`}function hpe(e){switch(e){case"verified":return"Verified exact recipe";case"provisional":return"Source-reported; verification pending";case"disputed":return"Identity or formula disputed";case"superseded":return"Superseded formula";default:return"Draft formula"}}const gpe=[{id:"overview",label:"Overview"},{id:"mechanism",label:"Mechanism"},{id:"specs",label:"Molecular data"},{id:"sources",label:"Sources"}];function ype({product:e,research:t}){const{addItem:n}=oo(),{toast:r}=Nr(),[o,l]=h.useState(1),[c,d]=h.useState(!1),[m,p]=h.useState(!1),[y,g]=h.useState(0),[v,b]=h.useState(null),[S,C]=h.useState(null),N=h.useRef(null),A=Wh(e),T=H3(),E=A.isCompound&&T,j=h.useMemo(()=>e?.variants??[],[e]),_=h.useMemo(()=>spe(j),[j]),R=_.length>1,P=j.find(xe=>xe.id===v)??null,M=P?Y3(P):null,q=h.useMemo(()=>R?(_.find(He=>He.key===M)??_.find(He=>He.inStockCount>0)??_[0])?.variants??j:j,[R,_,M,j]),U=h.useMemo(()=>wpe(q),[q]);h.useEffect(()=>{if(j.length>0&&v===null){const xe=j.find(He=>He.stockQuantity>0)??j[0];b(xe.id)}},[j,v]);const V=h.useMemo(()=>upe(e.images??[]),[e]),$=h.useMemo(()=>fpe(V,v),[V,v]);h.useEffect(()=>{const xe=dpe(V,v);xe>=0&&g(xe)},[V,v]),h.useEffect(()=>{if(E&&window.location.hash==="#research"){const xe=setTimeout(()=>N.current?.scrollIntoView({behavior:"smooth"}),120);return()=>clearTimeout(xe)}},[E]),h.useEffect(()=>{e?.slug&&iZ(e.slug)},[e?.slug]),h.useEffect(()=>{e?.id&&nZ(e.id,`/products/${e.slug}`)},[e?.id,e?.slug]);const L=j.find(xe=>xe.id===v)??null,H=j.length>0,Q=L?.formulation??null,I=e.isBlend,O=!L||L.stockQuantity===0,{data:F}=nae(j.map(xe=>xe.id)),B=L?F?.get(L.id):void 0,K=!!(O&&B?.preorderEnabled&&(B?.preorderUnits??0)>0),le=!O&&L!=null&&L.stockQuantity<=L.lowStockThreshold,Z=E?null:e.quantityOffer??null,ie=Z!=null&&j.length>0,re=h.useMemo(()=>{const xe=new Map;for(const He of V)He.variantId!=null&&(!xe.has(He.variantId)||He.scene==="tile")&&xe.set(He.variantId,He.url);return xe},[V]),de=async()=>{if(!(!L||O&&!K)){d(!0);try{await n(L.id,o,O&&K),p(!0),window.setTimeout(()=>p(!1),1600)}catch{r({title:"Error",description:"Could not add to cart",variant:"destructive"})}finally{d(!1)}}},he=V[y]?.url??null,pe=OM(e.manufacturer),oe=_M({name:e.name,manufacturer:e.manufacturer}),ge=hh(e.slug,e.name),we=L?uf(L)??"":"",be=!!L?.coaUrl,Me=L?.testTier??null,ze=L?.coaResult??null,Ee=L?Math.round(L.priceCents/100):0,Ct=L?(L.priceCents/100/100*5).toFixed(2):"0",Ft=L?L.priceCents*o:0;function pt(xe){return xe.startsWith("http")?xe:`/api/storage${xe}`}const Gn=be&&L?.coaUrl?pt(L.coaUrl):null;function Ht(xe){const He=_.find(et=>et.key===xe);He&&(b(ipe(He).id),l(1))}return s.jsxs(ur,{className:"pt-5 pb-28 md:pb-20",children:[s.jsxs(Ue,{href:"/products",className:"mb-4 inline-flex min-h-9 items-center gap-1.5 rounded-pill bg-ink/5 px-4 text-sm font-semibold text-ink motion-safe:transition-colors hover:bg-ink/10",children:[s.jsx(Ep,{className:"size-3.5"})," ",A.backLabel]}),s.jsxs("div",{className:"grid gap-7 md:grid-cols-[0.9fr_1.1fr] md:items-start",children:[s.jsxs("div",{children:[he?s.jsxs("div",{className:"relative aspect-square w-full overflow-hidden rounded-[28px] shadow-md ring-2 ring-vida-gold-500/55",children:[s.jsx("img",{src:he,alt:e.name,className:"absolute inset-0 size-full object-cover object-center"}),E&&s.jsx(Yb,{tier:Me,result:ze,className:"absolute bottom-3 right-3"})]}):s.jsxs(yS,{detail:!0,className:"relative ring-2 ring-vida-gold-500/55",children:[E&&t?.structureImageUrl?s.jsx("img",{src:t.structureImageUrl,alt:`${e.name} molecular structure`,className:"max-h-[300px] w-auto object-contain"}):E?s.jsx(Nc,{cap:ge,label:e.name,sub:we,size:120}):s.jsx(Zi,{className:"size-24 text-vida-green-700","aria-label":`${A.typeLabel} image unavailable`}),E&&s.jsx(Yb,{tier:Me,result:ze,className:"absolute bottom-3 right-3"})]}),$.length>1&&s.jsx("div",{className:"mt-2.5 flex gap-2",children:$.slice(0,5).map((xe,He)=>{const et=V.indexOf(xe);return s.jsx("button",{type:"button",onClick:()=>g(et),"aria-label":`View image ${He+1} of ${e.name}
53`,"aria-pressed":et===y,className:Y("size-14 shrink-0 overflow-hidden rounded-xl bg-card ring-1 motion-safe:transition-shadow",et===y?"ring-2 ring-vida-green-600":"ring-ink/10"),children:s.jsx("img",{src:xe.url,alt:"",className:"size-full object-cover"})},xe.id)})})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"mb-3.5 flex flex-wrap items-center gap-2",children:[(e.badges??[]).map(xe=>s.jsx(xS,{badge:xe},xe.id)),E&&nM&&s.jsxs(zt,{variant:"research",children:["â ",rM]}),H?O?K?s.jsx(zt,{variant:"research",children:"Available to pre-order"}):s.jsx(zt,{variant:"neutral",children:"Out of stock"}):le?s.jsx(zt,{variant:"research",children:"Low stock"}):s.jsx(zt,{variant:"mint",children:"In stock, ships same day before 2 PM ET"}):s.jsx(zt,{variant:"neutral",children:"Not available"}),K&&tT(B?.backing??null)&&s.jsx("span",{className:"inline-flex min-h-7 items-center rounded-pill bg-vida-mint-soft px-3 text-overline font-semibold tracking-[0.02em] text-vida-green-800","data-testid":"preorder-backing",children:tT(B?.backing??null)}),O&&L&&s.jsxs("button",{type:"button",onClick:()=>C(L),className:"inline-flex min-h-7 items-center gap-1.5 rounded-pill bg-vida-mint-soft px-3 text-overline font-semibold tracking-[0.02em] text-vida-green-800 motion-safe:transition-colors hover:bg-vida-green-700 hover:text-white","data-testid":"notify-restock-deadend",children:[s.jsx(Qs,{className:"size-3","aria-hidden":"true"})," Notify me when back"]})]}),e.categoryName&&s.jsxs("p",{className:"text-overline uppercase text-primary",children:[e.categoryName,E&&t?.classTag?` · ${t.classTag}`:""]}),s.jsxs("div",{className:"mt-1.5 flex items-start justify-between gap-3",children:[s.jsx("h1",{className:"font-display text-t1 text-ink",children:oe}),s.jsx(Hse,{productName:oe,className:"mt-0.5 shrink-0"})]}),pe&&s.jsxs("p",{className:"mt-0.5 text-caption text-ink-3","data-testid":"text-product-manufacturer",children:["by ",s.jsx("span",{className:"font-semibold text-ink-2",children:pe})]}),s.jsxs("p",{className:Y("mt-1.5 text-body text-ink-3",ie&&"hidden"),children:[we,we&&L?.sku?" · ":"",s.jsx("span",{className:"font-mono text-caption font-semibold tabular-nums",children:L?.sku??e.baseAcronym})]}),e.description&&s.jsx("p",{className:"mt-4 max-w-lg text-bodylg text-ink-2",children:e.description}),E&&(Q||I)&&s.jsxs("div",{className:"mt-6 max-w-lg","data-testid":"product-formulation",children:[s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[s.jsxs("h2",{className:"flex items-center gap-2 font-display text-t3 text-ink",children:[s.jsx(j2,{className:"size-4 text-primary","aria-hidden":"true"}),"Exact component makeup"]}),Q&&s.jsx("span",{className:Y("rounded-pill px-2.5 py-1 text-[11px] font-semibold",Q.verificationStatus==="verified"?"bg-vida-mint-soft text-vida-green-800":Q.verificationStatus==="disputed"?"bg-red-50 text-red-800":"bg-amber-50 text-amber-800"),children:hpe(Q.verificationStatus)})]}),Q?s.jsxs(Ut,{tone:"strong",unpadded:!0,className:"mt-3 overflow-hidden",children:[s.jsxs("div",{className:"border-b border-[var(--vp-hairline)] px-4.5 py-3",children:[s.jsx("p",{className:"font-semibold text-ink",children:Q.displayName}),s.jsxs("p",{className:"mt-0.5 text-caption text-ink-3",children:[uR(Q.declaredTotal,Q.declaredTotalUnit,Q.basis),Q.containerVolumeMl?` · ${Number(Q.containerVolumeMl)} mL container`:"",` · revision ${Q.revision}`]})]}),Q.components.map((xe,He)=>s.jsxs("div",{className:Y("flex items-start justify-between gap-3 border-b border-[var(--vp-hairline)] px-4.5 py-3 last:border-b-0",xe.parentComponentName&&"bg-surface-2/50 pl-8"),children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"font-semibold text-ink",children:xe.sourceName}),s.jsxs("p",{className:"mt-0.5 text-[11px] uppercase tracking-wide text-ink-3",children:[xe.parentComponentName?`within ${xe.parentComponentName} · `:"",xe.role,xe.identityStatus!=="verified"?` · identity ${xe.identityStatus}`:" · exact identity",xe.saltForm?` · salt ${xe.saltForm}`:"",xe.hydrationState?` · hydrate ${xe.hydrationState}`:"",xe.isomer?` · isomer ${xe.isomer}`:"",xe.enantiomer?` · enantiomer ${xe.enantiomer}`:"",xe.cobalaminForm?` · B12 ${xe.cobalaminForm}`:""]})]}),s.jsx("span",{className:"shrink-0 font-mono text-sm tabular-nums text-ink",children:uR(xe.amount,xe.unit,xe.basis)})]},`${xe.sourceName}-${He}`)),Q.verificationStatus!=="verified"&&s.jsx("p",{className:"border-t border-[var(--vp-
53hairline)] bg-amber-50/70 px-4.5 py-3 text-caption text-amber-900",children:"This source-reported formulation is retained for traceability but is not yet verified as the exact makeup of every stocked lot."})]}):s.jsx(Ut,{tone:"strong",className:"mt-3 border-amber-300 bg-amber-50/70",children:s.jsx("p",{className:"text-sm text-amber-950",children:"No exact formula is currently verified for this variant. It must not be treated as composition-equivalent to another size or supplier formulation."})})]}),s.jsx(Ut,{tone:"strong",unpadded:!0,className:Y("mt-6 max-w-lg px-4.5 py-1",ie&&!E&&"hidden"),children:E?s.jsxs(s.Fragment,{children:[[["Purity","See lot COA",!1],["CAS",t?.casNumber??"N/A",!0],["Form","Verified per variant",!1],["Storage","See handling guidance",!1]].map(([xe,He,et])=>s.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-[var(--vp-hairline)] py-3 text-[14.5px]",children:[s.jsx("span",{className:"text-ink-3",children:xe}),s.jsx("span",{className:Y("font-semibold text-ink",et&&"font-mono tabular-nums"),children:He})]},xe)),s.jsxs("div",{className:"flex items-center justify-between gap-3 py-3 text-[14.5px]",children:[s.jsx("span",{className:"text-ink-3",children:"COA"}),L?.batchNumber?s.jsxs(Ue,{href:`/coa/${encodeURIComponent(L.batchNumber)}`,"data-testid":"link-pdp-coa",className:"inline-flex items-center gap-1.5 font-semibold text-primary hover:text-primary",children:[s.jsx(Md,{className:"size-4","aria-hidden":"true"})," View Certificate of Analysis"]}):s.jsxs(Ue,{href:"/research?tab=lab","data-testid":"link-pdp-coa",className:"inline-flex items-center gap-1.5 font-semibold text-primary hover:text-primary",children:[s.jsx(Md,{className:"size-4","aria-hidden":"true"})," Lab Results"]})]})]}):s.jsxs(s.Fragment,{children:[s.jsx(Vo,{k:"Product type",v:A.typeLabel}),s.jsx(Vo,{k:A.variantLabel,v:we||"See available variants",last:!0})]})}),ie&&Z&&s.jsx(npe,{productId:e.id,productName:e.name,variants:j,offer:Z,variantImages:re,activeVariantId:v,onActiveVariantChange:b,onNotify:xe=>C(xe),unitNoun:epe(e.name,j)}),!ie&&j.length>0&&s.jsxs("div",{className:"mt-6",children:[R&&s.jsxs("div",{children:[s.jsx("p",{className:"text-overline uppercase text-ink-3",children:"Form"}),s.jsx("div",{className:"mt-2 flex flex-wrap gap-2",role:"group","aria-label":"Form",children:_.map(xe=>{const He=xe.key===M,et=xe.inStockCount===0;return s.jsxs("button",{type:"button",onClick:()=>Ht(xe.key),"aria-pressed":He,"aria-label":et?`${xe.label}, out of stock`:void 0,className:Y("inline-flex min-h-10 items-center gap-1.5 rounded-pill px-4 py-2 text-sm font-semibold motion-safe:transition-colors",He?"bg-primary text-primary-foreground shadow-[0_4px_14px_rgba(29,74,56,0.28)]":"bg-card text-ink-2 ring-1 ring-ink/10 hover:ring-ring/60",et&&!He&&"text-ink-3"),"data-testid":`form-pill-${xe.key}`,children:[xe.label,s.jsxs("span",{className:Y("text-[11px] font-medium tabular-nums",He?"text-primary-foreground/70":"text-ink-3"),children:[xe.variants.length," ",et?"· out":""]})]},xe.key)})})]}),s.jsxs("div",{className:R?"mt-4":void 0,children:[s.jsx("p",{className:"text-overline uppercase text-ink-3",children:R?"Size":A.variantLabel}),s.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:q.map(xe=>s.jsx(vpe,{variant:xe,selected:xe.id===v,isBestValue:U?.variantId===xe.id,savePct:U?.variantId===xe.id?U.savePct:null,onSelect:()=>{b(xe.id),l(1)},onNotify:()=>C(xe)},xe.id))})]})]}),s.jsxs("div",{className:Y("mt-6 flex flex-wrap items-center gap-3.5",ie&&"hidden"),children:[(!O||K)&&s.jsx(Ac,{value:o,onChange:l,max:O&&K?B?.preorderUnits??1:L?.stockQuantity,valueTestId:"text-qty",decreaseTestId:"button-decrease-qty",increaseTestId:"button-increase-qty"}),s.jsxs(Le,{onClick:de,disabled:c||O&&!K,className:"flex-[1_1_200px]","data-testid":"button-addtocart",children:[m?s.jsx(mn,{className:"size-4","aria-hidden":"true"}):s.jsx(nl,{className:"size-4","aria-hidden":"true"}),O&&!K?H?"Out of stock":"Unavailable":m?O?"Pre-ordered":"Added to cart":c?"Addingâ¦":O?`Pre-order · $${(Ft/100).toFixed(2)}`:`Add to cart · $${(Ft/100).toFixed(2)}`]})]}),E&&s.jsx(iD,{bare:!0,className:"mt-4 max-w-lg"}),Ee>0&&s.jsxs("div",{className:"mt-4 flex max-w-lg items-center gap-2.5 rounded-2xl bg-vida-mint-soft px-4 py-3",children:[s.jsx(ya,{className:"size-4 shrink-0 text-vida-green-700","aria-hidden":"true"}),s.jsxs("p",{className:"text-caption text-vida-green-800",children:["Earn ",s.jsxs("strong",{className:"tabular-nums",children:[Ee," Vida Points"]})," on this",` ${A.rewardNoun}`,": $",Ct," toward a future order."]})]}),E&&s.jsx(Vse,{batchNumber:L?.batchNumber,coaHref:Gn,coaFileName:L?.coaFileName,lots:L?.lots,className:"mt-4 max-w-lg"}),s.jsx("div",{className:"mt-3",children:s.jsx(ope,{productSlug:e.slug})})]})]}),E&&s.jsxs("div",{ref:N,id:"research",className:"mt-14 scroll-mt-24",children:[s.jsx(si,{overline:"Research panel",title:"Reference data & literature",sub:"Molecular identity and literature links are shown only after the source URLs are verified. Laboratory reference only."}),s.jsx("nav",{className:"mt-5 -mx-1 mb-7 flex gap-2 overflow-x-auto px-1 pb-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:gpe.map(xe=>s.jsx("a",{href:`#r-${xe.id}`,className:"whitespace-nowrap rounded-pill bg-ink/[0.055] px-4 py-2 text-sm font-semibold text-ink-2 motion-safe:transition-colors hover:bg-ink/10 hover:text-ink",children:xe.label},xe.id))}),s.jsxs("div",{className:"grid gap-8 md:grid-cols-3",children:[s.jsxs("div",{className:"space-y-8 md:col-span-2",children:[s.jsxs("section",{id:"r-overview",className:"scroll-mt-24",children:[s.jsx("h3",{className:"font-display text-t3 text-ink",children:"Overview"}),s.jsx("p",{className:"mt-2 text-body leading-relaxed text-ink-2",children:t?.summary||e.description||ene(e.name)}
53)]}),t?.mechanism&&s.jsxs("section",{id:"r-mechanism",className:"scroll-mt-24",children:[s.jsx("h3",{className:"font-display text-t3 text-ink",children:"Mechanism of action"}),s.jsx("p",{className:"mt-2 text-body leading-relaxed text-ink-2",children:t.mechanism})]}),s.jsxs("section",{id:"r-specs",className:"scroll-mt-24",children:[s.jsx("h3",{className:"font-display text-t3 text-ink",children:"Molecular profile"}),s.jsx("p",{className:"mt-1 text-caption text-ink-3",children:"Chemistry referenced from PubChem; identity QC-verified against batch COA."}),s.jsxs(Ut,{tone:"strong",unpadded:!0,className:"mt-3 px-4.5 py-1",children:[s.jsx(Vo,{k:"Class",v:t?.classTag}),s.jsx(Vo,{k:"Molecular formula",v:t?.molecularFormula,mono:!0}),s.jsx(Vo,{k:"Molecular weight",v:t?.molecularWeight?`${t.molecularWeight} g/mol`:null,mono:!0}),s.jsx(Vo,{k:"CAS number",v:t?.casNumber,mono:!0}),s.jsx(Vo,{k:"PubChem CID",v:t?.pubchemCid?String(t.pubchemCid):null,mono:!0,last:!0})]}),t?.sequence&&s.jsxs("div",{className:"mt-3",children:[s.jsx("p",{className:"text-overline uppercase text-primary",children:"Amino-acid sequence"}),s.jsx("p",{className:"mt-1.5 rounded-2xl bg-ink/[0.045] p-3.5 font-mono text-caption leading-relaxed break-words text-ink",children:t.sequence})]})]}),s.jsxs("section",{id:"r-sources",className:"scroll-mt-24",children:[s.jsx("h3",{className:"font-display text-t3 text-ink",children:"Sources & references"}),t?.references&&t.references.length>0?s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"mt-1 mb-3 text-caption text-ink-3",children:"Peer-reviewed literature. Links open the publisher or PubMed record."}),s.jsx("ol",{className:"space-y-0",children:t.references.map((xe,He)=>s.jsx("li",{children:s.jsxs("a",{href:xe.url,target:"_blank",rel:"noopener noreferrer",className:"group flex gap-3 border-t border-[var(--vp-hairline)] py-3",children:[s.jsx("span",{className:"grid size-6 flex-none place-items-center rounded-lg bg-vida-mint-soft font-mono text-[11px] font-bold text-vida-green-700",children:He+1}),s.jsxs("span",{className:"min-w-0",children:[s.jsx("span",{className:"block text-sm leading-snug font-medium text-ink motion-safe:transition-colors group-hover:text-vida-green-700",children:xe.title}),s.jsx("span",{className:"mt-0.5 block text-[11px] text-ink-3",children:xe.source})]}),s.jsx(ao,{className:"mt-1 ml-auto size-3.5 flex-none text-ink-3"})]})},xe.url+String(He)))})]}):s.jsx("p",{className:"mt-2 text-body text-ink-3",children:"Curated peer-reviewed references are being added. External source links appear here only after validation."})]})]}),s.jsxs("aside",{className:"space-y-3",children:[s.jsx("p",{className:"text-overline uppercase text-primary",children:"Data sources"}),t?.pubchemUrl&&s.jsx(xpe,{href:t.pubchemUrl,badge:"PC",badgeBg:"#2d6cb3",title:"PubChem",sub:`Public-domain molecular record${t.pubchemCid?` · CID ${t.pubchemCid}`:""}`})]})]})]}),s.jsx($me,{productId:e.id,productName:e.name,variantId:v,className:"mt-14"}),s.jsx(_3,{excludeSlug:e.slug,contained:!1,className:"mt-14"}),L&&!ie&&s.jsx(mD,{name:`${e.name} · ${we}`,totalCents:Ft,qty:o,onAdd:de,disabled:O,adding:c,justAdded:m}),S&&s.jsx(Yme,{open:!!S,onOpenChange:xe=>{xe||C(null)},variantId:S.id,variantLabel:`${S.size}${S.unit}`,productName:e.name})]})}function Vo({k:e,v:t,mono:n,last:r=!1}){return t?s.jsxs("div",{className:Y("flex items-center justify-between gap-3 py-3 text-[14.5px]",!r&&"border-b border-[var(--vp-hairline)]"),children:[s.jsx("span",{className:"text-ink-3",children:e}),s.jsx("span",{className:Y("text-right font-semibold text-ink",n&&"font-mono text-caption tabular-nums"),children:t})]}):null}function xpe({href:e,badge:t,badgeBg:n,title:r,sub:o}){return s.jsxs("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"vp-glass flex items-center gap-3 rounded-card p-3.5 motion-safe:transition-shadow hover:shadow-md",children:[s.jsx("span",{className:"grid size-9 shrink-0 place-items-center rounded-xl font-display text-[11px] font-extrabold text-white",style:{background:n},children:t}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block text-sm font-semibold text-ink",children:r}),s.jsx("span",{className:"block text-[11px] leading-snug text-ink-3",children:o})]}),s.jsx(ao,{className:"size-3.5 shrink-0 text-ink-3"})]})}function vpe({variant:e,selected:t,isBestValue:n,savePct:r,onSelect:o,onNotify:l}){const c=e.stockQuantity===0,d=uf(e)??e.unit;return s.jsxs("div",{className:"relative inline-flex flex-col items-center",children:[s.jsxs("button",{type:"button",onClick:c?()=>{o(),l()}:o,"aria-pressed":c?void 0:t,"aria-label":c?`${d}, out of stock, notify me when back`:void 0,className:Y("inline-flex items-center gap-1.5 rounded-pill px-4 py-2 text-sm font-semibold tabular-nums motion-safe:transition-colors",c?"bg-card text-ink-3 ring-1 ring-ink/10 hover:text-primary hover:ring-ring/60":t?"bg-primary text-primary-foreground shadow-[0_4px_14px_rgba(29,74,56,0.28)]":"bg-card text-ink-2 ring-1 ring-ink/10 hover:ring-ring/60",n&&!t&&!c&&"ring-vida-gold-500/50"),children:[s.jsx("span",{className:Y(c&&"line-through opacity-50"),children:d}),c&&s.jsx(Qs,{className:"size-3 opacity-70","aria-hidden":"true"})]}),n&&!c&&s.jsxs("span",{className:"pointer-events-none mt-1 inline-flex items-center gap-1 rounded-pill px-2 py-0.5 text-[10px] font-bold tracking-[0.02em] text-vida-gold-700 ring-1 ring-vida-gold-500/40","data-testid":`best-value-${e.id}`,children:["Best value",r!=null&&r>=1?` · save ${r}%`:""]})]})}function bpe(e,t){if(!Number.isFinite(e)||e<=0)return null;switch(t.trim().toLowerCase()){case"mg":return e;case"mcg":case"µg":case"ug":return e/1e3;case"g":case"gram":case"grams":return e*1e3;default:return null}}function wpe(e){const t=e.map(l=>{const c=bpe(l.size,l.unit);return c==null||l.priceCents<=0?null:{id:l.id,perMg:l.priceCents/c}}).filter(l=>l!==null);if(t.length<2)return null;const n=t.reduce((l,c)=>c.perMg<l.perMg?c:l),r=t.reduce((l,c)=>c.perMg>l.perMg?c:l);if(n.perMg>=r.perMg)return null;const o=Math.round((1-n.perMg/r.perMg)*100);return{variantId:n.id,savePct:o}}function Spe(){return s.jsxs(ur,{className:"pt-5 pb-20","aria-busy":"true","aria-label":"Loading product",children:[s.jsx(Cn,{className:"mb-5 h-9 w-32 rounded-pill"}),s.jsxs("div",{className:"grid gap-7 md:grid-cols-[0.9fr_1.1fr]",children:[s.jsx(Cn,{className:"aspect-[4/5] rounded-[30px]"}),s.jsxs("div",{className:"space-y-3",children:[s.jsx(Cn,{className:"h-6 w-40 rounded-pill"}),s.jsx(Cn,{className:"h-10 w-3/4"}),s.jsx(Cn,{className:"h-5 w-44"}),s.jsx(Cn,{className:"h-44 w-full max-w-lg rounded-card"}),s.jsx(Cn,{className:"h-12 w-full max-w-lg rounded-pill"}),s.jsx(Cn,{className:"h-24 w-full max-w-lg rounded-card"})]})]})]})}function W3(){const{slug:e}=D0();return s.jsx(Q3,{slug:e})}function Q3({slug:e}){const{data:t}=eae(e);return s.jsx(Vme,{slug:e,fallback:s.jsx(Spe,{}),children:s.jsx(Cpe,{slug:e,research:t})},e)}function Cpe({research:e,slug:t}){const n=Kc(),{data:r}=vq(Yse(t,n));return s.jsx(ype,{product:r,research:e})}const Nwe=Object.freeze(Object.defineProperty({__proto__:null,ProductDetailRouteContent:Q3,default:W3},Symbol.toStringTag,{value:"Module"}));function Npe(){const{slug:e}=D0(),t=Kc(),{data:n,isLoading:r,isError:o,refetch:l}=Lh({categorySlug:e,...t?{brand:t}:{}}),{data:c}=O_(t?{brand:t}:void 0),d=c?.find(p=>p.slug===e),m=n?.items??[];return s.jsxs(ur,{className:"pt-7 pb-20",children:[s.jsxs(Ue,{href:"/products","data-testid":"link-back",className:"mb-5 inline-flex min-h-9 items-center gap-1.5 rounded-pill bg-ink/5 px-4 text-sm font-semibold text-ink motion-safe:transition-colors hover:bg-ink/10",children:[s.jsx(Ep,{className:"size-3.5"})," All products"]}),s.jsx(si,{overline:"Catalog",title:d?.name??e,sub:d?.description??"Browse the available products in this catalog category.",as:"h1"}),n&&s.jsxs("p",{className:"mt-2 text-caption text-ink-3",children:[n.total," product",n.total!==1?"s":""]}),r?s.jsx("div",{className:`mt-6 ${jd}`,children:Array.from({length:8}).map((p,y)=>s.jsx(Cn,{className:"h-80 rounded-card"},y))}):o?s.jsxs("div",{className:"vp-glass mt-6 rounded-card py-20 text-center",role:"alert",children:[s.jsx(Zi,{className:"mx-auto mb-3 size-10 text-ink-3"}),s.jsx("p",{className:"font-semibold text-ink",children:"We couldnât load the catalog."}),s.jsx("p",{className:"mt-1 text-caption text-ink-3",children:"Your products are still here. Try again."}),s.jsx("button",{type:"button",onClick:()=>{l()},className:"mt-5 inline-flex min-h-11 items-center rounded-pill bg-primary px-5 text-sm font-semibold text-primary-foreground",children:"Try again"})]}):m.length===0?s.jsxs("div",{className:"vp-glass mt-6 rounded-card py-20 text-center",children:[s.jsx(Zi,{className:"mx-auto mb-3 size-10 text-ink-3"}),s.jsx("p",{className:"font-semibold text-ink",children:"No products in this category."})]}):s.jsx("div",{className:`mt-6 ${jd}`,children:m.map(p=>s.jsx(Wb,{product:p}
53,p.id))})]})}const Cp="3-5",dR={bank_clearing:{label:"Bank transfer clearing",customerDetail:`Your bank transfer is on its way. Transfers of this kind take about ${Cp} business days to clear, and there is nothing more for you to do.`,shippingNote:`We will pack and ship this order once the transfer clears - usually ${Cp} business days from when you paid.`,staffDetail:`Bank debit in transit; it clears in about ${Cp} business days and settles itself. Do not cancel, do not ask the customer to pay again, and do not ship before it clears.`,healthy:!0},bank_failed:{label:"Bank transfer failed",customerDetail:"Your bank did not complete the transfer, so this order is unpaid. You can pay again with any method.",shippingNote:"We have not shipped this order, and will not until a payment completes.",staffDetail:"A delayed-notification debit came back unpaid. The order is unpaid again - chase the customer or cancel.",healthy:!1},reconciling:{label:"Verifying payment",customerDetail:"We are checking this payment with the payment provider. Please do not pay again - if it was taken, it will appear here.",shippingNote:"We will start packing as soon as the payment is confirmed.",staffDetail:"Uncertain provider result held for reconciliation. Verify against the processor before any refund, cancel or re-charge.",healthy:!1},attempt_failed:{label:"Payment not completed",customerDetail:"Your last payment attempt did not go through, so this order is still unpaid. You can try again with any method.",shippingNote:"We have not shipped this order, and will not until a payment completes.",staffDetail:"The last attempt was declined or lapsed and nothing is in transit. If a provider marker says otherwise on this row, reconcile it manually - do not assume the order is recoverable.",healthy:!1},awaiting_customer:{label:"Awaiting payment",customerDetail:"We have not received a payment for this order yet.",shippingNote:"We will start packing once your payment is complete.",staffDetail:"No payment received yet - the customer has not completed checkout.",healthy:!1}};function Ape(e){return!e||!(e in dR)?null:{state:e,...dR[e]}}function Epe(e){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(e/100)}function jpe(e){return Epe(e)}function Awe(e){const t=e.trim().replace(/^\$/,"").replace(/,/g,"");if(t===""||!/^(?:\d+(\.\d{1,2})?|\.\d{1,2})$/.test(t))return null;const n=Math.round(Number.parseFloat(t)*100);return Number.isSafeInteger(n)?n:null}function Et(e){return jpe(e??0)}function Tpe(e){if(!e)return"";const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}function Ewe(e,t){return new Intl.DateTimeFormat("en-US",{timeZone:t,weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(new Date(e))}function jwe(e,t){if(!e)return"";const n=new Date(e).getTime();if(Number.isNaN(n))return"";const r=t?.suffix?" ago":"",o=Math.round((Date.now()-n)/1e3);if(o<45)return"just now";const l=Math.round(o/60);if(l<60)return`${l}m${r}`;const c=Math.round(l/60);if(c<24)return`${c}h${r}`;const d=Math.round(c/24);return d<7?`${d}d${r}`:Tpe(e)}function Twe(e){if(!e)return"";const t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e),n=t?new Date(Number(t[1]),Number(t[2])-1,Number(t[3])):new Date(e);return Number.isNaN(n.getTime())?e:n.toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric"})}function kpe({code:e,baseCents:t,className:n}){const{data:r}=mQ(e??"",{query:{queryKey:V_(e??""),enabled:!!e,retry:!1,staleTime:3e5}});if(!e||!r)return null;const o=Math.round(t*r.contributionBps/1e4);return s.jsx("div",{className:`rounded-2xl bg-vida-mint-soft p-3 ${n??""}`,"data-testid":"panel-support-code-summary",children:s.jsxs("div",{className:"flex items-start gap-2.5",children:[s.jsx(mh,{className:"mt-0.5 size-4 shrink-0 text-vida-green-700","aria-hidden":"true"}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("p",{className:"text-caption text-vida-green-700",children:["Supporting"," ",s.jsx(Ue,{href:`/forward/c/${r.publicSlug}`,className:"font-semibold underline underline-offset-2",children:r.title})]}),o>0?s.jsxs("p",{className:"mt-0.5 text-caption text-vida-green-700/85","data-testid":"text-support-estimate",children:["This order is on track to contribute about $",(o/100).toFixed(2)," to"," ",r.beneficiaryDisplayName,". The final amount is set when the campaign settles."]}):s.jsx("p",{className:"mt-0.5 text-caption text-vida-green-700/85",children:"Add items and your contribution estimate appears here."})]})]})})}function Rpe(e){const t=e?.unavailableItems;return Array.isArray(t)?t.flatMap(n=>{if(!n||typeof n!="object"||n.unavailable!==!0)return[];const r=n.id;return Number.isInteger(r)&&Number(r)>0?[{id:Number(r),unavailable:!0}]:[]}):[]}function Ppe({item:e,onRemove:t}){return s.jsxs("div",{className:"flex items-center gap-3.5 py-4","data-testid":`row-unavailable-${e.id}`,children:[s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"text-[15px] font-semibold text-ink",children:"Item no longer available"}),s.jsx("p",{className:"mt-0.5 text-caption text-ink-3",children:"Remove this item to continue."})]}),s.jsx("button",{type:"button","aria-label":"Remove unavailable item",onClick:t,className:"rounded-pill p-2 text-ink-3 motion-safe:transition-colors hover:bg-danger/10 hover:text-danger","data-testid":`button-remove-unavailable-${e.id}`,children:s.jsx(ph,{className:"size-4","aria-hidden":"true"})})]})}function X3(){const{cart:e,isLoading:t,updateItem:n,removeItem:r,applyPrize:o,chooseGift:l}=oo(),[,c]=Hn(),{toast:d}=Nr(),{t:m}=Ih(),[p,y]=h.useState(null);if(t)return s.jsxs(ur,{width:"narrow",className:"space-y-4 py-8",children:[s.jsx(Cn,{className:"mb-4 h-10 w-40"}),Array.from({length:3}).map((S,C)=>s.jsx(Cn,{className:"h-28 rounded-card"},C))]});const g=yD(e),v=Rpe(e);if(!e||e.items.length===0&&v.length===0)return s.jsx(ur,{width:"narrow",className:"py-16",children:s.jsxs(Ut,{tone:"strong",className:"py-14 text-center",children:[s.jsx(Nc,{size:52,withShadow:!1,className:"mx-auto mb-5 opacity-80"}),s.jsx("h2",{className:"font-display text-t2 text-ink",children:m("cart.empty.title")}),s.jsx("p",{className:"mt-2 mb-7 text-body text-ink-2",children:m("cart.empty.body")}),s.jsx(Le,{asChild:!0,children:s.jsx(Ue,{href:"/products","data-testid":"link-browse",children:m("cart.empty.action")})})]})});const b=CD(e.items);return s.jsxs(ur,{width:"narrow",className:"pt-7 pb-20",children:[s.jsxs("h1",{className:"font-display text-t1 text-ink","data-testid":"text-cart-title",children:["Cart"," ",s.jsxs("span",{className:"text-ink-3",children:["(",s.jsx("span",{className:"tabular-nums",children:e.itemCount}),")"]})]}),s.jsx(wD,{className:"mt-5",prizes:g.prizes,onApply:o}),s.jsx(SD,{className:"mt-3",gift:g.gift,onChoose:l}),s.jsxs(Ut,{unpadded:!0,className:"mt-4 divide-y divide-[var(--vp-
53hairline)] px-4.5 sm:px-5",children:[v.map(S=>s.jsx(Ppe,{item:S,onRemove:async()=>{await r(S.id),d({title:"Unavailable item removed"})}},`unavailable-${S.id}`)),e.items.map(S=>{const C=uf(S);return s.jsxs("div",{className:"flex gap-3.5 py-4","data-testid":`row-cartitem-${S.id}`,children:[s.jsx(Ue,{href:`/products/${S.productSlug}`,className:"flex h-20 w-14 shrink-0 items-center justify-center overflow-hidden rounded-xl bg-bone",children:S.primaryImageUrl?s.jsx("img",{src:S.primaryImageUrl,alt:S.productName,className:"size-full object-cover"}):S.productType==="compound"?s.jsx(Nc,{cap:hh(S.productSlug,S.productName),size:30,withShadow:!1}):s.jsx(Zi,{className:"size-8 text-primary","aria-label":`${S.productName} image unavailable`})}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx(Ue,{href:`/products/${S.productSlug}`,children:s.jsxs("p",{className:"truncate text-[15px] font-semibold text-ink hover:text-primary","data-testid":`text-itemname-${S.id}`,children:[S.productName,C?s.jsxs("span",{className:"font-normal text-ink-3",children:[" · ",C]}):null]})}),s.jsxs("p",{className:"mt-0.5 text-caption tabular-nums text-ink-3","data-testid":`text-itemprice-${S.id}`,children:["$",(S.priceCents/100).toFixed(2)," each"]}),s.jsx(bD,{...xD(S)}),s.jsxs("div",{className:"mt-2.5 flex items-center gap-2",children:[s.jsx(Ac,{size:"sm",value:S.quantity,min:0,max:S.stockQuantity??void 0,valueTestId:`text-qty-${S.id}`,decreaseTestId:`button-decrease-${S.id}`,increaseTestId:`button-increase-${S.id}`,onChange:async N=>{N<=0?(await r(S.id),d({title:"Removed from cart"})):await n(S.id,N)}}),s.jsx("button",{type:"button","aria-label":`Remove ${S.productName}`,onClick:async()=>{await r(S.id),d({title:"Removed from cart"})},className:"rounded-pill p-2 text-ink-3 motion-safe:transition-colors hover:bg-danger/10 hover:text-danger","data-testid":`button-remove-${S.id}`,children:s.jsx(ph,{className:"size-4"})})]})]}),s.jsx("div",{className:"shrink-0 self-start pt-1 text-right",children:s.jsxs("p",{className:"font-display text-[15px] font-bold tabular-nums text-ink","data-testid":`text-linesubtotal-${S.id}`,children:["$",(S.priceCents*S.quantity/100).toFixed(2)]})})]},S.id)})]}),s.jsxs(Ut,{tone:"strong",className:"mt-4",children:[s.jsx(vD,{subtotalCents:e.subtotalCents,itemCount:e.itemCount,discounts:g.discounts,savingsCents:g.savingsCents,estimatedTotalCents:g.estimatedTotalCents,bogoProgress:g.bogoProgress,onAppliedChange:y,children:s.jsx(kpe,{className:"mt-4",code:p?.code??null,baseCents:g.estimatedTotalCents})}),s.jsxs(Le,{block:!0,disabled:e.items.length===0||v.length>0,className:"mt-5",onClick:()=>c("/checkout"),"data-testid":"button-checkout",children:["Proceed to checkout ",s.jsx(rl,{className:"size-4","aria-hidden":"true"})]}),b&&s.jsxs("p",{className:"mt-3 text-center text-caption text-ink-3",children:[s.jsx(Ic,{className:"mr-1 inline size-3.5 align-[-2.5px] text-primary","aria-hidden":"true"}),"COA on every lot · All sales final"]}),s.jsx(Ue,{href:"/products",className:"mt-2 block text-center text-sm font-semibold text-primary hover:text-primary/80","data-testid":"link-continue-shopping",children:"Continue shopping"})]}),b&&s.jsx(iD,{className:"mt-4"})]})}const kwe=Object.freeze(Object.defineProperty({__proto__:null,default:X3},Symbol.toStringTag,{value:"Module"})),g1=[{code:"AL",name:"Alabama"},{code:"AK",name:"Alaska"},{code:"AZ",name:"Arizona"},{code:"AR",name:"Arkansas"},{code:"CA",name:"California"},{code:"CO",name:"Colorado"},{code:"CT",name:"Connecticut"},{code:"DE",name:"Delaware"},{code:"DC",name:"District of Columbia"},{code:"FL",name:"Florida"},{code:"GA",name:"Georgia"},{code:"HI",name:"Hawaii"},{code:"ID",name:"Idaho"},{code:"IL",name:"Illinois"},{code:"IN",name:"Indiana"},{code:"IA",name:"Iowa"},{code:"KS",name:"Kansas"},{code:"KY",name:"Kentucky"},{code:"LA",name:"Louisiana"},{code:"ME",name:"Maine"},{code:"MD",name:"Maryland"},{code:"MA",name:"Massachusetts"},{code:"MI",name:"Michigan"},{code:"MN",name:"Minnesota"},{code:"MS",name:"Mississippi"},{code:"MO",name:"Missouri"},{code:"MT",name:"Montana"},{code:"NE",name:"Nebraska"},{code:"NV",name:"Nevada"},{code:"NH",name:"New Hampshire"},{code:"NJ",name:"New Jersey"},{code:"NM",name:"New Mexico"},{code:"NY",name:"New York"},{code:"NC",name:"North Carolina"},{code:"ND",name:"North Dakota"},{code:"OH",name:"Ohio"},{code:"OK",name:"Oklahoma"},{code:"OR",name:"Oregon"},{code:"PA",name:"Pennsylvania"},{code:"RI",name:"Rhode Island"},{code:"SC",name:"South Carolina"},{code:"SD",name:"South Dakota"},{code:"TN",name:"Tennessee"},{code:"TX",name:"Texas"},{code:"UT",name:"Utah"},{code:"VT",name:"Vermont"},{code:"VA",name:"Virginia"},{code:"WA",name:"Washington"},{code:"WV",name:"West Virginia"},{code:"WI",name:"Wisconsin"},{code:"WY",name:"Wyoming"},{code:"AS",name:"American Samoa"},{code:"GU",name:"Guam"},{code:"MP",name:"Northern Mariana Islands"},{code:"PR",name:"Puerto Rico"},{code:"VI",name:"U.S. Virgin Islands"}],Z3=new Set(g1.map(e=>e.code));function Ope(e){return Z3.has(e)}const _pe=new Map(g1.map(e=>[e.name.toLowerCase(),e.code]));function fR(e){const t=String(e??"").trim();if(!t)return null;const n=t.toUpperCase();return Z3.has(n)?n:_pe.get(t.toLowerCase())??null}function J3(e){const t=e.replace(/\D/g,"");return t.length===9?`${t.slice(0,5)}-${t.slice(5)}`:t.length===5?t:e.trim()}const Ipe=ei({email:dn().email("Valid email required"),firstName:dn().min(1,"First name required"),lastName:dn().min(1,"Last name required"),line1:dn().min(1,"Address required"),line2:dn().optional(),city:dn().min(1,"City required"),state:dn().refine(Ope,"Select a U.S. state"),zip:dn().min(1,"ZIP required").transform(J3).pipe(dn().regex(/^\d{5}(-\d{4})?$/,"Enter a valid ZIP code")),country:Wo("US",{message:"We currently ship within the U.S. only"})}),e5=["vidapeps","vidacare","vidatools","vidamerch","vidaglow","vidaforward","vidahub"],mR={vidapeps:{key:"vidapeps",prefix:"VP",displayLabel:"VidaPeps",adminLabel:"VidaPeps",tone:"default"},vidacare:{key:"vidacare",prefix:"VC",displayLabel:"VidaCare",adminLabel:"VidaCare",tone:"secondary"},vidatools:{key:"vidatools",prefix:"VT",displayLabel:"VidaTools",adminLabel:"VidaTools",tone:"outline"},vidamerch:{key:"vidamerch",prefix:"VM",displayLabel:"VidaMerch",adminLabel:"VidaMerch",tone:"outline"},vidaglow:{key:"vidaglow",prefix:"VG",displayLabel:"glow.",adminLabel:"VidaGlow",tone:"secondary"},vidaforward:{key:"vidaforward",prefix:"VF",displayLabel:"VidaForward",adminLabel:"VidaForward",tone:"secondary"},vidahub:{key:"vidahub",prefix:"VH",displayLabel:"VidaHub",adminLabel:"VidaHub",tone
53:"outline"}};function Mpe(e){return typeof e=="string"&&e5.includes(e)}function Dpe(e){return Mpe(e)?mR[e]:mR.vidapeps}const Lpe=10001,qpe=999999999;function Upe(e){return Number.isSafeInteger(e)&&e>=Lpe&&e<=qpe}function Rwe(e,t){return`${Dpe(e).prefix}-${t}`}const zpe=["VP","VC","VT","VM","VG","VF","VH"],Vpe=new Map(e5.map((e,t)=>[zpe[t],e]));function Bpe(e){const t=/^([A-Za-z]{2})(\d{1,10})$/.exec(e.replace(/[-\s_.#]/g,""));if(!t)return null;const n=Vpe.get(t[1].toUpperCase());if(!n)return null;const r=Number(t[2]);return Upe(r)?{brand:n,documentNo:r}:null}function Fpe(e){return e?Bpe(e)?.documentNo??null:null}function t5(e){return e.trim().replace(/^[@$]+/,"")}function $pe(e,t){const n=t5(t);return n?e==="venmo"?`@${n}`:e==="cashapp"?`$${n}`:t.trim():t.trim()}function Hpe(e,t,n,r){const o=t?t5(t):"";if(!o)return null;const l=(n/100).toFixed(2);if(e==="venmo"){const c=new URLSearchParams({txn:"pay",amount:l});return r&&c.set("note",r),{appName:"Venmo",href:`https://venmo.com/${encodeURIComponent(o)}?${c.toString()}`,prefillsNote:!!r}}return e==="cashapp"?{appName:"Cash App",href:`https://cash.app/$${encodeURIComponent(o)}/${l}`,prefillsNote:!1}:null}const Gpe={card:{label:"Card",icon:"credit-card"},ach:{label:"Bank Transfer",icon:"bank"},crypto:{label:"Crypto",icon:"bitcoin"},moonpay:{label:"Buy Crypto with Card",icon:"credit-card"},cashapp:{label:"Cash App",icon:"smartphone"},paypal:{label:"PayPal",icon:"smartphone"},venmo:{label:"Venmo",icon:"smartphone"},in_person:{label:"In Person",icon:"storefront"},vidacode:{label:"VidaCode",icon:"ticket"},affirm:{label:"Affirm",icon:"credit-card"},sezzle:{label:"Sezzle",icon:"credit-card"},mercury_invoice:{label:"Bank Invoice",icon:"bank"},wire:{label:"Wire Transfer",icon:"bank"},check:{label:"Check",icon:"clipboard"},vidapay_credit:{label:"VidaCredit",icon:"wallet"},manual:{label:"Manual",icon:"clipboard"},cash:{label:"Cash",icon:"banknote"}},Kpe={vidapay:{label:"VidaPay",icon:"wallet"},card_via_tools:{label:"Credit/Debit Card",icon:"credit-card"}},Ype={thirdweb:{label:"Crypto (thirdweb)",icon:"bitcoin"}};function n5(e){return Gpe[e]??Kpe[e]??Ype[e]??{label:e,icon:"clipboard"}}function Wpe(e){return n5(e).label}const hs={hostedHandoff:!1,peerToPeer:!1},fc={hostedHandoff:!0,peerToPeer:!1},ep={hostedHandoff:!1,peerToPeer:!0},Qpe={card:fc,ach:hs,crypto:fc,moonpay:fc,cashapp:ep,paypal:ep,venmo:ep,in_person:ep,vidacode:hs,affirm:fc,sezzle:fc,mercury_invoice:hs,wire:hs,check:hs,vidapay_credit:hs,manual:hs,cash:hs},Xpe={vidapay:fc,card_via_tools:hs};function r5(e){return Qpe[e]??Xpe[e]??hs}function Zpe(e){return r5(e).peerToPeer}function Jpe(e){return r5(e).hostedHandoff}const ehe=/^\$[A-Za-z0-9_]{1,20}$/,a5=64,s5=256,the=/[\p{Cc}\p{Cf}\p{Co}\p{Cs}<>]/u,nhe=/^[=+\-@]/,rhe=/[\p{L}\p{N}]/u;function ahe(e){if(typeof e!="string")return{ok:!1,reason:"empty"};if(e.length>s5)return{ok:!1,reason:"too_long"};const t=e.normalize("NFC").replace(/\s+/gu," ").trim();if(t.length===0)return{ok:!1,reason:"empty"};if(t.startsWith("$")){const n=t.replace(/^\$ /,"$");return ehe.test(n)?{ok:!0,value:n,kind:"cashtag"}:{ok:!1,reason:"cashtag_format"}}return the.test(t)||nhe.test(t)?{ok:!1,reason:"unsupported_characters"}:[...t].length>a5?{ok:!1,reason:"too_long"}:rhe.test(t)?{ok:!0,value:t,kind:"display_name"}:{ok:!1,reason:"unsupported_characters"}}function E0(e){switch(e){case"empty":return"Enter the name or $cashtag you paid from.";case"too_long":return`That is longer than a Cash App name. Keep it under ${a5} characters.`;case"cashtag_format":return"A $cashtag is $ followed by up to 20 letters, numbers or underscores, like $jane_doe.";case"unsupported_characters":return"Use the name exactly as Cash App shows it, in letters, numbers and spaces.";case"is_recipient":return"That is our $cashtag. We need yours, the one you paid from."}}const she={"credit-card":F0,bank:SU,bitcoin:wU,smartphone:fh,storefront:jp,ticket:R2,wallet:_c,banknote:bU,clipboard:vU};function ihe({railKey:e,className:t}){const n=she[n5(e).icon];return s.jsx(n,{className:t})}const ohe=no("w-full rounded-xl border bg-card text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60",{variants:{selected:{true:"border-primary shadow-sm ring-1 ring-primary",false:"border-card-border enabled:hover:border-primary/40"}},defaultVariants:{selected:!1}});function i5({icon:e,label:t,hint:n,trailing:r,selected:o,busy:l,disabled:c,
53className:d,children:m,type:p="button",...y}){const g=e!=null||t!=null||n!=null||r!=null;return s.jsx("button",{type:p,disabled:c||l,"aria-busy":l||void 0,className:Y(ohe({selected:!!o}),d),...y,children:g?s.jsxs("span",{className:"flex items-start gap-3",children:[e!=null&&s.jsx("span",{className:Y("mt-0.5 shrink-0",o?"text-primary":"text-muted-foreground"),children:e}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsxs("span",{className:"flex items-baseline justify-between gap-3",children:[s.jsx("span",{className:"flex min-w-0 items-center gap-1.5 text-sm font-medium",children:t}),r]}),n!=null&&s.jsx("span",{className:"mt-0.5 block text-sm text-muted-foreground",children:n}),m]})]}):m})}function y1(e,t){return Math.round(e*t/1e4)}const lhe=new Set(["paid","failed","expired","cancelled","refunded"]);function che(e){return e!==void 0&&lhe.has(e)}const pR={venmo:"After checkout, one tap opens Venmo with the amount and order note prefilled.",cashapp:"After checkout, one tap opens Cash App with the amount prefilled."},hR={vidapay:`Card and wallet payments confirm instantly. If you choose bank transfer (ACH), it takes about ${Cp} business days to clear and we ship once it does.`},gR={card_via_tools:["Apple Pay","Google Pay","Klarna","Afterpay","Affirm"],vidapay:["Cash App Pay","Bank transfer","Apple Pay","Google Pay","Klarna","Affirm"]};function uhe(e){return e.kind==="vidapay"}function dhe({methods:e,listPriceCents:t,value:n,onChange:r}){const o=[...e].sort((c,d)=>c.sortOrder-d.sortOrder),l=e.reduce((c,d)=>Math.max(c,d.discountBps),0);return s.jsxs("div",{role:"radiogroup","aria-label":"Payment method",className:"space-y-2.5",children:[o.map(c=>{const d=y1(t,c.discountBps),m=t-d,p=n===c.key,y=c.discountBps>0&&c.discountBps===l,g=uhe(c);return s.jsxs(i5,{role:"radio","aria-checked":p,selected:p,onClick:()=>r(c.key),className:g?"rounded-lg p-4 border-primary bg-secondary/30":"rounded-lg p-4","data-testid":`option-rail-${c.key}`,icon:s.jsx(ihe,{railKey:c.key,className:"w-5 h-5"}),label:s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"truncate",children:c.displayName}),g&&s.jsx("span",{className:"flex-shrink-0 rounded-full bg-secondary px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-secondary-foreground","data-testid":"badge-recommended-vidapay",children:"Recommended"}),y&&s.jsxs("span",{className:"flex-shrink-0 rounded-full bg-primary/10 px-1.5 py-0.5 text-[10px] font-semibold text-primary","data-testid":`badge-best-price-${c.key}`,children:["Best price · save ",Math.round(c.discountBps/100),"%"]})]}),trailing:s.jsx("p",{className:"font-bold text-sm","data-testid":`text-rail-total-${c.key}`,children:Et(m)}),hint:c.description,children:[gR[c.key]&&s.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-1.5","data-testid":`badges-${c.key}`,children:[gR[c.key].map(v=>s.jsx("span",{className:"rounded-full border border-card-border bg-muted/60 px-2 py-0.5 text-[10px] font-semibold tracking-wide text-foreground/80",children:v},v)),!g&&s.jsx("span",{className:"text-[10px] text-muted-foreground",children:"via VidaPay"})]}),d>0&&s.jsxs("p",{className:"text-sm font-medium text-primary mt-1","data-testid":`text-rail-discount-${c.key}`,children:[c.displayName," discount â",Et(d)]}),Jpe(c.key)&&s.jsxs("p",{className:"inline-flex items-center gap-1.5 text-sm text-muted-foreground mt-1",children:[s.jsx(ao,{className:"w-3.5 h-3.5 shrink-0"}),"You'll complete payment on a secure hosted page."]}),pR[c.key]&&s.jsxs("p",{className:"inline-flex items-start gap-1.5 text-sm text-muted-foreground mt-1","data-testid":`text-app-handoff-${c.key}`,children:[s.jsx(fh,{className:"mt-0.5 w-3.5 h-3.5 shrink-0"}),pR[c.key]]}),hR[c.key]&&s.jsxs("p",{className:"inline-flex items-start gap-1.5 text-sm text-muted-foreground mt-1","data-testid":`text-settlement-delay-${c.key}`,children:[s.jsx(Qd,{className:"mt-0.5 w-3.5 h-3.5 shrink-0"}),hR[c.key]]})]},c.key)}),s.jsx("p",{className:"text-xs text-muted-foreground pt-1",children:"Discounts are applied to your final order total at checkout."})]})}const fhe="Insufficient stock for:",mhe="Cart not found",phe="EMAIL_VERIFICATION_REQUIRED",hhe="Local Pickup is currently limited to select ZIP codes and this order isn't in the pickup area. Please double-check the ZIP code you entered, or choose shipping instead.";function ghe(e,t){const n=(e??"").trim();return n.startsWith(fhe)?{kind:"stock",title:"An item just sold out",description:"Please review your cart before trying again."}:n===mhe?{kind:"cart-missing",title:"Your cart needs a refresh",description:"We couldn't find your cart. Reloading it now."}:t===phe?{kind:"email-verification",title:"Verify your email to check out",description:"We sent a verification link
53when you signed up. Click it to confirm your address, then place your order."}:n===hhe?{kind:"pickup-zip",title:"Pickup isn't available for that ZIP",description:"Local Pickup is limited to select ZIP codes right now. Check the ZIP you entered, or choose shipping instead."}:{kind:"generic",title:"Order failed",description:"Please try again or check your details."}}const Id="vp-checkout-fulfillment",yhe=20*6e4;function x1(){try{return typeof sessionStorage<"u"?sessionStorage:null}catch{return null}}function xhe(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.ts=="number"&&(t.fulfillmentMethod==="ship"||t.fulfillmentMethod==="delivery"||t.fulfillmentMethod==="pickup")&&(typeof t.pickupLocationId=="number"||t.pickupLocationId===null)&&(typeof t.pickupSlotStart=="string"||t.pickupSlotStart===null)&&typeof t.pickupContactPhone=="string"&&typeof t.pickupZip=="string"}function vhe(e,t=x1(),n=Date.now()){if(t)try{t.setItem(Id,JSON.stringify({...e,ts:n}))}catch{}}function bhe(e=x1(),t=Date.now()){if(!e)return null;let n=null;try{n=e.getItem(Id)}catch{return null}if(!n)return null;let r;try{r=JSON.parse(n)}catch{try{e.removeItem(Id)}catch{}return null}if(!xhe(r)||t-r.ts>=yhe){try{e.removeItem(Id)}catch{}return null}return r}function yR(e=x1()){if(e)try{e.removeItem(Id)}catch{}}function whe(e){return e.quoteTotalDueCents!=null?Math.max(0,e.quoteTotalDueCents-e.shippingCents):Math.max(0,e.subtotalCents-e.promoDiscountCents)}function She(e,t){return e.amountCents!==t.amountCents?!1:t.isShip?t.shippingSelectionUsable&&t.authoritativeShippingTotalReady&&e.shippingQuoteId!==null&&e.shippingQuoteId===t.shippingQuoteId&&e.shippingBinding!==null&&e.shippingBinding===t.shippingBinding:!0}function v1(e){return e!=null&&e<=0}function Che(e){return v1(e.quoteTotalDueCents)?Math.max(0,(e.storeCreditAvailableCents??0)-(e.storeCreditAppliedCents??0))>=e.deliveryFeeCents:!1}function Nhe(e){return e.awaitingFundedPlacement&&!e.alreadyPlaced&&!e.isPlacing&&v1(e.quoteTotalDueCents)&&e.attested}const Ahe="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50";function Ehe({value:e,onChange:t,onSelect:n,label:r,placeholder:o,error:l,id:c,required:d,className:m,onBlur:p,testId:y,"aria-describedby":g}){const v=h.useId(),b=c??`addr-${v}`,S=`${b}-listbox`,[C,N]=h.useState([]),[A,T]=h.useState(!1),[E,j]=h.useState(-1),[_,R]=h.useState(!1),P=h.useRef(null),M=h.useRef(!1),q=h.useRef(!1);h.useEffect(()=>{const L=e.trim();if(M.current){M.current=!1;return}if(L.length<4){N([]),T(!1);return}if(!q.current)return;const H=setTimeout(()=>{U(L)},300);return()=>clearTimeout(H)},[e]),h.useEffect(()=>()=>P.current?.abort(),[]);async function U(L){P.current?.abort();const H=new AbortController;P.current=H,R(!0);try{const Q=await fetch(`/api/address/suggest?q=${encodeURIComponent(L)}&limit=6`,{credentials:"include",signal:H.signal});if(!Q.ok){N([]),T(!1);return}const O=((await Q.json()).suggestions??[]).slice(0,6);N(O),T(O.length>0),j(-1)}catch(Q){Q.name!=="AbortError"&&(N([]),T(!1))}finally{P.current===H&&R(!1)}}function V(L){M.current=!0,t(L.address1),n({address1:L.address1,city:L.city,state:L.state,zip5:L.zip5}),T(!1),N([]),j(-1)}function $(L){if(!A||C.length===0){L.key==="ArrowDown"&&C.length>0&&(T(!0),j(0),L.preventDefault());return}switch(L.key){case"ArrowDown":L.preventDefault(),j(H=>Math.min(H+1,C.length-1));break;case"ArrowUp":L.preventDefault(),j(H=>Math.max(H-1,0));break;case"Enter":E>=0&&(L.preventDefault(),V(C[E]));break;case"Escape":T(!1),j(-1);break}}return s.jsxs("div",{className:"relative",children:[r&&s.jsxs("label",{htmlFor:b,className:"text-sm font-medium text-ink-2 dark:text-white/70",children:[r,d&&s.jsx("span",{className:"ml-0.5 text-red-600",children:"*"})]}),s.jsxs("div",{className:Y("relative",r&&"mt-1"),children:[s.jsx("input",{id:b,type:"text",role:"combobox","aria-expanded":A,"aria-controls":S,"aria-autocomplete":"list","aria-activedescendant":E>=0?`${b}-opt-${E}`:void 0,"aria-required":d||void 0,"aria-invalid":l?!0:void 0,"aria-describedby":g,autoComplete:"off",value:e,placeholder:o,"data-testid":y,className:Y(m??Ahe,l&&"border-red-500"),onChange:L=>{M.current=!1,t(L.target.value)},onKeyDown:$,onFocus:()=>{q.current=!0,C.length>0&&T(!0)},onBlur:()=>{q.current=!1,T(!1),p?.()}}),_&&s.jsx(er,{className:"pointer-events-none absolute right-2.5 top-1/2 size-4 -translate-y-1/2 animate-spin text-muted-foreground"}
53),A&&C.length>0&&s.jsx("div",{id:S,role:"listbox",className:"absolute z-30 mt-1 max-h-64 w-full overflow-auto rounded-xl border border-ink/10 bg-card p-1 shadow-lg dark:border-white/10",children:C.map((L,H)=>s.jsx("button",{type:"button",id:`${b}-opt-${H}`,role:"option",tabIndex:-1,"aria-selected":H===E,onMouseDown:Q=>Q.preventDefault(),onClick:()=>V(L),onMouseEnter:()=>j(H),className:Y("block w-full cursor-pointer rounded-lg px-3 py-2 text-left text-sm text-ink dark:text-white",H===E?"bg-muted":"hover:bg-muted/60"),children:L.label},`${L.label}-${H}`))})]}),l&&s.jsx("span",{className:"mt-1 block text-xs text-red-600",children:l})]})}const xR={checked:!1,valid:null,standardized:null,reason:"unavailable"};function jhe(){const[e,t]=h.useState(!1);async function n(r){t(!0);try{const o=await nQ(r);return{...o,standardized:o.standardized?{address1:o.standardized.address1,address2:o.standardized.address2??null,city:o.standardized.city,state:o.standardized.state,zip5:o.standardized.zip5,zip4:o.standardized.zip4??null}:null}}catch(o){return o instanceof Rw?{...xR,message:"Validation unavailable"}:{...xR}}finally{t(!1)}}return{validate:n,validating:e}}function o5(e,t){const n=r=>r.trim().toUpperCase().replace(/\s+/g," ");return n(e.address1)!==n(t.address1)||n(e.city)!==n(t.city)||n(e.state)!==n(t.state)||n(e.zip5)!==n(t.zip.slice(0,5))}function vR(e){const t=e.zip4?`${e.zip5}-${e.zip4}`:e.zip5;return[e.address1,e.address2,`${e.city}, ${e.state} ${t}`].filter(Boolean).join(", ")}function l5(e){return e.zip4?`${e.zip5}-${e.zip4}`:e.zip5}function The(e,t){return e.address2??t??void 0}function Pwe(e){return[e.address1,e.address2].filter(Boolean).join(" ")}function khe(e){switch(e){case"missing_secondary":return"Add your apartment, suite, or unit number so USPS can confirm delivery. You can still continue.";case"unrecognized_secondary":return"USPS does not recognize that apartment or suite number. Double-check it. You can still continue.";case"undeliverable":return"USPS does not show this address as deliverable. Double-check it. You can still continue.";default:return"USPS could not verify this address. Double-check before continuing. You can still continue."}}function Rhe({outcome:e,entered:t,onUseSuggested:n,onKeepMine:r,className:o}){if(!e.checked)return null;const l=e.standardized;return e.valid===!0&&l&&o5(l,t)?s.jsxs("div",{className:Y("rounded-xl border border-amber/30 bg-amber-tint p-3 text-xs text-amber",o),children:[s.jsxs("div",{className:"flex items-center gap-1.5 font-medium",children:[s.jsx(Yi,{className:"size-3.5","aria-hidden":"true"})," USPS suggests"]}),s.jsx("p",{className:"mt-1 font-semibold text-amber",children:vR(l)}),s.jsxs("div",{className:"mt-2 flex flex-wrap gap-2",children:[s.jsx("button",{type:"button",onClick:()=>n(l),className:"rounded-lg bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground hover:bg-primary/90",children:"Use suggested"}),s.jsx("button",{type:"button",onClick:r,className:"rounded-lg border border-amber/40 px-3 py-1.5 text-xs font-medium text-amber hover:bg-amber/10",children:"Keep mine"})]})]}):e.valid===!0?s.jsxs("p",{className:Y("flex items-center gap-1.5 text-xs text-vida-green-700 dark:text-vida-mint",o),children:[s.jsx(Xi,{className:"size-3.5","aria-hidden":"true"})," Address verified"]}):e.valid===!1?s.jsxs("div",{className:Y("space-y-1",o),children:[s.jsxs("p",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[s.jsx(el,{className:"size-3.5 text-amber","aria-hidden":"true"}),khe(e.reason)]}),l?s.jsxs("p",{className:"pl-5 text-xs text-muted-foreground",children:["USPS reads it as: ",vR(l)]}):null]}):null}const Phe="flex h-9 w-full appearance-none rounded-md border border-input bg-transparent px-3 py-1 pr-8 text-base shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",Ohe=h.forwardRef(function({value:t,onChange:n,placeholder:r="Select a state",className:o,...l},c){return s.jsxs("div",{className:"relative",children:[s.jsxs("select",{ref:c,value:t,onChange:d=>n(d.target.value),autoComplete:"address-level1",className:Y(Phe,!t&&"text-muted-foreground",o),...l,children:[s.jsx("option",{value:"",disabled:!0,children:r}),g1.map(d=>s.jsxs("option",{value:d.code,children:[d.code," - ",d.name]},d.code))]}),s.jsx(dl,{className:"pointer-events-none absolute right-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground","aria-hidden":"true"})]})});function bR(e){return e.address1.trim().length>0&&e.city.trim().length>0&&e.state.trim().length>0&&e.zip.trim().length>0}
53function gv(e){return[e.address1.trim().toUpperCase(),(e.address2??"").trim().toUpperCase(),e.city.trim().toUpperCase(),e.state.trim().toUpperCase(),e.zip.trim()].join("|")}function yv(e,t){return e.checked&&e.valid===!0&&e.standardized!=null&&o5(e.standardized,t)}function _he(){const{validate:e,validating:t}=jhe(),[n,r]=h.useState(null),[o,l]=h.useState(null),[c,d]=h.useState(!0),m=h.useRef(!0),p=h.useRef(null),y=h.useRef(0),g=h.useRef(null),v=j=>{m.current=j,d(j)};function b(j,_){p.current=_;const R=++y.current,P=e({address1:j.address1,...j.address2?.trim()?{address2:j.address2.trim()}:{},city:j.city,state:j.state,zip:j.zip});return g.current={key:_,promise:P},P.then(M=>{R===y.current&&(g.current=null,r(M),l({...j}),v(!yv(M,j)))}),P}async function S(j){if(!bR(j))return;const _=gv(j);_!==p.current&&await b(j,_)}async function C(j){if(!bR(j))return!0;const _=gv(j);if(_===p.current){const P=g.current;if(P&&P.key===_){const M=await P.promise;return!yv(M,j)}return m.current}const R=await b(j,_);return!yv(R,j)}function N(j){const _=The(j,o?.address2),R={address1:j.address1,..._?.trim()?{address2:_.trim()}:{},city:j.city,state:j.state.toUpperCase(),zip:l5(j)};p.current=gv(R),y.current++,g.current=null,v(!0),r(null),l(null)}function A(){v(!0),r(null),l(null)}function T(){v(!0),r(null),l(null)}function E(){y.current++,g.current=null,p.current=null,v(!0),r(null),l(null)}return{outcome:n,entered:o,resolved:c,validating:t,check:S,ensureResolvedForSubmit:C,acceptSuggested:N,keepMine:A,clearOutcome:T,reset:E}}function Ihe(e,t){const n=e??"both";return n==="both"?!0:n==="billing"||n==="shipping"?n===t:!0}function c5(e,t){return e.filter(n=>Ihe(n.type,t))}function Mhe(e){return c5(e,"shipping")}function u5(e,t){return t==="billing"?e.isDefaultBilling===!0:(e.isDefaultShipping??e.isDefault)===!0}function wR(e,t){const n=c5(e,t);return n.length===0?null:n.find(r=>u5(r,t))??n[0]}const j0="VidaPay Package";function Dhe(e){return(e.orderNumber??"").replace(/[^0-9]/g,"")||String(e.id)}let cd=null;function Lhe(){return typeof window<"u"&&window.Razorpay?Promise.resolve():cd||(cd=new Promise((e,t)=>{const n=document.createElement("script");n.src="https://checkout.razorpay.com/v1/checkout.js",n.async=!0,n.onload=()=>e(),n.onerror=()=>{cd=null,t(new Error("Failed to load Razorpay Checkout"))},document.head.appendChild(n)}),cd)}class d5 extends Error{constructor(){super("Payment was cancelled"),this.name="RazorpayDismissedError"}}async function qhe(e){if(await Lhe(),!window.Razorpay)throw new Error("Razorpay Checkout unavailable");return new Promise((t,n)=>{let r=!1;const o=new window.Razorpay({key:e.handle.keyId,order_id:e.handle.orderId,amount:e.handle.amountSubunits,currency:e.handle.currency,name:j0,description:`Reference ${Dhe(e.document)}`,prefill:e.prefill,theme:{color:"#1D4A38"},handler:l=>{r=!0,t(l)},modal:{ondismiss:()=>{r||n(new d5)}}});o.on("payment.failed",l=>{r=!0,n(new Error(l?.error?.description??"Payment failed"))}),o.open()})}const SR="https://secure.nmi.com/token/Collect.js";function Uhe(e){return new Promise((t,n)=>{if(typeof window>"u"){n(new Error("no window"));return}const r=document.querySelector(`script[src="${SR}"]`);if(r&&window.CollectJS){t(window.CollectJS);return}if(r){r.addEventListener("load",()=>{window.CollectJS?t(window.CollectJS):n(new Error("CollectJS unavailable"))}),r.addEventListener("error",()=>n(new Error("Collect.js failed to load")));return}const o=document.createElement("script");o.src=SR,o.async=!0,o.setAttribute("data-tokenization-key",e),o.addEventListener("load",()=>{window.CollectJS?t(window.CollectJS):n(new Error("CollectJS unavailable"))}),o.addEventListener("error",()=>n(new Error("Collect.js failed to load"))),document.head.appendChild(o)})}const zhe=h.forwardRef(function({config:t,onError:n,onReady:r},o){const l=h.useId().replace(/[:]/g,""),c=`nmi-checkaccount-${l}`,d=`nmi-checkaba-${l}`,m=`nmi-checkname-${l}`,[p,y]=h.useState(!1),g=h.useRef(null);h.useEffect(()=>{let b=!1;const S=t.tokenizationKey??"";if(!S){n("Bank payment is not configured. Please choose another method.");return}return Uhe(S).then(C=>{b||C.configure({variant:"inline",fields:{checkaccount:{selector:`#${c}`,placeholder:"Account number"},checkaba:{selector:`#${d}`,placeholder:"Routing number"},checkname:{selector:`#${m}`,placeholder:"Name on account"}},fieldsAvailableCallback:()=>{b||(y(!0),n(null),r?.(!0))},validationCallback:(N,A,T)=>{!A&&T&&n(T)},timeoutCallback:()=>{n("The bank form timed out. Please check your details and try again."),g.current?.(null),g.current=null},callback:N=>{const A=g.current;g.current=null,A&&(N?.token?A({paymentToken:N.token}):(n("Could not verify the bank account. Please re-check the numbers."),A(null)))}})}).catch(()=>{b||n("Bank payment could not load. Please choose another method.")}),()=>{b=!0}},[t.tokenizationKey,c,d,m,n,r]),h.useImperativeHandle(o,()=>({async tokenize(){return!window.CollectJS||!p?(n("Bank form is still loading, please try again."),null):new Promise(b=>{g.current=b;try{window.CollectJS?.startPaymentRequest()}catch{g.current=null,n("Could not submit bank details. Please try again."),b(null)}})}}),[p,n]);const v="h-10 w-full rounded-card border border-card-border bg-card px-3 [&>iframe]:h-full [&>iframe]:w-full";return s.jsxs("div",{className:"w-full min-w-0 space-y-3","data-testid":"block-nmi-ach-form",children:[s.jsxs("div",{children:[s.jsx("label",{htmlFor:m,className:"mb-1 block text-xs text-muted-foreground",children:"Name on account"}),s.jsx("div",{id:m,className:v})]}),s.jsxs("div",{children:[s.jsx("label",{htmlFor:d,className:"mb-1 block text-xs text-muted-foreground",children:"Routing number"}),s.jsx("div",{id:d,className:v})]}),s.jsxs("div",{children:[s.jsx("label",{htmlFor:c,className:"mb-1 block text-xs text-muted-foreground",children:"Account number"}),s.jsx("div",{id:c,className:v})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"You'll pay directly from your checking account. Your bank details are encrypted and never stored on our servers."})]})}),Vhe={sandbox:"https://sandbox.web.squarecdn.com/v1/square.js",production:"https://web.squarecdn.com/v1/square.js"};let ud=null;function Bhe(e){return typeof window<"u"&&window.Square?Promise.resolve():ud||(ud=new Promise((t,n)=>{const r=document.createElement("script");r.src=Vhe[e],r.async=!0,r.onload=()=>t(),r.onerror=()=>{ud=null,n(new Error("Failed to load Square Web Payments SDK"))},document.head.appendChild(r)}),ud)}async function CR(e,t,n){if(await Bhe(n),!window.Square)throw new Error("Square Web Payments SDK unavailable");return window.Square.payments(e,t)}const Fhe={input:{color:"#0e1f18",backgroundColor:"#ffffff",fontSize:"16px"},"input::placeholder":{color:"#6d7e75"},"input.is-error":{color:"#b3392e"},".input-container":{borderColor:"#dee3e1",borderRadius:"12px"},".input-container.is-focus":{borderColor:"#1d4a38"},".input-container.is-error":{borderColor:"#b3392e"},".message-text":{color:"#5e6e66"},".message-icon":{color:"#5e6e66"},".message-text.is-error":{color:"#b3392e"},".message-icon.is-error":{color:"#b3392e"}}
53,$he={input:{color:"#f4f7f5",backgroundColor:"#123528",fontSize:"16px"},"input::placeholder":{color:"#7ea090"},"input.is-error":{color:"#cb4134"},".input-container":{borderColor:"#2d433a",borderRadius:"12px"},".input-container.is-focus":{borderColor:"#9bdcc0"},".input-container.is-error":{borderColor:"#cb4134"},".message-text":{color:"#8fa89c"},".message-icon":{color:"#8fa89c"},".message-text.is-error":{color:"#cb4134"},".message-icon.is-error":{color:"#cb4134"}},NR="square-card-container",xv="square-gpay-button",vv="square-afterpay-button",Hhe=100,Ghe=2e5,Khe=h.forwardRef(function({config:t,amountCents:n,onError:r,onReady:o,onWalletToken:l},c){const{resolvedTheme:d}=Mh(),m=h.useRef(null),p=h.useRef(null),[y,g]=h.useState(!1),[v,b]=h.useState(!1),[S,C]=h.useState(!1),N=t.environment==="production"?"production":"sandbox",{applicationId:A,locationId:T}=t,E=R=>{R.status==="OK"&&R.token?(r(null),l?.({paymentToken:R.token})):r(R.errors?.map(P=>P.message).filter(Boolean).join(", ")||"Payment was not completed.")};h.useEffect(()=>{let R=!0,P=null;if(!A||!T){r("Card payments are unavailable right now."),o?.(!1);return}return(async()=>{try{const M=await CR(A,T,N);if(!R)return;if(P=await M.card({style:d==="dark"?$he:Fhe}),!R){P.destroy?.();return}if(await P.attach(`#${NR}`),!R){P.destroy?.(),P=null;return}m.current=P,r(null),o?.(!0)}catch{R&&(r("Failed to load the card form. Please refresh and try again."),o?.(!1))}})(),()=>{R=!1,m.current=null,P?.destroy?.()}},[A,T,N,d,r,o]),h.useEffect(()=>{let R=!0;const P=[];if(g(!1),b(!1),C(!1),p.current=null,!A||!T)return;const M=(Math.max(n,1)/100).toFixed(2),q=()=>({countryCode:"US",currencyCode:"USD",total:{amount:M,label:j0}});return(async()=>{let U;try{U=await CR(A,T,N)}catch{return}if(R){try{const V=await U.applePay(U.paymentRequest(q()));if(!R)return;p.current=V,g(!0),P.push(()=>V.destroy?.())}catch{}try{const V=await U.googlePay(U.paymentRequest(q()));if(!R)return;if(await V.attach(`#${xv}`,{buttonColor:"black",buttonType:"long",buttonSizeMode:"fill"}),!R){V.destroy?.();return}const $=document.getElementById(xv),L=async()=>{try{E(await V.tokenize())}catch{r("Google Pay was not completed.")}};$?.addEventListener("click",L),b(!0),P.push(()=>{$?.removeEventListener("click",L),V.destroy?.()})}catch{}if(n>=Hhe&&n<=Ghe)try{const V=U.paymentRequest({...q(),requestShippingContact:!0});V.addEventListener?.("afterpay_shippingaddresschanged",()=>({shippingOptions:[{id:"free",label:"Standard",amount:"0.00",taxLineItems:[],total:{amount:M,label:j0}}]}));const $=await U.afterpayClearpay(V);if(!R)return;if(await $.attach(`#${vv}`),!R){$.destroy?.();return}const L=document.getElementById(vv),H=async()=>{try{E(await $.tokenize())}catch{r("Afterpay was not completed.")}};L?.addEventListener("click",H),C(!0),P.push(()=>{L?.removeEventListener("click",H),$.destroy?.()})}catch{}}})(),()=>{R=!1,p.current=null;for(const U of P)U()}},[A,T,N,n,d,r]),h.useImperativeHandle(c,()=>({async tokenize(){const R=m.current;if(!R)return r("Payment form is still loading, please try again."),null;const P=await R.tokenize();return P.status!=="OK"||!P.token?(r(P.errors?.map(M=>M.message).filter(Boolean).join(", ")||"Card entry failed."),null):(r(null),{paymentToken:P.token})}}),[r]);const j=()=>{const R=p.current;R&&R.tokenize().then(E).catch(()=>r("Apple Pay was not completed."))},_=y||v||S;return s.jsxs("div",{className:"w-full min-w-0 space-y-3",children:[s.jsxs("div",{className:"space-y-2",children:[y&&s.jsx("button",{type:"button","aria-label":"Pay with Apple Pay",className:"apple-pay-button apple-pay-button-black",onClick:j,"data-testid":"square-apple-pay"}),s.jsx("div",{id:xv,className:`w-full min-w-0 ${v?"":"hidden"}`,"data-testid":"square-google-pay"}),s.jsx("div",{id:vv,className:`w-full min-w-0 ${S?"":"hidden"}`,"data-testid":"square-afterpay"})]}),_&&s.jsxs("div",{className:"flex items-center gap-3","aria-hidden":"true",children:[s.jsx("span",{className:"h-px flex-1 bg-card-border"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"or pay with card"}),s.jsx("span",{className:"h-px flex-1 bg-card-border"})]}),s.jsx("div",{id:NR,className:"square-card-host w-full min-w-0"})]})});var bv={exports:{}},wv,AR;function Yhe(){if(AR)return wv;AR=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return wv=e,wv}var Sv,ER;function Whe(){if(ER)return Sv;ER=1;var e=Yhe();function t(){}function n(){}return n.resetWarningCache=t,Sv=function(){function r(c,d,m,p,y,g){if(g!==e){var v=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw v.name="Invariant Violation",v}}r.isRequired=r;function o(){return r}var l={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return l.PropTypes=l,l},Sv}var jR;function Qhe(){return jR||(jR=1,bv.exports=Whe()()),bv.exports}var Xhe=Qhe();const tn=I0(Xhe);function TR(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Zhe(e){if(Array.isArray(e))return e}function f5(e,t,n){return(t=age(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jhe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,l,c,d=[],m=!0,p=!1;try{if(l=(n=n.call(e)).next,t!==0)for(;!(m=(r=l.call(n)).done)&&(d.push(r.value),d.length!==t);m=!0);}catch(y){p=!0,o=y}
53finally{try{if(!m&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(p)throw o}}return d}}function ege(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 54In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function RR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kR(Object(n),!0).forEach(function(r){f5(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tge(e,t){if(e==null)return{};var n,r,o=nge(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function nge(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function m5(e,t){return Zhe(e)||Jhe(e,t)||sge(e,t)||ege()}function rge(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function age(e){var t=rge(e,"string");return typeof t=="symbol"?t:t+""}function T0(e){"@babel/helpers - typeof";return T0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},T0(e)}function sge(e,t){if(e){if(typeof e=="string")return TR(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?TR(e,t):void 0}}var or=function(t,n,r){var o=!!r,l=ee.useRef(r);ee.useEffect(function(){l.current=r},[r]),ee.useEffect(function(){if(!o||!t)return function(){};var c=function(){if(l.current)return l.current.apply(l,arguments)};return t.on(n,c),function(){t.off(n,c)}},[o,n,t,l])},k0=function(t){var n=ee.useRef(t);return ee.useEffect(function(){n.current=t},[t]),n.current},Pc=function(t){return t!==null&&T0(t)==="object"},ige=function(t){return Pc(t)&&typeof t.then=="function"},oge=function(t){return Pc(t)&&typeof t.elements=="function"&&typeof t.createToken=="function"&&typeof t.createPaymentMethod=="function"&&typeof t.confirmCardPayment=="function"},PR="[object Object]",lge=function e(t,n){if(!Pc(t)||!Pc(n))return t===n;var r=Array.isArray(t),o=Array.isArray(n);if(r!==o)return!1;var l=Object.prototype.toString.call(t)===PR,c=Object.prototype.toString.call(n)===PR;if(l!==c)return!1;if(!l&&!r)return t===n;var d=Object.keys(t),m=Object.keys(n);if(d.length!==m.length)return!1;for(var p={},y=0;y<d.length;y+=1)p[d[y]]=!0;for(var g=0;g<m.length;g+=1)p[m[g]]=!0;var v=Object.keys(p);if(v.length!==d.length)return!1;var b=t,S=n,C=function(A){return e(b[A],S[A])};return v.every(C)},p5=function(t,n,r){return Pc(t)?Object.keys(t).reduce(function(o,l){var c=!Pc(n)||!lge(t[l],n[l]);return r.includes(l)?(c&&console.warn("Unsupported prop change: options.".concat(l," is not a mutable property.")),o):c?RR(RR({},o||{}),{},f5({},l,t[l])):o},null):null},h5="Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",OR=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h5;if(t===null||oge(t))return t;throw new Error(n)},cge=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h5;if(ige(t))return{tag:"async",stripePromise:Promise.resolve(t).then(function(o){return OR(o,n)})};var r=OR(t,n);return r===null?{tag:"empty"}:{tag:"sync",stripe:r}},uge=function(t){!t||!t._registerWrapper||!t.registerAppInfo||(t._registerWrapper({name:"react-stripe-js",version:"6.8.1"}),t.registerAppInfo({name:"react-stripe-js",version:"6.8.1",url:"https://stripe.com/docs/stripe-js/react"}))},og=ee.createContext(null);og.displayName="ElementsContext";var g5=function(t,n){if(!t)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(n," in an <Elements> provider."));return t},y5=function(t){var n=t.stripe,r=t.options,o=t.children,l=ee.useMemo(function(){return cge(n)},[n]),c=ee.useState(function(){return{stripe:l.tag==="sync"?l.stripe:null,elements:l.tag==="sync"?l.stripe.elements(r):null}}),d=m5(c,2),m=d[0],p=d[1];ee.useEffect(function(){var v=!0,b=function(C){p(function(N){return N.str
54ipe?N:{stripe:C,elements:C.elements(r)}})};return l.tag==="async"&&!m.stripe?l.stripePromise.then(function(S){S&&v&&b(S)}):l.tag==="sync"&&!m.stripe&&b(l.stripe),function(){v=!1}},[l,m,r]);var y=k0(n);ee.useEffect(function(){y!==null&&y!==n&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.")},[y,n]);var g=k0(r);return ee.useEffect(function(){if(m.elements){var v=p5(r,g,["clientSecret","fonts"]);v&&m.elements.update(v)}},[r,g,m.elements]),ee.useEffect(function(){uge(m.stripe)},[m.stripe]),ee.createElement(og.Provider,{value:m},o)};y5.propTypes={stripe:tn.any,options:tn.object};var dge=function(t){var n=ee.useContext(og);return g5(n,t)},fge=function(){var t=dge("calls useElements()"),n=t.elements;return n};tn.func.isRequired;var x5=ee.createContext(null);x5.displayName="CheckoutContext";var R0=function(t){var n=ee.useContext(x5),r=ee.useContext(og);if(n){if(r)throw new Error("You cannot wrap the part of your app that ".concat(t," in both a checkout provider and <Elements> provider."));return n}else return g5(r,t)},mge=["mode"],pge=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},rn=function(t,n,r){var o="".concat(pge(t),"Element"),l=function(p){var y=p.id,g=p.className,v=p.options,b=v===void 0?{}:v,S=p.onBlur,C=p.onFocus,N=p.onReady,A=p.onChange,T=p.onEscape,E=p.onClick,j=p.onLoadError,_=p.onLoaderStart,R=p.onNetworksChange,P=p.onConfirm,M=p.onCancel,q=p.onShippingAddressChange,U=p.onShippingRateChange,V=p.onSavedPaymentMethodRemove,$=p.onSavedPaymentMethodUpdate,L=p.onAvailablePaymentMethodsChange,H=R0("mounts <".concat(o,">")),Q="elements"in H?H.elements:null,I="checkoutState"in H?H.checkoutState:null,O=I?.type==="success"||I?.type==="loading"?I.sdk:null,F=ee.useState(null),B=m5(F,2),K=B[0],le=B[1],Z=ee.useRef(null),ie=ee.useRef(null);or(K,"blur",S),or(K,"focus",C),or(K,"escape",T),or(K,"click",E),or(K,"loaderror",j),or(K,"loaderstart",_),or(K,"networkschange",R),or(K,"confirm",P),or(K,"cancel",M),or(K,"shippingaddresschange",q),or(K,"shippingratechange",U),or(K,"savedpaymentmethodremove",V),or(K,"savedpaymentmethodupdate",$),or(K,"availablepaymentmethodschange",L),or(K,"change",A);var re;N&&(t==="expressCheckout"?re=N:re=function(){N(K)}),or(K,"ready",re),ee.useLayoutEffect(function(){if(Z.current===null&&ie.current!==null&&(Q||O)){var he=null;if(O){var pe=O,oe=O;switch(t){case"paymentForm":he=oe.createForm(b);break;case"payment":he=pe.createPaymentElement(b);break;case"address":if("mode"in b){var ge=b.mode,we=tge(b,mge);if(ge==="shipping")he=pe.createShippingAddressElement(we);else if(ge==="billing")he=pe.createBillingAddressElement(we);else throw new Error("Invalid options.mode. mode must be 'billing' or 'shipping'.")}else throw new Error("You must supply options.mode. mode must be 'billing' or 'shipping'.");break;case"expressCheckout":he=pe.createExpressCheckoutElement(b);break;case"currencySelector":he=O.createCurrencySelectorElement();break;case"taxId":he=pe.createTaxIdElement(b);break;case"contactDetails":he=pe.createContactDetailsElement();break;case"terms":he=pe.createTermsElement(b);break;default:throw new Error("<".concat(o,"> is not supported inside a checkout provider. Use an <Elements> provider instead."))}}else Q&&(he=Q.create(t,b));Z.current=he,le(he),he&&he.mount(ie.current)}},[Q,O,b]);var de=k0(b);return ee.useEffect(function(){if(Z.current){var he=p5(b,de,["paymentRequest"]);he&&"update"in Z.current&&Z.current.update(he)}},[b,de]),ee.useLayoutEffect(function(){return function(){if(Z.current&&typeof Z.current.destroy=="function")try{Z.current.destroy(),Z.current=null}catch{}}},[]),ee.createElement("div",{id:y,className:g,ref:ie})},c=function(p){R0("mounts <".concat(o,">"));var y=p.id,g=p.className;return ee.createElement("div",{id:y,className:g})},d=n?c:l;return d.propTypes={id:tn.string,className:tn.string,onChange:tn.func,onBlur:tn.func,onFocus:tn.func,onReady:tn.func,onEscape:tn.func,onClick:tn.func,onLoadError:tn.func,onLoaderStart:tn.func,onNetworksChange:tn.func,onConfirm:tn.func,onCancel:tn.func,onShippingAddressChange:tn.func,onShippingRateChange:tn.func,onSavedPaymentMethodRemove:tn.func,onSavedPaymentMethodUpdate:tn.func,onAvailablePaymentMethodsChange:tn.func,options:tn.object},d.displayName=o,d.__elementType=t,d},an=typeof window>"u",hge=ee.createContext(null);hge.displayName="EmbeddedCheckoutProviderContext";var gge=function(){var t=R0("calls useStripe()"),n=t.stripe;return n};rn("auBankAccount",an);rn("card",an);rn("cardNumber",an);rn("cardExpiry",an);rn("cardCvc",an);rn("currencySelector",an);rn("iban",an);var yge=rn("payment",an);rn("expressCheckout",an);rn("paymentRequestButton",an);rn("linkAuthentication",an);rn("contactDetails",an);rn("address",an);rn("shippingAddress",an);rn("paymentMethodMessaging",an);rn("taxId",an);
54rn("issuingCardNumberDisplay",an);rn("issuingCardCvcDisplay",an);rn("issuingCardExpiryDisplay",an);rn("issuingCardPinDisplay",an);rn("issuingCardCopyButton",an);rn("terms",an);function Np(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Np=function(t){return typeof t}:Np=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Np(e)}var v5="dahlia",xge=function(t){return t===3?"v3":t},b5="https://js.stripe.com",vge="".concat(b5,"/").concat(v5,"/stripe.js"),bge=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,wge=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/;var Sge=function(t){return bge.test(t)||wge.test(t)},Cge=function(){for(var t=document.querySelectorAll('script[src^="'.concat(b5,'"]')),n=0;n<t.length;n++){var r=t[n];if(Sge(r.src))return r}return null},_R=function(t){var n="",r=document.createElement("script");r.src="".concat(vge).concat(n);var o=document.head||document.body;if(!o)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return o.appendChild(r),r},Nge=function(t,n){!t||!t._registerWrapper||t._registerWrapper({name:"stripe-js",version:"9.13.0",startTime:n})},dd=null,tp=null,np=null,Age=function(t){return function(n){t(new Error("Failed to load Stripe.js",{cause:n}))}},Ege=function(t,n){return function(){window.Stripe?t(window.Stripe):n(new Error("Stripe.js not available"))}},jge=function(t){return dd!==null?dd:(dd=new Promise(function(n,r){if(typeof window>"u"||typeof document>"u"){n(null);return}if(window.Stripe){n(window.Stripe);return}try{var o=Cge();if(!(o&&t)){if(!o)o=_R(t);else if(o&&np!==null&&tp!==null){var l;o.removeEventListener("load",np),o.removeEventListener("error",tp),(l=o.parentNode)===null||l===void 0||l.removeChild(o),o=_R(t)}}np=Ege(n,r),tp=Age(r),o.addEventListener("load",np),o.addEventListener("error",tp)}catch(c){r(c);return}}),dd.catch(function(n){return dd=null,Promise.reject(n)}))},Tge=function(t,n,r){if(t===null)return null;var o=n[0];if(typeof o!="string")throw new Error("Expected publishable key to be of type string, got type ".concat(Np(o)," instead."));var l=o.match(/^pk_test/),c=xge(t.version),d=v5;l&&c!==d&&console.warn("Stripe.js@".concat(c," was loaded on the page, but @stripe/stripe-js@").concat("9.13.0"," expected Stripe.js@").concat(d,". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));var m=t.apply(void 0,n);return Nge(m,r),m},fd,w5=!1,S5=function(){return fd||(fd=jge(null).catch(function(t){return fd=null,Promise.reject(t)}),fd)};Promise.resolve().then(function(){return S5()}).catch(function(e){w5||console.warn(e)});var kge=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];w5=!0;var o=Date.now();return S5().then(function(l){return Tge(l,n,o)})};const IR=new Map;function Rge(e){let t=IR.get(e);return t||(t=kge(e),IR.set(e,t)),t}const C5="Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",Pge={theme:"stripe",variables:{fontFamily:C5,fontSizeBase:"16px",spacingUnit:"4px",borderRadius:"12px",colorPrimary:"#1d4a38",colorBackground:"#ffffff",colorText:"#0e1f18",colorTextSecondary:"#5e6e66",colorTextPlaceholder:"#6d7e75",colorDanger:"#b3392e",colorIconTabSelected:"#1d4a38"},rules:{".Input":{backgroundColor:"#ffffff",borderColor:"#dee3e1",boxShadow:"none",color:"#0e1f18"},".Input:focus":{borderColor:"#1d4a38",boxShadow:"0 0 0 1px #1d4a38"},".Input--invalid":{borderColor:"#b3392e",color:"#b3392e"},".Label":{color:"#5e6e66",fontWeight:"500"},".Tab":{borderColor:"#dee3e1",color:"#0e1f18"},".Tab:hover":{borderColor:"#1d4a38",color:"#0e1f18"},".Tab--selected":{borderColor:"#1d4a38",color:"#1d4a38",boxShadow:"0 0 0 1px #1d4a38"},".Error":{color:"#b3392e"}}},Oge={theme:"night",variables:{fontFamily:C5,fontSizeBase:"16px",spacingUnit:"4px",borderRadius:"12px",colorPrimary:"#9bdcc0",colorBackground:"#123528",colorText:"#f4f7f5",colorTextSecondary:"#8fa89c",colorTextPlaceholder:"#7ea090",colorDanger:"#cb4134",colorIconTabSelected:"#9bdcc0"},rules:{".Input":{backgroundColor:"#0c2a1f",borderColor:"#2d433a",boxShadow:"none",color:"#f4f7f5"},".Input:focus":{borderColor:"#9bdcc0",boxShadow:"0 0 0 1px #9bdcc0"},".Input--invalid":{borderColor:"#cb4134",color:"#cb4134"},".Label":{color:"#8fa89c",fontWeight:"500"},".Tab":{borderColor:"#2d433a",color:"#f4f7f5"},".Tab:hover":{borderColor:"#9bdcc0"},".Tab--selected":{borderColor:"#9bdcc0",color:"#9bdcc0",boxShadow:"0 0 0 1px #9bdcc0"},".Error":{color:"#cb4134"}}},_ge=h.forwardRef(function({onError:t,onReady:n},r){const o=gge(),l=fge();return h.useImperativeHandle(r,()=>({async tokenize(){if(!o||!l)return t("Payment form is still loading, please try again."),null;const{error:c}=await l.submit();if(c)return t(c.message??"Please check your card details."),null;
54const{error:d,confirmationToken:m}=await o.createConfirmationToken({elements:l});return d||!m?(t(d?.message??"Could not process card."),null):{paymentToken:m.id}}}),[o,l,t]),s.jsx("div",{className:"w-full min-w-0",children:s.jsx(yge,{options:{layout:"tabs",wallets:{applePay:"auto",googlePay:"auto"}},onReady:()=>{t(null),n?.(!0)}})})}),Ige=h.forwardRef(function(t,n){const{resolvedTheme:r}=Mh(),o=t.config.publishableKey??"",l=Rge(o),c=r==="dark"?Oge:Pge;return s.jsx(y5,{stripe:l,options:{mode:"payment",amount:Math.max(t.amountCents,1),currency:"usd",paymentMethodCreation:"manual",appearance:c},children:s.jsx(_ge,{...t,ref:n})},r)}),Mge={stripe:Ige,square:Khe,nmi:zhe},Dge=h.forwardRef(function(t,n){const r=Mge[t.config.sdk??""];return r?s.jsx(r,{ref:n,...t}):s.jsx("div",{className:"rounded-2xl border border-card-border bg-card p-4 text-sm text-muted-foreground",children:"This payment method can't be loaded right now. Please choose another method."})});function Lge({amountCents:e,toolsOrigin:t,attested:n,placing:r,onSettled:o,onFallback:l,onClose:c}){const[d,m]=h.useState("creating"),[p,y]=h.useState(null),[g,v]=h.useState(null),[b,S]=h.useState(!1),[C,N]=h.useState(320),[A,T]=h.useState(!1),E=h.useRef(!1);h.useEffect(()=>{let R=!1;return m("creating"),v(null),(async()=>{try{const P=await $p("/api/hub/fund-intent",{method:"POST",credentials:"include",headers:{"content-type":"application/json"},body:JSON.stringify({amountCents:e,saveForReuse:!1,embedded:!0})}),M=await P.json().catch(()=>null);if(R)return;if(!P.ok||!M||!("clientSecret"in M))throw new Error(P.status===403||P.status===423?"Our security system paused payments for this session. Wait a minute and try again.":M?.error??"Could not start payment.");y(M),m("pay")}catch(P){if(R)return;v(P instanceof Error?P.message:"Could not start payment."),m("error")}})(),()=>{R=!0}},[e]),h.useEffect(()=>{if(!p)return;const R=p.paymentIntentId,P=M=>{if(M.origin!==t)return;const q=M.data;q?.type==="vidapay-frame"&&(q.status==="ready"&&S(!0),q.status==="resize"&&typeof q.height=="number"&&N(Math.min(640,Math.max(220,q.height))),(q.status==="success"||q.status==="processing")&&!E.current&&(E.current=!0,T(q.status==="processing"),m("confirming"),$p(`/api/hub/fund-intent/${encodeURIComponent(R)}/credit`,{method:"POST",credentials:"include"}).catch(()=>null).then(()=>{o(),m("settled")})))};return window.addEventListener("message",P),()=>window.removeEventListener("message",P)},[p,t,o]);const j=document.documentElement.classList.contains("dark")?"dark":"light",_=p?`${t}/pay/frame#${new URLSearchParams({cs:p.clientSecret,pk:p.publishableKey,amount:String(e),parent:window.location.origin,theme:j}).toString()}`:null;return s.jsx("div",{className:"fixed inset-0 z-50 flex items-end justify-center bg-black/60 sm:items-center",role:"dialog","aria-modal":"true","aria-label":"VidaPay secure payment","data-testid":"vidapay-embedded-sheet",children:s.jsxs("div",{className:"flex max-h-[92dvh] w-full flex-col overflow-hidden rounded-t-2xl bg-card ring-1 ring-card-border sm:max-w-md sm:rounded-2xl",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-card-border px-4 py-3",children:[s.jsxs("p",{className:"flex items-center gap-2 text-sm font-semibold text-ink",children:[s.jsx(Ic,{className:"size-4 text-primary","aria-hidden":"true"}),"VidaPay secure payment"]}),s.jsx("button",{type:"button","aria-label":"Close payment",disabled:d==="confirming",onClick:c,className:"rounded-pill p-1.5 text-ink-3 hover:bg-ink/10 hover:text-ink disabled:opacity-40","data-testid":"button-close-vidapay-sheet",children:s.jsx(ro,{className:"size-4","aria-hidden":"true"})})]}),s.jsxs("div",{className:"overflow-y-auto p-4",children:[d==="creating"&&s.jsxs("p",{className:"flex items-center justify-center gap-2 py-10 text-sm text-muted-foreground",children:[s.jsx(er,{className:"size-4 animate-spin","aria-hidden":"true"}),"Preparing your secure paymentâ¦"]}),d==="error"&&s.jsxs("div",{className:"py-6 text-center",children:[s.jsx("p",{className:"text-sm text-destructive",children:g}),s.jsx(Le,{type:"button",variant:"ghost",className:"mt-4",onClick:l,"data-testid":"button-vidapay-error-fallback",children:"Pay on VidaPay instead (opens in this tab)"})]}),(d==="pay"||d==="confirming")&&_&&s.jsxs("div",{className:d==="confirming"?"pointer-events-none opacity-50":"",children:[!b&&s.jsxs("p",{className:"flex items-center justify-center gap-2 py-8 text-sm text-muted-foreground",children:[s.jsx(er,{className:"size-4 animate-spin","aria-hidden":"true"}),"Loading secure card entryâ¦"]}),s.jsx("iframe",{src:_,title:"VidaPay secure card entry",allow:"payment",sandbox:"allow-scripts allow-same-origin allow-forms",referrerPolicy:"no-referrer",style:{height:b?C:0},className:"w-full border-0","data-testid":"iframe-vidapay-frame"}),d==="confirming"&&s.jsxs("p",{className:"mt-2 flex items-center justify-center gap-2 text-sm text-muted-foreground",children:[s.jsx(er,{className:"size-4 animate-spin","aria-hidden":"true"}),"Confirming your paymentâ¦"]}),d==="pay"&&s.jsx("button",{type:"button",onClick:l,className:"mt-3 w-full text-center text-xs font-medium text-primary underline-offset-2 hover:underline","data-testid":"button-vidapay-more-ways",children:"Prefer Apple Pay, Google Pay, Klarna, Afterpay, or Affirm? Pay on VidaPay in this tab and land right back here."})]}),d==="settled"&&s.jsxs("div",{className:"py-6 text-center","data-testid":"vidapay-settled",children:[s.jsx(Xi,{className:"mx-auto
54size-9 text-primary","aria-hidden":"true"}),s.jsx("h2",{className:"mt-3 text-base font-semibold text-ink",children:"Payment complete"}),s.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:[A?`Your $${(e/100).toFixed(2)} payment is processing and will apply to this order automatically.`:`$${(e/100).toFixed(2)} was added to your VidaCredit and applied to this order.`," ",r?"Placing your order nowâ¦":n?"Completing your order nowâ¦":Fte]}),s.jsx(Le,{type:"button",block:!0,className:"mt-5",onClick:c,"data-testid":"button-vidapay-settled-ok",children:"OK"})]})]})]})})}function rp(e,t){return new Intl.DateTimeFormat("en-CA",{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit"}).format(new Date(e))}function MR(e,t){return new Intl.DateTimeFormat("en-US",{timeZone:t,hour:"numeric",minute:"2-digit"}).format(new Date(e))}function DR(e,t){return new Intl.DateTimeFormat("en-US",{timeZone:t,weekday:"long",month:"long",day:"numeric"}).format(new Date(e))}function qge(e){const[t,n,r]=e.split("-").map(Number),o=new Date(t??1970,(n??1)-1,r??1);return{weekday:o.toLocaleDateString("en-US",{weekday:"short"}),day:r??1,month:o.toLocaleDateString("en-US",{month:"short"})}}function Uge({location:e,settings:t,value:n,onChange:r}){const o=t.timezone,l={days:t.maxAdvanceDays},c=dW(e.id,l),d=h.useMemo(()=>c.data?.slots??[],[c.data]),m=h.useMemo(()=>{const N=new Map;for(const A of d){const T=rp(A.slotStart,o),E=N.get(T);E?E.push(A):N.set(T,[A])}return N},[d,o]),p=h.useMemo(()=>[...m.keys()].sort(),[m]),y=h.useMemo(()=>new Set(p),[p]),g=h.useMemo(()=>rp(new Date().toISOString(),o),[o]),[v,b]=h.useState(null);h.useEffect(()=>{if(n){b(rp(n,o));return}b(N=>N&&y.has(N)?N:y.has(g)?g:p[0]??null)},[n,o,y,p,g]);const S=h.useMemo(()=>{let N=null;for(const A of d)(!N||new Date(A.slotStart)<new Date(N.slotStart))&&(N=A);return N},[d]);if(c.isLoading)return s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading available timesâ¦"});if(d.length===0)return s.jsx("p",{className:"text-sm text-muted-foreground","data-testid":"pickup-no-slots",children:"No pickup times are available right now. Please choose shipping or check back later."});const C=v?m.get(v)??[]:[];return s.jsxs("div",{className:"min-w-0 space-y-3","data-testid":"pickup-slot-picker",children:[S&&n!==S.slotStart&&s.jsxs("button",{type:"button",onClick:()=>{b(rp(S.slotStart,o)),r(S.slotStart)},"data-testid":"pickup-next-available",className:"flex w-full items-center justify-between rounded-card border border-primary/40 bg-primary/5 px-3 py-2 text-left text-sm transition-colors hover:bg-primary/10",children:[s.jsxs("span",{children:[s.jsx("span",{className:"font-medium text-primary",children:"Next available"}),s.jsxs("span",{className:"block text-xs text-muted-foreground",children:[DR(S.slotStart,o)," · ",MR(S.slotStart,o)]})]}),s.jsx("span",{className:"text-xs font-medium text-primary",children:"Pick this â"})]}),s.jsx("div",{className:"flex w-full min-w-0 snap-x gap-2 overflow-x-auto pb-1 sm:flex-wrap sm:overflow-x-visible",role:"listbox","aria-label":"Pickup day",children:p.map(N=>{const A=N===v,{weekday:T,day:E,month:j}=qge(N),_=N===g;return s.jsxs("button",{type:"button",role:"option","aria-selected":A,onClick:()=>b(N),"data-testid":`pickup-day-${N}`,className:Y("flex min-w-[60px] shrink-0 snap-start flex-col items-center gap-0.5 rounded-card border px-3 py-2 transition-colors",A?"border-primary bg-primary text-primary-foreground":"border-card-border bg-card text-ink hover:border-primary/50"),children:[s.jsx("span",{className:Y("text-[10px] font-medium uppercase tracking-wide",A?"text-primary-foreground/80":"text-muted-foreground"),children:_?"Today":T}),s.jsx("span",{className:"text-lg font-semibold leading-none",children:E}),s.jsx("span",{className:Y("text-[10px]",A?"text-primary-foreground/80":"text-muted-foreground"),children:j})]},N)})}),v&&s.jsxs("div",{children:[s.jsx("p",{className:"mb-2 text-sm font-medium text-ink",children:C[0]?DR(C[0].slotStart,o):"Select a date"}),s.jsx("div",{className:"grid grid-cols-3 gap-2 sm:grid-cols-4",role:"listbox","aria-label":"Pickup times",children:C.map(N=>{const A=n===N.slotStart,T=N.remaining<=2;return s.jsxs("button",{type:"button",role:"option","aria-selected":A,onClick:()=>r(N.slotStart),"data-testid":`pickup-slot-${N.slotStart}`,className:Y("rounded-card border px-2 py-2 text-sm font-medium transition-colors",A?"border-primary bg-primary text-primary-foreground":"border-card-border bg-card text-ink hover:border-primary/50"),children:[s.jsx("span",{className:"block",children:MR(N.slotStart,o)}),T&&!A&&s.jsxs("span",{className:"block text-[10px] font-normal text-amber",children:[N.remaining," left"]})]},N.slotStart)})})]})]})}function LR(e){return!e.storefrontKey.trim()||!e.cartFingerprint?null:JSON.stringify([e.storefrontKey.trim().toLowerCase(),e.cartFingerprint,e.address.firstName.trim().toLowerCase(),e.address.lastName.trim().toLowerCase(),e.address.line1.trim().toLowerCase(),(e.address.line2??"").trim().toLowerCase(),e.address.city.trim().toLowerCase(),e.address.state.trim().toUpperCase(),e.address.zip.trim(),e.address.country.trim().toUpperCase()])}
54function zge(e){const t=e.find(n=>n.isDefault);return t?t.quoteId:[...e].sort((n,r)=>n.customerChargeCents-r.customerChargeCents||n.carrier.localeCompare(r.carrier)||n.service.localeCompare(r.service)||n.quoteId.localeCompare(r.quoteId))[0]?.quoteId??null}const Vge=3e4;function qR(e){if(!e.selectedQuoteId||!e.options.some(n=>n.quoteId===e.selectedQuoteId)||!e.expiresAt)return!1;const t=Date.parse(e.expiresAt);return Number.isFinite(t)&&t-(e.nowMs??Date.now())>Vge}function UR(e){const t=e.replace(/[^a-z\d]/giu,"").toUpperCase();return t==="USPS"||t==="UPS"?t:t==="FEDEX"?"FedEx":e.replace(/([a-z\d])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").trim().split(/\s+/).filter(Boolean).map(n=>/^\d+$/u.test(n)?n:n.toUpperCase()==="USPS"||n.toUpperCase()==="UPS"?n.toUpperCase():n.toUpperCase()==="FEDEX"?"FedEx":`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()}`).join(" ")}function P0(e){const t=UR(e.carrier);let n=UR(e.service);return n.toLowerCase().startsWith(`${t.toLowerCase()} `)&&(n=n.slice(t.length).trim()),[t,n].filter(Boolean).join(" ")}function Bge(e){if(e.deliveryDate){const n=new Date(`${e.deliveryDate}T12:00:00.000Z`);if(Number.isFinite(n.getTime())){const r=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",timeZone:"UTC"}).format(n);return e.deliveryDateGuaranteed?`Guaranteed ${r}`:`Estimated ${r}`}}const t=e.deliveryDaysP90??e.deliveryDays;return t==null?null:`${t} business ${t===1?"day":"days"}`}function Fge(e,t){if(e===0)return"Included";try{return new Intl.NumberFormat("en-US",{style:"currency",currency:t}).format(e/100)}catch{return`${(e/100).toFixed(2)} ${t}`}}function $ge({options:e,selectedQuoteId:t,onSelect:n,disabled:r=!1,renderAmount:o=Fge,heading:l="Shipping speed",description:c="Choose an available carrier service.",includedLabel:d="Free",defaultLabel:m="Recommended",error:p=null}){return s.jsxs("fieldset",{className:"space-y-3","data-testid":"shipping-rate-selector",children:[s.jsx("legend",{className:"text-sm font-semibold text-foreground",children:l}),c?s.jsx("p",{className:"text-xs text-muted-foreground",children:c}):null,s.jsx("div",{className:"space-y-2",children:e.map(y=>{const g=y.quoteId===t,v=Bge(y);return s.jsxs("label",{className:Y("flex min-h-14 cursor-pointer items-start gap-3 rounded-lg border px-3 py-3","transition-colors focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",g?"border-primary bg-primary/5":"border-border bg-background hover:border-primary/60",r&&"cursor-not-allowed opacity-60"),children:[s.jsx("input",{type:"radio",name:"shipping-rate",value:y.quoteId,checked:g,onChange:()=>n(y.quoteId),disabled:r,className:"mt-0.5 size-4 accent-primary"}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsxs("span",{className:"flex flex-wrap items-center gap-2 text-sm font-medium text-foreground",children:[P0(y),y.isDefault?s.jsx("span",{className:"rounded-full bg-muted px-2 py-0.5 text-xs text-muted-foreground",children:m}):null]}),v?s.jsx("span",{className:"text-xs text-muted-foreground",children:v}):null]}),s.jsx("span",{className:"shrink-0 text-sm font-semibold text-foreground",children:y.customerChargeCents===0?d:o(y.customerChargeCents,y.currency)})]},y.quoteId)})}),p?s.jsx("div",{className:"text-sm text-destructive",role:"alert","data-testid":"shipping-rate-error",children:p}):null]})}const N5=h.createContext({supplyAttested:!1,legitimatePurposeAttested:!1});function Hge(){return h.useContext(N5)}function Owe({children:e}){const[t,n]=h.useState(!1),[r,o]=h.useState(!1);return r?s.jsx(N5.Provider,{value:{supplyAttested:!0,legitimatePurposeAttested:!0},children:e}):s.jsxs("div",{className:"mx-auto max-w-md px-5 py-10",children:[s.jsx("h1",{className:"font-display text-t2 text-ink",children:"Before you check out"}),s.jsx("p",{className:"mt-3 text-sm text-ink-2",children:"VidaCare supplies are for adults 21 and over. Please confirm the following to continue."}),s.jsx("div",{className:"mt-5 rounded-card border border-vida-gold-500/30 bg-white/60 p-4 text-sm text-ink-2 dark:bg-black/30",children:s.jsx("p",{children:"By continuing you confirm you are at least 21 years old and are purchasing these medical supplies for a lawful personal purpose. Products are sold as described by their specifications. VidaCare does not provide medical advice, dosing, or treatment guidance, and n
54o practitioner relationship is created by this purchase."})}),s.jsxs("label",{className:"mt-5 flex cursor-pointer items-start gap-3 text-sm text-ink",children:[s.jsx("input",{type:"checkbox",checked:t,onChange:l=>n(l.target.checked),className:"mt-0.5 size-5 accent-vida-gold-500","data-testid":"care-age-ack"}),s.jsx("span",{children:"I confirm I am at least 21 years old and accept the medical-supply terms."})]}),s.jsx("button",{type:"button",disabled:!t,onClick:()=>o(!0),className:"mt-6 w-full rounded-full bg-vida-gold-500 px-6 py-3 font-medium text-white transition-opacity disabled:opacity-40","data-testid":"care-age-continue",children:"Continue to checkout"})]})}const uh="vp:payment-return",Gge=360*60*1e3;function Kge(e){return e==="success"||e==="cancelled"?e:null}function A5(e){try{const t=new URL(e,window.location.origin);return t.origin!==window.location.origin?null:`${t.pathname}${t.search}${t.hash}`}catch{return null}}function E5(e){if(!e)return;const t=A5(e);if(t)try{const n={destination:t,at:Date.now()};window.localStorage.setItem(uh,JSON.stringify(n))}catch{}}function _we(e){let t=null;try{t=window.localStorage.getItem(uh)}catch{return{destination:null,storedValue:null}}if(!t)return{destination:null,storedValue:null};try{const n=JSON.parse(t);if(typeof n.destination!="string"||typeof n.at!="number")return{destination:null,storedValue:t};const r=Date.now()-n.at;if(r<0||r>Gge)return{destination:null,storedValue:t};const o=A5(n.destination),l=Kge(e);if(!o||!l)return{destination:o,storedValue:t};const c=new URL(o,window.location.origin);return c.searchParams.set("vidapay",l),{destination:`${c.pathname}${c.search}${c.hash}`,storedValue:t}}catch{return{destination:null,storedValue:t}}}function Iwe(e){if(e.storedValue!==null)try{window.localStorage.getItem(uh)===e.storedValue&&window.localStorage.removeItem(uh)}catch{}}const j5="vp-payment-request-attempt:v1:",Yge=2880*60*1e3,Jo=new Map,Wge=new Set(["clientAttemptId","confirmRepeatOfAttemptId","railKey","hubCardId","paymentToken","verificationToken"]);function O0(e,t){if(!(t&&Wge.has(t))){if(e==null||typeof e=="string"||typeof e=="boolean")return e;if(typeof e=="number")return Number.isFinite(e)?e:String(e);if(Array.isArray(e))return e.map(n=>O0(n));if(typeof e=="object"){const n={};for(const r of Object.keys(e).sort()){const o=e[r],l=O0(o,r);l!==void 0&&(n[r]=l)}return n}return String(e)}}function Qge(e){const t=JSON.stringify(O0(e));let n=2166136261,r=2654435769;for(let o=0;o<t.length;o+=1){const l=t.charCodeAt(o);n=Math.imul(n^l,16777619)>>>0,r=Math.imul(r^l+o,2246822507)>>>0}return`${n.toString(16).padStart(8,"0")}${r.toString(16).padStart(8,"0")}`}function T5(){try{return typeof window>"u"?void 0:window.localStorage}catch{return}}function Xge(){if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();const e=new Uint8Array(24);if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function")return crypto.getRandomValues(e),Array.from(e,t=>t.toString(16).padStart(2,"0")).join("");throw new Error("Secure browser randomness is required to start a payment")}function b1(e){if(!e)return null;try{const t=JSON.parse(e);return typeof t.attemptId=="string"&&typeof t.createdAt=="number"&&typeof t.expiresAt=="number"?t:null}catch{return null}}function Zge(e,t){const n=[];try{for(let r=0;r<e.length;r+=1){const o=e.key(r);if(!o?.startsWith(j5))continue;const l=b1(e.getItem(o));(!l||l.expiresAt<=t)&&n.push(o)}for(const r of n)e.removeItem(r)}catch{}}function Jge(e){for(const[t,n]of Jo)n.expiresAt<=e&&Jo.delete(t)}function eye(e,t){if(!e)return null;try{return b1(e.getItem(t))}catch{return null}}function tye(e,t,n={}){const r=n.storage??T5(),o=(n.now??Date.now)(),l=n.ttlMs??Yge,c=e.replace(/[^A-Za-z0-9_.-]/g,"_").slice(0,80),d=`${j5}${c}:${Qge(t)}`;Jge(o),r&&Zge(r,o);const m=eye(r,d)??Jo.get(d)??null;if(m&&m.expiresAt>o)return Jo.set(d,m),{attemptId:m.attemptId,storageKey:d};const p=(n.idFactory??Xge)(),y={attemptId:p,createdAt:o,expiresAt:o+l};if(Jo.set(d,y),r)try{r.setItem(d,JSON.stringify(y))}catch{}return{attemptId:p,storageKey:d}}function zR(e,t={}){const n=t.storage??T5();if(Jo.get(e.storageKey)?.attemptId===e.attemptId&&Jo.delete(e.storageKey),!!n)try{b1(n.getItem(e.storageKey))?.attemptId===e.attemptId&&n.removeItem(e.storageKey)}catch{}}const k5=new Set(["PAYMENT_ATTEMPT_DEFINITIVE_FAILURE","PAYMENT_ATTEMPT_INVALID_ID","PAYMENT_ATTEMPT_FINGERPRINT_MISMATCH"]);function R5(e){if(!e||typeof e!="object")return"";const t="data"in e?e.data:null;return String(t?.code??"")}function nye(e){return k5.has(R5(e))}function Mwe(e,t={}){const n=R5(e);return k5.has(n)&&!(t.preserveGuestReplayCapability&&n==="PAYMENT_ATTEMPT_FINGERPRINT_MISMATCH")}function rye(e){if(!e||typeof e!="object")return!0;const t=e;return!(t.requiresReview===!0||t.code==="PAYMENT_ATTEMPT_REQUIRES_REVIEW"||t.paymentStatus==="confirming"||t.payment?.status==="confirming")}const aye=h.lazy(()=>Ce(()=>import("./PickupLocationsMap-Dag52fpg.js"),__vite__mapDeps([0,1,2,3])).then(e=>({default:e.PickupLocationsMap})));function sye(e,t){return new Intl.DateTimeFormat("en-US",{timeZone:t,weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(new Date(e))}function Li({tier:e="summary",className:t,children:n,...r}){return s.jsx("div",{className:Y("bg-card border border-card-border rounded-lg p-4 mb-4",e==="raised"?"shadow-sm":"shadow-xs",t),...r,children:n})}function Bo(e){return Y("focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",e?"border-primary bg-primary/5 ring-1 ring-primary/40 shadow-xs":"border-card-border bg-card hover:border-primary/40")}function ic(e){return[e.addressLine1,e.city&&`${e.city}, ${e.state??""}`.trim(),e.zip].filter(t=>!!t&&t.trim()!=="").join(" · ")}const iye={cart_changed:"Your cart changed while you were paying.",item_unavailable:"An item in y
54our cart is no longer available.",price_changed:"A price changed while you were paying.",out_of_stock:"An item went out of stock while you were paying.",credit_insufficient:"Your VidaCredit was applied elsewhere while you were paying.",promo_changed:"Your promo code could no longer be applied.",compliance_gate:"This order can't be placed to the selected address.",shipping_quote_invalid:"The carrier rate expired or no longer matches this order.",shipping_quote_claimed:"That carrier rate was already used by another checkout attempt.",shipping_changed:"The cart, address, or carrier rate changed while you were paying.",pickup_unavailable:"Your pickup location, time, or ZIP eligibility changed while you were paying."};function VR(e,t){const n=(e.fullName??"").trim().split(/\s+/).filter(Boolean),r=n[0]??t.firstName??"",o=n.length>1?n.slice(1).join(" "):t.lastName??"";return{firstName:r,lastName:o,line1:e.line1,line2:e.line2??void 0,city:e.city,state:e.state,zip:e.zip,country:e.country}}function BR(e){return{firstName:e.firstName??"",lastName:e.lastName??"",line1:e.line1??"",line2:e.line2||void 0,city:e.city??"",state:e.state??"",zip:J3(e.zip??""),country:e.country??"US"}}function oye(e){const t=e&&typeof e=="object"&&"data"in e?e.data:null;switch(t?.code){case"SHIPPING_WEIGHT_UNVERIFIED":return"One or more items still need a verified shipping weight. Please contact support.";case"SHIPPING_CART_EMPTY":case"SHIPPING_CART_INELIGIBLE":case"SHIPPING_ITEMS_INELIGIBLE":return"Your cart changed. Review the items and try again.";case"SHIPPING_STOREFRONT_MISMATCH":case"SHIPPING_CART_STOREFRONT_REQUIRED":return"This cart needs to be refreshed from the storefront before rates can be quoted.";case"SHIPPING_ADDRESS_INVALID":case"SHIPPING_ADDRESS_REJECTED":case"SHIPPING_DESTINATION_UNSUPPORTED":return"The carrier could not quote that address. Check it and try again.";case"SHIPPING_RATES_UNAVAILABLE":case"SHIPPING_PROVIDER_UNAVAILABLE":case"SHIPPING_PROVIDER_ERROR":return"Live carrier rates are temporarily unavailable. Please try again in a moment.";default:return typeof t?.error=="string"?t.error:"We couldn't load shipping options. Please try again."}}function lye(e){return e.label||e.fullName||e.line1}const cye=new Set(["ach"]);let md=null;function uye(){return md||(md=fetch("/api/hub/oidc/config",{credentials:"include"}).then(async e=>e.ok?(await e.json())?.clients?.tools===!0:(md=null,!1)).catch(()=>(md=null,!1))),md}function P5(){const[e,t]=h.useState("shipping"),[n,r]=h.useState(null),[o]=h.useState(()=>bhe()),[l,c]=h.useState(o?.fulfillmentMethod==="pickup"?"pickup":"ship"),[d,m]=h.useState(o?.fulfillmentMethod==="pickup"?o.pickupLocationId:null),[p,y]=h.useState(o?.fulfillmentMethod==="pickup"?o.pickupSlotStart:null),[g,v]=h.useState(o?.fulfillmentMethod==="pickup"?o.pickupContactPhone:""),[b,S]=h.useState(o?.fulfillmentMethod==="pickup"?o.pickupZip:""),[C,N]=h.useState(null),[A,T]=h.useState(null),[E,j]=h.useState(null),[,_]=Hn(),{cart:R,updateItem:P,removeItem:M}=oo(),q=Gc(),U=R?.storefrontKey,V=typeof U=="string"&&U.trim()?U.trim().toLowerCase():q,$=V==="vidacare",{user:L,isAuthenticated:H,emailVerified:Q}=Bt(),I=cr.useSession(),{toast:O}=Nr(),F=xte(),B=Mr(),K=TY(),le=NY(),[Z,ie]=h.useState([]),[re,de]=h.useState(null),[he,pe]=h.useState(null),[oe,ge]=h.useState(null),[we,be]=h.useState(null),Me=h.useRef(null),ze=Hge(),Ee=h.useRef(null),[Ct,Ft]=h.useState(null),[pt,Gn]=h.useState(!1),[Ht,xe]=h.useState(!1),[He,et]=h.useState(!1),pn=CD(R?.items??[]),Gt=!pn||He,[Lr,Ar]=h.useState(!1),[jt,Tt]=h.useState(""),[Kt,dr]=h.useState(""),{data:fr}=M_(),[hn,Zt]=h.useState(null),[rr,gn]=h.useState(!1),[qr,Kn]=h.useState(null),[St,Se]=h.useState(null),Xe=h.useRef(null),[Ie,Fe]=h.useState(!1),ht=h.useRef(!1),Ot=h.useRef(!1),vt=h.useRef(null),[Te,Ye]=h.useState(!1),[st,gt]=h.useState(null),lt=h.useRef(0),Ke=h.useCallback(()=>{lt.current&&window.clearTimeout(lt.current),lt.current=0},[]),[ct,Yt]=h.useState(!1),[Ur,Nn]=h.useState(null),[Za,uo]=h.useState(!1),[zr,Ja]=h.useState(null),Ca=h.useRef(!1),{data:Na}=CW({query:{enabled:H,queryKey:U_()}}),An=h.useMemo(()=>Mhe(Na??[]),[Na]),Yn=An.length>0,{data:Wt}=iW({query:{enabled:H&&!$,queryKey:L_()}}),{data:W}=ZY({query:{enabled:H&&!$,queryKey:D_()}}),Ne=h.useMemo(()=>Wt??[],[Wt]),it=!$&&(W?.enabled??!1)&&Ne.length>0,Wn=W?.timezone??"America/Los_Angeles",dt=d==null?Ne[0]??null:Ne.find(z=>z.id===d)??null,{data:Ns}=hW({query:{enabled:H&&!$,queryKey:q_()}}),As=!$&&!!Ns?.available,Aa=Ns?.feeCents??0,En=vW(),Er=nW(),ft=l==="pickup",Qn=l==="delivery",tt=!ft&&!Qn;h.useEffect(()=>{$&&l!=="ship"&&c("ship")},[$,l]),h.useEffect(()=>{Ne.length!==0&&d==null&&m(Ne[0].id)},[d,Ne]),h.useEffect(()=>{const z=L?.phone;z&&v(ye=>ye||z)},[L]),h.useEffect(()=>{if(b)return;const z=wR(An,"shipping")??An[0];z?.zip&&S(z.zip)},[An,b]),h.useEffect(()=>{vhe({fulfillmentMethod:l,pickupLocationId:d,pickupSlotStart:p,pickupContactPhone:g,pickupZip:b})},[l,d,p,g,b]),h.useEffect(()=>{l!=="pickup"&&y(null),l!=="delivery"&&T(null)},[l]);const[Ea,vl]=h.useState("saved"),[ii,Xc]=h.useState(null);h.useEffect(()=>{if(ii===null&&Yn){const z=wR(An,"shipping")??An[0];Xc(z.id)}},[ii,Yn,An]);const oi=Yn&&Ea==="saved",Dn=oi?An.find(z=>z.id===ii)??null:null,Es=h.useMemo(()=>(fr??[]).filter(z=>!cye.has(z.key)).sort((z,ye)=>z.sortOrder-ye.sortOrder),[fr]),es=Es.length>0;h.useEffect(()=>{n===null&&Es.length>0&&r(Es[0].key)},[n,Es]),h.useEffect(()=>{Gn(!1),Ft(null)},[n]);const fo=n==="card_via_tools";h.useEffect(()=>{if(!fo||e!=="review")return;let z=!1;return gn(!0),Kn(null),fetch("/api/hub/saved-cards",{credentials:"include"}).then(async ye=>{if(z)return;if(!ye.ok)throw new Error("Could not load saved cards");const Ae=await ye.json();Zt(Ae.cards??[]);const Be=(Ae.cards??[]).find(_t=>_t.isDefault)??(Ae.cards??[])[0]??null;Be&&Se(Be.id)}).catch(ye=>{z||Kn(ye instanceof Error?ye.message:"Could not load saved cards")}).finally(()=>{z||gn(!1)}),()=>{z=!0}},[fo,e]);const Zc=h.useRef(!1);h.useEffect(()=>{!Zc.current&&R&&R.items.length>0&&(Zc.current=!0,aZ(R.subtotalCents))},[R]);const Ve=Yv({validators:{onChange:Ipe},defaultValues:{email:L?.email??"",firstName:L?.firstName??"",lastName:L?.lastName??"",line1:"",line2:"",city:"",state:"",zip:"",country:"US"}}),lg=Wv(Ve.store,z=>z.values),mr=async z=>(await Ve.validateField(z,"change"),Ve.getFieldMeta(z)?.errors.length===0),Jc=async()=>(await Ve.validate("change"),await Ve.validateAllFields("change"),Ve.state.isValid),eu=Dn?VR(Dn,{firstName:L?.firstName,lastName:L?.lastName}):BR(lg),bl=id(R),pr=tt?LR({storefrontKey:V,cartFingerprint:bl,address:eu}):null;Me.current=pr,h.useEffect(()=>{oe!==null&&(tt&&oe===pr||(ie([]),de(null),pe(null),ge(null),be(tt?"Your cart or shipping address changed. Get updated carrier rates.":null),tt&&t("shipping")))},[pr,tt,oe]),h.useEffect(()=>{if(!he)return;const z=Date.parse(he)-3e4,ye=()=>{ie([]),de(null),pe(null),ge(null),be("Carrier rates expired. Get updated shipping options to continue."),tt&&t("shipping")},Ae=z-Date.now();if(!Number.isFinite(Ae)||Ae<=0){ye();return}const Be=window.setTimeout(ye,Ae);return()=>window.clearTimeout(Be)},[tt,he]);const ja=Z.find(z=>z.quoteId===re)??null,ta=!tt||oe!==null&&oe===pr&&qR({options:Z,selectedQuoteId:re,expiresAt:he}),hr=_he(),mo=()=>{const z=Ve.state.values;hr.check({address1:z.line1??"",address2:z.line2??"",city:z.city??"",state:z.state??"",zip:z.zip??""})},li=()=>hr.clearOutcome(),[yf,tu]=h.useState(void 0),xf=h.useRef(!1);h.useEffect(()=>{if(xf.current)return;const z=L?.email||Ve.state.values.email;if(!z)return;xf.current=!0;const ye=new URLSearchParams;ye.set("email",z),fetch(`/api/promo/welcome?${ye.toString()}`).then(Ae=>Ae.json()).then(Ae=>{Ae.eligible&&Ae.code&&tu(Ae.code)}).catch(()=>{})},[L?.email,Ve]);const jn=Qre({promoCode:E?.code??null,userId:L?.id??null,cartFingerprint:bl,storefrontKey:V,fulfillmentMethod:l,shippingAddress:ft?null:eu,shippingQuoteId:tt&&ta?re:null,enabled:H&&(R?.items.length??0)>0&&(!tt||ta)}),We=jn.data,nu=We?.storefrontKey,ar=!tt||ta&&nu===V&&We?.shippingCents===ja?.customerChargeCents,ts=(We?.storeCreditAvailableCents??0)>0,[ci,vf]=h.useState(0),wl=h.useRef(!1);h.useEffect(()=>{if(We?.promoCreditConflict&&ts&&!wl.current){wl.current=!0;const z=E?.code??"the promo code";E?.code&&hD(E.code),Td(),j(null),vf(ye=>
54ye+1),O({title:"VidaCredit applied",description:`Your VidaCredit is a bigger discount than ${z}, so we applied it instead.`})}},[We?.promoCreditConflict,ts,E?.code,O]),h.useEffect(()=>{Ot.current||e==="review"&&(ft&&!(dt&&p)||Nhe({awaitingFundedPlacement:Ie,quoteTotalDueCents:We?.totalDueCents,attested:Gt,isPlacing:K.isPending,alreadyPlaced:ht.current})&&(Ot.current=!0,ht.current=!0,Ra(void 0,void 0,{forceStoreCredit:!0})))},[Ie,We?.totalDueCents,Gt,K.isPending,e,ft,dt,p]),h.useEffect(()=>{let z=null;try{z=sessionStorage.getItem("vp-hub-funding-pending")}catch{}if(!z)return;const ye=()=>{try{sessionStorage.removeItem("vp-hub-funding-pending")}catch{}};try{const Ae=JSON.parse(z);if(typeof Ae.ts=="number"&&Date.now()-Ae.ts<20*6e4&&typeof Ae.baseline=="number"){if(tt&&!ta){ye(),be("Get a current shipping option to finish this order. Any completed payment is safe in your VidaCredit balance."),t("shipping");return}Nn({baseline:Ae.baseline,fp:Ae.fp??null}),t("review")}else ye()}catch{ye()}},[]),h.useEffect(()=>{if(!Ur)return;const{baseline:z,fp:ye}=Ur;let Ae=!1,Be=0,_t=0;const on=async()=>{if(Ae)return;const ln=await jn.refetch();if(Ae)return;const Ts=id(R);if(Ts!==null&&ye&&ye!==Ts){mi(),Nn(null);return}if(Ts!==null&&ln.data&&(ln.data.storeCreditAvailableCents??0)>z){vt.current=z,Fe(!0),mi(),Nn(null);return}if(Be+=1,Be>=8){mi(),Nn(null);return}_t=window.setTimeout(on,4e3)};return on(),()=>{Ae=!0,_t&&window.clearTimeout(_t)}},[Ur,R]),h.useEffect(()=>{if(Ca.current)return;let z=Number.NaN;try{z=Number(new URLSearchParams(window.location.search).get("funded_intent")??"")}catch{return}if(!Number.isInteger(z)||z<=0)return;Ca.current=!0,t("review"),Ja({id:z,phase:"placing"});let ye=!1,Ae=0,Be=0;const _t=async()=>{if(!ye){Ae+=1;try{const on=await fetch(`/api/checkout/funded-intent/${z}`,{credentials:"include"}),ln=await on.json().catch(()=>null);if(ye)return;if(on.ok&&ln){if(ln.status==="placed"&&ln.orderId){localStorage.removeItem(Hi),Td(),mi(),yR(),B.invalidateQueries({queryKey:Cd()}),B.invalidateQueries({queryKey:jb()}),_(`/order-confirmation/${ln.orderId}`);return}if(ln.status==="failed"){Ja({id:z,phase:"failed",failureReason:ln.failureReason??null}),tt?(ie([]),de(null),pe(null),ge(null),be("That shipping rate can no longer be used. Choose a current option to finish with your VidaCredit balance."),t("shipping")):jn.refetch();return}if(ln.status==="expired"){Ja(null);return}}}catch{}if(Ae>=15){Ja(null),O({title:"Payment processing",description:"Your payment is being confirmed. Your order will complete automatically, usually within a few minutes."});return}Be=window.setTimeout(_t,3e3)}};return _t(),()=>{ye=!0,Be&&window.clearTimeout(Be)}},[]);const po=R?.items.some(z=>z.isPreorder===!0)??!1,ns=R?.subtotalCents??0,Vr=es?["shipping","payment","review"]:["shipping","review"],ru={shipping:"Delivery",payment:"Payment",review:"Review"},rs=Vr.indexOf(e),sn=Es.find(z=>z.key===n)??null,as=We?.promoDiscountCents!=null?Math.min(We.promoDiscountCents,ns):E?Math.min(E.discountCents,ns):0,ui=We?.promoLabel??E?.code??We?.promoCode??null,bf=We?.promoSource==="automatic",js=tt?ja?.customerChargeCents??0:0,di=whe({subtotalCents:ns,shippingCents:js,promoDiscountCents:as,quoteTotalDueCents:We?.totalDueCents}),Ta=sn?y1(di,sn.discountBps):0,Tn=!!sn&&sn.checkoutMode==="embedded_card"&&!!sn.clientConfig,na=Qn?A?.feeCents??Aa:0,ho=Math.max(0,(We?We.totalDueCents:ns+js-as)-Ta+na),go=!!We&&Ta===0&&!Qn&&ar,cg=as>0||Ta>0||(We?.storeCreditAppliedCents??0)>0,ka=Math.max(ho,1);if(h.useEffect(()=>{st&&(She(st,{amountCents:ka,isShip:tt,shippingSelectionUsable:ta,authoritativeShippingTotalReady:ar,shippingQuoteId:tt?re:null,shippingBinding:tt?pr:null})||(gt(null),Ke(),Ye(!1),Yt(!1)))},[ar,ka,pr,st,tt,re,ta,Ke]),!R||R.items.length===0)return s.jsxs("div",{className:"max-w-xl mx-auto px-4 py-12 text-center",children:[s.jsx("p",{className:"text-muted-foreground mb-4",children:"Your cart is empty."}),s.jsx(Le,{asChild:!0,children:s.jsx(Ue,{href:"/products",children:"Browse Products"})})]});const Sl=!!We&&ar&&v1(We?.totalDueCents),fi=!!We&&ar&&Che({quoteTotalDueCents:We?.totalDueCents,storeCreditAvailableCents:We?.storeCreditAvailableCents,storeCreditAppliedCents:We?.storeCreditAppliedCents,deliveryFeeCents:na}),ss=fi||Ie&&Sl,Cl=Te||ct,yo=()=>!tt||oe!==null&&oe===pr&&qR({options:Z,selectedQuoteId:re,expiresAt:he})?!0:(ie([]),de(null),pe(null),ge(null),be("Get a current carrier rate before continuing."),t("shipping"),O({title:"Cho
54ose a current shipping option",description:"Carrier rates update when the cart, address, or quote window changes.",variant:"destructive"}),!1),xo=()=>ar?!0:(O({title:jn.isError?"Couldn't confirm your order total":"One moment",description:jn.isError?"The carrier rate is selected, but the final total could not be confirmed. Try again.":"Confirming the carrier rate in your final order totalâ¦",variant:jn.isError?"destructive":"default"}),jn.refetch(),!1),ug=async()=>{if(ft){if(!await mr("email"))return;if(!dt){O({title:"Select a pickup location",variant:"destructive"});return}if(!p){O({title:"Choose a pickup time",variant:"destructive"});return}if(g.replace(/[^\d]/g,"").length<10){O({title:"Add a contact phone",description:"We need your best number to coordinate the pickup time.",variant:"destructive"});return}const Ae=b.trim();try{if(!(await Er.mutateAsync({data:{zip:Ae}})).eligible){N(Ae?"Local Pickup isn't available for that ZIP code. Check the ZIP, or choose shipping instead.":"Local Pickup is limited to select ZIP codes. Enter your ZIP code, or choose shipping instead."),O({title:"Pickup isn't available for that ZIP",variant:"destructive"});return}N(null)}catch{N(null)}t(es?"payment":"review");return}if(await mr("email")){if(oi){if(!Dn){O({title:"Select an address",variant:"destructive"});return}}else if(!await Jc())return;if(Qn){const ye=is(Ve.state.values);try{const Ae=await En.mutateAsync({data:{line1:ye.line1,line2:ye.line2,city:ye.city,state:ye.state,zip:ye.zip}});if(T(Ae),!Ae.eligible){O({title:"Outside our delivery area",description:"Choose shipping or pickup, or use an address closer to Visalia.",variant:"destructive"});return}}catch{O({title:"Couldn't verify delivery",description:"Please try again in a moment.",variant:"destructive"});return}}if(tt){if(ta){t(es?"payment":"review");return}const ye=is(Ve.state.values),Ae=LR({storefrontKey:V,cartFingerprint:id(R),address:ye});if(!Ae){be("Your cart is still loading. Please try again in a moment.");return}Me.current=Ae,ie([]),de(null),pe(null),ge(null),be(null);try{const Be=await le.mutateAsync({data:{storefrontKey:V,address:ye}});if(Me.current!==Ae)return;if(Be.storefrontKey!==V||Be.options.length===0){be("The returned rates no longer match this storefront. Try again.");return}ie(Be.options),de(zge(Be.options)),pe(Be.expiresAt),ge(Ae)}catch(Be){if(Me.current!==Ae)return;be(oye(Be))}return}t(es?"payment":"review")}},is=z=>Dn?VR(Dn,{firstName:L?.firstName,lastName:L?.lastName}):BR(z),Ra=(z,ye,Ae)=>{if(!yo()||!xo())return;const Be=Ae?.forceStoreCredit?null:n,_t=Ve.state.values,on=ft?null:is(_t),ln=ft&&dt&&p?{fulfillmentMethod:"pickup",pickup:{locationId:dt.id,slotStart:p,contactPhone:g,customerZip:b.trim()}}:Qn?{fulfillmentMethod:"delivery",shippingAddress:on??void 0}:{fulfillmentMethod:"ship",shippingAddress:on??void 0},Ts=on?`${on.firstName} ${on.lastName}`.trim():`${L?.firstName??""} ${L?.lastName??""}`.trim(),iu=String(I.data?.session?.activeOrganizationId??"personal"),ks=tye("checkout",{account:iu,storefrontKey:V,email:_t.email,fulfillment:ln,shippingQuoteId:tt?re:null,promoCode:E?.code??null,purchaseOrderNumber:jt.trim()||null,ruoAttested:pn?He:null,preorderAccepted:po?Lr:null,supplyAttested:ze.supplyAttested===!0,careLegitimatePurposeAttested:ze.legitimatePurposeAttested===!0,items:R.items.map(bt=>({variantId:bt.variantId,quantity:bt.quantity,isPreorder:bt.isPreorder===!0})).sort((bt,Br)=>bt.variantId-Br.variantId)});K.mutate({data:{clientAttemptId:ks.attemptId,...Ae?.confirmRepeatOfAttemptId?{confirmRepeatOfAttemptId:Ae.confirmRepeatOfAttemptId}:{},email:_t.email,...jt.trim()?{purchaseOrderNumber:jt.trim()}:{},storefrontKey:V,...tt&&re?{shippingQuoteId:re}:{},...ln,...es&&Be?{railKey:Be}:{},...Be==="card_via_tools"&&St?{hubCardId:St}:{},...z?{paymentToken:z}:{},...ye?{verificationToken:ye}:{},...E?{promoCode:E.code}:{},...pn?{ruoAttested:He}:{},...po?{preorderAccepted:Lr}:{},...ze.supplyAttested?{supplyAttested:!0,careLegitimatePurposeAttested:ze.legitimatePurposeAttested}:{}}},{onSuccess:async bt=>{if(rye(bt)&&zR(ks),localStorage.removeItem(Hi),Td(),mi(),yR(),B.invalidateQueries({queryKey:Cd()}),B.setQueryData(Up(bt.id),bt),B.invalidateQueries({queryKey:jb()}),bt.payment?.status==="confirming"){_(`/order-confirmation/${bt.id}`);return}const Br=bt.payment?.razorpay;if(Br?.orderId&&Br?.keyId){try{const Ln=await qhe({handle:Br,document:{id:bt.id,orderNumber:bt.orderNumber},prefill:{email:_t.email,name:Ts}});await fetch("/api/payments/razorpay/verify",{method:"POST",headers:{"content-type":"application/json"},credentials:"include",body:JSON.stringify(Ln)})}catch(Ln){Ln instanceof d5||O({title:"Payment not completed",description:"You can complete payment from your order page.",variant:"destructive"})}_(`/order-confirmation/${bt.id}`);return}if(bt.payment?.paymentUrl){E5(`/order-confirmation/${bt.id}`),window.location.assign(bt.payment.paymentUrl);return}_(`/order-confirmation/${bt.id}`)},onError:async bt=>{nye(bt)&&zR(ks),Ae?.forceStoreCredit&&(ht.current=!1);const Br=bt.data;if(Br?.code==="PAYMENT_ATTEMPT_POSSIBLE_DUPLICATE"&&Br.canConfirmRepeat===!0&&Number.isInteger(Br.priorAttemptId)&&await F({title:"Place this order again?",description:"A matching checkout already completed.",confirmLabel:"Place order again"})){Ra(z,ye,{...Ae,confirmRepeatOfAttemptId:Br.priorAttemptId});return}if(Tn&&bt.status===402){Ft(bt.data?.error??"Your card was declined. Please try another card.");return}if(n==="card_via_tools"&&bt.status===402){const vo=bt.data;if(vo?.requiresAuthentication&&vo.authenticationUrl){pg(vo.authenticationUrl);return}}const Ln=ghe(bt.data?.error,bt.data?.code);
54if(Ln.kind==="stock"){O({title:Ln.title,description:Ln.description,variant:"destructive",action:{label:"Back to cart",onClick:()=>_("/cart")}});return}if(Ln.kind==="cart-missing"){localStorage.removeItem(Hi),B.invalidateQueries({queryKey:Cd()}),O({title:Ln.title,description:Ln.description,variant:"destructive"}),_("/cart");return}if(Ln.kind==="email-verification"){O({title:Ln.title,description:Ln.description,variant:"destructive"}),_("/verify-email");return}O({title:Ln.title,description:bt.data?.error??Ln.description,variant:"destructive"})}})},mi=()=>{try{sessionStorage.removeItem("vp-hub-funding-pending")}catch{}},wf=z=>{const ye=vt.current;ye==null||!z||(z.storeCreditAvailableCents??0)>ye&&(Fe(!0),mi())},dg=async()=>{Ye(!0);try{const z=await jn.refetch();wf(z.data)}finally{Ye(!1)}},Sf=(z=0,ye=5e3,Ae=36)=>{if(Ke(),z>=Ae){Yt(!1);return}lt.current=window.setTimeout(async()=>{const Be=await jn.refetch();if(vt.current!=null&&(Be.data?.storeCreditAvailableCents??0)>vt.current){wf(Be.data),Yt(!1),Ye(!1);return}Sf(z+1,ye,Ae)},ye)},Cf=()=>{try{sessionStorage.setItem("vp-hub-funding-pending",JSON.stringify({baseline:We?.storeCreditAvailableCents??0,fp:id(R),ts:Date.now()}))}catch{}},fg=()=>{if(yo()&&xo()){if(!We){jn.isError?O({title:"Couldn't load your order total",description:"A security check is slowing things down. Wait a few seconds and tap Pay again. If it persists, refresh the page.",variant:"destructive"}):O({title:"One moment",description:"Loading your order totalâ¦"}),jn.refetch();return}vt.current=We.storeCreditAvailableCents??0,Cf(),Ye(!0),Sf(),gt({amountCents:ka,shippingQuoteId:tt?re:null,shippingBinding:tt?pr:null})}},Nf=()=>window.location.hostname==="localhost"||window.location.hostname.endsWith(".local")?`${window.location.protocol}//${window.location.host}`:A$,Af=async z=>{const ye=Nf();try{if(await uye())return`${ye}/api/hub/oidc/start?client=tools&next=${encodeURIComponent(z)}`;const Ae=await $p("/api/hub/handoff",{method:"POST",credentials:"include"}),Be=await Ae.json().catch(()=>null);if(!Ae.ok||!Be?.code||!Be?.state)throw new Error("handoff unavailable");return`${ye}/auth/handoff?code=${Be.code}&state=${Be.state}&next=${encodeURIComponent(z)}`}catch{return`${ye}${z}`}},au=(z,ye)=>{if(z.startsWith("/pay")&&!ye?.skipMarker)try{sessionStorage.setItem("vp-hub-funding-pending",JSON.stringify({baseline:We?.storeCreditAvailableCents??0,fp:id(R),ts:Date.now()}))}catch{}Af(z).then(Ae=>{window.location.assign(Ae)})},su=(z,ye,Ae,Be)=>{const _t=Math.round((window.screen.width-Ae)/2),on=Math.round((window.screen.height-Be)/4),ln=window.open("about:blank",ye,`width=${Ae},height=${Be},left=${_t},top=${on},resizable,scrollbars`);return ln?(Af(z).then(Ts=>{ln.location.href=Ts}),ln):null},mg=()=>{const z=su("/account/payment-methods","vida_add_card",480,720);if(!z){au("/account/payment-methods");return}const ye=window.setInterval(()=>{z.closed&&(window.clearInterval(ye),Zt(null),Se(null),gn(!0),fetch("/api/hub/saved-cards",{credentials:"include"}).then(async Ae=>{if(!Ae.ok)throw new Error("Could not refresh cards");const Be=await Ae.json();Zt(Be.cards??[]);const _t=(Be.cards??[]).find(on=>on.isDefault)??(Be.cards??[])[0]??null;_t&&Se(_t.id)}).catch(Ae=>{Kn(Ae instanceof Error?Ae.message:"Could not refresh cards")}).finally(()=>gn(!1)))},500)},Ef=async()=>{if(!yo()||!xo())return;if(!Gt){O({title:zx,description:Vte,variant:"destructive"});return}if(!We){jn.isError?O({title:"Couldn't load your order total",description:"A security check is slowing things down. Wait a few seconds and tap Pay again. If it persists, refresh the page.",variant:"destructive"}):O({title:"One moment",description:"Loading your order totalâ¦"}),jn.refetch();return}vt.current=We.storeCreditAvailableCents??0;const z=(ka/100).toFixed(2);uo(!0);try{const Ae=Ve.state.values,Be=await fetch("/api/checkout/funded-intent",{method:"POST",headers:{"content-type":"application/json"},credentials:"include",body:JSON.stringify({storefrontKey:V,...tt&&re?{shippingQuoteId:re}:{},email:Ae.email,fulfillmentMethod:ft?"pickup":Qn?"delivery":"ship",...ft?{pickup:{locationId:dt?.id,slotStart:p,contactPhone:g,customerZip:b.trim()}}:{shippingAddress:is(Ae)},...E?{promoCode:E.code}:{},...pn?{ruoAttested:He}:{},supplyAttested:ze.supplyAttested===!0,careLegitimatePurposeAttested:ze.legitimatePurposeAttested===!0})}),_t=await Be.json().catch(()=>null);
54if(Be.ok&&_t?.hubPayPath){au(_t.hubPayPath,{skipMarker:!0});return}if(Be.status>=400&&Be.status<500){O({title:"Can't start payment",description:_t?.error??"Review your checkout details and try again.",variant:"destructive"});return}}catch{}finally{uo(!1)}if(tt){O({title:"Couldn't prepare shipping checkout",description:"Your card was not charged. Please wait a moment and try again.",variant:"destructive"});return}const ye=`${window.location.origin}/checkout`;au(`/pay?mode=checkout¢s=${ka}&amount=${z}&return=${encodeURIComponent(ye)}`)},pg=z=>{const Be=Math.round((window.screen.width-480)/2),_t=Math.round((window.screen.height-720)/4),on=window.open(z,"vida_auth",`width=480,height=720,left=${Be},top=${_t},resizable,scrollbars`);if(!on){O({title:"Authentication required",description:"Your bank requires extra verification. Allow popups and try again.",variant:"destructive"});return}Xe.current=on;const ln=window.setInterval(()=>{on.closed&&(window.clearInterval(ln),Xe.current=null,Ra())},500)},jf=async()=>{if(yo()&&xo()){if(H&&!Q){O({title:"Verify your email to check out",description:"We sent a verification link when you signed up. Click it to confirm your address, then place your order.",variant:"destructive"}),_("/verify-email");return}if(!Gt){O({title:zx,description:Dj,variant:"destructive"});return}if(Tn){Ft(null),xe(!0);const z=await Ee.current?.tokenize();if(xe(!1),!z)return;Ra(z.paymentToken,z.verificationToken);return}if(n==="vidacode"){const z=Kt.trim();if(!z){O({title:"Enter a VidaCode",description:"Please type or paste your VidaCode to continue.",variant:"destructive"});return}Ra(z);return}if(n==="card_via_tools"){if(Cl){O({title:"Confirming your payment",description:"One moment while we apply your payment to this order."});return}if(ss){Ra(void 0,void 0,{forceStoreCredit:!0});return}if(Ie){O({title:"Balance remaining",description:"Use the âPayâ button above to cover the remaining balance on this order."});return}if(!hn||hn.length===0){O({title:"Add a card on VidaTools",description:"Save a card securely before placing your order.",variant:"destructive"});return}Ra();return}Ra()}},hg=z=>{if(yo()&&xo()){if(H&&!Q){O({title:"Verify your email to check out",description:"We sent a verification link when you signed up. Click it to confirm your address, then place your order.",variant:"destructive"}),_("/verify-email");return}if(!Gt){O({title:zx,description:Dj,variant:"destructive"});return}Ft(null),Ra(z.paymentToken,z.verificationToken)}};return s.jsxs("div",{className:"max-w-xl mx-auto px-4 py-6",children:[s.jsx("div",{className:"flex items-center justify-center gap-1 mb-8",children:Vr.map((z,ye)=>s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:`w-7 h-7 rounded-full flex items-center justify-center text-xs font-bold transition-all ${ye<rs?"bg-accent text-accent-foreground":ye===rs?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground"}`,children:ye<rs?s.jsx(Xi,{className:"w-4 h-4"}):ye+1}),s.jsx("span",{className:`text-xs hidden sm:block ${ye===rs?"font-medium text-foreground":"text-muted-foreground"}`,children:ru[z]}),ye<Vr.length-1&&s.jsx("div",{className:"w-6 h-px bg-border mx-1"})]},z))}),zr?.phase==="placing"&&s.jsxs("div",{className:"bg-card border border-card-border rounded-lg p-4 mb-6 flex items-center gap-3","data-testid":"funded-intent-placing",children:[s.jsx(er,{className:"size-5 animate-spin text-accent shrink-0","aria-hidden":"true"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium",children:"Payment received - placing your orderâ¦"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"This takes a few seconds. Don't pay again."})]})]}),zr?.phase==="failed"&&s.jsxs("div",{className:"bg-destructive/10 border border-destructive/30 rounded-lg p-4 mb-6","data-testid":"funded-intent-failed",children:[s.jsx("p",{className:"text-sm font-medium text-destructive",children:"We couldn't complete your order automatically."}),s.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[iye[zr.failureReason??""]??"Something changed while you were paying."," ",tt?"Your payment is safe on your VidaCredit balance. Cho
54ose a current shipping option below to finish without being charged again.":"Your payment is safe on your VidaCredit balance - tap Complete order below to finish (you won't be charged again)."]})]}),e==="shipping"&&s.jsxs("form",{className:"space-y-4",onSubmit:z=>{z.preventDefault(),ug()},children:[s.jsx("h2",{className:"font-display text-t2 text-ink mb-2",children:ft?"Pickup Details":Qn?"Delivery Information":"Shipping Information"}),s.jsx(Ve.Field,{name:"email",children:z=>s.jsxs("div",{className:"space-y-2",children:[s.jsx(xr,{htmlFor:z.name,children:"Email Address"}),s.jsx(yr,{id:z.name,name:z.name,"data-testid":"input-email",type:"email",placeholder:"[email protected]",value:z.state.value??"",onBlur:z.handleBlur,onChange:ye=>z.handleChange(ye.target.value)}),(z.state.meta.isTouched||Ve.state.submissionAttempts>0)&&z.state.meta.errors.length>0?s.jsx("p",{className:"text-destructive text-[0.8rem] font-medium",children:String(z.state.meta.errors[0]?.message??z.state.meta.errors[0])}):null]})}),(it||As)&&s.jsxs("fieldset",{className:"space-y-2",children:[s.jsx("legend",{className:"text-sm font-medium text-ink mb-1",children:"Delivery method"}),s.jsxs("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-3",children:[s.jsxs("button",{type:"button",onClick:()=>c("ship"),"aria-pressed":l==="ship","data-testid":"fulfillment-ship",className:Y("flex items-start gap-3 rounded-card border p-3 text-left transition-colors",Bo(l==="ship")),children:[s.jsx(Xv,{className:"size-5 shrink-0 text-primary","aria-hidden":"true"}),s.jsxs("span",{className:"min-w-0",children:[s.jsx("span",{className:"block text-sm font-semibold text-ink",children:"Ship to me"}),s.jsx("span",{className:"block text-xs text-muted-foreground",children:V==="vidapeps"?"USPS Ground Advantage included · faster options available":"Live carrier rates · paid at checkout"})]})]}),As&&s.jsxs("button",{type:"button",onClick:()=>c("delivery"),"aria-pressed":Qn,"data-testid":"fulfillment-delivery",className:Y("flex items-start gap-3 rounded-card border p-3 text-left transition-colors",Bo(Qn)),children:[s.jsx(CU,{className:"size-5 shrink-0 text-primary","aria-hidden":"true"}),s.jsxs("span",{className:"min-w-0",children:[s.jsx("span",{className:"block text-sm font-semibold text-ink",children:"Local Delivery"}),s.jsx("span",{className:"block text-xs text-muted-foreground",children:Aa>0?`${Et(Aa)} · Visalia area`:"Visalia area"})]})]}),it&&s.jsxs("button",{type:"button",onClick:()=>c("pickup"),"aria-pressed":ft,"data-testid":"fulfillment-pickup",className:Y("flex items-start gap-3 rounded-card border p-3 text-left transition-colors",Bo(ft)),children:[s.jsx(jp,{className:"size-5 shrink-0 text-primary","aria-hidden":"true"}),s.jsxs("span",{className:"min-w-0",children:[s.jsx("span",{className:"block text-sm font-semibold text-ink",children:"Local Pickup"}),s.jsx("span",{className:"block text-xs text-muted-foreground",children:"Free · choose a spot"})]})]})]})]}),ft&&dt&&s.jsxs("div",{className:"space-y-3","data-testid":"pickup-section",children:[Ne.length>1?s.jsxs("fieldset",{className:"space-y-2",children:[s.jsx("legend",{className:"text-sm font-medium text-ink mb-1",children:"Pickup location"}),Ne.map(z=>{const ye=z.id===dt.id;return s.jsxs("button",{type:"button",onClick:()=>{m(z.id),y(null)},"aria-pressed":ye,"data-testid":`pickup-location-${z.id}`,className:Y("flex w-full items-start gap-3 rounded-card border p-3 text-left transition-colors",Bo(ye)),children:[s.jsx(Yi,{className:"mt-0.5 size-4 shrink-0 text-primary","aria-hidden":"true"}),s.jsxs("span",{className:"min-w-0",children:[s.jsx("span",{className:"block text-sm font-semibold text-ink",children:z.name}),ic(z)&&s.jsx("span",{className:"block text-xs text-muted-foreground",children:ic(z)})]})]},z.id)})]}):s.jsxs("div",{className:"rounded-card border border-card-border bg-card p-3",children:[s.jsxs("p",{className:"flex items-center gap-1.5 text-sm font-semibold text-ink",children:[s.jsx(Yi,{className:"size-4 text-primary","aria-hidden":"true"}),dt.name]}),ic(dt)&&s.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:ic(dt)})]}),s.jsx(h.Suspense,{fallback:s.jsx("div",{className:"h-64 animate-pulse rounded-card bg-muted/40"}),children:s.jsx(aye,{locations:Ne,selectedId:dt.id,onSelect:z=>{m(z),y(null)}})}),dt.instructions&&s.jsx("p",{className:"text-xs text-muted-foreground",children:dt.instructions}),W&&W.instructions.length>0&&s.jsx("ul",{className:"space-y-1 rounded-card bg-muted/40 px-3 py-2 text-xs text-muted-foreground",children:W.instructions.map(z=>s.jsxs("li",{className:"flex items-start gap-1.5",children:[s.jsx("span",{"aria-hidden":"true",className:"text-primary",children:"â"}),s.jsx("span",{children:z})]},z))}),W&&s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-ink mb-2",children:"Choose a pickup time"}),s.jsx(Uge,{location:dt,settings:W,value:p,onChange:y})]}),s.jsxs("div",{children:[s.jsxs("label",{htmlFor:"pickup-contact-phone",className:"text-sm font-medium text-ink mb-2 block",children:["Best contact phone ",s.jsx("span",{className:"text-destructive",children:"*"})]}),s.jsx(yr,{id:"pickup-contact-phone",type:"tel",inputMode:"tel",autoComplete:"tel",placeholder:"(555) 123-4567",value:g,onChange:z=>v(z.target.value),"data-testid":"input-pickup-phone"}),s.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"We'll call or text this number to coordinate your pickup time."})]}),s.jsxs("div",{children:[s.jsxs("label",{htmlFor:"pickup-zip",className:"text-sm font-medium text-ink mb-2 block",children:["Your ZIP code ",s.jsx("span",{className:"text-destructive",children:"*"})]}),s.jsx(yr,{id:"pickup-zip",type:"text",inputMode:"numeric",autoComplete:"postal-code",placeholder:"93277",maxLength:10,value:b,onChange:z=>{S(z.target.value),N(null)},"data-testid":"input-pickup-zip"}),C?s.jsx("p",{className:"mt-1 text-xs text-destructive","data-testid":"pickup-zip-error",children:C}):s.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"We use this to confirm pickup is available in your area."})]})]}),Qn&&A&&s.jsx("div",{className:`rounded-card px-3 py-2 text-xs ring-1 ${A.eligible?"bg-vida-mint-soft/50 text-vida-green-800 ring-vida-green-700/20":"bg-
54amber-tint/40 text-amber ring-amber/20"}`,"data-testid":"delivery-eligibility",children:A.eligible?`In our delivery area: ${Et(A.feeCents)} delivery fee.`:"That address is outside our local delivery area. Choose shipping or pickup."}),!ft&&Yn&&s.jsxs("fieldset",{className:"space-y-2",children:[s.jsx("legend",{className:"text-sm font-medium text-ink mb-1",children:"Shipping Address"}),An.map(z=>{const ye=oi&&ii===z.id;return s.jsxs("button",{type:"button",onClick:()=>{vl("saved"),Xc(z.id)},"aria-pressed":ye,"data-testid":`saved-address-${z.id}`,className:Y("flex w-full items-start gap-3 rounded-card border p-3 text-left transition-colors",Bo(ye)),children:[s.jsx("span",{className:`mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full border ${ye?"border-primary":"border-ink-3"}`,"aria-hidden":"true",children:ye&&s.jsx("span",{className:"size-2 rounded-full bg-primary"})}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm font-semibold text-ink",children:lye(z)}),u5(z,"shipping")&&s.jsx("span",{className:"rounded-pill bg-muted px-2 py-0.5 text-[10px] font-medium text-muted-foreground",children:"Default"})]}),s.jsxs("span",{className:"mt-0.5 block text-xs text-muted-foreground",children:[z.line1,z.line2?`, ${z.line2}`:""," · ",z.city,", ",z.state," ",z.zip]})]})]},z.id)}),s.jsxs("button",{type:"button",onClick:()=>{vl("new"),Xc(null)},"aria-pressed":Ea==="new","data-testid":"address-enter-new",className:Y("flex w-full items-center gap-2 rounded-card border p-3 text-left text-sm font-medium transition-colors",Bo(Ea==="new"),Ea==="new"?"text-ink":"text-ink-2"),children:[s.jsx($0,{className:"size-4 shrink-0","aria-hidden":"true"}),"Enter a new address"]})]}),!ft&&!oi&&s.jsxs("div",{className:"space-y-4","data-testid":"manual-address-fields",children:[Yn&&s.jsxs("p",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[s.jsx(Yi,{className:"size-3.5 shrink-0","aria-hidden":"true"}),"Enter a new shipping address below."]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(Ve.Field,{name:"firstName",children:z=>s.jsxs("div",{className:"space-y-2",children:[s.jsx(xr,{htmlFor:z.name,children:"First Name"}),s.jsx(yr,{id:z.name,name:z.name,"data-testid":"input-firstname",value:z.state.value??"",onBlur:z.handleBlur,onChange:ye=>z.handleChange(ye.target.value)}),(z.state.meta.isTouched||Ve.state.submissionAttempts>0)&&z.state.meta.errors.length>0?s.jsx("p",{className:"text-destructive text-[0.8rem] font-medium",children:String(z.state.meta.errors[0]?.message??z.state.meta.errors[0])}):null]})}),s.jsx(Ve.Field,{name:"lastName",children:z=>s.jsxs("div",{className:"space-y-2",children:[s.jsx(xr,{htmlFor:z.name,children:"Last Name"}),s.jsx(yr,{id:z.name,name:z.name,"data-testid":"input-lastname",value:z.state.value??"",onBlur:z.handleBlur,onChange:ye=>z.handleChange(ye.target.value)}),(z.state.meta.isTouched||Ve.state.submissionAttempts>0)&&z.state.meta.errors.length>0?s.jsx("p",{className:"text-destructive text-[0.8rem] font-medium",children:String(z.state.meta.errors[0]?.message??z.state.meta.errors[0])}):null]})})]}),s.jsx(Ve.Field,{name:"line1",children:z=>s.jsxs("div",{className:"space-y-2",children:[s.jsx(xr,{htmlFor:"checkout-line1",children:"Street Address"}),s.jsx(Ehe,{id:"checkout-line1",testId:"input-address",placeholder:"123 Main St",value:z.state.value??"",onChange:ye=>{z.handleChange(ye),li()},onBlur:()=>{z.handleBlur(),mo()},onSelect:ye=>{Ve.setFieldValue("city",ye.city);const Ae=fR(ye.state);Ae&&Ve.setFieldValue("state",Ae),Ve.setFieldValue("zip",ye.zip5),mo()}}),(z.state.meta.isTouched||Ve.state.submissionAttempts>0)&&z.state.meta.errors.length>0?s.jsx("p",{className:"text-destructive text-[0.8rem] font-medium",children:String(z.state.meta.errors[0]?.message??z.state.meta.errors[0])}):null]})}),s.jsx(Ve.Field,{name:"line2",children:z=>s.jsxs("div",{className:"space-y-2",children:[s.jsx(xr,{htmlFor:z.name,children:"Apt / Suite (optional)"}),s.jsx(yr,{id:z.name,name:z.name,"data-testid":"input-address2",value:z.state.value??"",onBlur:z.handleBlur,onChange:ye=>{z.handleChange(ye.target.value),li()}}),(z.state.meta.isTouched||Ve.state.submissionAttempts>0)&&z.state.meta.errors.length>0?s.jsx("p",{className:"text-destructive text-[0.8rem] font-medium",children:String(z.state.meta.errors[0]?.message??z.state.meta.errors[0])}):null]})}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(Ve.Field,{name:"city",children:z=>s.jsxs("div",{className:"space-y-2",children:[s.jsx(xr,{htmlFor:z.name,children:"City"}),s.jsx(yr,{id:z.name,name:z.name,"data-testid":"input-city",autoComplete:"address-level2",value:z.state.value??"",onChange:ye=>{z.handleChange(ye.target.value),li()},onBlur:()=>{z.handleBlur(),mo()}}),(z.state.meta.isTouched||Ve.state.submissionAttempts>0)&&z.state.meta.errors.length>0?s.jsx("p",{className:"text-destructive text-[0.8rem] font-medium",children:String(z.state.meta.errors[0]?.message??z.state.meta.errors[0])}):null]})}),s.jsx(Ve.Field,{name:"state",children:z=>s.jsxs("div",{className:"space-y-2",children:[s.jsx(xr,{htmlFor:z.name,children:"State"}),s.jsx(Ohe,{"data-testid":"input-state",name:z.name,value:z.state.value??"",onChange:ye=>{z.handleChange(ye),li(),mo()},onBlur:z.handleBlur}),(z.state.meta.isTouched||Ve.state.submissionAttempts>0)&&z.state.meta.errors.length>0?s.jsx("p",{className:"text-destructive text-[0.8rem] font-medium",children:String(z.state.meta.errors[0]?.message??z.state.meta.errors[0])}):null]})})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(Ve.Field,{name:"zip",children:z=>s.jsxs("div",{className:"space-y-2",children:[s.jsx(xr,{htmlFor:z.name,children:"ZIP Co
54de"}),s.jsx(yr,{id:z.name,name:z.name,"data-testid":"input-zip",autoComplete:"postal-code",value:z.state.value??"",onChange:ye=>{z.handleChange(ye.target.value),li()},onBlur:()=>{z.handleBlur(),mo()}}),(z.state.meta.isTouched||Ve.state.submissionAttempts>0)&&z.state.meta.errors.length>0?s.jsx("p",{className:"text-destructive text-[0.8rem] font-medium",children:String(z.state.meta.errors[0]?.message??z.state.meta.errors[0])}):null]})}),s.jsx(Ve.Field,{name:"country",children:z=>s.jsxs("div",{className:"space-y-2",children:[s.jsx(xr,{htmlFor:z.name,children:"Country"}),s.jsx(yr,{id:z.name,"data-testid":"input-country",value:"United States",readOnly:!0,disabled:!0,name:z.name})]})})]})]}),tt&&(Z.length>0||we)&&s.jsx($ge,{options:Z,selectedQuoteId:re,onSelect:z=>{de(z),be(null)},disabled:le.isPending,error:we}),tt&&le.isPending&&s.jsxs("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",role:"status","data-testid":"shipping-rates-loading",children:[s.jsx(er,{className:"size-4 animate-spin","aria-hidden":"true"}),"Getting live carrier ratesâ¦"]}),s.jsx(Le,{type:"submit",block:!0,className:"mt-2","data-testid":"button-continue-shipping",disabled:le.isPending,children:le.isPending?"Getting Shipping Optionsâ¦":tt&&!ta?Z.length>0?"Refresh Shipping Options":"Get Shipping Options":es?"Continue to Payment":"Continue to Review"}),!ft&&!oi&&hr.outcome&&hr.entered&&s.jsx(Rhe,{className:"mt-3",outcome:hr.outcome,entered:hr.entered,onUseSuggested:z=>{Ve.setFieldValue("line1",z.address1),z.address2&&Ve.setFieldValue("line2",z.address2),Ve.setFieldValue("city",z.city);const ye=fR(z.state);ye&&Ve.setFieldValue("state",ye),Ve.setFieldValue("zip",l5(z)),hr.acceptSuggested(z)},onKeepMine:hr.keepMine})]}),e==="payment"&&es&&s.jsxs("div",{children:[s.jsx("h2",{className:"font-display text-t2 text-ink mb-1",children:"Payment Method"}),s.jsxs("p",{className:"text-sm text-muted-foreground mb-4",children:["Current amount ",Et(di),". Some payment methods include a discount."]}),s.jsx(dhe,{methods:Es,listPriceCents:di,value:n,onChange:r}),s.jsxs("div",{className:"flex gap-3 mt-5",children:[s.jsxs(Le,{type:"button",variant:"ghost",onClick:()=>t("shipping"),className:"flex-1","data-testid":"button-back-shipping",children:[s.jsx(Ep,{className:"size-4"})," Back"]}),s.jsx(Le,{type:"button",onClick:()=>t("review"),disabled:!n,className:"flex-1","data-testid":"button-continue-payment",children:"Continue to Review"})]})]}),e==="review"&&s.jsxs("div",{children:[s.jsx("h2",{className:"font-display text-t2 text-ink mb-4",children:"Review Order"}),s.jsxs(Li,{children:[s.jsx("h3",{className:"font-semibold text-sm mb-3",children:"Items"}),R.items.map(z=>{const ye=uf(z);return s.jsxs("div",{className:"flex items-center justify-between gap-3 text-sm py-2 border-b border-border last:border-0","data-testid":`review-item-${z.id}`,children:[s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"truncate",children:z.productName}),ye?s.jsx("p",{className:"text-xs text-muted-foreground",children:ye}):null]}),s.jsx(Ac,{size:"sm",value:z.quantity,min:0,max:z.stockQuantity??void 0,valueTestId:`review-qty-${z.id}`,decreaseTestId:`review-decrease-${z.id}`,increaseTestId:`review-increase-${z.id}`,onChange:async Ae=>{try{Ae<=0?(await M(z.id),O({title:"Removed from order"})):await P(z.id,Ae)}catch{O({title:"Couldn't update quantity",variant:"destructive"})}}}),s.jsxs("span",{className:"w-18 shrink-0 text-right font-medium tabular-nums",children:["$",(z.priceCents*z.quantity/100).toFixed(2)]})]},z.id)}),s.jsx(gD,{className:"mt-3 border-t border-border pt-3",subtotalCents:R.subtotalCents,email:Ve.state.values.email||void 0,onAppliedChange:j,autoApplyCode:ts?void 0:yf},ci),s.jsxs("div",{className:"mt-3 pt-2 space-y-1.5 text-sm",children:[s.jsxs("div",{className:"flex justify-between font-bold",children:[s.jsx("span",{children:"Subtotal"}),s.jsx("span",{children:Et(R.subtotalCents)})]}),as>0&&s.jsxs("div",{className:"flex justify-between font-medium text-primary","data-testid":"row-promo-discount",children:[s.jsx("span",{children:bf?ui??"Offer applied":s.jsxs(s.Fragment,{children:["Promo"," ",ui&&s.jsxs("span",{className:"font-mono",children:["(",ui,")"]})]})}),s.jsxs("span",{children:["â",Et(as)]})]}),We&&We.storeCreditAppliedCents>0&&s.jsxs("div",{className:"flex justify-between font-medium text-primary","data-testid":"row-store-credit",children:[s.jsx("span",{children:"VidaCredit applied"}),s.jsxs("span",{children:["â",Et(We.storeCreditAppliedCents)]})]}),sn&&Ta>0&&s.jsxs("div",{className:"flex justify-between font-medium text-primary","data-testid":"row-rail-discount",children:[s.jsxs("span",{children:[sn.displayName," discount"]}),s.jsxs("span",{children:["â",Et(Ta)]})]}),s.jsxs("div",{className:"flex justify-between","data-testid":"row-shipping",children:[s.jsx("span",{className:"min-w-0 pr-3",children:ft?"Local pickup":Qn?"Local delivery":ja?P0(ja):"Shipping"}),Qn&&na>0?s.jsx("span",{className:"font-medium",children:Et(na)}):tt&&js>0?s.jsx("span",{className:"font-medium",children:Et(js)}):s.jsx("span",{className:"font-medium text-primary",children:"Free"})]}),s.jsxs("div",{className:"flex justify-between font-bold pt-1 border-t border-border",children:[s.jsx("span",{children:go?"Total due":cg?"Estimated total":"Total"}),s.jsx("span",{"data-testid":"text-total-due",children:Et(ho)})]}),We?.promoCreditConflict&&E?s.jsx("div",{className:"mt-1.5 flex items-start gap-2 rounded-lg bg-amber-tint/40 px-3 py-2 text-xs text-amber ring-1 ring-amber/20","data-testid":"banner-promo-credit-conflict",children:s.jsxs("span",{children:[s.jsx("strong",{className:"font-semibold",children:E?.code})," can't be combined with your ",Et(We.storeCreditAvailableCents)," VidaCredit. Remove the code above to use your credit; it applies automatically."]})}):We&&We.storeCreditAvailableCents>0?s.jsxs("p",{className:"text-xs text-muted-foreground","data-testid":"text-store-credit-note",children:["You have"," ",s.jsx("strong",{className:"font-semibold text-foreground",children:Et(We.storeCreditAvailableCents)}
54)," ","VidaCredit · ",We.pointsBalance.toLocaleString()," Vida Points",We.storeCreditAppliedCents>0?", applied above.":"."]}):as>0||Ta>0?s.jsx("p",{className:"text-xs text-muted-foreground",children:"The exact amount due is confirmed on the payment page."}):null]})]}),sn&&s.jsxs(Li,{children:[s.jsxs("div",{className:"flex items-center justify-between mb-1",children:[s.jsx("h3",{className:"font-semibold text-sm",children:"Payment Method"}),s.jsx("button",{type:"button",onClick:()=>t("payment"),className:"text-xs text-primary hover:underline","data-testid":"button-edit-payment",children:"Edit"})]}),s.jsxs("p",{className:"text-sm text-muted-foreground","data-testid":"text-selected-rail",children:[sn.displayName,Ta>0&&` · discount â${Et(Ta)}`]})]}),s.jsxs(Li,{children:[s.jsxs("label",{htmlFor:"checkout-purchase-order-number",className:"block text-sm font-semibold",children:["Purchase order number"," ",s.jsx("span",{className:"font-normal text-muted-foreground",children:"(optional)"})]}),s.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"Add your AP reference here. Some company accounts require one before checkout."}),s.jsx(yr,{id:"checkout-purchase-order-number","data-testid":"input-purchase-order-number",className:"mt-3",value:jt,maxLength:100,autoComplete:"off",onChange:z=>Tt(z.target.value),placeholder:"PO-12345"})]}),n==="card_via_tools"&&!ss&&s.jsxs(Li,{tier:"raised",children:[s.jsx("h3",{className:"font-semibold text-sm mb-1",children:"Pay securely"}),s.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:"Pay with any method on VidaPay. You hop over in this tab, no new window, and land right back here to finish your order."}),s.jsxs(Le,{type:"button",onClick:Ef,block:!0,disabled:Za||!Gt||!ar,children:[s.jsx(_c,{className:"size-4 mr-2","aria-hidden":"true"})," ",Za?"Preparing secure checkoutâ¦":ar?`Pay ${Et(ka)}`:"Confirming Order Totalâ¦"]}),s.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-1.5 text-[11px] text-muted-foreground",children:[s.jsx("span",{className:"rounded bg-muted px-1.5 py-0.5",children:"Credit / Debit"}),s.jsx("span",{className:"rounded bg-muted px-1.5 py-0.5",children:"Apple Pay"}),s.jsx("span",{className:"rounded bg-muted px-1.5 py-0.5",children:"Google Pay"}),s.jsx("span",{className:"rounded bg-muted px-1.5 py-0.5",children:"Klarna"}),s.jsx("span",{className:"rounded bg-muted px-1.5 py-0.5",children:"Afterpay"}),s.jsx("span",{className:"rounded bg-muted px-1.5 py-0.5",children:"Affirm"})]}),s.jsx("button",{type:"button",onClick:fg,className:"mt-2 w-full text-left text-xs font-medium text-primary underline-offset-2 hover:underline","data-testid":"button-open-vidapay-embedded",children:"Prefer to stay on this page? Pay by card here."}),Ie?null:rr?s.jsxs("div",{className:"mt-3 flex items-center gap-2 border-t border-card-border pt-3 text-sm text-muted-foreground",children:[s.jsx(er,{className:"size-4 animate-spin"}),"Checking saved paymentsâ¦"]}):qr?null:hn&&hn.length>0?s.jsxs("div",{className:"mt-3 border-t border-card-border pt-3",children:[s.jsx("p",{className:"mb-2 text-xs font-medium text-muted-foreground",children:"Or use a saved payment (one tap, no popup)"}),s.jsx("div",{className:"space-y-2",children:hn.map(z=>{const ye=St===z.id;return s.jsxs("button",{type:"button",onClick:()=>Se(z.id),className:Y("flex w-full items-center gap-3 rounded-card border p-3 text-left transition-colors",Bo(ye)),children:[s.jsx(F0,{className:"size-5 shrink-0 text-primary","aria-hidden":"true"}),s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsxs("span",{className:"block text-sm font-medium text-ink",children:[z.brand?z.brand[0].toUpperCase()+z.brand.slice(1):"Card"," ","â¢â¢â¢â¢ ",z.last4??"****",z.isDefault?s.jsx("span",{className:"ml-2 rounded-pill bg-muted px-2 py-0.5 text-[10px] font-medium text-muted-foreground",children:"Default"}):null]}),s.jsxs("span",{className:"block text-xs text-muted-foreground",children:["Expires ",z.expMonth??"--","/",z.expYear??"----"]})]})]},z.id)})}),s.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:"Selected saved payment is charged when you place the order below."})]}
54):null,s.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:"Payments are processed securely by VidaPay and applied to this order automatically."}),s.jsx("button",{type:"button",onClick:mg,className:"mt-1 text-xs font-medium text-primary underline-offset-2 hover:underline",children:"Save a payment method for faster checkout"})]}),n==="vidacode"&&s.jsxs(Li,{tier:"raised",children:[s.jsx("h3",{className:"font-semibold text-sm mb-2",children:"Redeem a VidaCode"}),s.jsx(yr,{placeholder:"Enter your VidaCode",value:Kt,onChange:z=>dr(z.target.value.toUpperCase()),className:"uppercase","data-testid":"input-vidacode"}),s.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Enter your VidaCode. It must cover the full order total. Smaller balances can be redeemed to VidaCredit from your account page first."})]}),tt&&ta&&!ar&&s.jsxs(Li,{tier:"raised","data-testid":"shipping-total-status",children:[s.jsxs("p",{className:"flex items-center gap-2 text-sm font-medium text-ink",children:[jn.isFetching&&s.jsx(er,{className:"size-4 animate-spin text-primary","aria-hidden":"true"}),jn.isError?"We couldn't confirm the carrier rate in your total.":"Confirming your carrier rate and final totalâ¦"]}),jn.isError&&s.jsx("button",{type:"button",className:"mt-2 text-xs font-medium text-primary hover:underline",onClick:()=>{jn.refetch()},children:"Try again"})]}),Tn&&sn?.clientConfig&&ar&&s.jsxs(Li,{tier:"raised",children:[s.jsx("h3",{className:"font-semibold text-sm mb-3",children:"Payment"}),s.jsx(Dge,{ref:Ee,config:sn.clientConfig,amountCents:ka,contact:(()=>{if(ft)return{firstName:L?.firstName??"",lastName:L?.lastName??"",email:Ve.state.values.email,line1:dt?.addressLine1??void 0,city:dt?.city??void 0,state:dt?.state??void 0,zip:dt?.zip??void 0};const z=is(Ve.state.values);return{firstName:z.firstName,lastName:z.lastName,email:Ve.state.values.email,line1:z.line1,line2:z.line2,city:z.city,state:z.state,zip:z.zip}})(),onError:Ft,onReady:Gn,onWalletToken:hg}),Ct&&s.jsx("p",{className:"text-destructive text-xs mt-2","data-testid":"text-card-error",children:Ct}),s.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Your card is entered securely on this page; we never see or store your card number."})]}),s.jsxs(Li,{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("h3",{className:"font-semibold text-sm",children:ft?"Pickup":Qn?"Local Delivery":"Shipping Address"}),s.jsx("button",{type:"button",onClick:()=>t("shipping"),className:"text-xs text-primary hover:underline","data-testid":"button-edit-shipping",children:"Edit"})]}),ft&&dt&&p?s.jsxs("div",{className:"text-sm text-muted-foreground","data-testid":"review-pickup",children:[s.jsxs("p",{className:"flex items-center gap-1.5 font-medium text-ink",children:[s.jsx(jp,{className:"size-4 text-primary","aria-hidden":"true"}),sye(p,Wn)]}),s.jsx("p",{className:"mt-0.5",children:dt.name}),ic(dt)&&s.jsx("p",{children:ic(dt)})]}):(()=>{const z=is(Ve.state.values);return s.jsxs("address",{className:"text-sm not-italic text-muted-foreground",children:[z.firstName," ",z.lastName,s.jsx("br",{}),z.line1,z.line2?`, ${z.line2}`:"",s.jsx("br",{}),z.city,", ",z.state," ",z.zip,s.jsx("br",{}),z.country]})})(),s.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:Ve.state.values.email}),tt&&ja&&s.jsxs("p",{className:"mt-2 text-xs font-medium text-ink","data-testid":"review-shipping-service",children:[P0(ja)," ·"," ",ja.customerChargeCents===0?"Free":Et(ja.customerChargeCents)]})]}),n==="card_via_tools"&&(Ie||fi)&&s.jsxs("div",{className:"mb-4 flex items-start gap-2 rounded-2xl bg-success-soft px-3 py-3 text-xs text-success ring-1 ring-success/20","data-testid":"notice-funded",children:[s.jsx(Xi,{className:"mt-0.5 size-4 shrink-0","aria-hidden":"true"}),s.jsxs("span",{children:[Ie?"Payment received and added to your VidaCredit.":"Your VidaCredit covers this order. Nothing more to pay."," ",Ie&&!Sl?"Confirming the amount applied to this orderâ¦":Gt?K.isPending?"Completing your orderâ¦":Ie?"Completing your order now.":"Tap Complete order below to finish.":Bte]})]}),po&&s.jsxs("div",{className:"mb-5 rounded-2xl bg-amber-tint p-4 ring-1 ring-amber/30","data-testid":"preorder-agreement",children:[s.jsx("h3",{className:"mb-1 text-sm font-semibold text-amber",children:"This order includes a pre-order"}),s.jsxs("p",{className:"mb-3 text-xs text-amber/90",children:["Please read before paying. Version ",_re,"."]}),s.jsx("dl",{className:"mb-3 space-y-2",children:Ire.map(z=>s.jsxs("div",{children:[s.jsx("dt",{className:"text-xs font-semibold text-amber",children:z.heading}),s.jsx("dd",{className:"text-xs leading-relaxed text-amber/90",children:z.body})]},z.id))}),s.jsxs("label",{className:"flex cursor-pointer items-start gap-3 rounded-xl bg-amber/10 p-3",children:[s.jsx("input",{type:"checkbox",required:!0,checked:Lr,onChange:z=>Ar(z.target.checked),className:"mt-0.5 size-4 shrink-0 rounded border-amber/40 text-amber focus:ring-amber","data-testid":"checkbox-preorder-accept"}),s.jsx("span",{className:"text-xs font-medium leading-relaxed text-amber",children:Mre})]})]}),pn&&nM&&s.jsxs("label",{className:"bg-amber-tint ring-1 ring-amber/20 rounded-2xl p-3 mb-5 flex items-start gap-3 cursor-pointer",children:[s.jsx("input",{type:"checkbox",required:!0,checked:He,onChange:z=>et(z.target.checked),className:"mt-0.5 size-4 shrink-0 rounded border-amber/40 text-amber focus:ring-amber","data-testid":"checkbox-attestation"}),s.jsx("span",{className:"text-amber text-xs leading-relaxed",children:$te})]}),s.jsxs("div",{className:"flex gap-3",children:[s.jsxs(Le,{type:"button",variant:"ghost",onClick:()=>t(es?"payment":"shipping"),className:"flex-1","data-testid":"button-back",children:[s.jsx(Ep,{className:"size-4"})," Back"]}),s.jsx(Le,{type:"button",onClick:jf,disabled:!Gt||po&&!Lr||K.isPending||Ht||Tn&&!pt||zr?.phase==="placing"||tt&&!ar||n==="card_via_tools"&&Cl||n==="card_via_tools"&&!ss&&Ie||n==="card_via_tools"&&!ss&&!Ie&&(rr||!hn||hn.length===0),className:"flex-1","data-testid":"button-place-order",children:K.isPending||Ht?"Processingâ¦":tt&&!ar?"Confirming Totalâ¦":n==="card_via_tools"&&Cl?"Confirming paymentâ¦":ss?"Complete order":sn?.kind==="vidapay"?"Continue to VidaPay":"Place Order"})]})]}),st&&s.jsx(Lge,{amountCents:st.amountCents,toolsOrigin:Nf(),attested:Gt,placing:K.isPending,onSettled:()=>{dg()},onFallback:()=>{gt(null),Ef()},onClose:()=>{gt(null),Ye(!1)}})]})}const Dwe=Object.freeze(Object.defineProperty({__proto__:null,default:P5},Symbol.toStringTag,{value:"Module"}));function dye(){return s.jsx("div",{className:"bg-amber-tint ring-1 ring-amber/20 rounded-2xl p-4 mb-8 text-left","data-testid":"block-research-reminder",children:s.jsxs("div",{className:"flex gap-3",children:[s.jsx(tl,{className:"w-5 h-5 text-amber flex-shrink-0 mt-0.5","aria-hidden":"true"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-amber text-sm font-semibold",children:"Research Use Reminder"}),s.jsx("p",{className:"text-amber text-xs mt-1 leading-relaxed",children:"These compounds are for legitimate in-vitro research use only. Not for human consumption, clinical, or therapeutic applications. Handle according to your institution's safety protocols."})]})]})})}function fye({orderId:e}){const t=p1(),[n,r]=h.useState(null),o=h.useRef(!1);return h.useEffect(()=>{if(!t||o.current||!Number.isInteger(e)||e<=0)return;o.current=!0;let l=!1;return(async()=>{try{const c=await fetch("/api/games/offer?entryMode=post_order",{credentials:"include"});if(!c.ok)return;const d=await c.json();!l&&d?.game&&r(d.game)}catch{}})(),()=>{l=!0}},[t,e]),n?s.jsxs("div",{className:"mb-6 flex items-center gap-4 roun
54ded-2xl border border-[#f0c868]/45 bg-[#0f2a1f] p-4 text-left","data-testid":"post-order-spin",children:[s.jsx("img",{src:Y0[G2(n.object??"acorn")],alt:"",width:48,height:48,className:"h-12 w-12 shrink-0 rounded-lg"}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"text-sm leading-snug text-[#e8f2ec]",children:n.greeting}),n.teaser?s.jsx("p",{className:"mt-0.5 text-xs font-bold tracking-tight text-[#f0c868]",children:n.teaser}):null]}),s.jsx(Ue,{href:`/play/${n.slug}?order=${e}`,className:"min-h-10 shrink-0 rounded-full bg-[#f0c868] px-4 py-2.5 text-sm font-bold text-[#123024]","data-testid":"link-post-order-spin",children:n.title})]}):null}const O5="vp-mkt-optin-dismissed",_5="Get the research drops first",I5="New compounds, restocks and Vida Points offers. A couple of emails a month, unsubscribe anytime.",mye=`${_5} ${I5}`;function pye(){try{return localStorage.getItem(O5)==="1"}catch{return!1}}function hye({channel:e="value_prompt",compact:t=!1,className:n}){const{isAuthenticated:r}=Bt(),o=Mr(),[l,c]=h.useState(pye),[d,m]=h.useState(!1),p=Oe({queryKey:Fb.consent,queryFn:()=>Mn("/users/me/consent"),enabled:r&&!l,staleTime:300*1e3}),y=!!p.data?.state?.some(b=>b.consentType==="email_marketing"&&b.granted),g=_e({mutationFn:()=>Mn("/users/me/consent",{method:"POST",body:JSON.stringify({consentType:"email_marketing",action:"granted",channel:e,disclosureSnapshot:mye})}),onSuccess:()=>{m(!0),o.invalidateQueries({queryKey:Fb.consent})}}),v=()=>{try{localStorage.setItem(O5,"1")}catch{}c(!0)};return!r||l||!d&&(p.isLoading||p.isError||y)?null:d?s.jsxs(Ut,{tone:"solid",className:Y("flex items-center gap-3",t?"p-4":"p-5 sm:p-6",n),"data-testid":"card-marketing-optin-success",children:[s.jsx("span",{className:"flex size-9 shrink-0 items-center justify-center rounded-xl bg-vida-mint-soft text-vida-green-700 dark:bg-vida-green-800 dark:text-vida-mint",children:s.jsx(mn,{className:"size-4.5","aria-hidden":"true"})}),s.jsx("p",{className:"text-sm font-semibold text-ink","aria-live":"polite",children:"You're in. Watch your inbox for the next drop."})]}):s.jsx(Ut,{tone:"solid",className:Y(t?"p-4":void 0,n),"data-testid":"card-marketing-optin",children:s.jsxs("div",{className:Y("flex items-start gap-3",!t&&"sm:gap-4"),children:[s.jsx("span",{className:"flex size-10 shrink-0 items-center justify-center rounded-xl bg-vida-green-700/10 text-vida-green-700",children:s.jsx(q0,{className:t?"size-4.5":"size-5","aria-hidden":"true"})}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:Y("font-semibold text-ink",t?"text-sm":"text-body"),children:_5}),s.jsx("p",{className:"mt-1 text-caption text-ink-2",children:I5}),s.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-2",children:[s.jsx(Le,{size:t?"sm":"default",onClick:()=>g.mutate(),disabled:g.isPending,"data-testid":"button-marketing-optin",children:g.isPending?"Signing you upâ¦":"Count me in"}),s.jsx(Le,{variant:"ghost",size:t?"sm":"default",onClick:v,disabled:g.isPending,"data-testid":"button-marketing-optin-dismiss",children:"No thanks"})]}),g.isError&&s.jsx("p",{className:"mt-2 text-caption text-danger","aria-live":"polite",children:"Something went wrong. Please try again."})]})]})})}function gye(e){return e.provider==="vidacode"||e.provider==="stripe_tools"?!1:e.checkoutMode==="manual"||e.checkoutMode==="redirect"}function yye({orderId:e,currentRailKey:t,baseAmountCents:n,onSwitched:r,className:o}){const{toast:l}=Nr(),[c,d]=h.useState(!1),[m,p]=h.useState(null),[y,g]=h.useState(!1),{data:v}=M_({query:{queryKey:I_(),enabled:c}}),S=h.useMemo(()=>(v??[]).filter(gye).sort((N,A)=>N.sortOrder-A.sortOrder),[v]).filter(N=>N.key!==t),C=async()=>{if(!(!m||y)){g(!0);try{const N=await fetch(`/api/orders/${e}/payment/rail`,{method:"POST",credentials:"include",headers:{"content-type":"application/json"},body:JSON.stringify({railKey:m})}),A=await N.json().catch(()=>({}));if(!N.ok){l({title:"Could not switch payment method",description:A.error??"Please try again.",variant:"destructive"});return}l({title:"Payment method updated",description:"Your new payment instructions are below."}),d(!1),p(null),r()}finally{g(!1)}}};return s.jsx("div",{className:o,children:c?s.jsxs("div",{className:"space-y-3 rounded-2xl border border-card-border bg-card p-4 text-left",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("p",{className:"text-sm font-semibold text-ink",children:"Change payment method"}),s.jsxs("button",{type:"button",onClick:()=>d(!1),className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-ink",children:["Close ",s.jsx(dl,{className:"size-4 rotate-180","aria-hidden":"true"})]})]}),v?S.length===0?s.jsx("p",{className:"text-sm text-muted-foreground",children:"No other payment methods are available right now."}):s.jsx("div",{role:"radiogroup","aria-label":"New payment method",className:"space-y-2",children:S.map(N=>{const A=y1(n,N.discountBps),T=m===N.key;return s.jsx(i5,{role:"radio","aria-checked":T,selected:T,onClick:()=>p(N.key),"data-testid":`option-switch-rail-${N.key}`,className:"p-3",label:s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-ink",children:N.displayName}),A>0&&s.jsxs("span",{className:"ml-2 text-xs font-medium text-primary",children:["save ",Et(A)]})]}),trailing:s.jsx("span",{className:"shrink-0 text-sm font-bold tabular-nums",children:Et(n-A)})},N.key)})}):s.jsxs("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(er,{className:"size-4 animate-spin","aria-hidden":"true"})," Loading payment methodsâ¦"]}),S.length>0&&s.jsx(Cr,{type:"button",className:"w-full",disabled:!m||y,onClick:C,"data-testid":"button-confirm-switch-rail",children:y?s.jsxs(s.Fragment,{children:[s.jsx(er,{className:"mr-1.5 size-4 animate-spin","aria-hidden":"true"})," Switchingâ¦"]}):"Switch payment method"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Your order and items stay exactly as they are. Only the way you pay changes, and the amount due follows the new method's discount."})]}):s.jsxs("button",{type:"button",onClick:()=>d(!0),className:"inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:text-primary/80","data-testid":"button-change-payment-method",children:[s.jsx(NU,{className:"size-4","aria-hidden":"true"}),"Want to pay a different way? Change payment method"]})})}function xye(e){const t=Math.floor(e/6e4),n=Math.floor(t/60),r=t%60;if(n>=48){const l=Math.floor(n/24);return`${l} day${l!==1?"s":""} ${n%24}h`}if(n>0)return`${n}h ${r}m`;
54const o=Math.floor(e%6e4/1e3);return`${r}m ${o.toString().padStart(2,"0")}s`}function M5({expiresAt:e,className:t}){const n=e?new Date(e).getTime():null,[r,o]=h.useState(()=>Date.now());if(h.useEffect(()=>{if(n===null)return;const d=setInterval(()=>o(Date.now()),1e3);return()=>clearInterval(d)},[n]),n===null||Number.isNaN(n))return null;const l=n-r,c=l<=0;return s.jsxs("p",{className:Y("inline-flex items-center gap-1.5 text-xs font-medium",c?"text-danger":"text-amber",t),"data-testid":"text-expiry-countdown",children:[s.jsx(Qd,{className:"w-3.5 h-3.5"}),c?"Payment window expired":`Payment window expires in ${xye(l)}`]})}function D5({amountCents:e,paidAmountCents:t}){return s.jsx("div",{className:"bg-amber-tint ring-1 ring-amber/20 rounded-2xl p-4 text-left","data-testid":"block-partial-payment-warning",children:s.jsxs("div",{className:"flex gap-3",children:[s.jsx(el,{className:"w-5 h-5 text-amber flex-shrink-0 mt-0.5","aria-hidden":"true"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-amber text-sm font-semibold",children:"Partial payment received"}),s.jsxs("p",{className:"text-amber text-xs mt-1 leading-relaxed",children:["We received"," ",t!=null?s.jsx("span",{className:"font-medium",children:Et(t)}):"a payment"," ","toward the ",Et(e)," due, which is less than the full amount. Your order is on hold. Please contact support with your order number to resolve. Do not send additional funds until we confirm next steps."]})]})]})})}const vye=[{key:"awaiting",label:"Awaiting payment"},{key:"confirming",label:"Confirming on network"},{key:"paid",label:"Payment received"}];function bye(e){switch(e){case"confirming":return 1;case"paid":return 2;default:return 0}}function wye({status:e,amountCents:t,discountCents:n,paidAmountCents:r,paymentUrl:o,expiresAt:l}){const c=e==="failed"||e==="expired"||e==="cancelled",d=e==="partially_paid",m=bye(e),p=e==="created"||e==="pending";return s.jsxs("div",{className:"text-left space-y-4","data-testid":"block-crypto-timeline",children:[s.jsxs("div",{className:"bg-card border border-card-border rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-baseline justify-between gap-3 mb-4",children:[s.jsx("h2",{className:"font-semibold text-sm",children:"Crypto Payment"}),s.jsxs("p",{className:"font-bold text-sm","data-testid":"text-crypto-amount-due",children:[Et(t)," due"]})]}),n>0&&s.jsxs("p",{className:"text-xs font-medium text-primary -mt-3 mb-4",children:["Crypto discount â",Et(n)," applied"]}),c?s.jsxs("div",{className:"flex gap-3","data-testid":"block-crypto-failed",children:[s.jsx(B2,{className:"w-5 h-5 text-danger flex-shrink-0 mt-0.5","aria-hidden":"true"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-semibold text-danger",children:e==="expired"?"Payment window expired":"Payment unsuccessful"}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1 leading-relaxed",children:"This order was not paid and will not be processed. You can place a new order at any time, or contact support if you believe funds were sent."})]})]}):s.jsx("ol",{className:"space-y-3",children:vye.map((y,g)=>{const v=e==="paid"?!0:g<m,b=e!=="paid"&&g===m;return s.jsxs("li",{className:"flex items-center gap-2.5",children:[v?s.jsx(Xi,{className:"w-4 h-4 text-primary flex-shrink-0"}):b?s.jsx(er,{className:"w-4 h-4 text-primary animate-spin flex-shrink-0"}):s.jsx(dh,{className:"w-4 h-4 text-muted-foreground/40 flex-shrink-0"}),s.jsx("span",{className:Y("text-sm",v?"text-foreground":b?"font-medium text-foreground":"text-muted-foreground"),children:y.label})]},y.key)})}),p&&s.jsxs("div",{className:"mt-4 space-y-3",children:[s.jsx(M5,{expiresAt:l}),o&&s.jsx(Cr,{asChild:!0,className:"w-full","data-testid":"link-complete-crypto-payment",children:s.jsxs("a",{href:o,rel:"noopener noreferrer",children:["Complete Payment ",s.jsx(ao,{className:"w-4 h-4 ml-1.5"})]})}),s.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"This page updates automatically once your payment is detected. Network confirmation can take a few minutes after you send funds."})]})]}),d&&s.jsx(D5,{amountCents:t,paidAmountCents:r})]})}function Sye({status:e,amountCents:t,discountCents:n,paymentUrl:r,expiresAt:o}){const l=t,c=o?new Date(o):null,d=c?c.getTime()<Date.now():!1;return s.jsxs("div",{className:"bg-card border border-card-border rounded-lg p-4 text-left",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(Qd,{className:"w-4 h-4 text-amber"}),s.jsx("h3",{className:"font-semibold text-sm",children:"Buy crypto with card"})]}),s.jsxs("p",{className:"text-sm text-muted-foreground mb-3",children:["Complete your $",Et(l)," purchase on MoonPay. MoonPay will convert your card payment to cryptocurrency and send it to our wallet. This usually takes 2â10 minutes."]}),n>0&&s.jsxs("p",{className:"text-xs font-medium text-primary mb-3",children:["MoonPay discount â",Et(n)]}),r&&!d?s.jsx(Cr,{asChild:!0,className:"w-full",children:s.jsxs("a",{href:r,target:"_blank",rel:"noopener noreferrer","data-testid":"button-moonpay-pay",children:[s.jsx(ao,{className:"w-4 h-4 mr-1"}),"Buy crypto with card on MoonPay"]})}):s.jsx("p",{className:"text-sm text-destructive",children:d?"This payment window has expired. Please place a new order.":"Payment link unavailable. Contact support if you already completed the MoonPay purchase."}),s.jsxs("p",{className:"text-xs text-muted-foreground mt-3",children:["Status: ",s.jsx("span",{className:"font-medium capitalize",children:e.replace(/_/g," ")})]})]})}var oc={},Cv,FR;function Cye(){return FR||(FR=1,Cv=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Cv}var Nv={},qi={},$R;function yl(){if($R)return qi;$R=1;let e;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return qi.getSymbolSize=function(r){if(!r)throw new Error('"version" cannot be null or undefined');if(r<1||r>40)throw new Error('"version" should be in range from 1 to 40');return r*4+17},qi.getSymbolTotalCodewords=function(r){return t[r]},qi.getBCHDigit=function(n){let r=0;for(;n!==0;)r++,n>>>=1;return r},qi.setToSJISFunction=function(r){if(typeof r!="function")throw new Error('"toSJISFunc" is not a valid function.');e=r},qi.isKanjiModeEnabled=function(){return typeof e<"u"},qi.toSJIS=function(r){return e(r)},qi}var Av={},HR;function w1(){return HR||(HR=1,(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};
vendor: 23,097 bytes, lines 54-60
54function t(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}e.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},e.from=function(r,o){if(e.isValid(r))return r;try{return t(r)}catch{return o}}})(Av)),Av}var Ev,GR;function Nye(){if(GR)return Ev;GR=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(t){const n=Math.floor(t/8);return(this.buffer[n]>>>7-t%8&1)===1},put:function(t,n){for(let r=0;r<n;r++)this.putBit((t>>>n-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},Ev=e,Ev}var jv,KR;function Aye(){if(KR)return jv;KR=1;function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return e.prototype.set=function(t,n,r,o){const l=t*this.size+n;this.data[l]=r,o&&(this.reservedBit[l]=!0)},e.prototype.get=function(t,n){return this.data[t*this.size+n]},e.prototype.xor=function(t,n,r){this.data[t*this.size+n]^=r},e.prototype.isReserved=function(t,n){return this.reservedBit[t*this.size+n]},jv=e,jv}var Tv={},YR;function Eye(){return YR||(YR=1,(function(e){const t=yl().getSymbolSize;e.getRowColCoords=function(r){if(r===1)return[];const o=Math.floor(r/7)+2,l=t(r),c=l===145?26:Math.ceil((l-13)/(2*o-2))*2,d=[l-7];for(let m=1;m<o-1;m++)d[m]=d[m-1]-c;return d.push(6),d.reverse()},e.getPositions=function(r){const o=[],l=e.getRowColCoords(r),c=l.length;for(let d=0;d<c;d++)for(let m=0;m<c;m++)d===0&&m===0||d===0&&m===c-1||d===c-1&&m===0||o.push([l[d],l[m]]);return o}})(Tv)),Tv}var kv={},WR;function jye(){if(WR)return kv;WR=1;const e=yl().getSymbolSize,t=7;return kv.getPositions=function(r){const o=e(r);return[[0,0],[o-t,0],[0,o-t]]},kv}var Rv={},QR;function Tye(){return QR||(QR=1,(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(o){return o!=null&&o!==""&&!isNaN(o)&&o>=0&&o<=7},e.from=function(o){return e.isValid(o)?parseInt(o,10):void 0},e.getPenaltyN1=function(o){const l=o.size;let c=0,d=0,m=0,p=null,y=null;for(let g=0;g<l;g++){d=m=0,p=y=null;for(let v=0;v<l;v++){let b=o.get(g,v);b===p?d++:(d>=5&&(c+=t.N1+(d-5)),p=b,d=1),b=o.get(v,g),b===y?m++:(m>=5&&(c+=t.N1+(m-5)),y=b,m=1)}d>=5&&(c+=t.N1+(d-5)),m>=5&&(c+=t.N1+(m-5))}return c},e.getPenaltyN2=function(o){const l=o.size;let c=0;for(let d=0;d<l-1;d++)for(let m=0;m<l-1;m++){const p=o.get(d,m)+o.get(d,m+1)+o.get(d+1,m)+o.get(d+1,m+1);(p===4||p===0)&&c++}return c*t.N2},e.getPenaltyN3=function(o){const l=o.size;let c=0,d=0,m=0;for(let p=0;p<l;p++){d=m=0;for(let y=0;y<l;y++)d=d<<1&2047|o.get(p,y),y>=10&&(d===1488||d===93)&&c++,m=m<<1&2047|o.get(y,p),y>=10&&(m===1488||m===93)&&c++}return c*t.N3},e.getPenaltyN4=function(o){let l=0;const c=o.data.length;for(let m=0;m<c;m++)l+=o.data[m];return Math.abs(Math.ceil(l*100/c/5)-10)*t.N4};function n(r,o,l){switch(r){case e.Patterns.PATTERN000:return(o+l)%2===0;case e.Patterns.PATTERN001:return o%2===0;case e.Patterns.PATTERN010:return l%3===0;case e.Patterns.PATTERN011:return(o+l)%3===0;case e.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(l/3))%2===0;case e.Patterns.PATTERN101:return o*l%2+o*l%3===0;case e.Patterns.PATTERN110:return(o*l%2+o*l%3)%2===0;case e.Patterns.PATTERN111:return(o*l%3+(o+l)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}e.applyMask=function(o,l){const c=l.size;for(let d=0;d<c;d++)for(let m=0;m<c;m++)l.isReserved(m,d)||l.xor(m,d,n(o,m,d))},e.getBestMask=function(o,l){const c=Object.keys(e.Patterns).length;let d=0,m=1/0;for(let p=0;p<c;p++){l(p),e.applyMask(p,o);const y=e.getPenaltyN1(o)+e.getPenaltyN2(o)+e.getPenaltyN3(o)+e.getPenaltyN4(o);e.applyMask(p,o),y<m&&(m=y,d=p)}return d}})(Rv)),Rv}var ap={},XR;function L5(){if(XR)return ap;XR=1;const e=w1(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return ap.getBlocksCount=function(o,l){switch(l){case e.L:return t[(o-1)*4+0];case e.M:return t[(o-1)*4+1];case e.Q:return t[(o-1)*4+2];case e.H:return t[(o-1)*4+3];default:return}},ap.getTotalCodewordsCount=function(o,l){switch(l){case e.L:return n[(o-1)*4+0];case e.M:return n[(o-1)*4+1];case e.Q:return n[(o-1)*4+2];case e.H:return n[(o-1)*4+3];default:return}},ap}var Pv={},pd={},ZR;function kye(){if(ZR)return pd;ZR=1;const e=new Uint8Array(512),t=new Uint8Array(256);return(function(){let r=1;for(let o=0;o<255;o++)e[o]=r,t[r]=o,r<<=1,r&256&&(r^=285);for(let o=255;o<512;o++)e[o]=e[o-255]})(),pd.log=function(r){if(r<1)throw new Error("log("+r+")");return t[r]},pd.exp=function(r){return e[r]},pd.mul=function(r,o){return r===0||o===0?0:e[t[r]+t[o]]},pd}var JR;function Rye(){return JR||(JR=1,(function(e){const t=kye();e.mul=function(r,o){const l=new Uint8Array(r.length+o.length-1);for(let c=0;c<r.length;c++)for(let d=0;d<o.length;d++)l[c+d]^=t.mul(r[c],o[d]);return l},e.mod=function(r,o){let l=new Uint8Array(r);for(;l.length-o.length>=0;){const c=l[0];for(let m=0;m<o.length;m++)l[m]^=t.mul(o[m],c);let d=0;for(;d<l.length&&l[d]===0;)d++;l=l.slice(d)}return l},e.generateECPolynomial=function(r){let o=new Uint8Array([1]);for(let l=0;l<r;l++)o=e.mul(o,new Uint8Array([1,t.exp(l)]));return o}})(Pv)),Pv}var Ov,e2;function Pye(){if(e2)return Ov;e2=1;const e=Rye();function t(n){this.genPoly=void 0,this.degree=n,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(r){this.degree=r,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(r){if(!this.genPoly)throw new Error("Encoder not initialized");const o=new Uint8Array(r.length+this.degree);o.set(r);const l=e.mod(o,this.genPoly),c=this.degree-l.length;if(c>0){const d=new Uint8Array(this.degree);return d.set(l,c),d}return l},Ov=t,Ov}var _v={},Iv={},Mv={},t2;function q5(){return t2||(t2=1,Mv.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),Mv}var ms={},n2;function U5(){if(n2)return ms;n2=1;const e="[0-9]+",t="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const r="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+`)(?:.|[\r 55]))+`;ms.KANJI=new RegExp(n,"g"),ms.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),ms.BYTE=new RegExp(r,"g"),ms.NUMERIC=new RegExp(e,"g"),ms.ALPHANUMERIC=new RegExp(t,"g");const o=new RegExp("^"+n+"$"),l=new RegExp("^"+e+"$"),c=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return ms.testKanji=function(m){return o.test(m)},ms.testNumeric=function(m){return l.test(m)},ms.testAlphanumeric=function(m){return c.test(m)},ms}var r2;function xl(){return r2||(r2=1,(function(e){const t=q5(),n=U5();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(l,c){if(!l.ccBits)throw new Error("Invalid mode: "+l);if(!t.isValid(c))throw new Error("Invalid version: "+c);return c>=1&&c<10?l.ccBits[0]:c<27?l.ccBits[1]:l.ccBits[2]},e.getBestModeForData=function(l){return n.testNumeric(l)?e.NUMERIC:n.testAlphanumeric(l)?e.ALPHANUMERIC:n.testKanji(l)?e.KANJI:e.BYTE},e.toString=function(l){if(l&&l.id)return l.id;throw new Error("Invalid mode")},e.isValid=function(l){return l&&l.bit&&l.ccBits};function r(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+o)}}e.from=function(l,c){if(e.isValid(l))return l;try{return r(l)}catch{return c}}})(Iv)),Iv}var a2;function Oye(){return a2||(a2=1,(function(e){const t=yl(),n=L5(),r=w1(),o=xl(),l=q5(),c=7973,d=t.getBCHDigit(c);function m(v,b,S){for(let C=1;C<=40;C++)if(b<=e.getCapacity(C,S,v))return C}function p(v,b){return o.getCharCountIndicator(v,b)+4}function y(v,b){let S=0;return v.forEach(function(C){const N=p(C.mode,b);S+=N+C.getBitsLength()}),S}function g(v,b){for(let S=1;S<=40;S++)if(y(v,S)<=e.getCapacity(S,b,o.MIXED))return S}e.from=function(b,S){return l.isValid(b)?parseInt(b,10):S},e.getCapacity=function(b,S,C){if(!l.isValid(b))throw new Error("Invalid QR Code version");typeof C>"u"&&(C=o.BYTE);const N=t.getSymbolTotalCodewords(b),A=n.getTotalCodewordsCount(b,S),T=(N-A)*8;if(C===o.MIXED)return T;const E=T-p(C,b);switch(C){case o.NUMERIC:return Math.floor(E/10*3);case o.ALPHANUMERIC:return Math.floor(E/11*2);case o.KANJI:return Math.floor(E/13);case o.BYTE:default:return Math.floor(E/8)}},e.getBestVersionForData=function(b,S){let C;const N=r.from(S,r.M);if(Array.isArray(b)){if(b.length>1)return g(b,N);if(b.length===0)return 1;C=b[0]}else C=b;return m(C.mode,C.getLength(),N)},e.getEncodedBits=function(b){if(!l.isValid(b)||b<7)throw new Error("Invalid QR Code version");let S=b<<12;for(;t.getBCHDigit(S)-d>=0;)S^=c<<t.getBCHDigit(S)-d;return b<<12|S}})(_v)),_v}var Dv={},s2;function _ye(){if(s2)return Dv;s2=1;const e=yl(),t=1335,n=21522,r=e.getBCHDigit(t);return Dv.getEncodedBits=function(l,c){const d=l.bit<<3|c;let m=d<<10;for(;e.getBCHDigit(m)-r>=0;)m^=t<<e.getBCHDigit(m)-r;return(d<<10|m)^n},Dv}var Lv={},qv,i2;function Iye(){if(i2)return qv;i2=1;const e=xl();function t(n){this.mode=e.NUMERIC,this.data=n.toString()}return t.getBitsLength=function(r){return 10*Math.floor(r/3)+(r%3?r%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(r){let o,l,c;for(o=0;o+3<=this.data.length;o+=3)l=this.data.substr(o,3),c=parseInt(l,10),r.put(c,10);const d=this.data.length-o;d>0&&(l=this.data.substr(o),c=parseInt(l,10),r.put(c,d*3+1))},qv=t,qv}var Uv,o2;function Mye(){if(o2)return Uv;o2=1;const e=xl(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(r){this.mode=e.ALPHANUMERIC,this.data=r}return n.getBitsLength=function(o){return 11*Math.floor(o/2)+6*(o%2)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(o){let l;for(l=0;l+2<=this.data.length;l+=2){let c=t.indexOf(this.data[l])*45;c+=t.indexOf(this.data[l+1]),o.put(c,11)}this.data.length%2&&o.put(t.indexOf(this.data[l]),6)},Uv=n,Uv}var zv,l2;function Dye(){if(l2)return zv;l2=1;const e=xl();function t(n){this.mode=e.BYTE,typeof n=="string"?this.data=new TextEncoder().encode(n):this.data=new Uint8Array(n)}return t.getBitsLength=function(r){return r*8},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(n){for(let r=0,o=this.data.length;r<o;r++)n.put(this.data[r],8)},zv=t,zv}var Vv,c2;function Lye(){if(c2)return Vv;c2=1;const e=xl(),t=yl();function n(r){this.mode=e.KANJI,this.data=r}return n.getBitsLength=function(o){return o*13},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(r){let o;for(o=0;o<this.data.length;o++){let l=t.toSJIS(this.data[o]);if(l>=33088&&l<=40956)l-=33088;else if(l>=57408&&l<=60351)l-=49472;else throw new Error("Invalid SJIS character: "+this.data[o]+` 56Make sure your charset is UTF-8`);l=(l>>>8&255)*192+(l&255),r.put(l,13)}},Vv=n,Vv}var Bv={exports:{}},u2;function qye(){return u2||(u2=1,(function(e){var t={single_source_shortest_paths:function(n,r,o){var l={},c={};c[r]=0;var d=t.PriorityQueue.make();d.push(r,0);for(var m,p,y,g,v,b,S,C,N;!d.empty();){m=d.pop(),p=m.value,g=m.cost,v=n[p]||{};for(y in v)v.hasOwnProperty(y)&&(b=v[y],S=g+b,C=c[y],N=typeof c[y]>"u",(N||C>S)&&(c[y]=S,d.push(y,S),l[y]=p))}if(typeof o<"u"&&typeof c[o]>"u"){var A=["Could not find a path from ",r," to ",o,"."].join("");throw new Error(A)}return l},extract_shortest_path_from_predecessor_list:function(n,r){for(var o=[],l=r;l;)o.push(l),n[l],l=n[l];return o.reverse(),o},find_path:function(n,r,o){var l=t.single_source_shortest_paths(n,r,o);return t.extract_shortest_path_from_predecessor_list(l,o)},PriorityQueue:{make:function(n){var r=t.PriorityQueue,o={},l;n=n||{};for(l in r)r.hasOwnProperty(l)&&(o[l]=r[l]);return o.queue=[],o.sorter=n.sorter||r.default_sorter,o},default_sorter:function(n,r){return n.cost-r.cost},push:function(n,r){var o={value:n,cost:r};this.queue.push(o),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(Bv)),Bv.exports}var d2;function Uye(){return d2||(d2=1,(function(e){const t=xl(),n=Iye(),r=Mye(),o=Dye(),l=Lye(),c=U5(),d=yl(),m=qye();function p(A){return unescape(encodeURIComponent(A)).length}function y(A,T,E){const j=[];let _;for(;(_=A.exec(E))!==null;)j.push({data:_[0],index:_.index,mode:T,length:_[0].length});return j}function g(A){const T=y(c.NUMERIC,t.NUMERIC,A),E=y(c.ALPHANUMERIC,t.ALPHANUMERIC,A);let j,_;return d.isKanjiModeEnabled()?(j=y(c.BYTE,t.BYTE,A),_=y(c.KANJI,t.KANJI,A)):(j=y(c.BYTE_KANJI,t.BYTE,A),_=[]),T.concat(E,j,_).sort(function(P,M){return P.index-M.index}).map(function(P){return{data:P.data,mode:P.mode,length:P.length}})}function v(A,T){switch(T){case t.NUMERIC:return n.getBitsLength(A);case t.ALPHANUMERIC:return r.getBitsLength(A);case t.KANJI:return l.getBitsLength(A);case t.BYTE:return o.getBitsLength(A)}}function b(A){return A.reduce(function(T,E){const j=T.length-1>=0?T[T.length-1]:null;return j&&j.mode===E.mode?(T[T.length-1].data+=E.data,T):(T.push(E),T)},[])}function S(A){const T=[];for(let E=0;E<A.length;E++){const j=A[E];switch(j.mode){case t.NUMERIC:T.push([j,{data:j.data,mode:t.ALPHANUMERIC,length:j.length},{data:j.data,mode:t.BYTE,length:j.length}]);break;case t.ALPHANUMERIC:T.push([j,{data:j.data,mode:t.BYTE,length:j.length}]);break;case t.KANJI:T.push([j,{data:j.data,mode:t.BYTE,length:p(j.data)}]);break;case t.BYTE:T.push([{data:j.data,mode:t.BYTE,length:p(j.data)}])}}return T}function C(A,T){const E={},j={start:{}};let _=["start"];for(let R=0;R<A.length;R++){const P=A[R],M=[];for(let q=0;q<P.length;q++){const U=P[q],V=""+R+q;M.push(V),E[V]={node:U,lastCount:0},j[V]={};for(let $=0;$<_.length;$++){const L=_[$];E[L]&&E[L].node.mode===U.mode?(j[L][V]=v(E[L].lastCount+U.length,U.mode)-v(E[L].lastCount,U.mode),E[L].lastCount+=U.length):(E[L]&&(E[L].lastCount=U.length),j[L][V]=v(U.length,U.mode)+4+t.getCharCountIndicator(U.mode,T))}}_=M}for(let R=0;R<_.length;R++)j[_[R]].end=0;return{map:j,table:E}}function N(A,T){let E;const j=t.getBestModeForData(A);if(E=t.from(T,j),E!==t.BYTE&&E.bit<j.bit)throw new Error('"'+A+'" cannot be encoded with mode '+t.toString(E)+`. 57 Suggested mode is: `+t.toString(j));switch(E===t.KANJI&&!d.isKanjiModeEnabled()&&(E=t.BYTE),E){case t.NUMERIC:return new n(A);case t.ALPHANUMERIC:return new r(A);case t.KANJI:return new l(A);case t.BYTE:return new o(A)}}e.fromArray=function(T){return T.reduce(function(E,j){return typeof j=="string"?E.push(N(j,null)):j.data&&E.push(N(j.data,j.mode)),E},[])},e.fromString=function(T,E){const j=g(T,d.isKanjiModeEnabled()),_=S(j),R=C(_,E),P=m.find_path(R.map,"start","end"),M=[];for(let q=1;q<P.length-1;q++)M.push(R.table[P[q]].node);return e.fromArray(b(M))},e.rawSplit=function(T){return e.fromArray(g(T,d.isKanjiModeEnabled()))}})(Lv)),Lv}var f2;function zye(){if(f2)return Nv;f2=1;const e=yl(),t=w1(),n=Nye(),r=Aye(),o=Eye(),l=jye(),c=Tye(),d=L5(),m=Pye(),p=Oye(),y=_ye(),g=xl(),v=Uye();function b(R,P){const M=R.size,q=l.getPositions(P);for(let U=0;U<q.length;U++){const V=q[U][0],$=q[U][1];for(let L=-1;L<=7;L++)if(!(V+L<=-1||M<=V+L))for(let H=-1;H<=7;H++)$+H<=-1||M<=$+H||(L>=0&&L<=6&&(H===0||H===6)||H>=0&&H<=6&&(L===0||L===6)||L>=2&&L<=4&&H>=2&&H<=4?R.set(V+L,$+H,!0,!0):R.set(V+L,$+H,!1,!0))}}function S(R){const P=R.size;for(let M=8;M<P-8;M++){const q=M%2===0;R.set(M,6,q,!0),R.set(6,M,q,!0)}}function C(R,P){const M=o.getPositions(P);for(let q=0;q<M.length;q++){const U=M[q][0],V=M[q][1];for(let $=-2;$<=2;$++)for(let L=-2;L<=2;L++)$===-2||$===2||L===-2||L===2||$===0&&L===0?R.set(U+$,V+L,!0,!0):R.set(U+$,V+L,!1,!0)}}function N(R,P){const M=R.size,q=p.getEncodedBits(P);let U,V,$;for(let L=0;L<18;L++)U=Math.floor(L/3),V=L%3+M-8-3,$=(q>>L&1)===1,R.set(U,V,$,!0),R.set(V,U,$,!0)}function A(R,P,M){const q=R.size,U=y.getEncodedBits(P,M);let V,$;for(V=0;V<15;V++)$=(U>>V&1)===1,V<6?R.set(V,8,$,!0):V<8?R.set(V+1,8,$,!0):R.set(q-15+V,8,$,!0),V<8?R.set(8,q-V-1,$,!0):V<9?R.set(8,15-V-1+1,$,!0):R.set(8,15-V-1,$,!0);R.set(q-8,8,1,!0)}function T(R,P){const M=R.size;let q=-1,U=M-1,V=7,$=0;for(let L=M-1;L>0;L-=2)for(L===6&&L--;;){for(let H=0;H<2;H++)if(!R.isReserved(U,L-H)){let Q=!1;$<P.length&&(Q=(P[$]>>>V&1)===1),R.set(U,L-H,Q),V--,V===-1&&($++,V=7)}if(U+=q,U<0||M<=U){U-=q,q=-q;break}}}function E(R,P,M){const q=new n;M.forEach(function(H){q.put(H.mode.bit,4),q.put(H.getLength(),g.getCharCountIndicator(H.mode,R)),H.write(q)});const U=e.getSymbolTotalCodewords(R),V=d.getTotalCodewordsCount(R,P),$=(U-V)*8;for(q.getLengthInBits()+4<=$&&q.put(0,4);q.getLengthInBits()%8!==0;)q.putBit(0);const L=($-q.getLengthInBits())/8;for(let H=0;H<L;H++)q.put(H%2?17:236,8);return j(q,R,P)}function j(R,P,M){const q=e.getSymbolTotalCodewords(P),U=d.getTotalCodewordsCount(P,M),V=q-U,$=d.getBlocksCount(P,M),L=q%$,H=$-L,Q=Math.floor(q/$),I=Math.floor(V/$),O=I+1,F=Q-I,B=new m(F);let K=0;const le=new Array($),Z=new Array($);let ie=0;const re=new Uint8Array(R.buffer);for(let ge=0;ge<$;ge++){const we=ge<H?I:O;le[ge]=re.slice(K,K+we),Z[ge]=B.encode(le[ge]),K+=we,ie=Math.max(ie,we)}const de=new Uint8Array(q);let he=0,pe,oe;for(pe=0;pe<ie;pe++)for(oe=0;oe<$;oe++)pe<le[oe].length&&(de[he++]=le[oe][pe]);for(pe=0;pe<F;pe++)for(oe=0;oe<$;oe++)de[he++]=Z[oe][pe];return de}function _(R,P,M,q){let U;if(Array.isArray(R))U=v.fromArray(R);else if(typeof R=="string"){let Q=P;if(!Q){const I=v.rawSplit(R);Q=p.getBestVersionForData(I,M)}U=v.fromString(R,Q||40)}else throw new Error("Invalid data");const V=p.getBestVersionForData(U,M);if(!V)throw new Error("The amount of data is too big to be stored in a QR Code");if(!P)P=V;else if(P<V)throw new Error(` 58The chosen QR Code version cannot contain this amount of data. 59Minimum version required to store current data is: `+V+`. 60`);const $=E(P,M,U),L=e.getSymbolSize(P),H=new r(L);return b(H,P),S(H),C(H,P),A(H,M,0),P>=7&&N(H,P),T(H,$),isNaN(q)&&(q=c.getBestMask(H,A.bind(null,H,M))),c.applyMask(q,H),A(H,M,q),{modules:H,version:P,errorCorrectionLevel:M,maskPattern:q,segments:U}}return Nv.create=function(P,M){if(typeof P>"u"||P==="")throw new Error("No input text");let q=t.M,U,V;return typeof M<"u"&&(q=t.from(M.errorCorrectionLevel,t.M),U=p.from(M.version),V=c.from(M.maskPattern),M.toSJISFunc&&e.setToSJISFunction(M.toSJISFunc)),_(P,U,q,V)},Nv}var Fv={},$v={},m2;function z5(){return m2||(m2=1,(function(e){function t(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let r=n.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+n);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(l){return[l,l]}))),r.length===6&&r.push("F","F");const o=parseInt(r.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:o&255,hex:"#"+r.slice(0,6).join("")}}e.getOptions=function(r){r||(r={}),r.color||(r.color={});const o=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,l=r.width&&r.width>=21?r.width:void 0,c=r.scale||4;return{width:l,scale:l?4:c,margin:o,color:{dark:t(r.color.dark||"#000000ff"),light:t(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},e.getScale=function(r,o){return o.width&&o.width>=r+o.margin*2?o.width/(r+o.margin*2):o.scale},e.getImageWidth=function(r,o){const l=e.getScale(r,o);return Math.floor((r+o.margin*2)*l)},e.qrToImageData=function(r,o,l){const c=o.modules.size,d=o.modules.data,m=e.getScale(c,l),p=Math.floor((c+l.margin*2)*m),y=l.margin*m,g=[l.color.light,l.color.dark];for(let v=0;v<p;v++)for(let b=0;b<p;b++){let S=(v*p+b)*4,C=l.color.light;if(v>=y&&b>=y&&v<p-y&&b<p-y){const N=Math.floor((v-y)/m),A=Math.floor((b-y)/m);C=g[d[N*c+A]?1:0]}r[S++]=C.r,r[S++]=C.g,r[S++]=C.b,r[S]=C.a}}})($v)),$v}var p2;function Vye(){return p2||(p2=1,(function(e){const t=z5();function n(o,l,c){o.clearRect(0,0,l.width,l.height),l.style||(l.style={}),l.height=c,l.width=c,l.style.height=c+"px",l.style.width=c+"px"}function r(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(l,c,d){let m=d,p=c;typeof m>"u"&&(!c||!c.getContext)&&(m=c,c=void 0),c||(p=r()),m=t.getOptions(m);const y=t.getImageWidth(l.modules.size,m),g=p.getContext("2d"),v=g.createImageData(y,y);return t.qrToImageData(v.data,l,m),n(g,p,y),g.putImageData(v,0,0),p},e.renderToDataURL=function(l,c,d){let m=d;typeof m>"u"&&(!c||!c.getContext)&&(m=c,c=void 0),m||(m={});const p=e.render(l,c,m),y=m.type||"image/png",g=m.rendererOpts||{};return p.toDataURL(y,g.quality)}})(Fv)),Fv}var Hv={},h2;function Bye(){if(h2)return Hv;h2=1;const e=z5();function t(o,l){const c=o.a/255,d=l+'="'+o.hex+'"';return c<1?d+" "+l+'-opacity="'+c.toFixed(2).slice(1)+'"':d}function n(o,l,c){let d=o+l;return typeof c<"u"&&(d+=" "+c),d}function r(o,l,c){let d="",m=0,p=!1,y=0;for(let g=0;g<o.length;g++){const v=Math.floor(g%l),b=Math.floor(g/l);!v&&!p&&(p=!0),o[g]?(y++,g>0&&v>0&&o[g-1]||(d+=p?n("M",v+c,.5+b+c):n("m",m,0),m=0,p=!1),v+1<l&&o[g+1]||(d+=n("h",y
60),y=0)):m++}return d}return Hv.render=function(l,c,d){const m=e.getOptions(c),p=l.modules.size,y=l.modules.data,g=p+m.margin*2,v=m.color.light.a?"<path "+t(m.color.light,"fill")+' d="M0 0h'+g+"v"+g+'H0z"/>':"",b="<path "+t(m.color.dark,"stroke")+' d="'+r(y,p,m.margin)+'"/>',S='viewBox="0 0 '+g+" "+g+'"',N='<svg xmlns="http://www.w3.org/2000/svg" '+(m.width?'width="'+m.width+'" height="'+m.width+'" ':"")+S+' shape-rendering="crispEdges">'+v+b+`</svg> 61`;return typeof d=="function"&&d(null,N),N},Hv}var g2;function Fye(){if(g2)return oc;g2=1;const e=Cye(),t=zye(),n=Vye(),r=Bye();function o(l,c,d,m,p){const y=[].slice.call(arguments,1),g=y.length,v=typeof y[g-1]=="function";if(!v&&!e())throw new Error("Callback required as last argument");if(v){if(g<2)throw new Error("Too few arguments provided");g===2?(p=d,d=c,c=m=void 0):g===3&&(c.getContext&&typeof p>"u"?(p=m,m=void 0):(p=m,m=d,d=c,c=void 0))}else{if(g<1)throw new Error("Too few arguments provided");return g===1?(d=c,c=m=void 0):g===2&&!c.getContext&&(m=d,d=c,c=void 0),new Promise(function(b,S){try{const C=t.create(d,m);b(l(C,c,m))}catch(C){S(C)}})}try{const b=t.create(d,m);p(null,l(b,c,m))}catch(b){p(b)}}return oc.create=t.create,oc.toCanvas=o.bind(null,n.render),oc.toDataURL=o.bind(null,n.renderToDataURL),oc.toString=o.bind(null,function(l,c,d){return r.render(l,d)}),oc}var $ye=Fye();const Hye=I0($ye);function y2({value:e,what:t,copiedLabel:n,testId:r,buttonTestId:o,className:l}){const{toast:c}=Nr(),[d,m]=h.useState(!1),p=async()=>{try{await navigator.clipboard.writeText(e),m(!0),setTimeout(()=>m(!1),2500)}catch{c({title:"Copy failed",description:`Please copy it manually: ${e}`,variant:"destructive"})}};return s.jsxs("button",{type:"button",onClick:p,"aria-label":`Copy ${t}: ${e}`,"data-testid":o,className:Y("flex w-full items-center justify-between gap-3 rounded-xl border border-card-border bg-muted px-4 py-3","text-left transition-colors hover:border-primary/40",l),children:[s.jsx("code",{className:"break-all font-mono text-lg font-bold tracking-wide","data-testid":r,children:e}),s.jsx("span",{"aria-live":"polite",className:Y("flex shrink-0 items-center gap-1.5 text-sm font-semibold",d?"text-primary":"text-muted-foreground"),children:d?s.jsxs(s.Fragment,{children:[s.jsx(mn,{className:"size-4"})," ",n]}):s.jsxs(s.Fragment,{children:[s.jsx(M2,{className:"size-4"})," Copy"]})})]})}function hd({n:e,title:t,children:n}){return s.jsxs("li",{className:"flex gap-3",children:[s.jsx("span",{className:"mt-0.5 flex size-6 shrink-0 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary","aria-hidden":"true",children:e}),s.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[s.jsxs("p",{className:"text-sm font-semibold text-ink",children:[s.jsxs("span",{className:"sr-only",children:["Step ",e,": "]}),t]}),n]})]})}function Gye({report:e}){const t=h.useId(),n=h.useId(),[r,o]=h.useState(""),[l,c]=h.useState(!1),[d,m]=h.useState(null),[p,y]=h.useState(null),g=async v=>{if(v.preventDefault(),l)return;c(!0),y(null);const b=await e(r);c(!1),b.ok?(m(b.value),o(b.value)):y(b.message)};return d?s.jsxs("div",{className:"space-y-1.5","data-testid":"block-payer-claim-saved",children:[s.jsxs("p",{className:"text-sm text-muted-foreground","aria-live":"polite",children:["Thanks. We noted ",s.jsx("strong",{className:"text-ink",children:d})," so we can match your payment. You will get an email as soon as it is confirmed."]}),s.jsx("button",{type:"button",onClick:()=>m(null),className:"text-sm font-semibold text-primary hover:underline","data-testid":"button-payer-claim-change",children:"Change it"})]}):s.jsxs("form",{className:"space-y-2",onSubmit:g,noValidate:!0,"data-testid":"form-payer-claim",children:[s.jsx(xr,{htmlFor:t,className:"text-sm text-muted-foreground",children:"Your $cashtag or the name on your Cash App account"}),s.jsxs("div",{className:"flex flex-col gap-2 md:flex-row",children:[s.jsx(yr,{id:t,value:r,onChange:v=>o(v.target.value),placeholder:"$yourcashtag",autoComplete:"off",autoCapitalize:"none",spellCheck:!1,maxLength:s5,"aria-invalid":p?!0:void 0,"aria-describedby":p?n:void 0,"data-testid":"input-payer-claim"}),s.jsx(Cr,{type:"submit",disabled:l||r.trim().length===0,className:"shrink-0","data-testid":"button-payer-claim-submit",children:l?"Saving...":"I paid"})]}),p&&s.jsx("p",{id:n,role:"alert",className:"text-sm text-destructive",children:p})]})}function Kye({railKey:e,amountCents:t,discountCents:n,referenceCode:r,expiresAt:o,memoDocumentNo:l,instructions:c,reportPayer:d}){const{toast:m}=Nr(),p=Wpe(e),y=typeof c?.handle=="string"?c.handle:null,g=typeof c?.instructions=="string"?c.instructions:null,v=y?$pe(e,y):null,b=Hpe(e,y,t,r??null),[S,C]=h.useState(null);h.useEffect(()=>{if(!b?.href){C(null);return}let j=!1;return Hye.toDataURL(b.href,{margin:1,width:168}).then(_=>{j||C(_)}).catch(()=>C(null)),()=>{j=!0}},[b?.href]);const N=async j=>{if(b){if(j.preventDefault(),r)try{await navigator.clipboard.writeText(r),m({title:"Reference code copied",description:b.prefillsNote?"It's prefilled
61in the note. Just hit Pay.":`Paste it into "For" before you send. Spaces and dashes don't matter.`})}catch{}window.open(b.href,"_blank","noopener,noreferrer")}},A=e==="cashapp";let T=0;const E=()=>++T;return s.jsxs("div",{className:"space-y-5 rounded-2xl border border-card-border bg-card p-5 text-left","data-testid":"block-p2p-instructions",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-base font-semibold text-ink",children:e==="in_person"?"In-Person Payment":`Pay with ${p}`}),s.jsx("p",{className:"mt-0.5 text-sm text-muted-foreground",children:"Your order is reserved but not confirmed until payment is received."})]}),s.jsxs("div",{className:"rounded-xl bg-primary/5 px-4 py-3",children:[s.jsxs("div",{className:"flex items-baseline justify-between gap-3",children:[s.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:"Amount due"}),s.jsx("span",{className:"text-2xl font-bold tabular-nums","data-testid":"text-p2p-amount-due",children:Et(t)})]}),n>0&&s.jsxs("p",{className:"mt-0.5 text-right text-sm font-medium text-primary",children:[p," discount â",Et(n)," applied"]})]}),s.jsxs("ol",{className:"list-none space-y-5",children:[r&&s.jsxs(hd,{n:E(),title:A?"First, copy your reference code":"Copy your reference code",children:[s.jsx(y2,{value:r,what:"reference code",copiedLabel:"Copied",testId:"text-reference-code",buttonTestId:"button-copy-reference",className:A?"border-2 border-primary bg-primary/5":void 0}),A?s.jsxs("p",{className:"text-sm text-muted-foreground","data-testid":"text-cashapp-code-first",children:[s.jsx("strong",{className:"text-ink",children:`Cash App can't fill in the note for us. Paste this code into "For" before you send.`})," ","Payments without it are delayed until we can match them by hand. Spaces and dashes don't matter, and a letter O reads as a zero."]}):s.jsx("p",{className:"text-sm text-muted-foreground",children:e==="in_person"?"This code links your payment to this order. Mention it when you pay.":`This code links your payment to this order. Type it into the ${p} note. Payments without it are delayed. Spaces and dashes don't matter, and a letter O reads as a zero.`}),l!=null&&e!=="in_person"&&s.jsxs("p",{className:"text-sm text-muted-foreground","data-testid":"text-p2p-display-number",children:["No code to hand? Just the number"," ",s.jsx("strong",{className:"text-ink",children:l})," works too."]})]}),b?s.jsx(hd,{n:E(),title:`Open ${b.appName} and send`,children:s.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-start",children:[s.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[s.jsx(Cr,{asChild:!0,size:"lg",className:"w-full text-base font-semibold","data-testid":"button-open-p2p-app",children:s.jsxs("a",{href:b.href,target:"_blank",rel:"noopener noreferrer",onClick:N,children:["Open ",b.appName," · send ",Et(t),s.jsx(C2,{className:"ml-1.5 size-5"})]})}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:[b.prefillsNote?s.jsxs(s.Fragment,{children:["In the ",b.appName," app, recipient, amount, and the note are filled in. Confirm it shows ",v&&s.jsx("strong",{className:"text-ink",children:v})," ","and hit Pay."]}):s.jsxs(s.Fragment,{children:["In the ",b.appName,' app, recipient and amount are filled in. Paste your reference code into "For" before you send',v&&s.jsxs(s.Fragment,{children:[" ","to ",s.jsx("strong",{className:"text-ink",children:v})]}),"."]})," ",s.jsx("span",{className:"hidden md:inline",children:"On a computer, scan the QR with your phone to get the same prefilled payment."})]}),v&&s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Prefer to do it manually? Send to"," ",s.jsx("span",{className:"font-semibold text-ink","data-testid":"text-p2p-handle",children:v})," ","with the code",l!=null?`, or just ${l},`:""," in the note."]})]}),S&&s.jsxs("div",{className:"hidden shrink-0 flex-col items-center gap-1.5 md:flex",children:[s.jsx("img",{src:S,alt:`QR code that opens ${b.appName} with this payment prefilled`,className:"size-[132px] rounded-lg border border-card-border bg-white p-1.5","data-testid":"img-p2p-qr"}),s.jsxs("p",{className:"max-w-[140px] text-center text-xs text-muted-foreground",children:["On your phone? Scan to open ",b.appName,"."]})]})]})}):v&&s.jsxs(hd,{n:E(),title:e==="in_person"?"Pay at this location":`Send it with ${p}`,children:[s.jsx(y2,{value:v,what:e==="in_person"?"location":"pay-to handle",copiedLabel:"Copied",testId:"text-p2p-handle",buttonTestId:"button-copy-handle"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:e==="in_person"?"Mention your reference code when you pay.":`Send ${Et(t)} with the reference code${l!=null?`, or just ${l},`:""} in the memo / note.`})]}),A&&r&&d&&s.jsxs(hd,{n:E(),title:"Paid? Tell us the name you paid from",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:`Optional, and the fastest fix if the code didn't make it into "For". We match your payment by the name Cash App shows us.`}),s.jsx(Gye,{report:d})]}),s.jsx(hd,{n:E(),title:"That's it. We take it from here",children:s.jsxs("p",{className:"text-sm leading-relaxed text-muted-foreground",children:["We confirm ",p," payments within 24 hours of receipt. You'll get an email as soon as your payment is confirmed and your order moves to processing. Unpaid orders are cancelled automatically when the payment window expires."]})})]}),g&&s.jsx("p",{className:"text-sm leading-relaxed text-muted-foreground",children:g}),s.jsx(M5,{expiresAt:o})]})}const Yye="This payment is no longer waiting on a Cash App transfer. If you already sent it, contact support with your reference code.";function Wye(e){const t=e?.status,n=e?.data;switch(typeof n?.error=="string"?n.error:null){case"payer_claim_invalid":return E0(typeof n?.reason=="str
61ing"?n.reason:"empty");case"payer_claim_is_recipient":return E0("is_recipient");case"payment_not_open":case"payer_claim_unsupported_rail":return Yye;case"payer_claim_revision_limit":return"You have updated this a few times already. Contact support if it still needs changing.";case"payer_claim_conflict":return"This changed in another window while you were typing. Try again."}return t===404?"We could not find this payment. Refresh the page and try again.":t===429?"Too many attempts. Wait a few minutes and try again.":"We could not save that just now. Try again in a moment."}function Qye(e){return async t=>{const n=ahe(t);if(!n.ok)return{ok:!1,message:E0(n.reason)};try{return{ok:!0,value:(await e({claim:n.value})).claim.value}}catch(r){return{ok:!1,message:Wye(r)}}}}function Lwe(e){if(!e)return null;let t;try{t=new URL(e,"https://placeholder.invalid")}catch{return null}const n=/^\/support\/contribution\/(\d+)$/.exec(t.pathname),r=t.searchParams.get("t"),o=n?Number(n[1]):Number.NaN;return!Number.isSafeInteger(o)||o<=0||!r?null:{leafId:o,t:r}}const Xye=5e3;function Zye(e,t){return new Intl.DateTimeFormat("en-US",{timeZone:t,weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(new Date(e))}function V5(){const{orderId:e}=D0(),{isAuthenticated:t}=Bt(),n=H3(),r=Mr(),o=Number(e);h.useEffect(()=>{if(window.top!==window.self)try{window.top.location.href=window.location.href}catch{}},[]),h.useEffect(()=>{E5(window.location.pathname+window.location.search)},[]);const{data:l,isLoading:c}=BY(o,{query:{enabled:t&&!!e,queryKey:Up(o)}}),{data:d,isLoading:m}=MY(o,void 0,{query:{enabled:!!o&&t,queryKey:Eb(o),refetchInterval:L=>{const H=L.state.data?.payment;return!H||che(H.status)?!1:Xye}}}),p=d?.payment??null,y=p?.status,g=y==="confirming",v=Ape(p?.waitState??null),b=v?.state==="bank_clearing",S=p?.railKey==="crypto",C=p?.railKey==="moonpay",N=p?Zpe(p.railKey):!1,A=Fpe(l?.orderNumber),T=!!p?.paymentUrl&&!S&&!C&&!N,E=d?.paymentStatus,j=y==="failed"||y==="expired"||y==="cancelled"||!p,_=(E==="awaiting_payment"||E==="unpaid")&&(l?.totalCents??0)>0&&l?.status==="pending",R=!!d&&j&&_,P=!g&&(!p&&!R||y==="paid"||d?.paymentStatus==="paid"),M=!!p&&j&&!_,q=y==="partially_paid",U=(!!p||R)&&!P&&!M&&!q,V=!g&&(!!p&&U&&(p.status==="created"||p.status==="pending")||R),$=M?{icon:s.jsx(B2,{className:"w-12 h-12 text-danger"}),iconBg:"bg-danger/10",title:"Payment Not Completed",subtitle:"This order was not paid and will not be processed."}:q?{icon:s.jsx(el,{className:"w-12 h-12 text-amber"}),iconBg:"bg-amber-tint",title:"Action Needed",subtitle:"We received a partial payment for this order."}:U?{icon:s.jsx(Qd,{className:"w-12 h-12 text-amber"}),iconBg:"bg-amber-tint",title:b?"Payment Received - Clearing":g?"Payment Status Pending":"Complete Your Payment",subtitle:b?v?.customerDetail??"":g?"We cannot show a final payment status yet.":"Your order is reserved and will be processed once payment is confirmed."}:{icon:s.jsx(Xi,{className:"w-12 h-12 text-vida-green-600"}),iconBg:"bg-vida-mint-soft",title:"Order Confirmed",subtitle:"A confirmation will be sent to your email."};return c||m?s.jsxs("div",{className:"max-w-xl mx-auto px-4 py-12 text-center","aria-busy":"true",role:"status","aria-label":"Loading order confirmation",children:[s.jsx("div",{className:"flex justify-center mb-4",children:s.jsx(Cn,{className:"size-[72px] rounded-full"})}),s.jsx(Cn,{className:"h-7 w-52 mx-auto mb-2"}),s.jsx(Cn,{className:"h-4 w-32 mx-auto mb-1"}),s.jsx(Cn,{className:"h-4 w-64 max-w-full mx-auto mb-6"}),s.jsx(Cn,{className:"h-24 w-full rounded-2xl mb-6"}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:[s.jsx(Cn,{className:"h-10 w-full sm:w-40"}),s.jsx(Cn,{className:"h-10 w-full sm:w-40"})]})]}):s.jsxs("div",{className:"max-w-xl mx-auto px-4 py-12 text-center",children:[s.jsx("div",{className:"flex justify-center mb-4",children:s.jsx("div",{className:`${$.iconBg} rounded-full p-3 shadow-xs`,children:$.icon})}),s.jsx("h1",{className:"font-display text-t2 text-ink mb-2","data-testid":"text-confirmation-title",children:$.title}),s.jsxs("p",{className:"text-ink-2 mb-1","data-testid":"text-order-id",children:["Order ",l?.orderNumber||`#${e}`]}),l&&(()=>{const L=Math.min(l.storeCreditCashAppliedCents??0,l.storeCreditAppliedCents??0),H=l.totalCents+L;return s.jsxs("p",{className:"text-ink-3 text-sm mb-2",children:[l.items.length," item",l.items.length!==1?"s":""," ·"," ",s.jsxs("span",{className:"font-medium",children:["$",(H/100).toFixed(2)]}),L>0?s.jsx("span",{className:"text-ink-3",children:" paid via VidaPay"}):null]})})(),s.jsx("p",{className:"text-ink-3 text-sm mb-6",children:$.subtitle}),P&&Number.isInteger(o)?s.jsx(fye,{orderId:o}):null,l?.fulfillmentMethod==="pickup"&&l.pickup&&s.jsxs("div",{className:"bg-card ring-1 ring-card-border rounded-2xl p-4 mb-6 text-left shadow-sm","data-testid":"block-pickup-confirmation",children:[s.jsxs("p",{className:"flex items-center gap-1.5 text-sm font-semibold text-ink",children:[s.jsx(jp,{className:"w-4 h-4 text-primary","aria-hidden":"true"})," Local pickup"]}),s.jsx("p",{className:"mt-1 text-sm text-ink-2",children:Zye(l.pickup.slotStart,l.pickup.timezone)}),s.jsxs("p",{className:"mt-1 flex items-start gap-1.5 text-xs text-muted-foreground",children:[s.jsx(Yi,{className:"mt-0.5 w-3.5 h-3.5 shrink-0","aria-hidden":"true"}),s.jsxs("span",{children:[s.jsx("span",{className:"font-medium text-ink",children:l.pickup.locationName}),l.pickup.address?s.jsxs(s.Fragment,{children:[s.jsx("br",{}),l.pickup.address]}):null]})]}),l.pickup.instructions&&s.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:l.pickup.instructions}),s.jsx(Ue,{href:`/account/orders/${e}`,className:"mt-3 inline-block text-xs font-semibold text-primary hover:text-primary/80","data-testid":"link-manage-pickup",children:"Change pickup time â"})]}),b&&v&&s.jsxs("div",{className:"bg-vida-mint-soft ring-1 ring-vida-green-600/20 rounded-2xl p-4 mb-6 text-left","data-testid":"block-payment-bank-clearing",role:"status","aria-live":"polite",children:[s.jsx("p",{className:"text-sm font-semibold text-vida-green-800",children:v.label}),s.jsx("p",{className:"mt-1 text-xs leading-relaxed text-vida-green-800",children:v.customerDetail}),v.shippingNote&&s.jsx("p",{className:"mt-1.5 text-xs leading-relaxed text-vida-green-800",children:v.shippingNote})]}),g&&!b&&s.jsxs("div",{className:"bg-amber-tint ring-1 ring-amber/20 rounded-2xl p-4 mb-6 text-left","data-testid":"block-payment-confirming",role:"status","aria-live":"polite",children:[s.jsx("p",{className:"text-sm font-semibold text-amber",children:"Payment status is being confirmed"}),s.jsx("p",{className:"mt-1 text-xs leading-relaxed text-amber",children:"Do not pay again or choose another payment method. This page will update automatically. If the status does not update, contact support."})]}),p&&S&&s.jsx("div",{className:"mb-6",children:s.jsx(wye,{status:p.status,amountCents:p.amountCents,discountCents:p.discountCents,paidAmountCents:p.paidAmountCents,paymentUrl:g?null:p.paymentUrl,expiresAt:p.expiresAt})}),p&&C&&!g&&!P&&!M&&s.jsx("div",{className:"mb-6",children:s.jsx(Sye,{status:p.status,amountCents:p.amountCents,discountCents:p.discountCents,paymentUrl:p.paymentUrl??null,expiresAt:p.expiresAt??null})}),p&&T&&!g&&!P&&!M&&s.jsxs("div",{className:"bg-card ring-1 ring-card-border rounded-2xl p-4 mb-6 text-left shadow-sm","data-testid":"block-hosted-payment",children:[s.jsx("p",{className:"text-sm font-semibold text-ink",children:"Complete secure payment"}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1 leading-relaxed",children:"Your order is reserved. Finish payment in the checkout tab (card, Apple Pay, or Google Pay) - this page updates automatically the moment it's confirmed. If the tab didn't open, use the button below."}),s.jsx(Cr,{asChild:!0,className:"w-full mt-4","data-testid":"link-hosted-payment",children:s.jsxs("a",{href:p.paymentUrl??"#",target:"_blank",rel:"noopener noreferrer",children:["Continue to payment ",s.jsx(ao,{className:"w-4 h-4 ml-1"})]})})]}),p&&N&&!g&&!P&&!M&&s.jsxs("div",{className:"mb-6 space-y-4",children:[s.jsx(Kye,{railKey:p.railKey,amountCents:p.amountCents,discountCents:p.discountCents,referenceCode:p.referenceCode,expiresAt:p.expiresAt,memoDocumentNo:A,instructions:p.instructions,reportPayer:Qye(L=>DH(o,L))}),q&&s.jsx(D5,{amountCents:p.amountCents,paidAmountCents:p.paidAmountCents})]}),V&&s.jsx(yye,{className:"mb-6 text-left",orderId:o,currentRailKey:p?.railKey??"",baseAmountCents:p?p.amountCents+p.discountCents:l?.totalCents??0,onSwitched:()=>{r.invalidateQueries({queryKey:Eb(o)}),r.invalidateQueries({queryKey:Up(o)})}}),p&&N&&M&&s.jsxs("div",{className:"bg-danger/5 ring-1 ring-danger/20 rounded-2xl p-4 mb-6 text-left","data-testid":"block-payment-failed",children:[s.jsx("p",{className:"text-danger text-sm font-semibold",children:y==="expired"?"Payment window expired":"Payment cancelled"}),s.jsx("p",{className:"text-danger/80 text-xs mt-1 leading-relaxed",children:"This order was cancelled because payment was not received in time. You can place a new order at any time, or contact support if you already sent payment."})]}),n&&s.jsx(dye,{}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:[t&&s.jsx(Cr,{variant:"outline",asChild:!0,"data-testid":"link-order-history",children:s.jsx(Ue,{href:"/account",children:"View Order History"})}),s.jsx(Cr,{asChild:!0,"data-testid":"link-continue-shopping",children:s.jsx(Ue,{href:"/products",children:"Continue Shopping"})})]}),s.jsx("div",{className:"mt-8 text-left",children:s.jsx(hye,{channel:"order_confirmation"})})]})}const qwe=Object.freeze(Object.defineProperty({__proto__:null,default:V5},Symbol.toStringTag,{value:"Module"}));function Jye(e){return e==="new_user_signup_disabled"}function exe(){const{isAuthenticated:e,isLoading:t}=Bt(),{toast:n}=Nr(),r=M0(),o=new URLSearchParams(r),l=o.get("session_expired")==="1",c=Jye(o.get("error")),d=JP(o.get("redirect"),"/products"),m=db(r),p=m!==null&&FE(m),y=m?$E(m,d==="/products"?null:d)??"/products":null,g=p?`/register?${m}`:`/register${(y??d)!=="/products"?`?redirect=${encodeURIComponent(y??d)}`:""}`,[v,b]=h.useState(null),[S,C]=h.useState(!1),N=p?`/api/auth/oauth2/authorize?${m}`:y??d,A=D8({isLoading:t,isAuthenticated:e,destination:N,fallback:"/products",basePath:"/"}),T=cc(m?`/login?${m}`:d,"/"),E=m?T:cc(`/login${d==="/products"?"":`?redirect=${encodeURIComponent(d)}`}`,"/"),j=bx({redirectTo:d,oauthContinuation:m}),_=()=>{const q=db(typeof window>"u"?r:window.location.search);return q?FE(q)?{continuation:q,restart:null}:{continuation:null,restart:$E(q,d==="/products"?null:d)??"/products"}:{continuation:null,restart:null}},R=()=>{const q=_();return q.continuation?cc(`/login?${q.continuation}`,"/"):q.restart??cc(d,"/")},P=()=>{const q=_();return q.continuation?bx({redirectTo:d,oauthContinuation:q.continuation}):bx({redirectTo:q.restart??d,oauthContinuation:null})},M=async(q,U)=>{const V=q.trim()||v||"";if(V){C(!0);try{const{error:$}=await cr.sendVerificationEmail({email:V,callbackURL:U});if($){n({title:"Couldn't send verification email",description:$.message??"Please try again in a moment.",variant:"destructive"});return}n({title:"Verification email sent",description:"Check your inbox (and spam folder) for the link."})}finally{C(!1)}}};return A!=="anonymous"?s.jsx("div",{className:"min-h-[70vh] flex items-center justify-center px-4 py-8",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:"Opening your accountâ¦"})}):s.jsxs("div",{className:"min-h-[70vh] flex flex-col items-center justify-center px-4 py-8",children:[s.jsx(pF,{productName:"VidaPeps",tagline:"Access your VidaPeps account",accent:"green",googleEnabled:!0,logoSrc:"/vidapeps-logo.svg",logoAlt:"VidaPeps",authClient:cr,redirectTo:T,verificationReturnTo:j,resolveAuthRedirect:R,resolveVerificationReturn:P,magicLinkErrorPath:E,enablePhoneCapture:!0,sessionExpired:l,passwordlessNeedsRegistrationHref:c?g:void 0,needsVerificationEmail
61:v,onResendVerification:M,onAuthenticated:()=>{const q=_();if(q.continuation){window.location.assign(`/api/auth/oauth2/authorize?${q.continuation}`);return}if(q.restart){window.location.assign(q.restart);return}eO(d,"/products",window.location,"/")},onEmailSignIn:async({email:q,password:U,fetchOptions:V})=>{const{data:$,error:L}=await cr.signIn.email({email:q,password:U,rememberMe:!0,fetchOptions:V});return L?L.code==="EMAIL_NOT_VERIFIED"?(b(q),{error:{code:"EMAIL_NOT_VERIFIED",message:"Verify your email to sign in"}}):{error:L}:$?.twoFactorRedirect??!1?{error:null,twoFactorRedirect:!0}:{error:null,twoFactorRedirect:!1,forcePasswordChange:(await cr.getSession()).data?.user?.mustChangePassword===!0}}}),S&&s.jsx("span",{className:"sr-only","aria-live":"polite",children:"Resending verification email"})]})}const txe=h.lazy(()=>Ce(()=>import("./vida-chat-DUBcUOXh.js"),__vite__mapDeps([4,1,2,5,6,7,8,9])).then(e=>({default:e.VidaChat}))),nxe="/media/vida-avatar.webp";function rxe({size:e="h-9 w-9"}){return s.jsx("img",{src:nxe,alt:"Vida Research Assistant",className:`rounded-full object-cover ring-2 ring-emerald-500/20 ${e}`})}function axe(e){if(e.startsWith("/products"))return"product";if(e.startsWith("/cart"))return"cart";if(e.startsWith("/categories"))return"product"}function sxe(e){return e.startsWith("/vidatools")||SM()}function ixe({brand:e="vidapeps",hideOnToolsRoutes:t=!0}={}){const{t:n}=Ih(),[r,o]=h.useState(!1),[l,c]=h.useState(!1),[d]=Hn(),m=h.useRef(null),p=h.useRef(null),y=h.useCallback(()=>o(!1),[]);return h.useEffect(()=>{if(!r)return;m.current?.focus();const g=v=>{v.key==="Escape"&&y()};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[r,y]),h.useEffect(()=>{r||p.current?.focus?.()},[r]),d.startsWith("/promo")||d.startsWith("/play/")||t&&sxe(d)?null:s.jsxs(s.Fragment,{children:[!r&&s.jsxs("button",{ref:p,onClick:()=>{c(!0),o(!0)},className:"fixed right-4 bottom-[calc(var(--vp-tabbar-h)+env(safe-area-inset-bottom)+0.5rem)] shell:bottom-6 z-40 flex h-14 w-14 items-center justify-center rounded-full bg-gradient-to-br from-emerald-500 to-teal-600 text-white shadow-lg shadow-emerald-500/30 transition-all hover:scale-105 hover:shadow-xl","aria-label":n("vida.open"),children:[s.jsx(rxe,{size:"h-12 w-12"}),s.jsxs("span",{className:"absolute -top-1 -right-1 flex h-3 w-3",children:[s.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-emerald-400 opacity-75"}),s.jsx("span",{className:"relative inline-flex h-3 w-3 rounded-full bg-emerald-500"})]})]}),l&&s.jsx("div",{ref:m,role:"dialog","aria-modal":"true","aria-label":"Vida Assistant","aria-hidden":!r,inert:!r,hidden:!r,tabIndex:-1,className:Y("fixed inset-x-0 top-0 z-[60] flex h-[100dvh] flex-col bg-background outline-none","shell:inset-auto shell:top-auto shell:right-6 shell:bottom-6 shell:z-50","shell:h-[600px] shell:max-h-[calc(100dvh-3rem)] shell:w-[400px] shell:max-w-[calc(100vw-3rem)]","shell:overflow-hidden shell:rounded-2xl shell:border shell:border-border shell:bg-card shell:shadow-2xl"),children:s.jsx(h.Suspense,{fallback:null,children:s.jsx(txe,{app:"store",brand:e,pageContext:axe(d),showClose:!0,onClose:y,className:"h-full"})})})]})}const oxe=h.lazy(()=>Ce(()=>import("./Register-pPPxBI6q.js"),__vite__mapDeps([10,1,2,5,11,7]))),lxe=h.lazy(()=>Ce(()=>import("./ForgotPassword-B5vKw0Fk.js"),__vite__mapDeps([12,1,2,5,7]))),cxe=h.lazy(()=>Ce(()=>import("./ResetPassword-9yAHSlfI.js"),__vite__mapDeps([13,1,2,5,7]))),uxe=h.lazy(()=>Ce(()=>import("./ConfirmEmail-CdA2TU6Y.js"),__vite__mapDeps([14,1,2,7,5]))),dxe=h.lazy(()=>Ce(()=>import("./Account-COdR340W.js"),__vite__mapDeps([15,1,2,16,7,17,18,19,8,20,21,5]))),fxe=h.lazy(()=>Ce(()=>import("./PinSetup-d18BbVnx.js"),__vite__mapDeps([22,1,2,5,7]))),mxe=h.lazy(()=>Ce(()=>import("./AccountOrders-DtZlxgKu.js"),__vite__mapDeps([23,1,2,16,7,17,19,8,5]))),pxe=h.lazy(()=>Ce(()=>import("./AccountOrderDetail-BU_rmCUH.js"),__vite__mapDeps([24,1,2,25,7,16,8,26,27,17,6,5]))),hxe=h.lazy(()=>Ce(()=>import("./BusinessInvitation-BAj-LcpW.js"),__vite__mapDeps([28,1,2,7,5]))),gxe=h.lazy(()=>Ce(()=>import("./AccountPoints-DleIdsQE.js"),__vite__mapDeps([29,1,2,16,7,17,20,5]))),yxe=h.lazy(()=>Ce(()=>import("./AccountPrizes-CWGQY6Gz.js"),__vite__mapDeps([30,1,2,16,7,17,5]))),xxe=h.lazy(()=>Ce(()=>import("./AccountReferral-B1Opwoyh.js"),__vite__mapDeps([31,1,2,16,7,17,21,5]))),vxe=h.lazy(()=>Ce(()=>import("./AccountVidaForward-BVnpil3D.js"),__vite__mapDeps([32,1,2,16,7,33,5]))),bxe=h.lazy(()=>Ce(()=>import("./AccountContributions-BNZd2lVi.js"),__vite__mapDeps([34,1,2,16,7,17,5]))),wxe=h.lazy(()=>Ce(()=>import("./AccountProfile-B2H0hbs0.js"),__vite__mapDeps([35,1,2,11,7,17,36,16,18,5]))),Sxe=h.lazy(()=>Ce(()=>import("./AccountAddresses--cAh64-U.js"),__vite__mapDeps([37,1,2,16,7,17,38,5]))),Cxe=h.lazy(()=>Ce(()=>import("./AccountCompany-B5Y3xpHc.js"),__vite__mapDeps([39,1,2,25,38,17,40,16,7,5]))),Nxe=h.lazy(()=>Ce(()=>import("./AccountCompanyStart-CkdKdthi.js"),__vite__mapDeps([41,1,2,25,7,16,17,5]))),Axe=h.lazy(()=>Ce(()=>import("./AccountCompanyQuotes-Cuj4uwc1.js"),__vite__mapDeps([42,1,2,17,40,16,7,5]))),Exe=h.lazy(()=>Ce(()=>import("./AccountCompanyOrders-YmTBblSk.js"),__vite__mapDeps([43,1,2,17,40,16,7,5]))),jxe=h.lazy(()=>Ce(()=>import("./AccountCompanyQuote-DmZEyp2t.js"),__vite__mapDeps([44,1,2,17,40,16,7,45,46,5]))),Txe=h.lazy(()=>Ce(()=>import("./AccountCompanyInvoices-C2IRP10T.js"),__vite__mapDeps([47,1,2,17,40,16,7,5]))),kxe=h.lazy(()=>Ce(()=>import("./AccountCompanyInvoice-A4LeWs7B.js"),__vite__mapDeps([48,1,2,46,17,40,16,7,45,5]))),Rxe=h.lazy(()=>Ce(()=>import("./AccountNotifications-CbEBzxU-.js"),__vite__mapDeps([49,1,2,16,7,17,5]))),Pxe=h.lazy(()=>Ce(()=>import("./AccountSupport-BGHEdJsR.js"),__vite__mapDeps([27,1,2,16,7,17,6,5]))),Oxe=h.lazy(()=>Ce(()=>import("./PrivacyCenter-CfFZTNa6.js"),__vite__mapDeps([50,1,2,16,7,17,5]))),_xe=h.lazy(()=>Ce(()=>import("./Research-BwTxDVaS.js"),__vite__mapDeps([51,1,2,36,7,52,5]))),Ixe=h.lazy(()=>Ce(()=>import("./VidaFiles-C0_MzZO0.js"),__vite__mapDeps([53,1,2,7,5]))),Mxe=h.lazy(()=>Ce(()=>import("./VidaFile--oPVSogf.js"),__vite__mapDeps([54,1,2,9,7,5]))),Dxe=h.lazy(()=>Ce(()=>import("./RequestedProducts-Bi1YN3ws.js"),__vite__mapDeps([55,1,2,56,7,5]))),sp=h.lazy(()=>Ce(()=>import("./CoaVerify-DxTqguh8.js"),__vite__mapDeps([52,1,2,36,7,5]))),Lxe=h.lazy(()=>Ce(()=>import("./Quote-TrqB-ody.js"),__vite__mapDeps([57,1,2,25,58,59,7,60,46,36,5]))),qxe=h.lazy(()=>Ce(()=>import("./PayLink-B7_8Xkt4.js"),__vite__mapDeps([61,1,2,59,62,7,58,63,5]))),Uxe=h.lazy(()=>Ce(()=>import("./SupplierPurchaseOrder-BLWEVI5Y.js"),__vite__mapDeps([64,1,2,5,7]))),zxe=h.lazy(()=>Ce(()=>import("./PaymentReturn-DoyMuxSd.js"),__vite__mapDeps([65,1,2,63,7,5]))),Vxe=h.lazy(()=>Ce(()=>import("./WalletApprove-79RcqVO_.js"),__vite__mapDeps([66,1,2,59,62,7,5]))),Bxe=h.lazy(()=>Ce(()=>import("./Club-DEqABgXM.js"),__vite__mapDeps([67,1,2,7,68,69,5]))),Fxe=h.lazy(()=>Ce(()=>import("./ClubOrders-CMBMk7vj.js"),__vite__mapDeps([70,1,2,68,71,7,5]))),$xe=h.lazy(()=>Ce(()=>import("./ClubOrder-D_wNzYGN.js"),__vite__mapDeps([72,1,2,25,68,69,7,71,5]))),Hxe=h.lazy(()=>Ce(()=>import("./Tools-BnomK64T.js"),__vite__mapDeps([73,1,2,7,74,5]))),Gxe=h.lazy(()=>Ce(()=>import("./VidaCareShell-CnSAT6qE.js"),__vite__mapDeps([75,1,2,7,5]))),Kxe=h.lazy(()=>Ce(()=>import("./Legal-XYe4TvNr.js"),__vite__mapDeps([76,1,2,7,5]))),Yxe=h.lazy(()=>Ce(()=>import("./About-B1vcyYk6.js"),__vite__mapDeps([77,1,2,7,5]))),Wxe=h.lazy(()=>Ce(()=>import("./Promo-CP32vERt.js"),__vite__mapDeps([78,1,2,7,5]))),Qxe=h.lazy(()=>Ce(()=>import("./Play-B2R12t4s.js"),__vite__mapDeps([79,1,2,5,7]))),Xxe=h.lazy(()=>Ce(()=>import("./Rewards-BxiBItN0.js"),__vite__mapDeps([80,1,2,7,81,5]))),Zxe=h.lazy(()=>Ce(()=>import("./VidaGrants-DYBAz2tH.js"),__vite__mapDeps([82,1,2,26,7,5]))),Jxe=h.lazy(()=>Ce(()=>import("./PartnerApply-DwG_U9Gd.js"),__vite__mapDeps([83,1,2,74,7,81,5]))),eve=h.lazy(()=>Ce(()=>import("./SupportApply-D1R55iNW.js"),__vite__mapDeps([84,1,2,7,5]))),tve=h.lazy(()=>Ce(()=>import("./ImpactPage-Cu9Kuz9m.js"),__vite__mapDeps([85,1,2,33,7,5]))),nve=h.lazy(()=>Ce(()=>import("./ContributionPage-1cvzCiL5.js"),__vite__mapDeps([86,1,2,7,5]))),rve=h.lazy(()=>Ce(()=>import("./VidaForwardLanding-BzOv5dXU.js"),__vite__mapDeps([87,1,2,7,5]))),ave=h.lazy(()=>Ce(()=>import("./PartnerSign-CfPEbUpy.js"),__vite__mapDeps([88,1,2,7,5]))),sve=h.lazy(()=>Ce(()=>import("./PartnerPortal-CngjNVB9.js"),__vite__mapDeps([89,1,2,90,7,81,5]))),ive=h.lazy(()=>Ce(()=>import("./PartnerResources-jECZ5T5D.js"),__vite__mapDeps([91,1,2,90,7,5]))),ove=h.lazy(()=>Ce(()=>import("./PartnerLeaderboard-uhPOfJQX.js"),__vite__mapDeps([92,1,2,90,7,5]))),lve=h.lazy(()=>Ce(()=>import("./PartnerPromotions-Clrww6Bn.js"),__vite__mapDeps([93,1,2,90,7,94,95,5]))),cve=h.lazy(()=>Ce(()=>import("./PartnerPromotionCreate-Cw7IPJwm.js"),__vite__mapDeps([96,1,2,90,7,95,5]))),uve=h.lazy(()=>Ce(()=>import("./PartnerPromotionDetail-B7M3PP_L.js"),__vite__mapDeps([97,1,2,90,7,95,94,5]))),dve=h.lazy(()=>Ce(()=>import("./InvitePartner-tm5IOpxy.js"),__vite__mapDeps([98,1,2,81,7,5]))),fve=h.lazy(()=>Ce(()=>import("./SuppliersLanding-BVnCkC6P.js"),__vite__mapDeps([99,1,2,7,5]))),mve=h.lazy(()=>Ce(()=>
61import("./SupplierApply-DqPNBzmJ.js"),__vite__mapDeps([100,1,2,101,7,5]))),pve=h.lazy(()=>Ce(()=>import("./SupplierApplicationStatus-Q2JKJqjC.js"),__vite__mapDeps([102,1,2,101,7,5]))),hve=h.lazy(()=>Ce(()=>import("./SupplierInvite-DGNZgoAz.js"),__vite__mapDeps([103,1,2,101,7,5]))),gve=h.lazy(()=>Ce(()=>import("./SupplierPortalPage-CywL-iCP.js"),__vite__mapDeps([104,1,2,101,7,5]))),yve=h.lazy(()=>Ce(()=>import("./VerifyEmail-A7t1Gt0J.js"),__vite__mapDeps([105,1,2,7,5]))),xve=h.lazy(()=>Ce(()=>import("./WelcomePage-DwyMaf0i.js"),__vite__mapDeps([106,1,2,7,5]))),vve=h.lazy(()=>Ce(()=>import("./Survey-_QLGzwsK.js"),__vite__mapDeps([107,1,2,56,7,5]))),x2=h.lazy(()=>Ce(()=>import("./Track-sqk_5WIu.js"),__vite__mapDeps([108,1,2,7,5]))),Gv=h.lazy(()=>Ce(()=>import("./ShipmentHub-Bfpy4gNZ.js"),__vite__mapDeps([109,1,2,7,5]))),bve=h.lazy(()=>Ce(()=>import("./HubPaymentMethods-C96GeChS.js"),__vite__mapDeps([110,1,2,16,7,5])));function _0(){return s.jsx("div",{className:"mx-auto w-full max-w-[var(--vp-content-max)] px-5 py-16","aria-busy":"true",children:s.jsx("div",{className:"vp-glass h-40 animate-pulse rounded-card"})})}Tte();function wve(){const[e]=Hn();h.useEffect(()=>{Ete(e),tZ(e)},[e])}const Sve=new bq({defaultOptions:{queries:{retry:1,staleTime:3e4}}});function Cve(){return s.jsx(roe,{children:s.jsx(h.Suspense,{fallback:s.jsx(_0,{}),children:s.jsxs(Nq,{children:[s.jsx(ve,{path:"/welcome",children:s.jsx(Mi,{to:"/",replace:!0})}),s.jsx(ve,{path:"/",component:Hfe}),s.jsx(ve,{path:"/products",children:s.jsx(qt,{children:s.jsx(G3,{})})}),s.jsx(ve,{path:"/products/:slug",children:s.jsx(qt,{children:s.jsx(W3,{})})}),s.jsx(ve,{path:"/categories/:slug",children:s.jsx(qt,{children:s.jsx(Npe,{})})}),s.jsx(ve,{path:"/research",children:s.jsx(qt,{children:s.jsx(_xe,{})})}),s.jsx(ve,{path:"/research/vida-files",children:s.jsx(qt,{children:s.jsx(Ixe,{})})}),s.jsx(ve,{path:"/research/vida-files/:slug",children:s.jsx(qt,{children:s.jsx(Mxe,{})})}),s.jsx(ve,{path:"/club/orders/:id",children:s.jsx(qt,{children:s.jsx($xe,{})})}),s.jsx(ve,{path:"/club/orders",children:s.jsx(qt,{children:s.jsx(Fxe,{})})}),s.jsx(ve,{path:"/club",children:s.jsx(qt,{children:s.jsx(Bxe,{})})}),s.jsx(ve,{path:"/requested",component:Dxe}),s.jsx(ve,{path:"/coa/:batchNumber",component:sp}),s.jsx(ve,{path:"/c/:batchNumber",component:sp}),s.jsx(ve,{path:"/C/:batchNumber",component:sp}),s.jsx(ve,{path:"/coa",component:sp}),s.jsx(ve,{path:"/quote/:token",component:Lxe}),s.jsx(ve,{path:"/payment-return",component:zxe}),s.jsx(ve,{path:"/pay/:token",component:qxe}),s.jsx(ve,{path:"/po/:token",component:Uxe}),s.jsx(ve,{path:"/wallet-approve/:token",component:Vxe}),s.jsx(ve,{path:"/tools",component:Hxe}),s.jsx(ve,{path:"/legal/:doc?",component:Kxe}),s.jsx(ve,{path:"/about",component:Yxe}),s.jsx(ve,{path:"/promo",component:Wxe}),s.jsx(ve,{path:"/play/:slug",component:Qxe}),s.jsx(ve,{path:"/rewards",component:Xxe}),s.jsx(ve,{path:"/vidagrants",children:s.jsx(qt,{children:s.jsx(Zxe,{})})}),s.jsx(ve,{path:"/partners/apply",component:Jxe}),s.jsx(ve,{path:"/forward/apply",component:eve}),s.jsx(ve,{path:"/forward/c/:slug",component:tve}),s.jsx(ve,{path:"/support/contribution/:leafId",component:nve}),s.jsx(ve,{path:"/forward",component:rve}),s.jsx(ve,{path:"/partners/portal",component:sve}),s.jsx(ve,{path:"/partners/promotions",component:lve}),s.jsx(ve,{path:"/partners/promotions/new",component:cve}),s.jsx(ve,{path:"/partners/promotions/:id",component:uve}),s.jsx(ve,{path:"/partners/resources",component:ive}),s.jsx(ve,{path:"/partners/leaderboard",component:ove}),s.jsx(ve,{path:"/partners/sign",component:ave}),s.jsx(ve,{path:"/partners/invite/:token",component:dve}),s.jsx(ve,{path:"/suppliers/apply",component:mve}),s.jsx(ve,{path:"/suppliers/status/:token",component:pve}),s.jsx(ve,{path:"/suppliers/invite/:token",component:hve}),s.jsx(ve,{path:"/suppliers/portal",component:gve}),s.jsx(ve,{path:"/suppliers",component:fve}),s.jsx(ve,{path:"/blog/welcome",component:xve}),s.jsx(ve,{path:"/blog",children:s.jsx(Mi,{to:"/blog/welcome",replace:!0})}),s.jsx(ve,{path:"/blog/:slug",children:s.jsx(Mi,{to:"/blog/welcome",replace:!0})}),s.jsx(ve,{path:"/survey/:slug",component:vve}),s.jsx(ve,{path:"/track/:trackingNumber",component:x2}),s.jsx(ve,{path:"/track",component:x2}),s.jsx(ve,{path:"/s/:token/lines",children:s.jsx(Gv,{view:"shipment"})}),s.jsx(ve,{path:"/s/:token/coas",children:s.jsx(Gv,{view:"coas"})}),s.jsx(ve,{path:"/s/:token",children:s.jsx(Gv,{view:"landing"})}),s.jsx(ve,{path:"/affiliate",children:s.jsx(Mi,{to:"/rewards",replace:!0})}),s.jsx(ve,{path:"/membership",children:s.jsx(Mi,{to:"/rewards",replace:!0})}),s.jsx(ve,{path:"/partners",children:s.jsx(Mi,{to:"/rewards?tab=partners",replace:!0})}),s.jsx(ve,{path:"/contact",children:s.jsx(Mi,{to:"/about#contact",replace:!0})}),s.jsx(ve,{path:"/cart",children:s.jsx(qt,{children:s.jsx(X3,{})})}),s.jsx(ve,{path:"/checkout",children:s.jsx(qt,{children:s.jsx(P5,{})})}),s.jsx(ve,{path:"/order-confirmation/:orderId",children:s.jsx(qt,{children:s.jsx(V5,{})})}),s.jsx(ve,{path:"/login",component:exe}),s.jsx(ve,{path:"/forgot-password",component:lxe}),s.jsx(ve,{path:"/reset-password",component:cxe}),s.jsx(ve,{path:"/confirm-email",component:uxe}),s.jsx(ve,{path:"/register",component:oxe}),s.jsx(ve,{path:"/pin-setup",children:s.jsx(qt,{children:s.jsx(fxe,{})})}),s.jsx(ve,{path:"/account",component:dxe}),s.jsx(ve,{path:"/account/orders",children:s.jsx(qt,{children:s.jsx(mxe,{})})}),s.jsx(ve,{path:"/account/points",component:gxe}),s.jsx(ve,{path:"/account/prizes",component:yxe}),s.jsx(ve,{path:"/account/referral",component:xxe}),s.jsx(ve,{path:"/account/forward",component:vxe}),s.jsx(ve,{path:"/account/contributions",children:s.jsx(qt,{children:s.jsx(bxe,{})})}),s.jsx(ve,{path:"/account/subscriptions",children:s.jsx(Mi,{to:"/account/orders?tab=subscriptions"})}),s.jsx(ve,{path:"/account/profile",component:wxe}),s.jsx(ve,{path:"/account/addresses",children:s.jsx(qt,{children:s.jsx(Sxe,{})})}),s.jsx(ve,{path:"/account/company/quotes/:quoteId",children:s.jsx(qt,{children:s.jsx(jxe,{})})}),s.jsx(ve,{path:"/account/company/quotes",children:s.jsx(qt,{children:s.jsx(Axe,{})})}),s.jsx(ve,{path:"/account/company/orders",children:s.jsx(qt,{children:s.jsx(Exe,{})})}),s.jsx(ve,{path:"/account/company/invoices/:invoiceId",children:s.jsx(qt,{children:s.jsx(kxe,{})})}),s.jsx(ve,{path:"/account/company/invoices",children:s.jsx(qt,{children:s.jsx(Txe,{})})}),s.jsx(ve,{path:"/account/company/start",children:s.jsx(qt,{children:s.jsx(Nxe,{})})}),s.jsx(ve,{path:"/account/company",children:s.jsx(qt,{children:s.jsx(Cxe,{})})}),s.jsx(ve,{path:"/account/notifications",children:s.jsx(qt,{children:s.jsx(Rxe,{})})}),s.jsx(ve,{path:"/account/support",children:s.jsx(qt,{children:s.jsx(Pxe,{})})}),s.jsx(ve,{path:"/account/privacy",component:Oxe}),s.jsx(ve,{path:"/account/orders/:orderId",component:pxe}),s.jsx(ve,{path:"/business/invitations/:invitationId",component:hxe}),s.jsx(ve,{path:"/verify-email",component:yve}),s.jsx(ve,{path:"/account/payment-methods",component:bve}),s.jsx(ve,{component:aoe})]})})})}const Nve=/^\/(login|register|forgot-password|reset-password|verify-email)(\/|$|\?)/;function Ave(){const[e,t]=h.useState(()=>typeof window<"u"&&!window.sessionStorage.getItem("vp-tools-recover"));return h.useEffect(()=>{e&&(async()=>{try{window.sessionStorage.setItem("vp-tools-recover","1");const n=await window.navigator.serviceWorker?.getRegistrations?.();await Promise.all((n??[]).map(r=>r.unregister()))}catch{}window.location.replace("/hub")})().catch(()=>t(!1))},[e]),s.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-6 text-center",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:e?"Loading your account hubâ¦":s.jsxs(s.Fragment,{children:["This page is unavailable."," ",s.jsx("a",{href:"/hub",className:"font-medium underline",children:"Open the account hub"})]})})})}function Eve(){wve();const[e]=Hn(),t=Nve.test(e.toLowerCase());if(SM()&&!t)return s.jsx(Ave,{});const r=e.toLowerCase();return r==="/vidatools"||r.startsWith("/vidatools/")?(window.location.replace("https://app.myvida.tools/"),s.jsx(_0,{})):Hp()&&!t?s.jsx(h.Suspense,{fallback:s.jsx(_0,{}),children:s.jsx(Gxe,{})}):s.jsx(Cve,{})}function jve(){return s.jsxs(s.Fragment,{children:[s.jsx(Eve,{}),s.jsx(ixe,{})]})}function Tve(){return s.jsxs(wq,{client:Sve,children:[s.jsx(Q$,{children:s.jsx(Dee,{children:s.jsx(qee,{children:s.jsx(K$,{children:s.jsxs(x7,{children:[s.jsx(Cq,{base:"/".replace(/\/$/,""),children:s.jsx(Uee,{children:s.jsx(yte,{children:s.jsx(jve,{})})})}),s.jsx(X$,{})]})})})})}),!1]})}const v2="vp-chunk-reload-at",kve=1e4,Rve=/Failed to fetch dynamically imported module|error loading dynamically imported module|Importing a module script failed|dynamically imported module|Loading chunk \S+ failed|Loading CSS chunk|Unable to preload/i;function Pve(e){const t=e instanceof Error?e.message??"":String(e??"");return Rve.test(t)}function B5(){let e=0;try{e=Number(sessionStorage.getItem(v2)||"0")}catch{}if(Date.now()-e<kve)return!1;try{sessionStorage.setItem(v2,String(Date.now()))}catch{}try{navigator.serviceWorker?.getRegistration().then(t=>
61t?.update())}catch{}return window.location.reload(),!0}class Ove extends h.Component{state={errored:!1,chunkStale:!1};static getDerivedStateFromError(){return{errored:!0}}componentDidCatch(t,n){if(Pve(t)){B5()||this.setState({chunkStale:!0});return}console.error("[AppErrorBoundary]",t,n.componentStack)}render(){return this.state.errored?s.jsxs("div",{role:"alert",style:{minHeight:"100dvh",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"14px",padding:"24px",textAlign:"center",fontFamily:"system-ui, -apple-system, Segoe UI, Roboto, sans-serif",background:"var(--vp-bone, #f6f7f5)",color:"var(--vp-ink, #0e1f18)"},children:[s.jsx("p",{style:{fontSize:"17px",fontWeight:600,margin:0},children:this.state.chunkStale?"A new version is available.":"Something went wrong."}),s.jsx("p",{style:{fontSize:"14px",opacity:.75,margin:0,maxWidth:"30rem"},children:this.state.chunkStale?"Please refresh to load the latest version.":"Refreshing usually fixes it. If it keeps happening, contact support."}),s.jsx("button",{type:"button",onClick:()=>window.location.reload(),style:{marginTop:"4px",borderRadius:"999px",border:"none",padding:"11px 22px",fontSize:"15px",fontWeight:700,cursor:"pointer",background:"var(--vp-green-700, #1d4a38)",color:"#fff"},children:"Refresh"})]}):this.props.children}}window.addEventListener("vite:preloadError",e=>{e.preventDefault(),B5()});(()=>{const{hostname:e,pathname:t,search:n}=window.location;if(!e.startsWith("track.")||t.startsWith("/track"))return;const r=t.split("/").filter(Boolean)[0]??"",o=/^[A-Za-z0-9]{8,40}$/.test(r)?`/track/${r}`:"/track";t!==o&&window.history.replaceState(null,"",`${o}${n}`)})();C7(()=>localStorage.getItem(Hi));
61N7($p);WX();Ww();kU.createRoot(document.getElementById("root")).render(s.jsx(Ove,{children:s.jsx(Tve,{})}));export{CW as $,Y0e as A,Cr as B,Xre as C,qbe as D,t0e as E,ur as F,Ut as G,xb as H,yr as I,vb as J,bb as K,xr as L,Tpe as M,jb as N,PQ as O,zt as P,L$ as Q,W0e as R,qD as S,Q0e as T,Nc as U,Le as V,hh as W,Zw as X,Ape as Y,Ewe as Z,Twe as _,db as a,Ihe as a$,Mhe as a0,fR as a1,wR as a2,u5 as a3,Up as a4,ce as a5,BY as a6,MY as a7,Fpe as a8,Zpe as a9,G0e as aA,Ybe as aB,WW as aC,k0e as aD,s0e as aE,i0e as aF,Ce as aG,Qbe as aH,Rw as aI,r0e as aJ,a0e as aK,e0e as aL,o0e as aM,Awe as aN,lQ as aO,n0e as aP,Rwe as aQ,MQ as aR,Vbe as aS,Bbe as aT,Fbe as aU,_he as aV,Ehe as aW,Ohe as aX,Rhe as aY,l5 as aZ,The as a_,Kye as aa,Qye as ab,yye as ac,Eb as ad,jwe as ae,iW as af,ZY as ag,Ube as ah,vM as ai,tS as aj,wM as ak,nS as al,Uge as am,Mne as an,zbe as ao,DH as ap,dbe as aq,fbe as ar,mbe as as,si as at,H0e as au,Jj as av,eT as aw,Wp as ax,$0e as ay,hye as az,AS as b,Mn as b$,U_ as b0,xte as b1,hbe as b2,WH as b3,gbe as b4,ybe as b5,xbe as b6,vbe as b7,bbe as b8,wbe as b9,FM as bA,Hd as bB,TM as bC,cre as bD,z0e as bE,V0e as bF,lre as bG,nse as bH,twe as bI,nwe as bJ,Vp as bK,w0e as bL,jte as bM,J0e as bN,Fre as bO,ewe as bP,B0e as bQ,tae as bR,F0e as bS,Nw as bT,Aw as bU,_h as bV,fa as bW,tye as bX,rye as bY,zR as bZ,nye as b_,Sbe as ba,tG as bb,P_ as bc,v0e as bd,pbe as be,Hb as bf,Cbe as bg,EG as bh,jbe as bi,qG as bj,Abe as bk,Nbe as bl,Ebe as bm,RG as bn,Qve as bo,U7 as bp,Xve as bq,Jve as br,Zve as bs,F7 as bt,awe as bu,rwe as bv,lae as bw,kM as bx,_0e as by,I0e as bz,UD as c,lbe as c$,ua as c0,Rr as c1,Fs as c2,xre as c3,Zre as c4,Z0e as c5,Hye as c6,Gc as c7,Bse as c8,Kve as c9,Mbe as cA,gwe as cB,Ibe as cC,Lbe as cD,Dbe as cE,_se as cF,jd as cG,bK as cH,xO as cI,rf as cJ,va as cK,Qe as cL,BF as cM,Ge as cN,nr as cO,FF as cP,je as cQ,Sh as cR,Dr as cS,c5 as cT,$be as cU,cD as cV,MW as cW,Hbe as cX,Gbe as cY,Dge as cZ,E5 as c_,X0e as ca,Kbe as cb,$W as cc,Lme as cd,B3 as ce,F3 as cf,$3 as cg,M0e as ch,Lse as ci,ebe as cj,wwe as ck,_fe as cl,Ife as cm,WM as cn,$re as co,$fe as cp,SX as cq,y0e as cr,dT as cs,B_ as ct,A
61X as cu,x0e as cv,iD as cw,kX as cx,mK as cy,sme as cz,ES as d,UM as d$,rbe as d0,abe as d1,y1 as d2,jpe as d3,wye as d4,Sye as d5,i5 as d6,ihe as d7,obe as d8,ube as d9,DB as dA,LB as dB,qB as dC,UB as dD,E0e as dE,j0e as dF,hwe as dG,Owe as dH,D8 as dI,pF as dJ,eO as dK,cc as dL,qt as dM,yae as dN,dwe as dO,uwe as dP,kae as dQ,vc as dR,owe as dS,lwe as dT,cwe as dU,iwe as dV,fwe as dW,uS as dX,qM as dY,Tae as dZ,jae as d_,sbe as da,ibe as db,_we as dc,Iwe as dd,p0e as de,h0e as df,b0e as dg,f0e as dh,m0e as di,$n as dj,rne as dk,D0e as dl,Wpe as dm,$pe as dn,Hpe as dp,M5 as dq,ha as dr,q0e as ds,U0e as dt,$ne as du,Fh as dv,$h as dw,Bc as dx,Fc as dy,X2 as dz,Go as e,xse as e0,dhe as e1,qhe as e2,d5 as e3,Wbe as e4,Zbe as e5,bQ as e6,Xbe as e7,ywe as e8,l0e as e9,L0e as eA,y5 as eB,Rge as eC,gge as eD,fge as eE,yge as eF,g0e as eG,Ih as eH,oo as eI,O0e as eJ,D6 as eK,Wz as eL,Yz as eM,Kz as eN,kE as eO,Qz as eP,qve as eQ,Xz as eR,Uve as eS,Jz as eT,Dc as eU,swe as eV,Cwe as eW,Nwe as eX,kwe as eY,Dwe as eZ,qwe as e_,c0e as ea,Lwe as eb,cbe as ec,d0e as ed,Mwe as ee,eX as ef,gQ as eg,u0e as eh,oX as ei,Jbe as ej,NQ as ek,pme as el,dme as em,fme as en,nbe as eo,Pwe as ep,Ope as eq,Tbe as er,kbe as es,Rbe as et,Pbe as eu,Obe as ev,_be as ew,rS as ex,KE as ey,Ute as ez,Y as f,FE as g,cr as h,YE as i,Vve as j,P0e as k,Bve as l,Nr as m,yre as n,$E as o,tbe as p,Cn as q,R0e as r,JP as s,Et as t,Bt as u,bx as v,$p as w,Fb as x,Wre as y,K0e as z};
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.