Build 567923stable
Module 901930
1,380 characters · in 3d3b05863accbf32.jsDependencies
Source Raw
function(e,t,n){"use strict";n.d(t,{A:()=>f,j:()=>p});var l=n(627968);n(64700);var i=n(683071),s=n(913122),r=n(136857),a=n(211083),o=n(655857),u=n(211159),c=n(975571),d=n(166532),m=n(652215),h=n(375708);let p=e=>{let{planError:t}=e,{paymentError:n}=(0,a.o)(),{dropdownCurrencies:i}=(0,o.Jn)(),{purchaseError:p,purchasePreviewError:f}=(0,u.t4)(e=>({purchaseError:e.purchaseError,purchasePreviewError:e.purchasePreviewError})),g=null;null!=f?g=f:null!=n&&null==(0,d.ou)(n)?g=n:null!=p?g=p:null!=t&&(g=t);let E=i.length>1,A=null!=g?g.message:"";if(null!=g&&g instanceof s.Ey&&(g.code===r.tG.CARD_DECLINED&&E&&(A+=` ${h.intl.string(h.t.iWvwQS)}`),g.code===r.tG.INVALID_GIFT_REDEMPTION_FRAUD_REJECTED&&(A=h.intl.string(h.t.ypuSd8)),g.code===m.t02.BILLING_NON_REFUNDABLE_PAYMENT_SOURCE&&(A=h.intl.string(h.t.mXMmWE)),g.code===r.tG.INVALID_CURRENCY_FOR_PAYMENT_SOURCE&&(A=h.intl.string(h.t.mC1Fjz)),g.code===r.tG.INVALID_BILLING_ADDRESS)){let e=h.intl.format(h.t.BPDKoA,{helpdeskArticle:c.A.getArticleURL(m.MVz.BILLING).concat(m.bNI.INVALID_BILLING_ADDRESS)});A=(0,l.jsxs)(l.Fragment,{children:[h.intl.string(h.t["yVIm/G"])," ",e]})}return{error:g,errorMessage:A}};function f(e){let{planError:t,purchaseErrorBlockRef:n,className:s}=e,{error:r,errorMessage:a}=p({planError:t});return null==r?null:(0,l.jsx)("div",{ref:n,className:s,children:(0,l.jsx)(i.w,{type:"critical",children:a})})}}