PageSourceSearch

https://www.reima.com/_next/static/chunks/pages/my-account/subscriptions-94999a79f94ab7d9.js

js reima.com collected 2026-09-24 10:44:22 UTC 16,069 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9571],{14887:(e,t,l)=>{"use strict";l.d(t,{W:()=>s});let s=e=>(t,l)=>{let s=e(t,l);return null!==s?s:void 0}},27448:(e,t,l)=>{"use strict";l.d(t,{A:()=>u});var s=l(80263),n=l(77357),r=l(57560),a=l(6570),i=l(5439),o=l(48781),c=l(52991);let u=e=>{var t,l;let u=(0,o.useRouter)(),m=(0,i.rQ)(),d=null!=(l=null==(t=(0,r.d0)(u.locale))?void 0:t.webLocale)?l:n.Q4.en,p=(0,a.de)(e,m,d);return(0,s.jsx)(c.bV,{...p})}},31680:(e,t,l)=>{"use strict";l.d(t,{A:()=>x});var s=l(80263),n=l(30021),r=l(80399),a=l(59550),i=l(57560),o=l(48942),c=l(15756),u=l(48781),m=l(53239);let d=e=>{let{error:t}=e;return(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center min-h-[200px] p-4",children:[(0,s.jsxs)("p",{className:"text-red-600 mb-4",children:["An Error Occurred: ",(null==t?void 0:t.errorMessage)||"Authentication failed"]}),(0,s.jsx)("button",{onClick:()=>window.location.reload(),className:"px-4 py-2 bg-black text-white rounded hover:bg-gray-800 transition-colors",children:"Try Again"})]})},p=()=>(0,s.jsx)("div",{className:"flex flex-col gap-1 items-center justify-center animate-pulse min-h-screen",children:(0,s.jsx)(o.A,{height:"50",width:"180"})}),h=e=>{let{children:t}=e,{locale:l}=(0,u.useRouter)(),{isLoading:o}=(0,c.A)(),h=(0,m.useMemo)(()=>({scopes:a.F5,extraQueryParameters:{ui_locales:l?(0,i.ER)(l):"en"}}),[l]);return o?(0,s.jsx)(p,{}):(0,s.jsx)(r.kI,{interactionType:n.X8.Redirect,authenticationRequest:h,errorComponent:d,loadingComponent:p,children:t})};var g=l(27448);let x=e=>{let{children:t,title:l,containerClassName:n="container-tight mx-auto my-7 lg:my-8 xl:my-12 px-2",noContainer:r=!1}=e,{asPath:a}=(0,u.useRouter)(),i=a.split("?")[0].split("#")[0];return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(g.A,{title:l,description:"",canonicalPath:i,alternates:[],kind:{type:"website"},robots:{noindex:!0,nofollow:!0}}),(0,s.jsx)(h,{children:r?t:(0,s.jsx)("div",{className:n,children:t})})]})}},48942:(e,t,l)=>{"use strict";l.d(t,{A:()=>n});var s=l(80263);l(53239);let n=e=>{let{height:t="19",width:l="80",fill:n="#D2092D"}=e;return(0,s.jsxs)("svg",{height:t,width:l,viewBox:"0 0 120 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsxs)("g",{clipPath:"url(#clip0_50_2619)",children:[(0,s.jsx)("path",{d:"M15.2873 9.2315C14.4517 8.96403 13.5814 8.82559 12.7055 8.8208C7.97818 8.8208 7.34909 13.5087 7.34909 17.5325V26.9009H0V0.904655H7.35091V4.58615H7.45454C8.72727 3.0155 11.0909 0.886155 13.5527 0.823255C14.7134 0.804374 15.8684 0.992204 16.9655 1.37825L15.2873 9.2315Z",fill:n}),(0,s.jsx)("path",{d:"M24.9 15.0941C24.9 18.3779 26.16 22.0834 29.9909 22.0834C32.4054 22.0834 33.9291 20.6034 34.9273 18.5351L41.7 19.6451C39.9164 24.8381 35.4 27.75 30 27.75C22.02 27.75 17.1364 22.0316 17.1364 14.1414C17.1364 6.25114 21.2727 0.0573425 29.6254 0.0573425C38.0782 0.0573425 41.8582 6.35844 41.8582 14.195V15.0941H24.9ZM34.9291 10.4876C34.5654 7.84029 32.8818 5.24659 30.0454 5.24659C27.1054 5.24659 25.4782 7.78849 25.1091 10.4876H34.9291Z",fill:n}),(0,s.jsx)("path",{d:"M51.8364 0.734436H44.4855V26.7325H51.8364V0.734436Z",fill:n}),(0,s.jsx)("path",{d:"M62.7273 3.23379H62.8327C64.2418 1.16919 66.7636 0.0573425 69.1254 0.0573425C72.3291 0.0573425 74.56 1.21729 76.4182 3.95714C78.0818 1.59284 81.0436 0.0573425 84.0363 0.0573425C90.6 0.0573425 92.2182 5.03384 92.2182 10.7004V26.9027H84.8763V13.2423C84.8763 10.7004 85.0327 5.98844 81.4109 5.98844C77.42 5.98844 77.4727 11.4422 77.4727 14.1432V26.9082H70.1236V13.7177C70.1236 11.1758 70.4382 5.98659 66.6054 5.98659C62.5109 5.98844 62.7273 11.3886 62.7273 14.1414V26.9064H55.3691V0.904643H62.7273V3.23379Z",fill:n}),(0,s.jsx)("path",{d:"M120 26.8454H112.755V24.4625H112.649C111.885 25.4839 110.896 26.3083 109.761 26.8694C108.626 27.4304 107.378 27.7124 106.116 27.6927C98.5545 27.6927 94.2491 20.7551 94.2491 13.714C94.2491 6.8302 98.6127 0 106.009 0C108.687 0 110.967 1.1655 112.753 3.28375V0.8473H120V26.8454ZM113.273 13.8195C113.273 10.3249 111.136 6.56565 107.355 6.56565C103.573 6.56565 101.48 10.3249 101.48 13.8195C101.48 17.3141 103.565 21.127 107.345 21.127C111.125 21.127 113.264 17.3141 113.264 13.8195",fill:n})]}),(0,s.jsx)("defs",{children:(0,s.jsx)("clipPath",{id:"clip0_50_2619",children:(0,s.jsx)("rect",{width:"120",height:"27.75",fill:"white"})})})]})}},59958:(e,t,l)=>{"use strict";l.r(t),l.d(t,{__N_SSP:()=>E,default:()=>_});var s=l(80263),n=l(31680),r=l(76524),a=l(14887),i=l(88113),o=l(20858),c=l(41701),u=l(64124),m=l(48151),d=l(71348),p=l(75535),h=l(10663),g=l(63324);let x=e=>h.Ik({acceptsEmailMarketing:h.zM(),acceptsSmsMarketing:h.zM(),phone:h.Yj().optional(),serverError:h.Yj().optional()}).superRefine((t,l)=>{if(t.acceptsSmsMarketing){if(!t.phone||""===t.phone.trim())return void l.addIssue({code:g.eq.custom,message:e("common:form.input.generic.error.required",{label:e("account:myAccount.subscriptions.phone.label")}),path:["phone"]});(0,p.b)(t.phone)||l.addIssue({code:g.eq.custom,message:e("common:newsletterForm.phoneInvalidE164"),path:["phone"]})}});var v=l(11069),f=l(71335),C=l(25189),b=l(48781),y=l(67254),j=l(53239),k=l(8665);let w=function(){var e,t,l,s,n,r,i;let{redirectPath:o="/my-account",collectSmsConsent:c=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{t:h}
1=(0,y.Bd)(["account","common"]),g=(0,a.W)(h),[w,S]=(0,j.useState)(!0),A=(0,b.useRouter)(),{selectedEcomLocaleCountryCode:N}=(0,f.Q)(),{customer:M,refreshCustomer:E}=(0,v.A)(),_=(0,p.K)(null==M?void 0:M.phone),I=(0,j.useRef)(!1),L=(0,j.useRef)(void 0),O=x(g),{reset:P,register:V,handleSubmit:R,watch:H,setError:T,trigger:B,formState:{isSubmitSuccessful:D,errors:F,isSubmitting:q,isValid:Q,isDirty:X}}=(0,k.mN)({resolver:(0,u.u)(O),mode:"onChange"}),Y=H("acceptsEmailMarketing"),J=H("acceptsSmsMarketing");(0,j.useEffect)(()=>{V("serverError")},[V]),(0,j.useEffect)(()=>{if(M){var e,t,l,s;I.current=!1,L.current=null!=(s=M.phone)?s:void 0,P({acceptsEmailMarketing:(null==(e=M.emailMarketingConsent)?void 0:e.marketingState)==="SUBSCRIBED"||(null==(t=M.emailMarketingConsent)?void 0:t.marketingState)==="PENDING",acceptsSmsMarketing:(null==(l=M.smsMarketingConsent)?void 0:l.marketingState)==="SUBSCRIBED",phone:M.phone||""}),S(!1)}},[P,M]),(0,j.useEffect)(()=>{w||B("phone")},[J,B,w]);let U=(e,t)=>{A.push({pathname:o,query:{result:e,action:t}}).catch(e=>e)};return{register:V,handleSubmit:R,watch:H,errors:F,isSubmitting:q,isSubmitSuccessful:D,isValid:Q,isDirty:X,disabled:w,isPhoneLocked:_,onSubmit:async e=>{try{await m.NH.subscribeToNewsletter(N,{email:M.email,acceptsMarketing:e.acceptsEmailMarketing,phone:e.phone,acceptsSmsMarketing:!!e.acceptsSmsMarketing&&!!e.phone,tags:["newsletter"]}),await E(),U("success","edit")}catch(e){C.A.isAxiosError(e)?T("serverError",(0,d.a)(e)):T("serverError",{type:"500",message:"Server Error"})}},onError:(e,t)=>console.log(e,t),acceptsEmailMarketing:!!Y,acceptsSmsMarketing:!!J,collectSmsConsent:c,isEmailMarketingPending:(null==M||null==(e=M.emailMarketingConsent)?void 0:e.marketingState)==="PENDING",isEmailMarketingSubscribed:(null==M||null==(t=M.emailMarketingConsent)?void 0:t.marketingState)==="SUBSCRIBED",isSmsMarketingPending:(null==M||null==(l=M.smsMarketingConsent)?void 0:l.marketingState)==="PENDING",emailMarketingOptInLevel:null!=(r=null==M||null==(s=M.emailMarketingConsent)?void 0:s.marketingOptInLevel)?r:"UNKNOWN",smsMarketingOptInLevel:null!=(i=null==M||null==(n=M.smsMarketingConsent)?void 0:n.marketingOptInLevel)?i:"UNKNOWN"}},S=e=>{let{show:t,children:l}=e;return(0,s.jsx)(r.e,{show:t,enter:"transition-all duration-300 ease-in-out",enterFrom:"max-h-0 opacity-0",enterTo:"max-h-screen opacity-100",leave:"transition-all duration-300 ease-in-out",leaveFrom:"max-h-screen opacity-100",leaveTo:"max-h-0 opacity-0",className:"overflow-hidden",children:l})},A=e=>{let{show:t,children:l}=e;return(0,s.jsx)(S,{show:t,children:(0,s.jsx)("p",{className:"text-sm text-charcoal bg-gray-lighter p-2",children:l})})},N=e=>{let{collectSmsConsent:t=!0,onNavigationAttempt:l}=e,{t:n}=(0,y.Bd)(["account","common"]),r=(0,a.W)(n),u=(0,b.useRouter)(),[m,d]=(0,j.useState)(!1),[p,h]=(0,j.useState)(null),{register:g,handleSubmit:x,errors:v,isSubmitting:f,isSubmitSuccessful:C,isDirty:k,disabled:N,isPhoneLocked:M,onSubmit:E,onError:_,acceptsEmailMarketing:I,acceptsSmsMarketing:L,isEmailMarketingPending:O,isEmailMarketingSubscribed:P,emailMarketingOptInLevel:V}=w({collectSmsConsent:t}),R=(0,j.useCallback)(()=>{d(!1),p&&u.push(p).catch(e=>e)},[p,u]),H=(0,j.useCallback)(()=>{d(!1),h(null)},[]),T=(0,j.useCallback)(e=>{k&&!C?(h(e),d(!0)):u.push(e).catch(e=>e)},[k,C,u]);return(0,j.useEffect)(()=>{l&&l(T)},[l,T]),(0,j.useEffect)(()=>(u.beforePopState(()=>!k||!!C||(h("/my-account"),d(!0),window.history.pushState(null,"",u.asPath),!1)),()=>{u.beforePopState(()=>!0)}),[k,C,u]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.A,{id:"subscriptionsLeaveConfirmation",title:r("myAccount.leaveConfirmation.title"),open:m,handleClose:H,size:"small",children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)("p",{children:r("myAccount.leaveConfirmation.message")}),(0,s.jsxs)("div",{className:"flex flex-col lg:justify-end lg:flex-row gap-2",children:[(0,s.jsx)(i.A,{type:"button",onClick:H,children:(0,s.jsx)("span",{className:"text-center w-full lg:w-auto",children:r("myAccount.leaveConfirmation.buttons.continue")})}),(0,s.jsx)(i.A,{type:"button",theme:"red",variation:"solid",onClick:R,children:(0,s.jsx)("span",{className:"text-center w-full lg:w-auto",children:r("myAccount.leaveC
1onfirmation.buttons.leave")})})]})]})}),(0,s.jsxs)("form",{onSubmit:x(E,_),className:"pb-3 flex flex-col gap-6 text-charcoal-dark",children:[(0,s.jsxs)("section",{className:"flex flex-col gap-2",children:[(0,s.jsx)("h2",{className:"h4 m-0",children:r("myAccount.subscriptions.newsletter.title")}),(0,s.jsx)(A,{show:"CONFIRMED_OPT_IN"===V&&!P&&!O&&I,children:r("myAccount.subscriptions.newsletter.beforePendingConfirmation")}),(0,s.jsx)(A,{show:O&&"CONFIRMED_OPT_IN"===V&&I,children:r("myAccount.subscriptions.newsletter.pendingConfirmation")}),(0,s.jsx)(o.Sc,{id:"acceptsEmailMarketing",disabled:N,error:v.acceptsEmailMarketing,...g("acceptsEmailMarketing"),children:r("myAccount.subscriptions.newsletter.label")})]}),t&&(0,s.jsxs)("section",{className:"flex flex-col gap-2",children:[(0,s.jsx)("h2",{className:"h4 m-0",children:r("myAccount.subscriptions.sms.title")}),(0,s.jsx)(o.Sc,{id:"acceptsSmsMarketing",disabled:N,error:v.acceptsSmsMarketing,...g("acceptsSmsMarketing"),children:r("myAccount.subscriptions.sms.label")}),(0,s.jsx)(S,{show:L,children:(0,s.jsx)(o.pd,{type:"tel",label:r("myAccount.subscriptions.phone.label"),disabled:N||M,error:v.phone,placeholder:r("common:newsletterForm.phoneInputPlaceholder"),...g("phone")})})]}),(0,s.jsx)(o.XT,{error:v.serverError,isValid:!0,isSubmitting:f,isSubmitSuccessful:C,renderSubmitText:r("myAccount.subscriptions.submit.label")})]})]})};var M=l(96247),E=!0;let _=e=>{let{collectSmsConsent:t}=e,{t:l}=(0,y.Bd)("account"),[r,a]=(0,j.useState)(null);return(0,s.jsxs)(n.A,{title:l("myAccount.subscriptions.title"),children:[(0,s.jsx)(M.A,{title:l("myAccount.subscriptions.title"),backLinkText:l("myAccount.subscriptions.backLink.label"),onBackClick:()=>{r&&r("/my-account")}}),(0,s.jsx)(N,{collectSmsConsent:t,onNavigationAttempt:e=>a(()=>e)})]})}},61006:(e,t,l)=>{"use strict";l.d(t,{c:()=>u,q:()=>m});var s=l(80263),n=l(57560),r=l(99523),a=l(48781),i=l(9012),o=l(24285),c=l(53239);let u=(0,c.createContext)({selectedEcomCountry:null,selectEcomCountry:()=>null}),m=e=>{let{children:t}=e,[l,m]=(0,c.useState)(null),{locale:d,locales:p}=(0,a.useRouter)(),h=(0,c.useCallback)(()=>{try{let e=localStorage.getItem("reima-ecom-selected-country"),t=e?JSON.parse(e):null;if(null==p?void 0:p.includes(null==t?void 0:t.webLocale))return t;return localStorage.removeItem("reima-ecom-selected-country"),r.A.remove("NEXT_LOCALE"),null}catch(e){return null}},[p]),g=(0,c.useCallback)(()=>(0,n.So)(d),[d]);(0,c.useEffect)(()=>{if((0,i.A)(l)){let e=h()||g();(0,o.A)(e)&&(m(e),localStorage.setItem("reima-ecom-selected-country",JSON.stringify(e)),r.A.set("NEXT_LOCALE",null==e?void 0:e.webLocale,{expires:30}))}else localStorage.setItem("reima-ecom-selected-country",JSON.stringify(l)),r.A.set("NEXT_LOCALE",null==l?void 0:l.webLocale,{expires:30})},[h,g,l]);let x=(0,c.useCallback)(e=>(m(t=>e!==t?e:t),e),[]);return(0,s.jsx)(u.Provider,{value:{selectedEcomCountry:l,selectEcomCountry:x},children:t})}},63443:(e,t,l)=>{"use strict";l.d(t,{x:()=>r});var s=l(3638),n=l(93026);function r(){for(var e=arguments.length,t=Array(e),l=0;l<e;l++)t[l]=arguments[l];return(0,n.QP)((0,s.$)(t))}},71335:(e,t,l)=>{"use strict";l.d(t,{Q:()=>u});var s=l(57560),n=l(61006),r=l(48781),a=l(24285),i=l(9012),o=l(53239);let c=()=>{let e=(0,o.useContext)(n.c);if(void 0===e)throw Error("useSelectedCountry must be used within a SelectedCountryProvider");return e},u=()=>{let{locale:e}=(0,r.useRouter)(),{selectedEcomCountry:t,selectEcomCountry:l}=c(),n=(0,o.useMemo)(()=>(0,s.xj)(null==t?void 0:t.countryCode),[t]),u=(0,o.useMemo)(()=>(0,s.d0)(e),[e]),m=(0,o.useMemo)(()=>(0,a.A)(u)&&(0,a.A)(t)&&(null==u?void 0:u.webLocale)!==(null==t?void 0:t.webLocale)||(0,a.A)(u)&&(0,i.A)(t)&&(null==u?void 0:u.isMultiCountry),[u,t,!0]),d=(0,o.useMemo)(()=>m&&(0,a.A)(u)&&(null==u?void 0:u.isMultiCountry),[m,u]),p=(0,o.useMemo)(()=>(null==u?void 0:u.isMultiCountry)?u.languageCode+(t?"-"+t.countryCode.toUpperCase():""):null==u?void 0:u.webLocale,[t,u]);return{selectedEcomCountry:t,selectedEcomLocale:n,ecomLocaleByRouter:u,selectedEcomLocaleCountryCode:p,showCountrySelectorPrompt:m,showCountrySelectorExtended:d,isCountrySelectorActive:!0,selectEcomCountry:l,selectEcomCountryByLocale:e=>
1{if((0,a.A)(e)){if(!e.isMultiCountry)return l((0,s.So)(e.webLocale));if(e.webLocale===s.Q4.de)return l((0,s.Vr)(s.oJ.de))}return l((0,s.Vr)(s.oJ.gb))}}}},71348:(e,t,l)=>{"use strict";l.d(t,{a:()=>o});var s=l(24285),n=l(93343),r=l(10663);let a=r.Ik({msg:r.Yj()}),i=r.YO(r.Ik({field:r.YO(r.Yj()).optional(),message:r.Yj().optional()})),o=e=>{var t,l,r;let o=null==(l=e.response)||null==(t=l.status)?void 0:t.toString();try{let{msg:t}=a.parse(null==(r=e.response)?void 0:r.data),l=i.parse(JSON.parse(t)),c=l.map(e=>e.field).find(e=>(0,s.A)(e)&&(0,n.A)(e));return{type:null!=o?o:"unknown",message:l.map(e=>e.message).filter(Boolean).join(" "),...(0,s.A)(c)?{field:c}:{}}}catch(t){return{type:null!=o?o:"500",message:e.message}}}},75535:(e,t,l)=>{"use strict";l.d(t,{K:()=>i,b:()=>a});var s=l(81013),n=l(24285),r=l(93343);let a=e=>{let t=e.replace(/\s+/g,"");try{let e=(0,s.l)(t);return!!e&&e.isValid()&&e.format("E.164")===t}catch(e){return!1}},i=e=>(0,n.A)(e)&&(0,r.A)(e)&&a(e)},85968:(e,t,l)=>{"use strict";l.d(t,{A:()=>n});var s=l(80263);let n=e=>{let{height:t=24,width:l=24}=e;return(0,s.jsx)("svg",{height:t,width:l,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"m14 18-6-6 6-6",strokeLinecap:"square"})})}},88272:(e,t,l)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/my-account/subscriptions",function(){return l(59958)}])},96247:(e,t,l)=>{"use strict";l.d(t,{A:()=>i});var s=l(80263),n=l(85968),r=l(79172),a=l.n(r);let i=e=>{let{title:t,subtitle:l,backLinkText:r,backLinkHref:i,onBackClick:o}=e;return(0,s.jsxs)("div",{className:"relative","data-testid":"titleWraper",children:[(()=>{if(!r)return null;let e=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"group-hover:-translate-x-1 transition-all",children:(0,s.jsx)(n.A,{})}),(0,s.jsx)("span",{children:r})]});return o?(0,s.jsx)("button",{type:"button",onClick:o,className:"text-gray flex items-center group mb-[20px] absolute -top-5",children:e}):i?(0,s.jsx)(a(),{href:i,className:"text-gray flex items-center group mb-[20px] absolute -top-5",children:e}):null})(),t&&(0,s.jsx)("h1",{className:"h2 mb-3","data-testid":"tabTitle",children:t}),l&&(0,s.jsx)("p",{className:"paragraph",children:l})]})}}},e=>{var t=t=>e(e.s=t);e.O(0,[9172,4363,3981,2144,4124,1013,1488,1069,8686,636,6593,8792],()=>t(88272)),_N_E=e.O()}]);

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.