!function(){function e(t){var n=o[t];if(void 0!==n)return n.exports;var i=o[t]={exports:{}};return r[t](i,i.exports,e),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(;p1024){for(var t=0,n=l.length-p;tq.length&&q.push(e)}function p(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;c0&&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 i=(0,s.mC)({layout:t?a.Ee:a.xl}),c=(0,s.Gu)(i,{layout:r},n),u=c.warnings,l=r,p=l.type;return"accordion"!==p&&(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."]))),u},w=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,s.mC)({wallets:a.n4}),o=(0,s.Gu)(r,{wallets:n},t),i=o.warnings;return i},k=function(e,t){return e.length<=t?e:"".concat(e.slice(0,t).trim(),"...")},S=function(){var e,t,n,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=o.savePaymentMethod;if(!i)return{savePaymentMethodTruncated:{},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=k(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=k(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=k(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}},E=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 u.No("You cannot specify validation.".concat(r," without setting fields.").concat(r," to always."))},C=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 u.No("You cannot specify defaultValues.phone without setting fields.phone to always.")},P=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)!==p.ZV)throw new u.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)===p.ZV&&null!==(i=e.defaultValues)&&void 0!==i&&i.name)throw new u.No("You cannot specify defaultValues.name when you have display.name set to split.")},A=function(e){var t=e.contacts,n=e.fields,r=e.validation;if(t){var o,i=(0,l.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 u.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."))}},N=function(e){if(!e)return{allowedCountries:null,warnings:[]};var t=[],n=[];return e.forEach((function(e){if("string"==typeof e){var r=m[e.toUpperCase()]||null;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}}},8731:function(e,t,n){"use strict";n.d(t,{ZP:function(){return u}});var r=n(5671),o=n(1413),i=n(4200),a=n(6589),c={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"},s=(0,o.Z)((0,o.Z)({},c),{},{background:"rgba(40,40,40,0.75)"}),u=function e(t){var n=this,o=t.lockScrolling,u=t.lockFocus,l=t.lockFocusOn,p=t.listenerRegistry;(0,r.Z)(this,e),this.domElement=document.createElement("div"),this._runOnHide=[],this.mount=function(){var e=(0,i.Xq)();n.domElement.style.display="none",e.contains(n.domElement)||e.insertBefore(n.domElement,e.firstChild)},this.show=function(){if((0,i.yq)(n.domElement,c),n._lockScrolling){var e=(0,i.MV)();n._runOnHide.push(e)}if(n._lockFocus){var t=(0,i.W3)(n._lockFocusOn).restoreFocus;n._runOnHide.push(t)}},this.fadeIn=function(){setTimeout((function(){(0,i.yq)(n.domElement,s)}))},this.fadeOut=function(){return new a.J((function(e){(0,i.yq)(n.domElement,c),setTimeout(e,500),n._listenerRegistry.addEventListener(n.domElement,"transitionend",e)})).then((function(){for(n.domElement.style.display="none";n._runOnHide.length;){var e;null===(e=n._runOnHide.pop())||void 0===e||e()}}))},this.unmount=function(){var e=(0,i.Xq)();e.contains(n.domElement)&&e.removeChild(n.domElement)},this._lockScrolling=!!o,this._lockFocus=!!u,this._lockFocusOn=l||null,this._listenerRegistry=p}},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(5727),p=n(6617),d=n(5558),m=n(6589),f=n(8547),h=n(40),_=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,d.To)(e.tag);return new m.J((function(n,o){r._requests[t]={resolve:n,reject:o},r._send({message:{action:"stripe-frame-action",payload:{nonce:t,faReq:e}},type:"outer",frameId:r.id,controllerId: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,d.To)("__privateStripeFrame")}},{key:"send",value:function(e){this._send({message:e,type:"outer",frameId:this.id,controllerId:this._controllerId})}},{key:"sendPersistent",value:function(e){this._ensureMounted();var t={message:e,type:"outer",frameId:this.id,controllerId:this._controllerId};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")}},{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,p.qC)((0,r.Z)((0,r.Z)({},n||{}),{},{referrer:o,controllerId:this._controllerId})),a=document.createElement("iframe");a.setAttribute("name",this.id);var c=(0,l.i7)(e);return Object.keys(c).forEach((function(e){a.setAttribute(e,c[e])})),(0,h.Kn)(n)&&n.allowCamera&&a.setAttribute("allow","camera"),a.src="".concat((0,u.D)(e)).concat(i?"#":"").concat(i),a}}]),t}(f.Z);t.Z=_},9598:function(e,t,n){"use strict";var r=n(5671),o=n(3144),i=n(7326),a=n(1752),c=n(1120),s=n(136),u=n(9388),l=n(2784),p=n(8812),d=n(4200),m=function(e){function t(e){var o;if((0,r.Z)(this,t),(o=n.call(this,e)).autoload=e.autoload||!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,s.Z)(t,e);var n=(0,u.Z)(t);return(0,o.Z)(t,[{key:"_ensureMounted",value:function(){(0,a.Z)((0,c.Z)(t.prototype),"_ensureMounted",this).call(this),this._isMounted()||this._autoMount()}},{key:"_autoMount",value:function(){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 p.No("Stripe.js requires that your page has a element.");this.autoload&&(this.loaded=!0)}},{key:"_createIFrame",value:function(e,n,r){var o=(0,a.Z)((0,c.Z)(t.prototype),"_createIFrame",this).call(this,e,n,r);return o.setAttribute("aria-hidden","true"),o.setAttribute("tabIndex","-1"),(0,d.SV)(o),o}}]),t}(l.Z);t.Z=m},8370:function(e,t,n){"use strict";n.d(t,{Z:function(){return re}});var r=n(5987),o=n(4942),i=n(1413),a=n(5671),c=n(3144),s=n(73),u=n(5727),l=n(9620),p=n(5558),d=n(9598),m=n(2641),f=n(1752),h=n(1120),_=n(136),y=n(9388),v=n(2784),g=n(4200),b=n(9776),w={border:"none",margin:"0",padding:"0",width:"1px","min-width":"100%",overflow:"hidden",display:"block","user-select":"none",transform:"translate(0)","color-scheme":"only light"},k=function(e){function t(e){var r;return(0,a.Z)(this,t),r=n.call(this,e),b.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,_.Z)(t,e);var n=(0,y.Z)(t);return(0,c.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&&(b.s$?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:"show",value:function(){this.send({action:"stripe-user-show",payload:{}})}},{key:"hide",value:function(){this.send({action:"stripe-user-hide",payload:{}})}},{key:"addLineItem",value:function(e){this.send({action:"stripe-user-add-line-item",payload:e})}},{key:"cancelCheckout",value:function(e){this.send({action:"stripe-user-cancel-checkout",payload:{errorMessage:e}})}},{key:"getValue",value:function(){this.send({action:"stripe-user-get-value",payload:{}})}},{key:"_createIFrame",value:function(e,n,r){var o=(0,f.Z)((0,h.Z)(t.prototype),"_createIFrame",this).call(this,e,n,r);return o.setAttribute("title","Secure payment input frame"),(0,g.yq)(o,w),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}(v.Z),S=n(7326),E=n(8731),C={position:"absolute",left:"0",top:"0",height:"100%",width:"100%","color-scheme":"normal"},P=function(e){function t(e){var r,o,i,c=e.type,s=e.controllerId,u=e.listenerRegistry,l=e.options;return(0,a.Z)(this,t),(i=n.call(this,{type:c,controllerId:s,listenerRegistry:u,appParams:l}))._autoMount=function(){i.appendTo(i._backdrop.domElement),i._backdrop.mount()},i.show=function(){i._backdrop.show(),(0,g.yq)(i._iframe,C),i.isVisible=!0},i.fadeInBackdrop=function(){i._backdrop.fadeIn()},i._backdropFadeoutPromise=null,i.fadeOutBackdrop=function(){return i._backdropFadeoutPromise||(i._backdropFadeoutPromise=i._backdrop.fadeOut()),i._backdropFadeoutPromise.then((function(){i._backdropFadeoutPromise=null}))},i.destroy=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=i.fadeOutBackdrop().then((function(){i._backdrop.unmount(),e||(0,f.Z)((r=(0,S.Z)(i),(0,h.Z)(t.prototype)),"destroy",r).call(r)}));return e&&(0,f.Z)((o=(0,S.Z)(i),(0,h.Z)(t.prototype)),"destroy",o).call(o),i.isVisible=!1,n},i._backdrop=new E.ZP({lockScrolling:!0,lockFocus:!0,lockFocusOn:i._iframe,listenerRegistry:u}),i._autoMount(),i.isVisible=!1,i}(0,_.Z)(t,e);var n=(0,y.Z)(t);return t}(v.Z),A=P,N={display:"block",position:"absolute","z-index":"1000",width:"1px","min-width":"100%",margin:"2px 0 0 0",padding:"0",border:"none",overflow:"hidden"},I=function(e){function t(){return(0,a.Z)(this,t),n.apply(this,arguments)}(0,_.Z)(t,e);var n=(0,y.Z)(t);return(0,c.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(e,n,r){var o=(0,f.Z)((0,h.Z)(t.prototype),"_createIFrame",this).call(this,e,n,r&&"object"==typeof r?(0,i.Z)((0,i.Z)({},r),{},{isSecondaryFrame:!0}):r);return(0,g.yq)(o,N),o.style.height="0",o}}]),t}(v.Z),M=I,T=n(6617),R=n(8812),O=n(4505),Z=n(9706),j=n(9465),x=n(6297),L=n(6042),B=n(6589),D="https://maps.googleapis.com/maps/api/js",q=/^https:\/\/maps\.googleapis\.com\/maps\/api\/js\/?(\?.*)?libraries=(.*,)?places((,|&)+.*)?$/;window.noop=function(){};var F,G=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"}},U="ADDRESS_AUTOCOMPLETE_PREDICTION_RESULTS",z="ADDRESS_AUTOCOMPLETE_PLACE_DETAILS",H=null,K=function(e){return null!==H||(H=new B.J((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(D,'"]'));for(var t in e)if(q.test(e[t].src))return e[t];return null}();r||(r=function(e){var t=document.createElement("script");return t.src="".concat(D,"?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)}))),H},Y=function(e,t,n){var r=e.search,o=e.countryRestrictions;var i=function(e){return{predictions:[],status:"error",error:{status:G(e),message:"Google Maps returned an API error"}}};void 0===t||F?n.send({action:"google-maps-predictions",payload:{data:{tag:U,value:i("UNKNOWN_ERROR")}}}):function(e,t){try{t()}catch(t){e.send({action:"google-maps-predictions",payload:{data:{tag:U,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:U,value:r}}})}))}))},J=n(7030),W=(n(40),{attachLinkAccountSessionForPayment:null,attachLinkAccountSessionForSetup:null,authenticate3DS2:null,cancelCardImageVerificationChallenge:null,cancelCheckout:null,cancelPaymentIntentSource:null,cancelSetupIntentSource:null,clearInstantDebitsIncentive:null,completeLinkAccountSessionElements:null,completeWalletConfirm:null,confirmPaymentIntent:null,confirmReturnIntent:null,confirmSetupIntent:null,createAcssDebitSession:null,createApplePaySession:null,createBankPaymentDetails:null,createConsumerPaymentDetails:null,createEphemeralKeyNonce:null,createPaymentMethodWithData:null,createPaymentMethodWithElement:null,createPaymentMethodWithElements:null,createPaymentPage:null,createPaymentPageWithSession:null,initPaymentPage:null,updatePaymentPage:null,confirmPaymentPage:null,createRadarSession:null,createSourceWithData:null,createSourceWithElement:null,confirmInstantDebitsIncentiveForPaymentDetails:null,fetchingWallets:null,shouldShowEceButton:null,expressCheckoutConfirmStart:null,expressCheckoutConfirmEnd:null,expressCheckoutSheetOpened:null,expressCheckoutSheetClosed:null,getElementConfirmingPayment:null,getIsAwaitingConfirmCallback:null,getElementsSessionAmountModeCurrency:null,getElementsSessionUnverifiedPaymentMethodsOnDomain:null,setExpressCheckoutConfirmData:null,closeECEPaymentSheet:null,fetchLocale:null,fetchUpdates:null,localizeError:null,unsafeLocalizeString:null,loginWithConsumerInfo:null,lookupLocale:null,refreshPaymentIntent:null,refreshSetupIntent:null,retrieveIssuingCard:null,retrieveIssuingCardWithoutNonce:null,retrieveOrder:null,retrievePaymentIntent:null,retrieveSetupIntent:null,retrieveSource:null,rememberLinkLogin:null,forgetLinkLogin:null,removeElementsExperimentId:null,resetExpressCheckoutState:null,fetchCartSession:null,getGoogleMapsPredictions:null,getGoogleMapsDetails:null,initGoogleMapsService:null,setupStoreForElementsGroup:null,showWalletIfNecessary:null,submitOrder:null,tokenizeCvcUpdate:null,tokenizeWithData:null,tokenizeWithElement:null,updateCSSFonts:null,updateElementsOptions:null,updateOrder:null,updatePaymentIntent:null,verifyCardImageVerificationChallenge:null,verifyMicrodepositsForPayment:null,verifyMicrodepositsForSetup:null,retrieveCardNetworks:null,isCardMetadataRequired:null,retrieveWalletConfigAvailability:null,retrieveLinkConfig:null,checkForLinkClientSecret:null,resolveLocale:null,elementUnmounted:null,logOutOfLinkInElements:null,cmpStatusChange:null,setExpressCheckoutLinkPaymentMethodData:null,updateStripeUserCredentials:null,validateElements:null,retrievePaypalMerchantId:null,consumerPreloadedDataStale:null,linkPopupLogOut:null,updateCustomerDefaultPaymentMethod:null}),V=n(6835),X=n(2690),$=!1,Q={},ee=function(e,t){return document.activeElement===e._iframe||e._iframe.parentElement&&document.activeElement===t},te=function(e){return"object"==typeof e&&null!==e&&"IntegrationError"===e.name?new R.No("string"==typeof e.message?e.message:""):e},ne=function(){function e(t){var n=this;(0,a.Z)(this,e),this.deferredCanMakePaymentResponse=new V.B,this._sendCaReq=function(e,t){var r=(0,p.To)(e),o=new V.B;return n._requests[r]=o,n._controllerFrame.send({action:"stripe-controller-action-request",payload:{nonce:r,actionName:e,request:t}}),o.promise},this.keyMode=function(){return(0,l.lO)(n._apiKey)},this.mids=function(){return n._getMids()},this.action=Object.keys(W).reduce((function(e,t){return(0,i.Z)((0,i.Z)({},e),{},(0,o.Z)({},t,(function(e){return n._sendCaReq(t,e)})))}),{}),this.createElementFrame=function(e,t,r,o){var a=n._betas,c=new k({type:e,betas:a,controllerId:n._id,listenerRegistry:n._listenerRegistry,appParams:(0,i.Z)((0,i.Z)({},o),{},{componentName:t,keyMode:(0,l.lO)(n._apiKey),apiKey:n._apiKey})});return n._setupFrame(c,e,r)},this.createSecondaryElementFrame=function(e,t,r,o,a){var c=n._betas,s=new M({type:e,betas:c,controllerId:n._id,listenerRegistry:n._listenerRegistry,appParams:(0,i.Z)((0,i.Z)({},a),{},{componentName:t,primaryElementType:r,keyMode:(0,l.lO)(n._apiKey)})});return n._setupFrame(s,e,o)},this.createHiddenFrame=function(e,t,r){var o=new d.Z({type:e,betas:n._betas,controllerId:n._id,listenerRegistry:n._listenerRegistry,appParams:t});return n._setupFrame(o,e,r)},this.getCredentials=function(){return{publishableKey:n._apiKey,stripeAccount:n._stripeAccount,apiVersion:n._apiVersion}},this.setCredentials=function(e){n._apiKey=e.publishableKey,n._stripeAccount=e.stripeAccount,n._apiVersion=e.apiVersion},this.createLightboxFrame=function(e){var t=e.type,r=e.options,o=new A({type:t,controllerId:n._id,listenerRegistry:n._listenerRegistry,options:(0,i.Z)((0,i.Z)({},r),{},{betas:n._betas})}),a="LINK_AUTOFILL_MODAL"===e.type||"PAYMENT_METHOD_MESSAGING_MODAL_ELEMENT"===e.type||"LINK_INFO_MODAL"===e.type?e.groupId:null;return n._setupFrame(o,t,a)},this._setupFrame=function(e,t,r){return n._frames[e.id]=e,n._controllerFrame.sendPersistent({action:"stripe-user-createframe",payload:{newFrameId:e.id,frameType:t,groupId:r}}),e._on("unload",(function(){n._controllerFrame.sendPersistent({action:"stripe-frame-unload",payload:{unloadedFrameId:e.id}})})),e._on("destroy",(function(){delete n._frames[e.id],n._controllerFrame.sendPersistent({action:"stripe-frame-destroy",payload:{destroyedFrameId:e.id}})})),e._on("load",(function(){n._controllerFrame.sendPersistent({action:"stripe-frame-load",payload:{loadedFrameId:e.id}}),n._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]:{};n._controllerFrame.send({action:"stripe-controller-report",payload:{event:e,data:t}})},this.warn=function(){for(var e=arguments.length,t=new Array(e),r=0;r1?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"Script error."===e.message||"string"==typeof e.fileName&&(0===e.fileName.indexOf("chrome://")||0===e.fileName.indexOf("chrome-extension://"))}(e)?"uncaught_third_party_error":"fatal.uncaught_error";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),e},s=function(e,t,n){return function(r){try{return e.call(this,r)}catch(e){return c(e,t||this&&this._controller,!1,n)}}},u=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)}}},l=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=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 p}});var o=n(181),i=n(9062),a=n(1413),c=n(73),s=n(1823),u=["SCRIPT","STYLE"],l=function(){var e=null;return h().then((function(t){e=t})).catch((function(){e=null})),function(){var t=y();return e?(0,a.Z)({name:S(t),email:v(t)},E(e,t)):{name:S(t),email:v(t),phoneNumber:null,phoneCountry:null}}},p=function(){return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5e3,r=Date.now(),o=[],i=document.documentElement.getElementsByTagName("*").length;m(document.documentElement,(function(t,r){e||f(t,n).forEach((function(e,t){o.push({selector:r,value:e,nthMatch:t})}))}));var a=Date.now()-r;return{selectors:{name:[],email:o,phoneNumber:[],phoneCountry:[]},runtimeInMillis:a,nodeCount:i,source:t,dryRun:e}}},d=function(e){var t;if(e.id)return"#".concat(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:d(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(d(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){var n=b(e),r=g(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.length-1||!!r&&(null==t?void 0:t.indexOf(r))>-1},m=window.location.hash.substring(1).split("?")[0],f=(0,a.ld)((0,a.mC)({betas:(0,a.Wc)((0,a.CT)(a.kw.apply(void 0,(0,o.Z)(l))),(function(){return[]}))}),(0,i.vB)(m),"internal"),h="valid"===f.type?f.value.betas:[],_=function(e){var t=[],n=[];if(e){if(-1!==e.indexOf(s.blocked_card_brands_beta_1)&&-1!==e.indexOf(s.blocked_card_brands_beta_2))return{validBetas:t,betaError:"The following betas are incompatible for Stripe() parameter:\n\n- ".concat(s.blocked_card_brands_beta_1,"\n- ").concat(s.blocked_card_brands_beta_2,"\n\n Please remove ").concat(s.blocked_card_brands_beta_1,".")};e.forEach((function(e){l.indexOf(e)>-1?t.push(s[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}},y=[],v=(r=y,function(e,t){return d(t,s.stripe_js_beta_locales)||-1===r.indexOf(e)?e:"auto"})},9776:function(e,t,n){"use strict";n.d(t,{sV:function(){return b},j3:function(){return P},fL:function(){return Z},G9:function(){return E},Bh:function(){return _},P0:function(){return h},PB:function(){return A},D$:function(){return N},D1:function(){return k},JW:function(){return y},JC:function(){return T},NK:function(){return R},ZR:function(){return M},q$:function(){return g},Ah:function(){return v},cE:function(){return I},s$:function(){return w},Gx:function(){return O},xz:function(){return S},Wt:function(){return C},x5:function(){return x},gG:function(){return B},d4:function(){return L},UT:function(){return D}});var r=function(e){return/Edge\//i.test(e)},o=function(e){return/Edg\//i.test(e)},i=function(e){return/(MSIE ([0-9]{1,}[.0-9]{0,})|Trident\/)/i.test(e)},a=function(e){return/SamsungBrowser/.test(e)},c=function(e,t){return(/iPhone/i.test(e)||s(e,t))&&!i(e)},s=function(e,t){return(/iPad/i.test(e)||/Macintosh/i.test(e)&&(t>0||"ontouchstart"in window))&&!i(e)},u=function(e){return/Opera Mini/i.test(e)},l=function(e){return/^((?!chrome|android).)*safari/i.test(e)&&!a(e)},p=function(e){return/Android/i.test(e)&&!i(e)},d="undefined"!=typeof window,m=d?window.navigator.maxTouchPoints:0,f=d?window.navigator.userAgent:"",h=(d&&window.navigator.platform,r(f)),_=o(f),y=(/Edge\/((1[0-6]\.)|0\.)/i.test(f),i(f)),v=(function(e){/MSIE ([0-9]{1,}[.0-9]{0,})/i.test(e)}(f),c(f,m)),g=(s(f,m),function(e,t){return c(e,t)||p(e)}(f,m)),b=p(f),w=(function(e){/Android 4\./i.test(e)&&!/Chrome/i.test(e)&&p(e)}(f),l(f)),k=(function(e,t){l(e)&&c(e,t)}(f,m),function(e){return/Firefox\//i.test(e)}(f)),S=(function(e){/Firefox\/(50|51|[0-4]?\d)([^\d]|$)/i.test(e)}(f),a(f)),E=function(e){return/Chrome\//i.test(e)}(f),C=(function(e){/Chrome\/(6[6-9]|[7-9]\d+|[1-9]\d{2,})/i.test(e)}(f),function(e){/Chrome\/(7[4-9]|[8-9]\d+|[1-9]\d{2,})/i.test(e)}(f),function(e){return/AppleWebKit/i.test(e)&&!/Chrome/i.test(e)&&!r(e)&&!i(e)}(f)),P=function(e){return/Chrome/i.test(e)&&!r(e)}(f),A=(function(e){/CriOS/i.test(e)}(f),function(e){/FxiOS/i.test(e)}(f),function(e){return/EdgiOS/i.test(e)}(f)),N=function(e){return/\belectron\b/i.test(e)}(f),I=u(f),M=function(e){return/Macintosh.*AppleWebKit(?!.*Safari)/i.test(e)}(f),T=function(e){return/Safari Line/i.test(e)}(f),R=function(e){return/Pinterest\/iOS/i.test(e)}(f),O=w&&"download"in document.createElement("a"),Z=d&&!!window.navigator.brave&&"function"==typeof window.navigator.brave.isBrave,j=d&&window.navigator&&"standalone"in window.navigator&&window.navigator.standalone,x=function(e,t){return/(iPhone|iPod|iPad).*AppleWebKit((?!.*Safari)|(.*\([^)]*like[^)]*Safari[^)]*\)))/i.test(e)||/(Macintosh).*AppleWebKit((?!.*Safari)|(.*\([^)]*like[^)]*Safari[^)]*\)))/i.test(e)&&s(e,t)}(f,m)||function(e){return p(e)&&/wv|Version\/\d+\.\d+/.test(e)&&!u(e)}(f)||function(e){return/FBAN/.test(e)||/FBAV/.test(e)}(f)||j,L=function(e){return/\bWindows\b/i.test(e)?"Windows":/\bAndroid\b/i.test(e)?"Android":/\biPhone|iPad\b/i.test(e)?"iOS":/\bMac OS\b/i.test(e)?"MacOS":/\bCrOS\b/i.test(e)?"ChromeOS":/\bLinux\b/i.test(e)?"Linux":"Other"},B=(E&&L(f),function(){return!(x||N||M||Z||R||T||A||I||window.crossOriginIsolated)}),D=function(){return(window.navigator.languages||[])[0]||window.navigator.userLanguage||window.navigator.language||""}},2024:function(e,t,n){"use strict";n.d(t,{CE:function(){return g},G:function(){return a},PM:function(){return E},Q8:function(){return h},TS:function(){return S},VO:function(){return p},Xy:function(){return l},cx:function(){return s},dq:function(){return m},ei:function(){return v},l2:function(){return _},qh:function(){return d},qk:function(){return f},sE:function(){return c},sq:function(){return y}});var r=n(7462),o=n(3324),i=n(6589),a=function(e,t){for(var n=-1,r=null==e?0:e.length;++n@]+@[^\s<>@.]+(\.[^\s<>@.]+)+$/,k=/[^\s<>@]+@[^\s<>@.]+(\.[^\s<>@.]+\w)/g,S="stripe.js/".concat(c),E="".concat(S,"; stripe-js-v3/").concat(c),C=("".concat(E,"; raw-card"),"".concat(E,"; raw-stripe-js-api"),"".concat(E,"; create-source-card-data"),"checkout"),P=("".concat(E,"; ").concat(C),"".concat(E,"; ").concat("payment-link","; ").concat(C),"".concat(E,"; hip"),"".concat(E,"; payment-element")),A=("".concat(P,"; deferred-intent"),"".concat(E,"; card-element"),"".concat(E,"; split-card-element"),"".concat(E,"; lpm-element"),"".concat(E,"; express-checkout-element"),"dashboard"),N="hip",I={elements_session:"elements_session",elements_assignment:"elements_assignment"}},6352:function(e,t,n){"use strict";n.d(t,{ej:function(){return i},d8:function(){return o}});var r=n(2024),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 p=o||"/",d=(n||"").replace(/[^!#-+\--:<-[\]-~]/g,encodeURIComponent),m="".concat(encodeURIComponent(t),"=").concat(d,";expires=").concat(u.toGMTString(),";path=").concat(p,";SameSite=").concat(s);return i&&(m+=";domain=".concat(i)),"https:"===a&&(m+=";secure"),document.cookie=m,m},i=function(e){var t=(0,r.sE)(document.cookie.split("; "),(function(t){var n=t.indexOf("=");try{return decodeURIComponent(t.substr(0,n))===e}catch(e){return!1}}));if(!t)return null;var n=t.indexOf("=");try{return decodeURIComponent(t.substr(n+1))}catch(e){return null}}},4020:function(e,t,n){"use strict";n.d(t,{Fe:function(){return a},mo:function(){return o}});var r={bif:1,clp:1,djf:1,gnf:1,jpy:1,kmf:1,krw:1,mga:1,pyg:1,rwf:1,vnd:1,vuv:1,xaf:1,xof:1,xpf:1,bhd:1e3,jod:1e3,kwd:1e3,omr:1e3,tnd:1e3},o=function(e){var t=r[e.toLowerCase()]||100;return{unitSize:1/t,fractionDigits:Math.ceil(Math.log(t)/Math.log(10))}},i=function(e,t){var n=o(t);return{result:e*n.unitSize,fractionDigits:n.fractionDigits}},a=function(e,t){var n=i(e,t),r=n.result,o=n.fractionDigits;return r.toFixed(o)}},6241:function(e,t,n){"use strict";n.d(t,{Fe:function(){return r.Fe},QT:function(){return o.Q},mo:function(){return r.mo}});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(6589),a=function(){function e(){var t=this;(0,r.Z)(this,e),this._state="pending",this._state="pending",this.promise=new i.J((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 d},SV:function(){return u},Xq:function(){return p},d3:function(){return _},mb:function(){return a},qW:function(){return h},yq:function(){return c}});var r=n(3324),o=n(8812),i=n(40),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}},p=function(){if(!document.body)throw new o.No("Stripe.js requires that your page has a element.");return document.body},d=function(e){return setTimeout(e,16)},m=function(e,t){return!!e.documentElement&&e.documentElement.contains(t)},f="isConnected"in window.Node.prototype?function(e,t){return t.isConnected&&t.ownerDocument===e}:m,h=function(e,t){return!m(e,t)&&f(e,t)},_=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 p},Dx:function(){return u},xz:function(){return v},qW:function(){return f.qW},a0:function(){return _},d3:function(){return f.d3},MV:function(){return y},gl:function(){return d},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,"")),p=parseFloat(t.toString().replace(/[^0-9.]/g,""));if("string"==typeof t&&/^(\d+|\d*\.\d+)px$/.test(t))s=p;else if("string"==typeof t&&/^(\d+|\d*\.\d+)em$/.test(t))s=p*l;else if("string"==typeof t&&/^(\d+|\d*\.\d+)%$/.test(t))s=p/100*l;else{if("string"!=typeof t||!/^[\d.]+$/.test(t)&&!/^\d*\.(px|em|%)$/.test(t))return"100%";s=l}var d=u*s+a,m="".concat(d,"px");return/^[0-9.]+px$/.test(m)?m:"100%"},c=n(40),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}))},p=function(e,t){var n=l();return n[(0,s.cx)(n,(function(t){return t===e||e.contains(t)}))+("previous"===t?-1:1)]},d=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(){d(n,t)}));return{lockedPromise:n,lockedElements:t,restoreFocus:r}},f=(n(6617),n(3534)),h=["button","checkbox","file","hidden","image","submit","radio","reset"],_=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===h.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(6589),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?E:a;return new k.J((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())}))}()}))},E=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 a}});var r=n(5671),o=n(136),i=n(9388),a=function(e){function t(e,o){var i;return(0,r.Z)(this,t),(i=n.call(this)).name="FetchError",i.type="fetch_error",i.message="Error fetching ".concat(o),i.requestUrl=o,"string"==typeof e?i.message+=": ".concat(e):(i.originalError=e,i.message+=": ".concat(e.message)),i}(0,o.Z)(t,e);var n=(0,i.Z)(t);return t}((0,n(7112).Z)(Error))},3973:function(e,t,n){"use strict";n.d(t,{N:function(){return c}});var r=n(5671),o=n(7326),i=n(136),a=n(9388),c=function(e){function t(e){var i;return(0,r.Z)(this,t),i=n.call(this,e),window.__stripeElementsController&&window.__stripeElementsController.reportIntegrationError(e),i.name="IntegrationError",Object.defineProperty((0,o.Z)(i),"message",{value:i.message,enumerable:!0}),i}(0,i.Z)(t,e);var n=(0,a.Z)(t);return t}((0,n(7112).Z)(Error))},8102:function(e,t,n){"use strict";var r=n(5671),o=n(136),i=n(9388);Error},51:function(e,t,n){"use strict";n.d(t,{F:function(){return a}});var r=n(5671),o=n(136),i=n(9388),a=function(e){function t(e){var o;return(0,r.Z)(this,t),(o=n.call(this,e)).name="NetworkError",o.type="network_error",o.requestUrl=e,o}(0,o.Z)(t,e);var n=(0,i.Z)(t);return 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))},9439:function(e,t,n){"use strict";n.d(t,{h:function(){return l}});var r=n(1413),o=n(6617),i=n(6589),a=n(8812),c=function(e){var t=e.data,n=e.contentType,r=void 0===n?"application/x-www-form-urlencoded":n,i=e.method,a=e.url,c="";return t&&"application/x-www-form-urlencoded"===r?c=(0,o.qC)(t):t&&"application/json"===r&&(c=JSON.stringify(t)),{requestUrl:"GET"===i&&c?"".concat(a,"?").concat(c):a,requestData:"GET"===i?"":c,contentType:r}},s=function(e){return new i.J((function(t,n){var o=e.method,s=e.headers,u=e.withCredentials,p=c(e),d=p.requestUrl,m=p.requestData,f=p.contentType,h=new XMLHttpRequest;u&&(h.withCredentials=u),h.open(o,d,!0),h.setRequestHeader("Accept","application/json"),h.setRequestHeader("Content-Type",f),h.json=function(){return new i.J((function(e,t){try{e(JSON.parse(h.responseText))}catch(e){t(new a.kp(e,d))}}))},s&&Object.keys(s).forEach((function(e){var t=s[e];"string"==typeof t&&h.setRequestHeader(e,t)})),h.onreadystatechange=function(){4===h.readyState&&(h.onreadystatechange=function(){},0===h.status?u?n(new a.F7(d)):l((0,r.Z)((0,r.Z)({},e),{},{withCredentials:!0})).then(t,n):t(h))};try{h.send(m)}catch(e){n(new a.kp(e,d))}}))},u=function e(t){return new i.J((function(n,o){var s=t.method,u=t.headers,l=void 0===u?{}:u,p=t.keepalive,d=t.withCredentials,m=t.priority,f=void 0===m?"auto":m,h=c(t),_=h.requestUrl,y=h.requestData,v={Accept:"application/json","Content-Type":h.contentType};l&&Object.keys(l).forEach((function(e){var t=l[e];"string"==typeof t&&(v[e]=t)})),window.fetch(_,{method:s,keepalive:p,headers:v,body:y||void 0,mode:"cors",credentials:d?"include":"omit",priority:f}).then((function(c){if(0===c.status){if(!d)return e((0,r.Z)((0,r.Z)({},t),{},{withCredentials:!0})).then(n,o);o(new a.F7(_))}return c.text().then((function(e){n({responseURL:c.url,status:c.status,json:function(){return i.J.resolve(JSON.parse(e))},getResponseHeader:function(e){return c.headers.get(e)||""},responseText:e})}))})).catch((function(e){o(new a.kp(e,_))}))}))},l=function(e){return"function"==typeof window.fetch?u(e):s(e)}},4044:function(e,t,n){"use strict";n.d(t,{D:function(){return i}});var r=n(1873),o=n(97),i=function(e){switch(e){case"CARD_ELEMENT":return(0,o.x)("elements-inner-card-6413269edd16069ef9fc6c53b944a2e9.html");case"CONTROLLER":return(0,o.x)("controller-851c68ad9b82d52822a3917017c0ddae.html");case"METRICS_CONTROLLER":return(0,o.x)("m-outer-93afeeb17bc37e711759584dbfc50d47.html");case"PAYMENT_REQUEST_ELEMENT":return(0,o.x)("elements-inner-payment-request-9b9b92ede35295ba334f8161b9bca897.html");case"PAYMENT_REQUEST_BROWSER":return(0,o.x)("payment-request-inner-browser-2715417b74d341f0234428d0f7b1ef1c.html");case"PAYMENT_REQUEST_GOOGLE_PAY":return(0,o.x)("payment-request-inner-google-pay-210d52615e0425b645b59a718a532414.html");case"IBAN_ELEMENT":return(0,o.x)("elements-inner-iban-9d8236013cf202e6ce7b6196c9bbb67c.html");case"IDEAL_BANK_ELEMENT":return(0,o.x)("elements-inner-ideal-bank-2af4ebe372a52f0f829692b14a58e32e.html");case"P24_BANK_ELEMENT":return(0,o.x)("elements-inner-p24-bank-7745ea01c10c6529a1c5622dd05ded83.html");case"AUTHORIZE_WITH_URL":return(0,o.x)("authorize-with-url-inner-9703b22ab6fee00644ed135ba3233204.html");case"STRIPE_3DS2_CHALLENGE":return(0,o.x)("three-ds-2-challenge-26790a43e9cb99beee86cd36f95c1eca.html");case"STRIPE_3DS2_FINGERPRINT":return(0,o.x)("three-ds-2-fingerprint-d997fe8310217ab22abc9dfd57b92395.html");case"AU_BANK_ACCOUNT_ELEMENT":return(0,o.x)("elements-inner-au-bank-account-2555956402333e70edfd1f043a897d34.html");case"FPX_BANK_ELEMENT":return(0,o.x)("elements-inner-fpx-bank-959afa9bb2dbb62f24bf90134f940e17.html");case"LIGHTBOX_APP":return(0,o.x)("lightbox-inner-1235d5d07872a3bca561dfad670fc498.html");case"ISSUING_CARD_NUMBER_DISPLAY_ELEMENT":return(0,o.x)("elements-inner-issuing-card-number-display-ff024f89d5c4633e3d50c53448718f41.html");case"ISSUING_CARD_COPY_BUTTON_ELEMENT":return(0,o.x)("elements-inner-issuing-card-copy-button-148ba97f8a66b3310605e233ec301249.html");case"ISSUING_CARD_CVC_DISPLAY_ELEMENT":return(0,o.x)("elements-inner-issuing-card-cvc-display-6d7d22b8cd4940b4eeb5b83f7d794dae.html");case"ISSUING_CARD_EXPIRY_DISPLAY_ELEMENT":return(0,o.x)("elements-inner-issuing-card-expiry-display-f4c2bf5411c14020aeba6a2e61e6de25.html");case"ISSUING_CARD_PIN_DISPLAY_ELEMENT":return(0,o.x)("elements-inner-issuing-card-pin-display-af00c1ef631543bb8f765bd79d36d9cb.html");case"EPS_BANK_ELEMENT":return(0,o.x)("elements-inner-eps-bank-dd1a3fe065c57e395df3b059307d7cb9.html");case"HCAPTCHA_APP":return(0,o.x)("hcaptcha-inner-c143332aec2615bab2885e35b2c0e373.html");case"NETBANKING_BANK_ELEMENT":return(0,o.x)("elements-inner-netbanking-bank-069e2f27934abcb42058e9c3204855f2.html");case"AFFIRM_MESSAGE_ELEMENT":return(0,o.x)("elements-inner-affirm-message-c3d8bacc86553d63c3ed72426385885b.html");case"AFFIRM_MESSAGE_MODAL_ELEMENT":return(0,o.x)("elements-inner-affirm-message-modal-fb864af6e2b3341e350db239bd18c28e.html");case"AFTERPAY_MESSAGE_MODAL_ELEMENT":return(0,o.x)("elements-inner-afterpay-message-modal-f3d4f13e020f7c9e58669d53a794b7de.html");case"PAYMENT_METHOD_MESSAGING_LEGACY_MODAL_ELEMENT":return(0,o.x)("elements-inner-payment-method-messaging-legacy-modal-f96d743e8da7fa6b8cc3c490148dae99.html");case"PAYMENT_METHOD_MESSAGING_MODAL_ELEMENT":return(0,o.x)("elements-inner-payment-method-messaging-modal-52130b2daaa0733f6521a30df431e643.html");case"META_PAY_INNER":return(0,o.x)("meta-pay-inner-42ad9ae04de62914db9479a7d9c3cb29.html");case"LINK_AUTHENTICATION_ELEMENT":return(0,o.x)("elements-inner-authentication-c0edc805be458ba0e6cce49538bffbf5.html");case"PAYMENT_ELEMENT":return(0,o.x)("elements-inner-payment-bc1d6d9a895291e5c232a20c3f7079b1.html");case"LINKED_ACCOUNTS_INNER":return(0,o.x)("linked-accounts-inner-f661593a44f007ba908a14459449f028.html");case"WECHAT_PAY_INNER":case"PAYNOW_INNER":case"PIX_INNER":case"PROMPTPAY_INNER":case"BACS_CONFIRMATION_INNER":return(0,o.x)("");case"BLIK_INNER":return(0,o.x)("blik-inner-d0054087a82e727053fdf37fb898fdd2.html");case"ADDRESS_ELEMENT":return(0,o.x)("elements-inner-address-12b25133a80294a7ffda090e57b21758.html");case"LINK_AUTOFILL_MODAL":return(0,o.x)("link-autofill-modal-inner-0621b0cecec7797e9418c0d98cdfe1a6.html");case"GOOGLE_MAPS_APP":return(0,o.x)("google-maps-inner-d198bb5627a114d70ce8d7b9e66fe06a.html");case"AUTOCOMPLETE_SUGGESTIONS_ELEMENT":return(0,o.x)("elements-inner-autocomplete-suggestions-602b9918d750a76632e59aba6c5d8840.html");case"ACH_BANK_SEARCH_RESULTS_ELEMENT":return(0,o.x)("elements-inner-ach-bank-search-results-925d7db0ab1232d803f418025ad69cd6.html");case"LINK_INFO_MODAL":return(0,o.x)("elements-inner-link-info-modal-f2106ce0c224c22058f48c6ba7fb2eed.html");case"LINK_PURCHASE_PROTECTION_MODAL":return(0,o.x)("elements-inner-link-purchase-protection-modal-c990d010f1462d2330b620d1e4a24eb9.html");case"LOADER_UI_APP":return(0,o.x)("elements-inner-loader-ui-8ee3c10d82e87e295b3f7a2ff7a0380f.html");case"CART_ELEMENT":return(0,o.x)("elements-inner-cart-544c9019d5cebd14ae3cbd759a9a7429.html");case"BACS_MANDATE_CONFIRMATION_APP":return(0,o.x)("bacs-mandate-confirmation-inner-a8e3dae9badf97cc693e05bc39c5892e.html");case"EXPRESS_CHECKOUT_ELEMENT":return(0,o.x)("elements-inner-express-checkout-d6b96046dfd2a1f54d5a13360a13aa98.html");case"BUY_BUTTON_APP":return(0,o.x)("buy-button-app.html");case"LINK_BUTTON_FOR_CARD_ELEMENT":return(0,o.x)("elements-inner-link-button-for-card-06c126b16a186cc734227e30afa2073b.html");case"PAYMENT_METHOD_MESSAGING_ELEMENT":return(0,o.x)("elements-inner-payment-method-messaging-1f4e528619423b7c260040e048fce2b8.html");case"IN_CONTEXT_INNER":return(0,o.x)("in-context-inner-e823f7aa1e273ddacd7e42bf9eed66ef.html");default:return(0,r.Rz)(e)}}},97:function(e,t,n){"use strict";n.d(t,{x:function(){return r}});var r=function(e){return"".concat("https://js.stripe.com/v3/").concat(e||"")}},5727:function(e,t,n){"use strict";n.d(t,{NC:function(){return a},i7:function(){return i},xS:function(){return o.x},$G:function(){return p},oi:function(){return l},jr:function(){return d}});var r=n(9776),o=n(97),i=function(e){var t={frameborder:"0",allowTransparency:"true",scrolling:"no",role:"presentation"},n=!r.D1;if(n&&(t.allow="payment *"),"STRIPE_3DS2_CHALLENGE"===e){var i="publickey-credentials-get ".concat((0,o.x)());t.allow=n?"payment *; ".concat(i):i}if("PAYMENT_REQUEST_GOOGLE_PAY"===e){t.sandbox=["allow-scripts","allow-forms","allow-popups","allow-popups-to-escape-sandbox","allow-same-origin"].join(" "),t.referrerpolicy="origin"}return t},a={CARD_ELEMENT:"CARD_ELEMENT",CONTROLLER:"CONTROLLER",METRICS_CONTROLLER:"METRICS_CONTROLLER",PAYMENT_REQUEST_ELEMENT:"PAYMENT_REQUEST_ELEMENT",PAYMENT_REQUEST_BROWSER:"PAYMENT_REQUEST_BROWSER",PAYMENT_REQUEST_GOOGLE_PAY:"PAYMENT_REQUEST_GOOGLE_PAY",IBAN_ELEMENT:"IBAN_ELEMENT",IDEAL_BANK_ELEMENT:"IDEAL_BANK_ELEMENT",P24_BANK_ELEMENT:"P24_BANK_ELEMENT",AUTHORIZE_WITH_URL:"AUTHORIZE_WITH_URL",STRIPE_3DS2_CHALLENGE:"STRIPE_3DS2_CHALLENGE",STRIPE_3DS2_FINGERPRINT:"STRIPE_3DS2_FINGERPRINT",AU_BANK_ACCOUNT_ELEMENT:"AU_BANK_ACCOUNT_ELEMENT",FPX_BANK_ELEMENT:"FPX_BANK_ELEMENT",LIGHTBOX_APP:"LIGHTBOX_APP",ISSUING_CARD_NUMBER_DISPLAY_ELEMENT:"ISSUING_CARD_NUMBER_DISPLAY_ELEMENT",ISSUING_CARD_COPY_BUTTON_ELEMENT:"ISSUING_CARD_COPY_BUTTON_ELEMENT",ISSUING_CARD_CVC_DISPLAY_ELEMENT:"ISSUING_CARD_CVC_DISPLAY_ELEMENT",ISSUING_CARD_EXPIRY_DISPLAY_ELEMENT:"ISSUING_CARD_EXPIRY_DISPLAY_ELEMENT",ISSUING_CARD_PIN_DISPLAY_ELEMENT:"ISSUING_CARD_PIN_DISPLAY_ELEMENT",EPS_BANK_ELEMENT:"EPS_BANK_ELEMENT",HCAPTCHA_APP:"HCAPTCHA_APP",NETBANKING_BANK_ELEMENT:"NETBANKING_BANK_ELEMENT",AFFIRM_MESSAGE_ELEMENT:"AFFIRM_MESSAGE_ELEMENT",AFFIRM_MESSAGE_MODAL_ELEMENT:"AFFIRM_MESSAGE_MODAL_ELEMENT",AFTERPAY_MESSAGE_MODAL_ELEMENT:"AFTERPAY_MESSAGE_MODAL_ELEMENT",PAYMENT_METHOD_MESSAGING_LEGACY_MODAL_ELEMENT:"PAYMENT_METHOD_MESSAGING_LEGACY_MODAL_ELEMENT",PAYMENT_METHOD_MESSAGING_MODAL_ELEMENT:"PAYMENT_METHOD_MESSAGING_MODAL_ELEMENT",AUTOCOMPLETE_SUGGESTIONS_ELEMENT:"AUTOCOMPLETE_SUGGESTIONS_ELEMENT",ACH_BANK_SEARCH_RESULTS_ELEMENT:"ACH_BANK_SEARCH_RESULTS_ELEMENT",LINK_AUTHENTICATION_ELEMENT:"LINK_AUTHENTICATION_ELEMENT",PAYMENT_ELEMENT:"PAYMENT_ELEMENT",LINKED_ACCOUNTS_INNER:"LINKED_ACCOUNTS_INNER",WECHAT_PAY_INNER:"WECHAT_PAY_INNER",PAYNOW_INNER:"PAYNOW_INNER",BLIK_INNER:"BLIK_INNER",PIX_INNER:"PIX_INNER",PROMPTPAY_INNER:"PROMPTPAY_INNER",ADDRESS_ELEMENT:"ADDRESS_ELEMENT",LINK_AUTOFILL_MODAL:"LINK_AUTOFILL_MODAL",LINK_INFO_MODAL:"LINK_INFO_MODAL",GOOGLE_MAPS_APP:"GOOGLE_MAPS_APP",LOADER_UI_APP:"LOADER_UI_APP",CART_ELEMENT:"CART_ELEMENT",BACS_MANDATE_CONFIRMATION_APP:"BACS_MANDATE_CONFIRMATION_APP",BACS_CONFIRMATION_INNER:"BACS_CONFIRMATION_INNER",META_PAY_INNER:"META_PAY_INNER",EXPRESS_CHECKOUT_ELEMENT:"EXPRESS_CHECKOUT_ELEMENT",BUY_BUTTON_APP:"BUY_BUTTON_APP",LINK_BUTTON_FOR_CARD_ELEMENT:"LINK_BUTTON_FOR_CARD_ELEMENT",PAYMENT_METHOD_MESSAGING_ELEMENT:"PAYMENT_METHOD_MESSAGING_ELEMENT",LINK_PURCHASE_PROTECTION_MODAL:"LINK_PURCHASE_PROTECTION_MODAL",IN_CONTEXT_INNER:"IN_CONTEXT_INNER"},c=n(1413),s=(n(1873),n(73)),u=n(4200),l=function(e){var t,n=e.controllerId,r=e.frameId,o=e.targetOrigin,i=e.type,a=o;if("controller"===i?t=(0,u.Hb)(r):"group"===i?t=(0,u.Hb)(n):"outer"===i||"hosted"===i?t=window.frames[r]:"inner"===i&&(a=a||"*",t=window.parent),a=a||s.jQ,t&&"function"==typeof t.postMessage){var l=e.message.delegate?{targetOrigin:a,delegate:e.message.delegate}:a;t.postMessage(JSON.stringify((0,c.Z)((0,c.Z)({},e),{},{__stripeJsV3:!0})),l)}},p=function(e){try{var t="string"==typeof e?JSON.parse(e):e;return t.__stripeJsV3?t:null}catch(e){return null}},d=function(e){return e}},40:function(e,t,n){"use strict";n.d(t,{AO:function(){return c},Ds:function(){return i},Kn:function(){return p},HP:function(){return a},tN:function(){return u},$M:function(){return s},_v:function(){return l},i3:function(){return d},pM:function(){return m}});var r=n(8812),o=n(6589),i=function(e,t){var n=null;return function(){window.clearTimeout(n);for(var r=arguments.length,o=new Array(r),i=0;i0&&void 0!==arguments[0]?arguments[0]:0;return new o.J((function(t){return setTimeout(t,e)}))},p=function(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)},d=function(e){return e.replace(/_./g,(function(e){return e[1].toUpperCase()}))},m=function(e){var t=e.trim().toLowerCase();return t?"".concat(t[0].toUpperCase()).concat(t.substring(1).replace(/ +./g,(function(e){return" ".concat(e.slice(-1).toUpperCase())}))):""};n(9776)},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.")}}},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}()},248:function(e,t,n){"use strict";n.d(t,{_b:function(){return c},GS:function(){return a},ke:function(){return s},ZX:function(){return u}});var r,o=n(4942),i=n(73),a={alipay:"alipay",affirm:"affirm",afterpay_clearpay:"afterpay_clearpay",au_becs_debit:"au_becs_debit",acss_debit:"acss_debit",bacs_debit:"bacs_debit",bancontact:"bancontact",blik:"blik",boleto:"boleto",card:"card",cashapp:"cashapp",customer_balance:"customer_balance",eps:"eps",fpx:"fpx",giropay:"giropay",grabpay:"grabpay",ideal:"ideal",klarna:"klarna",konbini:"konbini",mobilepay:"mobilepay",nz_bank_account:"nz_bank_account",oxxo:"oxxo",p24:"p24",pay_by_bank:"pay_by_bank",paypal:"paypal",sepa_debit:"sepa_debit",sofort:"sofort",south_korea_market:"south_korea_market",swish:"swish",three_d_secure:"three_d_secure",upi:"upi",us_bank_account:"us_bank_account",wechat_pay:"wechat_pay",paynow:"paynow",pix:"pix",promptpay:"promptpay",revolut_pay:"revolut_pay",netbanking:"netbanking",id_bank_transfer:"id_bank_transfer",link:"link",apple_pay:"apple_pay",google_pay:"google_pay",meta_pay:"meta_pay",demo_pay:"demo_pay",zip:"zip"},c=(r={},(0,o.Z)(r,i.Yj.auBankAccount,a.au_becs_debit),(0,o.Z)(r,i.Yj.card,a.card),(0,o.Z)(r,i.Yj.cardNumber,a.card),(0,o.Z)(r,i.Yj.cardExpiry,a.card),(0,o.Z)(r,i.Yj.cardCvc,a.card),(0,o.Z)(r,i.Yj.postalCode,a.card),(0,o.Z)(r,i.Yj.iban,a.sepa_debit),(0,o.Z)(r,i.Yj.idealBank,a.ideal),(0,o.Z)(r,i.Yj.fpxBank,a.fpx),(0,o.Z)(r,i.Yj.p24Bank,a.p24),(0,o.Z)(r,i.Yj.netbankingBank,a.netbanking),(0,o.Z)(r,i.Yj.epsBank,a.eps),r),s=function(e){return-1===i.sL.indexOf(e)},u=function(e,t){return null!=t?t:s(e)?null:c[e]||null}},6589:function(e,t,n){"use strict";n.d(t,{J:function(){return r.J}});var r=n(7802)},7802:function(e,t,n){"use strict";n.d(t,{J:function(){return s}});var r,o,i,a=n(1803),c=n.n(a),s=(n(8029),window.Promise&&null!==(r=window)&&void 0!==r&&null!==(o=r.Promise)&&void 0!==o&&null!==(i=o.prototype)&&void 0!==i&&i.finally?Promise:c())},3110:function(e){e.exports=function(e){var t=e.split("").map((function(e){return e.charCodeAt(0)})).reduce((function(e,t){return(e<<5)-e+t&(e<<5)-e+t}),0).toString();return"_".concat(t.replace(/[-.]/g,"_"))}},1823:function(e,t,n){"use strict";n.d(t,{l:function(){return o}});var r=n(6589),o=function(e){var t=!1;window.Promise||(t=!0,window.Promise=r.J);var n=e();return t&&window.Promise===r.J&&delete window.Promise,n}},2690:function(e,t,n){"use strict";n.d(t,{r:function(){return i}});var r=n(6835),o=n(6589),i=function(e){var t=0,n=[];return{acquire:function(){if(t0&&t=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]=c2&&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},sD:function(){return o},v_:function(){return c},w0:function(){return s}});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,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)},s=function(e){return e.split("?")[0].split("#")[0]}},2580:function(e,t,n){"use strict";n.d(t,{R:function(){return r}});var r=function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"absurd";throw new Error(e)}},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,{IN:function(){return i},MO:function(){return p},oQ:function(){return l},rX:function(){return a}});var r=n(7974),o={_componentName:r.Z_,_implementation:(0,r.mC)({_frame:(0,r.mC)({id:r.Z_})})},i=(0,r.mC)(o),a=function(e){var t=(0,r.ld)(i,e,"");return"error"===t.type?null:t.value},c={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.mC)({id:r.Z_,clientSecret:r.Z_,type:r.Z_}))),mode:(0,r.jt)((0,r.AG)(r.Z_))},s=(0,r.mC)(c),u={_elements:(0,r.CT)(i),_id:r.Z_,_isSubmitting:r.Xg,_commonOptions:s,_controller:(0,r.mC)({_id:r.Z_})},l=(0,r.mC)(u),p=function(e){var t=(0,r.ld)(l,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},IN:function(){return o.IN},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.R},Sl:function(){return c.Sl},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}},f=function(e){return{error:e,errorType:"full",type:"error"}},h=function(e,t,n){var r=new a.No(d(e,t,n));return f(r)},_=function(e,t,n){return{expected:e,actual:String(t),options:n,errorType:"mismatch",type:"error"}},y=function(e,t){return(0,i.Z)((0,i.Z)({},e),{},{path:[].concat((0,o.Z)(e.path),[t])})},v=function(e){return function(t,n){return void 0===t?m(t):e(t,n)}},g=function(e){return function(t,n){return null===t?m(t):e(t,n)}},b=function(e,t){return function(n,r){var o=function(e){var t=e.options.path.join(".")||"value";return{error:"".concat(t," should be ").concat(e.expected),actual:"".concat(t," as ").concat(e.actual)}},i=function(e,t,n){return f(new a.No("Invalid value for ".concat(e,": ").concat(t,". You specified ").concat(n,".")))},c=e(n,r),s=t(n,r);if("error"===c.type&&"error"===s.type){if("mismatch"===c.errorType&&"mismatch"===s.errorType){var u=o(c),l=u.error,p=u.actual,d=o(s),m=d.error,h=d.actual;return i(r.label,l===m?l:"".concat(l," or ").concat(m),p===h?p:"".concat(p," and ").concat(h))}if("mismatch"===c.errorType){var _=o(c),y=_.error,v=_.actual;return i(r.label,y,v)}if("mismatch"===s.errorType){var g=o(s),b=g.error,w=g.actual;return i(r.label,b,w)}return f(c.error)}return"valid"===c.type?c:s}},w=function(e,t){return function(n,r){return n instanceof e?m(n):_("a ".concat(t," instance"),n,r)}},k=function(e,t){return function(n,r){var o=(0,c.sE)(e,(function(e){return e===n}));if(void 0===o){var i=t?"a recognized string":"one of the following strings: ".concat(e.join(", "));return _(i,n,r)}return m(o)}},S=function(e){return function(t,n){return"string"==typeof t&&0===t.indexOf(e)?m(t):_("a string starting with ".concat(e),t,n)}},E=function(e,t){return function(n,r){return"string"==typeof n&&n.length>=e&&n.length<=t?m(n):_(e===t?"a string of ".concat(e," characters"):"a string with ".concat(e," to ").concat(t," characters"),n,r)}},C=function(){for(var e=arguments.length,t=new Array(e),n=0;n=e&&i<=t?m(i):_("a number from ".concat(e," to ").concat(t),n,r)}},x=function(e){return function(t,n){var r=M(t,n);if("error"===r.type)return r;var o=Number(r.value);return"string"==typeof t&&o>e?m(o):_("a number greater than ".concat(e),t,n)}},L=function(e){return function(t,n){var r=M(t,n);if("error"===r.type)return r;var o=Number(r.value);return"string"==typeof t&&o>=e?m(o):_("a number greater than or equal to ".concat(e),t,n)}},B=function(e,t){return function(n,r){return"number"==typeof n&&n>=e&&n<=t?m(n):_("a number from ".concat(e," to ").concat(t),n,r)}},D=function(e){return function(t,n){return"number"==typeof t&&t>e?m(t):_("a number greater than ".concat(e),t,n)}},q=function(e){return function(t,n){return"number"==typeof t&&t>=e?m(t):_("a number greater than or equal to ".concat(e),t,n)}},F=function(e,t){return function(n,r){return n===e?m(e):_(t||String(e),n,r)}},G=function(e){return function(t,n){return"number"==typeof t&&t===parseInt(t,10)&&(!e||t>=0)?m(t):_(e?"a positive amount in the currency's subunit":"an amount in the currency's subunit",t,n)}},U=function(e,t){return G(!1)(e,t)},z=function(e,t){return G(!0)(e,t)},H=function(e,t){if(e&&"object"==typeof e){var n=e;if("function"==typeof n.getTime&&n.getTime()>=Date.now()-1e3)return m(n)}return _("a future Date",e,t)},K=function(e,t){return e&&"object"==typeof e?m(e):_("an object",e,t)},Y=function(e,t){return"function"==typeof e?m(e):_("function",e,t)},J=function(e){return function(t,n){return Array.isArray(t)?t.map((function(t,r){return e(t,y(n,String(r)))})).reduce((function(e,t){return"error"===e.type?e:"error"===t.type?t:m([].concat((0,o.Z)(e.value),[t.value]),[].concat((0,o.Z)(e.warnings),(0,o.Z)(t.warnings)))}),m([])):_("array",t,n)}},W=function(e,t){return function(n,r){var o=J(e)(n,r);return"error"===o.type?o:o.value.lengths||d>u)return 0===o?r:i;if(n(r))return r;p>a&&(i=r,s=p),d>c&&(i=r,u=d),o+=1,r=r.parentElement}return i}(e,t)}catch(e){r=null}n(oe(r,e))}))}))}))},ae=n(40),ce=n(3367),se={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",visibility:"visible"},ue={display:"block",position:"absolute",top:"50%",right:"0",width:"0",margin:"0",padding:"0",border:"0",background:"none",opacity:"1",overflow:"hidden",visibility:"visible"},le=function(e){var t,n=e.isOverride,r=e.betas,o=e.parent,a=e.frame,c=e.locale,s=void 0===c?"auto":c,u=e.controller,l=e.style,p=e.iconStyle,d=e.disabled,m=e.onSubmit,f=e.onLoad,h=e.onError,_=(0,ce.NG)(),y=(0,ce.lT)(),g=null,w=(0,ne.Nj)(s),k=!1,S="",E=null,C=(0,te.D)("LINK_BUTTON_FOR_CARD_ELEMENT"),A=document.createElement("iframe");A.setAttribute("frameborder","0"),A.setAttribute("allowTransparency","true"),A.setAttribute("scrolling","no"),(0,v.yq)(A,se),A.src="".concat(C,"#").concat((0,b.qC)({locale:w,style:l,iconStyle:p,disabled:d,betas:r}));var N,I=document.createElement("div");I.appendChild(A),(0,v.yq)(I,ue),n&&!document.getElementById("test-mode-banner")&&((N=document.createElement("marquee")).id="test-mode-banner",N.innerText="Link in Card Test Mode",(0,v.yq)(N,{position:"fixed",left:"0",right:"0",top:"0",color:"#fff","background-color":"#33ddb3","z-index":"9999999"}),document.body.appendChild(N));var M=function(e){var t,n,r=e.data,o=e.origin;if(e.source===A.contentWindow&&o===P.jQ&&-1!==(null===(t=r.action)||void 0===t?void 0:t.indexOf("card-element-link")))switch(r.action){case"card-element-link-load":k=!0,g&&(O(g),g=null),Z(),f();break;case"card-element-link-measurements":a.send({action:"stripe-link-in-card-measurements",payload:r.payload});break;case"card-element-link-clear":a.send({action:"stripe-internal-link-clear",payload:{}});break;case"card-element-link-focus":a.send({action:"stripe-user-link-in-card-focus",payload:{isFocused:r.payload.isFocused}});break;case"card-element-link-click":var c={name:null,email:null,phoneCountry:null,phoneNumber:null};if("link-pay"===r.payload.type||"link-save"===r.payload.type)try{c=_()}catch(e){u.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-use"===r.payload.type&&E)try{var s=y("dryrun"===E,"card-element-link-use");a.send({action:"stripe-link-prefill-selectors",payload:s})}catch(e){u.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})}0,a.send({action:"stripe-user-link-in-card-click",payload:{locale:w||"en",prefill:c,type:r.payload.type,isVisible:r.payload.isVisible,isSecureClick:r.payload.isSecureClick,publishableKey:u._apiKey,stripeAccount:null!==(n=u._stripeAccount)&&void 0!==n?n:null,stripeJsId:u._stripeJsId,mids:u.mids()}});break;case"card-element-link-update-styles":var l=r.payload,p=l.wrapperStyles,d=l.frameStyles;(0,v.yq)(I,(0,i.Z)((0,i.Z)({},ue),p)),(0,v.yq)(A,(0,i.Z)((0,i.Z)({},se),d));break;case"card-element-link-error":h(r.payload.reason||"");break;case"card-element-link-report":u.report(r.payload.event,(0,i.Z)({},r.payload.data));break;case"card-element-link-submit":m()}},T=function(e){var t;null==A||null===(t=A.contentWindow)||void 0===t||t.postMessage(e,P.jQ)},R=function(e){var t=e.isOpen;T({action:"card-element-link-popup-toggled",payload:{isOpen:t}})},O=function(e){k?(T({action:"card-element-link-user-update",payload:e}),e.locale&&(w=(0,ne.Nj)(e.locale))):g=(0,i.Z)((0,i.Z)({},g),e)},Z=(0,ae.$M)((function(){ie(o,"card").then((function(e){"frame"===e.source&&u.report("link_in_card.outer_wrapper_not_found");var n=function(){o.style.setProperty("--stripeElementWidth","".concat(o.getBoundingClientRect().width,"px"))};n(),window.ResizeObserver&&(t=new ResizeObserver(n)).observe(o),T({action:"card-element-link-outer-measurements",payload:e})}))})),j=function(){T({action:"card-element-link-payment-error"})},x=function(){T({action:"card-element-link-focus-button"})},L=function(e){var t=e.prefillDataCollection;E=t};return a._on("outer-link-card-popup-toggled",R),a._on("outer-link-card-user-update",O),a._on("outer-link-card-payment-error",j),a._on("outer-update-link-prefill-data-collection",L),A.addEventListener("focus",x,!1),window.addEventListener("message",M,!1),null==o||o.appendChild(I),u.report("link_in_card.mount_link_frame"),{unmount:function(){var e;T({action:"card-element-link-unmount",payload:{}}),a._off("outer-link-card-popup-toggled",R),a._off("outer-link-card-user-update",O),a._off("outer-link-card-payment-error",j),a._off("outer-update-link-prefill-data-collection",L),A.removeEventListener("focus",x,!1),window.removeEventListener("message",M,!1),null===(e=t)||void 0===e||e.disconnect(),null==o||o.removeChild(I),u.report("link_in_card.unmount_link_frame")},updateButton:function(e){S=e,T({action:"card-element-link-state-change",payload:{nextLinkState:e}})},hasLoaded:function(){return k},getActiveButton:function(){return S},setLinkToken:function(e){T({action:"card-element-link-token-received",payload:{token:e}})},setFocusable:function(e){A.setAttribute("tabIndex",e?"0":"-1")},updateUserOptions:O,updateCardPaymentError:j}},pe={base:"StripeElement",focus:"StripeElement--focus",invalid:"StripeElement--invalid",complete:"StripeElement--complete",empty:"StripeElement--empty",webkitAutofill:"StripeElement--webkit-autofill"},de="#faffbd",me=function(e){return parseFloat(e.toFixed(1))},fe=function(e){return/^\d+(\.\d*)?px$/.test(e)},he=function(){function e(t){var n,r,o=this;(0,c.Z)(this,e),this.focus=function(){if(o._isIssuingDisplayElement())throw new E.No("Cannot call focus() on an ".concat(o._componentName," Element."));document.activeElement&&document.activeElement.blur&&document.activeElement.blur(),o._fakeInput.focus()},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,v.yq)(o._fakeInput,F.ZS),o._restrictFocusToCardOnly(),o._linkButtonFrame.unmount(),o._linkButtonFrame=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,v.yq)(o._fakeInput,(0,i.Z)((0,i.Z)({},F.ZS),{},{"z-index":"-1"})):(0,v.yq)(o._fakeInput,F.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()}};var a=t.options,s=t.component,u=t.listenerRegistry,l=t.elementTimings,p=t.emitEvent,d=t.getParent,m=t.hasRegisteredListener,f=(0,S.CE)(a,["loader","appearance","clientSecret"]),h=f.controller,y=f.componentName,g=f.publicOptions,b=f.betas;this._betas=b,this._componentName=y,this._component=s,this._controller=h,this._listenerRegistry=u,this._emitEvent=p,this._getParent=d,this._hasRegisteredListener=m;var w=(0,_.Gu)(B,g||{},"create()"),k=w.value;w.warnings.forEach((function(e){return o._controller.warn(e)}));var C=k.paymentRequest,P=k.classes,A=k.issuingCard,N=null===(n=k.style)||void 0===n||null===(r=n.paymentRequestButton)||void 0===r?void 0:r.height;this._cachedOptions={style:{paymentRequestButton:{height:"string"==typeof N?N:void 0}}};var I,M="paymentRequestButton"===this._componentName;if(M){if(!C)throw new E.No("You must pass in a stripe.paymentRequest object in order to use this Element.");this._paymentRequest=C;var T=f.locale;this._paymentRequest._registerElement(),this._paymentRequest._updateLocale(T)}if(this._isIssuingDisplayElement()){var R=0===(b||[]).length;if(!A)throw new Error("You must pass in an ID to the issuingCard option in order to use this Element.");if(R){if(!("nonce"in k)||!("ephemeralKeySecret"in k))throw new Error("You must set the nonce and ephemeralKeySecret options to use this Element.")}else if(I=A,-1===X.indexOf(I))throw new Error("Issuing card ".concat(A," has not been retrieved."))}this._createElement(f,k,l),this._classes=pe,this._computeCustomClasses(P||{}),this._lastBackgroundColor="",this._focused=!1,this._empty=!M,this._invalid=!1,this._complete=!1,this._autofilled=!1,this._hasUnmounted=!1,this._lastSubmittedAt=null}return(0,s.Z)(e,[{key:"update",value:function(e){var t=this,n=(0,_.Gu)(B,e||{},"element.update()"),r=n.value;if(n.warnings.forEach((function(e){return t._controller.warn(e)})),r){var o,a,c={style:r.style,iconStyle:r.iconStyle,disabled:r.disabled},s=null===(o=r.style)||void 0===o||null===(a=o.paymentRequestButton)||void 0===a?void 0:a.height,u={style:{paymentRequestButton:{height:"string"==typeof s?s:void 0}}};this._cachedOptions=(0,S.PM)(this._cachedOptions,u),this._linkButtonFrame?this._linkButtonFrame.updateUserOptions(c):this._queuedLinkButtonFrameUpdates=(0,i.Z)((0,i.Z)({},this._queuedLinkButtonFrameUpdates),c);var l=r.classes,p=(0,h.Z)(r,["classes"]);l&&(this._removeClasses(),this._computeCustomClasses(l),this._updateClasses()),this._updateFrameHeight(r),Object.keys(p).length&&(this._frame.update(p),this._secondaryFrame&&this._secondaryFrame.update(p))}}},{key:"blur",value:function(){if(this._isIssuingDisplayElement())throw new E.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(){this._hasUnmounted=!0;var e=this._getParent(),t=this._label;e&&(this._listenerRegistry.removeEventListener(e,"click",this.focus),this._removeClasses()),t&&(this._listenerRegistry.removeEventListener(t,"click",this.focus),this._label=null),this._secondaryFrame&&(this._secondaryFrame.unmount(),this._listenerRegistry.removeEventListener(window,"click",this._handleOutsideClick)),this._unmountLinkButtonFrame(),this._fakeInput.disabled=!0,this._frame.unmount()}},{key:"mount",value:function(){if((0,v.qW)(document,this._component)){this._controller.report("user_error.shadow_dom_mount",{element:this._componentName});var e=function(){throw new E.No("Elements cannot be mounted in a ShadowRoot. Please mount in the Light DOM.")};"test"===this._controller.keyMode()?e():setTimeout(e,0)}if(this._paymentRequest){if(!this._paymentRequest._canMakePaymentResolved)throw new E.No("For the paymentRequestButton Element, you must first check availability using paymentRequest.canMakePayment() before mounting the Element.");if(!this._paymentRequest._activeBackingLibraryName)throw new E.No("The paymentRequestButton Element is not available in the current environment.")}this._mountTimestamp=new ee.E,this._findPossibleLabel(),this._updateClasses(),this._hasUnmounted&&"paymentRequestButton"===this._componentName&&this._frame.send({action:"stripe-cached-options-remount",payload:this._cachedOptions})}},{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,v.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,v.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(!pe[n])throw new E.No("".concat(n," is not a customizable class name.\nYou can customize: ").concat(Object.keys(pe).join(", ")));var r=e[n]||pe[n];t[n]=r.replace(/\./g," ")})),this._classes=(0,i.Z)((0,i.Z)({},this._classes),t),this}},{key:"_setupEvents",value:function(e,t,n){var r,o=this,c=e.stripeJsLoadTimestamp,s=(e.stripeCreateTimestamp,e.groupCreateTimestamp),u=e.createTimestamp,l=null,p=!1,d=!1,m={stripeJsLoad:c.getAsPosixTime(),stripeCreate:u.getAsPosixTime(),groupCreate:s.getAsPosixTime(),create:u.getAsPosixTime()};this._controller.deferredCanMakePaymentResponse.promise.then((function(e){o._frame.send({action:"stripe-can-make-payment-response",payload:e})})),this._frame._on("outer-link-card-user-update",(function(e){var t=e.locale;!o._linkButtonFrame&&t&&(o._queuedLinkButtonFrameUpdates=(0,i.Z)((0,i.Z)({},o._queuedLinkButtonFrameUpdates),{},{locale:t}))})),this._frame._on("outer-link-card-token",(function(e){var t,n=e.token,r=e.shouldEmitNetwork;null!==(t=o._linkButtonFrame)&&void 0!==t&&t.hasLoaded()?(o._linkButtonFrame.setLinkToken(n),r&&o._hasRegisteredListener("networkschange")&&o._emitNetworksChangeEvent(null!=n&&n.cardBrand?[null==n?void 0:n.cardBrand]:[],!1)):(l=n,d=r)})),this._frame._on("outer-link-card-payment-error",(function(){var e;null!==(e=o._linkButtonFrame)&&void 0!==e&&e.hasLoaded()?o._linkButtonFrame.updateCardPaymentError():p=!0})),this._frame._on("outer-link-card-button",(function(e){var t,n=e.nextLinkState;null!==(t=o._linkButtonFrame)&&void 0!==t&&t.hasLoaded()?(o._linkButtonFrame.updateButton(n),o._handleLinkStateChangeFocusBehavior(n)):r=n})),this._frame._on("outer-link-card-mount",(function(e){var i,a,c,s,u,m=e.isOverride;o._linkButtonFrame=le({isOverride:m,betas:o._betas,frame:o._frame,parent:o._component,locale:(null===(i=o._queuedLinkButtonFrameUpdates)||void 0===i?void 0:i.locale)||t.locale,controller:o._controller,style:(null===(a=o._queuedLinkButtonFrameUpdates)||void 0===a?void 0:a.style)||(null==n?void 0:n.style),iconStyle:(null===(c=o._queuedLinkButtonFrameUpdates)||void 0===c?void 0:c.iconStyle)||(null==n?void 0:n.iconStyle),disabled:null!=(null===(s=o._queuedLinkButtonFrameUpdates)||void 0===s?void 0:s.disabled)?null===(u=o._queuedLinkButtonFrameUpdates)||void 0===u?void 0:u.disabled:null==n?void 0:n.disabled,onSubmit:function(){o._frame._emit("submit")},onLoad:function(){var e,t;r&&(null===(e=o._linkButtonFrame)||void 0===e||e.updateButton(r),o._handleLinkStateChangeFocusBehavior(r),r="");if(l){var n,i,a;if(null===(n=o._linkButtonFrame)||void 0===n||n.setLinkToken(l),d&&o._hasRegisteredListener("networkschange"))o._emitNetworksChangeEvent(null!==(i=l)&&void 0!==i&&i.cardBrand?[null===(a=l)||void 0===a?void 0:a.cardBrand]:[],!1);l=null,d=!1}p&&(null===(t=o._linkButtonFrame)||void 0===t||t.updateCardPaymentError(),p=!1)},onError:function(e){o._frame.send({action:"stripe-link-in-card-eject",payload:{reason:e}}),o._unmountLinkButtonFrame()}})})),this._frame._on("outer-link-card-unmount",(function(){return o._unmountLinkButtonFrame()}));var f=(0,ae.$M)((function(e){var t=e.matchFrame;o._frame.send({action:"stripe-timings",payload:{timestamps:m,matchFrame:t}})}));if(this._frame._on("load",(function(e){var t=e.source,n=o._getParent(),r=G(n),i=o._paymentRequest?o._paymentRequest._buttonTypeName:null,a=o._paymentRequest?o._paymentRequest._secondaryButtonTypeName:null;o._mountTimestamp&&(m.mount=o._mountTimestamp.getAsPosixTime());var c=function(e,n,c){o._frame.send({action:"stripe-user-mount",payload:{rtl:r,paymentRequestButtonType:i,secondaryPaymentRequestButtonType:a,linkExperimentAssignments:e,arb_id:n,outerBorderRadius:c}}),f({matchFrame:t===o._frame._iframe.contentWindow})};if(-1!==[i,a].indexOf("LINK")){var s=o._controller.action.retrieveLinkConfig(),u=n?ie(n,"paymentRequestButton"):Z.J.resolve();Z.J.all([s,u]).then((function(e){var t,n,r,o,i=(0,O.Z)(e,2),a=i[0],s=i[1];"object"===a.type&&(t=null===(r=a.object.experiments)||void 0===r?void 0:r.experiment_assignments,n=null===(o=a.object.experiments)||void 0===o?void 0:o.arb_id);c(t,n,null==s?void 0:s.outerBorderRadius)}))}else c()})),this._secondaryFrame){var h=this._secondaryFrame;h._on("load",(function(e){var t=e.source;o._mountTimestamp&&(m.mount=o._mountTimestamp.getAsPosixTime()),h.send({action:"stripe-user-mount",payload:{rtl:!1,paymentRequestButtonType:null}}),h.send({action:"stripe-timings",payload:{timestamps:m,matchFrame:t===h._iframe.contentWindow}})}))}this._frame._on("redirectfocus",(function(e){var t=e.focusDirection,n=(0,v.dh)(o._component,t);n&&n.focus()})),this._frame._on("focus",(function(){(o._isActiveLinkButton("link-pay")||o._isActiveLinkButton("link-save")||o._isActiveLinkButton("link-use"))&&o._restrictFocusToLinkFrameOnly(),o._focused=!0,o._updateClasses()})),this._frame._on("blur",(function(){o._isActiveLinkButton("link-pay")?o._restrictFocusToCardOnly():(o._isActiveLinkButton("link-save")||o._isActiveLinkButton("link-use"))&&o._allowFrameAndCardFocus(),o._focused=!1,o._updateClasses(),o._lastSubmittedAt&&"paymentRequestButton"===o._componentName&&(o._controller.report("payment_request_button.sheet_visible",{latency:o._lastSubmittedAt.getElapsedTime()}),o._lastSubmittedAt=null)})),this._frame._on("submit",(function(e){if("paymentRequestButton"===o._componentName){o._lastSubmittedAt=new ee.E;var t=!1,n=!1;(0,V.Z)(),o._emitEvent("click",{preventDefault:function(){o._controller.report("payment_request_button.default_prevented"),t&&o._controller.warn("event.preventDefault() was called after the payment sheet was shown. Make sure to call it synchronously when handling the `click` event."),n=!0}}),!n&&o._paymentRequest&&(o._paymentRequest._updateLastClickedButtonPosition(null==e?void 0:e.buttonPosition),o._paymentRequest._elementShow(),t=!0)}else o._emitEvent("submit"),o._formSubmit()})),["ready","focus","blur","escape","click"].forEach((function(e){o._frame._on(e,(function(){o._emitEvent(e)}))})),this._frame._on("change",(function(e){(0,V.Z)();var t={},n=M._0[o._componentName]||[];["error","value","empty","complete"].concat((0,a.Z)(n)).forEach((function(n){return t[n]=e[n]})),o._emitEvent("change",t),o._empty=t.empty,o._invalid=!!t.error,o._complete=t.complete,o._updateClasses()})),this._frame._on("__privateIntegrationError",(function(e){var t=e.message;o._emitEvent("__privateIntegrationError",{message:t})})),this._frame._on("networkschange-start",(function(){o._hasRegisteredListener("networkschange")&&o._controller.action.isCardMetadataRequired({groupId:t.groupId}).then((function(e){return e&&o._emitNetworksChangeEvent(null,!0),o._controller.action.retrieveCardNetworks({groupId:t.groupId})})).then((function(e){e&&o._emitNetworksChangeEvent(e,!1)}))})),this._frame._on("dimensions",(function(e){if("paymentRequestButton"!==o._componentName){var t=o._getParent();if(t){var n=(0,v.Dx)(t,null);if(n){var r=parseFloat(n.getPropertyValue("height")),i=e.height;if("border-box"===n.getPropertyValue("box-sizing")){var a=parseFloat(n.getPropertyValue("padding-top")),c=parseFloat(n.getPropertyValue("padding-bottom"));r=r-parseFloat(n.getPropertyValue("border-top"))-parseFloat(n.getPropertyValue("border-bottom"))-a-c}var s=me(r),u=me(i);0!==r&&s1&&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||W.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,p="string"==typeof s?s:void 0,d="string"==typeof u?u:void 0;if(p&&!fe(p)&&this._controller.warn("The fontSize style you specified (".concat(p,") 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||p){var m=-1===P.T2.indexOf(this._componentName)?void 0:d||this._lastPadding,f=(0,v.Tf)(l||this._lastHeight,p||this._lastFontSize,m);this._frame.updateStyle({height:f}),this._lastFontSize=p||this._lastFontSize,this._lastHeight=l||this._lastHeight,this._lastPadding=m}}}},{key:"_createElement",value:function(e,t,n){var r=this,o=(e.controller,e.publicOptions,e.componentName),a=e.groupId,c=(e.storeReadyPromise,(0,h.Z)(e,["controller","publicOptions","componentName","groupId","storeReadyPromise"])),s=(t.classes,t.paymentRequest,(0,h.Z)(t,["classes","paymentRequest"])),u=this._component,l=H(z.Kb);(0,v.yq)(u,J);var p=G(document.body),d=q[o],m=(0,i.Z)((0,i.Z)((0,i.Z)({},c),s),{},{rtl:p}),f=this._controller.createElementFrame(d,o,a,m);if(f._on("load",(function(){l.disabled=!1})),this._listenerRegistry.addEventListener(l,"focus",(function(){f.focus()})),f.appendTo(u),M._y[o]){var _=M._y[o].secondary,y=this._controller.createSecondaryElementFrame(d,_,o,a,m);y&&y.on&&y.on("height-change",(function(e){y.updateStyle({height:"".concat(e.height,"px")})})),this._secondaryFrame=y,y.appendTo(u),this._listenerRegistry.addEventListener(window,"click",(function(){return r._handleOutsideClick()}))}if(u.appendChild(l),g.Ah&&o!==P.Yj.paymentRequestButton){var b=function(){var e=H(z.tk);return e.setAttribute("tabindex","-1"),e}();u.appendChild(b)}this._frame=f,this._fakeInput=l,this._setupEvents(n,e,t),this._updateFrameHeight(t,!0)}}]),e}(),_e=he,ye={amount:_.Rx,currency:(0,_.kw)("USD","CAD"),logoColor:(0,_.jt)((0,_.kw)("primary","black","white")),fontColor:(0,_.jt)(_.Z_),fontSize:(0,_.jt)(_.Z_),textAlign:(0,_.jt)(_.Z_),stripeMerchantId:(0,_.jt)(_.Z_)},ve=(0,_.mC)(ye),ge=n(1823),be=function(){return(0,ge.l)((function(){return n.e(1).then(n.bind(n,6167))}))},we=function(e){var t,r=e.options,o=(0,h.Z)(e,["options"]),c=e.emitEvent,s=e.listenerRegistry,u=r.controller,l=r.componentName,p=r.publicOptions,d=r.groupId,m=r.locale,f=new ee.E,y=function(e){var t=(0,_.Gu)(ve,e||{},"create()"),n=t.value,r=t.warnings;if(!Math.floor(n.amount)===n.amount)throw new E.No("'Amount' must be a whole integer number that represents the lowest denomination (cents).");return r.forEach((function(e){return u.warn(e)})),n},v=y(p),g=function(e,n){return e.apply(void 0,[t].concat((0,a.Z)(n)))},b=[],w=function(e){return function(){for(var n=arguments.length,r=new Array(n),o=0;o-1&&r.keyMode()===nt.Kl.unknown)throw new E.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=et(s,a||{},"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 E.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 d=jt((0,i.Z)((0,i.Z)({},n),{},{options:(0,i.Z)((0,i.Z)({},c),{},{controller:r,componentName:s,publicOptions:u.value})})),m=d.update,f=(0,h.Z)(d,["update"]);return(0,i.Z)({update:function(e){var n=et(s,e||{},"".concat(s,".update()"),!0,t.betas);n.warnings.forEach((function(e){return r.warn(e)})),m(n.value)}},f)},Lt=function(e){var t,r=e.emitEvent,o=e.options,c=o.controller,s=o.locale,u=o.publicOptions,l=s?(0,ne.jR)(s):"en",p=new ee.E,d=function(e){var t=(0,_.Gu)(Ae,e||{},"create()"),n=t.value;return t.warnings.forEach((function(e){return c.warn(e)})),n},m=d(u),f=function(e,n){return e.apply(void 0,[t].concat((0,a.Z)(n)))},h=[],y=function(e){return function(){for(var n=arguments.length,r=new Array(n),o=0;o0&&void 0!==arguments[0]?arguments[0]:{},o=n.reason,i=void 0===o?"fail":o,a="invalid_shipping_address"===i?new window.ApplePayError("shippingContactInvalid"):new window.ApplePayError("unknown");e.completePayment({status:Dn,errors:[a]}),t.action.expressCheckoutConfirmEnd({groupId:r})},billingDetails:f,shippingAddress:p?{name:null!==(i=qn(s))&&void 0!==i?i:"",address:p}:void 0,shippingRate:h};t.action.setExpressCheckoutConfirmData({groupId:r,shippingContact:{name:qn(s),address:l,phone:null},paymentMethodData:{type:w.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(_)}))}))})))};return{shouldShowButton:function(e){return t.action.shouldShowEceButton({groupId:r,shouldShowButton:e,button:"applePay"})},clickHandler:function(e,n){var o,l,d,m=window.ApplePaySession;if(!m)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");var f=(null===(o=n.business)||void 0===o?void 0:o.name)||e.businessName,h=e.currency,_=e.pending;u.total=e.amount,u.businessName=f,u.currency=h,u.pending=_,u.shippingRates=n.shippingRates,u.selectedShippingRate=null===(l=n.shippingRates)||void 0===l?void 0:l[0].id,u.allowedShippingCountries=n.allowedShippingCountries,u.lineItems=null===(d=n.lineItems)||void 0===d?void 0:d.map((function(e){var t=e.amount,n=e.name;return Un(t,n,h,_)})),function(e){var t=e.amount,n=e.billingAddressRequired,r=e.businessName,o=e.merchantCountry,i=e.currency,c=e.emailRequired,s=e.lineItems,u=e.pending,l=e.phoneNumberRequired,p=e.shippingAddressRequired,d=e.shippingRates,m=e.applePay,f=e.defaultBillingAgreement,h=e.applePayTokenRevokeWebhookUrl,_=e.warn,y=e.localizeString,v=e.betas,g=e.blockedCardBrands,b=[].concat((0,a.Z)(c?["email"]:[]),(0,a.Z)(l?["phone"]:[]),(0,a.Z)(p?["postalAddress"]:[])),w=n?["postalAddress"]:[],S=null==d?void 0:d.map((function(e){return Hn(y,e,i)}));return Z.J.all(null!=S?S:[]).then((function(e){var n=null==s?void 0:s.map((function(e){var t=e.amount,n=e.name;return Un(t,n,i,u)})),a=(m||{recurringPaymentRequest:void 0}).recurringPaymentRequest,c=((0,k.uN)(v,k.M4.ece_apple_pay_deferred_payment_card_funding_beta_1)&&(null==m?void 0:m.deferredPaymentRequest)?m:{deferredPaymentRequest:void 0}).deferredPaymentRequest,l=["supports3DS"];return null!=m&&m.cardFunding&&l.push(m.cardFunding),(0,k.uN)(v,"cup_apple_pay_beta_1")&&l.push("supportsEMV"),{countryCode:o,currencyCode:i.toUpperCase(),lineItems:n,merchantCapabilities:l,requiredBillingContactFields:w,requiredShippingContactFields:b,shippingMethods:e.length?e:void 0,supportedNetworks:zn(o,v,i,g),total:Un(t,r,i,u),recurringPaymentRequest:(0,Ln.jQ)({recurringPaymentRequest:a,currency:i,pending:u,defaultBillingAgreement:f,applePayTokenRevokeWebhookUrl:h,warn:_}),deferredPaymentRequest:(0,Ln.sI)({deferredPaymentRequest:c,currency:i,pending:u,defaultBillingAgreement:f,applePayTokenRevokeWebhookUrl:h,warn:_})}}))}((0,i.Z)((0,i.Z)((0,i.Z)({},e),n),{},{businessName:f,warn:t.warn,localizeString:function(e,n){return t.action.unsafeLocalizeString({message:e,data:n})},betas:c,blockedCardBrands:s})).then((function(e){var n;u.isUsingRecurringPaymentRequest=!!e.recurringPaymentRequest,u.recurringPaymentRequestBillingAgreement=null===(n=e.recurringPaymentRequest)||void 0===n?void 0:n.billingAgreement;var o=new m(4,e);u.privateSession=o,p(o,f),o.begin(),u.isPaymentSheetShowing=!0,t.action.expressCheckoutSheetOpened({groupId:r,paymentMethodType:"apple_pay"}),t.report("ece.sheet_visible",{payment_method:"apple_pay"})}))},canMakePayments:function(e){var n=window.location.hostname,r=t.getCredentials().stripeAccount,o=t.keyMode()===nt.Kl.test;return(0,Vt.Qt)(n,r,o,t.report,4,e)},completePayment:function(e){if(e){var n,o=new window.ApplePayError("unknown");null===(n=u.privateSession)||void 0===n||n.completePayment({status:Dn,errors:[o]}),t.action.expressCheckoutConfirmEnd({groupId:r})}else{var i;null===(i=u.privateSession)||void 0===i||i.completePayment({status:Bn}),l()}}}},Wn=n(9449),Vn=function(e){return e.map((function(e){return{label:e.name,amount:e.amount}}))},Xn=function(e,t){return e.map((function(e){return jn(e.deliveryEstimate||{},t).then((function(t){return{amount:e.amount,label:e.displayName,detail:t||"",id:e.id}}))}))},$n=function(e){var t=e.controller,n=e.eventHandlers,r=e.groupId,o={shippingRates:void 0,allowedShippingCountries:void 0,pending:!1,confirmResolve:null},a=function(e){return(null==e?void 0:e.toUpperCase())||""},c=function(e){var i=e.token,c=e.payerName,s=e.payerEmail,u=e.payerPhone,l=e.shippingAddress,p=e.shippingOption,d=e.paymentDetailsId,m=e.clientSecret,f=a(null==l?void 0:l.country)||void 0,h={name:(null==l?void 0:l.recipient)||void 0,address:{line1:(null==l?void 0:l.addressLine[0])||void 0,line2:(null==l?void 0:l.addressLine[1])||void 0,city:(null==l?void 0:l.city)||void 0,state:(null==l?void 0:l.region)||void 0,postal_code:(null==l?void 0:l.postalCode)||void 0,country:f},phone:(null==l?void 0:l.phone)||void 0},_=a(i.card.address_country),y={line1:i.card.address_line1||void 0,line2:i.card.address_line2||void 0,city:i.card.address_city||void 0,state:i.card.address_state||void 0,postal_code:i.card.address_zip||void 0,country:_||void 0},v=y||s||u?{name:c||void 0,email:s||void 0,phone:u||void 0,address:y}:void 0,g=(0,S.sE)(o.shippingRates||[],(function(e){return e.id===(null==p?void 0:p.id)}));return new Z.J((function(e){var i,a={paymentMethodType:"link",paymentFailed:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=n.reason,i=void 0===o?"fail":o;t.action.expressCheckoutConfirmEnd({groupId:r}),e({status:i})},billingDetails:v,shippingAddress:l?{name:null!==(i=l.recipient)&&void 0!==i?i:void 0,address:{line1:l.addressLine[0],line2:l.addressLine[1],city:l.city,state:l.region,postal_code:l.postalCode,country:f}}:void 0,shippingRate:g};t.action.expressCheckoutConfirmStart({groupId:r,paymentMethodType:"link"}).then((function(){return t.action.setExpressCheckoutLinkPaymentMethodData({groupId:r,clientSecret:m,paymentDetailsId:d})})).then((function(){return t.action.setExpressCheckoutConfirmData({groupId:r,shippingContact:h,paymentMethodData:{type:w.GS.link,billing_details:v}})})).then((function(){return n.confirm(a)})),o.confirmResolve=e}))},s=function(e,n){var r=e.amount&&{total:{amount:e.amount,label:"Total"}},a=e.lineItems&&{displayItems:e.lineItems&&Vn(e.lineItems)};e.shippingRates?Z.J.all(Xn(e.shippingRates,(function(e,n){return t.action.unsafeLocalizeString({message:e,data:n})}))).then((function(t){o.shippingRates=e.shippingRates,n((0,i.Z)((0,i.Z)((0,i.Z)({},r),a),{},{shippingOptions:t,status:"success"}))})):n((0,i.Z)((0,i.Z)((0,i.Z)({},r),a),{},{status:"success"}))},u=function(e){var t=e.shippingAddress;return new Z.J((function(e){var r=a(null==t?void 0:t.country),i={city:t.city,state:t.region,postal_code:t.postalCode,country:r};if(o.allowedShippingCountries&&o.allowedShippingCountries.length&&-1===o.allowedShippingCountries.indexOf(i.country))e({status:"invalid_shipping_address"});else{var c={paymentMethodType:"link",name:t.recipient,address:i,resolve:function(t){return s(t,e)},reject:function(){e({status:"invalid_shipping_address"})}};n.shippingAddressChange(c)}}))},l=function(e){var r=e.shippingOption;return new Z.J((function(e){var i=(0,S.sE)(o.shippingRates||[],(function(e){return e.id===r.id}));if(!i)return t.report("ece.link.errors.unexpected_shipping_rate"),void(0,_.Rz)(r,"User selected a new shipping method within the Link popup, but it was not one of the shipping rates the merchant passed in.");var a={paymentMethodType:"link",shippingRate:i,resolve:function(t){return s(t,e)},reject:function(){e({status:"fail"})}};n.shippingRateChange(a)}))},p=function(){o.pending=!1,t.action.expressCheckoutSheetClosed({groupId:r}),t.action.expressCheckoutConfirmEnd({groupId:r})};return{clickHandler:function(e,i){var a=(0,Wn.z)({stripeJsId:t._stripeJsId,publishableKey:t._apiKey,path:"pay",integrationType:"express_checkout",height:708,width:500,onClose:function(){t.action.consumerPreloadedDataStale(),o.pending&&(p(),n.cancel({paymentMethodType:"link"}))}});a?(t.action.expressCheckoutSheetOpened({groupId:r,paymentMethodType:"link"}),t.report("ece.sheet_visible",{payment_method:"link"}),o.pending=!0,a.messenger.on("get_initial_state",function(e,n){return function(){var r,i={publishableKey:t._apiKey,stripeAccount:t._stripeAccount,merchantInfo:{businessName:(null===(r=n.business)||void 0===r?void 0:r.name)||e.businessName,country:e.merchantCountry},customerInfo:{country:e.customerCountry},elementComponentName:"expressCheckout",locale:e.locale,integrationType:"express_checkout",stripeJsId:t._stripeJsId,mids:t.mids(),referrer:window.location.href.toString(),elementsSessionId:null,elementsAssignmentId:null,setupFutureUsage:e.setupFutureUsage,flags:{enable_email_otp_for_link_popup:e.emailOtpEnabledForLinkPopup,show_bank_account_details_in_link_popup:e.showBankAccountDetailsInLinkPopup},linkFundingSources:e.linkFundingSources,paymentRequestOptions:{__isExpressCheckoutElement:!0,country:e.merchantCountry,currency:e.currency,requestPayerEmail:n.emailRequired,requestPayerName:n.billingAddressRequired,requestPayerPhone:n.phoneNumberRequired,requestShipping:n.shippingAddressRequired,displayItems:n.lineItems&&Vn(n.lineItems),total:{amount:e.amount,label:"Total"}},prefill:null};return o.shippingRates=n.shippingRates,o.allowedShippingCountries=n.allowedShippingCountries,o.shippingRates?Z.J.all(Xn(o.shippingRates,(function(e,n){return t.action.unsafeLocalizeString({message:e,data:n})}))).then((function(e){return i.paymentRequestOptions.shippingOptions=e,i})):i}}(e,i)),a.messenger.on("link_pbe_payment_data",c),a.messenger.on("link_prb_shipping_address_change",u),a.messenger.on("link_prb_shipping_option_change",l)):t.report("ece.link.errors.popup_blocked")},completePayment:function(e){e?(o.confirmResolve({status:"fail"}),t.action.expressCheckoutConfirmEnd({groupId:r})):(o.confirmResolve({status:"success"}),p())}}},Qn=function(e){return e.reduce((function(e,t){return e.push.apply(e,(0,a.Z)(Ie.L$[t])),e}),[])},er=function(e,t){if(null!=e&&e.length){var n=Qn(e);return(0,a.Z)(P.iw).filter((function(e){return-1===n.indexOf(e)}))}return null!=t&&t.length?Qn(t):[]},tr=["demo_pay"],nr={demo_pay:{thirdPartyFrameType:"DemoPayButton",isSupported:!0,featureFlag:"elements_enable_express_checkout_button_demo_pay",defaultButtonTheme:"light",defaultButtonTypeOption:"pay",plainButtonType:"pay"}},rr=function(e){return tr.indexOf(e)>=0},or=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,S.sq)((0,S.qh)(nr).map((function(n){var r=(0,O.Z)(n,2),o=r[0],i=r[1];return[t?(0,ae.i3)(o):o,i[e]]})))},ir=function(e){return or(e,!0)},ar=(or("thirdPartyFrameType"),or("isSupported"),ir("defaultButtonTypeOption"),ir("plainButtonType"),function(e,t){setTimeout(t,e+16)}),cr=function(e,t,n){var r={unmounted:!1,restoreScroll:function(){},restoreFocus:function(){return Z.J.resolve()}},o=(0,v.Xq)(),a=document.createElement("div");(0,v.yq)(a,Cn);var c=document.createElement("div");(0,v.yq)(c,Pn);var s=document.createElement("div"),u=document.createTextNode(t);s.appendChild(u),(0,v.yq)(s,(0,i.Z)((0,i.Z)((0,i.Z)({},In),o.clientWidth>400?Mn:{}),n));var l=document.createElement("div");l.appendChild(sr(e)),l.appendChild(s),(0,v.yq)(l,Nn),c.appendChild(l),a.appendChild(c);return{mount:(0,ae.$M)((function(){r.restoreScroll=(0,v.MV)();var e=(0,v.W3)(null),t=e.lockedPromise,n=e.lockedElements;r.restoreFocus=function(){return(0,v.gl)(t,n)},o.appendChild(a),(0,v.Ql)((function(){new Z.J((function(e){(0,v.yq)(c,An),ar(300,e)}))}))})),unmount:function(){return r.unmounted?Z.J.resolve():(r.unmounted=!0,r.restoreScroll(),new Z.J((function(e){(0,v.yq)(c,Pn),ar(300,e)})).then((function(){o.removeChild(a)})),r.restoreFocus())}}},sr=function(e){if(rr(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}();default:return document.createElementNS("http://www.w3.org/2000/svg","svg")}},ur=function(e){var t=e.component,n=e.elementTimings,r=e.getParent,o=e.emitEvent,a=e.options,c=e.selfDestruct,s=e.hasRegisteredListener,u=e.listenerRegistry,l=a.controller,p=a.groupId,d=a.publicOptions,m=a.betas,f=a.allowedCardBrands,h=a.disallowedCardBrands,y=null,b={runOnUnmount:[],updateRequest:{isCalled:!1,inMerchantEventHandler:!1}},w=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={fonts:o,wait:i,rtl:G(document.body),publicOptions:a,controllingElement:c};return t.createElementFrame(D.NC.EXPRESS_CHECKOUT_ELEMENT,n,r,s)}(a);(0,v.yq)(t,(0,i.Z)((0,i.Z)({},Sn),{},{margin:"-4px 0",transition:"height .35s ease"})),w.appendTo(t),w.updateStyle(En),w._on("set_styles",(function(e){w.updateStyle(e)})),w._on("redirectfocus",(function(e){var n,r=e.focusDirection;null===(n=(0,v.dh)(t,r))||void 0===n||n.focus()}));var C=(0,ae.$M)((function(){w.send({action:"stripe-timings",payload:{timestamps:{stripeJsLoad:n.stripeJsLoadTimestamp.getAsPosixTime(),stripeCreate:n.stripeCreateTimestamp.getAsPosixTime(),groupCreate:n.groupCreateTimestamp.getAsPosixTime(),create:n.createTimestamp.getAsPosixTime(),mount:y?y.getAsPosixTime():0}}})}));w._on("load",(function(){if(!a.deferredIntent)throw new E.No("In order to use the Express Checkout Element, you must specify a `mode` on stripe.elements() instead of `clientSecret`.");w.send({action:"stripe-user-mount",payload:{rtl:G(r())}}),C()})),w._on("update-start",(function(){b.updateRequest.inMerchantEventHandler&&(b.updateRequest.isCalled=!0)})),w._on("update-end",(function(){var e,t;null===(e=(t=b.updateRequest).resolve)||void 0===e||e.call(t),b.updateRequest.isCalled=!1}));var P=function(e){new Z.J((function(e){b.updateRequest.isCalled?b.updateRequest.resolve=e:e()})).then((function(){return a.controller.action.getElementsSessionAmountModeCurrency({groupId:p})})).then((function(t){var n=t.amount,r=t.mode,o=t.currency;b.amount=n,e(n,o,r)}))},A=function(e,t){var n=t.paymentMethodType,r=!("nonce"in t),a="ece.".concat("shippingaddresschange"===e?"shipping_address_change":"shipping_rate_change");if(l.report(a,{payment_method:n}),s(e)){var c;c=r?function(){t.reject(),b.updateRequest.inMerchantEventHandler=!1}:function(){w.send({action:"stripe-ece-change-event",payload:{nonce:t.nonce}}),b.updateRequest.inMerchantEventHandler=!1};var u=Rn({controller:l,eventName:e,time:19900,timeLabel:"20 seconds",reject:function(){l.report("".concat(a,".reject"),{payment_method:n}),c()},resolve:function(o){P((function(c,s,u){b.lastCurrency&&s!==b.lastCurrency&&On();var p=function(e,t,n){var r=(0,_.Gu)((0,_.jt)((0,_.mC)(_n)),e,"".concat(t," event resolve callback")),o=r.value,i=r.warnings,a=null!=o?o:{};if(n){var c=bn(a);a=c.value,c.warnings.forEach((function(e){return i.push(e)}))}if(o){var s=o.shippingRates;if(s&&!s.length)throw new E.No("You must specify `shippingRates`.")}return{value:a,warnings:i}}(o,e,"setup"===u),d=p.value;p.warnings.forEach((function(e){return l.warn(e)})),l.report("".concat(a,".resolve"),{payment_method:n,hasLineItems:!!d.lineItems,hasShippingRates:!!d.shippingRates}),b.lineItems=d.lineItems||b.lineItems,gn(c,b.lineItems),r?t.resolve((0,i.Z)((0,i.Z)({},d),{},{amount:c})):w.send({action:"stripe-ece-change-event",payload:{nonce:t.nonce,changePayload:(0,i.Z)((0,i.Z)({},d),{},{amount:c})}})})),b.updateRequest.inMerchantEventHandler=!1},canMerchantReject:!0}),p=u.resolve,d=u.reject;return b.updateRequest.inMerchantEventHandler=!0,void o(e,(0,i.Z)((0,i.Z)({},"name"in t?{name:t.name,address:t.address}:{shippingRate:t.shippingRate}),{},{reject:d,resolve:p}))}P((function(e,n){b.lastCurrency&&n!==b.lastCurrency&&On(),r?t.resolve({amount:e}):w.send({action:"stripe-ece-change-event",payload:{nonce:t.nonce,changePayload:{amount:e}}})}))},N=function(e){var t;o("cancel"),null===(t=b.unmountOverlay)||void 0===t||t.call(b);var n=e.paymentMethodType;l.report("ece.cancel",{payment_method:n})},I=function(e){var t=e.paymentMethodType,n=e.billingDetails,r=e.shippingAddress,a=e.shippingRate;if(l.report("ece.confirm",{payment_method:t}),!s("confirm"))throw new E.No("Unhandled expressCheckout Element confirm event. Make sure to register a confirm handler.");var c=(0,i.Z)((0,i.Z)({},(0,k.uN)(m,"express_checkout_element_beta_1")?{paymentMethodType:t}:{expressPaymentType:t}),{},{billingDetails:n,shippingAddress:r,shippingRate:a,paymentFailed:function(n){var r=function(e){var t=(0,_.Gu)((0,_.jt)((0,_.mC)(yn)),e,"confirm event paymentFailed callback"),n=t.value;return{value:null!=n?n:{},warnings:t.warnings}}(n),o=r.value;r.warnings.forEach((function(e){return l.warn(e)})),l.report("ece.confirm.payment_failed",{payment_method:t,reason:o.reason}),l.action.getIsAwaitingConfirmCallback({groupId:p}).then((function(t){if(!t)throw new E.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):w.send({action:"stripe-ece-confirm-payment",payload:{nonce:e.nonce,paymentFailedPayload:o}})}))}});o("confirm",c)},M=Jn({controller:l,eventHandlers:{cancel:function(e){return N(e)},shippingAddressChange:function(e){return A("shippingaddresschange",e)},shippingRateChange:function(e){return A("shippingratechange",e)},confirm:I},groupId:p,listenerRegistry:u,betas:m,blockedCardBrands:er(f,h)}),T=$n({controller:l,eventHandlers:{cancel:function(e){return N(e)},shippingAddressChange:function(e){return A("shippingaddresschange",e)},shippingRateChange:function(e){return A("shippingratechange",e)},confirm:I},groupId:p});l.action.getElementsSessionUnverifiedPaymentMethodsOnDomain({groupId:p,wallets:d.wallets}).then((function(e){var t,n,r;-1!==e.indexOf("apple_pay")||"never"===(null===(t=d.wallets)||void 0===t?void 0:t.applePay)?M.shouldShowButton(!1):"always"===(null===(n=d.wallets)||void 0===n?void 0:n.applePay)?M.canMakePayments(!1).then((function(e){M.shouldShowButton(e)})):M.canMakePayments(!0).then((function(e){M.shouldShowButton(e)})),-1===e.indexOf("google_pay")&&"never"!==(null===(r=d.wallets)||void 0===r?void 0:r.googlePay)&&"https:"!==window.location.protocol&&(l.action.shouldShowEceButton({groupId:p,button:"googlePay",shouldShowButton:!1}),l.warn("You are testing over HTTP, so Google Pay will not appear. You must use HTTPS in order to use Google Pay."))})),w._on("ece-outer-pm-complete-payment",(function(e){var t;null===(t=b.unmountOverlay)||void 0===t||t.call(b),"apple_pay"===e.paymentMethodType?M.completePayment(e.isError):"link"===e.paymentMethodType&&T.completePayment(e.isError)})),w._on("cancel",(function(e){N(e)})),w._on("click",(function(e){var t=e.paymentMethodType,n="apple_pay"===t,r="link"===t,c="click";if(l.report("ece.click",{payment_method:t}),function(e){var t=e.paymentMethodType;return"paypal"===t||"iOS"===(0,g.d4)(window.navigator.userAgent)&&"google_pay"===t}(e)){var u=e.overlayString,p=e.fontValues,d=e.paymentMethodType,f=cr(d,u,p),h=f.mount,y=f.unmount;h(),b.unmountOverlay=y,b.runOnUnmount.push(y)}if(s(c)){var v=function(){b.updateRequest.inMerchantEventHandler=!1};n||r||(v=function(){w.send({action:"stripe-user-ece-button-click",payload:{nonce:e.nonce}})},b.updateRequest.inMerchantEventHandler=!1);var C=Rn({controller:a.controller,eventName:c,time:800,timeLabel:"1 second",reject:v,resolve:function(o){P((function(a,c,s){var u,p;b.lastCurrency=c;var d=function(e,t,n,r){var o,a,c,s=(0,k.uN)(null!=r?r:[],k.M4.ece_apple_pay_deferred_payment_card_funding_beta_1),u=s?hn:fn,l=(0,_.Gu)((0,_.jt)((0,_.mC)(u)),e,"click event resolve callback"),p=l.value,d=l.warnings,m={};if(p){var f=(0,Me.Jo)(null==p?void 0:p.allowedShippingCountries);m=(0,i.Z)((0,i.Z)({},p),{},{allowedShippingCountries:f.allowedCountries||void 0}),f.warnings.forEach((function(e){return d.push(e)}))}if(t){var h=bn(m);m=h.value,h.warnings.forEach((function(e){return d.push(e)}))}var y=(0,Vt.VC)(14)&&n;null!==(o=m.applePay)&&void 0!==o&&o.recurringPaymentRequest&&!y&&d.push("`applePay.recurringPaymentRequest` is only supported with Apple Pay in Safari 16.0+ and iOS 16.0+."),(!(0,Vt.VC)(15)||!n)&&s&&d.push("`applePay.deferredPaymentRequest` is only supported with Apple Pay in Safari 16.5+ and iOS 16.5+.");var v=null===(a=m.applePay)||void 0===a?void 0:a.deferredPaymentRequest;if(v&&null!==(c=m.applePay)&&void 0!==c&&c.recurringPaymentRequest)throw new E.No("It seems that you have both deferredPaymentRequest and recurringPaymentRequest set in your apple pay config. Please only set one of the two.");if(!(null==v||!v.freeCancellationDate)!=!(null==v||!v.freeCancellationDateTimeZone))throw new E.No("It seems that you have only set one of deferredPaymentRequest.freeCancellationDate and deferredPaymentRequest.freeCancellationDateTimezone. Please set both or none of them.");if(p){var g=p.shippingAddressRequired,b=p.shippingRates;if(g&&(!b||!b.length))throw new E.No("When `shippingAddressRequired` is true, you must specify `shippingRates`.")}return{value:m,warnings:d}}(o,"setup"===s,n,m),f=d.value;d.warnings.forEach((function(e){return l.warn(e)})),l.report("ece.click.options",(0,i.Z)((0,i.Z)({},(0,S.ei)(f,["allowedShippingCountries","business","billingAddressRequired","emailRequired","phoneNumberRequired","shippingAddressRequired"])),{},{usesApplePayRecurringPayment:!(null===(u=f.applePay)||void 0===u||!u.recurringPaymentRequest),usesApplePayDeferredPayment:!(null===(p=f.applePay)||void 0===p||!p.deferredPaymentRequest),hasLineItems:!!f.lineItems,hasShippingRates:!!f.shippingRates,payment_method:t})),b.lineItems=f.lineItems||b.lineItems,gn(a,b.lineItems),n?M.clickHandler((0,i.Z)((0,i.Z)({},e),{},{amount:a,currency:c}),f):r?T.clickHandler((0,i.Z)((0,i.Z)({},e),{},{amount:a,currency:c}),f):w.send({action:"stripe-user-ece-button-click",payload:{nonce:e.nonce,clickPayload:(0,i.Z)((0,i.Z)({},f),{},{amount:a})}})})),b.updateRequest.inMerchantEventHandler=!1},canMerchantReject:!1}),A=C.resolve;return b.updateRequest.inMerchantEventHandler=!0,void((0,k.uN)(m,"express_checkout_element_beta_1")?o(c,{paymentMethodType:t,resolve:A}):o(c,{expressPaymentType:t,resolve:A}))}P((function(t,o){b.lastCurrency=o,n?M.clickHandler((0,i.Z)((0,i.Z)({},e),{},{amount:t,currency:o}),Tn):r?T.clickHandler((0,i.Z)((0,i.Z)({},e),{},{amount:t,currency:o}),Tn):w.send({action:"stripe-user-ece-button-click",payload:{nonce:e.nonce,clickPayload:{amount:t}}})}))})),w._on("shippingaddresschange",(function(e){return A("shippingaddresschange",e)})),w._on("shippingratechange",(function(e){return A("shippingratechange",e)})),w._on("confirm",I);return w._on("load-error",(function(e){o("loaderror",{error:e}),c()})),wn.forEach((function(e){w._on(e,(function(t){return o(e,t)}))})),{update:function(e){w.update(e)},focus:function(){U(),w.focus(),w.send({action:"stripe-user-focus",payload:{}})},blur:function(){w.blur()},clear:function(){throw new E.No("clear() is not supported by the Express Checkout Element.")},mount:function(){y=new ee.E;var e=r();e&&((0,v.mb)(e,[[kn,!0]]),b.runOnUnmount.push((function(){(0,v.mb)(e,[[kn,!1]])})))},unmount:function(){for(;b.runOnUnmount.length;){var e;null===(e=b.runOnUnmount.pop())||void 0===e||e()}w.unmount()},destroy:function(){a.controller.action.resetExpressCheckoutState({groupId:p})},_frame:w}},lr=function(e){var t=e.options,n=(0,h.Z)(e,["options"]),r=t.controller,o=t.publicOptions,a=(t.componentName,(0,h.Z)(t,["controller","publicOptions","componentName"]));if(r.keyMode()===nt.Kl.unknown)throw new E.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,s,u,l,p,d=(c=o||{},s=(0,_.Gu)((0,_.mC)(un),c,"elements.create('expressCheckout', options)"),u=s.value,l=s.warnings,(p=vn(u))&&l.push(p),{value:u,warnings:l});"payButton"===e.options.componentName&&d.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."),d.warnings.forEach((function(e){return r.warn(e)}));var m=ur((0,i.Z)((0,i.Z)({},n),{},{options:(0,i.Z)((0,i.Z)({},a),{},{controller:r,componentName:"expressCheckout",publicOptions:d.value})})),f=m.update,y=(0,h.Z)(m,["update"]);return(0,i.Z)((0,i.Z)({},y),{},{update:function(e){var t=function(e){var t=(0,_.Gu)((0,_.mC)(sn),e,"expressCheckoutElement.update()"),n=t.value,r=t.warnings,o=vn(n);return o&&r.push(o),{value:n,warnings:r}}(e||{}),n=t.value;t.warnings.forEach((function(e){return r.warn(e)})),f(n)}})},pr=function(e,t){var n=function(e){if(!M.YA[e])throw new Error("Unexpected Element type: ".concat(e,"."));return M.YA[e].implementation}(e);switch(n){case"legacy":return new _e(t);case"affirm_message":return we(t);case"afterpay_message":return Ce(t);case"payment_method_messaging":return Bt(t);case"frame":return xt(t);case"cart":return Wt(t);case"express_checkout":return lr(t);default:return(0,_.Rz)(n,"Unexpected implementation type: ".concat(n,"."))}},dr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,i.Z)((0,i.Z)((0,i.Z)({},(0,S.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","betas","componentName","groupId","locale","loader","externalPaymentMethodTypes"])),e.autocomplete&&{disableAutocomplete:"disabled"===e.autocomplete.mode}),e.contacts&&{contacts:e.contacts.length})},mr=function(e){function t(e,r,o){var a,s;(0,c.Z)(this,t),(s=n.call(this)).mount=(0,I.TC)((function(e){var t;if(s._checkDestroyed(),!e)throw new E.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&&s._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 E.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 E.No("Invalid DOM element. Make sure to call mount() with a valid DOM element or selector.");t=e}if("INPUT"===t.nodeName)throw new E.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&&s._controller.warn("This Element will be mounted to a DOM element that contains child nodes."),s._mountToParent(t)})),s.update=(0,I.TC)((function(e){return s._controller.report("update",{options:dr(e),element:s._componentName,element_mode:s._componentMode}),s._checkDestroyed(),s._implementation.update(e),(0,d.Z)(s)})),s.focus=(0,I.TC)((function(e){return s._checkDestroyed(),e&&e.preventDefault(),s._implementation.focus(),(0,d.Z)(s)})),s.blur=(0,I.TC)((function(){return s._checkDestroyed(),s._implementation.blur(),(0,d.Z)(s)})),s.clear=(0,I.TC)((function(){return s._checkDestroyed(),s._implementation.clear(),(0,d.Z)(s)})),s.collapse=(0,I.TC)((function(){if(s._checkDestroyed(),!s._implementation.collapse)throw new E.No("Collapse is not supported by the ".concat(s._componentName," Element."));return s._implementation.collapse(),(0,d.Z)(s)})),s.show=(0,I.TC)((function(){if(s._checkDestroyed(),!s._implementation.show)throw new E.No("show() is not supported by the ".concat(s._componentName," Element."));return s._implementation.show(),(0,d.Z)(s)})),s.hide=(0,I.TC)((function(){if(s._checkDestroyed(),!s._implementation.hide)throw new E.No("hide() is not supported by the ".concat(s._componentName," Element."));return s._implementation.hide(),(0,d.Z)(s)})),s.addLineItem=(0,I.TC)((function(e){if(s._checkDestroyed(),s._implementation.addLineItem)return s._implementation.addLineItem(e);throw new E.No("addLineItem() is not supported by the ".concat(s._componentName," Element."))})),s.cancelCheckout=(0,I.TC)((function(e){if(s._checkDestroyed(),!s._implementation.cancelCheckout)throw new E.No("cancelCheckout() is not supported by the ".concat(s._componentName," Element."));return s._implementation.cancelCheckout(e),(0,d.Z)(s)})),s.unmount=(0,I.TC)((function(){return s._checkDestroyed(),s._unmount(),(0,d.Z)(s)})),s.destroy=(0,I.TC)((function(){var e,t;return s._checkDestroyed(),s.unmount(),null===(e=(t=s._implementation).destroy)||void 0===e||e.call(t),s._destroyed=!0,s._emitEvent("destroy"),(0,d.Z)(s)})),s.getValue=(0,I.TC)((function(){s._checkDestroyed();var e=new Set(["address"]);if(s._implementation.getValue&&e.has(s._componentName))return s._implementation.getValue();throw new E.No("getValue is not supported by the ".concat(s._componentName," Element."))})),s._getParent=function(){return s._parent},s._emitEvent=function(e,t){if("loaderror"!==e||s._hasRegisteredListener("loaderror")||s._controller.keyMode()!==nt.Kl.test||console.error("Unhandled ".concat(s._componentName," Element loaderror"),t),"cart"===s._componentName&&"checkout"===e&&!s._hasRegisteredListener("checkout"))throw new E.No("Unhandled Cart Element checkout event. Make sure to register a checkout handler.");return s._emit(e,(0,i.Z)({elementType:s._componentName},t))},s._cancelCheckout=function(e){"cart"===s._componentName&&s._controller._sendCaReq("cancelCheckout",{errorMessage:e,groupId:s._groupId})};var u=e.controller,l=e.componentName,p=e.groupId,m=e.locale,f=e.betas;e.mids;s._controller=u,s._componentName=l,s._componentMode=null===(a=e.publicOptions)||void 0===a?void 0:a.mode,s._destroyed=!1,s._groupId=p;var h=document.createElement("div");return h.className=M.A2,s._component=h,u.report("create",{options:dr((0,i.Z)({componentName:l,groupId:p,locale:m,betas:f},e.publicOptions)),element:l,element_mode:s._componentMode}),s._implementation=pr(s._componentName,{options:e,component:h,listenerRegistry:r,elementTimings:o,emitEvent:s._emitEvent,getParent:s._getParent,hasRegisteredListener:s._hasRegisteredListener,selfDestruct:function(){s.destroy()}}),s}(0,m.Z)(t,e);var n=(0,f.Z)(t);return(0,s.Z)(t,[{key:"_checkDestroyed",value:function(){if(this._destroyed)throw new E.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 E.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),this._controller.report("mount",{element:this._componentName,element_mode:this._componentMode}),this._implementation.mount()}}]),t}(R.Z),fr=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(mr.prototype,e,{enumerable:!1,get:function(){return fr(this,e),this._implementation[e]}})}));["_formSubmit","_isIssuingDisplayElement"].forEach((function(e){Object.defineProperty(mr.prototype,e,{enumerable:!1,writable:!1,value:function(){return fr(this,e),this._implementation[e]()}})}));var hr,_r,yr=mr,vr=function(e){var t=(0,_.jt)((0,_.AG)((0,_.CT)(_.kw.apply(void 0,(0,a.Z)(function(e){return(0,k.uN)(e,k.M4.elements_enable_deferred_intent_beta_1)?Object.keys(w.GS):Object.keys((0,S.CE)(w.GS,["apple_pay","google_pay","meta_pay"]))}(e)))))),n=(0,_.jt)((0,_.AG)((0,_.kw)("off_session","on_session"))),r=(0,_.jt)((0,_.AG)((0,_.kw)("automatic","automatic_async","manual"))),o=(0,_.jt)((0,_.AG)((0,_.mC)({us_bank_account:(0,_.jt)((0,_.mC)({verification_method:(0,_.jt)((0,_.kw)("automatic","instant","instant_or_skip","skip","microdeposits")),financial_connections:(0,_.jt)((0,_.mC)({permissions:(0,_.jt)((0,_.CT)((0,_.kw)("payment_method","balances","transactions","ownership","account_numbers")))}))}))}))),i=(0,_.jt)((0,_.AG)(_.Z_)),c=(0,_.jt)((0,_.AG)(_.Z_));return{mode:(0,_.jt)((0,_.AG)((0,_.kw)("payment","setup","subscription"))),amount:(0,_.jt)((0,_.AG)(_.MZ)),currency:(0,_.jt)((0,_.AG)(_.cV)),paymentMethodCreation:(0,_.jt)((0,_.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:c,onBehalfOf:c}},gr={customerOptions:(0,_.jt)((0,_.mC)({customer:_.Z_,ephemeralKey:_.Z_}))},br={customerSessionClientSecret:(0,_.jt)((0,_.AG)(_.Z_))},wr=function(e){if(e)return(0,i.Z)((0,i.Z)((0,i.Z)({},e),e.hasOwnProperty("rules")?{rules:""}:null),e.hasOwnProperty("variables")?{variables:""}:null)},kr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,i.Z)((0,i.Z)((0,i.Z)({},(0,S.ei)(e,["locale","loader","externalPaymentMethodTypes","paymentMethodCreation","allowedCardBrands","disallowedCardBrands"].concat(Cr))),e.hasOwnProperty("fonts")?{fonts:""}:null),{},{appearance:wr(e.appearance)},e.customerOptions?{customerOptions:{customer:e.customerOptions.customer}}:null)},Sr=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,p=e.paymentMethodTypes,d=e.payment_method_types,m=void 0===d?p:d,f=e.paymentMethodOptions,h=e.payment_method_options,_=void 0===h?f:h,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:_,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:_,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:_,on_behalf_of:k}:void 0},Er=["customerSessionClientSecret"],Cr=["mode","amount","currency","payment_method_types","paymentMethodTypes","capture_method","captureMethod","setup_future_usage","setupFutureUsage","payment_method_options","paymentMethodOptions","payment_method_configuration","paymentMethodConfiguration","on_behalf_of","onBehalfOf"],Pr=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,p=e.payment_method_configuration,d=void 0===p?l:p,m=e.paymentMethodOptions,f=e.payment_method_options,y=void 0===f?m:f,v=(t.customerSessionClientSecret,(0,h.Z)(t,["customerSessionClientSecret"])),g=(0,k.uN)(r,k.M4.deferred_intent_pe_optional_amount_beta_0);if("payment"===o){var b=(0,_.mC)({amount:(0,_.jt)((0,_.AG)(_.Rx)),currency:_.Z_}),w=(0,_.mC)({amount:_.Rx,currency:_.Z_}),S=g?b:w,C=(0,_.Gu)(S,{amount:i,currency:a},"options").value;if(null!=C.amount&&C.amount<=0)throw new E.No("Invalid value for ".concat(n,": `amount` must be greater than 0"));if(null!=u&&u.length&&d)throw new E.No("Invalid value for ".concat(n,": You may only specify one of these parameters: `payment_method_types` or `payment_method_configuration`."))}else if("setup"===o){if(t.amount)throw new E.No("Invalid value for ".concat(n,": `amount` is not applicable when `mode` is `'setup'`"));!(0,k.uN)(r,k.M4.elements_enable_deferred_intent_beta_1)&&(u||(0,_.Gu)((0,_.mC)({currency:_.Z_}),{currency:a},"options"))}else if(!o&&Object.keys(v).length){var P=Object.keys(v);if((P=P.filter((function(e){return"currency"!==e}))).length)throw new E.No("Invalid value for ".concat(n,": `").concat(P.join("`, `"),"` ").concat(P.length>1?"are":"is"," only applicable when a `mode` is set."))}else if("subscription"===o){var A=(0,_.mC)({amount:(0,_.jt)((0,_.AG)(_.Rx)),currency:_.Z_}),N=(0,_.mC)({amount:_.Rx,currency:_.Z_}),I=g?A:N,M=(0,_.Gu)(I,{amount:i,currency:a},"options").value;if(M.amount&&M.amount<0)throw new E.No("Invalid value for ".concat(n,": `amount` must be 0 or greater"))}if(y){var T,R,O=null===(T=y.us_bank_account)||void 0===T||null===(R=T.financial_connections)||void 0===R?void 0:R.permissions;if(O&&!(O.indexOf("payment_method")>-1))throw new E.No("Invalid value for ".concat(n,": permissions array must include 'payment_method'. You provided: ").concat(O.join(", ")))}},Ar=function(e){e._emit("update-end"),e._emit("updateend")},Nr=function(e){function t(e,r,s,u,m,f){var w;(0,c.Z)(this,t),(w=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 T(n,w._betas),(0,S.sE)(w._elements,(function(e){return e._componentName===n}))||null})),w.update=(0,I.TC)((function(e){var t,n,r=(0,_.Gu)(function(e){return(0,_.mC)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)({locale:(0,_.jt)(_.Z_),appearance:(0,_.jt)(_.Ry)},vr(e)),gr),br),{},{clientSecret:(0,_.jt)((0,_.AG)(Me.Eu))}))}(w._betas),e||{},"elements.update()"),o=r.value;if(r.warnings.forEach((function(e){return w._controller.warn(e)})),0!==Object.keys(o).length){var a,c,s=o.customerOptions,u=o.locale,p=o.appearance,m=o.clientSecret,f=o.customerSessionClientSecret,h=o.currency,y=(0,k.jk)(u,w._betas);y&&(w._controller.action.fetchLocale({locale:y}),w._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(y)})));var v=!1;if(!!Object.keys((0,S.ei)(o,["clientSecret"].concat(Cr,Er))).length){var g;m=null!==(g=m)&&void 0!==g?g:w._commonOptions.clientSecret,f=void 0===f?w._commonOptions.customerSessionClientSecret:f,h=void 0===h?w._commonOptions.currency:h;var b=(0,S.ei)(o,[].concat(Cr,Er)),E=(0,S.ei)(w._commonOptions,[].concat(Cr,Er)),C=(0,i.Z)((0,i.Z)({},E),b);o.clientSecret&&Cr.forEach((function(e){"currency"!==e&&(C[e]=null)})),o.mode&&(w._commonOptions.clientSecret=void 0),v=!(0,S.Xy)(C,E),Pr(C,b,"elements.update()",w._betas),v&&(a=C,c=Sr(C,!0))}o.hasOwnProperty("customerOptions")&&(w._customerOptions=s||null),o.hasOwnProperty("customerSessionClientSecret")&&(w._commonOptions.customerSessionClientSecret=f||null),o.hasOwnProperty("appearance")&&(w._commonOptions.appearance=p),o.hasOwnProperty("clientSecret")&&(w._commonOptions.clientSecret=m),y&&(w._commonOptions.locale=y),(0,l.Z)(w._commonOptions,a);var P=(0,S.sE)(w._elements,(function(e){return"expressCheckout"===e._componentName||"payButton"===e._componentName}));null==P||null===(t=P._implementation._frame)||void 0===t||t._emit("update-start"),w._controller.action.updateElementsOptions((0,i.Z)({customerOptions:s,locale:y,appearance:p,groupId:w._id},v?{customerSessionClientSecret:f,clientSecret:m,currency:"SETUP_INTENT"===(null===(n=m)||void 0===n?void 0:n.type)?h:void 0,deferredIntent:c}:{})).then((function(){var e;Ar((0,d.Z)(w)),null==P||null===(e=P._implementation._frame)||void 0===e||e._emit("update-end")}))}})),w.submit=(0,I.P0)((function(){return w._isSubmitting&&w._controller.report("simultaneous_elements_submit_calls"),w._isSubmitting=!0,w._controller.action.validateElements(w._id).then((function(e){return e&&"error"===e.type?{error:e.error}:w._controller.action.showWalletIfNecessary(w._id).then((function(e){switch(null==e?void 0:e.type){case"error":return e.error?{error:e.error}:w._controller.action.localizeError({code:"unexpected"}).then((function(e){return{error:e}}));case"cancelled":return w._controller.action.localizeError({code:"incomplete",type:"input_validation_error"}).then((function(e){return{error:e}}));default:return{}}}))})).finally((function(){w._isSubmitting=!1}))})),w.create=(0,I.W6)((function(e,t){var n=new ee.E;!function(e,t,n,r){if(T(e,n),M.YA[e].unique&&-1!==t.indexOf(e)){if("address"===e)throw new E.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 E.No("Can only create one Element of type ".concat(e,"."))}var o=M.YA[e].conflict,i=(0,S.dq)(t,o);if(i.length){var a=i[0];throw new E.No("Cannot create an Element of type ".concat(e," after an Element of type ").concat(a," has already been created."))}if("address"===e&&"billing"===(null==r?void 0:r.mode)&&(0,k.uN)(n,"elements_saved_payment_methods_beta_1"))throw new E.No('The "elements_saved_payment_methods_beta_1" beta cannot be used with the Address Element when it is in "billing" mode.');if("linkAuthentication"===e&&(0,k.uN)(n,"elements_saved_payment_methods_beta_1"))throw new E.No('The "elements_saved_payment_methods_beta_1" beta cannot be used with the Link Authentication Element.')}(e,w._elements.map((function(e){return e._componentName})),w._betas,t);var r=(0,i.Z)((0,i.Z)((0,i.Z)({},t),w._commonOptions),{},{componentName:e,groupId:w._id}),c=(r.paymentRequest,r.storeReadyPromise,(0,h.Z)(r,["paymentRequest","storeReadyPromise"])),s=(g.P0||g.JW)&&(0,b.qC)(c).length>2e3,u=!!w._pendingFonts||s;if("never"!==w._commonOptions.loader&&!w._isLoaderFrameMounted&&ot(e)){var l=function(e){return o||((o=e.createHiddenFrame(D.NC.LOADER_UI_APP,{}))._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)}(w._controller);l._emit("generate-loader-ui",{rawAppearanceConfig:w._commonOptions.appearance}),w._isLoaderFrameMounted=!0}var p=new yr((0,i.Z)((0,i.Z)({publicOptions:t},(0,S.CE)(w._commonOptions,Cr)||{}),{},{deferredIntent:Sr(w._commonOptions,!0),componentName:e,groupId:w._id,fonts:s?null:w._commonOptions.fonts,controller:w._controller,wait:u,mids:w._controller.mids()}),w._listenerRegistry,(0,i.Z)((0,i.Z)({},w._timings),{},{createTimestamp:n}));return w._elements=[].concat((0,a.Z)(w._elements),[p]),p._on("destroy",(function(){w._elements=w._elements.filter((function(t){return t._componentName!==e}))})),s&&p._implementation.update({fonts:w._commonOptions.fonts}),p})),w.fetchUpdates=(0,I.P0)((function(){if(w._commonOptions.clientSecret)return w._controller.action.fetchUpdates({clientSecret:w._commonOptions.clientSecret,customerOptions:w._customerOptions,customerSessionClientSecret:w._commonOptions.customerSessionClientSecret,locale:w._commonOptions.locale,groupId:w._id,currency:w._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 E.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}}"})')})),(0,Me.Z0)(u);var C=w._on;w._on=function(t,n,r){return e.report("register_elements_listener",{name:t}),C.call((0,d.Z)(w),t,n,r),(0,d.Z)(w)};var P=new ee.E,A=(0,_.Gu)(function(e){var t={locale:(0,_.jt)(_.Z_),fonts:(0,_.jt)((0,_.CT)(_.Ry)),appearance:(0,_.jt)(_.Ry),clientSecret:(0,_.jt)(Me.Eu),loader:(0,_.jt)((0,_.kw)("auto","always","never")),externalPaymentMethodTypes:(0,_.jt)(Ie.iU)},n=(0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)({},t),(0,k.uN)(e,k.M4.elements_customers_beta_1)?gr:{}),(0,k.uN)(e,k.M4.elements_saved_payment_methods_beta_1)?br:{}),(0,k.uN)(e,k.M4.blocked_card_brands_beta_2)?{allowedCardBrands:(0,_.jt)(Ie.jX),disallowedCardBrands:(0,_.jt)(Ie.jX)}:{}),vr(e));return(0,_.mC)(n)}(u),f||{},"elements()"),R=A.value;A.warnings.forEach((function(t){return e.warn(t)}));var O=(0,S.ei)(R,Cr);if(Pr(O,O,"elements()",u),Object.keys(O).filter((function(e){return"currency"!==e})).length&&R.clientSecret)throw new E.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 E.No("Invalid options for elements(): `currency` is only applicable with a SetupIntent client_secret or when a `mode` is set")}(R),(0,v.BO)(e.warn),e.report("elements",{options:kr(R)}),R.loader||(R.loader="auto");var Z=R.fonts,j=void 0===Z?[]:Z,x=R.locale,L=R.customerOptions,B=void 0===L?null:L,q=R.customerSessionClientSecret,F=(0,h.Z)(R,["fonts","locale","customerOptions","customerSessionClientSecret"]),G=void 0!==q&&(0,k.uN)(u,k.M4.elements_saved_payment_methods_beta_1)?q:void 0;w._customerOptions=B;var U=R.appearance?R.appearance:{};w._elements=[],w._id=(0,y.To)("elements-".concat((0,y.Vj)(),"-")),w._isSubmitting=!1,w._timings=(0,i.Z)((0,i.Z)({},s),{},{groupCreateTimestamp:P}),w._controller=e,w._betas=u,w._listenerRegistry=r,w._isLoaderFrameMounted=!1;var z=(0,k.jk)(x,u);w._controller.action.fetchLocale({locale:z||"auto"});var H=j.filter((function(e){return!e.cssSrc||"string"!=typeof e.cssSrc})).map((function(e){return(0,i.Z)((0,i.Z)({},e),{},{__resolveFontRelativeTo:window.location.href})})),K=j.map((function(e){return e.cssSrc})).reduce((function(e,t){return"string"==typeof t?[].concat((0,a.Z)(e),[t]):e}),[]).map((function(e){return(0,b.sD)(e)?e:(0,b.v_)(window.location.href,e)}));w._pendingFonts=K.length;var Y,J=(0,k.uN)(u,k.M4.payment_element_beta_1)&&!F.clientSecret,W=Sr(F,!0);return J||(Y=e.action.setupStoreForElementsGroup({clientSecret:F.clientSecret,deferredIntent:W,customerOptions:B,customerSessionClientSecret:null!=G?G:null,currency:F.currency,loader:R.loader,locale:x,appearance:U,groupId:w._id,externalPaymentMethodTypes:F.externalPaymentMethodTypes,paymentMethodCreation:F.paymentMethodCreation,disallowedCardBrands:F.disallowedCardBrands,allowedCardBrands:F.allowedCardBrands})),w._commonOptions=(0,i.Z)((0,i.Z)({},F),{},{betas:u,storeReadyPromise:Y,appearance:U,locale:z,customerSessionClientSecret:G,get fonts(){return H}}),K.forEach((function(e){if("string"==typeof e){var t=new ee.E;N(e).then((function(n){w._controller.report("font.loaded",{load_time:t.getElapsedTime(),font_count:n.length,css_src:e});var r=n.map((function(t){return(0,i.Z)((0,i.Z)({},t),{},{__resolveFontRelativeTo:e})}));w._controller.action.updateCSSFonts({fonts:r,groupId:w._id}),H.push.apply(H,(0,a.Z)(r))})).catch((function(n){w._controller.report("error.font.not_loaded",{load_time:t.getElapsedTime(),message:n&&n.message&&n.message,css_src:e}),w._controller.warn("Failed to load CSS file at ".concat(e,"."))}))}})),w._controller._controllerFrame._on("stripe-user-credentials-update",(function(e){var t;if(w._commonOptions.clientSecret)throw new E.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.");var n=(0,S.ei)(w._commonOptions,Cr),r=Sr(n,!0),o=(0,S.sE)(w._elements,(function(e){return"payButton"===e._componentName}));if(null==o||null===(t=o._implementation._frame)||void 0===t||t._emit("update-start"),w._controller.action.updateElementsOptions({customerOptions:void 0,customerSessionClientSecret:void 0,locale:void 0,appearance:void 0,groupId:w._id,deferredIntent:r,stripeUserCredentials:e}).then((function(){var e;Ar((0,d.Z)(w)),null==o||null===(e=o._implementation._frame)||void 0===e||e._emit("update-end")})),(0,S.sE)(w._elements,(function(e){return"linkAuthentication"===e._componentName})))throw new E.No("It looks like you use LinkAuthenticationElement in your Elements integration.\n stripe.update() is not supported for LinkAuthenticationElement.")})),(0,p.Z)(w,(0,d.Z)(w))}(0,m.Z)(t,e);var n=(0,f.Z)(t);return t}(R.Z),Ir=Nr,Mr=function(e,t,n,r,o,i,a){return new j.Z({controller:e,authentication:t,mids:n,rawOptions:r,betas:o,queryStrategyOverride:i,listenerRegistry:a})},Tr=n(1764),Rr=null,Or=function(e){var t=e.stripe,r=e.checkoutSessionId,o=e.controller,i=e.appearance;if(Rr)throw new E.No("Custom Checkout is already initialized");return(0,ge.l)((function(){return n.e(895).then(n.bind(n,1809))})).then((function(e){return(0,e.init)({stripe:t,checkoutSessionId:r,controller:o,appearance:i}).then((function(e){return Rr=e,e}))}))},Zr=n(2102),jr=Object.freeze({clientSecret:_.Z_,onComplete:(0,_.jt)(_.uz)}),xr=null,Lr=function(e){var t=e.controller,r=function(e){return(0,_.Gu)((0,_.ci)(jr),e,"initEmbeddedCheckout(options)")}(e.rawOptions||{});if(r.warnings.forEach((function(e){t.warn(e)})),function(e){if("embedded"!==(0,Zr.R)(e).uiMode)throw new Error("Invalid Checkout session. Only Checkout sessions with ui_mode=embedded can be used with embedded Checkout.")}(r.value.clientSecret),xr)throw new E.No("You cannot have multiple Embedded Checkout objects.");return(0,ge.l)((function(){return n.e(16).then(n.bind(n,5006))})).then((function(e){var n=e.init;return xr=n({options:r.value,controller:t})}))},Br=(0,_.mC)({name:(0,_.kw)("react-stripe-js","stripe-js","react-stripe-elements"),version:(0,_.AG)(_.Z_),startTime:(0,_.jt)(_.Rx)}),Dr=(0,_.ci)({name:(0,_.ui)(1,30),partner_id:(0,_.jt)(_.Z_),version:(0,_.jt)((0,_.ui)(5,15)),url:(0,_.jt)((0,_.ui)(4,60))}),qr=n(6352),Fr=n(3852),Gr=n(7087),Ur=["elements","createToken","createPaymentMethod"],zr=["elements","createSource","createToken","createPaymentMethod"],Hr=function(){function e(t){var n=this;(0,c.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,s.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,S.Xy)(this._gets,Ur)?this._onDetection("react-stripe-js"):(0,S.Xy)(this._gets,zr)&&this._onDetection("react-stripe-elements")}}]),e}(),Kr=function(e){if(!e||"object"!=typeof e)return null;var t=e.type;return{type:"string"==typeof t?t:null,data:(0,h.Z)(e,["type"])}},Yr=function(e){switch(e.type){case"object":return{source:e.object};case"error":return{error:e.error};default:return(0,_.Rz)(e)}},Jr={source:(0,_.mC)({id:(0,_.xe)("src_"),client_secret:(0,_.xe)("src_client_secret_")})},Wr=(0,_.mC)(Jr),Vr=function(e){switch(e.type){case"object":return{paymentMethod:e.object};case"error":return{error:e.error};default:return(0,_.Rz)(e)}},Xr=function(e,t,n,r,o,i){if("string"==typeof r)return function(e,t,n,r,o){var i=(0,_.rX)(r),a=Kr(i?o:r),c=a||{type:null,data:{}},s=c.type,u=c.data;if(s&&n!==s)return Z.J.reject(new E.No("The type supplied in payment_method_data is not consistent."));if(i){var l=i._implementation._frame.id,p=i._componentName;return e.action.createPaymentMethodWithElement({frameId:l,elementName:p,type:n,paymentMethodData:u,mids:t,enforcePreSubmit:!1,enforcePaymentMethodCreationManual:!1}).then(Vr)}return a?e.action.createPaymentMethodWithData({elementName:null,type:n,paymentMethodData:u,mids:t}).then(Vr):Z.J.reject(new E.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,_.Gu)((0,Ne.q2)(null,t),e,"createPaymentMethod").value}(r,n),c=a.element,s=a.elements,u=a.type,l=a.data,p=(0,k.uN)(n,k.M4.elements_enable_deferred_intent_beta_1);if(c){var d=c._implementation._frame.id,m=c._componentName,f=["payment","expressCheckout","payButton"].indexOf(m)>-1;return e.action.createPaymentMethodWithElement({frameId:d,elementName:m,type:u,paymentMethodData:l,mids:t,enforcePreSubmit:f&&!p,enforcePaymentMethodCreationManual:f&&!p}).then(Vr)}if(s){if(s._controller._id!==e._id)throw new E.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,y=s._id,v="stripe.createPaymentMethod()";return e.action.getElementConfirmingPayment({groupId:y,errorMessageMethodName:v}).then((function(n){return h=n,e.action.createPaymentMethodWithElements({groupId:y,elements:s._elements,paymentMethodData:l,mids:t,elementConfirming:n,enforcePreSubmit:!p,enforcePaymentMethodCreationManual:!p})})).then((function(t){return(0,gt.tA)({groupId:y,elementConfirmingPayment:h,controller:e,isError:"error"in t,errorMessageMethodName:v}).then((function(){return t}))})).then((function(e){return Vr(e)}))}if(u)return e.action.createPaymentMethodWithData({elementName:null,type:u,paymentMethodData:l,mids:t}).then(Vr);throw new Error("No type or elements provided")}catch(e){return Z.J.reject(e)}},$r=n(1849),Qr=n(4469),eo=n(3534),to=function(){function e(){(0,c.Z)(this,e),this.lastId=0,this.resolverMap={}}return(0,s.Z)(e,[{key:"getNextRequestId",value:function(){var e=this.lastId+1;return this.lastId=e,e}},{key:"setResolver",value:function(e,t,n){this.resolverMap[e]=this.resolverMap[e]||{};var r=this.resolverMap[e];r&&(r[t]=n)}},{key:"getResolverAndDelete",value:function(e){var t=e.type,n=this.resolverMap[t];if(n&&n[e.id]){var r=n[e.id];return delete n[e.id],r}return null}}]),e}(),no=to,ro=function(){function e(t){var n=this;(0,c.Z)(this,e),this.createListener=function(){window.addEventListener("message",n.receiveMessageFromChild)},this.receiveMessageFromChild=function(e){var t;if(e.source===(null===(t=n.frame)||void 0===t?void 0:t.contentWindow)){var r=JSON.parse(e.data);if(r.channel===n.channel){if(!("initMessage"in r)){var o=n.getClientHandler(r);if(o){var i=function(e){var t=n.frame,o=n.frameOrigin;if(!t)throw new Error("Cannot communicate with frame before calling mount().");var i=t.contentWindow;if(!i||!o)throw new Error("frame window is not ready");var a={type:r.type,id:r.id,channel:r.channel,body:e};i.postMessage(JSON.stringify(a),o)};n.initialized?o(r.body,i):new Z.J((function(e){n.messageQueue.push((function(){return e({body:r.body,sendReplyToChild:i})}))})).then((function(){o(r.body,i)}))}}if("initMessage"in r){for(n.frameOrigin=e.origin;n.messageQueue.length>0;){var a=n.messageQueue.shift();a&&a()}n.initialized=!0,n.frame&&(n.frame.dataset.initialized="true")}else{var c=n.resolver.getResolverAndDelete(r);c&&c(r.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 no,this.on="on"in t?t.on:{},this.createListener()}return(0,s.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",a=document.createElement("iframe");r&&a.addEventListener("load",(function(){r(a)})),a.setAttribute("frameborder","0"),a.setAttribute("allowTransparency","true"),a.setAttribute("scrolling","no"),a.setAttribute("name",n),a.setAttribute("referrerpolicy",i),e.visible||(a.setAttribute("aria-hidden","true"),a.setAttribute("tabIndex","-1"));var c=e.frameAttributes;c&&Object.keys(c).forEach((function(e){a.setAttribute(e,c[e])}));var s,u=(s=t,"".concat("https://js.stripe.com/v3/").concat(s||""));if(o){var l=(0,Qr.q)(o);a.src="".concat(u,"#").concat(l)}else a.src=u;return e.visible||(0,eo.SV)(a),a}({fingerprintedPath:this.fingerprintedPath,name:this.channel,queryStringOptions:(0,i.Z)((0,i.Z)({},this.frameQueryParams),{},{parentOrigin:window.location.origin}),referrerPolicy:"no-referrer",frameAttributes:this.frameAttributes,visible:!(null==t||!t.visible)});e.appendChild(n),this.frame=n}}},{key:"sendMessageToChild",value:function(e,t){var n=this;return this.initialized?this.postMessageToChild(e,t):new Z.J((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 Z.J((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}(),oo=ro,io=(window.location.hash.indexOf("debugMode=true"),function(e){function t(e){return(0,c.Z)(this,t),n.call(this,{channel:"paypal-fraudnet",fingerprintedPath:"paypal-fraudnet-sdk-92172653b7b50c7a82b0a794d59f01c8.html",frameQueryParams:{flowId:e.flowId,sessionId:e.sessionId,sandbox:e.sandbox},on:e.on})}(0,m.Z)(t,e);var n=(0,f.Z)(t);return t}(oo)),ao=io,co=function(e,t){return new Z.J((function(n,r){setTimeout((function(){return r(new Error("Timeout in integrateFraudnet"))}),5e3);var o=(0,y.Vj)().replace(/-/g,""),i=new ao({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)}))},so=n(6977),uo=n(5733),lo=n(112),po={clientSecret:(0,_.jt)(_.Z_),params:(0,_.jt)(_.Ry),elements:(0,_.jt)(_.Ry)},mo=function(e,t){var n=e.rawSecret,r=e.rawElements,o=e.validatedUpdateParams;if(function(e,t){var n=e.rawSecret,r=e.rawElements;if(!n&&!r)throw new E.No("".concat(t,": expected either `elements` or `clientSecret`, but got neither."))}({rawSecret:n,rawElements:r},t),n&&!r){if(null!=o&&o.payment_method&&null!=o&&o.payment_method_data)throw new E.No("".concat(t,": Expected either `payment_method` or `payment_method_data`, but not both."));return{type:"clientSecret",clientSecret:n}}var i=(0,_.MO)(r);if(!i)throw new E.No("Invalid value for ".concat(t,": elements should be an Elements group. You specified: ").concat(typeof r,"."));return{type:"elements",elements:i,clientSecret:n}},fo=function(e,t,n,r,o){var a,c,s=function(e){var t=e.rawUpdateData,n=e.controller,r=e.errorMessageMethodName,o=(0,_.Gu)((0,_.mC)(po),t,r),i=o.value,a=i.elements,c=void 0===a?void 0:a,s=i.params,u=i.clientSecret,l=o.warnings,p=(0,_.Gu)((0,_.jt)((0,_.mC)({payment_method:(0,_.jt)(_.Z_),payment_method_data:(0,_.jt)(_.Ry),payment_method_options:(0,_.jt)(_.Ry),setup_future_usage:(0,_.jt)(_.Xg)})),s,r,{path:["params"]}).value,d=mo({rawSecret:u,rawElements:c,validatedUpdateParams:p},r);return l.forEach((function(e){return n.warn(e)})),{validatedUpdateParams:p,rawUpdateParams:s,validatedParams:d}}({rawUpdateData:n,controller:e,errorMessageMethodName:o}),u=s.validatedParams,l=s.validatedUpdateParams,p=s.rawUpdateParams,d=null!=p?p:{},m=(d.payment_method,d.payment_method_data,d.payment_method_options,(0,h.Z)(d,["payment_method","payment_method_data","payment_method_options"])),f=u.clientSecret?(0,so.RY)(u.clientSecret):null;return"elements"===u.type?{mode:{tag:"elements",groupId:u.elements._id,data:null!==(a=null==l?void 0:l.payment_method_data)&&void 0!==a?a:{},options:null!==(c=null==l?void 0:l.payment_method_options)&&void 0!==c?c:{},intentSecret:f||void 0},otherParams:m,expectedType:null,mids:t,options:null}:function(e){var t,n=e.validatedParams,r=e.validatedConfirmParams,o=e.otherParams,a=e.intentType,c=e.mids,s=null!=r?r:{},u=s.payment_method_data,l=s.payment_method,p=s.payment_method_options,d="payment"===a?(0,gt.cn)(n.clientSecret,"confirmPayment"):(0,gt.jH)(n.clientSecret,"confirmSetup"),m=(0,gt.k7)({payment_method:u}),f={};return"paymentMethod"===(t=u&&m?{intentSecret:d,tag:"paymentMethod-from-data",type:m,data:u,options:null!=p?p:{}}:l?{intentSecret:d,tag:"paymentMethod",paymentMethod:l,options:null!=p?p:{}}:{intentSecret:d,tag:"none"}).tag&&(f={mandate_data:{customer_acceptance:{type:"online",online:{infer_from_client:!0}}}}),{mids:c,mode:t,expectedType:m,otherParams:(0,i.Z)((0,i.Z)({},f),o),options:{handleActions:!1}}}({validatedParams:u,validatedConfirmParams:l,otherParams:m,intentType:r,mids:t})},ho=function(e,t){return function(n,r,o,a,c){var s=(0,gt.cn)(o,e),u=(0,gt.o1)(t,e,a,s),l=(0,gt.el)(e,c),p="none"===u.mode.tag,d=n.action.confirmPaymentIntent((0,i.Z)((0,i.Z)({},u),{},{expectedType:t,options:l,mids:r}));return l.handleActions?d.then((0,uo.nq)(n,p,!1,!1,u.otherParams.expand)):d.then(so.PA)}},_o=ho("confirmAcssDebitPayment",w.GS.acss_debit),yo=ho("confirmAffirmPayment",w.GS.affirm),vo=ho("confirmAfterpayClearpayPayment",w.GS.afterpay_clearpay),go=ho("confirmAuBecsDebitPayment",w.GS.au_becs_debit),bo=ho("confirmBacsDebitPayment",w.GS.bacs_debit),wo=ho("confirmBancontactPayment",w.GS.bancontact),ko=ho("confirmBoletoPayment",w.GS.boleto),So=ho("confirmCardPayment",w.GS.card),Eo=ho("confirmEpsPayment",w.GS.eps),Co=ho("confirmFpxPayment",w.GS.fpx),Po=ho("confirmGiropayPayment",w.GS.giropay),Ao=ho("confirmGrabPayPayment",w.GS.grabpay),No=ho("confirmIdealPayment",w.GS.ideal),Io=ho("confirmKlarnaPayment",w.GS.klarna),Mo=ho("confirmKonbiniPayment",w.GS.konbini),To=ho("confirmMobilepayPayment",w.GS.mobilepay),Ro=ho("confirmOxxoPayment",w.GS.oxxo),Oo=ho("confirmAlipayPayment",w.GS.alipay),Zo=ho("confirmP24Payment",w.GS.p24),jo=ho("confirmPayByBankPayment",w.GS.pay_by_bank),xo=function(e,t,n,r,o){if("error"===(0,_.ld)((0,_.jt)((0,_.mC)({payment_method_options:(0,_.jt)((0,_.mC)({paypal:(0,_.jt)(_.Ry)}))})),r,"internal").type)return ho("confirmPayPalPayment",w.GS.paypal)(e,t,n,r,o);var a=(0,gt.cn)(n,"confirmPayPalPayment");return function(e,t){var n=e.keyMode()===nt.Kl.live;return new Z.J((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");co(i,n).then((function(e){r(e)})).catch((function(e){o(e)}))}else o()})).catch((function(e){o(e)}))}))}(e,a.id).then((function(a){var c=(0,i.Z)((0,i.Z)({},r),{},{payment_method_options:(0,i.Z)((0,i.Z)({},r&&r.payment_method_options||{}),{},{paypal:(0,i.Z)((0,i.Z)({},r&&r.payment_method_options&&r.payment_method_options.paypal||{}),{},{risk_correlation_id:"".concat(a)})})});return ho("confirmPayPalPayment",w.GS.paypal)(e,t,n,c,o)})).catch((function(){return ho("confirmPayPalPayment",w.GS.paypal)(e,t,n,r,o)}))},Lo=ho("confirmSepaDebitPayment",w.GS.sepa_debit),Bo=ho("confirmSofortPayment",w.GS.sofort),Do=ho("confirmIdBankTransferPayment",w.GS.id_bank_transfer),qo=ho("confirmUpiPayment",w.GS.upi),Fo=ho("confirmUsBankAccountPayment",w.GS.us_bank_account),Go=ho("confirmNzBankAccountPayment",w.GS.nz_bank_account),Uo=ho("confirmBlikPayment",w.GS.blik),zo=ho("confirmZipPayment",w.GS.zip),Ho=ho("confirmCustomerBalancePayment",w.GS.customer_balance),Ko=function(e,t,n,r,o){if(o&&!0===o.handleActions)throw new E.No("Expected option `handleActions` to be `false`.");var a=(0,i.Z)((0,i.Z)({},r),{},{payment_method:(0,i.Z)({},r&&r.payment_method||{}),payment_method_options:(0,i.Z)((0,i.Z)({},r&&r.payment_method_options||{}),{},{wechat_pay:(0,i.Z)((0,i.Z)({},r&&r.payment_method_options&&r.payment_method_options.wechat_pay||{}),{},{client:"web"})})});return ho("confirmWechatPayPayment",w.GS.wechat_pay)(e,t,n,a,o)},Yo=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 E.No("Expected client value `web` or `mobile_web` in payment_method_options.");var a={};"string"==typeof r.payment_method&&(a=r.payment_method),"object"==typeof r.payment_method&&(a=(0,i.Z)({},r.payment_method||{}));var c=(0,i.Z)((0,i.Z)({},r),{},{payment_method:a,payment_method_options:(0,i.Z)((0,i.Z)({},r&&r.payment_method_options||{}),{},{wechat_pay:(0,i.Z)({},r&&r.payment_method_options&&r.payment_method_options.wechat_pay||{})})});return ho("confirmWechatPayPayment",w.GS.wechat_pay)(e,t,n,c,o)},Jo=ho("confirmCashappPayment",w.GS.cashapp),Wo=ho("confirmPayNowPayment",w.GS.paynow),Vo=ho("confirmPayNowDisplayBeta1",w.GS.paynow),Xo=ho("confirmPixPayment",w.GS.pix),$o=ho("confirmPromptPayPayment",w.GS.promptpay),Qo=ho("confirmRevolutPayPayment",w.GS.revolut_pay),ei=ho("confirmNetbankingPayment",w.GS.netbanking),ti=ho("confirmSouthKoreaMarketPayment",w.GS.south_korea_market),ni=ho("confirmSwishPayment",w.GS.swish),ri=function(e,t,n,r){var o=(0,gt.cn)(n,"updatePaymentIntent"),a=(0,gt.k7)(r),c=(0,gt.o1)(a,"updatePaymentIntent",r,o);return e.action.updatePaymentIntent((0,i.Z)((0,i.Z)({},c),{},{expectedType:a,mids:t,options:null})).then(so.PA)},oi=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},ii=function(e,t){return function(e,t){var n=(0,gt.cn)(e,"retrievePaymentIntent");return t.action.retrievePaymentIntent({intentSecret:n,hosted:!1})}(e,t).then(so.PA)},ai=function(e,t,n){var r=(0,gt.cn)(t,"verifyMicrodepositsForPayment"),o=(0,_.Gu)(_.Ry,n,"stripe.verifyMicrodepositsForPayment");return e.action.verifyMicrodepositsForPayment({intentSecret:r,data:o.value}).then(so.PA)},ci=function(e,t,n){var r=(0,gt.cn)(t,"collectUsBankAccountForPayment"),o=(0,_.Gu)((0,Ne.ZY)("us_bank_account"),n,"stripe.collectUsBankAccountForPayment").value,i=o.paymentMethodData,a=o.otherParams;return ft(r.clientSecret,r.id,e,i).then((function(t){return t.error?e.action.localizeError(t.error).then((function(e){return Z.J.resolve({error:e})})):t.linkAccountSession.paymentAccount?e.action.attachLinkAccountSessionForPayment({intentSecret:r,linkAccountSessionId:t.linkAccountSession.id,expandParam:a.expand}).then((function(e){return(0,so.PA)(e)})):e.action.retrievePaymentIntent({intentSecret:r,hosted:!1}).then(so.PA)}))},si=function(e,t){var n=(0,_.Gu)((0,Ne.as)(Ne.f4),t,"stripe.collectBankAccountForPayment").value,r=n.clientSecret,o=n.paymentMethodData,i=n.otherParams;return ft(r.clientSecret,r.id,e,o).then((function(t){return t.error?e.action.localizeError(t.error).then((function(e){return Z.J.resolve({error:e})})):t.linkAccountSession.paymentAccount?e.action.attachLinkAccountSessionForPayment({intentSecret:r,linkAccountSessionId:t.linkAccountSession.id,expandParam:i.expand}).then((function(e){return(0,so.PA)(e)})):e.action.retrievePaymentIntent({intentSecret:r,hosted:!1}).then(so.PA)}))},ui=function(e,t){var n=(0,gt.cn)(e,"handleCardAction");return t.action.retrievePaymentIntent({intentSecret:n,hosted:!1}).then((function(e){var n=(0,uo.Fh)(e);switch(n.type){case"error":return Z.J.resolve((0,so.PA)(e));case"object":var r=n.object;if((0,so.mD)(r.status)){if("manual"!==r.confirmation_method)throw new E.No("handleCardAction: The PaymentIntent supplied does not require manual server-side confirmation. Please use confirmCardPayment instead to complete the payment.");return(0,uo.gO)(t,r,n.locale,!1,!1)}throw new E.No("handleCardAction: The PaymentIntent supplied is not in the requires_action state.");default:return(0,_.Rz)(n)}}))},li=n(6297),pi=n(623),di=function(e,t){var n=(0,_.Gu)((0,_.mC)({clientSecret:Ne.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 Z.J.resolve((0,so.e3)(t));case"object":var n=t.object;if((0,so.mD)(n.status))return(0,pi.il)(e,n,t.locale,!1);throw new E.No("handleNextAction: The SetupIntent supplied is not in the requires_action state.");default:return(0,_.Rz)(t)}}))}(e,n):function(e,t){return e.action.retrievePaymentIntent({intentSecret:t,hosted:!1}).then((function(t){switch(t.type){case"error":return Z.J.resolve((0,so.PA)(t));case"object":var n=t.object;if((0,so.mD)(n.status))return(0,uo.gO)(e,n,t.locale,!1,!1);throw new E.No("handleNextAction: The PaymentIntent supplied is not in the requires_action state.");default:return(0,_.Rz)(t)}}))}(e,n)},mi=function(e,t){if(null==e)return(0,_.x4)(null);var n=e.type,r=(0,h.Z)(e,["type"]),o=(0,_.Wc)(_.Z_,(function(){return null}))(n,(0,_.NQ)(t,"type"));return"error"===o.type?o:(0,_.x4)({type:o.value,data:r})},fi=function(e,t,n,r){if(null===e){if(null===t){var o=r?"source_data":"payment_method_data";throw new E.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 E.No("".concat(n,": you specified `type: ").concat(t,"`, but ").concat(n," will create a ").concat(e," payment method."));return e},hi=function(e){return function(t,n){if("object"==typeof t&&null!==t){var r=t.source,o=t.source_data,a=t.payment_method,c=t.payment_method_data,s=(0,h.Z)(t,["source","source_data","payment_method","payment_method_data"]);if(null!=r&&"string"!=typeof r)return(0,_.RH)("string",typeof r,(0,_.NQ)(n,"source"));if(null!=a&&"string"!=typeof a)return(0,_.RH)("string",typeof a,(0,_.NQ)(n,"payment_method"));if(null!=o&&"object"!=typeof o)return(0,_.RH)("object",typeof o,(0,_.NQ)(n,"source_data"));if(null!=c&&"object"!=typeof c)return(0,_.RH)("object",typeof c,(0,_.NQ)(n,"payment_method_data"));var u=mi(o,(0,_.NQ)(n,"source_data"));if("error"===u.type)return u;var l=u.value,p=mi(c,(0,_.NQ)(n,"payment_method_data"));if("error"===p.type)return p;var d=p.value;return(0,_.x4)({sourceData:l,source:null==r?null:r,paymentMethodData:d,paymentMethod:null==a?null:a,otherParams:(0,i.Z)((0,i.Z)({},e),s)})}return null===t?(0,_.RH)("object","null",n):(0,_.RH)("object",typeof t,n)}},_i=function(e){return function(t,n){if(void 0===t)return(0,_.x4)({sourceData:null,paymentMethodData:null,source:null,paymentMethod:null,otherParams:{}});if("object"!=typeof t)return(0,_.RH)("object",typeof t,n);if(null===t)return(0,_.RH)("object","null",n);if(e){if(!t.payment_intent){var r=(0,_.Gu)((0,_.mC)({return_url:(0,_.jt)(_.Z_),expand:(0,_.jt)((0,_.CT)(_.Z_)),shipping:(0,_.jt)((0,_.ci)({name:_.Z_,address:(0,_.ci)({line1:(0,_.jt)(_.Z_),line2:(0,_.jt)(_.Z_),city:(0,_.jt)(_.Z_),state:(0,_.jt)(_.Z_),postal_code:(0,_.jt)(_.Z_),country:(0,_.jt)(_.Z_)})}))}),t,"validate otherParams").value,o=(0,i.Z)((0,i.Z)({},t),r);return(0,_.x4)({sourceData:null,paymentMethodData:null,source:null,paymentMethod:null,otherParams:o})}var a=t.payment_intent,c=(0,h.Z)(t,["payment_intent"]);return hi(c)(a,(0,_.NQ)(n,"payment_intent"))}return t.payment_intent?(0,_.zS)(new E.No("The payment_intent parameter has been removed. To fix, move everything nested under the payment_intent parameter to the top-level object.")):hi({})(t,n)}},yi=function(e,t,n,r,o){return function(a,c){var s=function(e,t,n,r,o,a,c){var s=(0,_.ld)(_.IN,o,r);if("error"===s.type)return null;var u=s.value,l=(0,_.Gu)(_i(t),a,r).value,p=l.sourceData,d=l.source,m=l.paymentMethodData,f=l.paymentMethod,h=l.otherParams;if(!e&&p)throw new E.No("".concat(r,": Expected payment_method_data, not source_data."));if(null!=d)throw new E.No("When calling ".concat(r," on an Element, you can't pass in a pre-existing source ID, as a source will be created using the Element."));if(null!=f)throw new E.No("When calling ".concat(r," on an Element, you can't pass in a pre-existing PaymentMethod ID, as a PaymentMethod will be created using the Element."));var y=u._componentName,v=u._implementation._frame.id,g=p||m||{type:null,data:{}},b=g.type,k=g.data,S=(0,w.ZX)(y,b),C=e&&!m,P={elementName:y,frameId:v,type:fi(n,S,r,C),data:k};return C?{mode:(0,i.Z)({tag:"source-from-element",intentSecret:c},P),otherParams:h}:{mode:(0,i.Z)({tag:"paymentMethod-from-element",options:null,intentSecret:c},P),otherParams:h}}(e,t,n,r,a,c,o);if(s)return s;var u=function(e,t,n,r,o,i,a){var c=(0,_.Gu)(_i(t),o,r).value,s=c.sourceData,u=c.source,l=c.paymentMethodData,p=c.paymentMethod,d=c.otherParams;if(!e&&s)throw new E.No("".concat(r,": Expected payment_method, source, or payment_method_data, not source_data."));if(null!==u&&null!==s)throw new E.No("".concat(r,": Expected either source or source_data, but not both."));if(null!==p&&null!==l)throw new E.No("".concat(r,": Expected either payment_method or payment_method_data, but not both."));if(null!==p&&null!==u)throw new E.No("".concat(r,": Expected either payment_method or source, but not both."));if(s||l){var m=s||l||{},f=m.type,h=m.data,y=e&&!l,v=fi(n,f,r,y);return y?{mode:{tag:"source-from-data",intentSecret:a,type:v,data:h},otherParams:d}:{mode:{tag:"paymentMethod-from-data",type:v,data:h,intentSecret:a,options:null},otherParams:d}}return null!==u?{mode:{tag:"source",intentSecret:a,source:u},otherParams:d}:null!==p?{mode:{tag:"paymentMethod",paymentMethod:p,intentSecret:a,options:null},otherParams:d}:{mode:{tag:"none",intentSecret:a},otherParams:d}}(e,t,n,r,a,0,o);if(u)return u;throw new E.No("Expected: stripe.".concat(r,"(intentSecret, element[, data]) or stripe.").concat(r,"(intentSecret[, data]). Please see the docs for more usage examples https://stripe.com/docs/payments/dynamic-authentication"))}},vi=function(e,t,n,r,o,a){var c=(0,_.Gu)(Ne.f4,r,"stripe.confirmPaymentIntent intent secret").value,s=yi(e,!1,null,"confirmPaymentIntent",c)(o,a);return t.action.confirmPaymentIntent((0,i.Z)((0,i.Z)({},s),{},{expectedType:null,options:{handleActions:!1},mids:n})).then(so.PA)},gi=function(e,t,n,r,o,a,c){var s=(0,_.Gu)(Ne.f4,o,"stripe.handleCardPayment intent secret").value,u=w.GS.card,l=yi(e,r,u,"handleCardPayment",s)(a,c),p=!a&&!c;return t.action.confirmPaymentIntent((0,i.Z)((0,i.Z)({},l),{},{expectedType:u,options:{handleActions:!0},mids:n})).then((0,uo.nq)(t,p,!1,!1))},bi=function(e,t,n,r,o,a){var c=(0,_.Gu)(Ne.f4,r,"stripe.handleSepaDebitPayment intent secret").value,s=w.GS.sepa_debit,u=yi(!1,n,s,"handleSepaDebitPayment",c)(o,a),l=!o&&!a;return e.action.confirmPaymentIntent((0,i.Z)((0,i.Z)({},u),{},{expectedType:s,options:{handleActions:!0},mids:t})).then((0,uo.nq)(e,l,!1,!1))},wi=function(e,t,n,r,o,a,c){var s=(0,_.Gu)(Ne.f4,o,"stripe.handleIdealPayment intent secret").value,u=w.GS.ideal,l=yi(e,r,u,"handleIdealPayment",s)(a,c),p=!a&&!c;return t.action.confirmPaymentIntent((0,i.Z)((0,i.Z)({},l),{},{expectedType:u,options:{handleActions:!0},mids:n})).then((0,uo.nq)(t,p,!1,!1))},ki=function(e,t,n,r,o,a){var c=(0,_.Gu)(Ne.f4,r,"stripe.handleFpxPayment intent secret").value,s=w.GS.fpx,u=yi(!1,n,s,"handleFpxPayment",c)(o,a),l=!o&&!a;return e.action.confirmPaymentIntent((0,i.Z)((0,i.Z)({},u),{},{expectedType:s,options:{handleActions:!0},mids:t})).then((0,uo.nq)(e,l,!1,!1))},Si=function(e){switch(e.type){case"object":return{returnIntent:e.object};case"error":return{error:e.error};default:return(0,_.Rz)(e)}},Ei=function(e,t,n){return e.action.confirmReturnIntent({returnIntentId:t,data:n}).then(Si)},Ci=function(e,t){return function(n,r,o,a,c){var s=(0,gt.jH)(o,e),u=(0,gt.o1)(t,e,a,s),l=(0,gt.el)(e,c),p="none"===u.mode.tag,d=n.action.confirmSetupIntent((0,i.Z)((0,i.Z)({},u),{},{expectedType:t,options:l,mids:r}));return l.handleActions?d.then((0,pi.kv)(n,p,!1,u.otherParams.expand)):d.then(so.e3)}},Pi=Ci("confirmAcssDebitSetup",w.GS.acss_debit),Ai=Ci("confirmAfterpayClearpaySetup",w.GS.afterpay_clearpay),Ni=Ci("confirmCardSetup",w.GS.card),Ii=Ci("confirmSepaDebitSetup",w.GS.sepa_debit),Mi=Ci("confirmAuBecsDebitSetup",w.GS.au_becs_debit),Ti=Ci("confirmBacsDebitSetup",w.GS.bacs_debit),Ri=Ci("confirmCashappSetup",w.GS.cashapp),Oi=Ci("confirmIdealSetup",w.GS.ideal),Zi=Ci("confirmAlipaySetup",w.GS.alipay),ji=Ci("confirmSofortSetup",w.GS.sofort),xi=Ci("confirmBancontactSetup",w.GS.bancontact),Li=Ci("confirmIdBankTransferSetup",w.GS.id_bank_transfer),Bi=Ci("confirmPayPalSetup",w.GS.paypal),Di=Ci("confirmUsBankAccountSetup",w.GS.us_bank_account),qi=Ci("confirmNzBankAccountSetup",w.GS.nz_bank_account),Fi=Ci("confirmKlarnaSetup",w.GS.klarna),Gi=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},Ui=function(e,t){return function(e,t){var n=(0,gt.jH)(e,"retrieveSetupIntent");return t.action.retrieveSetupIntent({intentSecret:n,hosted:!1})}(e,t).then(so.e3)},zi=function(e,t,n){var r=(0,gt.jH)(t,"verifyMicrodepositsForSetup"),o=(0,_.Gu)(_.Ry,n,"stripe.verifyMicrodepositsForSetup");return e.action.verifyMicrodepositsForSetup({intentSecret:r,data:o.value}).then(so.e3)},Hi=function(e,t,n){var r=(0,gt.jH)(t,"collectUsBankAccountForSetup"),o=(0,_.Gu)((0,Ne.ZY)("us_bank_account"),n,"stripe.collectUsBankAccountForSetup").value,i=o.paymentMethodData,a=o.otherParams;return ht(r.clientSecret,r.id,e,i).then((function(t){return t.error?e.action.localizeError(t.error).then((function(e){return Z.J.resolve({error:e})})):t.linkAccountSession.paymentAccount?e.action.attachLinkAccountSessionForSetup({intentSecret:r,linkAccountSessionId:t.linkAccountSession.id,expandParam:a.expand}).then((function(e){return(0,so.e3)(e)})):e.action.retrieveSetupIntent({intentSecret:r,hosted:!1}).then(so.e3)}))},Ki=function(e,t){var n=(0,_.Gu)((0,Ne.as)(Ne.Yj),t,"stripe.collectBankAccountForSetup").value,r=n.clientSecret,o=n.paymentMethodData,i=n.otherParams;return ht(r.clientSecret,r.id,e,o).then((function(t){return t.error?e.action.localizeError(t.error).then((function(e){return Z.J.resolve({error:e})})):t.linkAccountSession.paymentAccount?e.action.attachLinkAccountSessionForSetup({intentSecret:r,linkAccountSessionId:t.linkAccountSession.id,expandParam:i.expand}).then((function(e){return(0,so.e3)(e)})):e.action.retrieveSetupIntent({intentSecret:r,hosted:!1}).then(so.e3)}))},Yi=function(e,t,n,r,o){var a=(0,_.Gu)(Ne.Yj,n,"stripe.handleCardSetup intent secret").value,c=w.GS.card,s=yi(!1,!1,c,"handleCardSetup",a)(r,o),u=!r&&!o;return e.action.confirmSetupIntent((0,i.Z)((0,i.Z)({},s),{},{expectedType:c,options:{handleActions:!0},mids:t})).then((0,pi.kv)(e,u,!1,s.otherParams.expand))},Ji=function(e,t,n,r,o){var a=(0,_.Gu)(Ne.Yj,n,"stripe.handleSepaDebitSetup intent secret").value,c=w.GS.sepa_debit,s=yi(!1,!1,c,"handleSepaDebitSetup",a)(r,o),u=!r&&!o;return e.action.confirmSetupIntent((0,i.Z)((0,i.Z)({},s),{},{expectedType:c,options:{handleActions:!0},mids:t})).then((0,pi.kv)(e,u,!1))},Wi=function(e,t,n,r,o){var a=(0,_.Gu)(Ne.Yj,n,"stripe.confirmSetupIntent intent secret").value,c=yi(!1,!1,null,"confirmSetupIntent",a)(r,o);return e.action.confirmSetupIntent((0,i.Z)((0,i.Z)({},c),{},{otherParams:(0,i.Z)({},c.otherParams),expectedType:null,options:{handleActions:!1},mids:t})).then(so.e3)},Vi=n(6042),Xi=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 E.No("stripe.verifyIdentity: Could not parse client secret.");return{identityClientSecret:t[0],id:t[1],token:t[3]}}throw new E.No("stripe.verifyIdentity: Could not parse client secret.")}(e),r=n.id,o=function(e){return"".concat(P.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,Vi.q)(t,{url:(0,D.jr)(n),size:"400x600",frameTitle:"identity.verification_frame_title",locale:o,useLightboxHostedCloseButton:!0,allowCamera:!0,appType:"identity"});return new Z.J((function(e){var t={type:"user_action",code:"session_cancelled"};i._on("identity-frame-close",(function(){(0,Vi.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,Vi.G)(i).then((function(){e({error:t})}))}))}))}({controller:t,url:o,id:r})},$i=["number","cvc","pin.number"],Qi=function(e,t){if("string"!=typeof e)return(0,_.$3)("an Issuing card ID of the form ic_xxx",e,t);var n,r=(n=e.trim().match(/ic_[a-zA-Z0-9_]+$/))?n[0]:null;return null===r?(0,_.$3)("an Issuing card ID of the form ic_xxx",e,t):(0,_.x4)(r,[])},ea=function(e,t){return(0,_.Gu)(Qi,e,"stripe.".concat(t," cardId")).value},ta=function(e,t){if("string"!=typeof e)return(0,_.$3)("an ephemeral key secret of the form ek_xxx",e,t);var n,r=(n=e.trim().match(/ek_[a-zA-Z0-9_]+$/))?n[0]:null;return null===r?(0,_.$3)("an ephemeral key secret of the form ek_xxx",e,t):(0,_.x4)(r,[])},na=function(e,t){return"string"!=typeof e?(0,_.$3)("a string",e,t):$i.indexOf(e)<0?(0,_.$3)("any of ".concat($i.join(", ")),e,t):(0,_.x4)(e,[])},ra=function(e,t){return(0,_.Gu)(ta,e,"stripe.".concat(t," ephemeral key secret")).value},oa=function(e,t){if("string"!=typeof e)return(0,_.$3)("an ephemeral key nonce of the form ephkn_xxx",e,t);var n,r=(n=e.trim().match(/ephkn_[a-zA-Z0-9_]+$/))?n[0]:null;return null===r?(0,_.$3)("an ephemeral key nonce of the form ephkn_xxx",e,t):(0,_.x4)(r,[])},ia=function(e){if("object"==typeof e&&e&&e.ephemeralKeySecret&&e.nonce){var t,n=ra(e.ephemeralKeySecret,"retrieveIssuingCard"),r=(o=e.nonce,i="retrieveIssuingCard",(0,_.Gu)(oa,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,_.Gu)(na,e,"stripe.".concat(t," expand param")).value}(e,"retrieveIssuingCard")}))),{ephemeralKeySecret:n,publicNonce:r,expand:t}}throw new E.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},aa=function(e,t){var n=function(e){if("object"==typeof e&&e&&e.issuingCard)return{issuingCard:ea(e.issuingCard,"createEphemeralKeyNonce")};throw new E.No("When creating an ephemeral key nonce, you must specify an Issuing card ID in the options argument of stripe.createEphemeralKeyNonce.")}(e);return t.action.createEphemeralKeyNonce({cardId:n.issuingCard}).then(Q)},ca=[k.M4.checkout_beta_2,k.M4.checkout_beta_3,k.M4.checkout_beta_4],sa=[k.M4.checkout_beta_2,k.M4.checkout_beta_3,k.M4.checkout_beta_4,k.M4.checkout_beta_locales,k.M4.checkout_beta_testcards],ua={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"},la={"pt-PT":"pt-PT"},pa=Object.keys(ua),da=Object.keys(la),ma={sku:(0,_.jt)(_.Z_),plan:(0,_.jt)(_.Z_),clientReferenceId:(0,_.jt)(_.Z_),locale:(0,_.jt)(_.kw.apply(void 0,["auto"].concat((0,a.Z)(pa)))),customerEmail:(0,_.jt)(_.Z_),billingAddressCollection:(0,_.jt)((0,_.kw)("required","auto")),submitType:(0,_.jt)((0,_.kw)("auto","pay","book","donate")),allowIncompleteSubscriptions:(0,_.jt)(_.Xg),shippingAddressCollection:(0,_.jt)((0,_.ci)({allowedCountries:(0,_.CT)(_.Z_)}))},fa=/cs_(test|live)_.+/,ha=function(e,t){var n=(0,_.ci)((0,i.Z)((0,i.Z)({},ma),{},{items:(0,_.jt)((0,_.or)((0,_.CT)((0,_.ci)({type:(0,_.kw)("plan"),quantity:(0,_.M4)(0),id:_.Z_})),(0,_.CT)((0,_.ci)({type:(0,_.kw)("sku"),quantity:(0,_.M4)(0),id:_.Z_})))),successUrl:_.Z_,cancelUrl:_.Z_})),r=(0,_.Gu)(n,t,"stripe.redirectToCheckout").value,o=r.sku,a=r.plan,c=r.items,s=(0,h.Z)(r,["sku","plan","items"]),u=function(e,t,n){if(e&&t||(e||t)&&n)throw new E.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 E.No("stripe.redirectToCheckout: You must provide either sku, plan, or items.")}(o,a,c);return(0,i.Z)({tag:"no-session",items:u},s)},_a=function(e,t,n){var r=(0,_.ci)((0,i.Z)((0,i.Z)({},ma),{},{sessionId:(0,_.jt)(_.Z_),successUrl:(0,_.jt)(_.Z_),cancelUrl:(0,_.jt)((0,_.AG)(_.Z_)),mode:(0,_.jt)((0,_.kw)("subscription","payment")),items:(0,_.jt)((0,_.or)((0,_.CT)((0,_.ci)({quantity:(0,_.M4)(0),plan:_.Z_})),(0,_.CT)((0,_.ci)({quantity:(0,_.M4)(0),sku:_.Z_})))),lineItems:(0,_.jt)((0,_.CT)((0,_.ci)({quantity:(0,_.M4)(0),price:_.Z_})))},-1!==e.indexOf("checkout_beta_locales")?{locale:(0,_.jt)(_.kw.apply(void 0,["auto"].concat((0,a.Z)(pa),(0,a.Z)(da))))}:{})),o=(0,_.Gu)(r,t,"stripe.redirectToCheckout").value;if(o.sessionId){var c=o.sessionId;if(Object.keys(o).length>1)throw new E.No("stripe.redirectToCheckout: Do not provide other parameters when providing sessionId. Specify all parameters on your server when creating the CheckoutSession.");if(!/^cs_/.test(c))throw new E.No("stripe.redirectToCheckout: Invalid value for sessionId. You specified '".concat(c,"'."));if("live"===n&&/^cs_test_/.test(c))throw new E.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(c))throw new E.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:c}}o.sessionId,o.sku,o.plan;var s=o.items,u=o.lineItems,l=o.successUrl,p=o.cancelUrl,d=o.mode,m=(0,h.Z)(o,["sessionId","sku","plan","items","lineItems","successUrl","cancelUrl","mode"]);if(!u&&!s)throw new E.No("stripe.redirectToCheckout: You must provide one of lineItems, items, or sessionId.");if(!l)throw new E.No("stripe.redirectToCheckout: You must provide successUrl.");return(0,i.Z)({tag:"no-session",items:s,lineItems:u,successUrl:l,cancelUrl:p,mode:d},m)},ya=function(e,t,n){var r=_a(e,t,n);if("no-session"===r.tag){var o=r.successUrl,i=r.cancelUrl;if(!(0,b.sD)(o))throw new E.No("stripe.redirectToCheckout: successUrl must start with either http:// or https://.");if(i&&!(0,b.sD)(i))throw new E.No("stripe.redirectToCheckout: cancelUrl must start with either http:// or https://.");return r}return r},va=function(e,t){return"session"===t.tag||null==e||t.locale||-1===["auto"].concat((0,a.Z)(pa)).indexOf(e)?t:(0,i.Z)((0,i.Z)({},t),{},{locale:e})},ga=function(e,t,n){var r=(0,S.sE)(ca,(function(t){return(0,k.uN)(e,t)}));if(t&&t.lineItems&&r)throw new E.No("Prices cannot be used with ".concat(r));if("string"==typeof t&&fa.test(t))throw new E.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 ha(0,t);case"checkout_beta_3":return _a(e,t,n);default:return ya(e,t,n)}},ba=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unknown";return va(t,ga(e,n,r))},wa=function(e,t){var n=t;return Boolean(!1)&&window.__STRIPE_CHECKOUT_URL_OVERRIDE__&&(n=t.replace(/^https?:\/\/[^/]+\//,window.__STRIPE_CHECKOUT_URL_OVERRIDE__)),(0,$r.U)(n).then((function(t){return(0,$r.d)(e,"redirectToCheckout",t),{error:t.error}}))},ka=n(3110),Sa=n.n(ka),Ea=n(8370),Ca=function(e){var t=(0,_.ld)(Br,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})},Pa=function(e){var t=e.apiVersion,n=e.innerLocalStorageSemaphore,r=e.manualBrowserDeprecationRollout,o=e.onControllerLoad,a=e.privateApiUrl,c=e.privatePaymentUserAgentSuffix,s=e.stripe,u=e.stripeAccount,l=e.stripeClass,p=e.stripeCreateTimestamp,d=e.stripeJsLoadTimestamp,m=new ee.E,f=new Ea.Z((0,i.Z)((0,i.Z)({apiKey:s._apiKey,apiVersion:t,__privateApiUrl:a,__privatePaymentUserAgentSuffix:c,stripeAccount:u,betas:s._betas,stripeJsId:l.stripeJsId,stripeJsLoadTimestamp:d,stripeCreateTimestamp:p,onFirstLoad:function(e){var t=e.controllerMetrics,n=e.source;try{o({controller:f,controllerInitTimestamp:m,controllerMetrics:t,source:n})}catch(e){}},listenerRegistry:s._listenerRegistry},s._locale?{locale:s._locale}:{}),{},{mids:s._mids,innerLocalStorageSemaphore:n,manualBrowserDeprecationRollout:r}));return f},Aa=function(e,t){Object.defineProperties(e,{_registerWrapper:{value:Ca,writable:!1,enumerable:!1,configurable:!0},_controller:{value:t,writable:!0,enumerable:!0,configurable:!0}})},Na=function(e){"__512650496"===Sa()(e.stripe._apiKey)?function(e){Aa(e.stripe,Pa(e))}(e):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(){if(t)return t;for(t=Pa(e),Aa(n,t);r.length>0;){var o=r.shift();n._registerWrapper(o)}return t}}})}(e)},Ia=function(e){switch(e.type){case"object":return{token:e.object};case"error":return{error:e.error};default:return(0,_.Rz)(e)}},Ma=function(e){return"object"==typeof e&&null!==e?e:{}},Ta=function(e){switch(e.type){case"object":return{radarSession:e.object};case"error":return{error:e.error};default:return(0,_.Rz)(e)}},Ra=n(7553),Oa=n(9465),Za="securitypolicyviolation",ja=window,xa=/^require-trusted-types-for/,La="LOAD_ERROR",Ba="REPORT_ONLY",Da="BLOCKED",qa={"controller.js":!0,"elements-inner-authentication.js":!0,"elements-inner-card.js":!0,"elements-inner-payment.js":!0,"phone-numbers-lib.js":!0},Fa=n(2690),Ga=["_1057540218","__833601310"],Ua=["_1541774781"],za="block",Ha="allow",Ka="list",Ya="query-param",Ja="real-rollout",Wa="no-rollout",Va=n(8539),Xa=n(7600),$a=function(e,t){var n=(0,i.Z)({event:e},t);var r="".concat("https://q.stripe.com","?").concat((0,b.qC)(n));(new Image).src=r},Qa="Stripe is being used in an unsupported browser and will not function. See https://stripe.com/docs/js/appendix/supported_browsers for details.",ec=function(){function e(){(0,c.Z)(this,e),this._element=null}return(0,s.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}(),tc=function(){function e(){(0,c.Z)(this,e)}return(0,s.Z)(e,[{key:"update",value:function(){}},{key:"fetchUpdates",value:function(){return Z.J.resolve()}},{key:"getElement",value:function(){return null}},{key:"create",value:function(){return new ec}},{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}(),nc=function(){function e(){(0,c.Z)(this,e)}return(0,s.Z)(e,[{key:"canMakePayment",value:function(){return Z.J.reject(Qa)}},{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}(),rc=function(){function e(){(0,c.Z)(this,e),this.IS_NOOP_BUILD=!0,console.error(Qa)}return(0,s.Z)(e,[{key:"elements",value:function(){return new tc}},{key:"redirectToCheckout",value:function(){return Z.J.reject(new Error(Qa))}},{key:"paymentRequest",value:function(){return new nc}},{key:"createToken",value:function(){return Z.J.reject(new Error(Qa))}},{key:"createSource",value:function(){return Z.J.reject(new Error(Qa))}},{key:"handleCardPayment",value:function(){return Z.J.reject(new Error(Qa))}},{key:"createPaymentMethod",value:function(){return Z.J.reject(new Error(Qa))}},{key:"confirmCardPayment",value:function(){return Z.J.reject(new Error(Qa))}}]),e}(),oc="true"===(hr=(0,Va.Z)(window.document),(0,Xa.v)(hr.slice(hr.indexOf("?")+1))).forceBrowserDeprecationRollout,ic=new ee.E(Tr.q),ac=!1,cc=function e(t){var r,o=t.controller,a=t.controllerLoadTimestamp,c=t.controllerInitTimestamp;if(!ac||a){ac=!0;var s=a||new ee.E;if("complete"===document.readyState){var l=null;if(window.performance&&window.performance.getEntriesByType){var p=window.performance.getEntriesByType("resource"),d="https://js.stripe.com/v3/".replace(/\/$/,"");l=p.reduce((function(e,t){if(0===t.name.indexOf(d)){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,i.Z)((0,i.Z)({},e),{},(0,u.Z)({},r,(0,i.Z)({raw_size:t.decodedBodySize,transfer_size:t.transferSize,duration:Math.round(t.duration)},r in qa?(o=t,{duration:Math.round(o.duration),transfer_size:null!==(a=o.transferSize)&&void 0!==a?a: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,a,c;return e}),{})}var m=Math.round(n(8622).x-Tr.q),f=c.getElapsedTime(s),h=null!==(r=l)&&void 0!==r&&r["stripe.js"]?l["stripe.js"].duration+m+f:null;o.report("init_timings",{element:o.controllerFor(),match_frame:t.source===o._controllerFrame._iframe.contentWindow,until_first_create:ic.getElapsedTime(o._createTimestamp),until_first_load:ic.getElapsedTime(s),stripe_create_duration:f,stripe_js_init_duration:m,stripe_js_load_duration:h,resource_timings:l,controller:t.controllerMetrics}),setTimeout((function(){new Z.J((function(e){if(ja.trustedTypes&&ja.Promise){var t,r=!1,o=function(e){(xa.test(e.effectiveDirective)||xa.test(e.violatedDirective))&&((0,b.vo)(e.blockedURI)||(0,b.vo)(e.sourceFile))&&(r=!0)},i=function(){return r?Da:La};ja.addEventListener(Za,o);try{t=n.e(913).then(n.bind(n,9554)).then((function(e){return(e.loaded&&r?Ba:"ALLOWED")||La}),i)}catch(e){t=new Z.J((function(e){return setTimeout(e,0)})).then(i)}t.then((function(){ja.removeEventListener(Za,o)})),e(t)}else e("NOT_SUPPORTED")})).then((function(e){(function(e){switch(e){case Ba:case Da:return!0}return!1})(e)&&o.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)}else window.addEventListener("load",(function(){try{e((0,i.Z)((0,i.Z)({},t),{},{controllerLoadTimestamp:s}))}catch(e){}}))}},sc=(0,_.mC)({apiKey:_.Z_,stripeAccount:(0,_.jt)(_.Z_),locale:(0,_.jt)(_.Z_),apiVersion:(0,_.jt)(_.Z_),__privateApiUrl:(0,_.jt)(_.Z_),__checkout:(0,_.jt)((0,_.mC)({mids:(0,_.mC)({muid:_.Z_,sid:_.Z_})})),__dashboard:(0,_.jt)(_.Ry),__hosted3DS:(0,_.jt)(_.Xg),__hostedInvoicePage:(0,_.jt)(_.Ry),canCreateRadarSession:(0,_.jt)(_.Xg),betas:(0,_.jt)((0,_.CT)(_.Z_))}),uc=function(e){return"You have an in-flight ".concat(e,"! Please be sure to disable your form submit button when ").concat(e," is called.")},lc=function(e){return function(){throw new E.No("You cannot call `stripe.".concat(e,"` without supplying an appropriate beta flag when initializing Stripe.js."))}},pc=function(e){return function(){throw new E.No("You cannot call `stripe.".concat(e,"` without supplying an Issuing beta flag when initializing Stripe.js."))}},dc=(0,Fa.r)(1),mc=function(){function e(t,n){var r=this;(0,c.Z)(this,e),this._listenerRegistry=(0,Fr.E)(),this.elements=(0,I.TC)((function(e){return new Ir(r._controller,r._listenerRegistry,{stripeJsLoadTimestamp:ic,stripeCreateTimestamp:r._controller._createTimestamp},r._betas,r._mids(),(0,i.Z)((0,i.Z)({},r._locale?{locale:r._locale}:{}),e))}),void 0,"elements"),this.createToken=(0,I.mx)((function(e,t){var n=r._mids();return"cvc_update"===e?function(e,t,n){var r=(0,_.rX)(t);if(r&&"cardCvc"===r._componentName){var o=r._implementation._frame.id;return e.action.tokenizeCvcUpdate({frameId:o,mids:n}).then(Ia)}throw new E.No("You must provide a `cardCvc` Element to create a `cvc_update` token.")}(r._controller,t,n):function(e,t){return function(n,r){var o=(0,_.rX)(n);if(o){var i=o._implementation._frame.id,a=o._componentName,c=Ma(r);return e.action.tokenizeWithElement({frameId:i,elementName:a,tokenData:c,mids:t}).then(Ia)}if("string"==typeof n){var s=n,u=Ma(r);return e.action.tokenizeWithData({elementName:null,type:s,tokenData:u,mids:t}).then(Ia)}throw new E.No("You must provide a Stripe Element or a valid token type to create a Token.")}}(r._controller,n)(e,t)}),void 0,"createToken"),this.createSource=(0,I.mx)((function(e,t){var n=(0,_.rX)(e),o=Kr(n?t:e),i=o||{type:null,data:{}},a=i.type,c=i.data;if(n){var s=n._implementation._frame.id,u=n._componentName;return!o&&(0,w.ke)(u)?Z.J.reject(new E.No("Please provide Source creation parameters to createSource.")):r._controller.action.createSourceWithElement({frameId:s,elementName:u,type:a,sourceData:c,mids:r._mids()}).then(Yr)}return o?a?r._controller.action.createSourceWithData({elementName:null,type:a,sourceData:c,mids:r._mids()}).then(Yr):Z.J.reject(new E.No("Please provide a source type to createSource.")):Z.J.reject(new E.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,_.Gu)(Wr,{source:e},"retrieveSource"),n=t.value;return t.warnings.forEach((function(e){return r._controller.warn(e)})),r._controller.action.retrieveSource(n).then(Yr)}),void 0,"retrieveSource"),this.paymentRequest=(0,I.W6)((function(e,t){(0,nt.pF)(r._keyMode);var n=t;return Mr(r._controller,{apiKey:r._apiKey,accountId:r._stripeAccount},r._mids(),e,r._betas,n,r._listenerRegistry)}),void 0,"paymentRequest");var o=new ee.E,a=(0,_.Gu)(sc,t||{},"Stripe()"),s=a.value,u=a.warnings,l=function(e){var t=e.apiKey,n=e.context,r=e.forceRollout,o=e.isAffectedBrowser,a=e.rolloutSlice,c=e.log,s=Sa()(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,i.Z)((0,i.Z)({},u),{},{mechanism:t,action:r,state:[n,t,r].join("-")}))};return r?(l({mechanism:Ya,action:o?za:Ha}),o):"___TESTMODE_FORCE_UNSUPPORTED_BROWSER"===t||(-1!==(0,S.cx)(Ua,(function(e){return e===s}))?(l({mechanism:Ka,action:o?za:Ha}),o):-1!==(0,S.cx)(Ga,(function(e){return e===s}))?(l({mechanism:Ka,action:Ha}),!1):function(e,t){return t<100}(0,a)?(l({mechanism:Ja,action:o?za:Ha}),o):(l({mechanism:Wa,action:Ha}),!1))}({apiKey:s.apiKey,context:"outer",forceRollout:oc,isAffectedBrowser:!window.Promise,rolloutSlice:Math.floor(100*Math.random()),log:$a});if(l)return this._apiKey="",this._keyMode="live",this._betas=[],this._isCheckout=!1,new rc;var p=s.apiKey,d=s.stripeAccount,m=s.apiVersion,f=s.locale,h=s.__dashboard,y=s.__privateApiUrl,v=s.__checkout,g=s.__hosted3DS,b=s.__hostedInvoicePage,C=(s.canCreateRadarSession,s.betas),A=(0,k.dZ)(C||null),N=A.validBetas,M=A.betaWarning,T=A.betaError;if(T)throw new E.No(T);M&&u.push(M),(0,nt.Tj)(p),null!=v&&v.mids&&(e._ec=(0,Gr.AK)({checkoutIds:v.mids})),this._apiKey=p.trim(),this._keyMode=(0,nt.lO)(this._apiKey),this._betas=N,this._locale=(0,k.jk)(f,this._betas)||null,this._stripeAccount=d||null,this._isCheckout=!!v;var R=h?P.J_:b?P.wl:void 0;this._attachControllerGetter(m,y,R,d,o),u.forEach((function(e){return r._controller.warn(e)})),(0,Oa.Z)(),this._ensureHTTPOnlyLinkCookie(),this._ensureHTTPS(),this._ensureStripeHosted(n),this._attachPaymentIntentMethods(this._betas,!!g),this._attachLegacyPaymentIntentMethods(this._betas),this._attachCheckoutMethods(this._betas),this._attachEmbeddedCheckoutMethods(this._betas),this._attachCustomCheckoutMethods(this._betas),this._attachPrivateMethodsForCheckout(this._isCheckout),this._attachPrivateMethodsForConsumer(Ra.Mo),this._attachCreateRadarSession(),this._attachGetters(),this._attachIssuingCardMethods(this._betas),this._attachIdentityMethods(this._betas),this._attachLinkedAccountsMethods(this._betas),this._attachAppInfo(),this._attachStripeUpdate()}return(0,s.Z)(e,[{key:"_attachStripeUpdate",value:function(){var e=this;this.update=lc("update"),(0,k.uN)(this._betas,k.M4.enable_stripe_update_api_key_beta_0)&&(this.update=(0,I.W6)((function(t,n){var r=(0,i.Z)({apiKey:t},n&&"object"==typeof n?n:{}),o=(0,_.Gu)(sc,r||{},"Stripe()"),a=o.value,c=o.warnings,s=a.apiKey,u=a.stripeAccount,l=a.apiVersion;(0,nt.Tj)(s);var p=e._controller.getCredentials(),d={publishableKey:s.trim()||p.publishableKey,stripeAccount:u||p.stripeAccount,apiVersion:l||p.apiVersion};d.publishableKey===p.publishableKey&&d.stripeAccount===p.stripeAccount&&d.apiVersion===p.apiVersion||(e._apiKey=d.publishableKey,e._keyMode=(0,nt.lO)(e._apiKey),e._stripeAccount=d.stripeAccount,c.forEach((function(t){return e._controller.warn(t)})),e._controller.setCredentials(d),e._controller.action.updateStripeUserCredentials(d))}),void 0,"update"))}},{key:"_attachCreateRadarSession",value:function(){var e=this;this.createRadarSession=(0,I.P0)((function(){return e._midsPromise().then((function(t){return n=e._controller,r=t,n.action.createRadarSession({mids:r}).then(Ta);var n,r}))}))}},{key:"_attachPaymentIntentMethods",value:function(e,t){var r=this,o=function(){return r._mids()};this.createPaymentMethod=(0,I.g5)((function(){for(var t=arguments.length,n=new Array(t),i=0;i0){var n=500*Math.pow(2,3-s);a=setTimeout(d,n),s-=1}else i(e,l)}}))}(),function(){clearTimeout(a),c=!1}},m=function(e){var t=e.initialDelay,n=e.pollTimeGap,r=e.checkIntent,o=e.locale,u=e.controller,l=e.intent,p=e.expandParam,d=void 0===p?[]:p,m=e.shouldPoll,f=void 0===m?function(){return!0}:m,h="payment_intent"===l.object?{paymentIntent:l}:{setupIntent:l};return new i.J((function(e){setTimeout((function(){var t=setInterval((function(){if(!f())return e(h),void clearInterval(t);var n;(n={hosted:!1,intentSecret:(0,a.O3)(l),locale:o,expandParam:d},"payment_intent"===l.object?u.action.retrievePaymentIntent(n):u.action.retrieveSetupIntent(n)).then((function(n){h=s(n),n.error?(u.action.localizeError(c.I4).then((function(e){return{error:e}})).then(e),clearInterval(t)):r(n.object)&&(e(h),clearInterval(t))}))}),n)}),t-n)}))}},8147:function(e,t,n){"use strict";n.d(t,{z:function(){return s}});var r=n(6589),o=n(3849),i=n(5727),a=n(9792),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 r.J((function(r){var u=new a.E,l=n.createLightboxFrame({type:i.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()}}),p=function(e){var t=o.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"),r(p(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 i=c(t);i?/Captcha/.test(i.message||"")?(n.report("intent_confirmation_challenge.verification_failed"),r(p(i))):(n.report("intent_confirmation_challenge.success"),r(p(i))):(n.report("intent_confirmation_challenge.success"),function(e,t){"payment_intent"===t.object?e({paymentIntent:t}):e({setupIntent:t})}(r,t))}else n.report("intent_confirmation_challenge.verification_error"),r(p(o.I4))}))}))}},8478:function(e,t,n){"use strict";n.d(t,{p:function(){return s}});var r=n(6977),o=n(8614),i=n(9776),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(!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.Ug)({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)}}},6090:function(e,t,n){"use strict";n.d(t,{Ug:function(){return p}});var r=n(1413),o=n(5987),i=n(6589),a=n(6042),c=n(5727),s=n(5326),u=n(9776),l=function(e){return"requires_action"!==e.status&&"requires_source_action"!==e.status},p=function(e){var t=e.controller,n=e.initialDelay,p=void 0===n?5e3:n,d=e.intent,m=e.lightboxOptions,f=e.locale,h=e.pollInterval,_=void 0===h?2e3:h,y=e.url,v=m.size,g=(0,o.Z)(m,["size"]),b=(0,a.q)(t,(0,r.Z)({url:(0,c.jr)(y),size:u.q$?"fullScreen":v||"400x600",locale:f,useLightboxHostedCloseButton:!1},g)),w=!1;return new i.J((function(e){return b._on("load",(function(){b.show(),b.fadeInBackdrop()})),b._once("request-close",(function(){(0,a.G)(b).then((function(){w=!0,"payment_intent"===d.object&&e({paymentIntent:d}),"setup_intent"===d.object&&e({setupIntent:d})}))})),b._on("complete",(function(t){(0,a.G)(b).then((function(){w=!0,e(t)}))})),(0,s.ct)({controller:t,initialDelay:p,pollTimeGap:_,intent:d,checkIntent:l,shouldPoll:function(){return!w},locale:f}).then((function(t){"error"in t&&t.error||w||b.destroy(!0).then((function(){e(t)}))}))}))}},8614:function(e,t,n){"use strict";n.d(t,{k:function(){return l},e:function(){return p}});var r,o,i=n(1849),a=n(6977),c=function(e,t,n){return(0,i.U)(n).then((function(n){return(0,i.d)(e,"next_action redirect",n),(0,a.PA)(n,t)}))},s=n(6589);!function(e){e.COMPLETED="COMPLETED",e.CANCELED="CANCELED",e.ERROR="ERROR"}(o||(o={}));var u=function(e,t,n){return new s.J((function(i){var a=setTimeout((function(){n.report("in_context.error.affirm",{errorData:{sessionId:e.id},error:{message:"Affirm In-Context load timed out"}}),i(o.ERROR)}),15e3),c=n.createLightboxFrame({type:"IN_CONTEXT_INNER",options:{paymentMethod:"affirm",redirectIntentId:e.id,redirectUrl:t,controllerId:n._id}});r=c,c._on("load",(function(){c.show(),c.fadeInBackdrop()})),c._once("checkout_loaded",(function(){clearTimeout(a)})),c._once("checkout_complete",(function(){i(o.COMPLETED),c.destroy()})),c._once("checkout_canceled",(function(){i(o.CANCELED),c.destroy()})),c._once("error",(function(){i(o.ERROR)}))})).then((function(i){var s;switch(i){case o.COMPLETED:case o.CANCELED:var u=function(e,t){return e.action.retrievePaymentIntent({intentSecret:(0,a.O3)(t),hosted:!1}).then((function(n){var r=(0,a.PA)(n,t);if(r.hasOwnProperty("error"))return r;var o=r.paymentIntent;return"succeeded"===o.status?r:o.last_payment_error?e.action.localizeError(o.last_payment_error).then((function(e){return{error:e}})):(e.report("in_context.error.affirm",{paymentMethod:"affirm",errorData:{sessionId:t.id},error:{message:"PaymentIntent unexepectedly not successful and doesn't have last_payment_error field"}}),e.action.localizeError({type:"unexpected"}).then((function(e){return{error:e}})))}))}(n,e);return null===(s=r)||void 0===s||s.destroy(),u;case o.ERROR:return c(n,e,t);default:return n.report("in_context.error.affirm",{errorData:{sessionId:e.id},error:{message:"Unexpected AffirmCheckoutResult: ".concat(i)}}),c(n,e,t)}}))},l=function(e,t,n){var r;return-1!==(null===(r=n._betas)||void 0===r?void 0:r.indexOf("affirm_in_context_beta_1"))&&-1!==t.indexOf("affirm-hooks.stripe.com")?u(e,t,n):(0,i.U)(t).then((function(t){return(0,i.d)(n,"next_action redirect",t),(0,a.PA)(t,e)}))},p=function(e,t,n){return(0,i.U)(t).then((function(t){return(0,i.d)(n,"next_action redirect",t),(0,a.e3)(t,e)}))}},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(5727),c=n(6589),s=n(5326),u=n(9792),l=function(e,t,n,l,p,d){var m=(0,i.xz)(),f=new u.E,h=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,p);return h.show(),l.report("authorize_with_url.loading",{viewport:m,intentId:t.id}),h._on("load",(function(){l.report("authorize_with_url.loaded",{loadDuration:f.getElapsedTime(),intentId:t.id}),h.fadeInBackdrop()})),h._on("challenge_complete",(function(){h.fadeOutBackdrop()})),new c.J((function(o){var i=e.source;i&&h._once("cancel",(function(){c.J.all([(0,s.$o)(t,n,l,i,p),h.destroy()]).then((function(e){var t=(0,r.Z)(e,1)[0];return o(t)}))})),h._once("authorize_with_url_done",(function(){var e=h.destroy();(0,s.Eo)(t,n,l,p,d,(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)}))}))}))}))}},7193:function(e,t,n){"use strict";n.d(t,{A:function(){return G}});var r=n(3324),o=n(6589),i=n(1873),a=n(9792),c=n(1413),s=n(5987),u=n(5727),l=function(e,t){var n=t.intentSecret,r=t.controller,i=t.locale,a=t.hosted,c=r.createLightboxFrame({type:u.NC.STRIPE_3DS2_CHALLENGE,options:{intentId:n.id,hosted:a,locale:i}});r.report("3ds2.challenge_frame.loading",{intentId:n.id,hosted:a}),c._on("challenge_complete",(function(){c.fadeOutBackdrop()}));var s=function(e){return new o.J((function(t){e._on("load",(function(){return t(e)}))}))}(c);return s.then((function(){return r.report("3ds2.challenge_frame.loaded",{intentId:n.id,hosted:a})})),a&&(c.show(),c.action.show3DS2Spinner({cardBrand:e.cardBrand})),s},p=function(e,t){var n=t.oneClickAuthnDeviceSupport,r=t.oneClickAuthnOptedOut,i=t.challengeFrame;return new o.J((function(t,o){i.then((function(i){var a=function(){return o(new Error("User canceled"))};i._once("cancel",a),i.isVisible||(i.show(),i.fadeInBackdrop());e.type;var l=e.optimizations,p=(e.oneClickAuthn,(0,s.Z)(e,["type","optimizations","oneClickAuthn"]));i.action.perform3DS2Challenge((0,c.Z)((0,c.Z)({},p),{},{shouldSandbox:l.sandboxChallengeFrame,recordFinalCres:l.recordFinalCres,oneClickAuthnDeviceSupport:n,oneClickAuthnOptedOut:r,oneClickWebauthnEnrollmentAppUrl:(0,u.xS)("one-click-webauthn-enrollment-3b5694cc095d06a5e62b277f0378a38d.html")})).then((function(){i._off("cancel",a),t()}))}))}))},d=function(e,t,n){var r=n.authenticateResponse,a=n.oneClickAuthnDeviceSupport,c=n.oneClickAuthnOptedOut,s=n.challengeFrame,u=t.controller,l=t.hosted,d=t.intentSecret;if("error"===r.type)return o.J.resolve();var m,f=r.object,h=f.state,_=f.ares,y=f.creq;if("delegated"===h)return o.J.resolve();if(null===_)return o.J.resolve();if(_.transStatus&&["N","R","U"].indexOf(_.transStatus)>-1&&_.cardholderInfo&&_.cardholderInfo.length>15)return function(e,t){return new o.J((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()}))}))}))}(_.cardholderInfo,s);if("C"!==_.transStatus||null==y)return u.report("3ds2.frictionless",{hosted:l,intentId:d.id}),o.J.resolve();switch(e.gateway){case"emvco":m={type:"3ds2-challenge",gateway:e.gateway,threeDS2Source:e.threeDS2Source,cardBrand:e.cardBrand,transactionId:e.transactionId,acsUrl:_.acsURL,acsTransactionId:_.acsTransID,optimizations:e.optimizations,oneClickAuthn:e.oneClickAuthn,creq:y,publishableKey:e.publishableKey};break;case"itmx":var v=r.object.itmx;m={type:"3ds2-challenge",gateway:e.gateway,threeDS2Source:e.threeDS2Source,cardBrand:e.cardBrand,transactionId:e.transactionId,acsUrl:_.acsURL,acsTransactionId:_.acsTransID,optimizations:e.optimizations,oneClickAuthn:e.oneClickAuthn,creq:y,publishableKey:e.publishableKey,stepUpUrl:null==v?void 0:v.stepUpUrl,accessToken:null==v?void 0:v.accessToken};break;default:(0,i.Rz)(e)}return p(m,{oneClickAuthnDeviceSupport:a,oneClickAuthnOptedOut:c,challengeFrame:s})},m=n(5326),f=n(4942),h=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,f.Z)({},"".concat(t,"_id"),e[t]):e[t]&&"object"==typeof e[t]&&"string"==typeof e[t].id?(0,f.Z)({},"".concat(t,"_id"),e[t].id):null};return(0,c.Z)((0,c.Z)((0,c.Z)((0,c.Z)({type:e.type,code:e.code,param:e.param},t("payment_intent")),t("setup_intent")),t("payment_method")),t("source"))},_=function(e,t,n){var r=t.intentSecret,o=t.intentType,i=t.controller,a=t.locale;return(0,m.NO)(r,o,i,a,n)},y=function(e,t){var n=t.controller,r=t.intentSecret,o=t.intentType,i=t.locale;return(0,m.$o)(r,o,n,e.threeDS2Source,i,e.threeDS2Intent,e.publishableKey)},v=function(e,t){var n=e.intentSecret,i=e.controller,a=e.hosted,s=t.intent,u=t.challengeFrame,l=t.startTimestamp;return o.J.all([s,u.then((function(e){return e.destroy()}))]).then((function(e){var t=(0,r.Z)(e,1)[0];return i.report("3ds2.done",(0,c.Z)({intentId:n.id,hosted:a,totalDuration:l.getElapsedTime()},t.error?{error:h(t.error),success:!1}:{success:!0})),t}))},g=function(e){var t=e.intentSecret,n=e.controller,r=e.hosted,i=e.locale,a=n.createHiddenFrame(u.NC.STRIPE_3DS2_FINGERPRINT,{intentId:t.id,locale:i,hosted:r});n.report("3ds2.fingerprint_frame.loading",{hosted:r,intentId:t.id});var c=function(e){return new o.J((function(t){e._on("load",(function(){return t(e)}))}))}(a);return c.then((function(){n.report("3ds2.fingerprint_frame.loaded",{hosted:r,intentId:t.id})})),c},b=function(e,t){var n=t.intentSecret,r=t.controller,a=t.hosted;return e.optimizations.skipFingerprint?o.J.resolve({fingerprintAttempted:!1,fingerprintData:null}):""===e.methodUrl?(r.report("3ds2.fingerprint.no_method_url",{hosted:a,intentId:n.id}),o.J.resolve({fingerprintAttempted:!1,fingerprintData:null})):g(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,i.Rz)(e)}return t.action.perform3DS2Fingerprint(n).then((function(e){return t.destroy(),e}))}))},w=n(9776),k=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 o.J.resolve(!1);var e=window.PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable(),t=new o.J((function(e){return setTimeout((function(){return e(!1)}),500)}));return o.J.race([e,t]).catch((function(){return!1}))},S=function(){if(void 0===window.PaymentRequest)return o.J.resolve(!1);if(!/Chrome\/(9[5-9]|[1-9]\d\d)/.test(window.navigator.userAgent))return o.J.resolve(!1);if(w.sV&&!/Chrome\/(109|1[1-9]\d|[2-9]\d{2}|[1-9]\d{3,})/.test(window.navigator.userAgent))return o.J.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 o.J.resolve(!1)}},E="stripe-js-one-click-authn",C="W",P="S",A="SE/WA",N=function(e){return btoa(String.fromCharCode.apply(null,new Uint8Array(e))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},I=function(e){return atob(e.replace(/-/g,"+").replace(/_/g,"/"))},M=function(e){var t=I(e);return Uint8Array.from(t,(function(e){return e.charCodeAt(0)}))},T=(n(3637),n(3407),n(8037),function(e){return"data:image/svg+xml,".concat(encodeURIComponent(e.replace(/\n/g,"").replace(/\s+/g," ")))}),R=function(e){switch(e){case"visa":return T('\n \n \n \n \n');case"amex":return T('\n \n \n \n \n \n \n \n \n \n');case"mastercard":return T('\n \n \n \n \n \n \n');case"unionpay":case"discover":case"jcb":case"diners":case"unknown":case"elo":return T('');default:return(0,i.Rz)(e)}},O=n(5558),Z=n(6977),j=function(e,t,n){var r=e.threeDS2Source,i=e.oneClickAuthn,a=t.controller,s=n.deviceSupport,u=n.startTimestamp,l=o.J.resolve({authenticationAPIParam:null,optedOut:!1,isSPCRequested:!1}),p=o.J.resolve({authenticationAPIParam:null,optedOut:!1,isSPCRequested:!0});if(!i)return l;var d,m=i.credentials.filter((function(e){return e.type===Z.QS}));if(0===m.length)return a.report("one_click_authn.request_spc_authn.empty_credentials_list",{client_id:E,source:r,device_support:s}),l;try{var f=i.merchant.origin;if(!f)return a.report("one_click_authn.request_spc_authn.empty_merchant_origin",{client_id:E,source:r,device_support:s}),l;(d=document.createElement("meta")).name=(0,O.To)("__privateStripeMeta"),d.httpEquiv="origin-trial",d.content="A2ZxBmgWRc3CxEGqZ0aWPMB4MUSx1dSjXn2pGXpMq8NLQh00TMwiKf5A8NEQegaXHfDY7IxdHtYPxI0KRKEWNgQAAAB6eyJvcmlnaW4iOiJodHRwczovL2pzLnN0cmlwZS5jb206NDQzIiwiZmVhdHVyZSI6IlNlY3VyZVBheW1lbnRDb25maXJtYXRpb25PcHRPdXQiLCJleHBpcnkiOjE2Nzg0MDYzOTksImlzVGhpcmRQYXJ0eSI6dHJ1ZX0=",document.head.appendChild(d);var h=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 M(e.id)})),challenge:M(r),timeout:6e4,fallbackUrl:window.location.toString(),instrument:{displayName:"".concat(a," ····").concat(c),icon:R(i)},payeeOrigin:t,payeeName:s.name,showOptOut:!0}}]}(m,f,i),{total:{label:"Total",amount:i.amount}});return a.report("one_click_authn.request_spc_authn.prompted",{client_id:E,source:r,timeToComplete:u.getElapsedTime(),device_support:s}),h.show().then((function(e){var t;return e.complete("success"),a.report("one_click_authn.request_spc_authn.completed",{client_id:E,source:r,timeToComplete:u.getElapsedTime(),device_support:s}),{authenticationAPIParam:{type:Z.QS,assertion:(t=e.details,{type:"public-key",id:t.id,raw_id:t.id,response:{authenticator_data:N(t.response.authenticatorData),client_data_json:N(t.response.clientDataJSON),signature:N(t.response.signature)}}),payment_data:{merchant_data:{merchant_origin:f,total:i.amount},network_data:i.authenticationChallenge}},optedOut:!1,isSPCRequested:!0}})).catch((function(e){if(function(e){return"OptOutError"===e.name&&-1!==e.message.indexOf("opted out")}(e))return a.report("one_click_authn.request_spc_authn.opted_out",{client_id:E,source:r,timeToOptedOut:u.getElapsedTime(),device_support:s}),o.J.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 a.report("one_click_authn.request_spc_authn.error",{reason:t,client_id:E,source:r,timeToError:u.getElapsedTime(),device_support:s,error:(0,c.Z)({name:e.name,message:e.message},e)}),p}))}catch(e){a.report("one_click_authn.request_spc_authn.error",{client_id:E,reason:"unexpected_error",source:r,timeToError:u.getElapsedTime(),device_support:s,error:(0,c.Z)({name:e.name,message:e.message},e)})}return p},x=function(e,t){var n=e.threeDS2Source,r=e.oneClickAuthn,o=t.controller;if(!r)return null;var i=w.s$?"safari":w.D1?"firefox":w.P0||w.Bh?"edge":w.G9?w.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:E,reason:"browser_not_found",source:n}),null;try{switch(new URLSearchParams(I(r.configuration)).get(i)){case C:return C;case P:return P;case A:return A;default:return null}}catch(e){return o.report("one_click_authn.configuration.error",{client_id:E,reason:"unexpected_error",source:n,error:(0,c.Z)({name:e.name,message:e.message},e)}),null}},L=function(){try{return 0==="https://js.stripe.com/v3/".indexOf(window.top.location.origin)}catch(e){return!1}},B=function(){var e=document.featurePolicy;if(!e)return!1;try{return-1!==e.allowedFeatures().indexOf("publickey-credentials-get")}catch(e){return!1}},D=function(e,t,n,r,i){return function(e,t,n){var r=t.controller,i=n.deviceSupport,a=n.challengeFrame,c=n.startTimestamp,s=e.oneClickAuthn;if(!s)return o.J.resolve(null);var l=s.credentials;return 0===l.length?(r.report("one_click_authn.request_webauthn_authn.empty_credentials_list",{client_id:E,source:e.threeDS2Source,device_support:i}),o.J.resolve(null)):new o.J((function(t,n){a.then((function(r){var o=function(){return n(new Error("User canceled"))};r._once("cancel",o),r.isVisible||(r.show(),r.fadeInBackdrop());var a={amount:s.amount,instrument:s.instrument,merchant:s.merchant,authenticationChallenge:s.authenticationChallenge,layout:s.layout,allowCredentials:l};return r.action.performOneClickWebauthnAuthentication({threeDS2Source:e.threeDS2Source,cardBrand:e.cardBrand,appUrl:(0,u.xS)("one-click-webauthn-authentication-9a7a4f11463eeb71ab7c65778144257f.html"),deviceSupport:i,payload:a,startPosixTime:c.getAsPosixTime()}).then((function(e){r._off("cancel",o),t(e)}))}))}))}(e,t,{deviceSupport:n,challengeFrame:r,startTimestamp:i}).then((function(e){return{deviceSupport:n,authenticationAPIParam:e,optedOut:!1}}))},q=function(e,t){return o.J.all([S(),k()]).then((function(n){var o=(0,r.Z)(n,2),i=o[0],a=o[1];return{sameOriginFrame:L(),spcEligible:i,webauthnEligible:a,publickeyCredentialsGetAllowed:B(),configurationType:x(e,t)}}))},F=function(e,t,n){var r=n.challengeFrame,o=n.startTimestamp;return q(e,t).then((function(n){return a=(i=n).webauthnEligible,c=i.configurationType,!a||c!==C&&c!==A?function(e){var t=e.spcEligible,n=e.configurationType;return t&&n===P}(n)?j(e,t,{deviceSupport:n,startTimestamp:o}).then((function(i){var a=i.authenticationAPIParam,c=i.optedOut;return!i.isSPCRequested&&n.webauthnEligible?D(e,t,n,r,o):{deviceSupport:n,authenticationAPIParam:a,optedOut:c}})):{deviceSupport:n,authenticationAPIParam:null,optedOut:!1}:D(e,t,n,r,o);var i,a,c}))},G=function(e,t,n){var c=new a.E,s=l(e,t);switch(e.type){case"3ds2-challenge":return q(e,t).then((function(r){return p(e,{oneClickAuthnDeviceSupport:r,oneClickAuthnOptedOut:!1,challengeFrame:s}).then((function(){return v(t,{intent:_(0,t,n),challengeFrame:s,startTimestamp:c})}),(function(){return v(t,{intent:y(e,t),challengeFrame:s,startTimestamp:c})}))}));case"3ds2-fingerprint":return o.J.all([b(e,t),F(e,t,{challengeFrame:s,startTimestamp:c})]).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 d(e,t,{authenticateResponse:n,oneClickAuthnDeviceSupport:a.deviceSupport,oneClickAuthnOptedOut:a.optedOut,challengeFrame:s})}))})).then((function(){return v(t,{intent:_(0,t,n),challengeFrame:s,startTimestamp:c})}),(function(){return v(t,{intent:y(e,t),challengeFrame:s,startTimestamp:c})}));default:return(0,i.Rz)(e)}}},112:function(e,t,n){"use strict";n.d(t,{$j:function(){return _},Qw:function(){return y}});var r=n(5987),o=n(1413),i=n(6977),a=n(1765),c=n(2024),s=n(1873),u=n(3849),l=n(8812),p={clientSecret:(0,s.jt)(s.Z_),redirect:(0,s.jt)((0,s.kw)("always","if_required")),confirmParams:(0,s.jt)(s.Ry),handleActions:(0,s.jt)(s.Xg)},d=(0,o.Z)((0,o.Z)({},p),{},{element:(0,s.jt)(s.Ry)}),m=(0,o.Z)((0,o.Z)({},p),{},{elements:(0,s.jt)(s.Ry)}),f={"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"}},h=function(e,t,n){var r=t.rawSecret,o=t.rawElement,i=t.rawElements,u=t.rawHandleActions,p=t.rawRedirect,d=t.validatedConfirmParams,m=t.elementConfirmingPayment;if((0,a.uN)(e,a.M4.payment_element_beta_1)){var h=(0,s.rX)(o);if(!h)throw new l.No("Invalid value for ".concat(n,": `element` should be a Payment Element. You specified: ").concat(typeof o,"."));return{type:"elements",element:h}}if(function(e,t){var n=e.rawSecret,r=e.rawElements;if(!n&&!r)throw new l.No("".concat(t,": expected either `elements` or `clientSecret`, but got neither."))}({rawElements:i,rawSecret:r},n),p&&!1===u)throw new l.No("".concat(n,": `redirect` not applicable when `handleActions` is false."));if(r&&!i){if(null!=d&&d.payment_method&&null!=d&&d.payment_method_data)throw new l.No("".concat(n,": Expected either `payment_method` or `payment_method_data`, but not both."));return{type:"clientSecret",clientSecret:r}}var _=(0,s.MO)(i);if(!_)throw new l.No("Invalid value for ".concat(n,": elements should be an Elements group. You specified: ").concat(typeof i,"."));var y=(0,c.sE)(_._elements,(function(e){return"payment"===e._componentName})),v=(0,c.sE)(_._elements,(function(e){return"expressCheckout"===e._componentName||"payButton"===e._componentName}));if(!y&&!v)throw new l.No("Invalid value for ".concat(n,": elements should have a mounted Payment Element or Express Checkout Element. ").concat(function(e,t){if(e&&f[t]){var n=f[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""}(!!_._elements.length,n)));if("expressCheckout"===m){if(!v)throw new Error('Element confirming payment is "expressCheckout", but there is no Express Checkout Element mounted on the page.');return{type:"elements",elements:_,clientSecret:r,element:v}}if(!y){if(v)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.')}return{type:"elements",elements:_,clientSecret:r,element:y}},_=function(e){return(0,a.uN)(e,a.M4.payment_element_beta_1)?d:m},y=function(e){var t,n=e.controller,c=e.mids,p=e.betas,d=e.rawUpdateData,m=e.intentType,f=e.elementConfirmingPayment,y=e.errorMessageMethodName,v=e.maybeWalletData,g=function(e){var t=e.betas,n=e.rawUpdateData,r=e.errorMessageMethodName,o=e.controller,i=e.elementConfirmingPayment,a=(0,s.Gu)((0,s.mC)(_(t)),n,r),c=a.value,u=c.element,l=void 0===u?void 0:u,p=c.elements,d=void 0===p?void 0:p,m=c.confirmParams,f=c.clientSecret,y=c.redirect,v=c.handleActions,g=a.warnings,b=(0,s.Gu)((0,s.jt)((0,s.mC)({return_url:(0,s.jt)(s.Z_),payment_method:(0,s.jt)(s.Z_),payment_method_data:(0,s.jt)(s.Ry),payment_method_options:(0,s.jt)(s.Ry),setup_future_usage:(0,s.NM)("".concat(r,": do not pass setup_future_usage at confirm time. Instead, pass setup_future_usage when the PaymentIntent is created."))})),m,r,{path:["confirmParams"]}).value,w=h(t,{rawSecret:f,rawElement:l,rawElements:d,rawHandleActions:v,rawRedirect:y,validatedConfirmParams:b,elementConfirmingPayment:i},r),k=y||"always",S=(null==b?void 0:b.return_url)||null;return g.forEach((function(e){return o.warn(e)})),{validatedRedirect:k,validatedReturnUrl:S,validatedParams:w,validatedConfirmParams:b,validatedHandleActions:!1!==v,rawConfirmParams:m}}({betas:p,rawUpdateData:d,controller:n,errorMessageMethodName:y,elementConfirmingPayment:f}),b=g.validatedParams,w=g.validatedConfirmParams,k=g.validatedRedirect,S=g.validatedHandleActions,E=g.validatedReturnUrl,C=g.rawConfirmParams,P=null!=C?C:{},A=(P.payment_method,P.payment_method_data,P.payment_method_options,(0,r.Z)(P,["payment_method","payment_method_data","payment_method_options"]));if("clientSecret"===b.type?t=function(e){var t,n=e.validatedParams,r=e.validatedConfirmParams,i=e.validatedHandleActions,a=e.otherParams,c=e.intentType,s=e.mids,l=e.maybeWalletData,p=null!=r?r:{},d=p.payment_method_data,m=p.payment_method,f=p.payment_method_options,h="payment"===c?(0,u.cn)(n.clientSecret,"confirmPayment"):(0,u.jH)(n.clientSecret,"confirmSetup"),_=(0,u.k7)({payment_method:d}),y={};return"none"!==(t=d&&_?{intentSecret:h,tag:"paymentMethod-from-data",type:_,data:d,options:null!=f?f:{}}:m?{intentSecret:h,tag:"paymentMethod",paymentMethod:m,options:null!=f?f:{}}:{intentSecret:h,tag:"none"}).tag&&"paymentMethod"!==t.tag||(y={use_stripe_sdk:!0,mandate_data:{customer_acceptance:{type:"online",online:{infer_from_client:!0}}}}),{mids:s,mode:t,expectedType:_,otherParams:(0,o.Z)((0,o.Z)({},y),a),options:{handleActions:i,walletData:l||void 0}}}({validatedParams:b,validatedConfirmParams:w,validatedHandleActions:S,otherParams:A,intentType:m,mids:c,maybeWalletData:v}):(!function(e){var t,n,r,o=e.validatedParams,i=e.betas,c=e.validatedReturnUrl,s=e.errorMessageMethodName;if("clientSecret"!==o.type){var u=!(null===(t=o.elements)||void 0===t||!t._commonOptions.mode),p=!(null===(n=o.elements)||void 0===n||!n._commonOptions.payment_method_types)||!(null===(r=o.elements)||void 0===r||!r._commonOptions.paymentMethodTypes);if(!(0,a.uN)(i,a.M4.elements_enable_deferred_intent_beta_1)&&u&&!p&&!c)throw new l.No("".concat(s,": the `confirmParams.return_url` argument is required when using automatic payment methods."))}}({validatedParams:b,validatedReturnUrl:E,betas:p,errorMessageMethodName:y}),t=function(e){var t,n,r,o,a=e.validatedParams,c=e.validatedConfirmParams,s=e.validatedHandleActions,u=e.otherParams,l=e.mids,p=e.elementConfirmingPayment,d=e.maybeWalletData,m=e.enforcePreSubmit,f=a.clientSecret?(0,i.RY)(a.clientSecret):null;return{mode:{tag:"elements",groupId:null===(t=a.elements)||void 0===t?void 0:t._id,frameId:null===(n=a.element)||void 0===n?void 0:n._implementation._frame.id,elementName:p,data:null!==(r=null==c?void 0:c.payment_method_data)&&void 0!==r?r:{},options:null!==(o=null==c?void 0:c.payment_method_options)&&void 0!==o?o:{},intentSecret:f||void 0,enforcePreSubmit:m&&!!f},otherParams:u,expectedType:null,mids:l,options:{handleActions:s,walletData:d||void 0}}}({validatedParams:b,validatedConfirmParams:w,validatedHandleActions:S,otherParams:A,mids:c,elementConfirmingPayment:f,maybeWalletData:v,enforcePreSubmit:!(0,a.uN)(p,a.M4.elements_enable_deferred_intent_beta_1)})),"if_required"===k)return{intentMutationRequest:t,redirect:k,returnUrl:null};if("always"===k&&E)return{intentMutationRequest:t,redirect:k,returnUrl:E};throw new l.No("".concat(y,": the `confirmParams.return_url` argument is required unless passing `redirect: 'if_required'`"))}},5733:function(e,t,n){"use strict";n.d(t,{Fh:function(){return E},nq:function(){return A},gO:function(){return P}});var r=n(6977),o=n(40),i=n(7549),a=n(122),c=n(7193),s=n(6589),u=n(6042),l=n(5727),p=n(8147),d=n(5326),m=function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.interval||1e4,o=n.timeout||3e5,i=(new Date).getTime();return new s.J((function(n){setTimeout((function a(){s.J.resolve(e(t)).catch((function(e){return{error:e}})).then((function(e){if(null==e)if((new Date).getTime()-i>o){n({error:new Error("Polling timed out without a valid response")})}else setTimeout(a,r);else n(e)}))}),r)}))}},f=m((function(e){var t=e.intentSecret,n=e.intentType,r=e.controller,o=e.locale;return s.J.resolve((0,d.NO)(t,n,r,o)).then((function(e){var t=(0,d.yn)(e);return t?"requires_action"===t.status?null:e:"error"in e&&"lock_timeout"===e.error.code?null:e}))})),h=n(6090),_=n(8614),y=n(8478),v=n(9776),g=n(1873),b=n(73),w=n(8812),k=n(1765),S=function(e){return["id_bank_account","id_bank_transfer"].indexOf(e.bankTransferType)>-1},E=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,r.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,g.Rz)(e)}},C=function(e,t,o,m,g,E,C){var P=C||(0,r.G2)(t),A=(0,i.l)(P),N=(0,r.O3)(t);if(!A)return s.J.resolve({paymentIntent:t});switch(A.type){case"cardimageverification-challenge":return n.e(428).then(n.bind(n,5798)).then((function(n){return(0,n.performCardImageVerification)(A,t,e,o)}));case"captcha-challenge":return(0,p.z)(A,t,e,o);case"3ds1-modal":return(0,a.s)(A,N,b.kE.PAYMENT_INTENT,e,o,g);case"3ds2-fingerprint":case"3ds2-challenge":return(0,c.A)(A,{intentSecret:N,intentType:b.kE.PAYMENT_INTENT,controller:e,locale:o,hosted:m},g);case"redirect":return(0,_.k)(t,A.redirectUrl,e);case"blik_authorize":return function(e){var t=e.controller,n=e.intent,r=e.locale,o=e.shouldDisplayInstructionsModal;return new s.J((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,d.ct)({controller:t,initialDelay:8e3,pollTimeGap:5e3,intent:n,checkIntent:function(e){return"requires_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:o,shouldDisplayInstructionsModal:E});case"boleto-display":if(void 0===A.hostedVoucherUrl)throw new w.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 s.J((function(e){i._on("request-close",(function(){(0,u.G)(i).then((function(){e({paymentIntent:r})}))}))}))}({controller:e,locale:o,url:A.hostedVoucherUrl,intent:t});case"konbini-display":if(void 0===A.hostedVoucherUrl)throw new w.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 s.J((function(e){i._on("request-close",(function(){(0,u.G)(i).then((function(){e({paymentIntent:r})}))}))}))}({controller:e,locale:o,url:A.hostedVoucherUrl,intent:t});case"oxxo-display":if(void 0===A.hostedVoucherUrl)throw new w.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 s.J((function(e){i._on("request-close",(function(){(0,u.G)(i).then((function(){e({paymentIntent:r})}))}))}))}({controller:e,locale:o,url:A.hostedVoucherUrl,intent:t});case"upi_await_notification":return f({controller:e,intentSecret:N,intentType:b.kE.PAYMENT_INTENT,locale:o});case"wechat_pay_display_qr_code":return function(e){var t=e.controller,n=e.intent,r=e.locale,o=e.url;return(0,h.Ug)({controller:t,intent:n,locale:r,url:o,lightboxOptions:{frameTitle:"hosted_qr_code_instructions.wechat_pay.frame_title"}})}({controller:e,locale:o,url:A.hostedInstructionsUrl,intent:t,intentSecret:N,intentType:b.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,h.Ug)({controller:t,intent:n,locale:r,url:o,lightboxOptions:{frameTitle:"hosted_qr_code_instructions.paynow.frame_title"}})}({controller:e,locale:o,url:A.hostedInstructionsUrl,intent:t,intentSecret:N,intentType:b.kE.PAYMENT_INTENT});case"pix_display_qr_code":if(void 0===A.hostedInstructionsUrl)throw new w.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}),p=null;return new s.J((function(e){c._on("load",(function(){c.show(),c.fadeInBackdrop()})),c._once("request-close",(function(){(0,u.G)(c).then((function(){p&&clearTimeout(p),e({paymentIntent:n})}))})),c._on("complete",(function(t){(0,u.G)(c).then((function(){p&&clearTimeout(p),e(t)}))})),p=setTimeout((function n(){(0,d.NO)(r,o,t,i).then((function(t){var r=(0,d.yn)(t);r&&("requires_action"!==r.status?c.destroy(!0).then((function(){"payment_intent"===r.object?e({paymentIntent:r}):e({setupIntent:r})})):p=setTimeout(n,2e3))}))}),5e3)}))}({controller:e,locale:o,url:A.hostedInstructionsUrl,intent:t,intentSecret:N,intentType:b.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,h.Ug)({controller:t,intent:n,locale:r,url:o,lightboxOptions:{frameTitle:"hosted_qr_code_instructions.promptpay.frame_title"}})}({controller:e,locale:o,intent:t,intentSecret:N,url:A.hostedInstructionsUrl,intentType:b.kE.PAYMENT_INTENT});case"display_bank_transfer_instructions":return function(e,t){return!!S(e)&&!(0,k.uN)(t||[],k.M4.id_bank_transfer_beta_1)}(A,e._betas)?(0,_.k)(t,A.hostedInstructionsUrl,e):function(e){return!S(e)}(A)?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.J((function(e){i._on("request-close",(function(){(0,u.G)(i).then((function(){e({paymentIntent:r})}))}))}))}({controller:e,url:A.hostedInstructionsUrl,intent:t,locale:o}):s.J.resolve({paymentIntent:t});case"cashapp_handle_redirect_or_display_qr_code":return(0,y.p)({controller:e,locale:o,intent:t});case"swish_handle_redirect_or_display_qr_code":return function(e){var t=e.controller,n=e.intent,o=e.locale,i=(0,r.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 v.q$?(0,_.k)(n,i.swish_handle_redirect_or_display_qr_code.mobile_auth_url,t):(0,h.Ug)({controller:t,intent:n,locale:o,url:i.swish_handle_redirect_or_display_qr_code.hosted_instructions_url,lightboxOptions:{frameTitle:"hosted_qr_code_instructions.cashapp.frame_title"}})}({controller:e,locale:o,intent:t});default:return s.J.resolve({paymentIntent:t})}},P=function e(t,n,r,i,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;if(b.kO5&&void 0!==arguments[5]?arguments[5]:0;if(r.kO1?"properties":"property",": `").concat(h.join("`, `"),"`. Put additional API properties in `params`."));return(0,u.zS)(_)}if(m){var y=m._componentName,v=p._b[y];return(0,u.x4)({type:v,element:m,elements:null,data:l||{}})}if(f)return(0,u.x4)({type:null,element:null,elements:f,data:l||{}});if(l)return(0,u.x4)({type:l.type,element:null,elements:null,data:l})}var g,b=t.type,w=(0,c.Z)(t,["type"]);if(null===e){if("string"!=typeof b)return(0,u.RH)("a string such as 'card', 'ideal', or 'sepa_debit'",typeof b,(0,u.NQ)(n,"type"));g=b}else{if(void 0!==b&&b!==e)return"string"!=typeof b?(0,u.RH)("a string such as 'card', 'ideal', or 'sepa_debit'",typeof b,(0,u.NQ)(n,"type")):(0,u.RH)('"'.concat(b,'"'),'"'.concat(e,'"'),(0,u.NQ)(n,"type"));g=e}var k=w[g],S=(w[g],(0,c.Z)(w,[g].map(r)));if(-1!==["acss_debit","affirm","afterpay_clearpay","alipay","bancontact","cashapp","customer_balance","eps","giropay","grabpay","klarna","konbini","mobilepay","oxxo","p24","paynow","paypal","pix","us_bank_account","wechat_pay","pay_by_bank","paynow","promptpay","south_korea_market","swish","revolut_pay","zip"].indexOf(g)&&void 0===k&&(k={}),"object"!=typeof k)return(0,u.RH)("an object or element",typeof t[g],(0,u.NQ)(n,g));if(null===k)return(0,u.RH)("an object or element","null",(0,u.NQ)(n,g));var E=(0,u.rX)(k);if(E){var C=E._componentName;if(p._b[C]!==g){var P=[].concat((0,i.Z)(n.path),[g]).join("."),A=n.label,N=new s.No("Invalid value for ".concat(A,": ").concat(P," was `").concat(C,"` Element, which cannot be used to create ").concat(g," PaymentMethods."));return(0,u.zS)(N)}return(0,u.x4)({type:g,element:E,elements:null,data:S})}return(0,u.x4)({type:g,element:null,elements:null,data:w})}},v=(0,u.Wc)((0,u.mC)({handleActions:(0,u.Wc)(u.Xg,(function(){return!0}))}),(function(){return{handleActions:!0}})),g=function(e){return function(t,n){if("object"!=typeof t)return(0,u.RH)("object",typeof t,n);if(null===t)return(0,u.RH)("object","null",n);var r=t.billing_details,o=(0,c.Z)(t,["billing_details"]);return(0,u.x4)({paymentMethodData:{type:"".concat(e),billing_details:r},otherParams:o})}},b=function(e){return function(t,n){if("object"!=typeof t)return(0,u.RH)("object",typeof t,n);if(null===t)return(0,u.RH)("object","null",n);var r=t.clientSecret,i=t.params,a=(0,c.Z)(t,["clientSecret","params"]),s=(0,u.ld)(e,r,n.label,{path:["clientSecret"]});if("error"===s.type)return s;if("object"!=typeof i)return(0,u.RH)("object",typeof i,(0,u.NQ)(n,"params"));if(null===i)return(0,u.RH)("object","null",(0,u.NQ)(n,"params"));var l=i.payment_method_type,p=i.payment_method_data;return"string"!=typeof l?(0,u.RH)("string",typeof l,(0,u.NQ)((0,u.NQ)(n,"params"),"payment_method_type")):"object"!=typeof p&&void 0!==p?(0,u.RH)("object",typeof p,(0,u.NQ)((0,u.NQ)(n,"params"),"payment_method_data")):(0,u.x4)({clientSecret:s.value,paymentMethodData:(0,o.Z)({type:l},(null==p?void 0:p.billing_details)&&{billing_details:null==p?void 0:p.billing_details}),otherParams:a})}},w=function(e,t){return function(n,r){if(void 0===n)return(0,u.x4)({paymentMethodData:null,paymentMethodOptions:null,source:null,paymentMethod:null,otherParams:{}});if("object"!=typeof n)return(0,u.RH)("object",typeof n,r);if(null===n)return(0,u.RH)("object","null",r);var a=n.source,p=n.source_data,d=n.payment_method_data,m=n.payment_method_options,f=n.payment_method,h=(0,c.Z)(n,["source","source_data","payment_method_data","payment_method_options","payment_method"]);if(null!=p)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!=f)throw new s.No("".concat(t,": Expected either payment_method or source, but not both."));if(null===e&&null!=f&&"string"!=typeof f)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,(0,u.NQ)(r,"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:h})}if(null!=f&&"string"!=typeof f&&"object"!=typeof f)return(0,u.RH)("string or object",typeof f,(0,u.NQ)(r,"payment_method"));var _,v=(0,u.ld)((_=e,function(e,t){if(null==e)return(0,u.x4)(null);if("object"!=typeof e)return(0,u.RH)("object",typeof e,t);var n=e.card,r=(0,c.Z)(e,["card"]);if(!n||"object"!=typeof n)return(0,u.x4)(e);var i=n.cvc,a=(0,c.Z)(n,["cvc"]);if(null==i)return(0,u.x4)(e);var s=(0,u.rX)(i),p=s?s._componentName:"";return l.Yj.cardCvc!==p?(0,u.RH)("`".concat(l.Yj.cardCvc,"` Element"),p?"`".concat(p,"` Element"):typeof i,(0,u.NQ)(t,"".concat(_||"card",".cvc"))):(0,u.x4)((0,o.Z)((0,o.Z)({},r),{},{card:(0,o.Z)((0,o.Z)({},a),{},{cvc:s})}))}),m,t,{path:[].concat((0,i.Z)(r.path),["payment_method_options"])});if("error"===v.type)return v;if("string"==typeof f)return(0,u.x4)({source:null,paymentMethodData:null,paymentMethodOptions:v.value,paymentMethod:f,otherParams:h});if("object"==typeof f&&null!==f){var g=(0,u.ld)(y(e),f,t,{path:[].concat((0,i.Z)(r.path),["payment_method"])});if("error"===g.type)return g;var b=g.value;return(0,u.x4)({source:null,paymentMethod:null,paymentMethodOptions:v.value,paymentMethodData:b,otherParams:h})}return(0,u.x4)({source:null,paymentMethodData:null,paymentMethodOptions:null,paymentMethod:null,otherParams:h})}},k=function(e,t){if(null===e)return(0,u.RH)("object","null",t);if("object"!=typeof e)return(0,u.RH)("object",typeof e,t);var n=e.type;if("string"!=typeof n)return(0,u.RH)("a string such as 'use_stripe_sdk', 'redirect_to_url'",typeof n,(0,u.NQ)(t,"type"));if("use_stripe_sdk"!==n)return(0,u.RH)("a 3DS2 NextAction type such as 'use_stripe_sdk'",n,(0,u.NQ)(t,"type"));var r=e.use_stripe_sdk;if("object"!=typeof r)return(0,u.RH)("an object",r,(0,u.NQ)(t,"type"));var o=e;return(0,u.x4)(o,[])}},6042:function(e,t,n){"use strict";n.d(t,{G:function(){return i},q:function(){return o}});var r=n(5727),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()}},7087:function(e,t,n){"use strict";n.d(t,{AK:function(){return k},UV:function(){return w}});var r=n(5671),o=n(3144),i=n(5727),a=n(6352),c=n(6617),s=n(5558),u=n(6589),l=n(7553),p=n(3852),d=n(2641),m="__privateStripeMetricsController",f="merchant",h="session",_="NA",y=function(e){return 42===e.length},v=function(e,t,n){return n?!e||!y(e)&&y(t)?t:e:(0,s.Vj)()},g=function(){function e(){var t,n,o=this,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,r.Z)(this,e),this._controllerFrame=null,this._latencies=[],this._handleMessage=function(e){return function(t){var n=t.data,r=t.origin;if((0,c.Qg)(r)&&"string"==typeof n)try{var i=JSON.parse(n),a=i.originatingScript,s=i.payload;if("m2"===a){var u=s.guid,l=s.muid,p=s.sid;o._guid=u,o._muid=o._getID(f,l),o._sid=o._getID(h,p),e()}}catch(e){}}};var y=null===(t=a.checkoutIds)||void 0===t?void 0:t.muid,v=null===(n=a.checkoutIds)||void 0===n?void 0:n.sid;this._guid=_,y&&"NA"!==y?(this._muid=y,this._doNotPersistMuid=!0):(this._muid=this._getID(f),this._doNotPersistMuid=!1),v&&"NA"!==v?(this._sid=v,this._doNotPersistSid=!0):(this._sid=this._getID(h),this._doNotPersistSid=!1),this._listenerRegistry=(0,p.E)(),this._idsPromise=new u.J((function(e){o._establishMessageChannel(e)})),this._id=(0,s.To)(m),l.Ye&&(this._controllerFrame=new d.Z({type:i.NC.METRICS_CONTROLLER,controllerId:this._id,listenerRegistry:this._listenerRegistry,autoload:!0,appParams:this._buildFrameQueryString()}),this._startIntervalCheck(),setTimeout(this._testLatency.bind(this),2e3+500*Math.random()))}return(0,o.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,s.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,c.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]:_;switch(e){case f:if(this._doNotPersistMuid)return v(this._muid,t,l.Ye);try{var n="__stripe_mid",r=v((0,a.ej)(n),t,l.Ye);return y(r)&&(0,a.d8)({name:n,value:r,domain:".".concat(document.location.hostname),protocol:document.location.protocol,sameSite:"Strict"}),r}catch(e){return _}case h:if(this._doNotPersistSid)return v(this._sid,t,l.Ye);try{var o="__stripe_sid",i=v((0,a.ej)(o),t,l.Ye);return y(i)&&(0,a.d8)({name:o,value:i,domain:".".concat(document.location.hostname),protocol:document.location.protocol,sameSite:"Strict",expiresIn:18e5}),i}catch(e){return _}default:throw new Error("Invalid ID type specified: ".concat(e))}}}]),e}(),b=null,w=function(){return b},k=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return b=new g(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}}}))))}},9822:function(e,t,n){"use strict";n.d(t,{Z:function(){return Te}});var r,o,i,a=n(4942),c=n(5987),s=n(1413),u=n(5671),l=n(136),p=n(9388),d=n(6589),m=n(1873),f=n(2024),h=n(40),_=n(8812),y=n(73),v=n(8547),g=n(4505),b=n(9062),w=n(5558),k={applePay:"applePay",googlePay:"googlePay",browserCard:"browserCard",link:"link"},S=function(e,t){return e.indexOf(t)>=0},E=function(){return Object.keys(k)},C=n(1743),P=n(1765),A=(0,m.mC)({amount:m.MZ,label:m.Z_,pending:(0,m.jt)(m.Xg)}),N=(0,m.mC)({amount:m.Bi,label:m.Z_,pending:(0,m.jt)(m.Xg)}),I=(0,m.mC)({amount:m.Bi,label:m.Z_,pending:(0,m.jt)(m.Xg),id:(0,m.Wc)(m.Z_,(function(){return(0,w.To)("shippingOption")})),detail:(0,m.Wc)(m.Z_,(function(){return""}))}),M=(0,m.mC)({major:m.Rx,minor:m.Rx}),T=m.kw.apply(void 0,(0,b.Z)(Object.keys(C.Uz))),R=(0,m.mC)({origin:m.Z_,name:m.Z_,accountId:(0,m.jt)(m.Z_),applePayIdentifierAccount:(0,m.jt)(m.Z_)}),O=(0,m.ci)({__merchantDetails:(0,m.jt)(R),__supportsCouponCode:(0,m.jt)(m.Xg),__couponCode:(0,m.jt)(m.Z_),country:(0,m.jt)(m.hN),currency:(0,m.jt)(m.cV),displayItems:(0,m.jt)((0,m.CT)(N)),shippingOptions:(0,m.jt)((0,m.uw)("id")((0,m.CT)(I))),total:(0,m.jt)(A),blockedCardBrands:(0,m.jt)((0,m.CT)(m.kw.apply(void 0,(0,b.Z)(y.iw))))}),Z=Object.keys(C.kB),j=(0,m.mC)({displayItems:(0,m.jt)((0,m.CT)(N)),shippingOptions:(0,m.jt)((0,m.uw)("id")((0,m.CT)(I))),total:(0,m.jt)(A),status:function(e,t){if(-1!==Z.indexOf(e))return m.kw.apply(void 0,(0,b.Z)(Z))(e,t);var n=Object.keys(C.aH).filter((function(e){return-1===Z.indexOf(e)}));return m.kw.apply(void 0,(0,b.Z)(n))(-1!==["invalid_payer_name","invalid_payer_email","invalid_payer_phone"].indexOf(e)?"fail":e,t)},errorMessage:(0,m.jt)(m.Z_)}),x=function(e,t){if(-1!==Z.indexOf(e))return m.kw.apply(void 0,(0,b.Z)(Z))(e,t);var n=Object.keys(C.qp).filter((function(e){return-1===Z.indexOf(e)}));return m.kw.apply(void 0,(0,b.Z)(n))(e,t)},L=n(9776),B=function(e){var t=[];return window.ApplePaySession?(S(e,k.applePay)&&t.push("APPLE_PAY"),S(e,k.link)&&t.push("LINK"),t):(S(e,k.link)&&t.push("LINK"),S(e,k.googlePay)&&(t.push("GOOGLE_PAY"),L.sV&&t.push("BROWSER")),S(e,k.browserCard)&&-1===t.indexOf("BROWSER")&&t.push("BROWSER"),t)},D=n(3324),q=n(3144),F=n(2920),G=n(7934),U=n(6241),z=function(e,t){return{amount:(0,U.Fe)(e.amount,t.currency),label:e.label,type:e.pending?"pending":"final"}},H=function(e,t,n){return new window.ApplePayError(e,t,n)},K=function(e){return function(t){return t[e]&&"string"==typeof t[e]?t[e].toUpperCase():null}},Y=(r={},(0,a.Z)(r,C.qp.success,0),(0,a.Z)(r,C.qp.fail,1),(0,a.Z)(r,C.qp.invalid_payer_name,2),(0,a.Z)(r,C.qp.invalid_shipping_address,3),(0,a.Z)(r,C.qp.invalid_payer_phone,4),(0,a.Z)(r,C.qp.invalid_payer_email,4),(0,a.Z)(r,C.qp.invalid_coupon_code,1),(0,a.Z)(r,C.qp.expired_coupon_code,1),(0,a.Z)(r,C.qp.invalid_payer_zip,2),r),J=(o={},(0,a.Z)(o,C.qp.success,(function(){return null})),(0,a.Z)(o,C.qp.fail,(function(){return null})),(0,a.Z)(o,C.qp.invalid_payer_name,(function(){return H("billingContactInvalid","name")})),(0,a.Z)(o,C.qp.invalid_shipping_address,(function(){return H("shippingContactInvalid","postalAddress")})),(0,a.Z)(o,C.qp.invalid_payer_phone,(function(){return H("shippingContactInvalid","phoneNumber")})),(0,a.Z)(o,C.qp.invalid_payer_email,(function(e){return H("shippingContactInvalid","emailAddress",e)})),(0,a.Z)(o,C.qp.invalid_payer_zip,(function(e){return H("billingContactInvalid","postalCode",e)})),(0,a.Z)(o,C.qp.invalid_coupon_code,(function(e){return H((0,F.VC)(12)?"couponCodeInvalid":"unknown",void 0,e)})),(0,a.Z)(o,C.qp.expired_coupon_code,(function(e){return H((0,F.VC)(12)?"couponCodeInvalid":"unknown",void 0,e)})),o),W=(i={},(0,a.Z)(i,C.Uz.pickup,"storePickup"),(0,a.Z)(i,C.Uz.shipping,"shipping"),(0,a.Z)(i,C.Uz.delivery,"delivery"),i),V={total:function(e){return z(e.total,e)},lineItems:function(e){return e.displayItems?e.displayItems.map((function(t){return z(t,e)})):[]},shippingMethods:function(e){return e.shippingOptions?e.shippingOptions.map((function(t){return function(e,t){return{amount:(0,U.Fe)(e.amount,t.currency),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:""}},X={shippingType:function(e){var t=e.shippingType;if(!t)return null;var n=W[t];if(void 0!==n)return n;throw new _.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:K("country"),currencyCode:K("currency"),merchantCapabilities:function(e){var t=e.merchantCapabilities||C.WN.merchantCapabilities;return e.__betas&&(0,P.uN)(e.__betas,"cup_apple_pay_beta_1")&&t.push("supportsEMV"),t},supportedNetworks:function(e){var t=(0,G.RO)(e.country,e.jcbEnabled||!1,e.blockedCardBrands||[]);return(0,F.VC)(4)&&-1===(e.blockedCardBrands||[]).indexOf("mastercard")&&t.push("maestro"),e.__betas&&(0,P.uN)(e.__betas,"cup_apple_pay_beta_1")&&-1===(e.blockedCardBrands||[]).indexOf("unionpay")&&t.push("chinaUnionPay"),(0,F.VC)(4)&&e.__betas&&(0,P.uN)(e.__betas,"cartes_bancaires_apple_pay_beta_1")&&"eur"===e.currency&&t.unshift("cartesBancaires"),t}},$={status:function(e){var t=Y[e.status];return(0,F.VC)(3)&&t>1?1:t},error:function(e){return(0,F.VC)(3)?J[e.status](e.errorMessage):null}},Q=(0,s.Z)((0,s.Z)({},V),X),ee=(0,s.Z)((0,s.Z)({},V),$),te=function(e){return Object.keys(ee).reduce((function(t,n){var r=(0,ee[n])(e);return null!==r?(0,s.Z)((0,s.Z)({},t),{},(0,a.Z)({},n,r)):t}),{})},ne=function(e){return"string"==typeof e?e:null},re=function(e){return e?ne(e.phoneNumber):null},oe=function(e){return e?ne(e.emailAddress):null},ie=function(e){return e?[e.givenName,e.familyName].filter((function(e){return e&&"string"==typeof e})).join(" "):null},ae=function(e){var t=e.addressLines,n=e.countryCode,r=e.postalCode,o=e.administrativeArea,i=e.locality,a=e.phoneNumber,c=ne(n);return{addressLine:Array.isArray(t)?t.reduce((function(e,t){return"string"==typeof t?[].concat((0,b.Z)(e),[t]):e}),[]):[],country:c?c.toUpperCase():"",postalCode:ne(r)||"",recipient:ie(e)||"",region:ne(o)||"",city:ne(i)||"",phone:ne(a)||"",sortingCode:"",dependentLocality:"",organization:""}},ce=function(e,t){var n=e.identifier,r=e.label;return t.filter((function(e){return e.id===n&&e.label===r}))[0]},se=function(e,t){var n=e.shippingContact,r=e.shippingMethod,o=e.billingContact;return{shippingOption:r&&t.shippingOptions&&t.shippingOptions.length?ce(r,t.shippingOptions):null,shippingAddress:n?ae(n):null,payerEmail:oe(n),payerPhone:re(n),payerName:ie(o),walletName:"applePay",methodName:"apple-pay"}},ue=n(9620),le=n(7703),pe=function(e,t){return e&&"object"==typeof e?t(e):null},de=function(){function e(t){var n=this;(0,u.Z)(this,e),this._wasCompleted=!1,this._onEvent=function(){},this.setEventHandler=function(e){n._onEvent=e},this.canMakePayment=function(){var e,t=n._controller.action.retrieveWalletConfigAvailability({wallet:"apple_pay",isHostedSurface:!(!n._initialPaymentRequest.__isCheckout&&!n._initialPaymentRequest.__isHostedInvoicePage),isPaymentElement:!!n._initialPaymentRequest.__isPaymentElement}),r=(0,F.Qt)(window.location.hostname,n._authentication.accountId||(null===(e=n._initialPaymentRequest.__merchantDetails)||void 0===e?void 0:e.applePayIdentifierAccount)||null,(0,ue.lO)(n._authentication.apiKey)===ue.Kl.test,n._report,n._minimumVersion,!0);return d.J.all([t,r]).then((function(e){var t=(0,D.Z)(e,2),n=t[0],r=t[1];return{available:n&&r}}))},this.update=function(e){n._initialPaymentRequest=(0,f.PM)(n._paymentRequestOptions,e),n._initializeSessionState()},this.show=function(){var e,t,r;n._wasCompleted&&n._report("pr.show_called_after_completion"),n._initializeSessionState();try{e=new window.ApplePaySession(n._minimumVersion,(t=n._paymentRequestOptions,r=(0,s.Z)((0,s.Z)({},C.WN),t),Object.keys(Q).reduce((function(e,t){var n=(0,Q[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 _.No("show() must be called from a user gesture handler (such as a click handler, after the user clicks a button)."):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._validateMerchant=function(e,t){return function(r){n._controller.action.createApplePaySession({data:{validation_url:r.validationURL,domain_name:window.location.hostname,display_name:n._paymentRequestOptions.total.label},usesButtonElement:t}).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();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()?y.Yj.paymentRequestButton:null;n._controller.action.tokenizeWithData({type:"apple_pay",elementName:o,tokenData:(0,s.Z)((0,s.Z)({},r),{},{billingContact:pe(r.billingContact,n._normalizeContact)}),mids:n._controller.mids()}).then((function(t){if("error"===t.type)(0,F.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=pe(r.shippingContact,n._normalizeContact),i=pe(r.billingContact,n._normalizeContact);o&&n._paymentRequestOptions.requestShipping&&!o.countryCode&&e.completePayment(window.ApplePaySession.STATUS_INVALID_SHIPPING_POSTAL_ADDRESS);var a=se({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,le.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,g.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=te(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,F.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?ae(n._normalizeContact(t.paymentMethod.billingContact)):{addressLine:[],country:"",postalCode:"",recipient:"",region:"",city:"",phone:"",sortingCode:"",dependentLocality:"",organization:""},updateWith:(0,g.TC)(n._completePaymentMethodSelection(e))}})}},this._shippingContactSelected=function(e){return function(t){n._onEvent({type:"shippingaddresschange",payload:{shippingAddress:ae(n._normalizeContact(t.shippingContact)),updateWith:(0,g.TC)(n._completeShippingContactSelection(e))}})}},this._completePaymentMethodSelection=function(e){return function(t){n._paymentRequestOptions=(0,f.PM)(n._paymentRequestOptions,t);var r=te(n._paymentRequestOptions),o=r.total,i={newLineItems:r.lineItems,newTotal:o};e.completePaymentMethodSelection(i)}},this._completeShippingContactSelection=function(e){return function(t){var r;n._paymentRequestOptions=(0,f.PM)(n._paymentRequestOptions,t),null!==(r=n._paymentRequestOptions.shippingOptions)&&void 0!==r&&r.length&&(n._privateShippingOption=n._paymentRequestOptions.shippingOptions[0]);var o=te(n._paymentRequestOptions),i=o.status,a=o.shippingMethods,c=o.total,s=o.lineItems,u=o.error;if(u)e.completeShippingContactSelection({newTotal:c,newLineItems:s,newShippingMethods:a,errors:[u]});else if((0,F.VC)(14)&&1===i){var l=H("shippingContactInvalid","postalAddress");e.completeShippingContactSelection({newTotal:c,newLineItems:s,newShippingMethods:a,errors:[l]})}else e.completeShippingContactSelection(i,a,c,s)}},this._shippingMethodSelected=function(e){return function(t){if(n._paymentRequestOptions.shippingOptions){var r=ce(t.shippingMethod,n._paymentRequestOptions.shippingOptions);n._privateShippingOption=r,n._onEvent({type:"shippingoptionchange",payload:{shippingOption:r,updateWith:(0,g.TC)(n._completeShippingMethodSelection(e))}})}}},this._completeShippingMethodSelection=function(e){return function(t){n._paymentRequestOptions=(0,f.PM)(n._paymentRequestOptions,t);var r=te(n._paymentRequestOptions),o=r.status,i=r.total,a=r.lineItems;e.completeShippingMethodSelection(o,i,a)}},this._couponCodeChanged=function(e){return function(t){var r=t.couponCode;n._onEvent({type:"__private_do_not_use_couponcodechange",payload:{couponCode:r,updateWith:(0,g.TC)(n._completeCouponCodeChange(e))}})}},this._completeCouponCodeChange=function(e){return function(t){n._paymentRequestOptions=(0,f.PM)(n._paymentRequestOptions,t);var r=te(n._paymentRequestOptions),o=r.total,i=r.lineItems,a=r.error;e.completeCouponCodeChange({newTotal:o,newLineItems:i,errors:a?[a]:void 0})}};var r=t.controller,o=t.authentication,i=(t.mids,t.options),c=t.usesButtonElement,l=t.listenerRegistry;this._controller=r,this._authentication=o,this._minimumVersion=i.__minApplePayVersion||F.lU,this._usesButtonElement=c,this._listenerRegistry=l,this._initialPaymentRequest=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,q.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)({},C.WN),this._initialPaymentRequest),{},{status:C.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,g.TC)(this._validateMerchant(e,t))),this._listenerRegistry.addEventListener(e,"paymentauthorized",(0,g.TC)(this._paymentAuthorized(e))),this._listenerRegistry.addEventListener(e,"cancel",(0,g.TC)((function(){n._isShowing=!1,n._onEvent({type:"cancel"}),n._onEvent({type:"close"})}))),this._listenerRegistry.addEventListener(e,"paymentmethodselected",(0,g.TC)(this._paymentMethodSelected(e))),this._listenerRegistry.addEventListener(e,"shippingcontactselected",(0,g.TC)(this._shippingContactSelected(e))),this._listenerRegistry.addEventListener(e,"shippingmethodselected",(0,g.TC)(this._shippingMethodSelected(e))),this._listenerRegistry.addEventListener(e,"couponcodechanged",(0,g.TC)(this._couponCodeChanged(e)))}}]),e}(),me=de,fe=n(5727),he=n(8731),_e=null;var ye=function(e){return"https:"===window.location.protocol&&(!(!L.Wt&&!L.j3)&&(!L.Bh&&(!(!e.isCheckout&&!window.PaymentRequest)&&!(!e.isCheckout&&L.sV))))},ve=function e(t){var n=this;(0,u.Z)(this,e),this._mids=null,this._frame=null,this._initFrame=function(e){var t=n._controller.createHiddenFrame(fe.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-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(!ye({isCheckout:n._isCheckout}))return d.J.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!==_e?d.J.resolve(_e):e().then((function(e){return _e=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 he.ZP({lockScrolling:!1,lockFocus:!0,lockFocusOn:null,listenerRegistry:t.listenerRegistry}),this._isCheckout=!!t.options.__isCheckout,ye({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)}}})}))},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(L.xz)return null;var e=window.PaymentRequest;return e.prototype.canMakePayment||(e.prototype.canMakePayment=function(){return d.J.resolve(!1)}),e}(),be=null,we=function e(t){var n=this;(0,u.Z)(this,e),this._onEvent=function(){},this.setEventHandler=function(e){n._onEvent=e},this.canMakePayment=function(){return(e=n._prFrame,(0,ue.lO)(n._authentication.apiKey),ue.Kl.test,"https:"!==window.location.protocol?d.J.resolve(!1):null!==be?d.J.resolve(be):ge&&e?e.action.checkCanMakePayment(void 0).then((function(e){var t=e.available;return be=!0===t})):d.J.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 _.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,l=t.options;if(this._authentication=r,this._controller=o,this._usesButtonElement=c,ge&&"https:"===window.location.protocol){this._controller.action.fetchLocale({locale:"auto"});var p=this._controller.createHiddenFrame(fe.NC.PAYMENT_REQUEST_BROWSER,{authentication:r,mids:i,origin:a});this._setupPrFrame(p,l),this._prFrame=p}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)}}})}))},ke=n(1164),Se=n(9449),Ee=function(){return(L.Wt||L.j3)&&(0,L.gG)()},Ce=(n(7294),n(3367)),Pe=function(){function e(t){var n=this;(0,u.Z)(this,e),this.blockReopenOnShow=!1,this.popup=null,this.isDuringSuccessCushion=!1,this.hasReceivedPaymentData=!1,this.collectPrefillData=null,this.handleGetInitialState=function(e,t){return function(){var r=Date.now();return n.controller.report("pr.link.popup_load",{duration:r-t}),n.getControllerData(e).then((function(e){var t=e.locale,r=e.linkConfigResult;if("error"===r.type||null==r.object.link_settings)throw new Error("Invalid LinkConfig result");var o=r.object.link_settings,i=o.merchant_info,a={businessName:i.business_name,country:i.country},c=o.customer_info,s={name:null,email:null,phoneCountry:null,phoneNumber:null};if(n.collectPrefillData)try{s=n.collectPrefillData()}catch(e){n.controller.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})}return{publishableKey:n.authentication.apiKey,stripeAccount:n.authentication.accountId,merchantInfo:a,customerInfo:c,integrationType:"prb",elementComponentName:"paymentRequestButton",paymentRequestOptions:n.paymentRequestOptions,locale:t,linkFundingSources:["CARD"],stripeJsId:n.controller._stripeJsId,mids:n.controller.mids(),referrer:window.location.href.toString(),elementsSessionId:null,elementsAssignmentId:null,flags:r.object.flags,preloadedConsumerInfo:null,prefill:s}}))}},this.getControllerData=function(e){return d.J.all([n.controller.action.resolveLocale({locale:e||"auto"}),n.controller.action.retrieveLinkConfig(),n.controller.action.checkForLinkClientSecret()]).then((function(e){var t=(0,D.Z)(e,3);return{locale:t[0],linkConfigResult:t[1],hasClientSecret:t[2]}}))},this.handleShippingOptionChange=function(e){var t=e.shippingOption;return new d.J((function(e){n.onEvent({type:"shippingoptionchange",payload:{shippingOption:t,updateWith:e}})}))},this.handleShippingAddressChange=function(e){var t=e.shippingAddress;return new d.J((function(e){n.onEvent({type:"shippingaddresschange",payload:{shippingAddress:t,updateWith:e}})}))},this.handlePaymentData=function(e){var t=e.token,r=e.payerName,o=e.payerEmail,i=e.payerPhone,a=e.shippingAddress,c=e.shippingOption;return n.hasReceivedPaymentData=!0,n.blockReopenOnShow=!0,new d.J((function(e){n.onEvent({type:"paymentresponse",payload:{token:t,payerName:r,payerEmail:o,payerPhone:i,shippingOption:c,shippingAddress:a,walletName:"link",methodName:"link",complete:function(t,r){var o;("success"!==t?n.blockReopenOnShow=!1:(n.isDuringSuccessCushion=!0,setTimeout((function(){n.isDuringSuccessCushion=!1}),2e3)),L.q$&&"success"===t)&&(null===(o=n.popup)||void 0===o||o.close(),n.popup=null);e({status:t,errorMessage:r})}}})}))},this.handleLogOutInElements=function(){return n.controller.action.logOutOfLinkInElements()},this.handlePopupLogOut=function(){return n.controller.action.linkPopupLogOut()},this.setEventHandler=function(e){n._onEvent=e},this.show=function(e){var t=e.locale;if(!n.isDuringSuccessCushion){if(n.popup){if(!L.q$)return void n.popup.focus();if(n.blockReopenOnShow)return;n.popup.close()}n.hasReceivedPaymentData=!1;var r=Date.now(),o=(0,Se.z)({stripeJsId:n.controller._stripeJsId,publishableKey:n.authentication.apiKey,path:"pay",integrationType:"prb",height:708,width:500,onClose:function(){n.popup===o&&(n.hasReceivedPaymentData||n.onEvent({type:"cancel"}),n.controller.action.consumerPreloadedDataStale(),n.onEvent({type:"close"}),n.popup=null)}});n.popup=o,n.popup?(n.popup.messenger.on("get_initial_state",n.handleGetInitialState(t,r)),n.popup.messenger.on("link_prb_payment_data",n.handlePaymentData),n.popup.messenger.on("link_prb_shipping_option_change",n.handleShippingOptionChange),n.popup.messenger.on("link_prb_shipping_address_change",n.handleShippingAddressChange),n.popup.messenger.on("log_out_in_elements",n.handleLogOutInElements),n.popup.messenger.on("link_popup_log_out",n.handlePopupLogOut)):n.controller.report("pr.link.popup_blocked")}},this.update=function(e){e.__merchantDetails;var t=(0,c.Z)(e,["__merchantDetails"]);n.paymentRequestOptions=(0,f.PM)(n.paymentRequestOptions,t)},this.abort=function(){n.popup&&(n.popup.close(),n.popup=null)},this.canMakePayment=function(e){return Ee()&&function(e){return!(e.blockedCardBrands&&e.blockedCardBrands.length||e.__isCheckout&&!e.__linkOnly)}(n.paymentRequestOptions)?n.getControllerData(e.locale).then((function(t){var r,o=t.locale,i=t.linkConfigResult,a=t.hasClientSecret;if(-1!==ke.ud.indexOf(o))return{available:!1};if("error"===i.type)return{available:!1};var c=i.object,s=null===(r=c.experiments)||void 0===r?void 0:r.experiment_assignments;return c.link_available.payment_request_button&&null!=c.link_settings||e.useCheckoutAvailabilityCheck?e.useCheckoutAvailabilityCheck&&!c.link_available.checkout?{available:!1}:e.skipEnrollmentCheck?{available:!0,linkExperimentAssignments:s}:(a&&n.controller.report("pr.link.has_client_secret"),{available:a,linkExperimentAssignments:s}):{available:!1}})).then((function(e){return e.available&&(n.collectPrefillData=(0,Ce.NG)()),n.controller.report("pr.link.can_make_payment_native_response",{available:e.available}),e})):d.J.resolve({available:!1})},this.controller=t.controller,this.authentication=t.authentication,this.paymentRequestOptions=t.options,this.controller._controllerFrame._on("elements-link-login",this.abort),Ee()&&this.controller.action.retrieveLinkConfig(),this.controller._controllerFrame._on("stripe-user-credentials-update",(function(e){n.authentication={apiKey:e.publishableKey,accountId:e.stripeAccount},Ee()&&n.controller.action.retrieveLinkConfig()}))}return(0,q.Z)(e,[{key:"onEvent",value:function(e){if(!this._onEvent)throw new Error("Event handler has not been initialized");this._onEvent(e)}}]),e}(),Ae=Pe,Ne=n(9792),Ie=!1,Me=function(e){function t(e){var r;(0,u.Z)(this,t),(r=n.call(this))._usedByButtonElement=null,r._showCalledByButtonElement=!1,r._isShowing=!1,r._backingLibraries={APPLE_PAY:null,GOOGLE_PAY:null,BROWSER:null,LINK:null},r._activeBackingLibraryName=null,r._buttonTypeName=null,r._activeBackingLibrary=null,r._secondaryActiveBackingLibraryName=null,r._secondaryButtonTypeName=null,r._secondaryActiveBackingLibrary=null,r._lastClickedButtonPosition=null,r._canMakePaymentAvailability={APPLE_PAY:null,GOOGLE_PAY:null,BROWSER:null,LINK:null},r._canMakePaymentResolved=!1,r._validateUserOn=function(e){"string"==typeof e&&("source"===e&&r._hasRegisteredListener("paymentmethod")||"paymentmethod"===e&&r._hasRegisteredListener("source"))&&(r._report("pr.double_callback_registration"),r._controller.warn("Do not register event listeners for both `source` or `paymentmethod`. Only one of them will succeed."))},r._report=function(e,t){var n="secondary"===r._lastClickedButtonPosition?r._secondaryActiveBackingLibrary:r._activeBackingLibraryName;r._controller.report(e,(0,s.Z)((0,s.Z)({},t),{},{activeBackingLibrary:n,primaryBackingLibrary:r._activeBackingLibraryName,secondaryBackingLibrary:r._secondaryActiveBackingLibraryName,usesButtonElement:r._usedByButtonElement||!1,element:r._usedByButtonElement?"paymentRequestButton":null,requestShipping:r._initialOptions?r._initialOptions.requestShipping||!1:null}))},r._warn=function(e){r._controller.warn(e)},r._resetHttpsWarning=function(){Ie=!1},r._registerElement=function(){r._usedByButtonElement=!0},r._elementShow=function(){r._showCalledByButtonElement=!0,r.show()},r._updateLocale=function(e){r._locale=e},r._updateLastClickedButtonPosition=function(e){e&&(r._lastClickedButtonPosition=e)},r._initBackingLibraries=function(e){r._queryStrategy.forEach((function(t){var n={controller:r._controller,authentication:r._authentication,mids:r._controller.mids(),origin:window.location.origin,options:e,usesButtonElement:function(){return!0===r._usedByButtonElement},listenerRegistry:r._listenerRegistry};switch(t){case"APPLE_PAY":r._backingLibraries.APPLE_PAY=new me(n),r._backingLibraries.APPLE_PAY.setEventHandler(r._handleInternalEvent);break;case"GOOGLE_PAY":r._backingLibraries.GOOGLE_PAY=new ve(n),r._backingLibraries.GOOGLE_PAY.setEventHandler(r._handleInternalEvent);break;case"LINK":r._backingLibraries.LINK=new Ae(n),r._backingLibraries.LINK.setEventHandler(r._handleInternalEvent);break;case"BROWSER":r._backingLibraries.BROWSER=new we(n),r._backingLibraries.BROWSER.setEventHandler(r._handleInternalEvent);break;default:(0,m.Rz)(t)}}))},r._handleInternalEvent=function(e){switch(e.type){case"paymentresponse":r._emitPaymentResponse(e.payload);break;case"error":r._emit("__private_do_not_use_error"),r._report("error.pr.internal_error",{error:e.payload});break;case"close":r._isShowing=!1;break;default:r._emitExternalEvent(e)}},r._emitExternalEvent=function(e){switch(e.type){case"cancel":r._emit("cancel");break;case"__private_do_not_use_billingaddresschange":case"__private_do_not_use_couponcodechange":var t=e.type,n=e.payload,o=null,i=!1,a=!1,u=function(e){if(a&&i)return r._report("pr.update_with_called_after_timeout",{event:t}),void r._controller.warn("Call to updateWith() was ignored because it has already timed out. Please ensure that updateWith is called within 30 seconds.");if(i)return r._report("pr.update_with_double_call",{event:t}),void r._controller.warn("Call to updateWith() was ignored because it has already been called. Do not call updateWith more than once.");o&&clearTimeout(o),i=!0,r._report("pr.update_with",{event:t});var c=(0,m.Gu)(j,e||{},"".concat(t," callback")),s=c.value;c.warnings.forEach((function(e){return r._controller.warn(e)}));var u=s;u.total&&(r._reportOnlyTotal=u.total),n.updateWith(u)};if(r._hasRegisteredListener(e.type)){o=setTimeout((function(){a=!0,r._report("pr.update_with_timed_out",{event:t}),r._controller.warn('Timed out waiting for a call to updateWith(). If you listen to "'.concat(e.type,'" events, then you must call event.updateWith in the "').concat(e.type,'" handler within 30 seconds.')),u({status:"fail"})}),29900);try{r._emit(t,(0,s.Z)((0,s.Z)({},n),{},{updateWith:u}))}catch(t){throw r._report("pr.user_callback_error",{event:e.type,activeBackingLibrary:r._activeBackingLibraryName,errorMessage:"string"==typeof(null==t?void 0:t.message)?t.message:"Unknown error occured: ".concat(t)}),t}}else u({status:"success"});break;case"shippingoptionchange":case"shippingaddresschange":var l=e.type,p=e.payload,d=null,f=!1,h=!1,y=function(t){if(h&&f)return r._report("pr.update_with_called_after_timeout",{event:l}),void r._controller.warn("Call to updateWith() was ignored because it has already timed out. Please ensure that updateWith is called within 30 seconds.");if(f)return r._report("pr.update_with_double_call",{event:l}),void r._controller.warn("Call to updateWith() was ignored because it has already been called. Do not call updateWith more than once.");d&&clearTimeout(d),f=!0,r._report("pr.update_with",{event:l});var n=(0,m.Gu)(j,t||{},"".concat(l," callback")),o=n.value;n.warnings.forEach((function(e){return r._controller.warn(e)}));var i=o,a=!1;if(r._initialOptions.__isCheckout&&"APPLE_PAY"===r._activeBackingLibraryName&&o.shippingOptions&&1===o.shippingOptions.length&&0===o.shippingOptions[0].amount){o.shippingOptions;i=(0,c.Z)(o,["shippingOptions"]),a=!0}var s=o.shippingOptions||r._initialOptions.shippingOptions;if(!(a||"shippingaddresschange"!==e.type||o.status!==C.qp.success||s&&s.length))throw new _.No("When requesting shipping information, you must specify shippingOptions once a shipping address is selected.\nEither provide shippingOptions in stripe.paymentRequest(...) or listen for the shippingaddresschange event and provide shippingOptions to the updateWith callback there.");i.total&&(r._reportOnlyTotal=i.total),p.updateWith(i)};if(r._hasRegisteredListener(e.type)){d=setTimeout((function(){h=!0,r._report("pr.update_with_timed_out",{event:l}),r._controller.warn('Timed out waiting for a call to updateWith(). If you listen to "'.concat(e.type,'" events, then you must call event.updateWith in the "').concat(e.type,'" handler within 30 seconds.')),y({status:"fail"})}),29900);try{r._emit(l,(0,s.Z)((0,s.Z)({},p),{},{updateWith:y}))}catch(t){throw r._report("pr.user_callback_error",{event:e.type,activeBackingLibrary:r._activeBackingLibraryName,errorMessage:"string"==typeof(null==t?void 0:t.message)?t.message:"Unknown error occured: ".concat(t)}),t}}else y({status:"success"});break;case"token":case"source":case"paymentmethod":var v=e.type,g=e.payload,b=null,w=!1,k=!1,S=function(e,t){if(w&&k)return r._report("pr.complete_called_after_timeout"),void r._controller.warn("Call to complete() was ignored because it has already timed out. Please ensure that complete is called within 30 seconds.");if(k)return r._report("pr.complete_double_call"),void r._controller.warn("Call to complete() was ignored because it has already been called. Do not call complete more than once.");b&&clearTimeout(b),k=!0;var n=(0,m.Gu)(x,e,"status for PaymentRequest completion"),o=n.value;if(n.warnings.forEach((function(e){return r._controller.warn(e)})),r._initialOptions.__isCheckout&&t&&"success"!==o){var i=(0,m.Gu)(m.Z_,t,"error message for PaymentRequest completion"),a=i.value;i.warnings.forEach((function(e){return r._controller.warn(e)})),g.complete(o,a)}else g.complete(o)};b=setTimeout((function(){w=!0,r._report("pr.complete_timed_out"),r._controller.warn('Timed out waiting for a call to complete(). Once you have processed the payment in the "'.concat(e.type,'" handler, you must call event.complete within 30 seconds.')),S("fail")}),29900);try{r._emit(v,(0,s.Z)((0,s.Z)({},g),{},{complete:S}))}catch(e){throw r._report("pr.user_callback_error",{event:v,activeBackingLibrary:r._activeBackingLibraryName,errorMessage:"string"==typeof(null==e?void 0:e.message)?e.message:"Unknown error occured: ".concat(e)}),e}break;case"__private_do_not_use_error":r._emit("__private_do_not_use_error",e.payload.error);break;default:(0,m.Rz)(e)}},r._logExperimentExposure=function(e){r._controller.report("experiment_exposure",{experiment_name:e})},r._maybeEmitPaymentResponse=function(e){r._isShowing&&r._emitExternalEvent(e)},r._emitPaymentResponse=function(e){var t,n="other";r._initialOptions.__isCheckout?n="checkout":r._initialOptions.__isPaymentElement&&(n="payment_element"),r._report("pr.payment_authorized",{product:n,amount:null===(t=r._reportOnlyTotal)||void 0===t?void 0:t.amount,currency:r._reportOnlyCurrency});var o=e.token,i=(0,c.Z)(e,["token"]),a=i.payerEmail,u=i.payerPhone,l=i.complete,p=r._showCalledByButtonElement?y.Yj.paymentRequestButton:null;r._hasRegisteredListener("token")&&("googlePay"===i.walletName&&r._controller.action.removeElementsExperimentId({experimentKey:y.D3.elements_session}),r._maybeEmitPaymentResponse({type:"token",payload:e})),r._hasRegisteredListener("paymentmethod")?r._controller.action.createPaymentMethodWithData({elementName:p,type:"card",paymentMethodData:{card:{token:o.id},billing_details:{email:r._initialOptions.__billingDetailsEmailOverride||a,phone:u}},mids:r._controller.mids()}).then((function(e){"error"===e.type?e.error.code&&"email_invalid"===e.error.code?l("invalid_payer_email"):(r._report("fatal.pr.token_to_payment_method_failed",{error:e.error,token:o.id}),l("fail")):r._maybeEmitPaymentResponse({type:"paymentmethod",payload:(0,s.Z)((0,s.Z)({},i),{},{paymentMethod:e.object})})})):r._hasRegisteredListener("source")&&r._controller.action.createSourceWithData({elementName:p,type:"card",sourceData:{token:o.id,owner:{email:r._initialOptions.__billingDetailsEmailOverride||a,phone:u}},mids:r._controller.mids()}).then((function(e){"error"===e.type?e.error.code&&"email_invalid"===e.error.code?l("invalid_payer_email"):(r._report("fatal.pr.token_to_source_failed",{error:e.error,token:o.id}),l("fail")):r._maybeEmitPaymentResponse({type:"source",payload:(0,s.Z)((0,s.Z)({},i),{},{source:e.object})})}))},r._canMakePaymentForBackingLibrary=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{skipEnrollmentCheck:!1,useCheckoutAvailabilityCheck:!1},n=r._backingLibraries[e];if(!n){var o="Unexpectedly calling canMakePayment on uninitialized backing library ".concat(e);throw new Error(o)}return d.J.race([new d.J((function(e){return setTimeout(e,1e4)})).then((function(){return{available:!1}})),n.canMakePayment({skipEnrollmentCheck:t.skipEnrollmentCheck,useCheckoutAvailabilityCheck:t.useCheckoutAvailabilityCheck,locale:r._locale})]).then((function(t){var n=t.available,o="LINK"===e&&t.linkExperimentAssignments?t.linkExperimentAssignments:null;return r._canMakePaymentAvailability=(0,s.Z)((0,s.Z)({},r._canMakePaymentAvailability),{},(0,a.Z)({},e,n)),{backingLibraryName:e,available:n,linkExperimentAssignments:o}}))},r._isGooglePayOnAndroid=function(){var e=r._initialOptions.wallets,t=e&&-1===e.indexOf("googlePay"),n=!!r._canMakePaymentAvailability.BROWSER;return L.sV&&!t&&n},r._constructCanMakePaymentResponse=function(){var e=r._isGooglePayOnAndroid();return{applePay:!!r._canMakePaymentAvailability.APPLE_PAY,googlePay:!!r._canMakePaymentAvailability.GOOGLE_PAY||e,link:!!r._canMakePaymentAvailability.LINK}},r.canMakePayment=(0,g.TC)((function(){r._report("pr.can_make_payment"),r._controller.action.cmpStatusChange({cmpTriggered:!0});var e=!r._initialOptions.__isCheckout;if(r._canMakePaymentResolved){var t,n=null!==r._activeBackingLibrary?r._constructCanMakePaymentResponse():null;return r._report("pr.can_make_payment_response",{response:n,cached:!0,activeBackingLibrary:r._activeBackingLibrary,amount:null===(t=r._reportOnlyTotal)||void 0===t?void 0:t.amount,currency:r._reportOnlyCurrency}),d.J.resolve(n)}if("https:"!==window.location.protocol)return Ie||(r._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."),Ie=!0),r._canMakePaymentResolved=!0,r._controller.deferredCanMakePaymentResponse.resolve(null),d.J.resolve(null);var o=r._queryStrategy.map((function(e){return function(){return r._canMakePaymentForBackingLibrary(e)}})),i=[];if(-1!==r._queryStrategy.indexOf("LINK"))if(r._initialOptions.__linkOnly&&r._initialOptions.__isCheckout){o=[function(){return r._canMakePaymentForBackingLibrary("LINK",{skipEnrollmentCheck:!0,useCheckoutAvailabilityCheck:!0})}]}else[o,i].forEach((function(e){return e.push((function(){return r._canMakePaymentForBackingLibrary("LINK",{skipEnrollmentCheck:!0,useCheckoutAvailabilityCheck:!1})}))}));var a=new Ne.E,c=(0,h.tN)(o,(function(e){var t=e.backingLibraryName,n=e.available;return n&&(r._activeBackingLibraryName=t,r._activeBackingLibrary=r._backingLibraries[t],r._buttonTypeName=r._activeBackingLibraryName,r._isGooglePayOnAndroid()&&(r._buttonTypeName="GOOGLE_PAY")),n})),s=e?(0,h.tN)(i,(function(e){e.backingLibraryName;return e.available})):null;return e?d.J.all([c,s]).then((function(e){var t,n=new Ne.E,o=e[0],i=e[1];r._canMakePaymentResolved=!0,"SATISFIED"===o.type&&-1!==["APPLE_PAY","GOOGLE_PAY","BROWSER"].indexOf(o.value.backingLibraryName)&&"SATISFIED"===(null==i?void 0:i.type)&&(r._secondaryActiveBackingLibraryName=i.value.backingLibraryName,r._secondaryActiveBackingLibrary=r._backingLibraries[i.value.backingLibraryName],r._secondaryButtonTypeName=r._secondaryActiveBackingLibraryName);var c=null;return"SATISFIED"===o.type&&(c=r._constructCanMakePaymentResponse()),r._report("pr.can_make_payment_response",{response:c,cached:!1,duration:a.getElapsedTime(n),activeBackingLibrary:r._activeBackingLibrary,amount:null===(t=r._reportOnlyTotal)||void 0===t?void 0:t.amount,currency:r._reportOnlyCurrency}),r._controller.deferredCanMakePaymentResponse.resolve(c),c})):c.then((function(e){var t,n=new Ne.E;r._canMakePaymentResolved=!0;var o=null;return"SATISFIED"===e.type&&(o=r._constructCanMakePaymentResponse()),r._report("pr.can_make_payment_response",{response:o,cached:!1,duration:a.getElapsedTime(n),activeBackingLibrary:r._activeBackingLibrary,amount:null===(t=r._reportOnlyTotal)||void 0===t?void 0:t.amount,currency:r._reportOnlyCurrency}),r._controller.deferredCanMakePaymentResponse.resolve(o),o}))})),r.update=(0,g.TC)((function(e){if(r._isShowing)throw r._report("pr.update_called_while_showing"),new _.No("You cannot update Payment Request options while the payment sheet is showing.");r._privateForcedUpdate(e)})),r._privateForcedUpdate=function(e){var t,n=(0,m.Gu)(O,e,"PaymentRequest update()"),o=n.value,i=n.warnings;r._report("pr.update"),i.forEach((function(e){return r._warn(e)})),!o.shippingOptions||null!==(t=r._initialOptions)&&void 0!==t&&t.requestShipping||r._report("pr.update_shipping_options_without_shipping"),o.total&&(r._reportOnlyTotal=o.total),o.currency&&(r._reportOnlyCurrency=o.currency),(0,f.VO)(r._backingLibraries).forEach((function(e){e&&e.update(o)}))},r.show=(0,g.TC)((function(){var e;if(r._usedByButtonElement&&!r._showCalledByButtonElement&&(r._report("pr.show_called_with_button"),r._warn("Do not call show() yourself if you are using the paymentRequestButton Element. The Element handles showing the payment sheet.")),!r._canMakePaymentResolved)throw r._report("pr.show_called_before_can_make_payment"),new _.No("You must first check the Payment Request API's availability using paymentRequest.canMakePayment() before calling show().");if(!r._activeBackingLibrary)throw r._report("pr.show_called_with_can_make_payment_false"),new _.No("Payment Request is not available in this browser.");"LINK"!==r._activeBackingLibraryName||r._initialOptions.__linkOnly||(r._usedByButtonElement||r._report("pr.show_called_with_link_custom_button"),!r._showCalledByButtonElement&&r._usedByButtonElement&&r._report("pr.show_called_with_link_hybrid_button"));var t=null;if("secondary"===r._lastClickedButtonPosition){if(!r._secondaryActiveBackingLibrary)throw Error('The relevant backing library for position "'.concat(r._lastClickedButtonPosition,'" was unavailable.'));t=r._secondaryActiveBackingLibrary}else t=r._activeBackingLibrary;var n=r._showCalledByButtonElement?"pr.show_from_element":"pr.show_from_custom";r._report(n),r._report("pr.show",{amount:null===(e=r._reportOnlyTotal)||void 0===e?void 0:e.amount,currency:r._reportOnlyCurrency,listeners:Object.keys(r._callbacks).sort()}),r._isShowing=!0,t.show({locale:r._locale})})),r.abort=(0,g.TC)((function(){if(r._activeBackingLibrary){var e=r._activeBackingLibrary;r._report("pr.abort"),e.abort()}})),r.isShowing=function(){return r._isShowing},r._controller=e.controller,r._authentication=e.authentication,r._listenerRegistry=e.listenerRegistry;var o=(0,m.Gu)((e.betas,(0,m.mC)({displayItems:(0,m.jt)((0,m.CT)(N)),shippingOptions:(0,m.jt)((0,m.uw)("id")((0,m.CT)(I))),wallets:(0,m.jt)((0,m.CT)(m.kw.apply(void 0,(0,b.Z)(E())))),disableWallets:(0,m.jt)((0,m.CT)(m.kw.apply(void 0,(0,b.Z)(E())))),blockedCardBrands:(0,m.jt)((0,m.CT)(m.kw.apply(void 0,(0,b.Z)(y.iw)))),total:A,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)(T),currency:m.cV,country:m.hN,jcbEnabled:(0,m.jt)(m.Xg),__billingDetailsEmailOverride:(0,m.jt)(m.Z_),__minApplePayVersion:(0,m.jt)(m.Rx),__minGooglePayVersion:(0,m.jt)(M),__merchantDetails:(0,m.jt)(R),__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),__isExpressCheckoutElement:(0,m.jt)(m.Xg),__betas:(0,m.jt)((0,m.CT)(m.z$.apply(void 0,(0,b.Z)(P.Lv)))),__supportsCouponCode:(0,m.jt)(m.Xg),__couponCode:(0,m.jt)(m.Z_)})),e.rawOptions||{},"paymentRequest()"),i=o.value,l=o.warnings;if(r._report("pr.options",{options:(0,f.ei)(i,["country","currency","jcbEnabled","requestPayerEmail","requestPayerName","requestPayerPhone","requestShipping","disableWallets","wallets","blockedCardBrands"])}),l.forEach((function(e){return r._warn(e)})),i.__billingDetailsEmailOverride&&i.requestPayerEmail)throw new _.No("When providing `__billingDetailsEmailOverride`, `requestPayerEmail` has to be `false` so that the customer is not prompted for their email in the payment sheet.");var p=E(),v=i.disableWallets,w=v?p.filter((function(e){return-1===v.indexOf(e)})):i.wallets;return e.queryStrategyOverride?r._queryStrategy=e.queryStrategyOverride:i.__linkOnly?r._queryStrategy=["LINK"]:r._queryStrategy=B(w||p),r._report("pr.query_strategy",{queryStrategy:r._queryStrategy}),r._initialOptions=(0,s.Z)((0,s.Z)({},i),{},{__betas:e.betas,wallets:w}),r._reportOnlyCurrency=i.currency,r._reportOnlyTotal=i.total,r._initBackingLibraries(r._initialOptions),r._controller._controllerFrame._on("stripe-user-credentials-update",(function(e){r._authentication={apiKey:e.publishableKey,accountId:e.stripeAccount},r._canMakePaymentResolved&&(r._canMakePaymentResolved=!1,r._controller.deferredCanMakePaymentResponse.resolve(null),r.canMakePayment())})),r}(0,l.Z)(t,e);var n=(0,p.Z)(t);return t}(v.Z),Te=Me},2920:function(e,t,n){"use strict";n.d(t,{Qt:function(){return u},VC:function(){return s},lU:function(){return a}});var r=n(6589),o=n(40),i=function(){try{return window.location.origin===window.top.location.origin}catch(e){return!1}},a=2,c=(0,o.HP)((function(e){return window.ApplePaySession.canMakePaymentsWithActiveCard(e)})),s=function(e){if(!window.ApplePaySession)return!1;try{return window.ApplePaySession.supportsVersion(e)}catch(e){return!1}},u=function(e,t,n,o){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:a,u=arguments.length>5?arguments[5]:void 0;if("https:"!==window.location.protocol)return r.J.resolve(!1);var l=Math.max(a,s);if(window.ApplePaySession){if(i()){if(window.ApplePaySession.supportsVersion(l)){var p=t?[e,t]:[e],d="merchant.".concat(p.join("."),".stripe");if(u)return c(d).then((function(r){if(o("pr.apple_pay.can_make_payment_native_response",{available:r,identifier:d}),n&&!r&&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. Visit https://dashboard.stripe.com/account/apple_pay to register this domain."))}return r}));var m=window.ApplePaySession.canMakePayments();if(n&&!m&&window.console){var f=t?"or stripeAccount parameter (".concat(t,") "):"";window.console.warn("The current domain (".concat(e,") ").concat(f,"is not registered for Apple Pay. Visit https://dashboard.stripe.com/account/apple_pay to register this domain."))}return r.J.resolve(m)}return n&&window.console&&window.console.warn("This version of Safari does not support ApplePay JS version ".concat(l,".")),r.J.resolve(!1)}return r.J.resolve(!1)}return r.J.resolve(!1)}},1164:function(e,t,n){"use strict";n.d(t,{ud:function(){return o},Nj:function(){return d},jR:function(){return p}});var r={ar:"ar",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",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",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="en",a=(Object.keys(r),r),c=n(9776),s=n(1765),u={"es-HN":"es-419","es-MX":"es-419","es-US":"es-419"},l=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 u[n]&&o.push(u[n]),n!==r&&o.push(r),o.push(i),o}catch(t){return[e,i]}},p=function(e){return function(e){for(var t=l(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",209:"elements-affirm-message",259:"elements-afterpay-clearpay-modal",404:"orders-outer",428:"payment-intent-outer-actions-cardimageverification",578:"elements-afterpay-clearpay-message",631:"elements-payment-method-messaging",870:"elements-payment-method-messaging-modal",895:"custom-checkout",913:"trusted-types-checker",944:"phone-numbers-lib"}[e]+"-"+{1:"629fecfbc037e31bdb204211a7f7c573",16:"f4f1ad526a5aba7c2ce079c48b6194f1",209:"ba0c2fbef245c29d4fce0d6db6a840d4",259:"6c5a65ce2672938c6dd1d7ab9123c3b1",404:"1f6bd5ac5cc2c7c7af5895a0be65715c",428:"dce6c58d9f23152c9ed222f2230da23a",578:"108fe7b09f59715aa7a9ea43ea4ed17b",631:"1bff01bc04467c26329379e2b309aed9",870:"bd32b04abc569ba8b6816c8e0503edb0",895:"2cc21adde996df0effc445176698fca1",913:"239db17d86d6320632b024ca9e43ba9c",944:"b7d461c3d08b0c66b6bc9e1f40673d30"}[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.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