import{c as n}from"./p-112455b1.js";var e=n((function(n,e){function r(n){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}Object.defineProperty(e,"__esModule",{value:!0});var t,o="https://js.stripe.com/v3",i=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,a="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",u=null,l=function(n){return null!==u?u:u=new Promise((function(e,r){if("undefined"!=typeof window)if(window.Stripe&&n&&console.warn(a),window.Stripe)e(window.Stripe);else try{var t=function(){for(var n=document.querySelectorAll('script[src^="'.concat(o,'"]')),e=0;e<n.length;e++){var r=n[e];if(i.test(r.src))return r}return null}();t&&n?console.warn(a):t||(t=function(n){var e=n&&!n.advancedFraudSignals?"?advancedFraudSignals=false":"",r=document.createElement("script");r.src="".concat(o).concat(e);var t=document.head||document.body;if(!t)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return t.appendChild(r),r}(n)),t.addEventListener("load",(function(){window.Stripe?e(window.Stripe):r(new Error("Stripe.js not available"))})),t.addEventListener("error",(function(){r(new Error("Failed to load Stripe.js"))}))}catch(n){return void r(n)}else e(null)}))},c=function(n,e,r){if(null===n)return null;var t=n.apply(void 0,e);return function(n,e){n&&n._registerWrapper&&n._registerWrapper({name:"stripe-js",version:"1.32.0",startTime:e})}(t,r),t},s=!1,d=function(){for(var n=arguments.length,e=new Array(n),r=0;r<n;r++)e[r]=arguments[r];s=!0;var o=Date.now();return l(t).then((function(n){return c(n,e,o)}))};d.setLoadParameters=function(n){if(s)throw new Error("You cannot change load parameters after calling loadStripe");t=function(n){var e="invalid load parameters; expected object of shape\n\n    {advancedFraudSignals: boolean}\n\nbut received\n\n    ".concat(JSON.stringify(n),"\n");if(null===n||"object"!==r(n))throw new Error(e);if(1===Object.keys(n).length&&"boolean"==typeof n.advancedFraudSignals)return n;throw new Error(e)}(n)},e.loadStripe=d}));export{e as p}