(()=>{"use strict";var e={103:e=>{e.exports=window.wcStripeModules.checkoutModules},622:e=>{e.exports=window.wcStripeModules.messageModules},705:e=>{e.exports=window.wc_stripe}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}(()=>{function e(t){return e="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},e(t)}var t=r(705),n=r(103),o=r(622);function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(t){var r=function(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,"string");if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==e(r)?r:r+""}function u(t,r,n){return r=p(r),function(t,r){if(r&&("object"===e(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(t,c()?Reflect.construct(r,n||[],p(t).constructor):r.apply(t,n))}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}var f,l="affirmMessage",y=function(e){var t,r,n=null==e||null===(t=e.get_gateway_data())||void 0===t?void 0:t.currency;return null==e||null===(r=e.params)||void 0===r||null===(r=r.supportedCurrencies)||void 0===r?void 0:r.includes(n)},d=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),u(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(t,e),r=t,(n=[{key:"get_element_options",value:function(){return{}}}])&&i(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(t.BaseGateway);"undefined"!=typeof wc_stripe_affirm_cart_params&&new o.CartMessage(new d(wc_stripe_affirm_cart_params),{elementType:l,elementId:"wc-stripe-affirm-cart-msg",containerId:"wc-stripe-affirm-cart-container",isSupported:y}),"undefined"!=typeof wc_stripe_affirm_product_params&&(Object.assign(d.prototype,t.ProductGateway.prototype),new o.ProductMessage(new d(wc_stripe_affirm_product_params),{elementType:l,elementId:"wc-stripe-affirm-product-msg",isSupported:y})),"undefined"!=typeof wc_stripe_local_payment_params&&null!==(f=wc_stripe_local_payment_params)&&void 0!==f&&null!==(f=f.gateways)&&void 0!==f&&f.stripe_affirm&&new o.CheckoutMessage((0,n.getPaymentMethod)("stripe_affirm"),{elementType:l,elementId:"wc-stripe-affirm-message-container",isSupported:y}),"undefined"!=typeof wc_stripe_bnpl_shop_params&&new o.CategoryMessage(t.stripe,wc_stripe_bnpl_shop_params,{id:"stripe_affirm",elementType:l,isSupported:function(e){var t=e.data.currency;return e.data.stripe_affirm.supportedCurrencies.includes(t)}})})(),(this.wcStripeModules=this.wcStripeModules||{}).affirmMessage={}})();
//# sourceMappingURL=affirm-message.js.map