PageSourceSearch

https://www.ekmd.de/assets/js/stromzaehler.min.js

js ekmd.de collected 2026-10-09 22:40:24 UTC 3,942 bytes, 1 lines download raw bytes

1function t(t,e,n){if(!e.has(t))throw TypeError("attempted to get private field on non-instance");return n}function e(t,e){!function(t,e){if(e.has(t))throw TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.add(t)}function n(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var i="data-counter-steps",r="data-counter-init-counter",a="data-counter-init-timestamp";export var EkmdCounter;!function(o){function l(t){return t.getUTCMonth()}function u(t){return new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth()))}function s(t){return new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth()+1))}function c(t,e){return(e.valueOf()-t.valueOf())/36e5}function h(t){return c(t,s(t))}function f(t){return c(u(t),t)}o.month=l,o.startOfMonth=u,o.startOfNextMonth=s,o.hoursBetween=c,o.hoursUntilEndOfMonth=h,o.hoursFromStartOfMonth=f;var m=new WeakSet,v=new WeakSet,d=new WeakSet,p=new WeakSet,w=new WeakSet,g=new WeakSet,C=function(){var o;function l(o){var u=this;!function(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}(this,l),e(this,m),e(this,v),e(this,d),e(this,p),e(this,w),e(this,g),n(this,"monthMap",void 0),n(this,"elem",void 0),n(this,"label",void 0),n(this,"init",void 0),n(this,"lastUpdate",void 0),n(this,"timer",void 0),this.elem=o;var s=o.getAttribute(i);if(null==s)throw Error("Counter ".concat(o," is missing an ").concat(i," attribute. Counter will not work"));this.monthMap=JSON.parse(s);var c=o.getAttribute(r);if(null==c)throw Error("Counter ".concat(o," is missing an ").concat(r," attribute. Counter will not work"));var h=o.getAttribute(a);if(null==h)throw Error("Counter ".concat(o," is missing an ").concat(a," attribute. Counter will not work"));this.init={timestamp:new Date(h),counter:parseInt(c)};var f=o.getAttribute("data-counter-label")||"";this.label=f;var C=new Date,b=this.counterStateAt(C);this.lastUpdate={timestamp:C,value:b},this.elem.innerHTML=t(this,g,M).call(this,this.lastUpdate.value),this.timer=setInterval(function(){var e=new Date,n=u.counterStateAt(e,u.lastUpdate.timestamp,u.lastUpdate.value);u.elem.innerHTML=t(u,g,M).call(u,n),u.lastUpdate={timestamp:e,value:n}},300)}return o=[{key:"counterStateAt",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.init.timestamp,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.init.counter;return e.valueOf()<n.valueOf()?i:e.getUTCMonth()===n.getUTCMonth()&&e.getUTCFullYear()===n.getUTCFullYear()?i+t(this,v,y).call(this,n,e):i+t(this,d,U).call(this,n)+t(this,w,T).call(this,n,e)+t(this,p,k).call(this,e)}},{key:"counterStateAtFormatted",value:function(e){return t(this,g,M).call(this,this.counterStateAt(e))}}],function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}(l.prototype,o),l}();function b(t,e){return t*this.monthMap[e]}function y(e,n){return t(this,m,b).call(this,c(e,n),l(e))}function U(e){return t(this,m,b).call(this,h(e),l(e))}function k(e){return t(this,m,b).call(this,f(e),l(e))}function T(e,n){for(var i=u(n),r=s(e),a=s(r),o=0;a<=i;){var h=c(r,a);o+=t(this,m,b).call(this,h,l(r)),a=s(r=a)}return o}function M(t){var e=new Intl.NumberFormat("de-DE",{maximumFractionDigits:0}).format(t);return'\n        <div style="margin: 0 1.5em 0 0;  display: flex; flex-direction: column; width: 100%;">\n          <span class="sztitle">'.concat(this.label,'</span>\n          <span class="sznumber">').concat(e,"</span>\n        </div>\n      ")}o.Counter=C;var S=null===(D=document)||void 0===D?void 0:D.getElementsByClassName("ekmd-energy-counter"),E=!0,O=!1,A=void 0;try{for(var D,x,F=S[Symbol.iterator]();!(E=(x=F.next()).done);E=!0){var W=x.value;new C(W)}}catch(t){O=!0,A=t}finally{try{E||null==F.return||F.return()}finally{if(O)throw A}}}(EkmdCounter||(EkmdCounter={}));

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.