| 1 |
/* |
| 2 |
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development"). |
| 3 |
* This devtool is neither made for production nor for readable output files. |
| 4 |
* It uses "eval()" calls to create a separate source file in the browser devtools. |
| 5 |
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) |
| 6 |
* or disable the default devtool with "devtool: false". |
| 7 |
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). |
| 8 |
*/ |
| 9 |
/******/ (() => { // webpackBootstrap |
| 10 |
/******/ var __webpack_modules__ = ({ |
| 11 |
|
| 12 |
/***/ "./src/js/payment-form-pro-quantity.js" |
| 13 |
/*!*********************************************!*\ |
| 14 |
!*** ./src/js/payment-form-pro-quantity.js ***! |
| 15 |
\*********************************************/ |
| 16 |
() { |
| 17 |
|
| 18 |
eval("{/**\n * Payment Form: the transaction details total on Pro layouts 4 and 5, which render\n * a quantity field (`.bp-custom-payment-amount-quantity`) beside the amount.\n *\n * Lite's better-payment.js writes the chosen amount into\n * `.bp-transaction-details-amount-text` and then triggers `better_payment_amount_changed`\n * on the document with that amount and its source: 'input' for the custom amount\n * field, 'radio' for a preset. This multiplies the total by the quantity.\n *\n * Pro ships this file as src/js/payment-form-quantity.js. Lite keeps a copy,\n * src/js/payment-form-pro-quantity.js. Lite: transitional copy for Better Payment\n * Pro <= 1.4.3; delete when ProCompatibility::MIN_PRO_VERSION >= 1.4.4. Pro copy:\n * better-payment-pro/src/js/payment-form-quantity.js. Slug: payment_form_pro_scripts.\n * Change both, or Pro's FrontendAssetsMirrorTest fails.\n */\n(function ($) {\n $(document).on('better_payment_amount_changed', function (event, amount, source) {\n const $quantity = $('.bp-custom-payment-amount-quantity');\n if (!$quantity.length) {\n return;\n }\n const quantity = source === 'radio' ? parseInt($quantity.val()) : parseFloat($quantity.val());\n $('.bp-transaction-details-amount-text').text(amount * quantity);\n });\n})(jQuery);\n\n//# sourceURL=webpack://better-payment/./src/js/payment-form-pro-quantity.js?\n}"); |
| 19 |
|
| 20 |
/***/ } |
| 21 |
|
| 22 |
/******/ }); |
| 23 |
/************************************************************************/ |
| 24 |
/******/ |
| 25 |
/******/ // startup |
| 26 |
/******/ // Load entry module and return exports |
| 27 |
/******/ // This entry module can't be inlined because the eval devtool is used. |
| 28 |
/******/ var __webpack_exports__ = {}; |
| 29 |
/******/ __webpack_modules__["./src/js/payment-form-pro-quantity.js"](); |
| 30 |
/******/ |
| 31 |
/******/ })() |
| 32 |
; |