1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="bb2dd53f-d077-44e5-8988-c9f426014a3b",e._sentryDebugIdIdentifier="sentry-dbid-bb2dd53f-d077-44e5-8988-c9f426014a3b")}()}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1214,8833],{8462:(e,t,n)=>{n.d(t,{Im:()=>d,UA:()=>l,Vs:()=>s});var r=n(95155),a=n(12115),i=n(54561);let o=(0,a.createContext)({isBlocked:!1,notifyBlocked:()=>void 0}),l=e=>{let{value:t,children:n}=e;return(0,r.jsx)(o.Provider,{value:t,"data-sentry-element":"PaymentTermsGateContext.Provider","data-sentry-component":"PaymentTermsGateProvider","data-sentry-source-file":"PaymentTermsGate.tsx",children:n})},d=()=>(0,a.useContext)(o),s=i.Ay.div.withConfig({componentId:"sc-596240d-0"})(["position:absolute;inset:0;z-index:2;cursor:pointer;background:transparent;"])},75388:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(95155),a=n(77928),i=n(54561),o=n(46224);let l=e=>{let{withIcon:t=!0}=e,{t:n}=(0,a.Bd)("checkout");return(0,r.jsxs)(s,{"data-sentry-element":"Container","data-sentry-component":"PaymentSecureText","data-sentry-source-file":"index.tsx",children:[t&&(0,r.jsx)(d,{children:(0,r.jsx)(o.A,{id:"icon-shield",height:20,width:20})}),(0,r.jsx)("div",{children:n("secured")})]})},d=i.Ay.div.withConfig({componentId:"sc-2ef393bc-0"})(["color:#00bc4b !important;"]),s=i.Ay.div.withConfig({componentId:"sc-2ef393bc-1"})(["display:flex;padding:12px 8px 8px 8px;justify-content:center;align-items:start;gap:4px;div{color:#080808;font-size:13px;font-weight:500;line-height:19px;}"])},91214:(e,t,n)=>{n.r(t),n.d(t,{default:()=>R});var r=n(95155),a=n(12115),i=n(11662),o=n(54561),l=n(97697),d=n(75388),s=n(4561),u=n(29712),c=n(65862),p=n(8462),y=n(92435),m=n(97463),x=n(75775),g=n(45473);let f=e=>{let{onSubmit:t,stripe:n,stripeMerchantData:a,payButtonLabel:i,roundedPayButton:o}=e,{isBlocked:l,notifyBlocked:d}=(0,p.Im)();return(0,r.jsxs)(h,{"data-sentry-element":"CardContainer","data-sentry-component":"CardForm","data-sentry-source-file":"CardForm.tsx",children:[(0,r.jsx)(m.He,{onReady:()=>(0,y.A)(x.jy.PAYMENT_FORM_MOUNTED,{payment_provider:c.CA.STRIPE,stripe_region:a.region}),options:{layout:"tabs",fields:{billingDetails:{address:{postalCode:"auto"}}},wallets:{applePay:"never",googlePay:"never",link:"never"},terms:{card:"never",applePay:"never"}},"data-sentry-element":"PaymentElement","data-sentry-source-file":"CardForm.tsx"}),(0,r.jsx)(g.Q,{onClick:()=>{if(l)return void d();t()},text:(0,r.jsx)(s.u,{label:i}),"data-testid":u.PW.payButton,isDisabled:!n||!a,customStyles:o?{$w:"100%",$h:"48px",$maxHeight:"48px",$br:"1000px",$bg:"#4500ff",$fz:"18px",$fw:"700",$lh:"24px"}:{$w:"100%",$h:"60px",$br:"8px",$fz:"17px",$fw:"700",$lh:"23px"},"data-sentry-element":"StyledBtn","data-sentry-source-file":"CardForm.tsx"})]})},h=o.Ay.div.withConfig({componentId:"sc-e2339eb7-0"})(["display:flex;flex-direction:column;width:100%;gap:16px;"]),v=e=>{let{showApplePay:t,showGooglePay:n,onSubmit:a,product:i}=e,o=(()=>{var e,t;if(!i)return;let n=(null==(e=i.trialPrice)?void 0:e.regular)||(null==(t=i.price)?void 0:t.regular)||0,r=Math.floor((i.billingPeriod||0)/864e5),a="month",o=1;7===r?(a="day",o=7):30===r||31===r?(a="month",o=1):r>=365?(a="year",o=1):r>0&&(a="day",o=r);let l=new Date,d=i.trialPeriod?Math.floor(i.trialPeriod/864e5):0;d>0&&l.setDate(l.getDate()+d);let s=window.location.origin;return{paymentDescription:i.description||i.name,regularBilling:{amount:n,label:i.name,recurringPaymentStartDate:l,recurringPaymentIntervalUnit:a,recurringPaymentIntervalCount:o},billingAgreement:i.description||"".concat(i.name," subscription will auto-renew"),managementURL:"".concat(s,"/settings/subscription")}})();return(0,r.jsx)(m.F8,{onConfirm:a,options:{buttonTheme:{applePay:"black",googlePay:"black"},buttonHeight:45,layout:{maxColumns:1,maxRows:0,overflow:"never"},paymentMethods:{applePay:t?"always":"never",googlePay:n?"always":"never",link:"never"},business:{name:"my-muse"},...t&&o&&{applePay:{recurringPaymentRequest:o}}},"data-sentry-element":"ExpressCheckoutElement","data-sentry-component":"WalletPayButton","data-sentry-source-file":"WalletPayButton.tsx"})};var b=n(68113),P=n(35967),w=n(31477),C=n(90055),A=n(58573),_=n(3001);let I=o.Ay.div.withConfig({componentId:"sc-ba88e077-0"})(["display:flex;flex-direction:column;width:100%;gap:16px;"]),S=e=>{let{showApplePay:t,showGooglePay:n,onSuccess:a,hideSecureText:o,payButtonLabel:s,roundedPayButton:u}=e,p=(0,m.t2)(),g=(0,m.HH)(),[h,S,j,k,B,E,T]=(0,i.useUnit)([P.CH,A.QM,_.Ju,_.Hx,A.a4,P.Se,A.A5]),{provider:D,region:R}=(0,b.V)(),F=k.includes((null==j?void 0:j.videoId)||""),$=async e=>{a&&a(e)},H=e=>{var t,n,r,a,i;(0,y.A)(x.jy.PURCHASE_FAILED,{payment_type:x.pz.subscription,amount:null==B||null==(t=B.trialPrice)?void 0:t.regular,currency:null==B||null==(n=B.trialPrice)?void 0:n.currency,provider:null==(r=e.payment_method)?void 0:r.type,product_id:null==B?void 0:B.paymentProviderProductId,product_name:null==B?void 0:B.name,error_code:e.code,card_brand:null==(i=e.payment_method)||null==(a=i.card)?void 0:a.brand,message:e.message,series_name:null==j?void 0:j.name,series_id:null==j?void 0:j.videoId,is_vip:F,payment_provider:c.CA.STRIPE});let o=e.message||"Something went wrong";l.oR.error(o),B&&setTimeout(()=>{E({chosenProduct:B,email:(null==T?void 0:T.email)||"",paymentProvider:D,paymentRegion:R})},2500)},M=async e=>{var t,n;if(!p||!g)return;let r=!!e,a=null!=e?e:x.g5.CARD;(0,C.U7)({product:null!=B?B:void 0,paymentType:a}),(0,y.A)(x.jy.PAY_CLICKED,{amount:null==B||null==(t=B.trialPrice)?void 0:t.regular,currency:null==B||null==(n=B.trialPrice)?void 0:n.currency,merchant:null==h?void 0:h.clientSecret,order_type:null==B?void 0:B.type,product_id:null==B?void 0:B.paymentProviderProductId,product_name:null==B?void 0:B.name,provider:a,payment_provider:c.CA.STRIPE});try{let{error:e}=await g.submit();if(e)return void H(e);let{error:t,paymentIntent:n}=await p.confirmPayment({elements:g,redirect:"if_required",...r&&{confirmParams:{payment_method_data:{billing_details:{address:{country:S}}}}}});t?H(t):n&&("succeeded"===n.status||"processing"===n.status)&&$(n)}catch(e){}};return(0,r.jsxs)(I,{"data-sentry-element":"FormContainer","data-sentry-component":"CheckoutContent","data-sentry-source-file":"CheckoutContent.tsx",children:[(t||n)&&(0,r.jsx)(v,{showApplePay:t,showGooglePay:n,onSubmit:e=>M((0,w.xx)(e.expressPaymentType)),product:B}),(0,r.jsx)(f,{onSubmit:()=>
1M(),stripe:p,stripeMerchantData:h,payButtonLabel:s,roundedPayButton:u,"data-sentry-element":"CardForm","data-sentry-source-file":"CheckoutContent.tsx"}),!o&&(0,r.jsx)(d.A,{})]})};var j=n(28850),k=n(15784),B=n(16502);let E=o.Ay.div.withConfig({componentId:"sc-176b3248-0"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px 20px;text-align:center;width:100%;"]),T=o.Ay.p.withConfig({componentId:"sc-176b3248-1"})(["color:#d60000;font-size:16px;font-weight:400;line-height:22px;margin:0 0 20px 0;max-width:400px;"]),D=(0,o.Ay)(g.A).withConfig({componentId:"sc-176b3248-2"})(["width:200px;max-width:200px;background:",";&:disabled{opacity:0.5;cursor:not-allowed;}&:hover:not(:disabled){opacity:0.9;}"],e=>{let{theme:t}=e;return t.colors.purple.purple1}),R=e=>{let{showApplePay:t,showGooglePay:n,handleOnSuccess:o,handleOnClose:l,onSuccess:d,hideSecureText:s,payButtonLabel:u,roundedPayButton:p}=e,[y]=(0,i.useUnit)([P.CH]),[x,g]=(0,a.useState)(null),[f,h]=(0,a.useState)(!1),[v,b]=(0,a.useState)(!1),w=async e=>{let t=(()=>{var e,t,n,r;if("undefined"==typeof navigator)return!1;let a=null!=(n=null==(e=navigator)?void 0:e.userAgent)?n:"";if(!a)return!1;let i=null!=(r=null==(t=new j.O(a).getBrowser().name)?void 0:t.toLowerCase())?r:"",o=[/FBAN/i,/FBAV/i,/FB_IAB/i,/Instagram/i,/WKWebView/i].some(e=>e.test(a));return"facebook"===i||"instagram"===i||o})();try{let n=await (0,k.y)(e,t?5:3,1e3);if(!n)return h(!0),null;return h(!1),n}catch(e){return h(!0),null}};(0,a.useEffect)(()=>{(null==y?void 0:y.publicKey)&&g(w(y.publicKey))},[null==y?void 0:y.publicKey]);let C=y&&x&&y.clientSecret;return f?(0,r.jsxs)(E,{children:[(0,r.jsx)(T,{children:"Failed to load payment system. Please check your connection and try again."}),(0,r.jsx)(D,{onClick:()=>{if(!(null==y?void 0:y.publicKey))return;h(!1),b(!0),g(null);let e=w(y.publicKey);g(e),e.finally(()=>{b(!1)})},disabled:v,children:v?"Retrying...":"Retry"})]}):C?(0,r.jsx)(m.S8,{stripe:x,options:{clientSecret:y.clientSecret,appearance:{theme:c.CA.STRIPE,variables:{buttonBorderRadius:"50px"}},loader:"auto"},"data-sentry-element":"Elements","data-sentry-component":"StripePaymentForm","data-sentry-source-file":"index.tsx",children:(0,r.jsx)(S,{showApplePay:t,showGooglePay:n,handleOnSuccess:o,handleOnClose:l,onSuccess:d,hideSecureText:s,payButtonLabel:u,roundedPayButton:p,"data-sentry-element":"CheckoutContent","data-sentry-source-file":"index.tsx"})}):(0,r.jsx)(B.A,{secondaryWidth:4,width:30,height:30})}}}]); 2//# sourceMappingURL=1214.28d63878fc01b802.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.