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pF,EAAE+G,EAAa1B,KACrCD,EAAoBK,EAAEJ,GAAY0B,EAAY1B,IAGhD,GAAG2B,EAAS,IAAI/D,EAAS+D,EAAQ5B,EAClC,CAEA,IADG0B,GAA4BA,EAA2B7E,GACrD+D,EAAIL,EAAS9D,OAAQmE,IACzBY,EAAUjB,EAASK,GAChBZ,EAAoBpF,EAAE2G,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAOxB,EAAoBM,EAAEzC,EAAO,EAGjCiE,EAAqBC,KAAkC,4BAAIA,KAAkC,6BAAK,GACtGD,EAAmBE,QAAQP,EAAqBpF,KAAK,KAAM,IAC3DyF,EAAmBG,KAAOR,EAAqBpF,KAAK,KAAMyF,EAAmBG,KAAK5F,KAAKyF,G,KC7CvF,IAAII,EAAsBlC,EAAoBM,OAAEH,EAAW,CAAC,KAAK,IAAOH,EAAoB,OAC5FkC,EAAsBlC,EAAoBM,EAAE4B,I","sources":["webpack://wcStripeModules/webpack/runtime/chunk loaded","webpack://wcStripeModules/./assets/js/frontend/bnpl-messages/abstract-message.js","webpack://wcStripeModules/./assets/js/frontend/bnpl-messages/cart-message.js","webpack://wcStripeModules/./assets/js/frontend/bnpl-messages/category-message.js","webpack://wcStripeModules/./assets/js/frontend/bnpl-messages/checkout-message.js","webpack://wcStripeModules/./assets/js/frontend/bnpl-messages/index.js","webpack://wcStripeModules/./assets/js/frontend/bnpl-messages/product-message.js","webpack://wcStripeModules/external window \"jQuery\"","webpack://wcStripeModules/webpack/bootstrap","webpack://wcStripeModules/webpack/runtime/hasOwnProperty shorthand","webpack://wcStripeModules/webpack/runtime/jsonp chunk loading","webpack://wcStripeModules/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","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 if (this.gateway.elements) {\n const {locale = 'auto', appearance = {}} = this.gateway.params.elementOptions;\n const elements = this.gateway.stripe.elements({locale, appearance});\n this.msgElement = elements.create(this.getElementType(), this.getMessageOptions());\n }\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;","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(`