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/***/ "./assets/js/index.js": 13/*!****************************!*\ 14 !*** ./assets/js/index.js ***! 15 \****************************/ 16/***/ (() => { 17 18eval("\njQuery(document).ready(function($) {\n // Initial check on page load\n checkSelectedGateway();\n\n // Check the selected gateway whenever a payment gateway is selected or changed\n $('form.checkout').on('change', 'input[name=\"payment_method\"]', function() {\n checkSelectedGateway();\n });\n\n function checkSelectedGateway() {\n let selectedGateway = $('input[name=\"payment_method\"]:checked').val();\n let placeOrderButton = $('button#place_order');\n\n // Add your condition here to determine when to hide or show the button\n if (selectedGateway === 'frontit_spreedly') {\n placeOrderButton.hide();\n } else {\n placeOrderButton.show();\n }\n }\n});\n\nlet expUserInput = false;\njQuery('form.checkout').on('keyup', '#spreedly-exp-date', function () {\n expUserInput = true;\n});\n\n\nfunction keyUpInlineErrors( field ) {\n let checkoutLandingPage = jQuery(\"body\").hasClass('new-checkout-landing-body');\n\n if (checkoutLandingPage) {\n if( field === 'exp-date' ){\n let expInlineValidation = document.getElementById('exp_inline_validation').value;\n if ( expInlineValidation !== 'true' ) {\n document.getElementById('inline-expiry-cvv-error').innerHTML = \"Check if Expiry date is valid\";\n document.getElementById('spreedly-exp-date').style.border = \"1px solid #EF4444\";\n }\n }\n\n if( field === 'cvc-number' ){\n let CvcInlineValidation = document.getElementById('cvc_inline_validation').value;\n if (CvcInlineValidation !== 'true') {\n document.getElementById('spreedly-cvv').style.border = \"1px solid #EF4444\";\n }\n if (expInlineValidation !== 'true' || CvcInlineValidation !== 'true') {\n document.getElementById('inline-expiry-cvv-error').innerHTML = \"Check if CVC code is valid\";\n }\n }\n\n if( field === 'card-number' ){\n let cardInlineValidation = document.getElementById('card_inline_validation').value;\n if (cardInlineValidation !== 'true') {\n document.getElementById('inline-card-error').innerHTML = \"Credit card number entered is not valid\";\n document.getElementById('spreedly-number').style.border = \"1px solid #EF4444\";\n }\n }\n }\n}\n\njQuery('form.checkout').on('blur', '#spreedly-exp-date', function () {\n let checkoutLandingPage = jQuery(\"body\").hasClass('new-checkout-landing-body');\n if (checkoutLandingPage) {\n var currentValue = jQuery(this).val();\n if ( expUserInput || currentValue.length !== 0 ) {\n var validInput = checkExpDate(currentValue);\n if (validInput) {\n jQuery('#exp_inline_validation').attr(\"value\", true);\n jQuery(this).css('border', '1px solid #D1E0F2');\n jQuery('#inline-expiry-cvv-error').html('');\n } else {\n jQuery('#exp_inline_validation').attr(\"value\", false);\n keyUpInlineErrors('exp-date');\n if (jQuery('#billing_email').val()) {\n jQuery(this).css('border', '1px solid #EF4444');\n }\n }\n }\n\n }\n else{\n var currentValue = jQuery(this).val();\n if ( expUserInput || jQuery(this).val() !== '' ) {\n var validInput = checkExpDate(currentValue);\n if (validInput) {\n jQuery(this).css('background-color', '#CDFFE6');\n jQuery('#exp_inline_validation').attr(\"value\", true);\n\n } else {\n if (jQuery('#billing_email').val()) {\n jQuery(this).css('background-color', '#F5F6FB');\n }\n jQuery('#exp_inline_validation').attr(\"value\", false);\n }\n }\n }\n});\n\nfunction checkExpDate(currentValue) {\n if (currentValue !== '') {\n var values = currentValue.split('/');\n var numericMonth = parseInt(values[0].trim(), 10);\n var numericYear = parseInt(values[1].trim(), 10);\n\n return !isNaN(numericMonth) && // Check if the month is a number\n numericMonth >= 1 && // Check if it's between 1 and 12\n numericMonth <= 12 &&\n !isNaN(numericYear) && // Check if the year is a number\n numericYear >= 24 && // Check if it's more than 24\n numericYear <= 99;\n }\n}\n\n//# sourceURL=webpack:///./assets/js/index.js?"); 19 20/***/ })
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__["./assets/js/index.js"](); 30/******/ 31/******/ })() 32;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.