PageSourceSearch

https://www.endesa.com/etc.clientlibs/enel-common-lib/clientlibs/c…/resources/commodity-card-s-es.js

js endesa.com collected 2026-10-09 22:39:04 UTC 2,454 bytes, 1 lines download raw bytes

1(self.webpackChunkaem_maven_archetype=self.webpackChunkaem_maven_archetype||[]).push([[2034],{1331:function(){!function(){"use strict";var e='[data-cmp-is="commodity-card-s-es"]';function t(e){e&&e.element&&function(e){e.element.removeAttribute("data-cmp-is");const t=new Date(e.element.getAttribute("data-startdate")).getTime(),o=new Date(e.element.getAttribute("data-enddate")).getTime();if(!isNaN(t)&&!isNaN(o)){const r=o-(new Date).getTime();if(r>0){const a=Math.floor(r/864e5),c=Math.floor(r%864e5/36e5),i=Math.floor(r%36e5/6e4);e.element.querySelector(".commodity-card-s-es__footer__countdown__time__days").innerHTML=a+"d",e.element.querySelector(".commodity-card-s-es__footer__countdown__time__hours").innerHTML=c+"h",e.element.querySelector(".commodity-card-s-es__footer__countdown__time__minutes").innerHTML=i+"m";var n=Math.floor((o-t)/864e5);if(n<=0)return;const l=(n-Math.max(a,0))/n*100;e.element.querySelector(".commodity-card-s-es__footer__progress-bar-fill").style.width=`${l}%`}else null!=e.element.querySelector(".commodity-card-s-es__footer")&&(e.element.querySelector(".commodity-card-s-es__footer").remove(),e.element.querySelector(".commodity-card-s-es__content").classList.add("no-footer"))}!function(e){const t=e.querySelectorAll(".commodity-card-s-es__content__body__information__price__detail__info__tooltip__icon"),o=e.querySelectorAll(".commodity-card-s-es__content__body__information__price__detail__info__tooltip__container__header__close");t.forEach((function(e){e.addEventListener("click",(function(t){t.preventDefault(),e.nextElementSibling.style.display="flex"}))})),o.forEach((function(e){e.addEventListener("click",(function(t){t.preventDefault(),e.parentElement.parentElement.style.display="none"}))}))}(e.element)}(e)}function o(){for(var o=document.querySelectorAll(e),n=0;n<o.length;n++)new t({element:o[n]});document.querySelectorAll(".toggleSwitch-card-s").forEach((e=>{e.addEventListener("change",(function(){let e=this.parentElement;for(;e&&!e.hasAttribute("data-tax");)e=e.parentElement;const t=parseFloat(e.getAttribute("data-tax"));e.querySelectorAll(".newprice").forEach((e=>{const o=e.innerHTML,n=o.match(/\d+([.,]\d+)?/)[0],r=parseFloat(n.replace(",",".")),a=this.checked?Number((r*(1+t)).toFixed(3)):Number((r/(1+t)).toFixed(3)),c=r<1?a.toFixed(3).replace(".",","):a,i=o.replace(n,c);e.setHTMLUnsafe(i)}))}))}))}"loading"!==document.readyState?o():document.addEventListener("DOMContentLoaded",o)}()}}]);

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.