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EIkC,EAAqBC,KAAsC,gCAAIA,KAAsC,iCAAK,GAC9GD,EAAmBE,QAAQR,EAAqBhI,KAAK,KAAM,IAC3DsI,EAAmBjF,KAAO2E,EAAqBhI,KAAK,KAAMsI,EAAmBjF,KAAKrD,KAAKsI,G,IC/CvF,IAAIG,EAAsB5C,EAAoBM,OAAEH,EAAW,CAAC,MAAM,WAAa,OAAOH,EAAoB,GAAK,IAC/G4C,EAAsB5C,EAAoBM,EAAEsC,E","sources":["webpack://woo-payment-gateway/webpack/runtime/chunk loaded","webpack://woo-payment-gateway/./assets/js/frontend/paypal.js","webpack://woo-payment-gateway/external window \"jQuery\"","webpack://woo-payment-gateway/webpack/bootstrap","webpack://woo-payment-gateway/webpack/runtime/define property getters","webpack://woo-payment-gateway/webpack/runtime/hasOwnProperty shorthand","webpack://woo-payment-gateway/webpack/runtime/make namespace object","webpack://woo-payment-gateway/webpack/runtime/jsonp chunk loading","webpack://woo-payment-gateway/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = function(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 = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\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(function(key) { return __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};","import $ from 'jquery';\nimport {loadScript} from '@paypal/paypal-js';\n\n/**\n * @constructor\n */\nfunction PayPal() {\n wc_braintree.PayPal.call(this);\n}\n\n/**\n *\n */\nPayPal.prototype = $.extend(\n {},\n wc_braintree.PayPal.prototype,\n wc_braintree.CheckoutGateway.prototype,\n {\n params: wc_braintree_paypal_checkout_params\n }\n);\n\n/**\n *\n */\nPayPal.prototype.initialize = function () {\n wc_braintree.CheckoutGateway.call(this);\n}\n\n/**\n *\n */\nPayPal.prototype.create_instance = function () {\n this.paypalScriptPromise = loadScript(this.params.query_params).then(paypal => {\n return wc_braintree.PayPal.prototype.create_instance.apply(this, arguments).then(function () {\n if (this.banner_enabled && $(this.banner_container).length) {\n $('.wc-braintree-paypal-top-container').remove();\n $(this.banner_container).prepend('
');\n var render_options = this.render_options();\n paypal.Buttons($.extend({}, this.render_options(paypal.FUNDING.PAYPAL), {\n onInit: function () {\n\n }.bind(this),\n onClick: function () {\n this.set_payment_method(this.gateway_id);\n this.set_use_nonce_option(true);\n $('[name=\"terms\"]').prop('checked', true).trigger('change');\n render_options.onClick.apply(this, arguments);\n this.processingBannerCheckout = true;\n }.bind(this),\n onCancel: function () {\n this.processingBannerCheckout = false;\n }.bind(this)\n })).render('.wc-braintree-paypal-top-container');\n }\n $('.wc_braintree_banner_gateways').addClass('paypal-active');\n $(document.body).on('wc_braintree_payment_method_selected', this.payment_gateway_changed.bind(this));\n $(document.body).on('wc_braintree_display_saved_methods', this.display_saved_methods.bind(this));\n $(document.body).on('wc_braintree_display_new_payment_method', this.display_new_payment_method_container.bind(this));\n $(document.body).on('change', '[name=\"terms\"]', this.handle_terms_click.bind(this));\n $(document.body).on('change', '[type=\"checkbox\"]', this.handle_checkbox_change.bind(this));\n setTimeout(this.create_button.bind(this), 5000);\n setInterval(wc_braintree.PayPal.prototype.create_button.bind(this), 5000);\n }.bind(this)).catch(function (error) {\n throw error;\n }.bind(this));\n }).catch(error => {\n console.log(error);\n });\n\n return this.paypalScriptPromise;\n}\n\n/**\n *\n */\nPayPal.prototype.create_button = function () {\n wc_braintree.PayPal.prototype.create_button.call(this).then(function () {\n this.payment_gateway_changed(null, this.get_selected_gateway());\n this.create_bnpl_msg('checkout', 'form.checkout .shop_table');\n }.bind(this))\n}\n\n/**\n *\n */\nPayPal.prototype.render_options = function () {\n var render_options = wc_braintree.PayPal.prototype.render_options.apply(this, arguments);\n var options = $.extend({}, render_options, {\n onInit: function () {\n render_options.onInit.apply(this, arguments);\n this.handle_terms_click();\n }.bind(this),\n onClick: function () {\n this.processingBannerCheckout = false;\n this.fields.fromFormToFields();\n if (!this.is_valid_checkout()) {\n return this.submit_error(this.params.messages.terms);\n }\n render_options.onClick.apply(this, arguments);\n }.bind(this)\n });\n return options;\n}\n\nPayPal.prototype.handle_tokenize_response = function (response) {\n if (this.needs_shipping()) {\n // set nonce and other data just in case other plugins prevent updated_checkout from firing\n this.tokenize_response = response;\n this.set_nonce(response.nonce);\n this.set_device_data();\n this.payment_method_received = true;\n $(document.body).one('updated_checkout', function () {\n this.on_payment_method_received.call(this, response);\n }.bind(this));\n this.update_addresses(response.details);\n this.maybe_set_ship_to_different();\n this.fields.toFormFields({update_shipping_method: false});\n $(document.body).trigger('update_checkout', {update_shipping_method: false});\n } else {\n wc_braintree.PayPal.prototype.handle_tokenize_response.call(this, response);\n }\n}\n\n/**\n * Return allowed and disallowed payment methods for the PayPal button.\n */\nPayPal.prototype.get_funding = function () {\n var funding = [];\n if (this.params.card_icons === \"1\") {\n funding.push(paypal.FUNDING.CARD);\n }\n if (this.is_credit_enabled('checkout')) {\n funding.push(paypal.FUNDING.PAYLATER);\n funding.push(paypal.FUNDING.CREDIT);\n }\n return funding.concat(wc_braintree.PayPal.prototype.get_funding.apply(this, arguments));\n}\n\nPayPal.prototype.on_payment_method_received = function () {\n wc_braintree.CheckoutGateway.prototype.on_payment_method_received.apply(this, arguments);\n if (this.validate_checkout_fields()) {\n if (!this.needs_shipping()) {\n this.get_form().trigger('submit');\n } else {\n var address = this.get_address_object(this.get_shipping_prefix(), ['phone']);\n if ($('[name^=\"shipping_method\"]').length < 2 || JSON.stringify(this.shipping_address) == JSON.stringify(address)) {\n this.get_form().trigger('submit');\n } else {\n if (this.processingBannerCheckout) {\n this.scroll_to_place_order();\n }\n }\n }\n }\n}\n\nPayPal.prototype.scroll_to_place_order = function () {\n $('html, body').animate({\n scrollTop: $('#place_order').offset().top - 100\n }, 1000);\n}\n\nPayPal.prototype.handle_terms_click = function () {\n if ($('[name=\"terms\"]').length) {\n var checked = $('[name=\"terms\"]').is(':checked');\n if (checked) {\n this.actions.enable();\n } else {\n this.actions.disable();\n }\n }\n}\n\nPayPal.prototype.handle_checkbox_change = function () {\n setTimeout(this.handle_terms_click.bind(this), 250);\n}\n\nPayPal.prototype.needs_shipping = function () {\n if (this.processingBannerCheckout) {\n return wc_braintree.BaseGateway.prototype.needs_shipping.call(this);\n }\n return false;\n}\n\nPayPal.prototype.updated_checkout = function (e, data) {\n if (data?.fragments?.paypal_query_args) {\n const args = data.fragments.paypal_query_args;\n const oldValues = `${this.params.query_params.vault}-${this.params.query_params.currency}`;\n const newValues = `${args.vault}-${args.currency}`;\n this.params.query_params = {...this.params.query_params, ...data.fragments.paypal_query_args};\n this.params.options = {...this.params.options, ...data.fragments.paypal_options};\n if (oldValues !== newValues) {\n return loadScript(this.params.query_params).then(() => {\n wc_braintree.CheckoutGateway.prototype.updated_checkout.call(this);\n });\n }\n }\n if (this.paypalScriptPromise) {\n this.paypalScriptPromise.then(() => {\n wc_braintree.CheckoutGateway.prototype.updated_checkout.call(this);\n });\n }\n}\n\nwc_braintree.register(PayPal);","module.exports = window[\"jQuery\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t129: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkwoo_payment_gateway\"] = self[\"webpackChunkwoo_payment_gateway\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [216], function() { return __webpack_require__(30); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","PayPal","wc_braintree","call","this","prototype","$","extend","CheckoutGateway","params","wc_braintree_paypal_checkout_params","initialize","create_instance","paypalScriptPromise","loadScript","query_params","then","paypal","apply","arguments","banner_enabled","banner_container","length","remove","prepend","render_options","Buttons","FUNDING","PAYPAL","onInit","bind","onClick","set_payment_method","gateway_id","set_use_nonce_option","prop","trigger","processingBannerCheckout","onCancel","render","addClass","document","body","on","payment_gateway_changed","display_saved_methods","display_new_payment_method_container","handle_terms_click","handle_checkbox_change","setTimeout","create_button","setInterval","catch","error","console","log","get_selected_gateway","create_bnpl_msg","options","fields","fromFormToFields","is_valid_checkout","submit_error","messages","terms","handle_tokenize_response","response","needs_shipping","tokenize_response","set_nonce","nonce","set_device_data","payment_method_received","one","on_payment_method_received","update_addresses","details","maybe_set_ship_to_different","toFormFields","update_shipping_method","get_funding","funding","card_icons","push","CARD","is_credit_enabled","PAYLATER","CREDIT","concat","validate_checkout_fields","address","get_address_object","get_shipping_prefix","JSON","stringify","shipping_address","get_form","scroll_to_place_order","animate","scrollTop","offset","top","is","actions","enable","disable","BaseGateway","updated_checkout","e","data","fragments","paypal_query_args","args","oldValues","vault","currency","newValues","paypal_options","register","module","exports","window","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","m","O","result","chunkIds","fn","priority","notFulfilled","Infinity","i","fulfilled","j","Object","keys","every","key","splice","r","d","definition","o","defineProperty","enumerable","get","obj","hasOwnProperty","Symbol","toStringTag","value","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","id","chunkLoadingGlobal","self","forEach","__webpack_exports__"],"sourceRoot":""}