!function(){function e(t){var n=o[t];if(void 0!==n)return n.exports;var i=o[t]={id:t,loaded:!1,exports:{}};return r[t](i,i.exports,e),i.loaded=!0,i.exports}var t,n,r={723:function(e,t,n){"use strict";function r(e){l.length||(a(),!0),l[l.length]=e}function o(){for(;d1024){for(var t=0,n=l.length-d;tq.length&&q.push(e)}function d(e,t,n,o){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var a=!1;if(null===e)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case b:case w:a=!0}}if(a)return n(o,e,""===t?"."+m(e,0):t),1;if(a=0,t=""===t?".":t+":",Array.isArray(e))for(var c=0;c=2)throw new o.No("It seems that you have more than one of deferredPaymentRequest, recurringPaymentRequest, and automaticReloadPaymentRequest set in your Apple Pay config. Please only set one of the three.");if(a&&!!a.freeCancellationDate!=!!a.freeCancellationDateTimeZone)throw new o.No("It seems that you have only set one of deferredPaymentRequest.freeCancellationDate and deferredPaymentRequest.freeCancellationDateTimezone. Please set both or none of them.");if(null!=c&&null!==(t=c.regularBilling)&&void 0!==t&&t.recurringPaymentStartDate&&c.regularBilling.recurringPaymentEndDate&&c.regularBilling.recurringPaymentStartDate.getTime()>=c.regularBilling.recurringPaymentEndDate.getTime())throw new o.No("It seems that you have set recurringPaymentRequest.regularBilling.recurringPaymentStartDate to a date that is after or on recurringPaymentRequest.regularBilling.recurringPaymentEndDate. Please set recurringPaymentRequest.regularBilling.recurringPaymentStartDate to a date that is before recurringPaymentRequest.regularBilling.recurringPaymentEndDate.");if(null!=c&&null!==(n=c.trialBilling)&&void 0!==n&&n.recurringPaymentStartDate&&c.trialBilling.recurringPaymentEndDate&&c.trialBilling.recurringPaymentStartDate.getTime()>=c.trialBilling.recurringPaymentEndDate.getTime())throw new o.No("It seems that you have set recurringPaymentRequest.trialBilling.recurringPaymentStartDate to a date that is after or on recurringPaymentRequest.trialBilling.recurringPaymentEndDate. Please set recurringPaymentRequest.trialBilling.recurringPaymentStartDate to a date that is before recurringPaymentRequest.trialBilling.recurringPaymentEndDate.");if("checkout"!==i&&u||"checkout"!==i&&l)throw new o.No("Coupon codes are not supported.")},f=function(e){var t=e.applePay,n=(0,a.VC)(14),r=[];t.recurringPaymentRequest&&!n&&r.push("`applePay.recurringPaymentRequest` is only supported with Apple Pay in Safari 16.0+ and iOS 16.0+.");var o=(0,a.VC)(14);t.automaticReloadPaymentRequest&&!o&&r.push("`applePay.automaticReloadPaymentRequest` is only supported with Apple Pay in Safari 16.0+ and iOS 16.0+.");var i=(0,a.VC)(15);return t.deferredPaymentRequest&&!i&&r.push("`applePay.deferredPaymentRequest` is only supported with Apple Pay in Safari 16.5+ and iOS 16.5+."),r}},4716:function(e,t,n){"use strict";n.d(t,{_0:function(){return d},YA:function(){return s},_y:function(){return p},A2:function(){return u}});var r,o,i,a=n(4942),c=n(942),s=(r={},(0,a.Z)(r,c.Yj.card,{unique:!0,conflict:[c.Yj.cardNumber,c.Yj.cardExpiry,c.Yj.cardCvc,c.Yj.postalCode],beta:!1,implementation:"legacy"}),(0,a.Z)(r,c.Yj.cardNumber,{unique:!0,conflict:[c.Yj.card],beta:!1,implementation:"legacy"}),(0,a.Z)(r,c.Yj.cardExpiry,{unique:!0,conflict:[c.Yj.card],beta:!1,implementation:"legacy"}),(0,a.Z)(r,c.Yj.cardCvc,{unique:!0,conflict:[c.Yj.card],beta:!1,implementation:"legacy"}),(0,a.Z)(r,c.Yj.postalCode,{unique:!0,conflict:[c.Yj.card],beta:!1,implementation:"legacy"}),(0,a.Z)(r,c.Yj.paymentRequestButton,{unique:!0,conflict:[],beta:!1,implementation:"legacy"}),(0,a.Z)(r,c.Yj.iban,{unique:!0,conflict:[],beta:!1,implementation:"legacy"}),(0,a.Z)(r,c.Yj.idealBank,{unique:!0,conflict:[],beta:!1,implementation:"legacy"}),(0,a.Z)(r,c.Yj.p24Bank,{unique:!0,conflict:[],beta:!1,implementation:"legacy"}),(0,a.Z)(r,c.Yj.auBankAccount,{unique:!0,beta:!1,conflict:[],implementation:"legacy"}),(0,a.Z)(r,c.Yj.fpxBank,{unique:!0,beta:!1,conflict:[],implementation:"legacy"}),(0,a.Z)(r,c.Yj.netbankingBank,{unique:!0,beta:!0,conflict:[],implementation:"legacy"}),(0,a.Z)(r,c.Yj.issuingCardCopyButton,{unique:!1,beta:!0,conflict:[],implementation:"legacy"}),(0,a.Z)(r,c.Yj.issuingCardNumberDisplay,{unique:!1,beta:!0,conflict:[],implementation:"legacy"}),(0,a.Z)(r,c.Yj.issuingCardCvcDisplay,{unique:!1,beta:!0,conflict:[],implementation:"legacy"}),(0,a.Z)(r,c.Yj.issuingCardExpiryDisplay,{unique:!1,beta:!0,conflict:[],implementation:"legacy"}),(0,a.Z)(r,c.Yj.issuingCardPinDisplay,{unique:!1,beta:!0,conflict:[],implementation:"legacy"}),(0,a.Z)(r,c.Yj.epsBank,{unique:!0,conflict:[],beta:!0,implementation:"legacy"}),(0,a.Z)(r,c.Yj.affirmMessage,{unique:!1,conflict:[],beta:!1,implementation:"affirm_message"}),(0,a.Z)(r,c.Yj.afterpayClearpayMessage,{unique:!1,conflict:[],beta:!1,implementation:"afterpay_message"}),(0,a.Z)(r,c.Yj.unifiedMessage,{unique:!1,conflict:[],beta:!0,implementation:"payment_method_messaging"}),(0,a.Z)(r,c.Yj.paymentMethodMessaging,{unique:!1,conflict:[],beta:!1,implementation:"payment_method_messaging"}),(0,a.Z)(r,c.Yj.linkAuthentication,{unique:!0,conflict:[],beta:!0,implementation:"frame"}),(0,a.Z)(r,c.Yj.payment,{unique:!0,conflict:[],beta:!0,implementation:"frame"}),(0,a.Z)(r,c.Yj.shippingAddress,{unique:!0,conflict:[c.Yj.address],beta:!0,implementation:"frame"}),(0,a.Z)(r,c.Yj.address,{unique:!0,conflict:[c.Yj.shippingAddress],beta:!0,implementation:"frame"}),(0,a.Z)(r,c.Yj.expressCheckout,{unique:!0,conflict:[c.Yj.payButton],beta:!0,implementation:"express_checkout"}),(0,a.Z)(r,c.Yj.payButton,{unique:!0,conflict:[c.Yj.expressCheckout],beta:!0,implementation:"express_checkout"}),r),u="__PrivateStripeElement",l=["brand"],d=(o={},(0,a.Z)(o,c.Yj.card,l),(0,a.Z)(o,c.Yj.cardNumber,l),(0,a.Z)(o,c.Yj.iban,["country","bankName"]),(0,a.Z)(o,c.Yj.auBankAccount,["bankName","branchName"]),o),p=(i={},(0,a.Z)(i,c.Yj.idealBank,{secondary:c.Yj.idealBankSecondary}),(0,a.Z)(i,c.Yj.p24Bank,{secondary:c.Yj.p24BankSecondary}),(0,a.Z)(i,c.Yj.fpxBank,{secondary:c.Yj.fpxBankSecondary}),(0,a.Z)(i,c.Yj.netbankingBank,{secondary:c.Yj.netbankingBankSecondary}),(0,a.Z)(i,c.Yj.epsBank,{secondary:c.Yj.epsBankSecondary}),i)},2543:function(e,t,n){"use strict";n.d(t,{Am:function(){return s},GN:function(){return i},UQ:function(){return c},sg:function(){return a}});var r=n(1413),o=n(4417),i={billingAddressRequired:!0,shippingAddressRequired:!1},a=["always","auto","never"],c=["auto","never"],s=(0,r.Z)((0,r.Z)({},(0,o.ff)((function(){return"never"}))),{},{googlePay:"never",applePay:"never",paypal:"never",link:"never"})},4417:function(e,t,n){"use strict";n.d(t,{bj:function(){return f},ff:function(){return d},pd:function(){return l},r2:function(){return p}});var r=n(4942),o=n(1413),i=n(3324),a=n(1647),c=n(3550),s=n(2024),u=function(e){return Object.keys(a.H).reduce((function(t,n){var c=n,s=e(c,a.H[c]),u=(0,i.Z)(s,2),l=u[0],d=u[1];return(0,o.Z)((0,o.Z)({},t),{},(0,r.Z)({},l,d))}),{})},l=function(e){return u((function(t,n){return[t,e(t,n)]}))},d=function(e){return u((function(t,n){return[m(t),e(t,n)]}))},p=function(e){return f().indexOf(e)>=0},m=function(e){return(0,c.i3)(e)},f=(0,c.qe)((function(){return(0,s.qh)(a.H).map((function(e){return(0,i.Z)(e,1)[0]}))}))},1647:function(e,t,n){"use strict";n.d(t,{H:function(){return l}});var r,o=n(4942),i=["pay","checkout"],a=["light","dark"],c=n(3333),s={thirdPartyFrameType:"AmazonPayButton",isSupported:(0,c.gG)()&&!c.aS,rolloutConfig:{type:"ga",circuitBreaker:"elements_disable_express_checkout_button_amazon_pay"},recurringFlowsRolloutConfig:{type:"ga",circuitBreaker:"elements_disable_recurring_express_checkout_button_amazon_pay"},confirmationTokenRolloutConfig:{type:"ga"},supportedButtonThemes:a,defaultButtonTheme:"light",defaultBackgroundDarkButtonTheme:"light",defaultBackgroundLightButtonTheme:"dark",supportedButtonTypes:i,defaultButtonTypeOption:"pay",plainButtonType:"pay",isNextActionSupported:!0},u={thirdPartyFrameType:"DemoPayButton",isSupported:!0,rolloutConfig:{type:"beta",betaGate:"elements_enable_express_checkout_button_demo_pay"},recurringFlowsRolloutConfig:{type:"ga"},confirmationTokenRolloutConfig:{type:"ga"},supportedButtonThemes:a,defaultButtonTheme:"light",defaultBackgroundDarkButtonTheme:"light",defaultBackgroundLightButtonTheme:"dark",supportedButtonTypes:i,defaultButtonTypeOption:"pay",plainButtonType:"pay",isNextActionSupported:!0},l=(r={},(0,o.Z)(r,"demo_pay",u),(0,o.Z)(r,"amazon_pay",s),r)},2388:function(e,t,n){"use strict";n.d(t,{r4:function(){return I},lK:function(){return K},PY:function(){return H},lH:function(){return Y},oN:function(){return q},a1:function(){return F},uU:function(){return U}});var r=n(5987),o=n(9062),i=n(1413),a=n(1873),c=n(8812),s=n(7955),u=n(1765),l=n(1743),d=n(2967),p=n(2543),m=n(4417),f=n(1647),_=((0,m.bj)(),(0,m.ff)((function(e,t){return t})),(0,m.pd)((function(e,t){return t.thirdPartyFrameType})),(0,m.pd)((function(e,t){return t.isSupported})),(0,m.ff)((function(e,t){return t.supportedButtonThemes})),(0,m.ff)((function(e,t){return t.defaultBackgroundLightButtonTheme})),(0,m.ff)((function(e,t){return t.defaultBackgroundDarkButtonTheme})),(0,m.ff)((function(e,t){return t.defaultButtonTypeOption})),(0,m.ff)((function(e,t){return t.supportedButtonTypes})),(0,m.ff)((function(e,t){return t.plainButtonType})),(0,m.pd)((function(e,t){return t.isNextActionSupported})),(0,m.ff)((function(){return(0,a.jt)(a.kw.apply(void 0,(0,o.Z)(p.UQ)))}))),h=((0,m.ff)((function(e,t){return t.rolloutConfig})),f.H,["lineItems"]),y=Object.freeze((0,i.Z)({applePay:(0,a.jt)(a.kw.apply(void 0,(0,o.Z)(p.sg))),googlePay:(0,a.jt)(a.kw.apply(void 0,(0,o.Z)(p.sg))),paypal:(0,a.jt)(a.kw.apply(void 0,(0,o.Z)(p.UQ))),link:(0,a.jt)(a.kw.apply(void 0,(0,o.Z)(p.UQ))),klarna:(0,a.jt)(a.kw.apply(void 0,(0,o.Z)(p.UQ)))},_)),v=Object.freeze({applePay:(0,a.jt)((0,a.kw)("black","white","white-outline")),googlePay:(0,a.jt)((0,a.kw)("black","white")),paypal:(0,a.jt)((0,a.kw)("gold","blue","silver","white","black")),klarna:(0,a.jt)((0,a.kw)("dark","light","outlined"))}),g=Object.freeze({applePay:(0,a.jt)((0,a.kw)("add-money","book","buy","check-out","contribute","donate","order","plain","reload","rent","subscribe","support","tip","top-up")),googlePay:(0,a.jt)((0,a.kw)("book","buy","checkout","donate","order","pay","plain","subscribe")),paypal:(0,a.jt)((0,a.kw)("paypal","checkout","buynow","pay")),klarna:(0,a.jt)((0,a.kw)("continue","pay"))}),b=(0,a.kw)("auto","horizontal","vertical"),w=Object.keys(l.yv),k=(0,a.jt)(a.kw.apply(void 0,w)),S=Object.freeze((0,i.Z)((0,i.Z)({},d.V8),{},{paymentRequestPassthrough:(0,a.jt)(a.Ry),applePayLaterAvailability:k,supportsCouponCode:(0,a.jt)(a.Xg),couponCode:(0,a.jt)(a.Z_),minApplePayVersion:(0,a.jt)(a.Rx)})),P=Object.freeze((0,i.Z)((0,i.Z)({},S),{},{cardFunding:(0,a.jt)((0,a.kw)("supportsCredit","supportsDebit"))})),C=Object.freeze(d.um),E=Object.freeze({minGooglePayVersion:(0,a.jt)((0,a.mC)({major:(0,a.gy)(0),minor:(0,a.gy)(0)}))}),A=Object.freeze({locale:(0,a.yv)("elements()"),buttonHeight:(0,a.jt)((0,a.rS)(40,55)),layout:(0,a.jt)((0,a.or)((0,a.or)(b,(0,a.mC)({type:b,visibleButtonCount:(0,a.jt)((0,a.ig)(0))})),(0,a.mC)({maxColumns:(0,a.Wc)((0,a.gy)(0),(function(){return 0})),maxRows:(0,a.Wc)((0,a.gy)(0),(function(){return 0})),overflow:(0,a.jt)((0,a.kw)("auto","never"))}))),paymentMethodOrder:(0,a.jt)((0,a.CT)(a.Z_))}),N=((0,i.Z)((0,i.Z)({},A),{},{buttonTheme:(0,a.jt)((0,a.mC)(v)),buttonType:(0,a.jt)((0,a.mC)(g)),paymentMethods:(0,a.jt)((0,a.mC)(y)),wallets:(0,a.jt)((0,a.mC)(y)),__autoClose:(0,a.jt)(a.HM),__checkout:(0,a.jt)((0,a.mC)(E))}),Object.freeze({locale:(0,a.yv)("elements()"),buttonHeight:(0,a.jt)((0,a.O)(40,55)),layout:(0,a.jt)((0,a.or)((0,a.or)(b,(0,a.mC)({type:b,visibleButtonCount:(0,a.jt)((0,a.M4)(0))})),(0,a.mC)({maxColumns:(0,a.Wc)((0,a.M2)(0),(function(){return 0})),maxRows:(0,a.Wc)((0,a.M2)(0),(function(){return 0})),overflow:(0,a.jt)((0,a.kw)("auto","never"))}))),paymentMethodOrder:(0,a.jt)((0,a.CT)(a.Z_))})),T=Object.freeze({embeddedCheckoutMessenger:(0,a.jt)((0,a.mC)({send:a.uz})),minApplePayVersion:(0,a.jt)(a.Rx),minGooglePayVersion:(0,a.jt)((0,a.mC)({major:a.Rx,minor:a.Rx}))}),I=Object.freeze((0,i.Z)((0,i.Z)({},N),{},{buttonTheme:(0,a.jt)((0,a.mC)(v)),buttonType:(0,a.jt)((0,a.mC)(g)),paymentMethods:(0,a.jt)((0,a.mC)(y)),wallets:(0,a.jt)((0,a.mC)(y)),__checkout:(0,a.jt)((0,a.mC)(T)),__autoClose:(0,a.jt)(a.Xg)})),R=Object.freeze({name:a.Z_,amount:a.Bi}),M=Object.freeze({unit:(0,a.kw)("hour","day","business_day","week","month"),value:(0,a.M4)(0)}),O=Object.freeze({id:a.Z_,amount:a.MZ,displayName:a.Z_,deliveryEstimate:(0,a.jt)((0,a.or)(a.Z_,(0,a.mC)({maximum:(0,a.jt)((0,a.mC)(M)),minimum:(0,a.jt)((0,a.mC)(M))})))}),x=(0,a.jt)((0,a.uw)("id")((0,a.Fy)((0,a.mC)(O),10))),Z=Object.freeze({allowedShippingCountries:(0,a.jt)((0,a.CT)(a.Z_)),business:(0,a.jt)((0,a.mC)({name:a.Z_})),billingAddressRequired:(0,a.Wc)(a.Xg,(function(){return!0})),emailRequired:(0,a.jt)(a.Xg),lineItems:(0,a.jt)((0,a.CT)((0,a.mC)(R))),phoneNumberRequired:(0,a.jt)(a.Xg),shippingAddressRequired:(0,a.jt)(a.Xg),shippingRates:x,applePay:(0,a.jt)((0,a.mC)(S))}),j=Object.freeze({allowedShippingCountries:(0,a.jt)((0,a.CT)(a.Z_)),business:(0,a.jt)((0,a.mC)({name:a.Z_})),billingAddressRequired:(0,a.Wc)(a.Xg,(function(){return!0})),emailRequired:(0,a.jt)(a.Xg),lineItems:(0,a.jt)((0,a.CT)((0,a.mC)(R))),phoneNumberRequired:(0,a.jt)(a.Xg),shippingAddressRequired:(0,a.jt)(a.Xg),shippingRates:x,applePay:(0,a.jt)((0,a.mC)(P))}),L=Object.freeze({lineItems:(0,a.jt)((0,a.CT)((0,a.mC)(R))),shippingRates:x,applePay:(0,a.jt)((0,a.mC)(C))}),B=Object.freeze({reason:(0,a.jt)((0,a.kw)("fail","invalid_shipping_address"))}),D=function(e){return e.layout&&("string"==typeof e.layout||"type"in e.layout)?"It looks like you're using a legacy layout implementation. It is advised to switch to the newer implementation. For more information, see https://stripe.com/docs/js/elements_object/create_express_checkout_element#express_checkout_element_create-options-layout.":null},q=function(e,t){var n,r=(0,a.Gu)((0,a.mC)(I),e,"elements.create('expressCheckout', options)"),s=r.value,u=r.warnings,l=D(s);l&&u.push(l);var d=function(e,t){if(!e)return{value:null,warnings:[]};if("custom_checkout"===t||"checkout"===t)return{value:e,warnings:[]};var n=(0,a.Gu)((0,a.mC)({applePay:(0,a.jt)(a.kw.apply(void 0,(0,o.Z)(p.sg))),googlePay:(0,a.jt)(a.kw.apply(void 0,(0,o.Z)(p.sg)))}),e,"options.wallets"),r=n.value,i=n.warnings;return i.push("It looks like you're using the legacy 'wallets' option. It is advised to switch to the newer option, 'paymentMethods'. For more information, see https://docs.stripe.com/js/elements_object/create_express_checkout_element."),{value:r,warnings:i}}(null==s?void 0:s.wallets,t),m=d.value,f=d.warnings;if(null!==(n=s.__checkout)&&void 0!==n&&n.minGooglePayVersion&&"checkout"!==t)throw new c.No("Google Pay version is not customizable unless on Checkout.");return{value:(0,i.Z)((0,i.Z)({},s),m?{paymentMethods:m}:{}),warnings:[].concat((0,o.Z)(u),(0,o.Z)(f))}},F=function(e){var t=(0,a.Gu)((0,a.mC)(N),e,"expressCheckoutElement.update()"),n=t.value,r=t.warnings,o=D(n);return o&&r.push(o),{value:n,warnings:r}},U=function(e,t){if(t&&e&&e0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=e.layout;if(!r||"string"==typeof r)return[];var a=(0,c.mC)({layout:t?i.Ee:i.xl}),s=(0,c.Gu)(a,{layout:r},n),u=s.warnings,l=r,d=l.type;return"accordion"!==d&&(r.hasOwnProperty("spacedAccordionItems")&&(u=[].concat((0,o.Z)(u),["options.layout.spacedAccordionItems is only supported with the 'accordion' layout type."])),r.hasOwnProperty("radios")&&(u=[].concat((0,o.Z)(u),["options.layout.radios is only supported with the 'accordion' layout type."])),r.hasOwnProperty("visibleAccordionItemsCount")&&(u=[].concat((0,o.Z)(u),["options.layout.visibleAccordionItemsCount is only supported with the 'accordion' layout type."]))),u},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=e.wallets;if(!n||"string"==typeof n)return[];var r=(0,c.mC)({wallets:i.n4}),o=(0,c.Gu)(r,{wallets:n},t),a=o.warnings;return a},y=function(e,t){return e.length<=t?e:"".concat(e.slice(0,t).trim(),"...")},v=function(){var e,t,n,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=o.savePaymentMethod;if(!i)return{savePaymentMethodTruncated:null,warnings:[]};if(null==i||!i.messages)return{savePaymentMethodTruncated:i,warnings:[]};var a=[],c=null==i||null===(e=i.messages)||void 0===e?void 0:e.saveLabel;c&&c.length>100&&(a.push("savePaymentMethod.messages.saveLabel is over 100 characters and will be truncated."),c=y(c,100));var s=null==i||null===(t=i.messages)||void 0===t?void 0:t.setAsDefaultLabel;s&&s.length>100&&(a.push("savePaymentMethod.messages.setAsDefaultLabel is over 100 characters and will be truncated."),s=y(s,100));var u=null==i||null===(n=i.messages)||void 0===n?void 0:n.removeSavedDialogBody;return u&&u.length>500&&(a.push("savePaymentMethod.messages.removeSavedDialogBody is over 500 characters and will be truncated"),u=y(u,500)),null==c&&null==s&&null==u?{savePaymentMethodTruncated:i,warnings:[]}:{savePaymentMethodTruncated:(0,r.Z)((0,r.Z)({},i),{},{messages:(0,r.Z)((0,r.Z)((0,r.Z)({},null!=c?{saveLabel:c}:{}),null!=s?{setAsDefaultLabel:s}:{}),null!=u?{removeSavedDialogBody:u}:{})}),warnings:a}},g=function(e){var t=e.fields,n=e.validation;if(n)for(var r in n)if(!t||!t[r]||"always"!==t[r])throw new s.No("You cannot specify validation.".concat(r," without setting fields.").concat(r," to always."))},b=function(e){var t,n;if(null!==(t=e.defaultValues)&&void 0!==t&&t.phone&&"always"!==(null===(n=e.fields)||void 0===n?void 0:n.phone))throw new s.No("You cannot specify defaultValues.phone without setting fields.phone to always.")},w=function(e){var t,n,r,o,i;if((null!==(t=e.defaultValues)&&void 0!==t&&t.firstName||null!==(n=e.defaultValues)&&void 0!==n&&n.lastName)&&(null===(r=e.display)||void 0===r?void 0:r.name)!==l.ZV)throw new s.No("You cannot specify defaultValues.firstName or defaultValues.lastName without setting display.name to split.");if((null===(o=e.display)||void 0===o?void 0:o.name)===l.ZV&&null!==(i=e.defaultValues)&&void 0!==i&&i.name)throw new s.No("You cannot specify defaultValues.name when you have display.name set to split.")},k=function(e){var t=e.contacts,n=e.fields,r=e.validation;if(t){var o,i=(0,u.cx)(t,(function(e){return e.hasOwnProperty("phone")}));if(-1!==i)if("always"!==(null==n?void 0:n.phone)||"always"!==(null==r||null===(o=r.phone)||void 0===o?void 0:o.required))throw new s.No("You cannot specify contacts[".concat(i,"].phone without\n setting fields.phone to 'always' and validation.phone.required to 'always'.\n Phone options should only be 'always' when absolutely necessary."))}},S=function(e){if(!e)return{allowedCountries:null,warnings:[]};var t=[],n=[];return e.forEach((function(e){if("string"==typeof e){var r=(0,d.Fc)(e);null!==r?t.push(r):n.push('invalid country code "'.concat(e,'"; "').concat(e,'" is not a valid 2-letter country code'))}else n.push('invalid value provided for country code "'.concat(e,'"; expected "string" but received "').concat(typeof e,'"'))})),{allowedCountries:t,warnings:n}}},6668:function(e,t,n){"use strict";n.d(t,{dz:function(){return k},ky:function(){return w},Ul:function(){return g},Cn:function(){return h},O$:function(){return b}});var r,o=n(7462),i=n(1413),a=n(5671),c=n(3144),s=n(136),u=n(9388),l=function(e){function t(){return(0,a.Z)(this,t),n.call(this,{channel:"hcaptcha-invisible",fingerprintedPath:"hcaptcha-invisible-7ca08f63dbc046ffce4edff3a8f4e5e9.html",frameQueryParams:{debugMode:window.location.href.indexOf("__iframe-debug-mode__")>=0}})}(0,s.Z)(t,e);var n=(0,u.Z)(t);return(0,c.Z)(t,[{key:"execute",value:function(e){var t=e.siteKey,n=e.extraData,r=e.rqdata;return this.sendMessageToChild("execute",{siteKey:t,extraData:n,rqdata:r}).then((function(e){return e}))}},{key:"init",value:function(e){return this.sendMessageToChild("init",e)}}]),t}(n(125).K),d=n(3423),p=n(9792),m=function(e){function t(){var e;(0,a.Z)(this,t);for(var r=arguments.length,o=new Array(r),i=0;i0){var n=this.execute(5-e+1);this.nextPromise=n,n.then((function(){t.nextPromise===n&&(t.resolvedPromise=n,setTimeout((function(){t.resolvedPromise===n&&(t.resolvedPromise=void 0)}),t.tokenExpirationLength),t.retryTimeout=setTimeout((function(){t.preload(e-1)}),t.tokenExpirationLength-1e4))}))}}},{key:"resetNext",value:function(){this.nextPromise=void 0,this.retryTimeout&&(clearTimeout(this.retryTimeout),this.retryTimeout=void 0)}},{key:"execute",value:function(e){var t=this;if(!r)throw new m("captcha not mounted");var n=new p.E,o=r.execute({siteKey:this.siteKey,extraData:y,rqdata:this.rqdata});return o.then((function(r){var o=r.duration;t.log("captcha.passive.execute",(0,i.Z)({elapsed_time:n.getElapsedTime(),duration:o},e?{attempt:e}:null))})),o}},{key:"log",value:function(e,t){this.logger.log(e,(0,i.Z)((0,i.Z)({},t),{},{site_key:this.siteKey}))}},{key:"start",value:function(){r?this.preload(5):this.log("captcha.passive.error",{reason:"preload_not_mounted"})}},{key:"consumeToken",value:function(){var e=this.resolvedPromise||this.nextPromise;return e?(this.resetNext(),this.resolvedPromise=void 0,e):this.execute()}},{key:"stop",value:function(){this.resetNext()}}]),e}(),g=function(e){var t=e.siteKey,n=e.rqdata,r=e.logger,o=e.tokenExpirationLength;(e.skipPreloadersCache||!_[t])&&(_[t]=new v({siteKey:t,rqdata:n,logger:r,tokenExpirationLength:o}))},b=function(e,t){var n;e&&t&&(null===(n=_[e])||void 0===n||n.start())},w=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=new p.E;return new f((function(a,c){if(!n||!e)return t.log("captcha.passive.disabled",{site_key:e,reason:n?"site_key_not_set":"not_enabled"}),void a(null);var s,u=o.timeout||6e3,l=setTimeout((function(){c(new m("timeout"))}),u),d=function(){if(i.getElapsedTime()>=u)clearInterval(s);else{var d=e?_[e]:null;r&&d?(clearInterval(s),d.consumeToken().then((function(e){clearTimeout(l),a(e)})).catch((function(e){clearTimeout(l),c(e)})).finally((function(){o.preloadNextToken&&b(e,n)}))):t.log("captcha.passive.not_initialized",{site_key:e})}};s=setInterval(d,1e3),d()})).then((function(r){var o=i.getElapsedTime();return r?t.log("captcha.passive.success",{duration:o,site_key:e}):n&&e&&t.log("captcha.passive.unknown",{duration:o,site_key:e}),r})).catch((function(n){var r=i.getElapsedTime();if(t.log("captcha.passive.error",{duration:r,reason:n.message,site_key:e}),o.rejectOnError)throw n;return null}))},k=function(e){(0,o.Z)(y,e)}},3379:function(e,t,n){"use strict";n.d(t,{H:function(){return a}});var r=n(5671),o=n(3144),i=n(9038),a=function(){function e(t){(0,r.Z)(this,e),this._inContextData=t,this._inContextOuter=new i.B({inContextData:t,paymentMethodBehavior:{lightboxFrameOptions:this._lightboxFrameOptions.bind(this),addModalListeners:this._addModalListeners.bind(this),inContextOuterConfig:{showLightboxBackdrop:!1}}})}return(0,o.Z)(e,[{key:"collectPayment",value:function(){return this._inContextOuter.collectPayment()}},{key:"_lightboxFrameOptions",value:function(){var e=this._inContextData,t=e.paymentMethod,n=e.paymentIntent,r=e.controller,o=e.paymentSurface;return{paymentMethodType:t,redirectUrl:e.redirectUrl,controllerId:r._id,paymentSurface:o,intentId:n.id}}},{key:"_addModalListeners",value:function(e){var t=this;e._once("checkout_loaded",(function(){t._inContextOuter.clearModalLoadTimeout()}))}}]),e}()},9038:function(e,t,n){"use strict";n.d(t,{B:function(){return f}});var r=n(5671),o=n(3144),i=n(1413),a=function(){function e(t,n,o,i){(0,r.Z)(this,e),this._controller=t,this._paymentIntent=o,this._paymentSurface=i,this._paymentMethod=n}return(0,o.Z)(e,[{key:"start",value:function(){this._controller.report("in_context.start",{payment_method:this._paymentMethod,message:"starting in-context payment flow for klarna",intent_id:this._paymentIntent.id,payment_surface:this._paymentSurface})}},{key:"error",value:function(e){"affirm"===this._paymentMethod&&this._controller.report("in_context.error.affirm",{payment_method:this._paymentMethod,intent_id:this._paymentIntent.id,error:{message:e.message,name:e.name}}),this._controller.report("in_context.error",{payment_method:this._paymentMethod,intent_id:this._paymentIntent.id,error:{message:e.message,name:e.name}})}},{key:"unexpected",value:function(e){this._controller.report("in_context.unexpected",{payment_method:this._paymentMethod,message:e})}},{key:"timeout",value:function(e){"affirm"===this._paymentMethod&&this._controller.report("in_context.timeout.affirm",{payment_method:this._paymentMethod,payment_surface:this._paymentSurface,intent_id:this._paymentIntent.id,error:{message:e.message,name:e.name}}),this._controller.report("in_context.timeout",{payment_method:this._paymentMethod,payment_surface:this._paymentSurface,intent_id:this._paymentIntent.id,error:{message:e.message,name:e.name}})}},{key:"log",value:function(e){this._controller.report("in_context.log",(0,i.Z)({payment_method:this._paymentMethod,intent_id:this._paymentIntent.id,payment_surface:this._paymentSurface},e))}}]),e}(),c="IN_CONTEXT_INNER",s=n(1849),u=n(6977),l=function(e,t,n,r,o){return"affirm"===o?e.report("in_context.log.affirm",{intent_id:t.id,state:"".concat(o,"_in_context_fallback_to_redirect"),payment_surface:r}):e.report("in_context.log",{payment_method:o,intent_id:t.id,state:"".concat(o,"_in_context_fallback_to_redirect"),payment_surface:r}),(0,s.U)(n).then((function(n){return(0,s.d)(e,"next_action redirect",n),(0,u.PA)(n,t)}))},d=n(1873),p=n(6274).Promise,m=function(e){return e.COMPLETED="COMPLETED",e.CANCELED="CANCELED",e.ERROR="ERROR",e.DUPLICATE_MODAL="DUPLICATE_MODAL",e}({}),f=function(){function e(t){var n=this,o=t.inContextData,i=t.paymentMethodBehavior;(0,r.Z)(this,e),this._addModalListenersAndWaitForCompletion=function(e){return n._paymentMethodBehavior.addModalListeners(e),e._on("load",(function(){e.show(),n._paymentMethodBehavior.inContextOuterConfig.showLightboxBackdrop&&e.fadeInBackdrop()})),e._once("checkout_complete",(function(){n._resolveCheckoutPromise(m.COMPLETED),e.destroy()})),e._once("checkout_canceled",(function(){n._resolveCheckoutPromise(m.CANCELED),e.destroy()})),e._once("error",(function(){n.clearModalLoadTimeout(),n._resolveCheckoutPromise(m.ERROR),e.destroy()})),e._once("duplicate_modal",(function(){n.clearModalLoadTimeout(),n._resolveCheckoutPromise(m.DUPLICATE_MODAL),e.destroy()})),n._checkoutPromise},this._returnIntentResponseOrFallback=function(e,t){var r=t.paymentIntent,o=t.redirectUrl,i=t.controller,a=t.paymentSurface;switch(e){case m.COMPLETED:case m.CANCELED:var c=n._paymentMethodBehavior.inContextOuterConfig.showLightboxBackdrop;return function(e,t,n,r){return e.action.retrievePaymentIntent({intentSecret:(0,u.O3)(t),hosted:!1}).then((function(o){var i=(0,u.PA)(o,t);if(i.hasOwnProperty("error"))return i;var a=i.paymentIntent;return"succeeded"===a.status||"requires_capture"===a.status?i:a.last_payment_error?e.action.localizeError(a.last_payment_error).then((function(e){return{error:e}})):r&&"requires_action"===a.status?e.action.localizeError({code:"payment_intent_payment_attempt_failed"}).then((function(e){return{error:e}})):(e.report("in_context.unexpected",{payment_method:n,message:"Payment Intent is in an unexpected state when attempting to return response to user",current_intent_state:a.status,intent_id:t.id}),"canceled"===a.status||"requires_confirmation"===a.status||"requires_action"===a.status||"requires_payment_method"===a.status?e.action.localizeError({message:"Payment was abandoned. Please try again."}).then((function(e){return{error:e}})):("affirm"===n&&e.report("in_context.error.affirm",{intent_id:t.id,error:{message:"PaymentIntent unexpectedly not successful and doesn't have last_payment_error field",current_intent_state:a.status}}),e.report("in_context.error",{payment_method:n,intent_id:t.id,error:{message:"PaymentIntent unexpectedly not successful and doesn't have last_payment_error field",current_intent_state:a.status}}),e.action.localizeError({message:"unexpected error"}).then((function(e){return{error:e}}))))}))}(i,r,n._paymentMethod,c);case m.ERROR:return n._fallbackToRedirectOnErrors?l(i,r,o,a,n._paymentMethod):i.action.localizeError({code:"errors.code.unexpected"}).then((function(e){return{error:e}}));case m.DUPLICATE_MODAL:return i.action.localizeError({message:"Payment was interrupted by another payment attempt."}).then((function(e){return{error:e}}));default:try{(0,d.Rz)(e,"unknown InContextCheckoutResult")}catch(t){n._logger.error(new Error("Unexpected InContextCheckoutResult: ".concat(e)))}return l(i,r,o,a,n._paymentMethod)}},this._inContextData=o,this._paymentMethodBehavior=i,this._paymentIntent=o.paymentIntent,this._controller=o.controller,this._paymentMethod=o.paymentMethod,this._paymentSurface=o.paymentSurface,this._fallbackToRedirectOnErrors=o.fallbackToRedirectOnErrors,this._logger=new a(this._controller,this._paymentMethod,this._paymentIntent,this._paymentSurface),this._clearModalLoadTimeout=function(){var e=new Error("clearModalLoadTimeout function has not been defined");throw n._logger.error(e),e},this._closeModal=function(){var e=new Error("closeModal function has not been defined");throw n._logger.error(e),e},this._resolveCheckoutPromise=function(){var e=new Error("resolveCheckoutPromise function has not been defined");throw n._logger.error(e),e},this._checkoutPromise=new p((function(e){n._resolveCheckoutPromise=e}))}return(0,o.Z)(e,[{key:"collectPayment",value:function(){var e=this;return this._logger.start(),this._maybeRemoveExistingInContextModal().then((function(){return e._createInContextModal()})).then((function(t){return e._addModalListenersAndWaitForCompletion(t)})).then((function(t){return e._returnIntentResponseOrFallback(t,e._inContextData)})).catch((function(t){throw e._logger.error(t),t}))}},{key:"_maybeRemoveExistingInContextModal",value:function(){var e=this._controller.getLightboxFrame(c);return e?(this._logger.unexpected("Unexpectedly found existing modal frame when launching ".concat(this._paymentMethod," In-Context modal")),e._emit("duplicate_modal"),e.destroy()):p.resolve()}},{key:"_createInContextModal",value:function(){var e=this,t=setTimeout((function(){e._logger.timeout(new Error("".concat(e._paymentMethod," In-Context STP frame did not load after 20 seconds"))),e._resolveCheckoutPromise(m.ERROR)}),2e4);this._clearModalLoadTimeout=function(){return clearTimeout(t)},this._logger.log({state:"launching_in_context_inner"});var n=this._controller.createLightboxFrame({type:c,options:this._paymentMethodBehavior.lightboxFrameOptions()});return this._closeModal=function(){e._resolveCheckoutPromise(m.CANCELED),n.destroy()},n}},{key:"clearModalLoadTimeout",value:function(){return this._clearModalLoadTimeout()}},{key:"closeModal",value:function(){return this._closeModal()}}]),e}()},8731:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(3144),o=n(5671),i=n(1413),a=n(4200),c=n(6274).Promise,s={display:"block",position:"fixed","z-index":"2147483647",background:"rgba(40,40,40,0)",transition:"background 400ms ease","will-change":"background",top:"0",left:"0",right:"0",bottom:"0",margin:"0",padding:"0"},u={bottom:"0",left:"0",top:"auto",right:"auto",height:"200%",width:"100%"},l=(0,i.Z)((0,i.Z)({},s),{},{background:"rgba(40,40,40,0.75)"}),d=(0,i.Z)((0,i.Z)({},u),{},{background:"rgba(40,40,40,0.75)"}),p=(0,r.Z)((function e(t){var n=this,r=t.lockScrolling,p=t.lockFocus,m=t.lockFocusOn,f=t.lockToBottom,_=void 0!==f&&f,h=t.backgroundTransition,y=void 0===h?"400ms ease":h,v=t.listenerRegistry;(0,o.Z)(this,e),this.domElement=document.createElement("div"),this._runOnHide=[],this.mount=function(){var e=(0,a.Xq)();n.domElement.style.display="none",e.contains(n.domElement)||e.insertBefore(n.domElement,e.firstChild)},this.show=function(){var e=(0,i.Z)((0,i.Z)({},s),{},{transition:n._backgroundTransition});if(n._lockToBottom&&(e=(0,i.Z)((0,i.Z)({},e),u)),(0,a.yq)(n.domElement,e),n._lockScrolling){var t=(0,a.MV)();n._runOnHide.push(t)}if(n._lockFocus){var r=(0,a.W3)(n._lockFocusOn).restoreFocus;n._runOnHide.push(r)}},this.fadeIn=function(){setTimeout((function(){var e=(0,i.Z)((0,i.Z)({},l),{},{transition:n._backgroundTransition});n._lockToBottom&&(e=(0,i.Z)((0,i.Z)({},e),d)),(0,a.yq)(n.domElement,e)}))},this.fadeOut=function(){return new c((function(e){var t=(0,i.Z)((0,i.Z)({},s),{},{transition:n._backgroundTransition});n._lockToBottom&&(t=(0,i.Z)((0,i.Z)({},t),u)),(0,a.yq)(n.domElement,t),setTimeout(e,500),n._listenerRegistry.addEventListener(n.domElement,"transitionend",e)})).then((function(){n.domElement.style.display="none",n.runOnHide()}))},this.runOnHide=function(){for(;n._runOnHide.length;){var e;null===(e=n._runOnHide.pop())||void 0===e||e()}},this.unmount=function(){var e=(0,a.Xq)();e.contains(n.domElement)&&e.removeChild(n.domElement)},this._lockScrolling=!!r,this._lockFocus=!!p,this._lockToBottom=_,this._lockFocusOn=m||null,this._backgroundTransition="background ".concat(y),this._listenerRegistry=v}))},2641:function(e,t,n){"use strict";var r=n(5671),o=n(3144),i=n(136),a=n(9388),c=function(e){function t(){return(0,r.Z)(this,t),n.apply(this,arguments)}(0,i.Z)(t,e);var n=(0,a.Z)(t);return(0,o.Z)(t,[{key:"_generateId",value:function(){return this._controllerId}}]),t}(n(9598).Z);t.Z=c},2784:function(e,t,n){"use strict";var r=n(1413),o=n(9062),i=n(5671),a=n(3144),c=n(136),s=n(9388),u=n(4044),l=n(1925),d=n(6617),p=n(5558),m=n(8547),f=n(3550),_=n(6274).Promise,h=function(e){function t(e){var r,o=e.type,a=e.controllerId,c=e.listenerRegistry,s=e.betas,u=e.appParams;return(0,i.Z)(this,t),(r=n.call(this))._sendFAReq=function(e){var t=(0,p.To)(e.tag);return new _((function(n,o){r._requests[t]={resolve:n,reject:o},r._send({message:{action:"stripe-frame-action",payload:{nonce:t,faReq:e}},type:"child",sourceFrameId:window.name,targetFrameId:r.id,controllerAppFrameId:r._controllerId})}))},r.action={perform3DS2Challenge:function(e){return r._sendFAReq({tag:"PERFORM_3DS2_CHALLENGE",value:e})},perform3DS2Fingerprint:function(e){return r._sendFAReq({tag:"PERFORM_3DS2_FINGERPRINT",value:e})},performOneClickWebauthnAuthentication:function(e){return r._sendFAReq({tag:"PERFORM_ONE_CLICK_WEBAUTHN_AUTHENTICATION",value:e})},showCardholderInfoMessage:function(e){return r._sendFAReq({tag:"SHOW_CARDHOLDERINFO_MESSAGE",value:e})},show3DS2Spinner:function(e){return r._sendFAReq({tag:"SHOW_3DS2_SPINNER",value:e})},checkCanMakePayment:function(e){return r._sendFAReq({tag:"CHECK_CAN_MAKE_PAYMENT",value:e})},closeLightboxFrame:function(e){return r._sendFAReq({tag:"CLOSE_LIGHTBOX_FRAME",value:e})},openLightboxFrame:function(e){return r._sendFAReq({tag:"OPEN_LIGHTBOX_FRAME",value:e})},setFocusTarget:function(e){return r._sendFAReq({tag:"SET_FOCUS_TARGET",value:e})}},r.type=o,r.loaded=!1,r._controllerId=a,r._persistentMessages=[],r._queuedMessages=[],r._requests={},r._listenerRegistry=c,r.id=r._generateId(),r._iframe=r._createIFrame(o,s,u),r._on("load",(function(){r.loaded=!0,r._ensureMounted(),r.loaded&&(r._persistentMessages.forEach((function(e){return r._send(e)})),r._queuedMessages.forEach((function(e){return r._send(e)})),r._queuedMessages=[])})),r._on("title",(function(e){var t=e.title;r._iframe.setAttribute("title",t)})),r}(0,c.Z)(t,e);var n=(0,s.Z)(t);return(0,a.Z)(t,[{key:"_generateId",value:function(){return(0,p.To)("__privateStripeFrame")}},{key:"send",value:function(e){this._send({type:"child",sourceFrameId:window.name,targetFrameId:this.id,controllerAppFrameId:this._controllerId,message:e})}},{key:"sendPersistent",value:function(e){this._ensureMounted();var t={type:"child",sourceFrameId:window.name,targetFrameId:this.id,controllerAppFrameId:this._controllerId,message:e};this._persistentMessages=[].concat((0,o.Z)(this._persistentMessages),[t]),this.loaded&&(0,l.oi)(t)}},{key:"resolve",value:function(e,t){this._requests[e]&&this._requests[e].resolve(t)}},{key:"reject",value:function(e,t){this._requests[e]&&this._requests[e].reject(t)}},{key:"_send",value:function(e){this._ensureMounted(),this.loaded?(0,l.oi)(e):this._queuedMessages=[].concat((0,o.Z)(this._queuedMessages),[e])}},{key:"appendTo",value:function(e){this._emit("mount",{anchor:e}),e.appendChild(this._iframe)}},{key:"prependTo",value:function(e,t){this._emit("mount",{anchor:e,parent:t}),t.insertBefore(this._iframe,e)}},{key:"unmount",value:function(){this.loaded=!1,this._emit("unload_no_sensitive_data")}},{key:"destroy",value:function(){this.unmount();var e=this._iframe.parentElement;e&&e.removeChild(this._iframe),this._emit("destroy")}},{key:"_ensureMounted",value:function(){this._isMounted()||this.unmount()}},{key:"_isMounted",value:function(){return!!document.body&&document.body.contains(this._iframe)}},{key:"_createIFrame",value:function(e,t,n){var o=window.location.href.toString(),i="string"==typeof n?n:(0,d.qC)((0,r.Z)((0,r.Z)({},n||{}),{},{referrer:o,controllerId:this._controllerId})),a=document.createElement("iframe");(0,f.Kn)(n)&&n.lazyLoad&&a.setAttribute("loading","lazy"),a.setAttribute("name",this.id);var c=(0,l.i7)(e);return Object.keys(c).forEach((function(e){a.setAttribute(e,c[e])})),(0,f.Kn)(n)&&n.allowCamera&&a.setAttribute("allow","camera"),a.src="".concat((0,u.D)(e)).concat(i?"#":"").concat(i),a}}]),t}(m.Z);t.Z=h},9598:function(e,t,n){"use strict";var r=n(5671),o=n(3144),i=n(7326),a=n(136),c=n(9388),s=n(2784),u=n(8812),l=n(4200),d=function(e){function t(e){var o;if((0,r.Z)(this,t),(o=n.call(this,e)).autoload=e.autoload||!1,o.deferred=e.deferred||!1,"complete"===document.readyState)o._ensureMounted();else{var a=o._ensureMounted.bind((0,i.Z)(o));o._listenerRegistry.addEventListener(document,"DOMContentLoaded",a),o._listenerRegistry.addEventListener(window,"load",a),setTimeout(a,5e3)}return o}(0,a.Z)(t,e);var n=(0,c.Z)(t);return(0,o.Z)(t,[{key:"_ensureMounted",value:function(){e.prototype._ensureMounted.call(this),this._isMounted()||this._autoMount()}},{key:"_autoMount",value:function(){if(!this.deferred){var e=document.body;if(e){var t=document.querySelector("#stripe-hidden-frames-container")||e;this.appendTo(t)}else if("complete"===document.readyState||"interactive"===document.readyState)throw new u.No("Stripe.js requires that your page has a element.");this.autoload&&(this.loaded=!0)}}},{key:"_createIFrame",value:function(t,n,r){var o=e.prototype._createIFrame.call(this,t,n,r);return o.setAttribute("aria-hidden","true"),o.setAttribute("tabIndex","-1"),(0,l.SV)(o),o}}]),t}(s.Z);t.Z=d},8028:function(e,t,n){"use strict";n.d(t,{Z:function(){return me}});var r=n(5987),o=n(1413),i=n(5671),a=n(3144),c=n(942),s=n(1925),u=n(9620),l=n(5558),d=n(9598),p=n(2641),m=n(136),f=n(9388),_=n(2784),h=n(4200),y=n(3333),v={border:"0",margin:"0",padding:"0",width:"1px","min-width":"100%",overflow:"hidden",display:"block","user-select":"none",transform:"translate(0)","color-scheme":"only light"},g=function(e){function t(e){var r;return(0,i.Z)(this,t),r=n.call(this,e),y.s$&&r._listenerRegistry.addEventListener(document,"transitionstart",(function(e){switch(e.propertyName){case"opacity":case"transform":case"visibility":var t=e.target;r._isMounted()&&t.contains(r._iframe)&&r._forceRepaint()}}),{passive:!0}),r}(0,m.Z)(t,e);var n=(0,f.Z)(t);return(0,a.Z)(t,[{key:"update",value:function(e){this.send({action:"stripe-user-update",payload:e})}},{key:"updateStyle",value:function(e){var t=this;Object.keys(e).forEach((function(n){t._iframe.style[n]=e[n]}))}},{key:"focus",value:function(){this.loaded&&(y.s$||y.yv?this._iframe.focus():this.send({action:"stripe-user-focus",payload:{}}))}},{key:"blur",value:function(){this.loaded&&(this._iframe.contentWindow.blur(),this._iframe.blur(),document.activeElement===this._iframe&&(window.focus(),document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()))}},{key:"clear",value:function(){this.send({action:"stripe-user-clear",payload:{}})}},{key:"collapse",value:function(){this.send({action:"stripe-user-collapse",payload:{}})}},{key:"getValue",value:function(){this.send({action:"stripe-user-get-value",payload:{}})}},{key:"_createIFrame",value:function(t,n,r){var o=e.prototype._createIFrame.call(this,t,n,r);return o.setAttribute("title","Secure payment input frame"),(0,h.yq)(o,v),o}},{key:"_forceRepaint",value:function(){var e=this._iframe,t=e.style.display;e.style.display="none";var n=e.offsetHeight;return e.style.display=t,n}}]),t}(_.Z),b=n(7326),w=n(8731),k={position:"absolute",left:"0",top:"0",height:"100%",width:"100%","color-scheme":"normal","pointer-events":"auto"},S=function(e){function t(r){var o,a=r.type,c=r.controllerId,u=r.listenerRegistry,l=r.options;return(0,i.Z)(this,t),(o=n.call(this,{type:a,controllerId:c,listenerRegistry:u,appParams:l}))._autoMount=function(){o.appendTo(o._backdrop.domElement),o._backdrop.mount()},o.show=function(){o._backdrop.show(),(0,h.yq)(o._iframe,k),o.isVisible=!0},o.fadeInBackdrop=function(){o._backdrop.fadeIn()},o._backdropFadeoutPromise=null,o.fadeOutBackdrop=function(){return o._backdropFadeoutPromise||(o._backdropFadeoutPromise=o._backdrop.fadeOut()),o._backdropFadeoutPromise.then((function(){o._backdropFadeoutPromise=null}))},o.backdropRunOnHide=function(){o._backdrop.runOnHide()},o.destroy=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=o.fadeOutBackdrop().then((function(){o._backdrop.unmount(),t||e.prototype.destroy.call((0,b.Z)(o))}));return t&&e.prototype.destroy.call((0,b.Z)(o)),o.isVisible=!1,n},o._backdrop=new w.Z({lockScrolling:!0,lockFocus:!0,lockFocusOn:o._iframe,lockToBottom:a===s.NC.LINK_MODAL&&y.q$,backgroundTransition:a===s.NC.LINK_MODAL?"250ms ease-out":"400ms ease",listenerRegistry:u}),o._autoMount(),o.isVisible=!1,o}(0,m.Z)(t,e);var n=(0,f.Z)(t);return(0,a.Z)(t)}(_.Z),P=S,C={display:"block",position:"absolute","z-index":"1000",width:"1px","min-width":"100%",margin:"2px 0 0 0",padding:"0",border:"none",overflow:"hidden"},E=function(e){function t(){return(0,i.Z)(this,t),n.apply(this,arguments)}(0,m.Z)(t,e);var n=(0,f.Z)(t);return(0,a.Z)(t,[{key:"updateStyle",value:function(e){var t=this;Object.keys(e).forEach((function(n){t._iframe.style[n]=e[n]}))}},{key:"update",value:function(e){this.send({action:"stripe-user-update",payload:e})}},{key:"_createIFrame",value:function(t,n,r){var i=e.prototype._createIFrame.call(this,t,n,r&&"object"==typeof r?(0,o.Z)((0,o.Z)({},r),{},{isSecondaryFrame:!0}):r);return(0,h.yq)(i,C),i.style.height="0",i}}]),t}(_.Z),A=E,N=n(6617),T=n(8812),I=n(4505),R=n(9706),M=n(9465),O=n(6297),x=n(6042),Z="https://maps.googleapis.com/maps/api/js",j=/^https:\/\/maps\.googleapis\.com\/maps\/api\/js\/?(\?.*)?libraries=(.*,)?places((,|&)+.*)?$/;window.noop=function(){};var L,B,D=n(6274).Promise,q=function(e){switch(e){case"INVALID_REQUEST":case"NOT_FOUND":case"OK":case"OVER_QUERY_LIMIT":case"REQUEST_DENIED":case"UNKNOWN_ERROR":case"ZERO_RESULTS":return e;default:return"UNKNOWN_ERROR"}},F="ADDRESS_AUTOCOMPLETE_PREDICTION_RESULTS",U="ADDRESS_AUTOCOMPLETE_PLACE_DETAILS",G=null,z=function(e){return null!==G||(G=new D((function(t,n){if("undefined"!=typeof window)if(window.google&&window.google.maps.places)t(window.google.maps.places);else try{var r=function(){var e=document.querySelectorAll('script[src^="'.concat(Z,'"]'));for(var t in e)if(j.test(e[t].src))return e[t];return null}();r||(r=function(e){var t=document.createElement("script");return t.src="".concat(Z,"?key=").concat(e,"&libraries=places&callback=noop"),(document.head||document.body).appendChild(t),t}(e)),r.onload=function(){window.google.maps.places?t(window.google.maps.places):n(new Error("Google Maps API not available"))}}catch(e){n(e)}else t(null)}))),G},H=function(e,t,n){var r=e.search,o=e.countryRestrictions;var i=function(e){return{predictions:[],status:"error",error:{status:q(e),message:"Google Maps returned an API error"}}};void 0===t||L?n.send({action:"google-maps-predictions",payload:{data:{tag:F,value:i("UNKNOWN_ERROR")}}}):function(e,t){try{t()}catch(t){e.send({action:"google-maps-predictions",payload:{data:{tag:F,value:{predictions:[],status:"error",error:{status:"UNKNOWN_ERROR",message:t.message}}}}})}}(n,(function(){var e=t.autocompleteService,a=t.sessionToken;e.getPlacePredictions({input:r,sessionToken:a,componentRestrictions:{country:o}},(function(e,t){var r;switch(t){case google.maps.places.PlacesServiceStatus.OK:r={predictions:e,status:"ok"};break;case google.maps.places.PlacesServiceStatus.ZERO_RESULTS:r={predictions:[],status:"zeroResults"};break;default:r=i(t)}n.send({action:"google-maps-predictions",payload:{data:{tag:F,value:r}}})}))}))},K=n(7030),Y=["attachLinkAccountSessionForPayment","attachLinkAccountSessionForSetup","authenticate3DS2","cancelCardImageVerificationChallenge","cancelPaymentIntentSource","cancelSetupIntentSource","clearInstantDebitsIncentive","completeLinkAccountSessionElements","confirmPaymentIntent","confirmReturnIntent","confirmSetupIntent","createAcssDebitSession","createApplePaySession","addPaymentDetails","createConfirmationTokenWithElements","createConsumerPaymentDetails","createEphemeralKeyNonce","createPaymentMethodWithData","createPaymentMethodWithElement","createPaymentMethodWithElements","createPaymentPage","createPaymentPageWithSession","initPaymentPage","updatePaymentPage","retrievePaymentPage","confirmPaymentPage","createRadarSession","attachHCaptchaTokenToRadarSession","createSourceWithData","createSourceWithElement","confirmInstantDebitsIncentiveForPaymentDetails","fetchingWallets","shouldShowEceButton","eceNotifySheetAuthenticationNeeded","expressCheckoutConfirmStart","expressCheckoutConfirmEnd","expressCheckoutSheetOpened","expressCheckoutSheetClosed","getElementConfirmingPayment","getIsAwaitingConfirmCallback","getElementsSessionAmountModeCurrency","getElementsSessionUnverifiedPaymentMethodsOnDomain","setExpressCheckoutConfirmData","closeECEPaymentSheet","fetchLocale","fetchUpdates","localizeError","unsafeLocalizeString","loginWithConsumerInfo","retrieveIssuingCard","retrieveIssuingCardWithoutNonce","retrievePaymentIntent","retrieveSetupIntent","retrieveSource","rememberLinkLogin","forgetLinkLogin","createSharedSessionContext","removeElementsExperimentId","resetExpressCheckoutState","getGoogleMapsPredictions","getGoogleMapsDetails","initGoogleMapsService","setupStoreForElementsGroup","showWalletIfNecessary","tokenizeCvcUpdate","tokenizeWithData","tokenizeWithElement","updateCSSFonts","updateElementsOptions","updatePaymentIntent","verifyCardImageVerificationChallenge","verifyMicrodepositsForPayment","verifyMicrodepositsForSetup","retrieveCardNetworks","isCardMetadataRequired","userFacingRetrieveCardNetworks","retrieveWalletConfigAvailability","retrieveWalletConfig","getOnBehalfOfError","checkForLinkClientSecret","resolveLocale","elementMounted","elementUnmounted","logOutOfLinkInElements","updateStripeUserCredentials","validateElements","retrievePaypalMerchantId","consumerPreloadedDataStale","linkPopupLogOut","updateLoggingParams","internalSetFormValueForAddressElement","preloadConsumerLookup","midsChange","createV2CardPaymentMethod","parseLuxeNextAction","recordOuterPerformanceTimeline","linkFunnelEvent"],W=n(6835),V=n(2690),X=n(2024),Q=n(6668),J=n(5491),$=n(4942),ee="DEFAULT",te="ELEMENTS",ne="CONTROLLER",re="SDK",oe="WEBAUTHN",ie=(B={},(0,$.Z)(B,ee,"https://e473f68ec35a484cb7f83899ae4f576d@errors.stripe.com/976"),(0,$.Z)(B,te,"https://198453e0cdc24c5ca470767075dba88d@errors.stripe.com/977"),(0,$.Z)(B,ne,"https://76b49ff5e43c4910b429f557acde2bfd@errors.stripe.com/978"),(0,$.Z)(B,re,"https://c736ae64298f402f97218af93e3e0989@errors.stripe.com/914"),(0,$.Z)(B,oe,"https://20f53591733d415ea088036b8e8ad0e3@errors.stripe.com/980"),n(6274).Promise,function(){function e(){(0,i.Z)(this,e),this.requests=new Map}return(0,a.Z)(e,[{key:"create",value:function(){var e=this,t=(0,l.Vj)(),n=new W.B;return this.requests.set(t,n),n.promise.finally((function(){return e.requests.delete(t)})),{nonce:t,promise:n.promise}}},{key:"resolve",value:function(e,t){var n;null===(n=this.requests.get(e))||void 0===n||n.resolve(t)}},{key:"reject",value:function(e,t){var n;null===(n=this.requests.get(e))||void 0===n||n.reject(t)}}]),e}()),ae=n(6274).Promise,ce=["listenerRegistry","stripeJsLoadTimestamp","stripeCreateTimestamp","onFirstLoad","betas","mids","innerLocalStorageSemaphore","manualBrowserDeprecationRollout"],se=!1,ue={},le=function(e,t){return document.activeElement===e._iframe||e._iframe.parentElement&&document.activeElement===t},de=function(e){return"object"==typeof e&&null!==e&&"name"in e&&"IntegrationError"===e.name?new T.No("message"in e&&"string"==typeof e.message?e.message:""):e},pe=function(){function e(t){var n,a=this;(0,i.Z)(this,e),this._requests=new ie,this._financialConnectionsOnEventHandler=null,this.setFinancialConnectionsOnEventHandler=function(e){a._financialConnectionsOnEventHandler=e},this._linkModal=null,this.deferredCanMakePaymentResponse=new W.B,this.keyMode=function(){return(0,u.lO)(a._apiKey)},this.mids=function(){return a._getMids()},this.action=(n={},Y.forEach((function(e){n[e]=function(t){var n=a._requests.create(),r=n.promise,o=n.nonce;return a._controllerFrame.send({action:"stripe-controller-action-request",payload:{nonce:o,actionName:e,request:t}}),r}})),n),this.outerAction={localStorageSemaphoreAcquire:function(){return a._innerLocalStorageSemaphore.acquire()},localStorageSemaphoreRelease:function(){return a._innerLocalStorageSemaphore.release()},getCaptchaToken:function(e){return(0,Q.ky)(e,{log:a.report},!0)},getFramePrecedence:function(){return a._calculateFramePrecedence()},showBacsMandateConfirmation:function(e){var t=a.createLightboxFrame({type:s.NC.BACS_MANDATE_CONFIRMATION_APP,options:{locale:a._locale||"en",bacsDebitInfo:e}});return t._on("load",(function(){t.show(),t.fadeInBackdrop()})),new ae((function(e){t._once("request-close",(function(n){var r=n.type;(0,x.G)(t),e(r)}))}))},showSepaDebitMicrodepositsConfirmation:function(e){var t=a.createLightboxFrame({type:s.NC.SEPA_DEBIT_MICRODEPOSITS_CONFIRMATION_APP,options:{locale:a._locale||"en",last4:e}});return t._on("load",(function(){t.show(),t.fadeInBackdrop()})),new ae((function(e){t._once("request-close",(function(n){var r=n.type;(0,x.G)(t).then((function(){})),e(r)}))}))},showAcssBankCollection:function(e){var t=e.parsedIntentSecret,n=e.collectedBillingDetails;return(0,O.Pw)({shouldCreatePaymentMethod:!0,controller:a,intentSecret:t,confirmIntentData:{tag:"paymentMethod-from-data",type:"acss_debit",data:{billing_details:n},intentSecret:t,options:null,otherParams:{},mids:null,handleActions:!1,expectedType:"acss_debit",merchantParams:null}})},showUpeWallet:function(e){var t=e.frameId,n=e.wallet,r=a._frames[t];return new ae((function(e){null==r||r._emit("show-upe-wallet",{wallet:n,onComplete:function(t){return e(t)}})}))}},this.createElementFrame=function(e,t,n,r){var i=a._betas,c=new g({type:e,betas:i,controllerId:a._id,listenerRegistry:a._listenerRegistry,appParams:(0,o.Z)((0,o.Z)({},r),{},{componentName:t,keyMode:(0,u.lO)(a._apiKey),apiKey:a._apiKey})});return a._setupFrame(c,e,n,t)},this.createSecondaryElementFrame=function(e,t,n,r,i){var c=a._betas,s=new A({type:e,betas:c,controllerId:a._id,listenerRegistry:a._listenerRegistry,appParams:(0,o.Z)((0,o.Z)({},i),{},{componentName:t,primaryElementType:n,keyMode:(0,u.lO)(a._apiKey)})});return a._setupFrame(s,e,r,t)},this.createHiddenFrame=function(e,t,n){var r=new d.Z({type:e,betas:a._betas,controllerId:a._id,listenerRegistry:a._listenerRegistry,appParams:t});return a._setupFrame(r,e,n)},this.getCredentials=function(){return{publishableKey:a._apiKey,stripeAccount:a._stripeAccount,apiVersion:a._apiVersion}},this.setCredentials=function(e){a._apiKey=e.publishableKey,a._stripeAccount=e.stripeAccount,a._apiVersion=e.apiVersion},this.getLightboxFrame=function(e){return(0,X.sE)((0,X.VO)(a._frames).filter((function(e){return e instanceof P})),(function(t){return t.type===e}))},this.createLightboxFrame=function(e){var t=e.type,n=e.options,r=new P({type:t,controllerId:a._id,listenerRegistry:a._listenerRegistry,options:(0,o.Z)((0,o.Z)({},n),{},{betas:a._betas})}),i="LINK_AUTOFILL_MODAL"===e.type||"PAYMENT_METHOD_MESSAGING_MODAL_ELEMENT"===e.type||"LINK_INFO_MODAL"===e.type?e.groupId:null;return a._setupFrame(r,t,i)},this._setupFrame=function(e,t,n,r){return a._frames[e.id]=e,a._controllerFrame.sendPersistent({action:"stripe-user-createframe",payload:{newFrameId:e.id,frameType:t,groupId:n,elementName:r}}),e._on("unload_no_sensitive_data",(function(){a._controllerFrame.sendPersistent({action:"stripe-frame-unload",payload:{unloadedFrameId:e.id}})})),e._on("destroy",(function(){delete a._frames[e.id],a._controllerFrame.sendPersistent({action:"stripe-frame-destroy",payload:{destroyedFrameId:e.id}})})),e._on("load",(function(){a._controllerFrame.sendPersistent({action:"stripe-frame-load",payload:{loadedFrameId:e.id}}),a._controllerFrame.loaded&&e.send({action:"stripe-outer-controller-load",payload:{}})})),e},this.report=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a._controllerFrame.send({action:"stripe-controller-report",payload:{event:e,data:t}})},this.warn=function(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),o=1;o0},this._off=function(e,n){if(n){for(var r,o=t._callbacks[e],i=0;i"))})),t.substring(0,1e3)}(e.stack):null,u=!!c&&-1!==c.indexOf("https://js.stripe.com/v3/"),l=function(e){return function(e){return"Script error."===e.message||"string"==typeof e.fileName&&(0===e.fileName.indexOf("chrome://")||0===e.fileName.indexOf("chrome-extension://"))}(e)?"uncaught_third_party_error":"IntegrationError"===e.name?"integration_error":"fatal.uncaught_error"}(e);return{eventName:l,eventData:{name:"string"==typeof e.name?e.name:null,message:"string"==typeof e.message?e.message:null,fileName:c,lineNumber:"number"==typeof e.lineNumber?e.lineNumber:null,columnNumber:"number"==typeof e.columnNumber?e.columnNumber:null,stack:s,iframe:e.iframe,inPromise:null!==(t=e.inPromise)&&void 0!==t?t:null,element:null!==(n=e.element)&&void 0!==n?n:null,elementHasLoaded:null!==(r=e.elementHasLoaded)&&void 0!==r?r:null,apiMethodName:null!==(a=e.apiMethodName)&&void 0!==a?a:null,isStripeOrigin:u}}},c=function(e,t,n,o){var i=(0,r.Kn)(e)?e:new Error("Error thrown with unexpected type: ".concat(String(e))),c=a({_isUserError:i._isUserError,name:i.name,message:i.message,description:i.description,fileName:i.fileName,lineNumber:i.lineNumber,columnNumber:i.columnNumber,stack:i.stack,iframe:!1,element:"outer",apiMethodName:o,inPromise:n});throw t&&c&&(t.report(c.eventName,c.eventData),"integration_error"!==c.eventName&&t.reportError(i)),e},s=function(e,t,n){return function(){try{return e.call(this)}catch(e){return c(e,t||this&&this._controller,!1,n)}}},u=function(e,t,n){return function(r){try{return e.call(this,r)}catch(e){return c(e,t||this&&this._controller,!1,n)}}},l=function(e,t,n){return function(r,o){try{return e.call(this,r,o)}catch(e){return c(e,t||this&&this._controller,!1,n)}}},d=function(e,t,n){return function(r,o,i){try{return e.call(this,r,o,i)}catch(e){return c(e,t||this&&this._controller,!1,n)}}},p=function(e,t,n){return function(){try{for(var r=arguments.length,o=new Array(r),i=0;i>>32-t},p=function(e){var t,n="";for(t=7;t>=0;t--)n+=(e>>>4*t&15).toString(16);return n},m=new Array(80),f=1732584193,_=4023233417,h=2562383102,y=271733878,v=3285377520,g=(l=function(e){var t=e;t=t.replace(/\r\n/g,"\n");for(var n="",r=0;r127&&o<2048?(n+=String.fromCharCode(o>>6|192),n+=String.fromCharCode(63&o|128)):(n+=String.fromCharCode(o>>12|224),n+=String.fromCharCode(o>>6&63|128),n+=String.fromCharCode(63&o|128))}return n}(l)).length,b=[];for(n=0;n>>29),b.push(g<<3&4294967295),t=0;t1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{treatment:5,control:5},r=void 0===t?Math.random().toString():t,a=void 0===t?e:"".concat(e,".").concat(t),c="".concat(e,".").concat(r);return o[a]||(o[a]=i(c,n)),o[a]}},3367:function(e,t,n){"use strict";function r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=(0,o.Z)(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,c=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){s=!0,a=e},f:function(){try{c||null==n.return||n.return()}finally{if(s)throw a}}}}n.d(t,{NG:function(){return l},lT:function(){return d},sr:function(){return f}});var o=n(181),i=n(9062),a=n(1413),c=n(8948),s=n(942),u=["SCRIPT","STYLE"],l=function(){var e=null;return _().then((function(t){e=t})).catch((function(){e=null})),function(){var t=y();return e?(0,a.Z)({name:P(t),email:g(t),experimentalEmail:v()},C(e,t)):{name:P(t),email:g(t),phoneNumber:null,phoneCountry:null,experimentalEmail:v()}}},d=function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5e3,n=Date.now(),r=[],o=document.documentElement.getElementsByTagName("*").length;m(document.documentElement,(function(e,n){f(e,t).forEach((function(e,t){r.push({selector:n,value:e,nthMatch:t})}))}));var i=Date.now()-n;return{selectors:{name:[],email:r,phoneNumber:[],phoneCountry:[]},runtimeInMillis:i,nodeCount:o,runCount:1,source:e}}},p=function(e){var t;if(e.id&&"string"==typeof e.id&&window.CSS&&CSS.escape&&!(0,c.Ur)(e.id))return"#".concat(CSS.escape(e.id));var n=e.tagName.toLowerCase(),r=Array.from((null===(t=e.parentElement)||void 0===t?void 0:t.children)||[]);if(1===r.filter((function(e){return e.tagName.toLowerCase()===n})).length||!e.parentElement)return n;var o=r.indexOf(e);return"".concat(n,":nth-child(").concat(1+o,")")},m=function(e,t){for(var n=[{element:e,selector:p(e)}],r=function(){var e=n.shift();if(e){if(t(e.element,e.selector))return"break";var r=Array.from(e.element.children).map((function(t){return{element:t,selector:"".concat(e.selector," > ").concat(p(t))}}));n.push.apply(n,(0,i.Z)(r))}};n.length;){if("break"===r())break}},f=function(e,t){if("INPUT"===e.tagName||"SELECT"===e.tagName){if(document.activeElement===e)return[];var n=w(e),r=b(n);return r?[r]:[]}return u.includes(e.tagName)?[]:Array.from(e.childNodes).reduce((function(e,n){if(n.nodeType===Node.TEXT_NODE){var r,o=null===(r=n.textContent)||void 0===r?void 0:r.trim();if(!o)return e;var a=(o.length0;){var i=n.messageQueue.shift();i&&i()}n.initialized=!0,n.frame&&(n.frame.dataset.initialized="true")}else{var a=n.resolver.getResolverAndDelete(t);a&&a(t.body)}}},this.channel=t.channel,this.fingerprintedPath=t.fingerprintedPath,this.frame=null,this.frameOrigin=null,this.frameQueryParams=t.frameQueryParams,this.frameAttributes=t.frameAttributes,this.initialized=!1,this.messageQueue=[],this.resolver=new u,this.on="on"in t?t.on:{},this.createListener()}return(0,i.Z)(e,[{key:"isLoaded",value:function(){return this.initialized}},{key:"mount",value:function(e,t){if(!this.frame){if(!this.fingerprintedPath)throw new Error("Passed in an invalid path for frame client with channel: ".concat(this.channel));var n=function(e){var t=e.fingerprintedPath,n=e.name,r=e.onLoad,o=e.queryStringOptions,i=e.referrerPolicy||"no-referrer",s=document.createElement("iframe");r&&s.addEventListener("load",(function(){r(s)})),s.setAttribute("frameborder","0"),s.setAttribute("allowTransparency","true"),s.setAttribute("scrolling","no"),s.setAttribute("name",n),s.setAttribute("referrerpolicy",i),e.visible||(s.setAttribute("aria-hidden","true"),s.setAttribute("tabIndex","-1"));var u=e.frameAttributes;u&&Object.keys(u).forEach((function(e){s.setAttribute(e,u[e])}));var l,d,p=(l=e.DANGEROUS_BREAKS_ORIGIN_CHECKING_baseUrl,d=t,"".concat(l||"https://js.stripe.com/v3/").concat(d||""));if(o){var m=(0,a.q)(o);s.src="".concat(p,"#").concat(m)}else s.src=p;return e.visible||(0,c.SV)(s),s}({fingerprintedPath:this.fingerprintedPath,name:this.channel,queryStringOptions:(0,r.Z)((0,r.Z)({},this.frameQueryParams),{},{parentOrigin:window.location.origin}),referrerPolicy:"no-referrer",frameAttributes:this.frameAttributes,visible:!(null==t||!t.visible),DANGEROUS_BREAKS_ORIGIN_CHECKING_baseUrl:null==t?void 0:t.DANGEROUS_BREAKS_ORIGIN_CHECKING_baseUrl});null!=t&&t.inlineCss&&(0,c.yq)(n,t.inlineCss),e.appendChild(n),this.frame=n}}},{key:"isMounted",value:function(){return document.contains(this.frame)}},{key:"sendMessageToChild",value:function(e,t){var n=this;return this.initialized?this.postMessageToChild(e,t):new l((function(r){n.messageQueue.push((function(){return r({type:e,body:t})}))})).then((function(){return n.postMessageToChild(e,t)}))}},{key:"postMessageToChild",value:function(e,t){var n=this,r=this.frame,o=this.frameOrigin;if(!r)throw new Error("Cannot communicate with frame before calling mount().");var i=r.contentWindow;if(!i||!o)throw new Error("frame window is not ready");var a=this.resolver.getNextRequestId(),c={channel:this.channel,type:e,id:a,body:t};return new l((function(t){n.resolver.setResolver(e,a,t),i.postMessage(JSON.stringify(c),o)}))}},{key:"getClientHandler",value:function(e){var t=this.on[e.type];return t?function(e,n){var r,o=t(e);r=o,Boolean(r&&"function"==typeof r.then)?o.then((function(e){n(e)})):void 0!==o&&n(o)}:null}}]),e}();n(6274).Promise,window.location.hash.indexOf("debugMode=true"),n(6274).Promise},4775:function(e,t,n){"use strict";n.d(t,{uR:function(){return r}});var r=Object.keys({accel:!0,amex:!0,carnet:!0,cartes_bancaires:!0,diners:!0,discover:!0,eftpos_au:!0,elo:!0,girocard:!0,interac:!0,jcb:!0,mastercard:!0,nyce:!0,pulse:!0,rupay:!0,star:!0,unionpay:!0,visa:!0})},6977:function(e,t,n){"use strict";n.d(t,{G2:function(){return p},O3:function(){return u},PA:function(){return a},QS:function(){return i},RY:function(){return s},e3:function(){return c},gW:function(){return d},mD:function(){return l}});var r=n(1413),o=n(1873),i=(n(942),"spc"),a=function(e,t){switch(e.type){case"object":return{paymentIntent:e.object};case"error":var n=t?{payment_intent:t}:{};return{error:(0,r.Z)((0,r.Z)({},n),e.error)};default:return(0,o.Rz)(e)}},c=function(e,t){switch(e.type){case"error":return{error:(0,r.Z)((0,r.Z)({},t?{setup_intent:t}:{}),e.error)};case"object":return{setupIntent:e.object};default:return(0,o.Rz)(e)}},s=function(e){var t=e.trim().match(/^((seti|pi)_[^_]+)_secret_[^-]+$/);return t?"pi"===t[2]?{id:t[1],clientSecret:t[0],type:"PAYMENT_INTENT"}:{id:t[1],clientSecret:t[0],type:"SETUP_INTENT"}:null},u=function(e){return"payment_intent"===e.object?{id:e.id,clientSecret:e.client_secret,type:"PAYMENT_INTENT"}:{id:e.id,clientSecret:e.client_secret,type:"SETUP_INTENT"}},l=function(e){return"requires_source_action"===e||"requires_action"===e},d=function(e){return"requires_payment_method"===e||"requires_confirmation"===e||"requires_source"===e},p=function(e){return"requires_source_action"===e.status||"requires_action"===e.status?e.next_action:null}},1743:function(e,t,n){"use strict";n.d(t,{Tw:function(){return o},Uz:function(){return s},WN:function(){return l},aH:function(){return a},kB:function(){return i},qp:function(){return u},yv:function(){return d}});var r=n(1413),o="40px",i={invalid_coupon_code:"invalid_coupon_code",expired_coupon_code:"expired_coupon_code",invalid_payer_zip:"invalid_payer_zip"},a=(0,r.Z)({success:"success",fail:"fail",invalid_shipping_address:"invalid_shipping_address"},i),c=(0,r.Z)({fail:"fail",invalid_payer_name:"invalid_payer_name",invalid_payer_email:"invalid_payer_email",invalid_payer_phone:"invalid_payer_phone",invalid_shipping_address:"invalid_shipping_address"},i),s={shipping:"shipping",delivery:"delivery",pickup:"pickup"},u=(0,r.Z)({success:"success"},c),l={merchantCapabilities:["supports3DS"],displayItems:[]},d={auto:"auto",available:"available",unavailableItemIneligible:"unavailableItemIneligible",unavailableRecurringTransaction:"unavailableRecurringTransaction"}},7934:function(e,t,n){"use strict";n.d(t,{RO:function(){return d}});var r,o,i=n(4942),a=n(942),c=(r={},(0,i.Z)(r,a.rM.VISA,"visa"),(0,i.Z)(r,a.rM.MASTERCARD,"masterCard"),(0,i.Z)(r,a.rM.AMEX,"amex"),(0,i.Z)(r,a.rM.DISCOVER,"discover"),(0,i.Z)(r,a.rM.JCB,"jcb"),(0,i.Z)(r,a.rM.UNIONPAY,"chinaUnionPay"),(0,i.Z)(r,a.rM.DINERS,null),(0,i.Z)(r,a.ZJ.MAESTRO,"maestro"),(0,i.Z)(r,a.ZJ.CARTES_BANCAIRES,"cartesBancaires"),(0,i.Z)(r,a.ZJ.INTERAC,"interac"),r),s=(o={},(0,i.Z)(o,a.rM.VISA,"VISA"),(0,i.Z)(o,a.rM.MASTERCARD,"MASTERCARD"),(0,i.Z)(o,a.rM.AMEX,"AMEX"),(0,i.Z)(o,a.rM.DISCOVER,"DISCOVER"),(0,i.Z)(o,a.rM.JCB,"JCB"),(0,i.Z)(o,a.rM.DINERS,null),(0,i.Z)(o,a.ZJ.CARTES_BANCAIRES,null),(0,i.Z)(o,a.ZJ.INTERAC,null),["AT","AU","BE","CA","CH","DE","DK","EE","ES","FI","FR","GB","GR","HK","IE","IT","JP","LT","LU","LV","MX","NL","NO","NZ","PL","PT","SE","SG","US"]),u=["AT","BE","BG","CY","CZ","DE","DK","EE","ES","FI","FR","GI","GR","HR","HU","IE","IT","LI","LT","LU","LV","MT","NL","NO","PL","PT","RO","SE","SI","SK","GB","HK","SG","CH","US"],l=function(e,t,n,r,o,i){var c=[];return r&&-1!==r.indexOf(a.ZJ.CARTES_BANCAIRES)&&"eur"===o&&!i&&c.push(a.ZJ.CARTES_BANCAIRES),-1!==s.indexOf(e)&&c.push(a.rM.AMEX),(-1!==["GB","CA","JP","US"].indexOf(e)||t)&&c.push.apply(c,[a.rM.DISCOVER,a.rM.DINERS]),(-1!==u.indexOf(e)||t)&&c.push(a.rM.JCB),c.push.apply(c,[a.rM.MASTERCARD,a.rM.VISA]),c.filter((function(e){return-1===n.indexOf(e)}))},d=function(e,t,n,r,o,i){return l(e,t,n,r,o,i).reduce((function(e,t){var n=c[t];return n&&e.push(n),e}),[])}},2141:function(e,t,n){"use strict";n.d(t,{J$:function(){return r.J}});var r=n(4832)},4832:function(e,t,n){"use strict";n.d(t,{J:function(){return o}});var r={AE:"AE",AT:"AT",AU:"AU",BE:"BE",BG:"BG",BR:"BR",CA:"CA",CH:"CH",CI:"CI",CR:"CR",CY:"CY",CZ:"CZ",DE:"DE",DK:"DK",DO:"DO",EE:"EE",ES:"ES",FI:"FI",FR:"FR",GB:"GB",GI:"GI",GR:"GR",GT:"GT",HK:"HK",HR:"HR",HU:"HU",ID:"ID",IE:"IE",IN:"IN",IT:"IT",JP:"JP",LI:"LI",LT:"LT",LU:"LU",LV:"LV",MT:"MT",MX:"MX",MY:"MY",NL:"NL",NO:"NO",NZ:"NZ",PE:"PE",PH:"PH",PL:"PL",PT:"PT",RO:"RO",SE:"SE",SG:"SG",SI:"SI",SK:"SK",SN:"SN",TH:"TH",TT:"TT",US:"US",UY:"UY"},o=Object.keys(r)},1765:function(e,t,n){"use strict";n.d(t,{M4:function(){return c},MJ:function(){return s},P3:function(){return h},ub:function(){return f},Lv:function(){return u},uN:function(){return d},dZ:function(){return _},jk:function(){return y}});var r,o=n(9062),i=n(6617),a=n(1873),c={checkout_beta_2:"checkout_beta_2",checkout_beta_3:"checkout_beta_3",checkout_beta_4:"checkout_beta_4",checkout_beta_testcards:"checkout_beta_testcards",payment_intent_beta_1:"payment_intent_beta_1",payment_intent_beta_2:"payment_intent_beta_2",payment_intent_beta_3:"payment_intent_beta_3",google_pay_beta_1:"google_pay_beta_1",acss_debit_beta_1:"acss_debit_beta_1",acss_debit_beta_2:"acss_debit_beta_2",afterpay_clearpay_setup_intents_beta:"afterpay_clearpay_setup_intents_beta",bacs_debit_beta:"bacs_debit_beta",fpx_bank_beta_1:"fpx_bank_beta_1",ideal_pm_beta_1:"ideal_pm_beta_1",line_items_beta_1:"line_items_beta_1",oxxo_pm_beta_1:"oxxo_pm_beta_1",gopay_pm_beta_1:"gopay_pm_beta_1",qris_pm_beta_1:"qris_pm_beta_1",kr_card_pm_beta_1:"kr_card_pm_beta_1",naver_pay_pm_beta_1:"naver_pay_pm_beta_1",kakao_pay_pm_beta_1:"kakao_pay_pm_beta_1",payco_pm_beta_1:"payco_pm_beta_1",kr_market_pm_beta_1:"kr_market_pm_beta_1",ng_market_pm_beta_1:"ng_market_pm_beta_1",sepa_pm_beta_1:"sepa_pm_beta_1",deferred_intent_blik_beta_1:"deferred_intent_blik_beta_1",klarna_pm_beta_1:"klarna_pm_beta_1",tax_product_beta_1:"tax_product_beta_1",wechat_pay_pm_beta_1:"wechat_pay_pm_beta_1",wechat_pay_pm_beta_2:"wechat_pay_pm_beta_2",checkout_beta_locales:"checkout_beta_locales",stripe_js_beta_locales:"stripe_js_beta_locales",upi_beta_1:"upi_beta_1",upi_beta_2:"upi_beta_2",issuing_elements_1:"issuing_elements_1",issuing_elements_2:"issuing_elements_2",return_intents_beta_1:"return_intents_beta_1",netbanking_beta_1:"netbanking_beta_1",netbanking_bank_beta_1:"netbanking_bank_beta_1",instant_debits_beta_1:"instant_debits_beta_1",link_beta_1:"link_beta_1",link_beta_2:"link_beta_2",link_beta_3:"link_beta_3",link_default_integration_beta_1:"link_default_integration_beta_1",link_default_integration_beta_2:"link_default_integration_beta_2",payment_element_beta_1:"payment_element_beta_1",elements_customers_beta_1:"elements_customers_beta_1",elements_spm_sfu_off_session_override_beta_1:"elements_spm_sfu_off_session_override_beta_1",card_country_event_beta_1:"card_country_event_beta_1",id_bank_transfer_beta_1:"id_bank_transfer_beta_1",id_bank_transfer_beta_2:"id_bank_transfer_beta_2",us_bank_account_beta_2:"us_bank_account_beta_2",cup_apple_pay_beta_1:"cup_apple_pay_beta_1",nz_bank_account_beta_1:"nz_bank_account_beta_1",nz_bank_account_beta_2:"nz_bank_account_beta_2",payment_element_apple_pay_beta_1:"payment_element_apple_pay_beta_1",link_autofill_modal_beta_1:"link_autofill_modal_beta_1",shipping_address_element_beta_1:"shipping_address_element_beta_1",process_order_beta_1:"process_order_beta_1",server_side_confirmation_beta_1:"server_side_confirmation_beta_1",pay_by_bank_beta_1:"pay_by_bank_beta_1",blocked_card_brands_beta_1:"blocked_card_brands_beta_1",blocked_card_brands_beta_2:"blocked_card_brands_beta_2",payment_element_disable_card_country_zip_validations_beta_1:"payment_element_disable_card_country_zip_validations_beta_1",affirm_in_context_beta_1:"affirm_in_context_beta_1",ume_beta_1:"ume_beta_1",ume_beta_2:"ume_beta_2",ume_beta_3:"ume_beta_3",payment_method_messaging_autopm_beta_1:"payment_method_messaging_autopm_beta_1",networks_change_1:"networks_change_1",express_checkout_element_beta_1:"express_checkout_element_beta_1",pay_button_element_beta_1:"pay_button_element_beta_1",link_in_card_element_beta_1:"link_in_card_element_beta_1",sunbit_pm_beta_1:"sunbit_pm_beta_1",billie_pm_beta_1:"billie_pm_beta_1",satispay_pm_beta_1:"satispay_pm_beta_1",ng_bank_pm_beta_1:"ng_bank_pm_beta_1",ng_bank_transfer_pm_beta_1:"ng_bank_transfer_pm_beta_1",ng_card_pm_beta_1:"ng_card_pm_beta_1",ng_ussd_pm_beta_1:"ng_ussd_pm_beta_1",financial_connections_on_event_beta_1:"financial_connections_on_event_beta_1",elements_enable_deferred_intent_beta_1:"elements_enable_deferred_intent_beta_1",elements_enable_deferred_intent_beta_2:"elements_enable_deferred_intent_beta_2",enable_stripe_update_api_key_beta_0:"enable_stripe_update_api_key_beta_0",cartes_bancaires_apple_pay_beta_1:"cartes_bancaires_apple_pay_beta_1",interac_apple_pay_beta_1:"interac_apple_pay_beta_1",payment_request_button_two_button_beta_1:"payment_request_button_two_button_beta_1",custom_checkout_beta_1:"custom_checkout_beta_1",custom_checkout_beta_2:"custom_checkout_beta_2",custom_checkout_beta_3:"custom_checkout_beta_3",custom_checkout_beta_4:"custom_checkout_beta_4",custom_checkout_disable_pe_billing_beta:"custom_checkout_disable_pe_billing_beta",custom_checkout_internal_dev_beta:"custom_checkout_internal_dev_beta",deferred_intent_pe_optional_amount_beta_0:"deferred_intent_pe_optional_amount_beta_0",south_korea_market_beta_1:"south_korea_market_beta_1",ece_apple_pay_deferred_payment_card_funding_beta_1:"ece_apple_pay_deferred_payment_card_funding_beta_1",ece_apple_pay_payment_request_passthrough_1:"ece_apple_pay_payment_request_passthrough_1",ece_temp_prevent_default_beta_1:"ece_temp_prevent_default_beta_1",disable_link_passthrough_beta_1:"disable_link_passthrough_beta_1",payto_pm_beta_1:"payto_pm_beta_1",elements_enable_sessions_edge:"elements_enable_sessions_edge",multibanco_pm_beta_1:"multibanco_pm_beta_1",disable_deferred_intent_client_validation_beta_1:"disable_deferred_intent_client_validation_beta_1",rechnung_pm_beta_1:"rechnung_pm_beta_1",embedded_checkout_byol_beta_1:"embedded_checkout_byol_beta_1",sequra_pm_beta_1:"sequra_pm_beta_1",capchase_pay_pm_beta_1:"capchase_pay_pm_beta_1",mondu_pm_beta_1:"mondu_pm_beta_1",kriya_pm_beta_1:"kriya_pm_beta_1",change_event_improvements_beta_1:"change_event_improvements_beta_1",mb_way_pm_beta_1:"mb_way_pm_beta_1"},s=Object.freeze({netbankingBank:"netbanking_bank_beta_1",shippingAddress:["shipping_address_element_beta_1","link_beta_1","link_beta_2","link_beta_3"],unifiedMessage:["ume_beta_1","ume_beta_2"]}),u=Object.keys(c),l={},d=function e(t,n){if(Array.isArray(n))return n.some((function(n){return e(t,n)}));var r=l[n];return(null==t?void 0:t.indexOf(n))>-1||!!r&&(null==t?void 0:t.indexOf(r))>-1},p=window.location.hash.substring(1).split("?")[0],m=(0,a.ld)((0,a.mC)({betas:(0,a.Wc)((0,a.CT)(a.kw.apply(void 0,(0,o.Z)(u))),(function(){return[]}))}),(0,i.vB)(p),"internal"),f="valid"===m.type?m.value.betas:[],_=function(e){var t=[],n=[];if(e){if(-1!==e.indexOf(c.blocked_card_brands_beta_1)&&-1!==e.indexOf(c.blocked_card_brands_beta_2))return{validBetas:t,betaError:"The following betas are incompatible for Stripe() parameter:\n\n- ".concat(c.blocked_card_brands_beta_1,"\n- ").concat(c.blocked_card_brands_beta_2,"\n\n Please remove ").concat(c.blocked_card_brands_beta_1,".")};e.forEach((function(e){u.indexOf(e)>-1?t.push(c[e]):n.push(e)}))}if(n.length>0){var r="The following betas are unrecognized for Stripe() parameter:\n\n- ".concat(n.join("\n- "),"\n\n They are either invalid or expired betas, please remove these beta flags to prevent future integration issues.");return{validBetas:t,betaWarning:r}}return{validBetas:t}},h=[],y=(r=h,function(e,t){return d(t,c.stripe_js_beta_locales)||-1===r.indexOf(e)?e:"auto"})},3333:function(e,t,n){"use strict";n.d(t,{sV:function(){return R},DI:function(){return M},j3:function(){return q},fL:function(){return X},G9:function(){return B},Bh:function(){return A},P0:function(){return E},PB:function(){return U},D$:function(){return G},D1:function(){return j},aS:function(){return F},JW:function(){return N},QH:function(){return W},JC:function(){return K},NK:function(){return Y},yv:function(){return O},ZR:function(){return H},q$:function(){return I},Ah:function(){return T},q:function(){return $},cE:function(){return z},s$:function(){return x},Gx:function(){return V},OV:function(){return Z},xz:function(){return L},Wt:function(){return D},x5:function(){return J},gG:function(){return ne},gq:function(){return te},d4:function(){return ee},lE:function(){return oe},UT:function(){return re}});var r,o=n(6274).Promise,i=function(e){var t,n;return function(){for(var r=arguments.length,o=new Array(r),i=0;i0||"ontouchstart"in window))&&!l(e)},f=i((function(e){return c(a(e),"macintosh")||c(a(e),"iphone")||c(a(e),"ipad")})),_=function(e,t){return f(e)&&c(e,"like")&&(/(iPhone|iPod|iPad).*AppleWebKit((?!.*Safari)|(.*\([^)]*like[^)]*Safari[^)]*\)))/i.test(e)||/(Macintosh).*AppleWebKit((?!.*Safari)|(.*\([^)]*like[^)]*Safari[^)]*\)))/i.test(e)&&m(e,t))},h=i((function(e){return b(e)&&/wv|Version\/\d+\.\d+/.test(e)&&!y(e)})),y=function(e){return c(a(e),"opera mini")},v=i((function(e){return f(e)&&!w(e)&&/^((?!chrome|android).)*safari/i.test(e)&&!d(e)})),g=function(e){return c(a(e),"firefox")},b=function(e){return c(a(e),"android")&&!l(e)},w=i((function(e){return c(a(e),"chrome/")})),k=i((function(e){return w(e)&&/Chrome\/(7[4-9]|[8-9]\d+|[1-9]\d{2,})/i.test(e)})),S="undefined"!=typeof window,P=S?window.navigator.maxTouchPoints:0,C=S?window.navigator.userAgent:"",E=(S&&window.navigator.platform,s(C)),A=u(C),N=(s(r=C)&&/Edge\/((1[0-6]\.)|0\.)/i.test(r),l(C)),T=(function(e){c(a(e),"msie")&&/MSIE ([0-9]{1,}[.0-9]{0,})/i.test(e)}(C),p(C,P)),I=(m(C,P),function(e,t){return p(e,t)||b(e)}(C,P)),R=b(C),M=h(C),O=(function(e){c(a(e),"android 4.")&&!c(a(e),"chrome")&&b(e)}(C),_(C,P)),x=v(C),Z=function(e,t){var n=p(e,t)&&/OS (1[7-9]|[2-9]\d+|[1-9]\d{2,})/i.test(e);return v(e)&&/Version\/(1[7-9]|[2-9]\d+|[1-9]\d{2,})/i.test(e)||n}(C,P),j=(function(e,t){v(e)&&p(e,t)}(C,P),g(C)),L=(function(e){g(e)&&/Firefox\/(50|51|[0-4]?\d)([^\d]|$)/i.test(e)}(C),d(C)),B=w(C),D=(function(e){w(e)&&(k(e)||/Chrome\/(6[6-9]|[7-9]\d+|[1-9]\d{2,})/i.test(e))}(C),k(C),function(e){return c(a(e),"applewebkit/")&&!c(a(e),"chrome")&&!s(e)&&!l(e)}(C)),q=function(e){return c(a(e),"chrome")&&!s(e)}(C),F=(function(e){c(a(e),"crios")}(C),function(e){return c(a(e),"fxios")}(C)),U=function(e){return c(a(e),"edgios")}(C),G=function(e){return c(a(e),"electron")}(C),z=y(C),H=function(e){return f(e)&&!w(e)&&/Macintosh.*AppleWebKit(?!.*Safari)/i.test(e)}(C),K=function(e){return c(a(e),"safari line")}(C),Y=function(e){return c(a(e),"pinterest/ios")}(C),W=(function(e){/OS 16_((\d+_?){1,2})/i.test(e)}(C),function(e){return/OS 18_0/i.test(e)}(C)),V=i((function(){return x&&"download"in document.createElement("a")})),X=S&&!!window.navigator.brave&&"function"==typeof window.navigator.brave.isBrave,Q=function(){return S&&window.navigator&&"standalone"in window.navigator&&window.navigator.standalone},J=i((function(){return _(C,P)||h(C)||function(e){return c(e,"FBAN")||c(e,"FBAV")}(C)||Q()})),$=(i((function(){return Q()||!!window.matchMedia&&window.matchMedia("(display-mode: standalone)").matches})),i((function(){return function(e,t){return new o((function(n){if(S&&v(e)&&void 0!==t){var r="__stripe_private_mode_test";try{var o=window.indexedDB&&window.indexedDB.open&&window.indexedDB.open(r,1);o.onupgradeneeded=function(){var e=o.result;try{e.createObjectStore("test",{autoIncrement:!0}).put(new Blob),n(!1)}catch(e){var t=e instanceof Error?e.message:e;if("string"==typeof t){var i=/BlobURLs are not yet supported/.test(t);n(i)}else n(!1)}finally{e.close(),window.indexedDB&&window.indexedDB.deleteDatabase&&window.indexedDB.deleteDatabase(r)}}}catch(e){n(!1)}}else n(!1)}))}(C,P)}))),ee=i((function(e){var t=a(e);return c(t,"windows")?"Windows":c(t,"android")?"Android":c(t,"iphone")||c(t,"ipad")?"iOS":c(t,"mac os")?"MacOS":c(t,"cros")?"ChromeOS":c(t,"linux")?"Linux":"Other"})),te=i((function(e){var t=a(e);return d(e)?"SamsungBrowser":c(t,"instagram")?"Instagram":c(t,"firefox")?"Firefox":s(e)||u(e)?"IE Edge":l(e)?"IE":c(t,"fb_iab")||c(t,"fban")||c(t,"fbav")?"Facebook":c(t,"chrome")?"Chrome":c(t,"safari")?"Safari":"Other"})),ne=(B&&ee(C),function(){return!(J()||G||H||X||Y||K||U||z||window.crossOriginIsolated)}),re=function(){return(window.navigator.languages||[])[0]||window.navigator.userLanguage||window.navigator.language||""},oe=function(){try{var e,t,n=null===(e=window)||void 0===e||null===(t=e.navigator)||void 0===t?void 0:t.connection;return{effectiveType:n.effectiveType,rtt:n.rtt,downlink:n.downlink}}catch(e){return{}}}},2024:function(e,t,n){"use strict";n.d(t,{CE:function(){return C},G:function(){return a},Ke:function(){return d},Nn:function(){return P},PM:function(){return I},Q8:function(){return h},Rb:function(){return v},TS:function(){return T},VO:function(){return p},Xy:function(){return l},cx:function(){return s},dq:function(){return f},ei:function(){return w},iO:function(){return y},l2:function(){return g},qh:function(){return m},qk:function(){return _},sE:function(){return c},sq:function(){return b},ve:function(){return S}});var r=n(7462),o=n(3324),i=n(6274).Promise,a=function(e,t){for(var n=-1,r=null==e?0:e.length;++n@]+@[^\s<>@.]+(\.[a-zA-Z0-9-]+)+$/,P=/[^\s<>@]+@[^\s<>@.]+(\.[a-zA-Z0-9-]+\w)/g,C={elements_session:"elements_session",elements_assignment:"elements_assignment"}},2808:function(e,t,n){"use strict";n.d(t,{d:function(){return o},e:function(){return i}});var r=n(3324),o=function(e){var t=e.name,n=e.value,r=e.expiresIn,o=e.path,i=e.domain,a=e.protocol,c=e.sameSite,s=void 0===c?"Lax":c,u=new Date,l=r||31536e6;u.setTime(u.getTime()+l);var d=o||"/",p=(n||"").replace(/[^!#-+\--:<-[\]-~]/g,encodeURIComponent),m="".concat(encodeURIComponent(t),"=").concat(p,";expires=").concat(u.toGMTString(),";path=").concat(d,";SameSite=").concat(s);return i&&(m+=";domain=".concat(i)),"https:"===a&&(m+=";secure"),document.cookie=m,m},i=function(e){for(var t,n=null!==(t=document.cookie.split("; "))&&void 0!==t?t:[],o=0;o2?2:c):a.toFixed(c)}},6241:function(e,t,n){"use strict";n.d(t,{Fe:function(){return r.Fe},QT:function(){return o.Q}});var r=n(4020),o=n(462)},462:function(e,t,n){"use strict";n.d(t,{Q:function(){return o}});var r={aed:"aed",afn:"afn",all:"all",amd:"amd",ang:"ang",aoa:"aoa",ars:"ars",aud:"aud",awg:"awg",azn:"azn",bam:"bam",bbd:"bbd",bdt:"bdt",bgn:"bgn",bhd:"bhd",bif:"bif",bmd:"bmd",bnd:"bnd",bob:"bob",brl:"brl",bsd:"bsd",btn:"btn",bwp:"bwp",byn:"byn",byr:"byr",bzd:"bzd",cad:"cad",cdf:"cdf",chf:"chf",clf:"clf",clp:"clp",cny:"cny",cop:"cop",crc:"crc",cuc:"cuc",cup:"cup",cve:"cve",czk:"czk",djf:"djf",dkk:"dkk",dop:"dop",dzd:"dzd",egp:"egp",ern:"ern",etb:"etb",eur:"eur",fjd:"fjd",fkp:"fkp",gbp:"gbp",gel:"gel",ghs:"ghs",gip:"gip",gmd:"gmd",gnf:"gnf",gtq:"gtq",gyd:"gyd",hkd:"hkd",hnl:"hnl",htg:"htg",huf:"huf",idr:"idr",ils:"ils",inr:"inr",iqd:"iqd",irr:"irr",isk:"isk",jmd:"jmd",jod:"jod",jpy:"jpy",kes:"kes",kgs:"kgs",khr:"khr",kmf:"kmf",kpw:"kpw",krw:"krw",kwd:"kwd",kyd:"kyd",kzt:"kzt",lak:"lak",lbp:"lbp",lkr:"lkr",lrd:"lrd",lsl:"lsl",ltl:"ltl",lvl:"lvl",lyd:"lyd",mad:"mad",mdl:"mdl",mga:"mga",mkd:"mkd",mmk:"mmk",mnt:"mnt",mop:"mop",mro:"mro",mur:"mur",mvr:"mvr",mwk:"mwk",mxn:"mxn",myr:"myr",mzn:"mzn",nad:"nad",ngn:"ngn",nio:"nio",nok:"nok",npr:"npr",nzd:"nzd",omr:"omr",pab:"pab",pen:"pen",pgk:"pgk",php:"php",pkr:"pkr",pln:"pln",pyg:"pyg",qar:"qar",ron:"ron",rsd:"rsd",rub:"rub",rwf:"rwf",sar:"sar",sbd:"sbd",scr:"scr",sdg:"sdg",sek:"sek",sgd:"sgd",shp:"shp",skk:"skk",sll:"sll",sos:"sos",srd:"srd",ssp:"ssp",std:"std",svc:"svc",syp:"syp",szl:"szl",thb:"thb",tjs:"tjs",tmt:"tmt",tnd:"tnd",top:"top",try:"try",ttd:"ttd",twd:"twd",tzs:"tzs",uah:"uah",ugx:"ugx",usd:"usd",uyu:"uyu",uzs:"uzs",vef:"vef",vnd:"vnd",vuv:"vuv",wst:"wst",xaf:"xaf",xag:"xag",xau:"xau",xcd:"xcd",xdr:"xdr",xof:"xof",xpf:"xpf",yer:"yer",zar:"zar",zmk:"zmk",zmw:"zmw",btc:"btc",jep:"jep",eek:"eek",ghc:"ghc",mtl:"mtl",tmm:"tmm",yen:"yen",zwd:"zwd",zwl:"zwl",zwn:"zwn",zwr:"zwr"},o=Object.keys(r)},6835:function(e,t,n){"use strict";n.d(t,{B:function(){return a}});var r=n(5671),o=n(3144),i=n(6274).Promise,a=function(){function e(){var t=this;(0,r.Z)(this,e),this._state="pending",this._state="pending",this.promise=new i((function(e,n){t._resolve=e,t._reject=n})),this.promise.then((function(){t._state="resolved"}),(function(){t._state="rejected"}))}return(0,o.Z)(e,[{key:"resolve",value:function(e){this._resolve(e)}},{key:"reject",value:function(e){this._reject(e)}},{key:"isResolved",value:function(){return"resolved"===this._state}},{key:"isRejected",value:function(){return"rejected"===this._state}},{key:"isPending",value:function(){return"pending"===this._state}}]),e}()},3534:function(e,t,n){"use strict";n.d(t,{Hb:function(){return l},Ql:function(){return p},SV:function(){return u},Xq:function(){return d},d3:function(){return f},mb:function(){return a},qW:function(){return m},yq:function(){return c}});var r=n(3324),o=n(8812),i=n(3550),a=function(e,t){var n={},o={};e.className.split(/\s+/).forEach((function(e){e&&(n[e]=!0)})),t.forEach((function(e){var t=(0,r.Z)(e,2),i=t[0],a=t[1];i.split(/\s+/).forEach((function(e){e&&(o[e]=o[e]||a,n[e]=o[e])}))})),e.className=Object.keys(n).filter((function(e){return n[e]})).join(" ")},c=function(e,t){e.style.cssText=Object.keys(t).map((function(e){return"".concat(e,": ").concat(t[e]," !important;")})).join(" ")},s={border:"none",margin:"0",padding:"0",width:"1px","min-width":"100%",overflow:"hidden",display:"block",visibility:"hidden",position:"fixed",height:"1px","pointer-events":"none","user-select":"none"},u=function(e){c(e,s)},l=function(e){try{return window.parent.frames[e]}catch(e){return null}},d=function(){if(!document.body)throw new o.No("Stripe.js requires that your page has a element.");return document.body},p=function(e){return setTimeout(e,16)},m=function(e){for(var t=e.parentNode;null!==t;){if(t instanceof ShadowRoot)return!0;t=t.parentNode}return!1},f=function(e,t){if(!window.IntersectionObserver)return function(){};if(0!==e.clientHeight)return t(),function(){};var n=(0,i.$M)(t);if(window.ResizeObserver){var r=new ResizeObserver((function(t){t.forEach((function(t){0!==t.contentRect.height&&(r.unobserve(e),n())}))}));return r.observe(e),function(){return r.disconnect()}}var o=new IntersectionObserver((function(t){t.forEach((function(t){t.intersectionRatio>0&&(o.unobserve(e),n())}))}),{root:document.documentElement});return o.observe(e),function(){return o.disconnect()}}},4200:function(e,t,n){"use strict";n.d(t,{Tf:function(){return a},W3:function(){return m},Xq:function(){return f.Xq},dh:function(){return d},Dx:function(){return u},xz:function(){return v},qW:function(){return f.qW},a0:function(){return h},d3:function(){return f.d3},MV:function(){return y},gl:function(){return p},SV:function(){return f.SV},yq:function(){return f.yq},Hb:function(){return f.Hb},mb:function(){return f.mb},xc:function(){return w},BO:function(){return b},Ql:function(){return f.Ql},w3:function(){return S}});var r="1.2em",o="14px",i=function(e){var t=e.split(" ").map((function(e){return parseInt(e.trim(),10)}));return 1===t.length||2===t.length?2*t[0]:3===t.length||4===t.length?t[0]+t[2]:0},a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"0",a=i(n);if("string"==typeof e&&/^[0-9.]+px$/.test(e)){var c=parseFloat(e.toString().replace(/[^0-9.]/g,""));return"".concat(c+a,"px")}var s,u=parseFloat(e.toString().replace(/[^0-9.]/g,"")),l=parseFloat(o.replace(/[^0-9.]/g,"")),d=parseFloat(t.toString().replace(/[^0-9.]/g,""));if("string"==typeof t&&/^(\d+|\d*\.\d+)px$/.test(t))s=d;else if("string"==typeof t&&/^(\d+|\d*\.\d+)em$/.test(t))s=d*l;else if("string"==typeof t&&/^(\d+|\d*\.\d+)%$/.test(t))s=d/100*l;else{if("string"!=typeof t||!/^[\d.]+$/.test(t)&&!/^\d*\.(px|em|%)$/.test(t))return"100%";s=l}var p=u*s+a,m="".concat(p,"px");return/^[0-9.]+px$/.test(m)?m:"100%"},c=n(3550),s=n(2024),u=function(e,t){return e?window.getComputedStyle(e,t):null},l=function(){return Array.prototype.slice.call(document.querySelectorAll("a[href], area[href], input:not([disabled]),\n select:not([disabled]), textarea:not([disabled]), button:not([disabled]),\n object, embed, *[tabindex], *[contenteditable]")).filter((function(e){var t=e.getAttribute("tabindex"),n=!t||parseInt(t,10)>=0,r=e.getBoundingClientRect(),o=u(e),i=r.width>0&&r.height>0&&o&&"hidden"!==o.getPropertyValue("visibility");return n&&i}))},d=function(e,t){var n=l();return n[(0,s.cx)(n,(function(t){return t===e||e.contains(t)}))+("previous"===t?-1:1)]},p=function(e,t){return e.then((function(){return(0,s.qk)(t,(function(e){var t=e.element,n=e.tabIndex;""===n?t.removeAttribute("tabindex"):t.setAttribute("tabindex",n)}))}))},m=function(e){var t=[],n=(0,s.qk)(document.querySelectorAll("*"),(function(n){var r=n.getAttribute("tabindex")||"";e!==n&&(n.tabIndex=-1),t.push({element:n,tabIndex:r})})),r=(0,c.$M)((function(){p(n,t)}));return{lockedPromise:n,lockedElements:t,restoreFocus:r}},f=(n(6617),n(3534)),_=["button","checkbox","file","hidden","image","submit","radio","reset"],h=function(e){var t=e.tagName;if(e.isContentEditable||"TEXTAREA"===t)return!0;if("INPUT"!==t)return!1;var n=e.getAttribute("type");return-1===_.indexOf(n)},y=function(){var e=(0,f.Xq)(),t=e.style.overflow;e.style.overflow="hidden";var n={passive:!1},r=function(e){return e.preventDefault()},o=function(){};return window.addEventListener("touchmove",o,n),e.addEventListener("touchstart",o,n),e.addEventListener("touchmove",r,n),(0,c.$M)((function(){e.style.overflow=t||"",window.removeEventListener("touchmove",o,n),e.removeEventListener("touchstart",o,n),e.removeEventListener("touchmove",r,n)}))},v=function(){var e=document.querySelectorAll("meta[name=viewport][content]"),t=e[e.length-1];return t&&t instanceof HTMLMetaElement?t.content:""},g=function(e){return v().match(e)},b=function(e){g("width=device-width")||e('Elements requires "width=device-width" be set in your page\'s viewport meta tag.\n For more information: https://stripe.com/docs/js/appendix/viewport_meta_requirements')},w=function(e){g("minimum-scale=1")||e('The Financial Connections authentication flow requires "minimum-scale=1" to be set in your page\'s viewport meta tag.')},k=n(6274).Promise,S=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.requiredStableFrames,r=void 0===n?3:n,o=t.timeout,i=void 0===o?5e3:o,a=t.isStable,c=void 0===a?P:a;return new k((function(t){var n=setTimeout(t,i),o=0,a=e.getBoundingClientRect();!function i(){requestAnimationFrame((function(){var s=e.getBoundingClientRect();c(a,s)?o++:o=0,o===r?(clearTimeout(n),t(e)):(a=s,i())}))}()}))},P=function(e,t){return e.height===t.height&&e.width===t.width}},4086:function(e,t,n){"use strict";n.d(t,{k:function(){return c}});var r=n(3144),o=n(5671),i=n(136),a=n(9388),c=function(e){function t(e,r){var i;return(0,o.Z)(this,t),(i=n.call(this)).name="FetchError",i.type="fetch_error",i.message="Error fetching ".concat(r),i.requestUrl=r,"string"==typeof e?i.message+=": ".concat(e):(i.originalError=e,i.message+=": ".concat(e.message)),i}(0,i.Z)(t,e);var n=(0,a.Z)(t);return(0,r.Z)(t)}((0,n(7112).Z)(Error))},3973:function(e,t,n){"use strict";n.d(t,{N:function(){return s}});var r=n(3144),o=n(5671),i=n(7326),a=n(136),c=n(9388),s=function(e){function t(e){var r;return(0,o.Z)(this,t),r=n.call(this,e),window.__stripeElementsController&&window.__stripeElementsController.reportIntegrationError(e),r.name="IntegrationError",Object.defineProperty((0,i.Z)(r),"message",{value:r.message,enumerable:!0}),r}(0,a.Z)(t,e);var n=(0,c.Z)(t);return(0,r.Z)(t)}((0,n(7112).Z)(Error))},8102:function(e,t,n){"use strict";var r=n(3144),o=n(5671),i=n(136),a=n(9388);Error},51:function(e,t,n){"use strict";n.d(t,{F:function(){return c}});var r=n(3144),o=n(5671),i=n(136),a=n(9388),c=function(e){function t(e){var r;return(0,o.Z)(this,t),(r=n.call(this,e)).name="NetworkError",r.type="network_error",r.requestUrl=e,r}(0,i.Z)(t,e);var n=(0,a.Z)(t);return(0,r.Z)(t)}((0,n(7112).Z)(Error))},8812:function(e,t,n){"use strict";n.d(t,{F7:function(){return i.F},No:function(){return o.N},kp:function(){return r.k}});var r=n(4086),o=n(3973),i=(n(8102),n(51))},2826:function(e,t,n){"use strict";n.d(t,{h:function(){return U}});var r=n(1413),o=n(5987),i=n(3324),a=n(9062),c=n(5671),s=n(3144),u=n(3333),l=n(6617),d=n(8812),p=n(6274).Promise,m=function(e){var t=e.data,n=e.contentType,r=void 0===n?"application/x-www-form-urlencoded":n,o=e.method,i=e.url,a="";return t&&"application/x-www-form-urlencoded"===r?a=(0,l.qC)(t):t&&"application/json"===r&&(a=JSON.stringify(t)),{requestUrl:"GET"===o&&a?"".concat(i,"?").concat(a):i,requestData:"GET"===o?"":a,contentType:r}},f=function e(t){return new p((function(n,o){var i=t.method,a=t.headers,c=void 0===a?{}:a,s=t.keepalive,u=t.withCredentials,l=t.priority,f=void 0===l?"auto":l,_=m(t),h=_.requestUrl,y=_.requestData,v={Accept:"application/json","Content-Type":_.contentType};c&&Object.keys(c).forEach((function(e){var t=c[e];"string"==typeof t&&(v[e]=t)})),window.fetch(h,{method:i,keepalive:s,headers:v,body:y||void 0,mode:"cors",credentials:u?"include":"omit",priority:f}).then((function(i){if(0===i.status){if(!u)return e((0,r.Z)((0,r.Z)({},t),{},{withCredentials:!0})).then(n,o);o(new d.F7(h))}return i.text().then((function(e){n({responseURL:i.url,status:i.status,json:function(){return p.resolve(JSON.parse(e))},getResponseHeader:function(e){return i.headers.get(e)||""},responseText:e})}))})).catch((function(e){o(new d.kp(e,h))}))}))},_=function(e){return"function"==typeof window.fetch?f(e):function(e){return new p((function(t,n){var o=e.method,i=e.headers,a=e.withCredentials,c=m(e),s=c.requestUrl,u=c.requestData,l=c.contentType,f=new XMLHttpRequest;a&&(f.withCredentials=a),f.open(o,s,!0),f.setRequestHeader("Accept","application/json"),f.setRequestHeader("Content-Type",l),f.json=function(){return new p((function(e,t){try{e(JSON.parse(f.responseText))}catch(e){t(new d.kp(e,s))}}))},i&&Object.keys(i).forEach((function(e){var t=i[e];"string"==typeof t&&f.setRequestHeader(e,t)})),f.onreadystatechange=function(){4===f.readyState&&(f.onreadystatechange=function(){},0===f.status?a?n(new d.F7(s)):_((0,r.Z)((0,r.Z)({},e),{},{withCredentials:!0})).then(t,n):t(f))};try{f.send(u)}catch(e){n(new d.kp(e,s))}}))}(e)},h=n(2024),y=n(6232),v=["client_id"],g="https://r.stripe.com/0",b="https://r.stripe.com/b",w=u.D1&&"function"==typeof navigator.sendBeacon,k=new Set(["stripe-js","stripe-js-one-click-authn","stripe-js-linked-accounts","crypto-onramp"]),S=function(e){return new Blob([(0,l.qC)(e)]).size},P=function(){function e(t){var n=this,r=t.clientId,o=t.maxBatchSize;(0,c.Z)(this,e),this.bufferedLogs=[],this.batchTimer=null,this.fetchQueue=[],this.inFlightBytes=0,this.clientId=r,this.maxBatchSize=o,document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&n.flushImmediately("visibilitystate")})),window.addEventListener("beforeunload",(function(){n.flushImmediately("beforeunload")}))}return(0,s.Z)(e,[{key:"queue",value:function(e,t){var n=this;try{this.willOverflowBufferSize(e)&&this.flush()}catch(e){}this.bufferedLogs.push(e),"high"===t||this.bufferedLogs.length>=this.maxBatchSize?this.flush(t):this.batchTimer||(this.batchTimer=setTimeout((function(){n.flush()}),1e3))}},{key:"getBatchPayload",value:function(){return{client_id:this.clientId,num_requests:this.bufferedLogs.length,events:(0,a.Z)(this.bufferedLogs)}}},{key:"resetBuffer",value:function(){this.bufferedLogs=[],this.batchTimer&&(clearTimeout(this.batchTimer),this.batchTimer=null)}},{key:"flushImmediately",value:function(e){var t=this.getBatchPayload();t.events=t.events.map((function(t){return(0,r.Z)((0,r.Z)({},t),{},{event_flush_reason:e})}));var n=this.prepareBatchPayloadForRequest(t);if(0!==t.num_requests)if(this.resetBuffer(),this.isSendBeaconSupported()&&this.requestWithBeacon(n))for(;this.fetchQueue.length>0;){var o=this.fetchQueue.shift();o&&this.requestWithBeacon(o.payload)}else for(this.requestWithFetch({size:S(n),payload:n});this.fetchQueue.length>0;){var i=this.fetchQueue.shift();i&&this.requestWithFetch(i)}}},{key:"flush",value:function(e){var t=this.prepareBatchPayloadForRequest(this.getBatchPayload());0!==t.num_requests&&(this.resetBuffer(),this.send(t,e))}},{key:"send",value:function(e,t){u.D1&&this.isSendBeaconSupported()&&this.requestWithBeacon(e)||this.queueFetch(e,t)}},{key:"prepareBatchPayloadForRequest",value:function(e){try{var t=JSON.stringify(e.events);return(0,r.Z)((0,r.Z)({},e),{},{events:t})}catch(e){throw this.resetBuffer(),e}}},{key:"isSendBeaconSupported",value:function(){return navigator&&"function"==typeof navigator.sendBeacon}},{key:"willOverflowBufferSize",value:function(e){if(0===this.bufferedLogs.length)return!1;var t=[].concat((0,a.Z)(this.bufferedLogs),[e]),n={client_id:this.clientId,num_requests:t.length,events:t};return S(this.prepareBatchPayloadForRequest(n))>=32e3}},{key:"requestWithBeacon",value:function(e){try{if(window.navigator.sendBeacon&&window.navigator.sendBeacon.bind){var t=navigator.sendBeacon.bind(navigator),n=new Blob([(0,l.qC)(e)],{type:"application/x-www-form-urlencoded"});return t(b,n)}}catch(e){return!1}return!1}},{key:"queueFetch",value:function(e,t){var n=S(e);this.fetchQueue.push({size:n,payload:e}),this.emptyFetchQueue(t)}},{key:"emptyFetchQueue",value:function(e){for(;this.fetchQueue.length>0&&(0===this.inFlightBytes||this.inFlightBytes+this.fetchQueue[0].size<5e4);){var t=this.fetchQueue.shift();t&&this.requestWithFetch(t,e)}}},{key:"requestWithFetch",value:function(e,t){var n=this,r=e.size,o=e.payload;this.inFlightBytes+=r,_({url:b,method:"POST",data:o,keepalive:!u.D1||void 0,withCredentials:!1,priority:"high"===t?"auto":"low"}).finally((function(){n.inFlightBytes-=r,n.emptyFetchQueue()}))}}]),e}(),C=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.useBatching,r=t.useBatchingForTestMode,o=t.maxBatchSize;(0,c.Z)(this,e),this.clientQueues={},this.request=function(e,t){if(w){var n=new Blob([(0,l.qC)(e)],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(g,n)}else _({url:g,method:"POST",data:e,keepalive:!0,withCredentials:!1,priority:"high"===t?"auto":"low"})},this.useBatching=null!=n&&n,this.useBatchingForTestMode=null!=r&&r,this.maxBatchSize=null!=o?o:5}return(0,s.Z)(e,[{key:"send",value:function(e){var t=e.name,n=e.params,r=e.priority;if(void 0===n.client_id||"string"==typeof n.client_id){var o=n.client_id||"stripe-js",i=this.shouldBatchEvent(o,n),a={event_name:t,client_id:o,created:n.timestamp,batching_enabled:i};Object.keys(n).forEach((function(e){if("timestamp"!==e&&"client_id"!==e){var t=n[e];null!=t&&(a[e]=(0,y.Q)(t,e))}})),i?this.queueEvent(a,r):this.request(a)}}},{key:"getClientQueuedEvents",value:function(){var e={};return(0,h.qh)(this.clientQueues).forEach((function(t){var n=(0,i.Z)(t,2),r=n[0],o=n[1];e[r]=o.getBatchPayload().events})),e}},{key:"shouldBatchEvent",value:function(e,t){return!!k.has(e)&&(!("test"!==t.key_mode||!this.useBatchingForTestMode)||this.useBatching)}},{key:"getOrCreateClientQueue",value:function(e){return this.clientQueues[e]||(this.clientQueues[e]=new P({clientId:e,maxBatchSize:this.maxBatchSize})),this.clientQueues[e]}},{key:"queueEvent",value:function(e,t){var n=e.client_id,r=(0,o.Z)(e,v);this.getOrCreateClientQueue(n).queue(r,t)}}]),e}(),E=(n(9543),n(7462)),A=n(5558),N=n(942),T=n(3423),I=(0,s.Z)((function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;(0,c.Z)(this,e),this.name=t,this.params=(0,y.x)(n),this.priority=r})),R=function(e,t){e.canaryPercentage;var n,r,o=e.canaryRevision,i=e.deployedRevisions;return 0===(null==o?void 0:o.indexOf(t))?"canary":0===(null==i||null===(n=i[0])||void 0===n?void 0:n.indexOf(t))?"main":0===(null==i||null===(r=i[1])||void 0===r?void 0:r.indexOf(t))?"previous":"other"},M=function(e){if(!(e in window))return!1;var t=window[e];return-1!==String(t).indexOf("[native code]")},O=function(){return M("Promise")||M("__nativePromise")?M("fetch")?"modern":"lts":"legacy"},x=function(){return _({url:"".concat(N.Xk,".deploy_status_henson.json"),method:"GET"}).then((function(e){if(200!==e.status&&304!==e.status)throw new Error("could not fetch .deploy_status_henson.json; status=".concat(e.status));return e.json().then((function(t){return t?(0,r.Z)((0,r.Z)({},t||{}),function(e){var t,n,r=e.getResponseHeader("Server");if(!r){if(304!==e.status||!e.getResponseHeader("X-Served-By"))return;r="Fastly"}switch(r){case"Cloudfront":return{cdnName:r,cdnPopDc:null===(t=e.getResponseHeader("X-Amz-Cf-Pop"))||void 0===t?void 0:t.substring(0,3)};case"Fastly":return{cdnName:r,cdnPopDc:null===(n=e.getResponseHeader("X-Served-By"))||void 0===n?void 0:n.split(", ").map((function(e){var t=e.split("-");return t[t.length-1]})).join(", ")};default:return}}(e)):t}))}))},Z=function(){try{var e=(0,u.lE)();return{connection_rtt:e.rtt,connection_downlink:e.downlink,connection_effective_type:e.effectiveType}}catch(e){return{}}},j=function(){function e(t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:T.X;(0,c.Z)(this,e),this.transports=[],this.prefix="",this.deployStatusFetch={state:"initial"},this.queue=[],this.setTransports(t),this.eventCount=0,this.releaseVersion=o,this.baseParams=(0,r.Z)({deploy_status:"unknown",browserClassification:O()},Z()),n&&this.updateParams({running_tests:!0}),this.fetchDeployStatus=x}return(0,s.Z)(e,[{key:"updateParams",value:function(e){(0,E.Z)(this.baseParams,e)}},{key:"getParams",value:function(){return(0,r.Z)({},this.baseParams)}},{key:"setDefaultPrefix",value:function(e){this.prefix=e}},{key:"setTransports",value:function(e){this.transports=e}},{key:"log",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0;if(!u.fL)if("initial"===this.deployStatusFetch.state&&this.fetchAndSetDeployStatus(),"loading"!==this.deployStatusFetch.state){var i=null!==(t=null==o?void 0:o.prefix)&&void 0!==t?t:this.prefix,a=(0,r.Z)((0,r.Z)({event_count:++this.eventCount,timestamp:Date.now(),os:(0,u.d4)(navigator.userAgent),browserFamily:(0,u.gq)(navigator.userAgent),version:this.releaseVersion,event_id:(0,A.Vj)()},this.baseParams),n),c=new I("".concat(i).concat(e),a,null==o?void 0:o.priority);this.transports.forEach((function(e){e.send(c)}))}else this.queue.push([e,n,o])}},{key:"flushQueue",value:function(){for(var e=this.queue.shift();e;)this.log.apply(this,(0,a.Z)(e)),e=this.queue.shift()}},{key:"fetchAndSetDeployStatus",value:function(){var e=this;if(this.fetchDeployStatus){this.deployStatusFetch={state:"loading"},setTimeout((function(){if("loading"===e.deployStatusFetch.state){var t="unable to fetch the deploy status within ".concat(2600," ms");e.deployStatusFetch={state:"failed",errorMessage:t},e.updateParams({deploy_status_fetch_failed:!0,deploy_status_fetch_failed_message:t}),e.flushQueue()}}),2600);var t=Date.now(),n=null;this.fetchDeployStatus().then((function(r){n=Date.now()-t,function(e){var t=e;if("number"!=typeof(null==t?void 0:t.canaryPercentage))throw new Error('"'.concat(e,'" is not a deploy status'))}(r),e.deployStatusFetch={state:"ready",deployStatus:r},e.updateParams({deploy_status:R(r,e.releaseVersion),deploy_status_time_to_fetch_ms:n,deploy_status_fetch_failed:!1,deploy_status_fetch_failed_message:null,cdn_name:r.cdnName,cdn_pop_dc:r.cdnPopDc}),e.flushQueue()})).catch((function(t){e.deployStatusFetch={state:"failed",errorMessage:String(t)},e.updateParams({deploy_status_fetch_failed:!0,deploy_status_fetch_failed_message:String(t)}),e.flushQueue()}))}}}]),e}(),L=null,B=function(e,t,n){(0,l.Qg)(window.location.origin)&&(L||(L=function(){var e=[];e.push(new C({useBatching:!0,maxBatchSize:5}));var t=Boolean(!1);return new j(e,t)}()).setDefaultPrefix("v3_redact."),L.log(e,t,{prefix:n}))},D=[/"ascs_[a-zA-Z0-9]+"/g,/"uscs_[a-zA-Z0-9]+"/g,/"pscs_[a-zA-Z0-9]+"/g],q={network:[function(e){return/\/wallet-config/.test(e.url)},function(e){return/\/consumers\/sessions\/lookup/.test(e.url)},function(e){return/\/consumers\/sessions\/extend/.test(e.url)},function(e){return/\/set-cookie/.test(e.url)},function(e){return/\/networked_accounts/.test(e.url)},function(e){return/\/share_networked_account/.test(e.url)},function(e){return/\/onramp_session\/update/.test(e.url)}],postMessage:[function(e){return"outer"!==e.postMessageType}],logger:[]},F=function(e,t,n){try{if(!function(e){for(var t=q[e.boundaryType],n=0;n1&&void 0!==arguments[1]?arguments[1]:3,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:250;return new p((function(o,i){t().then(o).catch((function(a){1===n?i(a):setTimeout((function(){e(t,n-1,r).then(o,i)}),r)}))}))},f=n(6274).Promise,_=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new f((function(t){return setTimeout(t,e)}))},h=function(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)},y=function(e){return e.replace(/_./g,(function(e){return e[1].toUpperCase()}))};n(3333)},5558:function(e,t,n){"use strict";n.d(t,{To:function(){return i},Vj:function(){return a}});var r="00".concat(Math.floor(1e3*Math.random())).slice(-3),o=0,i=function(e){return"".concat(e).concat(r).concat(o++)},a=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t?(parseInt(t,10)^16*Math.random()>>parseInt(t,10)/4).toString(16):"00000000-0000-4000-8000-000000000000".replace(/[08]/g,e)}},9620:function(e,t,n){"use strict";n.d(t,{Kl:function(){return r.Kl},Tj:function(){return o.T},lO:function(){return r.lO},pF:function(){return r.pF}});var r=n(1834),o=n(7049)},1834:function(e,t,n){"use strict";n.d(t,{Kl:function(){return o},lO:function(){return i},pF:function(){return a}});var r=n(8812),o={live:"live",test:"test",unknown:"unknown"},i=function(e){return e?/^pk_test_/.test(e)?o.test:/^pk_live_/.test(e)?o.live:o.unknown:o.unknown},a=function(e){if(e===o.unknown)throw new r.No("It looks like you're using an older Stripe key. In order to use this API, you'll need to use a modern API key, which is prefixed with 'pk_live_' or 'pk_test_'.\n You can roll your publishable key here: https://dashboard.stripe.com/account/apikeys")}},7049:function(e,t,n){"use strict";n.d(t,{T:function(){return l}});var r=n(8812),o="publishable",i="secret",a="ephemeral",c="restricted",s="unknown",u=function(e){switch(e.split("_",1)[0]){case"pk":return o;case"sk":return i;case"ek":return a;case"rk":return c;default:return s}},l=function(e){if(""===e)throw new r.No("Please call Stripe() with your publishable key. You used an empty string.");switch(u(e)){case i:throw new r.No("You should not use your secret key with Stripe.js.\n Please pass a publishable key instead.");case a:throw new r.No("You should not use an ephemeral key with Stripe.js.\n Please pass a publishable key instead.");case c:throw new r.No("You should not use a restricted key with Stripe.js.\n Please pass a publishable key instead.")}}},6232:function(e,t,n){"use strict";n.d(t,{Q:function(){return a},x:function(){return o}});var r=n(8948),o=function(e){var t={};return function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";Object.keys(n).forEach((function(o){var i="".concat(r,"-").concat(o).replace(/^-/,""),a=n[o];if(null!=a)switch(typeof a){case"object":Array.isArray(a)?t[i]=a.join(" "):e(a,i);break;case"number":case"boolean":case"string":t[i]=a;break;default:t[i]=String(a)}else t[i]=a}))}(e),t},i={account_holder_id:!0,amount:!0,arb_id:!0,controller:!0,controller_init_delay:!0,controller_load_time:!0,cumulative_layout_shift:!0,dom_complete:!0,dom_interactive:!0,dom_loading:!0,duration:!0,eid:!0,elapsed_time:!0,elements_assignment_id:!0,elements_session_id:!0,end:!0,event_count:!0,event_id:!0,event:!0,features:!0,first_contentful_paint:!0,frame_width:!0,funnel_event_elapsed_time:!0,key:!0,largest_contentful_paint:!0,latency:!0,load_timestamp:!0,logger_id:!0,metric_value:!0,navigation_fetch_start:!0,payment_page_id:!0,paymentUserAgent:!0,request_start:!0,resource_timings:!0,response_end:!0,search_session:!0,searchSession:!0,session_id:!0,shownDuration:!0,since_create:!0,since_fetch:!0,since_group_create:!0,since_mount:!0,since_sjs_load:!0,since_stripe_create:!0,since_wrapper_create:!0,since_store:!0,since_link_consumer_session_ready:!0,since_link_default_integration_ready:!0,since_parent_visible:!0,source_id:!0,start_time:!0,start:!0,stripe_create_duration:!0,stripe_js_id:!0,stripe_js_init_duration:!0,stripe_js_load_duration:!0,time_from_confirm_to_poll_start:!0,time_from_pm_to_confirm:!0,time_polling_hook:!0,time_polling_success:!0,time_to_create_pm:!0,time_to_first_byte:!0,time_waiting_on_captcha:!0,timeline:!0,timestamp:!0,timestamps:!0,token_id:!0,until_first_create:!0,until_first_load:!0,until_first_mount:!0,version:!0},a=function(e,t){if("string"==typeof e&&e.length>8e3&&"timeline"!==t)return"";if("string"==typeof e&&e.length>61440&&"timeline"===t)return"";if(0===t.indexOf("resourceTiming["))return e;if(i[t.split("-")[0]])return e;var n=(0,r.vG)(e),o=(0,r.Xd)(n);return(0,r.Og)(o)}},9543:function(e,t,n){"use strict";n(6232)},1939:function(e,t,n){"use strict";n.d(t,{O:function(){return c}});var r=n(4942),o=n(1413),i=n(5671),a=n(3144),c=function(){function e(t){var n=this,a=t.getTarget,c=t.targetOrigin,s=t.messageTag;(0,i.Z)(this,e),this.callbacks=[],this.listen=function(e){0===n.callbacks.length&&window.addEventListener("message",n.handleMessage),n.callbacks.push(e)},this.stopAllListeners=function(){window.removeEventListener("message",n.handleMessage),n.callbacks.length=0},this.postMessage=function(e){if(n.target){var t=(0,o.Z)((0,o.Z)({},e),{},(0,r.Z)({},n.MESSAGE_TAG,!0));n.target.postMessage(t,n.targetOrigin)}},this.handleMessage=function(e){n.isValidPopupMessageEvent(e)&&n.callbacks.forEach((function(t){return t(e.data,e.origin)}))},this.getTarget=a,this.targetOrigin=c,this.MESSAGE_TAG=s}return(0,a.Z)(e,[{key:"target",get:function(){return this.getTarget()}},{key:"isValidPopupMessageEvent",value:function(e){return("*"===this.targetOrigin||e.origin===this.targetOrigin)&&e.source===this.target&&e.data&&"object"==typeof e.data&&this.MESSAGE_TAG in e.data}}]),e}()},8070:function(e,t,n){"use strict";n.d(t,{J:function(){return i},c:function(){return o}});var r=function(e){for(var t="",n=0;n")},p=function(e){return i(e).replace(new RegExp(c,"gi"),"$1")},m=function(e){return i(e).replace(new RegExp(s,"gi"),"$1_")},f=function(e){if(!e||"object"!=typeof e||!e.type&&!e.code)return e;var t=function(t){return e[t]&&"string"==typeof e[t]?(0,o.Z)({},"".concat(t,"_id"),e[t]):e[t]&&"object"==typeof e[t]&&"string"==typeof e[t].id?(0,o.Z)({},"".concat(t,"_id"),e[t].id):null};return(0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)({type:e.type,code:e.code,param:e.param},t("payment_intent")),t("setup_intent")),t("payment_method")),t("source"))}},2690:function(e,t,n){"use strict";n.d(t,{r:function(){return i}});var r=n(6835),o=n(6274).Promise,i=function(e){var t=0,n=[];return{acquire:function(){if(t0&&t1&&void 0!==arguments[1]?arguments[1]:{},r=n.maxDepth,o=void 0===r?Number.POSITIVE_INFINITY:r,i=n.useToJSON,a=void 0===i||i;return"object"==typeof e&&null!==e?h({from:e,seen:[],forceEnumerable:!0,maxDepth:o,depth:0,useToJSON:a,serialize:!0}):"function"==typeof e?"[Function: ".concat(null!==(t=e.name)&&void 0!==t?t:"anonymous","]"):e}function o(e){return Boolean(e)&&"object"==typeof e&&"name"in e&&"message"in e&&"stack"in e}n.d(t,{Xy:function(){return r}});var i=n(9062),a=n(5671),c=n(3144),s=n(136),u=n(9388),l=n(7112),d=[EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError,window.DOMException].filter(Boolean).map((function(e){return[e.name,e]})),p=new Map(d),m=(Error,[{property:"name",enumerable:!1},{property:"message",enumerable:!1},{property:"stack",enumerable:!1},{property:"code",enumerable:!0},{property:"cause",enumerable:!1}]),f=Symbol(".toJSON was called"),_=function(e){var t;return null!==(t=p.get(e))&&void 0!==t?t:Error},h=function e(t){var n=t.from,r=t.seen,a=t.to,c=t.forceEnumerable,s=t.maxDepth,u=t.depth,l=t.useToJSON,d=t.serialize;if(!a)if(Array.isArray(n))a=[];else if(!d&&o(n)){a=new(_(n.name))}else a={};if(r.push(n),u>=s)return a;if(l&&"function"==typeof n.toJSON&&!0!==n[f])return function(e){e[f]=!0;var t=e.toJSON();return delete e[f],t}(n);for(var p=function(t){return e({from:t,seen:(0,i.Z)(r),forceEnumerable:c,maxDepth:s,depth:u,useToJSON:l,serialize:d})},h=0,y=Object.keys(n);h=0))if(2===o.length)if(n=decodeURIComponent(o[1]),u)for(;c<=u;c++){if(i=""===s[c]?a.length:s[c],!r(a,i)&&a[i])return;a[i]=c0?window.location.ancestorOrigins[window.location.ancestorOrigins.length-1]:document.referrer?new URL(document.referrer).origin:null},s=function(){try{if(window.top!==window.self)return c()||void 0}catch(e){}},u=function(){try{return window.self!==window.top}catch(e){return!1}}},4469:function(e,t,n){"use strict";n.d(t,{q:function(){return o}});var r=n(9062),o=function e(t,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(o>20)return"";var i=[];return Object.keys(t).forEach((function(a){var c=t[a],s=n?"".concat(n,"[").concat(a,"]"):a;if(c&&"object"==typeof c){var u=e(c,s,o+1);""!==u&&(i=[].concat((0,r.Z)(i),[u]))}else null!=c&&(i=[].concat((0,r.Z)(i),["".concat(s,"=").concat(encodeURIComponent(String(c)))]))})),i.join("&").replace(/%20/g,"+")}},3745:function(e,t,n){"use strict";n.d(t,{Ds:function(){return i},P$:function(){return a},kg:function(){return c},sD:function(){return o},v_:function(){return s},w0:function(){return u}});var r=/^(http(s)?):\/\//,o=function(e){return r.test(e)},i=function(e){if(!o(e))return null;var t;try{t=new URL(e)}catch(n){(t=document.createElement("a")).href=e}var n=t.protocol,r=t.host,i=t.pathname,a=t.hash,c=/:80$/,s=/:443$/;return"http:"===n&&c.test(r)?r=r.replace(c,""):"https:"===n&&s.test(r)&&(r=r.replace(s,"")),{host:r,protocol:n,origin:"".concat(n,"//").concat(r),pathname:i,hash:a}},a=function(e){var t=i(e);return t?t.origin:null},c=function(e){var t=a(e);if(!t)throw new Error('Invalid URL: "'.concat(e,'"'));return t},s=function(e,t){if("/"===t[0]){var n=i(e);return n?"".concat(n.origin).concat(t):t}var r=e.replace(/\/[^/]*$/,"/");return"".concat(r).concat(t)},u=function(e){return e.split("?")[0].split("#")[0]}},2580:function(e,t,n){"use strict";n.d(t,{Rz:function(){return s}});var r=n(3144),o=n(5671),i=n(136),a=n(9388),c=n(7112),s=function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"absurd";throw new Error(e)};Error},4693:function(e,t,n){"use strict";n.d(t,{Sl:function(){return o}});var r=new RegExp("^(?:4[0-9]{15}|(?:5[1-5]|2[2-7])[0-9]{14}|3[47][0-9]{13}|6[045][0-9]{14}|3[089][0-9]{14}|36[0-9]{12}|35[0-9]{14}|(?:62|81)[0-9]{11,}|(?:50|63)[0-9]{14})$"),o=function(e){if("string"!=typeof e)return!1;var t=e.replace(/[\s-]+/g,"").match(/\d{13,}/g);return!!t&&t.some((function(e){return r.test(e)&&function(e){for(var t="0".charCodeAt(0),n=e.length%2,r=0,o=e.length-1;o>=0;--o){var i=o%2===n,a=e.charCodeAt(o)-t;i&&(a*=2),a>9&&(a-=9),r+=a}return r%10==0}(e)}))}},9605:function(e,t,n){"use strict";n.d(t,{MO:function(){return c},oQ:function(){return a},rX:function(){return i}});var r=n(7974),o=(0,r.p5)("an Element",{_componentName:r.Z_,_groupId:r.Z_,_implementation:(0,r.mC)({_frame:(0,r.mC)({id:r.Z_})})}),i=function(e){var t=(0,r.ld)(o,e,"");return"error"===t.type?null:t.value},a=(0,r.p5)("an Elements group",{_elements:(0,r.CT)(o),_id:r.Z_,_isSubmitting:r.Xg,_commonOptions:(0,r.$N)({paymentMethodCreation:(0,r.jt)((0,r.kw)("manual")),payment_method_types:(0,r.jt)((0,r.AG)((0,r.CT)(r.Z_))),paymentMethodTypes:(0,r.jt)((0,r.AG)((0,r.CT)(r.Z_))),clientSecret:(0,r.jt)((0,r.AG)((0,r.$N)({id:r.Z_,clientSecret:r.Z_,type:r.Z_}))),mode:(0,r.jt)((0,r.AG)(r.Z_))}),_controller:(0,r.$N)({_id:r.Z_})}),c=function(e){var t=(0,r.ld)(a,e,"");return"error"===t.type?null:t.value}},1873:function(e,t,n){"use strict";n.d(t,{$3:function(){return a.$3},AG:function(){return a.AG},Ao:function(){return a.Ao},Bi:function(){return a.Bi},CT:function(){return a.CT},Ec:function(){return a.Ec},Fy:function(){return a.Fy},Gu:function(){return a.Gu},HM:function(){return a.HM},Kr:function(){return a.Kr},M2:function(){return a.M2},M4:function(){return a.M4},MO:function(){return o.MO},MZ:function(){return a.MZ},NM:function(){return a.NM},NQ:function(){return a.NQ},O:function(){return a.O},RH:function(){return a.RH},Rx:function(){return a.Rx},Ry:function(){return a.Ry},Rz:function(){return r.Rz},Sl:function(){return c.Sl},TX:function(){return a.TX},Wc:function(){return a.Wc},Xg:function(){return a.Xg},Z_:function(){return a.Z_},cV:function(){return a.cV},ci:function(){return a.ci},gy:function(){return a.gy},hN:function(){return a.hN},ig:function(){return a.ig},jt:function(){return a.jt},kG:function(){return i.k},kw:function(){return a.kw},ld:function(){return a.ld},mC:function(){return a.mC},n2:function(){return a.n2},oQ:function(){return o.oQ},or:function(){return a.or},p3:function(){return a.p3},rS:function(){return a.rS},rX:function(){return o.rX},ui:function(){return a.ui},uw:function(){return a.uw},uz:function(){return a.uz},x4:function(){return a.x4},xe:function(){return a.xe},yv:function(){return a.yv},z$:function(){return a.z$},zS:function(){return a.zS}});var r=n(2580),o=n(9605),i=n(9096),a=n(7974),c=n(4693)},9096:function(e,t,n){"use strict";function r(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o1&&void 0!==arguments[1]?arguments[1]:[];return{type:"valid",value:e,warnings:t}},_=function(e){return{error:e,errorType:"full",type:"error"}},h=function(e,t,n,r){var o=new i.No(m(e,t,n,r));return _(o)},y=function(e,t,n,r){return{expected:e,actual:function(e,t){var n=typeof e;switch(n){case"undefined":case"boolean":return"".concat(e);case"object":if(!e)return"".concat(e);var r=Object.keys(e);if(0===r.length)return JSON.stringify(e);if(t)return"object with keys: [".concat(r,"]");try{return JSON.stringify(e)}catch(e){return"object with keys: [".concat(r,"]")}default:var o="".concat(e);return t&&(o="".concat(n,": ").concat(function(e){if(e.length<=3)return"[redacted]";var t=e[0],n=e[e.length-1];return t+"*".repeat(e.length-2)+n}(o))),o}}(t,!p.every((function(e){return-1===r.indexOf(e)}))||!d.every((function(e){return-1===n.label.indexOf(e)}))),options:n,errorType:"mismatch",type:"error",path:r}},v=function(e,t){return[].concat((0,o.Z)(e),[t])},g=function(e){return function(t,n,r){return void 0===t?f(t):e(t,n,r)}},b=function(e){return function(t,n,r){return null===t?f(t):e(t,n,r)}},w=function(e,t){return function(n,r,o){var a=function(e){var t=e.path.join(".")||"value";return{error:"".concat(t," should be ").concat(e.expected),actual:"".concat(t," as ").concat(e.actual)}},c=function(e,t,n){return _(new i.No("Invalid value for ".concat(e,": ").concat(t,". You specified ").concat(n,".")))},s=e(n,r,o),u=t(n,r,o);if("error"===s.type&&"error"===u.type){if("mismatch"===s.errorType&&"mismatch"===u.errorType){var l=a(s),d=l.error,p=l.actual,m=a(u),f=m.error,h=m.actual;return c(r.label,d===f?d:"".concat(d," or ").concat(f),p===h?p:"".concat(p," and ").concat(h))}if("mismatch"===s.errorType){var y=a(s),v=y.error,g=y.actual;return c(r.label,v,g)}if("mismatch"===u.errorType){var b=a(u),w=b.error,k=b.actual;return c(r.label,w,k)}return _(s.error)}return"valid"===s.type?s:u}},k=function(e,t){return function(n,r,o){return n instanceof e?f(n):y("a ".concat(t," instance"),n,r,o)}},S=function(e,t){return function(n,r,o){var i=(0,a.sE)(e,(function(e){return e===n}));if(void 0===i){var c=t?"a recognized string":"one of the following strings: ".concat(e.join(", "));return y(c,n,r,o)}return f(i)}},P=function(e){return function(t,n,r){return"string"==typeof t&&0===t.indexOf(e)?f(t):y("a string starting with ".concat(e),t,n,r)}},C=function(e,t){return function(n,r,o){return"string"==typeof n&&n.length>=e&&n.length<=t?f(n):y(e===t?"a string of ".concat(e," characters"):"a string with ".concat(e," to ").concat(t," characters"),n,r,o)}},E=function(){for(var e=arguments.length,t=new Array(e),n=0;n=e&&a<=t?f(a):y("a number from ".concat(e," to ").concat(t),n,r,o)}},L=function(e){return function(t,n,r){var o=R(t,n,r);if("error"===o.type)return o;var i=Number(o.value);return"string"==typeof t&&i>e?f(i):y("a number greater than ".concat(e),t,n,r)}},B=function(e){return function(t,n,r){var o=R(t,n,r);if("error"===o.type)return o;var i=Number(o.value);return"string"==typeof t&&i>=e?f(i):y("a number greater than or equal to ".concat(e),t,n,r)}},D=function(e,t){return function(n,r,o){return"number"==typeof n&&n>=e&&n<=t?f(n):y("a number from ".concat(e," to ").concat(t),n,r,o)}},q=function(e){return function(t,n,r){return"number"==typeof t&&t>e?f(t):y("a number greater than ".concat(e),t,n,r)}},F=function(e){return function(t,n,r){return"number"==typeof t&&t>=e?f(t):y("a number greater than or equal to ".concat(e),t,n,r)}},U=function(e,t){return function(n,r,o){return n===e?f(e):y(t||String(e),n,r,o)}},G=function(e){return function(t,n,r){return"number"==typeof t&&t===parseInt(t,10)&&(!e||t>=0)?f(t):y(e?"a positive amount in the currency's subunit":"an amount in the currency's subunit",t,n,r)}},z=function(e,t,n){return G(!1)(e,t,n)},H=function(e,t,n){return G(!0)(e,t,n)},K=function e(t,n,r){if(t){if("string"==typeof t)try{var o=new Date(t);if("object"==typeof o&&o.toISOString()===t)return e(o,n,r)}catch(e){}if("object"==typeof t){var i=t;if("function"==typeof i.getTime&&i.getTime()>=Date.now()-1e3)return f(i)}}return y("a future Date",t,n,r)},Y=function(e,t,n){return e&&"object"==typeof e?f(e):y("an object",e,t,n)},W=function(e,t,n){return"function"==typeof e?f(e):y("function",e,t,n)},V=function(e){return function(t,n,r){return Array.isArray(t)?t.map((function(t,o){return e(t,n,v(r,String(o)))})).reduce((function(e,t){return"error"===e.type?e:"error"===t.type?t:f([].concat((0,o.Z)(e.value),[t.value]),[].concat((0,o.Z)(e.warnings),(0,o.Z)(t.warnings)))}),f([])):y("array",t,n,r)}},X=function(e,t){return function(n,r,o){var i=V(e)(n,r,o);return"error"===i.type?i:i.value.length1&&void 0!==arguments[1]?arguments[1]:{},n=t.unrecognizedKeyBehavior,c=t.name;return function(t,s,u){var l=null!=n?n:"warn";if(t&&"object"==typeof t&&!Array.isArray(t)){var d=t,p=(0,a.sE)(Object.keys(d),(function(t){return!e[t]}));if(p&&"error"===l)return _(new i.No("Invalid ".concat(s.label," parameter: ").concat([].concat((0,o.Z)(u),[p]).join(".")," is not an accepted parameter.")));var m=Object.keys(d),h=f("passthrough"===l?(0,r.Z)({},t):{});return p&&"warn"===l&&(h=m.reduce((function(t,n){return e[n]?t:f(t.value,[].concat((0,o.Z)(t.warnings),["Unrecognized ".concat(s.label," parameter: ").concat([].concat((0,o.Z)(u),[n]).join(".")," is not a recognized parameter. This may cause issues with your integration in the future.")]))}),h)),Object.keys(e).reduce((function(n,r){if("error"===n.type)return n;var o=(0,e[r])(d[r],s,v(u,r));return"valid"===o.type&&void 0!==o.value?(n.value[r]=o.value,o.warnings.forEach((function(e){n.warnings.push(e)})),n):"valid"===o.type?(o.warnings.forEach((function(e){n.warnings.push(e)})),n):c?y(c,t,s,u):o}),h)}return y(null!=c?c:"an object",t,s,u)}},te=function(e){return ee(e,{unrecognizedKeyBehavior:"warn"})},ne=function(e){return ee(e,{unrecognizedKeyBehavior:"error"})},re=function(e,t){return ee(t,{unrecognizedKeyBehavior:"ignore",name:e})},oe=function(e){return ee(e,{unrecognizedKeyBehavior:"ignore"})},ie=function(e){return ee(e,{unrecognizedKeyBehavior:"passthrough"})},ae=function(e,t,n,r){var o=r||{},a=o.path||[],c=e(t,{authenticatedOrigin:o.authenticatedOrigin||"",element:o.element||"",label:n},a);return"valid"===c.type||"full"===c.errorType?c:{type:"error",errorType:"full",error:new i.No(m(c.expected,c.actual,c.options,c.path))}},ce=function(e,t,n,r){var o=ae(e,t,n,r);switch(o.type){case"valid":return{value:o.value,warnings:o.warnings};case"error":throw o.error;default:return(0,l.Rz)(o)}}},925:function(e,t,n){"use strict";n.d(t,{CF:function(){return c},Jt:function(){return f},KC:function(){return a},NX:function(){return m},Nb:function(){return o},PS:function(){return s},Pp:function(){return l},SZ:function(){return p},Xd:function(){return u},et:function(){return i},kE:function(){return d},zc:function(){return _}});var r=n(1413),o=["ready","focus","blur","escape"],i="StripeElement",a={margin:"0",padding:"0",border:"none",display:"block",background:"transparent",position:"relative",opacity:"1"},c={height:"2px",margin:"-4px",width:"calc(100% + 8px)"},s={position:"fixed",top:"0",right:"0",bottom:"0",left:"0","z-index":"9999999"},u=300,l={position:"absolute",top:"0",right:"0",bottom:"0",left:"0","z-index":"1",background:"rgba(0,0,0,.75)",opacity:"0","will-change":"transform",transition:"opacity ".concat(u,"ms ease")},d=(0,r.Z)((0,r.Z)({},l),{},{opacity:"1"}),p={"align-items":"center",display:"flex","flex-direction":"column",position:"relative",top:"50%",left:"50%",transform:"translate(-50%, -50%)","-webkit-transform":"translate(-50%, -50%)"},m={color:"#fff","margin-top":"24px","padding-right":"28px","padding-left":"28px","text-align":"center"},f={"max-width":"430px"},_={addressLine:[],country:"",postalCode:"",recipient:"",region:"",city:"",phone:"",sortingCode:"",dependentLocality:"",organization:""}},2496:function(e,t,n){"use strict";n.d(t,{C:function(){return l}});var r=n(1413),o=n(4200),i=n(3550),a=n(925),c=n(4417),s=n(6274).Promise,u=function(e,t){setTimeout(t,e+16)},l=function(e,t,n){var c={unmounted:!1,restoreScroll:function(){},restoreFocus:function(){return s.resolve()}},l=(0,o.Xq)(),p=document.createElement("div");(0,o.yq)(p,a.PS);var m=document.createElement("div");(0,o.yq)(m,a.Pp);var f=document.createElement("div"),_=document.createTextNode(t);f.appendChild(_),(0,o.yq)(f,(0,r.Z)((0,r.Z)((0,r.Z)({},a.NX),l.clientWidth>400?a.Jt:{}),n));var h=document.createElement("div");h.appendChild(d(e)),h.appendChild(f),(0,o.yq)(h,a.SZ),m.appendChild(h),p.appendChild(m);return{mount:(0,i.$M)((function(){c.restoreScroll=(0,o.MV)();var e=(0,o.W3)(null),t=e.lockedPromise,n=e.lockedElements;c.restoreFocus=function(){return(0,o.gl)(t,n)},l.appendChild(p),(0,o.Ql)((function(){new s((function(e){(0,o.yq)(m,a.kE),u(a.Xd,e)}))}))})),unmount:function(){return c.unmounted?s.resolve():(c.unmounted=!0,c.restoreScroll(),new s((function(e){(0,o.yq)(m,a.Pp),u(a.Xd,e)})).then((function(){l.removeChild(p)})),c.restoreFocus())}}},d=function(e){if((0,c.r2)(e))return document.createElementNS("http://www.w3.org/2000/svg","svg");switch(e){case"paypal":return function(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.style.verticalAlign="middle",e.setAttributeNS(null,"width","149"),e.setAttributeNS(null,"height","37"),e.setAttributeNS(null,"viewBox","0 0 ".concat("149"," 37")),e.setAttributeNS(null,"role","presentation"),e.setAttributeNS(null,"fill","none");var t=document.createElementNS("http://www.w3.org/2000/svg","g");t.setAttributeNS(null,"clip-path","url(#a)");var n=document.createElementNS("http://www.w3.org/2000/svg","path");n.setAttributeNS(null,"fill","#fff"),n.setAttributeNS(null,"d","M55.673 7.515h-7.809c-.534 0-.988.43-1.072 1.013l-3.158 22.155c-.063.438.243.832.644.832h3.728c.534 0 .989-.43 1.072-1.015l.852-5.976c.082-.584.538-1.014 1.07-1.014h2.472c5.144 0 8.113-2.754 8.888-8.212.35-2.388.015-4.264-.996-5.578-1.11-1.442-3.078-2.205-5.691-2.205Zm.9 8.091c-.426 3.1-2.567 3.1-4.637 3.1h-1.178l.826-5.79c.05-.35.323-.607.643-.607h.54c1.41 0 2.74 0 3.427.89.41.53.536 1.318.38 2.408ZM80.633 14.77h-4.198a.733.733 0 0 0-.722.62l-.185 1.183-.294-.429c-.909-1.328-2.935-1.772-4.958-1.772-4.638 0-8.6 3.538-9.372 8.5-.401 2.475.17 4.842 1.564 6.493 1.279 1.518 3.11 2.15 5.287 2.15 3.738 0 5.81-2.42 5.81-2.42l-.187 1.175c-.07.449.273.851.72.851h3.782a1.22 1.22 0 0 0 1.203-1.036l2.269-14.466a.731.731 0 0 0-.72-.85Zm-5.851 8.226c-.406 2.415-2.309 4.035-4.737 4.035-1.219 0-2.193-.393-2.818-1.14-.62-.74-.856-1.794-.659-2.969.378-2.394 2.314-4.068 4.704-4.068 1.192 0 2.161.4 2.8 1.152.64.76.893 1.82.71 2.99ZM101.264 16.086h-3.923c-.374 0-.726.188-.938.502l-5.41 8.042-2.294-7.728a1.137 1.137 0 0 0-1.087-.816h-3.855a.685.685 0 0 0-.644.907l4.32 12.796-4.062 5.786a.686.686 0 0 0 .555 1.083h3.918c.371 0 .72-.183.93-.49l13.048-19.005c.312-.455-.009-1.077-.558-1.077ZM113.992 7.515h-7.81c-.533 0-.988.43-1.071 1.013l-3.158 22.155c-.063.438.243.832.641.832h4.008c.372 0 .691-.301.749-.71l.896-6.28c.082-.585.538-1.015 1.071-1.015h2.471c5.145 0 8.112-2.754 8.889-8.212.35-2.388.014-4.264-.997-5.578-1.109-1.442-3.076-2.205-5.689-2.205Zm.9 8.091c-.425 3.1-2.566 3.1-4.638 3.1h-1.177l.828-5.79c.049-.35.321-.607.642-.607h.54c1.409 0 2.74 0 3.427.89.41.53.535 1.318.378 2.408ZM138.947 14.77h-4.196a.728.728 0 0 0-.72.62l-.186 1.183-.295-.429c-.909-1.328-2.934-1.772-4.957-1.772-4.639 0-8.599 3.538-9.371 8.5-.4 2.475.168 4.842 1.562 6.493 1.282 1.518 3.11 2.15 5.288 2.15 3.738 0 5.81-2.42 5.81-2.42l-.187 1.175c-.07.449.273.851.723.851h3.78a1.22 1.22 0 0 0 1.203-1.036l2.27-14.466a.735.735 0 0 0-.724-.85Zm-5.852 8.226c-.402 2.415-2.308 4.035-4.736 4.035-1.217 0-2.193-.393-2.819-1.14-.62-.74-.854-1.794-.659-2.969.381-2.394 2.314-4.068 4.704-4.068 1.193 0 2.162.4 2.8 1.152.642.76.896 1.82.71 2.99ZM143.076 8.124l-3.388 22.56c-.066.436.257.83.679.83h3.406c.566 0 1.046-.429 1.133-1.014l3.341-22.153c.067-.437-.257-.832-.678-.832h-3.814a.7.7 0 0 0-.679.609ZM8.447 34.943l.65-4.048-1.447-.033H.744L5.544.984a.393.393 0 0 1 .39-.326h11.643c3.866 0 6.533.79 7.926 2.348.653.732 1.069 1.496 1.27 2.337.211.882.215 1.937.009 3.222l-.015.094v.824l.653.363c.55.287.987.615 1.322.99.559.625.92 1.42 1.072 2.362.158.97.106 2.122-.152 3.428-.298 1.501-.78 2.809-1.43 3.88a8.035 8.035 0 0 1-2.266 2.437c-.864.602-1.89 1.059-3.051 1.351-1.125.288-2.407.433-3.813.433h-.907c-.648 0-1.277.23-1.771.64a2.68 2.68 0 0 0-.924 1.619l-.068.364-1.147 7.136-.052.262c-.014.083-.037.125-.072.153a.194.194 0 0 1-.12.042H8.448Z"),t.appendChild(n);var r=document.createElementNS("http://www.w3.org/2000/svg","path");r.setAttributeNS(null,"fill","#BFBFBF"),r.setAttributeNS(null,"d","M26.996 9.229c-.032.218-.07.441-.11.67-1.423 7.739-6.29 10.412-12.507 10.412h-3.165c-.76 0-1.4.585-1.52 1.38l-1.62 10.888-.459 3.087c-.077.521.303.992.8.992h5.613c.665 0 1.23-.512 1.335-1.207l.055-.302 1.057-7.106.068-.39c.103-.697.669-1.209 1.334-1.209h.84c5.438 0 9.696-2.34 10.94-9.11.52-2.828.251-5.19-1.125-6.85a5.42 5.42 0 0 0-1.536-1.255Z"),t.appendChild(r);var o=document.createElementNS("http://www.w3.org/2000/svg","path");o.setAttributeNS(null,"fill","#fff"),o.setAttributeNS(null,"d","M26.565 8.059a12.448 12.448 0 0 0-1.509-.327c-.93-.147-1.95-.217-3.043-.217h-9.22c-.228 0-.444.05-.637.14a1.44 1.44 0 0 0-.818 1.076L9.377 20.875l-.057.354c.13-.8.828-1.388 1.657-1.388h3.452c6.78 0 12.087-2.69 13.639-10.475.046-.23.085-.455.12-.674a8.376 8.376 0 0 0-1.275-.526c-.113-.037-.23-.073-.348-.107Z"),t.appendChild(o);var i=document.createElementNS("http://www.w3.org/2000/svg","path");i.setAttributeNS(null,"fill","#fff"),i.setAttributeNS(null,"d","M12.125 9.512a1.35 1.35 0 0 1 .771-1.007 1.42 1.42 0 0 1 .6-.132H22.2c1.03 0 1.993.065 2.871.203a11.81 11.81 0 0 1 1.753.406c.433.14.834.304 1.204.494.436-2.7-.003-4.538-1.505-6.202-1.656-1.832-4.645-2.616-8.47-2.616H6.949c-.78 0-1.447.552-1.568 1.303L.756 30.443c-.091.563.356 1.072.941 1.072h6.855l1.721-10.61 1.852-11.393Z"),t.appendChild(i);var a=document.createElementNS("http://www.w3.org/2000/svg","defs"),c=document.createElementNS("http://www.w3.org/2000/svg","clipPath");c.setAttributeNS(null,"id","a");var s=document.createElementNS("http://www.w3.org/2000/svg","path");return s.setAttributeNS(null,"fill","#fff"),s.setAttributeNS(null,"d","M.744.658h147.512v36H.744z"),c.appendChild(s),a.appendChild(c),e.appendChild(t),e.appendChild(a),e}();case"google_pay":return function(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.style.verticalAlign="middle",e.setAttributeNS(null,"width","95"),e.setAttributeNS(null,"height","51"),e.setAttributeNS(null,"viewBox","0 0 ".concat("95"," 51")),e.setAttributeNS(null,"role","presentation"),e.setAttributeNS(null,"fill","none");var t=document.createElementNS("http://www.w3.org/2000/svg","path");t.setAttributeNS(null,"fill","#fff"),t.setAttributeNS(null,"d","M69.734.562H25.266C11.37.562 0 11.855 0 25.658 0 39.46 11.37 50.754 25.266 50.754h44.468C83.63 50.754 95 39.46 95 25.658 95 11.855 83.63.562 69.734.562Z"),e.appendChild(t);var n=document.createElementNS("http://www.w3.org/2000/svg","path");n.setAttributeNS(null,"fill","#3C4043"),n.setAttributeNS(null,"d","M69.734 2.594c3.12 0 6.152.615 9.007 1.82a23.432 23.432 0 0 1 7.39 4.956 23.118 23.118 0 0 1 4.99 7.34 22.636 22.636 0 0 1 1.833 8.948c0 3.099-.62 6.11-1.832 8.946a23.258 23.258 0 0 1-4.99 7.34 23.291 23.291 0 0 1-7.39 4.957 23.055 23.055 0 0 1-9.008 1.82H25.266c-3.12 0-6.152-.615-9.007-1.82a23.432 23.432 0 0 1-7.39-4.956 23.116 23.116 0 0 1-4.99-7.34 22.634 22.634 0 0 1-1.832-8.947c0-3.1.619-6.111 1.831-8.947a23.257 23.257 0 0 1 4.99-7.34 23.29 23.29 0 0 1 7.39-4.957 23.055 23.055 0 0 1 9.008-1.82h44.468Zm0-2.032H25.266C11.37.562 0 11.855 0 25.658 0 39.46 11.37 50.754 25.266 50.754h44.468C83.63 50.754 95 39.46 95 25.658 95 11.855 83.63.562 69.734.562Z"),e.appendChild(n);var r=document.createElementNS("http://www.w3.org/2000/svg","path");r.setAttributeNS(null,"fill","#3C4043"),r.setAttributeNS(null,"d","M45.403 27.44v7.59h-2.425V16.285h6.43c1.63 0 3.019.54 4.156 1.619 1.162 1.079 1.743 2.397 1.743 3.953 0 1.593-.58 2.91-1.743 3.977-1.124 1.067-2.514 1.594-4.156 1.594h-4.005v.012Zm0-8.847v6.538h4.055c.96 0 1.769-.327 2.4-.967.645-.64.973-1.418.973-2.296 0-.866-.328-1.631-.973-2.271-.631-.665-1.427-.991-2.4-.991h-4.055v-.013ZM61.649 21.78c1.794 0 3.209.477 4.245 1.43 1.036.954 1.553 2.26 1.553 3.916v7.905h-2.311v-1.782h-.101c-.998 1.468-2.337 2.196-4.005 2.196-1.428 0-2.615-.414-3.575-1.255-.96-.84-1.44-1.882-1.44-3.137 0-1.33.505-2.384 1.516-3.162 1.01-.79 2.362-1.18 4.042-1.18 1.44 0 2.628.264 3.55.791v-.552c0-.84-.328-1.543-.998-2.133a3.437 3.437 0 0 0-2.35-.878c-1.351 0-2.425.564-3.209 1.706l-2.135-1.33c1.175-1.694 2.919-2.535 5.218-2.535Zm-3.133 9.31c0 .628.265 1.155.809 1.57.53.414 1.162.627 1.882.627 1.023 0 1.933-.377 2.728-1.13.796-.752 1.2-1.63 1.2-2.647-.757-.59-1.806-.891-3.158-.891-.985 0-1.806.238-2.463.703-.67.489-.998 1.079-.998 1.769ZM80.636 22.194l-8.085 18.471h-2.5l3.006-6.462-5.331-12.009h2.64l3.84 9.21h.05l3.74-9.21h2.64Z"),e.appendChild(r);var o=document.createElementNS("http://www.w3.org/2000/svg","path");o.setAttributeNS(null,"fill","#4285F4"),o.setAttributeNS(null,"d","M35.756 25.908c0-.785-.07-1.537-.202-2.26H25.387v4.141l5.855.002a4.98 4.98 0 0 1-2.173 3.335v2.686h3.486c2.035-1.87 3.2-4.636 3.2-7.904Z"),e.appendChild(o);var i=document.createElementNS("http://www.w3.org/2000/svg","path");i.setAttributeNS(null,"fill","#34A853"),i.setAttributeNS(null,"d","M29.07 31.126c-.97.65-2.22 1.03-3.681 1.03-2.824 0-5.22-1.89-6.077-4.437h-3.595v2.77a10.83 10.83 0 0 0 9.672 5.921c2.923 0 5.379-.955 7.166-2.599l-3.485-2.685Z"),e.appendChild(i);var a=document.createElementNS("http://www.w3.org/2000/svg","path");a.setAttributeNS(null,"fill","#FABB05"),a.setAttributeNS(null,"d","M18.974 25.664c0-.716.12-1.407.339-2.057v-2.77h-3.596a10.635 10.635 0 0 0-1.15 4.827c0 1.736.415 3.375 1.15 4.827l3.596-2.77a6.444 6.444 0 0 1-.339-2.057Z"),e.appendChild(a);var c=document.createElementNS("http://www.w3.org/2000/svg","path");return c.setAttributeNS(null,"fill","#E94235"),c.setAttributeNS(null,"d","M25.389 19.17c1.595 0 3.024.546 4.152 1.613l3.089-3.066c-1.876-1.735-4.322-2.8-7.241-2.8-4.229 0-7.891 2.409-9.672 5.92l3.595 2.77c.858-2.547 3.253-4.437 6.077-4.437Z"),e.appendChild(c),e}();case"klarna":return function(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.style.verticalAlign="middle",e.setAttributeNS(null,"width","49"),e.setAttributeNS(null,"height","49"),e.setAttributeNS(null,"viewBox","135 110 340 389"),e.setAttributeNS(null,"fill","none");var t=document.createElementNS("http://www.w3.org/2000/svg","path");return t.setAttributeNS(null,"d","M439.675 110H355.227C355.227 179.464 312.727 241.704 248.149 286.161L222.76 303.944V110H135V499H222.76V306.167L367.922 499H475L335.357 314.503C398.831 268.379 440.227 196.691 439.675 110Z"),t.setAttributeNS(null,"fill","#F9F8F5"),e.appendChild(t),e}();default:return document.createElementNS("http://www.w3.org/2000/svg","svg")}}},7030:function(e,t,n){"use strict";n.d(t,{Kb:function(){return s},Nb:function(){return d},P0:function(){return p},et:function(){return l},tk:function(){return u}});var r,o=n(4942),i=n(4716),a=n(942),c=n(1925),s="".concat(i.A2,"-input"),u=("".concat(i.A2,"-inputAfter"),"".concat(i.A2,"-safariInput")),l="StripeElement",d=["focus","blur","escape","change","loaderstart"],p=(r={},(0,o.Z)(r,a.Yj.linkAuthentication,c.NC.LINK_AUTHENTICATION_ELEMENT),(0,o.Z)(r,a.Yj.payment,c.NC.PAYMENT_ELEMENT),(0,o.Z)(r,a.Yj.shippingAddress,c.NC.ADDRESS_ELEMENT),(0,o.Z)(r,a.Yj.address,c.NC.ADDRESS_ELEMENT),(0,o.Z)(r,a.Yj.autocompleteSuggestions,c.NC.AUTOCOMPLETE_SUGGESTIONS_ELEMENT),(0,o.Z)(r,a.Yj.achBankSearchResults,c.NC.ACH_BANK_SEARCH_RESULTS_ELEMENT),(0,o.Z)(r,a.Yj.paymentMethodMessaging,c.NC.PAYMENT_METHOD_MESSAGING_ELEMENT),r)},9144:function(e,t,n){"use strict";n.d(t,{KC:function(){return r},ZS:function(){return o}});var r={margin:"0",padding:"0",border:"none",display:"block",background:"transparent",position:"relative",opacity:"1",clear:"both"},o={border:"none",display:"block",position:"absolute",height:"1px",top:"-1px",left:"0",padding:"0",margin:"0",width:"100%",opacity:"0",background:"transparent","pointer-events":"none","font-size":"16px"}},7779:function(e,t,n){"use strict";var r,o,i,a=n(1413),c=n(9062),s=n(5671),u=n(3144),l=n(4942),d=n(5987),p=n(7462),m=n(2963),f=n(7326),_=n(136),h=n(9388),y=n(1873),v=n(5558),g=n(4200),b=n(3333),w=n(6617),k=n(5749),S=n(1765),P=n(2024),C=n(8812),E=n(2826),A=n(942),N=function(e,t){var n=e.reduce((function(e,n){var r=function(e,t){var n=e.indexOf(":");if(-1===n)throw new C.No("Invalid css declaration in file from ".concat(t,': "').concat(e,'"'));var r=e.slice(0,n).trim(),o=A.Pp[r];if(!o)throw new C.No("Unsupported css property in file from ".concat(t,': "').concat(r,'"'));return{property:o,value:e.slice(n+1).trim()}}(n,t),o=r.property,i=r.value;return(0,a.Z)((0,a.Z)({},e),{},(0,l.Z)({},o,i))}),{});return["family","src"].forEach((function(e){if(!n[e])throw new C.No("Missing css property in file from ".concat(t,': "').concat(A.QL[e],'"'))})),n},T=function(e){return(0,E.h)({url:e,method:"GET"}).then((function(e){return e.responseText})).then((function(t){var n=function(e,t){var n=e.match(/@font-face[ ]?{[^}]*}/g);if(!n)throw new C.No("No @font-face rules found in file from ".concat(t));return n}(t,e);return n.map((function(t){var n,r=function(e,t){var n=e.replace(/\/\*.*\*\//g,"").trim(),r=(n.length&&/;$/.test(n)?n:"".concat(n,";")).match(/((([^;(]*\([^()]*\)[^;)]*)|[^;]+)+)(?=;)/g);if(!r)throw new C.No("Found @font-face rule containing no valid font-properties in file from ".concat(t));return r}((n=t.match(/@font-face[ ]?{([^}]*)}/))?n[1]:"",e);return N(r,e)}))}))},I=n(4505),R=n(4716),M=function(e,t){var n,r="string"==typeof(n=e)&&(0,P.sE)(Object.keys(R.YA),(function(e){return e===n}))||null;if(!r||!function(e,t){var n=S.MJ[e];return!n||(0,S.uN)(t,n)}(r,t)){var o="string"==typeof e?e:typeof e;throw new C.No("A valid Element name must be provided. Valid Elements are:\n ".concat(Object.keys(R.YA).filter((function(e){return!R.YA[e].beta})).join(", "),"; you passed: ").concat(o,"."))}},O=n(8547),x=n(3324),Z=n(7710),j=n(4775),L={base:(0,y.jt)(y.Ry),complete:(0,y.jt)(y.Ry),empty:(0,y.jt)(y.Ry),invalid:(0,y.jt)(y.Ry),paymentRequestButton:(0,y.jt)(y.Ry)},B={classes:(0,y.jt)((0,y.mC)({base:(0,y.jt)(y.Z_),complete:(0,y.jt)(y.Z_),empty:(0,y.jt)(y.Z_),focus:(0,y.jt)(y.Z_),invalid:(0,y.jt)(y.Z_),webkitAutofill:(0,y.jt)(y.Z_)})),hidePostalCode:(0,y.jt)(y.Xg),hideIcon:(0,y.jt)(y.Xg),showIcon:(0,y.jt)(y.Xg),disableMultipleButtons:(0,y.jt)(y.Xg),style:(0,y.jt)((0,y.mC)(L)),iconStyle:(0,y.jt)((0,y.kw)("solid","default")),value:(0,y.jt)((0,y.or)(y.Z_,y.Ry)),__privateCvcOptional:(0,y.jt)(y.Xg),__privateValue:(0,y.jt)((0,y.or)(y.Z_,y.Ry)),__privateEmitIbanValue:(0,y.jt)(y.Xg),error:(0,y.jt)((0,y.mC)({type:y.Z_,code:(0,y.jt)(y.Z_),decline_code:(0,y.jt)(y.Z_),param:(0,y.jt)(y.Z_)})),locale:(0,y.yv)("elements()"),fonts:(0,y.yv)("elements()"),placeholder:(0,y.jt)(y.Z_),disabled:(0,y.jt)(y.Xg),placeholderCountry:(0,y.jt)(y.Z_),paymentRequest:(0,y.jt)((0,y.n2)(Z.Z,"stripe.paymentRequest(...)")),supportedCountries:(0,y.jt)((0,y.CT)(y.Z_)),accountHolderType:(0,y.jt)((0,y.kw)("individual","company")),issuingCard:(0,y.jt)(y.Z_),ephemeralKeySecret:(0,y.jt)(y.Z_),nonce:(0,y.jt)(y.Z_),toCopy:(0,y.jt)((0,y.kw)("number","cvc","expiry","pin"))},D=(0,a.Z)((0,a.Z)({},B),{},{disableLink:(0,y.jt)(y.Xg),preferredNetwork:(0,y.jt)((0,y.CT)(y.kw.apply(void 0,(0,c.Z)(j.uR))))}),q=(0,y.mC)(D),F=(0,y.mC)(B),U=n(1925),G=(r={},(0,l.Z)(r,A.Yj.card,U.NC.CARD_ELEMENT_COMBINED),(0,l.Z)(r,A.Yj.cardNumber,U.NC.CARD_ELEMENT_SPLIT),(0,l.Z)(r,A.Yj.cardExpiry,U.NC.CARD_ELEMENT_SPLIT),(0,l.Z)(r,A.Yj.cardCvc,U.NC.CARD_ELEMENT_SPLIT),(0,l.Z)(r,A.Yj.postalCode,U.NC.CARD_ELEMENT_SPLIT),(0,l.Z)(r,A.Yj.paymentRequestButton,U.NC.PAYMENT_REQUEST_ELEMENT),(0,l.Z)(r,A.Yj.iban,U.NC.IBAN_ELEMENT),(0,l.Z)(r,A.Yj.idealBank,U.NC.IDEAL_BANK_ELEMENT),(0,l.Z)(r,A.Yj.p24Bank,U.NC.P24_BANK_ELEMENT),(0,l.Z)(r,A.Yj.auBankAccount,U.NC.AU_BANK_ACCOUNT_ELEMENT),(0,l.Z)(r,A.Yj.fpxBank,U.NC.FPX_BANK_ELEMENT),(0,l.Z)(r,A.Yj.issuingCardNumberDisplay,U.NC.ISSUING_CARD_NUMBER_DISPLAY_ELEMENT),(0,l.Z)(r,A.Yj.issuingCardCopyButton,U.NC.ISSUING_CARD_COPY_BUTTON_ELEMENT),(0,l.Z)(r,A.Yj.issuingCardCvcDisplay,U.NC.ISSUING_CARD_CVC_DISPLAY_ELEMENT),(0,l.Z)(r,A.Yj.issuingCardExpiryDisplay,U.NC.ISSUING_CARD_EXPIRY_DISPLAY_ELEMENT),(0,l.Z)(r,A.Yj.issuingCardPinDisplay,U.NC.ISSUING_CARD_PIN_DISPLAY_ELEMENT),(0,l.Z)(r,A.Yj.epsBank,U.NC.EPS_BANK_ELEMENT),(0,l.Z)(r,A.Yj.netbankingBank,U.NC.NETBANKING_BANK_ELEMENT),(0,l.Z)(r,A.Yj.afterpayClearpayMessageModal,U.NC.AFTERPAY_MESSAGE_MODAL_ELEMENT),(0,l.Z)(r,A.Yj.autocompleteSuggestions,U.NC.AUTOCOMPLETE_SUGGESTIONS_ELEMENT),(0,l.Z)(r,A.Yj.achBankSearchResults,U.NC.ACH_BANK_SEARCH_RESULTS_ELEMENT),(0,l.Z)(r,A.Yj.linkAuthentication,U.NC.LINK_AUTHENTICATION_ELEMENT),(0,l.Z)(r,A.Yj.address,U.NC.ADDRESS_ELEMENT),(0,l.Z)(r,A.Yj.payment,U.NC.PAYMENT_ELEMENT),(0,l.Z)(r,A.Yj.paymentMethodMessaging,U.NC.PAYMENT_METHOD_MESSAGING_ELEMENT),r),z=n(9144),H=function(e){var t=(0,g.Dx)(e,null);return!!t&&"rtl"===t.getPropertyValue("direction")},K=function(){document.activeElement&&document.activeElement.blur&&document.activeElement.blur()},Y=n(7030),W=function(e){var t=document.createElement("input");return t.className=e,t.setAttribute("aria-hidden","true"),t.setAttribute("aria-label"," "),t.setAttribute("autocomplete","false"),t.maxLength=1,t.disabled=!0,(0,g.yq)(t,z.ZS),t},V=function(e){var t=getComputedStyle(e);return"0px"!==t.borderBottomWidth||"none"!==t.boxShadow||"rgba(0, 0, 0, 0)"!==t.backgroundColor||"none"!==t.backgroundImage},X=function(e){var t=getComputedStyle(e);return"0px"!==t.borderRadius&&"hidden"===t.overflow},Q={margin:"0",padding:"0",border:"none",display:"block",background:"transparent",position:"relative",opacity:"1"},J=n(1743),$=n(9706),ee=["test_id"],te=function(e){switch(e.type){case"object":return ee.push(e.object.id),{issuingCard:e.object};case"error":return{error:e.error};default:return(0,y.Rz)(e)}},ne=function(e){switch(e.type){case"object":return{nonce:e.object.public_nonce};case"error":return{error:e.error};default:return(0,y.Rz)(e)}},re=n(9792),oe=n(4044),ie=n(4436),ae=n(6274).Promise,ce=function(e){return parseFloat(e.replace("px",""))||0},se=function(e,t){if(!e)return{source:"frame",outerHeight:Math.max(28,t.clientHeight),innerHeight:t.clientHeight,outerBorderRadius:0,outerPadding:null,hasInputBoxStyles:!1};var n,r,o,i,a,c,s,u,l,d,p,m=(r=t,o=(n=e).getBoundingClientRect(),i=r.getBoundingClientRect(),a=getComputedStyle(n),c=a.borderTopWidth,s=a.borderBottomWidth,u=a.borderLeftWidth,l=a.borderRightWidth,{top:i.top-o.top-ce(c),bottom:o.bottom-i.bottom-ce(s),left:i.left-o.left-ce(u),right:o.right-i.right-ce(l)}),f=t.clientHeight,_=2*Math.min(m.top,m.bottom)+f;return{source:"wrapper",outerHeight:Math.round(10*Math.min(_,e.clientHeight))/10,innerHeight:t.clientHeight,outerBorderRadius:(d=e,p=getComputedStyle(d),-1!==p.borderRadius.indexOf(" ")?0:ce(p.borderRadius)),outerPadding:m,hasInputBoxStyles:V(e)}},ue=function(e,t){return new ae((function(n){(0,g.d3)(e,(function(){(0,g.w3)(e).then((function(){var r;try{r=function(e,t){for(var n={card:V,paymentRequestButton:X}[t],r=e.parentElement,o=0,i=null,a=e.clientHeight,c=e.clientWidth,s="card"===t?3*a:a,u="card"===t?1.5*c:c;o<4&&null!==r;){var l=r,d=l.clientHeight,p=l.clientWidth;if(d>s||p>u)return 0===o?r:i;if(n(r))return r;d>a&&(i=r,s=d),p>c&&(i=r,u=p),o+=1,r=r.parentElement}return i}(e,t)}catch(e){r=null}n(r)}))}))}))},le=n(3550),de=n(3367),pe=n(5584),me=n.n(pe),fe=n(161),_e=n.n(fe),he=n(8778),ye=n.n(he),ve=n(9757),ge=n.n(ve),be=n(6119),we=n.n(be),ke=n(2531),Se=n.n(ke),Pe=n(9098),Ce=n.n(Pe),Ee=n(4769),Ae=n.n(Ee),Ne={margin:"0","user-select":"none",transform:"translate(0)","color-scheme":"only light",display:"block",position:"absolute",top:"0",right:"0",height:"0",width:"var(--stripeElementWidth)",padding:"0",border:"0",overflow:"hidden",opacity:"1"},Te={display:"block",position:"absolute",top:"50%",right:"0",width:"0",margin:"0",padding:"0",border:"0",background:"none",opacity:"1",overflow:"hidden","pointer-events":"auto",transition:"none"},Ie=(me(),_e(),Se(),we(),ge(),ye(),Ce(),Ae(),{selectors:{email:[],phoneCountry:[],phoneNumber:[],name:[]},runCount:0,runtimeInMillis:0,nodeCount:0,source:""}),Re=function(e){var t=(0,de.lT)()(e);Me(t)},Me=function(e){if(e.selectors.email){var t=Ie.selectors.email,n=e.selectors.email,r={};t.concat(n).forEach((function(e){r[e.value]=e}));var o=[];for(var i in r)r.hasOwnProperty(i)&&o.push(r[i]);Ie.selectors.email=o}Ie.runtimeInMillis+=e.runtimeInMillis,Ie.nodeCount+=e.nodeCount,Ie.runCount++,Ie.source=e.source},Oe=function(e,t,n){var r=[];try{if(!n.selectors||!n.selectors.length)return;var o=Date.now(),i=n.selectors.slice(0,10).map((function(e){var t=document.querySelector(e),o=[];return t instanceof HTMLElement&&(o=(0,de.sr)(t,5e3)),r.push.apply(r,(0,c.Z)(o.map((function(t,n){return{value:t,selector:e,nthMatch:n}})))),{selector:e,result:o.length?"found":"not_found",atTime:"".concat(n.source,"-").concat(n.atTime)}}));n.logRecallFromInner||t.report("link.no_code_default_values.recall",{results:JSON.stringify(i),executionTime:Date.now()-o}),e.send({action:"stripe-link-no-code-default-values",payload:{foundSelectors:r,logRecallFromInner:n.logRecallFromInner,reportableSelectorResults:i}})}catch(e){t.report("link.no_code_default_values.recall_error",{message:null==e?void 0:e.message,stack:null==e?void 0:e.stack,name:null==e?void 0:e.name})}},xe=function(e){var t,n,r=e.isOverride,o=e.component,i=e.frameId,c=e.parent,s=e.frame,u=e.locale,l=void 0===u?"auto":u,d=e.controller,p=e.controllerId,m=e.style,f=e.disabled,_=e.onSubmit,h=e.onLoad,y=e.onError,b=e.onOuterAction,k=(0,de.NG)(),S=(0,de.lT)(),P=window.SIMULATE_SECURE_CLICK,C=!1,E="",N=null,T=(0,a.Z)({},Te),I=(0,oe.D)("LINK_BUTTON_FOR_CARD_ELEMENT"),R=document.createElement("iframe"),M="".concat(o,"Button");R.setAttribute("name",(0,v.To)(M)),R.setAttribute("frameborder","0"),R.setAttribute("allowTransparency","true"),R.setAttribute("scrolling","no");var O={locale:(0,ie.Nj)(l),style:m,disabled:f,frameId:i,publishableKey:d._apiKey,stripeAccount:null!==(t=d._stripeAccount)&&void 0!==t?t:null,stripeJsId:d._stripeJsId,controllerId:p,mids:d.mids(),component:o};P&&(O.isSimulatedClick=P),(0,g.yq)(R,Ne),R.src="".concat(I,"#").concat((0,w.qC)(O));var x,Z=document.createElement("div");Z.appendChild(R),(0,g.yq)(Z,Te),r&&!document.getElementById("test-mode-banner")&&((x=document.createElement("marquee")).id="test-mode-banner",x.innerText="Link in Card Test Mode",(0,g.yq)(x,{position:"fixed",left:"0",right:"0",top:"0",color:"#fff","background-color":"#33ddb3","z-index":"9999999"}),document.body.appendChild(x));var j=function(e){var t,n=e.data,r=e.origin;if(e.source===R.contentWindow&&r===A.jQ&&-1!==(null===(t=n.action)||void 0===t?void 0:t.indexOf("card-element-link")))switch(n.action){case"card-element-link-load":C=!0,D(),h();break;case"card-element-link-request-prefill-data":var o={name:null,email:null,phoneCountry:null,phoneNumber:null};if("link-pay"===n.payload.state||"link-save"===n.payload.state)try{o=k()}catch(e){d.report("prefill_data_collection_error",{message:null==e?void 0:e.message,stack:null==e?void 0:e.stack,name:null==e?void 0:e.name})}if(["link-pay","link-save","link-use"].indexOf(n.payload.state)>-1&&N)try{var i=S("card-element");s.send({action:"stripe-link-prefill-selectors",payload:i})}catch(e){d.report("prefill_data_selectors_error",{message:null==e?void 0:e.message,stack:null==e?void 0:e.stack,name:null==e?void 0:e.name})}s.send({action:"stripe-link-prefill-values",payload:o});break;case"card-element-link-update-styles":var c=n.payload,u=c.wrapperStyles,l=c.frameStyles;z(u),(0,g.yq)(R,(0,a.Z)((0,a.Z)({},Ne),l));break;case"card-element-link-error":y(n.payload.reason||"");break;case"card-element-link-report":d.report(n.payload.event,(0,a.Z)({},n.payload.data));break;case"card-element-link-submit":_();break;case"card-element-link-message-outer":"link-state-change"===n.payload.outerAction&&(E=n.payload.outerPayload.state),b(n.payload)}},L=function(e){var t;null==R||null===(t=R.contentWindow)||void 0===t||t.postMessage(e,A.jQ)},B=(0,le.Ds)((function(){(0,g.w3)(c,{requiredStableFrames:3,timeout:300,isStable:function(e,t){return e.width===t.width}}).then((function(e){e&&c.style.setProperty("--stripeElementWidth","".concat(c.getBoundingClientRect().width,"px"))}))}),100),D=(0,le.$M)((function(){ue(c,"card").then((function(e){var t=se(e,c);"frame"===t.source&&d.report("link_in_card.outer_wrapper_not_found");var r=function(){c.style.setProperty("--stripeElementWidth","".concat(c.getBoundingClientRect().width,"px")),B()};r(),window.ResizeObserver&&(n=new ResizeObserver(r)).observe(c),L({action:"card-element-link-outer-measurements",payload:(0,a.Z)((0,a.Z)({},t),{},{width:s._iframe.offsetWidth})})}))})),q=function(){L({action:"card-element-link-focus-button"})},F=function(e){L({action:"card-element-link-options-update",payload:e})},U=function(e){Oe(s,d,e)},G=function(e){var t=e.prefillDataCollection;N=t},z=function(e){var t=(0,a.Z)((0,a.Z)((0,a.Z)({},Te),T),e);T=t,(0,g.yq)(Z,T)};return s._on("outer-update-link-prefill-data-collection",G),s._on("outer-update-link-user-options",F),s._on("link-no-code-default-values-recall-selectors",U),R.addEventListener("focus",q,!1),window.addEventListener("message",j,!1),null==c||c.appendChild(Z),d.report("link_in_card.mount_link_frame"),{unmount:function(){var e;L({action:"card-element-link-unmount",payload:{}}),s._off("outer-update-link-prefill-data-collection",G),s._off("outer-update-link-user-options",F),s._off("link-no-code-default-values-recall-selectors",U),R.removeEventListener("focus",q,!1),window.removeEventListener("message",j,!1),null===(e=n)||void 0===e||e.disconnect(),null==c||c.removeChild(Z),d.report("link_in_card.unmount_link_frame")},hasLoaded:function(){return C},getActiveButton:function(){return E},setFocusable:function(e){R.setAttribute("tabIndex",e?"0":"-1")},updateIframePosition:function(e){return L({action:"card-element-link-outer-nudge",payload:{right:e}})},disallowPointerEvents:function(){z({"pointer-events":"none",opacity:"0",transition:" opacity 0.6s cubic-bezier(0.19, 1, 0.22, 1)"})},allowPointerEvents:function(){z({"pointer-events":"auto",opacity:"1",transition:" opacity 0.6s cubic-bezier(0.19, 1, 0.22, 1)"})}}},Ze=n(6274).Promise,je={position:"fixed",top:"0",left:"100%",opacity:"0",visibility:"hidden",pointerEvents:"none",height:"auto",width:"auto",maxHeight:"none",maxWidth:"none"},Le=function(e,t){var n=function(e,t){var n=(0,g.Dx)(e);if(!n)return null;var r=n.backgroundPosition,o=n.backgroundPositionX,i=parseInt(n.width,10)-t;if(r.match(/right/)){var a,c,s=null===(a=r.match(/right\s+(-?\d+)px/))||void 0===a?void 0:a[1],u=null===(c=r.match(/right\s+(\d+)%/))||void 0===c?void 0:c[1];if(s)return parseInt(s,10);if(u)return parseInt(u,10)/100*i}else{var l,d=null===(l=o.match(/(\d+)%/))||void 0===l?void 0:l[1];if(d)return(1-parseInt(d,10)/100)*i}return null}(e,t);if(null===n)return null;var r=e.getBoundingClientRect();return{width:t,height:r.height,x:r.right-t-n,y:r.y,top:r.top,bottom:r.bottom,left:r.right-t-n,right:r.right-n}},Be=function(e){var t,n,r,o,i=e.detectedWrapper,a=e.mountedToElement,c=e.rootStripeElement,s=e.onOverlap,u=e.onWarning,l=[],d=0,p=0,m=function(){var e,t;p++;var n=c.getBoundingClientRect(),r=_();if(p>50&&(u("disconnecting, greater than ".concat(50," overlap checks done")),w()),!(n.width<150)){if(l=l.filter((function(n){var o,i,a="backgroundImage"===n.source?n.approximateDimensions:n.element.getBoundingClientRect(),c=(i=r,!((o=a).y+o.heighti.y+i.height||o.x+o.widthi.x+i.width));return c&&(!e||a.left30&&(u("disconnecting, greater than ".concat(30," elements being watched")),w()))},_=function(){var e=c.getBoundingClientRect(),t=e.height,n=e.y,r=e.right,o=e.width-150;return{width:o,height:32,x:r-o,y:n+t/2-16}},h=function(e){if(f({source:"resizeObserver-element",element:e}),e.children)for(var t=Math.min(e.children.length,5);t--;){var n=e.children[t];De(n)&&f({source:"resizeObserver-siblingChild",element:n})}},y=(0,le.Ds)((function(){var e,t=_(),n=document.elementFromPoint(t.x+t.width,t.y),r=a.previousElementSibling,o=a.nextElementSibling,s=null==a||null===(e=a.parentElement)||void 0===e?void 0:e.nextElementSibling;if(r&&h(r),o)for(var u=o,l=0;l<3&&u;l++)h(u),u=u.nextElementSibling;s&&h(s),n&&function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;if(!(n>75||r>75||[document.body,document.documentElement,i,a].indexOf(e)>-1||a.contains(e)))for(var o=5,c=e;o--;){if(De(c)){f({source:"resizeObserver-fromPoint",element:e});break}if(!c.parentElement)break;c=c.parentElement}}(n),[c.previousElementSibling,c.nextElementSibling].forEach((function(e){e&&De(e)&&f({source:"resizeObserver-elementPrivate",element:e})})),m()}),250),v=function(e){e.forEach((function(e){e.isIntersecting&&f({element:e.target,source:"intersectionObserver"})})),e.length&&m()},b=function(e){var t=(0,g.Dx)(e);if(t){(function(e){return new Ze((function(t){var n,r=null===(n=e.backgroundSize.match(/(\d+)px/))||void 0===n?void 0:n[1];if(r){var o=parseInt(r,10);t({width:o})}else if(-1!==["auto","contain"].indexOf(e.backgroundSize)){var i=document.createElement("img");i.src=e.backgroundImage.replace(/url\("(.+)"\)/,"$1"),(0,g.yq)(i,je),document.body.appendChild(i);var a=(0,le.$M)((function(e){try{e(),document.body.removeChild(i)}catch(e){}}));setTimeout((function(){a((function(){t({error:"Background image took too long to load"})}))}),2e3),i.onload=function(){a((function(){if(0!==i.width&&0!==i.height)if("contain"===e.backgroundSize){var n=parseInt(e.width,10),r=parseInt(e.height,10)*(i.width/i.height);t({width:Math.min(r,n)})}else t({width:i.width});else t({error:"Background image has no dimensions"})}))},i.onerror=function(){a((function(){t({error:"Failed to load background image"})}))}}else t({error:"Unsupported background-size"})}))})(t).then((function(t){var n=t.error,r=t.width;n?u(n):r&&function(t){var n=Le(e,t);n&&(f({source:"backgroundImage",element:e,approximateDimensions:n}),m())}(r)}))}},w=function(){var e,o,i;l=[],null===(e=t)||void 0===e||e.disconnect(),null===(o=n)||void 0===o||o.disconnect(),null===(i=r)||void 0===i||i.disconnect()};try{window.ResizeObserver&&((o=new ResizeObserver((function(){return y()}))).observe(a),t=o),i?(window.IntersectionObserver&&(n=function(e){for(var t=0,n=new window.IntersectionObserver(v,{root:e}),r=(null==i?void 0:i.children)||[],o=0;o15){u("disconnecting, greater than 10 intersection observer nodes detected"),w();break}}return n}(i)),window.MutationObserver&&(r=function(e){var t=0,r=new MutationObserver((function(e){e.forEach((function(e){var r=e.type,o=e.addedNodes;if("childList"===r){for(var i=0;i15)){u("disconnecting, greater than 10 added mutation observer nodes detected"),w();break}}m()}}))}));return r.observe(e,{childList:!0}),r}(i)),[a,null==a?void 0:a.parentElement].forEach((function(e){e&&function(e){var t=(0,g.Dx)(e);if(!t)return!1;var n=t.backgroundImage;if(!/url\(.+\)/.test(n))return!1;var r=t.backgroundPosition;if(/right/.test(r)){var o,i,a=null===(o=r.match(/right\s+(-?\d+)px/))||void 0===o?void 0:o[1],c=null===(i=r.match(/right\s+(\d+)%/))||void 0===i?void 0:i[1];if(a&&parseInt(a,10)>75)return!1;if(c&&parseInt(c,10)>5)return!1}else{var s,u=null===(s=t.backgroundPositionX.match(/(\d+)%/))||void 0===s?void 0:s[1];if(!u||parseInt(u,10)<95)return!1}var l=t.backgroundRepeat;if("no-repeat"===l)return!0;if("repeat"===l){var d,p=t.backgroundSize;if(-1!==p.indexOf(","))return!1;var m=null===(d=p.match(/(\d+)px/))||void 0===d?void 0:d[1];return!!m&&parseInt(m,10)<75}return!1}(e)&&b(e)}))):u("no wrapper detected, not setting intersection or mutation observer")}catch(e){u("string"==typeof(null==e?void 0:e.message)?null==e?void 0:e.message:"error caught in detection")}return{disconnect:w,check:y}},De=function(e){if(e instanceof HTMLElement){var t=(0,g.Dx)(e);return"absolute"===(null==t?void 0:t.position)||"right"===(null==t?void 0:t.float)}return!1},qe={networks:null},Fe=function(e,t,n){if(!n)return 0;var r=n.indexOf(e)>-1,o=n.indexOf(t)>-1;return r&&!o?-1:!r&&o?1:r&&o?n.indexOf(e)-n.indexOf(t):0},Ue=function(e){var t=e.cardNetworks,n=e.merchantPreferredNetworks,r=e.stripePreferredNetworks;return t.length<=1||0===r.length&&(!n||0===n.length)?t:(0,c.Z)(t).sort((function(e,t){var o=Fe(e,t,n);return 0!==o?o:Fe(e,t,r)}))},Ge=n(6274).Promise,ze=["classes"],He={base:"StripeElement",focus:"StripeElement--focus",invalid:"StripeElement--invalid",complete:"StripeElement--complete",empty:"StripeElement--empty",webkitAutofill:"StripeElement--webkit-autofill"},Ke="#faffbd",Ye=function(e){return parseFloat(e.toFixed(1))},We=function(e){return/^\d+(\.\d*)?px$/.test(e)},Ve=function(e){for(var t=5;t--;){var n,r=e.children[t];if(r&&null!==(n=r.textContent)&&void 0!==n&&n.trim())return r}return null},Xe=function(){function e(t){var n,r,o=this;(0,s.Z)(this,e),this._lastEmittedNetworksChange=null,this.focus=function(e){var t;if("link-manage"!==(null===(t=o._linkButtonFrame)||void 0===t?void 0:t.getActiveButton())){if(o._isIssuingDisplayElement())throw new C.No("Cannot call focus() on an ".concat(o._componentName," Element."));document.activeElement&&document.activeElement.blur&&document.activeElement.blur(),o._fakeInput.focus()}else null==e||e.preventDefault()},this._formSubmit=function(){for(var e=o._component.parentElement;e&&"FORM"!==e.nodeName;)e=e.parentElement;if(e){var t=document.createEvent("Event");t.initEvent("submit",!0,!0),e.dispatchEvent(t)}},this._unmountLinkButtonFrame=function(){o._linkButtonFrame&&((0,g.yq)(o._fakeInput,z.ZS),o._restrictFocusToCardOnly(),o._linkButtonFrame.unmount(),o._linkButtonFrame=void 0),o._hasFloatingLabels=void 0,o._blurOnNextLinkState=void 0},this._isActiveLinkButton=function(e){var t;return(null===(t=o._linkButtonFrame)||void 0===t?void 0:t.getActiveButton())===e},this._restrictFocusToLinkFrameOnly=function(){var e;o._fakeInput.setAttribute("tabIndex","-1"),null===(e=o._linkButtonFrame)||void 0===e||e.setFocusable(!0)},this._restrictFocusToCardOnly=function(){var e;o._fakeInput.removeAttribute("tabIndex"),null===(e=o._linkButtonFrame)||void 0===e||e.setFocusable(!1)},this._allowFrameAndCardFocus=function(){var e;o._fakeInput.removeAttribute("tabIndex"),null===(e=o._linkButtonFrame)||void 0===e||e.setFocusable(!0)},this._handleLinkStateChangeFocusBehavior=function(e){switch(o._frame._iframe.removeAttribute("tabIndex"),e?(0,g.yq)(o._fakeInput,(0,a.Z)((0,a.Z)({},z.ZS),{},{"z-index":"-1"})):(0,g.yq)(o._fakeInput,z.ZS),e){case"link-manage":o._frame._iframe.setAttribute("tabIndex","-1"),o._restrictFocusToLinkFrameOnly();break;case"link-pay":o._focused?o._restrictFocusToLinkFrameOnly():o._restrictFocusToCardOnly();break;case"link-save":case"link-use":o._focused?o._restrictFocusToLinkFrameOnly():o._allowFrameAndCardFocus();break;default:o._restrictFocusToCardOnly()}},this._remove1PasswordButton=function(){if(o._focused)try{var e=document.querySelector("com-1password-button");null==e||e.remove()}catch(e){}},this._handleFloatingPlaceholdersWithLink=function(){var e;(o._hasFloatingLabels=!0,o._frame.send({action:"stripe-has-floating-labels",payload:null}),o._focused)||(null===(e=o._linkButtonFrame)||void 0===e||e.disallowPointerEvents())},this._hasZeroOpacityAncestor=function(){for(var e=o._component,t=!1,n=20;n--;){var r=(0,g.Dx)(e);if(r){var i=r.opacity,a=r.height,c=r.width;if("0"===i&&0!==parseInt(a,10)&&0!==parseInt(c,10)){t=!0;break}}if(!e.parentElement||e.parentElement.getElementsByClassName(R.A2).length>1)break;e=e.parentElement}return t},this._hasOverlappingSibling=function(e){var t,n=e;if(!n)return!1;if(null===(t=n.textContent)||void 0===t||!t.trim())return!1;for(var r=5;r--;){var i=Ve(n);if(!i)break;n=i}var a=o._component.getBoundingClientRect(),c=n.getBoundingClientRect(),s=Math.abs(a.x-c.x)<20,u=a.y+a.height/2,l=c.yu,d=!!n.textContent;return s&&l&&d},this._hasFloatingPlaceholder=function(){var e=o._getParent(),t="";return o._hasZeroOpacityAncestor()?t="zero_opacity_ancestor":o._hasOverlappingSibling(null==e?void 0:e.previousElementSibling)?t="previous_overlapping_sibling":o._hasOverlappingSibling(null==e?void 0:e.nextElementSibling)&&(t="next_overlapping_sibling"),!!t&&(o._controller.report("link_in_card.split_card.has_floating_placeholders",{type:t}),!0)},this._logPrbDeprecationWarning=function(){var e=["You're using a legacy wallets integration.","We released an improved way to boost conversion and integrate with wallets including Apple Pay, Google Pay, Link, and more. https://docs.stripe.com/elements/express-checkout-element/comparison","Learn how to upgrade your integration: https://docs.stripe.com/elements/express-checkout-element/migration"].join("\n\n");o._controller.warn(e)};var i=t.options,c=t.component,u=t.listenerRegistry,l=t.elementTimings,d=t.emitEvent,p=t.getParent,m=t.hasRegisteredListener,f=t.selfDestruct,_=(0,P.CE)(i,["loader","appearance","clientSecret"]),h=_.controller,v=_.componentName,b=_.publicOptions,w=_.betas;this._betas=w,this._componentName=v,this._component=c,this._controller=h,this._listenerRegistry=u,this._emitEvent=d,this._getParent=p,this._hasRegisteredListener=m,this._selfDestruct=f;var k=(0,y.Gu)(q,b||{},"create()"),S=k.value;k.warnings.forEach((function(e){return o._controller.warn(e)}));var E=S.paymentRequest,A=S.classes,N=S.issuingCard,T=null===(n=S.style)||void 0===n||null===(r=n.paymentRequestButton)||void 0===r?void 0:r.height;this._cachedOptions={style:{paymentRequestButton:{height:"string"==typeof T?T:void 0}}};var I,M="paymentRequestButton"===this._componentName;if(M){if(null!=E&&E._initialOptions.__isCheckout||this._logPrbDeprecationWarning(),!E)throw new C.No("You must pass in a stripe.paymentRequest object in order to use this Element.");this._paymentRequest=E;var O=_.locale;this._paymentRequest._registerElement(),this._paymentRequest._updateLocale(O)}if(this._isIssuingDisplayElement()){var x=0===(w||[]).length;if(!N)throw new Error("You must pass in an ID to the issuingCard option in order to use this Element.");if(x){if(!("nonce"in S)||!("ephemeralKeySecret"in S))throw new Error("You must set the nonce and ephemeralKeySecret options to use this Element.")}else if(I=N,-1===ee.indexOf(I))throw new Error("Issuing card ".concat(N," has not been retrieved."))}this._createElement(_,S,l),this._classes=He,this._computeCustomClasses(A||{}),this._groupId=_.groupId,this._lastBackgroundColor="",this._focused=!1,this._empty=!M,this._invalid=!1,this._complete=!1,this._autofilled=!1,this._hasUnmounted=!1,this._lastSubmittedAt=null,this._hasBlurred=!1}return(0,u.Z)(e,[{key:"update",value:function(e){var t=this,n=(0,y.Gu)(F,e||{},"element.update()"),r=n.value;if(n.warnings.forEach((function(e){return t._controller.warn(e)})),r){var o,i,a=null===(o=r.style)||void 0===o||null===(i=o.paymentRequestButton)||void 0===i?void 0:i.height,c={style:{paymentRequestButton:{height:"string"==typeof a?a:void 0}}};this._cachedOptions=(0,P.PM)(this._cachedOptions,c);var s=r.classes,u=(0,d.Z)(r,ze);s&&(this._removeClasses(),this._computeCustomClasses(s),this._updateClasses()),this._updateFrameHeight(r),Object.keys(u).length&&(this._frame.update(u),this._secondaryFrame&&this._secondaryFrame.update(u))}}},{key:"blur",value:function(){if(this._isIssuingDisplayElement())throw new C.No("Cannot call blur() on an ".concat(this._componentName," Element."));this._frame.blur(),this._fakeInput.blur()}},{key:"clear",value:function(){this._frame.clear()}},{key:"unmount",value:function(){var e;this._hasUnmounted=!0;var t=this._getParent(),n=this._label;this._controller.action.elementUnmounted({elementName:this._componentName,groupId:this._groupId,frameId:this._frame.id}),t&&(this._listenerRegistry.removeEventListener(t,"click",this.focus),this._removeClasses()),n&&(this._listenerRegistry.removeEventListener(n,"click",this.focus),this._label=null),this._secondaryFrame&&(this._secondaryFrame.unmount(),this._listenerRegistry.removeEventListener(window,"click",this._handleOutsideClick)),this._unmountLinkButtonFrame(),null===(e=this._linkOverlapObserver)||void 0===e||e.disconnect(),this._fakeInput.disabled=!0,this._frame.unmount()}},{key:"mount",value:function(){if((0,g.qW)(this._component))throw this._controller.report("user_error.shadow_dom_mount",{element:this._componentName}),new C.No("Elements cannot be mounted in a ShadowRoot. Please mount in the Light DOM.");if(this._paymentRequest){if(!this._paymentRequest._canMakePaymentResolved)throw new C.No("For the paymentRequestButton Element, you must first check availability using paymentRequest.canMakePayment() before mounting the Element.");if(!this._paymentRequest._activeBackingLibraryName)throw new C.No("The paymentRequestButton Element is not available in the current environment.")}this._mountTimestamp=new re.E,this._findPossibleLabel(),this._updateClasses(),this._hasUnmounted&&"paymentRequestButton"===this._componentName&&this._frame.send({action:"stripe-cached-options-remount",payload:this._cachedOptions}),this._controller.action.elementMounted({elementName:this._componentName,groupId:this._groupId,frameId:this._frame.id})}},{key:"_isIssuingDisplayElement",value:function(){return"issuingCardNumberDisplay"===this._componentName||"issuingCardCvcDisplay"===this._componentName||"issuingCardExpiryDisplay"===this._componentName||"issuingCardPinDisplay"===this._componentName}},{key:"_updateClasses",value:function(){var e=this._getParent();e&&(0,g.mb)(e,[[this._classes.base,!0],[this._classes.empty,this._empty],[this._classes.focus,this._focused],[this._classes.invalid,this._invalid],[this._classes.complete,this._complete],[this._classes.webkitAutofill,this._autofilled]])}},{key:"_removeClasses",value:function(){var e=this._getParent();e&&(0,g.mb)(e,[[this._classes.base,!1],[this._classes.empty,!1],[this._classes.focus,!1],[this._classes.invalid,!1],[this._classes.complete,!1],[this._classes.webkitAutofill,!1]])}},{key:"_findPossibleLabel",value:function(){var e=this._getParent();if(e){var t,n=e.getAttribute("id");if(n&&(t=document.querySelector("label[for='".concat(n,"']"))),t)this._listenerRegistry.addEventListener(e,"click",this.focus);else for(t=t||e.parentElement;t&&"LABEL"!==t.nodeName;)t=t.parentElement;t?(this._label=t,this._listenerRegistry.addEventListener(t,"click",this.focus)):this._listenerRegistry.addEventListener(e,"click",this.focus)}}},{key:"_computeCustomClasses",value:function(e){var t={};return Object.keys(e).forEach((function(n){if(!He[n])throw new C.No("".concat(n," is not a customizable class name.\nYou can customize: ").concat(Object.keys(He).join(", ")));var r=e[n]||He[n];t[n]=r.replace(/\./g," ")})),this._classes=(0,a.Z)((0,a.Z)({},this._classes),t),this}},{key:"_setupEvents",value:function(e){var t,n=this,r=e.stripeJsLoadTimestamp,o=e.groupCreateTimestamp,i=e.createTimestamp,a={stripeJsLoad:r.getAsPosixTime(),stripeCreate:i.getAsPosixTime(),groupCreate:o.getAsPosixTime(),create:i.getAsPosixTime()};this._controller.deferredCanMakePaymentResponse.promise.then((function(e){n._frame.send({action:"stripe-can-make-payment-response",payload:e})})),this._paymentRequest&&this._paymentRequest._on("walletconfigpropsupdate",(function(e){n._frame.send({action:"stripe-wallet-config-props-update",payload:e})})),this._frame._on("outer-link-card-mount",(function(e){var r=e.isOverride,o=e.frameId,i=e.locale,a=e.style,c=e.disabled,s=e.controllerId;n._linkButtonFrame=xe({component:n._componentName,frame:n._frame,parent:n._component,controller:n._controller,controllerId:s,isOverride:r,frameId:o,locale:i,style:a,disabled:c,onSubmit:function(){return n._frame._emit("submit")},onLoad:function(){var e;t&&(null===(e=n._linkButtonFrame)||void 0===e||e.updateIframePosition(t),t=void 0)},onOuterAction:function(e){var t=e.outerAction,r=e.outerPayload;if("link-state-change"===t&&"link-manage"===r.state){n._frame._iframe.style.display="none";n._frame._iframe.offsetHeight;n._frame._iframe.style.display="block"}"link-state-change"===t&&(n._handleLinkStateChangeFocusBehavior(r.state),"cardNumber"===n._componentName&&n._remove1PasswordButton(),"cardNumber"===n._componentName&&void 0===n._hasFloatingLabels&&["link-pay","link-use"].indexOf(r.state)>-1&&n._hasFloatingPlaceholder()&&n._handleFloatingPlaceholdersWithLink(),["cardNumber","cardCvc","cardExpiry","postalCode"].indexOf(n._componentName)>-1&&void 0===n._blurOnNextLinkState&&"link-manage"===r.state&&n._hasFloatingPlaceholder()?(n._blurOnNextLinkState=!0,n._controller.report("link_in_card.split_card.requires_focus_and_blur_with_data"),(0,g.Ql)((function(){n._emitEvent("focus"),n._focused=!0,n._updateClasses(),n._emitEvent("blur"),n._focused=!1,n._updateClasses()}))):n._blurOnNextLinkState&&(n._blurOnNextLinkState=void 0,(0,g.Ql)((function(){n._emitEvent("blur")}))))},onError:function(e){n._frame.send({action:"stripe-link-in-card-eject",payload:{reason:e}}),n._unmountLinkButtonFrame()}})})),this._frame._on("outer-link-card-unmount",(function(){return n._unmountLinkButtonFrame()}));var s=(0,le.$M)((function(e){var t=e.matchFrame;n._frame.send({action:"stripe-timings",payload:{timestamps:a,matchFrame:t}})}));if(this._frame._on("load",(function(e){var t,r=e.source,o=n._getParent(),i=H(o),c=n._paymentRequest?n._paymentRequest._buttonTypeName:null,u=n._paymentRequest?n._paymentRequest._secondaryButtonTypeName:null,l=null===(t=n._paymentRequest)||void 0===t?void 0:t._initialOptions.onBehalfOf;n._mountTimestamp&&(a.mount=n._mountTimestamp.getAsPosixTime());var d=function(e,t,o){var a,d,p;n._frame.send({action:"stripe-user-mount",payload:{rtl:i,paymentRequestButtonType:c,secondaryPaymentRequestButtonType:u,linkExperimentAssignments:e,arb_id:t,outerBorderRadius:o,amount:null===(a=n._paymentRequest)||void 0===a||null===(d=a._reportOnlyTotal)||void 0===d?void 0:d.amount,currency:null===(p=n._paymentRequest)||void 0===p?void 0:p._reportOnlyCurrency,paymentRequestOnBehalfOf:l}}),s({matchFrame:r===n._frame._iframe.contentWindow})};if(-1!==[c,u].indexOf("LINK")){var p,m,f,_=n._controller.action.retrieveWalletConfig({onBehalfOf:null===(p=n._paymentRequest)||void 0===p?void 0:p._initialOptions.onBehalfOf,amount:null===(m=n._paymentRequest)||void 0===m?void 0:m._initialOptions.total.amount,currency:null===(f=n._paymentRequest)||void 0===f?void 0:f._initialOptions.currency}),h=o?ue(o,"paymentRequestButton"):Ge.resolve(null);Ge.all([_,h]).then((function(e){var t,n,r,i,a=(0,x.Z)(e,2),c=a[0],s=a[1],u=o?se(s,o):null;"object"===c.type&&(t=null===(r=c.object.experiments)||void 0===r?void 0:r.experiment_assignments,n=null===(i=c.object.experiments)||void 0===i?void 0:i.arb_id);d(t,n,null==u?void 0:u.outerBorderRadius)}))}else d()})),this._secondaryFrame){var u=this._secondaryFrame;u._on("load",(function(e){var t=e.source;n._mountTimestamp&&(a.mount=n._mountTimestamp.getAsPosixTime()),u.send({action:"stripe-user-mount",payload:{rtl:!1,paymentRequestButtonType:null}}),u.send({action:"stripe-timings",payload:{timestamps:a,matchFrame:t===u._iframe.contentWindow}})}))}this._frame._on("redirectfocus",(function(e){var t=e.focusDirection,r=(0,g.dh)(n._component,t);r&&r.focus()})),this._frame._on("focus",(function(){var e;n._hasFloatingLabels&&(null===(e=n._linkButtonFrame)||void 0===e||e.allowPointerEvents());(n._isActiveLinkButton("link-pay")||n._isActiveLinkButton("link-save")||n._isActiveLinkButton("link-use"))&&n._restrictFocusToLinkFrameOnly(),n._focused=!0,n._updateClasses()})),this._frame._on("blur",(function(){var e;(n._isActiveLinkButton("link-pay")?n._restrictFocusToCardOnly():(n._isActiveLinkButton("link-save")||n._isActiveLinkButton("link-use"))&&n._allowFrameAndCardFocus(),n._hasFloatingLabels&&n._empty)&&(null===(e=n._linkButtonFrame)||void 0===e||e.disallowPointerEvents());n._focused=!1,n._updateClasses(),n._lastSubmittedAt&&"paymentRequestButton"===n._componentName&&(n._controller.report("payment_request_button.sheet_visible",{latency:n._lastSubmittedAt.getElapsedTime()}),n._lastSubmittedAt=null),!n._linkButtonFrame||n._hasBlurred||"cardNumber"!==n._componentName||n._hasFloatingLabels||setTimeout((function(){n._hasFloatingPlaceholder()&&n._handleFloatingPlaceholdersWithLink()}),500),n._hasBlurred=!0})),this._frame._on("submit",(function(e){if("paymentRequestButton"===n._componentName){n._lastSubmittedAt=new re.E;var t=!1,r=!1;(0,$.Z)(),n._emitEvent("click",{preventDefault:function(){n._controller.report("payment_request_button.default_prevented"),t&&n._controller.warn("event.preventDefault() was called after the payment sheet was shown. Make sure to call it synchronously when handling the `click` event."),r=!0}}),!r&&n._paymentRequest&&(n._paymentRequest._updateLastClickedButtonPosition(null==e?void 0:e.buttonPosition),n._paymentRequest._elementShow(),t=!0)}else n._emitEvent("submit"),n._formSubmit()})),["ready","focus","blur","escape","click"].forEach((function(e){n._frame._on(e,(function(){n._emitEvent(e)}))})),this._frame._on("self-destruct",(function(){n._selfDestruct()})),this._frame._on("load-error",(function(e){n._emitEvent("loaderror",{error:e}),n._selfDestruct()})),this._frame._on("change",(function(e){var t;(0,$.Z)();var r={},o=R._0[n._componentName]||[];["error","value","empty","complete"].concat((0,c.Z)(o)).forEach((function(t){return r[t]=e[t]})),n._emitEvent("change",r),null===(t=n._linkOverlapObserver)||void 0===t||t.check(),n._empty=r.empty,n._invalid=!!r.error,n._complete=r.complete,n._updateClasses()})),this._frame._on("__privateIntegrationError",(function(e){var t=e.message;n._emitEvent("__privateIntegrationError",{message:t})})),this._frame._on("card-element-card-brand-choice-eligibility-change",(function(e){var t=e.isEligibleForCardElementCBC,r=e.merchantPreferredNetworks,o=e.stripePreferredNetworks;n._controller.action.isCardMetadataRequired({frameId:n._frame.id,resetEmitted:!0}).then((function(){return n._controller.action.retrieveCardNetworks({frameId:n._frame.id})})).then((function(e){if(e){var i=e;if(t){var a=Ue({cardNetworks:e,merchantPreferredNetworks:r,stripePreferredNetworks:o});n._frame.send({action:"stripe-card-networks-retrieved",payload:a}),i=a.slice(0,1)}n._emitNetworksChangeEventIfDifferentFromLast(i,!1)}}))})),this._frame._on("networkschange-emit",(function(e){var t=e.cardNetworks,r=e.merchantPreferredNetworks,o=e.stripePreferredNetworks,i=e.isCartesBancairesEnabled,a=e.isEligibleForCBC;if(-1!==["card","cardNumber"].indexOf(n._componentName)){var c=n._formatNetworks({cardNetworks:t,stripePreferredNetworks:o,merchantPreferredNetworks:r,isCartesBancairesEnabled:i,isEligibleForCBC:a}).networksToEmit;n._emitNetworksChangeEventIfDifferentFromLast(c,!1)}})),this._frame._on("networkschange-start",(function(e){var t=e.isCartesBancairesEnabled,r=e.isEligibleForCardElementCBC,o=e.merchantPreferredNetworks,i=e.stripePreferredNetworks;(t||n._hasRegisteredListener("networkschange"))&&n._controller.action.isCardMetadataRequired({frameId:n._frame.id}).then((function(e){return e&&n._emitNetworksChangeEvent(null,!0),n._controller.action.retrieveCardNetworks({frameId:n._frame.id})})).then((function(e){if(e){var a=n._formatNetworks({cardNetworks:e,stripePreferredNetworks:i,merchantPreferredNetworks:o,isCartesBancairesEnabled:t,isEligibleForCBC:r}),c=a.orderedCardNetworks,s=a.networksToEmit;n._emitNetworksChangeEvent(s,!1),t&&n._frame.send({action:"stripe-card-networks-retrieved",payload:c})}}))})),this._frame._on("dimensions",(function(e){if("paymentRequestButton"!==n._componentName){var r=n._getParent();if(r){var o=(0,g.Dx)(r,null);if(o){var i=parseFloat(o.getPropertyValue("height")),a=e.height;if("border-box"===o.getPropertyValue("box-sizing")){var c=parseFloat(o.getPropertyValue("padding-top")),s=parseFloat(o.getPropertyValue("padding-bottom"));i=i-parseFloat(o.getPropertyValue("border-top"))-parseFloat(o.getPropertyValue("border-bottom"))-c-s}var u=Ye(i),l=Ye(a);0!==i&&u1&&void 0!==arguments[1]&&arguments[1],n=e.style;if("paymentRequestButton"===this._componentName){var r=n&&n.paymentRequestButton||{},o=r.height,i="string"==typeof o?o:void 0;(t||i)&&(this._frame.updateStyle({height:i||this._lastHeight||J.Tw,minHeight:"auto"}),this._lastHeight=i||this._lastHeight)}else{var a=n&&n.base||{},c=a.lineHeight,s=a.fontSize,u=a.padding,l="string"!=typeof c||isNaN(parseFloat(c))?void 0:c,d="string"==typeof s?s:void 0,p="string"==typeof u?u:void 0;if(d&&!We(d)&&this._controller.warn("The fontSize style you specified (".concat(d,") is not in px. We do not recommend using relative css units, as they will be calculated relative to our iframe's styles rather than your site's.")),t||l||d){var m=-1===A.T2.indexOf(this._componentName)?void 0:p||this._lastPadding,f=(0,g.Tf)(l||this._lastHeight,d||this._lastFontSize,m);this._frame.updateStyle({height:f}),this._lastFontSize=d||this._lastFontSize,this._lastHeight=l||this._lastHeight,this._lastPadding=m}}}},{key:"_createElement",value:function(e,t,n){var r=this,o=(0,P.ei)(e,["locale","fonts","betas","appearance","loader","clientSecret","deferredIntent","wait","mids","controllingElement","controllingMode","mountedInternal","externalPaymentMethodTypes","allowedCardBrands","disallowedCardBrands","customerSessionClientSecret","paymentMethodCreation"]),i=(0,P.ei)(t,["hidePostalCode","hideIcon","disableLink","preferredNetwork","showIcon","disableMultipleButtons","style","iconStyle","value","error","locale","fonts","placeholder","disabled","placeholderCountry","supportedCountries","accountHolderType","issuingCard","ephemeralKeySecret","nonce","toCopy","__privateCvcOptional","__privateValue","__privateEmitIbanValue"]),c=this._component,s=W(Y.Kb);(0,g.yq)(c,Q);var u=H(document.body),l=e.componentName,d=e.groupId,p=G[l],m=(0,a.Z)((0,a.Z)((0,a.Z)({},o),i),{},{rtl:u}),f=this._controller.createElementFrame(p,l,d,m);if(f._on("load",(function(){s.disabled=!1})),this._listenerRegistry.addEventListener(s,"focus",(function(){f.focus()})),f.appendTo(c),R._y[l]){var _=R._y[l].secondary,h=this._controller.createSecondaryElementFrame(p,_,l,d,m);h&&h.on&&h.on("height-change",(function(e){h.updateStyle({height:"".concat(e.height,"px")})})),this._secondaryFrame=h,h.appendTo(c),this._listenerRegistry.addEventListener(window,"click",(function(){return r._handleOutsideClick()}))}if(c.appendChild(s),b.Ah&&l!==A.Yj.paymentRequestButton){var y=function(){var e=W(Y.tk);return e.setAttribute("tabindex","-1"),e}();c.appendChild(y)}this._frame=f,this._fakeInput=s,this._setupEvents(n),this._updateFrameHeight(t,!0)}}]),e}(),Qe=Xe,Je={amount:y.Rx,currency:(0,y.kw)("USD","CAD"),logoColor:(0,y.jt)((0,y.kw)("primary","black","white")),fontColor:(0,y.jt)(y.Z_),fontSize:(0,y.jt)(y.Z_),textAlign:(0,y.jt)(y.Z_),stripeMerchantId:(0,y.jt)(y.Z_)},$e=(0,y.mC)(Je),et=n(9900),tt=n(6274).Promise,nt=["options"],rt=function(e){var t,n=e.options,r=(0,d.Z)(e,nt),o=e.emitEvent,i=e.listenerRegistry,s=n.controller,u=n.componentName,l=n.publicOptions,p=n.groupId,m=n.locale,f=new re.E,_=function(e){var t=(0,y.Gu)($e,e||{},"create()"),n=t.value,r=t.warnings;if(!Math.floor(n.amount)===n.amount)throw new C.No("'Amount' must be a whole integer number that represents the lowest denomination (cents).");return r.forEach((function(e){return s.warn(e)})),n},h=_(l),v=function(e,n){return e.apply(void 0,[t].concat((0,c.Z)(n)))},g=[],b=function(e){return function(){for(var n=arguments.length,r=new Array(n),o=0;o2&&void 0!==arguments[2]?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i=(0,Yt.Q)(t,n,r),c=(0,x.Z)(i,2),s=c[0],u=c[1];return Wt["".concat(t).concat(n)]||(e("light_experiment_exposure",(0,a.Z)({qualified:s,variant:u,experiment_name:t},o)),Wt["".concat(t).concat(n)]=!0),u},Xt=function(e){if(o)return o;var t=function(e,t){return Vt(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,arguments.length>3&&void 0!==arguments[3]?arguments[3]:{treatment:5,control:5},arguments.length>4&&void 0!==arguments[4]?arguments[4]:{})}(e.report.bind(e),"lazyload_loader",e._stripeJsId),n="treatment"===t;return(o=e.createHiddenFrame(U.NC.LOADER_UI_APP,{lazyLoad:n}))._on("generate-loader-ui",(function(e){o.send({action:"generate-loader-ui",payload:{data:e}})})),o._on("get-element-loader-ui",(function(e){o.send({action:"get-element-loader-ui",payload:{data:e}})})),o},Qt=n(6274).Promise,Jt=function(e){var t,n=e.elementFrame,r=e.component,i=e.componentName,c=e.loaderEnabled,s=e.elementOptions,u=0,l=function(e){if(!e)return null;var t=function(e){var t=[],n=function e(n){var r=document.createElement("div");return(0,g.yq)(r,n.style),n.isShimmerNode&&t.push(r),Array.isArray(n.children)&&n.children.forEach((function(t){return r.appendChild(e(t))})),r}(e);return n.className="__PrivateStripeElementLoader",{loaderComponent:n,shimmerNodes:t}}(e),n=t.loaderComponent,r=t.shimmerNodes;return(0,a.Z)({loaderComponent:n},function(e){var t,n,r=3e3,o=function(){t&&clearTimeout(t),n&&clearTimeout(n)};return{startAnimation:function(){o();var i=function(t){(0,g.Ql)((function(){e.forEach((function(e){e.style.transition="start"===t?"transform ".concat(r,"ms ease"):"",e.style.transform="start"===t?"translateX(200%)":"translateX(-100%)"}))}))};!function e(){i("start"),n=setTimeout((function(){return i("stop")}),r),t=setTimeout(e,3500)}()},stopAnimation:o}}(r))},d=new Qt((function(e){var t=o;t&&c?(t._emit("get-element-loader-ui",{componentName:i,elementOptions:s}),t._on("element-loader-ui-callback",(function(t){var n=t.message,r=n.componentName,o=n.loaderUiNodes;i===r&&e(l(o))}))):e(null)})),p=function(e){return function(){var t=++u;return d.then((function(n){return n&&t===u?e(n):{err:"stale call"}}))}},m=function(e){e.height&&(r.style.height=e.height)},f=function(e){var t=e.loaderComponent,o=e.stopAnimation;n._off("set_styles",m),r.style.height="",o();try{r.contains(t)&&r.removeChild(t)}catch(e){}},_=p((function(e){var t=e.loaderComponent,o=e.startAnimation;t.style.opacity="1",n.updateStyle({opacity:"0"}),r.style.height=t.style.height,r.appendChild(t),o(),n._on("set_styles",m)})),h=p((function(e){e.loaderComponent.style.opacity="0",t=setTimeout((function(){f(e)}),316)})),y=p(f);return{show:function(){return t&&clearTimeout(t),_()},hide:function(){return n.updateStyle({opacity:"1"}),h()},unmount:function(){return n.updateStyle({opacity:"1"}),t&&clearTimeout(t),y()}}},$t=n(1119),en={apple_pay:"applePay",google_pay:"googlePay"},tn={country:"US",currency:"usd",total:{amount:0,label:""},requestPayerName:!0,requestPayerEmail:!1,requestPayerPhone:!1},nn=function(e,t,n,r){var o="applePay"===r?"googlePay":"applePay",i=function(e){var t,n,r,o=e.options;if(o.publicOptions&&o.publicOptions.hasOwnProperty("applePay")&&null!==(t=o.publicOptions)&&void 0!==t&&t.applePay.hasOwnProperty("applePayLaterAvailability"))return null===(n=o.publicOptions)||void 0===n||null===(r=n.applePay)||void 0===r?void 0:r.applePayLaterAvailability}({options:e}),c=Ht({options:e,key:"recurringPaymentRequest"}),s=Ht({options:e,key:"deferredPaymentRequest"}),u=Ht({options:e,key:"automaticReloadPaymentRequest"}),l=new Z.Z({controller:e.controller,authentication:{apiKey:e.controller._apiKey,accountId:e.controller._stripeAccount||null},mids:e.mids,rawOptions:(0,a.Z)((0,a.Z)({},tn),{},{disableWallets:["browserCard","link",o],__isPaymentElement:!0,__elementsGroupId:e.groupId,applePay:{applePayLaterAvailability:i,recurringPaymentRequest:c,deferredPaymentRequest:s,automaticReloadPaymentRequest:u}}),betas:e.betas,queryStrategyOverride:null,listenerRegistry:t}),d=function(){};l._on("token",(function(e){d({type:"token",token:e.token.id}),e.complete("success")})),l._on("cancel",(function(){d({type:"cancelled"})})),l._on("__private_do_not_use_error",(function(e){d({type:"error",error:e})}));var p=l.canMakePayment().then((function(e){e&&e[r]?(n.send({action:"should-list-wallet",payload:{wallet:r}}),n._on("show-upe-wallet",(function(e){var t=e.wallet;d=e.onComplete,en[t]===r&&l.show()}))):n.send({action:"should-not-list-wallet",payload:{wallet:r}})}));return{pr:l,canMakePaymentPromise:p}},rn=n(3849),on=n(1708),an={PAYMENT_INTENT:"payment_intent",SETUP_INTENT:"setup_intent"},cn=function(e){return e?an[e.type]:"deferred_intent"},sn=function(e){!function(e){var t=e.options,n=e.institutionId,r=e.manualEntryOnly,o=e.parsedClientSecret,i=e.searchSession,a=e.deferredIntentOptions,c=e.hostedSurface,s=e.hasExistingConsumerSession,u=e.sharedSessionContext,l=e.merchantToken,d=e.onEvent;(0,$t.OJ)({linkAccountSessionCreatorClientSecret:null==o?void 0:o.clientSecret,linkAccountSessionCreatorType:cn(o),createdBy:(0,on.Wg)(null==o?void 0:o.id,null==a?void 0:a.elementsSessionId),controller:t.controller,attachRequired:!1,institution:n,data:{type:"us_bank_account"},searchSession:i,manualEntryOnly:r,paymentMethodOptions:null==a?void 0:a.paymentMethodOptions,amount:null==a?void 0:a.amount,onBehalfOf:null==a?void 0:a.onBehalfOf,hostedSurface:c,hasExistingConsumerSession:s,sharedSessionContext:u,groupId:t.groupId,merchantToken:l,onEvent:d}).then((function(e){if(e.error)"financial_connections_session_cancelled"===e.error.code?t.controller.action.completeLinkAccountSessionElements({groupId:t.groupId,error:rn.zb}):"financial_connections_initialization_error"===e.error.code?t.controller.action.completeLinkAccountSessionElements({groupId:t.groupId,error:rn.bT}):t.controller.action.completeLinkAccountSessionElements({groupId:t.groupId,error:rn.TH});else if(e.linkAccountSession.paymentAccount){var n=e.linkAccountSession.paymentAccount;switch(n.object){case"financial_connections.account":case"linked_account":var r=n;t.controller.action.completeLinkAccountSessionElements({groupId:t.groupId,bankAccount:{sessionId:e.linkAccountSession.id,displayName:r.display_name,bankName:r.institution_name,last4:r.last4||"",type:"instant"}});break;case"financial_connections.bank_account":case void 0:var o=n;t.controller.action.completeLinkAccountSessionElements({groupId:t.groupId,bankAccount:{sessionId:e.linkAccountSession.id,displayName:"Bank account",bankName:o.bank_name,last4:o.last4,type:"manual"}});break;default:(0,y.Rz)(n)}}else t.controller.action.completeLinkAccountSessionElements({groupId:t.groupId,error:rn.zb})}))}({options:e.options,institutionId:e.institutionId,manualEntryOnly:e.manualEntryOnly,parsedClientSecret:e.parsedClientSecret,searchSession:e.searchSession,deferredIntentOptions:e.deferredIntentOptions,hostedSurface:e.hostedSurface,hasExistingConsumerSession:e.hasExistingConsumerSession,sharedSessionContext:e.sharedSessionContext,merchantToken:e.merchantToken,onEvent:e.onEvent})},un=function(e,t,n){var r=e.createHiddenFrame(U.NC.GOOGLE_MAPS_APP,{apiKey:"AIzaSyCab6eIMNih34mQb3XI_QWXagmF2_rvQAg",elementMode:n});return r._on("get-google-maps-predictions",(function(e){!function(e,t){r.send({action:"get-google-maps-predictions",payload:{data:{search:e,countryRestrictions:t}}})}(e.search,e.countryRestrictions)})),r._on("get-google-maps-details",(function(e){!function(e){r.send({action:"get-google-maps-details",payload:{data:{placeId:e}}})}(e.placeId)})),r._on("google-maps-callback",(function(e){var n=e.event,r=e.message;switch(n){case"gotPredictions":!function(e){t.send({action:"google-maps-predictions",payload:{data:e}})}(r);break;case"gotDetails":!function(e){t.send({action:"google-maps-details",payload:{data:e}})}(r)}})),r},ln=function(e){return(0,P.ei)(e,["defaultValues","paymentMethodOrder","allowedCardBrands","disallowedCardBrands","business","fields","readOnly","terms","wallets","layout","savePaymentMethod","allowedCountries","autocomplete","blockPoBox","defaultValues","contacts","fields","validation","mode","display","currency","countryCode","metaData","paymentMethodTypes","displayType","_internalBrowserEngine","amount","_unmountAutomatically"])},dn=function(e){var t=e.controller,n=e.componentName,r=e.groupId,o=e.fonts,i=e.wait,a=e.publicOptions,c=e.controllingElement,s=e.controllingMode,u=e.mountedInternal,l=e.externalPaymentMethodTypes,d=e.locale,p={fonts:o,wait:i,rtl:H(document.body),publicOptions:ln(a),controllingElement:c,controllingMode:s,mountedInternal:u,externalPaymentMethodTypes:l,stripeAccount:t._stripeAccount,locale:d},m=Y.P0[n];return t.createElementFrame(m,n,r,p)},pn=function(e){var t=e.props,n=e.componentName,r=e.controllingElement,o=e.controllingMode,i=e.ariaHidden,c=void 0===i?"false":i,s=t.component,u=t.elementTimings,l=t.getParent,d=t.options,p=dn((0,a.Z)((0,a.Z)({},d),{},{componentName:n,controllingElement:r,controllingMode:o}));p.appendTo(s),p.updateStyle((0,a.Z)((0,a.Z)({},Ut(n,!1)),{},{position:"absolute",zIndex:"1"})),p._iframe.setAttribute("aria-hidden",c),p._iframe.setAttribute("tabindex","-1");var m=(0,le.$M)((function(){p.send({action:"stripe-timings",payload:{timestamps:{stripeJsLoad:u.stripeJsLoadTimestamp.getAsPosixTime(),stripeCreate:u.stripeCreateTimestamp.getAsPosixTime(),groupCreate:u.groupCreateTimestamp.getAsPosixTime(),create:u.createTimestamp.getAsPosixTime(),mount:(new re.E).getAsPosixTime()}}})}));p._on("load",(function(){p.send({action:"stripe-user-mount",payload:{rtl:H(l())}}),m()})),p._on("set_styles",(function(e){p.updateStyle(e)})),"achBankSearchResults"===n&&p._on("us-bank-account-v2-launch",(function(e){return sn((0,a.Z)({options:d},e))}))},mn=function(e){var t=e.controller,n=e.groupId,r=e.locale,o=e.type,i=e.isDarkMode,a=e.isRtl,c=e.purchaseProtectionsEnabled,s=e.newVersionEnabled,u=e.businessName,l=e.selectedLast4,d=e.backupBrand,p=e.backupLast4,m=e.protectionType,f=e.allowedPaymentMethod,_=t.createLightboxFrame({type:U.NC.LINK_INFO_MODAL,options:{locale:r,type:o,isDarkMode:i,isRtl:a,purchaseProtectionsEnabled:c,newVersionEnabled:s,businessName:u,selectedLast4:l,backupBrand:d,backupLast4:p,protectionType:m,allowedPaymentMethod:f},groupId:n});_.show(),_.fadeInBackdrop();_._on("close",(function(){_.fadeOutBackdrop(),_.destroy(!0)}))},fn=function(e){var t=e.controller,n=e.linkProtectionType,r=e.liveMode,o=e.readOnly,i=e.linkAccountSessionCreatorClientSecret,a=e.linkAccountSessionCreatorType,c=e.linkAccountSessionCreatorId,s=e.linkAccountSessionClientSecret,u=e.apiKey,l=e.stripeAccount,d=t.createLightboxFrame({type:U.NC.LINK_PURCHASE_PROTECTION_MODAL,options:{linkProtectionType:n,liveMode:r,readOnly:o,linkAccountSessionCreatorClientSecret:i,linkAccountSessionCreatorType:a,linkAccountSessionCreatorId:c,linkAccountSessionClientSecret:s,apiKey:u,stripeAccount:l}});d.show(),d.fadeInBackdrop();d._on("close",(function(){d.fadeOutBackdrop(),d.backdropRunOnHide(),d.destroy(!0)}))},_n=n(6241),hn=n(6977),yn=(n(8229),function(e){return function(e,t){return(0,P.G)(e.verification_sessions,(function(e){var n=e.type,r=e.state;return n===t&&"STARTED"===r}))}(e,"SIGNUP")}),vn=function(e){(0,et.a)().then((function(t){(0,t.mountModal)(e)}))},gn=function(e){var t=e.unsafeOptions,n=e.openModalPayload,r=e.elementTimings,o=e.embeddedCheckoutMessenger,i=t.controller,a=t.groupId,c=t.wait,s=t.fonts,u=i._apiKey,l=A.Yj.paymentMethodMessagingModal,d=(0,y.Gu)((0,y.mC)(wt),{wait:c,rtl:H(document.body),keyMode:(0,Gt.lO)(u),apiKey:u,stripeAccount:i._stripeAccount,fonts:s||[],componentName:l,publicOptions:n.publicOptions},"elements.create('".concat(l,"')")),p=d.value;if(d.warnings.forEach((function(e){i.warn(e)})),"object"==typeof o&&o&&o.hasOwnProperty("send"))o.send("mount-payment-method-messaging-info-modal-in-embedded-checkout",{type:U.NC.PAYMENT_METHOD_MESSAGING_MODAL_ELEMENT,options:p});else{var m={stripeJsLoad:r.stripeJsLoadTimestamp.getAsPosixTime(),stripeCreate:r.stripeCreateTimestamp.getAsPosixTime(),groupCreate:r.groupCreateTimestamp.getAsPosixTime(),create:r.createTimestamp.getAsPosixTime(),mount:(new re.E).getAsPosixTime()},f=i.createLightboxFrame({type:U.NC.PAYMENT_METHOD_MESSAGING_MODAL_ELEMENT,options:p,groupId:a});0,f.show(),f.fadeInBackdrop();f._on("close",(function(){f.fadeOutBackdrop(),f.destroy(!0)})),f.send({action:"stripe-user-mount",payload:{rtl:H(document.body)}}),f.send({action:"stripe-timings",payload:{timestamps:m}})}},bn=n(6835),wn=function(e){for(var t=Sn(),n=e,r=0,o=null;null!==(i=n)&&void 0!==i&&i.parentElement&&r<40;){var i,a,c=null===(a=(0,g.Dx)(n))||void 0===a?void 0:a.getPropertyValue("background-color");if(c&&c!==t){o=c;break}r+=1,n=n.parentElement}if(!o){var s,u,l=null===(s=(0,g.Dx)(document.body))||void 0===s?void 0:s.getPropertyValue("background-color"),d=null===(u=(0,g.Dx)(document.querySelector("html")))||void 0===u?void 0:u.getPropertyValue("background-color");o=l!==t?l||null:d!==t?d||null:Pn()}return{backgroundColor:o,textColor:kn(e),numberOfNodesTraversed:r}},kn=function(e){var t,n,r=document.createElement("p");r.style.display="none",e.appendChild(r);var o=null!==(t=null===(n=(0,g.Dx)(r))||void 0===n?void 0:n.getPropertyValue("color"))&&void 0!==t?t:null;return e.removeChild(r),o},Sn=function(){var e,t,n=document.createElement("div");n.style.display="none",document.body.appendChild(n);var r=null!==(e=null===(t=(0,g.Dx)(n))||void 0===t?void 0:t.getPropertyValue("background-color"))&&void 0!==e?e:null;return document.body.removeChild(n),r},Pn=function(){var e,t;if(!CSS.supports("color","Canvas"))return null;var n=document.createElement("div");n.style.display="none",n.style.backgroundColor="Canvas",document.body.appendChild(n);var r=null!==(e=null===(t=(0,g.Dx)(n))||void 0===t?void 0:t.getPropertyValue("background-color"))&&void 0!==e?e:null;return document.body.removeChild(n),r},Cn=function(e){if("object"==typeof e&&e&&e.hasOwnProperty("financialConnections")){var t=e.financialConnections;if("object"==typeof t&&t&&t.hasOwnProperty("onEvent")){var n=t.onEvent;if("function"==typeof n&&n)return n}return null}return null},En=n(6274).Promise,An=function(e,t){return function(e){try{var t=(new TextEncoder).encode(e);return crypto.subtle.digest("SHA-1",t).then((function(e){var t=Array.from(new Uint8Array(e)).map((function(e){return e.toString(16).padStart(2,"0")})).join("");return parseInt(t.slice(0,4),16)/65536})).catch((function(){return null}))}catch(e){return new En((function(e){return e(null)}))}}(e).then((function(e){if(null===e)return"skipped_assignment";var n="treatment";return t.report("upe.prewarm_default_values.experiment_exposure",{variant:n}),n}))},Nn=function(e,t){return"object"==typeof e&&e&&e.hasOwnProperty(t)?e[t]:null},Tn=function(e,t){switch(t){case"payment":var n=function(e){if("object"==typeof e&&e&&e.hasOwnProperty("layout")){var t=e.layout;if("string"==typeof t){if(-1!==["auto","accordion","tabs"].indexOf(t))return{type:t,defaultCollapsed:!1,spacedAccordionItems:!1}}else{var n=t.type,r=t.defaultCollapsed;if("accordion"===n){var o=t.spacedAccordionItems;return t.visibleAccordionItemsCount,{type:n,defaultCollapsed:r,spacedAccordionItems:o}}if(-1!==["auto","tabs"].indexOf(n))return{type:n,defaultCollapsed:r}}}return{}}(e);return{payment:{layout:n}};case"address":return{address:{display:Nn(e,"display")}};default:return{}}},In=function(e){var t=e.component,r=e.listenerRegistry,o=e.elementTimings,c=e.getParent,s=e.emitEvent,u=e.options,l=e.selfDestruct,d=null,m=null,f=null,_=null,h=null,v=[],b=[],w=u.storeReadyPromise||En.resolve(),k=new bn.B,S=dn(u),P=-1!==["auto","always"].indexOf(u.loader)&&Kt(u.componentName),C=Jt({controller:u.controller,elementFrame:S,component:t,componentName:u.componentName,loaderEnabled:P,elementOptions:Tn(u.publicOptions,u.componentName)}),E=function(e){if("object"==typeof e&&e&&e.hasOwnProperty("defaultValues")){var t,n,r=e.defaultValues,o=null!==(t=null==r||null===(n=r.billingDetails)||void 0===n?void 0:n.email)&&void 0!==t?t:null;return"string"==typeof o?o:null}return null}(u.publicOptions);if(E){var A=u.controller._stripeJsId;An(A,u.controller).then((function(e){if("treatment"===e){var t,n,r,o=null,i=null,a=null;if("PAYMENT_INTENT"===(null===(t=u.clientSecret)||void 0===t?void 0:t.type))o=null===(r=u.clientSecret)||void 0===r?void 0:r.id;"payment"===(null===(n=u.deferredIntent)||void 0===n?void 0:n.mode)&&(i=u.deferredIntent.amount,a=u.deferredIntent.currency),u.controller.action.preloadConsumerLookup({email:{email:E,source:"default_value"},session_id:A,payment_intent:o,amount:i,currency:a,element:u.componentName,transaction_context:null})}}))}S._on("load-error",(function(e){s("loaderror",{error:e}),l()}));var N,T=Nn(u.publicOptions,"autocomplete");if(("shippingAddress"===u.componentName||"address"===u.componentName)&&(null==T?void 0:T.mode)!==pt.t0.disabled){var I=u.publicOptions.mode||pt.gC;S._on("setup-stripe-google-maps-autocomplete",(function(){!function(e,t,n){var r=un(e,t,n);t._on("get-google-maps-predictions",(function(e){e.keyMode===pt.UH.stripe&&r._emit("get-google-maps-predictions",e)})),t._on("get-google-maps-details",(function(e){e.keyMode===pt.UH.stripe&&r._emit("get-google-maps-details",e)}))}(u.controller,S,I),pn({props:e,componentName:"autocompleteSuggestions",controllingElement:"addressElement",controllingMode:I,ariaHidden:"true"})})),(null==T?void 0:T.mode)===pt.t0.google_maps_api&&(!function(e,t,n){e.action.initGoogleMapsService({apiKey:n}),t._on("get-google-maps-predictions",(function(n){n.keyMode===pt.UH.merchant&&e.action.getGoogleMapsPredictions({data:n,frameId:t.id})})),t._on("get-google-maps-details",(function(n){n.keyMode===pt.UH.merchant&&e.action.getGoogleMapsDetails({data:n,frameId:t.id})}))}(u.controller,S,T.apiKey),pn({props:e,componentName:"autocompleteSuggestions",controllingElement:"addressElement",controllingMode:I}))}if("payment"===u.componentName){var R;if(u.publicOptions.parsedIntentSecret)w=u.controller.action.setupStoreForElementsGroup({clientSecret:u.publicOptions.parsedIntentSecret,customerOptions:null,customerSessionClientSecret:null,currency:null,locale:u.locale,groupId:u.groupId,appearance:null!==(R=u.publicOptions.appearance)&&void 0!==R?R:u.appearance,loader:u.loader,externalPaymentMethodTypes:u.externalPaymentMethodTypes,mids:u.mids});var M=null,O=function(){return at().then((function(e){var t=e.mountModal,n=e.unmountModal;return v.push((function(){n()})),t}))};S._on("setup-afterpay-modal",(function(){M||(M=O())})),S._on("mount-afterpay-modal",(function(e){var t=e.currency,n=e.locale,o=e.modalTheme;M||(M=O()),M.then((function(e){e({controller:u.controller,listenerRegistry:r,currency:t,locale:n,modalTheme:o})}))}));var x=null,Z=function(){return(0,et.a)().then((function(e){var t=e.mountModal,n=e.unmountModal;return v.push((function(){n()})),t}))};S._on("setup-affirm-modal",(function(){x||(x=Z())})),S._on("affirm-modal-open",(function(e){var t=e.link;x||(x=Z()),x.then((function(e){e({controller:u.controller,listenerRegistry:r,url:t})}))})),S._on("setup-us-bank-account",(function(){pn({props:e,componentName:"achBankSearchResults",controllingElement:"paymentElement",ariaHidden:"true"})}));var j=null;!j&&zt({wallet:"applePay",options:u})&&(j=nn(u,r,S,"applePay")),S._on("update-apple-pay",(function(e){var t;null===(t=j)||void 0===t||t.pr.update(e)}));var L=null;if(!L&&zt({wallet:"googlePay",options:u})){var B=(L=nn(u,r,S,"googlePay")).pr._backingLibraries.GOOGLE_PAY;B&&b.push(B._destroy)}if(S._on("update-google-pay",(function(e){var t;null===(t=L)||void 0===t||t.pr.update(e)})),L||j){var D,q,F;F=L&&j?"both":L?"googlePay":"applePay";var U=u.groupId;u.controller.action.fetchingWallets({groupId:U,isComplete:!1,wallet:F}),En.all([null===(D=L)||void 0===D?void 0:D.canMakePaymentPromise,null===(q=j)||void 0===q?void 0:q.canMakePaymentPromise]).then((function(){u.controller.action.fetchingWallets({groupId:U,isComplete:!0,wallet:F})}))}S._on("link-launch",(function(e){var t=e.institutionId,n=e.parsedClientSecret,r=e.hasSession,o=e.sharedSessionContext,i=e.checkoutPriceAmount,a=e.email,c=e.linkMobilePhone,s=e.linkMobilePhoneCountry,l=e.instantDebitsIncentive,d=e.businessName,p=e.deferredIntentOptions,m=e.merchantToken;(0,$t.sx)(t,null==n?void 0:n.clientSecret,null==n?void 0:n.id,u.controller,o,u.groupId,i,a,c,s,l,d,p,r,on.LJ.PaymentElement,m).then((function(e){if(!("error"in e)){var t=e.consumer;if(t&&!r){var n;u.controller.action.loginWithConsumerInfo({consumerInfo:t,groupId:u.groupId});var o=null===(n=t.redacted_payment_details[0])||void 0===n?void 0:n.id;t.country&&"US"!==t.country?u.controller.action.clearInstantDebitsIncentive({groupId:u.groupId}):o&&yn(t.consumer_session)&&u.controller.action.confirmInstantDebitsIncentiveForPaymentDetails({bankPaymentDetailsId:o,groupId:u.groupId})}else if(null!=t&&t.new_payment_details){var i=t.new_payment_details;u.controller.action.addPaymentDetails({paymentDetails:i,groupId:u.groupId})}}}))})),S._on("us-bank-account-v2-launch",(function(e){sn((0,a.Z)({options:u,onEvent:Cn(u.publicOptions)},e))})),S._on("collect-link-prefill-data",(function(e){!function(e,t,n){try{Re(n.source),e.send({action:"stripe-link-prefill-selectors",payload:Ie})}catch(e){t.report("prefill_data_selectors_error",{message:null==e?void 0:e.message,stack:null==e?void 0:e.stack,name:null==e?void 0:e.name})}}(S,u.controller,e)})),S._on("accumulate-link-prefill-data",(function(e){!function(e,t){try{Re(t.source)}catch(t){e.report("prefill_data_selectors_error",{message:null==t?void 0:t.message,stack:null==t?void 0:t.stack,name:null==t?void 0:t.name})}}(u.controller,e)})),S._on("link-no-code-default-values-recall-selectors",(function(e){Oe(S,u.controller,e)}))}S._on("mount-link-info-modal",(function(e){mn((0,a.Z)({controller:u.controller,groupId:u.groupId},e))})),S._on("mount-link-purchase-protection-detail-modal",(function(e){fn((0,a.Z)({controller:u.controller},e))})),S._on("mount-payment-method-messaging-info-modal",(function(e){!function(e){var t=e.openModalPayload,n=e.unsafeOptions,r=e.elementTimings,o=e.embeddedCheckoutMessenger,i=n.controller,a=t.type;switch(a){case"affirm_modal":if("object"==typeof o&&o&&o.hasOwnProperty("send")){o.send("mount-affirm-modal-in-embedded-checkout",{url:t.url});break}vn({url:t.url,listenerRegistry:i._listenerRegistry,controller:i});break;case"payment_method_messaging_modal":gn({openModalPayload:t,unsafeOptions:n,elementTimings:r,embeddedCheckoutMessenger:o});break;default:(0,y.Rz)(a)}}({openModalPayload:e,unsafeOptions:u,elementTimings:o,embeddedCheckoutMessenger:function(e){if("object"==typeof e&&e&&e.hasOwnProperty("_internalEmbeddedCheckoutMessenger"))return e._internalEmbeddedCheckoutMessenger}(u.publicOptions)})})),S._on("payment_method_messaging.unmount",(function(){Q(),S.destroy()})),(0,g.yq)(t,(0,a.Z)((0,a.Z)({},z.KC),{},{margin:"-4px 0",transition:"height .35s ease"})),S.appendTo(t),S.updateStyle(Ut(u.componentName,P)),w.then((function(){_=new re.E})),S._on("load",(function(){m=new re.E,S.send({action:"stripe-user-mount",payload:{rtl:H(c()),merchantPageProperties:wn(t)}})})),Y.Nb.forEach((function(e){S._on(e,(function(t){return s(e,t)}))})),S._on("set_styles",(function(e){S.updateStyle(e)})),S._on("redirectfocus",(function(e){var n,r=e.focusDirection;null===(n=(0,g.dh)(t,r))||void 0===n||n.focus()}));var G=le.ZT,W=!1,V=function(){return N||((N=document.createElement("div")).setAttribute("aria-hidden","true"),(0,p.Z)(N.style,{position:"fixed",width:"320px",height:"0"}),document.body.appendChild(N)),i||(i=(0,le.XD)((function(){return n.e(36).then(n.bind(n,2626))}))),i};S._on("track_frame_position_preload",(function(){V()})),S._on("track_frame_position_stop",(function(){W=!1,G()})),S._on("track_frame_position_start",(function(){W||(W=!0,V().then((function(e){var t=e.autoUpdate,n=e.computePosition,r=e.size;if(W&&c()){var o=S._iframe;if(o){var i=!1;window.ResizeObserver&&window.IntersectionObserver&&(i=!0);var a={ancestorScroll:i,ancestorResize:i,elementResize:i,layoutShift:i,animationFrame:!i};G(),G=(0,le.$M)(t(o,N,(function(){n(o,N,{strategy:"fixed",placement:"right-start",middleware:[r({apply:function(e){var t=e.availableWidth,n=e.availableHeight,r=e.rects,o={width:r.reference.width,height:r.reference.height,availableWidthRight:t,availableHeightBelow:n-r.reference.height,viewportPosition:{x:r.reference.x,y:r.reference.y}};S.send({action:"stripe-frame-position",payload:o})}})]})}),a))}}})))})),S._on("submit",(function(){s("submit");var e=t.closest("form");if(e){var n=['button[type="submit"]',"button:not([type])",'input[type="submit"]','input[type="image"]'].map((function(t){return e.querySelector(t)})).filter((function(e){return!!e}))[0];n&&n.click()}}));var X=(0,le.$M)((function(){var e,t,n,r,i;S.send({action:"stripe-timings",payload:{timestamps:{stripeJsLoad:o.stripeJsLoadTimestamp.getAsPosixTime(),stripeCreate:o.stripeCreateTimestamp.getAsPosixTime(),groupCreate:o.groupCreateTimestamp.getAsPosixTime(),create:o.createTimestamp.getAsPosixTime(),store:null===(e=_)||void 0===e?void 0:e.getAsPosixTime(),mount:null===(t=d)||void 0===t?void 0:t.getAsPosixTime(),load:null===(n=m)||void 0===n?void 0:n.getAsPosixTime(),loaderStart:null===(r=f)||void 0===r?void 0:r.getAsPosixTime(),loaderEnabled:P,parentVisible:null===(i=h)||void 0===i?void 0:i.getAsPosixTime()}}})}));S._on("ready",(function(e){C.hide(),f||s("loaderstart"),k.promise.then((function(){X(),u.controller.report("parent_visible",{element:u.componentName})})),s("ready",e)})),S._on("parent_visible_fallback",(function(){k.resolve()}));var Q=function(){for(u.controller.action.elementUnmounted({elementName:u.componentName,groupId:u.groupId,frameId:S.id});v.length;){var e;null===(e=v.pop())||void 0===e||e()}S.unmount()};return{update:function(e){e.appearance&&u.controller.action.updateElementsOptions({locale:void 0,appearance:e.appearance,groupId:u.groupId}),S.update(e)},focus:function(){K(),S.focus(),S.send({action:"stripe-user-focus",payload:{}})},blur:function(){S.blur()},clear:function(){S.clear()},mount:function(){d=new re.E;var e=c();if(e){P?(C.show().then((function(e){null!=e&&e.err||(f=new re.E,s("loaderstart"))})),v.push((function(){C.unmount()}))):(f=new re.E,s("loaderstart"));var t=(0,g.d3)(e,(function(){S.send({action:"stripe-parent-visible",payload:null}),h=new re.E,k.resolve()}));v.push(t),(0,g.mb)(e,[[Y.et,!0]]),v.push((function(){(0,g.mb)(e,[[Y.et,!1]])}))}},unmount:Q,destroy:function(){for(;b.length;){var e;null===(e=b.pop())||void 0===e||e()}},collapse:function(){S.collapse()},getValue:function(){return S.getValue(),new En((function(e){S._on("get-value-response",(function t(n){return S._off("get-value-response",t),e(n)}))}))},_frame:S}},Rn=["options"],Mn=["controller","componentName","publicOptions"],On=["update"],xn=function(e){var t=e.options,n=(0,d.Z)(e,Rn),r=t.controller,o=t.componentName,i=t.publicOptions,c=(0,d.Z)(t,Mn),s=function(e){switch(e){case"linkAuthentication":case"payment":case"shippingAddress":case"address":case"autocompleteSuggestions":case"achBankSearchResults":case"paymentMethodMessaging":return e;default:throw new Error("Unexpected element type for implementation")}}(o);if(["address","shippingAddress"].indexOf(s)>-1&&r.keyMode()===Gt.Kl.unknown)throw new C.No("It looks like you're using an older Stripe key. The Address Element is only available for use with a modern API key, which is prefixed with 'pk_live_' or 'pk_test_'.\n You can roll your publishable key here: https://dashboard.stripe.com/account/apikeys");var u=Ft(s,i||{},"elements.create('".concat(s,"')"),!1,t.betas);u.warnings.forEach((function(e){return r.warn(e)}));var l=["payment","linkAuthentication"].indexOf(o)>-1,p="payment"===t.componentName&&(u.value.parsedIntentSecret||null);if(l&&!t.clientSecret&&!t.deferredIntent&&!p)throw new C.No("In order to create a ".concat(t.componentName,' element, you must pass a clientSecret or mode when creating the Elements group.\n\n e.g. stripe.elements({clientSecret: "{{CLIENT_SECRET}}"})'));var m=In((0,a.Z)((0,a.Z)({},n),{},{options:(0,a.Z)((0,a.Z)({},c),{},{controller:r,componentName:s,publicOptions:u.value})})),f=m.update,_=(0,d.Z)(m,On);return(0,a.Z)({update:function(e){var n=Ft(s,e||{},"".concat(s,".update()"),!0,t.betas);n.warnings.forEach((function(e){return r.warn(e)})),f(n.value)}},_)},Zn=function(e){return(0,S.uN)(e,"ume_beta_1")},jn=function(e){if(Zn(e.options.betas)&&e.options.controller.warn("You're using a beta version of the Payment Method Messaging Element that is no longer supported. Learn how to upgrade to the new version: https://docs.stripe.com/payments/payment-method-messaging"),function(e){if(!Zn(e.betas))return!1;var t=e.controller._apiKey;return!t||0===t.toLowerCase().indexOf("pk_xx")}(e.options))return function(e){return e.options.controller.report("payment_method_messaging.noop_legacy_implementation",{options:{componentName:e.options.componentName},betas:e.options.betas}),{mount:function(){},unmount:function(){},update:function(){},focus:function(){},blur:function(){},clear:function(){}}}(e);var t=xn(e),n=t._frame;return n&&n._on("click",(function(){e.emitEvent("click")})),t},Ln=n(2388),Bn=n(925),Dn=n(2543),qn=n(6274).Promise,Fn=function(e){var t=e.controller,n=e.eventName,r=e.time,o=e.timeLabel,i=e.reject,a=e.rejectFunctionName,c=void 0===a?"reject":a,s=e.resolve,u=e.betas,l=null,d=!1,p=!1;return l=setTimeout((function(){p=!0;var e="Timed out waiting for a call to resolve() or ".concat(c,'(). If you listen to the "').concat(n,'" event, then you must call event.resolve() or event.').concat(c,'() in the "').concat(n,'" handler within ').concat(o,".");(0,S.uN)(u,S.M4.ece_temp_prevent_default_beta_1)||"preventDefault"!==c||(e='Timed out waiting for a call to resolve(). If you listen to the "'.concat(n,'" event, then you must call event.resolve in the "').concat(n,'" handler within ').concat(o,".")),t.warn(e),i("Stripe.js: Timeout hit")}),r),{resolve:function(e){if(p)t.warn("Call to resolve() was ignored because it has already timed out. Please ensure that resolve is called within ".concat(o,"."));else{if(d){var n="Call to resolve() was ignored because resolve or ".concat(c," has already been called. Do not call resolve or ").concat(c," more than once.");return(0,S.uN)(u,S.M4.ece_temp_prevent_default_beta_1)||"preventDefault"!==c||(n="Call to resolve() was ignored because resolve has already been called. Do not call resolve more than once."),void t.warn(n)}l&&clearTimeout(l),d=!0,s(e)}},reject:function(){p?t.warn("Call to ".concat(c,"() was ignored because it has already timed out. Please ensure that ").concat(c," is called within ").concat(o,".")):d?t.warn("Call to ".concat(c,"() was ignored because resolve or ").concat(c," has already been called. Do not call resolve or ").concat(c," more than once.")):(l&&clearTimeout(l),d=!0,i("Stripe.js: Called by merchant"))}}},Un=function(){throw new C.No("You cannot update the currency if the payment interface is already open.")},Gn=function(e,t,n){return e(1===n?"ece.".concat(t):"ece.".concat(t,"s"))},zn=n(7934),Hn=n(2920),Kn=n(7703),Yn=n(3234),Wn=n(6274).Promise,Vn=0,Xn=1,Qn=function(e){if(!e)return null;var t=[e.givenName,e.familyName].filter((function(e){return e&&"string"==typeof e})).join(" ");return""===t?null:t},Jn=function(e,t){if(e){return(0,Kn.Fq)(e,(function(){t.report("ece.apple_pay.missing_country_code",{element:A.Yj.expressCheckout,country:e.country})}))}},$n=function(e,t,n){t.report("ece.apple_pay.session_creation_failed",{element:A.Yj.expressCheckout,error:n}),e.abort();var r=n.message;"string"==typeof r&&t.warn(r)},er=function(e,t,n,r){return{amount:(0,_n.Fe)(e,n,"apple"),label:t,type:r?"pending":"final"}},tr=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],i=arguments.length>5?arguments[5]:void 0,a=!1,c=(0,zn.RO)(e,a,r,o,n,i);return c.push("maestro"),(0,S.uN)(t,"cup_apple_pay_beta_1")&&c.push("chinaUnionPay"),(0,S.uN)(t,"interac_apple_pay_beta_1")&&"cad"===n&&c.unshift("interac"),(0,S.uN)(t,"cartes_bancaires_apple_pay_beta_1")&&"eur"===n&&-1===c.indexOf("cartesBancaires")&&c.unshift("cartesBancaires"),c.filter((function(e){return null!==e}))},nr=function(e,t,n){var r=t.amount,o=t.deliveryEstimate,i=t.displayName,a=t.id;return function(e,t){if("string"==typeof e)return qn.resolve(e);var n=e.minimum,r=e.maximum;if(!n&&!r)return qn.resolve("");if(n&&!r){var o=n.value,i=n.unit;return Gn(t,i,o).then((function(e){return t("ece.delivery_in",{value:o.toString(),unit:e||""})}))}if(!n&&r){var a=r.value,c=r.unit;return Gn(t,c,a).then((function(e){return t("ece.delivery_within",{value:a.toString(),unit:e||""})}))}var s=n,u=s.unit,l=s.value,d=r,p=d.unit,m=d.value;return u===p?Gn(t,p,m).then((function(e){return t("ece.delivery_in_to",{minValue:l.toString(),maxValue:m.toString(),unit:e||""})})):Gn(t,u,l).then((function(e){return Gn(t,p,m).then((function(n){return t("ece.delivery_in_to_units",{minValue:l.toString(),minUnit:e||"",maxValue:m.toString(),maxUnit:n||""})}))}))}(o||{},e).then((function(e){return{label:i,detail:e||"",amount:(0,_n.Fe)(r,n,"apple"),identifier:a}}))},rr=function(e){var t=e.administrativeArea,n=e.countryCode;return{city:e.locality||"",state:t||"",postal_code:e.postalCode||"",country:(null==n?void 0:n.toUpperCase())||""}},or=function(e){if(e){var t=e.addressLines;return(0,a.Z)({line1:t&&Array.isArray(t)?t[0]:"",line2:t&&Array.isArray(t)?t.slice(1).join(", "):null},rr(e))}},ir=function(e,t){if(t)return Object.values(t).every((function(e){return!e}))?void 0:{name:e,address:t}},ar=function(e){var t=e.controller,n=e.eventHandlers,r=e.groupId,o=e.listenerRegistry,i=e.betas,s=e.blockedCardBrands,u=e.elementsInitSource,l=e.minApplePayVersion,d={isPaymentSheetShowing:!1,total:0,businessName:"",currency:"usd",pending:!1,shippingRates:void 0,selectedShippingRate:void 0,allowedShippingCountries:void 0,lineItems:void 0,privateSession:void 0,isUsingRecurringPaymentRequest:!1,isUsingAutomaticReloadPaymentRequest:!1,isUsingDeferredPaymentRequest:!1,recurringPaymentRequestBillingAgreement:void 0,automaticReloadPaymentRequestBillingAgreement:void 0,applePayTokenRevokeWebhookUrl:void 0},p=function(){d.isPaymentSheetShowing=!1,d.privateSession=void 0,t.action.expressCheckoutSheetClosed({groupId:r}),t.action.expressCheckoutConfirmEnd({groupId:r})};if("checkout"!==u&&l)throw new C.No("The Apple Pay version cannot be customized.");var m="checkout"===u&&l?l:4,f=function(e,i){o.addEventListener(e,"validatemerchant",(0,I.TC)(function(e){var t=e.privateSession,n=e.controller,r=e.displayName,o=e.isPaymentSheetShowing;return function(e){n.action.createApplePaySession({data:{validation_url:e.validationURL,domain_name:(0,Yn.A)(n.report),display_name:r},usesExpressCheckoutElement:!0}).then((function(e){switch(e.type){case"object":if(!o())return;t.completeMerchantValidation(JSON.parse(e.object.session));break;case"error":$n(t,n,e.error);break;default:(0,y.Rz)(e)}}),(function(e){return $n(t,n,e)}))}}({privateSession:e,controller:t,displayName:i,isPaymentSheetShowing:function(){return d.isPaymentSheetShowing}}))),o.addEventListener(e,"cancel",(0,I.TC)((function(){p(),n.cancel({paymentMethodType:"apple_pay"})})));var c=function(){var e=d.total,t=d.businessName,n=d.currency,r=d.pending;return er(e,t,n,r)},s=function(e,n){var r;return d.total=null!==(r=e.amount)&&void 0!==r?r:d.total,function(e){var n=e.lineItems,r=e.shippingRates,o=e.applePay,i=d.currency,c=d.pending,s=d.isUsingRecurringPaymentRequest,u=d.isUsingAutomaticReloadPaymentRequest,l=d.isUsingDeferredPaymentRequest,p=d.recurringPaymentRequestBillingAgreement,m=d.automaticReloadPaymentRequestBillingAgreement;if(!s&&null!=o&&o.recurringPaymentRequest)throw new C.No("You tried to update an applePay.recurringPaymentRequest without creating the object first. You must provide an applePay.recurringPaymentRequest object while resolving the 'click' event in order to update it later.");if(!u&&null!=o&&o.automaticReloadPaymentRequest)throw new C.No("You tried to update an applePay.automaticReloadPaymentRequest without creating the object first. You must provide an applePay.automaticReloadPaymentRequest object while resolving the 'click' event in order to update it later.");if(!l&&null!=o&&o.deferredPaymentRequest)throw new C.No("You tried to update an applePay.deferredPaymentRequest without creating the object first. You must provide an applePay.deferredPaymentRequest object while resolving the 'click' event in order to update it later.");var f=null==n?void 0:n.map((function(e){var t=e.amount,n=e.name;return er(t,n,i,c)})),_=(0,P.Xy)(r,d.shippingRates)||null==r?void 0:r.map((function(e){return nr((function(e,n){return t.action.unsafeLocalizeString({message:e,data:n})}),e,i)}));return Wn.all(null!=_?_:[]).then((function(e){var n=(0,Kn.jQ)({recurringPaymentRequest:null!=o&&o.recurringPaymentRequest?(0,a.Z)((0,a.Z)({},null==o?void 0:o.recurringPaymentRequest),{},{billingAgreement:p}):void 0,currency:i,pending:c,warn:t.warn}),r=(0,Kn.IK)({automaticReloadPaymentRequest:null!=o&&o.automaticReloadPaymentRequest?(0,a.Z)((0,a.Z)({},null==o?void 0:o.automaticReloadPaymentRequest),{},{billingAgreement:m}):void 0,currency:i,pending:c,warn:t.warn}),s=(0,Kn.sI)({deferredPaymentRequest:null==o?void 0:o.deferredPaymentRequest,currency:i,pending:c,warn:t.warn});return{newLineItems:f,newShippingMethods:e.length?e:void 0,newRecurringPaymentRequest:n,newAutomaticReloadPaymentRequest:r,newDeferredPaymentRequest:s}}))}(e).then((function(t){var r=t.newLineItems,o=t.newShippingMethods,i=t.newRecurringPaymentRequest,a=t.newDeferredPaymentRequest,s=t.newAutomaticReloadPaymentRequest,u=c();return d.lineItems=r||d.lineItems,d.shippingRates=e.shippingRates||d.shippingRates,e.shippingRates&&!(0,P.Xy)(e.shippingRates,d.shippingRates)?d.selectedShippingRate=e.shippingRates[0].id:n&&(d.selectedShippingRate=n.identifier),i?i.tokenNotificationURL=d.applePayTokenRevokeWebhookUrl:s?s.tokenNotificationURL=d.applePayTokenRevokeWebhookUrl:a&&(a.tokenNotificationURL=d.applePayTokenRevokeWebhookUrl),{newLineItems:d.lineItems,newShippingMethods:o,newTotal:u,newRecurringPaymentRequest:i,newAutomaticReloadPaymentRequest:s,newDeferredPaymentRequest:a}}))};o.addEventListener(e,"shippingcontactselected",(0,I.TC)((function(t){var r=t.shippingContact,o=rr(r);if(d.allowedShippingCountries&&d.allowedShippingCountries.length&&-1===d.allowedShippingCountries.indexOf(o.country)){var i=c(),a=d.lineItems,u=new window.ApplePayError("shippingContactInvalid","country","We can not ship to this country.");e.completeShippingContactSelection({newTotal:i,newLineItems:a,errors:[u]})}else{var l={paymentMethodType:"apple_pay",name:"",address:o,resolve:function(t){s(t).then((function(t){e.completeShippingContactSelection(t)}))},reject:function(){var t=c(),n=d.lineItems,r=new window.ApplePayError("shippingContactInvalid","postalAddress");e.completeShippingContactSelection({newTotal:t,newLineItems:n,errors:[r]})}};n.shippingAddressChange(l)}})));o.addEventListener(e,"shippingmethodselected",(0,I.TC)((function(r){var o=r.shippingMethod,i=(0,P.sE)(d.shippingRates||[],(function(e){return e.id===o.identifier}));if(i){var a={paymentMethodType:"apple_pay",shippingRate:i,resolve:function(t){s(t,o).then((function(t){return e.completeShippingMethodSelection(t)}))},reject:function(){var t=c();e.completeShippingMethodSelection(Xn,t,[]),p(),n.cancel({paymentMethodType:"apple_pay"})}};n.shippingRateChange(a)}else{t.report("ece.apple_pay.unexpected_shipping_rate",{element:A.Yj.expressCheckout});var u={newTotal:c()};e.completeShippingMethodSelection(u)}})));o.addEventListener(e,"paymentauthorized",(0,I.TC)((function(o){var i=o.payment;t.action.expressCheckoutConfirmStart({groupId:r,paymentMethodType:"apple_pay"}).then((function(){return t.action.tokenizeWithData({type:"apple_pay",elementName:A.Yj.expressCheckout,tokenData:(0,a.Z)((0,a.Z)({},i),{},{billingContact:Jn(i.billingContact,t)}),mids:t.mids()})})).then((function(o){var a;if("error"===o.type){var c=new window.ApplePayError("unknown");return e.completePayment({status:Xn,errors:[c]}),t.report("ece.apple_pay.create_token_failed",{element:A.Yj.expressCheckout,error:o.error}),void t.action.expressCheckoutConfirmEnd({groupId:r})}var s=Jn(i.shippingContact,t),u=function(e){if(!e)return{};var t=e.addressLines,n=e.locality,r=e.administrativeArea,o=e.postalCode,i=e.countryCode;return{line1:t&&Array.isArray(t)?t[0]:void 0,line2:t&&Array.isArray(t)?t.slice(1).join(", "):void 0,city:n,state:r,postal_code:o,country:i}}(s),l=or(i.shippingContact),p=Jn(i.billingContact,t),m=or(i.billingContact),f=m||null!=s&&s.emailAddress||null!=s&&s.phoneNumber?{name:Qn(p)||void 0,email:null==s?void 0:s.emailAddress,phone:null==s?void 0:s.phoneNumber,address:m}:void 0,_=d.selectedShippingRate?(0,P.sE)(d.shippingRates||[],(function(e){return e.id===d.selectedShippingRate})):void 0,h={paymentMethodType:"apple_pay",paymentFailed:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=n.reason,i=void 0===o?"fail":o,a="invalid_shipping_address"===i?new window.ApplePayError("shippingContactInvalid","addressLines"):new window.ApplePayError("unknown");e.completePayment({status:Xn,errors:[a]}),t.action.expressCheckoutConfirmEnd({groupId:r})},billingDetails:f,shippingAddress:ir(null!==(a=Qn(s))&&void 0!==a?a:"",l),shippingRate:_};t.action.setExpressCheckoutConfirmData({groupId:r,shippingContact:{name:Qn(s),address:u,phone:null},paymentMethodData:{type:k.GS.card,card:{token:o.object.id},billing_details:{email:null==s?void 0:s.emailAddress,phone:null==s?void 0:s.phoneNumber}}}).then((function(){return n.confirm(h)}))}))})));"custom_checkout"!==u&&"checkout"!==u||o.addEventListener(e,"paymentmethodselected",(0,I.TC)((function(t){var r=t.paymentMethod,o={paymentMethodType:"apple_pay",name:"",address:rr(r.billingContact||Bn.zc),resolve:function(t){s(t).then((function(t){return e.completePaymentMethodSelection(t)}))},reject:function(){var t=c(),n=d.lineItems,r=new window.ApplePayError("billingContactInvalid","postalAddress");e.completePaymentMethodSelection({newTotal:t,newLineItems:n,errors:[r]})}};n.__privateDoNotUseBillingAddressChange(o)})));"checkout"===u&&o.addEventListener(e,"couponcodechanged",(0,I.TC)((function(t){var r={paymentMethodType:"apple_pay",couponCode:t.couponCode,changeFailed:function(t){var n=new window.ApplePayError("couponCodeInvalid");s(t).then((function(t){return e.completeCouponCodeChange({newTotal:t.newTotal,newLineItems:t.newLineItems,errors:[n]})}))},resolve:function(t){s(t).then((function(t){return e.completeCouponCodeChange(t)}))},reject:function(){var t=c(),n=d.lineItems,r=new window.ApplePayError("couponCodeInvalid");e.completeCouponCodeChange({newTotal:t,newLineItems:n,errors:[r]})}};n.__privateDoNotUseCouponCodeChange(r)})))};return{shouldShowButton:function(e){return t.action.shouldShowEceButton({groupId:r,shouldShowButton:e,button:"applePay"})},clickHandler:function(e,n){var o,u,l,p,_=window.ApplePaySession;if(!_)return t.warn("User clicked on the Apple Pay button, but window.ApplePaySession does not exist."),void t.report("ece.apple_pay.missing_window_session",{element:A.Yj.expressCheckout});var h=(null===(o=n.business)||void 0===o?void 0:o.name)||e.businessName,y=e.currency,v=e.applePayLaterDisabled,g=function(e,t){var n,r,o;return(0!==e.amount||0!==(null===(n=t.applePay)||void 0===n||null===(r=n.recurringPaymentRequest)||void 0===r||null===(o=r.trialBilling)||void 0===o?void 0:o.amount))&&e.pending}(e,n);d.total=e.amount,d.businessName=h,d.currency=y,d.pending=g,d.shippingRates=n.shippingRates,d.selectedShippingRate=null===(u=n.shippingRates)||void 0===u||null===(l=u[0])||void 0===l?void 0:l.id,d.allowedShippingCountries=n.allowedShippingCountries,d.lineItems=null===(p=n.lineItems)||void 0===p?void 0:p.map((function(e){var t=e.amount,n=e.name;return er(t,n,y,g)}));var b=(0,a.Z)((0,a.Z)((0,a.Z)({},e),n),{},{pending:g,businessName:h,warn:t.warn,localizeString:function(e,n){return t.action.unsafeLocalizeString({message:e,data:n})},betas:i,blockedCardBrands:s,account:t.getCredentials().stripeAccount});v&&(b.applePay=(0,a.Z)((0,a.Z)({},b.applePay),{},{applePayLaterAvailability:J.yv.unavailableItemIneligible})),function(e){var t=e.amount,n=e.billingAddressRequired,r=e.businessName,o=e.merchantCountry,i=e.currency,s=e.emailRequired,u=e.lineItems,l=e.pending,d=e.phoneNumberRequired,p=e.shippingAddressRequired,m=e.shippingRates,f=e.applePay,_=e.defaultBillingAgreement,h=e.applePayTokenRevokeWebhookUrl,y=e.warn,v=e.localizeString,g=e.betas,b=e.account,w=e.blockedCardBrands,k=e.capabilityEnabledCardNetworks,P=e.isConnectPlatform,C=[].concat((0,c.Z)(s?["email"]:[]),(0,c.Z)(d?["phone"]:[]),(0,c.Z)(p?["postalAddress"]:[])),E=n?["postalAddress"]:[],A=null==m?void 0:m.map((function(e){return nr(v,e,i)})),N=h+function(e,t){return"merchant.".concat((t?[e,t]:[e]).join("."),".stripe")}(window.location.hostname,b);return Wn.all(null!=A?A:[]).then((function(e){var n=null==u?void 0:u.map((function(e){var t=e.amount,n=e.name;return er(t,n,i,l)})),c=null!=f?f:{},s=c.recurringPaymentRequest,d=c.deferredPaymentRequest,p=c.automaticReloadPaymentRequest,m=c.supportsCouponCode,h=c.couponCode,v=["supports3DS"];return null!=f&&f.cardFunding&&v.push(f.cardFunding),((0,S.uN)(g,"cup_apple_pay_beta_1")||(0,S.uN)(g,"interac_apple_pay_beta_1")&&"cad"===i)&&v.push("supportsEMV"),(0,a.Z)({countryCode:o,currencyCode:i.toUpperCase(),lineItems:n,merchantCapabilities:v,requiredBillingContactFields:E,requiredShippingContactFields:C,shippingMethods:e.length?e:void 0,supportedNetworks:tr(o,g,i,w,k,P),total:er(t,r,i,l),recurringPaymentRequest:(0,Kn.jQ)({recurringPaymentRequest:s,currency:i,pending:l,defaultBillingAgreement:_,applePayTokenRevokeWebhookUrl:N,warn:y}),deferredPaymentRequest:(0,Kn.sI)({deferredPaymentRequest:d,currency:i,pending:l,defaultBillingAgreement:_,applePayTokenRevokeWebhookUrl:N,warn:y}),automaticReloadPaymentRequest:(0,Kn.IK)({automaticReloadPaymentRequest:p,currency:i,pending:l,defaultBillingAgreement:_,applePayTokenRevokeWebhookUrl:N,warn:y}),applePayLaterAvailability:"auto"===(null==f?void 0:f.applePayLaterAvailability)?"available":null==f?void 0:f.applePayLaterAvailability,supportsCouponCode:m,couponCode:h},null==f?void 0:f.paymentRequestPassthrough)}))}(b).then((function(e){var n,o,i,a,c,s,u;d.isUsingRecurringPaymentRequest=!!e.recurringPaymentRequest,d.recurringPaymentRequestBillingAgreement=null===(n=e.recurringPaymentRequest)||void 0===n?void 0:n.billingAgreement,d.isUsingAutomaticReloadPaymentRequest=!!e.automaticReloadPaymentRequest,d.automaticReloadPaymentRequestBillingAgreement=null===(o=e.automaticReloadPaymentRequest)||void 0===o?void 0:o.billingAgreement,d.isUsingDeferredPaymentRequest=!!e.deferredPaymentRequest;var l=new _(m,e);d.applePayTokenRevokeWebhookUrl=null!==(i=null!==(a=null===(c=e.recurringPaymentRequest)||void 0===c?void 0:c.tokenNotificationURL)&&void 0!==a?a:null===(s=e.deferredPaymentRequest)||void 0===s?void 0:s.tokenNotificationURL)&&void 0!==i?i:null===(u=e.automaticReloadPaymentRequest)||void 0===u?void 0:u.tokenNotificationURL,d.privateSession=l,f(l,h),l.begin(),d.isPaymentSheetShowing=!0,t.action.expressCheckoutSheetOpened({groupId:r,paymentMethodType:"apple_pay"}),t.report("ece.sheet_visible",{element:A.Yj.expressCheckout,payment_method:"apple_pay"})}))},canMakePayments:function(e){var n=window.location.hostname,r=t.getCredentials().stripeAccount,o=t.keyMode()===Gt.Kl.test;return(0,Hn.Qt)(n,r,o,t.report,m,e)},completePayment:function(e){if(e){var n,o=new window.ApplePayError("unknown");null===(n=d.privateSession)||void 0===n||n.completePayment({status:Xn,errors:[o]}),t.action.expressCheckoutConfirmEnd({groupId:r})}else{var i;null===(i=d.privateSession)||void 0===i||i.completePayment({status:Vn}),p()}}}},cr=function(e){return e.reduce((function(e,t){return e.push.apply(e,(0,c.Z)(lt.L$[t])),e}),[])},sr=function(e,t){if(null!=e&&e.length){var n=cr(e);return(0,c.Z)(A.iw).filter((function(e){return-1===n.indexOf(e)}))}return null!=t&&t.length?cr(t):[]},ur=n(2496),lr=n(4417),dr=n(6274).Promise,pr=function(e){var t,n,r=e.component,o=e.elementTimings,i=e.getParent,c=e.emitEvent,s=e.options,u=e.selfDestruct,l=e.hasRegisteredListener,d=e.listenerRegistry,p=s.controller,m=s.groupId,f=s.publicOptions,_=s.betas,h=s.allowedCardBrands,y=s.disallowedCardBrands,v=null,w={runOnUnmount:[],updateRequest:{isCalled:!1,inMerchantEventHandler:!1}},k=null===(t=f.__checkout)||void 0===t?void 0:t.embeddedCheckoutMessenger,E=function(e){var t=e.controller,n=e.componentName,r=e.groupId,o=e.fonts,i=e.wait,a=e.publicOptions,c=e.controllingElement,s=e.elementsInitSource,u={fonts:o,wait:i,rtl:H(document.body),publicOptions:a,controllingElement:c,elementsInitSource:s};return t.createElementFrame(U.NC.EXPRESS_CHECKOUT_ELEMENT,n,r,u)}(s);(0,g.yq)(r,(0,a.Z)((0,a.Z)({},Bn.KC),{},{margin:"-4px 0",transition:"height .35s ease"})),E.appendTo(r),E.updateStyle(Bn.CF),E._on("set_styles",(function(e){E.updateStyle(e)})),E._on("redirectfocus",(function(e){var t,n=e.focusDirection;null===(t=(0,g.dh)(r,n))||void 0===t||t.focus()}));var N=(0,le.$M)((function(){E.send({action:"stripe-timings",payload:{timestamps:{stripeJsLoad:o.stripeJsLoadTimestamp.getAsPosixTime(),stripeCreate:o.stripeCreateTimestamp.getAsPosixTime(),groupCreate:o.groupCreateTimestamp.getAsPosixTime(),create:o.createTimestamp.getAsPosixTime(),mount:v?v.getAsPosixTime():0}}})}));E._on("load",(function(){E.send({action:"stripe-user-mount",payload:{rtl:H(i())}}),N()})),E._on("update-start",(function(){w.updateRequest.inMerchantEventHandler&&(w.updateRequest.isCalled=!0)})),E._on("update-end",(function(){var e,t;null===(e=(t=w.updateRequest).resolve)||void 0===e||e.call(t),w.updateRequest.isCalled=!1}));var T=function(e){new dr((function(e){w.updateRequest.isCalled?w.updateRequest.resolve=e:e()})).then((function(){return s.controller.action.getElementsSessionAmountModeCurrency({groupId:m})})).then((function(t){var n=t.amount,r=t.mode,o=t.currency;w.amount=n,e(n,o,r)}))},I=function(){k&&k.send("hide_ece_overlay",null)},R=function(e,t){var n=t.paymentMethodType,r=!("nonce"in t),o="ece.".concat(function(e){return"shippingaddresschange"===e?"shipping_address_change":"shippingratechange"===e?"shipping_rate_change":"__private_do_not_use_billingaddresschange"===e?"__private_do_not_use_billing_address_change":"__private_do_not_use_coupon_code_change"}(e));if(p.report(o,{element:A.Yj.expressCheckout,payment_method:n}),l(e)){var i;i=r?function(){t.reject(),w.updateRequest.inMerchantEventHandler=!1}:function(){E.send({action:"stripe-ece-change-event",payload:{nonce:t.nonce}}),w.updateRequest.inMerchantEventHandler=!1};var u,d,m=Fn({controller:p,eventName:e,time:19900,timeLabel:"20 seconds",reject:function(){p.report("".concat(o,".reject"),{element:A.Yj.expressCheckout,payment_method:n}),i()},resolve:function(i){T((function(c,u,l){w.lastCurrency&&u!==w.lastCurrency&&Un();var d=(0,Ln.lK)(i,e,n,"SETUP_INTENT"===l,null==s?void 0:s.elementsInitSource),m=d.value;d.warnings.forEach((function(e){return p.warn(e)})),p.report("".concat(o,".resolve"),{element:A.Yj.expressCheckout,payment_method:n,hasLineItems:!!m.lineItems,hasShippingRates:!!m.shippingRates}),w.lineItems=m.lineItems||w.lineItems,(0,Ln.uU)(c,w.lineItems),r?t.resolve((0,a.Z)((0,a.Z)({},m),{},{amount:c})):E.send({action:"stripe-ece-change-event",payload:{nonce:t.nonce,changePayload:(0,a.Z)((0,a.Z)({},m),{},{amount:c})}})})),w.updateRequest.inMerchantEventHandler=!1},betas:_}),f=m.resolve,h=m.reject;return"changeFailed"in t&&"__private_do_not_use_couponcodechange"===e&&(u=function(o){var i;i=o,T((function(o,c,u){w.lastCurrency&&c!==w.lastCurrency&&Un();var l=(0,Ln.lK)(i,e,n,"SETUP_INTENT"===u,null==s?void 0:s.elementsInitSource),d=l.value;l.warnings.forEach((function(e){return p.warn(e)})),p.report("ece.__private_do_not_use_coupon_code_change.change_failed",{element:A.Yj.expressCheckout,payment_method:n}),w.lineItems=d.lineItems||w.lineItems,(0,Ln.uU)(o,w.lineItems),r?t.changeFailed((0,a.Z)((0,a.Z)({},d),{},{amount:o})):E.send({action:"stripe-ece-change-event",payload:{nonce:t.nonce,changePayload:(0,a.Z)((0,a.Z)({},d),{},{amount:o})}})})),w.updateRequest.inMerchantEventHandler=!1}),d="name"in t?{name:t.name,address:t.address}:"shippingRate"in t?{shippingRate:t.shippingRate}:{couponCode:t.couponCode,changeFailed:u},w.updateRequest.inMerchantEventHandler=!0,void c(e,(0,a.Z)((0,a.Z)({},d),{},{reject:h,resolve:f}))}T((function(e,n){w.lastCurrency&&n!==w.lastCurrency&&Un(),r?t.resolve({amount:e}):E.send({action:"stripe-ece-change-event",payload:{nonce:t.nonce,changePayload:{amount:e}}})}))},M=function(e){var t;c("cancel"),null===(t=w.unmountOverlay)||void 0===t||t.call(w);var n=e.paymentMethodType;p.report("ece.cancel",{element:A.Yj.expressCheckout,payment_method:n})},O=function(e){var t=e.paymentMethodType,n=e.billingDetails,r=e.shippingAddress,o=e.shippingRate;if(p.report("ece.confirm",{element:A.Yj.expressCheckout,payment_method:t}),!l("confirm"))throw new C.No("Unhandled expressCheckout Element confirm event. Make sure to register a confirm handler.");var i=(0,a.Z)((0,a.Z)({},(0,S.uN)(_,"express_checkout_element_beta_1")?{paymentMethodType:t}:{expressPaymentType:t}),{},{billingDetails:n,shippingAddress:r,shippingRate:o,paymentFailed:function(n){var r=(0,Ln.lH)(n),o=r.value;r.warnings.forEach((function(e){return p.warn(e)})),p.report("ece.confirm.payment_failed",{element:A.Yj.expressCheckout,payment_method:t,reason:o.reason}),p.action.getIsAwaitingConfirmCallback({groupId:m}).then((function(t){if(!t)throw new C.No("Unexpected call to paymentFailed(). Ensure you are either submitting a payment or calling paymentFailed() once per expressCheckout Element confirm event.");!("nonce"in e)?e.paymentFailed(o):E.send({action:"stripe-ece-confirm-payment",payload:{nonce:e.nonce,paymentFailedPayload:o}})}))}},!1===f.__autoClose?{paymentSucceeded:function(){p.action.closeECEPaymentSheet({groupId:m,isError:!1,errorMessageMethodName:"paymentSucceeded()",forceClose:!0})}}:{});c("confirm",i)},x=ar({controller:p,eventHandlers:{cancel:function(e){return M(e)},__privateDoNotUseBillingAddressChange:function(e){return R("__private_do_not_use_billingaddresschange",e)},__privateDoNotUseCouponCodeChange:function(e){return R("__private_do_not_use_couponcodechange",e)},shippingAddressChange:function(e){return R("shippingaddresschange",e)},shippingRateChange:function(e){return R("shippingratechange",e)},confirm:O},groupId:m,listenerRegistry:d,betas:_,blockedCardBrands:sr(h,y),elementsInitSource:null==s?void 0:s.elementsInitSource,minApplePayVersion:null===(n=f.__checkout)||void 0===n?void 0:n.minApplePayVersion});p.action.getElementsSessionUnverifiedPaymentMethodsOnDomain({groupId:m,wallets:f.paymentMethods}).then((function(e){var t,n,r;-1!==e.indexOf("apple_pay")||"never"===(null===(t=f.paymentMethods)||void 0===t?void 0:t.applePay)?x.shouldShowButton(!1):"always"===(null===(n=f.paymentMethods)||void 0===n?void 0:n.applePay)?x.canMakePayments(!1).then((function(e){x.shouldShowButton(e)})):x.canMakePayments(!0).then((function(e){x.shouldShowButton(e)})),-1===e.indexOf("google_pay")&&"never"!==(null===(r=f.paymentMethods)||void 0===r?void 0:r.googlePay)&&"https:"!==window.location.protocol&&(p.action.shouldShowEceButton({groupId:m,button:"googlePay",shouldShowButton:!1}),p.warn("You are testing over HTTP, so Google Pay will not appear. You must use HTTPS in order to use Google Pay."))})),E._on("ece-outer-pm-complete-payment",(function(e){"apple_pay"===e.paymentMethodType&&x.completePayment(e.isError)})),E._on("dismiss-overlay",(function(){var e;null===(e=w.unmountOverlay)||void 0===e||e.call(w)})),E._on("cancel",(function(e){M(e)})),E._on("click",(function(e){var t=e.paymentMethodType,n="apple_pay"===t,r="click";if(p.report("ece.click",{element:A.Yj.expressCheckout,payment_method:t}),function(e){var t=e.paymentMethodType;return"paypal"===t||"klarna"===t||(0,lr.r2)(t)||"iOS"===(0,b.d4)(window.navigator.userAgent)&&"google_pay"===t}(e)){var o=e.overlayString,i=e.fontValues,u=e.paymentMethodType;if("link"!==u)if(k)!function(e,t,n){k&&k.send("show_ece_overlay",{pmt:e,overlayString:t,fontValues:n})}(u,o,i),w.unmountOverlay=I,w.runOnUnmount.push(I);else{var d=(0,ur.C)(u,o,i),m=d.mount,f=d.unmount;m(),w.unmountOverlay=f,w.runOnUnmount.push(f)}}if(l(r)){var h=function(){w.updateRequest.inMerchantEventHandler=!1};n||(h=function(t){var n;E.send({action:"stripe-user-ece-button-click",payload:{nonce:e.nonce,errorReason:t}}),null===(n=w.unmountOverlay)||void 0===n||n.call(w)},w.updateRequest.inMerchantEventHandler=!1);var y=Fn({controller:s.controller,eventName:r,time:800,timeLabel:"1 second",reject:h,rejectFunctionName:"preventDefault",resolve:function(r){T((function(o,i,c){var u,l,d,m,f;w.lastCurrency=i;var h=(0,Ln.PY)(r,"SETUP_INTENT"===c,t,_,null==s?void 0:s.elementsInitSource),y=h.value;h.warnings.forEach((function(e){return p.warn(e)})),p.report("ece.click.options",(0,a.Z)((0,a.Z)({},(0,P.ei)(y,["allowedShippingCountries","business","billingAddressRequired","emailRequired","phoneNumberRequired","shippingAddressRequired"])),{},{usesApplePayRecurringPayment:!(null===(u=y.applePay)||void 0===u||!u.recurringPaymentRequest),usesApplePayDeferredPayment:!(null===(l=y.applePay)||void 0===l||!l.deferredPaymentRequest),usesApplePayAutomaticReloadPayment:!(null===(d=y.applePay)||void 0===d||!d.automaticReloadPaymentRequest),usesApplePayPaymentRequestPassthrough:!(null===(m=y.applePay)||void 0===m||!m.paymentRequestPassthrough),applePayLaterAvailability:null===(f=y.applePay)||void 0===f?void 0:f.applePayLaterAvailability,hasLineItems:!!y.lineItems,hasShippingRates:!!y.shippingRates,element:A.Yj.expressCheckout,payment_method:t})),w.lineItems=y.lineItems||w.lineItems,(0,Ln.uU)(o,w.lineItems),n?x.clickHandler((0,a.Z)((0,a.Z)({},e),{},{amount:o,currency:i}),(0,a.Z)((0,a.Z)({},Dn.GN),y)):E.send({action:"stripe-user-ece-button-click",payload:{nonce:e.nonce,clickPayload:(0,a.Z)((0,a.Z)((0,a.Z)({},Dn.GN),y),{},{mids:p.mids(),amount:o})}})})),w.updateRequest.inMerchantEventHandler=!1},betas:_}),v=y.resolve,g=y.reject;return w.updateRequest.inMerchantEventHandler=!0,void((0,S.uN)(_,"express_checkout_element_beta_1")?c(r,(0,a.Z)({paymentMethodType:t,resolve:v},(0,S.uN)(_,"ece_temp_prevent_default_beta_1")?{preventDefault:g}:{})):c(r,(0,a.Z)({expressPaymentType:t,resolve:v},(0,S.uN)(_,"ece_temp_prevent_default_beta_1")?{preventDefault:g}:{})))}T((function(t,r){w.lastCurrency=r,n?x.clickHandler((0,a.Z)((0,a.Z)({},e),{},{amount:t,currency:r}),Dn.GN):E.send({action:"stripe-user-ece-button-click",payload:{nonce:e.nonce,clickPayload:(0,a.Z)((0,a.Z)({},Dn.GN),{},{mids:p.mids(),amount:t})}})}))})),E._on("shippingaddresschange",(function(e){return R("shippingaddresschange",e)})),E._on("shippingratechange",(function(e){return R("shippingratechange",e)})),E._on("confirm",O);return E._on("load-error",(function(e){c("loaderror",{error:e}),u()})),Bn.Nb.forEach((function(e){E._on(e,(function(t){return c(e,t)}))})),{update:function(e){E.update(e)},focus:function(){K(),E.focus(),E.send({action:"stripe-user-focus",payload:{}})},blur:function(){E.blur()},clear:function(){throw new C.No("clear() is not supported by the Express Checkout Element.")},mount:function(){v=new re.E;var e=i();e&&((0,g.mb)(e,[[Bn.et,!0]]),w.runOnUnmount.push((function(){(0,g.mb)(e,[[Bn.et,!1]])})))},unmount:function(){for(;w.runOnUnmount.length;){var e;null===(e=w.runOnUnmount.pop())||void 0===e||e()}E.unmount()},destroy:function(){s.controller.action.resetExpressCheckoutState({groupId:m})},_frame:E}},mr=["options"],fr=["controller","publicOptions","componentName"],_r=["update"],hr=function(e){var t=e.options,n=(0,d.Z)(e,mr),r=t.controller,o=t.publicOptions,i=(t.componentName,(0,d.Z)(t,fr));if(r.keyMode()===Gt.Kl.unknown)throw new C.No("It looks like you're using an older Stripe key. The Pay Button Element is only available for use with a modern API key, which is prefixed with 'pk_live_' or 'pk_test_'.\n You can roll your publishable key here: https://dashboard.stripe.com/account/apikeys");var c=(0,Ln.oN)(o||{},t.elementsInitSource);"payButton"===e.options.componentName&&c.warnings.push("Pay Button Element is now Express Checkout Element.\nIt is advised to switch to the Express Checkout Element. For more information,\nsee https://stripe.com/docs/elements/express-checkout-element."),c.warnings.forEach((function(e){return r.warn(e)}));var s=pr((0,a.Z)((0,a.Z)({},n),{},{options:(0,a.Z)((0,a.Z)({},i),{},{controller:r,componentName:"expressCheckout",publicOptions:c.value})})),u=s.update,l=(0,d.Z)(s,_r);return(0,a.Z)((0,a.Z)({},l),{},{update:function(e){var t=(0,Ln.a1)(e||{}),n=t.value;t.warnings.forEach((function(e){return r.warn(e)})),u(n)}})},yr=function(e,t){var n=function(e){if(!R.YA[e])throw new Error("Unexpected Element type: ".concat(e,"."));return R.YA[e].implementation}(e);switch(n){case"legacy":return new Qe(t);case"affirm_message":return rt(t);case"afterpay_message":return st(t);case"payment_method_messaging":return jn(t);case"frame":return xn(t);case"express_checkout":return hr(t);default:return(0,y.Rz)(n,"Unexpected implementation type: ".concat(n,"."))}},vr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.Z)((0,a.Z)((0,a.Z)((0,a.Z)({},(0,P.ei)(e,["business","fields","readOnly","terms","allowedCardBrands","disallowedCardBrands","blockPoBox","validation","display","layout","paymentMethodOrder","wallets","buttonHeight","accountHolderType","disabled","hideIcon","hidePostalCode","disableLink","disableMultipleButtons","iconStyle","placeholderCountry","rtl","showIcon","supportedCountries","preferredNetwork","betas","componentName","groupId","locale","loader","externalPaymentMethodTypes"])),e.autocomplete&&{disableAutocomplete:"disabled"===e.autocomplete.mode}),e.contacts&&{contacts:e.contacts.length}),e.savePaymentMethod&&{savePaymentMethod:(0,a.Z)((0,a.Z)({},e.savePaymentMethod),{},{messages:!!e.savePaymentMethod.messages})})},gr=function(e){function t(e,r,o){var i,c;(0,s.Z)(this,t),(c=n.call(this)).mount=(0,I.TC)((function(e){var t;if(c._checkDestroyed(),!e)throw new C.No("Missing argument. Make sure to call mount() with a valid DOM element or selector.");if("string"==typeof e){var n=document.querySelectorAll(e);if(n.length>1&&c._controller.warn("The selector you specified (".concat(e,") applies to ").concat(n.length," DOM elements that are currently on the page.\nThe Stripe Element will be mounted to the first one.")),!n.length)throw new C.No("The selector you specified (".concat(e,") applies to no DOM elements that are currently on the page.\nMake sure the element exists on the page before calling mount()."));t=n[0]}else{if(!e.appendChild)throw new C.No("Invalid DOM element. Make sure to call mount() with a valid DOM element or selector.");t=e}if("INPUT"===t.nodeName)throw new C.No("Stripe Elements must be mounted in a DOM element that\ncan contain child nodes. `input` elements are not permitted to have child\nnodes. Try using a `div` element instead.");t.children.length&&t!==document.body&&c._controller.warn("This Element will be mounted to a DOM element that contains child nodes."),c._mountToParent(t)})),c.update=(0,I.TC)((function(e){return c._controller.report("update",{options:vr(e),element:c._componentName,element_mode:c._componentMode}),c._checkDestroyed(),c._implementation.update(e),(0,f.Z)(c)})),c.focus=(0,I.TC)((function(e){return c._checkDestroyed(),e&&e.preventDefault(),c._implementation.focus(),(0,f.Z)(c)})),c.blur=(0,I.TC)((function(){return c._checkDestroyed(),c._implementation.blur(),(0,f.Z)(c)})),c.clear=(0,I.TC)((function(){return c._checkDestroyed(),c._implementation.clear(),(0,f.Z)(c)})),c.collapse=(0,I.TC)((function(){if(c._checkDestroyed(),!c._implementation.collapse)throw new C.No("Collapse is not supported by the ".concat(c._componentName," Element."));return c._implementation.collapse(),(0,f.Z)(c)})),c.unmount=(0,I.TC)((function(){return c._checkDestroyed(),c._unmount(),(0,f.Z)(c)})),c.destroy=(0,I.TC)((function(){var e,t;return c._checkDestroyed(),c.unmount(),null===(e=(t=c._implementation).destroy)||void 0===e||e.call(t),c._destroyed=!0,c._emitEvent("destroy"),(0,f.Z)(c)})),c.getValue=(0,I.TC)((function(){c._checkDestroyed();var e=new Set(["address"]);if(c._implementation.getValue&&e.has(c._componentName))return c._implementation.getValue();throw new C.No("getValue is not supported by the ".concat(c._componentName," Element."))})),c._getParent=function(){return c._parent},c._emitEvent=function(e,t){return"loaderror"!==e||c._hasRegisteredListener("loaderror")||c._controller.keyMode()!==Gt.Kl.test||console.error("Unhandled ".concat(c._componentName," Element loaderror"),t),c._emit(e,(0,a.Z)({elementType:c._componentName},t))};var u=e.controller,l=e.componentName,d=e.groupId,p=e.locale,m=e.betas;e.mids;c._controller=u,c._componentName=l,c._componentMode=null===(i=e.publicOptions)||void 0===i?void 0:i.mode,c._destroyed=!1,c._groupId=d;var _=document.createElement("div");return _.className=R.A2,c._component=_,u.report("create",{options:vr((0,a.Z)({componentName:l,groupId:d,locale:p,betas:m},e.publicOptions)),element:l,element_mode:c._componentMode,elements_init_source:e.elementsInitSource}),c._implementation=yr(c._componentName,{options:e,component:_,listenerRegistry:r,elementTimings:o,emitEvent:c._emitEvent,getParent:c._getParent,hasRegisteredListener:c._hasRegisteredListener,selfDestruct:function(){c.destroy()}}),c}(0,_.Z)(t,e);var n=(0,h.Z)(t);return(0,u.Z)(t,[{key:"_checkDestroyed",value:function(){if(this._destroyed)throw new C.No("This Element has already been destroyed. Please create a new one.")}},{key:"_isMounted",value:function(){return!!document.body&&document.body.contains(this._component)}},{key:"_unmount",value:function(){var e=this._component.parentElement;e&&e.removeChild(this._component),this._controller.report("unmount",{element:this._componentName,element_mode:this._componentMode}),this._implementation.unmount(),this._parent=null}},{key:"_mountToParent",value:function(e){var t=this._component.parentElement,n=this._isMounted();if(e===t){if(n)return;this.unmount(),this._mountTo(e)}else if(t){if(n)throw new C.No("This Element is already mounted. Use `unmount()` to unmount the Element before re-mounting.");this.unmount(),this._mountTo(e)}else this._mountTo(e)}},{key:"_mountTo",value:function(e){for(this._parent=e;e.firstChild&&e!==document.body;)e.removeChild(e.firstChild);e.appendChild(this._component);var t=!1;try{var n;t=!(null===(n=window.top)||void 0===n||!n.document)}catch(e){}this._controller.report("mount",{element:this._componentName,element_mode:this._componentMode,is_mounted_in_iframe:window.top!==window,can_access_top:t}),this._implementation.mount()}}]),t}(O.Z),br=function(e,t){e._controller.report("legacy_private_property_used",{prop:t,componentName:e._componentName})};["_autofilled","_classes","_complete","_empty","_fakeInput","_focused","_frame","_invalid","_lastBackgroundColor","_lastFontSize","_lastHeight","_lastPadding","_lastSubmittedAt","_listenerRegistry","_paymentRequest"].forEach((function(e){Object.defineProperty(gr.prototype,e,{enumerable:!1,get:function(){return br(this,e),this._implementation[e]}})}));["_formSubmit","_isIssuingDisplayElement"].forEach((function(e){Object.defineProperty(gr.prototype,e,{enumerable:!1,writable:!1,value:function(){return br(this,e),this._implementation[e]()}})}));var wr,kr=gr,Sr=["stripe.elements","custom_checkout","checkout"],Pr="stripe.js:",Cr=function(e){if("/v3"===e||"/v3/"===e)return e;if(0!==e.indexOf("/v3/")&&0!==e.indexOf("/fingerprinted/"))return e;var t=e.split("/");return t[t.length-1].replace(/-[a-f0-9]{32}/,"")},Er=[],Ar=function(e){if(window.performance){var t="".concat(Pr).concat(e);try{if(!Tr())return void Er.push({name:t,startTime:performance.now()});performance.mark(t)}catch(e){}}},Nr=!1,Tr=function(){return Nr},Ir=function(){Nr||(Nr=!0,Er.forEach((function(e){return performance.mark(e.name,{startTime:e.startTime})})))},Rr=function(e){return e.map((function(e){var t,n=e.domainLookupStart;n===e.startTime&&(n=void 0),n&&(n=Math.round(n));var r=e.name;0===r.indexOf(Pr)&&(r=r.substring(Pr.length));try{r=new URL(r).pathname}catch(e){}if("longtask"===e.entryType){r="lt-".concat(r);try{var o=e.attribution;t=o[0].containerName||Cr(o[0].containerSrc)||void 0}catch(e){}}if("long-animation-frame"===e.entryType)try{r="laf",t=function(e){var t=e.scripts;if(t&&0!==t.length){var n=t[0].invoker;if(/^https?:\/\//.test(n))try{return Cr(new URL(n).pathname)}catch(e){return}try{return"".concat(Cr(new URL(t[0].sourceURL).pathname),"::").concat(n)}catch(e){return n}}}(e)}catch(e){}return{t:Math.round(e.startTime),d:Math.round(e.duration),n:r,f:n,i:t}}))},Mr=function(e){var t=e.types,n=e.reporter,r=e.resourcePrefixFilter;try{if(!window.performance||!window.performance.getEntriesByType||!("PerformanceObserver"in window))return;var o,i=t.filter((function(e){return-1!==PerformanceObserver.supportedEntryTypes.indexOf(e)}));i.push("mark"),Ir();var a=[],s=function(e,t){var i=function(e,t,n){return"resource"===e&&n?t.filter((function(e){return 0===e.name.indexOf(n)})):"mark"===e?t.filter((function(e){return 0===e.name.indexOf(Pr)})):t}(e,t,r);0!==i.length&&(clearTimeout(o),a.push.apply(a,(0,c.Z)(Rr(i))),o=setTimeout((function(){n(a.splice(0))}),100))};i.forEach((function(e){new PerformanceObserver((function(t){s(e,t.getEntries())})).observe({type:e,buffered:!0})}))}catch(e){}},Or=["fonts","locale","customerOptions","customerSessionClientSecret"],xr={require_cvc_recollection:(0,y.jt)(y.Xg)},Zr={verification_method:(0,y.jt)(y.kw.apply(void 0,(0,c.Z)(on.YQ))),financial_connections:(0,y.jt)((0,y.mC)({permissions:(0,y.jt)((0,y.CT)(y.kw.apply(void 0,(0,c.Z)(on.pd)))),prefetch:(0,y.jt)((0,y.CT)(y.kw.apply(void 0,(0,c.Z)(on.tt))))}))},jr={card:(0,y.jt)((0,y.mC)(xr)),us_bank_account:(0,y.jt)((0,y.mC)(Zr))},Lr=function(e){var t=(0,y.jt)((0,y.AG)((0,y.CT)(y.kw.apply(void 0,(0,c.Z)(function(e){return(0,S.uN)(e,S.M4.elements_enable_deferred_intent_beta_1)?Object.keys(k.GS).concat(lt.Y4):Object.keys(k.GS)}(e)))))),n=(0,y.jt)((0,y.AG)((0,y.kw)("off_session","on_session"))),r=(0,y.jt)((0,y.AG)((0,y.kw)("automatic","automatic_async","manual"))),o=(0,y.jt)((0,y.AG)((0,y.mC)(jr))),i=(0,y.jt)((0,y.AG)(y.Z_)),a=(0,y.jt)((0,y.AG)(y.Z_));return{mode:(0,y.jt)((0,y.AG)((0,y.kw)("payment","setup","subscription"))),amount:(0,y.jt)((0,y.AG)(y.MZ)),currency:(0,y.jt)((0,y.AG)(y.cV)),paymentMethodCreation:(0,y.jt)((0,y.kw)("manual")),payment_method_types:t,paymentMethodTypes:t,setup_future_usage:n,setupFutureUsage:n,capture_method:r,captureMethod:r,payment_method_options:o,paymentMethodOptions:o,payment_method_configuration:i,paymentMethodConfiguration:i,on_behalf_of:a,onBehalfOf:a}},Br={customerOptions:(0,y.jt)((0,y.mC)({customer:y.Z_,ephemeralKey:y.Z_}))},Dr={customerSessionClientSecret:(0,y.jt)((0,y.AG)(y.Z_))},qr=function(e){if(e)return(0,a.Z)((0,a.Z)((0,a.Z)({},e),e.hasOwnProperty("rules")?{rules:""}:null),e.hasOwnProperty("variables")?{variables:""}:null)},Fr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.Z)((0,a.Z)((0,a.Z)({},(0,P.ei)(e,["locale","loader","externalPaymentMethodTypes","paymentMethodCreation","allowedCardBrands","disallowedCardBrands"].concat(Hr))),e.hasOwnProperty("fonts")?{fonts:""}:null),{},{appearance:qr(e.appearance)},e.customerOptions?{customerOptions:{customer:e.customerOptions.customer}}:null)},Ur=function(e,t){var n=e.mode,r=e.currency,o=e.amount,i=e.captureMethod,a=e.capture_method,c=void 0===a?i:a,s=e.setupFutureUsage,u=e.setup_future_usage,l=void 0===u?s:u,d=e.paymentMethodTypes,p=e.payment_method_types,m=void 0===p?d:p,f=e.paymentMethodOptions,_=e.payment_method_options,h=void 0===_?f:_,y=e.paymentMethodConfiguration,v=e.payment_method_configuration,g=void 0===v?y:v,b=e.onBehalfOf,w=e.on_behalf_of,k=void 0===w?b:w;return"payment"===n&&r?{mode:"payment",currency:r,amount:o||null,capture_method:c,setup_future_usage:l,payment_method_types:m,payment_method_options:h,payment_method_configuration:g,on_behalf_of:k}:"setup"===n?{mode:"setup",currency:r,capture_method:c,setup_future_usage:l||(t?"off_session":void 0),payment_method_types:m,payment_method_options:h,payment_method_configuration:g,on_behalf_of:k}:"subscription"===n&&r&&"number"==typeof o?{mode:"subscription",currency:r,amount:o,setup_future_usage:t?"off_session":void 0,payment_method_types:m,payment_method_options:h,payment_method_configuration:g,on_behalf_of:k}:void 0},Gr=["customerSessionClientSecret"],zr=["mode","amount","payment_method_types","paymentMethodTypes","capture_method","captureMethod","setup_future_usage","setupFutureUsage","payment_method_options","paymentMethodOptions","payment_method_configuration","paymentMethodConfiguration"],Hr=[].concat(zr,["currency","on_behalf_of","onBehalfOf"]),Kr=function(e,t,n){var r=e,o=t;if("setup"===(null==r?void 0:r.mode)&&null!=o&&o.amount)throw new C.No("Invalid value for ".concat(n,": `amount` is not applicable when `mode` is `'setup'`"))},Yr=function(e,t,n,r){var o=e.mode,i=e.amount,a=e.currency,c=e.paymentMethodTypes,s=e.payment_method_types,u=void 0===s?c:s,l=e.paymentMethodConfiguration,d=e.payment_method_configuration,p=void 0===d?l:d,m=e.paymentMethodOptions,f=e.payment_method_options,_=void 0===f?m:f,h=(0,S.uN)(r,S.M4.deferred_intent_pe_optional_amount_beta_0);if(null!=u&&u.length&&p)throw new C.No("Invalid value for ".concat(n,": You may only specify one of these parameters: `payment_method_types` or `payment_method_configuration`."));var v=Object.keys((0,P.ei)(t,zr));if("payment"===o){var g=(0,y.mC)({amount:(0,y.jt)((0,y.AG)(y.Rx)),currency:y.Z_}),b=(0,y.mC)({amount:y.Rx,currency:y.Z_}),w=h?g:b,k=(0,y.Gu)(w,{amount:i,currency:a},"options").value;if(null!=k.amount&&k.amount<=0)throw new C.No("Invalid value for ".concat(n,": `amount` must be greater than 0"))}else if("setup"===o){!(0,S.uN)(r,S.M4.elements_enable_deferred_intent_beta_1)&&(u||(0,y.Gu)((0,y.mC)({currency:y.Z_}),{currency:a},"options"))}else{if(!o&&v.length)throw new C.No("Invalid value for ".concat(n,": `").concat(v.join("`, `"),"` ").concat(v.length>1?"are":"is"," only applicable when a `mode` is set."));if("subscription"===o){var E=(0,y.mC)({amount:(0,y.jt)((0,y.AG)(y.Rx)),currency:y.Z_}),A=(0,y.mC)({amount:y.Rx,currency:y.Z_}),N=h?E:A,T=(0,y.Gu)(N,{amount:i,currency:a},"options").value;if(T.amount&&T.amount<0)throw new C.No("Invalid value for ".concat(n,": `amount` must be 0 or greater"))}}if(_){var I,R,M,O=null===(I=_.us_bank_account)||void 0===I||null===(R=I.financial_connections)||void 0===R?void 0:R.permissions;if(O&&!(O.indexOf("payment_method")>-1))throw new C.No("Invalid value for ".concat(n,": permissions array must include 'payment_method'. You provided: ").concat(O.join(", ")));if(void 0!==(null===(M=_.card)||void 0===M?void 0:M.require_cvc_recollection)&&"setup"===o)throw new C.No("Invalid value for ".concat(n,": `require_cvc_recollection` is not applicable when `mode` is `'setup'`"))}},Wr=function(e){e._emit("update-end"),e._emit("updateend")},Vr=function(e){function t(e,r,o,i,u,l){var _;(0,s.Z)(this,t),(_=n.call(this)).getElement=(0,I.TC)((function(e){var t,n=(null!=(t=e)&&t.__elementType&&"string"==typeof t.__elementType&&"function"==typeof t?t.__elementType:null)||e;return M(n,_._betas),(0,P.sE)(_._elements,(function(e){return e._componentName===n}))||null})),_.update=(0,I.TC)((function(e){var t,n,r=(0,a.Z)((0,a.Z)({},_._commonOptions),e);Kr(r,e,"elements.update()");var o=(0,y.Gu)(function(e){return(0,y.mC)((0,a.Z)((0,a.Z)((0,a.Z)((0,a.Z)({locale:(0,y.jt)(y.Z_),appearance:(0,y.jt)(y.Ry)},Lr(e)),Br),Dr),{},{clientSecret:(0,y.jt)((0,y.AG)(dt._F))}))}(_._betas),e||{},"elements.update()"),i=o.value;if(o.warnings.forEach((function(e){return _._controller.warn(e)})),0!==Object.keys(i).length){var c,s,u=i.customerOptions,l=i.locale,d=i.appearance,m=i.on_behalf_of,h=i.clientSecret,v=i.customerSessionClientSecret,g=i.currency,b=i.onBehalfOf,w=void 0===b?m:b,k=(0,S.jk)(l,_._betas);k&&(_._controller.action.fetchLocale({locale:k}),_._elements.forEach((function(e){var t,n;t=e._implementation,"function"==typeof(null===(n=t._paymentRequest)||void 0===n?void 0:n._updateLocale)&&e._implementation._paymentRequest._updateLocale(k)})));var C=!1;if(!!Object.keys((0,P.ei)(i,["clientSecret"].concat(Hr,Gr))).length){var E;h=null!==(E=h)&&void 0!==E?E:_._commonOptions.clientSecret,v=void 0===v?_._commonOptions.customerSessionClientSecret:v,g=void 0===g?_._commonOptions.currency:g,w=void 0===w?_._commonOptions.onBehalfOf||_._commonOptions.on_behalf_of:w;var A=(0,P.ei)(i,[].concat(Hr,Gr)),N=(0,P.ei)(_._commonOptions,[].concat(Hr,Gr)),T=(0,a.Z)((0,a.Z)({},N),A);i.clientSecret&&zr.forEach((function(e){T[e]=null})),i.mode&&(_._commonOptions.clientSecret=void 0),C=!(0,P.Xy)(T,N),Yr(T,A,"elements.update()",_._betas),C&&(c=T,s=Ur(T,!0))}i.hasOwnProperty("customerOptions")&&(_._customerOptions=u||null),i.hasOwnProperty("customerSessionClientSecret")&&(_._commonOptions.customerSessionClientSecret=v||null),i.hasOwnProperty("appearance")&&(_._commonOptions.appearance=d),i.hasOwnProperty("clientSecret")&&(_._commonOptions.clientSecret=h),k&&(_._commonOptions.locale=k),(0,p.Z)(_._commonOptions,c);var I=(0,P.sE)(_._elements,(function(e){return"expressCheckout"===e._componentName||"payButton"===e._componentName}));null==I||null===(t=I._implementation._frame)||void 0===t||t._emit("update-start"),_._controller.action.updateElementsOptions((0,a.Z)({customerOptions:u,locale:k,appearance:d,groupId:_._id},C?{customerSessionClientSecret:v,clientSecret:h,currency:"SETUP_INTENT"===(null===(n=h)||void 0===n?void 0:n.type)?g:void 0,onBehalfOf:w,deferredIntent:s}:{})).then((function(){var e;Wr((0,f.Z)(_)),null==I||null===(e=I._implementation._frame)||void 0===e||e._emit("update-end")}))}})),_.submit=(0,I.P0)((function(){return _._isSubmitting&&_._controller.report("simultaneous_elements_submit_calls"),_._isSubmitting=!0,_._controller.action.validateElements({groupId:_._id,slug:"submit_elements"}).then((function(e){return e&&"error"===e.type?{error:e.error}:_._controller.action.showWalletIfNecessary(_._id).then((function(e){switch(null==e?void 0:e.type){case"error":return e.error?{error:e.error}:_._controller.action.localizeError({code:"unexpected"}).then((function(e){return{error:e}}));case"cancelled":return _._controller.action.localizeError({code:"incomplete",type:"input_validation_error"}).then((function(e){return{error:e}}));default:return{}}}))})).finally((function(){_._isSubmitting=!1}))})),_.create=(0,I.W6)((function(e,t){Ar("mount:".concat(e));var n=new re.E;!function(e,t,n){if(M(e,n),R.YA[e].unique&&-1!==t.indexOf(e)){if("address"===e)throw new C.No("Can only create one Element of type ".concat(e,". See https://stripe.com/docs/elements/address-element?platform=web#use-address-element-with-other-elements for more information."));throw new C.No("Can only create one Element of type ".concat(e,"."))}var r=R.YA[e].conflict,o=(0,P.dq)(t,r);if(o.length){var i=o[0];throw new C.No("Cannot create an Element of type ".concat(e," after an Element of type ").concat(i," has already been created."))}}(e,_._elements.map((function(e){return e._componentName})),_._betas),function(e,t){"payment"===e&&(0,w.zd)()&&t.warn("It looks like you are using Payment Element in an iframe.\n Avoid placing the Payment Element within another iframe because some payment methods require redirecting to another page for payment confirmation.")}(e,_._controller);var r=(0,a.Z)((0,a.Z)((0,a.Z)({},(0,P.CE)(null!=t?t:{},"paymentRequest")),(0,P.ei)(_._commonOptions,["locale","fonts","appearance","clientSecret","loader","externalPaymentMethodTypes","customerSessionClientSecret","betas","paymentMethodCreation","disallowedCardBrands","allowedCardBrands"].concat(Hr))),{},{componentName:e,groupId:_._id}),o=(b.P0||b.JW)&&(0,w.qC)(r).length>2e3,i=!!_._pendingFonts||o;"never"!==_._commonOptions.loader&&!_._isLoaderFrameMounted&&Kt(e)&&(Xt(_._controller)._emit("generate-loader-ui",{rawAppearanceConfig:_._commonOptions.appearance}),_._isLoaderFrameMounted=!0);var s=new kr((0,a.Z)((0,a.Z)({publicOptions:t},(0,P.CE)(_._commonOptions,Hr)||{}),{},{deferredIntent:Ur(_._commonOptions,!0),componentName:e,groupId:_._id,fonts:o?null:_._commonOptions.fonts,controller:_._controller,wait:i,mids:_._controller.mids(),elementsInitSource:_._commonOptions.__elementsInitSource}),_._listenerRegistry,(0,a.Z)((0,a.Z)({},_._timings),{},{createTimestamp:n}));return _._elements=[].concat((0,c.Z)(_._elements),[s]),s._on("destroy",(function(){_._elements=_._elements.filter((function(t){return t._componentName!==e}))})),o&&s._implementation.update({fonts:_._commonOptions.fonts}),s})),_.fetchUpdates=(0,I.P0)((function(){if(_._commonOptions.clientSecret)return _._controller.action.fetchUpdates({clientSecret:_._commonOptions.clientSecret,customerOptions:_._customerOptions,customerSessionClientSecret:_._commonOptions.customerSessionClientSecret,locale:_._commonOptions.locale,groupId:_._id,currency:_._commonOptions.currency}).then((function(e){if("error"===(null==e?void 0:e.type)){var t=e.error,n=t.message,r=t.extra_fields;return null!=r&&r.status?{error:{message:n,status:r.status}}:{error:{message:n}}}return{}}));throw new C.No('In order to call fetchUpdates, you must pass a valid PaymentIntent or SetupIntent client secret when creating the Elements group.\n\n e.g. stripe.elements({clientSecret: "{{CLIENT_SECRET}}"})')})),Ar("elements-group");var h=_._on;_._on=function(t,n,r){return e.report("register_elements_listener",{name:t}),h.call((0,f.Z)(_),t,n,r),(0,f.Z)(_)};var k=new re.E;Kr(l,l,"elements()");var E=(0,y.Gu)(function(e){var t={locale:(0,y.jt)(y.Z_),fonts:(0,y.jt)((0,y.CT)(y.Ry)),appearance:(0,y.jt)(y.Ry),clientSecret:(0,y.jt)(dt._F),loader:(0,y.jt)((0,y.kw)("auto","always","never")),externalPaymentMethodTypes:(0,y.jt)(lt.iU),__elementsInitSource:(0,y.jt)(y.kw.apply(void 0,(0,c.Z)(Sr)))},n=(0,a.Z)((0,a.Z)((0,a.Z)((0,a.Z)((0,a.Z)({},t),Dr),(0,S.uN)(e,S.M4.elements_customers_beta_1)?Br:{}),(0,S.uN)(e,S.M4.blocked_card_brands_beta_2)?{allowedCardBrands:(0,y.jt)(lt.jX),disallowedCardBrands:(0,y.jt)(lt.jX)}:{}),Lr(e));return(0,y.mC)(n)}(i),l||{},"elements()"),A=E.value;E.warnings.forEach((function(t){return e.warn(t)})),(0,dt.Z0)(i,!!A.customerSessionClientSecret);var N=(0,P.ei)(A,Hr);if(Yr(N,N,"elements()",i),Object.keys((0,P.ei)(A,zr)).length&&A.clientSecret)throw new C.No("Invalid options for elements(): Expected either mode or clientSecret, but not both.");!function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.clientSecret&&"SETUP_INTENT"!==(null===(e=t.clientSecret)||void 0===e?void 0:e.type)&&t.currency)throw new C.No("Invalid options for elements(): `currency` is only applicable with a SetupIntent client_secret or when a `mode` is set")}(A),(0,g.BO)(e.warn);var O=A.__elementsInitSource||"stripe.elements";e.report("elements",{options:Fr(A),elements_init_source:O}),A.appearance&&Math.random()<.01&&e.report("appearance",{config:A.appearance}),A.loader||(A.loader="auto");var x=A.fonts,Z=void 0===x?[]:x,j=A.locale,L=A.customerOptions,B=void 0===L?null:L,D=A.customerSessionClientSecret,q=(0,d.Z)(A,Or),F=void 0!==D?D:void 0;_._customerOptions=B;var U=A.appearance?A.appearance:{};_._elements=[],_._id=(0,v.To)("elements-".concat((0,v.Vj)(),"-")),_._isSubmitting=!1,_._timings=(0,a.Z)((0,a.Z)({},o),{},{groupCreateTimestamp:k}),_._controller=e,_._betas=i,_._listenerRegistry=r,_._isLoaderFrameMounted=!1;var G=(0,S.jk)(j,i);_._controller.action.fetchLocale({locale:G||"auto"});var z=Z.filter((function(e){return!e.cssSrc||"string"!=typeof e.cssSrc})).map((function(e){return(0,a.Z)((0,a.Z)({},e),{},{__resolveFontRelativeTo:window.location.href})})),H=Z.map((function(e){return e.cssSrc})).reduce((function(e,t){return"string"==typeof t?[].concat((0,c.Z)(e),[t]):e}),[]).map((function(e){return(0,w.sD)(e)?e:(0,w.v_)(window.location.href,e)}));_._pendingFonts=H.length;var K,Y=(0,S.uN)(i,S.M4.payment_element_beta_1)&&!q.clientSecret,W=Ur(q,!0),V=q.on_behalf_of,X=q.onBehalfOf,Q=void 0===X?V:X;return Y||(K=e.action.setupStoreForElementsGroup({clientSecret:q.clientSecret,deferredIntent:W,onBehalfOf:Q,customerOptions:B,customerSessionClientSecret:null!=F?F:null,currency:q.currency,loader:A.loader,locale:j,appearance:U,groupId:_._id,externalPaymentMethodTypes:q.externalPaymentMethodTypes,paymentMethodCreation:q.paymentMethodCreation,disallowedCardBrands:q.disallowedCardBrands,allowedCardBrands:q.allowedCardBrands,elementsInitSource:O,mids:u})),_._commonOptions=(0,a.Z)((0,a.Z)({},q),{},{__elementsInitSource:O,betas:i,storeReadyPromise:K,appearance:U,locale:G,customerSessionClientSecret:F,get fonts(){return z}}),H.forEach((function(e){if("string"==typeof e){var t=new re.E;T(e).then((function(n){_._controller.report("font.loaded",{load_time:t.getElapsedTime(),font_count:n.length,css_src:e});var r=n.map((function(t){return(0,a.Z)((0,a.Z)({},t),{},{__resolveFontRelativeTo:e})}));_._controller.action.updateCSSFonts({fonts:r,groupId:_._id}),z.push.apply(z,(0,c.Z)(r))})).catch((function(n){_._controller.report("error.font.not_loaded",{load_time:t.getElapsedTime(),message:n&&n.message&&n.message,css_src:e}),_._controller.warn("Failed to load CSS file at ".concat(e,"."))}))}})),_._controller._controllerFrame._on("stripe-user-credentials-update",(function(e){var t;if(_._commonOptions.clientSecret)throw new C.No("It looks like you use client_secret in your Elements integration.\n You cannot use stripe.update() to change publishable key.\n Please follow https://stripe.com/docs/payments/defer-intent-creation to change your Elements integration.");if((0,P.sE)(_._elements,(function(e){return"linkAuthentication"===e._componentName})))throw new C.No("It looks like you use the Link Authentication Element in your Elements integration.\n stripe.update() is not supported when using the Link Authentication Element.");if((0,P.sE)(_._elements,(function(e){return"card"===e._componentName})))throw new C.No("It looks like you use the Card Element in your Elements integration.\n stripe.update() is not supported when using the Card Element. It is supported when showing the Payment Element and/or Express Checkout Element before creating an intent.\n To use stripe.update(), please follow https://docs.stripe.com/payments/payment-element/migration to change your Elements integration.");var n=(0,P.ei)(_._commonOptions,Hr),r=Ur(n,!0),o=(0,P.sE)(_._elements,(function(e){return"payButton"===e._componentName}));null==o||null===(t=o._implementation._frame)||void 0===t||t._emit("update-start"),_._controller.action.updateElementsOptions({customerOptions:void 0,customerSessionClientSecret:void 0,locale:void 0,appearance:void 0,groupId:_._id,deferredIntent:r,stripeUserCredentials:e}).then((function(){var e;Wr((0,f.Z)(_)),null==o||null===(e=o._implementation._frame)||void 0===e||e._emit("update-end")}))})),(0,m.Z)(_,(0,f.Z)(_))}(0,_.Z)(t,e);var n=(0,h.Z)(t);return(0,u.Z)(t)}(O.Z),Xr=Vr,Qr=function(e,t,n,r,o,i,a){return new Z.Z({controller:e,authentication:t,mids:n,rawOptions:r,betas:o,queryStrategyOverride:i,listenerRegistry:a})},Jr=n(1764),$r=function(e){return function(t){return n.e(895).then(n.bind(n,8754)).then((function(n){return(0,n.makeInit)(e,t)}))}},eo=n(2337),to=n(4478),no=function(e){var t=e.controller,r=e.rawOptions,o=(0,eo.zM)(r||{});o.warnings.forEach((function(e){t.warn(e)}));var i=o.value,a=i.clientSecret,c=i.fetchClientSecret,s=i.onComplete,u=i.onLineItemsChange,l=i.onShippingDetailsChange;if(a&&c)throw new C.No("You must provide only one of either `clientSecret` or `fetchClientSecret` to `initEmbeddedCheckout`.");if(!a&&!c)throw new C.No("You must provide one of either `clientSecret` or `fetchClientSecret` to `initEmbeddedCheckout`.");if(t.report("init_embedded_checkout",{clientSecretParam:c?"fetchClientSecret":"clientSecret",onComplete:!!s,onLineItemsChange:!!u,onShippingDetailsChange:!!l}),a){try{(0,to.V)(a)}catch(e){throw"InvalidCharacterError"===e.name?new C.No("Unable to parse client secret. Please ensure you are using a valid embedded Checkout client secret."):e}var d=(0,eo.yY)(a,s);d&&t.warn(d)}return n.e(16).then(n.bind(n,9067)).then((function(e){return(0,e.init)({options:o.value,controller:t})}))},ro=(0,y.mC)({name:(0,y.kw)("react-stripe-js","stripe-js","react-stripe-elements"),version:(0,y.AG)(y.Z_),startTime:(0,y.jt)(y.Rx)}),oo=(0,y.ci)({name:(0,y.ui)(1,30),partner_id:(0,y.jt)(y.Z_),version:(0,y.jt)((0,y.ui)(5,15)),url:(0,y.jt)((0,y.ui)(4,60))}),io=n(2808),ao=n(3423),co="stripe.js/".concat(ao.X),so="".concat(co,"; stripe-js-v3/").concat(ao.X),uo=("".concat(so,"; raw-card"),"".concat(so,"; raw-stripe-js-api"),"".concat(so,"; create-source-card-data"),"checkout"),lo=("".concat(so,"; ").concat(uo),"".concat(so,"; ").concat("payment-link","; ").concat(uo),"".concat(so,"; hip"),"".concat(so,"; payment-element")),po=("".concat(lo,"; deferred-intent"),"".concat(so,"; card-element"),"".concat(so,"; split-card-element"),"".concat(so,"; lpm-element"),"".concat(so,"; payment-request-button"),"".concat(so,"; express-checkout-element")),mo=("".concat(po,"; deferred-intent"),"dashboard"),fo=n(3852),_o=n(7087),ho=["elements","createToken","createPaymentMethod"],yo=["elements","createSource","createToken","createPaymentMethod"],vo=function(){function e(t){var n=this;(0,s.Z)(this,e),this._gets=[],this._didDetect=!1,this._onDetection=function(e){n._didDetect=!0,t(e)},window.Stripe&&window.Stripe.__cachedInstances&&this._onDetection("react-stripe-elements")}return(0,u.Z)(e,[{key:"got",value:function(e){this._didDetect||("elements"===e?this._gets=["elements"]:this._gets.push(e),this._checkForWrapper())}},{key:"called",value:function(e){this._didDetect||(this._gets=this._gets.filter((function(t){return t!==e})))}},{key:"_checkForWrapper",value:function(){(0,P.Xy)(this._gets,ho)?this._onDetection("react-stripe-js"):(0,P.Xy)(this._gets,yo)&&this._onDetection("react-stripe-elements")}}]),e}(),go=["type"],bo=function(e){if(!e||"object"!=typeof e)return null;var t=e.type;return{type:"string"==typeof t?t:null,data:(0,d.Z)(e,go)}},wo=function(e){switch(e.type){case"object":return{source:e.object};case"error":return{error:e.error};default:return(0,y.Rz)(e)}},ko={source:(0,y.mC)({id:(0,y.xe)("src_"),client_secret:(0,y.xe)("src_client_secret_")})},So=(0,y.mC)(ko),Po=function(e){switch(e.type){case"object":return{paymentMethod:e.object};case"error":return{error:e.error};default:return(0,y.Rz)(e)}},Co=n(6274).Promise,Eo=function(e,t,n,r,o,i){if("string"==typeof r)return function(e,t,n,r,o){var i=(0,y.rX)(r),a=bo(i?o:r),c=a||{type:null,data:{}},s=c.type,u=c.data;if(s&&n!==s)return Co.reject(new C.No("The type supplied in payment_method_data is not consistent."));if(i){var l=i._implementation._frame.id,d=i._componentName;return e.action.createPaymentMethodWithElement({frameId:l,elementName:d,type:n,paymentMethodData:u,mids:t,enforcePreSubmit:!1,enforcePaymentMethodCreationManual:!1}).then(Po)}return a?e.action.createPaymentMethodWithData({elementName:null,type:n,paymentMethodData:u,mids:t}).then(Po):Co.reject(new C.No("Please provide either an Element or PaymentMethod creation parameters to createPaymentMethod."))}(e,t,r,o,i);try{var a=function(e,t){return(0,y.Gu)((0,ut.q2)(null,t),e,"createPaymentMethod").value}(r,n),c=a.element,s=a.elements,u=a.type,l=a.data,d=(0,S.uN)(n,S.M4.elements_enable_deferred_intent_beta_1);if(c){var p=c._implementation._frame.id,m=c._componentName,f=["payment","expressCheckout","payButton"].indexOf(m)>-1;return e.action.createPaymentMethodWithElement({frameId:p,elementName:m,type:u,paymentMethodData:l,mids:t,enforcePreSubmit:f&&!d,enforcePaymentMethodCreationManual:f&&!d}).then(Po)}if(s){if(s._controller._id!==e._id)throw new C.No("Invalid value for stripe.createPaymentMethod(): the 'elements' provided was created by a different Stripe instance. Please use the same Stripe instance to create the 'elements' and call stripe.createPaymentMethod().");s._isSubmitting&&e.report("elements_submit_conflict.create_payment_method");var _,h=s._id,v="stripe.createPaymentMethod()";return e.action.getElementConfirmingPayment({groupId:h,errorMessageMethodName:v}).then((function(n){return _=n,e.action.createPaymentMethodWithElements({groupId:h,elements:s._elements,paymentMethodData:l,mids:t,elementConfirming:n,enforcePreSubmit:!d,enforcePaymentMethodCreationManual:!d})})).then((function(t){return(0,rn.tA)({groupId:h,elementConfirmingPayment:_,controller:e,isError:"error"in t,errorMessageMethodName:v}).then((function(){return t}))})).then((function(e){return Po(e)}))}if(u)return e.action.createPaymentMethodWithData({elementName:null,type:u,paymentMethodData:l,mids:t}).then(Po);throw new Error("No type or elements provided")}catch(e){return Co.reject(e)}},Ao=n(1849),No=n(125),To=function(e){function t(e){return(0,s.Z)(this,t),n.call(this,{channel:"paypal-fraudnet",fingerprintedPath:"paypal-fraudnet-sdk-f6f59fc7ff294a5d09bc5e15a50d935d.html",frameQueryParams:{flowId:e.flowId,sessionId:e.sessionId,sandbox:e.sandbox},on:e.on})}(0,_.Z)(t,e);var n=(0,h.Z)(t);return(0,u.Z)(t)}(No.K),Io=To,Ro=n(6274).Promise,Mo=function(e,t){return new Ro((function(n,r){setTimeout((function(){return r(new Error("Timeout in integrateFraudnet"))}),5e3);var o=(0,v.Vj)().replace(/-/g,""),i=new Io({sandbox:!t,flowId:e,sessionId:o,on:{onInit:function(){n(o)},onError:function(e){var t=e.error;r(t)}}});document.body&&i.mount(document.body)}))},Oo=function(e){function t(e){return(0,s.Z)(this,t),n.call(this,{channel:"rechnung-device-fingerprint",fingerprintedPath:/*! STRIPE_JS_BUILD_SALT bcadf22de5*/"rechnung-device-fingerprint-sdk-2ceec351837046d63776d05ea9e7c2b3.html",frameQueryParams:{merchantId:e.merchantId,sessionId:e.sessionId,sandbox:e.sandbox},on:e.on})}(0,_.Z)(t,e);var n=(0,h.Z)(t);return(0,u.Z)(t)}(No.K),xo=Oo,Zo=n(6274).Promise,jo=["acct_1P8KpGDMHO4ZxtzF"],Lo=function(e,t,n){return new Zo((function(r,o){setTimeout((function(){return o(new Error("Timeout while loading Rechnung device fingerprint script"))}),1e4);var i=new xo({merchantId:e,sessionId:t,sandbox:!n,on:{onInit:function(){r()},onError:function(e){var t=e.error;o(t)}}});document.body&&i.mount(document.body)}))},Bo=n(1115),Do=["payment_method","payment_method_data","payment_method_options","confirmation_token"],qo={clientSecret:(0,y.jt)(y.Z_),redirect:(0,y.jt)((0,y.kw)("always","if_required")),confirmParams:(0,y.jt)(y.Ry),handleActions:(0,y.jt)(y.Xg)},Fo=(0,a.Z)((0,a.Z)({},qo),{},{element:(0,y.jt)(y.Ry)}),Uo=(0,a.Z)((0,a.Z)({},qo),{},{elements:(0,y.jt)(y.Ry)}),Go={"stripe.confirmPayment()":{link:"https://stripe.com/docs/js/payment_intents/payment_method",action:"Payment"},"stripe.confirmSetup()":{link:"https://stripe.com/docs/js/setup_intents/payment_method",action:"Setup"}},zo=function(e,t,n){var r=t.rawSecret,o=t.rawElement,i=t.rawElements,a=t.rawHandleActions,c=t.rawRedirect,s=t.validatedConfirmParams,u=t.elementConfirmingPayment;if((0,S.uN)(e,S.M4.payment_element_beta_1)){var l=(0,y.rX)(o);if(!l)throw new C.No("Invalid value for ".concat(n,": `element` should be a Payment Element. You specified: ").concat(typeof o,"."));return{type:"elements",element:l}}if(function(e,t){var n=e.rawSecret,r=e.rawElements;if(!n&&!r)throw new C.No("".concat(t,": expected either `elements` or `clientSecret`, but got neither."))}({rawElements:i,rawSecret:r},n),c&&!1===a)throw new C.No("".concat(n,": `redirect` not applicable when `handleActions` is false."));if(r&&!i){if(null!=s&&s.payment_method&&null!=s&&s.payment_method_data)throw new C.No("".concat(n,": Expected either `payment_method` or `payment_method_data`, but not both."));return{type:"clientSecret",clientSecret:r}}var d=(0,y.MO)(i);if(!d)throw new C.No("Invalid value for ".concat(n,": elements should be an Elements group. You specified: ").concat(typeof i,"."));var p=(0,P.sE)(d._elements,(function(e){return"payment"===e._componentName})),m=(0,P.sE)(d._elements,(function(e){return"expressCheckout"===e._componentName||"payButton"===e._componentName}));if(!p&&!m)throw new C.No("Invalid value for ".concat(n,": elements should have a mounted Payment Element or Express Checkout Element. ").concat(function(e,t){if(e&&Go[t]){var n=Go[t],r=n.link,o=n.action;return"It looks like you have other Elements on the page. Refer to ".concat(r," to confirm a ").concat(o," Intent by payment method.")}return""}(!!d._elements.length,n)));if("expressCheckout"===u){if(!m)throw new Error('Element confirming payment is "expressCheckout", but there is no Express Checkout Element mounted on the page.');return{type:"elements",elements:d,clientSecret:r,element:m}}if(!p){if(m)throw new Error('Element confirming payment is "expressCheckout", but '.concat(n,' was not called within the "confirm" event. Please call ').concat(n,' in the "confirm" event (https://stripe.com/docs/js/elements_object/express_checkout_element_confirm_event).'));throw new Error('Element confirming payment is "payment", but there is no PaymentElement mounted on the page.')}if(d&&null!=s&&s.confirmation_token)throw new C.No("".concat(n,": Expected either `elements` or `confirmation_token`, but not both."));return{type:"elements",elements:d,clientSecret:r,element:p}},Ho=function(e){var t=e.betas,n=e.rawUpdateData,r=e.errorMessageMethodName,o=e.controller,i=e.elementConfirmingPayment,a=(0,y.Gu)((0,y.mC)(function(e){return(0,S.uN)(e,S.M4.payment_element_beta_1)?Fo:Uo}(t)),n,r),c=a.value,s=c.element,u=void 0===s?void 0:s,l=c.elements,d=void 0===l?void 0:l,p=c.confirmParams,m=c.clientSecret,f=c.redirect,_=c.handleActions,h=a.warnings,v=(0,y.Gu)((0,y.jt)((0,y.mC)({return_url:(0,y.jt)(y.Z_),confirmation_token:(0,y.jt)(y.Z_),payment_method:(0,y.jt)(y.Z_),payment_method_data:(0,y.jt)(y.Ry),payment_method_options:(0,y.jt)(y.Ry),setup_future_usage:(0,y.NM)("".concat(r,": do not pass setup_future_usage at confirm time. Instead, pass setup_future_usage when the PaymentIntent is created."))})),p,r,{path:["confirmParams"]}).value,g=zo(t,{rawSecret:m,rawElement:u,rawElements:d,rawHandleActions:_,rawRedirect:f,validatedConfirmParams:v,elementConfirmingPayment:i},r),b=f||"always",w=(null==v?void 0:v.return_url)||null;return h.forEach((function(e){return o.warn(e)})),{validatedRedirect:b,validatedReturnUrl:w,validatedParams:g,validatedConfirmParams:v,validatedHandleActions:!1!==_,rawConfirmParams:p}},Ko=function(e){var t,n=e.controller,r=e.mids,o=e.betas,i=e.rawUpdateData,c=e.intentType,s=e.elementConfirmingPayment,u=e.errorMessageMethodName,l=Ho({betas:o,rawUpdateData:i,controller:n,errorMessageMethodName:u,elementConfirmingPayment:s}),p=l.validatedParams,m=l.validatedConfirmParams,f=l.validatedRedirect,_=l.validatedHandleActions,h=l.validatedReturnUrl,y=l.rawConfirmParams,v=null!=y?y:{},g=(v.payment_method,v.payment_method_data,v.payment_method_options,v.confirmation_token,(0,d.Z)(v,Do));if("clientSecret"===p.type?t=function(e){var t=e.validatedParams,n=e.validatedConfirmParams,r=e.validatedHandleActions,o=e.otherParams,i=e.intentType,c=e.mids,s=null!=n?n:{},u=s.confirmation_token,l=s.payment_method_data,d=s.payment_method,p=s.payment_method_options,m="payment"===i?(0,rn.cn)(t.clientSecret,"confirmPayment"):(0,rn.jH)(t.clientSecret,"confirmSetup"),f=(0,rn.k7)({payment_method:l}),_=(0,a.Z)((0,a.Z)({},n),o);return l&&f?{intentSecret:m,tag:"paymentMethod-from-data",type:f,data:l,options:null!=p?p:{},handleActions:r,mids:c,expectedType:f,otherParams:o,merchantParams:_}:d?{intentSecret:m,tag:"paymentMethod",paymentMethod:d,options:null!=p?p:{},handleActions:r,mids:c,expectedType:f,otherParams:(0,a.Z)({use_stripe_sdk:!0,mandate_data:{customer_acceptance:{type:"online",online:{infer_from_client:!0}}}},o),merchantParams:_}:u?{intentSecret:m,tag:"confirmationToken",confirmationToken:u,options:null!=p?p:{},handleActions:r,mids:c,expectedType:f,otherParams:o,merchantParams:_}:{tag:"none",intentSecret:m,handleActions:r,mids:c,expectedType:f,otherParams:(0,a.Z)({use_stripe_sdk:!0,mandate_data:{customer_acceptance:{type:"online",online:{infer_from_client:!0}}}},o),merchantParams:_}}({validatedParams:p,validatedConfirmParams:m,validatedHandleActions:_,otherParams:g,intentType:c,mids:r}):(!function(e){var t,n,r,o=e.validatedParams,i=e.betas,a=e.validatedReturnUrl,c=e.errorMessageMethodName;if("clientSecret"!==o.type){var s=!(null===(t=o.elements)||void 0===t||!t._commonOptions.mode),u=!(null===(n=o.elements)||void 0===n||!n._commonOptions.payment_method_types)||!(null===(r=o.elements)||void 0===r||!r._commonOptions.paymentMethodTypes);if(!(0,S.uN)(i,S.M4.elements_enable_deferred_intent_beta_1)&&s&&!u&&!a)throw new C.No("".concat(c,": the `confirmParams.return_url` argument is required when using automatic payment methods."))}}({validatedParams:p,validatedReturnUrl:h,betas:o,errorMessageMethodName:u}),t=function(e){var t,n,r,o=e.validatedParams,i=e.validatedConfirmParams,c=e.validatedHandleActions,s=e.otherParams,u=e.mids,l=e.elementConfirmingPayment,d=e.enforcePreSubmit,p=o.clientSecret?(0,hn.RY)(o.clientSecret):null;return{tag:"elements",groupId:o.element._groupId,frameId:null===(t=o.element)||void 0===t?void 0:t._implementation._frame.id,elementName:l,data:null!==(n=null==i?void 0:i.payment_method_data)&&void 0!==n?n:{},options:null!==(r=null==i?void 0:i.payment_method_options)&&void 0!==r?r:{},intentSecret:p||void 0,enforcePreSubmit:d&&!!p,otherParams:s,expectedType:null,mids:u,handleActions:c,merchantParams:(0,a.Z)((0,a.Z)({},i),s)}}({validatedParams:p,validatedConfirmParams:m,validatedHandleActions:_,otherParams:g,mids:r,elementConfirmingPayment:s,enforcePreSubmit:!(0,S.uN)(o,S.M4.elements_enable_deferred_intent_beta_1)})),"if_required"===f)return{intentMutationRequest:t,redirect:f,returnUrl:null};if("always"===f&&h)return{intentMutationRequest:t,redirect:f,returnUrl:h};throw new C.No("".concat(u,": the `confirmParams.return_url` argument is required unless passing `redirect: 'if_required'`"))},Yo=["payment_method","payment_method_data","payment_method_options"],Wo="stripe.updatePaymentIntent()",Vo=(0,y.mC)({clientSecret:(0,y.jt)(ut.f4),params:(0,y.jt)((0,y.TX)({payment_method:(0,y.jt)(y.Z_),payment_method_data:(0,y.jt)(y.Ry),payment_method_options:(0,y.jt)(y.Ry)})),elements:(0,y.jt)(y.oQ)}),Xo=n(6274).Promise,Qo=function(e,t){return function(n,r,o,i,a,c){var s=(0,rn.cn)(o,e),u=(0,rn.el)(e,a).handleActions,l=(0,rn.o1)({expectedType:t,label:e,rawData:i,intentSecret:s,handleActions:u,mids:r});c&&"options"in l&&(l.options=(0,P.TS)(l.options,c));var d="none"===l.tag,p=n.action.confirmPaymentIntent(l);return u?p.then((0,Bo.nq)(n,d,!1,!1,l.otherParams.expand)):p.then(hn.PA)}},Jo=Qo("confirmAcssDebitPayment",k.GS.acss_debit),$o=Qo("confirmAffirmPayment",k.GS.affirm),ei=Qo("confirmAfterpayClearpayPayment",k.GS.afterpay_clearpay),ti=Qo("confirmAuBecsDebitPayment",k.GS.au_becs_debit),ni=Qo("confirmBacsDebitPayment",k.GS.bacs_debit),ri=Qo("confirmBancontactPayment",k.GS.bancontact),oi=Qo("confirmBoletoPayment",k.GS.boleto),ii=Qo("confirmCardPayment",k.GS.card),ai=Qo("confirmEpsPayment",k.GS.eps),ci=Qo("confirmFpxPayment",k.GS.fpx),si=Qo("confirmGiropayPayment",k.GS.giropay),ui=Qo("confirmGopayPayment",k.GS.gopay),li=Qo("confirmQrisPayment",k.GS.qris),di=Qo("confirmGrabPayPayment",k.GS.grabpay),pi=Qo("confirmIdealPayment",k.GS.ideal),mi=Qo("confirmKlarnaPayment",k.GS.klarna),fi=Qo("confirmKonbiniPayment",k.GS.konbini),_i=Qo("confirmKrCardPayment",k.GS.kr_card),hi=Qo("confirmNaverPayPayment",k.GS.naver_pay),yi=Qo("confirmKakaoPayPayment",k.GS.kakao_pay),vi=Qo("confirmPaycoPayment",k.GS.payco),gi=Qo("confirmKrMarketPayment",k.GS.kr_market),bi=Qo("confirmMobilepayPayment",k.GS.mobilepay),wi=Qo("confirmOxxoPayment",k.GS.oxxo),ki=Qo("confirmAlipayPayment",k.GS.alipay),Si=Qo("confirmP24Payment",k.GS.p24),Pi=Qo("confirmPayByBankPayment",k.GS.pay_by_bank),Ci=Qo("confirmSequraPayment",k.GS.sequra),Ei=Qo("confirmCapchasePayPayment",k.GS.capchase_pay),Ai=Qo("confirmMonduPayment",k.GS.mondu),Ni=Qo("confirmKriyaPayment",k.GS.kriya),Ti=function(e,t,n,r,o){if("error"===(0,y.ld)((0,y.jt)((0,y.mC)({payment_method_options:(0,y.jt)((0,y.mC)({paypal:(0,y.jt)(y.Ry)}))})),r,"internal").type)return Qo("confirmPayPalPayment",k.GS.paypal)(e,t,n,r,o);var i=(0,rn.cn)(n,"confirmPayPalPayment");return function(e,t){var n=e.keyMode()===Gt.Kl.live;return new Ro((function(r,o){setTimeout((function(){o(new Error("Timeout in initPaypalRiskLibrary"))}),5e3),e.action.retrievePaypalMerchantId(t).then((function(e){if("object"===e.type){var t=e.object.paypal_merchant_id,i="stripe_".concat(t,"_payments");Mo(i,n).then((function(e){r(e)})).catch((function(e){o(e)}))}else o()})).catch((function(e){o(e)}))}))}(e,i.id).then((function(i){var a={paypal:{risk_correlation_id:i}};return Qo("confirmPayPalPayment",k.GS.paypal)(e,t,n,r,o,a)})).catch((function(){return Qo("confirmPayPalPayment",k.GS.paypal)(e,t,n,r,o)}))},Ii=Qo("confirmPayToPayment",k.GS.payto),Ri=function(e,t,n,r,o){var i,a,c,s,u;return"error"===(0,y.ld)((0,y.jt)((0,y.mC)({payment_method_options:(0,y.jt)((0,y.mC)({rechnung:(0,y.jt)(y.Ry)}))})),r,"internal").type?Qo("confirmRechnungPayment",k.GS.rechnung)(e,t,n,r,o):(i=e.keyMode()===Gt.Kl.live,c=(0,v.Vj)().replaceAll("-",""),s=a||"test-1",u="".concat("ud1X0qwDppce","_").concat(s,"_").concat(c),i||-1!==jo.indexOf(s)?Lo(s,c,i).then((function(){return u})):Zo.resolve("".concat("test","_").concat(u))).then((function(i){var a={rechnung:{risk_correlation_id:i}};return Qo("confirmRechnungPayment",k.GS.rechnung)(e,t,n,r,o,a)})).catch((function(){throw new C.No("Missing risk_correlation_id in payment_method_options.")}))},Mi=Qo("confirmSepaDebitPayment",k.GS.sepa_debit),Oi=Qo("confirmSofortPayment",k.GS.sofort),xi=Qo("confirmIdBankTransferPayment",k.GS.id_bank_transfer),Zi=Qo("confirmUpiPayment",k.GS.upi),ji=Qo("confirmUsBankAccountPayment",k.GS.us_bank_account),Li=Qo("confirmNzBankAccountPayment",k.GS.nz_bank_account),Bi=Qo("confirmBlikPayment",k.GS.blik),Di=Qo("confirmZipPayment",k.GS.zip),qi=Qo("confirmCustomerBalancePayment",k.GS.customer_balance),Fi=function(e,t,n,r,o){if(o&&!0===o.handleActions)throw new C.No("Expected option `handleActions` to be `false`.");var i=(0,a.Z)((0,a.Z)({},r),{},{payment_method:(0,a.Z)({},r&&r.payment_method||{})});return Qo("confirmWechatPayPayment",k.GS.wechat_pay)(e,t,n,i,o,{wechat_pay:{client:"web"}})},Ui=function(e,t,n,r,o){if(!r||!r.payment_method_options||!r.payment_method_options.wechat_pay||"web"!==r.payment_method_options.wechat_pay.client&&"mobile_web"!==r.payment_method_options.wechat_pay.client)throw new C.No("Expected client value `web` or `mobile_web` in payment_method_options.");var i={};"string"==typeof r.payment_method&&(i=r.payment_method),"object"==typeof r.payment_method&&(i=(0,a.Z)({},r.payment_method||{}));var c=(0,a.Z)((0,a.Z)({},r),{},{payment_method:i,payment_method_options:(0,a.Z)((0,a.Z)({},r&&r.payment_method_options||{}),{},{wechat_pay:(0,a.Z)({},r&&r.payment_method_options&&r.payment_method_options.wechat_pay||{})})});return Qo("confirmWechatPayPayment",k.GS.wechat_pay)(e,t,n,c,o)},Gi=Qo("confirmCashappPayment",k.GS.cashapp),zi=Qo("confirmPayNowPayment",k.GS.paynow),Hi=Qo("confirmPayNowDisplayBeta1",k.GS.paynow),Ki=Qo("confirmPixPayment",k.GS.pix),Yi=Qo("confirmPromptPayPayment",k.GS.promptpay),Wi=Qo("confirmRevolutPayPayment",k.GS.revolut_pay),Vi=Qo("confirmAmazonPayPayment",k.GS.amazon_pay),Xi=Qo("confirmSunbitPayment",k.GS.sunbit),Qi=Qo("confirmBilliePayment",k.GS.billie),Ji=Qo("confirmSatispayPayment",k.GS.satispay),$i=Qo("confirmNgMarketPayment",k.GS.ng_market),ea=Qo("confirmNgMarketPayment",k.GS.ng_bank),ta=Qo("confirmNgMarketPayment",k.GS.ng_bank_transfer),na=Qo("confirmNgMarketPayment",k.GS.ng_card),ra=Qo("confirmNgMarketPayment",k.GS.ng_ussd),oa=Qo("confirmNetbankingPayment",k.GS.netbanking),ia=Qo("confirmSouthKoreaMarketPayment",k.GS.south_korea_market),aa=Qo("confirmSwishPayment",k.GS.swish),ca=Qo("confirmTwintPayment",k.GS.twint),sa=Qo("confirmMultibancoPayment",k.GS.multibanco),ua=Qo("confirmMbWayPayment",k.GS.mb_way),la=function(e,t,n){var r=function(e,t,n){var r=(0,y.Gu)(Vo,n,Wo);r.warnings.forEach((function(t){return e.warn(t)}));var o=r.value,i=o.elements,c=o.params,s=void 0===c?{}:c,u=s.payment_method,l=s.payment_method_data,p=s.payment_method_options,m=(0,d.Z)(s,Yo),f=o.clientSecret;if(i){var _=(0,P.sE)(i._elements,(function(e){return"payment"===e._componentName}));return _?{tag:"elements",elementName:"payment",frameId:_._implementation._frame.id,groupId:i._id,data:null!=l?l:{},options:null!=p?p:{},intentSecret:f,otherParams:m,handleActions:!1,expectedType:null,enforcePreSubmit:!1,mids:t,merchantParams:r.value.params}:{tag:"shipping-from-elements",groupId:i._id,data:null!=l?l:{},options:null!=p?p:{},intentSecret:f,otherParams:m,handleActions:!1,expectedType:(0,rn.IV)(null==l?void 0:l.type),mids:t,merchantParams:r.value.params}}if(!f)throw new C.No("".concat(Wo,": expected either `elements` or `clientSecret`, but got neither."));if(u&&l)throw new C.No("".concat(Wo,": Expected either `payment_method` or `payment_method_data`, but not both."));var h=(0,rn.IV)(null==l?void 0:l.type);return l&&h?{intentSecret:f,tag:"paymentMethod-from-data",type:h,data:l,options:null!=p?p:{},mids:t,expectedType:h,otherParams:m,handleActions:!1,merchantParams:r.value.params}:u?{intentSecret:f,tag:"paymentMethod",paymentMethod:u,options:null!=p?p:{},mids:t,expectedType:h,otherParams:(0,a.Z)({mandate_data:{customer_acceptance:{type:"online",online:{infer_from_client:!0}}}},m),handleActions:!1,merchantParams:r.value.params}:{intentSecret:f,tag:"none",mids:t,expectedType:h,otherParams:m,handleActions:!1,merchantParams:r.value.params}}(e,t,n);return e.action.updatePaymentIntent(r).then(hn.PA)},da=function(e,t,n,r){var o=(0,rn.cn)(n,"updatePaymentIntent"),i=(0,rn.k7)(r),c=(0,rn.o1)({expectedType:i,label:"updatePaymentIntent",rawData:r,intentSecret:o,mids:t,handleActions:!1});return e.action.updatePaymentIntent((0,a.Z)({},c)).then(hn.PA)},pa=function(e){var t;return"error"in e&&"external_payment_method_selected"===e.error.code?{selectedPaymentMethod:null===(t=e.error.extra_fields)||void 0===t?void 0:t.selectedPaymentMethod}:e},ma=function(e,t){return function(e,t){var n=(0,rn.cn)(e,"retrievePaymentIntent");return t.action.retrievePaymentIntent({intentSecret:n,hosted:!1})}(e,t).then(hn.PA)},fa=function(e,t,n){var r=(0,rn.cn)(t,"verifyMicrodepositsForPayment"),o=(0,y.Gu)(y.Ry,n,"stripe.verifyMicrodepositsForPayment");return e.action.verifyMicrodepositsForPayment({intentSecret:r,data:o.value}).then(hn.PA)},_a=function(e,t,n){var r=(0,rn.cn)(t,"collectUsBankAccountForPayment"),o=(0,y.Gu)((0,ut.ZY)("us_bank_account"),n,"stripe.collectUsBankAccountForPayment").value,i=o.paymentMethodData,a=o.otherParams;return(0,$t.ri)(r.clientSecret,r.id,e,i).then((function(t){return t.error?e.action.localizeError(t.error).then((function(e){return Xo.resolve({error:e})})):t.linkAccountSession.paymentAccount?e.action.attachLinkAccountSessionForPayment({intentSecret:r,linkAccountSessionId:t.linkAccountSession.id,expandParam:a.expand}).then((function(e){return(0,hn.PA)(e)})):e.action.retrievePaymentIntent({intentSecret:r,hosted:!1}).then(hn.PA)}))},ha=function(e,t,n){var r=(0,y.Gu)((0,ut.as)(ut.f4,t),n,"stripe.collectBankAccountForPayment").value,o=r.clientSecret,i=r.paymentMethodData,a=r.onEvent,c=r.otherParams;return(0,$t.ri)(o.clientSecret,o.id,e,i,a).then((function(t){return t.error?e.action.localizeError(t.error).then((function(e){return Xo.resolve({error:e})})):t.linkAccountSession.paymentAccount?e.action.attachLinkAccountSessionForPayment({intentSecret:o,linkAccountSessionId:t.linkAccountSession.id,expandParam:c.expand}).then((function(e){return(0,hn.PA)(e)})):e.action.retrievePaymentIntent({intentSecret:o,hosted:!1}).then(hn.PA)}))},ya=function(e,t){var n=(0,rn.cn)(e,"handleCardAction");return t.action.retrievePaymentIntent({intentSecret:n,hosted:!1}).then((function(e){var n=(0,Bo.Fh)(e);switch(n.type){case"error":return Xo.resolve((0,hn.PA)(e));case"object":var r=n.object;if((0,hn.mD)(r.status)){if("manual"!==r.confirmation_method)throw new C.No("handleCardAction: The PaymentIntent supplied does not require manual server-side confirmation. Please use confirmCardPayment instead to complete the payment.");return(0,Bo.gO)(t,r,n.locale,!1,!1)}throw new C.No("handleCardAction: The PaymentIntent supplied is not in the requires_action state.");default:return(0,y.Rz)(n)}}))},va=n(6297),ga=n(623),ba=n(6274).Promise,wa=function(e,t){var n=(0,y.Gu)((0,y.mC)({clientSecret:ut.Hv}),t,"stripe.handleNextAction").value.clientSecret;return"SETUP_INTENT"===n.type?function(e,t){return e.action.retrieveSetupIntent({intentSecret:t,hosted:!1}).then((function(t){switch(t.type){case"error":return ba.resolve((0,hn.e3)(t));case"object":var n=t.object;if((0,hn.mD)(n.status))return(0,ga.i)(e,n,t.locale,!1);throw new C.No("handleNextAction: The SetupIntent supplied is not in the requires_action state.");default:return(0,y.Rz)(t)}}))}(e,n):function(e,t){return e.action.retrievePaymentIntent({intentSecret:t,hosted:!1}).then((function(t){switch(t.type){case"error":return ba.resolve((0,hn.PA)(t));case"object":var n=t.object;if((0,hn.mD)(n.status))return(0,Bo.gO)(e,n,t.locale,!1,!1);throw new C.No("handleNextAction: The PaymentIntent supplied is not in the requires_action state.");default:return(0,y.Rz)(t)}}))}(e,n)},ka=["type"],Sa=["source","source_data","payment_method","payment_method_data"],Pa=["payment_intent"],Ca=function(e,t,n){if(null==e)return(0,y.x4)(null);var r=e.type,o=(0,d.Z)(e,ka),i=(0,y.Wc)(y.Z_,(function(){return null}))(r,t,(0,y.NQ)(n,"type"));return"error"===i.type?i:(0,y.x4)({type:i.value,data:o})},Ea=function(e,t,n,r){if(null===e){if(null===t){var o=r?"source_data":"payment_method_data";throw new C.No("".concat(n,": you must additionally specify the type of payment method to create within ").concat(o,"."))}return t}if(null===t)return e;if(t!==e)throw new C.No("".concat(n,": you specified `type: ").concat(t,"`, but ").concat(n," will create a ").concat(e," payment method."));return e},Aa=function(e){return function(t,n,r){if((0,le.Kn)(t)){var o=t.source,i=t.source_data,c=t.payment_method,s=t.payment_method_data,u=(0,d.Z)(t,Sa);if(null!=o&&"string"!=typeof o)return(0,y.RH)("string",typeof o,n,(0,y.NQ)(r,"source"));if(null!=c&&"string"!=typeof c)return(0,y.RH)("string",typeof c,n,(0,y.NQ)(r,"payment_method"));if(null!=i&&!(0,le.Kn)(i))return(0,y.RH)("object",typeof i,n,(0,y.NQ)(r,"source_data"));if(null!=s&&!(0,le.Kn)(s))return(0,y.RH)("object",typeof s,n,(0,y.NQ)(r,"payment_method_data"));var l=Ca(i,n,(0,y.NQ)(r,"source_data"));if("error"===l.type)return l;var p=l.value,m=Ca(s,n,(0,y.NQ)(r,"payment_method_data"));if("error"===m.type)return m;var f=m.value;return(0,y.x4)({sourceData:p,source:null==o?null:o,paymentMethodData:f,paymentMethod:null==c?null:c,otherParams:(0,a.Z)((0,a.Z)({},e),u)})}return null===t?(0,y.RH)("object","null",n,r):(0,y.RH)("object",typeof t,n,r)}},Na=function(e){return function(t,n,r){if(void 0===t)return(0,y.x4)({sourceData:null,paymentMethodData:null,source:null,paymentMethod:null,otherParams:{}});if("object"!=typeof t)return(0,y.RH)("object",typeof t,n,r);if(null===t)return(0,y.RH)("object","null",n,r);if(e){if(!t.payment_intent){var o=(0,y.Gu)((0,y.mC)({return_url:(0,y.jt)(y.Z_),expand:(0,y.jt)((0,y.CT)(y.Z_)),shipping:(0,y.jt)((0,y.ci)({name:y.Z_,address:(0,y.ci)({line1:(0,y.jt)(y.Z_),line2:(0,y.jt)(y.Z_),city:(0,y.jt)(y.Z_),state:(0,y.jt)(y.Z_),postal_code:(0,y.jt)(y.Z_),country:(0,y.jt)(y.Z_)})}))}),t,"validate otherParams").value,i=(0,a.Z)((0,a.Z)({},t),o);return(0,y.x4)({sourceData:null,paymentMethodData:null,source:null,paymentMethod:null,otherParams:i})}var c=t.payment_intent,s=(0,d.Z)(t,Pa);return Aa(s)(c,n,(0,y.NQ)(r,"payment_intent"))}return t.payment_intent?(0,y.zS)(new C.No("The payment_intent parameter has been removed. To fix, move everything nested under the payment_intent parameter to the top-level object.")):Aa({})(t,n,r)}},Ta=function(e){var t=e.allowSourceCreation,n=e.useLegacyConfirmShape,r=e.expectedType,o=e.label,i=e.intentSecret,c=e.elementOrData,s=e.possibleData,u=e.mids,l=e.handleActions,d=function(e){var t=e.allowSourceCreation,n=e.useLegacyConfirmShape,r=e.expectedType,o=e.label,i=e.elementOrData,c=e.possibleData,s=e.intentSecret,u=e.mids,l=e.handleActions,d=(0,y.rX)(i);if(!d)return null;var p=(0,y.Gu)(Na(n),c,o).value,m=p.sourceData,f=p.source,_=p.paymentMethodData,h=p.paymentMethod,v=p.otherParams;if(!t&&m)throw new C.No("".concat(o,": Expected payment_method_data, not source_data."));if(null!=f)throw new C.No("When calling ".concat(o," on an Element, you can't pass in a pre-existing source ID, as a source will be created using the Element."));if(null!=h)throw new C.No("When calling ".concat(o," on an Element, you can't pass in a pre-existing PaymentMethod ID, as a PaymentMethod will be created using the Element."));var g=d._componentName,b=d._implementation._frame.id,w=m||_||{type:null,data:{}},S=w.type,P=w.data,E=(0,k.ZX)(g,S),A=t&&!_,N={elementName:g,frameId:b,type:Ea(r,E,o,A),data:P};return A?(0,a.Z)({tag:"source-from-element",intentSecret:s,otherParams:v,mids:u,expectedType:r,handleActions:l,merchantParams:(0,a.Z)({source_data:P},v)},N):(0,a.Z)({tag:"paymentMethod-from-element",options:null,intentSecret:s,otherParams:v,mids:u,expectedType:r,handleActions:l,merchantParams:(0,a.Z)({payment_method_data:P},v)},N)}({allowSourceCreation:t,useLegacyConfirmShape:n,expectedType:r,label:o,elementOrData:c,possibleData:s,intentSecret:i,mids:u,handleActions:l});if(d)return d;var p=function(e){var t=e.allowSourceCreation,n=e.useLegacyConfirmShape,r=e.expectedType,o=e.label,i=e.rawData,c=e.intentSecret,s=e.mids,u=e.handleActions,l=(0,y.Gu)(Na(n),i,o).value,d=l.sourceData,p=l.source,m=l.paymentMethodData,f=l.paymentMethod,_=l.otherParams;if(!t&&d)throw new C.No("".concat(o,": Expected payment_method, source, or payment_method_data, not source_data."));var h=d||m;if(null!==p&&null!==d)throw new C.No("".concat(o,": Expected either source or source_data, but not both."));if(null!==f&&null!==m)throw new C.No("".concat(o,": Expected either payment_method or payment_method_data, but not both."));if(null!==f&&null!==p)throw new C.No("".concat(o,": Expected either payment_method or source, but not both."));if(h){var v=h.type,g=h.data,b=t&&!m,w=Ea(r,v,o,b);return b?{tag:"source-from-data",intentSecret:c,type:w,data:g,mids:s,expectedType:r,otherParams:_,handleActions:u,merchantParams:(0,a.Z)({source_data:(0,a.Z)({type:w},g)},_)}:{tag:"paymentMethod-from-data",type:w,data:g,intentSecret:c,options:null,mids:s,expectedType:r,otherParams:_,handleActions:u,merchantParams:(0,a.Z)({payment_method_data:(0,a.Z)({type:w},g)},_)}}return null!==p?{tag:"source",intentSecret:c,source:p,mids:s,expectedType:r,otherParams:_,handleActions:u,merchantParams:(0,a.Z)({source:p},_)}:null!==f?{tag:"paymentMethod",paymentMethod:f,intentSecret:c,options:null,mids:s,expectedType:r,otherParams:_,handleActions:u,merchantParams:(0,a.Z)({payment_method:f},_)}:{tag:"none",intentSecret:c,mids:s,expectedType:r,otherParams:_,handleActions:u,merchantParams:_}}({allowSourceCreation:t,useLegacyConfirmShape:n,expectedType:r,label:o,rawData:c,intentSecret:i,mids:u,handleActions:l});if(p)return p;throw new C.No("Expected: stripe.".concat(o,"(intentSecret, element[, data]) or stripe.").concat(o,"(intentSecret[, data]). Please see the docs for more usage examples https://stripe.com/docs/payments/dynamic-authentication"))},Ia=function(e,t,n,r,o,i){var a=(0,y.Gu)(ut.f4,r,"stripe.confirmPaymentIntent intent secret").value,c=Ta({allowSourceCreation:e,useLegacyConfirmShape:!1,expectedType:null,label:"confirmPaymentIntent",intentSecret:a,elementOrData:o,possibleData:i,handleActions:!1,mids:n});return t.action.confirmPaymentIntent(c).then(hn.PA)},Ra=function(e,t,n,r,o,i,a){var c=(0,y.Gu)(ut.f4,o,"stripe.handleCardPayment intent secret").value,s=k.GS.card,u=Ta({allowSourceCreation:e,useLegacyConfirmShape:r,expectedType:s,label:"handleCardPayment",intentSecret:c,elementOrData:i,possibleData:a,handleActions:!0,mids:n}),l=!i&&!a;return t.action.confirmPaymentIntent(u).then((0,Bo.nq)(t,l,!1,!1))},Ma=function(e,t,n,r,o,i){var a=(0,y.Gu)(ut.f4,r,"stripe.handleSepaDebitPayment intent secret").value,c=k.GS.sepa_debit,s=Ta({allowSourceCreation:!1,useLegacyConfirmShape:n,expectedType:c,label:"handleSepaDebitPayment",intentSecret:a,elementOrData:o,possibleData:i,handleActions:!0,mids:t}),u=!o&&!i;return e.action.confirmPaymentIntent(s).then((0,Bo.nq)(e,u,!1,!1))},Oa=function(e,t,n,r,o,i,a){var c=(0,y.Gu)(ut.f4,o,"stripe.handleIdealPayment intent secret").value,s=k.GS.ideal,u=Ta({allowSourceCreation:e,useLegacyConfirmShape:r,expectedType:s,label:"handleIdealPayment",intentSecret:c,elementOrData:i,possibleData:a,handleActions:!0,mids:n}),l=!i&&!a;return t.action.confirmPaymentIntent(u).then((0,Bo.nq)(t,l,!1,!1))},xa=function(e,t,n,r,o,i){var a=(0,y.Gu)(ut.f4,r,"stripe.handleFpxPayment intent secret").value,c=k.GS.fpx,s=Ta({allowSourceCreation:!1,useLegacyConfirmShape:n,expectedType:c,label:"handleFpxPayment",intentSecret:a,elementOrData:o,possibleData:i,handleActions:!0,mids:t}),u=!o&&!i;return e.action.confirmPaymentIntent(s).then((0,Bo.nq)(e,u,!1,!1))},Za=function(e){switch(e.type){case"object":return{returnIntent:e.object};case"error":return{error:e.error};default:return(0,y.Rz)(e)}},ja=function(e,t,n){var r=(0,y.Gu)((0,y.jt)(y.Ry),n,"stripe.confirmReturnIntent"),o=r.warnings,i=r.value;return o.forEach((function(t){return e.warn(t)})),e.action.confirmReturnIntent({returnIntentId:t,data:i||{}}).then(Za)},La=n(6274).Promise,Ba=function(e,t){return function(n,r,o,i,a){var c=(0,rn.jH)(o,e),s=(0,rn.el)(e,a).handleActions,u=(0,rn.o1)({expectedType:t,label:e,rawData:i,intentSecret:c,mids:r,handleActions:s}),l="none"===u.tag,d=n.action.confirmSetupIntent(u);return s?d.then((0,ga.k)(n,l,!1,u.otherParams.expand)):d.then(hn.e3)}},Da=Ba("confirmAcssDebitSetup",k.GS.acss_debit),qa=Ba("confirmAfterpayClearpaySetup",k.GS.afterpay_clearpay),Fa=Ba("confirmAmazonPaySetup",k.GS.amazon_pay),Ua=Ba("confirmCardSetup",k.GS.card),Ga=Ba("confirmSepaDebitSetup",k.GS.sepa_debit),za=Ba("confirmAuBecsDebitSetup",k.GS.au_becs_debit),Ha=Ba("confirmBacsDebitSetup",k.GS.bacs_debit),Ka=Ba("confirmCashappSetup",k.GS.cashapp),Ya=Ba("confirmIdealSetup",k.GS.ideal),Wa=Ba("confirmKrCardSetup",k.GS.kr_card),Va=Ba("confirmKrMarketSetup",k.GS.kr_market),Xa=Ba("confirmKrMarketSetup",k.GS.ng_market),Qa=Ba("confirmNgCardSetup",k.GS.ng_card),Ja=Ba("confirmAlipaySetup",k.GS.alipay),$a=Ba("confirmSofortSetup",k.GS.sofort),ec=Ba("confirmBancontactSetup",k.GS.bancontact),tc=Ba("confirmIdBankTransferSetup",k.GS.id_bank_transfer),nc=Ba("confirmPayPalSetup",k.GS.paypal),rc=Ba("confirmPayToSetup",k.GS.payto),oc=Ba("confirmRevolutPaySetup",k.GS.revolut_pay),ic=Ba("confirmUsBankAccountSetup",k.GS.us_bank_account),ac=Ba("confirmUpiSetup",k.GS.upi),cc=Ba("confirmNzBankAccountSetup",k.GS.nz_bank_account),sc=Ba("confirmKlarnaSetup",k.GS.klarna),uc=function(e){var t;return"error"in e&&"external_payment_method_selected"===e.error.code?{selectedPaymentMethod:null===(t=e.error.extra_fields)||void 0===t?void 0:t.selectedPaymentMethod}:e},lc=function(e,t){return function(e,t){var n=(0,rn.jH)(e,"retrieveSetupIntent");return t.action.retrieveSetupIntent({intentSecret:n,hosted:!1})}(e,t).then(hn.e3)},dc=function(e,t,n){var r=(0,rn.jH)(t,"verifyMicrodepositsForSetup"),o=(0,y.Gu)(y.Ry,n,"stripe.verifyMicrodepositsForSetup");return e.action.verifyMicrodepositsForSetup({intentSecret:r,data:o.value}).then(hn.e3)},pc=function(e,t,n){var r=(0,rn.jH)(t,"collectUsBankAccountForSetup"),o=(0,y.Gu)((0,ut.ZY)("us_bank_account"),n,"stripe.collectUsBankAccountForSetup").value,i=o.paymentMethodData,a=o.otherParams;return(0,$t.At)(r.clientSecret,r.id,e,i).then((function(t){return t.error?e.action.localizeError(t.error).then((function(e){return La.resolve({error:e})})):t.linkAccountSession.paymentAccount?e.action.attachLinkAccountSessionForSetup({intentSecret:r,linkAccountSessionId:t.linkAccountSession.id,expandParam:a.expand}).then((function(e){return(0,hn.e3)(e)})):e.action.retrieveSetupIntent({intentSecret:r,hosted:!1}).then(hn.e3)}))},mc=function(e,t,n){var r=(0,y.Gu)((0,ut.as)(ut.Yj,t),n,"stripe.collectBankAccountForSetup").value,o=r.clientSecret,i=r.paymentMethodData,a=r.onEvent,c=r.otherParams;return(0,$t.At)(o.clientSecret,o.id,e,i,a).then((function(t){return t.error?e.action.localizeError(t.error).then((function(e){return La.resolve({error:e})})):t.linkAccountSession.paymentAccount?e.action.attachLinkAccountSessionForSetup({intentSecret:o,linkAccountSessionId:t.linkAccountSession.id,expandParam:c.expand}).then((function(e){return(0,hn.e3)(e)})):e.action.retrieveSetupIntent({intentSecret:o,hosted:!1}).then(hn.e3)}))},fc=function(e,t,n,r,o){var i=(0,y.Gu)(ut.Yj,n,"stripe.handleCardSetup intent secret").value,a=k.GS.card,c=Ta({allowSourceCreation:!1,useLegacyConfirmShape:!1,expectedType:a,label:"handleCardSetup",intentSecret:i,elementOrData:r,possibleData:o,handleActions:!0,mids:t}),s=!r&&!o;return e.action.confirmSetupIntent(c).then((0,ga.k)(e,s,!1,c.otherParams.expand))},_c=function(e,t,n,r,o){var i=(0,y.Gu)(ut.Yj,n,"stripe.handleSepaDebitSetup intent secret").value,a=k.GS.sepa_debit,c=Ta({allowSourceCreation:!1,useLegacyConfirmShape:!1,expectedType:a,label:"handleSepaDebitSetup",intentSecret:i,elementOrData:r,possibleData:o,handleActions:!0,mids:t}),s=!r&&!o;return e.action.confirmSetupIntent(c).then((0,ga.k)(e,s,!1))},hc=function(e,t,n,r,o){var i=(0,y.Gu)(ut.Yj,n,"stripe.confirmSetupIntent intent secret").value,a=Ta({allowSourceCreation:!1,useLegacyConfirmShape:!1,expectedType:null,label:"confirmSetupIntent",intentSecret:i,elementOrData:r,possibleData:o,mids:t,handleActions:!1});return e.action.confirmSetupIntent(a).then(hn.e3)},yc=n(6042),vc=n(6274).Promise,gc=function(e,t){var n=function(e){if("string"==typeof e){var t=e.trim().match(/^((vi|vs)_[0-9a-zA-Z]+)_secret_(.+)$/);if(!t)throw new C.No("stripe.verifyIdentity: Could not parse client secret.");return{identityClientSecret:t[0],id:t[1],token:t[3]}}throw new C.No("stripe.verifyIdentity: Could not parse client secret.")}(e),r=n.id,o=function(e){return"".concat(A.Ht,"start/").concat(e)}(n.token);return function(e){var t=e.controller,n=e.url,r=(e.id,e.locale),o=void 0===r?"en-US":r,i=(0,yc.q)(t,{url:(0,U.jr)(n),size:"400x600",frameTitle:"identity.verification_frame_title",locale:o,useLightboxHostedCloseButton:!0,allowCamera:!0,appType:"identity"});return new vc((function(e){var t={type:"user_action",code:"session_cancelled"};i._on("identity-frame-close",(function(){(0,yc.G)(i).then((function(){e({error:t})}))})),i._on("identity-frame-error",(function(e){var n=e.type,r=e.code;t={type:n,code:r}})),i._on("identity-frame-session-complete",(function(){t=null})),i._on("request-close",(function(){(0,yc.G)(i).then((function(){e({error:t})}))}))}))}({controller:t,url:o,id:r})},bc=["number","cvc","pin.number"],wc=function(e,t,n){if("string"!=typeof e)return(0,y.$3)("an Issuing card ID of the form ic_xxx",e,t,n);var r,o=(r=e.trim().match(/ic_[a-zA-Z0-9_]+$/))?r[0]:null;return null===o?(0,y.$3)("an Issuing card ID of the form ic_xxx",e,t,n):(0,y.x4)(o,[])},kc=function(e,t){return(0,y.Gu)(wc,e,"stripe.".concat(t," cardId")).value},Sc=function(e,t,n){if("string"!=typeof e)return(0,y.$3)("an ephemeral key secret of the form ek_xxx",e,t,n);var r,o=(r=e.trim().match(/ek_[a-zA-Z0-9_]+$/))?r[0]:null;return null===o?(0,y.$3)("an ephemeral key secret of the form ek_xxx",e,t,n):(0,y.x4)(o,[])},Pc=function(e,t,n){return"string"!=typeof e?(0,y.$3)("a string",e,t,n):bc.indexOf(e)<0?(0,y.$3)("any of ".concat(bc.join(", ")),e,t,n):(0,y.x4)(e,[])},Cc=function(e,t){return(0,y.Gu)(Sc,e,"stripe.".concat(t," ephemeral key secret")).value},Ec=function(e,t,n){if("string"!=typeof e)return(0,y.$3)("an ephemeral key nonce of the form ephkn_xxx",e,t,n);var r,o=(r=e.trim().match(/ephkn_[a-zA-Z0-9_]+$/))?r[0]:null;return null===o?(0,y.$3)("an ephemeral key nonce of the form ephkn_xxx",e,t,n):(0,y.x4)(o,[])},Ac=function(e){if("object"==typeof e&&e&&e.ephemeralKeySecret&&e.nonce){var t,n=Cc(e.ephemeralKeySecret,"retrieveIssuingCard"),r=(o=e.nonce,i="retrieveIssuingCard",(0,y.Gu)(Ec,o,"stripe.".concat(i," ephemeral key nonce")).value);return Array.isArray(e.expand)&&(t=e.expand.map((function(e){return function(e,t){return(0,y.Gu)(Pc,e,"stripe.".concat(t," expand param")).value}(e,"retrieveIssuingCard")}))),{ephemeralKeySecret:n,publicNonce:r,expand:t}}throw new C.No("When retrieving an Issuing card, you must specify an ephemeral key secret and an ephemeral key nonce in the options argument of stripe.retrieveIssuingCard.");var o,i},Nc=function(e,t){return function(e){if("object"==typeof e&&e&&e.issuingCard)return{issuingCard:kc(e.issuingCard,"createEphemeralKeyNonce")};throw new C.No("When creating an ephemeral key nonce, you must specify an Issuing card ID in the options argument of stripe.createEphemeralKeyNonce.")}(e),t.action.createEphemeralKeyNonce().then(ne)},Tc=[S.M4.checkout_beta_2,S.M4.checkout_beta_3,S.M4.checkout_beta_4],Ic=[S.M4.checkout_beta_2,S.M4.checkout_beta_3,S.M4.checkout_beta_4,S.M4.checkout_beta_locales,S.M4.checkout_beta_testcards],Rc={bg:"bg",cs:"cs",da:"da",de:"de",el:"el",en:"en","en-GB":"en-GB",es:"es","es-419":"es-419",et:"et",fi:"fi",fil:"fil",fr:"fr","fr-CA":"fr-CA",hr:"hr",hu:"hu",id:"id",it:"it",ja:"ja",ko:"ko",lt:"lt",lv:"lv",ms:"ms",mt:"mt",nb:"nb",nl:"nl",pl:"pl",pt:"pt","pt-BR":"pt-BR",ro:"ro",ru:"ru",sk:"sk",sl:"sl",sv:"sv",th:"th",tr:"tr",vi:"vi",zh:"zh","zh-HK":"zh-HK","zh-TW":"zh-TW"},Mc={"pt-PT":"pt-PT"},Oc=Object.keys(Rc),xc=Object.keys(Mc),Zc=["sku","plan","items"],jc=["sessionId","sku","plan","items","lineItems","successUrl","cancelUrl","mode"],Lc={sku:(0,y.jt)(y.Z_),plan:(0,y.jt)(y.Z_),clientReferenceId:(0,y.jt)(y.Z_),locale:(0,y.jt)(y.kw.apply(void 0,["auto"].concat((0,c.Z)(Oc)))),customerEmail:(0,y.jt)(y.Z_),billingAddressCollection:(0,y.jt)((0,y.kw)("required","auto")),submitType:(0,y.jt)((0,y.kw)("auto","pay","book","donate")),allowIncompleteSubscriptions:(0,y.jt)(y.Xg),shippingAddressCollection:(0,y.jt)((0,y.ci)({allowedCountries:(0,y.CT)(y.Z_)}))},Bc=/cs_(test|live)_.+/,Dc=function(e,t){var n=(0,y.ci)((0,a.Z)((0,a.Z)({},Lc),{},{items:(0,y.jt)((0,y.or)((0,y.CT)((0,y.ci)({type:(0,y.kw)("plan"),quantity:(0,y.M4)(0),id:y.Z_})),(0,y.CT)((0,y.ci)({type:(0,y.kw)("sku"),quantity:(0,y.M4)(0),id:y.Z_})))),successUrl:y.Z_,cancelUrl:y.Z_})),r=(0,y.Gu)(n,t,"stripe.redirectToCheckout").value,o=r.sku,i=r.plan,c=r.items,s=(0,d.Z)(r,Zc),u=function(e,t,n){if(e&&t||(e||t)&&n)throw new C.No("stripe.redirectToCheckout: Expected only one of sku, plan, or items.");if("string"==typeof e)return[{sku:e,quantity:1}];if("string"==typeof t)return[{plan:t,quantity:1}];if(n)return n.map((function(e){return"sku"===e.type?{sku:e.id,quantity:e.quantity}:{plan:e.id,quantity:e.quantity}}));throw new C.No("stripe.redirectToCheckout: You must provide either sku, plan, or items.")}(o,i,c);return(0,a.Z)({tag:"no-session",items:u},s)},qc=function(e,t,n){var r=(0,y.ci)((0,a.Z)((0,a.Z)({},Lc),{},{sessionId:(0,y.jt)(y.Z_),successUrl:(0,y.jt)(y.Z_),cancelUrl:(0,y.jt)((0,y.AG)(y.Z_)),mode:(0,y.jt)((0,y.kw)("subscription","payment")),items:(0,y.jt)((0,y.or)((0,y.CT)((0,y.ci)({quantity:(0,y.M4)(0),plan:y.Z_})),(0,y.CT)((0,y.ci)({quantity:(0,y.M4)(0),sku:y.Z_})))),lineItems:(0,y.jt)((0,y.CT)((0,y.ci)({quantity:(0,y.M4)(0),price:y.Z_})))},-1!==e.indexOf("checkout_beta_locales")?{locale:(0,y.jt)(y.kw.apply(void 0,["auto"].concat((0,c.Z)(Oc),(0,c.Z)(xc))))}:{})),o=(0,y.Gu)(r,t,"stripe.redirectToCheckout").value;if(o.sessionId){var i=o.sessionId;if(Object.keys(o).length>1)throw new C.No("stripe.redirectToCheckout: Do not provide other parameters when providing sessionId. Specify all parameters on your server when creating the CheckoutSession.");if(!/^cs_/.test(i))throw new C.No("stripe.redirectToCheckout: Invalid value for sessionId. You specified '".concat(i,"'."));if("live"===n&&/^cs_test_/.test(i))throw new C.No("stripe.redirectToCheckout: the provided sessionId is for a test mode Checkout Session, whereas Stripe.js was initialized with a live mode publishable key.");if("test"===n&&/^cs_live_/.test(i))throw new C.No("stripe.redirectToCheckout: the provided sessionId is for a live mode Checkout Session, whereas Stripe.js was initialized with a test mode publishable key.");return{tag:"session",sessionId:i}}o.sessionId,o.sku,o.plan;var s=o.items,u=o.lineItems,l=o.successUrl,p=o.cancelUrl,m=o.mode,f=(0,d.Z)(o,jc);if(!u&&!s)throw new C.No("stripe.redirectToCheckout: You must provide one of lineItems, items, or sessionId.");if(!l)throw new C.No("stripe.redirectToCheckout: You must provide successUrl.");return(0,a.Z)({tag:"no-session",items:s,lineItems:u,successUrl:l,cancelUrl:p,mode:m},f)},Fc=function(e,t,n){var r=qc(e,t,n);if("no-session"===r.tag){var o=r.successUrl,i=r.cancelUrl;if(!(0,w.sD)(o))throw new C.No("stripe.redirectToCheckout: successUrl must start with either http:// or https://.");if(i&&!(0,w.sD)(i))throw new C.No("stripe.redirectToCheckout: cancelUrl must start with either http:// or https://.");return r}return r},Uc=function(e,t){return"session"===t.tag||null==e||t.locale||-1===["auto"].concat((0,c.Z)(Oc)).indexOf(e)?t:(0,a.Z)((0,a.Z)({},t),{},{locale:e})},Gc=function(e,t,n){var r=(0,P.sE)(Tc,(function(t){return(0,S.uN)(e,t)}));if(t&&t.lineItems&&r)throw new C.No("Prices cannot be used with ".concat(r));if("string"==typeof t&&Bc.test(t))throw new C.No("stripe.redirectToCheckout: Checkout Session IDs must be passed in as an object with a key of `sessionId` and the Session ID as the value.");switch(r){case"checkout_beta_2":return Dc(0,t);case"checkout_beta_3":return qc(e,t,n);default:return Fc(e,t,n)}},zc=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unknown";return Uc(t,Gc(e,n,r))},Hc=["tag","items","lineItems","mode","successUrl","cancelUrl","clientReferenceId","customerEmail","billingAddressCollection","submitType","allowIncompleteSubscriptions","shippingAddressCollection"],Kc=function(e,t){var n=t;return Boolean(!1)&&window.__STRIPE_CHECKOUT_URL_OVERRIDE__&&(n=t.replace(/^https?:\/\/[^/]+\//,window.__STRIPE_CHECKOUT_URL_OVERRIDE__)),(0,Ao.U)(n).then((function(t){return(0,Ao.d)(e,"redirectToCheckout",t),{error:t.error}}))},Yc=n(8028),Wc=function(e){var t=(0,y.ld)(ro,e,"StripeWrapperLibrary");if("error"!==t.type){var n=t.value,r=n.name,o=n.version,i=n.startTime;this._controller.registerWrapper({name:r,version:o,startTime:i})}else this._controller.report("register_wrapper.error",{error:t.error.message})},Vc=0,Xc=function(e){var t=e.apiVersion,n=e.innerLocalStorageSemaphore,r=e.initStrategy,o=e.manualBrowserDeprecationRollout,i=e.onControllerLoad,c=e.privateApiUrl,s=e.privatePaymentUserAgentSuffix,u=e.privateSharedSessionContext,l=e.stripe,d=e.stripeAccount,p=e.stripeClass,m=e.stripeCreateTimestamp,f=e.stripeJsLoadTimestamp,_=e.topOriginForCrossOriginFrame,h=e.v2;Vc++;var y=new re.E,v=new Yc.Z((0,a.Z)((0,a.Z)({apiKey:l._apiKey,v2:h,apiVersion:t,stripeAccount:d,betas:l._betas,stripeJsId:p.stripeJsId,stripeJsLoadTimestamp:f,stripeCreateTimestamp:m,onFirstLoad:function(e){var t=e.controllerMetrics,n=e.source;try{i({controller:v,controllerInitTimestamp:y,controllerMetrics:t,initStrategy:r,source:n,stripeCreateTimestamp:m})}catch(e){}},listenerRegistry:l._listenerRegistry},l._locale?{locale:l._locale}:{}),{},{mids:l._mids,innerLocalStorageSemaphore:n,manualBrowserDeprecationRollout:o,topOriginForCrossOriginFrame:_,controllerCount:Vc,isCheckout:l._isCheckout,__privateApiUrl:c,__privatePaymentUserAgentSuffix:s,__privateSharedSessionContext:u}));return v},Qc=function(e,t){Object.defineProperties(e,{_registerWrapper:{value:Wc,writable:!1,enumerable:!1,configurable:!0},_controller:{value:t,writable:!0,enumerable:!0,configurable:!0}})},Jc=function(e){var t,n=e.stripe,r=[];Object.defineProperties(n,{_registerWrapper:{enumerable:!1,configurable:!0,writable:!1,value:function(e){r.push(e)}},_controller:{enumerable:!0,configurable:!0,get:function(){return t||function(o){if(t)return t;for(t=Xc((0,a.Z)((0,a.Z)({},e),{},{initStrategy:o})),Qc(n,t);r.length>0;){var i=r.shift();n._registerWrapper(i)}return t}("lazy")}}})},$c=function(e){e.stripe._isCheckout?Jc(e):0===Vc?function(e){Qc(e.stripe,Xc((0,a.Z)((0,a.Z)({},e),{},{initStrategy:"eager"})))}(e):Jc(e)},es=function(e){switch(e.type){case"object":return{token:e.object};case"error":return{error:e.error};default:return(0,y.Rz)(e)}},ts=function(e){return"object"==typeof e&&null!==e?e:{}},ns=n(6668),rs=function(e){return e.action.createRadarSession().then((function(t){var n=function(e){switch(e.type){case"object":return{radarSession:e.object};case"error":return{error:e.error};default:return(0,y.Rz)(e)}}(t),r="radarSession"in n?n.radarSession:null,o=null==r?void 0:r.passive_captcha_site_key;return o?((0,ns.Cn)(),(0,ns.Ul)({siteKey:o,logger:{log:e.report}}),(0,ns.ky)(o,{log:e.report},!0).then((function(t){return t?e.action.attachHCaptchaTokenToRadarSession({session:r.id,token:t.response,ekey:t.ekey}):null})).catch((function(t){e.warn("Error attaching hCaptcha token to Radar session",t)})).then((function(){return n}))):n}))},os=n(7553),is=n(9465),as=n(6274).Promise,cs="securitypolicyviolation",ss=window,us=/^require-trusted-types-for/,ls="LOAD_ERROR",ds="REPORT_ONLY",ps="BLOCKED",ms={"controller.js":!0,"elements-inner-authentication.js":!0,"elements-inner-card.js":!0,"elements-inner-payment.js":!0,"phone-numbers-lib.js":!0},fs=n(2690),_s=n(3110),hs=n.n(_s),ys=["_1057540218"],vs=["_1541774781"],gs="block",bs="allow",ws="list",ks="query-param",Ss="real-rollout",Ps="no-rollout",Cs=n(8539),Es=n(7600),As=function(e,t){var n=(0,a.Z)({event:e},t);var r="".concat("https://q.stripe.com","?").concat((0,w.qC)(n));(new Image).src=r},Ns="Stripe is being used in an unsupported browser and will not function. See https://stripe.com/docs/js/appendix/supported_browsers for details.",Ts=n(6274).Promise,Is=function(){function e(){(0,s.Z)(this,e),this._element=null}return(0,u.Z)(e,[{key:"on",value:function(){}},{key:"once",value:function(){}},{key:"mount",value:function(e){var t=null;if((t="string"==typeof e?document.querySelector(e):e)&&"function"==typeof t.appendChild){var n=document.createElement("div");n.innerText="Browser unsupported",this._element=n,t.appendChild(n)}}},{key:"update",value:function(){}},{key:"focus",value:function(){}},{key:"blur",value:function(){}},{key:"clear",value:function(){}},{key:"off",value:function(){}},{key:"unmount",value:function(){var e,t;null===(e=this._element)||void 0===e||null===(t=e.parentElement)||void 0===t||t.removeChild(this._element),this._element=null}},{key:"destroy",value:function(){var e,t;null===(e=this._element)||void 0===e||null===(t=e.parentElement)||void 0===t||t.removeChild(this._element),this._element=null}}]),e}(),Rs=function(){function e(){(0,s.Z)(this,e)}return(0,u.Z)(e,[{key:"update",value:function(){}},{key:"fetchUpdates",value:function(){return Ts.resolve()}},{key:"getElement",value:function(){return null}},{key:"create",value:function(){return new Is}},{key:"on",value:function(){}},{key:"addListener",value:function(){}},{key:"addEventListener",value:function(){}},{key:"off",value:function(){}},{key:"removeListener",value:function(){}},{key:"removeEventListener",value:function(){}},{key:"once",value:function(){}},{key:"hasRegisteredListener",value:function(){}},{key:"removeAllListeners",value:function(){}},{key:"emit",value:function(){}}]),e}(),Ms=function(){function e(){(0,s.Z)(this,e)}return(0,u.Z)(e,[{key:"canMakePayment",value:function(){return Ts.reject(Ns)}},{key:"show",value:function(){}},{key:"abort",value:function(){}},{key:"isShowing",value:function(){return!1}},{key:"update",value:function(){}},{key:"on",value:function(){}},{key:"once",value:function(){}},{key:"off",value:function(){}}]),e}(),Os=function(){function e(){(0,s.Z)(this,e),this.IS_NOOP_BUILD=!0,console.error(Ns)}return(0,u.Z)(e,[{key:"elements",value:function(){return new Rs}},{key:"redirectToCheckout",value:function(){return Ts.reject(new Error(Ns))}},{key:"paymentRequest",value:function(){return new Ms}},{key:"createToken",value:function(){return Ts.reject(new Error(Ns))}},{key:"createSource",value:function(){return Ts.reject(new Error(Ns))}},{key:"handleCardPayment",value:function(){return Ts.reject(new Error(Ns))}},{key:"createPaymentMethod",value:function(){return Ts.reject(new Error(Ns))}},{key:"confirmCardPayment",value:function(){return Ts.reject(new Error(Ns))}}]),e}(),xs=function(e){var t=e.elements,n=e.params,r=(0,y.MO)(t);return r?(0,y.x4)({elements:r,params:n}):(0,y.zS)(new C.No("stripe.createConfirmationToken(): elements should be provided."))},Zs=n(6274).Promise,js=function(e,t,n,r){try{var o=(l=r,{value:(d=(0,y.Gu)(xs,l,"createConfirmationToken")).value,warnings:d.warnings}),i=o.value,a=i.elements,c=i.params;if(o.warnings.forEach((function(t){e.warn(t)})),a._controller._id!==e._id)throw new C.No("Invalid value for stripe.createConfirmationToken(): the 'elements' provided was created by a different Stripe instance. Please use the same Stripe instance to create the 'elements' and call stripe.createConfirmationToken().");a._isSubmitting&&e.report("elements_submit_conflict.create_confirmation_token");var s=a._id,u="stripe.createConfirmationToken()";return e.action.getElementConfirmingPayment({groupId:s,errorMessageMethodName:u}).then((function(n){var r={groupId:s,elements:a._elements,params:c,mids:t,elementConfirming:n};return e.action.createConfirmationTokenWithElements(r).then((function(t){return(0,rn.tA)({groupId:s,elementConfirmingPayment:n,controller:e,isError:"error"in t,errorMessageMethodName:u}).then((function(){return t}))}))})).then((function(e){return"error"===e.type?{error:e.error}:{confirmationToken:e.object}}))}catch(e){return Zs.reject(e)}var l,d},Ls=n(6274).Promise.resolve(qe),Bs=n(2641),Ds=n(5491),qs=n(6274).Promise,Fs=function(){function e(t){var n=this;(0,s.Z)(this,e),this._controllerFrame=null,this._buildFrameQueryString=function(){var e=n._frameParams;return Object.keys(e).map((function(t){return null!=e[t]?"".concat(t,"=").concat(encodeURIComponent(e[t].toString())):null})).join("&")},this._handleMessage=function(e){return function(t){var n=t.data,r=t.origin;if((0,w.Qg)(r))try{var o=(0,U.$G)(n);if(o)"stripe-outer-logger-iframe-ready"===o.message.action&&e()}catch(e){}}};var r=t.apiKey,o=t.stripeAccount,i=t.stripeJsId,a=t.error;this._id=(0,v.To)("__privateStripeOuterLoggerController"),this._frameParams={apiKey:r,stripeAccount:null!=o?o:void 0,stripeJsId:i,referrer:document.referrer,serializedError:(0,Ds.Xy)(a),controllerId:this._id},this._listenerRegistry=(0,fo.E)(),this._controllerFrame=new Bs.Z({type:U.NC.OUTER_LOGGER_CONTROLLER,controllerId:this._id,listenerRegistry:this._listenerRegistry,autoload:!0,appParams:this._buildFrameQueryString()}),this._loggerFrameReadyPromise=new qs((function(e){n._listenerRegistry.addEventListener(window,"message",n._handleMessage(e))}))}return(0,u.Z)(e,[{key:"logError",value:function(e){var t=this;this._loggerFrameReadyPromise.then((function(){var n;null===(n=t._controllerFrame)||void 0===n||n.send({action:"stripe-outer-logger-report-error",payload:{error:(0,Ds.Xy)(e)}})}))}}]),e}(),Us=n(6274).Promise,Gs="true"===(wr=(0,Cs.Z)(window.document),(0,Es.v)(wr.slice(wr.indexOf("?")+1))).forceBrowserDeprecationRollout,zs=new re.E(Jr.q),Hs=!1,Ks=function e(t,r){var o,i=t.controller,c=t.controllerLoadTimestamp,s=t.controllerInitTimestamp;if(!Hs||c){Hs=!0;var u=c||new re.E;if("complete"===document.readyState){var d=null;if(window.performance){var p="https://js.stripe.com/v3/".replace(/\/$/,"");if(os.dZ||Mr({types:["resource"],reporter:function(e){return i.action.recordOuterPerformanceTimeline(e)},resourcePrefixFilter:p}),window.performance.getEntriesByType)d=window.performance.getEntriesByType("resource").reduce((function(e,t){if(0===t.name.indexOf(p)){var n=t.name.match(/\/([^/#?]*)\/?(?:$|[#?])/);if(n&&n[1]){var r=n[1].replace(/-[0-9a-f]{32}\./,".");return"v3"===r&&(r="stripe.js"),(0,a.Z)((0,a.Z)({},e),{},(0,l.Z)({},r,(0,a.Z)({raw_size:t.decodedBodySize,transfer_size:t.transferSize,duration:Math.round(t.duration)},r in ms?(o=t,{duration:Math.round(o.duration),transfer_size:null!==(i=o.transferSize)&&void 0!==i?i:null,tcp_handshake_duration:0!==o.connectStart?Math.round(o.connectEnd-o.connectStart):null,dns_lookup_duration:0!==o.domainLookupStart?Math.round(o.domainLookupEnd-o.domainLookupStart):null,redirect_duration:0!==o.redirectStart?Math.round(o.redirectEnd-o.redirectStart):null,request_duration:0!==o.requestStart?Math.round(o.responseStart-o.requestStart):null,response_duration:0!==o.responseStart?Math.round(o.responseEnd-o.responseStart):null,tls_negotiation_duration:0!==o.secureConnectionStart?Math.round(o.requestStart-o.secureConnectionStart):null,fetch_duration:0!==o.fetchStart?Math.round(o.responseEnd-o.fetchStart):null,service_worker_duration:0!==o.workerStart?Math.round(o.fetchStart-o.workerStart):null,raw_size:null!==(c=o.decodedBodySize)&&void 0!==c?c:null,compressed:"number"==typeof o.encodedBodySize&&"number"==typeof o.decodedBodySize?o.encodedBodySize===o.decodedBodySize:null,cached_locally:"number"==typeof o.transferSize?0===o.transferSize:null,next_hop_protocol:o.nextHopProtocol||null,is_http3:"string"==typeof o.nextHopProtocol?"h3"===o.nextHopProtocol:null}):{})))}}var o,i,c;return e}),{})}var m=Math.round(n(8622).x-Jr.q),f=s.getElapsedTime(u),_=null!==(o=d)&&void 0!==o&&o["stripe.js"]?d["stripe.js"].duration+m+f:null;i.report("init_timings",{element:i.controllerFor(),match_frame:t.source===i._controllerFrame._iframe.contentWindow,until_first_create:zs.getElapsedTime(i._createTimestamp),until_first_load:zs.getElapsedTime(u),stripe_create_duration:f,stripe_js_init_duration:m,stripe_js_load_duration:_,resource_timings:d,controller_init_delay:t.stripeCreateTimestamp.getElapsedTime(s),controller_init_strategy:t.initStrategy,controller:t.controllerMetrics}),setTimeout((function(){new as((function(e){if(ss.trustedTypes&&ss.Promise){var t,r=!1,o=function(e){(us.test(e.effectiveDirective)||us.test(e.violatedDirective))&&((0,w.vo)(e.blockedURI)||(0,w.vo)(e.sourceFile))&&(r=!0)},i=function(){return r?ps:ls};ss.addEventListener(cs,o);try{t=n.e(913).then(n.bind(n,9554)).then((function(e){return(e.loaded&&r?ds:"ALLOWED")||ls}),i)}catch(e){t=new as((function(e){return setTimeout(e,0)})).then(i)}t.then((function(){ss.removeEventListener(cs,o)})),e(t)}else e("NOT_SUPPORTED")})).then((function(e){(function(e){switch(e){case ds:case ps:return!0}return!1})(e)&&i.warn("We noticed that you are using Trusted Types. Nothing has broken, but we plan to add dynamic loading to parts of Stripe.js. Please allow scripts from 'https://js.stripe.com' in your default Trusted Types policy. For more information: https://stripe.com/docs/security/guide#content-security-policy")}))}),5e3);var h=new re.E,y=setTimeout((function(){r._controller.report("metricscontroller.timings",{timeout:!0,delta:h.getElapsedTime(),afs:!!os.Ye,isCheckout:!!os.dZ})}),15e3);r._midsPromise().then((function(e){clearTimeout(y),r._controller.report("metricscontroller.timings",{timeout:!1,delta:h.getElapsedTime(),afs:!!os.Ye,isCheckout:!!os.dZ}),Js._ec&&(Js._ec._onIdsUpdate=function(e){return r._controller.action.midsChange({mids:e})}),e&&r._controller.action.midsChange({mids:e})}))}else window.addEventListener("load",(function(){try{e((0,a.Z)((0,a.Z)({},t),{},{controllerLoadTimestamp:u}),r)}catch(e){}}))}},Ys=(0,y.mC)((0,a.Z)((0,a.Z)({apiKey:y.Z_,__v2PrivateBeta:(0,y.jt)((0,y.mC)({authToken:y.Z_,stripeContext:y.Z_})),stripeAccount:(0,y.jt)(y.Z_),locale:(0,y.jt)(y.Z_),apiVersion:(0,y.jt)(y.Z_)},os.Mo?{__privateSharedSessionContext:(0,y.jt)(y.Ry)}:{}),{},{__privateApiUrl:(0,y.jt)(y.Z_),__checkout:(0,y.jt)((0,y.mC)({mids:(0,y.mC)({muid:y.Z_,sid:y.Z_})})),__dashboard:(0,y.jt)(y.Ry),__hosted3DS:(0,y.jt)(y.Xg),__hostedInvoicePage:(0,y.jt)(y.Ry),canCreateRadarSession:(0,y.jt)(y.Xg),betas:(0,y.jt)((0,y.CT)(y.Z_))})),Ws=function(e){return"You have an in-flight ".concat(e,"! Please be sure to disable your form submit button when ").concat(e," is called.")},Vs=function(e){return function(){throw new C.No("You cannot call `stripe.".concat(e,"` without supplying an appropriate beta flag when initializing Stripe.js."))}},Xs=function(e){return function(){throw new C.No("You cannot call `stripe.".concat(e,"` without supplying an Issuing beta flag when initializing Stripe.js."))}},Qs=(0,fs.r)(1),Js=function(){function e(t,n){var r,o=this;(0,s.Z)(this,e),this._listenerRegistry=(0,fo.E)(),this.elements=(0,I.TC)((function(e){return new Xr(o._controller,o._listenerRegistry,{stripeJsLoadTimestamp:zs,stripeCreateTimestamp:o._controller._createTimestamp},o._betas,o._mids(),(0,a.Z)((0,a.Z)({},o._locale?{locale:o._locale}:{}),e))}),void 0,"elements"),this.createToken=(0,I.mx)((function(e,t){var n=o._mids();return"cvc_update"===e?function(e,t){var n=(0,y.rX)(t);if(n&&"cardCvc"===n._componentName){var r=n._implementation._frame.id;return e.action.tokenizeCvcUpdate({frameId:r}).then(es)}throw new C.No("You must provide a `cardCvc` Element to create a `cvc_update` token.")}(o._controller,t):function(e,t){return function(n,r){var o=(0,y.rX)(n);if(o){var i=o._implementation._frame.id,a=o._componentName,c=ts(r);return e.action.tokenizeWithElement({frameId:i,elementName:a,tokenData:c,mids:t}).then(es)}if("string"==typeof n){var s=n,u=ts(r);return e.action.tokenizeWithData({elementName:null,type:s,tokenData:u,mids:t}).then(es)}throw new C.No("You must provide a Stripe Element or a valid token type to create a Token.")}}(o._controller,n)(e,t)}),void 0,"createToken"),this.createSource=(0,I.mx)((function(e,t){var n=(0,y.rX)(e),r=bo(n?t:e),i=r||{type:null,data:{}},a=i.type,c=i.data;if(n){var s=n._implementation._frame.id,u=n._componentName;return!r&&(0,k.ke)(u)?Us.reject(new C.No("Please provide Source creation parameters to createSource.")):o._controller.action.createSourceWithElement({frameId:s,elementName:u,type:a,sourceData:c,mids:o._mids()}).then(wo)}return r?a?o._controller.action.createSourceWithData({elementName:null,type:a,sourceData:c,mids:o._mids()}).then(wo):Us.reject(new C.No("Please provide a source type to createSource.")):Us.reject(new C.No("Please provide either an Element or Source creation parameters to createSource."))}),void 0,"createSource"),this.retrieveSource=(0,I.xy)((function(e){var t=(0,y.Gu)(So,{source:e},"retrieveSource"),n=t.value;return t.warnings.forEach((function(e){return o._controller.warn(e)})),o._controller.action.retrieveSource(n).then(wo)}),void 0,"retrieveSource"),this.paymentRequest=(0,I.W6)((function(e,t){(0,Gt.pF)(o._keyMode);var n=t;return Qr(o._controller,{apiKey:o._apiKey,accountId:o._stripeAccount},o._mids(),e,o._betas,n,o._listenerRegistry)}),void 0,"paymentRequest");try{var i=new re.E,c=(0,y.Gu)(Ys,t||{},"Stripe()"),u=c.value,l=c.warnings,d=function(e){var t=e.apiKey,n=e.context,r=e.forceRollout,o=e.isAffectedBrowser,i=e.rolloutSlice,c=e.log,s=hs()(t),u={apiKey:t,hashedKey:s,isAffectedBrowser:o,context:n},l=function(e){var t=e.mechanism,r=e.action;o&&c("legacy-deprecation-rollout",(0,a.Z)((0,a.Z)({},u),{},{mechanism:t,action:r,state:[n,t,r].join("-")}))};return r?(l({mechanism:ks,action:o?gs:bs}),o):"___TESTMODE_FORCE_UNSUPPORTED_BROWSER"===t||(-1!==(0,P.cx)(vs,(function(e){return e===s}))?(l({mechanism:ws,action:o?gs:bs}),o):-1!==(0,P.cx)(ys,(function(e){return e===s}))?(l({mechanism:ws,action:bs}),!1):function(e,t){return t<100}(0,i)?(l({mechanism:Ss,action:o?gs:bs}),o):(l({mechanism:Ps,action:bs}),!1))}({apiKey:u.apiKey,context:"outer",forceRollout:Gs,isAffectedBrowser:!window.Promise,rolloutSlice:Math.floor(100*Math.random()),log:As});if(d)return this._apiKey="",this._keyMode="live",this._betas=[],this._isCheckout=!1,this._isHostedInvoicePage=!1,new Os;var p=u.apiKey,m=u.stripeAccount,f=u.apiVersion,_=u.locale,h=u.__v2PrivateBeta,v=u.__dashboard,g=u.__privateApiUrl,b=u.__checkout,w=u.__hosted3DS,E=u.__hostedInvoicePage,A=u.__privateSharedSessionContext,N=u.betas,T=(0,S.dZ)(N||null),R=T.validBetas,M=T.betaWarning,O=T.betaError;if(O)throw new C.No(O);M&&l.push(M),(0,Gt.Tj)(p),null!=b&&b.mids&&(e._ec=(0,_o.AK)({checkoutIds:b.mids,stripeJsId:e.stripeJsId})),this._apiKey=p.trim(),this._keyMode=(0,Gt.lO)(this._apiKey),this._betas=R,this._locale=(0,S.jk)(_,this._betas)||null,this._stripeAccount=m||null,this._isCheckout=!!b,this._isHostedInvoicePage=!!E;var x=v?mo:E?"hip":void 0;this._attachControllerGetter({stripeCreateTimestamp:i,apiVersion:f,privateApiUrl:g,privatePaymentUserAgentSuffix:x,privateSharedSessionContext:A,stripeAccount:m,v2:h}),l.forEach((function(e){return o._controller.warn(e)})),(0,is.Z)(),this._ensureHTTPOnlyLinkCookie(),this._ensureHTTPS(),this._ensureStripeHosted(n),this._attachPaymentIntentMethods(this._betas,!!w),this._attachLegacyPaymentIntentMethods(this._betas),this._attachCheckoutMethods(this._betas),this._attachEmbeddedCheckoutMethods(),this._attachCustomCheckoutMethods(this._betas),this._attachPrivateMethodsForCheckout(this._isCheckout),this._attachPrivateMethodsForHostedInvoicePage(this._isHostedInvoicePage),this._attachPrivateMethodsForConsumer(os.Mo),this._attachCreateRadarSession(),this._attachGetters(),this._attachIssuingCardMethods(this._betas),this._attachIdentityMethods(),this._attachLinkedAccountsMethods(this._betas),this._attachAppInfo(),this._attachStripeUpdate(),this._attachCardBrandChoiceMethods(),this._attachV2PrivateBetaMethods(h),Ar("init")}catch(t){throw e._outerLogger||(e._outerLogger=(r={apiKey:this._apiKey,stripeAccount:this._stripeAccount,stripeJsId:e.stripeJsId,error:t},new Fs(r))),e._outerLogger.logError(t),t instanceof C.No?t:new Error("[Stripe.js] There was an issue with Stripe.js initialization")}}return(0,u.Z)(e,[{key:"_attachStripeUpdate",value:function(){var e=this;this.update=Vs("update"),(0,S.uN)(this._betas,S.M4.enable_stripe_update_api_key_beta_0)&&(this.update=(0,I.W6)((function(t,n){var r=(0,a.Z)({apiKey:t},n&&"object"==typeof n?n:{}),o=(0,y.Gu)(Ys,r||{},"Stripe()"),i=o.value,c=o.warnings,s=i.apiKey,u=i.stripeAccount,l=i.apiVersion;(0,Gt.Tj)(s);var d=e._controller.getCredentials(),p={publishableKey:s.trim()||d.publishableKey,stripeAccount:u||d.stripeAccount,apiVersion:l||d.apiVersion};p.publishableKey===d.publishableKey&&p.stripeAccount===d.stripeAccount&&p.apiVersion===d.apiVersion||(e._apiKey=p.publishableKey,e._keyMode=(0,Gt.lO)(e._apiKey),e._stripeAccount=p.stripeAccount,c.forEach((function(t){return e._controller.warn(t)})),e._controller.setCredentials(p),e._controller.action.updateStripeUserCredentials(p))}),void 0,"update"))}},{key:"_attachCreateRadarSession",value:function(){var e=this;this.createRadarSession=(0,I.P0)((function(){return e._midsPromise().then((function(){return rs(e._controller)}))}))}},{key:"_attachPaymentIntentMethods",value:function(e,t){var n=this,r=function(){return n._mids()};this.createPaymentMethod=(0,I.g5)((function(){for(var t=arguments.length,o=new Array(t),i=0;i=8&&t.report("retrieve_card_networks.success",{networksCount:null!==(n=null===(o=e.networks)||void 0===o?void 0:o.length)&&void 0!==n?n:0}),e})).catch((function(){return t.report("retrieve_card_networks.error"),qe}));return Ls=o,o}({controller:e._controller,rawCardNumber:t})}}},{key:"_attachCustomCheckoutMethods",value:function(e){(0,S.uN)(e,[S.M4.custom_checkout_beta_1,S.M4.custom_checkout_beta_2,S.M4.custom_checkout_beta_3,S.M4.custom_checkout_internal_dev_beta])&&(this.initCustomCheckout=$r({stripe:this,controller:this._controller}))}},{key:"_attachPrivateMethodsForConsumer",value:function(e){var t=this;e&&(this.__createConsumerPaymentDetails=(0,I.mx)((function(e,n){var r,o={};if(!n.email)return Us.reject(new C.No("You must pass email"));if(!e)return Us.reject(new C.No("You must pass a clientSecret"));if(n.cardElement){if(!n.billing_details||!n.billing_details.country_code)return Us.reject(new C.No("You must pass in billing_details.country_code if you are using the Card Element"));var i=(0,y.rX)(n.cardElement);if(!i)return Us.reject(new C.No("Card Element is invalid"));var a=i._implementation._frame.id,c=i._componentName;if("card"!==c&&"cardNumber"!==c)return Us.reject(new C.No("Please provide a Card Element to __createConsumerPaymentDetails"));o={frameId:a,elementName:c,billingDetails:n.billing_details,requestSurface:n.request_surface}}else if(n.elements){var s;o={elementsId:null==n||null===(s=n.elements)||void 0===s?void 0:s._id,billingDetails:(null==n?void 0:n.billing_details)||{},requestSurface:null==n?void 0:n.request_surface}}return o.elementsId?t._controller.action.createConsumerPaymentDetails({email:n.email,clientSecret:e,billingDetails:o.billingDetails,isDefault:!!n.is_default,requestSurface:n.request_surface,nickname:n.nickname,elementsId:o.elementsId}):o.frameId&&o.elementName&&null!=n&&null!==(r=n.billing_details)&&void 0!==r&&r.country_code?t._controller.action.createConsumerPaymentDetails({email:n.email,clientSecret:e,billingDetails:o.billingDetails,isDefault:!!n.is_default,requestSurface:n.request_surface,nickname:n.nickname,frameId:o.frameId,elementName:o.elementName}):Us.reject(new C.No("Please provide either an Elements or Card Element creation parameters to __createConsumerPaymentDetails."))}),void 0,"__createConsumerPaymentDetails"),this.__rememberLinkLogin=(0,I.xy)((function(e){return"string"==typeof e?t._controller.action.rememberLinkLogin({authSessionClientSecret:e}):t._controller.action.rememberLinkLogin(e)}),void 0,"__rememberLinkLogin"),this.__forgetLinkLogin=(0,I.xy)((function(){return t._controller.action.forgetLinkLogin()}),void 0,"__forgetLinkLogin"),this.__getLinkWebAuthnFrameFingerprintedPath=(0,I.t_)((function(){return"link-web-authn-frame-bcadf22de536cba855eaa6080d11454e992ad0cd.html"}),void 0,"__getLinkWebAuthnFrameFingerprintedPath"),this.__collectFinancialConnectionsAccountsForLinkApp=(0,I.xy)((function(e){return(0,$t.nD)(t._controller,[],e)}),void 0,"__collectFinancialConnectionsAccountsForLinkApp"))}},{key:"_attachGetters",value:function(){var e=this,t=new vo((function(t){e._registerWrapper({name:t,version:null})}));["elements","createToken","createSource","createPaymentMethod"].forEach((function(n){if(e.hasOwnProperty(n)){var r=e[n],o=function(){t.called(n);for(var e=arguments.length,o=new Array(e),i=0;i=10?(eu[n].hasWarned=!0,window.console&&console.warn("[Stripe.js] It looks like Stripe() was called many times with the same API key and options. For best performance, create and share a single instance of the Stripe object. https://stripe.com/docs/js/initializing")):null===tu&&(tu=setTimeout((function(){Object.keys(eu).forEach((function(e){eu[e].count=0})),tu=null}),1e4))}catch(e){}}(e,t),new $s((0,a.Z)({apiKey:e},t&&"object"==typeof t?t:{}),nu)};ru.version=$s.version,window.Stripe&&2===window.Stripe.version&&!window.Stripe.StripeV3?window.Stripe.StripeV3=ru:window.Stripe?window.console&&console.warn("[Stripe.js] It looks like Stripe.js was loaded more than one time. Please only load it once per page."):window.Stripe=ru},6297:function(e,t,n){"use strict";n.d(t,{PI:function(){return h},Pw:function(){return f},hm:function(){return _}});var r=n(1873),o=n(6977),i=n(3849),a=n(6042),c=n(5749),s=n(1925),u=n(6274).Promise,l=i.OV,d=function(e){return!("paymentMethod-from-data"===e.tag&&e.data.acss_debit)},p=function(e){return null!==e&&"object"==typeof e&&!0===e.skipMandate},m=function(e){return null!==e&&"object"==typeof e&&!!e.shouldCreatePaymentMethod},f=function(e){var t=e.controller,n=e.shouldCreatePaymentMethod,r=e.intentSecret,o=e.confirmIntentData,c=e.embeddedContext,l=e.locale;if(c){var d=c.embeddedToOuterMessenger;return d.send("show_acss_dialog",{intentSecret:r,shouldCreatePaymentMethod:n,confirmIntentData:o,localeOverride:l}),new u((function(e){d.on("show_acss_dialog_result",(function(t){e(t)}))}))}return t.action.createAcssDebitSession({intentSecret:r,shouldCreatePaymentMethod:n,confirmIntentData:o,localeOverride:l}).then((function(e){if("error"===e.type)return{type:"error",error:e.error};var n=(0,a.q)(t,{url:(0,s.jr)(e.object.url),size:"400x600",locale:e.locale,frameTitle:"acss.dialog_frame_title",useLightboxHostedCloseButton:!1});return new u((function(e){n._on("request-close",(function(){(0,a.G)(n).then((function(){return t.action.localizeError(i.LR)})).then((function(t){e({type:"error",error:t})}))})),n._on("session-complete",(function(t){var r=t.paymentMethod;(0,a.G)(n).then((function(){e({type:"success",paymentMethod:r})}))}))}))}))},_=function(e,t,n,a,s){var u="confirmAcssDebitPayment",_=c.GS.acss_debit,h=(0,i.cn)(n,u),y=(0,i.o1)({expectedType:_,label:u,rawData:a,intentSecret:h,mids:t,handleActions:!1}),v=m(s);return l(s,u),p(s)||!d(y)?e.action.confirmPaymentIntent(y).then(o.PA):f({controller:e,shouldCreatePaymentMethod:v,intentSecret:h,confirmIntentData:y}).then((function(n){switch(n.type){case"error":return{error:n.error};case"success":return e.action.confirmPaymentIntent({tag:"paymentMethod",paymentMethod:n.paymentMethod,options:"options"in y&&y.options?y.options:{},intentSecret:h,otherParams:y.otherParams,expectedType:_,handleActions:!1,mids:t,merchantParams:y.merchantParams}).then(o.PA);default:return(0,r.Rz)(n)}}))},h=function(e,t,n,a,s){var u="confirmAcssDebitSetup",_=c.GS.acss_debit,h=(0,i.jH)(n,u),y=(0,i.o1)({expectedType:_,label:u,rawData:a,intentSecret:h,mids:t,handleActions:!1}),v=m(s);return l(s,u),p(s)||!d(y)?e.action.confirmSetupIntent(y).then(o.e3):f({controller:e,shouldCreatePaymentMethod:v,intentSecret:h,confirmIntentData:y}).then((function(n){switch(n.type){case"error":return{error:n.error};case"success":return e.action.confirmSetupIntent({tag:"paymentMethod",paymentMethod:n.paymentMethod,options:"options"in y&&y.options?y.options:{},intentSecret:h,otherParams:y.otherParams,expectedType:_,handleActions:!1,mids:t,merchantParams:y.merchantParams}).then(o.e3);default:return(0,r.Rz)(n)}}))}},1278:function(e,t,n){"use strict";n.d(t,{_:function(){return i}});var r=n(5326),o=n(6274).Promise,i=function(e){var t=e.controller,n=e.intent,i=e.locale,a=e.action,c=e.expandParam,s=e.groupId;return new o((function(e){return a.authenticationUrl&&t.action.eceNotifySheetAuthenticationNeeded({authenticationUrl:a.authenticationUrl,groupId:s}),(0,r.ct)({controller:t,initialDelay:5e3,pollTimeGap:2e3,intent:n,expandParam:c,checkIntent:function(e){return"requires_action"!==e.status&&"requires_source_action"!==e.status||"use_stripe_sdk"!==e.next_action.type||"express_checkout_authentication_needed"!==e.next_action.use_stripe_sdk.type},locale:i}).then((function(t){e(t)}))}))}},5326:function(e,t,n){"use strict";n.d(t,{$o:function(){return d},Eo:function(){return m},NO:function(){return l},ct:function(){return f},gg:function(){return u},yn:function(){return p}});var r=n(1873),o=n(942),i=n(6977),a=n(3849),c=n(6274).Promise,s=function(e){switch(e.type){case"error":return{error:e.error};case"object":switch(e.object.object){case"payment_intent":return{paymentIntent:e.object};case"setup_intent":return{setupIntent:e.object};default:return(0,r.Rz)(e.object)}default:return(0,r.Rz)(e)}},u=function(e,t,n,r,i,a,c){return t===o.kE.PAYMENT_INTENT?n.action.retrievePaymentIntent({hosted:i,intentSecret:e,locale:r,asErrorIfNotSucceeded:a,expandParam:c||[]}).then(s):n.action.retrieveSetupIntent({hosted:i,intentSecret:e,locale:r,asErrorIfNotSucceeded:a,expandParam:c||[]}).then(s)},l=function(e,t,n,r,o){return u(e,t,n,r,!1,!0,o)},d=function(e,t,n,r,i,a,c){return t===o.kE.PAYMENT_INTENT?n.action.cancelPaymentIntentSource({intentSecret:e,locale:i,sourceId:r,sourceIntentId:a,publishableKey:c}).then(s):n.action.cancelSetupIntentSource({intentSecret:e,locale:i,sourceId:r,sourceIntentId:a,publishableKey:c}).then(s)},p=function(e){return(e.error?e.error.payment_intent||e.error.setup_intent:e.paymentIntent||e.setupIntent)||null},m=function(e,t,n,r,o,i){var a,c=!0,s=3,u=0;return function d(){u+=1,l(e,t,n,r,o).then((function(e){if(c){var t=p(e);if(null!==t)switch(s=3,t.status){case"requires_action":case"requires_source_action":return void(a=setTimeout(d,5e3));case"processing":return void(a=setTimeout(d,1e3));default:i(e,u)}else if(s>0){var n=500*Math.pow(2,3-s);a=setTimeout(d,n),s-=1}else i(e,u)}}))}(),function(){clearTimeout(a),c=!1}},f=function(e){var t=e.initialDelay,n=e.pollTimeGap,r=e.checkIntent,o=e.locale,u=e.controller,l=e.intent,d=e.expandParam,p=void 0===d?[]:d,m=e.shouldPoll,f=void 0===m?function(){return!0}:m,_="payment_intent"===l.object?{paymentIntent:l}:{setupIntent:l};return new c((function(e){setTimeout((function(){var t=!1,c=setInterval((function(){if(!f())return e(_),void clearInterval(c);var n;t||(t=!0,(n={hosted:!1,intentSecret:(0,i.O3)(l),locale:o,expandParam:p},"payment_intent"===l.object?u.action.retrievePaymentIntent(n):u.action.retrieveSetupIntent(n)).then((function(n){if(t=!1,_=s(n),n.error){if("lock_timeout"===n.error.code||"rate_limit"===n.error.code)return;u.action.localizeError(a.I4).then((function(e){return{error:e}})).then(e),clearInterval(c)}else r(n.object)&&(e(_),clearInterval(c))})))}),n)}),t-n)}))}},8147:function(e,t,n){"use strict";n.d(t,{z:function(){return s}});var r=n(3849),o=n(1925),i=n(9792),a=n(6274).Promise,c=function(e){return e?"payment_intent"===e.object?e.last_payment_error:e.last_setup_error:null},s=function(e,t,n,s){return new a((function(a){var u=new i.E,l=n.createLightboxFrame({type:o.NC.HCAPTCHA_APP,options:{intentId:t.id,clientSecret:t.client_secret,locale:s,sitekey:e.site_key,verifyUrl:e.verification_url,rqdata:e.rqdata,startTime:u.getAsPosixTime()}}),d=function(e){var t=r.I4;return null!=e&&(t=e),n.action.localizeError(t).then((function(e){return{error:e}}))};n.report("intent_confirmation_challenge.start"),l._on("load",(function(){n.report("intent_confirmation_challenge.stripe_js_frame_loaded",{duration_since_start_ms:u.getElapsedTime()}),l.fadeInBackdrop()})),l.show(),l._on("request-cancel",(function(e){l.fadeOutBackdrop(),l.destroy(!0),n.report("intent_confirmation_challenge.cancel"),a(d(c(null==e?void 0:e.intent)))})),l._on("request-close",(function(e){l.fadeOutBackdrop(),l.destroy(!0);var t=null==e?void 0:e.intent;if(t){var o=c(t);o?/Captcha/.test(o.message||"")?(n.report("intent_confirmation_challenge.verification_failed"),a(d(o))):(n.report("intent_confirmation_challenge.success"),a(d(o))):(n.report("intent_confirmation_challenge.success"),function(e,t){"payment_intent"===t.object?e({paymentIntent:t}):e({setupIntent:t})}(a,t))}else n.report("intent_confirmation_challenge.verification_error"),a(d(r.I4))}))}))}},8478:function(e,t,n){"use strict";n.d(t,{p:function(){return s}});var r=n(6977),o=n(6790),i=n(3333),a=n(6090),c=n(1873),s=function(e){var t=e.controller,n=e.intent,s=e.locale,u=(0,r.G2)(n);if(t.report("next_action.used_legacy_non_luxe_handler",{message:"Legacy non-Luxe next action handler processed an intent",intent_id:n.id,payment_method_type:"cashapp",surface:"stripe_js"}),!u||"cashapp_handle_redirect_or_display_qr_code"!==u.type)throw new Error("Expected next_action.cashapp_handle_redirect_or_display_qr_code");if(!i.q$)return(0,a.U)({controller:t,intent:n,locale:s,url:u.cashapp_handle_redirect_or_display_qr_code.hosted_instructions_url,lightboxOptions:{frameTitle:"hosted_qr_code_instructions.cashapp.frame_title"}});switch(n.object){case"payment_intent":return(0,o.k)(n,u.cashapp_handle_redirect_or_display_qr_code.mobile_auth_url,t);case"setup_intent":return(0,o.e)(n,u.cashapp_handle_redirect_or_display_qr_code.mobile_auth_url,t);default:return(0,c.Rz)(n)}}},526:function(e,t,n){"use strict";n.d(t,{g:function(){return a}});var r=n(5326),o=n(6977),i=n(6274).Promise,a=function(e){var t=e.controller,n=e.intent,a=e.locale;return new i((function(e){return(0,r.ct)({controller:t,initialDelay:8e3,pollTimeGap:5e3,intent:n,checkIntent:function(e){return!(0,o.mD)(e.status)&&"processing"!==e.status},locale:a}).then((function(t){return e(t)}))}))}},6090:function(e,t,n){"use strict";n.d(t,{U:function(){return m}});var r=n(1413),o=n(5987),i=n(6042),a=n(1925),c=n(5326),s=n(6977),u=n(3333),l=n(6274).Promise,d=["size"],p=function(e){return!(0,s.mD)(e.status)},m=function(e){var t=e.controller,n=e.initialDelay,s=void 0===n?5e3:n,m=e.intent,f=e.lightboxOptions,_=e.locale,h=e.pollInterval,y=void 0===h?2e3:h,v=e.url,g=f.size,b=(0,o.Z)(f,d),w=(0,i.q)(t,(0,r.Z)({url:(0,a.jr)(v),size:u.q$?"fullScreen":g||"400x600",locale:_,useLightboxHostedCloseButton:!1},b)),k=!1;return new l((function(e){return w._on("load",(function(){w.show(),w.fadeInBackdrop()})),w._once("request-close",(function(){(0,i.G)(w).then((function(){k=!0,"payment_intent"===m.object&&e({paymentIntent:m}),"setup_intent"===m.object&&e({setupIntent:m})}))})),w._on("complete",(function(t){(0,i.G)(w).then((function(){k=!0,e(t)}))})),(0,c.ct)({controller:t,initialDelay:s,pollTimeGap:y,intent:m,checkIntent:p,shouldPoll:function(){return!k},locale:_}).then((function(t){"error"in t&&t.error||k||w.destroy(!0).then((function(){e(t)}))}))}))}},6790:function(e,t,n){"use strict";n.d(t,{e:function(){return s},k:function(){return c}});var r=n(1849),o=n(6977),i=n(3379),a=n(6617),c=function(e,t,n,c){var s,u;if("affirm-hooks.stripe.com"===(null===(s=(0,a.Ds)(t))||void 0===s?void 0:s.host)&&-1!==(null===(u=n._betas)||void 0===u?void 0:u.indexOf("affirm_in_context_beta_1")))return new i.H({paymentIntent:e,redirectUrl:t,controller:n,paymentSurface:c?"payment_element":"direct_integration",paymentMethod:"affirm",fallbackToRedirectOnErrors:!1}).collectPayment();return(0,r.U)(t).then((function(t){return(0,r.d)(n,"next_action redirect",t),(0,o.PA)(t,e)}))},s=function(e,t,n){return(0,r.U)(t).then((function(t){return(0,r.d)(n,"next_action redirect",t),(0,o.e3)(t,e)}))}},4243:function(e,t,n){"use strict";n.d(t,{O:function(){return c}});var r=n(1925),o=n(5326),i=n(6977),a=n(6274).Promise,c=function(e){var t=e.action,n=e.controller,c=e.intent,s=e.hosted,u=n.createLightboxFrame({type:r.NC.SMTC_COLLECTION_INNER,options:{collectionUrl:t.collectionUrl,cardBrand:t.cardBrand,merchantDisplayName:t.merchantDisplayName,livemode:t.livemode,threeDSecureSource:t.threeDSecureSource}});return new a((function(e){u._on("load",(function(){u.show(),u.fadeInBackdrop()})),u._on("request-close",(function(r){var a=r.isUserCanceled,l=(0,i.RY)(c.client_secret);if(!l)return e({error:new Error("Invalid client secret")});var d="payment_intent"===c.object?"PAYMENT_INTENT":"SETUP_INTENT";return(!0===a&&t.threeDSecureSource&&t.threeDSecureSource.length>0?(0,o.$o)(l,d,n,t.threeDSecureSource,"en"):(0,o.gg)(l,d,n,"en",s,!1,void 0)).then((function(t){u.destroy(!0).then((function(){var n=(0,o.yn)(t);return n?"payment_intent"===n.object?e({paymentIntent:n}):e({setupIntent:n}):e({error:new Error("Invalid intent")})}))}))}))}))}},122:function(e,t,n){"use strict";n.d(t,{s:function(){return l}});var r=n(3324),o=n(1413),i=n(4200),a=n(1925),c=n(5326),s=n(9792),u=n(6274).Promise,l=function(e,t,n,l,d,p){var m=(0,i.xz)(),f=new s.E,_=function(e,t,n,r,i){return e.createLightboxFrame({type:a.NC.AUTHORIZE_WITH_URL,options:(0,o.Z)({url:t,locale:i,intentId:n},r?{source:r}:{})})}(l,e.url,t.id,e.source,d);return _.show(),l.report("authorize_with_url.loading",{viewport:m,intentId:t.id}),_._on("load",(function(){l.report("authorize_with_url.loaded",{loadDuration:f.getElapsedTime(),intentId:t.id}),_.fadeInBackdrop()})),_._on("challenge_complete",(function(){_.fadeOutBackdrop()})),new u((function(o){var i=e.source;i&&_._once("cancel",(function(){u.all([(0,c.$o)(t,n,l,i,d),_.destroy()]).then((function(e){var t=(0,r.Z)(e,1)[0];return o(t)}))})),_._once("authorize_with_url_done",(function(){var e=_.destroy();(0,c.Eo)(t,n,l,d,p,(function(n,r){e.then((function(){l.report("authorize_with_url.done",{shownDuration:f.getElapsedTime(),success:!("error"in n),intentId:t.id,iterations:r}),o(n)}))}))}))}))}},9488:function(e,t,n){"use strict";n.d(t,{A:function(){return Q}});var r=n(3324),o=n(1873),i=n(9792),a=n(1413),c=n(5987),s=n(1925),u=n(6274).Promise,l=["type","optimizations","oneClickAuthn"],d=function(e,t){var n=t.intentSecret,r=t.controller,o=t.locale,i=t.hosted,a=r.createLightboxFrame({type:s.NC.STRIPE_3DS2_CHALLENGE,options:{intentId:n.id,hosted:i,locale:o}});r.report("3ds2.challenge_frame.loading",{intentId:n.id,hosted:i}),a._on("challenge_complete",(function(){a.fadeOutBackdrop()}));var c=function(e){return new u((function(t){e._on("load",(function(){return t(e)}))}))}(a);return c.then((function(){return r.report("3ds2.challenge_frame.loaded",{intentId:n.id,hosted:i})})),i&&(a.show(),a.action.show3DS2Spinner({cardBrand:e.cardBrand})),c},p=function(e,t){var n=t.oneClickAuthnDeviceSupport,r=t.oneClickAuthnOptedOut,o=t.challengeFrame;return new u((function(t,i){o.then((function(o){var u=function(){return i(new Error("User canceled"))};o._once("cancel",u),o.isVisible||(o.show(),o.fadeInBackdrop());e.type;var d=e.optimizations,p=(e.oneClickAuthn,(0,c.Z)(e,l));o.action.perform3DS2Challenge((0,a.Z)((0,a.Z)({},p),{},{shouldSandbox:d.sandboxChallengeFrame,recordFinalCres:d.recordFinalCres,oneClickAuthnDeviceSupport:n,oneClickAuthnOptedOut:r,oneClickWebauthnEnrollmentAppUrl:(0,s.xS)("one-click-webauthn-enrollment-fc08afbf74a796fc788fe170afd87a5c.html")})).then((function(){o._off("cancel",u),t()}))}))}))},m=n(6274).Promise,f=function(e,t,n){var r=n.authenticateResponse,i=n.oneClickAuthnDeviceSupport,a=n.oneClickAuthnOptedOut,c=n.challengeFrame,s=t.controller,l=t.hosted,d=t.intentSecret;if("error"===r.type)return m.resolve();var f,_=r.object,h=_.state,y=_.ares,v=_.creq;if("delegated"===h)return m.resolve();if(null===y)return m.resolve();if(y.transStatus&&["N","R","U"].indexOf(y.transStatus)>-1&&y.cardholderInfo&&y.cardholderInfo.length>15)return function(e,t){return new u((function(n){t.then((function(t){t._once("cancel",n),t.isVisible||(t.show(),t.fadeInBackdrop()),t.action.showCardholderInfoMessage({cardholderInfo:e,onMessageDismiss:function(){}}).then((function(){t._off("cancel",n),n()}))}))}))}(y.cardholderInfo,c);if("C"!==y.transStatus||null==v)return s.report("3ds2.frictionless",{hosted:l,intentId:d.id}),m.resolve();switch(e.gateway){case"emvco":f={type:"3ds2-challenge",gateway:e.gateway,threeDS2Source:e.threeDS2Source,cardBrand:e.cardBrand,transactionId:e.transactionId,acsUrl:y.acsURL,acsTransactionId:y.acsTransID,optimizations:e.optimizations,oneClickAuthn:e.oneClickAuthn,creq:v,publishableKey:e.publishableKey};break;case"itmx":var g=r.object.itmx;f={type:"3ds2-challenge",gateway:e.gateway,threeDS2Source:e.threeDS2Source,cardBrand:e.cardBrand,transactionId:e.transactionId,acsUrl:y.acsURL,acsTransactionId:y.acsTransID,optimizations:e.optimizations,oneClickAuthn:e.oneClickAuthn,creq:v,publishableKey:e.publishableKey,stepUpUrl:null==g?void 0:g.stepUpUrl,accessToken:null==g?void 0:g.accessToken};break;default:(0,o.Rz)(e)}return p(f,{oneClickAuthnDeviceSupport:i,oneClickAuthnOptedOut:a,challengeFrame:c})},_=n(5326),h=n(8948),y=n(6274).Promise,v=function(e,t,n){var r=t.intentSecret,o=t.intentType,i=t.controller,a=t.locale;return(0,_.NO)(r,o,i,a,n)},g=function(e,t){var n=t.controller,r=t.intentSecret,o=t.intentType,i=t.locale;return(0,_.$o)(r,o,n,e.threeDS2Source,i,e.threeDS2Intent,e.publishableKey)},b=function(e,t){var n=e.intentSecret,o=e.controller,i=e.hosted,c=t.intent,s=t.challengeFrame,u=t.startTimestamp;return y.all([c,s.then((function(e){return e.destroy()}))]).then((function(e){var t=(0,r.Z)(e,1)[0];return o.report("3ds2.done",(0,a.Z)({intentId:n.id,hosted:i,totalDuration:u.getElapsedTime()},t.error?{error:(0,h.Am)(t.error),success:!1}:{success:!0})),t}))},w=n(6274).Promise,k=function(e){var t=e.intentSecret,n=e.controller,r=e.hosted,o=e.locale,i=n.createHiddenFrame(s.NC.STRIPE_3DS2_FINGERPRINT,{intentId:t.id,locale:o,hosted:r});n.report("3ds2.fingerprint_frame.loading",{hosted:r,intentId:t.id});var a=function(e){return new w((function(t){e._on("load",(function(){return t(e)}))}))}(i);return a.then((function(){n.report("3ds2.fingerprint_frame.loaded",{hosted:r,intentId:t.id})})),a},S=function(e,t){var n=t.intentSecret,r=t.controller,i=t.hosted;return e.optimizations.skipFingerprint?w.resolve({fingerprintAttempted:!1,fingerprintData:null}):""===e.methodUrl?(r.report("3ds2.fingerprint.no_method_url",{hosted:i,intentId:n.id}),w.resolve({fingerprintAttempted:!1,fingerprintData:null})):k(t).then((function(t){var n;switch(e.gateway){case"emvco":n={gateway:e.gateway,threeDS2Source:e.threeDS2Source,merchant:e.merchant,transactionId:e.transactionId,methodUrl:e.methodUrl,shouldSandbox:e.optimizations.sandboxFingerprintFrame};break;case"itmx":n={gateway:e.gateway,threeDS2Source:e.threeDS2Source,merchant:e.merchant,transactionId:e.transactionId,methodUrl:e.methodUrl,shouldSandbox:e.optimizations.sandboxFingerprintFrame,accessToken:e.accessToken};break;default:return(0,o.Rz)(e)}return t.action.perform3DS2Fingerprint(n).then((function(e){return t.destroy(),e}))}))},P=n(3333),C=n(6274).Promise,E=function(){if(void 0===window.PublicKeyCredential||function(){if(!/CrOS/i.test(window.navigator.userAgent))return!1;var e=window.navigator.userAgent.match(/Chrome\/\d+\.\d+\.(\d+)\.(\d+)/)||[],t=Number(e[1]),n=Number(e[2]);return!(4389===t&&n>=82||4430===t&&n>=11||t>=4431)}()||function(){var e=/iPad|iPhone/i.test(window.navigator.userAgent),t=/^((?!chrome|android).)*safari/i.test(window.navigator.userAgent)&&!/SamsungBrowser/.test(window.navigator.userAgent);if(!e||t)return!1;var n=window.navigator.userAgent.match(/OS (\d+)_(\d+)(_\d+)? like Mac OS X/)||[],r=parseInt(n[1],10),o=parseInt(n[2],10);return!isNaN(r)&&!isNaN(o)&&(15===r&&o>=4||r>15)}())return C.resolve(!1);var e=window.PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable(),t=new C((function(e){return setTimeout((function(){return e(!1)}),500)}));return C.race([e,t]).catch((function(){return!1}))},A=n(6274).Promise,N=function(){if(void 0===window.PaymentRequest)return A.resolve(!1);if(!/Chrome\/(9[5-9]|[1-9]\d\d)/.test(window.navigator.userAgent))return A.resolve(!1);if(P.sV&&!/Chrome\/(109|1[1-9]\d|[2-9]\d{2}|[1-9]\d{3,})/.test(window.navigator.userAgent))return A.resolve(!1);try{var e=[{supportedMethods:"secure-payment-confirmation",data:{action:"authenticate",credentialIds:[new Uint8Array(1)],challenge:new Uint8Array(1),fallbackUrl:window.location,rpId:"stripe.com",payeeOrigin:"https://stripe.com",instrument:{displayName:"Mock ····1234",icon:'data:image/svg+xml;utf8,'}}}];return new window.PaymentRequest(e,{total:{label:"Total",amount:{currency:"USD",value:"0"}}}).canMakePayment().catch((function(){return!1}))}catch(e){return A.resolve(!1)}},T="stripe-js-one-click-authn",I="W",R="S",M="SE/WA",O=function(e){return btoa(String.fromCharCode.apply(null,new Uint8Array(e))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},x=function(e){return atob(e.replace(/-/g,"+").replace(/_/g,"/"))},Z=function(e){var t=x(e);return Uint8Array.from(t,(function(e){return e.charCodeAt(0)}))},j=(n(3637),n(3407),n(8037),function(e){return"data:image/svg+xml,".concat(encodeURIComponent(e.replace(/\n/g,"").replace(/\s+/g," ")))}),L=function(e){switch(e){case"visa":return j('\n \n \n \n \n');case"amex":return j('\n \n \n \n \n \n \n \n \n \n');case"mastercard":return j('\n \n \n \n \n \n \n');case"unionpay":case"discover":case"jcb":case"diners":case"unknown":case"elo":return j('');default:return(0,o.Rz)(e)}},B=n(5558),D=n(6977),q=n(6274).Promise,F=function(e,t,n){var r=e.threeDS2Source,o=e.oneClickAuthn,i=t.controller,c=n.deviceSupport,s=n.startTimestamp,u=q.resolve({authenticationAPIParam:null,optedOut:!1,isSPCRequested:!1}),l=q.resolve({authenticationAPIParam:null,optedOut:!1,isSPCRequested:!0});if(!o)return u;var d,p=o.credentials.filter((function(e){return e.type===D.QS}));if(0===p.length)return i.report("one_click_authn.request_spc_authn.empty_credentials_list",{client_id:T,source:r,device_support:c}),u;try{var m=o.merchant.origin;if(!m)return i.report("one_click_authn.request_spc_authn.empty_merchant_origin",{client_id:T,source:r,device_support:c}),u;(d=document.createElement("meta")).name=(0,B.To)("__privateStripeMeta"),d.httpEquiv="origin-trial",d.content="A2ZxBmgWRc3CxEGqZ0aWPMB4MUSx1dSjXn2pGXpMq8NLQh00TMwiKf5A8NEQegaXHfDY7IxdHtYPxI0KRKEWNgQAAAB6eyJvcmlnaW4iOiJodHRwczovL2pzLnN0cmlwZS5jb206NDQzIiwiZmVhdHVyZSI6IlNlY3VyZVBheW1lbnRDb25maXJtYXRpb25PcHRPdXQiLCJleHBpcnkiOjE2Nzg0MDYzOTksImlzVGhpcmRQYXJ0eSI6dHJ1ZX0=",document.head.appendChild(d);var f=new window.PaymentRequest(function(e,t,n){var r=n.authenticationChallenge,o=n.instrument,i=o.cardBrand,a=o.cardName,c=o.cardLast4,s=n.merchant;return[{supportedMethods:"secure-payment-confirmation",data:{action:"authenticate",rpId:"stripe.com",credentialIds:e.map((function(e){return Z(e.id)})),challenge:Z(r),timeout:6e4,fallbackUrl:window.location.toString(),instrument:{displayName:"".concat(a," ····").concat(c),icon:L(i)},payeeOrigin:t,payeeName:s.name,showOptOut:!0}}]}(p,m,o),{total:{label:"Total",amount:o.amount}});return i.report("one_click_authn.request_spc_authn.prompted",{client_id:T,source:r,timeToComplete:s.getElapsedTime(),device_support:c}),f.show().then((function(e){var t;return e.complete("success"),i.report("one_click_authn.request_spc_authn.completed",{client_id:T,source:r,timeToComplete:s.getElapsedTime(),device_support:c}),{authenticationAPIParam:{type:D.QS,assertion:(t=e.details,{type:"public-key",id:t.id,raw_id:t.id,response:{authenticator_data:O(t.response.authenticatorData),client_data_json:O(t.response.clientDataJSON),signature:O(t.response.signature)}}),payment_data:{merchant_data:{merchant_origin:m,total:o.amount},network_data:o.authenticationChallenge}},optedOut:!1,isSPCRequested:!0}})).catch((function(e){if(function(e){return"OptOutError"===e.name&&-1!==e.message.indexOf("opted out")}(e))return i.report("one_click_authn.request_spc_authn.opted_out",{client_id:T,source:r,timeToOptedOut:s.getElapsedTime(),device_support:c}),q.resolve({authenticationAPIParam:null,optedOut:!0,isSPCRequested:!0});var t={AbortError:"request_aborted",InvalidStateError:"payment_already_shown",NotSupportedError:"payment_method_not_supported",SecurityError:"security_error"}[e.name]||"unexpected_error";return i.report("one_click_authn.request_spc_authn.error",{reason:t,client_id:T,source:r,timeToError:s.getElapsedTime(),device_support:c,error:(0,a.Z)({name:e.name,message:e.message},e)}),l}))}catch(e){i.report("one_click_authn.request_spc_authn.error",{client_id:T,reason:"unexpected_error",source:r,timeToError:s.getElapsedTime(),device_support:c,error:(0,a.Z)({name:e.name,message:e.message},e)})}return l},U=n(6274).Promise,G=n(6274).Promise,z=function(e,t){var n=e.threeDS2Source,r=e.oneClickAuthn,o=t.controller;if(!r)return null;var i=P.s$?"safari":P.D1?"firefox":P.P0||P.Bh?"edge":P.G9?P.sV?"chrome_android":/Chrome\/10[4-9]/.test(window.navigator.userAgent)?"chrome_in_opt_out_trial":/Chrome\/(1[1-9]\d|[2-9]\d{2}|[1-9]\d{3,})/.test(window.navigator.userAgent)?"chrome_with_opt_out":"chrome":null;if(!i)return o.report("one_click_authn.configuration.error",{client_id:T,reason:"browser_not_found",source:n}),null;try{switch(new URLSearchParams(x(r.configuration)).get(i)){case I:return I;case R:return R;case M:return M;default:return null}}catch(e){return o.report("one_click_authn.configuration.error",{client_id:T,reason:"unexpected_error",source:n,error:(0,a.Z)({name:e.name,message:e.message},e)}),null}},H=function(){try{return 0==="https://js.stripe.com/v3/".indexOf(window.top.location.origin)}catch(e){return!1}},K=function(){var e=document.featurePolicy;if(!e)return!1;try{return-1!==e.allowedFeatures().indexOf("publickey-credentials-get")}catch(e){return!1}},Y=function(e,t,n,r,o){return function(e,t,n){var r=t.controller,o=n.deviceSupport,i=n.challengeFrame,a=n.startTimestamp,c=e.oneClickAuthn;if(!c)return U.resolve(null);var u=c.credentials;return 0===u.length?(r.report("one_click_authn.request_webauthn_authn.empty_credentials_list",{client_id:T,source:e.threeDS2Source,device_support:o}),U.resolve(null)):new U((function(t,n){i.then((function(r){var i=function(){return n(new Error("User canceled"))};r._once("cancel",i),r.isVisible||(r.show(),r.fadeInBackdrop());var l={amount:c.amount,instrument:c.instrument,merchant:c.merchant,authenticationChallenge:c.authenticationChallenge,layout:c.layout,allowCredentials:u};return r.action.performOneClickWebauthnAuthentication({threeDS2Source:e.threeDS2Source,cardBrand:e.cardBrand,appUrl:(0,s.xS)("one-click-webauthn-authentication-2ac24ce81cb1f26fbc735927ceab9792.html"),deviceSupport:o,payload:l,startPosixTime:a.getAsPosixTime()}).then((function(e){r._off("cancel",i),t(e)}))}))}))}(e,t,{deviceSupport:n,challengeFrame:r,startTimestamp:o}).then((function(e){return{deviceSupport:n,authenticationAPIParam:e,optedOut:!1}}))},W=function(e,t){return G.all([N(),E()]).then((function(n){var o=(0,r.Z)(n,2),i=o[0],a=o[1];return{sameOriginFrame:H(),spcEligible:i,webauthnEligible:a,publickeyCredentialsGetAllowed:K(),configurationType:z(e,t)}}))},V=function(e,t,n){var r=n.challengeFrame,o=n.startTimestamp;return W(e,t).then((function(n){return a=(i=n).webauthnEligible,c=i.configurationType,!a||c!==I&&c!==M?function(e){var t=e.spcEligible,n=e.configurationType;return t&&n===R}(n)?F(e,t,{deviceSupport:n,startTimestamp:o}).then((function(i){var a=i.authenticationAPIParam,c=i.optedOut;return!i.isSPCRequested&&n.webauthnEligible?Y(e,t,n,r,o):{deviceSupport:n,authenticationAPIParam:a,optedOut:c}})):{deviceSupport:n,authenticationAPIParam:null,optedOut:!1}:Y(e,t,n,r,o);var i,a,c}))},X=n(6274).Promise,Q=function(e,t,n){var a=new i.E,c=d(e,t);switch(e.type){case"3ds2-challenge":return W(e,t).then((function(r){return p(e,{oneClickAuthnDeviceSupport:r,oneClickAuthnOptedOut:!1,challengeFrame:c}).then((function(){return b(t,{intent:v(0,t,n),challengeFrame:c,startTimestamp:a})}),(function(){return b(t,{intent:g(e,t),challengeFrame:c,startTimestamp:a})}))}));case"3ds2-fingerprint":return X.all([S(e,t),V(e,t,{challengeFrame:c,startTimestamp:a})]).then((function(n){var o=(0,r.Z)(n,2),i=o[0],a=o[1];return function(e,t,n){var r=n.fingerprintResult,o=n.oneClickAuthn,i=t.controller,a=t.hosted,c=t.intentSecret;return i.report("3ds2.authenticate",{hosted:a,intentId:c.id}),i.action.authenticate3DS2({threeDS2Source:e.threeDS2Source,gateway:e.gateway,outerWindowWidth:window.innerWidth,hosted:a,fingerprintResult:r,oneClickAuthnDeviceSupportAPIParam:{hosted:a,same_origin_frame:o.deviceSupport.sameOriginFrame,spc_eligible:o.deviceSupport.spcEligible,webauthn_eligible:o.deviceSupport.webauthnEligible,publickey_credentials_get_allowed:o.deviceSupport.publickeyCredentialsGetAllowed},oneClickAuthnAuthenticationAPIParam:o.authenticationAPIParam,publishableKey:e.publishableKey}).then((function(e){return"error"===e.type?i.report("3ds2.authenticate.error",{error:e.error,hosted:a,intentId:c.id}):i.report("3ds2.authenticate.success",{hosted:a,intentId:c.id}),e}))}(e,t,{fingerprintResult:i,oneClickAuthn:a}).then((function(n){return f(e,t,{authenticateResponse:n,oneClickAuthnDeviceSupport:a.deviceSupport,oneClickAuthnOptedOut:a.optedOut,challengeFrame:c})}))})).then((function(){return b(t,{intent:v(0,t,n),challengeFrame:c,startTimestamp:a})}),(function(){return b(t,{intent:g(e,t),challengeFrame:c,startTimestamp:a})}));default:return(0,o.Rz)(e)}}},8471:function(e,t,n){"use strict";n.d(t,{Y:function(){return c}});var r=n(5326),o=n(6274).Promise,i=function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.interval||1e4,i=n.timeout||3e5,a=(new Date).getTime();return new o((function(n){setTimeout((function c(){o.resolve(e(t)).catch((function(e){return{error:e}})).then((function(e){if(null==e)if((new Date).getTime()-a>i){n({error:new Error("Polling timed out without a valid response")})}else setTimeout(c,r);else n(e)}))}),r)}))}},a=n(6274).Promise,c=i((function(e){var t=e.intentSecret,n=e.intentType,o=e.controller,i=e.locale;return a.resolve((0,r.NO)(t,n,o,i)).then((function(e){var t=(0,r.yn)(e);return t?"requires_action"===t.status?null:e:"error"in e&&"lock_timeout"===e.error.code?null:e}))}))},5059:function(e,t,n){"use strict";n.d(t,{l:function(){return c}});var r=n(6790),o=n(3333),i=n(6090),a=n(1873),c=function(e){var t=e.controller,n=e.locale,c=e.intent,s=e.groupId,u=e.clientSecret;return t.action.parseLuxeNextAction({intent:c,groupId:s,clientSecret:u}).then((function(e){return null==e?null:"luxe_confirm_on_mobile_device"===e.type?function(e){var t=e.controller,n=e.intent,c=e.parsedNextAction,s=e.locale;if(!o.q$||"on_mobile_only"!==(null==c?void 0:c.redirectBehavior)||!c.appUrl)return(0,i.U)({controller:t,intent:n,locale:s,url:c.hostedInstructionsUrl,lightboxOptions:{frameTitle:"hosted_qr_code_instructions.luxe.frame_title"}});switch(n.object){case"payment_intent":return(0,r.k)(n,c.appUrl,t);case"setup_intent":return(0,r.e)(n,c.appUrl,t);default:return(0,a.Rz)(n)}}({controller:t,intent:c,parsedNextAction:e,locale:n}):null}))}},1115:function(e,t,n){"use strict";n.d(t,{Fh:function(){return F},nq:function(){return z},gO:function(){return G}});var r=n(1413),o=n(6977),i=n(3550),a=n(7549),c=n(122),s=n(9488),u=n(6042),l=n(1925),d=n(6274).Promise,p=n(8147),m=n(6274).Promise,f=n(6274).Promise,_=n(6274).Promise,h=n(8471),y=n(5326),v=n(6274).Promise,g=n(6274).Promise,b=n(6090),w=n(526),k=n(6274).Promise,S=n(6274).Promise,P=n(6790),C=n(8478),E=n(4243),A=n(1278),N=n(1873),T=n(942),I=n(8812),R=n(1765),M=function(e){return["id_bank_account","id_bank_transfer"].indexOf(e.bankTransferType)>-1},O=n(3379),x=n(5671),Z=n(3144),j=n(9038),L=function(){function e(t){(0,x.Z)(this,e),this._inContextData=t,this._inContextOuter=new j.B({inContextData:t,paymentMethodBehavior:{lightboxFrameOptions:this._lightboxFrameOptions.bind(this),addModalListeners:this._addModalListeners.bind(this),inContextOuterConfig:{showLightboxBackdrop:!1}}})}return(0,Z.Z)(e,[{key:"collectPayment",value:function(){return this._inContextOuter.collectPayment()}},{key:"_lightboxFrameOptions",value:function(){var e=this._inContextData,t=e.paymentMethod,n=e.paymentIntent,r=e.controller,o=e.paymentSurface;return{paymentMethodType:t,clientToken:e.clientToken,stripeReturnUrl:e.stripeReturnUrl,interactionMode:e.interactionMode,controllerId:r._id,paymentSurface:o,intentId:n.id}}},{key:"_addModalListeners",value:function(e){var t=this;e._once("sdk_initialized",(function(){t._inContextOuter.clearModalLoadTimeout()}))}}]),e}(),B=function(){function e(t){(0,x.Z)(this,e),this._inContextData=t,this._inContextOuter=new j.B({inContextData:t,paymentMethodBehavior:{lightboxFrameOptions:this._lightboxFrameOptions.bind(this),addModalListeners:this._addModalListeners.bind(this),inContextOuterConfig:{showLightboxBackdrop:!0}}})}return(0,Z.Z)(e,[{key:"collectPayment",value:function(){return this._inContextOuter.collectPayment()}},{key:"_lightboxFrameOptions",value:function(){var e=this._inContextData,t=e.paymentMethod,n=e.paymentIntent,r=e.controller,o=e.paymentSurface;return{paymentMethodType:t,redirectUrl:e.redirectUrl,controllerId:r._id,paymentSurface:o,intentId:n.id}}},{key:"_addModalListeners",value:function(e){var t=this;e._once("checkout_launched",(function(){t._inContextOuter.clearModalLoadTimeout()})),e._once("close_modal",(function(){t._inContextOuter.closeModal()}))}}]),e}(),D=n(5059),q=n(6274).Promise,F=function(e){switch(e.type){case"error":var t=e.error;if("payment_intent_unexpected_state"===t.code&&"object"==typeof t.payment_intent&&null!=t.payment_intent&&"string"==typeof t.payment_intent.status&&(0,o.mD)(t.payment_intent.status)){var n=t.payment_intent;return{type:"object",locale:e.locale,object:n}}return e;case"object":return e;default:return(0,N.Rz)(e)}},U=function(e,t,i,N,x,Z,j,F){var U=j||(0,o.G2)(t);if(null==U||!U.type)return e.report("next_action.action_unhandled",{message:"Unhandled next action found",surface:"stripe_js",mode:"payment_intent",intentId:t.id,nextActionType:"unknown"}),q.resolve({paymentIntent:t});var G=(0,a.l)(U),z=(0,o.O3)(t);if(!G)return e.report("next_action.action_unhandled",{message:"Unhandled next action found",surface:"stripe_js",mode:"payment_intent",intentId:t.id,nextActionType:U.type}),(0,D.l)({controller:e,intent:t,locale:i,clientSecret:z,groupId:F}).then((function(e){return null!=e?e:{paymentIntent:t}}));switch("use_stripe_sdk"===G.type&&G.unhandled_sub_type&&e.report("next_action.action_unhandled",{message:"Unhandled stripejs next action subtype found",surface:"stripe_js",mode:"payment_intent",nextActionType:U.type,actionSubType:G.unhandled_sub_type}),G.type){case"cardimageverification-challenge":return n.e(428).then(n.bind(n,5798)).then((function(n){return(0,n.performCardImageVerification)(G,t,e,i)}));case"captcha-challenge":return(0,p.z)(G,t,e,i);case"3ds1-modal":return(0,c.s)(G,z,T.kE.PAYMENT_INTENT,e,i,x);case"3ds2-fingerprint":case"3ds2-challenge":return(0,s.A)(G,{intentSecret:z,intentType:T.kE.PAYMENT_INTENT,controller:e,locale:i,hosted:N},x);case"redirect":return(0,P.k)(t,G.redirectUrl,e,Z);case"blik_authorize":return function(e){var t=e.controller,n=e.intent,r=e.locale,o=e.shouldDisplayInstructionsModal;return new v((function(e){var i,a=!1;return o&&((i=t.createLightboxFrame({type:l.NC.BLIK_INNER,options:{locale:r}}))._on("load",(function(){var e,t;null===(e=i)||void 0===e||e.show(),null===(t=i)||void 0===t||t.fadeInBackdrop()})),i._once("request-close",(function(){i&&(0,u.G)(i).then((function(){a=!0,e({paymentIntent:n})}))}))),(0,y.ct)({controller:t,initialDelay:8e3,pollTimeGap:5e3,intent:n,checkIntent:function(e){return"requires_action"!==e.status&&"requires_source_action"!==e.status||"blik_authorize"!==e.next_action.type},locale:r,shouldPoll:function(){return!a}}).then((function(t){var n;null!==(n=i)&&void 0!==n&&n.isVisible&&i.destroy(!0),a||e(t)}))}))}({controller:e,intent:t,locale:i,shouldDisplayInstructionsModal:Z});case"boleto-display":if(void 0===G.hostedVoucherUrl)throw new I.No("Expect `next_action.boleto_display_details.hosted_voucher_url` of `PaymentIntent` to be not undefined. Please refer to \n\nhttps://stripe.com/docs/api/payment_intents/object#payment_intent_object-next_action-boleto_display_details-hosted_voucher_url");return function(e){var t=e.controller,n=e.url,r=e.intent,o=e.locale,i=(0,u.q)(t,{url:(0,l.jr)(n),size:"600x700",locale:o,frameTitle:"boleto.voucher_frame_title",useLightboxHostedCloseButton:!1});return new d((function(e){i._on("request-close",(function(){(0,u.G)(i).then((function(){e({paymentIntent:r})}))}))}))}({controller:e,locale:i,url:G.hostedVoucherUrl,intent:t});case"konbini-display":if(void 0===G.hostedVoucherUrl)throw new I.No("Expected option `handleActions` to be `false`. The Konbini pilot does not handle the next actions for you automatically yet (e.g. displaying Konbini payment details). Please refer to the Stripe Konbini integration guide for more info: \n\nhttps://stripe.com/docs/payments/konbini");return function(e){var t=e.controller,n=e.url,r=e.intent,o=e.locale,i=(0,u.q)(t,{url:(0,l.jr)(n),size:"600x900",locale:o,frameTitle:"konbini.voucher_frame_title",useLightboxHostedCloseButton:!1});return new m((function(e){i._on("request-close",(function(){(0,u.G)(i).then((function(){e({paymentIntent:r})}))}))}))}({controller:e,locale:i,url:G.hostedVoucherUrl,intent:t});case"mb_way_await_authorization":return function(e){var t=e.controller,n=e.intent,r=e.locale,i=e.expandParam;return new g((function(e){return(0,y.ct)({controller:t,initialDelay:8e3,pollTimeGap:5e3,intent:n,checkIntent:function(e){return!(0,o.mD)(e.status)},locale:r,expandParam:i}).then((function(t){return e(t)}))}))}({controller:e,intent:t,locale:i,expandParam:x});case"multibanco-display":if(void 0===G.hostedVoucherUrl)throw new I.No("Expect `next_action.multibanco_display_details.hosted_voucher_url` of `PaymentIntent` to be not undefined.");return function(e){var t=e.controller,n=e.url,r=e.intent,o=e.locale,i=(0,u.q)(t,{url:(0,l.jr)(n),size:"600x700",locale:o,frameTitle:"multibanco.voucher_frame_title",useLightboxHostedCloseButton:!1});return new f((function(e){i._on("request-close",(function(){(0,u.G)(i).then((function(){e({paymentIntent:r})}))}))}))}({controller:e,locale:i,url:G.hostedVoucherUrl,intent:t});case"in_context_completion":var H={paymentIntent:t,redirectUrl:G.url,controller:e,paymentSurface:Z?"payment_element":"checkout",fallbackToRedirectOnErrors:!0};switch(G.paymentMethodType){case"klarna":return new L((0,r.Z)((0,r.Z)({},H),{},{clientToken:G.klarna.clientToken,interactionMode:G.klarna.interactionMode,stripeReturnUrl:G.klarna.returnUrl,paymentMethod:"klarna"})).collectPayment();case"affirm":return new O.H((0,r.Z)((0,r.Z)({},H),{},{paymentMethod:"affirm"})).collectPayment();case"afterpay_clearpay":return new B((0,r.Z)((0,r.Z)({},H),{},{paymentMethod:"afterpay_clearpay"})).collectPayment();default:throw new I.No("paymentMethodType is unsupported")}case"oxxo-display":if(void 0===G.hostedVoucherUrl)throw new I.No("To handle the next actions automatically, set the API version to oxxo_beta=v2. Please refer to the Stripe OXXO integration guide for more info: \n\nhttps://stripe.com/docs/payments/oxxo");return function(e){var t=e.controller,n=e.url,r=e.intent,o=e.locale,i=(0,u.q)(t,{url:(0,l.jr)(n),size:"600x700",locale:o,frameTitle:"oxxo.voucher_frame_title",useLightboxHostedCloseButton:!1});return new _((function(e){i._on("request-close",(function(){(0,u.G)(i).then((function(){e({paymentIntent:r})}))}))}))}({controller:e,locale:i,url:G.hostedVoucherUrl,intent:t});case"upi_await_notification":return(0,h.Y)({controller:e,intentSecret:z,intentType:T.kE.PAYMENT_INTENT,locale:i});case"wechat_pay_display_qr_code":return function(e){var t=e.controller,n=e.intent,r=e.locale,o=e.url;return(0,b.U)({controller:t,intent:n,locale:r,url:o,lightboxOptions:{frameTitle:"hosted_qr_code_instructions.wechat_pay.frame_title"}})}({controller:e,locale:i,url:G.hostedInstructionsUrl,intent:t,intentSecret:z,intentType:T.kE.PAYMENT_INTENT});case"paynow_display_qr_code":return function(e){var t=e.controller,n=e.intent,r=e.locale,o=e.url;return(0,b.U)({controller:t,intent:n,locale:r,url:o,lightboxOptions:{frameTitle:"hosted_qr_code_instructions.paynow.frame_title"}})}({controller:e,locale:i,url:G.hostedInstructionsUrl,intent:t,intentSecret:z,intentType:T.kE.PAYMENT_INTENT});case"payto_await_authorization":return(0,w.g)({controller:e,intent:t,locale:i});case"pix_display_qr_code":if(void 0===G.hostedInstructionsUrl)throw new I.No("Expect `next_action.pix_display_qr_code.hosted_instructions_url` of `PaymentIntent` to be not undefined. Please refer to \n\nhttps://stripe.com/docs/api/payment_intents/object#payment_intent_object-next_action-pix_display_qr_code-hosted_instructions_url");return function(e){var t=e.controller,n=e.intent,r=e.intentSecret,o=e.intentType,i=e.locale,a=e.url,c=(0,u.q)(t,{url:(0,l.jr)(a),size:"450x750",locale:i,frameTitle:"pix.instructions_frame_title",useLightboxHostedCloseButton:!1}),s=null;return new k((function(e){c._on("load",(function(){c.show(),c.fadeInBackdrop()})),c._once("request-close",(function(){(0,u.G)(c).then((function(){s&&clearTimeout(s),e({paymentIntent:n})}))})),c._on("complete",(function(t){(0,u.G)(c).then((function(){s&&clearTimeout(s),e(t)}))})),s=setTimeout((function n(){(0,y.NO)(r,o,t,i).then((function(t){var r=(0,y.yn)(t);r&&("requires_action"!==r.status?c.destroy(!0).then((function(){"payment_intent"===r.object?e({paymentIntent:r}):e({setupIntent:r})})):s=setTimeout(n,2e3))}))}),5e3)}))}({controller:e,locale:i,url:G.hostedInstructionsUrl,intent:t,intentSecret:z,intentType:T.kE.PAYMENT_INTENT});case"promptpay_display_qr_code":return function(e){var t=e.controller,n=e.intent,r=e.locale,o=e.url;return(0,b.U)({controller:t,intent:n,locale:r,url:o,lightboxOptions:{frameTitle:"hosted_qr_code_instructions.promptpay.frame_title"}})}({controller:e,locale:i,intent:t,intentSecret:z,url:G.hostedInstructionsUrl,intentType:T.kE.PAYMENT_INTENT});case"display_bank_transfer_instructions":return function(e,t){return!!M(e)&&!(0,R.uN)(t||[],R.M4.id_bank_transfer_beta_1)}(G,e._betas)?(0,P.k)(t,G.hostedInstructionsUrl,e):function(e){return!M(e)}(G)?function(e){var t=e.controller,n=e.url,r=e.intent,o=e.locale,i=(0,u.q)(t,{url:(0,l.jr)(n),size:"600x700",locale:o,frameTitle:"display_bank_transfer_instructions.voucher_frame_title",useLightboxHostedCloseButton:!1});return new S((function(e){i._on("request-close",(function(){(0,u.G)(i).then((function(){e({paymentIntent:r})}))}))}))}({controller:e,url:G.hostedInstructionsUrl,intent:t,locale:i}):q.resolve({paymentIntent:t});case"cashapp_handle_redirect_or_display_qr_code":return(0,D.l)({controller:e,intent:t,locale:i,clientSecret:z,groupId:F}).then((function(n){return n||(0,C.p)({controller:e,locale:i,intent:t})}));case"swish_handle_redirect_or_display_qr_code":return function(e){var t=e.controller,n=e.intent,r=e.locale,i=(0,o.G2)(n);if(!i||"swish_handle_redirect_or_display_qr_code"!==i.type)throw new Error("Expected next_action.swish_handle_redirect_or_display_qr_code");return(0,b.U)({controller:t,intent:n,locale:r,url:i.swish_handle_redirect_or_display_qr_code.hosted_instructions_url,lightboxOptions:{frameTitle:"hosted_qr_code_instructions.swish.frame_title"}})}({controller:e,locale:i,intent:t});case"smtc-collection":return(0,E.O)({action:G,controller:e,intent:t,hosted:N});case"express_checkout_authentication_needed":if(!F)throw new Error("Unexpected Error, groupId is null/undefined.");return(0,A._)({controller:e,intent:t,locale:i,action:G,expandParam:x,groupId:F});default:return e.report("next_action.action_unhandled",{message:"Unhandled next action type found",surface:"stripe_js",mode:"payment_intent",intentId:t.id,nextActionType:G.type,intentNextActionType:U.type}),q.resolve({paymentIntent:t})}},G=function e(t,n,r,o,a,c){var s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,l=arguments.length>8?arguments[8]:void 0;if(T.kO5&&void 0!==arguments[5]?arguments[5]:0,u=arguments.length>6?arguments[6]:void 0;if(r.kO1?"properties":"property",": `").concat(v.join("`, `"),"`. Put additional API properties in `params`."));return(0,u.zS)(g)}if(f){var b=f._componentName,w=d._b[b];return(0,u.x4)({type:w,element:f,elements:null,data:p||{}})}if(y)return(0,u.x4)({type:null,element:null,elements:y,data:p||{}});if(p)return(0,u.x4)({type:p.type,element:null,elements:null,data:p})}var k,S=t.type,P=(0,c.Z)(t,h);if(null===e){if("string"!=typeof S)return(0,u.RH)("a string such as 'card', 'ideal', or 'sepa_debit'",typeof S,n,(0,u.NQ)(o,"type"));k=S}else{if(void 0!==S&&S!==e)return"string"!=typeof S?(0,u.RH)("a string such as 'card', 'ideal', or 'sepa_debit'",typeof S,n,(0,u.NQ)(o,"type")):(0,u.RH)('"'.concat(S,'"'),'"'.concat(e,'"'),n,(0,u.NQ)(o,"type"));k=e}var C=P[k],E=(P[k],(0,c.Z)(P,[k].map(r)));if(-1!==["acss_debit","affirm","afterpay_clearpay","alipay","amazon_pay","bancontact","cashapp","customer_balance","eps","giropay","grabpay","klarna","konbini","kr_market","mb_way","mobilepay","multibanco","ng_market","oxxo","p24","pay_by_bank","paynow","paypal","payto","pix","promptpay","rechnung","revolut_pay","south_korea_market","swish","twint","us_bank_account","wechat_pay","zip"].indexOf(k)&&void 0===C&&(C={}),"object"!=typeof C)return(0,u.RH)("an object or element",typeof t[k],n,(0,u.NQ)(o,k));if(null===C)return(0,u.RH)("an object or element","null",n,(0,u.NQ)(o,k));var A=(0,u.rX)(C);if(A){var N=A._componentName;if(d._b[N]!==k){var T=[].concat((0,i.Z)(o),[k]).join("."),I=n.label,R=new s.No("Invalid value for ".concat(I,": ").concat(T," was `").concat(N,"` Element, which cannot be used to create ").concat(k," PaymentMethods."));return(0,u.zS)(R)}return(0,u.x4)({type:k,element:A,elements:null,data:E})}return(0,u.x4)({type:k,element:null,elements:null,data:P})}},A=function(e,t,n){if(null==e)return(0,u.x4)(null);if(!(0,f.Kn)(e))return(0,u.RH)("object",typeof e,t,n);var r=e.card,i=(0,c.Z)(e,y);if(!(0,f.Kn)(r))return(0,u.x4)(e);var a=r.cvc,s=(0,c.Z)(r,v);if(null==a)return(0,u.x4)(e);var d=(0,u.rX)(a),p=d?d._componentName:"";return l.Yj.cardCvc!==p?(0,u.RH)("`".concat(l.Yj.cardCvc,"` Element"),p?"`".concat(p,"` Element"):typeof a,t,(0,u.NQ)(n,"card.cvc")):(0,u.x4)((0,o.Z)((0,o.Z)({},i),{},{card:(0,o.Z)((0,o.Z)({},s),{},{cvc:d})}))},N=(0,u.Wc)((0,u.mC)({handleActions:(0,u.Wc)(u.Xg,(function(){return!0}))}),(function(){return{handleActions:!0}})),T=function(e){return function(t,n,r){if("object"!=typeof t)return(0,u.RH)("object",typeof t,n,r);if(null===t)return(0,u.RH)("object","null",n,r);var o=t.billing_details,i=(0,c.Z)(t,g);return(0,u.x4)({paymentMethodData:{type:"".concat(e),billing_details:o},otherParams:i})}},I=function(e,t){return function(n,r,i){if("object"!=typeof n)return(0,u.RH)("object",typeof n,r,i);if(null===n)return(0,u.RH)("object","null",r,i);var a=n.clientSecret,s=n.params,l=n.onEvent,d=(0,c.Z)(n,b),p=(0,u.ld)(e,a,r.label,{path:["clientSecret"]});if("error"===p.type)return p;if("object"!=typeof s)return(0,u.RH)("object",typeof s,r,(0,u.NQ)(i,"params"));if(null===s)return(0,u.RH)("object","null",r,(0,u.NQ)(i,"params"));var f=s.payment_method_type,_=s.payment_method_data;if("string"!=typeof f)return(0,u.RH)("string",typeof f,r,(0,u.NQ)((0,u.NQ)(i,"params"),"payment_method_type"));if("object"!=typeof _&&void 0!==_)return(0,u.RH)("object",typeof _,r,(0,u.NQ)((0,u.NQ)(i,"params"),"payment_method_data"));var h=l;return void 0===l||(0,m.uN)(t,m.M4.financial_connections_on_event_beta_1)||(h=void 0),(0,u.x4)({clientSecret:p.value,paymentMethodData:(0,o.Z)({type:f},(null==_?void 0:_.billing_details)&&{billing_details:null==_?void 0:_.billing_details}),onEvent:h,otherParams:d})}},R=function(e,t){return function(n,r,o){if(void 0===n)return(0,u.x4)({paymentMethodData:null,paymentMethodOptions:null,source:null,paymentMethod:null,otherParams:{}});if(!(0,f.Kn)(n))return(0,u.RH)("object",null===n?"null":typeof n,r,o);var a=n.source,l=n.source_data,d=n.payment_method_data,p=n.payment_method_options,m=n.payment_method,_=(0,c.Z)(n,w);if(null!=l)throw new s.No("".concat(t,": Expected payment_method, or source, not source_data."));if(null!=d)throw new s.No("".concat(t,": Expected payment_method, or source, not payment_method_data."));if(null!=a&&null!=m)throw new s.No("".concat(t,": Expected either payment_method or source, but not both."));if(null===e&&null!=m&&"string"!=typeof m)throw new s.No("".concat(t,": Expected payment_method[type] to be set if payment_method is passed."));if(null!=a){if("string"!=typeof a)return(0,u.RH)("string",typeof a,r,(0,u.NQ)(o,"source"));if("updatePaymentIntent"===t)throw new s.No("".concat(t,": Expected payment_method, not source to be passed."));return(0,u.x4)({source:a,paymentMethodData:null,paymentMethodOptions:null,paymentMethod:null,otherParams:_})}if(null!=m&&"string"!=typeof m&&"object"!=typeof m)return(0,u.RH)("string or object",typeof m,r,(0,u.NQ)(o,"payment_method"));var h=(0,u.ld)(A,p,t,{path:[].concat((0,i.Z)(o),["payment_method_options"])});if("error"===h.type)return h;if("string"==typeof m)return(0,u.x4)({source:null,paymentMethodData:null,paymentMethodOptions:h.value,paymentMethod:m,otherParams:_});if("object"==typeof m&&null!==m){var y=(0,u.ld)(E(e),m,t,{path:[].concat((0,i.Z)(o),["payment_method"])});if("error"===y.type)return y;var v=y.value;return(0,u.x4)({source:null,paymentMethod:null,paymentMethodOptions:h.value,paymentMethodData:v,otherParams:_})}return(0,u.x4)({source:null,paymentMethodData:null,paymentMethodOptions:null,paymentMethod:null,otherParams:_})}},M=function(e,t,n){if(null===e)return(0,u.RH)("object","null",t,n);if("object"!=typeof e)return(0,u.RH)("object",typeof e,t,n);var r=e.type;if("string"!=typeof r)return(0,u.RH)("a string such as 'use_stripe_sdk', 'redirect_to_url'",typeof r,t,(0,u.NQ)(n,"type"));if("use_stripe_sdk"!==r)return(0,u.RH)("a 3DS2 NextAction type such as 'use_stripe_sdk'",r,t,(0,u.NQ)(n,"type"));var o=e.use_stripe_sdk;if("object"!=typeof o)return(0,u.RH)("an object",o,t,(0,u.NQ)(n,"type"));var i=e;return(0,u.x4)(i,[])}},6042:function(e,t,n){"use strict";n.d(t,{G:function(){return i},q:function(){return o}});var r=n(1925),o=function(e,t){var n=e.createLightboxFrame({type:r.NC.LIGHTBOX_APP,options:t});return n.show(),n._on("nested-frame-loaded",(function(){n.fadeInBackdrop(),setTimeout((function(){n.action.openLightboxFrame()}),200)})),n},i=function(e){return e.action.closeLightboxFrame(),e.destroy()}},1119:function(e,t,n){"use strict";n.d(t,{sl:function(){return k},Yn:function(){return S},nD:function(){return P},OJ:function(){return N},sx:function(){return C},ri:function(){return E},At:function(){return A}});var r=n(1413),o=n(5987),i=n(1925),a=n(4200),c=n(1873),s=n(6274).Promise,u=function(e,t){var n=e.id,r=e.filters,o=e.permissions,i=e.prefetch,a=e.return_url,c=e.status,s=e.status_details,u={id:n,accounts:t,status:c};return r&&(u.filters=r),o&&(u.permissions=o),i&&(u.prefetch=i),a&&(u.return_url=a),s&&(u.status_details=s),u},l=n(1708),d=n(6274).Promise,p=function(e){if(void 0!==e)return!0},m=function(e,t,n){return new d((function(o){var a;try{a=t.createLightboxFrame({type:i.NC.LINKED_ACCOUNTS_INNER,options:e})}catch(e){return o({error:{message:e.message}})}return window.addEventListener("popstate",(function e(){a._emit(l.Oh.COMPLETE,{linkAccountSessionCompleteResponse:{type:"error",error:{type:"input_validation_error",code:"financial_connections_session_cancelled"}}}),a._emit(l.Oh.CLOSE),window.removeEventListener("popstate",e)})),a._on(l.Oh.LOAD,(function(){var e=document.querySelector('iframe[name="'.concat(a.id,'"]'));e&&(null==e||e.focus())})),null==n||n(a),a.show(),a.fadeInBackdrop(),a._on(l.Oh.CLOSE,(function(){a.fadeOutBackdrop();t.action.localizeError({type:"input_validation_error",code:"financial_connections_session_cancelled"}).then((function(e){o({error:e})}))})),a._on(l.Oh.COMPLETE,(function(e){a.destroy(!0).then((function(){return function(e,t){switch(e.linkAccountSessionCompleteResponse.type){case"object":var n=e.linkedAccounts,o=e.linkAccountSessionCompleteResponse,i=e.consumer,a=o.object,l=a.id,d=a.filters,p=a.permissions,m=a.prefetch,f=a.payment_account,_=a.bank_account_token,h=a.return_url,y={id:l,linkedAccounts:n};return _&&(y.bankAccountToken=_),f&&!_&&(y.paymentAccount=f),d&&(y.filters=d),p&&(y.permissions=p),m&&(y.prefetch=m),h&&(y.returnUrl=h),s.resolve({linkAccountSession:y,consumer:i});case"error":var v,g=e.linkAccountSessionCompleteResponse.error;return g.financial_connections_session&&(v=u(e.linkAccountSessionCompleteResponse.error.financial_connections_session,[])),t.action.localizeError(g).then((function(e){return{error:(0,r.Z)((0,r.Z)({},e),{},{financial_connections_session:v})}}));default:return(0,c.Rz)(e.linkAccountSessionCompleteResponse)}}(e,t)})).then((function(e){o(e)}))})),null}))},f=function(e,t,n){return new d((function(o){var a;try{a=t.createLightboxFrame({type:i.NC.LINKED_ACCOUNTS_INNER,options:e})}catch(e){return o({error:{message:e.message}})}return window.addEventListener("popstate",(function e(){a._emit(l.Oh.COMPLETE,{linkAccountSessionCompleteResponse:{type:"error",error:{type:"input_validation_error",code:"financial_connections_session_cancelled"}}}),a._emit(l.Oh.CLOSE),window.removeEventListener("popstate",e)})),a._on(l.Oh.LOAD,(function(){var e=document.querySelector('iframe[name="'.concat(a.id,'"]'));e&&(null==e||e.focus())})),null==n||n(a),a.show(),a.fadeInBackdrop(),a._on(l.Oh.CLOSE,(function(){a.fadeOutBackdrop()})),a._on(l.Oh.COMPLETE,(function(e){a.destroy(!0).then((function(){return function(e,t){switch(e.linkAccountSessionCompleteResponse.type){case"object":var n=e.linkedAccounts,o=e.linkAccountSessionCompleteResponse,i=e.consumer,a=u(o.object,n);return s.resolve({financialConnectionsSession:a,consumer:i});case"error":var l,d=e.linkAccountSessionCompleteResponse.error;return d.financial_connections_session&&(l=u(e.linkAccountSessionCompleteResponse.error.financial_connections_session,[])),t.action.localizeError(d).then((function(e){return{error:(0,r.Z)((0,r.Z)({},e),{},{financial_connections_session:l})}}));default:return(0,c.Rz)(e.linkAccountSessionCompleteResponse)}}(e,t)})).then((function(e){o(e)}))})),null}))},_=function(e){var t=e.linkAccountSessionCreatorClientSecret,n=e.linkAccountSessionCreatorType,r=e.linkAccountSessionCreatorId,o=e.controller,i=e.groupId,c=e.sharedSessionContext,s=e.linkAccountSessionCreationParams,u=e.checkoutPriceAmount,l=e.email,d=e.linkMobilePhone,f=e.linkMobilePhoneCountry,_=e.useContinueButtonOnSuccess,h=e.instantDebitsIncentive,y=e.incentiveEligibilitySession,v=e.businessName,g=e.merchantToken,b=e.hasExistingConsumerSession,w=void 0!==b&&b,k=e.onEvent,S=e.onFrameLoad;(0,a.xc)(o.warn);var P=o._stripeAccount,C=o._apiVersion,E=o._apiKey;return k&&o.setFinancialConnectionsOnEventHandler(k),m({clientSecret:t,linkAccountSessionCreatorType:n,linkAccountSessionCreatorId:r,linkAccountSessionCreationParams:s,apiKey:E,sharedSessionContext:c,groupId:i,stripeAccount:P,stripeVersion:C,checkoutPriceAmount:u,email:l,linkMobilePhone:d,linkMobilePhoneCountry:f,useContinueButtonOnSuccess:_,instantDebitsIncentive:h,incentiveEligibilitySession:y,businessName:v,merchantToken:g,hasExistingConsumerSession:w,emitEvents:p(k),stripeJsId:o._stripeJsId},o,S)},h=function(e){var t=e.linkAccountSessionCreatorClientSecret,n=e.linkAccountSessionCreatorType,r=e.linkAccountSessionCreatorId,o=e.controller,i=e.sharedSessionContext,s=e.linkAccountSessionCreationParams,u=e.checkoutPriceAmount,l=e.email,d=e.linkMobilePhone,m=e.linkMobilePhoneCountry,_=e.onEvent,h=e.hasExistingConsumerSession,y=void 0!==h&&h,v=e.onFrameLoad;(0,a.xc)(o.warn),(0,c.kG)(t,"Must provide client secret to launchFinancialConnections");var g=o._stripeAccount,b=o._apiVersion,w=o._apiKey;return _&&o.setFinancialConnectionsOnEventHandler(_),f({clientSecret:t,linkAccountSessionCreatorType:n,linkAccountSessionCreatorId:r,linkAccountSessionCreationParams:s,apiKey:w,sharedSessionContext:i,stripeAccount:g,stripeVersion:b,checkoutPriceAmount:u,email:l,linkMobilePhone:d,linkMobilePhoneCountry:m,useContinueButtonOnSuccess:!1,hasExistingConsumerSession:y,stripeJsId:o._stripeJsId,emitEvents:p(_)},o,v)},y=n(1765),v=["clientSecret","onEvent"],g=function(e){return function(t,n,r){if(null===t)return(0,c.RH)("object","null",n,r);if("object"!=typeof t)return(0,c.RH)("object",typeof t,n,r);var i=t.clientSecret,a=t.onEvent;(0,o.Z)(t,v);if("string"!=typeof i)return(0,c.RH)("string",typeof i,n,["clientSecret"]);var s=a;return void 0===a||(0,y.uN)(e,y.M4.financial_connections_on_event_beta_1)||(s=void 0),(0,c.x4)({clientSecret:i,onEvent:s})}},b=["linkedAccounts"],w=["consumerInfo"],k=function(e,t,n){var i=(0,c.Gu)(g(t),n,"stripe.collectBankAccountToken").value;return _({linkAccountSessionCreatorClientSecret:i.clientSecret,linkAccountSessionCreatorType:"link_account_session",controller:e,checkoutPriceAmount:{amount:null,currency:null},email:null,linkMobilePhone:null,linkMobilePhoneCountry:null,useContinueButtonOnSuccess:!1,onEvent:i.onEvent}).then((function(e){if(e.error)return e;var t=e.linkAccountSession,n=t.linkedAccounts,i=(0,o.Z)(t,b);return{token:e.linkAccountSession.bankAccountToken,linkAccountSession:e.linkAccountSession,financialConnectionsSession:(0,r.Z)((0,r.Z)({},i),{},{accounts:n})}}))},S=function(e,t,n){var r=(0,c.Gu)(g(t),n,"stripe.collectFinancialConnectionsAccounts").value;return h({linkAccountSessionCreatorClientSecret:r.clientSecret,linkAccountSessionCreatorType:"link_account_session",controller:e,checkoutPriceAmount:{amount:null,currency:null},email:null,linkMobilePhone:null,linkMobilePhoneCountry:null,useContinueButtonOnSuccess:!1,onEvent:r.onEvent}).then((function(e){return"error"in e?e:{financialConnectionsSession:e.financialConnectionsSession}}))},P=function(e,t,n){var r=n.consumerInfo,i=(0,o.Z)(n,w),a=(0,c.Gu)(g(t),i,"stripe.collectFinancialConnectionsAccounts").value;return e.action.createSharedSessionContext("frame_to_frame").then((function(t){return h({linkAccountSessionCreatorClientSecret:a.clientSecret,linkAccountSessionCreatorType:"link_account_session",controller:e,checkoutPriceAmount:{amount:null,currency:null},email:null,linkMobilePhone:null,linkMobilePhoneCountry:null,useContinueButtonOnSuccess:!1,onEvent:a.onEvent,sharedSessionContext:t,linkAccountSessionCreationParams:{hosted_surface:l.LJ.LinkApp},hasExistingConsumerSession:!0,onFrameLoad:function(e){e.send({action:"financial-connections-consumer-info",payload:{publishable_key:r.publishableKey,consumer_session:{email_address:r.emailAddress,redacted_formatted_phone_number:r.redactedFormattedPhoneNumber,redacted_phone_number:r.redactedFormattedPhoneNumber,verification_sessions:[],support_payment_details_types:[]},experiments:[],settings:{},redacted_payment_details:[],shipping_addresses:[]}})}}).then((function(e){return"error"in e?e:{financialConnectionsSession:e.financialConnectionsSession}}))}))},C=function(e,t,n,r,o,i,a,c,s,u,d,p,m,f,h,y){return _({linkAccountSessionCreatorClientSecret:t,linkAccountSessionCreatorType:n?"link_payment_intent":"link_deferred_intent",linkAccountSessionCreatorId:(0,l.Wg)(n,null==m?void 0:m.elementsSessionId),controller:r,linkAccountSessionCreationParams:{initial_institution:e,hosted_surface:h},sharedSessionContext:o,groupId:i,checkoutPriceAmount:a,email:c,linkMobilePhone:s,linkMobilePhoneCountry:u,useContinueButtonOnSuccess:!1,instantDebitsIncentive:d,incentiveEligibilitySession:n,businessName:p,hasExistingConsumerSession:f,merchantToken:y})},E=function(e,t,n,r,o){return _({linkAccountSessionCreatorClientSecret:e,linkAccountSessionCreatorType:"payment_intent",linkAccountSessionCreatorId:t,controller:n,linkAccountSessionCreationParams:{payment_method_data:r},checkoutPriceAmount:{amount:null,currency:null},email:null,linkMobilePhone:null,linkMobilePhoneCountry:null,useContinueButtonOnSuccess:!1,onEvent:o})},A=function(e,t,n,r,o){return _({linkAccountSessionCreatorClientSecret:e,linkAccountSessionCreatorType:"setup_intent",linkAccountSessionCreatorId:t,controller:n,linkAccountSessionCreationParams:{payment_method_data:r},checkoutPriceAmount:{amount:null,currency:null},email:null,linkMobilePhone:null,linkMobilePhoneCountry:null,useContinueButtonOnSuccess:!1,onEvent:o})},N=function(e){var t=e.linkAccountSessionCreatorClientSecret,n=e.linkAccountSessionCreatorType,r=e.createdBy,o=e.controller,i=e.attachRequired,a=e.institution,c=e.data,s=e.email,u=e.linkMobilePhone,l=e.linkMobilePhoneCountry,d=e.manualEntryOnly,p=e.searchSession,m=e.instantDebitsIncentive,f=e.incentiveEligibilitySession,h=e.paymentMethodOptions,y=e.amount,v=e.onBehalfOf,g=e.merchantToken,b=e.hostedSurface,w=e.hasExistingConsumerSession,k=e.sharedSessionContext,S=e.groupId,P=e.onFrameLoad,C=e.stripeJsId,E=e.onEvent;return _({linkAccountSessionCreatorClientSecret:t,linkAccountSessionCreatorType:n,linkAccountSessionCreatorId:r,controller:o,onFrameLoad:P,linkAccountSessionCreationParams:{attach_required:i,initial_institution:a,payment_method_data:c,manual_entry_only:d,search_session:p,payment_method_options:h,on_behalf_of:v,hosted_surface:b},checkoutPriceAmount:y||{amount:null,currency:null},email:null!=s?s:null,linkMobilePhone:null!=u?u:null,linkMobilePhoneCountry:null!=l?l:null,useContinueButtonOnSuccess:!0,instantDebitsIncentive:m,incentiveEligibilitySession:f,merchantToken:g,hasExistingConsumerSession:w,sharedSessionContext:k,groupId:S,stripeJsId:C,onEvent:E})}},7087:function(e,t,n){"use strict";n.d(t,{AK:function(){return P},UV:function(){return S}});var r=n(3324),o=n(5671),i=n(3144),a=n(1925),c=n(2808),s=n(6617),u=n(5558),l=n(7553),d=n(3852),p=n(2641),m=n(9333),f=n(6274).Promise,_="__privateStripeMetricsController",h="merchant",y="session",v="NA",g=function(e){return 42===e.length},b=function(e,t,n){return n?!e||!g(e)&&g(t)?t:e:(0,u.Vj)()},w=function(){function e(){var t,n,i=this,c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,o.Z)(this,e),this._controllerFrame=null,this._latencies=[],this._handleMessage=function(e){return function(t){var n=t.data,r=t.origin;if((0,s.Qg)(r)&&"string"==typeof n)try{var o=JSON.parse(n),a=o.originatingScript,c=o.payload;if("m2"===a){var u,l=c.guid,d=c.muid,p=c.sid;i._guid=l,i._muid=i._getID(h,d),i._sid=i._getID(y,p),e(),null===(u=i._onIdsUpdate)||void 0===u||u.call(i,i.ids())}}catch(e){}}};var g=null===(t=c.checkoutIds)||void 0===t?void 0:t.muid,b=null===(n=c.checkoutIds)||void 0===n?void 0:n.sid;if(this._guid=v,g&&"NA"!==g?(this._muid=g,this._doNotPersistMuid=!0):(this._muid=this._getID(h),this._doNotPersistMuid=!1),b&&"NA"!==b?(this._sid=b,this._doNotPersistSid=!0):(this._sid=this._getID(y),this._doNotPersistSid=!1),this._listenerRegistry=(0,d.E)(),this._idsPromise=new f((function(e){i._establishMessageChannel(e)})),this._id=(0,u.To)(_),l.Ye){var w=(0,m.Q)("delay_metrics_controller",c.stripeJsId),k=(0,r.Z)(w,2),S=(k[0],k[1]);"control"===S?this._controllerFrame=new p.Z({type:a.NC.METRICS_CONTROLLER,controllerId:this._id,listenerRegistry:this._listenerRegistry,autoload:!0,appParams:this._buildFrameQueryString()}):setTimeout((function(){i._controllerFrame=new p.Z({type:a.NC.METRICS_CONTROLLER,controllerId:i._id,listenerRegistry:i._listenerRegistry,autoload:!0,appParams:i._buildFrameQueryString()})}),5e3),this._startIntervalCheck(),setTimeout(this._testLatency.bind(this),2e3+500*Math.random())}}return(0,i.Z)(e,[{key:"ids",value:function(){return{guid:this._guid,muid:this._muid,sid:this._sid}}},{key:"idsPromise",value:function(){var e=this;return this._idsPromise.then((function(){return e.ids()}))}},{key:"_establishMessageChannel",value:function(e){if(!l.Ye)return this._guid=(0,u.Vj)(),void e();this._listenerRegistry.addEventListener(window,"message",this._handleMessage(e))}},{key:"_startIntervalCheck",value:function(){var e=this,t=window.location.href;setInterval((function(){var n=window.location.href;n!==t&&(e.send((function(e){return{action:"ping",payload:{sid:e.sid,muid:e.muid,title:document.title,referrer:document.referrer,url:document.location.href,version:6}}})),t=n)}),5e3)}},{key:"report",value:function(e,t){this.send((function(n){return{action:"track",payload:{sid:n.sid,muid:n.muid,url:document.location.href,source:e,data:t,version:6}}}))}},{key:"send",value:function(e){var t=this;this._idsPromise.then((function(){try{t._controllerFrame&&t._controllerFrame.send(e(t.ids()))}catch(e){}}))}},{key:"_testLatency",value:function(){var e=this,t=new Date;this._listenerRegistry.addEventListener(document,"mousemove",(function n(){try{var r=new Date;e._latencies.push(r-t),e._latencies.length>=10&&(e.report("mouse-timings-10",e._latencies),e._listenerRegistry.removeEventListener(document,"mousemove",n)),t=r}catch(e){}}))}},{key:"_extractMetaReferrerPolicy",value:function(){var e=document.querySelector("meta[name=referrer]");return null!=e&&e instanceof HTMLMetaElement?e.content.toLowerCase():null}},{key:"_extractUrl",value:function(e){var t=document.location.href;switch(e){case"origin":case"strict-origin":case"origin-when-cross-origin":case"strict-origin-when-cross-origin":return document.location.origin;case"unsafe-url":return t.split("#")[0];default:return t}}},{key:"_buildFrameQueryString",value:function(){var e=this._extractMetaReferrerPolicy(),t=this._extractUrl(e),n={url:t,title:document.title,referrer:document.referrer,muid:this._muid,sid:this._sid,version:6,preview:(0,s.Qg)(t)};return null!=e&&(n.metaReferrerPolicy=e),Object.keys(n).map((function(e){return null!=n[e]?"".concat(e,"=").concat(encodeURIComponent(n[e].toString())):null})).join("&")}},{key:"_getID",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v;switch(e){case h:if(this._doNotPersistMuid)return b(this._muid,t,l.Ye);try{var n="__stripe_mid",r=b((0,c.e)(n),t,l.Ye);return g(r)&&(0,c.d)({name:n,value:r,domain:".".concat(document.location.hostname),protocol:document.location.protocol,sameSite:"Strict"}),r}catch(e){return v}case y:if(this._doNotPersistSid)return b(this._sid,t,l.Ye);try{var o="__stripe_sid",i=b((0,c.e)(o),t,l.Ye);return g(i)&&(0,c.d)({name:o,value:i,domain:".".concat(document.location.hostname),protocol:document.location.protocol,sameSite:"Strict",expiresIn:18e5}),i}catch(e){return v}default:throw new Error("Invalid ID type specified: ".concat(e))}}}]),e}(),k=null,S=function(){return k},P=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return k=new w(e)}},9706:function(e,t,n){"use strict";var r=n(7087),o=!1;t.Z=function(){var e=(0,r.UV)();e&&(o||(o=!0,e.send((function(e){return{action:"ping",payload:{v2:2,sid:e.sid,muid:e.muid,title:document.title,referrer:document.referrer,url:document.location.href,version:6}}})),e.send((function(t){return{action:"track",payload:{sid:t.sid,muid:t.muid,url:document.location.href,source:"mouse-timings-10-v2",data:e._latencies,version:6}}}))))}},7710:function(e,t,n){"use strict";n.d(t,{Z:function(){return wt}});var r,o,i,a=n(4942),c=n(5987),s=n(1413),u=n(3144),l=n(5671),d=n(136),p=n(9388),m=n(1873),f=n(2024),_=n(3550),h=n(8812),y=n(3333),v=function(){return(y.Wt||y.j3)&&(0,y.gG)()},g=(n(7294),function(e){return e.PaymentSurfaceRendered="payment_surface_rendered",e.LinkRendered="link_rendered",e.LinkServerSideEnablement="link_server_side_enablement",e.LinkLookupSuccessful="link_lookup_successful",e.LinkAccountCreationSuccessful="link_account_creation_success",e.LinkInteraction="link_interaction",e.LinkPaymentMethodSelected="link_payment_method_selected",e.LinkCheckoutConfirmationAttempted="link_checkout_confirmation_attempted",e.NonLinkCheckoutConfirmationAttempted="non_link_checkout_confirmation_attempted",e.LinkCheckoutConfirmationSucceeded="link_checkout_confirmation_succeeded",e.NonLinkCheckoutConfirmationSucceeded="non_link_checkout_confirmation_succeeded",e.LinkCheckoutConfirmationError="link_checkout_confirmation_error",e.NonLinkCheckoutConfirmationError="non_link_checkout_confirmation_error",e.Authentication="authentication",e.AuthenticationError="authentication_error",e.Fatal="fatal",e}({})),b=function(e){return e.Checkout="checkout",e.EmbeddedCheckout="embedded-checkout",e.HostedInvoicePage="hosted-invoice-page",e.CardElement="card-element",e.SplitCardElement="split-card-element",e.LinkAuthenticationElement="link-authentication-element",e.PaymentElement="payment-element",e.PaymentRequestButtonElement="payment-request-button-element",e.ExpressCheckoutElement="express-checkout-element",e.MobileElement="mobile-element",e.GlobalElements="global-elements",e}({}),w=n(942),k=n(8547),S=n(4505),P=n(9062),C=n(5558),E={applePay:"applePay",googlePay:"googlePay",browserCard:"browserCard",link:"link"},A=function(e,t){return e.indexOf(t)>=0},N=function(){return Object.keys(E)},T=n(1743),I=n(1765),R=n(8229),M=(0,m.mC)({amount:m.MZ,label:m.Z_,pending:(0,m.jt)(m.Xg)}),O=(0,m.mC)({amount:m.Bi,label:m.Z_,pending:(0,m.jt)(m.Xg)}),x=(0,m.mC)({isEligible:m.Xg,type:m.kw.apply(void 0,(0,P.Z)(R.mY))}),Z=(0,m.mC)({amount:m.Bi,label:m.Z_,pending:(0,m.jt)(m.Xg),id:(0,m.Wc)(m.Z_,(function(){return(0,C.To)("shippingOption")})),detail:(0,m.Wc)(m.Z_,(function(){return""}))}),j=(0,m.mC)({major:m.Rx,minor:m.Rx}),L=m.kw.apply(void 0,(0,P.Z)(Object.keys(T.Uz))),B=(0,m.mC)({origin:m.Z_,name:m.Z_,accountId:(0,m.jt)(m.Z_),applePayIdentifierAccount:(0,m.jt)(m.Z_)}),D=(0,m.mC)({amount:m.Bi,label:m.Z_,pending:(0,m.jt)(m.Xg),recurringPaymentStartDate:(0,m.jt)(m.Kr),recurringPaymentEndDate:(0,m.jt)(m.Kr),recurringPaymentIntervalCount:(0,m.jt)(m.Rx),recurringPaymentIntervalUnit:(0,m.jt)((0,m.kw)("year","month","day","hour","minute"))}),q=Object.freeze({paymentDescription:m.Z_,managementURL:m.Z_,automaticReloadBilling:(0,m.mC)({amount:m.MZ,label:m.Z_,automaticReloadPaymentThresholdAmount:m.MZ})}),F=(0,m.ci)(q),U=(0,m.mC)({paymentDescription:m.Z_,managementURL:m.Z_,deferredBilling:(0,m.mC)({amount:m.MZ,label:m.Z_,deferredPaymentDate:m.Kr}),freeCancellationDate:(0,m.jt)(m.Kr),freeCancellationDateTimeZone:(0,m.jt)(m.Z_),billingAgreement:(0,m.jt)(m.Z_)}),G=Object.freeze({paymentDescription:m.Z_,managementURL:m.Z_,regularBilling:D,trialBilling:(0,m.jt)(D),billingAgreement:(0,m.jt)(m.Z_)}),z=(0,m.ci)(G),H=Object.keys(T.yv),K=(0,m.jt)(m.kw.apply(void 0,H)),Y=(0,m.mC)({automaticReloadPaymentRequest:(0,m.jt)(F),deferredPaymentRequest:(0,m.jt)(U),recurringPaymentRequest:(0,m.jt)(z)}),W=(0,m.mC)({automaticReloadPaymentRequest:(0,m.jt)((0,m.AG)((0,m.mC)((0,s.Z)((0,s.Z)({},q),{},{billingAgreement:(0,m.jt)(m.Z_)})))),deferredPaymentRequest:(0,m.jt)((0,m.AG)(U)),recurringPaymentRequest:(0,m.jt)((0,m.AG)((0,m.mC)((0,s.Z)((0,s.Z)({},G),{},{billingAgreement:(0,m.jt)(m.Z_)})))),applePayLaterAvailability:K}),V=(0,m.ci)({__merchantDetails:(0,m.jt)(B),__supportsCouponCode:(0,m.jt)(m.Xg),__couponCode:(0,m.jt)(m.Z_),__billingDetailsEmailOverride:(0,m.jt)(m.Z_),applePay:(0,m.jt)(W),country:(0,m.jt)(m.hN),currency:(0,m.jt)(m.cV),displayItems:(0,m.jt)((0,m.CT)(O)),shippingOptions:(0,m.jt)((0,m.uw)("id")((0,m.CT)(Z))),total:(0,m.jt)(M),blockedCardBrands:(0,m.jt)((0,m.CT)(m.kw.apply(void 0,(0,P.Z)(w.iw)))),capabilityEnabledCardNetworks:(0,m.jt)((0,m.CT)(m.kw.apply(void 0,(0,P.Z)(w.P4)))),isConnectPlatform:(0,m.jt)(m.Xg)}),X=Object.keys(T.kB),Q=(0,m.mC)({displayItems:(0,m.jt)((0,m.CT)(O)),shippingOptions:(0,m.jt)((0,m.uw)("id")((0,m.CT)(Z))),total:(0,m.jt)(M),status:function(e,t,n){if(-1!==X.indexOf(e))return m.kw.apply(void 0,X)(e,t,n);var r=Object.keys(T.aH).filter((function(e){return-1===X.indexOf(e)}));return m.kw.apply(void 0,(0,P.Z)(r))(-1!==["invalid_payer_name","invalid_payer_email","invalid_payer_phone"].indexOf(e)?"fail":e,t,n)},errorMessage:(0,m.jt)(m.Z_),applePay:(0,m.jt)(Y)}),J=function(e,t,n){if(-1!==X.indexOf(e))return m.kw.apply(void 0,X)(e,t,n);var r=Object.keys(T.qp).filter((function(e){return-1===X.indexOf(e)}));return m.kw.apply(void 0,(0,P.Z)(r))(e,t,n)},$=function(e){var t=[];return window.ApplePaySession?(A(e,E.applePay)&&t.push("APPLE_PAY"),A(e,E.link)&&t.push("LINK"),t):(A(e,E.link)&&t.push("LINK"),A(e,E.googlePay)&&(t.push("GOOGLE_PAY"),y.sV&&t.push("BROWSER")),A(e,E.browserCard)&&-1===t.indexOf("BROWSER")&&t.push("BROWSER"),t)},ee=n(3324),te=n(2920),ne=n(7934),re=n(6241),oe=function(e,t){return{amount:(0,re.Fe)(e.amount,t.currency,"apple"),label:e.label,type:e.pending?"pending":"final"}},ie=function(e,t){return(0,s.Z)((0,s.Z)({},oe(e,t)),{},{automaticReloadPaymentThresholdAmount:(0,re.Fe)(e.automaticReloadPaymentThresholdAmount,t.currency,"apple"),paymentTiming:"automaticReload"})},ae=function(e,t){var n;return(0,s.Z)((0,s.Z)({},oe(e,t)),{},{deferredPaymentDate:null===(n=e.deferredPaymentDate)||void 0===n?void 0:n.toISOString(),paymentTiming:"deferred"})},ce=function(e,t){var n,r;return(0,s.Z)((0,s.Z)({},oe(e,t)),{},{recurringPaymentStartDate:null===(n=e.recurringPaymentStartDate)||void 0===n?void 0:n.toISOString(),recurringPaymentEndDate:null===(r=e.recurringPaymentEndDate)||void 0===r?void 0:r.toISOString(),recurringPaymentIntervalUnit:e.recurringPaymentIntervalUnit,recurringPaymentIntervalCount:e.recurringPaymentIntervalCount,paymentTiming:"recurring"})},se=function(e,t,n){return new window.ApplePayError(e,t,n)},ue=function(e){return function(t){return t[e]&&"string"==typeof t[e]?t[e].toUpperCase():null}},le=(r={},(0,a.Z)(r,T.qp.success,0),(0,a.Z)(r,T.qp.fail,1),(0,a.Z)(r,T.qp.invalid_payer_name,2),(0,a.Z)(r,T.qp.invalid_shipping_address,3),(0,a.Z)(r,T.qp.invalid_payer_phone,4),(0,a.Z)(r,T.qp.invalid_payer_email,4),(0,a.Z)(r,T.qp.invalid_coupon_code,1),(0,a.Z)(r,T.qp.expired_coupon_code,1),(0,a.Z)(r,T.qp.invalid_payer_zip,2),r),de=(o={},(0,a.Z)(o,T.qp.success,(function(){return null})),(0,a.Z)(o,T.qp.fail,(function(){return null})),(0,a.Z)(o,T.qp.invalid_payer_name,(function(){return se("billingContactInvalid","name")})),(0,a.Z)(o,T.qp.invalid_shipping_address,(function(){return se("shippingContactInvalid","postalAddress")})),(0,a.Z)(o,T.qp.invalid_payer_phone,(function(){return se("shippingContactInvalid","phoneNumber")})),(0,a.Z)(o,T.qp.invalid_payer_email,(function(e){return se("shippingContactInvalid","emailAddress",e)})),(0,a.Z)(o,T.qp.invalid_payer_zip,(function(e){return se("billingContactInvalid","postalCode",e)})),(0,a.Z)(o,T.qp.invalid_coupon_code,(function(e){return se((0,te.VC)(12)?"couponCodeInvalid":"unknown",void 0,e)})),(0,a.Z)(o,T.qp.expired_coupon_code,(function(e){return se((0,te.VC)(12)?"couponCodeInvalid":"unknown",void 0,e)})),o),pe=(i={},(0,a.Z)(i,T.Uz.pickup,"storePickup"),(0,a.Z)(i,T.Uz.shipping,"shipping"),(0,a.Z)(i,T.Uz.delivery,"delivery"),i),me={total:function(e){return oe(e.total,e)},lineItems:function(e){return e.displayItems?e.displayItems.map((function(t){return oe(t,e)})):[]},shippingMethods:function(e){return e.shippingOptions?e.shippingOptions.map((function(t){return function(e,t){return{amount:(0,re.Fe)(e.amount,t.currency,"apple"),label:e.label,detail:e.detail,identifier:e.id}}(t,e)})):[]},applicationData:function(e){return e.applicationData||null},supportsCouponCode:function(e){return e.__supportsCouponCode||!1},couponCode:function(e){return e.__supportsCouponCode?e.__couponCode:""},applePayLaterAvailability:function(e){var t,n;return"auto"===(null===(t=e.applePay)||void 0===t?void 0:t.applePayLaterAvailability)?"available":null===(n=e.applePay)||void 0===n?void 0:n.applePayLaterAvailability},automaticReloadPaymentRequest:function(e){var t,n;return null!==(t=e.applePay)&&void 0!==t&&t.automaticReloadPaymentRequest?function(e,t){return(0,s.Z)((0,s.Z)({},e),{},{tokenNotificationURL:t.tokenNotificationURL,automaticReloadBilling:ie(e.automaticReloadBilling,t)})}(null===(n=e.applePay)||void 0===n?void 0:n.automaticReloadPaymentRequest,e):null},deferredPaymentRequest:function(e){var t,n;return null!==(t=e.applePay)&&void 0!==t&&t.deferredPaymentRequest?function(e,t){var n;return(0,s.Z)((0,s.Z)({},e),{},{tokenNotificationURL:t.tokenNotificationURL,deferredBilling:ae(e.deferredBilling,t),freeCancellationDate:null===(n=e.freeCancellationDate)||void 0===n?void 0:n.toISOString()})}(null===(n=e.applePay)||void 0===n?void 0:n.deferredPaymentRequest,e):null},recurringPaymentRequest:function(e){var t,n;return null!==(t=e.applePay)&&void 0!==t&&t.recurringPaymentRequest?function(e,t){return(0,s.Z)((0,s.Z)({},e),{},{tokenNotificationURL:t.tokenNotificationURL,regularBilling:ce(e.regularBilling,t),trialBilling:e.trialBilling?ce(e.trialBilling,t):void 0})}(null===(n=e.applePay)||void 0===n?void 0:n.recurringPaymentRequest,e):null}},fe={shippingType:function(e){var t=e.shippingType;if(!t)return null;var n=pe[t];if(void 0!==n)return n;throw new h.No("Invalid value for shippingType: ".concat(t))},requiredBillingContactFields:function(e){return e.requestPayerName?["postalAddress"]:null},requiredShippingContactFields:function(e){var t=[];return e.requestShipping&&t.push("postalAddress"),e.requestPayerEmail&&t.push("email"),e.requestPayerPhone&&t.push("phone"),t.length?t:null},countryCode:ue("country"),currencyCode:ue("currency"),merchantCapabilities:function(e){var t=e.merchantCapabilities||T.WN.merchantCapabilities;return e.__betas&&((0,I.uN)(e.__betas,"cup_apple_pay_beta_1")||(0,I.uN)(e.__betas,"interac_apple_pay_beta_1")&&"cad"===e.currency)&&t.push("supportsEMV"),t},supportedNetworks:function(e){var t=(0,ne.RO)(e.country,e.jcbEnabled||!1,e.blockedCardBrands||[],e.capabilityEnabledCardNetworks||[],e.currency,e.isConnectPlatform);return(0,te.VC)(4)&&-1===(e.blockedCardBrands||[]).indexOf("mastercard")&&t.push("maestro"),e.__betas&&(0,I.uN)(e.__betas,"cup_apple_pay_beta_1")&&-1===(e.blockedCardBrands||[]).indexOf("unionpay")&&t.push("chinaUnionPay"),e.__betas&&(0,I.uN)(e.__betas,"interac_apple_pay_beta_1")&&"cad"===e.currency&&t.unshift("interac"),(0,te.VC)(4)&&e.__betas&&(0,I.uN)(e.__betas,"cartes_bancaires_apple_pay_beta_1")&&"eur"===e.currency&&-1===t.indexOf("cartesBancaires")&&t.unshift("cartesBancaires"),t}},_e={status:function(e){var t=le[e.status];return(0,te.VC)(3)&&t>1?1:t},error:function(e){return(0,te.VC)(3)?de[e.status](e.errorMessage):null}},he=(0,s.Z)((0,s.Z)({},me),fe),ye=(0,s.Z)((0,s.Z)({},me),_e),ve=function(e){return Object.keys(ye).reduce((function(t,n){var r=(0,ye[n])(e);return null!==r?(0,s.Z)((0,s.Z)({},t),{},(0,a.Z)({},n,r)):t}),{})},ge=function(e){return"string"==typeof e?e:null},be=function(e){return e?ge(e.phoneNumber):null},we=function(e){return e?ge(e.emailAddress):null},ke=function(e){return e?[e.givenName,e.familyName].filter((function(e){return e&&"string"==typeof e})).join(" "):null},Se=function(e){var t=e.addressLines,n=e.countryCode,r=e.postalCode,o=e.administrativeArea,i=e.locality,a=e.phoneNumber,c=ge(n);return{addressLine:Array.isArray(t)?t.reduce((function(e,t){return"string"==typeof t?[].concat((0,P.Z)(e),[t]):e}),[]):[],country:c?c.toUpperCase():"",postalCode:ge(r)||"",recipient:ke(e)||"",region:ge(o)||"",city:ge(i)||"",phone:ge(a)||"",sortingCode:"",dependentLocality:"",organization:""}},Pe=function(e,t){var n=e.identifier,r=e.label;return t.filter((function(e){return e.id===n&&e.label===r}))[0]},Ce=function(e,t){var n=e.shippingContact,r=e.shippingMethod,o=e.billingContact;return{shippingOption:r&&t.shippingOptions&&t.shippingOptions.length?Pe(r,t.shippingOptions):null,shippingAddress:n?Se(n):null,payerEmail:we(n),payerPhone:be(n),payerName:ke(o),walletName:"applePay",methodName:"apple-pay"}},Ee=n(9620),Ae=n(7703),Ne=n(3234),Te=n(6274).Promise,Ie=function(e,t){return e&&"object"==typeof e?t(e):null},Re=function(e,t){var n,r,o;null!=e&&e.applePay&&(null===(null===(n=t.applePay)||void 0===n?void 0:n.recurringPaymentRequest)&&(e.applePay.recurringPaymentRequest=void 0,t.applePay.recurringPaymentRequest=void 0),null===(null===(r=t.applePay)||void 0===r?void 0:r.deferredPaymentRequest)&&(e.applePay.deferredPaymentRequest=void 0,t.applePay.deferredPaymentRequest=void 0),null===(null===(o=t.applePay)||void 0===o?void 0:o.automaticReloadPaymentRequest)&&(e.applePay.automaticReloadPaymentRequest=void 0,t.applePay.automaticReloadPaymentRequest=void 0));return(0,f.PM)(e,t)},Me=function(e){var t,n,r;return 0===e.total.amount&&0===(null===(t=e.applePay)||void 0===t||null===(n=t.recurringPaymentRequest)||void 0===n||null===(r=n.trialBilling)||void 0===r?void 0:r.amount)?(0,s.Z)((0,s.Z)({},e),{},{total:(0,s.Z)((0,s.Z)({},e.total),{},{pending:!1})}):e},Oe=function(){function e(t){var n=this;(0,l.Z)(this,e),this._wasCompleted=!1,this._onEvent=function(){},this._paymentRequestTypeUsed=null,this._billingAgreements={default:""},this.setEventHandler=function(e){n._onEvent=e},this.canMakePayment=function(){var e,t,r,o,i=n._controller.action.retrieveWalletConfigAvailability({wallet:"apple_pay",isCheckout:!!n._initialPaymentRequest.__isCheckout,isHostedInvoicePage:!!n._initialPaymentRequest.__isHostedInvoicePage,isPaymentElement:!!n._initialPaymentRequest.__isPaymentElement,onBehalfOf:n._initialPaymentRequest.onBehalfOf,amount:n._initialPaymentRequest.total.amount,currency:n._initialPaymentRequest.currency}),a=n._controller.action.retrieveWalletConfigAvailability({wallet:"apple_pay_later",isCheckout:!!n._initialPaymentRequest.__isCheckout,isHostedInvoicePage:!!n._initialPaymentRequest.__isHostedInvoicePage,isPaymentElement:!!n._initialPaymentRequest.__isPaymentElement,onBehalfOf:n._initialPaymentRequest.onBehalfOf,amount:n._initialPaymentRequest.total.amount,currency:n._initialPaymentRequest.currency}),c=Boolean(n._authentication.accountId||(null===(e=n._initialPaymentRequest.__merchantDetails)||void 0===e?void 0:e.applePayIdentifierAccount)),s=(0,te.Qt)(window.location.hostname,n._authentication.accountId||(null===(t=n._initialPaymentRequest.__merchantDetails)||void 0===t?void 0:t.applePayIdentifierAccount)||null,(0,Ee.lO)(n._authentication.apiKey)===Ee.Kl.test,n._report,n._minimumVersion,!y.QH||!c);(0,Ae.Mt)()&&(r=null!==(o=n._initialPaymentRequest.__merchantDetails)&&void 0!==o&&o.name?n._controller.action.unsafeLocalizeString({message:"upe.mandates.card",data:{businessName:n._initialPaymentRequest.__merchantDetails.name}}):n._controller.action.unsafeLocalizeString({message:"upe.mandates.cardNoBusinessName",data:null}));var u=n._getWalletConfig();return Te.all([i,s,a,r,u]).then((function(e){var t=(0,ee.Z)(e,5),r=t[0],o=t[1],i=t[2],a=t[3],c=t[4];n._billingAgreements.default=null!=a?a:"";var s={};i.availability||(s.applePayLaterAvailability=T.yv.unavailableItemIneligible);var u=n._paymentRequestOptions.tokenNotificationURL;return n._initialPaymentRequest=Me((0,f.PM)(n._paymentRequestOptions,{tokenNotificationURL:u||r.tokenNotificationURL,applePay:s,capabilityEnabledCardNetworks:null==c?void 0:c.capability_enabled_card_networks,isConnectPlatform:null==c?void 0:c.is_connect_platform})),n._initializeSessionState(),{available:r.availability&&o}}))},this.update=function(e){n._initialPaymentRequest=Me(Re(n._paymentRequestOptions,e)),n._initializeSessionState()},this.show=function(){var e,t,r;n._wasCompleted&&n._report("pr.show_called_after_completion"),n._initializeSessionState(),n._setAndLoadBillingAgreements({isUpdate:!1});try{e=new window.ApplePaySession(n._minimumVersion,(t=n._paymentRequestOptions,r=(0,s.Z)((0,s.Z)({},T.WN),t),Object.keys(he).reduce((function(e,t){var n=(0,he[t])(r);return null!==n?(0,s.Z)((0,s.Z)({},e),{},(0,a.Z)({},t,n)):e}),{})))}catch(e){throw"Must create a new ApplePaySession from a user gesture handler."===e.message?new h.No("The code that shows the Apple Pay payment sheet must be invoked directly by a user activation event, like a click or a touch gesture. To prevent this error make sure the code that shows the payment sheet is at or near the top of your user gesture event handler, before any async or long-running code."):e}n._privateSession=e,n._setupSession(e,n._usesButtonElement()),e.begin(),n._isShowing=!0},this.abort=function(){n._privateSession&&n._privateSession.abort()},this._warn=function(){},this._report=function(e,t){n._controller.report(e,(0,s.Z)((0,s.Z)({},t),{},{backingLibrary:"APPLE_PAY",usesButtonElement:n._usesButtonElement()}))},this._setAndLoadBillingAgreements=function(e){var t=e.isUpdate;if(void 0!==n._paymentRequestOptions.applePay){var r=n._paymentRequestOptions.applePay;n._fillDefaultBillingAgreement(r),t?n._loadCurrentBillingAgreement(r):(n._savePaymentRequestTypeUsed(r),n._saveCurrentBillingAgreement(r))}},this._validateMerchant=function(e,t){return function(r){n._controller.action.createApplePaySession({data:{validation_url:r.validationURL,domain_name:(0,Ne.A)(n._report),display_name:n._paymentRequestOptions.total.label},usesButtonElement:t,paymentRequestType:n._paymentRequestTypeUsed}).then((function(t){if(n._isShowing)switch(t.type){case"object":e.completeMerchantValidation(JSON.parse(t.object.session));break;case"error":n._handleValidationError(e)(t.error);break;default:(0,m.Rz)(t)}}),n._handleValidationError(e))}},this._handleValidationError=function(e){return function(t){n._report("error.pr.apple_pay.session_creation_failed",{error:t}),e.abort(),n._onEvent({type:"__private_do_not_use_error",payload:{error:{code:"apple_pay.session_creation_failed"}}});var r=t.message;"string"==typeof r&&n._controller.warn(r)}},this._paymentAuthorized=function(e){return function(t){var r=t.payment,o=n._usesButtonElement()?w.Yj.paymentRequestButton:null;n._controller.action.tokenizeWithData({type:"apple_pay",elementName:o,tokenData:(0,s.Z)((0,s.Z)({},r),{},{billingContact:Ie(r.billingContact,n._normalizeContact)}),mids:n._controller.mids()}).then((function(t){if("error"===t.type)(0,te.VC)(14)?e.abort():e.completePayment(window.ApplePaySession.STATUS_FAILURE),n._report("error.pr.create_token_failed",{error:t.error}),n._onEvent({type:"__private_do_not_use_error",payload:{error:t.error}});else{var o=Ie(r.shippingContact,n._normalizeContact),i=Ie(r.billingContact,n._normalizeContact);o&&n._paymentRequestOptions.requestShipping&&!o.countryCode&&e.completePayment(window.ApplePaySession.STATUS_INVALID_SHIPPING_POSTAL_ADDRESS);var a=Ce({shippingContact:o,billingContact:i},n._paymentRequestOptions);n._onToken(e)((0,s.Z)((0,s.Z)({},a),{},{shippingOption:n._privateShippingOption,token:t.object}))}}))}},this._normalizeContact=function(e){return(0,Ae.Fq)(e,(function(){n._report("warn.pr.apple_pay.missing_country_code",{country:e.country})}))},this._onToken=function(e){return function(t){n._onEvent({type:"paymentresponse",payload:(0,s.Z)((0,s.Z)({},t),{},{complete:(0,S.TC)(n._completePayment(e))})})}},this._completePayment=function(e){return function(t,r){"success"===t&&(n._wasCompleted=!0),n._paymentRequestOptions=(0,f.PM)(n._paymentRequestOptions,{status:t,errorMessage:r});var o=ve(n._paymentRequestOptions),i=o.status,a=o.error;n._isShowing&&(a?e.completePayment({status:i,errors:[a]}):i!==window.ApplePaySession.STATUS_FAILURE?e.completePayment(i):(0,te.VC)(14)?e.abort():e.completePayment(i)),(0===i||1===i&&null==a)&&(n._isShowing=!1,n._onEvent&&n._onEvent({type:"close"}))}},this._paymentMethodSelected=function(e){return function(t){n._onEvent({type:"__private_do_not_use_billingaddresschange",payload:{billingAddress:t.paymentMethod.billingContact?Se(n._normalizeContact(t.paymentMethod.billingContact)):{addressLine:[],country:"",postalCode:"",recipient:"",region:"",city:"",phone:"",sortingCode:"",dependentLocality:"",organization:""},updateWith:(0,S.TC)(n._completePaymentMethodSelection(e))}})}},this._shippingContactSelected=function(e){return function(t){n._onEvent({type:"shippingaddresschange",payload:{shippingAddress:Se(n._normalizeContact(t.shippingContact)),updateWith:(0,S.TC)(n._completeShippingContactSelection(e))}})}},this._completePaymentMethodSelection=function(e){return function(t){n._paymentRequestOptions=(0,f.PM)(n._paymentRequestOptions,t);var r=ve(n._paymentRequestOptions),o=r.total,i={newLineItems:r.lineItems,newTotal:o,newRecurringPaymentRequest:r.recurringPaymentRequest};e.completePaymentMethodSelection(i)}},this._completeShippingContactSelection=function(e){return function(t){var r,o=t.applePay;o&&n._validatePaymentRequestCreated(o),n._paymentRequestOptions=Re(n._paymentRequestOptions,t),null!==(r=n._paymentRequestOptions.shippingOptions)&&void 0!==r&&r.length&&(n._privateShippingOption=n._paymentRequestOptions.shippingOptions[0]),n._setAndLoadBillingAgreements({isUpdate:!0});var i=ve(n._paymentRequestOptions),a=i.status,c=i.shippingMethods,s=i.total,u=i.lineItems,l=i.error,d=i.recurringPaymentRequest,p=i.deferredPaymentRequest,m=i.automaticReloadPaymentRequest;if(l)e.completeShippingContactSelection({newTotal:s,newLineItems:u,newShippingMethods:c,newRecurringPaymentRequest:d,errors:[l]});else if((0,te.VC)(14)&&1===a){var f=se("shippingContactInvalid","postalAddress");e.completeShippingContactSelection({newTotal:s,newLineItems:u,newShippingMethods:c,newRecurringPaymentRequest:d,errors:[f]})}else(0,te.VC)(14)&&d?e.completeShippingContactSelection({newTotal:s,newLineItems:u,newShippingMethods:c,newRecurringPaymentRequest:d}):(0,te.VC)(15)&&p?e.completeShippingContactSelection({newTotal:s,newLineItems:u,newShippingMethods:c,newDeferredPaymentRequest:p}):(0,te.VC)(14)&&m?e.completeShippingContactSelection({newTotal:s,newLineItems:u,newShippingMethods:c,newAutomaticReloadPaymentRequest:m}):e.completeShippingContactSelection(a,c,s,u)}},this._shippingMethodSelected=function(e){return function(t){if(n._paymentRequestOptions.shippingOptions){var r=Pe(t.shippingMethod,n._paymentRequestOptions.shippingOptions);n._privateShippingOption=r,n._onEvent({type:"shippingoptionchange",payload:{shippingOption:r,updateWith:(0,S.TC)(n._completeShippingMethodSelection(e))}})}}},this._completeShippingMethodSelection=function(e){return function(t){var r=t.applePay;r&&n._validatePaymentRequestCreated(r),n._paymentRequestOptions=Re(n._paymentRequestOptions,t),n._setAndLoadBillingAgreements({isUpdate:!0});var o=ve(n._paymentRequestOptions),i=o.status,a=o.total,c=o.lineItems,s=o.recurringPaymentRequest,u=o.deferredPaymentRequest,l=o.automaticReloadPaymentRequest,d=o.error;(0,te.VC)(14)&&s?e.completeShippingMethodSelection({newTotal:a,newLineItems:c,errors:d&&1===i?[d]:void 0,newRecurringPaymentRequest:s}):(0,te.VC)(15)&&u?e.completeShippingMethodSelection({newTotal:a,newLineItems:c,errors:d&&1===i?[d]:void 0,newDeferredPaymentRequest:u}):(0,te.VC)(14)&&l?e.completeShippingMethodSelection({newTotal:a,newLineItems:c,errors:d&&1===i?[d]:void 0,newAutomaticReloadPaymentRequest:l}):e.completeShippingMethodSelection(i,a,c)}},this._couponCodeChanged=function(e){return function(t){var r=t.couponCode;n._onEvent({type:"__private_do_not_use_couponcodechange",payload:{couponCode:r,updateWith:(0,S.TC)(n._completeCouponCodeChange(e))}})}},this._completeCouponCodeChange=function(e){return function(t){n._paymentRequestOptions=(0,f.PM)(n._paymentRequestOptions,t);var r=ve(n._paymentRequestOptions),o=r.total,i=r.lineItems,a=r.error,c=r.recurringPaymentRequest;e.completeCouponCodeChange({newTotal:o,newLineItems:i,newRecurringPaymentRequest:c,errors:a?[a]:void 0})}},this._savePaymentRequestTypeUsed=function(e){e.automaticReloadPaymentRequest?n._paymentRequestTypeUsed="automaticReload":e.deferredPaymentRequest?n._paymentRequestTypeUsed="deferred":e.recurringPaymentRequest?n._paymentRequestTypeUsed="recurring":n._paymentRequestTypeUsed=null},this._saveCurrentBillingAgreement=function(e){var t,r;n._billingAgreements.automaticReload=null===(t=e.automaticReloadPaymentRequest)||void 0===t?void 0:t.billingAgreement,n._billingAgreements.recurring=null===(r=e.recurringPaymentRequest)||void 0===r?void 0:r.billingAgreement},this._loadCurrentBillingAgreement=function(e){var t=e.recurringPaymentRequest;t&&n._billingAgreements.recurring&&(t.billingAgreement=n._billingAgreements.recurring);var r=e.automaticReloadPaymentRequest;r&&n._billingAgreements.automaticReload&&(r.billingAgreement=n._billingAgreements.automaticReload)},this._getWalletConfig=function(){return n._controller.action.retrieveWalletConfig({onBehalfOf:n._initialPaymentRequest.onBehalfOf,amount:n._initialPaymentRequest.total.amount,currency:n._initialPaymentRequest.currency}).then((function(e){return"error"!==e.type?e.object:void 0}))};var r=t.controller,o=t.authentication,i=(t.mids,t.options),c=t.usesButtonElement,u=t.listenerRegistry;this._controller=r,this._authentication=o,this._minimumVersion=i.__minApplePayVersion||te.lU,this._usesButtonElement=c,this._listenerRegistry=u,this._initialPaymentRequest=Me(i),this._isShowing=!1,this._initializeSessionState(),this._controller._controllerFrame._on("stripe-user-credentials-update",(function(e){n._authentication={apiKey:e.publishableKey,accountId:e.stripeAccount},n._initializeSessionState()}))}return(0,u.Z)(e,[{key:"_initializeSessionState",value:function(){var e=btoa(this._authentication.accountId?"".concat(this._authentication.apiKey,":").concat(this._authentication.accountId):this._authentication.apiKey);this._paymentRequestOptions=(0,s.Z)((0,s.Z)((0,s.Z)({},T.WN),this._initialPaymentRequest),{},{status:T.qp.success,applicationData:e}),this._privateSession=null,this._privateShippingOption=null;var t=this._paymentRequestOptions.shippingOptions;null!=t&&t.length&&(this._privateShippingOption=t[0])}},{key:"_setupSession",value:function(e,t){var n=this;this._listenerRegistry.addEventListener(e,"validatemerchant",(0,S.TC)(this._validateMerchant(e,t))),this._listenerRegistry.addEventListener(e,"paymentauthorized",(0,S.TC)(this._paymentAuthorized(e))),this._listenerRegistry.addEventListener(e,"cancel",(0,S.TC)((function(){n._report("pr.apple_pay.cancel",{paymentRequestType:n._paymentRequestTypeUsed}),n._isShowing=!1,n._onEvent({type:"cancel"}),n._onEvent({type:"close"})}))),this._listenerRegistry.addEventListener(e,"paymentmethodselected",(0,S.TC)(this._paymentMethodSelected(e))),this._listenerRegistry.addEventListener(e,"shippingcontactselected",(0,S.TC)(this._shippingContactSelected(e))),this._listenerRegistry.addEventListener(e,"shippingmethodselected",(0,S.TC)(this._shippingMethodSelected(e))),this._listenerRegistry.addEventListener(e,"couponcodechanged",(0,S.TC)(this._couponCodeChanged(e)))}},{key:"_validatePaymentRequestCreated",value:function(e){if("recurring"!==this._paymentRequestTypeUsed&&null!=e&&e.recurringPaymentRequest)throw new h.No("You tried to change an applePay.recurringPaymentRequest without creating the object first. You must provide an applePay.recurringPaymentRequest object on `stripe.paymentRequest` in order to change it later.");if("automaticReload"!==this._paymentRequestTypeUsed&&null!=e&&e.automaticReloadPaymentRequest)throw new h.No("You tried to change an applePay.automaticReloadPaymentRequest without creating the object first. You must provide an applePay.automaticReloadPaymentRequest object on `stripe.paymentRequest` in order to change it later.");if("deferred"!==this._paymentRequestTypeUsed&&null!=e&&e.deferredPaymentRequest)throw new h.No("You tried to change an applePay.deferredPaymentRequest without creating the object first. You must provide an applePay.deferredPaymentRequest object on `stripe.paymentRequest` in order to change it later.")}},{key:"_fillDefaultBillingAgreement",value:function(e){if(this._billingAgreements.default&&(0,Ae.Mt)()){var t,n=e.automaticReloadPaymentRequest;if(n)null!==(t=n.billingAgreement)&&void 0!==t||(n.billingAgreement=this._billingAgreements.default);var r,o=e.recurringPaymentRequest;if(o)null!==(r=o.billingAgreement)&&void 0!==r||(o.billingAgreement=this._billingAgreements.default)}}}]),e}(),xe=Oe,Ze=n(1925),je=n(8731),Le=n(6274).Promise,Be=null;var De=function(e){return"https:"===window.location.protocol&&(!(!y.Wt&&!y.j3)&&(!y.Bh&&(!(!e.isCheckout&&!window.PaymentRequest)&&!(!e.isCheckout&&y.sV))))},qe=n(6274).Promise,Fe=(0,u.Z)((function e(t){var n=this;(0,l.Z)(this,e),this._mids=null,this._frame=null,this._initFrame=function(e){var t=n._controller.createHiddenFrame(Ze.NC.PAYMENT_REQUEST_GOOGLE_PAY,{authentication:n._authentication,mids:n._controller.mids(),origin:n._origin});t.send({action:"stripe-pr-initialize",payload:{data:e}}),n._initFrameEventHandlers(t),n._frame=t},this._initFrameEventHandlers=function(e){e._on("pr-cancel",(function(){n._onEvent({type:"cancel"})})),e._on("pr-close",(function(){n._backdrop.fadeOut().then((function(){n._backdrop.unmount()})),n._onEvent({type:"close"})})),e._on("pr-error",(function(e){n._onEvent({type:"error",payload:{errorMessage:e.errorMessage,errorCode:e.errorCode}})})),e._on("pr-exception",(function(e){n._onEvent({type:"__private_do_not_use_error",payload:e})})),e._on("pr-callback",(function(t){var r=t.event,o=t.options,i=t.nonce;switch(r){case"paymentresponse":n._handlePaymentResponse(e,o,i);break;case"shippingaddresschange":n._handleShippingAddressChange(e,o,i);break;case"shippingoptionchange":n._handleShippingOptionChange(e,o,i);break;default:throw new Error("Unexpected event name: ".concat(r))}}))},this._handlePaymentResponse=function(e,t,r){n._onEvent({type:"paymentresponse",payload:(0,s.Z)((0,s.Z)({},t),{},{complete:function(t){e.send({action:"stripe-pr-callback-complete",payload:{nonce:r,data:{status:t}}})}})})},this._handleShippingAddressChange=function(e,t,r){n._onEvent({type:"shippingaddresschange",payload:(0,s.Z)((0,s.Z)({},t),{},{updateWith:function(t){e.send({action:"stripe-pr-callback-complete",payload:{nonce:r,data:t}})}})})},this._handleShippingOptionChange=function(e,t,r){n._onEvent({type:"shippingoptionchange",payload:(0,s.Z)((0,s.Z)({},t),{},{updateWith:function(t){e.send({action:"stripe-pr-callback-complete",payload:{nonce:r,data:t}})}})})},this._destroy=function(){n._frame&&(n._frame.destroy(),n._frame=null)},this.setEventHandler=function(e){n._onEvent=e},this.canMakePayment=function(){if(!De({isCheckout:n._isCheckout}))return qe.resolve({available:!1});if(!n._frame)throw new Error("Frame not initialized.");var e,t=n._frame;return(e=function(){return t.action.checkCanMakePayment(void 0).then((function(e){return!0===e.available}))},null!==Be?Le.resolve(Be):e().then((function(e){return Be=e}))).then((function(e){return{available:e}}))},this.show=function(){n._frame&&(n._frame.send({delegate:"payment",action:"stripe-pr-show",payload:{data:{usesButtonElement:n._usesButtonElement(),stripeJsId:n._controller._stripeJsId,mids:n._controller.mids()}}}),n._backdrop.mount(),n._backdrop.show(),n._backdrop.fadeIn())},this.update=function(e){n._frame&&n._frame.send({action:"stripe-pr-update",payload:{data:e}})},this.abort=function(){n._frame&&n._frame.send({action:"stripe-pr-abort",payload:{}})},this._controller=t.controller,this._authentication=t.authentication,this._origin=t.origin,this._usesButtonElement=t.usesButtonElement,this._backdrop=new je.Z({lockScrolling:!1,lockFocus:!0,lockFocusOn:null,listenerRegistry:t.listenerRegistry}),this._isCheckout=!!t.options.__isCheckout,De({isCheckout:this._isCheckout})&&this._controller&&(this._controller.action.fetchLocale({locale:"auto"}),this._initFrame(t.options)),this._controller._controllerFrame._on("stripe-user-credentials-update",(function(e){n._authentication={apiKey:e.publishableKey,accountId:e.stripeAccount},n._frame&&n._frame.send({action:"stripe-pr-update",payload:{data:{__stripeUserCredentials:(0,s.Z)({},n._authentication)}}})}))})),Ue=n(6274).Promise,Ge=function(){if(!window.PaymentRequest)return null;if(/CriOS\/59/.test(navigator.userAgent))return null;if(/.*\(.*; wv\).*Chrome\/(?:53|54)\.\d.*/g.test(navigator.userAgent))return null;if(y.xz)return null;var e=window.PaymentRequest;return e.prototype.canMakePayment||(e.prototype.canMakePayment=function(){return Ue.resolve(!1)}),e}(),ze=n(6274).Promise,He=null,Ke=(0,u.Z)((function e(t){var n=this;(0,l.Z)(this,e),this._onEvent=function(){},this.setEventHandler=function(e){n._onEvent=e},this.canMakePayment=function(){return(e=n._prFrame,(0,Ee.lO)(n._authentication.apiKey),Ee.Kl.test,"https:"!==window.location.protocol?ze.resolve(!1):null!==He?ze.resolve(He):Ge&&e?e.action.checkCanMakePayment(void 0).then((function(e){var t=e.available;return He=!0===t})):ze.resolve(!1)).then((function(e){return{available:e}}));var e},this.update=function(e){var t=n._prFrame;t&&t.send({action:"stripe-pr-update",payload:{data:e}})},this.show=function(){if(!n._prFrame)throw new h.No("Payment Request is not available in this browser.");n._prFrame.send({delegate:"payment",action:"stripe-pr-show",payload:{data:{usesButtonElement:n._usesButtonElement(),stripeJsId:n._controller._stripeJsId,mids:n._controller.mids()}}})},this.abort=function(){n._prFrame&&n._prFrame.send({action:"stripe-pr-abort",payload:{}})},this._setupPrFrame=function(e,t){e.send({action:"stripe-pr-initialize",payload:{data:t}}),e._on("pr-cancel",(function(){n._onEvent({type:"cancel"})})),e._on("pr-close",(function(){n._onEvent({type:"close"})})),e._on("pr-error",(function(e){n._onEvent({type:"error",payload:{errorMessage:e.message||"",errorCode:e.code||""}})})),e._on("pr-callback",(function(t){var r=t.event,o=t.nonce,i=t.options;switch(r){case"token":n._onEvent({type:"paymentresponse",payload:(0,s.Z)((0,s.Z)({},i),{},{complete:function(t){e.send({action:"stripe-pr-callback-complete",payload:{data:{status:t},nonce:o}})}})});break;case"shippingaddresschange":n._onEvent({type:"shippingaddresschange",payload:{shippingAddress:i.shippingAddress,updateWith:function(t){e.send({action:"stripe-pr-callback-complete",payload:{nonce:o,data:t}})}}});break;case"shippingoptionchange":n._onEvent({type:"shippingoptionchange",payload:{shippingOption:i.shippingOption,updateWith:function(t){e.send({action:"stripe-pr-callback-complete",payload:{nonce:o,data:t}})}}});break;default:throw new Error("Unexpected event from PaymentRequest inner: ".concat(r))}}))};var r=t.authentication,o=t.controller,i=t.mids,a=t.origin,c=t.usesButtonElement,u=t.options;if(this._authentication=r,this._controller=o,this._usesButtonElement=c,Ge&&"https:"===window.location.protocol){this._controller.action.fetchLocale({locale:"auto"});var d=this._controller.createHiddenFrame(Ze.NC.PAYMENT_REQUEST_BROWSER,{authentication:r,mids:i,origin:a});this._setupPrFrame(d,u),this._prFrame=d}else this._prFrame=null;this._controller._controllerFrame._on("stripe-user-credentials-update",(function(e){n._authentication={apiKey:e.publishableKey,accountId:e.stripeAccount},n._prFrame&&n._prFrame.send({action:"stripe-pr-update",payload:{data:{__stripeUserCredentials:(0,s.Z)({},n._authentication)}}})}))})),Ye=n(4436),We=(m.Z_,(0,m.or)(m.Z_,(0,m.p3)(null)),(0,m.or)(m.Z_,(0,m.p3)(null)),(0,m.or)(m.Z_,(0,m.p3)(null)),(0,m.or)(m.Z_,(0,m.p3)(null)),{isMerchantEligibleForCBC:!1,stripePreferredNetworks:["cartes_bancaires"],supportedCobrandedNetworks:{cartes_bancaires:!1}}),Ve=function(e){return encodeURIComponent(btoa(function(e){var t=3-e.length%3,n=new Array(t+1).join(" ");return"".concat(e).concat(n)}(JSON.stringify(e))))},Xe=n(6617),Qe={PAY:"pay",SELECT:"select",SAVE:"save",MOBILE_PAY:"mobile_pay"},Je=(Object.keys(Qe).map((function(e){return Qe[e]})),n(6835)),$e=["eject_no_sensitive_data","get_initial_state_no_sensitive_data","link_prb_shipping_option_change_no_sensitive_data","log_out_in_elements_no_sensitive_data","link_popup_log_out_no_sensitive_data","ready_for_messages_no_sensitive_data","unload_no_sensitive_data","ping_no_sensitive_data","pong_no_sensitive_data"],et=[].concat($e,["link_prb_payment_data_no_sensitive_data","link_prb_shipping_address_change_no_sensitive_data"]),tt=function(e){return-1!==et.indexOf(e)},nt=n(1939),rt=n(6274).Promise,ot=function(e){var t=(0,Xe.P$)("https://js.stripe.com/v3/"),n=(0,Xe.P$)("https://checkout.link.com/");if(!t||!n)throw new Error("Could not validate origin due to a misconfigured environment.");return e!==t&&e!==n},it=function(){function e(t){var n=this;(0,l.Z)(this,e),this.messageQueue=[],this.isDisconnected=!1,this.runOnDisconnect=[],this.deferredDomainRegistrationResult=new Je.B,this.callbacks={},this.deferredMessageResponses={},this.onClose=function(){},this.onPingTiming=function(){},this.setDomainRegistrationResult=function(e){if(n.deferredDomainRegistrationResult.isResolved())throw new Error("Cannot set domain registration result multiple times");n.deferredDomainRegistrationResult.resolve(e)},this.on=function(e,t){var r;((r=n.callbacks)[e]||(r[e]=[])).push(t)},this.off=function(e,t){var r;n.callbacks[e]=null===(r=n.callbacks[e])||void 0===r?void 0:r.filter((function(e){return e!==t}))},this.send=function(){for(var e=arguments.length,t=new Array(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:{skipEnrollmentCheck:!1,useCheckoutAvailabilityCheck:!1},n=d._backingLibraries[e];if(!n){var r="Unexpectedly calling canMakePayment on uninitialized backing library ".concat(e);throw new Error(r)}var o=!0;return _t.race([new _t((function(e){return setTimeout(e,1e4)})).then((function(){return o&&d._report("pr.can_make_payment_timed_out"),{available:!1}})),n.canMakePayment({skipEnrollmentCheck:t.skipEnrollmentCheck,useCheckoutAvailabilityCheck:t.useCheckoutAvailabilityCheck,locale:d._locale})]).then((function(t){var n=t.available,r="LINK"===e&&t.linkExperimentAssignments?t.linkExperimentAssignments:null;return d._canMakePaymentAvailability=(0,s.Z)((0,s.Z)({},d._canMakePaymentAvailability),{},(0,a.Z)({},e,n)),o=!1,{backingLibraryName:e,available:n,linkExperimentAssignments:r}}))},d._isGooglePayOnAndroid=function(){var e=d._initialOptions.wallets,t=e&&-1===e.indexOf("googlePay"),n=!!d._canMakePaymentAvailability.BROWSER;return y.sV&&!t&&n},d._constructCanMakePaymentResponse=function(){var e=d._isGooglePayOnAndroid();return{applePay:!!d._canMakePaymentAvailability.APPLE_PAY,googlePay:!!d._canMakePaymentAvailability.GOOGLE_PAY||e,link:!!d._canMakePaymentAvailability.LINK}},d.canMakePayment=(0,S.TC)((function(){d._report("pr.can_make_payment");var e=!d._initialOptions.__isCheckout;if(d._canMakePaymentResolved){var t,n=null!==d._activeBackingLibrary?d._constructCanMakePaymentResponse():null;return d._report("pr.can_make_payment_response",{response:n,cached:!0,activeBackingLibrary:d._activeBackingLibrary,amount:null===(t=d._reportOnlyTotal)||void 0===t?void 0:t.amount,currency:d._reportOnlyCurrency}),_t.resolve(n)}if("https:"!==window.location.protocol)return gt||(d._controller.warn("If you are testing Apple Pay or Google Pay, you must serve this page over HTTPS as it will not work over HTTP. Please read https://stripe.com/docs/stripe-js/elements/payment-request-button#html-js-prerequisites for more details."),gt=!0),d._canMakePaymentResolved=!0,d._controller.deferredCanMakePaymentResponse.resolve(null),_t.resolve(null);var r=d._queryStrategy.map((function(e){return function(){return d._canMakePaymentForBackingLibrary(e)}})),o=[];if(-1!==d._queryStrategy.indexOf("LINK"))if(d._initialOptions.__linkOnly&&d._initialOptions.__isCheckout){r=[function(){return d._canMakePaymentForBackingLibrary("LINK",{skipEnrollmentCheck:!0,useCheckoutAvailabilityCheck:!0})}]}else[r,o].forEach((function(e){return e.push((function(){return d._canMakePaymentForBackingLibrary("LINK",{skipEnrollmentCheck:!0,useCheckoutAvailabilityCheck:!1})}))}));var i,a=new mt.E,c=(0,_.tN)(r,(function(e){var t=e.backingLibraryName,n=e.available;return n&&(d._activeBackingLibraryName=t,d._activeBackingLibrary=d._backingLibraries[t],d._buttonTypeName=d._activeBackingLibraryName,d._isGooglePayOnAndroid()&&(d._buttonTypeName="GOOGLE_PAY")),n})),s=e?(0,_.tN)(o,(function(e){return e.available})):null;if(e){var u=_t.all([c,s]);i=u.then((function(e){var t,n=new mt.E,r=e[0],o=e[1];d._canMakePaymentResolved=!0,"SATISFIED"===r.type&&-1!==["APPLE_PAY","GOOGLE_PAY","BROWSER"].indexOf(r.value.backingLibraryName)&&"SATISFIED"===(null==o?void 0:o.type)&&(d._secondaryActiveBackingLibraryName=o.value.backingLibraryName,d._secondaryActiveBackingLibrary=d._backingLibraries[o.value.backingLibraryName],d._secondaryButtonTypeName=d._secondaryActiveBackingLibraryName);var i=null;return"SATISFIED"===r.type&&(i=d._constructCanMakePaymentResponse()),d._report("pr.can_make_payment_response",{response:i,cached:!1,duration:a.getElapsedTime(n),activeBackingLibrary:d._activeBackingLibrary,amount:null===(t=d._reportOnlyTotal)||void 0===t?void 0:t.amount,currency:d._reportOnlyCurrency}),d._controller.deferredCanMakePaymentResponse.resolve(i),i}))}else{i=c.then((function(e){var t,n=new mt.E;d._canMakePaymentResolved=!0;var r=null;return"SATISFIED"===e.type&&(r=d._constructCanMakePaymentResponse()),d._report("pr.can_make_payment_response",{response:r,cached:!1,duration:a.getElapsedTime(n),activeBackingLibrary:d._activeBackingLibrary,amount:null===(t=d._reportOnlyTotal)||void 0===t?void 0:t.amount,currency:d._reportOnlyCurrency}),d._controller.deferredCanMakePaymentResponse.resolve(r),r}))}return d._getOnBehalfOfError().then((function(e){return e?_t.reject(e):i}))})),d.update=(0,S.TC)((function(e){if(d._isShowing)throw d._report("pr.update_called_while_showing"),new h.No("You cannot update Payment Request options while the payment sheet is showing.");d._privateForcedUpdate(e)})),d._privateForcedUpdate=function(e){var t,n=(0,m.Gu)(V,e,"PaymentRequest update()"),r=n.value,o=n.warnings;d._report("pr.update"),o.forEach((function(e){return d._warn(e)}));var i=r.__billingDetailsEmailOverride,a=(0,c.Z)(r,vt);if(i){if(d._initialOptions.requestPayerEmail)throw new h.No("When providing `__billingDetailsEmailOverride`, `requestPayerEmail` has to be `false` so that the customer is not prompted for their email in the payment sheet.");d._initialOptions.__billingDetailsEmailOverride=i}!a.shippingOptions||null!==(t=d._initialOptions)&&void 0!==t&&t.requestShipping||d._report("pr.update_shipping_options_without_shipping"),a.total&&(d._reportOnlyTotal=a.total),a.currency&&(d._reportOnlyCurrency=a.currency),(0,f.VO)(d._backingLibraries).forEach((function(e){e&&e.update(a)}))},d.show=(0,S.TC)((function(){var e;if(d._usedByButtonElement&&!d._showCalledByButtonElement&&(d._report("pr.show_called_with_button"),d._warn("Do not call show() yourself if you are using the paymentRequestButton Element. The Element handles showing the payment sheet.")),!d._canMakePaymentResolved)throw d._report("pr.show_called_before_can_make_payment"),new h.No("You must first check the Payment Request API's availability using paymentRequest.canMakePayment() before calling show().");if(!d._activeBackingLibrary)throw d._report("pr.show_called_with_can_make_payment_false"),new h.No("Payment Request is not available in this browser.");("LINK"!==d._activeBackingLibraryName||d._initialOptions.__linkOnly||(d._usedByButtonElement||d._report("pr.show_called_with_link_custom_button"),!d._showCalledByButtonElement&&d._usedByButtonElement&&d._report("pr.show_called_with_link_hybrid_button")),"APPLE_PAY"===d._activeBackingLibraryName&&d._initialOptions.applePay)&&(0,ft.EH)({applePay:d._initialOptions.applePay}).forEach((function(e){return d._warn(e)}));var t=null;if("secondary"===d._lastClickedButtonPosition){if(!d._secondaryActiveBackingLibrary)throw Error('The relevant backing library for position "'.concat(d._lastClickedButtonPosition,'" was unavailable.'));t=d._secondaryActiveBackingLibrary}else t=d._activeBackingLibrary;var n=d._showCalledByButtonElement?"pr.show_from_element":"pr.show_from_custom";d._report(n),d._report("pr.show",{amount:null===(e=d._reportOnlyTotal)||void 0===e?void 0:e.amount,currency:d._reportOnlyCurrency,listeners:Object.keys(d._callbacks).sort()}),d._isShowing=!0,t.show({locale:d._locale})})),d.abort=(0,S.TC)((function(){if(d._activeBackingLibrary){var e=d._activeBackingLibrary;d._report("pr.abort"),e.abort()}})),d.isShowing=function(){return d._isShowing},d._controller=e.controller,d._authentication=e.authentication,d._listenerRegistry=e.listenerRegistry;var p=(0,m.Gu)((e.betas,(0,m.mC)({displayItems:(0,m.jt)((0,m.CT)(O)),shippingOptions:(0,m.jt)((0,m.uw)("id")((0,m.CT)(Z))),wallets:(0,m.jt)((0,m.CT)(m.kw.apply(void 0,(0,P.Z)(N())))),disableWallets:(0,m.jt)((0,m.CT)(m.kw.apply(void 0,(0,P.Z)(N())))),blockedCardBrands:(0,m.jt)((0,m.CT)(m.kw.apply(void 0,(0,P.Z)(w.iw)))),tokenNotificationURL:(0,m.jt)(m.Z_),total:M,requestShipping:(0,m.jt)(m.Xg),requestPayerName:(0,m.jt)(m.Xg),requestPayerEmail:(0,m.jt)(m.Xg),requestPayerPhone:(0,m.jt)(m.Xg),shippingType:(0,m.jt)(L),currency:m.cV,country:m.hN,applePay:(0,m.jt)(W),onBehalfOf:(0,m.jt)(m.Z_),jcbEnabled:(0,m.jt)(m.Xg),__billingDetailsEmailOverride:(0,m.jt)(m.Z_),__minApplePayVersion:(0,m.jt)(m.Rx),__minGooglePayVersion:(0,m.jt)(j),__merchantDetails:(0,m.jt)(B),__linkOnly:(0,m.jt)(m.Xg),__isCheckout:(0,m.jt)(m.Xg),__isHostedInvoicePage:(0,m.jt)(m.Xg),__checkoutSessionId:(0,m.jt)(m.Z_),__isPaymentElement:(0,m.jt)(m.Xg),__elementsGroupId:(0,m.jt)(m.Z_),__isExpressCheckoutElement:(0,m.jt)(m.Xg),__betas:(0,m.jt)((0,m.CT)(m.z$.apply(void 0,(0,P.Z)(I.Lv)))),__supportsCouponCode:(0,m.jt)(m.Xg),__couponCode:(0,m.jt)(m.Z_),__linkPurchaseProtectionsData:(0,m.jt)(x),__linkProtectionsEligibleAndRolledOut:(0,m.jt)(m.Xg),__linkUnrecognizedProtectionsHoldback:(0,m.jt)(m.Xg)})),e.rawOptions||{},"paymentRequest()"),v=p.value,k=p.warnings;if(d._report("pr.options",{options:(0,s.Z)((0,s.Z)({},(0,f.ei)(v,["country","currency","jcbEnabled","requestPayerEmail","requestPayerName","requestPayerPhone","requestShipping","disableWallets","wallets","blockedCardBrands"])),{},{applePay:(0,s.Z)((0,s.Z)({},(0,f.ei)(null!==(r=v.applePay)&&void 0!==r?r:{},["applePayLaterAvailability"])),{},{usesAutomaticReloadPaymentRequest:!(null===(o=v.applePay)||void 0===o||!o.automaticReloadPaymentRequest),usesDeferredPaymentRequest:!(null===(i=v.applePay)||void 0===i||!i.deferredPaymentRequest),usesRecurringPaymentRequest:!(null===(u=v.applePay)||void 0===u||!u.recurringPaymentRequest)})})}),k.forEach((function(e){return d._warn(e)})),v.__billingDetailsEmailOverride&&v.requestPayerEmail)throw new h.No("When providing `__billingDetailsEmailOverride`, `requestPayerEmail` has to be `false` so that the customer is not prompted for their email in the payment sheet.");v.applePay&&(0,ft.AB)({applePay:v.applePay});var C=N(),E=v.disableWallets,A=E?C.filter((function(e){return-1===E.indexOf(e)})):v.wallets;return e.queryStrategyOverride?d._queryStrategy=e.queryStrategyOverride:v.__linkOnly?d._queryStrategy=["LINK"]:d._queryStrategy=$(A||C),d._report("pr.query_strategy",{queryStrategy:d._queryStrategy}),d._initialOptions=(0,s.Z)((0,s.Z)({},v),{},{__betas:e.betas,wallets:A}),d._reportOnlyCurrency=v.currency,d._reportOnlyTotal=v.total,d._initBackingLibraries(d._initialOptions),d._controller._controllerFrame._on("stripe-user-credentials-update",(function(e){d._authentication={apiKey:e.publishableKey,accountId:e.stripeAccount},d._canMakePaymentResolved&&(d._canMakePaymentResolved=!1,d._controller.deferredCanMakePaymentResponse.resolve(null),d.canMakePayment())})),d}(0,d.Z)(t,e);var n=(0,p.Z)(t);return(0,u.Z)(t)}(k.Z),wt=bt},3234:function(e,t,n){"use strict";n.d(t,{A:function(){return i},C:function(){return o}});var r=n(6617),o=function(e){try{if((0,r.zd)()){var t=(0,r.Uy)();return t||e("pr.apple_pay.top_level_domain_unavailable"),t}}catch(e){}return null},i=function(e){var t=o(e);return t?new URL(t).hostname:window.location.hostname}},2920:function(e,t,n){"use strict";n.d(t,{Qt:function(){return d},VC:function(){return l},lU:function(){return s}});var r=n(3550),o=n(3333),i=n(3234),a=n(6274).Promise,c=function(e){if(!function(){try{var e;return window.location.origin===(null===(e=window.top)||void 0===e?void 0:e.location.origin)}catch(e){return!1}}()){var t=(0,i.C)(e);return!o.OV||!t||(e("pr.apple_pay.cross_domain_iframe"),!1)}return!1},s=2,u=(0,r.HP)((function(e){return window.ApplePaySession.canMakePaymentsWithActiveCard(e)})),l=function(e){if(!window.ApplePaySession)return!1;try{return window.ApplePaySession.supportsVersion(e)}catch(e){return!1}},d=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:s,i=arguments.length>5?arguments[5]:void 0;if("https:"!==window.location.protocol)return a.resolve(!1);var l=Math.max(s,o);if(window.ApplePaySession){if(c(r))return a.resolve(!1);if(window.ApplePaySession.supportsVersion(l)){var d=t?[e,t]:[e],p="merchant.".concat(d.join("."),".stripe");if(i)return u(p).then((function(o){if(r("pr.apple_pay.can_make_payment_native_response",{available:o,identifier:p}),n&&!o&&window.console){var i=t?"or stripeAccount parameter (".concat(t,") "):"";window.console.warn("Either you do not have a card saved to your Wallet or the current domain (".concat(e,") ").concat(i,"is not registered for Apple Pay."))}return o}));var m=window.ApplePaySession.canMakePayments();return a.resolve(m)}return n&&window.console&&window.console.warn("This version of Safari does not support ApplePay JS version ".concat(l,".")),a.resolve(!1)}return a.resolve(!1)}},4436:function(e,t,n){"use strict";n.d(t,{vS:function(){return a},ud:function(){return o},Nj:function(){return p}});var r={ar:"ar",bg:"bg",cs:"cs",da:"da",de:"de",el:"el",en:"en","en-GB":"en-GB","en-NL":"en-NL",es:"es","es-419":"es-419",et:"et",fi:"fi",fil:"fil",fr:"fr","fr-CA":"fr-CA",he:"he",hr:"hr",hu:"hu",id:"id",it:"it",ja:"ja",ko:"ko",lt:"lt",lv:"lv",ms:"ms",mt:"mt",nb:"nb",nl:"nl","nl-BE":"nl-BE",no:"no",pl:"pl",pt:"pt","pt-BR":"pt-BR",ru:"ru",ro:"ro",sk:"sk",sl:"sl",sv:"sv",th:"th",tr:"tr",vi:"vi",zh:"zh","zh-HK":"zh-HK","zh-TW":"zh-TW"},o=["ar","he"],i=(Object.keys(r),r),a="en",c={"es-HN":"es-419","es-MX":"es-419","es-US":"es-419"},s=function(e){try{var t=function(e){var t=e.split("-"),n=t[0],r=null,o=null,i=null;if(t.length>1&&(4===t[1].length?o=t[1]:2===t[1].length||3===t[1].length?r=t[1]:i=t[1]),t.length>2&&(2===t[2].length||3===t[2].length?r=t[2]:i=t[2]),t.length>3&&(i=t[3]),2!==n.length&&3!==n.length)throw new Error("invalid locale ".concat(e));var a=n.toLowerCase(),c=r?r.toUpperCase():null,s=o?"".concat(o[0].toUpperCase()).concat(o.substring(1).toLowerCase()):null;return{locale:a+(s?"-".concat(s):"")+(c?"-".concat(c):"")+(i?"-".concat(i):""),language:a,region:c,script:s,variant:i}}(e),n=t.locale,r=t.language,o=[n];return c[n]&&o.push(c[n]),n!==r&&o.push(r),o.push(a),o}catch(t){return[e,a]}},u=n(3333),l=n(1765),d=function(e){return function(e){for(var t=s(e),n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}n.d(t,{Z:function(){return r}});var o=n(3366)},3366:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}n.d(t,{Z:function(){return r}})},2963:function(e,t,n){"use strict";function r(e,t){if(t&&("object"===(0,o.Z)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(e)}n.d(t,{Z:function(){return r}});var o=n(1002),i=n(7326)},9611:function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{Z:function(){return r}})},3324:function(e,t,n){"use strict";function r(e,t){return(0,o.Z)(e)||(0,i.Z)(e,t)||(0,a.Z)(e,t)||(0,c.Z)()}n.d(t,{Z:function(){return r}});var o=n(3878),i=n(1902),a=n(181),c=n(5267)},9062:function(e,t,n){"use strict";function r(e){return(0,o.Z)(e)||(0,i.Z)(e)||(0,a.Z)(e)||(0,c.Z)()}n.d(t,{Z:function(){return r}});var o=n(5057),i=n(9199),a=n(181),c=n(2786)},1002:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{Z:function(){return r}})},181:function(e,t,n){"use strict";function r(e,t){if(e){if("string"==typeof e)return(0,o.Z)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,o.Z)(e,t):void 0}}n.d(t,{Z:function(){return r}});var o=n(907)},7112:function(e,t,n){"use strict";function r(e){var t="function"==typeof Map?new Map:void 0;return r=function(e){function n(){return(0,c.Z)(e,arguments,(0,o.Z)(this).constructor)}if(null===e||!(0,a.Z)(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),(0,i.Z)(n,e)},r(e)}n.d(t,{Z:function(){return r}});var o=n(1120),i=n(9611),a=n(8989),c=n(5647)}},o={};e.m=r,e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,{a:n}),n},e.d=function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},e.f={},e.e=function(t){return Promise.all(Object.keys(e.f).reduce((function(n,r){return e.f[r](t,n),n}),[]))},e.u=function(e){return"fingerprinted/js/"+{1:"elements-affirm-modal",16:"embedded-checkout-outer",36:"floating-ui-dom",209:"elements-affirm-message",259:"elements-afterpay-clearpay-modal",428:"payment-intent-outer-actions-cardimageverification",578:"elements-afterpay-clearpay-message",895:"custom-checkout",897:"sentry",913:"trusted-types-checker",944:"phone-numbers-lib"}[e]+"-"+{1:"220c0b11f25a381e58cb86e2dbab9ec3",16:"420c9ab0556da06df47b901d6df18d27",36:"03cfa66539e1c5de314006985aa042ef",209:"ec93cf9891de680e290d0dc030a15a0e",259:"ae1973d7c74e7ac19a6e7d8b340586b4",428:"684acc6d936b37feb465b1aaaf806ac5",578:"13bfaa4d98c0813ed252362bd19bfd49",895:"ff030883b37bc536cef420e8005135af",897:"e46620bb9d51e447c284bd46a6383ed1",913:"efd8cf45ce422659c098993bfc62531b",944:"2b907dd0115632f9db64bdd173c33f4c"}[e]+".js"},e.miniCssF=function(){},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),e.hmd=function(e){return(e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:function(){throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e},e.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t={},n="stripe-js-v3:",e.l=function(r,o,i){if(t[r])t[r].push(o);else{var a,c;if(void 0!==i)for(var s=document.getElementsByTagName("script"),u=0;u