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,OAAQ8C,2BAA4B,CACpD5C,GAAI,kBACJjI,YAAAA,EACAC,YAAa,SAACa,GAAa,IAChBoF,EAAYpF,EAASkH,KAArB9B,SACP,OAAOpF,EAASkH,KAAK2C,gBAAgBI,oBAAoBpC,SAASzC,EACtE,EACAoC,mBAAoB,SAACxH,EAAUuH,GAC3B,IAAMvB,EAAQuB,EAAQvB,MACfZ,EAAYpF,EAASkH,KAArB9B,SACA8E,EAAkBlK,EAASkH,KAAK2C,gBAAhCK,eAAc,gBACOlK,EAASkH,KAAKlH,EAASmH,IAAIgD,eAAe/E,GAAS,GAA/DgF,GAAF,KAAK,MAAEC,EAAG,KACxB,OAAQH,GAAkBE,GAAOpE,GAASA,GAASqE,CACvD,G","sources":["webpack://woo-stripe-payment/./assets/js/frontend/bnpl-messages/afterpay/index.js","webpack://woo-stripe-payment/./node_modules/@babel/runtime/helpers/arrayLikeToArray.js","webpack://woo-stripe-payment/./node_modules/@babel/runtime/helpers/arrayWithHoles.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/iterableToArrayLimit.js","webpack://woo-stripe-payment/./node_modules/@babel/runtime/helpers/nonIterableRest.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/slicedToArray.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/./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","webpack://woo-stripe-payment/./assets/js/frontend/bnpl-messages/abstract-message.js","webpack://woo-stripe-payment/./assets/js/frontend/bnpl-messages/afterpay/afterpay-mixin.js","webpack://woo-stripe-payment/./assets/js/frontend/bnpl-messages/cart-message.js","webpack://woo-stripe-payment/./assets/js/frontend/bnpl-messages/category-message.js","webpack://woo-stripe-payment/./assets/js/frontend/bnpl-messages/checkout-message.js","webpack://woo-stripe-payment/./assets/js/frontend/bnpl-messages/product-message.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 CartMessage from '../cart-message';\nimport CheckoutMessage from '../checkout-message';\nimport CategoryMessage from '../category-message';\nimport ProductMessage from '../product-message';\nimport Mixin from './afterpay-mixin';\n\nconst elementType = 'afterpayClearpayMessage';\nconst isSupported = (gateway) => {\n return true;\n}\n\nclass AfterpayGateway extends BaseGateway {\n constructor(params) {\n super(params);\n }\n};\n\nif (typeof wc_stripe_afterpay_cart_params !== 'undefined') {\n const clazz = Mixin(CartMessage);\n new clazz(new AfterpayGateway(wc_stripe_afterpay_cart_params), {\n elementType,\n elementId: 'wc-stripe-afterpay-cart-msg',\n containerId: 'wc-stripe-afterpay-cart-container',\n isSupported\n });\n}\nif (typeof wc_stripe_afterpay_product_params !== 'undefined') {\n Object.assign(AfterpayGateway.prototype, ProductGateway.prototype);\n new ProductMessage(new AfterpayGateway(wc_stripe_afterpay_product_params), {\n elementType,\n elementId: 'wc-stripe-afterpay-product-msg',\n isSupported\n });\n}\nif (typeof wc_stripe_local_payment_params !== 'undefined') {\n if (wc_stripe_local_payment_params?.gateways?.stripe_afterpay) {\n const clazz = Mixin(CheckoutMessage);\n new clazz(new AfterpayGateway(wc_stripe_local_payment_params.gateways.stripe_afterpay), {\n elementType,\n elementId: 'wc-stripe-afterpay-message-container',\n isSupported\n });\n }\n}\nif (typeof wc_stripe_bnpl_shop_params !== 'undefined') {\n new CategoryMessage(stripe, wc_stripe_bnpl_shop_params, {\n id: 'stripe_afterpay',\n elementType,\n isSupported: (instance) => {\n const {currency} = instance.data;\n return instance.data.stripe_afterpay.supportedCurrencies.includes(currency);\n },\n isSupportedProduct: (instance, product) => {\n const price = product.price;\n const {currency} = instance.data;\n const {hideIneligible} = instance.data.stripe_afterpay;\n const [country, min, max] = instance.data[instance.id].requiredParams[currency];\n return !hideIneligible || min <= price && price <= max;\n }\n });\n}","function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;","function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;","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;","function _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableRest;","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 arrayWithHoles = require(\"./arrayWithHoles\");\n\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nvar nonIterableRest = require(\"./nonIterableRest\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;","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;","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray;","class AbstractMessage {\n\n constructor(\n gateway,\n {\n elementType = '',\n elementId = '',\n isSupported = () => true\n }\n ) {\n this.gateway = gateway;\n this.elementType = elementType;\n this.elementId = elementId;\n this.isSupported = isSupported;\n this.msgElement = null;\n }\n\n getElementType() {\n return this.elementType;\n }\n\n createMessage() {\n if (this.isSupported(this.gateway) && this.createMessageElement()) {\n const el = this.getElementContainer();\n if (el) {\n this.mount(el);\n }\n }\n }\n\n createMessageElement() {\n try {\n if (this.msgElement) {\n this.msgElement.update(this.getMessageOptions());\n } else {\n this.msgElement = this.gateway?.elements?.create(this.getElementType(), this.getMessageOptions());\n }\n } catch (error) {\n //console.log(error);\n }\n return this.msgElement;\n }\n\n getMessageOptions() {\n return {\n amount: this.getTotalPriceCents(),\n currency: this.gateway.get_currency(),\n ...this.gateway.params.messageOptions\n }\n }\n\n mount(el) {\n try {\n this.msgElement.mount(el);\n } catch (error) {\n console.log(error);\n }\n\n }\n\n getElementContainer() {\n\n }\n\n getTotalPriceCents() {\n return this.gateway.get_gateway_data()?.total_cents;\n }\n\n getTotalPrice() {\n return this.gateway.get_gateway_data()?.total;\n }\n}\n\nexport default AbstractMessage;","export default function (Base) {\n return class Afterpay extends Base {\n\n getMessageOptions() {\n return {\n ...super.getMessageOptions(),\n isEligible: this.isEligible(this.getTotalPrice())\n }\n }\n\n isEligible(price) {\n return (price >= this.getMin() && price <= this.getMax());\n }\n\n getMin() {\n const currency = this.gateway.get_currency();\n const params = this.gateway.params.requirements[currency];\n return params ? params[1] : 0;\n }\n\n getMax() {\n const currency = this.gateway.get_currency();\n const params = this.gateway.params.requirements[currency];\n return params ? params[2] : 0;\n }\n }\n}\n\n","import $ from 'jquery';\nimport AbstractMessage from './abstract-message';\n\nclass CartMessage extends AbstractMessage {\n\n constructor(gateway, props) {\n super(gateway, props);\n this.containerId = props.containerId;\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 = $(`#${this.elementId}`);\n if (!$el.length) {\n $('.cart_totals table.shop_table > tbody').append(`