//TODO: repasar y quitar lo relacionado con selectores y precio.
/*TODO:
-Se llama a la [async function init()] dentro de aqui [ecomNormaReferencedScript]
desde fragment [dxp-ecom-portal/misc/fragments/Collection Tienda/ECOM-Global_functions/index.js] de la siguiente manera:
if (typeof window.ecomNormaReferencedScript?.init === "function") {
await window.ecomNormaReferencedScript.init();
}
*/
window.ecomNormaReferencedScript = (function ($) {
/* === CONFIG === */
let DEBUG = false;
let ROOT_SELECTOR = null;
function log(...args) {
if (DEBUG) console.log("[ecomNorma]", ...args);
}
/* === FUNCIONES PRIVADAS === */
function _euros(v) {
const n = Number(v) || 0;
return n.toLocaleString("es-ES", { minimumFractionDigits: 2, maximumFractionDigits: 2 }) + " €";
}
function _uniq(a) {
return Array.from(new Set(a));
}
function _fill($sel, values, textFn) {
const keep = $sel.val();
$sel.empty();
values.forEach(v => {
$sel.append($("










