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QAAqBE,IAAjBD,EACH,OAAOA,EAAarH,QAGrB,IAAID,EAASmH,EAAyBE,GAAY,CAGjDpH,QAAS,CAAC,GAOX,OAHAuH,EAAoBH,GAAUrH,EAAQA,EAAOC,QAASmH,GAG/CpH,EAAOC,OACf,C,yDpBtBA,SACA,YACA,YACA,YACA,YAEMF,EAAa,mCAF+B,IAE/B,GAF+B,EAE/B,EAF+B,kbAG9C,WAAYqD,GAAQ,wCACVA,EACV,CAAC,SAHc,CAASqE,EAAAA,aAMgB,oBAAjCC,8BACP,IAAIC,EAAAA,QAAc,IAAI5H,EAAc2H,+BAEO,oBAApCE,kCACP5G,OAAO6G,OAAO9H,EAAcsB,UAAWyG,EAAAA,eAAezG,WACtD,IAAI0G,EAAAA,QAAiB,IAAIhI,EAAc6H,mCAEG,oBAAnCI,gCAC2B,QAAlC,EAAIA,sCAA8B,OAAU,QAAV,EAA9B,EAAgCC,gBAAQ,OAAxC,EAA0CC,eAC1C,IAAIC,EAAAA,QAAkB,IAAIpI,EAAciI,+BAA+BC,SAASC,gBAG9C,oBAA/BE,4BACP,IAAIC,EAAAA,QAAkBlE,EAAAA,OAAQiE,2B","sources":["webpack://woo-stripe-payment/./assets/js/frontend/affirm-messaging/index.js","webpack://woo-stripe-payment/./node_modules/@babel/runtime/helpers/assertThisInitialized.js","webpack://woo-stripe-payment/./node_modules/@babel/runtime/helpers/classCallCheck.js","webpack://woo-stripe-payment/./node_modules/@babel/runtime/helpers/createClass.js","webpack://woo-stripe-payment/./node_modules/@babel/runtime/helpers/defineProperty.js","webpack://woo-stripe-payment/./node_modules/@babel/runtime/helpers/get.js","webpack://woo-stripe-payment/./node_modules/@babel/runtime/helpers/getPrototypeOf.js","webpack://woo-stripe-payment/./node_modules/@babel/runtime/helpers/inherits.js","webpack://woo-stripe-payment/./node_modules/@babel/runtime/helpers/interopRequireDefault.js","webpack://woo-stripe-payment/./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","webpack://woo-stripe-payment/./node_modules/@babel/runtime/helpers/setPrototypeOf.js","webpack://woo-stripe-payment/./node_modules/@babel/runtime/helpers/superPropBase.js","webpack://woo-stripe-payment/./node_modules/@babel/runtime/helpers/typeof.js","webpack://woo-stripe-payment/./assets/js/frontend/affirm-messaging/affirm-cart.js","webpack://woo-stripe-payment/./assets/js/frontend/affirm-messaging/affirm-category.js","webpack://woo-stripe-payment/./assets/js/frontend/affirm-messaging/affirm-checkout.js","webpack://woo-stripe-payment/./assets/js/frontend/affirm-messaging/affirm-product.js","webpack://woo-stripe-payment/./assets/js/frontend/affirm-messaging/base.js","webpack://woo-stripe-payment/external window \"jQuery\"","webpack://woo-stripe-payment/external window [\"wc_stripe\"]","webpack://woo-stripe-payment/webpack/bootstrap"],"sourcesContent":["import {BaseGateway, ProductGateway, stripe} from '@paymentplugins/wc-stripe';\nimport ProductMessaging from './affirm-product';\nimport CartMessaging from './affirm-cart';\nimport CheckoutMessaging from './affirm-checkout';\nimport CategoryMessaging from './affirm-category';\n\nclass AffirmGateway extends BaseGateway {\n constructor(params) {\n super(params);\n }\n};\n\nif (typeof wc_stripe_affirm_cart_params !== 'undefined') {\n new CartMessaging(new AffirmGateway(wc_stripe_affirm_cart_params));\n}\nif (typeof wc_stripe_affirm_product_params !== 'undefined') {\n Object.assign(AffirmGateway.prototype, ProductGateway.prototype);\n new ProductMessaging(new AffirmGateway(wc_stripe_affirm_product_params));\n}\nif (typeof wc_stripe_local_payment_params !== 'undefined') {\n if (wc_stripe_local_payment_params?.gateways?.stripe_affirm) {\n new CheckoutMessaging(new AffirmGateway(wc_stripe_local_payment_params.gateways.stripe_affirm));\n }\n}\nif (typeof wc_stripe_bnpl_shop_params !== 'undefined') {\n new CategoryMessaging(stripe, wc_stripe_bnpl_shop_params);\n}","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;","var superPropBase = require(\"./superPropBase\");\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n module.exports = _get = Reflect.get;\n } else {\n module.exports = _get = function _get(target, property, receiver) {\n var base = superPropBase(target, property);\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nmodule.exports = _get;","function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf;","var setPrototypeOf = require(\"./setPrototypeOf\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits;","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\n\nmodule.exports = _interopRequireDefault;","var _typeof = require(\"@babel/runtime/helpers/typeof\");\n\nvar assertThisInitialized = require(\"./assertThisInitialized\");\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn;","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf;","var getPrototypeOf = require(\"./getPrototypeOf\");\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nmodule.exports = _superPropBase;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","import $ from 'jquery';\nimport AffirmBaseMessage from './base';\n\nclass AffirmCartMessaging extends AffirmBaseMessage {\n\n constructor(...params) {\n super(...params);\n this.initialize();\n }\n\n initialize() {\n $(document.body).on('updated_wc_div', this.updatedHtml.bind(this));\n $(document.body).on('updated_cart_totals', this.updatedHtml.bind(this));\n this.createMessage();\n }\n\n updatedHtml() {\n if (this.gateway.has_gateway_data()) {\n this.createMessage();\n }\n }\n\n getElementContainer() {\n const $el = $('#wc-stripe-affirm-cart-container');\n if (!$el.length) {\n $('.cart_totals table.shop_table > tbody').append('