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QAAU,iBAAmBA,OAAOC,SAAW,SAAUpI,GAC7F,cAAcA,CAChB,EAAI,SAAUA,GACZ,OAAOA,GAAO,mBAAqBmI,QAAUnI,EAAIgI,cAAgBG,QAAUnI,IAAQmI,OAAOzB,UAAY,gBAAkB1G,CAC1H,EAAGmJ,EAAQnJ,EACb,CCNe,SAASoJ,EAA2B9X,EAAMyV,GACvD,GAAIA,IAA2B,WAAlBoC,EAAQpC,IAAsC,mBAATA,GAChD,OAAOA,EACF,QAAa,IAATA,EACT,MAAM,IAAIhB,UAAU,4DAGtB,OCTa,SAAgCzU,GAC7C,QAAa,IAATA,EACF,MAAM,IAAI+X,eAAe,6DAG3B,OAAO/X,CACT,CDGS,CAAsBA,EAC/B,C,iQENe,SAASgY,EAAe/D,EAAKE,GAC1C,OAAO,OAAeF,KAAQ,OAAqBA,EAAKE,KAAM,OAA2BF,EAAKE,KAAM,QACtG,C,qFCLe,SAAS8D,EAA4B/B,EAAGgC,GACrD,GAAKhC,EAAL,CACA,GAAiB,iBAANA,EAAgB,OAAO,OAAiBA,EAAGgC,GACtD,IAAIC,EAAIvT,OAAOwQ,UAAUgD,SAAS3C,KAAKS,GAAGmC,MAAM,GAAI,GAEpD,MADU,WAANF,GAAkBjC,EAAEQ,cAAayB,EAAIjC,EAAEQ,YAAYvL,MAC7C,QAANgN,GAAqB,QAANA,EAAoB9M,MAAMiN,KAAKpC,GACxC,cAANiC,GAAqB,2CAA2CI,KAAKJ,IAAW,OAAiBjC,EAAGgC,QAAxG,CALc,CAMhB,C","sources":["webpack://wcPPCP/./assets/js/paylater-message/base.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://wcPPCP/./assets/js/paylater-message/cart.js","webpack://wcPPCP/./assets/js/paylater-message/checkout.js","webpack://wcPPCP/./assets/js/paylater-message/minicart.js","webpack://wcPPCP/./assets/js/paylater-message/product.js","webpack://wcPPCP/./assets/js/paylater-message/shop.js","webpack://wcPPCP/./assets/js/payments/classes/class-base-gateway.js","webpack://wcPPCP/./assets/js/payments/classes/class-checkout-gateway.js","webpack://wcPPCP/./assets/js/payments/classes/class-cart-gateway.js","webpack://wcPPCP/./assets/js/payments/classes/class-product-gateway.js","webpack://wcPPCP/./assets/js/payments/classes/class-minicart-gateway.js","webpack://wcPPCP/./assets/js/ppcp/paypal-cart.js","webpack://wcPPCP/./assets/js/ppcp/paypal-checkout.js","webpack://wcPPCP/./assets/js/ppcp/paypal-express-checkout.js","webpack://wcPPCP/./assets/js/ppcp/paypal-minicart.js","webpack://wcPPCP/./assets/js/ppcp/paypal-product.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/superPropBase.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/get.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/inherits.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/slicedToArray.js","webpack://wcPPCP/./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js"],"sourcesContent":["import $ from 'jquery';\nimport {getPaymentMethod, getSetting, loadPayPalSdk} from \"@ppcp/utils\";\nimport {defaultHooks} from \"@wordpress/hooks\";\n\nclass PayLaterBaseMessage {\n\n constructor(context, {queryParams}) {\n this.context = context;\n this.queryParams = queryParams;\n defaultHooks.addAction('paypalInstanceCreated', 'wcPPCP', this.paypalInstanceCreated.bind(this));\n }\n\n paypalInstanceCreated(paypal, queryParams) {\n if (this.paypal !== paypal) {\n this.paypal = paypal;\n this.queryParams = queryParams;\n this.createMessage();\n }\n }\n\n isCheckoutFlow() {\n return this.queryParams?.vault !== 'true';\n }\n\n initialize() {\n this.createMessage();\n }\n\n createMessage() {\n const container = this.getMessageContainer();\n if (container) {\n if (this.isCheckoutFlow() && this.isActive()) {\n this.showContainer(container);\n const params = {\n amount: this.getTotal(),\n currency: this.getCurrency(),\n placement: this.getPlacement(),\n style: this.getStyleOptions(this.context),\n onRender: () => {\n // ensure the iframe is visible. PayPal has a bug that causes messaging to not render sometimes.\n container?.querySelector('iframe')?.style.setProperty('width', '100%');\n container?.querySelector('iframe')?.style.setProperty('opacity', '1 !important');\n }\n };\n this.paypal.Messages(params).render(container);\n } else {\n this.hideMessage(container);\n }\n }\n }\n\n showContainer(container) {\n $(container).closest('.wc-ppcp-paylater-msg__container').show();\n }\n\n hideMessage(container) {\n $(container).closest('.wc-ppcp-paylater-msg__container').hide();\n }\n\n getMessageContainer() {\n\n }\n\n getStyleOptions(context) {\n return getSetting('payLaterMessage')?.[context]?.style;\n }\n\n getSetting(key) {\n return getSetting('payLaterMessage')?.[key];\n }\n\n getTotal() {\n return 0;\n }\n\n getPlacement() {\n return '';\n }\n\n getCurrency() {\n return this.queryParams?.currency;\n }\n\n isActive() {\n return getSetting('payLaterMessage').enabled;\n }\n}\n\nexport default PayLaterBaseMessage;","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}","import $ from 'jquery';\nimport PayLaterBaseMessage from \"./base\";\nimport cart from '@ppcp/cart';\nimport {loadPayPalSdk, getPayPalQueryParams} from \"@ppcp/utils\";\n\nclass PayLaterMessageCart extends PayLaterBaseMessage {\n constructor(paypal, cart, props) {\n super('cart', props);\n this.paypal = paypal;\n this.cart = cart;\n this.initialize();\n }\n\n initialize() {\n super.initialize();\n this.cart.on('cartUpdated', this.refreshMessage.bind(this));\n }\n\n async refreshMessage() {\n this.createMessage();\n }\n\n getTotal() {\n return this.cart.getTotal();\n }\n\n getMessageContainer() {\n const location = this.getSetting('cartLocation');\n let el;\n switch (location) {\n case 'shop_table':\n el = document.getElementById('wc-ppcp-paylater-msg-cart');\n break;\n case 'above_button':\n el = document.getElementById('wc-ppcp-cart-button-container');\n if (el) {\n $(el).prepend('
');\n el = document.getElementById('wc-ppcp-paylater-msg-cart');\n }\n }\n return el;\n }\n\n getPlacement() {\n return 'cart';\n }\n}\n\nconst queryParams = getPayPalQueryParams();\n\nloadPayPalSdk(queryParams).then(paypal => {\n new PayLaterMessageCart(paypal, cart, {queryParams});\n}).catch(error => {\n});\n\nexport {PayLaterMessageCart}","import $ from 'jquery';\nimport PayLaterBaseMessage from \"./base\";\nimport {getPayPalQueryParams, loadPayPalSdk} from \"@ppcp/utils\";\nimport cart from '@ppcp/cart';\n\nclass PayLaterMessageCheckout extends PayLaterBaseMessage {\n constructor(paypal, cart, props) {\n super('checkout', props);\n this.paypal = paypal;\n this.cart = cart;\n this.initialize();\n }\n\n initialize() {\n this.cart.on('updatedCheckout', this.createMessage.bind(this), 20);\n super.initialize();\n }\n\n getMessageContainer() {\n const fk = this.getSetting('checkoutLocation');\n let el;\n switch (fk) {\n case 'shop_table':\n el = document.getElementById('wc-ppcp-paylater-msg-checkout');\n break;\n case 'above_button':\n el = document.querySelector('.wc-ppcp-checkout-container');\n if (el) {\n $(el).prepend('
');\n el = document.getElementById('wc-ppcp-paylater-msg-checkout');\n } else {\n setTimeout(this.createMessage.bind(this), 500);\n }\n }\n return el;\n }\n\n getPlacement() {\n return 'payment';\n }\n\n getTotal() {\n return this.cart.getTotal();\n }\n}\n\nloadPayPalSdk().then(paypal => {\n new PayLaterMessageCheckout(paypal, cart, {queryParams: getPayPalQueryParams()});\n})\n\nexport default PayLaterMessageCheckout;\n\nexport {PayLaterMessageCheckout}\n","import $ from 'jquery';\nimport PayLaterBaseMessage from \"./base\";\nimport cart from '@ppcp/cart';\nimport {loadPayPalSdk, getPayPalQueryParams} from \"@ppcp/utils\";\n\nclass PayLaterMessageMiniCart extends PayLaterBaseMessage {\n\n constructor(paypal, cart, props) {\n super('minicart', props);\n this.paypal = paypal;\n this.cart = cart;\n this.initialize();\n }\n\n initialize() {\n super.initialize();\n this.cart.on('fragmentsChanged', this.createMessage.bind(this));\n }\n\n getMessageContainer() {\n let el = null;\n $('#wc-ppcp-minicart-msg').remove();\n switch (this.getSetting('miniCartLocation')) {\n case 'cart_total':\n el = document.querySelector('.woocommerce-mini-cart__total');\n $(el).after('

');\n break;\n case 'checkout':\n el = document.querySelector('.woocommerce-mini-cart__buttons .checkout');\n $(el).after('');\n break;\n\n }\n if (el) {\n return document.getElementById('wc-ppcp-minicart-msg');\n }\n return document.querySelector('.woocommerce-mini-cart__total');\n }\n\n showContainer(container) {\n $(container).show();\n }\n\n hideMessage(container) {\n $(container).hide();\n }\n\n getTotal() {\n return this.cart.getTotal();\n }\n\n getPlacement() {\n return 'cart';\n }\n}\n\nconst queryParams = getPayPalQueryParams();\n\nloadPayPalSdk(queryParams).then(paypal => {\n new PayLaterMessageMiniCart(paypal, cart, {queryParams});\n}).catch(error => {\n});","import $ from 'jquery';\nimport PayLaterBaseMessage from \"./base\";\nimport Product from '@ppcp/product';\nimport {loadPayPalSdk, getPayPalQueryParams} from \"@ppcp/utils\";\n\nclass PayLaterMessageProduct extends PayLaterBaseMessage {\n\n constructor(paypal, product, props) {\n super('product', props);\n this.paypal = paypal;\n this.product = product;\n this.initialize();\n }\n\n initialize() {\n this.product.on('quantityChange', this.onQuantityChange.bind(this));\n this.product.on('foundVariation', this.onFoundVariation.bind(this));\n this.product.on('resetVariation', this.onResetVariation.bind(this));\n super.initialize();\n }\n\n onQuantityChange(qty) {\n this.createMessage();\n }\n\n onFoundVariation(changed) {\n this.createMessage();\n }\n\n onResetVariation(product) {\n this.createMessage();\n }\n\n getMessageContainer() {\n const el = document.getElementById('wc-ppcp-paylater-msg-product');\n if (!el) {\n $('form.checkout .shop_table').after('
');\n }\n return document.getElementById('wc-ppcp-paylater-msg-product');\n }\n\n getTotal() {\n return this.product.getTotal();\n }\n\n getPlacement() {\n return 'product';\n }\n}\n\nconst queryParams = getPayPalQueryParams();\nloadPayPalSdk(queryParams).then(paypal => {\n new PayLaterMessageProduct(paypal, new Product(), {queryParams});\n}).catch(error => {\n\n})\n\nexport default PayLaterMessageProduct;\nexport {PayLaterMessageProduct};","import $ from 'jquery';\nimport {loadPayPalSdk, getPayPalQueryParams, getSetting} from \"@ppcp/utils\";\nimport PayLaterBaseMessage from \"./base\";\n\n\nclass PayLaterMessageShop extends PayLaterBaseMessage {\n\n constructor() {\n super('shop', {queryParams: getPayPalQueryParams()});\n this.data = getSetting('payLaterMessage');\n this.initialize();\n }\n\n initialize() {\n loadPayPalSdk(getPayPalQueryParams());\n }\n\n getValidProductTypes() {\n return this.data.shop.product_types;\n }\n\n isSupportedProduct(type) {\n return this.getValidProductTypes().includes(type);\n }\n\n createMessage() {\n for (const product of this.data.shop.products) {\n if (this.isSupportedProduct(product.product_type)) {\n this.currentProduct = product;\n super.createMessage();\n }\n }\n }\n\n getMessageContainer() {\n const el = document.getElementById(`wc-ppcp-paylater-msg-${this.currentProduct.id}`);\n if (!el) {\n if (this.isBelowPrice()) {\n $(`.post-${this.currentProduct.id} .price`).after(`
`);\n } else {\n $(`.post-${this.currentProduct.id} a.button`).after(`
`);\n }\n }\n return document.getElementById(`wc-ppcp-paylater-msg-${this.currentProduct.id}`);\n }\n\n getTotal() {\n return this.currentProduct.total;\n }\n\n getPlacement() {\n return 'category';\n }\n\n isBelowPrice() {\n return this.data.shop.msgLocation === 'below_price';\n }\n\n}\n\nnew PayLaterMessageShop();\n\n","import $ from 'jquery';\nimport apiFetch from \"@wordpress/api-fetch\";\nimport {defaultHooks} from \"@wordpress/hooks\";\nimport {\n loadPayPalSdk,\n getFieldValue,\n isValidAddress,\n extractShippingMethod,\n getRestRoute,\n getRestPath,\n convertPayPalAddressToCart,\n fieldsToJson,\n extractFullName,\n getSetting,\n setFieldValue,\n isValid,\n isValidFieldValue,\n getPayPalQueryParams,\n getErrorMessage\n} from \"@ppcp/utils\";\nimport {isEmpty} from \"lodash\";\n\nclass BaseGateway {\n\n constructor({id, context, container = null}) {\n this.id = id;\n this.buttons = {};\n this.actions = {};\n this.context = context;\n this.settings = getSetting(`${id}_data`);\n this.container = container ? container : `li.payment_method_${id}`;\n this.order_field_key = `${this.id}_paypal_order_id`;\n this.billing_token_key = `${this.id}_billing_token`;\n }\n\n initialize() {\n //load the paypal script\n this.loadPayPalScript().then(() => {\n // setup required events;\n this.initializeEvents();\n // render the button\n this.createButton();\n });\n }\n\n initializeEvents() {\n\n }\n\n isActive() {\n return this.getData() !== null;\n }\n\n /**\n * Loads the PayPal JS SDK\n */\n loadPayPalScript() {\n return new Promise((resolve, reject) => {\n loadPayPalSdk(this.getPayPalSDKArgs()).then(paypal => {\n this.paypal = paypal;\n resolve();\n }).catch(error => {\n console.log(error);\n if (error?.code) {\n this.submitError(getErrorMessage(error));\n }\n reject();\n })\n })\n }\n\n /**\n * Returns params used to laod the PayPal SDK\n * @returns {{}}\n */\n getPayPalSDKArgs() {\n return getPayPalQueryParams();\n }\n\n getClientId() {\n let {clientId = null, environment} = getSetting('generalData');\n if (!clientId && environment == 'sandbox') {\n clientId = 'sb';\n }\n return clientId;\n }\n\n getData() {\n let data = $(`${this.container}`).find('.wc-ppcp-payment-method-data').data('payment-method-data');\n if (!data) {\n return null;\n }\n return data;\n }\n\n setData(data) {\n $(`${this.container}`).find('.wc-ppcp-payment-method-data').data('payment-method-data', data);\n }\n\n setOption(key, value) {\n const data = this.getData();\n if (data) {\n data[key] = value;\n this.setData(data);\n }\n }\n\n setVariable(key, value) {\n const data = getSetting(`${this.id}_data`);\n data[key] = value;\n }\n\n getVariable(key, defaultValue = null) {\n const data = getSetting(`${this.id}_data`);\n if (data.hasOwnProperty(key)) {\n return data[key];\n }\n if (defaultValue) {\n this.setVariable(key, defaultValue);\n }\n return defaultValue;\n }\n\n /**\n * Fetches an option from the payment method data object.\n * @param key\n * @param defaultValue\n * @returns {null|*}\n */\n getOption(key, defaultValue = null) {\n const data = this.getData();\n if (data.hasOwnProperty(key)) {\n return data[key];\n } else {\n if (defaultValue) {\n this.setOption(key, defaultValue);\n }\n }\n return defaultValue;\n }\n\n createButton() {\n const container = this.getButtonContainer();\n if (container && !$(container).find('.paypal-buttons').length) {\n this.getSortedFunding(this.getFunding()).forEach(source => {\n const button = this.paypal.Buttons(this.getButtonOptions(source));\n this.buttons[source] = button;\n if (button.isEligible()) {\n button.render(container);\n }\n });\n this.$button = $(container);\n defaultHooks.doAction('wcPPCPButtonCreated', this);\n }\n }\n\n getButton() {\n return this.$button;\n }\n\n destroyButtons() {\n Object.keys(this.buttons).forEach(key => {\n if (this.buttons[key]['close']) {\n this.buttons[key].close();\n }\n })\n }\n\n disableButtons() {\n Object.keys(this.actions).forEach(key => {\n this.actions[key].disable();\n });\n }\n\n enableButtons() {\n Object.keys(this.actions).forEach(key => {\n this.actions[key].enable();\n });\n }\n\n getFunding() {\n const funding = [];\n const settings = this.settings?.funding || [];\n if (this.settings?.paypal_sections?.includes(this.getPage())) {\n funding.push(paypal.FUNDING.PAYPAL);\n }\n if (settings.includes('paylater') && this.settings?.paylater_sections?.includes(this.getPage())) {\n if (this.isCheckoutFlow()) {\n funding.push(paypal.FUNDING.PAYLATER);\n }\n }\n if (settings.includes('card') && this.settings?.credit_card_sections?.includes(this.getPage())) {\n funding.push(paypal.FUNDING.CARD);\n }\n return funding;\n }\n\n isFundingActive(type) {\n return this.settings?.funding?.includes(type);\n }\n\n isSectionEnabled(type, section) {\n const key = `${type}_sections`;\n return this.settings?.[key]?.includes(section);\n }\n\n getSortedFunding(funding) {\n const sortOrder = this.settings.buttons_order || [];\n funding.sort((a, b) => {\n const indexA = sortOrder.indexOf(a);\n const indexB = sortOrder.indexOf(b);\n return indexA < indexB ? -1 : 1;\n });\n return funding;\n }\n\n getButtonContainer() {\n return null;\n }\n\n getButtonOptions(source) {\n const options = {\n fundingSource: source,\n style: this.getButtonStyle(source),\n onInit: (...args) => {\n this.onInit(source, ...args);\n },\n onClick: (...args) => {\n this.onClick(...args);\n },\n onApprove: (data, actions) => {\n this.onApprove(data, actions);\n },\n onCancel: (data) => {\n this.orderId = data.orderID;\n },\n onError: (error) => {\n if (this.currentError) {\n this.submitError(this.currentError);\n this.currentError = null;\n } else {\n this.submitError(error);\n }\n },\n onDestroy: () => {\n }\n };\n if (this.isCheckoutFlow()) {\n options.createOrder = (data, actions) => {\n return this.createOrder(data, actions);\n }\n if (this.needsShipping() && source !== paypal.FUNDING.VENMO) {\n options.onShippingChange = (...args) => {\n return this.onShippingChange(...args);\n }\n }\n } else {\n options.createBillingAgreement = (...args) => {\n return this.createBillingAgreement(...args);\n }\n }\n return options;\n }\n\n needsShipping() {\n return this.getOption('needsShipping', false);\n }\n\n isCheckoutFlow() {\n return getPayPalQueryParams()?.vault !== 'true';\n }\n\n getTotal() {\n return this.getOption('total', 0);\n }\n\n getButtonStyle(source) {\n let style = null;\n switch (source) {\n case paypal.FUNDING.PAYPAL:\n style = this.settings?.buttons?.paypal;\n break;\n case paypal.FUNDING.PAYLATER:\n style = this.settings?.buttons?.paylater;\n break;\n case paypal.FUNDING.CARD:\n style = {...this.settings?.buttons?.card};\n if (style.tagline) {\n delete style.tagline;\n style.layout = 'vertical';\n } else {\n style.layout = 'horizontal';\n }\n break;\n case paypal.FUNDING.VENMO:\n const {color = '', label = '', ...venmoStyle} = this.settings?.buttons?.paypal;\n style = venmoStyle;\n break;\n }\n if (style?.height) {\n style.height = parseInt(style.height);\n }\n return style;\n }\n\n onApprove(data, actions) {\n setFieldValue(this.order_field_key, data.orderID, '');\n if (data.billingToken) {\n setFieldValue(this.billing_token_key, data.billingToken, '');\n return this.fetchBillingToken(data.billingToken).then(response => {\n this.handleBillingToken(response, data);\n }).catch(error => {\n return this.submitError(error?.message);\n });\n } else {\n actions.order.get().then((res) => {\n this.handleOnApproveResponse(data, res);\n }).catch(error => this.submitError(error));\n }\n }\n\n handleOnApproveResponse(data, response) {\n this.populateCheckoutFields(response);\n this.processCartCheckout();\n }\n\n fetchBillingToken(token) {\n return apiFetch({\n method: 'GET',\n path: `/wc-ppcp/v1/billing-agreement/token/${token}`\n });\n }\n\n handleBillingToken(token, data) {\n if (!isEmpty(token.payer_info.billing_address)) {\n this.populateBillingAddressFields(convertPayPalAddressToCart(token.payer_info.billing_address));\n }\n if (token?.payer_info?.first_name) {\n if (!isValid('billing_first_name')) {\n setFieldValue('first_name', token.payer_info.first_name, 'billing');\n }\n }\n if (token?.payer_info?.last_name) {\n if (!isValid('billing_last_name')) {\n setFieldValue('last_name', token.payer_info.last_name, 'billing');\n }\n }\n if (token?.payer_info?.email) {\n if (!isValid('billing_email')) {\n setFieldValue('billing_email', token.payer_info.email);\n }\n }\n if (token?.payer_info?.phone) {\n if (!isValid('billing_phone')) {\n setFieldValue('billing_phone', token.payer_info.phone);\n }\n }\n if (this.needsShipping() && token.shipping_address) {\n if (!isEmpty(token.shipping_address)) {\n let address = convertPayPalAddressToCart(token.shipping_address);\n this.populateNameFields(extractFullName(token.shipping_address.recipient_name), 'shipping');\n this.populateShippingAddressFields(address);\n if (!isValidAddress(this.getCartFullAddress('billing'), ['phone', 'email'])) {\n if (!isValidFieldValue(getFieldValue('billing_first_name')) && !isValidFieldValue(getFieldValue('billing_last_name'))) {\n this.populateNameFields(token.shipping_address.recipient_name, 'billing');\n }\n this.populateBillingAddressFields(address);\n }\n }\n }\n }\n\n createOrder(data, actions) {\n return actions.order.create(args);\n }\n\n createBillingAgreement(data, actions) {\n return apiFetch({\n method: 'POST',\n url: getRestPath('/wc-ppcp/v1/billing-agreement/token'),\n data: {\n payment_method: this.id,\n context: this.getPage()\n }\n }).then(token => {\n return token;\n }).catch(error => {\n this.currentError = error;\n })\n }\n\n onShippingChange(data, actions, extraData = {}) {\n const address = convertPayPalAddressToCart(data?.shipping_address || {}, true);\n const shipping_method = extractShippingMethod(data?.selected_shipping_option?.id || '');\n return apiFetch({\n method: 'POST',\n url: getRestRoute('cart/shipping'),\n data: {\n order_id: data.orderID,\n address,\n shipping_method,\n payment_method: this.id,\n ...extraData\n }\n }).then(response => {\n if (response.code) {\n return actions.reject();\n } else {\n return actions.resolve();\n }\n }).catch(error => {\n return actions.reject();\n })\n }\n\n submitError(error) {\n\n }\n\n getShippingPrefix() {\n return 'shipping';\n }\n\n getCartAddress(type) {\n return {\n address_1: getFieldValue('address_1', type),\n address_2: getFieldValue('address_2', type),\n state: getFieldValue('state', type),\n city: getFieldValue('city', type),\n postcode: getFieldValue('postcode', type),\n country: getFieldValue('country', type)\n }\n }\n\n getCartFullAddress(type) {\n return {\n first_name: getFieldValue('first_name', type),\n last_name: getFieldValue('last_name', type),\n address_1: getFieldValue('address_1', type),\n address_2: getFieldValue('address_2', type),\n state: getFieldValue('state', type),\n city: getFieldValue('city', type),\n postcode: getFieldValue('postcode', type),\n country: getFieldValue('country', type)\n }\n }\n\n onInit(source, data, actions) {\n this.actions[source] = actions;\n }\n\n onClick(data, actions) {\n\n }\n\n isPage(page) {\n return this.getPage() === page;\n }\n\n getPage() {\n let page = getSetting('generalData')?.page;\n if (page == 'cart' && $(document.body).is('.woocommerce-checkout')) {\n page = 'checkout';\n }\n return page;\n }\n\n populateShippingAddressFields(address) {\n for (let key in address) {\n setFieldValue(key, address[key], 'shipping');\n }\n }\n\n populateBillingAddressFields(address) {\n for (let key in address) {\n setFieldValue(key, address[key], 'billing');\n }\n }\n\n populateNameFields(name, prefix = '') {\n let first_name, last_name;\n if (Array.isArray(name)) {\n [first_name, last_name] = name;\n } else {\n ({given_name: first_name, surname: last_name} = name);\n }\n setFieldValue('first_name', first_name, prefix);\n setFieldValue('last_name', last_name, prefix);\n }\n\n populateCheckoutFields(response) {\n if (!isEmpty(response?.payer?.address)) {\n let address = convertPayPalAddressToCart(response.payer.address);\n this.populateBillingAddressFields(address);\n }\n if (response?.payer?.name) {\n this.populateNameFields(response.payer.name, 'billing');\n }\n if (response?.payer?.email_address) {\n setFieldValue('billing_email', response.payer.email_address);\n }\n if (response?.payer?.phone?.phone_number?.national_number) {\n setFieldValue('billing_phone', response.payer.phone.phone_number.national_number);\n setFieldValue('shipping_phone', response.payer.phone.phone_number.national_number);\n }\n if (this.needsShipping() && response?.purchase_units?.[0]?.shipping) {\n const address = convertPayPalAddressToCart(response.purchase_units[0].shipping.address)\n this.populateShippingAddressFields(address);\n if (response.purchase_units[0].shipping?.name?.full_name) {\n const name = extractFullName(response.purchase_units[0].shipping.name.full_name);\n this.populateNameFields(name, 'shipping');\n }\n // add billing address if possible\n if (!isValidAddress(this.getCartFullAddress('billing'), ['phone', 'email'])) {\n this.populateBillingAddressFields(address);\n }\n }\n }\n\n processCartCheckout() {\n this.showProcessing();\n return apiFetch({\n method: 'POST',\n url: getRestRoute('cart/checkout'),\n data: this.getCartCheckoutData()\n }).then(response => {\n if (response.result && 'success' == response.result) {\n window.location = response.redirect;\n } else {\n if (response.messages) {\n return this.submitError(response.messages);\n }\n }\n }).catch(error => {\n if (error.code) {\n this.submitError(error.message);\n }\n });\n }\n\n getCartCheckoutData() {\n return {payment_method: this.id, context: this.getPage(), ...fieldsToJson()};\n }\n\n getProcessingSelector() {\n return 'body';\n }\n\n showProcessing() {\n $(this.getProcessingSelector())?.block({\n message: this.getProcessingMessage(),\n overlayCSS: {\n background: '#fff',\n opacity: 0.6\n }\n });\n }\n\n hideProcessing() {\n $(this.getProcessingSelector())?.unblock();\n }\n\n getProcessingMessage() {\n return `
\n
\n
\n
\n
`;\n }\n\n getFullName(prefix) {\n const names = [\n getFieldValue('first_name', prefix),\n getFieldValue('last_name', prefix)\n ].filter(Boolean);\n if (names.length == 0) {\n return null;\n } else if (names.length == 1) {\n return names[0];\n }\n return `${names[0]} ${names[1]}`\n }\n}\n\nexport {BaseGateway};\nexport default BaseGateway;","import $ from 'jquery';\nimport BaseGateway from './class-base-gateway';\nimport {\n getFieldValue,\n submitErrorMessage,\n setFieldValue,\n convertPayPalAddressToCart,\n extractFullName,\n isValidAddress,\n isValid,\n extractShippingMethod,\n getPage\n} from \"@ppcp/utils\";\nimport {isEmpty, isEqual} from 'lodash';\n\nclass CheckoutGateway extends BaseGateway {\n\n constructor(cart, props) {\n super(props);\n this.cart = cart;\n this.initialize();\n }\n\n\n initialize() {\n super.initialize();\n this.setVariable('readyToCheckout', false);\n this.actions = {};\n this.cart.on('updatedCheckout', this.updatedCheckout.bind(this));\n $(document.body).on('payment_method_selected', this.paymentMethodSelected.bind(this));\n $(document.body).on(`checkout_place_order_${this.id}`, this.validateCheckoutFields.bind(this));\n $(document.body).on('click', '.wc-ppcp-cancel__payment', this.cancelPayment.bind(this));\n $(document.body).on('change', '[name=\"terms\"]', this.handleTermsClick.bind(this));\n window.addEventListener('hashchange', this.handleHashError.bind(this));\n this.handleOrderPay();\n }\n\n needsShipping() {\n return getPage() !== 'order_pay' && this.cart.needsShipping();\n }\n\n getFunding() {\n const funding = super.getFunding();\n if (this.isFundingActive('venmo') && this.isSectionEnabled('venmo', 'checkout')) {\n funding.push(paypal.FUNDING.VENMO);\n }\n return funding;\n }\n\n updatedCheckout() {\n super.initialize();\n this.paymentMethodSelected();\n if (this.isOrderReview()) {\n this.displayPaymentReadyMessage();\n } else if (this.isReadyToCheckout()) {\n this.displayPaymentReadyMessage();\n }\n }\n\n /**\n * Method that is called when a payment method is selected\n */\n paymentMethodSelected() {\n if (this.isPaymentGatewaySelected() && !this.isReadyToCheckout()) {\n this.displayPaymentButton();\n } else {\n this.hidePaymentButton();\n }\n }\n\n handleHashError(e) {\n var match = e.newURL.match(/ppcp_error=(.*)/);\n if (match) {\n const {1: error} = match;\n if (error == 'true') {\n this.displayPaymentButton();\n history.pushState({}, '', window.location.pathname + window.location.search);\n }\n }\n }\n\n isOrderReview() {\n let match = window?.location?.search?.match(/_ppcp_order_review=(.*)/);\n return match?.length > 0;\n }\n\n handleOrderPay() {\n if (this.isOrderReview()) {\n try {\n let match = window?.location?.search?.match(/_ppcp_order_review=(.*)/);\n const {1: obj} = match;\n const {payment_method, paypal_order, fields} = JSON.parse(atob(decodeURIComponent(obj)));\n setFieldValue(this.order_field_key, paypal_order, '');\n if (!isEmpty(fields)) {\n for (let key in fields) {\n setFieldValue(key, fields[key], '');\n }\n }\n this.setVariable('readyToCheckout', true);\n //this.readyToCheckout = true;\n this.hidePaymentButton();\n if (this.needsShipping() && $('[name=\"ship_to_different_address\"]')?.length) {\n const bool = !isEqual(this.getCartAddress('billing'), this.getCartAddress('shipping'))\n $('[name=\"ship_to_different_address\"]').prop('checked', bool).trigger('change');\n }\n } catch (error) {\n console.log(error);\n }\n }\n }\n\n createOrder(data, actions) {\n if (this.isPage('checkout')) {\n const formData = this.convertFormToData();\n return this.cart.createOrder(formData);\n } else {\n return this.cart.doOrderPay(this.id);\n }\n }\n\n createButton() {\n super.createButton();\n this.paymentMethodSelected();\n }\n\n displayPaymentButton() {\n this.getButton()?.show();\n this.hidePlaceOrderButton();\n }\n\n hidePaymentButton() {\n this.getButton()?.hide();\n this.displayPlaceOrderButton();\n }\n\n displayPlaceOrderButton() {\n this.getPlaceOrderButton()?.removeClass('wc-ppcp-hide-button');\n }\n\n hidePlaceOrderButton() {\n this.getPlaceOrderButton()?.addClass('wc-ppcp-hide-button');\n }\n\n getPlaceOrderButton() {\n return $('#place_order');\n }\n\n getPayPalSDKArgs() {\n let data = {\n ...super.getPayPalSDKArgs(), ...{\n 'commit': 'true',\n }\n };\n return data;\n }\n\n getButtonPlacement() {\n return this.settings?.buttonPlacement || 'place_order';\n }\n\n isPlaceOrderPlacement() {\n return this.getButtonPlacement() == 'place_order';\n }\n\n getButtonContainer() {\n let $parent = null;\n switch (this.getButtonPlacement()) {\n case 'place_order':\n $parent = $('#place_order');\n let $container = $parent?.parent().find('.wc-ppcp-checkout-container');\n if (!$container?.length) {\n $parent.after('
');\n }\n break;\n case 'payment_method':\n $parent = $(`div.payment_method_${this.id}`);\n $('.wc-ppcp-payment-method__container').append('
');\n break;\n }\n // add container to parent;\n return document.querySelector('.wc-ppcp-checkout-container');\n }\n\n isPaymentGatewaySelected() {\n return $('[name=\"payment_method\"]:checked')?.val() === this.id;\n }\n\n submitError(error) {\n submitErrorMessage(error, this.getForm(), 'checkout');\n }\n\n getShippingPrefix() {\n if ($('[name=\"ship_to_different_address\"]')?.length) {\n if ($('[name=\"ship_to_different_address\"]').is(':checked')) {\n return 'shipping';\n }\n }\n return 'billing';\n }\n\n handleOnApproveResponse(data, response) {\n this.populateCheckoutFields(response);\n this.processCheckout(data, response);\n }\n\n processCheckout(data, response) {\n this.hidePaymentButton();\n this.setVariable('readyToCheckout', true);\n if (this.update_required) {\n $(document.body).one('updated_checkout', () => {\n if (data.billingToken && this.needsShipping()) {\n // show message that they can click place order\n this.displayPaymentReadyMessage();\n } else {\n this.submitCheckoutForm(response);\n }\n });\n $('[name=\"billing_country\"],[name=\"billing_state\"]').trigger('change');\n if (this.shipToDifferentAddressChecked()) {\n $('[name=\"shipping_country\"],[name=\"shipping_state\"]').trigger('change');\n }\n $(document.body).trigger('update_checkout', {update_shipping_method: false});\n } else {\n this.submitCheckoutForm(response);\n }\n }\n\n handleBillingToken(token, data) {\n super.handleBillingToken(token);\n if (this.needsShipping()) {\n this.update_required = true;\n }\n this.maybeShipToDifferentAddress();\n this.processCheckout(data);\n }\n\n populateCheckoutFields(response) {\n if (!isEmpty(response?.payer?.address)) {\n let address = convertPayPalAddressToCart(response.payer.address);\n if (isValidAddress(address, ['first_name', 'last_name']) && !isEqual(this.getCartAddress('billing'), address)) {\n this.populateBillingAddressFields(address);\n }\n }\n if (response?.payer?.name) {\n if (!isValid('billing_first_name')) {\n this.populateNameFields(response.payer.name, 'billing');\n }\n }\n // only overwrite billing email if the field is blank\n if (response?.payer?.email_address && !isValid('billing_email')) {\n setFieldValue('billing_email', response.payer.email_address);\n }\n if (response?.payer?.phone?.phone_number?.national_number) {\n setFieldValue('billing_phone', response.payer.phone.phone_number.national_number);\n if (this.needsShipping()) {\n setFieldValue('shipping_phone', response.payer.phone.phone_number.national_number);\n }\n }\n // update the shipping address if one is included\n if (this.needsShipping()) {\n if (!isEmpty(response?.purchase_units?.[0]?.shipping?.address)) {\n let address = convertPayPalAddressToCart(response.purchase_units[0].shipping.address);\n let name = '';\n if (!isEqual(this.cartAddress, address)) {\n this.update_required = true;\n this.cartAddress = address;\n this.populateShippingAddressFields(address);\n $(document.body).one('updated_checkout', () => this.populateShippingAddressFields(address));\n }\n if (response.purchase_units[0].shipping?.name?.full_name) {\n name = extractFullName(response.purchase_units[0].shipping.name.full_name);\n this.populateNameFields(name, 'shipping');\n }\n // add billing address if possible\n if (!isValidAddress(this.getCartFullAddress('billing'), ['phone', 'email'])) {\n if (name && !isValid('billing_first_name') && !isValid('billing_last_name')) {\n this.populateNameFields(name, 'billing');\n }\n this.populateBillingAddressFields(address);\n }\n }\n this.maybeShipToDifferentAddress();\n }\n }\n\n maybeShipToDifferentAddress() {\n // compare billing and shipping address. If not equal, then select ship to different address\n if ($('[name=\"ship_to_different_address\"]')?.length) {\n const bool = !isEqual({\n ...this.getCartAddress('billing'),\n name: this.getFullName('billing')\n }, {...this.getCartAddress('shipping'), name: this.getFullName('shipping')})\n $('[name=\"ship_to_different_address\"]').prop('checked', bool).trigger('change');\n }\n }\n\n getForm() {\n if (this.isPage('checkout')) {\n return $(this.container).closest('form.checkout');\n } else {\n return $(this.container).closest('form');\n }\n }\n\n validateTerms() {\n if ($('[name=\"terms\"]').length) {\n return $('[name=\"terms\"]').is(':checked');\n }\n return true;\n }\n\n validateCheckoutFields() {\n if (!this.validateTerms()) {\n this.submitError({code: 'terms'});\n return false;\n }\n return true;\n }\n\n handleTermsClick() {\n if (this.isPlaceOrderPlacement()) {\n if ($('[name=\"terms\"]').length) {\n const checked = $('[name=\"terms\"]').is(':checked');\n if (checked) {\n this.enableButtons();\n } else {\n this.disableButtons();\n }\n }\n }\n }\n\n onInit(source, data, actions) {\n super.onInit(source, data, actions);\n this.handleTermsClick();\n }\n\n onClick(data, actions) {\n if (this.isPlaceOrderPlacement() && !this.validateTerms()) {\n this.submitError({code: 'terms'});\n }\n }\n\n onShippingChange(data, actions) {\n let shippingMethod;\n if (data?.selected_shipping_option?.id) {\n shippingMethod = extractShippingMethod(data.selected_shipping_option.id);\n for (let index of Object.keys(shippingMethod)) {\n const method = shippingMethod[index];\n const el = $(`[name=\"shipping_method[${index}]\"][value=\"${method}\"]`);\n if (el.length) {\n el.prop('checked', true);\n }\n }\n }\n this.cart.trigger('checkout_on_shipping_change', data, shippingMethod, this);\n return super.onShippingChange(data, actions, this.convertFormToData());\n }\n\n shipToDifferentAddressChecked() {\n if ($('[name=\"ship_to_different_address\"]')?.length) {\n return $('[name=\"ship_to_different_address\"]').is(':checked');\n }\n return false;\n }\n\n displayPaymentReadyMessage() {\n $('.wc-ppcp-popup__container').hide();\n $('.wc-ppcp-order-review-message__container').show();\n const txt = $('.wc-ppcp-order-review__message').text().replace('%s', $('#place_order').text());\n $('.wc-ppcp-order-review__message').text(txt);\n }\n\n hidePaymentReadyMessage() {\n $('.wc-ppcp-popup__container').show();\n $('.wc-ppcp-order-review-message__container').hide();\n }\n\n /**\n * Cancels an existing payment method\n */\n cancelPayment(e) {\n e.preventDefault();\n this.setVariable('readyToCheckout', false);\n this.hidePaymentReadyMessage();\n this.displayPaymentButton();\n }\n\n getProcessingSelector() {\n return this.container;\n }\n\n getProcessingMessage() {\n return null;\n }\n\n fetchBillingToken(token) {\n this.showProcessing();\n return super.fetchBillingToken(token).then(response => {\n this.hideProcessing();\n return response;\n });\n }\n\n isReadyToCheckout() {\n return this.getVariable('readyToCheckout', false);\n }\n\n convertFormToData() {\n return $('form.checkout').serializeArray().reduce((prev, current) => ({...prev, [current.name]: current.value}), {});\n }\n\n submitCheckoutForm(order) {\n if (this.cart.applyFilters('checkout_submit_form', true, order, this)) {\n this.getForm().submit();\n }\n }\n}\n\nexport {\n CheckoutGateway\n}","import $ from 'jquery';\nimport BaseGateway from \"./class-base-gateway\";\nimport {\n submitErrorMessage\n} from \"@ppcp/utils\";\n\nclass CartGateway extends BaseGateway {\n\n constructor(cart, props) {\n super(props);\n this.cart = cart;\n this.initialize();\n }\n\n initialize() {\n this.cart.on('cartUpdated', this.onCartUpdated.bind(this));\n $(window).on('resize', this.doCartHtml.bind(this));\n super.initialize();\n this.doCartHtml();\n }\n\n onInit(...params) {\n super.onInit(...params);\n this.cart.trigger('cartButtonOnInit');\n }\n\n needsShipping() {\n return this.cart.needsShipping();\n }\n\n getButtonContainer() {\n return document.getElementById('wc-ppcp-cart-button-container');\n }\n\n onCartUpdated() {\n super.initialize();\n this.doCartHtml();\n }\n\n submitError(error) {\n this.hideProcessing();\n submitErrorMessage(error, 'div.woocommerce-notices-wrapper', 'checkout');\n }\n\n handleBillingToken(response) {\n super.handleBillingToken(response);\n this.processCartCheckout();\n }\n\n createOrder(data, actions) {\n return this.cart.createOrder({payment_method: this.id}).catch(error => {\n this.currentError = error;\n return error;\n });\n }\n\n doCartHtml() {\n const $button = $('.checkout-button');\n const width = $button.outerWidth();\n if (width && $('.wc-ppcp-cart-payments__container').length) {\n $('.wc-ppcp-cart-payments__container').width(width);\n }\n if ($button.css('float') !== 'none') {\n $('.wc-ppcp-cart-payments__container ').css('float', $button.css('float'));\n }\n }\n}\n\nexport {CartGateway};","import $ from 'jquery';\nimport {submitErrorMessage} from \"@ppcp/utils\";\nimport BaseGateway from \"./class-base-gateway\";\n\nclass ProductGateway extends BaseGateway {\n\n constructor(product, cart, props) {\n super(props);\n this.product = product;\n this.cart = cart;\n this.initialize();\n }\n\n initialize() {\n this.product.on('foundVariation', this.onFoundVariation.bind(this));\n this.product.on('resetVariation', this.onResetVariation.bind(this));\n this.setMaxWidth();\n super.initialize();\n }\n\n onInit(...params) {\n super.onInit(...params);\n this.cart.trigger('productButtonOnInit');\n }\n\n setOptions(options) {\n for (let key in options) {\n this.setOption(key, options[key]);\n }\n }\n\n needsShipping() {\n return this.product.needsShipping();\n }\n\n getButtonContainer() {\n return document.getElementById('wc-ppcp-product-button-container');\n }\n\n setMaxWidth() {\n if (this.settings?.product?.button_width == 'add_to_cart') {\n this.buttonWidth = $('form.cart div.quantity').outerWidth(true) + $('.single_add_to_cart_button').outerWidth();\n var marginLeft = $('.single_add_to_cart_button').css('marginLeft');\n if (marginLeft) {\n this.buttonWidth += parseInt(marginLeft.replace('px', ''));\n }\n $(this.container).css('max-width', this.buttonWidth + 'px');\n }\n }\n\n submitError(error) {\n this.hideProcessing();\n submitErrorMessage(error, 'div.woocommerce-notices-wrapper');\n }\n\n getFunding() {\n const funding = [];\n const settings = this.settings?.funding || [];\n if (settings.includes('paypal')) {\n funding.push(paypal.FUNDING.PAYPAL);\n }\n if (settings.includes('paylater')) {\n funding.push(paypal.FUNDING.PAYLATER);\n }\n if (settings.includes('card')) {\n funding.push(paypal.FUNDING.CARD);\n }\n return this.getSortedFunding(funding);\n }\n\n addToCart() {\n return this.cart.addToCart({\n payment_method: this.id,\n product_id: this.product.getId(),\n variation_id: this.product.getVariationId(),\n qty: this.product.getQuantity(),\n variation: this.product.getVariationData()\n }).then(response => {\n if (response.code) {\n this.currentError = response;\n }\n return response;\n }).catch(err => {\n this.currentError = err;\n return this.submitError(err);\n })\n }\n\n createOrder(data, actions) {\n return this.addToCart();\n }\n\n createBillingAgreement(data, actions) {\n return this.addToCart().then(() => {\n return super.createBillingAgreement(data, actions);\n });\n }\n\n handleBillingToken(response) {\n super.handleBillingToken(response);\n this.processCartCheckout();\n }\n\n onFoundVariation(hasChanged, product) {\n if (this.hasChanged) {\n this.destroyButtons();\n this.createButton();\n } else {\n this.enableButtons();\n }\n }\n\n onResetVariation() {\n this.disableButtons();\n }\n\n enableButtons() {\n this?.$button?.removeClass('disabled');\n super.enableButtons();\n }\n\n disableButtons() {\n this?.$button?.addClass('disabled');\n super.disableButtons();\n }\n}\n\nexport {ProductGateway};","import $ from 'jquery';\nimport BaseGateway from \"./class-base-gateway\";\nimport {\n submitErrorMessage,\n getSetting\n} from \"@ppcp/utils\";\n\nclass MiniCartGateway extends BaseGateway {\n\n constructor(cart, props) {\n super(props);\n this.cart = cart;\n this.initialize();\n }\n\n initialize() {\n this.cart.on('fragmentsChanged', super.initialize.bind(this));\n super.initialize();\n }\n\n needsShipping() {\n return this.cart.needsShipping();\n }\n\n getButtonContainer() {\n const el = document.getElementById(`wc-ppcp-minicart-${this.id}`);\n if (!el) {\n const location = getSetting('ppcp_advanced')?.miniCartLocation;\n $('.woocommerce-mini-cart__buttons').append(``);\n }\n return document.getElementById(`wc-ppcp-minicart-${this.id}`);\n }\n\n getPage() {\n return 'minicart';\n }\n\n handleBillingToken(response) {\n super.handleBillingToken(response);\n this.processCartCheckout();\n }\n\n createOrder(data, actions) {\n return this.cart.createOrder({payment_method: this.id}).then(orderId => {\n return orderId;\n });\n }\n}\n\nexport {MiniCartGateway}","import {CartGateway} from '../payments/classes';\nimport cart from '@ppcp/cart';\n\nnew CartGateway(cart, {id: 'ppcp', context: 'cart'});\n","import {CheckoutGateway} from '../payments/classes';\nimport cart from '@ppcp/cart';\nimport {isPluginConnected} from '@ppcp/utils';\n\nif (isPluginConnected()) {\n new CheckoutGateway(cart, {id: 'ppcp', context: 'checkout'});\n}","import {CheckoutGateway, BaseGateway} from '../payments/classes';\nimport $ from 'jquery';\nimport cart from '@ppcp/cart';\n\nclass PayPalExpressCheckoutGateway extends CheckoutGateway {\n\n updatedCheckout() {\n BaseGateway.prototype.initialize.apply(this, arguments);\n this.paymentMethodSelected();\n }\n\n paymentMethodSelected() {\n\n }\n\n hidePaymentButton() {\n this.displayPlaceOrderButton();\n this.displayPaymentReadyMessage();\n const container = super.getButtonContainer();\n if (container) {\n $(container).hide();\n }\n }\n\n getButtonContainer() {\n if (this.settings?.expressElement) {\n const container = document.querySelector(this.settings.expressElement);\n if (container) {\n return container;\n }\n }\n return document.getElementById('wc-ppcp-express-button');\n }\n\n onInit(source, data, actions) {\n this.cart.trigger('expressCheckoutButtonOnInit');\n }\n\n onClick(data, actions) {\n $('[name=\"terms\"]').prop('checked', true).trigger('change');\n $(`[name=\"payment_method\"][value=\"${this.id}\"]`).prop(\"checked\", true).trigger('click');\n }\n\n getFunding() {\n const funding = [];\n if (this.isFundingActive('paypal') && this.isSectionEnabled('paypal', 'express_checkout')) {\n funding.push(paypal.FUNDING.PAYPAL);\n }\n if (this.isFundingActive('paylater') && this.isSectionEnabled('paylater', 'express_checkout')) {\n funding.push(paypal.FUNDING.PAYLATER);\n }\n if (this.isFundingActive('venmo') && this.isSectionEnabled('venmo', 'express_checkout')) {\n funding.push(paypal.FUNDING.VENMO);\n }\n if (this.isFundingActive('card') && this.isSectionEnabled('credit_card', 'express_checkout')) {\n funding.push(paypal.FUNDING.CARD);\n }\n return funding;\n }\n\n createButton() {\n super.createButton();\n this.$button?.show();\n }\n}\n\nnew PayPalExpressCheckoutGateway(cart, {id: 'ppcp', context: 'checkout'});","import {MiniCartGateway} from \"../payments/classes\";\nimport cart from '@ppcp/cart';\n\nclass PaypalMinicart extends MiniCartGateway {\n\n}\n\nnew PaypalMinicart(cart, {id: 'ppcp', context: 'cart'});","import {ProductGateway} from \"../payments/classes\";\nimport Product from '@ppcp/product';\nimport cart from '@ppcp/cart';\n\nnew ProductGateway(new Product(), cart, {id: 'ppcp', context: 'product'});","export default 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}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","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\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","export default 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}","import getPrototypeOf from \"./getPrototypeOf.js\";\nexport default function _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}","import superPropBase from \"./superPropBase.js\";\nexport default function _get() {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get.bind();\n } else {\n _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(arguments.length < 3 ? target : receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get.apply(this, arguments);\n}","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _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 Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}","export default function _iterableToArrayLimit(arr, i) {\n var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_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}","export default 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}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","import _typeof from \"./typeof.js\";\nimport assertThisInitialized from \"./assertThisInitialized.js\";\nexport default function _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n\n return assertThisInitialized(self);\n}","export default 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}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _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}"],"names":["PayLaterBaseMessage","context","queryParams","this","defaultHooks","paypalInstanceCreated","bind","paypal","createMessage","vault","container","getMessageContainer","isCheckoutFlow","isActive","showContainer","params","amount","getTotal","currency","getCurrency","placement","getPlacement","style","getStyleOptions","onRender","querySelector","setProperty","Messages","render","hideMessage","$","closest","show","hide","getSetting","key","enabled","asyncGeneratorStep","gen","resolve","reject","_next","_throw","arg","info","value","error","done","Promise","then","PayLaterMessageCart","fn","cart","props","initialize","on","refreshMessage","self","args","arguments","apply","err","undefined","el","document","getElementById","prepend","getPayPalQueryParams","loadPayPalSdk","catch","PayLaterMessageCheckout","setTimeout","PayLaterMessageMiniCart","remove","after","PayLaterMessageProduct","product","onQuantityChange","onFoundVariation","onResetVariation","qty","changed","Product","PayLaterMessageShop","data","shop","product_types","type","getValidProductTypes","includes","products","isSupportedProduct","product_type","currentProduct","id","isBelowPrice","total","msgLocation","BaseGateway","buttons","actions","settings","order_field_key","billing_token_key","loadPayPalScript","initializeEvents","createButton","getData","getPayPalSDKArgs","console","log","code","submitError","getErrorMessage","clientId","environment","find","setData","defaultValue","hasOwnProperty","setVariable","setOption","getButtonContainer","length","getSortedFunding","getFunding","forEach","source","button","Buttons","getButtonOptions","isEligible","$button","Object","keys","close","disable","enable","funding","paypal_sections","getPage","push","FUNDING","PAYPAL","paylater_sections","PAYLATER","credit_card_sections","CARD","section","sortOrder","buttons_order","sort","a","b","indexOf","options","fundingSource","getButtonStyle","onInit","onClick","onApprove","onCancel","orderId","orderID","onError","currentError","onDestroy","createOrder","needsShipping","VENMO","onShippingChange","createBillingAgreement","getOption","paylater","card","tagline","layout","color","label","height","parseInt","setFieldValue","billingToken","fetchBillingToken","response","handleBillingToken","message","order","get","res","handleOnApproveResponse","populateCheckoutFields","processCartCheckout","token","apiFetch","method","path","isEmpty","payer_info","billing_address","populateBillingAddressFields","convertPayPalAddressToCart","first_name","isValid","last_name","email","phone","shipping_address","address","populateNameFields","extractFullName","recipient_name","populateShippingAddressFields","isValidAddress","getCartFullAddress","isValidFieldValue","getFieldValue","create","url","getRestPath","payment_method","extraData","shipping_method","extractShippingMethod","selected_shipping_option","getRestRoute","order_id","address_1","address_2","state","city","postcode","country","page","body","is","name","prefix","Array","isArray","given_name","surname","payer","email_address","phone_number","national_number","purchase_units","shipping","full_name","showProcessing","getCartCheckoutData","result","window","location","redirect","messages","fieldsToJson","getProcessingSelector","block","getProcessingMessage","overlayCSS","background","opacity","unblock","names","filter","Boolean","CheckoutGateway","updatedCheckout","paymentMethodSelected","validateCheckoutFields","cancelPayment","handleTermsClick","addEventListener","handleHashError","handleOrderPay","isFundingActive","isSectionEnabled","isOrderReview","isReadyToCheckout","displayPaymentReadyMessage","isPaymentGatewaySelected","displayPaymentButton","hidePaymentButton","e","match","newURL","history","pushState","pathname","search","obj","JSON","parse","atob","decodeURIComponent","paypal_order","fields","bool","isEqual","getCartAddress","prop","trigger","isPage","formData","convertFormToData","doOrderPay","getButton","hidePlaceOrderButton","displayPlaceOrderButton","getPlaceOrderButton","removeClass","addClass","buttonPlacement","getButtonPlacement","$parent","$container","parent","append","val","submitErrorMessage","getForm","processCheckout","update_required","one","submitCheckoutForm","shipToDifferentAddressChecked","update_shipping_method","maybeShipToDifferentAddress","cartAddress","getFullName","validateTerms","isPlaceOrderPlacement","enableButtons","disableButtons","shippingMethod","index","txt","text","replace","preventDefault","hidePaymentReadyMessage","hideProcessing","getVariable","serializeArray","reduce","prev","current","applyFilters","submit","CartGateway","onCartUpdated","doCartHtml","width","outerWidth","css","ProductGateway","setMaxWidth","button_width","buttonWidth","marginLeft","addToCart","product_id","getId","variation_id","getVariationId","getQuantity","variation","getVariationData","hasChanged","destroyButtons","MiniCartGateway","miniCartLocation","isPluginConnected","PayPalExpressCheckoutGateway","expressElement","PaypalMinicart","_arrayLikeToArray","arr","len","i","arr2","_arrayWithHoles","_classCallCheck","instance","Constructor","TypeError","_defineProperties","target","descriptor","enumerable","configurable","writable","defineProperty","_createClass","protoProps","staticProps","prototype","_defineProperty","_superPropBase","object","property","call","getPrototypeOf","_get","Reflect","receiver","base","desc","getOwnPropertyDescriptor","_getPrototypeOf","o","setPrototypeOf","__proto__","_setPrototypeOf","p","_inherits","subClass","superClass","constructor","_iterableToArrayLimit","_i","Symbol","iterator","_s","_e","_arr","_n","_d","next","_nonIterableRest","_objectWithoutProperties","excluded","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","_objectWithoutPropertiesLoose","sourceKeys","_typeof","_possibleConstructorReturn","ReferenceError","_slicedToArray","_unsupportedIterableToArray","minLen","n","toString","slice","from","test"],"sourceRoot":""}