PageSourceSearch

https://www.advance-affinity.com/on/demandware.static/Sites-Advanc…/-/it/v1790693307792/js/recaptchaV3.js

js advance-affinity.com collected 2026-09-30 03:41:29 UTC 7,780 bytes, 102 lines download raw bytes

vendor: 4,421 bytes, lines 1-98
1/******/ (function(modules) { // webpackBootstrap
2/******/ 	// The module cache
3/******/ 	var installedModules = {};
4/******/
5/******/ 	// The require function
6/******/ 	function __webpack_require__(moduleId) {
7/******/
8/******/ 		// Check if module is in cache
9/******/ 		if(installedModules[moduleId]) {
10/******/ 			return installedModules[moduleId].exports;
11/******/ 		}
12/******/ 		// Create a new module (and put it into the cache)
13/******/ 		var module = installedModules[moduleId] = {
14/******/ 			i: moduleId,
15/******/ 			l: false,
16/******/ 			exports: {}
17/******/ 		};
18/******/
19/******/ 		// Execute the module function
20/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21/******/
22/******/ 		// Flag the module as loaded
23/******/ 		module.l = true;
24/******/
25/******/ 		// Return the exports of the module
26/******/ 		return module.exports;
27/******/ 	}
28/******/
29/******/
30/******/ 	// expose the modules object (__webpack_modules__)
31/******/ 	__webpack_require__.m = modules;
32/******/
33/******/ 	// expose the module cache
34/******/ 	__webpack_require__.c = installedModules;
35/******/
36/******/ 	// define getter function for harmony exports
37/******/ 	__webpack_require__.d = function(exports, name, getter) {
38/******/ 		if(!__webpack_require__.o(exports, name)) {
39/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
40/******/ 		}
41/******/ 	};
42/******/
43/******/ 	// define __esModule on exports
44/******/ 	__webpack_require__.r = function(exports) {
45/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
46/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
47/******/ 		}
48/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
49/******/ 	};
50/******/
51/******/ 	// create a fake namespace object
52/******/ 	// mode & 1: value is a module id, require it
53/******/ 	// mode & 2: merge all properties of value into the ns
54/******/ 	// mode & 4: return value when already ns object
55/******/ 	// mode & 8|1: behave like require
56/******/ 	__webpack_require__.t = function(value, mode) {
57/******/ 		if(mode & 1) value = __webpack_require__(value);
58/******/ 		if(mode & 8) return value;
59/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
60/******/ 		var ns = Object.create(null);
61/******/ 		__webpack_require__.r(ns);
62/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
63/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
64/******/ 		return ns;
65/******/ 	};
66/******/
67/******/ 	// getDefaultExport function for compatibility with non-harmony modules
68/******/ 	__webpack_require__.n = function(module) {
69/******/ 		var getter = module && module.__esModule ?
70/******/ 			function getDefault() { return module['default']; } :
71/******/ 			function getModuleExports() { return module; };
72/******/ 		__webpack_require__.d(getter, 'a', getter);
73/******/ 		return getter;
74/******/ 	};
75/******/
76/******/ 	// Object.prototype.hasOwnProperty.call
77/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
78/******/
79/******/ 	// __webpack_public_path__
80/******/ 	__webpack_require__.p = "";
81/******/
82/******/
83/******/ 	// Load entry module and return exports
84/******/ 	return __webpack_require__(__webpack_require__.s = 73);
85/******/ })
86/************************************************************************/
87/******/ ({
88
89/***/ 73:
90/*!****************************************************************************************!*\
91  !*** ./cartridges/app_storefront_base_petx/cartridge/client/default/js/recaptchaV3.js ***!
92  \****************************************************************************************/
93/*! no static exports found */
94/*! all exports used */
95/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
96/***/ (function(module, exports) {
97
98eval("/**\n * Invisible Google Recaptcha V3 implementation. This script should be added just once per page.\n *\n * @see https://developers.google.com/recaptcha/docs/v3\n * @author Jonatan Jumbert <[email protected]>\n */\n\nvar captchaKey = null; // Google Recaptcha Key\nvar reloadTime = 115000; // Time for automatically reload recaptchas before they expire\
98nvar action = 'contact-Ultima'; // Action to send data to Google Recaptcha\nvar forms = []; // Forms where we should apply recaptcha V3 (Form ID selector)\n\n/**\n * Filters data retrieved on data-attribute\n * @param {string} formsToBeApplied - Comma separated list of forms to apply Recaptcha\n * @returns {array} of form ID/class\n */\nvar parseFormsData = function parseFormsData(formsToBeApplied) {\n  if (formsToBeApplied && formsToBeApplied != '') {\n    return formsToBeApplied.replace(/\\s/g, '').split(',');\n  }\n  return [];\n};\n\n/**\n * Retrive customizations from data attributes script tag\n */\n(function () {\n  var me = document.querySelector('script[data-recaptchaV3]');\n  captchaKey = me.getAttribute('data-captchaKey');\n  reloadTime = me.getAttribute('data-captchaReload') != null ? me.getAttribute('data-captchaReload') : 115000;\n  action = me.getAttribute('data-action') != null ? me.getAttribute('data-action') : 'contact-Ultima';\n  forms = parseFormsData(me.getAttribute('data-forms'));\n})();\n\n/**\n * Creates an input type hidden where recaptcha token for each enabled form\n * @param {*} token - Google Recaptcha V3 token\n */\nvar createRecaptchaInputFieldResponse = function createRecaptchaInputFieldResponse(token) {\n  var input = document.createElement('input');\n  input.value = token;\n  input.type = 'hidden';\n  input.className = 'recaptchaV3-response';\n  input.name = 'g-recaptcha-response';\n  return input;\n};\n\n/**\n * Check if form passed as parameter already contains a captcha input.\n * @param {Element} form - DOM Element\n * @returns {boolean} true if captcha already exists for this form\n */\nvar captchaInputExists = function captchaInputExists(form) {\n  return form.contains(document.getElementsByClassName('recaptchaV3-response')[0]);\n};\n\n/**\n * Adds token to form, to be validate against google recaptcha.\n * @param {Element} form - DOM Element. Form to add captcha\n * @param {*} token - Google Recaptcha v3 token\n */\nvar addCaptchaToForm = function addCaptchaToForm(form, token) {\n  if (!captchaInputExists(form)) {\n    form.appendChild(createRecaptchaInputFieldResponse(token));\n  }\n};\n\n/**\n * Creates an input hidden with recaptch token for the expected forms to be validate.\n */\ngrecaptcha.ready(function () {\n  grecaptcha.execute(captchaKey, {\n    action: action\n  }).then(function (token) {\n    for (var i = 0; i < forms.length; i++) {\n      var formsByClass = document.getElementsByClassName(forms[i]);\n      if (formsByClass.length) {\n        for (var k = 0; k < formsByClass.length; k++) {\n          addCaptchaToForm(formsByClass[k], token);\n        }\n      }\n    }\n  });\n});\n\n/**\n * Force captcha token reload for each enabled form.\n */\nwindow.reloadCaptchas = function () {\n  grecaptcha.execute(captchaKey, {\n    action: action\n  }).then(function (token) {\n    var captchasInHTML = document.getElementsByClassName('recaptchaV3-response');\n    for (var i = 0; i < captchasInHTML.length; i++) {\n      captchasInHTML[i].value = token;\n    }\n  });\n};\n\n/**\n * Reloading all Google Recaptcha V3 tokens every {reloadTime} millis.\n */\nsetInterval(function () {\n  window.reloadCaptchas();\n}, reloadTime);\n\n//# sourceURL=webpack:///./cartridges/app_storefront_base_petx/cartridge/client/default/js/recaptchaV3.js?");
99
100/***/ })
101
102/******/ });

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.