!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;t0&&void 0!==arguments[0]?arguments[0]:{};if((null==r||null===(e=r.allowedCardBrands)||void 0===e?void 0:e.length)&&(null==r||null===(t=r.disallowedCardBrands)||void 0===t?void 0:t.length))throw new s.No("You cannot specify both disallowedCardBrands and allowedCardBrands. Please specify only one of those parameters.");if((null==r||null===(n=r.disallowedCardBrands)||void 0===n?void 0:n.length)===i.R5.length)throw new s.No("You cannot block all available card brands.")},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,o=e.layout;if(!o||"string"==typeof o)return[];var a=(0,c.mC)({layout:t?i.Ee:i.xl}),s=(0,c.Gu)(a,{layout:o},n),u=s.warnings,l=o,p=l.type;return"accordion"!==p&&(o.hasOwnProperty("spacedAccordionItems")&&(u=[].concat((0,r.Z)(u),["options.layout.spacedAccordionItems is only supported with the 'accordion' layout type."])),o.hasOwnProperty("radios")&&(u=[].concat((0,r.Z)(u),["options.layout.radios is only supported with the 'accordion' layout type."]))),u},y=function(e){var t,n;if((null===(t=e.defaultValues)||void 0===t?void 0:t.phone)&&"always"!==(null===(n=e.fields)||void 0===n?void 0:n.phone))throw new s.No("You cannot specify defaultValues.phone without setting fields.phone to always.")},v=function(e){var t,n,r,o,i;if(((null===(t=e.defaultValues)||void 0===t?void 0:t.firstName)||(null===(n=e.defaultValues)||void 0===n?void 0:n.lastName))&&(null===(r=e.display)||void 0===r?void 0:r.name)!==l.ZV)throw new s.No("You cannot specify defaultValues.firstName or defaultValues.lastName without setting display.name to split.");if((null===(o=e.display)||void 0===o?void 0:o.name)===l.ZV&&(null===(i=e.defaultValues)||void 0===i?void 0:i.name))throw new s.No("You cannot specify defaultValues.name when you have display.name set to split.")},g=function(e){var t=e.contacts,n=e.fields,r=e.validation;if(t){var o,i=(0,u.cx)(t,(function(e){return e.hasOwnProperty("phone")}));if(-1!==i)if("always"!==(null==n?void 0:n.phone)||"always"!==(null==r||null===(o=r.phone)||void 0===o?void 0:o.required))throw new s.No("You cannot specify contacts[".concat(i,"].phone without \n setting fields.phone to 'always' and validation.phone.required to 'always'. \n Phone options should only be 'always' when absolutely necessary."))}}},3852:function(e,t,n){"use strict";n.d(t,{E:function(){return o}});var r=n(7904),o=function(){var e=[];return{addEventListener:function(t,n,r,o){t.addEventListener(n,r,o),e.push([t,n,r,o])},removeEventListener:function(t,n,o,i){t.removeEventListener(n,o,i),e=e.filter((function(e){return function(e,t){var n=(0,r.Z)(e,4),o=n[0],i=n[1],a=n[2],c=n[3],s=(0,r.Z)(t,4),u=s[0],l=s[1],p=s[2],d=s[3];return u!==o||l!==i||p!==a||!0===("object"==typeof c&&c?c.capture:c)!=(!0===("object"==typeof d&&d?d.capture:d))}([t,n,o,i],e)}))}}}},1849:function(e,t,n){"use strict";n.d(t,{U:function(){return o},d:function(){return i}});var r=n(6589),o=function(e){return new r.J((function(t){var n=setTimeout((function(){t({type:"error",error:{code:"redirect_error",message:"Failed to redirect to ".concat(e)},locale:"en"})}),6e4);window.addEventListener("pagehide",(function(){clearTimeout(n)})),window.top.location.href=e}))},i=function(e,t,n){e.report("redirect_error",{initiator:t,error:n.error})}},6977:function(e,t,n){"use strict";n.d(t,{G2:function(){return d},LD:function(){return i},O3:function(){return l},PA:function(){return c},QS:function(){return a},RY:function(){return u},e3:function(){return s},mD:function(){return p}});var r=n(8489),o=n(1873),i=(n(276),"webauthn"),a="spc",c=function(e,t){switch(e.type){case"object":return{paymentIntent:e.object};case"error":var n=t?{payment_intent:t}:{};return{error:(0,r.Z)((0,r.Z)({},n),e.error)};default:return(0,o.Rz)(e)}},s=function(e,t){switch(e.type){case"error":return{error:(0,r.Z)((0,r.Z)({},t?{setup_intent:t}:{}),e.error)};case"object":return{setupIntent:e.object};default:return(0,o.Rz)(e)}},u=function(e){var t=e.trim().match(/^((seti|pi)_[^_]+)_secret_[^-]+$/);return t?"pi"===t[2]?{id:t[1],clientSecret:t[0],type:"PAYMENT_INTENT"}:{id:t[1],clientSecret:t[0],type:"SETUP_INTENT"}:null},l=function(e){return"payment_intent"===e.object?{id:e.id,clientSecret:e.client_secret,type:"PAYMENT_INTENT"}:{id:e.id,clientSecret:e.client_secret,type:"SETUP_INTENT"}},p=function(e){return"requires_source_action"===e||"requires_action"===e},d=function(e){return"requires_source_action"===e.status||"requires_action"===e.status?e.next_action:null}},2141:function(e,t,n){"use strict";n.d(t,{J$:function(){return r.J}});var r=n(4832)},4832:function(e,t,n){"use strict";n.d(t,{J:function(){return o}});var r={AE:"AE",AT:"AT",AU:"AU",BE:"BE",BG:"BG",BR:"BR",CA:"CA",CH:"CH",CI:"CI",CR:"CR",CY:"CY",CZ:"CZ",DE:"DE",DK:"DK",DO:"DO",EE:"EE",ES:"ES",FI:"FI",FR:"FR",GB:"GB",GI:"GI",GR:"GR",GT:"GT",HK:"HK",HR:"HR",HU:"HU",ID:"ID",IE:"IE",IN:"IN",IT:"IT",JP:"JP",LI:"LI",LT:"LT",LU:"LU",LV:"LV",MT:"MT",MX:"MX",MY:"MY",NL:"NL",NO:"NO",NZ:"NZ",PE:"PE",PH:"PH",PL:"PL",PT:"PT",RO:"RO",SE:"SE",SG:"SG",SI:"SI",SK:"SK",SN:"SN",TH:"TH",TT:"TT",US:"US",UY:"UY"},o=Object.keys(r)},1765:function(e,t,n){"use strict";n.d(t,{M4:function(){return c},MJ:function(){return s},P3:function(){return _},ub:function(){return m},Lv:function(){return u},uN:function(){return l},dZ:function(){return f},jk:function(){return h}});var r,o=n(3696),i=n(6617),a=n(1873),c={checkout_beta_2:"checkout_beta_2",checkout_beta_3:"checkout_beta_3",checkout_beta_4:"checkout_beta_4",checkout_beta_testcards:"checkout_beta_testcards",payment_intent_beta_1:"payment_intent_beta_1",payment_intent_beta_2:"payment_intent_beta_2",payment_intent_beta_3:"payment_intent_beta_3",google_pay_beta_1:"google_pay_beta_1",acss_debit_beta_1:"acss_debit_beta_1",acss_debit_beta_2:"acss_debit_beta_2",afterpay_clearpay_setup_intents_beta:"afterpay_clearpay_setup_intents_beta",bacs_debit_beta:"bacs_debit_beta",fpx_bank_beta_1:"fpx_bank_beta_1",ideal_pm_beta_1:"ideal_pm_beta_1",line_items_beta_1:"line_items_beta_1",mobilepay_pm_beta_1:"mobilepay_pm_beta_1",oxxo_pm_beta_1:"oxxo_pm_beta_1",paypal_pm_beta_1:"paypal_pm_beta_1",revolut_pay_pm_beta_1:"revolut_pay_pm_beta_1",sepa_pm_beta_1:"sepa_pm_beta_1",tax_product_beta_1:"tax_product_beta_1",wechat_pay_pm_beta_1:"wechat_pay_pm_beta_1",wechat_pay_pm_beta_2:"wechat_pay_pm_beta_2",wechat_pay_pm_beta_3:"wechat_pay_pm_beta_3",paynow_pm_beta_1:"paynow_pm_beta_1",checkout_beta_locales:"checkout_beta_locales",stripe_js_beta_locales:"stripe_js_beta_locales",upi_beta_1:"upi_beta_1",issuing_elements_1:"issuing_elements_1",issuing_elements_2:"issuing_elements_2",return_intents_beta_1:"return_intents_beta_1",netbanking_beta_1:"netbanking_beta_1",netbanking_bank_beta_1:"netbanking_bank_beta_1",instant_debits_beta_1:"instant_debits_beta_1",link_beta_1:"link_beta_1",link_beta_2:"link_beta_2",link_beta_3:"link_beta_3",link_default_integration_beta_1:"link_default_integration_beta_1",link_default_integration_beta_2:"link_default_integration_beta_2",link_suggest_email_domain_correction_1:"link_suggest_email_domain_correction_1",payment_element_beta_1:"payment_element_beta_1",elements_customers_beta_1:"elements_customers_beta_1",card_country_event_beta_1:"card_country_event_beta_1",id_bank_transfer_beta_1:"id_bank_transfer_beta_1",id_bank_transfer_beta_2:"id_bank_transfer_beta_2",us_bank_account_beta_2:"us_bank_account_beta_2",cup_apple_pay_beta_1:"cup_apple_pay_beta_1",nz_bank_account_beta_1:"nz_bank_account_beta_1",payment_element_apple_pay_beta_1:"payment_element_apple_pay_beta_1",link_autofill_modal_beta_1:"link_autofill_modal_beta_1",shipping_address_element_beta_1:"shipping_address_element_beta_1",address_element_beta_1:"address_element_beta_1",process_order_beta_1:"process_order_beta_1",server_side_confirmation_beta_1:"server_side_confirmation_beta_1",cart_beta_1:"cart_beta_1",pay_by_bank_beta_1:"pay_by_bank_beta_1",blocked_card_brands_beta_1:"blocked_card_brands_beta_1",qris_beta_1:"qris_beta_1",ume_beta_1:"ume_beta_1",networks_change_1:"networks_change_1",express_checkout_beta_1:"express_checkout_beta_1",link_in_prb_beta_1:"link_in_prb_beta_1",link_in_card_element_beta_1:"link_in_card_element_beta_1",payment_element_vertical_layout_beta_1:"payment_element_vertical_layout_beta_1",zip_beta_1:"zip_beta_1",cashapp_beta_1:"cashapp_beta_1",cartes_bancaires_apple_pay_beta_1:"cartes_bancaires_apple_pay_beta_1"},s=Object.freeze({netbankingBank:"netbanking_bank_beta_1",shippingAddress:["shipping_address_element_beta_1","link_beta_1","link_beta_2","link_beta_3"],address:"address_element_beta_1",cart:"cart_beta_1",unifiedMessage:"ume_beta_1",paymentMethodMessaging:"ume_beta_1",expressCheckout:"express_checkout_beta_1"}),u=Object.keys(c),l=function(e,t){return Array.isArray(t)?t.some((function(t){return e.indexOf(t)>-1})):e.indexOf(t)>-1},p=window.location.hash.substring(1).split("?")[0],d=(0,a.ld)((0,a.mC)({betas:(0,a.Wc)((0,a.CT)(a.kw.apply(void 0,(0,o.Z)(u))),(function(){return[]}))}),(0,i.vB)(p),"internal"),m="valid"===d.type?d.value.betas:[],f=function(e){var t=[],n=[];if(e&&e.forEach((function(e){u.indexOf(e)>-1?t.push(c[e]):n.push(e)})),n.length>0){var r="The following betas are unrecognized for Stripe() parameter:\n\n- ".concat(n.join("\n- "),"\n\n They are either invalid or expired betas, please remove these beta flags to prevent future integration issues.");return{validBetas:t,betaWarning:r}}return{validBetas:t}},_=[],h=(r=_,function(e,t){return l(t,c.stripe_js_beta_locales)||-1===r.indexOf(e)?e:"auto"})},4071:function(e,t,n){"use strict";n.d(t,{Ah:function(){return h},Bh:function(){return m},D$:function(){return C},D1:function(){return b},G9:function(){return k},Gx:function(){return T},JW:function(){return f},P0:function(){return d},PB:function(){return A},Wt:function(){return E},ZR:function(){return I},aS:function(){return P},cE:function(){return N},j3:function(){return S},q$:function(){return y},s$:function(){return g},sV:function(){return v},tS:function(){return _},x5:function(){return R},xz:function(){return w}});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){return/iPad|iPhone/i.test(e)&&!i(e)},s=function(e){return/Opera Mini/i.test(e)},u=function(e){return/^((?!chrome|android).)*safari/i.test(e)&&!a(e)},l=function(e){return/Android/i.test(e)&&!i(e)},p=window.navigator.userAgent,d=r(p),m=o(p),f=(/Edge\/((1[0-6]\.)|0\.)/i.test(p),i(p)),_=function(e){return/MSIE ([0-9]{1,}[.0-9]{0,})/i.test(e)}(p),h=c(p),y=(function(e){/iPad/i.test(e)&&i(e)}(p),function(e){return c(e)||l(e)}(p)),v=l(p),g=(function(e){/Android 4\./i.test(e)&&!/Chrome/i.test(e)&&l(e)}(p),u(p)),b=(function(e){u(e)&&c(e)}(p),function(e){return/Firefox\//i.test(e)}(p)),w=(function(e){/Firefox\/(50|51|[0-4]?\d)([^\d]|$)/i.test(e)}(p),a(p)),k=function(e){return/Chrome\//i.test(e)}(p),E=(function(e){/Chrome\/(6[6-9]|[7-9]\d+|[1-9]\d{2,})/i.test(e)}(p),function(e){return/AppleWebKit/i.test(e)&&!/Chrome/i.test(e)&&!r(e)&&!i(e)}(p)),S=function(e){return/Chrome/i.test(e)&&!r(e)}(p),P=(function(e){/CriOS/i.test(e)}(p),function(e){return/FxiOS/i.test(e)}(p)),A=function(e){return/EdgiOS/i.test(e)}(p),C=function(e){return/\belectron\b/i.test(e)}(p),N=s(p),I=function(e){return/Macintosh.*AppleWebKit(?!.*Safari)/i.test(e)}(p),T=g&&"download"in document.createElement("a"),M=(!!window.navigator.brave&&window.navigator.brave.isBrave,window.navigator&&"standalone"in window.navigator&&window.navigator.standalone),R=function(e){return/(iPhone|iPod|iPad).*AppleWebKit((?!.*Safari)|(.*\([^)]*like[^)]*Safari[^)]*\)))/i.test(e)}(p)||function(e){return l(e)&&/wv|Version\/\d+\.\d+/.test(e)&&!s(e)}(p)||function(e){return/FBAN/.test(e)||/FBAV/.test(e)}(p)||M},9294:function(e,t,n){"use strict";n.d(t,{Ah:function(){return r.Ah},Bh:function(){return r.Bh},D$:function(){return r.D$},D1:function(){return r.D1},G9:function(){return r.G9},Gx:function(){return r.Gx},JW:function(){return r.JW},P0:function(){return r.P0},PB:function(){return r.PB},UT:function(){return o.U},Wt:function(){return r.Wt},ZR:function(){return r.ZR},aS:function(){return r.aS},cE:function(){return r.cE},j3:function(){return r.j3},q$:function(){return r.q$},s$:function(){return r.s$},sV:function(){return r.sV},tS:function(){return r.tS},x5:function(){return r.x5},xz:function(){return r.xz}});var r=n(4071),o=n(5395)},5395:function(e,t,n){"use strict";n.d(t,{U:function(){return r}});var r=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 f},G:function(){return i},PM:function(){return g},TS:function(){return v},VO:function(){return l},Xy:function(){return u},cx:function(){return c},dq:function(){return p},ei:function(){return m},qk:function(){return d},sE:function(){return a}});var r=n(9043),o=n(6589),i=function(e,t){for(var n=-1,r=null==e?0:e.length;++n0&&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%"}},133:function(e,t,n){"use strict";n.d(t,{W3:function(){return u},dh:function(){return c},gl:function(){return s}});var r=n(4245),o=n(2024),i=n(8357),a=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=(0,i.D)(e),a=r.width>0&&r.height>0&&o&&"hidden"!==o.getPropertyValue("visibility");return n&&a}))},c=function(e,t){var n=a();return n[(0,o.cx)(n,(function(t){return t===e||e.contains(t)}))+("previous"===t?-1:1)]},s=function(e,t){return e.then((function(){return(0,o.qk)(t,(function(e){var t=e.element,n=e.tabIndex;""===n?t.removeAttribute("tabindex"):t.setAttribute("tabindex",n)}))}))},u=function(e){var t=[],n=(0,o.qk)(document.querySelectorAll("*"),(function(n){var r=n.getAttribute("tabindex")||"";e!==n&&(n.tabIndex=-1),t.push({element:n,tabIndex:r})})),i=(0,r.$M)((function(){s(n,t)}));return{lockedPromise:n,lockedElements:t,restoreFocus:i}}},7855:function(e,t,n){"use strict";n(6617),n(3534)},8357:function(e,t,n){"use strict";n.d(t,{D:function(){return r}});var r=function(e,t){return e?window.getComputedStyle(e,t):null}},3534:function(e,t,n){"use strict";n.d(t,{Hb:function(){return u},Ql:function(){return p},SV:function(){return s},Xq:function(){return l},mb:function(){return i},qW:function(){return f},yq:function(){return a}});var r=n(7904),o=n(8812),i=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(" ")},a=function(e,t){e.style.cssText=Object.keys(t).map((function(e){return"".concat(e,": ").concat(t[e]," !important;")})).join(" ")},c={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"},s=function(e){a(e,c)},u=function(e){try{return window.parent.frames[e]}catch(e){return null}},l=function(){if(!document.body)throw new o.No("Stripe.js requires that your page has a element.");return document.body},p=function(e){return setTimeout(e,16)},d=function(e,t){return!!e.documentElement&&e.documentElement.contains(t)},m="isConnected"in window.Node.prototype?function(e,t){return t.isConnected&&t.ownerDocument===e}:d,f=function(e,t){return!d(e,t)&&m(e,t)}},1002:function(e,t,n){"use strict";n.d(t,{BO:function(){return u.BO},Dx:function(){return i.D},Hb:function(){return a.Hb},MV:function(){return s.M},Ql:function(){return a.Ql},SV:function(){return a.SV},Tf:function(){return r.Tf},W3:function(){return o.W3},Xq:function(){return a.Xq},a0:function(){return c.a},dh:function(){return o.dh},gl:function(){return o.gl},mb:function(){return a.mb},qW:function(){return a.qW},xc:function(){return u.xc},xz:function(){return u.xz},yq:function(){return a.yq}});var r=n(9608),o=n(133),i=(n(7855),n(8357)),a=n(3534),c=n(877),s=n(3765),u=n(5784)},877:function(e,t,n){"use strict";n.d(t,{a:function(){return o}});var r=["button","checkbox","file","hidden","image","submit","radio","reset"],o=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===r.indexOf(n)}},3765:function(e,t,n){"use strict";n.d(t,{M:function(){return i}});var r=n(4245),o=n(3534),i=function(){var e=(0,o.Xq)(),t=e.style.overflow;e.style.overflow="hidden";var n={passive:!1},i=function(e){return e.preventDefault()},a=function(){};return window.addEventListener("touchmove",a,n),e.addEventListener("touchstart",a,n),e.addEventListener("touchmove",i,n),(0,r.$M)((function(){e.style.overflow=t||"",window.removeEventListener("touchmove",a,n),e.removeEventListener("touchstart",a,n),e.removeEventListener("touchmove",i,n)}))}},5784:function(e,t,n){"use strict";n.d(t,{BO:function(){return i},xc:function(){return a},xz:function(){return r}});var r=function(){var e=document.querySelectorAll("meta[name=viewport][content]"),t=e[e.length-1];return t&&t instanceof HTMLMetaElement?t.content:""},o=function(e){return r().match(e)},i=function(e){o("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')},a=function(e){o("minimum-scale=1")||e('The Financial Connections authentication flow requires "minimum-scale=1" to be set in your page\'s viewport meta tag.')}},4086:function(e,t,n){"use strict";n.d(t,{k:function(){return a}});var r=n(7853),o=n(1020),i=n(8992),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(4909).Z)(Error))},3973:function(e,t,n){"use strict";n.d(t,{N:function(){return c}});var r=n(7853),o=n(6148),i=n(1020),a=n(8992),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(4909).Z)(Error))},8102:function(e,t,n){"use strict";var r=n(7853),o=n(1020),i=n(8992);Error},51:function(e,t,n){"use strict";n.d(t,{F:function(){return a}});var r=n(7853),o=n(1020),i=n(8992),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(4909).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(8489),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,_=new XMLHttpRequest;u&&(_.withCredentials=u),_.open(o,d,!0),_.setRequestHeader("Accept","application/json"),_.setRequestHeader("Content-Type",f),_.json=function(){return new i.J((function(e,t){try{e(JSON.parse(_.responseText))}catch(e){t(new a.kp(e,d))}}))},s&&Object.keys(s).forEach((function(e){var t=s[e];"string"==typeof t&&_.setRequestHeader(e,t)})),_.onreadystatechange=function(){4===_.readyState&&(_.onreadystatechange=function(){},0===_.status?u?n(new a.F7(d)):l((0,r.Z)((0,r.Z)({},e),{},{withCredentials:!0})).then(t,n):t(_))};try{_.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,_=c(t),h=_.requestUrl,y=_.requestData,v={Accept:"application/json","Content-Type":_.contentType};l&&Object.keys(l).forEach((function(e){var t=l[e];"string"==typeof t&&(v[e]=t)})),window.fetch(h,{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(h))}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,h))}))}))},l=function(e){return"function"==typeof window.fetch?u(e):s(e)}},2445:function(e,t,n){"use strict";n.d(t,{N:function(){return r}});var r={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",UNIFIED_MESSAGE_MODAL_ELEMENT:"UNIFIED_MESSAGE_MODAL_ELEMENT",AUTOCOMPLETE_SUGGESTIONS_ELEMENT:"AUTOCOMPLETE_SUGGESTIONS_ELEMENT",ACH_BANK_SEARCH_RESULTS_ELEMENT:"ACH_BANK_SEARCH_RESULTS_ELEMENT",INSTANT_DEBITS_APP:"INSTANT_DEBITS_APP",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",EXPRESS_CHECKOUT_ELEMENT:"EXPRESS_CHECKOUT_ELEMENT",BUY_BUTTON_APP:"BUY_BUTTON_APP",LINK_BUTTON_FOR_CARD_ELEMENT:"LINK_BUTTON_FOR_CARD_ELEMENT"}},262:function(e,t,n){"use strict";n.d(t,{i:function(){return i}});var r=n(9294),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}},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-1904aa36066b56e54e00d52bdbb698b7.html");case"CONTROLLER":return(0,o.x)("controller-3ddf438ede85ca16a571a8e0c21b22db.html");case"METRICS_CONTROLLER":return(0,o.x)("m-outer-3437aaddcdf6922d623e172c2d6f9278.html");case"PAYMENT_REQUEST_ELEMENT":return(0,o.x)("elements-inner-payment-request-856bedb9a0e3f5025ab1f88bacfe2970.html");case"PAYMENT_REQUEST_BROWSER":return(0,o.x)("payment-request-inner-browser-c8e41b3c430d19cbc930fbb4395a1de2.html");case"PAYMENT_REQUEST_GOOGLE_PAY":return(0,o.x)("payment-request-inner-google-pay-112f1df633bd8537475e8af1305c3363.html");case"IBAN_ELEMENT":return(0,o.x)("elements-inner-iban-e3064d3379b913e159a10ff1837a2f6a.html");case"IDEAL_BANK_ELEMENT":return(0,o.x)("elements-inner-ideal-bank-2273d4f60b4482870a064863824dc3e8.html");case"P24_BANK_ELEMENT":return(0,o.x)("elements-inner-p24-bank-29f635b8955f198a0afd121a066ef936.html");case"AUTHORIZE_WITH_URL":return(0,o.x)("authorize-with-url-inner-d1c499ed549b453f27a42bc1c8f3079c.html");case"STRIPE_3DS2_CHALLENGE":return(0,o.x)("three-ds-2-challenge-ee8a4cd4a838a767367513e29713bfd9.html");case"STRIPE_3DS2_FINGERPRINT":return(0,o.x)("three-ds-2-fingerprint-96c3e9b164c8ba5b6a476f9071a8a0da.html");case"AU_BANK_ACCOUNT_ELEMENT":return(0,o.x)("elements-inner-au-bank-account-b9d524b5e6cb73312fbce7ceae8a5201.html");case"FPX_BANK_ELEMENT":return(0,o.x)("elements-inner-fpx-bank-54e8526e996a067fe9a6ea778a781348.html");case"LIGHTBOX_APP":return(0,o.x)("lightbox-inner-a2d8cecdb02dcd40e8eadbb24bbd287c.html");case"ISSUING_CARD_NUMBER_DISPLAY_ELEMENT":return(0,o.x)("elements-inner-issuing-card-number-display-908e0a9479000274806b9ca063cc9489.html");case"ISSUING_CARD_COPY_BUTTON_ELEMENT":return(0,o.x)("elements-inner-issuing-card-copy-button-a85fc0fab982fa0fa5dbe4a2b885dfd8.html");case"ISSUING_CARD_CVC_DISPLAY_ELEMENT":return(0,o.x)("elements-inner-issuing-card-cvc-display-2edd0ecfdbd8d3f1c3a334cd8e7f9ccf.html");case"ISSUING_CARD_EXPIRY_DISPLAY_ELEMENT":return(0,o.x)("elements-inner-issuing-card-expiry-display-30be21b71b3d9c93f7009547063e68c7.html");case"ISSUING_CARD_PIN_DISPLAY_ELEMENT":return(0,o.x)("elements-inner-issuing-card-pin-display-88d5a0140fc5f45b40406cd0231f94c4.html");case"EPS_BANK_ELEMENT":return(0,o.x)("elements-inner-eps-bank-0283902a50759ed41de327046c3a54db.html");case"HCAPTCHA_APP":return(0,o.x)("hcaptcha-inner-ab6235a36ab722b480e14f2a1d362243.html");case"NETBANKING_BANK_ELEMENT":return(0,o.x)("elements-inner-netbanking-bank-57b53a80f73dcd738b71133ce3446db3.html");case"AFFIRM_MESSAGE_ELEMENT":return(0,o.x)("elements-inner-affirm-message-08018b367185813e3531ded5a12fd4e9.html");case"AFFIRM_MESSAGE_MODAL_ELEMENT":return(0,o.x)("elements-inner-affirm-message-modal-4daf0b3a30f1ff8d77a5a26b6b6dac00.html");case"AFTERPAY_MESSAGE_MODAL_ELEMENT":return(0,o.x)("elements-inner-afterpay-message-modal-f668ce6599dbbe35ed3dc9aedf1ca6da.html");case"UNIFIED_MESSAGE_MODAL_ELEMENT":return(0,o.x)("elements-inner-unified-message-modal-24fc7d8d9700fe1ba2c32cf3ee6448c3.html");case"INSTANT_DEBITS_APP":return(0,o.x)("instant-debits-app-13756d429438f4d0087c005839ab7bc5.html");case"LINK_AUTHENTICATION_ELEMENT":return(0,o.x)("elements-inner-authentication-7160d50d75c0eb34b6da600904d128f3.html");case"PAYMENT_ELEMENT":return(0,o.x)("elements-inner-payment-4a8ff748404787a086bf8aebcf12814d.html");case"LINKED_ACCOUNTS_INNER":return(0,o.x)("linked-accounts-inner-137216a7ce30b21d1a0b53085940d7f1.html");case"WECHAT_PAY_INNER":return(0,o.x)("wechat-pay-inner-98577e3e5d7887d5b8a6d8b9a8e31733.html");case"PAYNOW_INNER":return(0,o.x)("paynow-inner-d277eedab5df4c6e43f24a4a65711dcf.html");case"BLIK_INNER":return(0,o.x)("blik-inner-d65f0b1adff88cfa415260f765a474f3.html");case"PIX_INNER":case"PROMPTPAY_INNER":case"BACS_CONFIRMATION_INNER":return(0,o.x)("");case"ADDRESS_ELEMENT":return(0,o.x)("elements-inner-address-654eddf245737fc3de8a519f655ddfd9.html");case"LINK_AUTOFILL_MODAL":return(0,o.x)("link-autofill-modal-inner-3f4d6f196a2a18a8f102b79be213fd04.html");case"GOOGLE_MAPS_APP":return(0,o.x)("google-maps-inner-d3d8d84d7328698996f27db8bffef1e4.html");case"AUTOCOMPLETE_SUGGESTIONS_ELEMENT":return(0,o.x)("elements-inner-autocomplete-suggestions-74f35e5473ebec4cfdc73a6525cdffc6.html");case"ACH_BANK_SEARCH_RESULTS_ELEMENT":return(0,o.x)("elements-inner-ach-bank-search-results-6bf35f2965532821e1dc1de7507e53da.html");case"LINK_INFO_MODAL":return(0,o.x)("elements-inner-link-info-modal-e88c5512f9f382c057d70e94c9da5e40.html");case"LOADER_UI_APP":return(0,o.x)("elements-inner-loader-ui-9bf5ffb9ae231dcaca65ecb9a60eefd9.html");case"CART_ELEMENT":return(0,o.x)("elements-inner-cart-5eaf38f95db09d98eeb777e9c7993415.html");case"BACS_MANDATE_CONFIRMATION_APP":return(0,o.x)("bacs-mandate-confirmation-inner-9ebc656cd9afe23ff44cb0c28ed17431.html");case"EXPRESS_CHECKOUT_ELEMENT":return(0,o.x)("elements-inner-express-checkout-29002bf9ce7d85ddb6c9bffb2687ddfb.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-6818df9608c2e8ed83cfdf10ecf46955.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||"")}},755:function(e,t,n){"use strict";n.d(t,{$G:function(){return a.$},NC:function(){return o.N},i7:function(){return r.i},jr:function(){return c.j},oi:function(){return a.o},xS:function(){return i.x}});var r=n(262),o=n(2445),i=n(97),a=n(5311),c=n(6810)},5311:function(e,t,n){"use strict";n.d(t,{$:function(){return c},o:function(){return a}});var r=n(8489),o=(n(1873),n(276)),i=n(1002),a=function(e){var t,n=e.controllerId,a=e.frameId,c=e.targetOrigin,s=e.type,u=c;if("controller"===s?t=(0,i.Hb)(a):"group"===s?t=(0,i.Hb)(n):"outer"===s||"hosted"===s?t=window.frames[a]:"inner"===s&&(u=u||"*",t=window.parent),u=u||o.jQ,t&&"function"==typeof t.postMessage){var l=e.message.delegate?{targetOrigin:u,delegate:e.message.delegate}:u;t.postMessage(JSON.stringify((0,r.Z)((0,r.Z)({},e),{},{__stripeJsV3:!0})),l)}},c=function(e){try{var t="string"==typeof e?JSON.parse(e):e;return t.__stripeJsV3?t:null}catch(e){return null}}},6810:function(e,t,n){"use strict";n.d(t,{j:function(){return r}});n(276);var r=function(e){return e}},8148:function(e,t,n){"use strict";n.d(t,{i3:function(){return r}});var r=function(e){return e.replace(/_./g,(function(e){return e[1].toUpperCase()}))}},9617:function(e,t,n){"use strict";n.d(t,{$M:function(){return a},AO:function(){return i},HP:function(){return o}});var r=n(8812),o=(n(6589),function(e){var t={},n={};return function(r){var o="_".concat(r);if("string"==typeof r&&void 0!==t[o])return t[o];if("number"==typeof r&&void 0!==n[o])return n[o];var i=e(r);return"string"==typeof r&&(t[o]=i),"number"==typeof r&&(n[o]=i),i}}),i=function(e,t){var n=!1;return function(){if(n)throw new r.No(t);n=!0;try{return e.apply(void 0,arguments).then((function(e){return n=!1,e}),(function(e){throw n=!1,e}))}catch(e){throw n=!1,e}}},a=function(e){var t=e;return function(){t&&(t.apply(void 0,arguments),t=null)}}},6940:function(e,t,n){"use strict";n(6589)},4245:function(e,t,n){"use strict";n.d(t,{$M:function(){return r.$M},AO:function(){return r.AO},HP:function(){return r.HP},i3:function(){return i.i3},tN:function(){return o.t}});var r=n(9617),o=(n(807),n(6103)),i=(n(9220),n(6940),n(8148))},807:function(e,t,n){"use strict";n(6589)},6103:function(e,t,n){"use strict";n.d(t,{t:function(){return o}});var r=n(6589),o=function(e,t){return e.reduce((function(e,n){return e.then((function(e){return"SATISFIED"===e.type?e:n().then((function(e){return t(e)?{type:"SATISFIED",value:e}:{type:"UNSATISFIED"}}))}))}),r.J.resolve({type:"UNSATISFIED"}))}},9220:function(e,t,n){"use strict";n(6589)},9803:function(e,t,n){"use strict";n.d(t,{T:function(){return i},V: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)}},7412:function(e,t,n){"use strict";n.d(t,{To:function(){return r.T},Vj:function(){return r.V}});var r=n(9803)},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/^pk_test_/.test(e)?o.test:/^pk_live_/.test(e)?o.live: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.")}}},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(6222),i=n(276),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",three_d_secure:"three_d_secure",upi:"upi",us_bank_account:"us_bank_account",wechat_pay:"wechat_pay",paynow:"paynow",pix:"pix",promptpay:"promptpay",qris:"qris",revolut_pay:"revolut_pay",netbanking:"netbanking",id_bank_transfer:"id_bank_transfer",link:"link",apple_pay:"apple_pay",google_pay:"google_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 i}});var r=n(1803),o=n.n(r),i=(n(8029),window.Promise?Promise:o())},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,"_"))}},9792:function(e,t,n){"use strict";n.d(t,{E:function(){return s}});var r=n(7853),o=n(4531),i=Date.now?function(){return Date.now()}:function(){return(new Date).getTime()},a=i(),c=window.performance&&window.performance.now?function(){return window.performance.now()}:function(){return i()-a},s=function(){function e(t){(0,r.Z)(this,e),this.timestampValue=null!=t?t:c()}return(0,o.Z)(e,[{key:"getAsPosixTime",value:function(){return i()-this.getElapsedTime()}},{key:"getElapsedTime",value:function(e){return Math.round((e?e.timestampValue:c())-this.timestampValue)}},{key:"valueOf",value:function(){return Math.round(this.timestampValue)}}],[{key:"fromPosixTime",value:function(t){return new e(t-i()+c())}}]),e}()},1216:function(e,t,n){"use strict";var r=(0,n(6617).Ds)("https://payments.stripe.com");r&&r.origin},7600:function(e,t,n){"use strict";n.d(t,{v:function(){return o}});var r=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o=function(e){var t={};return e.replace(/\+/g," ").split("&").forEach((function(e){var n,o=e.split("="),i=decodeURIComponent(o[0]),a=t,c=0,s=i.split("]["),u=s.length-1;if(/\[/.test(s[0])&&/\]$/.test(s[u])?(s[u]=s[u].replace(/\]$/,""),u=(s=s.shift().split("[").concat(s)).length-1):u=0,!(s.indexOf("__proto__")>=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]=c1&&void 0!==arguments[1]?arguments[1]:"absurd";throw new Error(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={clientSecret:(0,r.jt)((0,r.mC)({id:r.Z_,clientSecret:r.Z_,type:r.Z_}))},s=(0,r.mC)(c),u={_elements:(0,r.CT)(i),_id:r.Z_,_commonOptions:s},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 i.$3},AG:function(){return i.AG},Ao:function(){return i.Ao},Bi:function(){return i.Bi},CT:function(){return i.CT},Gu:function(){return i.Gu},HM:function(){return i.HM},IN:function(){return o.IN},M2:function(){return i.M2},M4:function(){return i.M4},MO:function(){return o.MO},MZ:function(){return i.MZ},NM:function(){return i.NM},NQ:function(){return i.NQ},RH:function(){return i.RH},Rx:function(){return i.Rx},Ry:function(){return i.Ry},Rz:function(){return r.R},Wc:function(){return i.Wc},Xg:function(){return i.Xg},Z_:function(){return i.Z_},cV:function(){return i.cV},ci:function(){return i.ci},hN:function(){return i.hN},jt:function(){return i.jt},kw:function(){return i.kw},ld:function(){return i.ld},mC:function(){return i.mC},n2:function(){return i.n2},oQ:function(){return o.oQ},or:function(){return i.or},p3:function(){return i.p3},rS:function(){return i.rS},rX:function(){return o.rX},ui:function(){return i.ui},uw:function(){return i.uw},x4:function(){return i.x4},xe:function(){return i.xe},yv:function(){return i.yv},z$:function(){return i.z$},zS:function(){return i.zS}});var r=n(2580),o=n(9605),i=n(7974)},7974:function(e,t,n){"use strict";n.d(t,{$3:function(){return h},AG:function(){return g},Ao:function(){return d},Bi:function(){return B},CT:function(){return U},Gu:function(){return V},HM:function(){return T},M2:function(){return x},M4:function(){return Z},MZ:function(){return q},NM:function(){return z},NQ:function(){return y},RH:function(){return _},Rx:function(){return j},Ry:function(){return F},Wc:function(){return M},Xg:function(){return R},Z_:function(){return I},cV:function(){return N},ci:function(){return K},hN:function(){return C},jt:function(){return v},kw:function(){return P},ld:function(){return W},mC:function(){return J},n2:function(){return w},or:function(){return b},p3:function(){return L},rS:function(){return O},ui:function(){return S},uw:function(){return G},x4:function(){return m},xe:function(){return E},yv:function(){return Y},z$:function(){return A},zS:function(){return f}});var r=n(6222),o=n(3696),i=n(8489),a=n(8812),c=n(2024),s=n(6241),u=n(2141),l=n(9620),p=(n(6617),n(2580)),d=function(e,t,n){var r=n.path.reduce((function(e,t,n){return 0===n?t:0===t.indexOf(".")?"".concat(e,'["').concat(t,'"]'):"".concat(e,".").concat(t)}),"");return"undefined"===t?"Missing value for ".concat(n.label,": ").concat(r||"value"," should be ").concat(e,"."):"Invalid value for ".concat(n.label,": ").concat(r||"value"," should be ").concat(e,". You specified: ").concat(t,".")},m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return{type:"valid",value:e,warnings:t}},f=function(e){return{error:e,errorType:"full",type:"error"}},_=function(e,t,n){var r=new a.No(d(e,t,n));return f(r)},h=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,_=d.actual;return i(r.label,l===m?l:"".concat(l," or ").concat(m),p===_?p:"".concat(p," and ").concat(_))}if("mismatch"===c.errorType){var h=o(c),y=h.error,v=h.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):h("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 h(i,n,r)}return m(o)}},E=function(e){return function(t,n){return"string"==typeof t&&0===t.indexOf(e)?m(t):h("a string starting with ".concat(e),t,n)}},S=function(e,t){return function(n,r){return"string"==typeof n&&n.length>=e&&n.length<=t?m(n):h(e===t?"a string of ".concat(e," characters"):"a string with ".concat(e," to ").concat(t," characters"),n,r)}},P=function(){for(var e=arguments.length,t=new Array(e),n=0;n=e&&o<=t?m(o):h("a number from ".concat(e," to ").concat(t),n,r)}},Z=function(e){return function(t,n){return"number"==typeof t&&t>e?m(t):h("a number greater than ".concat(e),t,n)}},x=function(e){return function(t,n){return"number"==typeof t&&t>=e?m(t):h("a number greater than or equal to ".concat(e),t,n)}},L=function(e,t){return function(n,r){return n===e?m(e):h(t||String(e),n,r)}},D=function(e){return function(t,n){return"number"==typeof t&&t===parseInt(t,10)&&(!e||t>=0)?m(t):h(e?"a positive amount in the currency's subunit":"an amount in the currency's subunit",t,n)}},B=function(e,t){return D(!1)(e,t)},q=function(e,t){return D(!0)(e,t)},F=function(e,t){return e&&"object"==typeof e?m(e):h("an object",e,t)},U=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([])):h("array",t,n)}},G=function(e){return function(t){return function(n,r){if(Array.isArray(n)){var o=t(n,r);if("valid"===o.type)for(var i={},c=0;c0){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,_="payment_intent"===l.object?{paymentIntent:l}:{setupIntent:l};return new i.J((function(e){setTimeout((function(){var t=setInterval((function(){if(!f())return e(_),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){_=s(n),n.error?(u.action.localizeError(c.I4).then((function(e){return{error:e}})).then(e),clearInterval(t)):r(n.object)&&(e(_),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(755),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,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))}))}))}},6790:function(e,t,n){"use strict";n.d(t,{e:function(){return a},k:function(){return i}});var r=n(1849),o=n(6977),i=function(e,t,n){return(0,r.U)(t).then((function(t){return(0,r.d)(n,"next_action redirect",t),(0,o.PA)(t,e)}))},a=function(e,t,n){return(0,r.U)(t).then((function(t){return(0,r.d)(n,"next_action redirect",t),(0,o.e3)(t,e)}))}},122:function(e,t,n){"use strict";n.d(t,{s:function(){return l}});var r=n(7904),o=n(8489),i=n(1002),a=n(755),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,_=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 _.show(),l.report("authorize_with_url.loading",{viewport:m,intentId:t.id}),_._on("load",(function(){l.report("authorize_with_url.loaded",{loadDuration:f.getElapsedTime(),intentId:t.id}),_.fadeInBackdrop()})),_._on("challenge_complete",(function(){_.fadeOutBackdrop()})),new c.J((function(o){var i=e.source;i&&_._once("cancel",(function(){c.J.all([(0,s.$o)(t,n,l,i,p),_.destroy()]).then((function(e){var t=(0,r.Z)(e,1)[0];return o(t)}))})),_._once("authorize_with_url_done",(function(){var e=_.destroy();(0,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 F}});var r=n(7904),o=n(6589),i=n(1873),a=n(9792),c=n(8489),s=n(508),u=n(755),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-977ef6f7b66691cbe1efbbe533ab4985.html")})).then((function(){i._off("cancel",a),t()}))}))}))},d=n(5326),m=n(6222),f=function(e){if(!e||"object"!=typeof e||!e.type&&!e.code)return e;var t=function(t){return e[t]&&"string"==typeof e[t]?(0,m.Z)({},"".concat(t,"_id"),e[t]):e[t]&&"object"==typeof e[t]&&"string"==typeof e[t].id?(0,m.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,d.NO)(r,o,i,a,n)},h=function(e,t){var n=t.controller,r=t.intentSecret,o=t.intentType,i=t.locale;return(0,d.$o)(r,o,n,e.threeDS2Source,i,e.threeDS2Intent,e.publishableKey)},y=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:f(t.error),success:!1}:{success:!0})),t}))},v=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},g=function(e,t){var n=t.intentSecret,r=t.controller,i=t.hosted;return e.optimizations.skipFingerprint?o.J.resolve({fingerprintAttempted:!1,fingerprintData:null}):""===e.methodUrl?(r.report("3ds2.fingerprint.no_method_url",{hosted:i,intentId:n.id}),o.J.resolve({fingerprintAttempted:!1,fingerprintData:null})):v(t).then((function(t){return t.action.perform3DS2Fingerprint({threeDS2Source:e.threeDS2Source,merchant:e.merchant,transactionId:e.transactionId,methodUrl:e.methodUrl,shouldSandbox:e.optimizations.sandboxFingerprintFrame}).then((function(e){return t.destroy(),e}))}))},b=n(9294),w=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}))},k=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);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",S="W",P="S",A="SE/WA",C=function(e){return btoa(String.fromCharCode.apply(null,new Uint8Array(e))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},N=function(e){return atob(e.replace(/-/g,"+").replace(/_/g,"/"))},I=function(e){var t=N(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," ")))}),M=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)}},R=n(7412),j=n(6977),O=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});if(!i)return l;var p,d=i.credentials.filter((function(e){return e.type===j.QS}));if(0===d.length)return a.report("one_click_authn.request_spc_authn.empty_credentials_list",{client_id:E,source:r,device_support:s}),l;try{var m=i.merchant.origin;if(!m)return a.report("one_click_authn.request_spc_authn.empty_merchant_origin",{client_id:E,source:r,device_support:s}),l;(p=document.createElement("meta")).name=(0,R.To)("__privateStripeMeta"),p.httpEquiv="origin-trial",p.content="A9jhYwXRO3NPiLnZACCEXhtcpa/gzahH22dbcaOg/v0c8pngXUXu3XXoUzfa6LUumuJiS12jQS7azQx3rZdh8ggAAAB6eyJvcmlnaW4iOiJodHRwczovL2pzLnN0cmlwZS5jb206NDQzIiwiZmVhdHVyZSI6IlNlY3VyZVBheW1lbnRDb25maXJtYXRpb25PcHRPdXQiLCJleHBpcnkiOjE2NzU4MTQzOTksImlzVGhpcmRQYXJ0eSI6dHJ1ZX0=",document.head.appendChild(p);var f=new window.PaymentRequest(function(e,t,n){var r=n.authenticationChallenge,o=n.instrument,i=o.cardBrand,a=o.cardName,c=o.cardLast4,s=n.merchant;return[{supportedMethods:"secure-payment-confirmation",data:{action:"authenticate",rpId:"stripe.com",credentialIds:e.map((function(e){return I(e.id)})),challenge:I(r),timeout:6e4,fallbackUrl:window.location.toString(),instrument:{displayName:"".concat(a," ····").concat(c),icon:M(i)},payeeOrigin:t,payeeName:s.name,showOptOut:!0}}]}(d,m,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}),f.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:j.QS,assertion:(t=e.details,{type:"public-key",id:t.id,raw_id:t.id,response:{authenticator_data:C(t.response.authenticatorData),client_data_json:C(t.response.clientDataJSON),signature:C(t.response.signature)}}),payment_data:{merchant_data:{merchant_origin:m,total:i.amount},network_data:i.authenticationChallenge}},optedOut:!1}})).catch((function(e){if(function(e){return"AbortError"===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});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)}),l}))}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 l},Z=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=function(e){var t=e.spcEligible,n=e.configurationType;return t&&(n===P||n===A)}(i)?j.QS:j.LD,p=s.credentials.filter((function(e){return e.type===l}));return 0===p.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:p};return r.action.performOneClickWebauthnAuthentication({threeDS2Source:e.threeDS2Source,cardBrand:e.cardBrand,appUrl:(0,u.xS)("one-click-webauthn-authentication-50a8fedc1205cfc8a52beb2a7a5df499.html"),deviceSupport:i,payload:a,startPosixTime:c.getAsPosixTime()}).then((function(e){r._off("cancel",o),t(e)}))}))}))},x=function(e,t){var n=e.threeDS2Source,r=e.oneClickAuthn,o=t.controller;if(!r)return null;var i=b.s$?"safari":b.D1?"firefox":b.P0||b.Bh?"edge":b.G9?b.sV?"chrome_android":/Chrome\/10[4-9]/.test(window.navigator.userAgent)?"chrome_in_opt_out_trial":"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(N(r.configuration)).get(i)){case S:return S;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}},D=function(){var e=document.featurePolicy;if(!e)return!1;try{return-1!==e.allowedFeatures().indexOf("publickey-credentials-get")}catch(e){return!1}},B=function(e,t){return o.J.all([k(),w()]).then((function(n){var o=(0,r.Z)(n,2),i=o[0],a=o[1];return{sameOriginFrame:L(),spcEligible:i,webauthnEligible:a,publickeyCredentialsGetAllowed:D(),configurationType:x(e,t)}}))},q=function(e,t,n){var r=n.challengeFrame,o=n.startTimestamp;return B(e,t).then((function(n){return a=(i=n).webauthnEligible,c=i.configurationType,!a||c!==S&&c!==A?function(e){var t=e.spcEligible,n=e.configurationType;return t&&n===P}(n)?O(e,t,{deviceSupport:n,startTimestamp:o}).then((function(e){var t=e.authenticationAPIParam,r=e.optedOut;return{deviceSupport:n,authenticationAPIParam:t,optedOut:r}})):{deviceSupport:n,authenticationAPIParam:null,optedOut:!1}:Z(e,t,{deviceSupport:n,challengeFrame:r,startTimestamp:o}).then((function(e){return{deviceSupport:n,authenticationAPIParam:e,optedOut:!1}}));var i,a,c}))},F=function(e,t,n){var c=new a.E,s=l(e,t);switch(e.type){case"3ds2-challenge":return B(e,t).then((function(r){return p(e,{oneClickAuthnDeviceSupport:r,oneClickAuthnOptedOut:!1,challengeFrame:s}).then((function(){return y(t,{intent:_(0,t,n),challengeFrame:s,startTimestamp:c})}),(function(){return y(t,{intent:h(e,t),challengeFrame:s,startTimestamp:c})}))}));case"3ds2-fingerprint":return o.J.all([g(e,t),q(e,t,{challengeFrame:s,startTimestamp:c})]).then((function(n){var i=(0,r.Z)(n,2),a=i[0],c=i[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,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:a,oneClickAuthn:c}).then((function(n){return function(e,t,n){var r=n.authenticateResponse,i=n.oneClickAuthnDeviceSupport,a=n.oneClickAuthnOptedOut,c=n.challengeFrame,s=t.controller,u=t.hosted,l=t.intentSecret;if("error"===r.type)return o.J.resolve();var d=r.object,m=d.state,f=d.ares,_=d.creq;return"delegated"===m||null===f?o.J.resolve():"C"!==f.transStatus||null==_?(s.report("3ds2.frictionless",{hosted:u,intentId:l.id}),o.J.resolve()):p({type:"3ds2-challenge",threeDS2Source:e.threeDS2Source,cardBrand:e.cardBrand,transactionId:e.transactionId,acsUrl:f.acsURL,acsTransactionId:f.acsTransID,optimizations:e.optimizations,oneClickAuthn:e.oneClickAuthn,creq:_,publishableKey:e.publishableKey},{oneClickAuthnDeviceSupport:i,oneClickAuthnOptedOut:a,challengeFrame:c})}(e,t,{authenticateResponse:n,oneClickAuthnDeviceSupport:c.deviceSupport,oneClickAuthnOptedOut:c.optedOut,challengeFrame:s})}))})).then((function(){return y(t,{intent:_(0,t,n),challengeFrame:s,startTimestamp:c})}),(function(){return y(t,{intent:h(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 h}});var r=n(508),o=n(8489),i=n(1765),a=n(2024),c=n(1873),s=n(3849),u=n(8812),l={clientSecret:(0,c.jt)(c.Z_),redirect:(0,c.jt)((0,c.kw)("always","if_required")),confirmParams:(0,c.jt)(c.Ry),handleActions:(0,c.jt)(c.Xg)},p=(0,o.Z)((0,o.Z)({},l),{},{element:(0,c.jt)(c.Ry)}),d=(0,o.Z)((0,o.Z)({},l),{},{elements:(0,c.jt)(c.Ry)}),m={"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"}},f=function(e,t,n){var r=t.rawSecret,o=t.rawElement,s=t.rawElements,l=t.rawHandleActions,p=t.rawRedirect,d=t.validatedConfirmParams;if((0,i.uN)(e,i.M4.payment_element_beta_1)){var f=(0,c.rX)(o);if(!f)throw new u.No("Invalid value for ".concat(n,": `element` should be a Payment Element. You specified: ").concat(typeof o,"."));return{type:"elements",element:f}}if(function(e,t){var n=e.rawSecret,r=e.rawElements;if(n&&r)throw new u.No("".concat(t,": expected either `elements` or `clientSecret`, but not both."));if(!n&&!r)throw new u.No("".concat(t,": expected either `elements` or `clientSecret`, but got neither."))}({rawElements:s,rawSecret:r},n),p&&!1===l)throw new u.No("".concat(n,": `redirect` not applicable when `handleActions` is false."));if(r){if((null==d?void 0:d.payment_method)&&(null==d?void 0:d.payment_method_data))throw new u.No("".concat(n,": Expected either `payment_method` or `payment_method_data`, but not both."));return{type:"clientSecret",clientSecret:r}}var _=(0,c.MO)(s);if(!_)throw new u.No("Invalid value for ".concat(n,": elements should be an Elements group. You specified: ").concat(typeof s,"."));var h=(0,a.sE)(_._elements,(function(e){return"payment"===e._componentName}));if(!h)throw new u.No("Invalid value for ".concat(n,": elements should have a mounted Payment Element. ").concat(function(e,t){if(e&&m[t]){var n=m[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)));return{type:"elements",elements:_,element:h}},_=function(e){return(0,i.uN)(e,i.M4.payment_element_beta_1)?p:d},h=function(e,t,n,a,l,p){var d,m=function(e){var t=e.betas,n=e.rawUpdateData,r=e.errorMessageMethodName,o=e.controller,a=(0,c.Gu)((0,c.mC)(_(t)),n,r),s=a.value,l=s.element,p=void 0===l?void 0:l,d=s.elements,m=void 0===d?void 0:d,h=s.confirmParams,y=s.clientSecret,v=s.redirect,g=s.handleActions,b=a.warnings,w=(0,c.Gu)((0,c.jt)((0,c.mC)({return_url:(0,c.jt)(c.Z_),payment_method:(0,c.jt)(c.Z_),payment_method_data:(0,c.jt)(c.Ry),payment_method_options:(0,c.jt)(c.Ry),setup_future_usage:(0,c.NM)("".concat(r,": do not pass setup_future_usage at confirm time. Instead, pass setup_future_usage when the PaymentIntent is created."))})),h,r,{path:["confirmParams"]}).value,k=f(t,{rawSecret:y,rawElement:p,rawElements:m,rawHandleActions:g,rawRedirect:v,validatedConfirmParams:w},r);if("clientSecret"===k.type&&!(0,i.uN)(t,i.M4.server_side_confirmation_beta_1))throw new u.No("".concat(r," with a `clientSecret` is not supported yet. Please use the Payment Element."));var E=v||"always",S=(null==w?void 0:w.return_url)||null;return b.forEach((function(e){return o.warn(e)})),{validatedRedirect:E,validatedReturnUrl:S,validatedParams:k,validatedConfirmParams:w,validatedHandleActions:!1!==g,rawConfirmParams:h}}({betas:n,rawUpdateData:a,controller:e,errorMessageMethodName:p}),h=m.validatedParams,y=m.validatedConfirmParams,v=m.validatedRedirect,g=m.validatedHandleActions,b=m.validatedReturnUrl,w=m.rawConfirmParams,k=null!=w?w:{},E=(k.payment_method,k.payment_method_data,k.payment_method_options,(0,r.Z)(k,["payment_method","payment_method_data","payment_method_options"]));if(d="clientSecret"===h.type?function(e){var t,n=e.validatedParams,r=e.validatedConfirmParams,i=e.validatedHandleActions,a=e.otherParams,c=e.intentType,u=e.mids,l=null!=r?r:{},p=l.payment_method_data,d=l.payment_method,m=l.payment_method_options,f="payment"===c?(0,s.cn)(n.clientSecret,"confirmPayment"):(0,s.jH)(n.clientSecret,"confirmSetup"),_=(0,s.k7)({payment_method:p}),h={};return"none"!==(t=p&&_?{intentSecret:f,tag:"paymentMethod-from-data",type:_,data:p,options:null!=m?m:{}}:d?{intentSecret:f,tag:"paymentMethod",paymentMethod:d,options:null!=m?m:{}}:{intentSecret:f,tag:"none"}).tag&&"paymentMethod"!==t.tag||(h={use_stripe_sdk:!0,mandate_data:{customer_acceptance:{type:"online",online:{infer_from_client:!0}}}}),{mids:u,mode:t,expectedType:_,otherParams:(0,o.Z)((0,o.Z)({},h),a),options:{handleActions:i}}}({validatedParams:h,validatedConfirmParams:y,validatedHandleActions:g,otherParams:E,intentType:l,mids:t}):function(e){var t,n,r,o,i=e.validatedParams,a=e.validatedConfirmParams,c=e.validatedHandleActions,s=e.otherParams,u=e.mids;return{mode:{tag:"elements",groupId:null===(t=i.elements)||void 0===t?void 0:t._id,frameId:null===(n=i.element)||void 0===n?void 0:n._implementation._frame.id,data:null!==(r=null==a?void 0:a.payment_method_data)&&void 0!==r?r:{},options:null!==(o=null==a?void 0:a.payment_method_options)&&void 0!==o?o:{}},otherParams:s,expectedType:null,mids:u,options:{handleActions:c}}}({validatedParams:h,validatedConfirmParams:y,validatedHandleActions:g,otherParams:E,mids:t}),"if_required"===v)return{intentMutationRequest:d,redirect:v,returnUrl:null};if("always"===v&&b)return{intentMutationRequest:d,redirect:v,returnUrl:b};throw new u.No("".concat(p,": the `confirmParams.return_url` argument is required unless passing `redirect: 'if_required'`"))}},4167:function(e,t,n){"use strict";n.d(t,{Fh:function(){return S},nq:function(){return C},gO:function(){return A}});var r=n(6977),o=n(1765),i=n(7549),a=n(122),c=n(7193),s=n(6589),u=n(6042),l=n(755),p=n(8147),d=n(5326),m=n(8489),f=n(508),_=n(9294),h=function(e){return"requires_action"!==e.status&&"requires_source_action"!==e.status},y=function(e){var t=e.controller,n=e.initialDelay,r=void 0===n?5e3:n,o=e.intent,i=e.lightboxOptions,a=e.locale,c=e.pollInterval,p=void 0===c?2e3:c,y=e.url,v=i.size,g=(0,f.Z)(i,["size"]),b=(0,u.q)(t,(0,m.Z)({url:(0,l.jr)(y),size:_.q$?"fullScreen":v||"400x600",locale:a,useLightboxHostedCloseButton:!1},g)),w=!1;return new s.J((function(e){return b._on("load",(function(){b.show(),b.fadeInBackdrop()})),b._once("request-close",(function(){(0,u.G)(b).then((function(){w=!0,"payment_intent"===o.object&&e({paymentIntent:o}),"setup_intent"===o.object&&e({setupIntent:o})}))})),b._on("complete",(function(t){(0,u.G)(b).then((function(){w=!0,e(t)}))})),(0,d.ct)({controller:t,initialDelay:r,pollTimeGap:p,intent:o,checkIntent:h,shouldPoll:function(){return!w},locale:a}).then((function(t){"error"in t&&t.error||w||b.destroy(!0).then((function(){e(t)}))}))}))},v=function(e){return"requires_action"!==e.status&&"requires_source_action"!==e.status},g=n(6790),b=n(8812),w=n(1873),k=n(276),E=function(e){return["id_bank_account","id_bank_transfer"].indexOf(e.bankTransferType)>-1},S=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,w.Rz)(e)}},P=function(e,t,m,f,_,h){var w=(0,i.l)((0,r.G2)(t)),S=(0,r.O3)(t);if(!w)return s.J.resolve({paymentIntent:t});switch(w.type){case"cardimageverification-challenge":return n.e(428).then(n.bind(n,5798)).then((function(n){return(0,n.performCardImageVerification)(w,t,e,m)}));case"captcha-challenge":return(0,p.z)(w,t,e,m);case"3ds1-modal":return(0,a.s)(w,S,k.kE.PAYMENT_INTENT,e,m,_);case"3ds2-fingerprint":case"3ds2-challenge":return(0,c.A)(w,{intentSecret:S,intentType:k.kE.PAYMENT_INTENT,controller:e,locale:m,hosted:f},_);case"redirect":return(0,g.k)(t,w.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?void 0:n.isVisible)&&i.destroy(!0),a||e(t)}))}))}({controller:e,intent:t,locale:m,shouldDisplayInstructionsModal:h});case"boleto-display":if(void 0===w.hostedVoucherUrl)throw new b.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:m,url:w.hostedVoucherUrl,intent:t});case"konbini-display":if(void 0===w.hostedVoucherUrl)throw new b.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:m,url:w.hostedVoucherUrl,intent:t});case"oxxo-display":if(void 0===w.hostedVoucherUrl)throw new b.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:m,url:w.hostedVoucherUrl,intent:t});case"upi_await_notification":return function(e){var t=e.controller,n=e.intentSecret,r=e.intentType,o=e.locale;return new s.J((function(e){setTimeout((function i(){(0,d.NO)(n,r,t,o).then((function(t){var n=(0,d.yn)(t);null!==n&&("requires_action"!==n.status?e(t):setTimeout(i,1e4))}))}),5e3)}))}({controller:e,intentSecret:S,intentType:k.kE.PAYMENT_INTENT,locale:m});case"wechat_pay_display_qr_code":return(0,o.uN)(e._betas||[],o.M4.wechat_pay_pm_beta_3)?function(e){var t=e.controller,n=e.intent,r=e.locale,o=e.url;return y({controller:t,intent:n,locale:r,url:o,lightboxOptions:{frameTitle:"hosted_qr_code_instructions.wechat_pay.frame_title",size:"440x560"}})}({controller:e,locale:m,url:w.hostedInstructionsUrl,intent:t,intentSecret:S,intentType:k.kE.PAYMENT_INTENT}):function(e){var t=e.controller,n=e.intent,o=e.locale,i=(0,r.G2)(n);if(!i||"wechat_pay_display_qr_code"!==i.type)throw new Error("Expected next_action.wechat_pay_display_qr_code");var a=t.createLightboxFrame({type:l.NC.WECHAT_PAY_INNER,options:{qrCodeData:i.wechat_pay_display_qr_code.data,qrCodeUrl:i.wechat_pay_display_qr_code.image_url_png,locale:o}}),c=!1;return new s.J((function(e){a._on("load",(function(){a.show(),a.fadeInBackdrop()})),a._once("request-close",(function(){(0,u.G)(a).then((function(){c=!0,e({paymentIntent:n})}))})),(0,d.ct)({controller:t,initialDelay:5e3,pollTimeGap:2e3,intent:n,checkIntent:function(e){return"requires_action"!==e.status},shouldPoll:function(){return!c},locale:o}).then((function(t){t.error||a.destroy(!0).then((function(){e(t)}))}))}))}({controller:e,locale:m,intent:t});case"paynow_display_qr_code":return(0,o.uN)(e._betas||[],o.M4.paynow_pm_beta_1)?function(e){var t=e.controller,n=e.intent,r=e.locale,o=e.url;return y({controller:t,intent:n,locale:r,url:o,lightboxOptions:{frameTitle:"hosted_qr_code_instructions.paynow.frame_title",size:"440x560"}})}({controller:e,locale:m,url:w.hostedInstructionsUrl,intent:t,intentSecret:S,intentType:k.kE.PAYMENT_INTENT}):function(e){var t=e.controller,n=e.intent,o=e.locale,i=(0,r.G2)(n);if(!i||"paynow_display_qr_code"!==i.type)throw new Error("Expected next_action.paynow_display_qr_code");var a=t.createLightboxFrame({type:l.NC.PAYNOW_INNER,options:{qrCodeUrl:i.paynow_display_qr_code.image_url_svg,qrCodeData:i.paynow_display_qr_code.data,locale:o}}),c=!1;return new s.J((function(e){return a._on("load",(function(){a.show(),a.fadeInBackdrop()})),a._once("request-close",(function(){(0,u.G)(a).then((function(){c=!0,e({paymentIntent:n})}))})),a._on("complete",(function(t){(0,u.G)(a).then((function(){c=!0,e(t)}))})),(0,d.ct)({controller:t,initialDelay:5e3,pollTimeGap:2e3,intent:n,checkIntent:v,shouldPoll:function(){return!c},locale:o}).then((function(t){"error"in t&&t.error||c||a.destroy(!0).then((function(){e(t)}))}))}))}({controller:e,locale:m,intent:t,intentSecret:S,intentType:k.kE.PAYMENT_INTENT});case"pix_display_qr_code":if(void 0===w.hostedInstructionsUrl)throw new b.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:m,url:w.hostedInstructionsUrl,intent:t,intentSecret:S,intentType:k.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 y({controller:t,intent:n,locale:r,url:o,lightboxOptions:{frameTitle:"hosted_qr_code_instructions.promptpay.frame_title"}})}({controller:e,locale:m,intent:t,intentSecret:S,url:w.hostedInstructionsUrl,intentType:k.kE.PAYMENT_INTENT});case"display_bank_transfer_instructions":return function(e,t){return!!E(e)&&!(0,o.uN)(t||[],o.M4.id_bank_transfer_beta_1)}(w,e._betas)?(0,g.k)(t,w.hostedInstructionsUrl,e):function(e){return!E(e)}(w)?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:w.hostedInstructionsUrl,intent:t,locale:m}):s.J.resolve({paymentIntent:t});case"qris_display_qr_code":return function(e){var t=e.controller,n=e.intent,r=e.locale,o=e.url;return y({controller:t,intent:n,locale:r,url:o,lightboxOptions:{frameTitle:"hosted_qr_code_instructions.qris.frame_title"}})}({controller:e,locale:m,intent:t,intentSecret:S,url:w.hostedInstructionsUrl,intentType:k.kE.PAYMENT_INTENT});case"cashapp_handle_redirect_or_display_qr_code":return function(e){e.controller;var t=e.intent,n=(e.intentType,e.intentSecret,e.locale,(0,r.G2)(t));if(!n||"cashapp_handle_redirect_or_display_qr_code"!==n.type)throw new Error("Expected next_action.cashapp_handle_redirect_or_display_qr_code");throw new b.No("Cashapp display is not yet implemented")}({controller:e,locale:m,intent:t,intentSecret:S,intentType:k.kE.PAYMENT_INTENT});default:return s.J.resolve({paymentIntent:t})}},A=function e(t,n,r,o,i,a){var c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;if(k.kO1&&(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;return n!==r?[n,r,i]:[n,i]}catch(t){return[e,i]}},l=function(e){return function(e){for(var t=u(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(5178)},5178: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}})},5679:function(e,t,n){"use strict";function r(e,t){return!t||"object"!==(0,o.Z)(t)&&"function"!=typeof t?(0,i.Z)(e):t}n.d(t,{Z:function(){return r}});var o=n(9675),i=n(6148)},9384:function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{Z:function(){return r}})},7904: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(2781),i=n(7090),a=n(2327),c=n(4501)},3696: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(1764),i=n(5253),a=n(2327),c=n(2646)},9675: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}})},2327: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(4400)},4909: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(3538),i=n(9384),a=n(3043),c=n(3009)}},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",209:"elements-affirm-message",259:"elements-afterpay-clearpay-modal",404:"orders-outer",428:"payment-intent-outer-actions-cardimageverification",429:"elements-unified-message",557:"elements-unified-message-modal",578:"elements-afterpay-clearpay-message",913:"trusted-types-checker"}[e]+"-"+{1:"b8ac47241049d5a59e0b54a4a3240c3f",209:"450513b7be61a2eaa571c417bf018061",259:"9b78e6196519281e09f8a8b01f5d83a8",404:"b6f3504cdf472ca30048031a9656030b",428:"fd2e73ecfaf79286487dcbf65ef9c01e",429:"8122df436b7ce9b6c3760f3689399992",557:"6554e12a488889354b071e59e4ad5442",578:"c97d6a3c9bd53a83e2c27daae6271eec",913:"e3dccb45feb70a9564a749fc391bf7dd"}[e]+".js"},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"))})),a.substring(0,1e3)),inPromise:n,apiMethodName:r}),e},C=function(e,t,n){return function(r){try{return e.call(this,r)}catch(e){return A(e,t||this&&this._controller,!1,n)}}},N=function(e,t,n){return function(r,o){try{return e.call(this,r,o)}catch(e){return A(e,t||this&&this._controller,!1,n)}}},I=function(e,t,n){return function(){var r=this;try{return e.call(this).catch((function(e){return A(e,t||r&&r._controller,!0,n)}))}catch(e){return A(e,t||this&&this._controller,!1,n)}}},T=function(e,t,n){return function(r){var o=this;try{return e.call(this,r).catch((function(e){return A(e,t||o&&o._controller,!0,n)}))}catch(e){return A(e,t||this&&this._controller,!1,n)}}},M=function(e,t,n){return function(r,o){var i=this;try{return e.call(this,r,o).catch((function(e){return A(e,t||i&&i._controller,!0,n)}))}catch(e){return A(e,t||this&&this._controller,!1,n)}}},R=function(e,t,n){return function(r,o,i){var a=this;try{return e.call(this,r,o,i).catch((function(e){return A(e,t||a&&a._controller,!0,n)}))}catch(e){return A(e,t||this&&this._controller,!1,n)}}},j=e(9083),O=function(e,t){var n,r="string"==typeof(n=e)&&(0,g.sE)(Object.keys(j.YA),(function(e){return e===n}))||null;if(!r||!function(e,t){var n=v.MJ[e];return!n||(0,v.uN)(t,n)}(r,t)){var o="string"==typeof e?e:typeof e;throw new b.No("A valid Element name must be provided. Valid Elements are:\n ".concat(Object.keys(j.YA).filter((function(e){return!j.YA[e].beta})).join(", "),"; you passed: ").concat(o,"."))}},Z=e(6148),x=e(1020),L=e(8992),D=function e(){var t=this;(0,u.Z)(this,e),this._emit=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o0},this._off=function(e,n){if(n){for(var r,o=t._callbacks[e],i=0;i=0},G=function(){return Object.keys(F)},Y="40px",z={success:"success",fail:"fail",invalid_shipping_address:"invalid_shipping_address"},H={shipping:"shipping",delivery:"delivery",pickup:"pickup"},K=(0,c.Z)({success:"success"},{fail:"fail",invalid_payer_name:"invalid_payer_name",invalid_payer_email:"invalid_payer_email",invalid_payer_phone:"invalid_payer_phone",invalid_shipping_address:"invalid_shipping_address"}),J={merchantCapabilities:["supports3DS"],displayItems:[]},W=(0,m.mC)({amount:m.MZ,label:m.Z_,pending:(0,m.jt)(m.Xg)}),V=(0,m.mC)({amount:m.Bi,label:m.Z_,pending:(0,m.jt)(m.Xg)}),X=(0,m.mC)({amount:m.Bi,label:m.Z_,pending:(0,m.jt)(m.Xg),id:(0,m.Wc)(m.Z_,(function(){return(0,f.To)("shippingOption")})),detail:(0,m.Wc)(m.Z_,(function(){return""}))}),Q=(0,m.mC)({major:m.Rx,minor:m.Rx}),$=m.kw.apply(void 0,(0,s.Z)(Object.keys(H))),ee=(0,m.mC)({origin:m.Z_,name:m.Z_}),te=(0,m.ci)({__merchantDetails:(0,m.jt)(ee),country:(0,m.jt)(m.hN),currency:(0,m.jt)(m.cV),displayItems:(0,m.jt)((0,m.CT)(V)),shippingOptions:(0,m.jt)((0,m.uw)("id")((0,m.CT)(X))),total:(0,m.jt)(W),blockedCardBrands:(0,m.jt)((0,m.CT)(m.kw.apply(void 0,(0,s.Z)(k.iw))))}),ne=(0,m.mC)({displayItems:(0,m.jt)((0,m.CT)(V)),shippingOptions:(0,m.jt)((0,m.uw)("id")((0,m.CT)(X))),total:(0,m.jt)(W),status:function(e,t){return m.kw.apply(void 0,(0,s.Z)(Object.keys(z)))(-1!==["invalid_payer_name","invalid_payer_email","invalid_payer_phone"].indexOf(e)?"fail":e,t)}}),re=m.kw.apply(void 0,(0,s.Z)(Object.keys(K))),oe=function(e){var t=[];return window.ApplePaySession?(U(e,F.applePay)&&t.push("APPLE_PAY"),U(e,F.link)&&t.push("LINK"),t):(U(e,F.link)&&t.push("LINK"),U(e,F.googlePay)&&(t.push("GOOGLE_PAY"),h.sV&&t.push("BROWSER")),U(e,F.browserCard)&&-1===t.indexOf("BROWSER")&&t.push("BROWSER"),t)},ie=function(){try{return window.location.origin===window.top.location.origin}catch(e){return!1}},ae=(0,q.HP)((function(e){return window.ApplePaySession.canMakePaymentsWithActiveCard(e)})),ce=function(e){if(!window.ApplePaySession)return!1;try{return window.ApplePaySession.supportsVersion(e)}catch(e){return!1}},se=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2;if("https:"!==window.location.protocol)return B.J.resolve(!1);var i=Math.max(2,o);if(window.ApplePaySession){if(ie()){if(window.ApplePaySession.supportsVersion(i)){var a=t?[e,t]:[e],c="merchant.".concat(a.join("."),".stripe");return ae(c).then((function(o){if(r("pr.apple_pay.can_make_payment_native_response",{available:o}),n&&!o&&window.console){var i=t?"or stripeAccount parameter (".concat(t,") "):"";window.console.warn("Either you do not have a card saved to your Wallet or the current domain (".concat(e,") ").concat(i,"is not registered for Apple Pay. Visit https://dashboard.stripe.com/account/apple_pay to register this domain."))}return o}))}return n&&window.console&&window.console.warn("This version of Safari does not support ApplePay JS version ".concat(i,".")),B.J.resolve(!1)}return B.J.resolve(!1)}return B.J.resolve(!1)},ue=(n={},(0,p.Z)(n,k.rM.VISA,"visa"),(0,p.Z)(n,k.rM.MASTERCARD,"masterCard"),(0,p.Z)(n,k.rM.AMEX,"amex"),(0,p.Z)(n,k.rM.DISCOVER,"discover"),(0,p.Z)(n,k.rM.JCB,"jcb"),(0,p.Z)(n,k.rM.UNIONPAY,"chinaUnionPay"),(0,p.Z)(n,k.rM.DINERS,null),(0,p.Z)(n,"MAESTRO","maestro"),(0,p.Z)(n,"CARTES_BANCAIRES","cartesBancaires"),n),le=(r={},(0,p.Z)(r,k.rM.VISA,"VISA"),(0,p.Z)(r,k.rM.MASTERCARD,"MASTERCARD"),(0,p.Z)(r,k.rM.AMEX,"AMEX"),(0,p.Z)(r,k.rM.DISCOVER,"DISCOVER"),(0,p.Z)(r,k.rM.JCB,"JCB"),(0,p.Z)(r,k.rM.DINERS,null),["AT","AU","BE","CA","CH","DE","DK","EE","ES","FI","FR","GB","GR","HK","IE","IT","JP","LT","LU","LV","MX","NL","NO","NZ","PL","PT","SE","SG","US"]),pe=function(e,t,n){var r=[];return-1!==le.indexOf(e)&&r.push(k.rM.AMEX),("US"===e||t)&&r.push.apply(r,[k.rM.DISCOVER,k.rM.DINERS,k.rM.JCB]),r.push.apply(r,[k.rM.MASTERCARD,k.rM.VISA]),r.filter((function(e){return-1===n.indexOf(e)}))},de=function(e,t,n){return pe(e,t,n).reduce((function(e,t){var n=ue[t];return n&&e.push(n),e}),[])},me=e(6241),fe=function(e,t){return{amount:(0,me.Fe)(e.amount,t.currency),label:e.label,type:e.pending?"pending":"final"}},_e=function(e,t){return new window.ApplePayError(e,t)},he=function(e){return function(t){return t[e]&&"string"==typeof t[e]?t[e].toUpperCase():null}},ye=(o={},(0,p.Z)(o,K.success,0),(0,p.Z)(o,K.fail,1),(0,p.Z)(o,K.invalid_payer_name,2),(0,p.Z)(o,K.invalid_shipping_address,3),(0,p.Z)(o,K.invalid_payer_phone,4),(0,p.Z)(o,K.invalid_payer_email,4),o),ve=(i={},(0,p.Z)(i,K.success,(function(){return null})),(0,p.Z)(i,K.fail,(function(){return null})),(0,p.Z)(i,K.invalid_payer_name,(function(){return _e("billingContactInvalid","name")})),(0,p.Z)(i,K.invalid_shipping_address,(function(){return _e("shippingContactInvalid","postalAddress")})),(0,p.Z)(i,K.invalid_payer_phone,(function(){return _e("shippingContactInvalid","phoneNumber")})),(0,p.Z)(i,K.invalid_payer_email,(function(){return _e("shippingContactInvalid","emailAddress")})),i),ge=(a={},(0,p.Z)(a,H.pickup,"storePickup"),(0,p.Z)(a,H.shipping,"shipping"),(0,p.Z)(a,H.delivery,"delivery"),a),be={total:function(e){return fe(e.total,e)},lineItems:function(e){return e.displayItems?e.displayItems.map((function(t){return fe(t,e)})):[]},shippingMethods:function(e){return e.shippingOptions?e.shippingOptions.map((function(t){return function(e,t){return{amount:(0,me.Fe)(e.amount,t.currency),label:e.label,detail:e.detail,identifier:e.id}}(t,e)})):[]},applicationData:function(e){return e.applicationData||null}},we={shippingType:function(e){var t=e.shippingType;if(!t)return null;var n=ge[t];if(void 0!==n)return n;throw new b.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:he("country"),currencyCode:he("currency"),merchantCapabilities:function(e){var t=e.merchantCapabilities||J.merchantCapabilities;return e.__betas&&(0,v.uN)(e.__betas,"cup_apple_pay_beta_1")&&t.push("supportsEMV"),t},supportedNetworks:function(e){var t=de(e.country,e.jcbEnabled||!1,e.blockedCardBrands||[]);return ce(4)&&-1===(e.blockedCardBrands||[]).indexOf("mastercard")&&t.push("maestro"),e.__betas&&(0,v.uN)(e.__betas,"cup_apple_pay_beta_1")&&-1===(e.blockedCardBrands||[]).indexOf("unionpay")&&t.push("chinaUnionPay"),ce(4)&&e.__betas&&(0,v.uN)(e.__betas,"cartes_bancaires_apple_pay_beta_1")&&"eur"===e.currency&&t.unshift("cartesBancaires"),t}},ke={status:function(e){var t=ye[e.status];return ce(3)&&t>1?1:t},error:function(e){return ce(3)?ve[e.status]():null}},Ee=(0,c.Z)((0,c.Z)({},be),we),Se=(0,c.Z)((0,c.Z)({},be),ke),Pe=function(e){return Object.keys(Se).reduce((function(t,n){var r=(0,Se[n])(e);return null!==r?(0,c.Z)((0,c.Z)({},t),{},(0,p.Z)({},n,r)):t}),{})},Ae=function(e){return"string"==typeof e?e:null},Ce=function(e){return e?Ae(e.phoneNumber):null},Ne=function(e){return e?Ae(e.emailAddress):null},Ie=function(e){return e?[e.givenName,e.familyName].filter((function(e){return e&&"string"==typeof e})).join(" "):null},Te=function(e){var t=e.addressLines,n=e.countryCode,r=e.postalCode,o=e.administrativeArea,i=e.locality,a=e.phoneNumber,c=Ae(n);return{addressLine:Array.isArray(t)?t.reduce((function(e,t){return"string"==typeof t?[].concat((0,s.Z)(e),[t]):e}),[]):[],country:c?c.toUpperCase():"",postalCode:Ae(r)||"",recipient:Ie(e)||"",region:Ae(o)||"",city:Ae(i)||"",phone:Ae(a)||"",sortingCode:"",dependentLocality:"",organization:""}},Me=function(e,t){var n=e.identifier,r=e.label;return t.filter((function(e){return e.id===n&&e.label===r}))[0]},Re=function(e,t){var n=e.shippingContact,r=e.shippingMethod,o=e.billingContact;return{shippingOption:r&&t.shippingOptions&&t.shippingOptions.length?Me(r,t.shippingOptions):null,shippingAddress:n?Te(n):null,payerEmail:Ne(n),payerPhone:Ce(n),payerName:Ie(o),walletName:"applePay",methodName:"apple-pay"}},je=e(9620),Oe={austria:"AT",sterreich:"AT",csterreich:"AT",au:"AU",australia:"AU",belgium:"BE",br:"BR",brasil:"BR",brazil:"BR",ca:"CA",canada:"CA",ch:"CH",schweiz:"CH",switzerland:"CH",china:"CN",czechrepublic:"CZ",de:"DE",deutschland:"DE",germany:"DE",danmark:"DK",denmark:"DK",es:"ES",espaa:"ES",spain:"ES",finland:"FI",suomi:"FI",fr:"FR",hk:"HK",hongkong:"HK",england:"GB",gb:"GB",uk:"GB",unitedkingdom:"GB",scotland:"GB",wales:"GB",it:"IT",italy:"IT",italia:"IT",japan:"JP",lietuva:"LT",luxembourg:"LU",netherlands:"NL",nederland:"NL",norway:"NO",poland:"PL",polska:"PL",russia:"RU",saudiarabia:"SA",se:"SE",sweden:"SE",sverige:"SE",singapore:"SG",us:"US",usa:"US",unitedstatesofamerica:"US",unitedstates:"US",estadosunidos:"US"},Ze=function(e,t){if(e.country&&"string"==typeof e.country){var n,r=e.country.toLowerCase().replace(/[^a-z]+/g,"");return e.countryCode?"string"==typeof e.countryCode&&(n=e.countryCode.toUpperCase()):(n=Oe[r])||t(),(0,c.Z)((0,c.Z)({},e),{},{countryCode:n})}return e},xe=function(e,t){return e&&"object"==typeof e?t(e):null},Le=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(){return se(window.location.hostname,n._authentication.accountId,(0,je.lO)(n._authentication.apiKey)===je.Kl.test,n._report,n._minimumVersion)},this.update=function(e){n._initialPaymentRequest=(0,g.PM)(n._paymentRequestOptions,e),n._initializeSessionState()},this.show=function(){var e;n._wasCompleted&&n._report("pr.show_called_after_completion"),n._initializeSessionState();try{e=new window.ApplePaySession(n._minimumVersion,function(e){var t=(0,c.Z)((0,c.Z)({},J),e);return Object.keys(Ee).reduce((function(e,n){var r=(0,Ee[n])(t);return null!==r?(0,c.Z)((0,c.Z)({},e),{},(0,p.Z)({},n,r)):e}),{})}(n._paymentRequestOptions))}catch(e){throw"Must create a new ApplePaySession from a user gesture handler."===e.message?new b.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,c.Z)((0,c.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()?k.Yj.paymentRequestButton:null;n._controller.action.tokenizeWithData({type:"apple_pay",elementName:o,tokenData:(0,c.Z)((0,c.Z)({},r),{},{billingContact:xe(r.billingContact,n._normalizeContact)}),mids:n._mids}).then((function(t){if("error"===t.type)e.completePayment(window.ApplePaySession.STATUS_FAILURE),n._report("error.pr.create_token_failed",{error:t.error});else{var o=xe(r.shippingContact,n._normalizeContact),i=xe(r.billingContact,n._normalizeContact);o&&n._paymentRequestOptions.requestShipping&&!o.countryCode&&e.completePayment(window.ApplePaySession.STATUS_INVALID_SHIPPING_POSTAL_ADDRESS);var a=Re({shippingContact:o,billingContact:i},n._paymentRequestOptions);n._onToken(e)((0,c.Z)((0,c.Z)({},a),{},{shippingOption:n._privateShippingOption,token:t.object}))}}))}},this._normalizeContact=function(e){return Ze(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,c.Z)((0,c.Z)({},t),{},{complete:C(n._completePayment(e))})})}},this._completePayment=function(e){return function(t){"success"===t&&(n._wasCompleted=!0),n._paymentRequestOptions=(0,g.PM)(n._paymentRequestOptions,{status:t});var r=Pe(n._paymentRequestOptions),o=r.status,i=r.error;n._isShowing&&(i?e.completePayment({status:o,errors:[i]}):e.completePayment(o)),(0===o||1===o&&null==i)&&(n._isShowing=!1,n._onEvent&&n._onEvent({type:"close"}))}},this._shippingContactSelected=function(e){return function(t){n._onEvent({type:"shippingaddresschange",payload:{shippingAddress:Te(n._normalizeContact(t.shippingContact)),updateWith:C(n._completeShippingContactSelection(e))}})}},this._completeShippingContactSelection=function(e){return function(t){var r;n._paymentRequestOptions=(0,g.PM)(n._paymentRequestOptions,t),(null===(r=n._paymentRequestOptions.shippingOptions)||void 0===r?void 0:r.length)&&(n._privateShippingOption=n._paymentRequestOptions.shippingOptions[0]);var o=Pe(n._paymentRequestOptions),i=o.status,a=o.shippingMethods,c=o.total,s=o.lineItems;e.completeShippingContactSelection(i,a,c,s)}},this._shippingMethodSelected=function(e){return function(t){if(n._paymentRequestOptions.shippingOptions){var r=Me(t.shippingMethod,n._paymentRequestOptions.shippingOptions);n._privateShippingOption=r,n._onEvent({type:"shippingoptionchange",payload:{shippingOption:r,updateWith:C(n._completeShippingMethodSelection(e))}})}}},this._completeShippingMethodSelection=function(e){return function(t){n._paymentRequestOptions=(0,g.PM)(n._paymentRequestOptions,t);var r=Pe(n._paymentRequestOptions),o=r.status,i=r.total,a=r.lineItems;e.completeShippingMethodSelection(o,i,a)}};var r=t.controller,o=t.authentication,i=t.mids,a=t.options,s=t.usesButtonElement,l=t.listenerRegistry;this._controller=r,this._authentication=o,this._mids=i,this._minimumVersion=a.__minApplePayVersion||2,this._usesButtonElement=s,this._listenerRegistry=l,this._initialPaymentRequest=a,this._isShowing=!1,this._initializeSessionState()}return(0,l.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,c.Z)((0,c.Z)((0,c.Z)({},J),this._initialPaymentRequest),{},{status:K.success,applicationData:e}),this._privateSession=null,this._privateShippingOption=null;var t=this._paymentRequestOptions.shippingOptions;(null==t?void 0:t.length)&&(this._privateShippingOption=t[0])}},{key:"_setupSession",value:function(e,t){var n=this;this._listenerRegistry.addEventListener(e,"validatemerchant",C(this._validateMerchant(e,t))),this._listenerRegistry.addEventListener(e,"paymentauthorized",C(this._paymentAuthorized(e))),this._listenerRegistry.addEventListener(e,"cancel",C((function(){n._isShowing=!1,n._onEvent({type:"cancel"}),n._onEvent({type:"close"})}))),this._listenerRegistry.addEventListener(e,"shippingcontactselected",C(this._shippingContactSelected(e))),this._listenerRegistry.addEventListener(e,"shippingmethodselected",C(this._shippingMethodSelected(e)))}}]),e}(),De=Le,Be=e(755),qe={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"},Fe=(0,c.Z)((0,c.Z)({},qe),{},{background:"rgba(40,40,40,0.75)"}),Ue=function e(t){var n=this,r=t.lockScrolling,o=t.lockFocus,i=t.lockFocusOn,a=t.listenerRegistry;(0,u.Z)(this,e),this.domElement=document.createElement("div"),this._runOnHide=[],this.mount=function(){var e=(0,_.Xq)();n.domElement.style.display="none",e.contains(n.domElement)||e.insertBefore(n.domElement,e.firstChild)},this.show=function(){if((0,_.yq)(n.domElement,qe),n._lockScrolling){var e=(0,_.MV)();n._runOnHide.push(e)}if(n._lockFocus){var t=(0,_.W3)(n._lockFocusOn).restoreFocus;n._runOnHide.push(t)}},this.fadeIn=function(){setTimeout((function(){(0,_.yq)(n.domElement,Fe)}))},this.fadeOut=function(){return new B.J((function(e){(0,_.yq)(n.domElement,qe),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,_.Xq)();e.contains(n.domElement)&&e.removeChild(n.domElement)},this._lockScrolling=!!r,this._lockFocus=!!o,this._lockFocusOn=i||null,this._listenerRegistry=a},Ge=null;var Ye=function(e){return"https:"===window.location.protocol&&(!(!h.Wt&&!h.j3)&&(!h.Bh&&(!(!e.isCheckout&&!window.PaymentRequest)&&!(!e.isCheckout&&h.sV))))},ze=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(Be.NC.PAYMENT_REQUEST_GOOGLE_PAY,{authentication:n._authentication,mids:n._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,c.Z)((0,c.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,c.Z)((0,c.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,c.Z)((0,c.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 B.J.resolve(!1);if(!n._frame)throw new Error("Frame not initialized.");var e,t=n._frame;return e=function(){return t.action.checkCanMakePayment().then((function(e){return!0===e.available}))},null!==Ge?B.J.resolve(Ge):e().then((function(e){return Ge=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._mids=t.mids,this._origin=t.origin,this._usesButtonElement=t.usesButtonElement,this._backdrop=new Ue({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))},He=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(h.xz)return null;var e=window.PaymentRequest;return e.prototype.canMakePayment||(e.prototype.canMakePayment=function(){return B.J.resolve(!1)}),e}(),Ke=null,Je=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,je.lO)(n._authentication.apiKey),je.Kl.test,"https:"!==window.location.protocol?B.J.resolve(!1):null!==Ke?B.J.resolve(Ke):He&&e?e.action.checkCanMakePayment().then((function(e){var t=e.available;return Ke=!0===t})):B.J.resolve(!1);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 b.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,c.Z)((0,c.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,s=t.usesButtonElement,l=t.options;if(this._authentication=r,this._controller=o,this._usesButtonElement=s,He&&"https:"===window.location.protocol){this._controller.action.fetchLocale({locale:"auto"});var p=this._controller.createHiddenFrame(Be.NC.PAYMENT_REQUEST_BROWSER,{authentication:r,mids:i,origin:a});this._setupPrFrame(p,l),this._prFrame=p}else this._prFrame=null},We=e(7904),Ve=e(1164),Xe=function(){return(h.Wt||h.j3)&&!(h.x5||h.D$||h.ZR||h.aS||h.PB||h.cE)},Qe=function(){function e(){var t=this;(0,u.Z)(this,e),this._state="pending",this._state="pending",this.promise=new B.J((function(e,n){t._resolve=e,t._reject=n})),this.promise.then((function(){t._state="resolved"}),(function(){t._state="rejected"}))}return(0,l.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}(),$e=function(){function e(t,n){var r=this;(0,u.Z)(this,e),this.callbacks=[],this.listen=function(e){0===r.callbacks.length&&window.addEventListener("message",r.handleMessage),r.callbacks.push(e)},this.stopAllListeners=function(){window.removeEventListener("message",r.handleMessage),r.callbacks.length=0},this.postMessage=function(t){if(r.target){var n=(0,c.Z)((0,c.Z)({},t),{},(0,p.Z)({},e.MESSAGE_TAG,!0));r.target.postMessage(n,r.targetOrigin)}},this.handleMessage=function(e){r.isValidPopupMessageEvent(e)&&r.callbacks.forEach((function(t){return t(e.data)}))},this.getTarget=t,this.targetOrigin=n}return(0,l.Z)(e,[{key:"target",get:function(){return this.getTarget()}},{key:"isValidPopupMessageEvent",value:function(t){return("*"===this.targetOrigin||t.origin===this.targetOrigin)&&t.source===this.target&&t.data&&"object"==typeof t.data&&e.MESSAGE_TAG in t.data}}]),e}();$e.MESSAGE_TAG="__stripeJsV3Popup";var et=function(){function e(t){var n=this;(0,u.Z)(this,e),this.messageQueue=[],this.isDisconnected=!1,this.runOnDisconnect=[],this.callbacks={},this.deferredMessageResponses={},this.onClose=function(){},this.onDisconnect=function(){},this.on=function(e,t){var r;((r=n.callbacks)[e]||(r[e]=[])).push(t)},this.off=function(e,t){var r;n.callbacks[e]=null===(r=n.callbacks[e])||void 0===r?void 0:r.filter((function(e){return e!==t}))},this.send=function(e,t){n.isDisconnected;var r=(0,f.Vj)(),o=new Qe;return n.deferredMessageResponses[r]=o,n.postMessage({mode:"request",nonce:r,req:t,type:e}),o.promise},this.setNextHeartbeatTimeout=function(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n.heartbeatTimeout&&clearTimeout(n.heartbeatTimeout),n.runOnDisconnect.push((function(){n.heartbeatTimeout&&clearTimeout(n.heartbeatTimeout)})),n.heartbeatTimeout=setTimeout((function(){r?(n.disconnect(),n.onDisconnect()):n.setNextHeartbeatTimeout(e.HEARTBEAT_TIMEOUT,!0)}),t)};var r=t.target,o=t.targetOrigin,i=t.isOpener,a="function"==typeof r?r:function(){return r};if(this.transport=this.setupTransport(a,o),i){this.isTargetReadyForMessages=!1;var c=setInterval((function(){var e;(null===(e=a())||void 0===e?void 0:e.closed)&&(n.onClose(),n.disconnect())}),100);this.runOnDisconnect.push((function(){return clearInterval(c)})),this.runOnDisconnect.push((function(){var e;return null===(e=a())||void 0===e?void 0:e.close()}))}else this.isTargetReadyForMessages=!0,this.postMessage({type:"ready_for_messages",__private:!0});this.sendRecurringHeartbeat(),this.setNextHeartbeatTimeout(e.INITIAL_HEARTBEAT_TIMEOUT)}return(0,l.Z)(e,[{key:"setupTransport",value:function(e,t){var n=this,r=new $e(e,t);return r.listen((function(e){"__private"in e?n.handlePrivateMessage(e):n.handleMessage(e)})),this.runOnDisconnect.push((function(){return r.stopAllListeners()})),r}},{key:"handlePrivateMessage",value:function(t){var n=this;switch(t.type){case"ready_for_messages":this.isTargetReadyForMessages=!0,this.messageQueue.forEach((function(e){n.postMessage(e)})),this.messageQueue.length=0;break;case"heartbeat":this.setNextHeartbeatTimeout(e.HEARTBEAT_TIMEOUT);break;default:(0,m.Rz)(t)}}},{key:"handleMessage",value:function(e){var t,n,r=this,o=e.nonce;switch(e.mode){case"request":var i;null===(i=this.callbacks[e.type])||void 0===i||i.forEach((function(t){(function(e){try{return B.J.resolve(e())}catch(e){return B.J.reject(e)}})((function(){return t(e.req)})).then((function(e){r.postMessage({mode:"response",nonce:o,res:e})}),(function(e){r.postMessage({mode:"error",nonce:o,error:e})}))}));break;case"response":null===(t=this.deferredMessageResponses[o])||void 0===t||t.resolve(e.res);break;case"error":null===(n=this.deferredMessageResponses[o])||void 0===n||n.reject(e.error);break;default:(0,m.Rz)(e)}}},{key:"disconnect",value:function(){this.runOnDisconnect.forEach((function(e){return e()})),this.runOnDisconnect.length=0,this.isDisconnected=!0}},{key:"sendRecurringHeartbeat",value:function(){var t=this;!function n(){t.isDisconnected||(t.isTargetReadyForMessages&&t.postMessage({type:"heartbeat",__private:!0}),setTimeout(n,e.HEARTBEAT_INTERVAL))}()}},{key:"postMessage",value:function(e){this.isDisconnected||(this.isTargetReadyForMessages?this.transport.postMessage(e):this.messageQueue.push(e))}}]),e}();et.HEARTBEAT_INTERVAL=1e3,et.INITIAL_HEARTBEAT_TIMEOUT=7500,et.HEARTBEAT_TIMEOUT=2500;var tt,nt,rt=function(e,t,n){var r,o,i,a,c,s=(r={outerHeight:window.outerHeight,outerWidth:window.outerWidth,screenY:window.screenY,screenX:window.screenX,popupHeight:t,popupWidth:n},o=r.outerHeight,i=r.outerWidth,a=r.screenY,c=r.screenX,{top:o/2+a-r.popupHeight/2,left:i/2+c-r.popupWidth/2}),u=function(e){return Object.keys(e).map((function(t){return"".concat(t,"=").concat(e[t])})).join()}({toolbar:"no",directories:"no",status:"no",scrollbars:"no",resizable:"no",copyhistory:"no",height:t,width:n,top:s.top,left:s.left}),l=window.open(e,"Link",u);if(!l)throw new Error("Could not open popup");return l},ot=function(e){var t=e.path,n=e.onClose,r=e.onDisconnect,o=e.height,i=e.width,a=function(e){var t=e.popupRootUrl,n=e.stripeJsRootUrl,r=e.version,o=e.path,i=(0,y.P$)(t);if(!i)throw new Error('Invalid popup root URL: "'.concat(t,'"'));return t===n?{url:t+(r&&"unknown"!==r?"link-popup-".concat(r,".html#"):"link-popup.html#")+o,origin:i}:{url:t+(r&&"unknown"!==r?"".concat(r,"/#"):"#")+o,origin:i}}({popupRootUrl:"https://checkout.link.co/",stripeJsRootUrl:k.Xk,version:k.XK,path:t}),c=a.url,s=a.origin,u=null,l=new et({target:function(){return u},targetOrigin:s,isOpener:!0});return l.onDisconnect=r,l.onClose=function(){window.focus(),n()},u=rt(c,o,i),{messenger:l,close:function(){var e;return null===(e=u)||void 0===e?void 0:e.close()},focus:function(){var e;return null===(e=u)||void 0===e?void 0:e.focus()}}},it=function(){function e(t){var n=this;(0,u.Z)(this,e),this.blockReopenOnShow=!1,this.popup=null,this.isDuringSuccessCushion=!1,this.handleGetInitialState=function(e){return function(){return 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;return{publishableKey:n.authentication.apiKey,stripeAccount:n.authentication.accountId,merchantInfo:a,customerInfo:c,integrationType:"prb",paymentRequestOptions:n.paymentRequestOptions,locale:t,stripeJsId:n.controller._stripeJsId,mids:n.controller.mids(),referrer:window.location.href.toString(),elementsSessionId:null,elementsAssignmentId:null}}))}},this.getControllerData=function(e){return B.J.all([n.controller.action.resolveLocale({locale:e||"auto"}),n.controller.action.retrieveLinkConfig(),n.controller.action.checkForLinkClientSecret()]).then((function(e){var t=(0,We.Z)(e,3);return{locale:t[0],linkConfigResult:t[1],hasClientSecret:t[2]}}))},this.handlePaymentData=function(e){var t=e.token,r=e.payerName,o=e.payerEmail,i=e.payerPhone;return n.blockReopenOnShow=!0,new B.J((function(e){n.onEvent({type:"paymentresponse",payload:{token:t,payerName:r,payerEmail:o,payerPhone:i,shippingOption:null,shippingAddress:null,walletName:"link",methodName:"link",complete:function(t){var r;("success"!==t?n.blockReopenOnShow=!1:(n.isDuringSuccessCushion=!0,setTimeout((function(){n.isDuringSuccessCushion=!1}),2e3)),h.q$&&"success"===t)&&(null===(r=n.popup)||void 0===r||r.close(),n.popup=null);e({status:t})}}})}))},this.setEventHandler=function(e){n._onEvent=e},this.show=function(e){var t=e.locale;if(!n.usesButtonElement())throw new Error("You cannot call show() directly for a PaymentRequest backed by Link. Use the paymentRequestButton Element instead.");if(!n.isDuringSuccessCushion){if(n.popup){if(!h.q$)return void n.popup.focus();if(n.blockReopenOnShow)return;n.popup.close()}n.popup=ot({path:"/pay",height:708,width:500,onDisconnect:function(){n.onEvent({type:"close"}),n.popup=null},onClose:function(){n.onEvent({type:"close"}),n.popup=null}}),n.popup.messenger.on("get_initial_state",n.handleGetInitialState(t)),n.popup.messenger.on("link_prb_payment_data",n.handlePaymentData)}},this.update=function(e){e.__merchantDetails;var t=(0,d.Z)(e,["__merchantDetails"]);n.paymentRequestOptions=(0,g.PM)(n.paymentRequestOptions,t)},this.abort=function(){n.popup&&(n.popup.close(),n.popup=null)},this.canMakePayment=function(e){return Xe()&&n.usesButtonElement()&&function(e){if(e.requestShipping||e.shippingOptions)return!1;var t=(0,v.uN)(e.__betas||[],v.M4.link_in_prb_beta_1);return!(e.wallets&&e.wallets.length||!t&&e.disableWallets&&e.disableWallets.length||e.blockedCardBrands&&e.blockedCardBrands.length||e.__isCheckout)}(n.paymentRequestOptions)?n.getControllerData(e.locale).then((function(t){var r,o=t.locale,i=t.linkConfigResult,a=t.hasClientSecret;if(-1!==Ve.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.skipEnrollmentCheck?{available:!0,linkExperimentAssignments:s}:(a&&n.controller.report("pr.link.has_client_secret"),{available:a,linkExperimentAssignments:s}):{available:!1}})).then((function(e){return n.controller.report("pr.link.can_make_payment_native_response",{available:e.available}),e})):B.J.resolve(!1)},this.controller=t.controller,this.authentication=t.authentication,this.usesButtonElement=t.usesButtonElement,this.paymentRequestOptions=t.options}return(0,l.Z)(e,[{key:"onEvent",value:function(e){if(!this._onEvent)throw new Error("Event handler has not been initialized");this._onEvent(e)}}]),e}(),at=it,ct=e(9792),st=!1,ut=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._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){r._controller.report(e,(0,c.Z)((0,c.Z)({},t),{},{activeBackingLibrary:r._activeBackingLibraryName,usesButtonElement:r._usedByButtonElement||!1,requestShipping:r._initialOptions?r._initialOptions.requestShipping||!1:null}))},r._warn=function(e){r._controller.warn(e)},r._registerElement=function(){r._usedByButtonElement=!0},r._elementShow=function(){r._showCalledByButtonElement=!0,r.show()},r._updateLocale=function(e){r._locale=e},r._initBackingLibraries=function(e){r._queryStrategy.forEach((function(t){var n={controller:r._controller,authentication:r._authentication,mids:r._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 De(n),r._backingLibraries.APPLE_PAY.setEventHandler(r._handleInternalEvent);break;case"GOOGLE_PAY":r._backingLibraries.GOOGLE_PAY=new ze(n),r._backingLibraries.GOOGLE_PAY.setEventHandler(r._handleInternalEvent);break;case"LINK":r._backingLibraries.LINK=new at(n),r._backingLibraries.LINK.setEventHandler(r._handleInternalEvent);break;case"BROWSER":r._backingLibraries.BROWSER=new Je(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._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"shippingoptionchange":case"shippingaddresschange":var t=e.type,n=e.payload,o=null,i=!1,a=!1,s=function(c){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 s=(0,m.Gu)(ne,c||{},"".concat(t," callback")),u=s.value;s.warnings.forEach((function(e){return r._controller.warn(e)}));var l=u,p=!1;if(r._initialOptions.__isCheckout&&"APPLE_PAY"===r._activeBackingLibraryName&&u.shippingOptions&&1===u.shippingOptions.length&&0===u.shippingOptions[0].amount){u.shippingOptions;l=(0,d.Z)(u,["shippingOptions"]),p=!0}var f=u.shippingOptions||r._initialOptions.shippingOptions;if(!(p||"shippingaddresschange"!==e.type||u.status!==K.success||f&&f.length))throw new b.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.");l.total&&(r._reportOnlyTotal=l.total),n.updateWith(l)};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.')),s({status:"fail"})}),29900),r._emit(t,(0,c.Z)((0,c.Z)({},n),{},{updateWith:s}))):s({status:"success"});break;case"token":case"source":case"paymentmethod":var u=e.type,l=e.payload,p=null,f=!1,_=!1,h=function(e){if(f&&_)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(_)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.");p&&clearTimeout(p),_=!0;var t=(0,m.Gu)(re,e,"status for PaymentRequest completion"),n=t.value;t.warnings.forEach((function(e){return r._controller.warn(e)})),l.complete(n)};p=setTimeout((function(){f=!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.')),h("fail")}),29900),r._emit(u,(0,c.Z)((0,c.Z)({},l),{},{complete:h}));break;default:(0,m.Rz)(e)}},r._logExperimentExposure=function(e){r._controller.report("experiment_exposure",{experiment_name:e,stripe_account:r._authentication.accountId})},r._maybeEmitPaymentResponse=function(e){r._isShowing&&r._emitExternalEvent(e)},r._emitPaymentResponse=function(e){var t;r._report("pr.payment_authorized",{amount:null===(t=r._reportOnlyTotal)||void 0===t?void 0:t.amount,currency:r._reportOnlyCurrency});var n=e.token,o=(0,d.Z)(e,["token"]),i=o.payerEmail,a=o.payerPhone,s=o.complete,u=r._showCalledByButtonElement?k.Yj.paymentRequestButton:null;r._hasRegisteredListener("token")&&("googlePay"===o.walletName&&r._controller.action.removeElementsExperimentId({experimentKey:k.D3.elements_session}),r._maybeEmitPaymentResponse({type:"token",payload:e})),r._hasRegisteredListener("paymentmethod")?r._controller.action.createPaymentMethodWithData({elementName:u,type:"card",paymentMethodData:{card:{token:n.id},billing_details:{email:r._initialOptions.__billingDetailsEmailOverride||i,phone:a}},mids:null}).then((function(e){"error"===e.type?e.error.code&&"email_invalid"===e.error.code?s("invalid_payer_email"):(r._report("fatal.pr.token_to_payment_method_failed",{error:e.error,token:n.id}),s("fail")):r._maybeEmitPaymentResponse({type:"paymentmethod",payload:(0,c.Z)((0,c.Z)({},o),{},{paymentMethod:e.object})})})):r._hasRegisteredListener("source")&&r._controller.action.createSourceWithData({elementName:u,type:"card",sourceData:{token:n.id,owner:{email:r._initialOptions.__billingDetailsEmailOverride||i,phone:a}},mids:null}).then((function(e){"error"===e.type?e.error.code&&"email_invalid"===e.error.code?s("invalid_payer_email"):(r._report("fatal.pr.token_to_source_failed",{error:e.error,token:n.id}),s("fail")):r._maybeEmitPaymentResponse({type:"source",payload:(0,c.Z)((0,c.Z)({},o),{},{source:e.object})})}))},r._canMakePaymentForBackingLibrary=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{skipEnrollmentCheck:!1},n=r._backingLibraries[e];if(!n)throw new Error("Unexpectedly calling canMakePayment on uninitialized backing library.");return B.J.race([new B.J((function(e){return setTimeout(e,1e4)})).then((function(){return!1})),n.canMakePayment({skipEnrollmentCheck:t.skipEnrollmentCheck,locale:r._locale})]).then((function(t){var n,o=null;return"LINK"===e&&"boolean"!=typeof t?(n=t.available,o=t.linkExperimentAssignments):n=!!t,r._canMakePaymentAvailability=(0,c.Z)((0,c.Z)({},r._canMakePaymentAvailability),{},(0,p.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 h.sV&&!t&&n},r._isInLinkBeta=function(){return void 0!==r._initialOptions.__betas&&(0,v.uN)(r._initialOptions.__betas,v.M4.link_in_prb_beta_1)},r._canIncludeLink=function(){return!!r._usedByButtonElement},r._constructCanMakePaymentResponse=function(){var e=r._isGooglePayOnAndroid(),t={applePay:!!r._canMakePaymentAvailability.APPLE_PAY,googlePay:!!r._canMakePaymentAvailability.GOOGLE_PAY||e};return r._canIncludeLink()&&(t.link=!!r._canMakePaymentAvailability.LINK,r._report("pr.link_in_can_make_payment_response",{betas:r._initialOptions.__betas})),t},r.canMakePayment=C((function(){if(r._report("pr.can_make_payment"),r._canMakePaymentResolved){var e,t=null!==r._activeBackingLibrary?r._constructCanMakePaymentResponse():null;return r._report("pr.can_make_payment_response",{response:t,cached:!0,activeBackingLibrary:r._activeBackingLibrary,amount:null===(e=r._reportOnlyTotal)||void 0===e?void 0:e.amount,currency:r._reportOnlyCurrency}),B.J.resolve(t)}if("https:"!==window.location.protocol)return st||(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."),st=!0),r._canMakePaymentResolved=!0,B.J.resolve(null);var n=r._canIncludeLink()?r._queryStrategy:r._queryStrategy.filter((function(e){return"LINK"!==e})),o=n.map((function(e){return function(){return r._canMakePaymentForBackingLibrary(e)}}));-1!==n.indexOf("LINK")&&o.push((function(){return r._canMakePaymentForBackingLibrary("LINK",{skipEnrollmentCheck:!0})}));var i=!1,a=new ct.E;return(0,q.tN)(o,(function(e){var t=e.backingLibraryName,n=e.available,o=e.linkExperimentAssignments;if(!r._isInLinkBeta()&&n&&"LINK"===t){var a=null==o?void 0:o[k.om],c=null==o?void 0:o[k.wW];if(i||(a&&r._logExperimentExposure(k.om),c&&r._logExperimentExposure(k.wW),i=!0),"treatment"!==c)return r._canMakePaymentAvailability.LINK=!1,!n}return n&&(r._activeBackingLibraryName=t,r._activeBackingLibrary=r._backingLibraries[t],r._buttonTypeName=r._activeBackingLibraryName,r._isGooglePayOnAndroid()&&(r._buttonTypeName="GOOGLE_PAY")),n})).then((function(e){var t,n=new ct.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}),o}))})),r.update=C((function(e){var t;if(r._isShowing)throw r._report("pr.update_called_while_showing"),new b.No("You cannot update Payment Request options while the payment sheet is showing.");var n=(0,m.Gu)(te,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?void 0:t.requestShipping)&&r._report("pr.update_shipping_options_without_shipping"),o.total&&(r._reportOnlyTotal=o.total),o.currency&&(r._reportOnlyCurrency=o.currency),(0,g.VO)(r._backingLibraries).forEach((function(e){e&&e.update(o)}))})),r.show=C((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 b.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 b.No("Payment Request is not available in this browser.");if(!r._showCalledByButtonElement&&"LINK"===r._activeBackingLibraryName)throw r._report("pr.show_called_with_link"),new b.No("Payment Request with Link cannot be used without the paymentRequestButton Element");var t=r._activeBackingLibrary;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=C((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._mids=e.mids,r._listenerRegistry=e.listenerRegistry;var o=(0,m.Gu)((e.betas,(0,m.mC)({displayItems:(0,m.jt)((0,m.CT)(V)),shippingOptions:(0,m.jt)((0,m.uw)("id")((0,m.CT)(X))),wallets:(0,m.jt)((0,m.CT)(m.kw.apply(void 0,(0,s.Z)(G().filter((function(e){return e!==F.link})))))),disableWallets:(0,m.jt)((0,m.CT)(m.kw.apply(void 0,(0,s.Z)(G())))),blockedCardBrands:(0,m.jt)((0,m.CT)(m.kw.apply(void 0,(0,s.Z)(k.iw)))),total:W,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)($),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)(Q),__merchantDetails:(0,m.jt)(ee),__isCheckout:(0,m.jt)(m.Xg),__betas:(0,m.jt)((0,m.CT)(m.z$.apply(void 0,(0,s.Z)(v.Lv))))})),e.rawOptions||{},"paymentRequest()"),i=o.value,a=o.warnings;if(r._report("pr.options",{options:(0,g.ei)(i,["country","currency","jcbEnabled","requestPayerEmail","requestPayerName","requestPayerPhone","requestShipping","disableWallets","wallets","blockedCardBrands"])}),a.forEach((function(e){return r._warn(e)})),i.__billingDetailsEmailOverride&&i.requestPayerEmail)throw new b.No("When providing `__billingDetailsEmailOverride`, `requestPayerEmail` has to be `false` so that the customer is not prompted for their email in the payment sheet.");var l=(0,v.uN)(e.betas,v.M4.link_in_prb_beta_1),f=G(),_=i.disableWallets,y=_?f.filter((function(e){return-1===_.indexOf(e)&&(l||e!==F.link)})):i.wallets;return e.queryStrategyOverride?r._queryStrategy=e.queryStrategyOverride:r._queryStrategy=oe(y||f),r._report("pr.query_strategy",{queryStrategy:r._queryStrategy}),r._initialOptions=(0,c.Z)((0,c.Z)({},i),{},{__betas:e.betas,wallets:y}),r._reportOnlyCurrency=i.currency,r._reportOnlyTotal=i.total,r._initBackingLibraries(r._initialOptions),r}(0,x.Z)(t,e);var n=(0,L.Z)(t);return t}(D),lt=ut,pt={base:(0,m.jt)(m.Ry),complete:(0,m.jt)(m.Ry),empty:(0,m.jt)(m.Ry),invalid:(0,m.jt)(m.Ry),paymentRequestButton:(0,m.jt)(m.Ry)},dt={classes:(0,m.jt)((0,m.mC)({base:(0,m.jt)(m.Z_),complete:(0,m.jt)(m.Z_),empty:(0,m.jt)(m.Z_),focus:(0,m.jt)(m.Z_),invalid:(0,m.jt)(m.Z_),webkitAutofill:(0,m.jt)(m.Z_)})),hidePostalCode:(0,m.jt)(m.Xg),hideIcon:(0,m.jt)(m.Xg),showIcon:(0,m.jt)(m.Xg),style:(0,m.jt)((0,m.mC)(pt)),iconStyle:(0,m.jt)((0,m.kw)("solid","default")),value:(0,m.jt)((0,m.or)(m.Z_,m.Ry)),__privateCvcOptional:(0,m.jt)(m.Xg),__privateValue:(0,m.jt)((0,m.or)(m.Z_,m.Ry)),__privateEmitIbanValue:(0,m.jt)(m.Xg),error:(0,m.jt)((0,m.mC)({type:m.Z_,code:(0,m.jt)(m.Z_),decline_code:(0,m.jt)(m.Z_),param:(0,m.jt)(m.Z_)})),locale:(0,m.yv)("elements()"),fonts:(0,m.yv)("elements()"),placeholder:(0,m.jt)(m.Z_),disabled:(0,m.jt)(m.Xg),placeholderCountry:(0,m.jt)(m.Z_),paymentRequest:(0,m.jt)((0,m.n2)(lt,"stripe.paymentRequest(...)")),supportedCountries:(0,m.jt)((0,m.CT)(m.Z_)),accountHolderType:(0,m.jt)((0,m.kw)("individual","company")),issuingCard:(0,m.jt)(m.Z_),ephemeralKeySecret:(0,m.jt)(m.Z_),nonce:(0,m.jt)(m.Z_),toCopy:(0,m.jt)((0,m.kw)("number","cvc","expiry","pin"))},mt=(0,m.mC)(dt),ft=(tt={},(0,p.Z)(tt,k.Yj.card,Be.NC.CARD_ELEMENT),(0,p.Z)(tt,k.Yj.cardNumber,Be.NC.CARD_ELEMENT),(0,p.Z)(tt,k.Yj.cardExpiry,Be.NC.CARD_ELEMENT),(0,p.Z)(tt,k.Yj.cardCvc,Be.NC.CARD_ELEMENT),(0,p.Z)(tt,k.Yj.postalCode,Be.NC.CARD_ELEMENT),(0,p.Z)(tt,k.Yj.paymentRequestButton,Be.NC.PAYMENT_REQUEST_ELEMENT),(0,p.Z)(tt,k.Yj.iban,Be.NC.IBAN_ELEMENT),(0,p.Z)(tt,k.Yj.idealBank,Be.NC.IDEAL_BANK_ELEMENT),(0,p.Z)(tt,k.Yj.p24Bank,Be.NC.P24_BANK_ELEMENT),(0,p.Z)(tt,k.Yj.auBankAccount,Be.NC.AU_BANK_ACCOUNT_ELEMENT),(0,p.Z)(tt,k.Yj.fpxBank,Be.NC.FPX_BANK_ELEMENT),(0,p.Z)(tt,k.Yj.issuingCardNumberDisplay,Be.NC.ISSUING_CARD_NUMBER_DISPLAY_ELEMENT),(0,p.Z)(tt,k.Yj.issuingCardCopyButton,Be.NC.ISSUING_CARD_COPY_BUTTON_ELEMENT),(0,p.Z)(tt,k.Yj.issuingCardCvcDisplay,Be.NC.ISSUING_CARD_CVC_DISPLAY_ELEMENT),(0,p.Z)(tt,k.Yj.issuingCardExpiryDisplay,Be.NC.ISSUING_CARD_EXPIRY_DISPLAY_ELEMENT),(0,p.Z)(tt,k.Yj.issuingCardPinDisplay,Be.NC.ISSUING_CARD_PIN_DISPLAY_ELEMENT),(0,p.Z)(tt,k.Yj.epsBank,Be.NC.EPS_BANK_ELEMENT),(0,p.Z)(tt,k.Yj.netbankingBank,Be.NC.NETBANKING_BANK_ELEMENT),(0,p.Z)(tt,k.Yj.afterpayClearpayMessageModal,Be.NC.AFTERPAY_MESSAGE_MODAL_ELEMENT),(0,p.Z)(tt,k.Yj.autocompleteSuggestions,Be.NC.AUTOCOMPLETE_SUGGESTIONS_ELEMENT),(0,p.Z)(tt,k.Yj.achBankSearchResults,Be.NC.ACH_BANK_SEARCH_RESULTS_ELEMENT),tt),_t=function(e){var t=(0,_.Dx)(e,null);return!!t&&"rtl"===t.getPropertyValue("direction")},ht=function(){document.activeElement&&document.activeElement.blur&&document.activeElement.blur()},yt=e(7030),vt=e(9144),gt=function(e){var t=document.createElement("input");return t.className=e,t.setAttribute("aria-hidden","true"),t.setAttribute("aria-label"," "),t.setAttribute("autocomplete","false"),t.maxLength=1,t.disabled=!0,(0,_.yq)(t,vt.ZS),t},bt={margin:"0",padding:"0",border:"none",display:"block",background:"transparent",position:"relative",opacity:"1"},wt=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},kt=function(e){var t=(0,g.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}},Et=e(3110),St=e.n(Et),Pt=k.Xk.replace(/\/$/,""),At="_1776170249",Ct="__1104211103",Nt=function(e){var t,n=(t={},(0,p.Z)(t,At,!0),(0,p.Z)(t,Ct,!1),t);try{var r=(0,y.vB)(e.slice(e.indexOf("?")+1));Object.keys(r).forEach((function(e){var t=St()(e),o=r[e];switch(t){case At:"false"===o&&(n[t]=!1);break;case Ct:"true"===o&&(n[t]=!0)}}))}catch(e){}return n}(function(e){try{if(e.currentScript)return e.currentScript.src;var t=e.querySelectorAll('script[src^="'.concat(Pt,'"]')),n=(0,g.sE)(t,(function(e){var t=(e.getAttribute("src")||"").split("?")[0];return new RegExp("^".concat(Pt,"/?$")).test(t)}));return n&&n.getAttribute("src")||""}catch(e){return""}}(document)),It=Nt[At],Tt=Nt[Ct],Mt=e(3852),Rt=e(3538),jt=e(4044),Ot=function(e){function t(e){var r,o=e.type,i=e.controllerId,a=e.listenerRegistry,c=e.betas,s=e.appParams;return(0,u.Z)(this,t),(r=n.call(this))._sendFAReq=function(e){var t=(0,f.To)(e.tag);return new B.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})},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=i,r._persistentMessages=[],r._queuedMessages=[],r._requests={},r._listenerRegistry=a,r.id=r._generateId(),r._iframe=r._createIFrame(o,c,s),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,x.Z)(t,e);var n=(0,L.Z)(t);return(0,l.Z)(t,[{key:"_generateId",value:function(){return(0,f.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,s.Z)(this._persistentMessages),[t]),this.loaded&&(0,Be.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,Be.oi)(e):this._queuedMessages=[].concat((0,s.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 r=window.location.href.toString(),o="string"==typeof n?n:(0,y.qC)((0,c.Z)((0,c.Z)({},n||{}),{},{referrer:r,controllerId:this._controllerId})),i=document.createElement("iframe");i.setAttribute("name",this.id);var a=(0,Be.i7)(e);return Object.keys(a).forEach((function(e){i.setAttribute(e,a[e])})),(null==n?void 0:n.allowCamera)&&i.setAttribute("allow","camera"),i.src="".concat((0,jt.D)(e)).concat(o?"#":"").concat(o),i}}]),t}(D),Zt=Ot,xt=function(e){function n(e){var t;if((0,u.Z)(this,n),(t=r.call(this,e)).autoload=e.autoload||!1,"complete"===document.readyState)t._ensureMounted();else{var o=t._ensureMounted.bind((0,Z.Z)(t));t._listenerRegistry.addEventListener(document,"DOMContentLoaded",o),t._listenerRegistry.addEventListener(window,"load",o),setTimeout(o,5e3)}return t}(0,x.Z)(n,e);var r=(0,L.Z)(n);return(0,l.Z)(n,[{key:"_ensureMounted",value:function(){t((0,Rt.Z)(n.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 b.No("Stripe.js requires that your page has a element.");this.autoload&&(this.loaded=!0)}},{key:"_createIFrame",value:function(e,r,o){var i=t((0,Rt.Z)(n.prototype),"_createIFrame",this).call(this,e,r,o);return i.setAttribute("aria-hidden","true"),i.setAttribute("tabIndex","-1"),(0,_.SV)(i),i}}]),n}(Zt),Lt=xt,Dt=function(e){function t(){return(0,u.Z)(this,t),n.apply(this,arguments)}(0,x.Z)(t,e);var n=(0,L.Z)(t);return(0,l.Z)(t,[{key:"_generateId",value:function(){return this._controllerId}}]),t}(Lt),Bt=Dt,qt="__privateStripeMetricsController",Ft="merchant",Ut="session",Gt="NA",Yt=function(e){return 42===e.length},zt=function(e,t,n){return n?!e||!Yt(e)&&Yt(t)?t:e:(0,f.Vj)()},Ht=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((0,u.Z)(this,e),this._controllerFrame=null,this._latencies=[],this._handleMessage=function(e){return function(n){var r=n.data,o=n.origin;if((0,y.Qg)(o)&&"string"==typeof r)try{var i=JSON.parse(r),a=i.originatingScript,c=i.payload;if("m2"===a){var s=c.guid,u=c.muid,l=c.sid;t._guid=s,t._muid=t._getID(Ft,u),t._sid=t._getID(Ut,l),e()}}catch(e){}}},n.checkoutIds){var r=n.checkoutIds,o=r.muid,i=r.sid;this._guid=Gt,this._muid=o,this._sid=i,this._doNotPersist="NA"!==o&&"NA"!==i}else this._guid=Gt,this._muid=this._getID(Ft),this._sid=this._getID(Ut),this._doNotPersist=!1;this._listenerRegistry=(0,Mt.E)(),this._idsPromise=new B.J((function(e){t._establishMessageChannel(e)})),this._id=(0,f.To)(qt),It&&(this._controllerFrame=new Bt({type:Be.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,l.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(!It)return this._guid=(0,f.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,y.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]:Gt;switch(e){case Ft:if(this._doNotPersist)return zt(this._muid,t,It);try{var n="__stripe_mid",r=zt(kt(n),t,It);return Yt(r)&&wt({name:n,value:r,domain:".".concat(document.location.hostname),protocol:document.location.protocol,sameSite:"Strict"}),r}catch(e){return Gt}case Ut:if(this._doNotPersist)return zt(this._sid,t,It);try{var o="__stripe_sid",i=zt(kt(o),t,It);return Yt(i)&&wt({name:o,value:i,domain:".".concat(document.location.hostname),protocol:document.location.protocol,sameSite:"Strict",expiresIn:18e5}),i}catch(e){return Gt}default:throw new Error("Invalid ID type specified: ".concat(e))}}}]),e}(),Kt=null,Jt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Kt=new Ht(e)},Wt=!1,Vt=function(){var e=Kt;e&&(Wt||(Wt=!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}}}))))},Xt=["test_id"],Qt=function(e){switch(e.type){case"object":return Xt.push(e.object.id),{issuingCard:e.object};case"error":return{error:e.error};default:return(0,m.Rz)(e)}},$t=function(e){switch(e.type){case"object":return{nonce:e.object.public_nonce};case"error":return{error:e.error};default:return(0,m.Rz)(e)}},en={display:"block",position:"absolute",top:"50%",right:"0","margin-top":"-14px",height:"28px",width:"0",padding:"0",border:"none",overflow:"hidden",opacity:"1",visibility:"visible"},tn=function(e){var t=e.listenerRegistry,n=e.parent,r=e.frame,o=e.locale,i=void 0===o?"en":o,a=e.controller,u=e.style,l=e.onLoad,p=e.onError,d=!1,m=(0,jt.D)("LINK_BUTTON_FOR_CARD_ELEMENT"),f=document.createElement("iframe");f.setAttribute("frameborder","0"),f.setAttribute("allowTransparency","true"),f.setAttribute("scrolling","no"),(0,_.yq)(f,en),f.src="".concat(m,"#").concat((0,y.qC)({locale:i,style:u}));var h=[[window,"message",function(e){var t,n=e.data,o=void 0===n?{}:n,s=e.origin,u=e.source,m=o.action,h=void 0===m?"":m,y=o.payload,v=void 0===y?{}:y;if(u===f.contentWindow&&s===k.jQ&&-1!==(null==h?void 0:h.indexOf("card-element-link")))switch(h){case"card-element-link-load":d=!0,l();break;case"card-element-link-click":r.send({action:"stripe-user-link-click",payload:{locale:i||"en",type:v.type,publishableKey:a._apiKey,stripeAccount:null!==(t=a._stripeAccount)&&void 0!==t?t:null,stripeJsId:a._stripeJsId,mids:a.mids()}});break;case"card-element-link-update-styles":(0,_.yq)(f,(0,c.Z)((0,c.Z)({},en),v));break;case"card-element-link-error":p((null==v?void 0:v.reason)||"")}},!1]];return h.forEach((function(e){t.addEventListener.apply(t,(0,s.Z)(e))})),null==n||n.appendChild(f),{unmount:function(){var e;null===(e=f.contentWindow)||void 0===e||e.postMessage({action:"card-element-link-unmount"},k.jQ),h.forEach((function(e){t.removeEventListener.apply(t,(0,s.Z)(e))})),null==n||n.removeChild(f)},updateButton:function(e){var t;null===(t=f.contentWindow)||void 0===t||t.postMessage({action:"card-element-link-button-change",payload:e},k.jQ)},hasLoaded:function(){return d},setFocusable:function(e){f.tabIndex=e?0:-1}}},nn={base:"StripeElement",focus:"StripeElement--focus",invalid:"StripeElement--invalid",complete:"StripeElement--complete",empty:"StripeElement--empty",webkitAutofill:"StripeElement--webkit-autofill"},rn="#faffbd",on=function(e){return parseFloat(e.toFixed(1))},an=function(e){return/^\d+(\.\d*)?px$/.test(e)},cn=function(){function e(t){var n=this;(0,u.Z)(this,e),this.focus=function(){if(n._isIssuingDisplayElement())throw new b.No("Cannot call focus() on an ".concat(n._componentName," Element."));document.activeElement&&document.activeElement.blur&&document.activeElement.blur(),n._fakeInput.focus()},this._formSubmit=function(){for(var e=n._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._setLinkButtonFrameFocusState=function(e){var t;if("link-manage"===e||"link-save"===e)null===(t=n._linkButtonFrame)||void 0===t||t.setFocusable(!0);else if(""===e){var r;null===(r=n._linkButtonFrame)||void 0===r||r.setFocusable(!1)}},this._unmountLinkButtonFrame=function(){n._linkButtonFrame&&(n._linkButtonFrame.unmount(),n._linkButtonFrame=void 0)};var r=t.options,o=t.component,i=t.listenerRegistry,a=t.elementTimings,c=t.emitEvent,s=t.getParent,l=t.hasRegisteredListener,p=(0,g.CE)(r,["loader"]),d=p.controller,f=p.componentName,_=p.publicOptions,h=p.betas;this._componentName=f,this._component=o,this._controller=d,this._listenerRegistry=i,this._emitEvent=c,this._getParent=s,this._hasRegisteredListener=l;var y=(0,m.Gu)(mt,_||{},"create()"),v=y.value;y.warnings.forEach((function(e){return n._controller.warn(e)}));var w,k=v.paymentRequest,E=v.classes,S=v.issuingCard,P="paymentRequestButton"===this._componentName;if(P){if(!k)throw new b.No("You must pass in a stripe.paymentRequest object in order to use this Element.");this._paymentRequest=k;var A=p.locale;this._paymentRequest._registerElement(),this._paymentRequest._updateLocale(A)}if(this._isIssuingDisplayElement()){var C=0===(h||[]).length;if(!S)throw new Error("You must pass in an ID to the issuingCard option in order to use this Element.");if(C){if(!("nonce"in v)||!("ephemeralKeySecret"in v))throw new Error("You must set the nonce and ephemeralKeySecret options to use this Element.")}else if(w=S,-1===Xt.indexOf(w))throw new Error("Issuing card ".concat(S," has not been retrieved."))}this._createElement(p,v,a),this._classes=nn,this._computeCustomClasses(E||{}),this._lastBackgroundColor="",this._focused=!1,this._empty=!P,this._invalid=!1,this._complete=!1,this._autofilled=!1,this._lastSubmittedAt=null}return(0,l.Z)(e,[{key:"update",value:function(e){var t=this,n=(0,m.Gu)(mt,e||{},"element.update()"),r=n.value;if(n.warnings.forEach((function(e){return t._controller.warn(e)})),r){var o=r.classes,i=(0,d.Z)(r,["classes"]);o&&(this._removeClasses(),this._computeCustomClasses(o),this._updateClasses()),this._updateFrameHeight(r),Object.keys(i).length&&(this._frame.update(i),this._secondaryFrame&&this._secondaryFrame.update(i))}}},{key:"blur",value:function(){if(this._isIssuingDisplayElement())throw new b.No("Cannot call blur() on an ".concat(this._componentName," Element."));this._frame.blur(),this._fakeInput.blur()}},{key:"clear",value:function(){this._frame.clear()}},{key:"unmount",value:function(){var e=this._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._linkButtonFrame&&(this._linkButtonFrame.unmount(),this._linkButtonFrame=void 0),this._fakeInput.disabled=!0,this._frame.unmount()}},{key:"mount",value:function(){if((0,_.qW)(document,this._component)){this._controller.report("user_error.shadow_dom_mount",{element:this._componentName});var e=function(){throw new b.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 b.No("For the paymentRequestButton Element, you must first check availability using paymentRequest.canMakePayment() before mounting the Element.");if(!this._paymentRequest._activeBackingLibraryName)throw new b.No("The paymentRequestButton Element is not available in the current environment.")}this._mountTimestamp=new ct.E,this._findPossibleLabel(),this._updateClasses()}},{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,_.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,_.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(!nn[n])throw new b.No("".concat(n," is not a customizable class name.\nYou can customize: ").concat(Object.keys(nn).join(", ")));var r=e[n]||nn[n];t[n]=r.replace(/\./g," ")})),this._classes=(0,c.Z)((0,c.Z)({},this._classes),t),this}},{key:"_setupEvents",value:function(e,t,n){var r,o=this,i=e.stripeJsLoadTimestamp,a=(e.stripeCreateTimestamp,e.groupCreateTimestamp),c=e.createTimestamp,u=0,l=0,p={stripeJsLoad:i.getAsPosixTime(),stripeCreate:c.getAsPosixTime(),groupCreate:a.getAsPosixTime(),create:c.getAsPosixTime()};if(this._frame._on("link-token-change",(function(e){e.hasToken?(o._frame._iframe.setAttribute("tabIndex","-1"),o._fakeInput.setAttribute("tabIndex","-1")):(o._frame._iframe.removeAttribute("tabIndex"),o._fakeInput.removeAttribute("tabIndex"))})),this._frame._on("update-outer-link-frame",(function(e){var t,n=e.nextButtonType;(null===(t=o._linkButtonFrame)||void 0===t?void 0:t.hasLoaded())?(o._linkButtonFrame.updateButton(n),o._setLinkButtonFrameFocusState(n)):r=n})),this._frame._on("outer-link-card-mount",(function(){o._linkButtonFrame=tn({frame:o._frame,listenerRegistry:o._listenerRegistry,parent:o._component,locale:t.locale,controller:o._controller,style:null==n?void 0:n.style,onLoad:function(){var e;r&&(null===(e=o._linkButtonFrame)||void 0===e||e.updateButton(r),o._setLinkButtonFrameFocusState(r),r="")},onError:function(e){o._frame.send({action:"stripe-eject-link",payload:{reason:e}}),o._unmountLinkButtonFrame()}})})),this._frame._on("outer-link-card-unmount",(function(){return o._unmountLinkButtonFrame()})),this._frame._on("load",(function(e){var t=e.source;u++;var n=o._getParent(),r=_t(n),i=o._paymentRequest?o._paymentRequest._buttonTypeName:null;o._mountTimestamp&&(p.mount=o._mountTimestamp.getAsPosixTime()),o._frame.send({action:"stripe-user-mount",payload:{timestamps:p,loadCount:u,matchFrame:t===o._frame._iframe.contentWindow,rtl:r,paymentRequestButtonType:i}})})),this._secondaryFrame){var d=this._secondaryFrame;d._on("load",(function(e){var t=e.source;l++,o._mountTimestamp&&(p.mount=o._mountTimestamp.getAsPosixTime()),d.send({action:"stripe-user-mount",payload:{timestamps:p,loadCount:l,matchFrame:t===d._iframe.contentWindow,rtl:!1,paymentRequestButtonType:null}})}))}this._frame._on("redirectfocus",(function(e){var t=e.focusDirection,n=(0,_.dh)(o._component,t);n&&n.focus()})),this._frame._on("focus",(function(){var e;o._focused=!0,o._updateClasses(),null===(e=o._linkButtonFrame)||void 0===e||e.setFocusable(!0)})),this._frame._on("blur",(function(){var e;o._focused=!1,o._updateClasses(),null===(e=o._linkButtonFrame)||void 0===e||e.setFocusable(!1),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(){if("paymentRequestButton"===o._componentName){o._lastSubmittedAt=new ct.E;var e=!1,t=!1;Vt(),o._emitEvent("click",{preventDefault:function(){o._controller.report("payment_request_button.default_prevented"),e&&o._controller.warn("event.preventDefault() was called after the payment sheet was shown. Make sure to call it synchronously when handling the `click` event."),t=!0}}),!t&&o._paymentRequest&&(o._paymentRequest._elementShow(),e=!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){Vt();var t={},n=j._0[o._componentName]||[];["error","value","empty","complete"].concat((0,s.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){var t=o._getParent();if(t){var n=(0,_.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=on(r),u=on(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||Y,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&&!an(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===k.T2.indexOf(this._componentName)?void 0:d||this._lastPadding,f=(0,_.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),i=e.groupId,a=(0,d.Z)(e,["controller","publicOptions","componentName","groupId"]),s=(t.classes,t.paymentRequest,(0,d.Z)(t,["classes","paymentRequest"])),u=this._component,l=gt(yt.Kb);(0,_.yq)(u,bt);var p=_t(document.body),m=ft[o],f=(0,c.Z)((0,c.Z)((0,c.Z)({},a),s),{},{rtl:p}),y=this._controller.createElementFrame(m,o,i,f);if(y._on("load",(function(){l.disabled=!1})),this._listenerRegistry.addEventListener(l,"focus",(function(){y.focus()})),y.appendTo(u),j._y[o]){var v=j._y[o].secondary,g=this._controller.createSecondaryElementFrame(m,v,o,i,f);g&&g.on&&g.on("height-change",(function(e){g.updateStyle({height:"".concat(e.height,"px")})})),this._secondaryFrame=g,g.appendTo(u),this._listenerRegistry.addEventListener(window,"click",(function(){return r._handleOutsideClick()}))}if(u.appendChild(l),h.Ah&&o!==k.Yj.paymentRequestButton){var b=function(){var e=gt(yt.tk);return e.setAttribute("tabindex","-1"),e}();u.appendChild(b)}this._frame=y,this._fakeInput=l,this._setupEvents(n,e,t),this._updateFrameHeight(t,!0)}}]),e}(),sn=cn,un={amount:m.Rx,currency:(0,m.kw)("USD"),logoColor:(0,m.jt)((0,m.kw)("primary","black","white")),fontColor:(0,m.jt)(m.Z_),fontSize:(0,m.jt)(m.Z_),textAlign:(0,m.jt)(m.Z_),stripeMerchantId:(0,m.jt)(m.Z_)},ln=(0,m.mC)(un),pn=function(e){var t=!1;window.Promise||(t=!0,window.Promise=B.J);var n=e();return t&&window.Promise===B.J&&delete window.Promise,n},dn=function(){return pn((function(){return e.e(1).then(e.bind(e,6167))}))},mn=function(t){var n,r=t.options,o=(0,d.Z)(t,["options"]),i=t.emitEvent,a=t.listenerRegistry,u=r.controller,l=r.componentName,p=r.publicOptions,f=r.groupId,_=new ct.E,h=function(e){var t=(0,m.Gu)(ln,e||{},"create()"),n=t.value,r=t.warnings;if(!Math.floor(n.amount)===n.amount)throw new b.No("'Amount' must be a whole integer number that represents the lowest denomination (cents).");return r.forEach((function(e){return u.warn(e)})),n},y=h(p),v=function(e,t){return e.apply(void 0,[n].concat((0,s.Z)(t)))},w=[],k=function(e){return function(){for(var t=arguments.length,r=new Array(t),o=0;o-1&&r.keyMode()===je.Kl.unknown)throw new b.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=Zn(s,i||{},"elements.create('".concat(s,"')"),!1,t.betas);u.warnings.forEach((function(e){return r.warn(e)}));var l=["payment","linkAuthentication"].indexOf(o)>-1,p="payment"===t.componentName&&(u.value.parsedIntentSecret||null);if(l&&!t.clientSecret&&!p)throw new b.No("In order to create a ".concat(t.componentName,' element, you must pass a valid PaymentIntent or SetupIntent client secret when creating the Elements group.\n\n e.g. stripe.elements({clientSecret: "{{CLIENT_SECRET}}"})'));var m=ur((0,c.Z)((0,c.Z)({},n),{},{options:(0,c.Z)((0,c.Z)({},a),{},{controller:r,componentName:s,publicOptions:u.value})})),f=m.update,_=(0,d.Z)(m,["update"]);return(0,c.Z)({update:function(e){var n=Zn(s,e||{},"".concat(s,".update()"),!0,t.betas);n.warnings.forEach((function(e){return r.warn(e)})),f(n.value)}},_)},pr=Object.freeze({header:(0,m.jt)((0,m.mC)({text:(0,m.jt)(m.Z_)})),showOnAdd:(0,m.jt)((0,m.kw)("auto","never"))}),dr=Object.freeze((0,c.Z)({clientSecret:En.pu,descriptor:(0,m.jt)((0,m.kw)("cart","bag","basket"))},pr)),mr=((0,c.Z)({},(0,g.CE)(dr,["clientSecret"])),Object.freeze({price:(0,m.jt)(m.Z_),product:(0,m.jt)(m.Z_),quantity:(0,m.jt)(m.Rx)})),fr=((0,c.Z)((0,c.Z)({},mr),{},{quantity:m.Rx,outerRequestId:m.Rx}),["ready","change","checkout"]),_r="StripeElement",hr={margin:"0",padding:"0",border:"none",display:"block",background:"transparent",position:"relative",opacity:"1"},yr={visibility:"hidden",position:"fixed",top:"0px",left:"100%",width:"100%",height:"100%","pointer-events":"none","max-width":"none","max-height":"none","min-width":"none","min-height":"none"},vr={visibility:"visible",position:"fixed",top:"0px",left:"0px","z-index":"99999",width:"100%",height:"100%","pointer-events":"all","max-width":"none","max-height":"none","min-width":"none","min-height":"none"},gr=function(e){var t=e.component,n=e.getParent,r=e.emitEvent,o=e.options,i=e.selfDestruct,a={mounted:!1,frameReady:!1,visible:!1,showStarted:!1,releasePageScroll:null,restoreFocus:null,runOnUnmount:[],addRequestIdCounter:0};(0,_.yq)(t,hr);var s=function(e){var t=e.controller,n=e.componentName,r=e.groupId,o={fonts:e.fonts,wait:e.wait,rtl:!1,publicOptions:e.publicOptions,controllingElement:e.controllingElement};return t.createElementFrame(Be.NC.CART_ELEMENT,n,r,o)}(o);s.updateStyle(yr),s.appendTo(t);var u=function(e){return function(t){a.mounted&&a.frameReady&&e(t)}},l=u((function(){a.visible||(a.visible=!0,s.updateStyle(vr),s.show(),a.releasePageScroll=(0,_.MV)(),(a.restoreFocus?a.restoreFocus():B.J.resolve()).then((function(){var e=(0,_.W3)(s._iframe),t=e.lockedPromise,n=e.lockedElements;a.restoreFocus=function(){return(0,_.gl)(t,n)}})))})),p=u((function(){a.visible&&(s.hide(),a.showStarted||(v(),g()))})),d=u((function(e){s.cancelCheckout(e)})),m=function(e){return function(){throw new b.No(e)}},f=m("focus() is not supported by the cart Element."),h=m("blur() is not supported by the cart Element."),y=m("clear() is not supported by the cart Element.");s._on("load-error",(function(e){null==r||r("loaderror",{error:e}),null==i||i()})),s._on("ready",(function(){a.frameReady=!0})),fr.forEach((function(e){s._on(e,(function(t){return null==r?void 0:r(e,t)}))})),s._on("lineitemclick",(function(e){var t=e.url,n=!1;r("lineitemclick",{preventDefault:function(){n=!0},url:t}),n||(window.location.href=t)})),s._on("show-start",(function(){a.visible&&(a.showStarted=!0)}));var v=function(){var e,t;null===(e=a.releasePageScroll)||void 0===e||e.call(a),a.releasePageScroll=null,null===(t=a.restoreFocus)||void 0===t||t.call(a).then((function(){a.restoreFocus=null})),a.showStarted=!1,a.visible=!1},g=function(){a.visible||s.updateStyle(yr)};return s._on("hide-start",v),s._on("hide-complete",g),s._on("show",l),{update:function(e){s.update(e)},focus:f,blur:h,clear:y,mount:function(){a.mounted=!0;var e=n();e&&((0,_.mb)(e,[[_r,!0]]),a.runOnUnmount.push((function(){(0,_.mb)(e,[[_r,!1]])})));var t=function(){d()};window.addEventListener("beforeunload",t),a.runOnUnmount.push((function(){return window.removeEventListener("beforeunload",t)}));var r=function(e){"Escape"===e.code&&p()};window.addEventListener("keydown",r),a.runOnUnmount.push((function(){return window.removeEventListener("keydown",r)}))},unmount:function(){for(var e,t;a.runOnUnmount.length;){var n;null===(n=a.runOnUnmount.pop())||void 0===n||n()}null===(e=a.releasePageScroll)||void 0===e||e.call(a),null===(t=a.restoreFocus)||void 0===t||t.call(a),a.mounted=!1,a.releasePageScroll=null,a.restoreFocus=null,s.unmount()},show:l,hide:p,addLineItem:function(e){if(!a.frameReady||!a.mounted)return B.J.resolve({clientError:"initializing"});var t=++a.addRequestIdCounter;return s.addLineItem((0,c.Z)((0,c.Z)({},e),{},{quantity:e.quantity||1,outerRequestId:t})),new B.J((function(e){s._on("add-line-item-response",(function n(r){var o=r.outerRequestId,i=r.error;o===t&&(s._off("add-line-item-response",n),e(i?{error:i}:{}))}))}))},cancelCheckout:d,_frame:s}},br=function(e){var t=e.options,n=(0,d.Z)(e,["options"]),r=t.controller,o=t.publicOptions,i=(t.componentName,(0,d.Z)(t,["controller","publicOptions","componentName"]));if(r.keyMode()===je.Kl.unknown)throw new b.No("It looks like you're using an older Stripe key. The Cart 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 a,s,u,l=(a=o||{},s="elements.create('cart', options)",(0,m.Gu)((0,m.mC)(dr),a,s,u?{authenticatedOrigin:u}:null)),p=l.value,f=p.clientSecret,_=(0,d.Z)(p,["clientSecret"]);l.warnings.forEach((function(e){return r.warn(e)}));var h={},y=function(e,t){return e.forEach((function(e){return r.warn(e)})),B.J.resolve({clientError:t})},v=gr((0,c.Z)((0,c.Z)({},n),{},{options:(0,c.Z)((0,c.Z)({},i),{},{componentName:"cart",controller:r,publicOptions:_})})),g=v.update,w=v.cancelCheckout,k=v.addLineItem,E=(0,d.Z)(v,["update","cancelCheckout","addLineItem"]);return r.action.fetchCartSession({clientSecret:f,groupId:t.groupId}).catch((function(t){e.emitEvent("loaderror",{error:t}),e.selfDestruct()})),(0,c.Z)((0,c.Z)({},E),{},{update:function(e){var t=function(e,t,n){return(0,m.Gu)((0,m.mC)(pr),e,t,n?{authenticatedOrigin:n}:null)}(e||{},"cart.update()"),n=t.value;t.warnings.forEach((function(e){return r.warn(e)})),g(n)},addLineItem:function(e){var t=function(e,t){var n=(0,m.Gu)((0,m.mC)(mr),e,"cart.addLineItem()",t?{authenticatedOrigin:t}:null);return{value:n.value,warnings:n.warnings}}(e||{}),n=t.value,r=t.warnings,o=n.product||n.price;if(o){if(function(e){var t=Date.now(),n=h[e],r=void 0!==n&&t-n<200;return r||(h[e]=t),r}(o))return r.push("addLineItem() cannot be consecutively called within ".concat(200," milliseconds for the same price or product.")),y(r,"throttled")}else r.push("addLineItem() must be provided either a product or price.");return r.length?y(r,"integration"):k(n)},cancelCheckout:function(e){var t="string"==typeof e,n=t?e:"";t||r.warn("Expected a string passed to cancelCheckout(), but received ".concat(typeof e,".")),w(n)}})},wr=["ready","focus","blur","escape"],kr="StripeElement",Er={margin:"0",padding:"0",border:"none",display:"block",background:"transparent",position:"relative",opacity:"1"},Sr={height:"2px",margin:"-4px",width:"calc(100% + 8px)"},Pr=function(e){var t=e.controller,n=e.eventName,r=e.time,o=e.timeLabel,i=e.reject,a=e.validateResolve,c=null,s=!1,u=!1;return c=setTimeout((function(){u=!0,t.warn('Timed out waiting for a call to resolve(). If you listen to "'.concat(n,'" events, then you must call event.resolve in the "').concat(n,'" handler within ').concat(o,".")),i()}),r),function(e){u?t.warn("Call to resolve() was ignored because it has already timed out. Please ensure that resolve is called within ".concat(o,".")):s?t.warn("Call to resolve() was ignored because it has already been called. Do not call resolve more than once."):(c&&clearTimeout(c),s=!0,a(e))}},Ar=Object.freeze({applePay:(0,m.jt)((0,m.kw)("always","auto","never")),googlePay:(0,m.jt)((0,m.kw)("always","auto","never"))}),Cr=Object.freeze({applePay:(0,m.jt)((0,m.kw)("black","white","white-outline")),googlePay:(0,m.jt)((0,m.kw)("black","white")),paypal:(0,m.jt)((0,m.kw)("gold","blue","silver","white","black"))}),Nr=Object.freeze({applePay:(0,m.jt)((0,m.kw)("add-money","book","buy","checkout","continue","contribute","donate","order","pay","plain","reload","rent","subscribe","support","tip","top-up")),googlePay:(0,m.jt)((0,m.kw)("book","buy","checkout","donate","order","pay","plain","subscribe")),paypal:(0,m.jt)((0,m.kw)("paypal","checkout","buynow","pay"))}),Ir=Object.freeze({locale:(0,m.yv)("elements()"),buttonHeight:(0,m.jt)((0,m.rS)(25,55)),layout:(0,m.jt)((0,m.kw)("auto","horizontal","vertical")),paymentMethodOrder:(0,m.jt)((0,m.CT)(m.Z_))}),Tr=((0,c.Z)((0,c.Z)({},Ir),{},{buttonTheme:(0,m.jt)((0,m.mC)(Cr)),buttonType:(0,m.jt)((0,m.mC)(Nr)),wallets:(0,m.jt)((0,m.mC)(Ar))}),Object.freeze({name:m.Z_,amount:(0,m.M2)(0)})),Mr=Object.freeze({unit:(0,m.kw)("hour","day","business_day","week","month"),value:(0,m.M4)(0)}),Rr=Object.freeze({id:m.Z_,amount:(0,m.M2)(0),displayName:m.Z_,deliveryEstimate:(0,m.jt)((0,m.mC)({maximum:(0,m.jt)((0,m.mC)(Mr)),minimum:(0,m.jt)((0,m.mC)(Mr))}))}),jr=Object.freeze({allowedShippingCountries:(0,m.jt)((0,m.CT)(m.hN)),business:(0,m.jt)((0,m.mC)({name:m.Z_})),lineItems:(0,m.jt)((0,m.CT)((0,m.mC)(Tr))),billingAddressRequired:(0,m.Wc)(m.Xg,(function(){return!0})),emailRequired:(0,m.jt)(m.Xg),phoneNumberRequired:(0,m.jt)(m.Xg),shippingAddressRequired:(0,m.jt)(m.Xg),shippingRates:(0,m.jt)((0,m.uw)("id")((0,m.CT)((0,m.mC)(Rr))))}),Or=Object.freeze({lineItems:(0,m.jt)((0,m.CT)((0,m.mC)(Tr))),shippingRates:(0,m.jt)((0,m.uw)("id")((0,m.CT)((0,m.mC)(Rr))))}),Zr=function(e,t){var n=(0,m.Gu)((0,m.mC)(Or),e,"".concat(t," resolve callback")),r=n.value,o=n.warnings,i=r.shippingRates;if(i&&!i.length)throw new b.No("You must specify `shippingRates`.");return{value:r,warnings:o}},xr=1,Lr=function(e,t){if(e){return Ze(e,(function(){t.report("ece.apple_pay.missing_country_code",{country:e.country})}))}},Dr=function(e,t,n){t.report("ece.apple_pay.session_creation_failed",{error:n}),e.abort();var r=n.message;"string"==typeof r&&t.warn(r)},Br=function(e,t,n,r){return{amount:(0,me.Fe)(e,n),label:t,type:r?"pending":"final"}},qr=function(e){return de(e,!1,[]).filter((function(e){return null!==e}))},Fr=function(e,t){var n=e.amount,r=(e.deliveryEstimate,e.displayName),o=e.id;return{label:r,detail:"Arrives in 5 to 7 business days",amount:(0,me.Fe)(n,t),identifier:o}},Ur=function(e){var t=e.controller,n=e.eventHandlers,r=e.groupId,o=e.listenerRegistry,i={isPaymentSheetShowing:!1,total:0,businessName:"",currency:"usd",pending:!1,shippingRates:void 0,allowedShippingCountries:void 0,lineItems:void 0},a=function(e,r){o.addEventListener(e,"validatemerchant",C(function(e){var t=e.privateSession,n=e.controller,r=e.displayName,o=e.isPaymentSheetShowing;return function(e){n.action.createApplePaySession({data:{validation_url:e.validationURL,domain_name:window.location.hostname,display_name:r},usesExpressCheckoutElement:!0}).then((function(e){switch(e.type){case"object":if(!o())return;t.completeMerchantValidation(JSON.parse(e.object.session));break;case"error":Dr(t,n,e.error);break;default:(0,m.Rz)(e)}}),(function(e){return Dr(t,n,e)}))}}({privateSession:e,controller:t,displayName:r,isPaymentSheetShowing:function(){return i.isPaymentSheetShowing}}))),o.addEventListener(e,"cancel",C((function(){i.isPaymentSheetShowing=!1,n.cancel()})));var a=function(){var e=i.total,t=i.businessName,n=i.currency,r=i.pending;return Br(e,t,n,r)},s=function(e){var t=e.lineItems,n=e.shippingRates,r=i.currency,o=i.pending;return{newLineItems:null==t?void 0:t.map((function(e){var t=e.amount,n=e.name;return Br(t,n,r,o)})),newShippingMethods:null==n?void 0:n.map((function(e){return Fr(e,r)}))}};o.addEventListener(e,"shippingcontactselected",C((function(t){var r=function(e){var t=e.administrativeArea,n=e.countryCode;return{city:e.locality||"",state:t||"",postal_code:e.postalCode||"",country:(null==n?void 0:n.toUpperCase())||""}}(t.shippingContact);if(i.allowedShippingCountries&&-1===i.allowedShippingCountries.indexOf(r.country)){var o=a(),c=i.lineItems,u=new window.ApplePayError("shippingContactInvalid","country","We can not ship to this country.");e.completeShippingContactSelection({newTotal:o,newLineItems:c,errors:[u]})}else{var l={paymentMethodType:"apple_pay",name:"",address:r,resolve:function(t){var n=s(t),r=n.newLineItems,o=n.newShippingMethods,c=a();i.lineItems=r||i.lineItems,e.completeShippingContactSelection({newLineItems:i.lineItems,newShippingMethods:o,newTotal:c})},reject:function(){var t=a(),n=i.lineItems,r=new window.ApplePayError("shippingContactInvalid");e.completeShippingContactSelection({newTotal:t,newLineItems:n,errors:[r]})}};n.shippingAddressChange(l)}})));o.addEventListener(e,"shippingmethodselected",C((function(t){var r=t.shippingMethod,o=(0,g.sE)(i.shippingRates||[],(function(e){return e.id===r.identifier}));if(o){var c={paymentMethodType:"apple_pay",shippingRate:o,resolve:function(t){var n=s(t),r=n.newLineItems,o=n.newShippingMethods,c=a();i.lineItems=r||i.lineItems;var u={newLineItems:i.lineItems,newShippingMethods:o,newTotal:c};e.completeShippingMethodSelection(u)},reject:function(){var t=a();e.completeShippingMethodSelection(xr,t,[])}};n.shippingRateChange(c)}else(0,m.Rz)(r,"User selected a new shipping method within the Apple Pay payment sheet, but it was not one of the shipping rates the merchant passed in.")})));o.addEventListener(e,"paymentauthorized",C((function(r){var o=r.payment;t.action.tokenizeWithData({type:"apple_pay",elementName:k.Yj.expressCheckout,tokenData:(0,c.Z)((0,c.Z)({},o),{},{billingContact:Lr(o.billingContact,t)}),mids:t.mids()}).then((function(r){if("error"===r.type){var o=new window.ApplePayError("unknown");return e.completePayment({status:xr,errors:[o]}),void t.report("ece.apple_pay.create_token_failed",{error:r.error})}var a={paymentMethodType:"apple_pay",reject:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.reason,r=void 0===n?"fail":n,o="invalid_shipping_address"===r?[new window.ApplePayError("shippingContactInvalid")]:void 0;e.completePayment({status:xr,errors:o}),i.isPaymentSheetShowing=!1}};n.confirm(a)}))})))};return{showButton:function(){return t.action.showApplePayButton({groupId:r,showApplePayButton:!0})},clickHandler:function(e,n){var r,o,u=window.ApplePaySession;if(u){var l=(null===(r=n.business)||void 0===r?void 0:r.name)||e.businessName,p=e.currency,d=e.pending;i.total=e.amount,i.businessName=l,i.currency=p,i.pending=d,i.shippingRates=n.shippingRates,i.allowedShippingCountries=n.allowedShippingCountries,i.lineItems=null===(o=n.lineItems)||void 0===o?void 0:o.map((function(e){var t=e.amount,n=e.name;return Br(t,n,p,d)}));var m=new u(4,function(e){var t=e.amount,n=e.billingAddressRequired,r=e.businessName,o=e.country,i=e.currency,a=e.emailRequired,c=e.lineItems,u=e.pending,l=e.phoneNumberRequired,p=e.shippingAddressRequired,d=e.shippingRates,m=[].concat((0,s.Z)(a?["email"]:[]),(0,s.Z)(l?["phone"]:[]),(0,s.Z)(p?["postalAddress"]:[])),f=n?["postalAddress"]:[],_=null==d?void 0:d.map((function(e){return Fr(e,i)})),h=null==c?void 0:c.map((function(e){var t=e.amount,n=e.name;return Br(t,n,i,u)}));return{countryCode:o,currencyCode:i.toUpperCase(),lineItems:h,merchantCapabilities:["supports3DS"],requiredBillingContactFields:f,requiredShippingContactFields:m,shippingMethods:_,supportedNetworks:qr(o),total:Br(t,r,i,u)}}((0,c.Z)((0,c.Z)((0,c.Z)({},e),n),{},{businessName:l})));a(m,l),m.begin(),i.isPaymentSheetShowing=!0}else t.warn("User clicked on the Apple Pay button, but window.ApplePaySession does not exist.")},canMakePaymentsWithActiveCard:function(){var e=window.location.hostname,n=t.getCredentials().stripeAccount,r=t.keyMode()===je.Kl.test;return se(e,n,r,t.report,4)}}},Gr=function(e){var t=e.component,n=e.elementTimings,r=e.getParent,o=e.emitEvent,i=e.options,a=e.selfDestruct,s=e.hasRegisteredListener,u=e.listenerRegistry,l=i.controller,p=i.groupId,d=null,f=[],h=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:_t(document.body),publicOptions:a,controllingElement:c};return t.createElementFrame(Be.NC.EXPRESS_CHECKOUT_ELEMENT,n,r,s)}(i);(0,_.yq)(t,(0,c.Z)((0,c.Z)({},Er),{},{margin:"-4px 0",transition:"height .35s ease"})),h.appendTo(t),h.updateStyle(Sr),h._on("set_styles",(function(e){h.updateStyle(e)})),h._on("redirectfocus",(function(e){var n,r=e.focusDirection;null===(n=(0,_.dh)(t,r))||void 0===n||n.focus()})),h._on("load",(function(){h.send({action:"stripe-user-mount",payload:{timestamps:{stripeJsLoad:n.stripeJsLoadTimestamp.getAsPosixTime(),stripeCreate:n.stripeCreateTimestamp.getAsPosixTime(),groupCreate:n.groupCreateTimestamp.getAsPosixTime(),create:n.createTimestamp.getAsPosixTime(),mount:d?d.getAsPosixTime():0},rtl:_t(r())}})}));var y=function(e){var t=e.name,n=e.address,r="shippingaddresschange";if(s(r)){var i=Pr({controller:l,eventName:r,time:29900,timeLabel:"30 seconds",reject:e.reject,validateResolve:function(t){var n=Zr(t,r),o=n.value;n.warnings.forEach((function(e){return l.warn(e)})),e.resolve(o)}});o(r,{name:t,address:n,reject:e.reject,resolve:i})}else e.resolve({})},v=function(e){var t=e.shippingRate,n="shippingratechange";if(s(n)){var r=Pr({controller:l,eventName:n,time:29900,timeLabel:"30 seconds",reject:e.reject,validateResolve:function(t){var r=Zr(t,n),o=r.value;r.warnings.forEach((function(e){return l.warn(e)})),e.resolve(o)}});o(n,{shippingRate:t,reject:e.reject,resolve:r})}else e.resolve({})},g=function(){o("cancel")},w=function(e){var t=e.paymentMethodType,n=e.reject,r=e.billingDetails,i=e.shippingAddress,a=e.shippingRate;o("confirm",{expressPaymentMethodType:t,reject:n,billingDetails:r,shippingAddress:i,shippingRate:a})},k=Ur({controller:l,eventHandlers:{cancel:g,shippingAddressChange:y,shippingRateChange:v,confirm:w},groupId:p,listenerRegistry:u});k.canMakePaymentsWithActiveCard().then((function(e){e&&k.showButton()})),h._on("cancel",g),h._on("click",(function(e){var t=e.paymentMethodType,n="click";if(s(n)){var r=Pr({controller:i.controller,eventName:n,time:900,timeLabel:"1 second",reject:"apple_pay"===t?function(){}:e.reject,validateResolve:function(n){var r=function(e){var t=(0,m.Gu)((0,m.mC)(jr),e,"click resolve callback"),n=t.value,r=t.warnings,o=n.shippingAddressRequired,i=n.shippingRates;if(o&&(!i||!i.length))throw new b.No("When `shippingAddressRequired` is true, you must specify `shippingRates`.");return{value:n,warnings:r}}(n),o=r.value;r.warnings.forEach((function(e){return l.warn(e)})),"apple_pay"===t?k.clickHandler(e,o):e.resolve(o)}});o(n,{paymentMethodType:t,resolve:r})}else"apple_pay"===t?k.clickHandler(e,{}):e.resolve({})})),h._on("shippingaddresschange",y),h._on("shippingratechange",v),h._on("confirm",w);return h._on("load-error",(function(e){o("loaderror",{error:e}),a()})),wr.forEach((function(e){h._on(e,(function(t){return o(e,t)}))})),{update:function(e){h.update(e)},focus:function(){ht(),h.focus(),h.send({action:"stripe-user-focus",payload:{}})},blur:function(){h.blur()},clear:function(){throw new b.No("clear() is not supported by the Express Checkout Element.")},mount:function(){d=new ct.E;var e=r();e&&((0,_.mb)(e,[[kr,!0]]),f.push((function(){(0,_.mb)(e,[[kr,!1]])})))},unmount:function(){for(;f.length;){var e;null===(e=f.pop())||void 0===e||e()}h.unmount()},_frame:h}},Yr=function(e,t){var n=function(e){if(!j.YA[e])throw new Error("Unexpected Element type: ".concat(e,"."));return j.YA[e].implementation}(e);switch(n){case"legacy":return new sn(t);case"affirm_message":return mn(t);case"afterpay_message":return yn(t);case"unified_message":return bn(t);case"frame":return lr(t);case"cart":return br(t);case"express_checkout":return Gr(t);default:return(0,m.Rz)(n,"Unexpected implementation type: ".concat(n,"."))}},zr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,c.Z)((0,c.Z)({},(0,g.ei)(e,["business","fields","paymentMethodOrder","readOnly","terms","wallets","allowedCardBrands","disallowedCardBrands","layout","blockPoBox","accountHolderType","disabled","hideIcon","hidePostalCode","iconStyle","placeholderCountry","rtl","showIcon","supportedCountries","betas","componentName","groupId","locale","loader","externalPaymentMethodTypes"])),e.autocomplete&&{disableAutocomplete:"disabled"===e.autocomplete.mode})},Hr=function(e){function t(e,r,o){var i,a;(0,u.Z)(this,t),(a=n.call(this)).mount=C((function(e){var t;if(a._checkDestroyed(),!e)throw new b.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&&a._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 b.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 b.No("Invalid DOM element. Make sure to call mount() with a valid DOM element or selector.");t=e}if("INPUT"===t.nodeName)throw new b.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&&a._controller.warn("This Element will be mounted to a DOM element that contains child nodes."),a._mountToParent(t)})),a.update=C((function(e){return a._controller.report("update",{options:zr(e),element:a._componentName,element_mode:a._componentMode}),a._checkDestroyed(),a._implementation.update(e),(0,Z.Z)(a)})),a.focus=C((function(e){return a._checkDestroyed(),e&&e.preventDefault(),a._implementation.focus(),(0,Z.Z)(a)})),a.blur=C((function(){return a._checkDestroyed(),a._implementation.blur(),(0,Z.Z)(a)})),a.clear=C((function(){return a._checkDestroyed(),a._implementation.clear(),(0,Z.Z)(a)})),a.collapse=C((function(){if(a._checkDestroyed(),!a._implementation.collapse)throw new b.No("Collapse is not supported by the ".concat(a._componentName," Element."));return a._implementation.collapse(),(0,Z.Z)(a)})),a.show=C((function(){if(a._checkDestroyed(),!a._implementation.show)throw new b.No("show() is not supported by the ".concat(a._componentName," Element."));return a._implementation.show(),(0,Z.Z)(a)})),a.hide=C((function(){if(a._checkDestroyed(),!a._implementation.hide)throw new b.No("hide() is not supported by the ".concat(a._componentName," Element."));return a._implementation.hide(),(0,Z.Z)(a)})),a.addLineItem=C((function(e){if(a._checkDestroyed(),a._implementation.addLineItem)return a._implementation.addLineItem(e);throw new b.No("addLineItem() is not supported by the ".concat(a._componentName," Element."))})),a.cancelCheckout=C((function(e){if(a._checkDestroyed(),!a._implementation.cancelCheckout)throw new b.No("cancelCheckout() is not supported by the ".concat(a._componentName," Element."));return a._implementation.cancelCheckout(e),(0,Z.Z)(a)})),a.unmount=C((function(){return a._checkDestroyed(),a._unmount(),(0,Z.Z)(a)})),a.destroy=C((function(){var e,t;return a._checkDestroyed(),a.unmount(),null===(e=(t=a._implementation).destroy)||void 0===e||e.call(t),a._destroyed=!0,a._emitEvent("destroy"),(0,Z.Z)(a)})),a._getParent=function(){return a._parent},a._emitEvent=function(e,t){if("loaderror"!==e||a._hasRegisteredListener("loaderror")||a._controller.keyMode()!==je.Kl.test||console.error("Unhandled ".concat(a._componentName," Element loaderror"),t),"cart"===a._componentName&&"checkout"===e&&!a._hasRegisteredListener("checkout"))throw new b.No("Unhandled Cart Element checkout event. Make sure to register a checkout handler.");return a._emit(e,(0,c.Z)({elementType:a._componentName},t))},a._cancelCheckout=function(e){"cart"===a._componentName&&a._controller._sendCaReq("cancelCheckout",{errorMessage:e,groupId:a._groupId})};var s=e.controller,l=e.componentName,p=e.groupId,d=e.locale,m=e.betas,f=e.mids;a._controller=s,a._componentName=l,a._componentMode=null===(i=e.publicOptions)||void 0===i?void 0:i.mode,a._destroyed=!1,a._groupId=p,a._mids=f;var _=document.createElement("div");return _.className=j.A2,a._component=_,s.report("create",{options:zr((0,c.Z)({componentName:l,groupId:p,locale:d,betas:m},e.publicOptions)),element:l,element_mode:a._componentMode}),a._implementation=Yr(a._componentName,{options:e,component:_,listenerRegistry:r,elementTimings:o,emitEvent:a._emitEvent,getParent:a._getParent,hasRegisteredListener:a._hasRegisteredListener,selfDestruct:function(){a.destroy()}}),a}(0,x.Z)(t,e);var n=(0,L.Z)(t);return(0,l.Z)(t,[{key:"_checkDestroyed",value:function(){if(this._destroyed)throw new b.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 b.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}(D),Kr=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(Hr.prototype,e,{enumerable:!1,get:function(){return Kr(this,e),this._implementation[e]}})}));["_formSubmit","_isIssuingDisplayElement"].forEach((function(e){Object.defineProperty(Hr.prototype,e,{enumerable:!1,writable:!1,value:function(){return Kr(this,e),this._implementation[e]()}})}));var Jr,Wr=Hr,Vr=(0,m.mC)({locale:(0,m.jt)(m.Z_),appearance:(0,m.jt)(m.Ry)}),Xr=function(e){if(e)return(0,c.Z)((0,c.Z)((0,c.Z)({},e),e.hasOwnProperty("rules")?{rules:""}:null),e.hasOwnProperty("variables")?{variables:""}:null)},Qr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,c.Z)((0,c.Z)((0,c.Z)({},(0,g.ei)(e,["locale","loader","externalPaymentMethodTypes"])),e.hasOwnProperty("fonts")?{fonts:""}:null),{},{appearance:Xr(e.appearance)},e.customerOptions?{customerOptions:{customer:e.customerOptions.customer}}:null)},$r=function e(t,n,r,o,i,a){var l=this;(0,u.Z)(this,e),this.getElement=C((function(e){var t,n=(null!=(t=e)&&t.__elementType&&"string"==typeof t.__elementType&&"function"==typeof t?t.__elementType:null)||e;return O(n,l._betas),(0,g.sE)(l._elements,(function(e){return e._componentName===n}))||null})),this.update=C((function(e){var t=(0,m.Gu)(Vr,e||{},"elements.update()"),n=t.value;t.warnings.forEach((function(e){return l._controller.warn(e)}));var r=n.locale,o=n.appearance,i=void 0===o?void 0:o,a=(0,v.jk)(r,l._betas);a&&l._controller.action.fetchLocale({locale:a}),l._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(a)})),(i||a)&&l._controller.action.updateElementsOptions({locale:a,appearance:i,groupId:l._id})})),this.create=N((function(e,t){var n=new ct.E;!function(e,t,n){if(O(e,n),j.YA[e].unique&&-1!==t.indexOf(e))throw new b.No("Can only create one Element of type ".concat(e,"."));var r=j.YA[e].conflict,o=(0,g.dq)(t,r);if(o.length){var i=o[0];throw new b.No("Cannot create an Element of type ".concat(e," after an Element of type ").concat(i," has already been created."))}}(e,l._elements.map((function(e){return e._componentName})),l._betas);var r=(0,c.Z)((0,c.Z)((0,c.Z)({},t),l._commonOptions),{},{componentName:e,groupId:l._id}),o=(r.paymentRequest,(0,d.Z)(r,["paymentRequest"])),i=(h.P0||h.JW)&&(0,y.qC)(o).length>2e3,a=!!l._pendingFonts||i;if("never"!==l._commonOptions.loader&&!l._isLoaderFrameMounted&&Dn(e)){var u=function(e){return nt||((nt=e.createHiddenFrame(Be.NC.LOADER_UI_APP,{}))._on("generate-loader-ui",(function(e){nt.send({action:"generate-loader-ui",payload:{data:e}})})),nt._on("get-element-loader-ui",(function(e){nt.send({action:"get-element-loader-ui",payload:{data:e}})})),nt)}(l._controller);u._emit("generate-loader-ui",{rawAppearanceConfig:l._commonOptions.appearance}),l._isLoaderFrameMounted=!0}var p=new Wr((0,c.Z)((0,c.Z)({publicOptions:t},l._commonOptions),{},{componentName:e,groupId:l._id,fonts:i?null:l._commonOptions.fonts,controller:l._controller,wait:a,mids:l._mids}),l._listenerRegistry,(0,c.Z)((0,c.Z)({},l._timings),{},{createTimestamp:n}));return l._elements=[].concat((0,s.Z)(l._elements),[p]),p._on("destroy",(function(){l._elements=l._elements.filter((function(t){return t._componentName!==e}))})),i&&p._implementation.update({fonts:l._commonOptions.fonts}),p})),this.fetchUpdates=I((function(){if(l._commonOptions.clientSecret)return l._controller.action.fetchUpdates({clientSecret:l._commonOptions.clientSecret,customerOptions:l._customerOptions,locale:l._commonOptions.locale,groupId:l._id}).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?void 0:r.status)?{error:{message:n,status:r.status}}:{error:{message:n}}}return{}}));throw new b.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}}"})')}));var p=new ct.E,w=(0,m.Gu)(function(e){var t={locale:(0,m.jt)(m.Z_),fonts:(0,m.jt)((0,m.CT)(m.Ry)),appearance:(0,m.jt)(m.Ry),clientSecret:(0,m.jt)(En.Eu),loader:(0,m.jt)((0,m.kw)("auto","always","never")),externalPaymentMethodTypes:(0,m.jt)(kn.iU)};return(0,v.uN)(e,v.M4.elements_customers_beta_1)?(0,m.mC)((0,c.Z)((0,c.Z)({},t),{},{customerOptions:(0,m.jt)((0,m.mC)({customer:m.Z_,ephemeralKey:m.Z_}))})):(0,m.mC)(t)}(o),a||{},"elements()"),k=w.value;w.warnings.forEach((function(e){return t.warn(e)})),(0,_.BO)(t.warn),t.report("elements",{options:Qr(k)}),k.loader||(k.loader="auto");var E=k.fonts,P=void 0===E?[]:E,A=k.locale,T=k.customerOptions,M=void 0===T?null:T,R=(0,d.Z)(k,["fonts","locale","customerOptions"]);this._customerOptions=M;var Z=k.appearance?k.appearance:{};this._elements=[],this._id=(0,f.To)("elements"),this._timings=(0,c.Z)((0,c.Z)({},r),{},{groupCreateTimestamp:p}),this._controller=t,this._betas=o,this._listenerRegistry=n,this._mids=i,this._isLoaderFrameMounted=!1;var x=(0,v.jk)(A,o);this._controller.action.fetchLocale({locale:x||"auto"});var L=P.filter((function(e){return!e.cssSrc||"string"!=typeof e.cssSrc})).map((function(e){return(0,c.Z)((0,c.Z)({},e),{},{__resolveFontRelativeTo:window.location.href})})),D=P.map((function(e){return e.cssSrc})).reduce((function(e,t){return"string"==typeof t?[].concat((0,s.Z)(e),[t]):e}),[]).map((function(e){return(0,y.sD)(e)?e:(0,y.v_)(window.location.href,e)}));return this._pendingFonts=D.length,(0,v.uN)(o,v.M4.payment_element_beta_1)&&!R.clientSecret||t.action.setupStoreForElementsGroup({clientSecret:R.clientSecret,customerOptions:M,loader:k.loader,locale:A,appearance:Z,groupId:this._id,externalPaymentMethodTypes:R.externalPaymentMethodTypes}),this._commonOptions=(0,c.Z)((0,c.Z)({},R),{},{betas:o,appearance:Z,locale:x,fonts:L}),D.forEach((function(e){if("string"==typeof e){var t=new ct.E;S(e).then((function(n){l._controller.report("font.loaded",{load_time:t.getElapsedTime(),font_count:n.length,css_src:e});var r=n.map((function(t){return(0,c.Z)((0,c.Z)({},t),{},{__resolveFontRelativeTo:e})}));l._controller.action.updateCSSFonts({fonts:r,groupId:l._id}),l._commonOptions=(0,c.Z)((0,c.Z)({},l._commonOptions),{},{fonts:[].concat((0,s.Z)(l._commonOptions.fonts?l._commonOptions.fonts:[]),(0,s.Z)(r))})})).catch((function(n){l._controller.report("error.font.not_loaded",{load_time:t.getElapsedTime(),message:n&&n.message&&n.message,css_src:e}),l._controller.warn("Failed to load CSS file at ".concat(e,"."))}))}})),this},eo=function(e,t,n,r,o,i,a){return new lt({controller:e,authentication:t,mids:n,rawOptions:r,betas:o,queryStrategyOverride:i,listenerRegistry:a})},to=(0,m.mC)({name:(0,m.kw)("react-stripe-js","stripe-js","react-stripe-elements"),version:(0,m.AG)(m.Z_),startTime:(0,m.jt)(m.Rx)}),no=(0,m.ci)({name:(0,m.ui)(1,30),partner_id:(0,m.jt)((0,m.xe)("pp_partner_")),version:(0,m.jt)((0,m.ui)(5,15)),url:(0,m.jt)((0,m.ui)(4,60))}),ro=e(248),oo={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"},io=function(e){function n(e){var t;return(0,u.Z)(this,n),t=r.call(this,e),h.s$&&t._listenerRegistry.addEventListener(document,"transitionstart",(function(e){switch(e.propertyName){case"opacity":case"transform":case"visibility":var n=e.target;t._isMounted()&&n.contains(t._iframe)&&t._forceRepaint()}}),{passive:!0}),t}(0,x.Z)(n,e);var r=(0,L.Z)(n);return(0,l.Z)(n,[{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&&(h.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:"_createIFrame",value:function(e,r,o){var i=t((0,Rt.Z)(n.prototype),"_createIFrame",this).call(this,e,r,o);return i.setAttribute("title","Secure payment input frame"),(0,_.yq)(i,oo),i}},{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}}]),n}(Zt),ao=io,co={position:"absolute",left:"0",top:"0",height:"100%",width:"100%"},so=function(e){function n(e){var o,i,a,c=e.type,s=e.controllerId,l=e.listenerRegistry,p=e.options;return(0,u.Z)(this,n),(a=r.call(this,{type:c,controllerId:s,listenerRegistry:l,appParams:p}))._autoMount=function(){a.appendTo(a._backdrop.domElement),a._backdrop.mount()},a.show=function(){a._backdrop.show(),(0,_.yq)(a._iframe,co),a.isVisible=!0},a.fadeInBackdrop=function(){a._backdrop.fadeIn()},a._backdropFadeoutPromise=null,a.fadeOutBackdrop=function(){return a._backdropFadeoutPromise||(a._backdropFadeoutPromise=a._backdrop.fadeOut()),a._backdropFadeoutPromise.then((function(){a._backdropFadeoutPromise=null}))},a.destroy=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=a.fadeOutBackdrop().then((function(){a._backdrop.unmount(),e||t((o=(0,Z.Z)(a),(0,Rt.Z)(n.prototype)),"destroy",o).call(o)}));return e&&t((i=(0,Z.Z)(a),(0,Rt.Z)(n.prototype)),"destroy",i).call(i),a.isVisible=!1,r},a._backdrop=new Ue({lockScrolling:!0,lockFocus:!0,lockFocusOn:a._iframe,listenerRegistry:l}),a._autoMount(),a.isVisible=!1,a}(0,x.Z)(n,e);var r=(0,L.Z)(n);return n}(Zt),uo=so,lo={display:"block",position:"absolute","z-index":"1000",width:"1px","min-width":"100%",margin:"2px 0 0 0",padding:"0",border:"none",overflow:"hidden"},po=function(e){function n(){return(0,u.Z)(this,n),r.apply(this,arguments)}(0,x.Z)(n,e);var r=(0,L.Z)(n);return(0,l.Z)(n,[{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,r,o){var i=t((0,Rt.Z)(n.prototype),"_createIFrame",this).call(this,e,r,o&&"object"==typeof o?(0,c.Z)((0,c.Z)({},o),{},{isSecondaryFrame:!0}):o);return(0,_.yq)(i,lo),i.style.height="0",i}}]),n}(Zt),mo=po,fo=!1,_o=function(e){fo||"null"===(null!=e?e:window.origin)&&(fo=!0,console.error("Stripe.js requires 'allow-same-origin' if sandboxed."))},ho=e(6042),yo="https://maps.googleapis.com/maps/api/js",vo=/^https:\/\/maps\.googleapis\.com\/maps\/api\/js\/?(\?.*)?libraries=(.*,)?places((,|&)+.*)?$/,go=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"}},bo="ADDRESS_AUTOCOMPLETE_PREDICTION_RESULTS",wo="ADDRESS_AUTOCOMPLETE_PLACE_DETAILS",ko=null,Eo=function(e){return null!==ko||(ko=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(yo,'"]'));for(var t in e)if(vo.test(e[t].src))return e[t];return null}();r||(r=function(e){var t=document.createElement("script");return t.src="".concat(yo,"?key=").concat(e,"&libraries=places"),(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)}))),ko},So=function(e,t,n){var r=e.search,o=e.countryRestrictions;var i=function(e){return{predictions:[],status:"error",error:{status:go(e),message:"Google Maps returned an API error"}}};void 0===t||Jr?n.send({action:"google-maps-predictions",payload:{data:{tag:bo,value:i("UNKNOWN_ERROR")}}}):function(e,t){try{t()}catch(t){e.send({action:"google-maps-predictions",payload:{data:{tag:bo,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:bo,value:r}}})}))}))},Po={attachLinkAccountSessionForPayment:null,attachLinkAccountSessionForSetup:null,authenticate3DS2:null,cancelCardImageVerificationChallenge:null,cancelCheckout:null,cancelPaymentIntentSource:null,cancelSetupIntentSource: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,createPaymentPage:null,createPaymentPageWithSession:null,createRadarSession:null,createSourceWithData:null,createSourceWithElement:null,confirmInstantDebitsIncentiveForPaymentDetails:null,fetchingWallets:null,showApplePayButton:null,fetchLocale:null,fetchUpdates:null,localizeError:null,loginWithConsumerInfo:null,lookupLocale:null,refreshPaymentIntent:null,refreshSetupIntent:null,retrieveIssuingCard:null,retrieveIssuingCardWithoutNonce:null,retrieveOrder:null,retrievePaymentIntent:null,retrieveSetupIntent:null,retrieveSource:null,removeElementsExperimentId: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,retrieveLinkConfig:null,checkForLinkClientSecret:null,resolveLocale:null},Ao=!1,Co={},No=function(e,t){return document.activeElement===e._iframe||e._iframe.parentElement&&document.activeElement===t},Io=function(e){return"object"==typeof e&&null!==e&&"IntegrationError"===e.name?new b.No("string"==typeof e.message?e.message:""):e},To=function(){function e(t){var n=this;(0,u.Z)(this,e),this._sendCaReq=function(e,t){var r=(0,f.To)(e),o=new Qe;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,je.lO)(n._apiKey)},this.mids=function(){return n._getMids()},this.action=Object.keys(Po).reduce((function(e,t){return(0,c.Z)((0,c.Z)({},e),{},(0,p.Z)({},t,(function(e){return n._sendCaReq(t,e)})))}),{}),this.createElementFrame=function(e,t,r,o){var i=n._betas,a=new ao({type:e,betas:i,controllerId:n._id,listenerRegistry:n._listenerRegistry,appParams:(0,c.Z)((0,c.Z)({},o),{},{componentName:t,keyMode:(0,je.lO)(n._apiKey),apiKey:n._apiKey})});return n._setupFrame(a,e,r)},this.createSecondaryElementFrame=function(e,t,r,o,i){var a=n._betas,s=new mo({type:e,betas:a,controllerId:n._id,listenerRegistry:n._listenerRegistry,appParams:(0,c.Z)((0,c.Z)({},i),{},{componentName:t,primaryElementType:r,keyMode:(0,je.lO)(n._apiKey)})});return n._setupFrame(s,e,o)},this.createHiddenFrame=function(e,t){var r=new Lt({type:e,betas:n._betas,controllerId:n._id,listenerRegistry:n._listenerRegistry,appParams:t});return n._setupFrame(r,e)},this.getCredentials=function(){return{publishableKey:n._apiKey,stripeAccount:n._stripeAccount,apiVersion:n._apiVersion}},this.createLightboxFrame=function(e){var t=e.type,r=e.options,o=new uo({type:t,controllerId:n._id,listenerRegistry:n._listenerRegistry,options:(0,c.Z)((0,c.Z)({},r),{},{betas:n._betas})}),i="LINK_AUTOFILL_MODAL"===e.type?e.groupId:null;return n._setupFrame(o,t,i)},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-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;r5&&void 0!==arguments[5]?arguments[5]:0;if(k.kO1)throw new b.No("stripe.redirectToCheckout: Do not provide other parameters when providing sessionId. Specify all parameters on your server when creating the CheckoutSession.");if(!/^cs_/.test(i))throw new b.No("stripe.redirectToCheckout: Invalid value for sessionId. You specified '".concat(i,"'."));if("live"===n&&/^cs_test_/.test(i))throw new b.No("stripe.redirectToCheckout: the provided sessionId is for a test mode Checkout Session, whereas Stripe.js was initialized with a live mode publishable key.");if("test"===n&&/^cs_live_/.test(i))throw new b.No("stripe.redirectToCheckout: the provided sessionId is for a live mode Checkout Session, whereas Stripe.js was initialized with a test mode publishable key.");return{tag:"session",sessionId:i}}o.sessionId,o.sku,o.plan;var a=o.items,u=o.lineItems,l=o.successUrl,p=o.cancelUrl,f=o.mode,_=(0,d.Z)(o,["sessionId","sku","plan","items","lineItems","successUrl","cancelUrl","mode"]);if(!u&&!a)throw new b.No("stripe.redirectToCheckout: You must provide one of lineItems, items, or sessionId.");if(!l||!p)throw new b.No("stripe.redirectToCheckout: You must provide successUrl and cancelUrl.");return(0,c.Z)({tag:"no-session",items:a,lineItems:u,successUrl:l,cancelUrl:p,mode:f},_)},ac=function(e,t,n){var r=ic(e,t,n);if("no-session"===r.tag){var o=r.successUrl,i=r.cancelUrl;if(!(0,y.sD)(o))throw new b.No("stripe.redirectToCheckout: successUrl must start with either http:// or https://.");if(!(0,y.sD)(i))throw new b.No("stripe.redirectToCheckout: cancelUrl must start with either http:// or https://.");return r}return r},cc=function(e,t){return"session"===t.tag||null==e||t.locale||-1===["auto"].concat((0,s.Z)(ec)).indexOf(e)?t:(0,c.Z)((0,c.Z)({},t),{},{locale:e})},sc=function(e,t,n){var r=(0,g.sE)(Va,(function(t){return(0,v.uN)(e,t)}));if(t&&t.lineItems&&r)throw new b.No("Prices cannot be used with ".concat(r));if("string"==typeof t&&rc.test(t))throw new b.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 oc(0,t);case"checkout_beta_3":return ic(e,t,n);default:return ac(e,t,n)}},uc=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unknown";return cc(t,sc(e,n,r))},lc=function(e,t){var n=t;return Boolean(!1)&&window.__STRIPE_CHECKOUT_URL_OVERRIDE__&&(n=t.replace(/^https?:\/\/[^/]+\//,window.__STRIPE_CHECKOUT_URL_OVERRIDE__)),(0,Fo.U)(n).then((function(t){return(0,Fo.d)(e,"redirectToCheckout",t),{error:t.error}}))},pc=function(e){switch(e.type){case"object":return{token:e.object};case"error":return{error:e.error};default:return(0,m.Rz)(e)}},dc=function(e){return"object"==typeof e&&null!==e?e:{}},mc=function(e){switch(e.type){case"object":return{radarSession:e.object};case"error":return{error:e.error};default:return(0,m.Rz)(e)}},fc="securitypolicyviolation",_c=window,hc=/^require-trusted-types-for/,yc="LOAD_ERROR",vc="REPORT_ONLY",gc="BLOCKED",bc=new ct.E,wc=document?document.readyState:"unknown",kc=!1;switch(wc){case"loading":kc=!0;break;case"interactive":try{var Ec=function(){kc=!0};setTimeout((function(){document.removeEventListener("DOMContentLoaded",Ec)}),0),document.addEventListener("DOMContentLoaded",Ec)}catch(e){}}var Sc,Pc=!1,Ac=function t(n,r,o,i){if(!Pc||i){Pc=!0;var a=i||new ct.E;if("complete"===document.readyState){var s=null,u=null,l=null,d=null,m=null;if(window.performance){if(window.performance.timing){var f=window.performance.timing,_=f.fetchStart;s=f.domLoading-_,u=f.domInteractive-_,l=f.domComplete-_,d=ct.E.fromPosixTime(_).getElapsedTime(bc)}if(window.performance.getEntriesByType){var h=window.performance.getEntriesByType("resource"),v="https://js.stripe.com/v3/".replace(/\/$/,"");m=h.reduce((function(e,t){if(0===t.name.indexOf(v)){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,c.Z)((0,c.Z)({},e),{},(0,p.Z)({},r,{transfer_size:t.transferSize,duration:Math.round(t.duration)}))}}return e}),{})}}n.report("timings",{element:n.controllerFor(),dom_loading:s,dom_interactive:u,dom_complete:l,since_fetch:d,load_count:1,load_before_dom_content_loaded:kc,load_ready_state:wc,first_create_ready_state:r,first_mount_readyState:o,until_first_create:bc.getElapsedTime(n._createTimestamp),until_first_mount:n._mountTimestamp?bc.getElapsedTime(n._mountTimestamp):null,until_first_load:bc.getElapsedTime(a),resource_timings:m}),setTimeout((function(){new B.J((function(t){if(_c.trustedTypes&&_c.Promise){var n,r=!1,o=function(e){(hc.test(e.effectiveDirective)||hc.test(e.violatedDirective))&&((0,y.vo)(e.blockedURI)||(0,y.vo)(e.sourceFile))&&(r=!0)},i=function(){return r?gc:yc};_c.addEventListener(fc,o);try{n=e.e(913).then(e.bind(e,9554)).then((function(e){return(e.loaded&&r?vc:"ALLOWED")||yc}),i)}catch(e){n=new B.J((function(e){return setTimeout(e,0)})).then(i)}n.then((function(){_c.removeEventListener(fc,o)})),t(n)}else t("NOT_SUPPORTED")})).then((function(e){n.report("trusted_types_check",{result:e}),function(e){switch(e){case vc:case gc:return!0}return!1}(e)&&n.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{t(n,r,o,a)}catch(e){}}))}},Cc=(0,m.mC)({apiKey:m.Z_,stripeAccount:(0,m.jt)(m.Z_),locale:(0,m.jt)(m.Z_),apiVersion:(0,m.jt)(m.Z_),__privateApiUrl:(0,m.jt)(m.Z_),__checkout:(0,m.jt)((0,m.mC)({mids:(0,m.mC)({muid:m.Z_,sid:m.Z_})})),__dashboard:(0,m.jt)(m.Ry),__hosted3DS:(0,m.jt)(m.Xg),canCreateRadarSession:(0,m.jt)(m.Xg),betas:(0,m.jt)((0,m.CT)(m.Z_))}),Nc=function(e){return"You have an in-flight ".concat(e,"! Please be sure to disable your form submit button when ").concat(e," is called.")},Ic=function(e){return function(){throw new b.No("You cannot call `stripe.".concat(e,"` without supplying an appropriate beta flag when initializing Stripe.js."))}},Tc=function(e){return function(){throw new b.No("You cannot call `stripe.".concat(e,"` without supplying an Issuing beta flag when initializing Stripe.js."))}},Mc=function(){function t(e,n){var r=this;(0,u.Z)(this,t),this._listenerRegistry=(0,Mt.E)(),this.elements=C((function(e){return new $r(r._controller,r._listenerRegistry,{stripeJsLoadTimestamp:bc,stripeCreateTimestamp:r._controller._createTimestamp},r._betas,r._mids(),(0,c.Z)((0,c.Z)({},r._locale?{locale:r._locale}:{}),e))}),void 0,"elements"),this.createToken=M((function(e,t){var n=r._mids();return"cvc_update"===e?function(e,t,n){var r=(0,m.rX)(t);if(r&&"cardCvc"===r._componentName){var o=r._implementation._frame.id;return e.action.tokenizeCvcUpdate({frameId:o,mids:n}).then(pc)}throw new b.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,m.rX)(n);if(o){var i=o._implementation._frame.id,a=o._componentName,c=dc(r);return e.action.tokenizeWithElement({frameId:i,elementName:a,tokenData:c,mids:t}).then(pc)}if("string"==typeof n){var s=n,u=dc(r);return e.action.tokenizeWithData({elementName:null,type:s,tokenData:u,mids:t}).then(pc)}throw new b.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=M((function(e,t){var n=(0,m.rX)(e),o=Zo(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,ro.ke)(u)?B.J.reject(new b.No("Please provide Source creation parameters to createSource.")):r._controller.action.createSourceWithElement({frameId:s,elementName:u,type:a,sourceData:c,mids:r._mids()}).then(xo)}return o?a?r._controller.action.createSourceWithData({elementName:null,type:a,sourceData:c,mids:r._mids()}).then(xo):B.J.reject(new b.No("Please provide a source type to createSource.")):B.J.reject(new b.No("Please provide either an Element or Source creation parameters to createSource."))}),void 0,"createSource"),this.retrieveSource=T((function(e){var t=(0,m.Gu)(Do,{source:e},"retrieveSource"),n=t.value;return t.warnings.forEach((function(e){return r._controller.warn(e)})),r._controller.action.retrieveSource(n).then(xo)}),void 0,"retrieveSource"),this.paymentRequest=N((function(e,t){(0,je.pF)(r._keyMode);var n=r._isCheckout&&t?t:null;return eo(r._controller,{apiKey:r._apiKey,accountId:r._stripeAccount},r._mids(),e,r._betas,n,r._listenerRegistry)}),void 0,"paymentRequest");var o=new ct.E,i=(0,m.Gu)(Cc,e||{},"Stripe()"),a=i.value,s=i.warnings;if(function(e){for(var t=0,n=0;n