PageSourceSearch

https://www.ultima-affinity.com/on/demandware.static/Sites-Ultima-…/-/es/v1791006413348/js/articleButton.js

js ultima-affinity.com collected 2026-10-04 03:02:57 UTC 10,349 bytes, 131 lines download raw bytes

vendor: 6,275 bytes, lines 1-127
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 = 38);
85/******/ })
86/************************************************************************/
87/******/ ({
88
89/***/ 0:
90/*!****************************************************************************!*\
91  !*** ./cartridges/app_storefront_base/cartridge/client/default/js/util.js ***!
92  \****************************************************************************/
93/*! no static exports found */
94/*! all exports used */
95/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
96/***/ (function(module, exports, __webpack_require__) {
97
98"use strict";
99eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nmodule.exports = function (include) {\n  if (typeof include === 'function') {\n    include();\n  } else if (_typeof(include) === 'object') {\n    Object.keys(include).forEach(function (key) {\n      if (typeof include[key] === 'function') {\n        include[key]();\n      }\n    });\n  }\n};\n\n//# sourceURL=webpack:///./cartridges/app_storefront_base/cartridge/client/default/js/util.js?");
100
101/***/ }),
102
103/***/ 38:
104/*!*****************************************************************************************!*\
105  !*** ./cartridges/app_storefront_articles/cartridge/client/default/js/articleButton.js ***!
106  \*****************************************************************************************/
107/*! no static exports found */
108/*! all exports used */
109/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
110/***/ (function(module, exports, __webpack_require__) {
111
112"use strict";
113eval("\n\nvar processInclude = __webpack_require__(/*! base/util */ 0);\n$(function () {\n  processInclude(__webpack_require__(/*! ./experience/articleButton */ 39));\n});\n\n//# sourceURL=webpack:///./cartridges/app_storefront_articles/cartridge/client/default/js/articleButton.js?");
114
115/***/ }),
116
117/***/ 39:
118/*!****************************************************************************************************!*\
119  !*** ./cartridges/app_storefront_articles/cartridge/client/default/js/experience/articleButton.js ***!
120  \****************************************************************************************************/
121/*! no static exports found */
122/*! all exports used */
123/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
124/***/ (function(module, exports, __webpack_require__) {
125
126"use strict";
127eval("\n\nfunction hexToHSL(hex) {\n  hex = hex.replace('#', '');\n  var r, g, b;\n  if (hex.length === 3) {\n    r = parseInt(hex[0] + hex[0], 16) / 25
1275;\n    g = parseInt(hex[1] + hex[1], 16) / 255;\n    b = parseInt(hex[2] + hex[2], 16) / 255;\n  } else if (hex.length === 6) {\n    r = parseInt(hex.slice(0, 2), 16) / 255;\n    g = parseInt(hex.slice(2, 4), 16) / 255;\n    b = parseInt(hex.slice(4, 6), 16) / 255;\n  } else {\n    throw new Error('Invalid hexadecimal color format');\n  }\n  var max = Math.max(r, g, b);\n  var min = Math.min(r, g, b);\n  var c = max - min;\n  var l = (max + min) / 2 * 100;\n  var s = c === 0 ? 0 : c / (1 - Math.abs(2 * l / 100 - 1)) * 100;\n  var h;\n  if (c === 0) {\n    h = 0;\n  } else {\n    switch (max) {\n      case r:\n        h = ((g - b) / c + (g < b ? 6 : 0)) * 60;\n        break;\n      case g:\n        h = ((b - r) / c + 2) * 60;\n        break;\n      case b:\n        h = ((r - g) / c + 4) * 60;\n        break;\n    }\n  }\n  h = Math.round(h);\n  if (h < 0) {\n    h += 360;\n  }\n  return {\n    h: h,\n    hHover: h - 1,\n    hActive: h - 2,\n    s: Math.round(s) + '%',\n    sHover: Math.round(s * 0.92) + '%',\n    sActive: Math.round(s * 0.92 * 0.92) + '%',\n    l: Math.round(l),\n    lHover: Math.round(l - 7) + '%',\n    lActive: Math.round(l - 14) + '%',\n    lDisabled: Math.min(l * 1.72, 100) + '%',\n    lDisabledBackground: '95%',\n    lSecondaryBackground: '83%'\n  };\n}\n$('.article-button').each(function () {\n  if ($(this).hasClass('article-button--change-color')) {\n    var hexColor = $(this).data('changecolor');\n    var _hexToHSL = hexToHSL(hexColor),\n      h = _hexToHSL.h,\n      hHover = _hexToHSL.hHover,\n      hActive = _hexToHSL.hActive,\n      s = _hexToHSL.s,\n      sHover = _hexToHSL.sHover,\n      sActive = _hexToHSL.sActive,\n      l = _hexToHSL.l,\n      lHover = _hexToHSL.lHover,\n      lActive = _hexToHSL.lActive,\n      lDisabled = _hexToHSL.lDisabled,\n      lDisabledBackground = _hexToHSL.lDisabledBackground,\n      lSecondaryBackground = _hexToHSL.lSecondaryBackground;\n    var colorHover = \"hsl(\".concat(hHover, \", \").concat(sHover, \", \").concat(lHover, \")\");\n    var colorActive = \"hsl(\".concat(hActive, \", \").concat(sActive, \", \").concat(lActive, \")\");\n    var colorDisabled = \"hsl(\".concat(h, \", \").concat(s, \", \").concat(lDisabled, \")\");\n    var colorDisabledBackground = \"hsl(\".concat(h, \", \").concat(s, \", \").concat(lDisabledBackground, \")\");\n    var colorSecondaryBackground = \"hsl(\".concat(h, \", \").concat(s, \", \").concat(lSecondaryBackground, \")\");\n    $(this).css('--button-color', hexColor);\n    $(this).css('--button-color-hover', colorHover);\n    $(this).css('--button-color-active', colorActive);\n    $(this).css('--button-color-disabled', colorDisabled);\n    $(this).css('--button-color-disabled-background', colorDisabledBackground);\n    $(this).css('--button-color-secondary-background', colorSecondaryBackground);\n  } else {\n    var rootStyles = getComputedStyle(document.documentElement);\n    var changeColor = rootStyles.getPropertyValue('--button-color').trim();\n    var changeColorHover = rootStyles.getPropertyValue('--button-color-hover').trim();\n    var changeColorActive = rootStyles.getPropertyValue('--button-color-active').trim();\n    var changeColorDisabled = rootStyles.getPropertyValue('--button-color-disabled').trim();\n    var changeColorDisabledBackground = rootStyles.getPropertyValue('--button-color-disabled-background').trim();\n    var changeColorSecondaryBackground = rootStyles.getPropertyValue('--button-color-secondary-background').trim();\n    $(this).css('--button-color', changeColor);\n    $(this).css('--button-color-hover', changeColorHover);\n    $(this).css('--button-color-active', changeColorActive);\n    $(this).css('--button-color-disabled', changeColorDisabled);\n    $(this).css('--button-color-disabled-background', changeColorDisabledBackground);\n    $(this).css('--button-color-secondary-background', changeColorSecondaryBackground);\n  }\n});\n\n//# sourceURL=webpack:///./cartridges/app_storefront_articles/cartridge/client/default/js/experience/articleButton.js?");
128
129/***/ })
130
131/******/ });

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.