(globalThis["TURBOPACK_remote_chunk_loading_global_wx-next-web"]||(globalThis["TURBOPACK_remote_chunk_loading_global_wx-next-web"]=[])).push(["object"==typeof document?document.currentScript:void 0,171176,e=>{"use strict";var t=e.i(902875),r=e.i(247865),o=e.i(990420),i=e.i(732520),n=e.i(924689),a=e.i(581014),s=e.i(695881),l=e.i(553329),c=e.i(790010),u=e.i(226843),d=e.i(61284),m=e.i(293163),p=e.i(947118),g=e.i(737801),h=e.i(576816),f=e.i(782847),w=e.i(617145),v=e.i(477728),b=e.i(546446),x=e.i(540768),y=e.i(682142),C=e.i(782937),k=e.i(333350),P=e.i(64412),S=e.i(950771),E=e.i(537989),I=e.i(695203),j=e.i(158662),A=e.i(358273),M=e.i(777638),L=e.i(727365),R=e.i(896363),T=e.i(924776),N=e.i(605781);let F=(0,s.createLogger)("useSignupStart"),V=["SUN","MON","TUE","WED","THU","FRI","SAT"],O=new Set(["city","locality","neighborhood","airport","postal","poi","ski","geocode","locid"]),D=new Set(["mapbox","twc-poi","twc-v3-loc-search","twc-v3-loc-point"]),z=["appVersion","cookiesEnabled","dayOfWeek","deviceClass","functionalTechnologies","geographicallyRelevantAds","gpcSignalOptOut","hourOfDay","locale","pageId","partner","physicalCountry","physicalState","priv","regime","sessionId","sessionStartTime","url","wlocCity","wlocCountry","wlocDMA","wlocState"],U=(0,s.createLogger)("useSignupAbandon"),H=["SUN","MON","TUE","WED","THU","FRI","SAT"],W=new Set(["city","locality","neighborhood","airport","postal","poi","ski","geocode","locid"]),G=new Set(["mapbox","twc-poi","twc-v3-loc-search","twc-v3-loc-point"]),J=["appVersion","cookiesEnabled","dayOfWeek","deviceClass","functionalTechnologies","geographicallyRelevantAds","gpcSignalOptOut","hourOfDay","locale","pageId","partner","physicalCountry","physicalState","priv","regime","sessionId","sessionStartTime","url","wlocCity","wlocCountry","wlocDMA","wlocState"];var _=e.i(539353),B=e.i(964937),Y=e.i(269767),K=e.i(825440),q=e.i(677988),Z=e.i(681488),$=e.i(877957),X=e.i(495110),Q=e.i(368847),ee=e.i(240058),et=e.i(837879),er=e.i(609958),eo=e.i(723356),ei=e.i(558802),en=e.i(422825),ea=e.i(918462),es=e.i(725287),el=e.i(528600),ec=e.i(526824),eu=e.i(725296),ed=e.i(394481),em=e.i(703123),ep=e.i(499239),eg=e.i(920654),eh=e.i(829862);let ef=(0,s.createLogger)("SignupForm"),ew={signupPage:{startAbandon:"signup",complete:"account page"},checkout:{startAbandon:"checkout",complete:"subscription page"}};e.s(["default",0,({signupBtnText:e,redirectToCheckoutOnSignup:s=!1,analyticsSurface:ev="checkout",showLastName:eb=!1,hideConfirmPassword:ex=!1,hideNewsletters:ey=!1})=>{let eC=ew[ev],ek=(0,a.useTranslations)("UserAuth"),{signup:eP,authRedirect:eS}=(0,c.useUserSignup)(),{updateEmailSubscriptions:eE}=(0,en.useEmailPreferences)({skipStatus:!0}),[eI,ej]=(0,r.useState)(!1),eA=(0,X.useIsHydratingRender)(),[eM,eL]=(0,r.useState)(null),[eR,eT]=(0,r.useState)(!1),{user:eN}=(0,el.useUser)(),eF=(0,et.useSubscriptionsEnabled)(),eV=(0,b.useAtomValue)(ed.privacyRegimeAtom)??eu.default.EXEMPT,eO=eF&&eu.US_REGIMES.includes(eV)&&eV!==eu.default.USA_CCPA,eD=(0,es.useParams)()?.locale||"",ez=eN?.isUserLoggedIn||!1,{legalLinks:eU}=(0,ea.useFooterLinks)(eV,eD,ez),{productId:eH}=(0,eg.useCart)(),eW=(0,eh.useCheckoutContext)().premiumProductId??eH,eG=(0,b.useAtomValue)(ep.eventChainIdAtom),eJ=(0,b.useSetAtom)(em.gsiEmailStatesAtom),{setUserLastName:e_}=(0,ec.useUserLastName)(),eB=(0,r.useMemo)(()=>n.z.object({firstName:n.z.string().min(1,{error:ek("firstNameRequired")}),lastName:n.z.string(),email:n.z.email({message:ek("invalidEmailError")}),password:n.z.string().min(8,{message:ek("passwordMinLength")}).regex(/\d/,{message:ek("passwordDigitRequired")}).regex(/[^A-Za-z0-9\s]/,{message:ek("passwordSpecialChar")}),confirmPassword:ex?n.z.string():n.z.string().min(1,{message:ek("confirmPasswordRequired")}),newsletterEmails:n.z.boolean().optional(),weeklyEmails:n.z.boolean().optional(),marketingEmails:n.z.boolean().optional(),onYourRadarEmails:n.z.boolean().optional()}).refine(e=>ex||e.password===e.confirmPassword,{message:ek("passwordsMustMatch"),path:["confirmPassword"]}).refine(e=>!eb||e.lastName.trim().length>0,{message:ek("lastNameRequired"),path:["lastName"]}),[ek,eb,ex]),eY=(0,o.useForm)({resolver:(0,i.zodResolver)(eB),defaultValues:{firstName:"",lastName:"",email:"",password:"",confirmPassword:""}}),[eK,eq,eZ,e$]=eY.watch(["newsletterEmails","weeklyEmails","onYourRadarEmails","marketingEmails"]),eX=eO||eZ,eQ=eO||e$;(0,r.useEffect)(()=>eJ({newsletter:eK,weekly:eq,onYourRadar:eX,marketing:eQ}),[eJ,eK,eq,eX,eQ]);let e0=(0,w.usePurchaseSourceAttributes)(),e1=((e={})=>{let t=(0,p.useIsInitialized)(),o=(0,g.useEventAttributes)(),[i,n]=(0,r.useState)(!1),a=(0,r.useRef)(!1),s=(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,m.areObjectValuesDefined)(s)&&!i&&n(!0)},[s,i]),(0,r.useCallback)(async()=>{if(t&&i&&!a.current)try{window.mParticle?.logEvent?.("signup-start",window.mParticle?.EventType?.Other,s),a.current=!0,console.debug(`MParticle: Event "signup-start" tracked - ${s.pageId}`)}catch(e){console.error('MParticle: Event "signup-start" failed',e)}},[t,s,i])})({formVariant:eC.startAbandon,sourcePage:e0.sourcePage,sourceModule:e0.sourceModule??null,sourceElement:e0.sourceElement??null}),e5=((e={})=>{let t=(0,b.useAtomValue)(E.pageIdAtom),o=(0,b.useAtomValue)(S.pageLocaleAtom),i=(0,b.useAtomValue)(I.deviceClassAtom),{location:n,isLoading:a}=(0,P.useLocation)(),s=(0,b.useAtomValue)(j.experimentJoinListAtom),l=(0,T.useIsHightouchReady)(),c=(0,r.useRef)(!1),{formVariant:u,url:d,sourcePage:m,sourceModule:p,sourceElement:g,sourcePosition:h}=e,f=(0,r.useMemo)(()=>{if(!k.default)return null;let e=(0,y.getCICookie)(),r=e?.["TWC-GeoIP-Country"]??(0,x.getCookie)("twc-location-country"),a=e?.["TWC-GeoIP-Region"]??(0,x.getCookie)("twc-location-region"),l=e?.["TWC-Privacy"]??(0,x.getCookie)("twc-privacy"),c=window.DprSdk?.getGdprConsentOptInsString()??"",f=window.DprSdk?.getCcpaSaleOptInString()??"",w=window.navigator?.globalPrivacyControl??!1,v=c?.includes("functional-technology")??!1,b=window.DprSdk?.getUserConsent("geographically-relevant-advertising")!==!1,P=navigator?.cookieEnabled??!1,S=(0,x.getCookie)("partner")||"",E=(0,C.getPartnerByPattern)(S)??S,I=(0,A.getMetricsSession)(),j=I?.sessionId||"",T=I?.sessionStartTime||0,N=new Date,F=N.getHours(),z=V[N.getDay()]??"",U=-N.getTimezoneOffset()/60,H=document.referrer,W=(0,L.normalizeWlocType)(n?.type),G=n?.featureSource??null;return{formVariant:u,url:d??"",sourcePage:m??null,sourceModule:p??null,sourceElement:g??null,sourcePosition:h??null,pageId:t??"",locale:o,deviceClass:i,sessionId:j,sessionStartTime:T,partner:E,wlocCity:n?.city??null,wlocCountry:n?.countryCode??null,wlocState:n?.adminDistrictCode??null,wlocDMA:n?.dmaCd??null,wlocId:n?.placeId??null,wlocFeatureSource:null!=G&&D.has(G)?G:void 0,wlocTags:n?.tags?.length?(0,R.parseArrayToString)(n.tags):null,wlocType:null!==W&&O.has(W)?W:void 0,wlocFeatureId:n?.featureId??null,dayOfWeek:z,regime:l??"",cookiesEnabled:P,gpcSignalOptOut:w,functionalTechnologies:v,geographicallyRelevantAds:b,priv:c,privProducts:f,referrer:H,deviceTimeZone:U,hourOfDay:F,physicalCountry:r??"",physicalState:a??"",campaign:(0,M.getCampaign)()??void 0,tpcc:(0,M.getTpcc)(),linkReferral:(0,M.getLinkReferral)(),experimentJoinList:s,weatherMode:"normal",samsungVersion:(0,M.getSamsungVersion)(),appVersion:"0404f88080af60073c643d025e42bd9b3fcc20b4".slice(0,10)}},[u,d,m,p,g,h,t,o,i,n,s]),w=l&&null!==f&&!a&&z.every(e=>void 0!==f[e]);return(0,r.useCallback)(()=>{if(f&&w&&!c.current)try{(0,N.trackSignupStart)(f),c.current=!0,F.info('Hightouch: Event "signup-start" tracked')}catch(e){F.error('Hightouch: Event "signup-start" failed',{error:e})}},[f,w])})({formVariant:eC.startAbandon,url:"/subscribe/checkout/signup",sourcePage:e0.sourcePage,sourceModule:e0.sourceModule??null,sourceElement:e0.sourceElement??null});(0,r.useEffect)(()=>{e1(),e5()},[e1,e5]),((e={})=>{let t=(0,g.useEventAttributes)(),o=(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,o),console.debug(`MParticle: Event "signup-abandon" tracked - ${o.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)}},[o])})({formVariant:eC.startAbandon,sourcePage:e0.sourcePage,sourceModule:e0.sourceModule??null,sourceElement:e0.sourceElement??null}),((e={})=>{let t=(0,b.useAtomValue)(E.pageIdAtom),o=(0,b.useAtomValue)(S.pageLocaleAtom),i=(0,b.useAtomValue)(I.deviceClassAtom),{location:n}=(0,P.useLocation)(),a=(0,b.useAtomValue)(j.experimentJoinListAtom),s=(0,T.useIsHightouchReady)(),{formVariant:l,url:c,sourcePage:u,sourceModule:d,sourceElement:m,sourcePosition:p,sourceUpsellPlacement:g,disabled:h=!1}=e,f=(0,r.useMemo)(()=>{if(!k.default)return null;let e=(0,y.getCICookie)(),r=e?.["TWC-GeoIP-Country"]??(0,x.getCookie)("twc-location-country"),s=e?.["TWC-GeoIP-Region"]??(0,x.getCookie)("twc-location-region"),h=e?.["TWC-Privacy"]??(0,x.getCookie)("twc-privacy"),f=window.DprSdk?.getGdprConsentOptInsString()??"",w=window.DprSdk?.getCcpaSaleOptInString()??"",v=window.navigator?.globalPrivacyControl??!1,b=f?.includes("functional-technology")??!1,P=window.DprSdk?.getUserConsent("geographically-relevant-advertising")!==!1,S=navigator?.cookieEnabled??!1,E=(0,x.getCookie)("partner")||"",I=(0,C.getPartnerByPattern)(E)??E,j=(0,A.getMetricsSession)(),T=j?.sessionId||"",N=j?.sessionStartTime||0,F=new Date,V=F.getHours(),O=H[F.getDay()]??"",D=-F.getTimezoneOffset()/60,z=document.referrer,U=(0,L.normalizeWlocType)(n?.type),J=n?.featureSource??null;return{formVariant:l,url:c??"",sourcePage:u??null,sourceModule:d??null,sourceElement:m??null,sourcePosition:p??null,pageId:t??"",locale:o??null,deviceClass:i,sessionId:T,sessionStartTime:N,partner:I,wlocCity:n?.city??null,wlocCountry:n?.countryCode??null,wlocState:n?.adminDistrictCode??null,wlocDMA:n?.dmaCd??null,wlocId:n?.placeId??null,wlocFeatureSource:null!=J&&G.has(J)?J:void 0,wlocTags:n?.tags?.length?(0,R.parseArrayToString)(n.tags):null,wlocType:null!==U&&W.has(U)?U:void 0,wlocFeatureId:n?.featureId??null,dayOfWeek:O,regime:h??"",cookiesEnabled:S,gpcSignalOptOut:v,functionalTechnologies:b,geographicallyRelevantAds:P,priv:f,privProducts:w,referrer:z,deviceTimeZone:D,hourOfDay:V,physicalCountry:r??"",physicalState:s??"",sourceUpsellPlacement:g,campaign:(0,M.getCampaign)()??void 0,tpcc:(0,M.getTpcc)(),linkReferral:(0,M.getLinkReferral)(),experimentJoinList:a,weatherMode:"normal",samsungVersion:(0,M.getSamsungVersion)(),appVersion:"0404f88080af60073c643d025e42bd9b3fcc20b4".slice(0,10)}},[l,c,u,d,m,p,t,o,i,n,a,g]),w=s&&null!==f&&J.every(e=>void 0!==f[e]),v=(0,r.useRef)(f),F=(0,r.useRef)(w),V=(0,r.useRef)(h);(0,r.useEffect)(()=>{v.current=f},[f]),(0,r.useEffect)(()=>{F.current=w},[w]),(0,r.useEffect)(()=>{V.current=h},[h]),(0,r.useEffect)(()=>{let e=()=>{if(v.current&&F.current&&!V.current)try{(0,N.trackSignupAbandon)(v.current),U.info('Hightouch: Event "signup-abandon" tracked')}catch(e){U.error('Hightouch: Event "signup-abandon" failed',{error:e})}};return window.addEventListener("beforeunload",e),window.addEventListener("blur",e),()=>{window.removeEventListener("beforeunload",e),window.removeEventListener("blur",e)}},[])})({formVariant:eC.startAbandon,url:"/subscribe/checkout/signup",sourcePage:e0.sourcePage,sourceModule:e0.sourceModule??null,sourceElement:e0.sourceElement??null,sourceUpsellPlacement:e0.sourceUpsellPlacement,disabled:eR});let e7=(0,f.usePurchaseStart)({step:1,url:"/subscribe/checkout/signup",accountCreated:!1,accountLogin:!1,completed:!1,eventChainId:eG||"",premiumProductId:eW}),e3=(0,v.usePurchaseStart)({step:1,url:"/subscribe/checkout/signup",accountCreated:!1,accountLogin:!1,completed:!1,eventChainId:eG||"",premiumProductId:eW}),e8=(0,B.useTrackSubscriptionAttempted)();(0,r.useEffect)(()=>{e7(),e3(),e8({step:"account",url:"/subscribe/checkout/signup",completed:!1,eventChainId:eG||""})},[e7,e3,e8,eG]);let e2=(0,h.useSignupComplete)({formVariant:eC.complete,sensitiveDataAuthorization:!0,deviceTimeZone:"u">typeof Intl?Intl.DateTimeFormat().resolvedOptions().timeZone:void 0}),e6=(0,_.useSignupComplete)({formVariant:eC.complete,url:"/subscribe/checkout/signup",newsletterOptedIn:eK??!1,marketingOptedIn:eQ??!1,sourcePage:e0.sourcePage,sourceModule:e0.sourceModule??null,sourceElement:e0.sourceElement??null}),e4=(0,r.useMemo)(()=>eU.find(e=>"termsOfUse"===e.titleTranslationKey),[eU]),e9=(0,r.useMemo)(()=>eU.find(e=>"privacyPolicy"===e.titleTranslationKey),[eU]),te=async e=>{let{success:t,error:r}=await eP({firstName:e.firstName,email:e.email,password:e.password},!1,{skipSignupCompleteEvent:!0});if(!t){eL((0,u.getErrorCodeMessage)(r.messageCode)),ej(!1);return}(eT(!0),eb&&e.lastName&&e_(e.email,e.lastName),await e2(),e6(),await eE({newsletter:e.newsletterEmails,weekly:e.weeklyEmails,onYourRadar:eO||e.onYourRadarEmails,marketing:eO||e.marketingEmails}).catch(e=>{ef.error("Failed to update email subscriptions",e)}),eF&&s)?eS(d.PROMO_CHECKOUT_URL):eS()},tt=async e=>{ej(!0),eL(null);let{error:t}=await (0,l.tryCatch)(te(e));t&&(eL(ek("signupGenericError")),ef.error("Signup error:",t),ej(!1))},tr=(0,t.jsx)(Y.FormField,{control:eY.control,name:"firstName",render:({field:e})=>(0,t.jsx)(Y.FormItem,{children:(0,t.jsx)(Y.FormControl,{children:(0,t.jsx)(K.Input,{...e,label:ek("firstName"),icon:eo.Person})})})}),to=(0,t.jsx)(Y.FormField,{control:eY.control,name:"password",render:({field:e})=>(0,t.jsx)(Y.FormItem,{children:(0,t.jsx)(Y.FormControl,{children:(0,t.jsx)(q.PasswordInput,{...e,label:ek("password"),icon:ei.Locked})})})});return(0,t.jsxs)("div",{className:"@container",children:[eM&&(0,t.jsx)(Q.Text,{color:"error",className:"mb-4",children:eM}),(0,t.jsx)(Y.Form,{...eY,children:(0,t.jsxs)("form",{method:"post",onSubmit:eY.handleSubmit(tt),children:[eb?(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-0 @lg:grid-cols-2 @lg:gap-8",children:[tr,(0,t.jsx)(Y.FormField,{control:eY.control,name:"lastName",render:({field:e})=>(0,t.jsx)(Y.FormItem,{children:(0,t.jsx)(Y.FormControl,{children:(0,t.jsx)(K.Input,{...e,label:ek("lastName"),icon:eo.Person})})})})]}):tr,(0,t.jsx)(Y.FormField,{control:eY.control,name:"email",render:({field:e})=>(0,t.jsx)(Y.FormItem,{children:(0,t.jsx)(Y.FormControl,{children:(0,t.jsx)(K.Input,{...e,label:ek("email"),icon:er.Email})})})}),ex?to:(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-0 @lg:grid-cols-2 @lg:gap-8",children:[to,(0,t.jsx)(Y.FormField,{control:eY.control,name:"confirmPassword",render:({field:e})=>(0,t.jsx)(Y.FormItem,{children:(0,t.jsx)(Y.FormControl,{children:(0,t.jsx)(q.PasswordInput,{...e,label:ek("confirmPassword"),icon:ei.Locked})})})})]}),eF&&(0,t.jsxs)("div",{className:"px-6",children:[!ey&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(Y.FormField,{control:eY.control,name:"newsletterEmails",render:({field:{value:e,onChange:r,...o}})=>(0,t.jsx)(Z.Checkbox,{...o,checked:e,onCheckedChange:r,label:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("strong",{className:"contents",children:"Morning Brief:"})," ","Your local forecast, plus weather insights, stunning photos and our meteorologists’ top picks. All in one place, every morning."]}),wrapperClassName:"mb-4.5",labelClassName:"text-[13px]",leftPos:!0})}),(0,t.jsx)(Y.FormField,{control:eY.control,name:"weeklyEmails",defaultValue:!0,render:({field:{value:e,onChange:r,...o}})=>(0,t.jsx)(Z.Checkbox,{...o,checked:e,onCheckedChange:r,label:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("strong",{className:"contents",children:"Weekly Brief:"})," ","Prefer a weekly summary? Get personalized weather information and analysis from our experts. Stay informed and prepared."]}),wrapperClassName:"mb-4.5",labelClassName:"text-[13px]",leftPos:!0})})]}),!eO&&(0,t.jsxs)(t.Fragment,{children:[!ey&&(0,t.jsx)(Y.FormField,{control:eY.control,name:"onYourRadarEmails",defaultValue:!0,render:({field:{value:e,onChange:r,...o}})=>(0,t.jsx)(Z.Checkbox,{...o,checked:e,onCheckedChange:r,label:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("strong",{className:"contents",children:"On Your Radar:"})," ","a weekly newsletter that highlights new products, tools, and features you need to know about."]}),wrapperClassName:"mb-4.5",labelClassName:"text-[13px]",leftPos:!0})}),(0,t.jsx)(Y.FormField,{control:eY.control,name:"marketingEmails",defaultValue:!0,render:({field:{value:e,onChange:r,...o}})=>(0,t.jsx)(Z.Checkbox,{...o,checked:e,onCheckedChange:r,label:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("strong",{className:"contents",children:"Offers & Promotions:"})," ","Stop paying full price – our curated offers deliver hand-picked discounts and product reviews across everything from outdoor gear to home essentials, so you never miss out on the sales."]}),wrapperClassName:"mb-4.5",labelClassName:"text-[13px]",leftPos:!0})})]})]}),(0,t.jsx)(Q.Text,{className:"my-4 py-2.5 text-[13px] font-normal",children:ek.rich("agreeTermsContinue",{termsOfUse:e=>(0,t.jsx)(ee.default,{href:e4?.url||"",className:"text-blue-600 underline",children:e}),privacyPolicy:e=>(0,t.jsx)(ee.default,{href:e9?.url||"",className:"text-blue-600 underline",children:e})})}),(0,t.jsx)($.Button,{type:"submit",loading:eI,disabled:eI||eA,className:"bg-brand-300 h-12 w-full leading-[1.5] font-bold",children:e||ek("signup")})]})})]})}],171176)},782847,477728,681488,526824,920654,e=>{"use strict";var t=e.i(247865),r=e.i(293163),o=e.i(947118),i=e.i(737801),n=e.i(617145);e.s(["usePurchaseStart",0,e=>{let a=(0,o.useIsInitialized)(),s=(0,i.useEventAttributes)(),l=(0,n.usePurchaseSourceAttributes)(),[c,u]=(0,t.useState)(!1),d=(0,t.useRef)(!1),m=(0,t.useMemo)(()=>{let t={...s,...l,url:e.url??s.url,step:e.step,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??s.experimentJoinList,mParticleGranted:e.mParticleGranted??!0};return void 0===t.premiumProductId&&delete t.premiumProductId,void 0===t.experimentJoinList&&delete t.experimentJoinList,t},[s,l,e.step,e.url,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(a&&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)}},[a,m,c])}],782847);var a=e.i(546446),s=e.i(540768),l=e.i(682142),c=e.i(782937),u=e.i(695881),d=e.i(333350),m=e.i(64412),p=e.i(950771),g=e.i(537989),h=e.i(695203),f=e.i(673915),w=e.i(158662),v=e.i(243083),b=e.i(358273),x=e.i(777638),y=e.i(727365),C=e.i(896363),k=e.i(924776),P=e.i(605781);let S=(0,u.createLogger)("usePurchaseStart"),E=["SUN","MON","TUE","WED","THU","FRI","SAT"],I=new Set(["city","locality","neighborhood","airport","postal","poi","ski","geocode","locid"]),j=new Set(["mapbox","twc-poi","twc-v3-loc-search","twc-v3-loc-point"]),A=["appVersion","premiumProductId","physicalState"];e.s(["usePurchaseStart",0,e=>{let r=(0,a.useAtomValue)(g.pageIdAtom),o=(0,a.useAtomValue)(p.pageLocaleAtom),i=(0,a.useAtomValue)(h.deviceClassAtom),{location:n,isLoading:u}=(0,m.useLocation)(),M=(0,a.useAtomValue)(f.fromStringAtom),L=(0,a.useAtomValue)(w.experimentJoinListAtom),R=(0,v.usePurchaseSourceAttributes)(),T=(0,k.useIsHightouchReady)(),N=(0,t.useRef)(!1),{step:F,url:V,accountCreated:O,accountLogin:D,completed:z,eventChainId:U,premiumProductId:H}=e,W=(0,t.useMemo)(()=>{if(!d.default)return null;let e=(0,l.getCICookie)(),t=e?.["TWC-GeoIP-Country"]??(0,s.getCookie)("twc-location-country"),a=e?.["TWC-GeoIP-Region"]??(0,s.getCookie)("twc-location-region"),u=e?.["TWC-Privacy"]??(0,s.getCookie)("twc-privacy"),m=window.DprSdk?.getGdprConsentOptInsString()??"",p=window.navigator?.globalPrivacyControl??!1,g=m?.includes("functional-technology")??!1,h=window.DprSdk?.getUserConsent("geographically-relevant-advertising")!==!1,f=navigator?.cookieEnabled??!1,w=(0,s.getCookie)("partner")||"",v=(0,c.getPartnerByPattern)(w)??w,k=(0,b.getMetricsSession)(),P=k?.sessionId||"",S=k?.sessionStartTime||0,A=new Date,T=A.getHours(),N=E[A.getDay()]??"",W=-A.getTimezoneOffset()/60,G=document.referrer,J=(0,y.normalizeWlocType)(n?.type),_=n?.featureSource??null;return{step:String(F),accountCreated:O??!1,accountLogin:D??!1,completed:z??!1,eventChainID:U,premiumProductId:H??null,url:V??"",pageId:r,schemaVersion:"nextgen",sessionId:P,sessionStartTime:S,locale:o,partner:v,deviceClass:i,wlocCity:n?.city??void 0,wlocCountry:n?.countryCode??null,wlocState:n?.adminDistrictCode??void 0,wlocDMA:n?.dmaCd??void 0,wlocId:n?.placeId??null,wlocFeatureSource:null!=_&&j.has(_)?_:void 0,wlocTags:n?.tags?.length?(0,C.parseArrayToString)(n.tags):null,wlocType:null!==J&&I.has(J)?J:void 0,wlocFeatureId:n?.featureId??null,dayOfWeek:N,regime:u??"",cookiesEnabled:f,gpcSignalOptOut:p,functionalTechnologies:g,geographicallyRelevantAds:h,priv:m,referrer:G,fromString:M,deviceTimeZone:W,hourOfDay:T,physicalCountry:t??"",physicalState:a??"",sourcePage:R.sourcePage,sourceModule:R.sourceModule??null,sourceUpsellPlacement:R.sourceUpsellPlacement??null,campaign:(0,x.getCampaign)(),tpcc:(0,x.getTpcc)(),linkReferral:(0,x.getLinkReferral)(),experimentJoinList:L,weatherMode:"normal",samsungVersion:(0,x.getSamsungVersion)(),appVersion:"0404f88080af60073c643d025e42bd9b3fcc20b4".slice(0,10)}},[F,O,D,z,U,H,V,r,o,i,n,M,L,R]),G=T&&null!==W&&!u&&A.every(e=>void 0!==W[e]);return(0,t.useCallback)(()=>{if(W&&G&&!N.current)try{(0,P.trackPurchaseStart)(W),N.current=!0,S.info(`Hightouch: Event "purchase-start" tracked - step ${F}`)}catch(e){S.error('Hightouch: Event "purchase-start" failed',{error:e})}},[W,G,F])}],477728);var M=e.i(902875),L=e.i(144977),R=e.i(156207),T=e.i(291967),N=e.i(534643),F=e.i(127864),V=e.i(653747),O=e.i(556872),D="Checkbox",[z,U]=(0,R.createContextScope)(D),[H,W]=z(D);function G(e){let{__scopeCheckbox:r,checked:o,children:i,defaultChecked:n,disabled:a,form:s,name:l,onCheckedChange:c,required:u,value:d="on",internal_do_not_use_render:m}=e,[p,g]=(0,N.useControllableState)({prop:o,defaultProp:n??!1,onChange:c,caller:D}),[h,f]=t.useState(null),[w,v]=t.useState(null),b=t.useRef(!1),x=!h||!!s||!!h.closest("form"),y={checked:p,disabled:a,setChecked:g,control:h,setControl:f,name:l,form:s,value:d,hasConsumerStoppedPropagationRef:b,required:u,defaultChecked:!$(n)&&n,isFormControl:x,bubbleInput:w,setBubbleInput:v};return(0,M.jsx)(H,{scope:r,...y,children:"function"==typeof m?m(y):i})}var J="CheckboxTrigger",_=t.forwardRef(({__scopeCheckbox:e,onKeyDown:r,onClick:o,...i},n)=>{let{control:a,value:s,disabled:l,checked:c,required:u,setControl:d,setChecked:m,hasConsumerStoppedPropagationRef:p,isFormControl:g,bubbleInput:h}=W(J,e),f=(0,L.useComposedRefs)(n,d),w=t.useRef(c);return t.useEffect(()=>{let e=a?.form;if(e){let t=()=>m(w.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[a,m]),(0,M.jsx)(O.Primitive.button,{type:"button",role:"checkbox","aria-checked":$(c)?"mixed":c,"aria-required":u,"data-state":X(c),"data-disabled":l?"":void 0,disabled:l,value:s,...i,ref:f,onKeyDown:(0,T.composeEventHandlers)(r,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:(0,T.composeEventHandlers)(o,e=>{m(e=>!!$(e)||!e),h&&g&&(p.current=e.isPropagationStopped(),p.current||e.stopPropagation())})})});_.displayName=J;var B=t.forwardRef((e,t)=>{let{__scopeCheckbox:r,name:o,checked:i,defaultChecked:n,required:a,disabled:s,value:l,onCheckedChange:c,form:u,...d}=e;return(0,M.jsx)(G,{__scopeCheckbox:r,checked:i,defaultChecked:n,disabled:s,required:a,onCheckedChange:c,name:o,form:u,value:l,internal_do_not_use_render:({isFormControl:e})=>(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(_,{...d,ref:t,__scopeCheckbox:r}),e&&(0,M.jsx)(Z,{__scopeCheckbox:r})]})})});B.displayName=D;var Y="CheckboxIndicator",K=t.forwardRef((e,t)=>{let{__scopeCheckbox:r,forceMount:o,...i}=e,n=W(Y,r);return(0,M.jsx)(V.Presence,{present:o||$(n.checked)||!0===n.checked,children:(0,M.jsx)(O.Primitive.span,{"data-state":X(n.checked),"data-disabled":n.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});K.displayName=Y;var q="CheckboxBubbleInput",Z=t.forwardRef(({__scopeCheckbox:e,...r},o)=>{let i,{control:n,hasConsumerStoppedPropagationRef:a,checked:s,defaultChecked:l,required:c,disabled:u,name:d,value:m,form:p,bubbleInput:g,setBubbleInput:h}=W(q,e),f=(0,L.useComposedRefs)(o,h),w=(i=t.useRef({value:s,previous:s}),t.useMemo(()=>(i.current.value!==s&&(i.current.previous=i.current.value,i.current.value=s),i.current.previous),[s])),v=function(e){let[r,o]=t.useState(void 0);return(0,F.useLayoutEffect)(()=>{if(e){o({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,i;if(!Array.isArray(t)||!t.length)return;let n=t[0];if("borderBoxSize"in n){let e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,i=t.blockSize}else r=e.offsetWidth,i=e.offsetHeight;o({width:r,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}o(void 0)},[e]),r}(n);t.useEffect(()=>{if(!g)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set,t=!a.current;if(w!==s&&e){let r=new Event("click",{bubbles:t});g.indeterminate=$(s),e.call(g,!$(s)&&s),g.dispatchEvent(r)}},[g,w,s,a]);let b=t.useRef(!$(s)&&s);return(0,M.jsx)(O.Primitive.input,{type:"checkbox","aria-hidden":!0,defaultChecked:l??b.current,required:c,disabled:u,name:d,value:m,form:p,...r,tabIndex:-1,ref:f,style:{...r.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function $(e){return"indeterminate"===e}function X(e){return $(e)?"indeterminate":e?"checked":"unchecked"}Z.displayName=q;var Q=e.i(632137),ee=e.i(269767),et=e.i(747961);let er=(0,t.forwardRef)(({title:e,titleId:t,desc:r,descId:o,...i},n)=>(0,M.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:n,"aria-labelledby":t,"aria-describedby":o,...i,children:[r?(0,M.jsx)("desc",{id:o,children:r}):null,void 0===e?(0,M.jsx)("title",{id:t,children:"Checkbox Checked"}):e?(0,M.jsx)("title",{id:t,children:e}):null,(0,M.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"})]})),eo=t.default.forwardRef((e,t)=>(0,M.jsx)(et.BaseIcon,{ref:t,icon:er,...e}));eo.displayName="CheckboxCheckedFilled";let ei=(0,t.forwardRef)(({title:e,titleId:t,desc:r,descId:o,...i},n)=>(0,M.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:n,"aria-labelledby":t,"aria-describedby":o,...i,children:[r?(0,M.jsx)("desc",{id:o,children:r}):null,void 0===e?(0,M.jsx)("title",{id:t,children:"Checkbox Indeterminate"}):e?(0,M.jsx)("title",{id:t,children:e}):null,(0,M.jsxs)("g",{fill:"currentColor",children:[(0,M.jsx)("path",{d:"M11 8a1 1 0 0 0-1-1H6a1 1 0 0 0 0 2h4a1 1 0 0 0 1-1"}),(0,M.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"})]})]})),en=t.default.forwardRef((e,t)=>(0,M.jsx)(et.BaseIcon,{ref:t,icon:ei,...e}));en.displayName="CheckboxIndeterminate";let ea=(0,t.forwardRef)(({title:e,titleId:t,desc:r,descId:o,...i},n)=>(0,M.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16",ref:n,"aria-labelledby":t,"aria-describedby":o,...i,children:[r?(0,M.jsx)("desc",{id:o,children:r}):null,void 0===e?(0,M.jsx)("title",{id:t,children:"Checkbox"}):e?(0,M.jsx)("title",{id:t,children:e}):null,(0,M.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"})]})),es=t.default.forwardRef((e,t)=>(0,M.jsx)(et.BaseIcon,{ref:t,icon:ea,...e}));function el({className:e,checked:r,defaultChecked:o,onCheckedChange:i,...n}){let[a,s]=(0,t.useState)(void 0!==r?r:o||!1);(0,t.useEffect)(()=>{void 0!==r&&s(r)},[r]);let l="indeterminate"===a?en:a?eo:es;return(0,M.jsx)(B,{"data-slot":"checkbox",className:(0,Q.cn)("peer disabled:cursor-not-allowed disabled:opacity-50",e),...n,checked:a,onCheckedChange:e=>{void 0===r&&s(e),i?.(e)},children:(0,M.jsx)(K,{className:"flex items-center justify-center text-current transition-none","data-slot":"checkbox-indicator",forceMount:!0,children:(0,M.jsx)(l,{className:"size-6"})})})}es.displayName="Checkbox",e.s(["Checkbox",0,({id:e,label:t,wrapperClassName:r,labelClassName:o,leftPos:i,...n})=>(0,M.jsxs)(ee.FormItem,{id:e,className:(0,Q.cn)("flex w-full gap-3",i?"flex-row-reverse justify-end":"flex-row justify-between",r),children:[(0,M.jsx)("div",{className:"pt-0.5",children:(0,M.jsx)(ee.FormLabel,{className:(0,Q.cn)(o),children:t})}),(0,M.jsx)("div",{children:(0,M.jsx)(ee.FormControl,{children:(0,M.jsx)(el,{...n})})})]})],681488);var ec=e.i(528600);let eu=(0,e.i(284007).atomWithStorage)("upsxLastNames",{},void 0,{getOnInit:!0}),ed=e=>btoa(e.trim().toLowerCase());e.s(["useUserLastName",0,()=>{let{userProfile:e}=(0,ec.useUser)(),{email:r}=e||{},o=(0,a.useSetAtom)(eu),i=(0,a.useAtomValue)(eu),n=(0,t.useCallback)((e,t)=>{o(r=>({...r,[ed(e)]:t}))},[]);return{userLastName:i[ed(r||"")]||void 0,setUserLastName:n}}],526824);var em=e.i(725287),ep=e.i(138276),eg=e.i(499239),eh=e.i(829862);e.s(["useCart",0,function({embedded:e}={}){let t=(0,em.useSearchParams)(),r=(0,eh.useCheckoutContext)(),[o,i]=(0,a.useAtom)(eg.cartProductIdAtom),n=e??r.embedded,s=t.get("products")||t.get("productId")||(0,ep.getZuoraProductForStripePlan)(t.get("plan")),l=n&&!(0,ep.isWuZuoraProduct)(o)?"":o;return{productId:s||l,setProductId:i}}],920654)}]);