1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[110,800],{303:(e,t,n)=>{n.d(t,{A:()=>c});var a=n(3696),s=n(6800);const c=({name:e,id:t,type:n="text",value:c,minValue:i=null,maxValue:o=null,label:r,onChange:l,errors:u={},containerCssClass:m="",inputCssClass:p,labelCssClass:d="",autoComplete:b=null,placeholder:g=null,maxLength:y=200,required:f,disabled:E,checked:_,textInputPrefix:h,tooltip:w=null})=>a.createElement("label",{className:m,htmlFor:t},h?a.createElement(a.Fragment,null,r&&a.createElement("span",{className:`${d} ${f?"label-required":""}`},r),w&&a.createElement(s.default,{text:w}),a.createElement("div",{className:"form-input-prefix"},a.createElement("span",null,h),a.createElement("input",{className:`${p||""}${u[t]?" invalid":""}`,disabled:E,id:t,name:e,type:n,value:c??"",min:i,max:o,placeholder:g,autoComplete:b,onChange:e=>l(e.target.value),maxLength:y}))):a.createElement(a.Fragment,null,"checkbox"!==n&&"radio"!==n&&r&&a.createElement("span",{className:`${d} ${f?"label-required":""}`},r),w&&a.createElement(s.default,{text:w}),a.createElement("input",{className:`${p||""}${u[t]?" invalid":""}`,disabled:E,checked:_,id:t,name:e,type:n,value:c??"",min:i,max:o,placeholder:g,autoComplete:b,onChange:e=>l("checkbox"===n?e.target.checked:e.target.value),maxLength:y}),("checkbox"===n||"radio"===n)&&r&&a.createElement("span",{className:`${d} ${f?"label-required":""}`},r)),u[t]&&a.createElement("div",{className:"validation-message","data-error-for":t},u[t][0]))},4110:(e,t,n)=>{n.r(t),n.d(t,{default:()=>b});var a=n(3696),s=n(7465),c=n(303),i=n(9400),o=n(6483),r=n(9134),l=n(9520),u=n(7286),m=n(3939);const p=({onToggleManageSubscriptionMode:e})=>{const t=(0,s.wA)(),{payload:n}=(0,s.d4)(e=>e.myAccountMySubscriptions),[c,p]=(0,a.useState)([]),[d,b]=(0,a.useState)(!1),g=async()=>{try{const e=await(0,o.Jt)("/api/products/subscriptions/paymentLink"),n=await(e?.text());if(!n)return void t((0,u.pG)({messageText:(0,i.T)("js.myaccountflowsubscriptions.paymentmethod.change.error"),messageType:"Pink",dismissible:!0,timeToLive:10}));window.location.href=n}catch(e){(0,r.vS)(e,e=>{t((0,l.K)(e)),p(e)})}},y=async()=>{if(!n?.flowSubscriptionSignupUrl||!n?.currentOrLatestSubscriptionProductId)try{await(0,o.bE)("/api/flashmessage/add/",{messageText:(0,i.T)("js.myaccountflowsubscriptions.general.error"),messageType:"Pink",dismissible:!0,timeToLive:10})}catch(e){}finally{return window.scrollTo(0,0),void window.location.reload()}try{const e=await(0,o.Jt)(`/api/products/subscriptions/resume/${n.currentOrLatestSubscriptionProductId}`),a=await(e?.text());if(!a)return void t((0,u.pG)({messageText:(0,i.T)("js.myaccountflowsubscriptions.general.error"),messageType:"Pink",dismissible:!0,timeToLive:10}));window.location.href=a}catch(e){(0,r.vS)(e,e=>{t((0,l.K)(e)),p(e)})}},f=async()=>{if(!n?.currentOrLatestSubscriptionInfoId)try{await(0,o.bE)("/api/flashmessage/add/",{messageText:(0,i.T)("js.myaccountflowsubscriptions.managesubscription.abortcancellation.errortext"),messageType:"Pink",dismissible:!0,timeToLive:10})}catch(e){}finally{return window.scrollTo(0,0),void window.location.reload()}try{b(!0);const e=await(0,o.bE)(`/api/products/subscriptions/${n.currentOrLatestSubscriptionInfoId}/abort-cancellation`),a=await(e?.json());t((e=>({type:m.on,payload:e}))(a))}catch(e){(0,r.vS)(e,e=>{t((0,l.K)(e)),p(e)})}finally{b(!1)}};return a.createElement(a.Fragment,null,a.createElement("div",{className:"my-account-flow-subscriptions__subscription"},(()=>{if(n?.currentOrLatestSubscriptionProductId&&""!==n.currentOrLatestSubscriptionProductId){if(n.currentOrLatestSubscriptionCancelDate){if(n.subscriptionNextPaymentDateHasPassed){const e=(0,i.T)("js.myaccountflowsubscriptions.subscription.expiredsubscription.heading")?.replace("{0}",n.currentOrLatestSubscriptionProductName);return a.createElement(a.Fragment,null,a.createElement("div",null,a.createElement("h4",null,e),a.createElement("div",null,(0,i.T)("js.myaccountflowsubscriptions.subscription.expiredsubscription.text")," "," ",a.createElement("a",{href:n.flowSubscriptionProductPageUrl,className:"button button__link"},(0,i.T)("js.myaccountflowsubscriptions.subscription.expiredsubscription.linktext")))),a.createElement("div",null,a.createElement("button",{onClick:y,className:"button"},(0,i.T)("js.myaccountflowsubscriptions.subscription.expiredsubscription.buttontext"))))}{const e=(0,i.T)("js.myaccountflowsubscriptions.subscription.expiringsubscription.heading")?.replace("{0}",n.currentOrLatestSubscriptionProductName);return a.createElement(a.Fragment,null,a.createElement("div",null,a.createElement("h4",null,e," ",n.currentOrLatestSubscriptionNextPaymentDateFormatted),a.createElement("div",null,(0,i.T)("js.myaccountflowsubscriptions.subscription.expiringsubscription.text"))),a.createElement("div",null,a.createElement("button",{onClick:f,className:"button "+(d?"loading":""),disabled:d},(0,i.T)("js.myaccountflowsubscriptions.subscription.expiringsubscription.buttontext"),a.createElement("span",{className:"spinner spinner--light spinner--small"}))))}}return a.createElement(a.Fragment,null,a.createElement("div",null,a.createElement("h4",null,n.currentOrLatestSubscriptionProductName),a.createElement("div",null,n.currentOrLatestSubscriptionProductDescription),a.createElement("div",{className:"my-account-flow-subscriptions__subscription__payment"},(0,i.T)("js.myaccountflowsubscriptions.subscription.nextpaymentdate.label")," "," ",a.createElement("span",{className:"my-account-flow-subscriptions__subscription__payment--date"},n.currentOrLatestSubscriptionNextPaymentDateFormatted))),a.createElement("div",null,a.createElement("button",{onClick:e,className:"button"},(0,i.T)("js.myaccountflowsubscriptions.subscription.manage.buttontext"))))}return a.createElement(a.Fragment,null,a.createElement("div",null,a.createElement("h4",null,(0,i.T)("js.myaccountflowsubscriptions.subscription.nosubscription.heading")),a.createElement("div",null,(0,i.T)("js.myaccountflowsubscriptions.subscription.nosubscription.text"))),a.createElement("div",null,a.createElement("a",{href:n.flowSubscriptionProductPageUrl,className:"button"},(0,i.T)("js.myaccountflowsubscriptions.subscription.nosubscription.buttontext"))))})()),(()=>{if(n.credits.length>0)return a.createElement("div",{className:"my-account-flow-subscriptions__credits"},a.createElement("div",null,n.credits.map((e,t)=>a.createElement("div",{className:e.isTopTierCredits||n.credits.length<2?"":"not-top-tier",key:t}
1,e.Name&&a.createElement("h4",null,"@.Name"),a.createElement("div",{className:"my-account-flow-subscriptions__credits__credits"},a.createElement("img",{src:e.iconImageUrl})," "," ",a.createElement("span",null,e.amount)),a.createElement("div",null,e.description)))),a.createElement("a",{href:n.creditStoreUrl,className:"button"},(0,i.T)("js.myaccountflowsubscriptions.credits.store.buttontext")))})(),(()=>{if(n?.paymentMethodName&&""!==n.paymentMethodName)return a.createElement("div",{className:"my-account-flow-subscriptions__payment-method"},a.createElement("h4",null,(0,i.T)("js.myaccountflowsubscriptions.paymentmethod.heading")),a.createElement("div",null,(0,i.T)("js.myaccountflowsubscriptions.paymentmethod.description")),"card"===n?.paymentMethodName&&a.createElement("div",null,n.paymentMethodName),n?.paymentMethodCardNumber&&a.createElement("div",{className:"my-account-flow-subscriptions__payment-method__card"},a.createElement("div",null,a.createElement("i",{className:"icon-credit_card"}),a.createElement("span",{className:"my-account-flow-subscriptions__payment-method__card--bold"},"â¢Â â¢Â â¢Â â¢Â  â¢Â â¢Â â¢Â â¢Â  â¢Â â¢Â â¢Â â¢Â  ",n.paymentMethodCardNumber)),a.createElement("div",null,a.createElement("i",{className:"icon-clock"}),a.createElement("span",null,(0,i.T)("js.myaccountflowsubscriptions.paymentmethod.card.expires.label"))," ",a.createElement("span",{className:"my-account-flow-subscriptions__payment-method__card--bold"},n.paymentMethodCardExpiration))),n?.paymentMethodText&&a.createElement("div",null,n.paymentMethodText),n?.paymentMethodErrorText&&a.createElement("div",{className:"my-account-flow-subscriptions__payment-method--error"},n.paymentMethodErrorText),a.createElement("button",{onClick:g,className:"button button__link"},(0,i.T)("js.myaccountflowsubscriptions.paymentmethod.change.link.text")))})())},d=({onToggleManageSubscriptionMode:e})=>{const t=(0,s.wA)(),{payload:n}=(0,s.d4)(e=>e.myAccountMySubscriptions),[u,m]=(0,a.useState)({}),[p,d]=(0,a.useState)({}),[b,g]=(0,a.useState)(!1),[y,f]=(0,a.useState)([]),[E,_]=(0,a.useState)(!1),[h,w]=(0,a.useState)(!1),[v,x]=(0,a.useState)(!1),[T,N]=(0,a.useState)(!1),[S,C]=(0,a.useState)({});(0,a.useEffect)(()=>{if(!n||0===n.allSubscriptionProducts.length)return;const e=n.allSubscriptionProducts.find(e=>e.isCustomersCurrentSubscription);m(e),d(e??null)},[n?.allSubscriptionProducts]);const k=(e,t)=>{N(!0),C({callback:e,isInCancelMode:t})},j=()=>{N(!1),S?.isInCancelMode&&e(),d(u),C({callback:null,isInCancelMode:!1})},M=async()=>{if(!n?.currentOrLatestSubscriptionInfoId)try{await(0,o.bE)("/api/flashmessage/add/",{messageText:(0,i.T)("js.myaccountflowsubscriptions.managesubscription.cancel.errortext"),messageType:"Pink",dismissible:!0,timeToLive:10})}catch(e){}finally{return window.scrollTo(0,0),void window.location.reload()}try{x(!0),await(0,o.bE)(`/api/products/subscriptions/${n.currentOrLatestSubscriptionInfoId}/cancel`),u.afterCancellationPageUrl?window.location.href=u.afterCancellationPageUrl:window.location.reload()}catch(e){(0,r.vS)(e,e=>{t((0,l.K)(e)),f(e)}),x(!1)}},P=async()=>{if(!p)try{await(0,o.bE)("/api/flashmessage/add/",{messageText:(0,i.T)("js.myaccountflowsubscriptions.managesubscription.change.errortext"),messageType:"Pink",dismissible:!0,timeToLive:10})}catch(e){}finally{return window.scrollTo(0,0),void window.location.reload()}try{x(!0);await(0,o.bE)(`/api/products/subscriptions/${n.currentOrLatestSubscriptionInfoId}/change`,p.productId);_(!0)}catch(e){(0,r.vS)(e,e=>{t((0,l.K)(e)),f(e)})}finally{N(!1),x(!1)}},L=()=>{window.location.reload()};return a.createElement(a.Fragment,null,a.createElement("div",{className:"my-account-flow-subscriptions__manage-subscription"},!T&&!E&&a.createElement(a.Fragment,null,a.createElement("h3",null,n.currentOrLatestSubscriptionProductName),a.createElement("div",{className:"my-account-flow-subscriptions__manage-subscription__text"},!b&&n.changeSubscriptionModeAllowed?a.createElement("div",{dangerouslySetInnerHTML:{__html:(0,i.T)("js.myaccountflowsubscriptions.managesubscription.change.text")}}):a.createElement("div",{dangerouslySetInnerHTML:{__html:(0,i.T)("js.myaccountflowsubscriptions.managesubscription.cancel.text")}}))),T?a.createElement("div",{className:"my-account-flow-subscriptions__manage-subscription__confirm"},a.createElement("div",{className:"my-account-flow-subscriptions__manage-subscription__confirm__buttons"},S?.isInCancelMode?a.createElement(a.Fragment,null,a.createElement("p",null,(0,i.T)("js.myaccountflowsubscriptions.userconfirmation.cancel.text")),a.createElement("button",{onClick:()=>S?.callback(),className:"button button__secondary "+(v?"loading":""),disabled:v},a.createElement("span",null,(0,i.T)("js.myaccountflowsubscriptions.userconfirmation.cancel.button.confirm")),a.createElement("span",{className:"spinner spinner--light spinner--small"}))):a.createElement(a.Fragment,null,a.createElement("p",null,(0,i.T)("js.myaccountflowsubscriptions.userconfirmation.change.text")),a.createElement("button",{onClick:()=>S?.callback(),className:"button "+(v?"loading":""),disabled:v},a.createElement("span",null,(0,i.T)("js.myaccountflowsubscriptions.userconfirmation.change.button.confirm")),a.createElement("span",{className:"spinner spinner--light spinner--small"}))),a.createElement("button",{className:"button button__link",onClick:j,disabled:v},(0,i.T)("js.myaccountflowsubscriptions.userconfirmation.button.cancel")))):a.createElement(a.Fragment,null,n.changeSubscriptionModeAllowed&&!E&&a.createElement("div",{className:"form-radio-group my-account-flow-subscriptions__manage-subscription__controls"},a.createElement(c.A,{id:"cancelSubscriptionMode-change",name:"cancelSubscriptionMode-change",type:"radio",value:"false",checked:!b,label:(0,i.T)("js.myaccountflowsubscriptions.managesubscription.change.modetext"),onChange:()=>g(!1),errors:y}),a.createElement(c.A,{id:"cancelSubscriptionMode-cancel",name:"cancelSubscriptionMode-cancel",type:"radio",value:"true",checked:b,label:(0,i.T)("js.myaccountflowsubscriptions.managesubscription.cancel.modetext"),onChange:()=>g(!0),errors:y})),!b&&n.changeSubscriptionModeAllowed?E?a.createElement(a.Fragment,null,a.createElement("div",{className:"my-account-flow-subscriptions__manage-subscription__change-box",dangerouslySetInnerHTML:{__html:n.afterChangeMessage}}),a.createElement("button",{onClick:L,className:"button"},(0,i.T)("js.myaccountflowsubscriptions.managesubscription.change.after.buttontext"))):a.createElement(a.Fragment,null,a.createElement("div",{className:"my-account-flow-subscriptions__manage-subscription__change-box"},n.allSubscriptionProducts.map(e=>a.createElement("div",{onClick:()=>d(e),className:"my-account-flow-subscriptions__manage-subscription__change-box__item "+(e.productId===p.productId?"my-account-flow-subscriptions__manage-subscription__change-box__item--selected":""),key:e.productId},a.createElement("div",null,e.productImageUrl&&a.createElement("img",{src:e.productImageUrl,alt:e.productName})),a.createElement("div",null,a.createElement("h3",null,e.productName&&a.createElement("span",null,e.productName)," "," ",e.isCustomersCurrentSubscription&&a.createElement("span",null,(0,i.T)("js.myaccountflowsubscriptions.managesubscription.change.currentlysubscribing"))),e.productDescription&&a.createElement("div",null,e.productDescription)),a.createElement("div",null,e.isBestDeal&&a.createElement("div",{className:"my-account-flow-subscriptions__manage-subscription__change-box__item__best-deal-container"},a.createElement("i",{className:"icon-savings"}),a.createElement("span",null,(0,i.T)("js.myaccountflowsubscriptions.managesubscription.change.bestdealtext"))),e.formatedMonthlyPrice&&a.createElement("div",null,e.formatedMonthlyPrice)))),!p?.isCustomersCurrentSubscription&&a.createElement("div",{className:"my-account-flow-subscriptions__manage-subscription__change-box__info"},a.createElement("div",null,p.isBestDeal?(0,i.T)("js.myaccountflowsubscriptions.managesubscription.change.changeinfotext.upgrade.message"):(0,i.T)("js.myaccountflowsubscriptions.managesubscription.change.changeinfotext.downgrade-sidegrade.message").replace("{0}",n.currentOrLatestSubscriptionNextPaymentDateFormatted)),(0,i.T)("js.myaccountflowsubscriptions.managesubscription.change.changeinfotext.date"),a.createElement("span",{className:"my-account-flow-subscriptions__manage-subscription__change-box__info__bold"},p?.newPaymentDateFormatted),". "," ",(0,i.T)("js.myaccountflowsubscriptions.managesubscription.change.changeinfotext.amount"),a.createElement("span",{className:"my-account-flow-subscriptions__manage-subscription__change-box__info__bold"}
1,p?.firstPaymentAmount),".")),p.isCustomersCurrentSubscription?a.createElement("button",{onClick:e,className:"button"},(0,i.T)("js.myaccountflowsubscriptions.managesubscription.change.keep.buttontext")):a.createElement("button",{onClick:()=>k(P),className:"button "+(h?"loading":""),disabled:h},a.createElement("span",null,(0,i.T)("js.myaccountflowsubscriptions.managesubscription.change.buttontext")," ",p?.productName),a.createElement("span",{className:"spinner spinner--light spinner--small"}))):a.createElement(a.Fragment,null,a.createElement("div",{className:"my-account-flow-subscriptions__manage-subscription__cancel-box",dangerouslySetInnerHTML:{__html:n.cancelSubscriptionText}}),a.createElement("div",{className:"my-account-flow-subscriptions__manage-subscription__footer"},(0,i.T)("js.myaccountflowsubscriptions.managesubscription.cancel.footertext")," "," ",a.createElement("span",{className:"my-account-flow-subscriptions__manage-subscription__footer--bold"},n.currentOrLatestSubscriptionNextPaymentDateFormatted)),a.createElement("div",{className:"my-account-flow-subscriptions__manage-subscription__buttons"},a.createElement("button",{onClick:()=>k(M,!0),className:"button button__secondary"},a.createElement("span",null,(0,i.T)("js.myaccountflowsubscriptions.managesubscription.cancel.buttontext"))),a.createElement("button",{onClick:e,className:"button button__link"},(0,i.T)("js.myaccountflowsubscriptions.managesubscription.cancel.keep.buttontext")))))))},b=()=>{const{payload:e}=(0,s.d4)(e=>e.myAccountMySubscriptions),[t,n]=(0,a.useState)(!1),c=()=>{n(e=>!e)};return a.createElement(a.Fragment,null,e&&a.createElement(a.Fragment,null,t?a.createElement(d,{onToggleManageSubscriptionMode:c}):a.createElement(p,{onToggleManageSubscriptionMode:c})))}},6800:(e,t,n)=>{n.r(t),n.d(t,{default:()=>s});var a=n(3696);const s=({text:e})=>a.createElement(a.Fragment,null,e&&a.createElement("div",{className:"tool-tip"},a.createElement("i",{className:"icon-info_circle"}),a.createElement("div",{className:"tool-tip__content",dangerouslySetInnerHTML:{__html:e}})))},9520:(e,t,n)=>{n.d(t,{K:()=>s});var a=n(9134);const s=(e,t=null)=>n=>{if(Object.hasOwn(e,"general")){const t={errors:e.general?.map(e=>({messageText:e,messageType:"Pink",dismissible:!0,timeToLive:10,messageId:crypto.randomUUID()}))};n((0,a.OV)(t))}t&&n(t(e))}}}]); 2//# sourceMappingURL=110.bb693fdb0823b6a2.js.map
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.