(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,907303,e=>{"use strict";var t=e.i(648198),r=e.i(539922);e.s(["default",0,function({candidate:e,failedMessage:i="Authentication failed. Please try again.",protectMessage:a="Remove your adblocker.",fetch:s,refresh:o,getCustomAccountInfo:n}){let[l,c]=(0,r.useState)(""),[u,d]=(0,r.useState)(!1),[m,f]=(0,r.useState)(!1),[p,g]=(0,r.useState)(!1),h=(0,r.useRef)([]);(0,r.useEffect)(()=>{e.id!==h.current[0]&&(h.current=[e.id],e.transactIDs&&h.current.push(...e.transactIDs))},[e.id,e.transactIDs]);let w=(0,r.useCallback)(()=>{try{s("/?adm_get_token=1").then(e=>{e.ok&&o()}).catch(()=>{c(i)})}catch{c(i)}},[s,i,o]),b=(0,r.useMemo)(()=>"u">typeof window?window:{admiral:{}},[]);return(0,r.useEffect)(()=>{typeof window>"u"||(b.admiral=b.admiral||function(...e){(b.admiral.q=b.admiral.q||[]).push(e)},b.admiral("after","measure.detected",function(t){if("abr"==e.requirement)t.adblocking?(c(a),d(!0)):g(!0);else if("account"==e.requirement||"benefits"==e.requirement){let t=!!n;b.admiral("after","visitor.latest",function(r){var i;if("account"===e.requirement)(t?n().registered:r.status.registered)||m||(c(a),d(!0));else if("benefits"===e.requirement){let r=[];if(t)r=n().benefits;else{let e=document.cookie.split(";");e&&(r=(null==(i=e.find(e=>e.startsWith("admbenefits=")))?void 0:i.split(","))??[])}if(r){let t=e.benefits??[];if(0==t.length)return void g(!0);let i=!1;for(let e of t)r.includes(e)&&(i=!0);i?g(!0):(c(a),d(!0))}else c(a),d(!0)}})}}))},[]),(0,r.useEffect)(()=>{p&&(g(!1),w())},[p,w]),(0,r.useEffect)(()=>{m||!u||(f(!0),b.admiral("targeting","force",{candidateIDs:h.current}))},[m,u,h,b]),(0,t.jsxs)("div",{children:[l||null," "]})}])},590238,e=>{"use strict";var t=e.i(537989),r=e.i(827049),i=e.i(695203),a=e.i(604323),s=e.i(797770),o=e.i(991511);e.s(["AnalyticsBoundary",0,e=>((0,o.useRehydrateAtoms)([[t.pageIdAtom,e.pageId],[r.pageLocaleAtom,e.pageLocale],[i.deviceClassAtom,e.deviceClass],[a.metricsArticleDataAtom,e.metricsArticleData],[s.adsMetricsUnitAndZoneAtom,e.adsMetricsUnitAndZone??"non_monetized"]]),null)])},143851,e=>{"use strict";var t=e.i(475566),r=e.i(820241),i=e.i(45846),a=e.i(310847),s=e.i(776169),o=e.i(671525),n=e.i(539922),l=e.i(947118),c=e.i(737801),u=e.i(521350),d=e.i(391174),m=e.i(358273);e.s(["useUserLogin",0,function(){let e,f,p,g,h,w=(0,t.useSetAtom)(a.userHasLoggedInBeforeAtom),b=(0,t.useAtomValue)(a.wxuLoginRedirectPageAtom),v=(0,t.useAtomValue)(a.wxuUserAnonymousIdAtom),y=(0,r.useGetCookie)(),{syncPreferencesFromUpsx:x,updatePreferences:P}=(0,s.usePreferences)(),{navigate:E}=(0,o.default)(),{login:j}=(e=(0,l.useIsInitialized)(),f=(0,n.useCallback)(t=>{if(!e)return console.warn("MParticle is not initialized"),Promise.reject(Error("MParticle is not initialized"));let r={userIdentities:{customerid:t.customerid,email:t.email,other:t.other}};return window.mParticle?.Identity?.identify?.(r)},[e]),{identify:f,login:(0,n.useCallback)(t=>{if(!e)return console.warn("MParticle is not initialized"),Promise.reject(Error("MParticle is not initialized"));let r={userIdentities:{customerid:t.customerid,email:t.email,facebook:t.facebook,facebookcustomaudienceid:t.facebookcustomaudienceid,google:t.google,microsoft:t.microsoft,other:t.other,other2:t.other2,other3:t.other3,other4:t.other4,twitter:t.twitter,yahoo:t.yahoo}};return window.mParticle?.Identity?.login?.(r)},[e]),logout:(0,n.useCallback)(()=>e?window.mParticle?.Identity?.logout?.({userIdentities:{}}):(console.warn("MParticle is not initialized"),Promise.reject(Error("MParticle is not initialized"))),[e])}),k=(p=(0,l.useIsInitialized)(),g=(0,c.useEventAttributes)(),h=(0,n.useCallback)((e,t={})=>{let r={...g,...t};if(!p)return void console.warn("MParticle is not initialized");try{window.mParticle.logEvent(e,window.mParticle.EventType.Other,r),console.debug(`MParticle: Event "${e}" tracked`,r)}catch(t){console.error(`MParticle: Event "${e}" failed`,t)}return h},[g,p])),I=async()=>{try{if(y("premium"))return null;return await i.upsxClient.purchase.getPurchaseToken(),!0}catch(e){return console.error("Failed to get UPSX token:",e),!1}},S=()=>{(0,m.regenerateMetricsSession)();let e=new URLSearchParams(window.location.search).get("ref");E((e&&`https://${e}`)??b)},C=async(e,t=!0)=>{(0,d.invalidateUpsxCache)(),(0,u.isLocalStorageAvailable)()&&localStorage.setItem("PARTNERS_SYNC","true"),w(!0),await x()||await P({}),I(),e?.userID&&(j({email:e.email,customerid:e.userID,other:v}),k("login"===e.type?"user-loggedin":"signup-complete",{url:window.location.pathname})),t&&S()};return{login:async(e,t)=>{try{let r=await i.upsxClient.auth.login({email:e,password:t});return r&&await C({email:r.email,userID:r.userID,type:"login"}),!0}catch(e){return console.error("Failed to login",e),!1}},authSuccess:C,authRedirect:S}}],143851)},899507,e=>{"use strict";e.s(["isNil",0,function(e){return null==e}])},449928,760430,355200,e=>{"use strict";e.s(["isPrimitive",0,function(e){return null==e||"object"!=typeof e&&"function"!=typeof e}],449928),e.s(["isTypedArray",0,function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}],760430),e.s(["isUnsafeProperty",0,function(e){return"__proto__"===e}],355200)},370220,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getEmailPreferencesStatusUrlConfig=function(){return{host:i,protocol:"https",pathname:"/api/v1/email-preferences/status"}},r.getEmailPreferencesSetUrlConfig=function(){return{host:i,protocol:"https",pathname:"/api/v1/email-preferences/set"}},r.getEmailPreferencesChangeEmailUrlConfig=function(){return{host:i,protocol:"https",pathname:"/api/v1/email-preferences/change-email"}};let i="weather.com"},454307,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.setEmailPreferences=o,r.updateSubscription=n;let i=e.r(678651),a=e.r(414655),s=e.r(370220);async function o(e){let t=(0,s.getEmailPreferencesSetUrlConfig)(),r=(0,i.urlFrom)(t),o=JSON.stringify(function(e){let{subscriptions:t,email:r,mParticleId:i}=e,a={};return t&&(a.subscriptions=t),r&&(a.email=r),i&&(a.mParticleId=i),a}(e)),n=await fetch(r,{method:"PUT",credentials:"include",headers:{"Content-Type":"application/json"},body:o});return 200===n.status||400===n.status?await n.json():(0,a.handleFetchResponse)(n)}async function n(e,t,r){return o({subscriptions:[{subscriptionGroupName:e,isSubscribed:t,...r&&{attributes:r}}]})}},451086,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getEmailPreferencesStatus=o;let i=e.r(678651),a=e.r(414655),s=e.r(370220);async function o(){let e=(0,s.getEmailPreferencesStatusUrlConfig)(),t=(0,i.urlFrom)(e),r=await fetch(t,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"},next:{revalidate:60}});return(0,a.handleFetchResponse)(r)}},952582,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_SUBSCRIPTIONS=r.ON_YOUR_RADAR_GROUP=r.MARKETING_EMAILS_GROUP=r.WEEKLY_BRIEF_GROUP=r.DAILY_NEWSLETTERS_GROUP=void 0,r.DAILY_NEWSLETTERS_GROUP="daily-newsletters-1",r.WEEKLY_BRIEF_GROUP="weekly-brief",r.MARKETING_EMAILS_GROUP="marketing-emails-1",r.ON_YOUR_RADAR_GROUP="on-your-radar",r.DEFAULT_SUBSCRIPTIONS=[{subscriptionGroupName:r.DAILY_NEWSLETTERS_GROUP,subscriptionGroupId:"",isSubscribed:!1,attributes:{location:""}},{subscriptionGroupName:r.WEEKLY_BRIEF_GROUP,subscriptionGroupId:"",isSubscribed:!1},{subscriptionGroupName:r.MARKETING_EMAILS_GROUP,subscriptionGroupId:"",isSubscribed:!1},{subscriptionGroupName:r.ON_YOUR_RADAR_GROUP,subscriptionGroupId:"",isSubscribed:!1}]},422825,e=>{"use strict";var t=e.i(475566),r=e.i(381477),i=e.i(899507),a=e.i(449928),s=e.i(760430);function o(e){if((0,a.isPrimitive)(e))return e;if(Array.isArray(e)||(0,s.isTypedArray)(e)||e instanceof ArrayBuffer||"u">typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e),r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){let t=new r(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let t=new r(e.message);return t.stack=e.stack,t.name=e.name,t.cause=e.cause,t}return"u">typeof File&&e instanceof File?new r([e],e.name,{type:e.type,lastModified:e.lastModified}):"object"==typeof e?Object.assign(Object.create(t),e):e}var n=e.i(355200);function l(e){if(!e||"object"!=typeof e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&"[object Object]"===Object.prototype.toString.call(e)}function c(e,t,r){let i=Object.keys(t);for(let a=0;a{i[e.subscriptionGroupName]=e}),e.forEach(e=>{let t=i[e.subscriptionGroupName]||{};i[e.subscriptionGroupName]=c(o(t),e,function e(t,r){if(Array.isArray(r))if(Array.isArray(t))return c(o(t),r,e);else return c([],r,e);if(l(r))if(l(t))return c(o(t),r,e);else return c({},r,e)})}),Object.values(i)):r}let b=e=>"boolean"==typeof e?{isSubscribed:e}:e;e.s(["useEmailPreferences",0,()=>{let[e,a]=(0,t.useAtom)(m),{user:s}=(0,f.useUser)(),o=(0,h.useSubscriptionsEnabled)(),n=s?.userID||null,l=s?.isUserLoggedIn||!1,c=(0,g.useCallback)(t=>{n&&a({userId:n,expiry:Date.now()+9e5,subscriptions:w(t,e?.subscriptions)})},[n,a,e?.subscriptions]),p=e&&e.userId===n&&e.expiry&&e.expiry>Date.now(),v=!o||!n||!l||p;(0,r.default)(v?void 0:`getEmailPreferencesStatus/${n}`,()=>(0,d.getEmailPreferencesStatus)(),{revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,errorRetryCount:2,onSuccess:e=>{n&&e&&c(e.subscriptions)}});let y=(0,g.useCallback)(async(t,r)=>{let i=await (0,u.setEmailPreferences)({subscriptions:t,email:l?void 0:r});return"success"===i.status&&c(w(t,e?.subscriptions)),i},[c]),x=(0,g.useCallback)(async({newsletter:e,weekly:t,onYourRadar:r,marketing:a})=>{if(!o)return{status:"error",error:"Subscription is not enabled!"};let s=[!(0,i.isNil)(e)&&{subscriptionGroupName:"daily-newsletters-1",...b(e)},!(0,i.isNil)(t)&&{subscriptionGroupName:"weekly-brief",...b(t)},!(0,i.isNil)(r)&&{subscriptionGroupName:"on-your-radar",...b(r)},!(0,i.isNil)(a)&&{subscriptionGroupName:"marketing-emails-1",...b(a)}].filter(Boolean);return await y(s)},[o,y]);return{emailSubscriptions:n&&e?e.subscriptions:null,updateEmailSubscriptions:x}}],422825)},271818,e=>{"use strict";var t=e.i(539922);e.i(493449);var r=e.i(762073),i=e.i(648198),a=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,a)=>{let s=(0,r.createSlot)(`Primitive.${a}`),o=t.forwardRef((e,t)=>{let{asChild:r,...o}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,i.jsx)(r?s:a,{...o,ref:t})});return o.displayName=`Primitive.${a}`,{...e,[a]:o}},{});e.s(["Primitive",0,a])},245308,e=>{"use strict";var t=e.i(648198),r=e.i(539922),i=e.i(747961);let a=(0,r.forwardRef)(({title:e,titleId:r,desc:i,descId:a,...s},o)=>(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:o,"aria-labelledby":r,"aria-describedby":a,...s,children:[i?(0,t.jsx)("desc",{id:a,children:i}):null,void 0===e?(0,t.jsx)("title",{id:r,children:"View"}):e?(0,t.jsx)("title",{id:r,children:e}):null,(0,t.jsxs)("g",{fill:"currentColor",children:[(0,t.jsx)("path",{d:"M15.47 7.83A8.35 8.35 0 0 0 8 2.5 8.35 8.35 0 0 0 .53 7.83a.5.5 0 0 0 0 .34A8.35 8.35 0 0 0 8 13.5a8.35 8.35 0 0 0 7.47-5.33.5.5 0 0 0 0-.34M8 12.5c-2.65 0-5.45-1.965-6.465-4.5C2.55 5.465 5.35 3.5 8 3.5s5.45 1.965 6.465 4.5C13.45 10.535 10.65 12.5 8 12.5"}),(0,t.jsx)("path",{d:"M8 5a3 3 0 1 0 0 6 3 3 0 0 0 0-6m0 5a2 2 0 1 1 0-4 2 2 0 0 1 0 4"})]})]})),s=r.default.forwardRef((e,r)=>(0,t.jsx)(i.BaseIcon,{ref:r,icon:a,...e}));s.displayName="View",e.s(["View",0,s])},558802,e=>{"use strict";var t=e.i(648198),r=e.i(539922),i=e.i(747961);let a=(0,r.forwardRef)(({title:e,titleId:r,desc:i,descId:a,...s},o)=>(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:o,"aria-labelledby":r,"aria-describedby":a,...s,children:[i?(0,t.jsx)("desc",{id:a,children:i}):null,void 0===e?(0,t.jsx)("title",{id:r,children:"Locked"}):e?(0,t.jsx)("title",{id:r,children:e}):null,(0,t.jsx)("path",{fill:"currentColor",d:"M12 7h-1V4a3 3 0 0 0-6 0v3H4a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1M6 4a2 2 0 1 1 4 0v3H6zm6 10H4V8h8z"})]})),s=r.default.forwardRef((e,r)=>(0,t.jsx)(i.BaseIcon,{ref:r,icon:a,...e}));s.displayName="Locked",e.s(["Locked",0,s])},790010,e=>{"use strict";var t=e.i(245943),r=e.i(45846),i=e.i(143851);e.s(["useUserSignup",0,function(){let{authSuccess:e,authRedirect:a}=(0,i.useUserLogin)();return{signup:async(i,a=!0)=>{try{let t=await (i.password?r.upsxClient.auth.register({email:i.email,password:i.password,firstName:i.firstName}):r.upsxClient.auth.registerPasswordless({email:i.email,firstName:i.firstName}));return await e({email:t.email,userID:t.userID,type:"signup"},a),{success:!0,data:{email:t.email,userID:t.userID}}}catch(e){if(console.error("Failed to signup",e),e instanceof t.APIError){let t=e.data;return{success:!1,error:{code:e.code,...t}}}return{success:!1,error:{}}}},authRedirect:a}}])},127667,e=>{"use strict";let t=(0,e.i(514514).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",0,t],127667)},506424,796424,873598,e=>{"use strict";function t(e){if(!e)return"";let t=("number"==typeof e?new Date(e).toISOString():e instanceof Date?e.toISOString():e.replace(/GMT(?![+-])/,"GMT+0000")).replace(/\.\d+/,"").replace("Z","+0000").replace(/\s+/,"T").replace(/\s+/g,"").replace(/[A-Z]{3,}/,""),r=/([+-])(\d{2})(\d{2})$/;r.test(t)&&(t=t.replace(r,"$1$2:$3"));let i=t.replace(/(\d{4})-(\d{2})-(\d{2})/,"$1/$2/$3").replace("T"," ");return"Invalid Date"===new Date(i).toString()?"Invalid Date"!==new Date(t).toString()?t:"string"==typeof e?e:"":i}e.s(["getNormalizedDateString",0,t],796424);let r=e=>{try{return new Intl.DateTimeFormat("en-US",{timeZone:e}),e}catch{return"Etc/UTC"}};e.s(["getCompatibleTimezone",0,r],873598),e.s(["getCompatibleValues",0,({date:e,timeZone:i})=>({cDate:new Date(t(e)),cTimeZone:r(i)})],506424)},289607,e=>{"use strict";var t=e.i(506424);let r=(e,r,i,a)=>{let{cDate:s,cTimeZone:o}=(0,t.getCompatibleValues)({date:e,locale:r,timeZone:i}),n=a??{year:"numeric",month:"2-digit",day:"2-digit",weekday:"short"};return n.timeZone=o,{cDate:s,cTimeZone:o,formatOptions:n}};e.s(["formatIntlDateParts",0,(e,t,i,a)=>{if(!e)return[];let{cDate:s,formatOptions:o}=r(e,t,i,a);return new Intl.DateTimeFormat(t,o).formatToParts(s)},"formatIntlDateString",0,(e,t,i,a)=>{if(!e)return"";let{cDate:s,formatOptions:o}=r(e,t,i,a);return new Intl.DateTimeFormat(t,o).format(s)}])},703123,e=>{"use strict";let t=(0,e.i(751931).atom)({});e.s(["gsiEmailStatesAtom",0,t])},404893,e=>{"use strict";let t=(0,e.i(751931).atom)(!1);e.s(["googleLoginInitilizedAtom",0,t])},874905,e=>{"use strict";e.i(426641);var t=e.i(648198),r=e.i(539922),i=e.i(13155),a=e.i(475566),s=e.i(547100),o=e.i(671525),n=e.i(901351),l=e.i(310847),c=e.i(776169),u=e.i(422825),d=e.i(143851),m=e.i(703123),f=e.i(404893),p=e.i(367810),g=e.i(792461);e.s(["GoogleAuthScript",0,function({onLoad:e,prompt:h=!0,isUserLoggedIn:w}){let b=(0,s.useTranslations)("GoogleLogin"),v=(0,a.useSetAtom)(f.googleLoginInitilizedAtom),{loginWithGoogle:y,error:x,clearError:P}=function(){let e=(0,s.useTranslations)("GoogleLogin"),[t,i]=(0,r.useState)(null),f=(0,a.useSetAtom)(l.userHasLoggedInBeforeAtom),p=(0,a.useAtomValue)(m.gsiEmailStatesAtom),{updateEmailSubscriptions:g}=(0,u.useEmailPreferences)(),{refresh:h}=(0,o.usePageNavigation)(),{syncPreferencesFromUpsx:w}=(0,c.usePreferences)(),{authSuccess:b,authRedirect:v}=(0,d.useUserLogin)();return{loginWithGoogle:(0,r.useCallback)(async t=>{let{credential:r}=t;i(null);try{let e=await n.upsxClient.auth.loginWithGoogle({google_id_token:r}),t=e?.isFirstLogin;await b({email:e.email,userID:e.userID,type:t?"signup":"login"},!1);let{newsletter:i,weekly:a,onYourRadar:s,marketing:o,alwaysSubscribe:l}=p||{};return(t||l)&&await g({newsletter:i,weekly:a,onYourRadar:s,marketing:o}).catch(e=>{console.error("Failed to update email subscriptions",e)}),v(),!0}catch(t){console.error("Failed to login with Google",t);try{let r=t?.data,a=r?.messageCode;if(!a)throw Error("No Error Message");switch(a){case 1e3:case 1026:case 1033:i({header:e("emailAlreadyUsedGoogleHeader"),body:e.raw("emailAlreadyUsedGoogleBody")});break;case 1027:case 1030:i({header:e("emailAlreadyRegisteredGoogleHeader"),body:e("emailAlreadyRegisteredGoogleBody")});break;default:throw Error("No Specific Error")}}catch(t){i({header:e("somethingWentWrong")})}return!1}},[f,w,h,b,v,g,p]),error:t,clearError:(0,r.useCallback)(()=>{i(null)},[])}}(),E=(0,g.useRefMemo)(y),j=(0,r.useRef)(null);x&&(j.current=x);let k=j.current;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.default,{src:"https://accounts.google.com/gsi/client",onLoad:()=>{let t=window.google?.accounts?.id;t&&(t.initialize({client_id:"797231885346-rai9vgnvf4u38enai8bhginnnrh5uvch.apps.googleusercontent.com",context:"signin",ux_mode:"popup",use_fedcm_for_prompt:!0,callback:e=>{E.current?.(e)}}),v(!0)),e?.(),!w&&h&&t?.prompt()},id:"google-gsi-script"}),k&&(0,t.jsx)(p.Dialog,{open:!!x,onOpenChange:e=>!e&&P(),children:(0,t.jsx)(p.BasicDialog,{showCloseButton:!1,title:k.header||"",description:(0,t.jsx)("span",{dangerouslySetInnerHTML:{__html:k.body||""}}),primaryAction:{label:b("cancel"),onClick:P}})})]})}],874905)},491045,e=>{"use strict";var t=e.i(233601);let r=(0,t.createJSONStorage)(()=>sessionStorage),i=(0,t.atomWithStorage)("wx-purchase-source-attribution",null,r);e.s(["purchaseSourceAttributionAtom",0,i])},499239,e=>{"use strict";var t=e.i(751931),r=e.i(233601);(0,t.atom)("auth");let i=(0,t.atom)(null);(0,t.atom)(null);let a=(0,t.atom)(!1),s=(0,t.atom)(null),o=(0,r.atomWithStorage)("wxu-web/keyval:cart","",void 0,{getOnInit:!0}),n=(0,t.atom)(""),l=(0,t.atom)(null),c=(0,r.atomWithStorage)("wxu-web/keyval:eventChainId","",void 0,{getOnInit:!0}),u=(0,t.atom)("idle");e.s(["addressDataAtom",0,i,"billingPreviewDataAtom",0,l,"cartProductIdAtom",0,o,"checkoutValidationAtom",0,u,"eventChainIdAtom",0,c,"promoCodeAtom",0,s,"showSuccessDialogAtom",0,a,"tpccAtom",0,n])},118119,e=>{"use strict";var t=e.i(648198),r=e.i(539922),i=e.i(990420),a=e.i(666021),s=e.i(547100),o=e.i(924689),n=e.i(143851),l=e.i(269767),c=e.i(240058),u=e.i(825440),d=e.i(368847),m=e.i(677988),f=e.i(877957),p=e.i(609958),g=e.i(558802);let h=o.z.object({email:o.z.email({message:"Please enter a valid email address"}),password:o.z.string().min(8,{message:"Password must be at least 8 characters"})});e.s(["default",0,({loginBtnText:e})=>{let o=(0,s.useTranslations)("UserAuth"),{login:w}=(0,n.useUserLogin)(),[b,v]=(0,r.useState)(!1),[y,x]=(0,r.useState)(null),P=(0,i.useForm)({resolver:(0,a.zodResolver)(h),defaultValues:{email:"",password:""}}),E=async e=>{v(!0),x(null);try{await w(e.email,e.password)||(x("Invalid email or password. Please try again."),v(!1))}catch(e){x("An error occurred during login. Please try again."),v(!1),console.error("Login error:",e)}};return(0,t.jsxs)("div",{className:"@container/loginForm",children:[y&&(0,t.jsx)("div",{className:"rounded border border-red-200 bg-red-50 px-4 py-3 text-red-700",children:y}),(0,t.jsx)(l.Form,{...P,children:(0,t.jsxs)("form",{onSubmit:P.handleSubmit(E),children:[(0,t.jsx)(l.FormField,{control:P.control,name:"email",render:({field:e})=>(0,t.jsx)(l.FormItem,{children:(0,t.jsx)(l.FormControl,{children:(0,t.jsx)(u.Input,{...e,label:o("email"),icon:p.Email})})})}),(0,t.jsx)(l.FormField,{control:P.control,name:"password",render:({field:e})=>(0,t.jsx)(l.FormItem,{children:(0,t.jsx)(l.FormControl,{children:(0,t.jsx)(m.PasswordInput,{...e,label:o("password"),icon:g.Locked})})})}),(0,t.jsxs)("div",{className:"prose mb-6 flex max-w-full flex-col justify-between gap-2 @lg/loginForm:flex-row-reverse @lg/loginForm:gap-6",children:[(0,t.jsx)("div",{className:"@max-lg/loginForm:text-right",children:(0,t.jsx)(c.default,{href:"/forgot-password",className:"text-sm whitespace-nowrap hover:underline",children:o("forgotPassword")})}),(0,t.jsx)(d.Text,{className:"m-0 @lg/loginForm:max-w-xl",dangerouslySetInnerHTML:{__html:o.raw("authenticationUniformityNote")}})]}),(0,t.jsx)(f.Button,{type:"submit",loading:b,disabled:b,children:e||o("signin")})]})})]})}])},983950,e=>{"use strict";var t=e.i(648198),r=e.i(539922),i=e.i(404893),a=e.i(475566);e.s(["default",0,function({type:e="standard",text:s="continue_with",theme:o="outline",size:n="large",shape:l="rectangular",logo_alignment:c="center",className:u=""}){let d=(0,a.useAtomValue)(i.googleLoginInitilizedAtom),m=(0,r.useRef)(null);return(0,r.useEffect)(()=>{let t=window?.google?.accounts?.id;t&&t?.renderButton(m.current,{type:e,shape:l,theme:o,text:s,size:n,logo_alignment:c})},[e,o,n,s,l,c,d]),(0,t.jsx)("div",{id:"google-login-button",ref:m,className:`google-login-button ${u}`,"data-testid":"google-login-button"})}])},617145,e=>{"use strict";var t=e.i(539922),r=e.i(475566),i=e.i(491045);let a={sourcePage:null,sourceModule:null,sourceElement:null,sourceUpsellPlacement:null};var s=e.i(959194);e.s(["usePurchaseSourceAttributes",0,()=>{let e=(0,r.useAtomValue)(i.purchaseSourceAttributionAtom),o=function(e){if(!e||"string"!=typeof e)return a;let t=e.split("-");if("mktg"!==t[0])return a;let r=t[1]||null,i=t[2]||null,s=t[3]||null,o=i&&i.toLowerCase().includes("upsell")?i:null;return{sourcePage:r,sourceModule:i,sourceElement:s,sourceUpsellPlacement:o}}((0,s.getTpcc)()),n=e?.sourcePage??o.sourcePage,l=e?.sourceModule??o.sourceModule,c=e?.sourceElement??o.sourceElement,u=e?.sourceUpsellPlacement??o.sourceUpsellPlacement;return(0,t.useMemo)(()=>({...n&&{sourcePage:n},...l&&{sourceModule:l},...c&&{sourceElement:c},...u&&{sourceUpsellPlacement:u}}),[n,l,c,u])}],617145)},920654,e=>{"use strict";var t=e.i(475566),r=e.i(25681),i=e.i(499239);e.s(["useCart",0,function(){let e=(0,r.useSearchParams)().get("products"),[a,s]=(0,t.useAtom)(i.cartProductIdAtom);return{productId:e||a,setProductId:s}}])},226843,13635,963630,576816,e=>{"use strict";let t={1027:'This email address is already registered with an account. Please click "Log In" below to sign in.',11001:'Your password cannot contain the character combination "". Please try another password.',1198:"Too many failed login attempts. Please try again later.",938:e=>e?"Email or password is invalid. Please try again":"Email not found. Try another email",936:"This email address is already registered with an account. Please log in.",1134:(e,t)=>e&&t?t:t||"Must contain at least one lowercase, uppercase, special character, and a digit",1122:"Unfortunately, you've exceeded the daily limit for requests to reset your password. For security purposes, we ask that you try again later.",967:"The password you entered isn't working. Please try again, or click Forgot Password to select a new password.",1015:"Sorry, but that password is too similar to your previous one. Please try a different password.",1187:"Sorry, this password reset link has expired. To get a new reset link, please click Forgot Password.",1185:"Sorry, but it looks like the password reset link isn't working. To get a new reset link, please click Forgot Password.",1186:"Sorry, this password reset link has already been used. To get a new reset link, please click Forgot Password.",966:"Email or password is invalid. Please try again.",975:"Your password reset link has expired. Please request a new link",974:"Your password reset link has expired. Please request a new link",1038:"Email Address is invalid, Try another email."};e.s(["getErrorCodeMessage",0,function(e,r,i){let a=e&&t[e];return("function"==typeof a?a(r,i):a)||"Sorry, it looks we're having temporary problems. Please try again later."}],226843);var r=e.i(539922),i=e.i(959194),a=e.i(947118),s=e.i(737801);e.s(["useSignupStart",0,(e={})=>{let t=(0,a.useIsInitialized)(),o=(0,s.useEventAttributes)(),[n,l]=(0,r.useState)(!1),c=(0,r.useRef)(!1),u=(0,r.useMemo)(()=>{let t={...o,formVariant:e.formVariant,sourcePage:e.sourcePage,sourceModule:e.sourceModule,sourceElement:e.sourceElement,sourcePosition:e.sourcePosition,experimentJoinList:e.experimentJoinList,mParticleGranted:e.mParticleGranted??!0};return void 0===t.formVariant&&delete t.formVariant,void 0===t.sourcePage&&delete t.sourcePage,void 0===t.sourceModule&&delete t.sourceModule,void 0===t.sourceElement&&delete t.sourceElement,void 0===t.sourcePosition&&delete t.sourcePosition,void 0===t.experimentJoinList&&delete t.experimentJoinList,t},[o,e.formVariant,e.sourcePage,e.sourceModule,e.sourceElement,e.sourcePosition,e.experimentJoinList,e.mParticleGranted]);return(0,r.useEffect)(()=>{(0,i.areObjectValuesDefined)(u)&&!n&&l(!0)},[u,n]),(0,r.useCallback)(async()=>{if(t&&n&&!c.current)try{window.mParticle?.logEvent?.("signup-start",window.mParticle?.EventType?.Other,u),c.current=!0,console.debug(`MParticle: Event "signup-start" tracked - ${u.pageId}`)}catch(e){console.error('MParticle: Event "signup-start" failed',e)}},[t,u,n])}],13635),e.s(["useSignupAbandon",0,(e={})=>{let t=(0,s.useEventAttributes)(),i=(0,r.useMemo)(()=>{let r={...t,formVariant:e.formVariant,sourcePage:e.sourcePage,sourceModule:e.sourceModule,sourceElement:e.sourceElement,sourcePosition:e.sourcePosition,experimentJoinList:e.experimentJoinList,mParticleGranted:e.mParticleGranted??!0};return void 0!==e.url&&(r.url=e.url),void 0!==e.tpcc&&(r.tpcc=e.tpcc),void 0!==e.linkReferral&&(r.linkReferral=e.linkReferral),void 0===r.formVariant&&delete r.formVariant,void 0===r.sourcePage&&delete r.sourcePage,void 0===r.sourceModule&&delete r.sourceModule,void 0===r.sourceElement&&delete r.sourceElement,void 0===r.sourcePosition&&delete r.sourcePosition,void 0===r.experimentJoinList&&delete r.experimentJoinList,r},[t,e.formVariant,e.sourcePage,e.sourceModule,e.sourceElement,e.sourcePosition,e.url,e.tpcc,e.linkReferral,e.experimentJoinList,e.mParticleGranted]);(0,r.useEffect)(()=>{let e=()=>{if(window.mParticle?.isInitialized?.())try{window.mParticle?.logEvent?.("signup-abandon",window.mParticle?.EventType?.Other,i),console.debug(`MParticle: Event "signup-abandon" tracked - ${i.pageId}`)}catch(e){console.error('MParticle: Event "signup-abandon" failed',e)}};return window.addEventListener("beforeunload",e),window.addEventListener("blur",e),()=>{window.removeEventListener("beforeunload",e),window.removeEventListener("blur",e)}},[i])}],963630),e.s(["useSignupComplete",0,(e={})=>{let t=(0,a.useIsInitialized)(),o=(0,s.useEventAttributes)(),[n,l]=(0,r.useState)(!1),c=(0,r.useRef)(!1),u=(0,r.useMemo)(()=>{let t={...o,formVariant:e.formVariant,sensitiveDataAuthorization:e.sensitiveDataAuthorization,deviceTimeZone:e.deviceTimeZone,sourcePage:e.sourcePage,sourceModule:e.sourceModule,sourceElement:e.sourceElement,sourcePosition:e.sourcePosition,mParticleGranted:e.mParticleGranted??!0};return void 0!==e.url&&(t.url=e.url),void 0===t.formVariant&&delete t.formVariant,void 0===t.sensitiveDataAuthorization&&delete t.sensitiveDataAuthorization,void 0===t.deviceTimeZone&&delete t.deviceTimeZone,void 0===t.sourcePage&&delete t.sourcePage,void 0===t.sourceModule&&delete t.sourceModule,void 0===t.sourceElement&&delete t.sourceElement,void 0===t.sourcePosition&&delete t.sourcePosition,t},[o,e.formVariant,e.url,e.sensitiveDataAuthorization,e.deviceTimeZone,e.sourcePage,e.sourceModule,e.sourceElement,e.sourcePosition,e.mParticleGranted]);return(0,r.useEffect)(()=>{(0,i.areObjectValuesDefined)(u)&&!n&&l(!0)},[u,n]),(0,r.useCallback)(async()=>{if(t&&n&&!c.current)try{window.mParticle?.logEvent?.("signup-complete",window.mParticle?.EventType?.Other,u),c.current=!0,console.debug(`MParticle: Event "signup-complete" tracked - ${u.pageId}`)}catch(e){console.error('MParticle: Event "signup-complete" failed',e)}},[t,u,n])}],576816)},782847,681488,723356,526824,e=>{"use strict";var t=e.i(539922),r=e.i(959194),i=e.i(947118),a=e.i(737801),s=e.i(617145);e.s(["usePurchaseStart",0,e=>{let o=(0,i.useIsInitialized)(),n=(0,a.useEventAttributes)(),l=(0,s.usePurchaseSourceAttributes)(),[c,u]=(0,t.useState)(!1),d=(0,t.useRef)(!1),m=(0,t.useMemo)(()=>{let t={...n,...l,step:e.step??"start",accountCreated:e.accountCreated??!1,accountLogin:e.accountLogin??!1,completed:e.completed??!1,eventChainId:e.eventChainId,premiumProductId:e.premiumProductId??void 0,weatherMode:e.weatherMode??"normal",experimentJoinList:e.experimentJoinList??void 0,mParticleGranted:e.mParticleGranted??!0};return void 0===t.premiumProductId&&delete t.premiumProductId,void 0===t.experimentJoinList&&delete t.experimentJoinList,t},[n,l,e.step,e.accountCreated,e.accountLogin,e.completed,e.eventChainId,e.premiumProductId,e.weatherMode,e.experimentJoinList,e.mParticleGranted]);return(0,t.useEffect)(()=>{(0,r.areObjectValuesDefined)(m)&&!c&&u(!0)},[m,c]),(0,t.useCallback)(async()=>{if(o&&c&&!d.current)try{window.mParticle?.logEvent?.("purchase-start",window.mParticle?.EventType?.Other,m),d.current=!0,console.debug(`MParticle: Event "purchase-start" tracked - ${m.pageId}`)}catch(e){console.error('MParticle: Event "purchase-start" failed',e)}},[o,m,c])}],782847);var o=e.i(648198),n=e.i(144977),l=e.i(156207),c=e.i(291967),u=e.i(534643),d=e.i(853233),m=e.i(653747),f=e.i(556872),p="Checkbox",[g,h]=(0,l.createContextScope)(p),[w,b]=g(p);function v(e){let{__scopeCheckbox:r,checked:i,children:a,defaultChecked:s,disabled:n,form:l,name:c,onCheckedChange:d,required:m,value:f="on",internal_do_not_use_render:g}=e,[h,b]=(0,u.useControllableState)({prop:i,defaultProp:s??!1,onChange:d,caller:p}),[v,y]=t.useState(null),[x,P]=t.useState(null),E=t.useRef(!1),j=!v||!!l||!!v.closest("form"),k={checked:h,disabled:n,setChecked:b,control:v,setControl:y,name:c,form:l,value:f,hasConsumerStoppedPropagationRef:E,required:m,defaultChecked:!S(s)&&s,isFormControl:j,bubbleInput:x,setBubbleInput:P};return(0,o.jsx)(w,{scope:r,...k,children:"function"==typeof g?g(k):a})}var y="CheckboxTrigger",x=t.forwardRef(({__scopeCheckbox:e,onKeyDown:r,onClick:i,...a},s)=>{let{control:l,value:u,disabled:d,checked:m,required:p,setControl:g,setChecked:h,hasConsumerStoppedPropagationRef:w,isFormControl:v,bubbleInput:x}=b(y,e),P=(0,n.useComposedRefs)(s,g),E=t.useRef(m);return t.useEffect(()=>{let e=l?.form;if(e){let t=()=>h(E.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[l,h]),(0,o.jsx)(f.Primitive.button,{type:"button",role:"checkbox","aria-checked":S(m)?"mixed":m,"aria-required":p,"data-state":C(m),"data-disabled":d?"":void 0,disabled:d,value:u,...a,ref:P,onKeyDown:(0,c.composeEventHandlers)(r,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:(0,c.composeEventHandlers)(i,e=>{h(e=>!!S(e)||!e),x&&v&&(w.current=e.isPropagationStopped(),w.current||e.stopPropagation())})})});x.displayName=y;var P=t.forwardRef((e,t)=>{let{__scopeCheckbox:r,name:i,checked:a,defaultChecked:s,required:n,disabled:l,value:c,onCheckedChange:u,form:d,...m}=e;return(0,o.jsx)(v,{__scopeCheckbox:r,checked:a,defaultChecked:s,disabled:l,required:n,onCheckedChange:u,name:i,form:d,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(x,{...m,ref:t,__scopeCheckbox:r}),e&&(0,o.jsx)(I,{__scopeCheckbox:r})]})})});P.displayName=p;var E="CheckboxIndicator",j=t.forwardRef((e,t)=>{let{__scopeCheckbox:r,forceMount:i,...a}=e,s=b(E,r);return(0,o.jsx)(m.Presence,{present:i||S(s.checked)||!0===s.checked,children:(0,o.jsx)(f.Primitive.span,{"data-state":C(s.checked),"data-disabled":s.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});j.displayName=E;var k="CheckboxBubbleInput",I=t.forwardRef(({__scopeCheckbox:e,...r},i)=>{let a,{control:s,hasConsumerStoppedPropagationRef:l,checked:c,defaultChecked:u,required:m,disabled:p,name:g,value:h,form:w,bubbleInput:v,setBubbleInput:y}=b(k,e),x=(0,n.useComposedRefs)(i,y),P=(a=t.useRef({value:c,previous:c}),t.useMemo(()=>(a.current.value!==c&&(a.current.previous=a.current.value,a.current.value=c),a.current.previous),[c])),E=(0,d.useSize)(s);t.useEffect(()=>{if(!v)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set,t=!l.current;if(P!==c&&e){let r=new Event("click",{bubbles:t});v.indeterminate=S(c),e.call(v,!S(c)&&c),v.dispatchEvent(r)}},[v,P,c,l]);let j=t.useRef(!S(c)&&c);return(0,o.jsx)(f.Primitive.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??j.current,required:m,disabled:p,name:g,value:h,form:w,...r,tabIndex:-1,ref:x,style:{...r.style,...E,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function S(e){return"indeterminate"===e}function C(e){return S(e)?"indeterminate":e?"checked":"unchecked"}I.displayName=k;var A=e.i(632137),M=e.i(269767),R=e.i(747961);let N=(0,t.forwardRef)(({title:e,titleId:t,desc:r,descId:i,...a},s)=>(0,o.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:s,"aria-labelledby":t,"aria-describedby":i,...a,children:[r?(0,o.jsx)("desc",{id:i,children:r}):null,void 0===e?(0,o.jsx)("title",{id:t,children:"Checkbox Checked"}):e?(0,o.jsx)("title",{id:t,children:e}):null,(0,o.jsx)("path",{fill:"currentColor",d:"M13 2a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zM7 9.173 5.295 7.5l-.795.771L7 10.75l.348-.346.005-.003L11.1 6.688l.005-.01.395-.389-.796-.789z"})]})),L=t.default.forwardRef((e,t)=>(0,o.jsx)(R.BaseIcon,{ref:t,icon:N,...e}));L.displayName="CheckboxCheckedFilled";let F=(0,t.forwardRef)(({title:e,titleId:t,desc:r,descId:i,...a},s)=>(0,o.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:s,"aria-labelledby":t,"aria-describedby":i,...a,children:[r?(0,o.jsx)("desc",{id:i,children:r}):null,void 0===e?(0,o.jsx)("title",{id:t,children:"Checkbox Indeterminate"}):e?(0,o.jsx)("title",{id:t,children:e}):null,(0,o.jsxs)("g",{fill:"currentColor",children:[(0,o.jsx)("path",{d:"M11 8a1 1 0 0 0-1-1H6a1 1 0 0 0 0 2h4a1 1 0 0 0 1-1"}),(0,o.jsx)("path",{d:"M13 2H3a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1M3.5 13a.5.5 0 0 1-.5-.5v-9a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5z"})]})]})),T=t.default.forwardRef((e,t)=>(0,o.jsx)(R.BaseIcon,{ref:t,icon:F,...e}));T.displayName="CheckboxIndeterminate";let D=(0,t.forwardRef)(({title:e,titleId:t,desc:r,descId:i,...a},s)=>(0,o.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:s,"aria-labelledby":t,"aria-describedby":i,...a,children:[r?(0,o.jsx)("desc",{id:i,children:r}):null,void 0===e?(0,o.jsx)("title",{id:t,children:"Checkbox"}):e?(0,o.jsx)("title",{id:t,children:e}):null,(0,o.jsx)("path",{fill:"currentColor",d:"M13 2H3a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1M3.5 13a.5.5 0 0 1-.5-.5v-9a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5z"})]})),O=t.default.forwardRef((e,t)=>(0,o.jsx)(R.BaseIcon,{ref:t,icon:D,...e}));function _({className:e,checked:r,defaultChecked:i,onCheckedChange:a,...s}){let[n,l]=(0,t.useState)(void 0!==r?r:i||!1);(0,t.useEffect)(()=>{void 0!==r&&l(r)},[r]);let c="indeterminate"===n?T:n?L:O;return(0,o.jsx)(P,{"data-slot":"checkbox",className:(0,A.cn)("peer disabled:cursor-not-allowed disabled:opacity-50",e),...s,checked:n,onCheckedChange:e=>{void 0===r&&l(e),a?.(e)},children:(0,o.jsx)(j,{className:"flex items-center justify-center text-current transition-none","data-slot":"checkbox-indicator",forceMount:!0,children:(0,o.jsx)(c,{className:"size-6"})})})}O.displayName="Checkbox",e.s(["Checkbox",0,({id:e,label:t,size:r="standard",wrapperClassName:i,leftPos:a,...s})=>(0,o.jsxs)(M.FormItem,{id:e,className:(0,A.cn)("flex w-full gap-3",a?"flex-row-reverse justify-end":"flex-row justify-between",i),children:[(0,o.jsx)("div",{className:"pt-0.5",children:(0,o.jsx)(M.FormLabel,{className:(0,A.cn)("large"===r&&"text-lg"),children:t})}),(0,o.jsx)("div",{children:(0,o.jsx)(M.FormControl,{children:(0,o.jsx)(_,{...s})})})]})],681488);let U=(0,t.forwardRef)(({title:e,titleId:t,desc:r,descId:i,...a},s)=>(0,o.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:s,"aria-labelledby":t,"aria-describedby":i,...a,children:[r?(0,o.jsx)("desc",{id:i,children:r}):null,void 0===e?(0,o.jsx)("title",{id:t,children:"Person"}):e?(0,o.jsx)("title",{id:t,children:e}):null,(0,o.jsx)("g",{fill:"currentColor",children:(0,o.jsx)("path",{d:"M8.936 15H7.07a.92.92 0 0 1-.66-.283.98.98 0 0 1-.274-.683v-3.379a.92.92 0 0 1-.66-.283.98.98 0 0 1-.273-.682V6.793c0-.384.148-.752.41-1.024.263-.272.619-.424.99-.424h2.8c.371 0 .727.152.99.424s.41.64.41 1.024V9.69a.98.98 0 0 1-.273.682.92.92 0 0 1-.66.283v3.38a.98.98 0 0 1-.274.682.92.92 0 0 1-.66.283M6.603 6.31a.43.43 0 0 0-.339.132.46.46 0 0 0-.128.351V9.69h.934v4.345h1.866V9.69h.934V6.793a.47.47 0 0 0-.128-.35.44.44 0 0 0-.339-.133zM8.003 4.862c-.37 0-.73-.113-1.037-.325a1.9 1.9 0 0 1-.687-.867 2 2 0 0 1-.107-1.116c.072-.374.25-.718.511-.988s.594-.454.956-.529a1.8 1.8 0 0 1 1.078.11c.342.146.633.394.838.711.205.318.315.691.315 1.073 0 .512-.197 1.003-.547 1.365s-.825.566-1.32.566m0-2.896a.9.9 0 0 0-.518.162.96.96 0 0 0-.344.434 1 1 0 0 0 .202 1.052c.13.135.297.227.478.264a.9.9 0 0 0 .54-.055.94.94 0 0 0 .418-.356.99.99 0 0 0-.116-1.219.92.92 0 0 0-.66-.282"})})]})),G=t.default.forwardRef((e,t)=>(0,o.jsx)(R.BaseIcon,{ref:t,icon:U,...e}));G.displayName="Person",e.s(["Person",0,G],723356);var V=e.i(528600),z=e.i(475566);let B=(0,e.i(233601).atomWithStorage)("upsxLastNames",{},void 0,{getOnInit:!0}),Y=e=>btoa(e.trim().toLowerCase());e.s(["useUserLastName",0,()=>{let{userProfile:e}=(0,V.useUser)(),{email:r}=e||{},i=(0,z.useSetAtom)(B),a=(0,z.useAtomValue)(B),s=(0,t.useCallback)((e,t)=>{i(r=>({...r,[Y(e)]:t}))},[]);return{userLastName:a[Y(r||"")]||void 0,setUserLastName:s}}],526824)},264268,e=>{"use strict";var t=e.i(648198),r=e.i(539922),i=e.i(990420),a=e.i(666021),s=e.i(924689),o=e.i(547100),n=e.i(790010),l=e.i(226843),c=e.i(13635),u=e.i(963630),d=e.i(576816),m=e.i(782847),f=e.i(269767),p=e.i(825440),g=e.i(677988),h=e.i(681488),w=e.i(877957),b=e.i(368847),v=e.i(240058),y=e.i(837879),x=e.i(609958),P=e.i(723356),E=e.i(558802),j=e.i(422825),k=e.i(918462),I=e.i(25681),S=e.i(528600),C=e.i(725296),A=e.i(394481),M=e.i(526824),R=e.i(703123),N=e.i(475566),L=e.i(499239),F=e.i(920654);let T=s.z.object({firstName:s.z.string().min(1,{error:"First name is required"}),lastName:s.z.string().min(1,{error:"Last name is required"}),email:s.z.email({message:"Please enter a valid email address"}),password:s.z.string().min(8,{message:"Password must be at least 8 characters"}).regex(/[^A-Za-z0-9\s]/,{message:"Password must include at least one special character"}),newsletterEmails:s.z.boolean().optional(),weeklyEmails:s.z.boolean().optional(),marketingEmails:s.z.boolean().optional(),onYourRadarEmails:s.z.boolean().optional()});e.s(["default",0,({signupBtnText:e})=>{let s=(0,o.useTranslations)("UserAuth"),{signup:D,authRedirect:O}=(0,n.useUserSignup)(),{updateEmailSubscriptions:_}=(0,j.useEmailPreferences)(),[U,G]=(0,r.useState)(!1),[V,z]=(0,r.useState)(null),{user:B}=(0,S.useUser)(),Y=(0,y.useSubscriptionsEnabled)(),$=(0,N.useAtomValue)(A.privacyRegimeAtom)??C.default.EXEMPT,H=(0,I.useParams)()?.locale||"",J=B?.isUserLoggedIn||!1,{legalLinks:W}=(0,k.useFooterLinks)($,H,J,!1),{productId:Z}=(0,F.useCart)(),q=(0,N.useAtomValue)(L.eventChainIdAtom),{setUserLastName:K}=(0,M.useUserLastName)(),X=(0,N.useSetAtom)(R.gsiEmailStatesAtom),Q=(0,i.useForm)({resolver:(0,a.zodResolver)(T),defaultValues:{firstName:"",lastName:"",email:"",password:""}}),[ee,et,er,ei]=Q.watch(["newsletterEmails","weeklyEmails","onYourRadarEmails","marketingEmails"]);(0,r.useEffect)(()=>X({newsletter:ee,weekly:et,onYourRadar:er,marketing:ei}),[X,ee,et,er,ei]);let ea=(0,c.useSignupStart)({formVariant:"checkout",sourceModule:null,sourceElement:"subscriptionnull",sourcePosition:"header-3"});(0,r.useEffect)(()=>{ea()},[ea]),(0,u.useSignupAbandon)({formVariant:"checkout",sourceModule:null,sourceElement:"subscriptionnull",sourcePosition:"header-3"});let es=(0,m.usePurchaseStart)({step:"account",accountCreated:!0,accountLogin:!1,completed:!1,eventChainId:q||"",premiumProductId:Z}),eo=(0,d.useSignupComplete)({formVariant:"subscription page",sensitiveDataAuthorization:!0,deviceTimeZone:"u">typeof Intl?Intl.DateTimeFormat().resolvedOptions().timeZone:void 0}),en=(0,r.useMemo)(()=>W.find(e=>"termsOfUse"===e.titleTranslationKey),[W]),el=(0,r.useMemo)(()=>W.find(e=>"privacyPolicy"===e.titleTranslationKey),[W]),ec=async e=>{G(!0),z(null);try{let{success:t,error:r}=await D({firstName:e.firstName,email:e.email,password:e.password},!1);if(!t){z((0,l.getErrorCodeMessage)(r.messageCode)),G(!1);return}K(e.email,e.lastName),es(),await eo(),await _({newsletter:e.newsletterEmails,weekly:e.weeklyEmails,onYourRadar:e.onYourRadarEmails,marketing:e.marketingEmails}).catch(e=>{console.error("Failed to update email subscriptions",e)}),O()}catch(e){z("An error occurred during registration. Please try again."),console.error("Signup error:",e),G(!1)}};return(0,t.jsxs)("div",{children:[V&&(0,t.jsx)(b.Text,{color:"error",className:"mb-4",children:V}),(0,t.jsx)(f.Form,{...Q,children:(0,t.jsxs)("form",{onSubmit:Q.handleSubmit(ec),children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsx)(f.FormField,{control:Q.control,name:"firstName",render:({field:e})=>(0,t.jsx)(f.FormItem,{children:(0,t.jsx)(f.FormControl,{children:(0,t.jsx)(p.Input,{...e,label:s("firstName"),icon:P.Person})})})}),(0,t.jsx)(f.FormField,{control:Q.control,name:"lastName",render:({field:e})=>(0,t.jsx)(f.FormItem,{children:(0,t.jsx)(f.FormControl,{children:(0,t.jsx)(p.Input,{...e,label:s("lastName"),icon:P.Person})})})})]}),(0,t.jsx)(f.FormField,{control:Q.control,name:"email",render:({field:e})=>(0,t.jsx)(f.FormItem,{children:(0,t.jsx)(f.FormControl,{children:(0,t.jsx)(p.Input,{...e,label:s("email"),icon:x.Email})})})}),(0,t.jsx)(f.FormField,{control:Q.control,name:"password",render:({field:e})=>(0,t.jsx)(f.FormItem,{children:(0,t.jsx)(f.FormControl,{children:(0,t.jsx)(g.PasswordInput,{...e,label:s("password"),icon:E.Locked})})})}),Y&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.FormField,{control:Q.control,name:"newsletterEmails",render:({field:{value:e,onChange:r,...i}})=>(0,t.jsx)(h.Checkbox,{...i,checked:e,onCheckedChange:r,label:s("newsletterEmailsConsent"),wrapperClassName:"mb-6",leftPos:!0})}),(0,t.jsx)(f.FormField,{control:Q.control,name:"weeklyEmails",defaultValue:!0,render:({field:{value:e,onChange:r,...i}})=>(0,t.jsx)(h.Checkbox,{...i,checked:e,onCheckedChange:r,label:s("weeklyEmailsConsent"),wrapperClassName:"mb-6",leftPos:!0})}),(0,t.jsx)(f.FormField,{control:Q.control,name:"onYourRadarEmails",defaultValue:!0,render:({field:{value:e,onChange:r,...i}})=>(0,t.jsx)(h.Checkbox,{...i,checked:e,onCheckedChange:r,label:s("onYourRadarEmailsConsent"),wrapperClassName:"mb-6",leftPos:!0})}),(0,t.jsx)(f.FormField,{control:Q.control,name:"marketingEmails",defaultValue:!0,render:({field:{value:e,onChange:r,...i}})=>(0,t.jsx)(h.Checkbox,{...i,checked:e,onCheckedChange:r,label:s("marketingEmailsConsent"),wrapperClassName:"mb-6",leftPos:!0})})]}),(0,t.jsx)(b.Text,{className:"mt-4 mb-8 font-normal",children:s.rich("agreeTermsContinue",{div:e=>(0,t.jsx)(v.default,{href:en?.url||"",className:"text-blue-600 underline",children:e}),p:e=>(0,t.jsx)(v.default,{href:el?.url||"",className:"text-blue-600 underline",children:e})})}),(0,t.jsx)(w.Button,{type:"submit",loading:U,disabled:U,children:e||s("signup")})]})})]})}])}]);