Initial Commit
This commit is contained in:
commit
d4a69c41be
2748 files changed
+80489
No files matched your search
@@ -0,0 +1 @@
|
||||
function e(e,t,o,i){var a,n=arguments.length,r=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(r=(n<3?a(r):n>3?a(t,o,r):a(t,o))||r);return n>3&&r&&Object.defineProperty(t,o,r),r}function t(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}"function"==typeof SuppressedError&&SuppressedError;const o=e=>e.type.includes("energy-flow-card-plus");var i,a;function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i])}return e}).apply(this,arguments)}!function(e){e.language="language",e.system="system",e.comma_decimal="comma_decimal",e.decimal_comma="decimal_comma",e.space_comma="space_comma",e.none="none"}(i||(i={})),function(e){e.language="language",e.system="system",e.am_pm="12",e.twenty_four="24"}(a||(a={}));var r=function(e,t,o){var a=t?function(e){switch(e.number_format){case i.comma_decimal:return["en-US","en"];case i.decimal_comma:return["de","es","it"];case i.space_comma:return["fr","sv","cs"];case i.system:return;default:return e.language}}(t):void 0;if(Number.isNaN=Number.isNaN||function e(t){return"number"==typeof t&&e(t)},(null==t?void 0:t.number_format)!==i.none&&!Number.isNaN(Number(e))&&Intl)try{return new Intl.NumberFormat(a,s(e,o)).format(Number(e))}catch(t){return console.error(t),new Intl.NumberFormat(void 0,s(e,o)).format(Number(e))}return"string"==typeof e?e:function(e,t){return void 0===t&&(t=2),Math.round(e*Math.pow(10,t))/Math.pow(10,t)}(e,void 0).toString()+""},s=function(e,t){var o=n({maximumFractionDigits:2},t);if("string"!=typeof e)return o;var i=e.indexOf(".")>-1?e.split(".")[1].length:0;return o.minimumFractionDigits=i,o.maximumFractionDigits=i,o},l=function(e,t,o,i){i=i||{},o=null==o?{}:o;var a=new Event(t,{bubbles:void 0===i.bubbles||i.bubbles,cancelable:Boolean(i.cancelable),composed:void 0===i.composed||i.composed});return a.detail=o,e.dispatchEvent(a),a};const c=e=>e?.split("|").map(e=>e.trim()),d=e=>c(e).at(0)??"",u={maxFlowRate:6,minFlowRate:.75,baseDecimals:0,kiloDecimals:1,minExpectedPower:.01,maxExpectedPower:2e3,kiloThreshold:1e3,megaThreshold:1e6,transparencyZeroLines:0,displayZeroLines:{mode:"show",transparency:50,grey_color:[189,189,189]}};const h=(e,t)=>Number(`${Math.round(Number(`${e}e${t}`))}e-${t}`);function p(e){return!isNaN(parseFloat(e))&&!isNaN(Number(e))}function _(e,t=0){return p(e)?Number(e):t}const m=(e,t,i,{unit:a,unitWhiteSpace:n,decimals:s,accept_negative:l})=>{const c=!1===n?"":" ",d=o(t),_=d?"Wh":"W",m=d?"kWh":"kW",f=d?"MWh":"MW";if(null==i||""===i)return`0${c}${a??_}`;if(!p(i))return i.toString();const g=Number(i),y=void 0===a&&g>=(t.kilo_threshold??u.kiloThreshold),v=void 0===a&&g>=(t.mega_threshold??u.megaThreshold),b=s??(v?t.mega_decimals:y?t.kilo_decimals:t.base_decimals);return`${r((e=>l?e:Math.abs(e))(v?h(g/1e6,b??2):y?h(g/1e3,b??2):h(g,b??0)),e.locale)}${c}${a||(v?f:y?m:_)}`},f=globalThis,g=f.ShadowRoot&&(void 0===f.ShadyCSS||f.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,y=Symbol(),v=new WeakMap;let b=class{constructor(e,t,o){if(this._$cssResult$=!0,o!==y)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(g&&void 0===e){const o=void 0!==t&&1===t.length;o&&(e=v.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),o&&v.set(t,e))}return e}toString(){return this.cssText}};const w=(e,...t)=>{const o=1===e.length?e[0]:t.reduce((t,o,i)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+e[i+1],e[0]);return new b(o,e,y)},k=g?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const o of e.cssRules)t+=o.cssText;return(e=>new b("string"==typeof e?e:e+"",void 0,y))(t)})(e):e,{is:x,defineProperty:S,getOwnPropertyDescriptor:$,getOwnPropertyNames:E,getOwnPropertySymbols:C,getPrototypeOf:A}=Object,D=globalThis,P=D.trustedTypes,M=P?P.emptyScript:"",T=D.reactiveElementPolyfillSupport,z=(e,t)=>e,O={toAttribute(e,t){switch(t){case Boolean:e=e?M:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let o=e;switch(t){case Boolean:o=null!==e;break;case Number:o=null===e?null:Number(e);break;case Object:case Array:try{o=JSON.parse(e)}catch(e){o=null}}return o}},N=(e,t)=>!x(e,t),I={attribute:!0,type:String,converter:O,reflect:!1,useDefault:!1,hasChanged:N};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),D.litPropertyMetadata??(D.litPropertyMetadata=new WeakMap);let j=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(thiLine truncated
|
||||
Binary file not shown.
Reference in new issue
Block a user