PageSourceSearch

https://broadwayhd.com/code/js/chunks/cancellation-promo-preview.260ebbdcd5b7138537d9.js

js broadwayhd.com collected 2026-09-24 21:09:14 UTC 23,791 bytes, 3 lines download raw bytes

1(()=>{(function(){try{var g=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:{},_=new g.Error().stack;_&&(g._sentryDebugIds=g._sentryDebugIds||{},g._sentryDebugIds[_]="fcf472ed-a1f7-4bd3-9ac1-2e3e2fc37b46",g._sentryDebugIdIdentifier="sentry-dbid-fcf472ed-a1f7-4bd3-9ac1-2e3e2fc37b46")}catch(t){}})();(self.webpackChunkdice_web=self.webpackChunkdice_web||[]).push([[4071],{11456:((g,_,t)=>{t.d(_,{A:()=>D});var e=t(96540),d=t(85092),s=Object.defineProperty,i=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,E=(u,m,y)=>m in u?s(u,m,{enumerable:!0,configurable:!0,writable:!0,value:y}):u[m]=y,C=(u,m)=>{for(var y in m||(m={}))c.call(m,y)&&E(u,y,m[y]);if(i)for(var y of i(m))r.call(m,y)&&E(u,y,m[y]);return u};const D=(u=>e.createElement(d.A,C({},u),e.createElement("path",{d:"M25.875 3.75l-3.75-3.75-16 16 16 16 3.75-3.813-12.188-12.188z",fill:u.fill})))}),15503:((g,_,t)=>{t.d(_,{C:()=>d,j:()=>s});var e=t(92675);const d=i=>window.APP_CONF.shouldUseColourManagement?i?e.k9.COLOUR_MANAGEMENT_SECONDARY:e.k9.COLOUR_MANAGEMENT_PRIMARY:i?e.k9.SECONDARY:e.k9.PRIMARY,s=(i,c)=>`${i?"streamlined":""} ${i&&c?"dark-mode":""}`}),17328:((g,_,t)=>{t.d(_,{P:()=>e});const e=(d,s)=>s.addressCountryRestriction.restrictionType===d}),17658:((g,_,t)=>{t.d(_,{p2:()=>X,tI:()=>J,ot:()=>K});var e=t(96540),d=t(21904),s=t(58562),i=t(90953),c=t(11456),r=t(43797),E=t(81065),C=t(78270),D=t(2275),u=t(73120),m=t(92675),y=t(15503);const O=n=>{var S,W,R,Z;return e.createElement("div",{className:`simple-form streamlined-payment ${(0,y.j)(n.isStreamlinedCheckoutFlow,n==null?void 0:n.isDarkMode)}`},e.createElement(K,{back:n.back,label:n.displayAddCard?(S=n==null?void 0:n.chooseYourPaymentMethod)==null?void 0:S.value:(W=n==null?void 0:n.useSavedPaymentMethod)==null?void 0:W.value}),n.displayAddCard?e.createElement(e.Fragment,null,n.form,n.streamlinedExternalPaymentForm):e.createElement(e.Fragment,null,n.savedCards,e.createElement("div",{className:"payment-cards__button"},e.createElement(m.$n,{className:`${n.isStreamlinedCheckoutFlow?m.k9.SECONDARY:m.k9.PRIMARY} ${(0,y.j)(n.isStreamlinedCheckoutFlow,n==null?void 0:n.isDarkMode)}`,onClick:H=>{var k;H.preventDefault(),(k=n.onAddCard)==null||k.call(n)}},e.createElement("span",{className:"btn__label"},(R=n==null?void 0:n.addNewPaymentMethod)==null?void 0:R.value)))),!n.hideBillingDetailsSection&&!(n!=null&&n.billingDetailsComponent)?e.createElement("div",{className:`billing-details-section ${(0,y.j)(n.isStreamlinedCheckoutFlow,n.isDarkMode)}`},e.createElement(u.m,{title:(Z=n==null?void 0:n.billingAddress)==null?void 0:Z.value,rows:n.billingDetailsSummarySectionRows})):null,n.hideBillingDetailsSection?null:n.billingDetailsComponent,n!=null&&n.isPaymentUpdateFlow?n==null?void 0:n.completeButton:null)};var L=t(64665),I=Object.getOwnPropertySymbols,G=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable,j=(n,S)=>{var W={};for(var R in n)G.call(n,R)&&S.indexOf(R)<0&&(W[R]=n[R]);if(n!=null&&I)for(var R of I(n))S.indexOf(R)<0&&T.call(n,R)&&(W[R]=n[R]);return W};const X=n=>{const{checkoutFlow:S}=(0,i.U)(),W=d.nn.STREAMLINED_FLOW===S,{isPaymentUpdateFlow:R}=e.useContext(r.d)||{},Z=(0,s.b0)(["changeOrder","billingAddress","addNewPaymentMethod","chooseYourPaymentMethod","useSavedPaymentMethod","selectedPaymentMethod","selectedPaymentMethod_IDEAL","selectedPaymentMethod_BANCONTACT","selectedPaymentMethod_GCASH","selectedPaymentMethod_PIX",`selectedPaymentMethod_${n.paymentMethod}`,"taxNumber","birthDate"]),{changeOrder:H,billingAddress:k,addNewPaymentMethod:ee,chooseYourPaymentMethod:ae,useSavedPaymentMethod:ie,selectedPaymentMethod:ue}=Z,le=j(Z,["changeOrder","billingAddress","addNewPaymentMethod","chooseYourPaymentMethod","useSavedPaymentMethod","selectedPaymentMethod"]),se=(0,E.$z)(C.yw.TAX_NUMBER,n.countryCode),re=()=>{const Q=(0,L.gV)(n.paymentMethod,n.paymentMethodType);return le[Q].value},Ee=()=>e.createElement(e.Fragment,null,(n.paymentMethod===d.Rq.STRIPE||n.paymentMethod===d.Rq.ADYEN)&&n.paymentMethodType===d.eq.CARD?e.createElement("span",{className:"summary-section__icon"},"\u{1F4B3}"):null,re()),oe=n.paymentMethod===d.Rq.ADYEN&&n.paymentMethodType===d.eq.CARD||R,_e=[{label:Ee(),value:e.createElement("button",{className:"summary-section__change",onClick:n.changePaymentMethod,"aria-label":`${H.value} ${ue.value}`},e.createElement("span",null,H.value))}];let q=[{label:n.address,value:e.createElement("button",{className:"summary-section__change",onClick:n.changeBillingAddress,"aria-label":`${H.value} ${k.value}`},e.createElement("span",null,H.value))}];return se&&n.birthDate&&(q=[...q,{label:n.birthDate?`${le.birthDate.value}: ${n.birthDate}`:"",value:null}]),se&&n.taxNumber&&(q=[...q,{label:n.taxNumber?`${le.taxNumber.value}: ${n.taxNumber}`:"",value:null}]),e.useEffect(()=>{var Q;(Q=n==null?void 0:n.setDisplayAddCard)==null||Q.call(n,!n.hasSavedCards)},[n.hasSavedCards]),W?e.createElement(O,{back:n.back,displayAddCard:n.displayAddCard,savedCards:n.savedCards,onAddCard:()=>{var Q,f;(Q=n==null?void 0:n.setDisplayAddCard)==null||Q.call(n,!0),(f=n==null?void 0:n.setDefaultCardId)==null||f.call(n,null)},billingDetailsComponent:n.billingDetailsComponent,isStreamlinedCheckoutFlow:W,billingDetailsSummarySectionRows:q,isDarkMode:n.isDarkMode,form:n.form,streamlinedExternalPaymentForm:n.streamlinedExternalPaymentForm,billingAddress:k,chooseYourPaymentMethod:ae,useSavedPaymentMethod:ie,addNewPaymentMethod:ee,hideBillingDetailsSection:oe,isPaymentUpdateFlow:R,completeButton:n.completeButton}):e.createElement("div",{className:"simple-form"},e.createElement(K,{autoFocusLabel:!0,back:n.back,label:ee.value}),e.createElement(u.m,{title:ue.value,rows:_e}),oe?null:e.createElement(u.m,{title:k.value,rows:q}),n.form,n.completeButton)},K=({back:n,hideBackBtn:S,label:W,titleClassName:R,extraButton:Z,autoFocusLabel:H})=>{const{back:k}=(0,s.b0)(["back"]),ee=e.useRef(null);return e.useEffect(()=>{var ae;H&&((ae=ee.current)==null||ae.focus())},[H]),!W&&S&&!Z?null:e.createElement("div",{className:(0,D.AH)("simple-form__header",R&&"simple-form__header--supporting-text")},S?null:e.createElement("button",{className:"simple-form__back",onClick:n,"aria-label":k.value},e.createElement(c.A,{width:"12",height:"12"})),W?e.createElement("h1",{ref:ee,"aria-level":2,className:(0,D.AH)("simple-form__label",R)},W):null,Z)},J=({children:n})=>e.createElement("div",{className:"simple-form__body"},n)}),21023:(()=>
1{var g={colorRed:"#b60e0e",textSecondaryDarkMode:"#c5cad3",alertDarkMode:"#ff6b6b",textDarkModeColor:"#fff",darkGreyDarkModeColor:"#2a2a2a"}}),25278:((g,_,t)=>{t.d(_,{LX:()=>s,qS:()=>c});var e=t(68407),d=t(21904),s;(function(r){r.MANAGE="MANAGE",r.UPGRADE="UPGRADE",r.DOWNGRADE="DOWNGRADE"})(s||(s={}));const i=r=>r.type===SubEventDetailsType.PARTICIPANTS,c=(r,E=s.MANAGE)=>{if(r&&d.QN[r]){const D=d.QN[r];switch(E){case s.UPGRADE:return{label:"upgradeSubscriptionStore",data:{store:D}};case s.DOWNGRADE:return{label:"downgradeSubscriptionStore",data:{store:D}};default:return{label:"manageSubscriptionStore",data:{store:D}}}}switch(E){case s.UPGRADE:return{label:"upgradeSubscriptionWeb"};case s.DOWNGRADE:return{label:"downgradeSubscriptionWeb"};default:return{label:"manageSubscriptionWeb"}}}}),31398:((g,_,t)=>{t.d(_,{RR:()=>i,lQ:()=>c,_u:()=>r});const e=/\{\{([^}]+)\}\}/g,d=E=>{const C=[],D=new Set,u=new RegExp(e.source,"g");let m;for(;(m=u.exec(E))!==null;)D.has(m[1])||(D.add(m[1]),C.push(m[1]));return C},s=(E,C)=>E.replace(e,(D,u)=>{var m;return(m=C[u])!=null?m:""}),i={nextCharge:"nextCharge",basePrice:"basePrice",nextBillingDate:"nextBillingDate",dateOfNextCharge:"dateOfNextCharge",dateOfNextChargeWithoutDiscount:"dateOfNextChargeWithoutDiscount",billingFrequency:"billingFrequency"},c=(E,C)=>C?d(C).reduce((D,u)=>{var m;return D[u]=(m=E[u])!=null?m:"",D},{}):{},r=(E,C)=>{const D=E==null?void 0:E.trim();if(D)return s(D,C)}}),38537:((g,_,t)=>{t.d(_,{Br:()=>re,Bt:()=>se,Gw:()=>C.G,IR:()=>D.I,K9:()=>k,Ko:()=>le,M2:()=>ue,OZ:()=>Z,PJ:()=>_e,Q9:()=>ee,T1:()=>b,Wo:()=>ae,_L:()=>q,cD:()=>oe,fC:()=>H,iX:()=>V,nJ:()=>ie,pw:()=>v,rw:()=>P,yd:()=>K,ye:()=>Ee});var e=t(84657),d=t(76046),s=t(52360),i=t(22707),c=t(16505),r=t(79544),E=t(18364),C=t(99776),D=t(18568),u=Object.defineProperty,m=Object.defineProperties,y=Object.getOwnPropertyDescriptors,O=Object.getOwnPropertySymbols,L=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable,G=(a,l,o)=>l in a?u(a,l,{enumerable:!0,configurable:!0,writable:!0,value:o}):a[l]=o,T=(a,l)=>{for(var o in l||(l={}))L.call(l,o)&&G(a,o,l[o]);if(O)for(var o of O(l))I.call(l,o)&&G(a,o,l[o]);return a},j=(a,l)=>m(a,y(l));const{ENV_CONF:{httpapi:X}}=window;var K=(a=>(a.ELIGIBLE="ELIGIBLE",a.NOT_ELIGIBLE="NOT_ELIGIBLE",a))(K||{});const J=(a,l)=>!!a.licences.filter(({licence:{id:o}})=>o===l).length,n=(a,l)=>a.filter(o=>J(o,l))[0],S=a=>Promise.all(a?[]:[getUserDetails(),getCards(http)]),W=({type:a,purchaseStrategy:l={type:null},managed:o},N=!1)=>o&&a!==BLANKET&&a!==FREE&&!(l.type===PPV&&N),R=()=>http.get(URLS.CURRENT_LICENCE),Z=()=>c.LV.get(r.tl.ALL_LICENCES),H=(a,l=[])=>{const o={};return a&&(o.includeEntitlements="ALL_ACTIVE_USER_ENTITLEMENTS"),l.length&&(o.licenceId=l),c.LV.get(r.tl.LICENCE_FAMILIES,{queryParams:o})},k=(a,l)=>{const o=l?e.C.LEAVE:e.C.CONTINUE;return c.LV.put(`${X}${r.tl.PRICE_MIGRATION}/${a}/consent`,{status:o})},ee=({licenceId:a,cardId:l,checkBillingDetails:o=!1})=>c.LV.post(`${r.tl.ALL_LICENCES}/${a}/card/${l}${o?`?checkBillingDetails=${o}`:""}`,null),ae=(a,l)=>c.LV.post(`${(0,c.bL)(c.LV.baseUrl)}${r.tl.ACTIVE_LICENCES}/${a}/pause`,T({},l&&{config:{resumeAfter:l}})),ie=a=>c.LV.post(`${(0,c.bL)(c.LV.baseUrl)}${r.tl.ACTIVE_LICENCES}/${a}/resume`,{}),ue=(a,l)=>{let o=`${r.tl.ACTIVE_LICENCES}/${a}`;return l&&(o+="?cancellationDiscount=IGNORE"),c.LV.delete(o).catch(({messages:N})=>{const p=N.join(" ");return Promise.reject(p)})},le=a=>c.LV.get(`${r.tl.CANCELATION_PROMO}/${a}/verify`,{}),se=a=>c.LV.post(`${r.tl.CANCELATION_PROMO}/${a}/redeem`,{}),re=a=>c.LV.post(`${r.tl.CANCELATION_PROMO}/${a}/refuse`,{}),Ee=a=>{const l=`${r.tl.REACTIVATE_LICENCE}/${a}`;return c.LV.put(l,{},{method:"PATCH"})},oe=a=>{const l=a&&a.some(N=>N.local),o=a&&a.some(N=>N.default);return l||o},_e=(a,l,o)=>{switch(a){case e.Nt.ACTIVE:return"activeStatus";case e.Nt.UPCOMING:return l?o?"licencePausedStatus":null:"upcomingStatus";case e.Nt.EXPIRED:return"expiredStatus";default:}},q=a=>{if(a.type===e.oQ.PERCENTAGE)return`${a.percentage}%`;if(a.type===e.oQ.AMOUNT)return(0,i.e)(a.amount,!0)},Q=(a,l)=>l?a.state!==e.Nt.UPCOMING:!0,f=(a,l)=>a.lifeTimeRepeat?l?a.state===e.Nt.ACTIVE:a.state===e.Nt.UPCOMING:!0,v=(a,l,o)=>Q(a,l)&&f(a,o),P=({licence:a,licenceStatus:{autoRenewingStatus:l,expiryTimestamp:o,status:N,licencePayment:{paymentEventType:p}={paymentEventType:null}},paymentProviderInfo:{managed:F}={managed:!0}})=>j(T({},a),{managed:F,willRenew:l==="AUTO_RENEWING",expiry:o,status:N,paymentStatus:p}),b=a=>{var l,o;const N=A=>{var h,B;return(0,s.U0)((h=A.licenceStatus)==null?void 0:h.tierChangeDetails)||(0,s.xL)((B=A.licenceStatus)==null?void 0:B.tierChangeDetails)},p=A=>{var h;return(0,s.VG)((h=A.licenceStatus)==null?void 0:h.tierChangeDetails)},F=A=>A.status===e.uX.ACTIVE&&!N(A)&&!p(A),x=A=>A.licenceStatus.status===e.uX.EXPIRED&&A.licenceStatus.pauseState===e.WF.PAUSED,M=A=>{var h;return(0,s.Yn)((h=A.licenceStatus)==null?void 0:h.tierChangeDetails)},w=A=>F(A)||x(A)||M(A),$=((l=a==null?void 0:a.licenceFamilies)==null?void 0:l.reduce((A,h)=>{const B=h==null?void 0:h.licences.filter(w);return B?[...A,...B]:A},[]))||[],Y=((o=a==null?void 0:a.nonFamilyBasedLicences)==null?void 0:o.filter(w))||[],U=[...$,...Y];return U.length?U:null},V=a=>{const{description:l,familyRank:o,id:N,name:p,purchaseStrategy:F,amount:x,trialDetails:M,defaultMarketingPricePeriod:w,activationStrategy:$,cta:Y,ctaControl:U,licenceDisplayStyle:A}=a,{amount:h,currency:B,periodAmounts:te,scale:ne,sku:de,taxInclusive:ve,autoAppliedDiscount:me}=x||{},z={name:p,id:N,description:l,family:o[0].family,rank:o[0].rank,type:x?e.AV.STANDARD:e.AV.FREE,purchaseStrategy:F,trialDetails:M,defaultMarketingPricePeriod:w,amounts:x?[{amount:h,currency:B,default:!0,id:null,local:!0,periodAmounts:te,scale:ne,sku:de,taxInclusive:ve,autoAppliedDiscount:me}]:[],cta:Y,ctaControl:U,displayStyle:A};return($==null?void 0:$.type)===e.oL.CONFIRM_PAYMENT&&(z.licenceStatus={status:e.uX.INACTIVE,autoRenewingStatus:e.l$.UNKNOWN_RENEWING,pauseState:e.WF.NOT_ALLOWED,subscriptionPendingActions:[{action:e.Vq.CONFIRMED_PAYMENT_REQUIRED,requestedAt:null,actionDueBy:null}],licencePayment:{paymentEventType:E.dX.UNCONFIRMED,purchaseTimestamp:null,expiryTimestamp:null,paymentProviderInfo:null,cardId:null,purchaseId:null}}),z}}),43797:((g,_,t)=>{t.d(_,{b:()=>s,d:()=>d});var e=t(96540);const d=e.createContext(null);
1d.displayName="PaymentUpdateContext";const s=d.Provider}),57626:((g,_,t)=>{t.d(_,{l:()=>c});var e=t(78270),d=t(92888),s=t(17328);const i=(r,E)=>!E||!r.functionalPurpose||r.functionalPurpose.includes(E),c=(r,E,C)=>!r||!i(r,C)?!1:r.addressCountryRestriction?(0,s.P)(e.hS.BLACKLIST,r)?!(0,d.F)(E,r):(0,s.P)(e.hS.WHITELIST,r)?(0,d.F)(E,r):!1:!0}),63792:((g,_,t)=>{t.d(_,{Lv:()=>s,jC:()=>d});var e={ERROR_IOS_RESTORE_FAILED:"restore_failed",ERROR_IOS_USER_CANCELED:"user_cancelled",ERROR_RESTORE_EMPTY:"restore_empty"};const d="freePrice";var s;(function(i){i.IOS="FREETRIAL",i.ANDROID="Free"})(s||(s={}))}),64665:((g,_,t)=>{t.d(_,{Em:()=>c,Mb:()=>E,Wq:()=>C,ZM:()=>r,gV:()=>i,zb:()=>D});var e=t(21904),d=t(52360),s=t(76968);const i=(u,m)=>{if(u===e.Rq.STRIPE)switch(m){case e.eq.RECURRING_BANCONTACT:return"selectedPaymentMethod_BANCONTACT";case e.eq.RECURRING_IDEAL:case e.eq.STRIPE_PAYMENT_INTENT:return"selectedPaymentMethod_IDEAL";case e.eq.PIX:return"selectedPaymentMethod_PIX";default:return`selectedPaymentMethod_${u}`}else if(u===e.Rq.ADYEN&&m===e.eq.GCASH)return"selectedPaymentMethod_GCASH";return`selectedPaymentMethod_${u}`},c=u=>{if(u==="BR")return s.E},r=u=>u.slice(0,2)+"/"+u.slice(2),E=/^P(\d+)([DWMY])$/,C=u=>{if(!u)return 1;const m=u.match(E);return m?parseInt(m[1],10):1},D=u=>{var m;if(!u)return"";const y=(0,d.Bp)(u);if(y!==u)return y;const O=(m=u.match(E))==null?void 0:m[2];return O&&{D:"frequencyDay",W:"frequencyWeek",M:"frequencyMonth",Y:"frequencyYear"}[O]||""}}),69832:((g,_,t)=>{t.r(_),t.d(_,{default:()=>m});var e=t(96540),d=t(74699),s=t(91443),i=t(47101),c=t(21649),r=t(2275);const E="v2",C="PREVIEW_READY",D="PREVIEW_RELOAD",m=()=>{const[y,O]=e.useState(null);e.useEffect(()=>((0,s.p)(),window.parent.postMessage({paginationVersion:E},"*"),window.addEventListener("message",L,!1),()=>{window.removeEventListener("message",L,!1)}),[]);const L=I=>{const{data:G,origin:T}=I;if(T===window.location.origin)return;const j=JSON.parse(G),{cancellationPromotion:X,language:K}=j;if(K){const J=localStorage.getItem(i.Zt)||window.APP_CONF.activeLocale||(0,r.xd)(),n=(0,c.OE)(J),S=(0,c.OE)(K);if(S!==n){window.parent.postMessage(D,"*"),localStorage.setItem(i.Zt,S),window.location.reload();return}}X&&(O(X),window.parent.postMessage(C,"*"))};return y&&e.createElement("div",{className:"preview"},e.createElement(d.l,{cancellationDiscount:y}))}}),73120:((g,_,t)=>{t.d(_,{m:()=>s});var e=t(96540),d=t(21023);const s=i=>e.createElement("div",{className:"signup-summary__section summary-section"},i.title&&e.createElement("h1",{"aria-level":2},i.title),i.rows.map((c,r)=>e.createElement("div",{key:r,className:"summary-section__row"},e.createElement("div",{className:"summary-section__label"},c.label),e.createElement("div",{className:"summary-section__value"},c.value))))}),74699:((g,_,t)=>{t.d(_,{l:()=>Q,k:()=>_e});var e=t(96540),d=t(86364),s=t(95093),i=t.n(s),c=t(1346),r=t(58562),E=t(13516),C=t(92675),D=t(70077),u=t(19125),m=t(64665),y=t(31398),O=t(87585),L=t(44421),I=t(38537),G=t(15503),T=t(52360),j=t(17658),X=t(22707);const K=(f,v)=>typeof v!="number"?f:Math.floor(f*(100-v)/100);var J=t(10007);const n=(f,v,P={},b)=>{var V,a;const{effectiveDiscountDate:l,cancellationDiscountAmount:o,upcomingRenewalPrice:N,subscriptionPeriod:p,billingFrequency:F="",lifeTimeRepeat:x=!1}=P,M=l?(0,J.ZD)(l,f,v):"",w=(V=o==null?void 0:o.length)!=null?V:0;let $="";if(!x&&l&&p&&w>0){const h=v(l);for(let B=0;B<w;B++)h.add(v.duration(p));$=(0,J.ZD)(h,f,v)}let Y="",U="";if(N){const{total:h,currency:B,scale:te}=N;U=(0,X.e)({amount:h,currency:B,scale:te})||"",Y=(0,X.e)({amount:K(h,(a=o==null?void 0:o[0])==null?void 0:a.discountPercentage),currency:B,scale:te})||""}const A={[y.RR.nextCharge]:Y,[y.RR.basePrice]:U,[y.RR.nextBillingDate]:M,[y.RR.dateOfNextCharge]:M,[y.RR.dateOfNextChargeWithoutDiscount]:$,[y.RR.billingFrequency]:F};return(0,y.lQ)(A,b)};var S=t(60031),W=t(18811),R=t(79544),Z=t(47622);const H=({latestPermissibleCancellationDeadline:f,renewalTimestamp:v,subscriptionPeriod:P,upcomingRenewalPrice:b,projectedEffectiveCancellationDate:V,isPaused:a})=>{var l;const{defaultLocale:o,activeLocale:N}=(l=window.APP_CONF)!=null?l:{},p=N||o||"en",F=(0,T.vS)({latestPermissibleCancellationDeadline:f,renewalTimestamp:v,subscriptionPeriod:P,projectedEffectiveCancellationDate:V,isPaused:a},i()),x=!!(F!=null&&F.isLate),M=V?i()(V).valueOf():v,w=M?(0,J.ZD)(M,p,i()):"",$=F?(0,J.ZD)(F.effectiveEnd,p,i()):"",Y=b?(0,S.bT)((0,Z.a)({amount:b.total,currency:b.currency,scale:b.scale}),b.currency):"",U=x?R.VS:R.uE,{[U]:A}=(0,r.b0)([U],{[R.uE]:{date:w},[R.VS]:{date:$,amount:Y,billingDate:w}});return!F||!(0,W.R)(A)?null:e.createElement("p",{className:"licence-prompt__cancellation-effective"},A.value)};var k=Object.defineProperty,ee=Object.defineProperties,ae=Object.getOwnPropertyDescriptors,ie=Object.getOwnPropertySymbols,ue=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable,se=(f,v,P)=>v in f?k(f,v,{enumerable:!0,configurable:!0,writable:!0,value:P}):f[v]=P,re=(f,v)=>{for(var P in v||(v={}))ue.call(v,P)&&se(f,P,v[P]);if(ie)for(var P of ie(v))le.call(v,P)&&se(f,P,v[P]);return f},Ee=(f,v)=>ee(f,ae(v));const oe={WIDTH:600,HEIGHT:680}
1,_e=({back:f,activeLicence:v,confirm:P,description:b,descriptionTokens:V,buttonLabel:a,buttonDisabled:l,action:o,isPaymentUpdateFlow:N,isStreamlinedCheckoutFlow:p,isDarkMode:F,latestPermissibleCancellationDeadline:x,cancellationEffectiveDetails:M})=>{var w;const[$,Y]=e.useState(!1),[U,A]=e.useState(null),[h,B]=e.useState(null),te=e.useRef(null),ne=(0,r.b0)(["goBack",a,U,b],V?{[b]:V}:void 0),de=()=>P(te.current),ve=async()=>{var me;try{if(A(null),Y(!0),v){const z=(0,T.vS)(Ee(re({},M),{latestPermissibleCancellationDeadline:x}),i());te.current=z?re({licenceId:v.id},z):null;const ce=await o(v);ce.cancellationDiscountAmount?B(ce):de()}Y(!1)}catch(z){Y(!1);const ce=((me=z==null?void 0:z.messages)==null?void 0:me[0])==="originalCardNoLongerExists"?"originalCardNoLongerExists":L.Rb;A(ce)}};return e.createElement("div",{className:`simple-form licence-prompt ${(0,G.j)(p,F)}`},e.createElement(j.ot,{autoFocusLabel:!0,back:f,label:v==null?void 0:v.name}),e.createElement("p",{className:"licence-prompt__description"},ne[b].value),e.createElement(H,re({latestPermissibleCancellationDeadline:x},M)),l?null:e.createElement(C.$n,{disabled:$,isLoading:$,className:(0,E.AH)(C.k9.SECONDARY),onClick:ve},e.createElement("span",{className:"btn__label"},ne[a].value)),N?null:e.createElement("p",{className:"summary-section__change"},e.createElement("span",{onClick:f},ne.goBack.value)),U?e.createElement("p",{className:"error"},ne[U].value):null,h&&!U?e.createElement(Q,{cancellingLicenceId:v.id,close:de,cancellationDiscount:h,setError:A,upcomingRenewalPrice:M==null?void 0:M.upcomingRenewalPrice,subscriptionPeriod:((w=v==null?void 0:v.purchaseStrategy)==null?void 0:w.subscriptionPeriod)||(M==null?void 0:M.subscriptionPeriod)}):null)};var q=(f=>(f.CANCEL="CANCEL",f.REDEEM="REDEEM",f))(q||{});const Q=({cancellingLicenceId:f,close:v,cancellationDiscount:P,setError:b,showPau
1se:V,error:a=null,upcomingRenewalPrice:l,subscriptionPeriod:o})=>{const N=(0,m.zb)(o),{redeem:p,cancelSubscriptionConfirmation:F,[N]:x}=(0,r.b0)(["redeem","cancelSubscriptionConfirmation",...N?[N]:[]]),M=(0,E.vy)(P.imageUrl,oe.WIDTH,oe.HEIGHT),[w,$]=e.useState(!1),Y=(0,d.d4)(fe=>fe.services.app.isRtL),U=(0,r.b0)([a]),A=!f,{defaultLocale:h,activeLocale:B}=window.APP_CONF,te=B||h,{disclaimer:ne,effectiveDiscountDate:de,cancellationDiscountAmount:ve,lifeTimeRepeat:me}=P,z=(0,y._u)(ne,n(te,i(),{effectiveDiscountDate:de,cancellationDiscountAmount:ve,upcomingRenewalPrice:l,subscriptionPeriod:o,billingFrequency:x==null?void 0:x.value,lifeTimeRepeat:me},ne));e.useEffect(()=>{const fe={licenceId:f!=null?f:0,discountName:P.discountName,discountDescription:P.description,discountImageUrl:P.imageUrl,cancellationDiscount:P};(0,O.Yf)(c.fF.LICENCE_CANCELLATION_POPUP_OPENED,fe)},[]);const ce=async fe=>{if(!A)try{if(b==null||b(null),$(!0),fe==="CANCEL"){if(V)return V();{await(0,I.Br)(f);const Pe={licenceId:f,discountName:P.discountName,discountDescription:P.description,discountImageUrl:P.imageUrl,cancellationDiscount:P};(0,O.Yf)(c.fF.LICENCE_CANCELLATION_POPUP_CANCELLED,Pe)}}else{await(0,I.Bt)(f);const Pe={licenceId:f,discountName:P.discountName,discountDescription:P.description,discountImageUrl:P.imageUrl,cancellationDiscount:P};(0,O.Yf)(c.fF.LICENCE_CANCELLATION_POPUP_REDEEMED,Pe)}v==null||v(),$(!1)}catch(Pe){$(!1),b==null||b(L.Rb)}};return e.createElement(D.Modal,{className:(0,E.AH)("cancellation-promo",M&&"cancellation-promo--with-background",z&&"cancellation-promo--with-disclaimer"),isRtL:Y},M?e.createElement("div",{className:"cancellation-promo--background",style:{backgroundImage:`url(${M})`}}):null,e.createElement("h5",{className:"cancellation-promo--title"},P.discountName),e.createElement("p",{className:"cancellation-promo--description"},P.description),e.createElement("div",{className:"cancellation-promo--buttons"},e.createElement(C.$n,{className:(0,E.AH)(C.k9.PRIMARY),disabled:w,onClick:()=>ce("REDEEM")},e.createElement("span",{className:"btn__label"},p.value)),e.createElement(C.$n,{className:(0,E.AH)(C.k9.SECONDARY),disabled:w,onClick:()=>ce("CANCEL")},e.createElement("span",{className:"btn__label"},F.value)),a?e.createElement("p",{className:"error-message"},U[a].value):null,z?e.createElement(u.A,{className:"cancellation-promo--disclaimer",source:z,internal:!0}):null))}}),76968:((g,_,t)=>{t.d(_,{E:()=>e});const e=d=>{if(!d)return d;let s;const i=d.replace(/[^0-9]+/g,""),c=i.length,r=i.slice(0,3)+".",E=i.slice(3,6)+".",C=i.slice(6,9)+"-";return c<4?s=i:c>=4&&c<7?s=r+i.slice(3):c>=7&&c<10?s=r+E+i.slice(6):c>=10&&c<12?s=r+E+C+i.slice(9):c>=12&&(s=r+E+C+i.slice(9,11)),s}}),81065:((g,_,t)=>{t.d(_,{$z:()=>y,Y6:()=>E,iW:()=>m,p4:()=>u,p6:()=>C});var e=t(1357),d=t(97963),s=t(78270),i=t(92888),c=t(17328),r=t(57626);const E=()=>{const O=(0,d.Iz)();return window.AUTH_PROVIDERS.find(I=>I.name===O)},C=O=>{const L=(0,d.Iz)(),{fields:I=[]}=window.AUTH_PROVIDERS.find(n=>n.name===L)||{},[G]=I.filter(({type:n})=>n===s.yw.ADDRESS),T=G||e.i4,j=I.find(({id:n})=>n===s.yw.PHONE_NUMBER);j&&(j.type=s.yw.PHONE_NUMBER);const X=I.find(({id:n})=>n===s.yw.BIRTH_DATE),K=[...e.dN,T];return j&&K.push(j),X&&K.push(X),O.map(n=>K.find(({id:S})=>S===n)).filter(n=>n)},D=(O,L)=>((0,c.P)(s.hS.BLACKLIST,O)&&!(0,i.F)(L,O)&&(O.required=!0),(0,c.P)(s.hS.WHITELIST,O)&&(0,i.F)(L,O)&&(O.required=!0),O),u=(O,L)=>{const{fields:I=[]}=O;return I.find(({id:T})=>T===L)},m=(O,L,I)=>{const G=E();if(!G)return null;let T=u(G,O);return(0,r.l)(T,L,I)?(T=D(T,L),T):null},y=(O,L,I)=>!!m(O,L,I)}),91443:((g,_,t)=>{t.d(_,{p:()=>d});var e=t(47393);const d=()=>e.eG.dismissBanner()}),92888:((g,_,t)=>{t.d(_,{F:()=>e});const e=(d,s)=>s.addressCountryRestriction.elements.includes(d)})}]);})();
2
3//# sourceMappingURL=cancellation-promo-preview.260ebbdcd5b7138537d9.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.