{"version":3,"file":"Unsubscribe-4781065f3df941860fb9.js","sources":["webpack:///Unsubscribe-4781065f3df941860fb9.js"],"sourcesContent":["(this.nextGenJsonpFunction=this.nextGenJsonpFunction||[]).push([[342],{1254:function(t,e,n){\"use strict\";n.r(e);var i=n(33),a=n(31),o=n(24),l=n(9),r=n(14),s=n(48),p=n(0),c=n.n(p),m=n(3),d=n(7),u=n(17),h=n(2);const g=h.d.section.withConfig({displayName:\"Unsubscribestyles__Wrapper\",componentId:\"sc-8dn52x-0\"})([\"position:relative;background-color:\",\";padding:30px 0;display:flex;justify-content:center;\"],m.a.red.base),f=Object(h.d)(u.a.Content).withConfig({displayName:\"Unsubscribestyles__Container\",componentId:\"sc-8dn52x-1\"})([\"position:relative;\"]),y=h.d.div.withConfig({displayName:\"Unsubscribestyles__Title\",componentId:\"sc-8dn52x-2\"})([\"\",\";color:\",\";margin-bottom:20px;\"],d.a.H2Style,m.a.white),x=h.d.div.withConfig({displayName:\"Unsubscribestyles__SuccessMessage\",componentId:\"sc-8dn52x-3\"})([\"\",\";color:\",\";margin-bottom:20px;\"],d.a.H4Style,m.a.white),b={Wrapper:g,Container:f,Title:y,ButtonContainer:h.d.div.withConfig({displayName:\"Unsubscribestyles__ButtonContainer\",componentId:\"sc-8dn52x-4\"})([\"margin-top:20px;\"]),SuccessMessage:x,SubmittingOverlay:h.d.div.withConfig({displayName:\"Unsubscribestyles__SubmittingOverlay\",componentId:\"sc-8dn52x-5\"})([\"position:absolute;inset:0;display:grid;place-items:center;background-color:\",\"dd;\"],m.a.red.base)};e.default=({translations:t,pageContext:e})=>{const[n,m]=Object(p.useState)(\"\"),[d,u]=Object(p.useState)(!1),[h,g]=Object(p.useState)(!1),[f,y]=Object(p.useState)(null);return c.a.createElement(b.Wrapper,null,c.a.createElement(b.Container,null,h?c.a.createElement(b.SuccessMessage,null,t[\"custom.unsubscribe.successful\"]):c.a.createElement(c.a.Fragment,null,c.a.createElement(b.Title,null,t[\"custom.unsubscribe.title\"]),c.a.createElement(l.e,{htmlFor:\"signUpForm.EmailAddress\"},t[\"custom.emailaddress\"]),c.a.createElement(r.e,{id:\"signUpForm.EmailAddress\",placeholder:t[\"custom.emailaddress\"],value:n,onChange:t=>m(t.currentTarget.value)}),void 0!==(null==f?void 0:f.errors.emailAddress)&&c.a.createElement(l.b,null,c.a.createElement(l.c,null,null==f?void 0:f.errors.emailAddress)),c.a.createElement(b.ButtonContainer,null,c.a.createElement(o.a,{theme:\"white\",text:t[\"custom.unsubscribe\"],onClick:()=>(async()=>{u(!0);const t={emailAddress:n,cultureCode:e.documentCulture};try{const e=await i.a.request({baseUrl:a.a.getDomain(),slug:\"unsubscribe\",controller:\"wired\",method:\"DELETE\",params:{...t}});u(!1),y(e),e.success&&g(!0)}catch{u(!1)}})(),disabled:d}))),d&&c.a.createElement(b.SubmittingOverlay,null,c.a.createElement(s.default,{theme:\"white\"}))))}},1296:function(t,e,n){\"use strict\";function i(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,n,o){e=e||\"&\",n=n||\"=\";var l={};if(\"string\"!=typeof t||0===t.length)return l;var r=/\\+/g;t=t.split(e);var s=1e3;o&&\"number\"==typeof o.maxKeys&&(s=o.maxKeys);var p=t.length;s>0&&p>s&&(p=s);for(var c=0;c=0?(m=g.substr(0,f),d=g.substr(f+1)):(m=g,d=\"\"),u=decodeURIComponent(m),h=decodeURIComponent(d),i(l,u)?a(l[u])?l[u].push(h):l[u]=[l[u],h]:l[u]=h}return l};var a=Array.isArray||function(t){return\"[object Array]\"===Object.prototype.toString.call(t)}},1297:function(t,e,n){\"use strict\";var i=function(t){switch(typeof t){case\"string\":return t;case\"boolean\":return t?\"true\":\"false\";case\"number\":return isFinite(t)?t:\"\";default:return\"\"}};t.exports=function(t,e,n,r){return e=e||\"&\",n=n||\"=\",null===t&&(t=void 0),\"object\"==typeof t?o(l(t),(function(l){var r=encodeURIComponent(i(l))+n;return a(t[l])?o(t[l],(function(t){return r+encodeURIComponent(i(t))})).join(e):r+encodeURIComponent(i(t[l]))})).join(e):r?encodeURIComponent(i(r))+n+encodeURIComponent(i(t)):\"\"};var a=Array.isArray||function(t){return\"[object Array]\"===Object.prototype.toString.call(t)};function o(t,e){if(t.map)return t.map(e);for(var n=[],i=0;i{const e=t.startsWith(\"/\")?\"\":\"/\",n=this.getDomain();return n?`${n}${e}${t}`:t},this.getDomain=()=>\"development\"===\"production\".toLowerCase()?this._localDomain:\"\",this.formatImageUrl=(t,e,n)=>{if(null==t)return t;if(e){return 0===(t.match(/\\?/g)||[]).length?void 0!==n?`${t}?width=${e}&height=${n}`:`${t}?width=${e}`:void 0!==n?`${t}&width=${e}&height=${n}`:`${t}&width=${e}`}return t}}}},33:function(t,e,n){\"use strict\";var i=n(480),a=n.n(i);e.a=new class{async request(t){const e=this.getUrl(t),n=new Headers({\"Content-Type\":\"application/json; charset=utf-8\",Accept:\"application/json\"});!0===t.isMultipartFormData&&n.delete(\"Content-Type\");const i={method:t.method,headers:n,mode:\"cors\",cache:\"default\",body:this.getBody(t,t.files,t.secondaryFiles)},a=await fetch(e,i);if(a.status>=400)throw new Error(`${a.status}: ${a.statusText}`);return await a.json()}getUrl(t){let e=`/api/${t.controller}/${t.slug}`;return t.baseUrl&&(e=`${t.baseUrl}${e}`),\"GET\"!==t.method&&\"DELETE\"!==t.method||!t.params||(e+=\"?\",e+=a.a.stringify({...t.params})),e}getBody(t,e,n){if(\"GET\"===t.method)return null;if(!0===t.isMultipartFormData){const i=new FormData;if(i.append(\"params\",JSON.stringify(t.params)),e&&e.length>0)for(let t=0;t0)for(let t=0;tObject(o.c)([\"\",\";font-size:32px \",\";line-height:32px \",\";@media \",\"{font-size:40px \",\";line-height:42px \",\";}@media \",\"{font-size:50px \",\";line-height:50px \",\";}@media \",\"{font-size:60px \",\";line-height:60px \",\";}\"],l,t?\"!important\":null,t?\"!important\":null,Object(a.e)(a.a.Tablet),t?\"!important\":null,t?\"!important\":null,Object(a.e)(a.a.Desktop),t?\"!important\":null,t?\"!important\":null,Object(a.e)(a.a.DesktopLarge),t?\"!important\":null,t?\"!important\":null),s=t=>Object(o.c)([\"\",\";font-size:24px \",\";line-height:26px \",\";@media \",\"{font-size:32px \",\";line-height:32px \",\";}@media \",\"{font-size:40px \",\";line-height:40px \",\";}@media \",\"{font-size:50px \",\";line-height:56px \",\";}\"],l,t?\"!important\":null,t?\"!important\":null,Object(a.e)(a.a.Tablet),t?\"!important\":null,t?\"!important\":null,Object(a.e)(a.a.Desktop),t?\"!important\":null,t?\"!important\":null,Object(a.e)(a.a.DesktopLarge),t?\"!important\":null,t?\"!important\":null),p=t=>Object(o.c)([\"\",\";font-size:24px \",\";line-height:26px \",\";@media \",\"{font-size:28px \",\";line-height:30px \",\";}@media \",\"{font-size:30px \",\";line-height:34px \",\";}@media \",\"{font-size:40px \",\";line-height:44px \",\";}\"],l,t?\"!important\":null,t?\"!important\":null,Object(a.e)(a.a.Tablet),t?\"!important\":null,t?\"!important\":null,Object(a.e)(a.a.Desktop),t?\"!important\":null,t?\"!important\":null,Object(a.e)(a.a.DesktopLarge),t?\"!important\":null,t?\"!important\":null),c=t=>Object(o.c)([\"\",\" font-size:21px \",\";line-height:24px \",\";@media \",\"{font-size:24px \",\";line-height:28px \",\";}@media \",\"{font-size:24px \",\";line-height:28px \",\";}@media \",\"{font-size:30px \",\";line-height:36px \",\";}\"],l,t?\"!important\":null,t?\"!important\":null,Object(a.e)(a.a.Tablet),t?\"!important\":null,t?\"!important\":null,Object(a.e)(a.a.Desktop),t?\"!important\":null,t?\"!important\":null,Object(a.e)(a.a.DesktopLarge),t?\"!important\":null,t?\"!important\":null),m=t=>Object(o.c)([\"\",\" font-size:18px \",\";line-height:21px \",\";@media \",\"{font-size:21px \",\";line-height:24px \",\";}@media \",\"{font-size:21px \",\";line-height:24px \",\";}@media \",\"{font-size:24px \",\";line-height:28px \",\";}\"],l,t?\"!important\":null,t?\"!important\":null,Object(a.e)(a.a.Tablet),t?\"!important\":null,t?\"!important\":null,Object(a.e)(a.a.Desktop),t?\"!important\":null,t?\"!important\":null,Object(a.e)(a.a.DesktopLarge),t?\"!important\":null,t?\"!important\":null),d=Object(o.c)([\"\",\" font-size:16px;line-height:18px;@media \",\"{font-size:18px;line-height:21px;}@media \",\"{font-size:18px;line-height:24px;}@media \",\"{font-size:21px;line-height:24px;}\"],l,Object(a.e)(a.a.Tablet),Object(a.e)(a.a.Desktop),Object(a.e)(a.a.DesktopLarge)),u=t=>Object(o.c)([\"\",\";font-size:16px \",\";line-height:28px \",\";@media \",\"{font-size:16px \",\";line-height:28px \",\";}@media \",\"{font-size:16px \",\";line-height:28px \",\";}@media \",\"{font-size:18px \",\";line-height:30px \",\";}\"],i.a.helvetica[\"55-roman\"],t?\"!important\":null,t?\"!important\":null,Object(a.e)(a.a.Tablet),t?\"!important\":null,t?\"!important\":null,Object(a.e)(a.a.Desktop),t?\"!important\":null,t?\"!important\":null,Object(a.e)(a.a.DesktopLarge),t?\"!important\":null,t?\"!important\":null),h=Object(o.c)([\"\",\";font-size:16px;line-height:28px;\"],i.a.helvetica[\"55-roman\"]),g=Object(o.c)([\"\",\";font-size:16px;line-height:28px;\"],i.a.helvetica[\"55-roman\"]),f=o.d.h1.withConfig({displayName:\"Typographystyles__H1\",componentId:\"fh0jc-0\"})([\"\",\";\"],r(!1)),y=o.d.h2.withConfig({displayName:\"Typographystyles__H2\",componentId:\"fh0jc-1\"})([\"\",\";\"],s(!1)),x=o.d.h3.withConfig({displayName:\"Typographystyles__H3\",componentId:\"fh0jc-2\"})([\"\",\";\"],p(!1)),b=o.d.h4.withConfig({displayName:\"Typographystyles__H4\",componentId:\"fh0jc-3\"})([\"\",\";\"],c(!1)),j=o.d.h5.withConfig({displayName:\"Typographystyles__H5\",componentId:\"fh0jc-4\"})([\"\",\";\"],m(!1)),w=o.d.h6.withConfig({displayName:\"Typographystyles__H6\",componentId:\"fh0jc-5\"})([\"\",\";\"],d),O=o.d.p.withConfig({displayName:\"Typographystyles__P\",componentId:\"fh0jc-6\"})([\"\",\";\"],u(!1)),v=o.d.p.withConfig({displayName:\"Typographystyles__PSmall\",componentId:\"fh0jc-7\"})([\"\",\";\"],h),C=o.d.p.withConfig({displayName:\"Typographystyles__PSmallest\",componentId:\"fh0jc-8\"})([\"\",\";\"],g),_={H1Style:r(!1),H1StyleImportant:r(!0),H2Style:s(!1),H2StyleImportant:s(!0),H3Style:p(!1),H3StyleImportant:p(!0),H4Style:c(!1),H4StyleImportant:c(!0),H5Style:m(!1),H5StyleImportant:m(!0),H6Style:d,PStyle:u(!1),PStyleImportant:u(!0),PStyleSmall:h,PStyleSmallest:g,H1:f,H2:y,H3:x,H4:b,H5:j,H6:w,P:O,PSmall:v,PSmallest:C}}}]);"],"mappings":"AAAA","sourceRoot":""}