2913 lines
622 KiB
JavaScript
2913 lines
622 KiB
JavaScript
function t(t,e,i,o){var n,a=arguments.length,s=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,o);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(s=(a<3?n(s):a>3?n(e,i,s):n(e,i))||s);return a>3&&s&&Object.defineProperty(e,i,s),s}"function"==typeof SuppressedError&&SuppressedError;
|
||
/**
|
||
* @license
|
||
* Copyright 2019 Google LLC
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*/
|
||
const e=globalThis,i=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),n=new WeakMap;let a=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(i&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=n.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&n.set(e,t))}return t}toString(){return this.cssText}};const s=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[o+1]),t[0]);return new a(i,t,o)},r=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new a("string"==typeof t?t:t+"",void 0,o))(e)})(t):t
|
||
/**
|
||
* @license
|
||
* Copyright 2017 Google LLC
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*/,{is:l,defineProperty:c,getOwnPropertyDescriptor:d,getOwnPropertyNames:h,getOwnPropertySymbols:u,getPrototypeOf:m}=Object,p=globalThis,_=p.trustedTypes,g=_?_.emptyScript:"",f=p.reactiveElementPolyfillSupport,b=(t,e)=>t,v={toAttribute(t,e){switch(e){case Boolean:t=t?g:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},y=(t,e)=>!l(t,e),w={attribute:!0,type:String,converter:v,reflect:!1,hasChanged:y};Symbol.metadata??=Symbol("metadata"),p.litPropertyMetadata??=new WeakMap;let x=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=w){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),o=this.getPropertyDescriptor(t,i,e);void 0!==o&&c(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){const{get:o,set:n}=d(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return o?.call(this)},set(e){const a=o?.call(this);n.call(this,e),this.requestUpdate(t,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??w}static _$Ei(){if(this.hasOwnProperty(b("elementProperties")))return;const t=m(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(b("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(b("properties"))){const t=this.properties,e=[...h(t),...u(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(r(t))}else void 0!==t&&e.push(r(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$Eg=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$ES??=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$ES?.splice(this._$ES.indexOf(t)>>>0,1)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,o)=>{if(i)t.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of o){const o=document.createElement("style"),n=e.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=i.cssText,t.appendChild(o)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$ES?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$ES?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e){const i=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,i);if(void 0!==o&&!0===i.reflect){const n=(void 0!==i.converter?.toAttribute?i.converter:v).toAttribute(e,i.type);this._$Em=t,null==n?this.removeAttribute(o):this.setAttribute(o,n),this._$Em=null}}_$AK(t,e){const i=this.constructor,o=i._$Eh.get(t);if(void 0!==o&&this._$Em!==o){const t=i.getPropertyOptions(o),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:v;this._$Em=o,this[o]=n.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,i,o=!1,n){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??y)(o?n:this[t],e))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$Eg=this._$EP())}C(t,e,i){this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t)!0!==i.wrapped||this._$AL.has(e)||void 0===this[e]||this.C(e,this[e],i)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$ES?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$ET()}catch(e){throw t=!1,this._$ET(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$ES?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EO(t,this[t]))),this._$ET()}updated(t){}firstUpdated(t){}};x.elementStyles=[],x.shadowRootOptions={mode:"open"},x[b("elementProperties")]=new Map,x[b("finalized")]=new Map,f?.({ReactiveElement:x}),(p.reactiveElementVersions??=[]).push("2.0.1");
|
||
/**
|
||
* @license
|
||
* Copyright 2017 Google LLC
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*/
|
||
const k=globalThis,T=k.trustedTypes,S=T?T.createPolicy("lit-html",{createHTML:t=>t}):void 0,M="$lit$",D=`lit$${(Math.random()+"").slice(9)}$`,C="?"+D,A=`<${C}>`,P=document,E=()=>P.createComment(""),L=t=>null===t||"object"!=typeof t&&"function"!=typeof t,$=Array.isArray,z="[ \t\n\f\r]",O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,V=/-->/g,H=/>/g,R=RegExp(`>|${z}(?:([^\\s"'>=/]+)(${z}*=${z}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),I=/'/g,N=/"/g,F=/^(?:script|style|textarea|title)$/i,W=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),B=W(1),j=W(2),U=Symbol.for("lit-noChange"),Y=Symbol.for("lit-nothing"),q=new WeakMap,Z=P.createTreeWalker(P,129);function X(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==S?S.createHTML(e):e}const K=(t,e)=>{const i=t.length-1,o=[];let n,a=2===e?"<svg>":"",s=O;for(let e=0;e<i;e++){const i=t[e];let r,l,c=-1,d=0;for(;d<i.length&&(s.lastIndex=d,l=s.exec(i),null!==l);)d=s.lastIndex,s===O?"!--"===l[1]?s=V:void 0!==l[1]?s=H:void 0!==l[2]?(F.test(l[2])&&(n=RegExp("</"+l[2],"g")),s=R):void 0!==l[3]&&(s=R):s===R?">"===l[0]?(s=n??O,c=-1):void 0===l[1]?c=-2:(c=s.lastIndex-l[2].length,r=l[1],s=void 0===l[3]?R:'"'===l[3]?N:I):s===N||s===I?s=R:s===V||s===H?s=O:(s=R,n=void 0);const h=s===R&&t[e+1].startsWith("/>")?" ":"";a+=s===O?i+A:c>=0?(o.push(r),i.slice(0,c)+M+i.slice(c)+D+h):i+D+(-2===c?e:h)}return[X(t,a+(t[i]||"<?>")+(2===e?"</svg>":"")),o]};class G{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let n=0,a=0;const s=t.length-1,r=this.parts,[l,c]=K(t,e);if(this.el=G.createElement(l,i),Z.currentNode=this.el.content,2===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(o=Z.nextNode())&&r.length<s;){if(1===o.nodeType){if(o.hasAttributes())for(const t of o.getAttributeNames())if(t.endsWith(M)){const e=c[a++],i=o.getAttribute(t).split(D),s=/([.?@])?(.*)/.exec(e);r.push({type:1,index:n,name:s[2],strings:i,ctor:"."===s[1]?it:"?"===s[1]?ot:"@"===s[1]?nt:et}),o.removeAttribute(t)}else t.startsWith(D)&&(r.push({type:6,index:n}),o.removeAttribute(t));if(F.test(o.tagName)){const t=o.textContent.split(D),e=t.length-1;if(e>0){o.textContent=T?T.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],E()),Z.nextNode(),r.push({type:2,index:++n});o.append(t[e],E())}}}else if(8===o.nodeType)if(o.data===C)r.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(D,t+1));)r.push({type:7,index:n}),t+=D.length-1}n++}}static createElement(t,e){const i=P.createElement("template");return i.innerHTML=t,i}}function Q(t,e,i=t,o){if(e===U)return e;let n=void 0!==o?i._$Co?.[o]:i._$Cl;const a=L(e)?void 0:e._$litDirective$;return n?.constructor!==a&&(n?._$AO?.(!1),void 0===a?n=void 0:(n=new a(t),n._$AT(t,i,o)),void 0!==o?(i._$Co??=[])[o]=n:i._$Cl=n),void 0!==n&&(e=Q(t,n._$AS(t,e.values),n,o)),e}class J{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,o=(t?.creationScope??P).importNode(e,!0);Z.currentNode=o;let n=Z.nextNode(),a=0,s=0,r=i[0];for(;void 0!==r;){if(a===r.index){let e;2===r.type?e=new tt(n,n.nextSibling,this,t):1===r.type?e=new r.ctor(n,r.name,r.strings,this,t):6===r.type&&(e=new at(n,this,t)),this._$AV.push(e),r=i[++s]}a!==r?.index&&(n=Z.nextNode(),a++)}return Z.currentNode=P,o}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class tt{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,o){this.type=2,this._$AH=Y,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cv=o?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Q(this,t,e),L(t)?t===Y||null==t||""===t?(this._$AH!==Y&&this._$AR(),this._$AH=Y):t!==this._$AH&&t!==U&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>$(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==Y&&L(this._$AH)?this._$AA.nextSibling.data=t:this.$(P.createTextNode(t)),this._$AH=t}g(t){const{values:e,_$litType$:i}=t,o="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=G.createElement(X(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===o)this._$AH.p(e);else{const t=new J(o,this),i=t.u(this.options);t.p(e),this.$(i),this._$AH=t}}_$AC(t){let e=q.get(t.strings);return void 0===e&&q.set(t.strings,e=new G(t)),e}T(t){$(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const n of t)o===e.length?e.push(i=new tt(this.k(E()),this.k(E()),this,this.options)):i=e[o],i._$AI(n),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class et{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,o,n){this.type=1,this._$AH=Y,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=n,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Y}_$AI(t,e=this,i,o){const n=this.strings;let a=!1;if(void 0===n)t=Q(this,t,e,0),a=!L(t)||t!==this._$AH&&t!==U,a&&(this._$AH=t);else{const o=t;let s,r;for(t=n[0],s=0;s<n.length-1;s++)r=Q(this,o[i+s],e,s),r===U&&(r=this._$AH[s]),a||=!L(r)||r!==this._$AH[s],r===Y?t=Y:t!==Y&&(t+=(r??"")+n[s+1]),this._$AH[s]=r}a&&!o&&this.O(t)}O(t){t===Y?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class it extends et{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===Y?void 0:t}}class ot extends et{constructor(){super(...arguments),this.type=4}O(t){this.element.toggleAttribute(this.name,!!t&&t!==Y)}}class nt extends et{constructor(t,e,i,o,n){super(t,e,i,o,n),this.type=5}_$AI(t,e=this){if((t=Q(this,t,e,0)??Y)===U)return;const i=this._$AH,o=t===Y&&i!==Y||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,n=t!==Y&&(i===Y||o);o&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class at{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Q(this,t)}}const st=k.litHtmlPolyfillSupport;st?.(G,tt),(k.litHtmlVersions??=[]).push("3.0.2");
|
||
/**
|
||
* @license
|
||
* Copyright 2017 Google LLC
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*/
|
||
class rt extends x{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{const o=i?.renderBefore??e;let n=o._$litPart$;if(void 0===n){const t=i?.renderBefore??null;o._$litPart$=n=new tt(e.insertBefore(E(),t),t,void 0,i??{})}return n._$AI(t),n})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return U}}rt._$litElement$=!0,rt.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:rt});const lt=globalThis.litElementPolyfillSupport;lt?.({LitElement:rt}),(globalThis.litElementVersions??=[]).push("4.0.1");
|
||
/**
|
||
* @license
|
||
* Copyright 2017 Google LLC
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*/
|
||
const ct=t=>(e,i)=>{void 0!==i?i.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)}
|
||
/**
|
||
* @license
|
||
* Copyright 2017 Google LLC
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*/,dt={attribute:!0,type:String,converter:v,reflect:!1,hasChanged:y},ht=(t=dt,e,i)=>{const{kind:o,metadata:n}=i;let a=globalThis.litPropertyMetadata.get(n);if(void 0===a&&globalThis.litPropertyMetadata.set(n,a=new Map),a.set(i.name,t),"accessor"===o){const{name:o}=i;return{set(i){const n=e.get.call(this);e.set.call(this,i),this.requestUpdate(o,n,t)},init(e){return void 0!==e&&this.C(o,void 0,t),e}}}if("setter"===o){const{name:o}=i;return function(i){const n=this[o];e.call(this,i),this.requestUpdate(o,n,t)}}throw Error("Unsupported decorator location: "+o)};function ut(t){return(e,i)=>"object"==typeof i?ht(t,e,i):((t,e,i)=>{const o=e.hasOwnProperty(i);return e.constructor.createProperty(i,o?{...t,wrapped:!0}:t),o?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)
|
||
/**
|
||
* @license
|
||
* Copyright 2017 Google LLC
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*/}function mt(t){return ut({...t,state:!0,attribute:!1})}
|
||
/**
|
||
* @license
|
||
* Copyright 2017 Google LLC
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*/const pt=(t,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,i),i)
|
||
/**
|
||
* @license
|
||
* Copyright 2017 Google LLC
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*/;function _t(t,e){return(i,o,n)=>{const a=e=>e.renderRoot?.querySelector(t)??null;if(e){const{get:t,set:s}="object"==typeof o?i:n??(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return pt(i,o,{get(){if(e){let e=t.call(this);return void 0===e&&(e=a(this),s.call(this,e)),e}return a(this)}})}return pt(i,o,{get(){return a(this)}})}}
|
||
/**
|
||
* @license
|
||
* Copyright 2017 Google LLC
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*/const gt=1;class ft{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
|
||
/**
|
||
* @license
|
||
* Copyright 2018 Google LLC
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*/const bt=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends ft{constructor(t){if(super(t),t.type!==gt||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!this.st?.has(t)&&this.it.add(t);return this.render(e)}const i=t.element.classList;for(const t of this.it)t in e||(i.remove(t),this.it.delete(t));for(const t in e){const o=!!e[t];o===this.it.has(t)||this.st?.has(t)||(o?(i.add(t),this.it.add(t)):(i.remove(t),this.it.delete(t)))}return U}});var vt="M6.59,0.66C8.93,-1.15 11.47,1.06 12.04,4.5C12.47,4.5 12.89,4.62 13.27,4.84C13.79,4.24 14.25,3.42 14.07,2.5C13.65,0.35 16.06,-1.39 18.35,1.58C20.16,3.92 17.95,6.46 14.5,7.03C14.5,7.46 14.39,7.89 14.16,8.27C14.76,8.78 15.58,9.24 16.5,9.06C18.63,8.64 20.38,11.04 17.41,13.34C15.07,15.15 12.53,12.94 11.96,9.5C11.53,9.5 11.11,9.37 10.74,9.15C10.22,9.75 9.75,10.58 9.93,11.5C10.35,13.64 7.94,15.39 5.65,12.42C3.83,10.07 6.05,7.53 9.5,6.97C9.5,6.54 9.63,6.12 9.85,5.74C9.25,5.23 8.43,4.76 7.5,4.94C5.37,5.36 3.62,2.96 6.59,0.66M5,16H7A2,2 0 0,1 9,18V24H7V22H5V24H3V18A2,2 0 0,1 5,16M5,18V20H7V18H5M12.93,16H15L12.07,24H10L12.93,16M18,16H21V18H18V22H21V24H18A2,2 0 0,1 16,22V18A2,2 0 0,1 18,16Z",yt="M19,19H5V5H19M19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M11,15H13V17H11V15M11,7H13V13H11V7",wt="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z",xt="M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z",kt="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z",Tt="M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z",St="M12,11A1,1 0 0,0 11,12A1,1 0 0,0 12,13A1,1 0 0,0 13,12A1,1 0 0,0 12,11M12.5,2C17,2 17.11,5.57 14.75,6.75C13.76,7.24 13.32,8.29 13.13,9.22C13.61,9.42 14.03,9.73 14.35,10.13C18.05,8.13 22.03,8.92 22.03,12.5C22.03,17 18.46,17.1 17.28,14.73C16.78,13.74 15.72,13.3 14.79,13.11C14.59,13.59 14.28,14 13.88,14.34C15.87,18.03 15.08,22 11.5,22C7,22 6.91,18.42 9.27,17.24C10.25,16.75 10.69,15.71 10.89,14.79C10.4,14.59 9.97,14.27 9.65,13.87C5.96,15.85 2,15.07 2,11.5C2,7 5.56,6.89 6.74,9.26C7.24,10.25 8.29,10.68 9.22,10.87C9.41,10.39 9.73,9.97 10.14,9.65C8.15,5.96 8.94,2 12.5,2Z",Mt="M5,2V13H8V22L15,10H11L15,2M17,15H19V17H17V15M17,7H19V13H17V7Z",Dt="M8.5 4.5L5.4 9.5L8.5 14.7L5.2 20.5L3.4 19.6L6.1 14.7L3 9.5L6.7 3.6L8.5 4.5M14.7 4.4L11.6 9.5L14.7 14.5L11.4 20.3L9.6 19.4L12.3 14.5L9.2 9.5L12.9 3.5L14.7 4.4M21 4.4L17.9 9.5L21 14.5L17.7 20.3L15.9 19.4L18.6 14.5L15.5 9.5L19.2 3.5L21 4.4",Ct="M12,3L2,12H5V20H19V12H22L12,3M12,8.75A2.25,2.25 0 0,1 14.25,11A2.25,2.25 0 0,1 12,13.25A2.25,2.25 0 0,1 9.75,11A2.25,2.25 0 0,1 12,8.75M12,15C13.5,15 16.5,15.75 16.5,17.25V18H7.5V17.25C7.5,15.75 10.5,15 12,15Z",At="M13 9H11V7H13V9M13 17H11V11H13V17M5 3H19C20.1 3 21 3.89 21 5V19C21 19.53 20.79 20.04 20.41 20.41C20.04 20.79 19.53 21 19 21H5C4.47 21 3.96 20.79 3.59 20.41C3.21 20.04 3 19.53 3 19V5C3 3.89 3.89 3 5 3M19 19V5H5V19H19Z",Pt="M12,17A2,2 0 0,0 14,15C14,13.89 13.1,13 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V10C4,8.89 4.9,8 6,8H7V6A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,3A3,3 0 0,0 9,6V8H15V6A3,3 0 0,0 12,3Z",Et="M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V10A2,2 0 0,1 6,8H15V6A3,3 0 0,0 12,3A3,3 0 0,0 9,6H7A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,17A2,2 0 0,0 14,15A2,2 0 0,0 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17Z",Lt="M12 2C7.04 2 3 6.04 3 11C3 14.91 5.5 18.24 9 19.47V22H11V19.94C11.33 20 11.66 20 12 20S12.67 20 13 19.94V22H15V19.47C18.5 18.23 21 14.9 21 11C21 6.04 16.96 2 12 2M14.25 14L11.25 17L9.75 15.5L11 14.25L9.75 13L12.75 10L14.25 11.5L13 12.75L14.25 14M16 9H8V7H16V9Z",$t="M10,0.2C9,0.2 8.2,1 8.2,2C8.2,3 9,3.8 10,3.8C11,3.8 11.8,3 11.8,2C11.8,1 11,0.2 10,0.2M15.67,1A7.33,7.33 0 0,0 23,8.33V7A6,6 0 0,1 17,1H15.67M18.33,1C18.33,3.58 20.42,5.67 23,5.67V4.33C21.16,4.33 19.67,2.84 19.67,1H18.33M21,1A2,2 0 0,0 23,3V1H21M7.92,4.03C7.75,4.03 7.58,4.06 7.42,4.11L2,5.8V11H3.8V7.33L5.91,6.67L2,22H3.8L6.67,13.89L9,17V22H10.8V15.59L8.31,11.05L9.04,8.18L10.12,10H15V8.2H11.38L9.38,4.87C9.08,4.37 8.54,4.03 7.92,4.03Z",zt="M18.73,18C15.4,21.69 9.71,22 6,18.64C2.33,15.31 2.04,9.62 5.37,5.93C6.9,4.25 9,3.2 11.27,3C7.96,6.7 8.27,12.39 12,15.71C13.63,17.19 15.78,18 18,18C18.25,18 18.5,18 18.73,18Z",Ot="M17 13V7H19V13H17M17 17V15H19V17H17M13 13V5C13 3.3 11.7 2 10 2S7 3.3 7 5V13C4.8 14.7 4.3 17.8 6 20S10.8 22.7 13 21 15.7 16.2 14 14C13.7 13.6 13.4 13.3 13 13M10 4C10.6 4 11 4.4 11 5V8H9V5C9 4.4 9.4 4 10 4Z",Vt="M12,3.25C12,3.25 6,10 6,14C6,17.32 8.69,20 12,20A6,6 0 0,0 18,14C18,10 12,3.25 12,3.25M14.47,9.97L15.53,11.03L9.53,17.03L8.47,15.97M9.75,10A1.25,1.25 0 0,1 11,11.25A1.25,1.25 0 0,1 9.75,12.5A1.25,1.25 0 0,1 8.5,11.25A1.25,1.25 0 0,1 9.75,10M14.25,14.5A1.25,1.25 0 0,1 15.5,15.75A1.25,1.25 0 0,1 14.25,17A1.25,1.25 0 0,1 13,15.75A1.25,1.25 0 0,1 14.25,14.5Z",Ht="M21 20V2H3V20H1V23H23V20M19 4V11H17V4M5 4H7V11H5M5 20V13H7V20M9 20V4H15V20M17 20V13H19V20Z",Rt="M2 4H20V8H18V20H16V8H6V20H4V8H2V4M7 9H15V11H7V9M7 12H15V14H7V12M20 19V17H22V19H20M20 15V10H22V15H20Z";var It={version:"version",current:"current"},Nt={card:{climate:{autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",allow_lock_toggle:"Allow lock/unlock from card",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Allow preset temperature modification",show_status_text:"Show current HVAC action text",show_background_gradient_on_active:"Show the slider background gradient when the entity is active",show_regulation_chart:"Show regulation chart"}}},Ft={window_open:"Window open",window_bypass:"Bypass window activated",night_mode:"Night mode",eco:"Eco",overpowering:"Overpowering detected",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active",lock_users_active:"User controls locked",lock_automations_active:"Automation changes locked","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",code_error:"Incorrect code",lock:"Lock",unlock:"Unlock",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Preset temperatures",preset_mod_no_entities:"No preset temperature entities found for this device.",preset_row_heat:"Heat",preset_row_heat_away:"Heat away",preset_row_cool:"Cool",preset_row_cool_away:"Cool away",regulation_chart_title:"Regulation chart"},Wt={common:It,editor:Nt,extra_states:Ft},Bt=Object.freeze({__proto__:null,common:It,default:Wt,editor:Nt,extra_states:Ft}),jt={version:"Version",current:"Aktuell"},Ut={card:{climate:{autoStartStopEnableEntity:"Auto-Start/Stop-Entität",powerEntity:"Entität für den Stromverbrauch",theme:"Thema",theme_classic:"Klassisch",theme_vtherm:"VTherm",theme_uncolored:"Ohne Farbe",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",disable_window:"Fenster deaktivieren",disable_autoStartStop:"Auto-Start/Stop deaktivieren",disable_overpowering:"Überverbrauch deaktivieren",disable_heat:"Heizen deaktivieren",disable_cool:"Kühlen deaktivieren",disable_heat_cool:"Heizen/Kühlen deaktivieren",disable_auto:"Auto deaktivieren",disable_fan_only:"Nur-Lüfter deaktivieren",disable_dry:"Entfeuchten deaktivieren",disable_off:"Aus deaktivieren",disable_menu:"Menü deaktivieren",set_current_as_main:"Zieltemperatur mit aktueller Temperatur tauschen",disable_safety_warning:"Sicherheitsmeldungen deaktivieren",disable_buttons:"Plus/Minus-Buttons deaktivieren",disable_power_infos:"Verbrauchsinformationen deaktivieren",disable_auto_fan_infos:"Auto-Lüfter-Informationen deaktivieren",disable_name:"Name deaktivieren",eco_temperature:"Eco-Temperatur",allow_lock_toggle:"Allow lock/unlock from card",menu_system:"System menu",disable_sleep:"Disable sleep mode",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Voreinstellungstemperaturen bearbeitbar machen",show_status_text:"Aktuellen Status als Text anzeigen",show_background_gradient_on_active:"Hintergrundverlauf des Schiebereglers anzeigen, wenn die Entität aktiv ist",show_regulation_chart:"Show regulation chart"}}},Yt={window_open:"Fenster offen",window_bypass:"Fenster-Bypass aktiviert",night_mode:"Nachtmodus",eco:"Eco",overpowering:"Überverbrauch erkannt",none:"Manuell",comfort:"Komfort",boost:"Boost",frost:"Frostschutz",power:"Lastabwurf",activity:"Aktivität erkannt",presence:"Anwesenheit erkannt",motion:"Bewegung erkannt",auto_regulation_light:"Leicht",auto_regulation_medium:"Mittel",auto_regulation_strong:"Stark",auto_regulation_slow:"Langsam",auto_regulation_expert:"Experte",auto_fan_mode:"Auto-Lüfter",auto_fan_mode_off:"Keine",auto_fan_none:"Keine",auto_fan_low:"Niedrig",auto_fan_medium:"Mittel",auto_fan_high:"Hoch",auto_fan_turbo:"Turbo",fan_low:"Niedrig",fan_low_mid:"Niedrig-mittel",fan_mid:"Mittel",fan_mid_high:"Mittel-hoch",fan_high:"Hoch",fan_mute:"Leise",fan_turbo:"Turbo",fan_none:"Keine",fan_auto:"Auto",change_message:"Klicken zum Ändern des Presets",toggle_message:"Klicken zum Umschalten",auto_start_stop:"Gestoppt durch Auto-Start/Stop",auto_start_stop_enable:"Aktiviert/deaktiviert Auto-Start/Stop",auto_start_stop_label:"Auto-Start/Stop",temp_unavailable:"-",sleep:"Schlafmodus",lock_users_active:"Benutzersteuerung gesperrt",lock_automations_active:"Automatisierungsänderungen gesperrt",lock:"Sperren",unlock:"Entsperren",code_error:"Falscher Code",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",increase_temp:"Temperatur erhöhen",decrease_temp:"Temperatur verringern",undefined:"None",auto_fan_boost:"Boost",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",not_initialized:"Initialisation error",preset_mod_title:"Voreinstellungstemperaturen",preset_mod_no_entities:"Keine Voreinstellungstemperatur-Entitäten für dieses Gerät gefunden.",preset_row_heat:"Heizen",preset_row_heat_away:"Heizen (abwesend)",preset_row_cool:"Kühlen",preset_row_cool_away:"Kühlen (abwesend)",regulation_chart_title:"Regulation chart"},qt={common:jt,editor:Ut,extra_states:Yt},Zt=Object.freeze({__proto__:null,common:jt,default:qt,editor:Ut,extra_states:Yt}),Xt={version:"version",current:"Actuelle"},Kt={card:{climate:{autoStartStopEnableEntity:"Entité - auto-start/stop",powerEntity:"Entité - puissance consommée",theme:"Thème",theme_classic:"Classique",theme_vtherm:"VTherm",theme_uncolored:"Sans couleur",theme_gunmalmg:"Gunmalmg",section_all_themes:"Pour tous les thèmes",section_classic_only:"Pour les thèmes Classique, VTherm et Sans couleur",menu_system:"Menu système",disable_window:"Désactiver fenêtre status",disable_autoStartStop:"Désactiver auto-startStop",disable_overpowering:"Désactiver sur-puissance status",disable_heat:"Désactiver mode chauffe",disable_cool:"Désactiver mode clim",disable_heat_cool:"Désactiver mode chauffe/clim",disable_auto:"Désactiver mode auto",disable_fan_only:"Désactiver mode ventilation",disable_dry:"Désactiver mode déshumidification",disable_off:"Désactiver mode arret",disable_sleep:"Désactiver mode endormi",set_current_as_main:"Echanger temperature cible avec temperature locale",disable_safety_warning:"Désactiver sécurité messages",disable_buttons:"Désactiver les boutons +/-",disable_power_infos:"Désactiver les infos de puissance",disable_auto_fan_infos:"Désactiver les infos auto-ventilation",disable_name:"Désactiver le nom",disable_target_icon:"Désactiver l'icône cible",allow_lock_toggle:"Activer le verrouillage/déverrouillage depuis la carte",disable_presets:"Désactiver les presets",disable_timed_preset:"Désactiver le champ de durée du preset temporisé",use_manual_duration_input:"Permettre la saisie manuelle de la durée",allow_preset_modification:"Permettre la modification des températures de preset",disable_menu:"Désactiver le menu",show_status_text:"Afficher l'état du HVAC en texte",show_background_gradient_on_active:"Afficher le dégradé de fond du slider lorsque l'entité est active",show_regulation_chart:"Afficher le graphique de régulation"}}},Gt={window_open:"Fenêtre ouverte",window_bypass:"Bypass fenêtre activé",eco:"Eco",overpowering:"Sur-puissance détectée",none:"Manuel",comfort:"Confort",boost:"Boost",frost:"Hors-gel",power:"Délestage",activity:"Activité",presence:"Présence détectée",motion:"Mouvement détecté",auto_regulation_light:"Légère",auto_regulation_medium:"Moyenne",auto_regulation_strong:"Forte",auto_regulation_slow:"Lente",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"Aucun",auto_fan_none:"Aucun",auto_fan_low:"Bas",auto_fan_medium:"Moyen",auto_fan_high:"Haut",auto_fan_turbo:"Turbo",fan_low:"Bas",fan_low_mid:"Bas-moyen",fan_mid:"Moyen",fan_mid_high:"Moyen-haut",fan_high:"Haut",fan_mute:"Silence",fan_turbo:"Turbo",fan_none:"Aucun",fan_auto:"Auto",fan_1:"Vitesse 1",fan_2:"Vitesse 2",fan_3:"Vitesse 3",fan_4:"Vitesse 4",fan_5:"Vitesse 5",change_message:"Clic pour sélectionner le preset",toggle_message:"Clic pour basculer",auto_start_stop:"Stoppé par auto-start/stop",auto_start_stop_enable:"Active/désactive l'auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Endormi","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Temp. pièce",outdoor_temp:"Temp. ext.",safety_warning:"Attention",safety_warning_msg:"défaut de temp.",hvac_off_manual:"Eteint manuellement",hvac_off_auto_start_stop:"Eteint par auto-start/stop",hvac_off_window_detection:"Eteint par détection d'ouverture",hvac_off_sleep_mode:"Eteint par le mode endormi",hvac_off_safety_detection:"Eteint par le mode sécurité",hvac_off_central_mode:"Eteint par le mode central",safety_detected:"Mode sécurité détectée",overpowering_detected:"Sur-puissance détectée",target_temp_window_eco:"Temp. cible : fenêtre éco",target_temp_window_frost:"Temp. cible : fenêtre hors-gel",target_temp_power:"Temp. cible : délestage",target_temp_central_mode:"Temp. cible : mode central",target_temp_activity_detected:"Temp. cible : activité détectée",target_temp_activity_not_detected:"Temp. cible : activité non détectée",target_temp_absence_detected:"Temp. cible : absence détectée",target_temp_timed_preset:"Temporisation d'un preset active",lock_users_active:"Verrouillage utilisateurs actif",lock_automations_active:"Verrouillage automations actif","messages-button":"Pourquoi cet état ?",recalculation_scheduled:"Sous-jacent en cours de mise à jour","window-bypass-button":"Basculer le bypass fenêtre",code_error:"Code incorrect",lock:"Verrouiller",unlock:"Déverrouiller",timed_preset_title:"Durée en minutes (0 = permanent)",timed_preset_active:"Preset temporisé actif",cancel_timed_preset:"Annuler le preset temporisé",heating_failure:"Défaut de chauffage détecté",cooling_failure:"Défaut de refroidissement détecté",increase_temp:"Augmenter la température",decrease_temp:"Diminuer la température",night_mode:"Mode nuit",undefined:"Aucun",auto_fan_boost:"Boost",not_initialized:"Erreur d'initialisation",preset_mod_title:"Températures des presets",preset_mod_no_entities:"Aucune entité de température de preset trouvée pour cet appareil.",preset_row_heat:"Chauffe",preset_row_heat_away:"Chauffe absent",preset_row_cool:"Clim.",preset_row_cool_away:"Clim. absent",regulation_chart_title:"Graphique de régulation"},Qt={common:Xt,editor:Kt,extra_states:Gt},Jt=Object.freeze({__proto__:null,common:Xt,default:Qt,editor:Kt,extra_states:Gt}),te={version:"Версия",current:"Текущая"},ee={card:{climate:{autoStartStopEnableEntity:"Сущность автоматического старта/стопа",powerEntity:"Сущность потребления энергии",disable_window:"Отключить окно",disable_autoStartStop:"Отключить автоматический старт/стоп",disable_overpowering:"Отключить перегрузку",disable_heat:"Отключить обогрев",disable_cool:"Отключить охлаждение",disable_heat_cool:"Отключить обогрев/охлаждение",disable_auto:"Отключить авто",disable_fan_only:"Отключить только вентилятор",disable_dry:"Отключить осушение",disable_off:"Отключить режим выключения",disable_sleep:"Отключить спящий режим",disable_menu:"Отключить меню",set_current_as_main:"Поменять местами целевую и текущую температуру",disable_safety_warning:"Отключить сообщения безопасности",disable_buttons:"Отключить кнопки плюс/минус",disable_power_infos:"Отключить информацию о питании",disable_auto_fan_infos:"Отключить информацию автовентилятора",disable_name:"Отключить название",disable_target_icon:"Отключить иконку цели",allow_lock_toggle:"Разрешить блокировку/разблокировку с карты",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Разрешить изменение температур пресетов",show_status_text:"Показывать текущий статус в виде текста",show_background_gradient_on_active:"Показывать фоновый градиент ползунка, когда сущность активна",show_regulation_chart:"Show regulation chart"}}},ie={window_open:"Окно открыто",window_bypass:"Обход окна активирован",night_mode:"Ночной режим",eco:"Эко",overpowering:"Обнаружена перегрузка",none:"Ручной",comfort:"Комфорт",boost:"Турбо",frost:"Защита от замерзания",power:"Перегрузка",activity:"Обнаружена активность",presence:"Обнаружено присутствие",motion:"Обнаружено движение",undefined:"Нет",auto_regulation_light:"Легкий",auto_regulation_medium:"Средний",auto_regulation_strong:"Сильный",auto_regulation_slow:"Медленный",auto_regulation_expert:"Экспертный",auto_fan_mode:"Авторежим вентилятора",auto_fan_mode_off:"Нет",auto_fan_none:"Нет",auto_fan_low:"Низкий",auto_fan_medium:"Средний",auto_fan_high:"Высокий",auto_fan_boost:"Турбо",fan_low:"Низкий",fan_low_mid:"Низкий-средний",fan_mid:"Средний",fan_mid_high:"Средний-высокий",fan_high:"Высокий",fan_mute:"Тихий",fan_turbo:"Турбо",fan_none:"Нет",fan_auto:"Авто",change_message:"Клик для смены предустановки",toggle_message:"Клик для переключения",auto_start_stop:"Остановлено авто-старт/стопом",auto_start_stop_enable:"Включить/отключить авто-старт/стоп",auto_start_stop_label:"Авто-старт/стоп",temp_unavailable:"-",sleep:"Сон",minutes:"мин",room_temp:"Температура в помещении",outdoor_temp:"Уличная температура",lock_users_active:"Пользовательское управление заблокировано",lock_automations_active:"Изменения автоматизации заблокированы",code_error:"Неверный код",lock:"Блокировать",unlock:"Разблокировать",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5","New strings for recent edits. Please translate":"-------------------------------------",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Температуры пресетов",preset_mod_no_entities:"Не найдено объектов температуры пресетов для этого устройства.",preset_row_heat:"Обогрев",preset_row_heat_away:"Обогрев (отсутствие)",preset_row_cool:"Охлаждение",preset_row_cool_away:"Охлаждение (отсутствие)",regulation_chart_title:"Regulation chart"},oe="Тема",ne="Классический",ae="VTherm",se="Без цвета",re="Gunmalmg",le={common:te,editor:ee,extra_states:ie,theme:oe,theme_classic:ne,theme_vtherm:ae,theme_uncolored:se,theme_gunmalmg:re},ce=Object.freeze({__proto__:null,common:te,default:le,editor:ee,extra_states:ie,theme:oe,theme_classic:ne,theme_gunmalmg:re,theme_uncolored:se,theme_vtherm:ae}),de={version:"wersja",current:"aktualna"},he={card:{climate:{allow_lock_toggle:"Zezwalaj na blokowanie/odblokowanie karty",autoStartStopEnableEntity:"Encja autoSTART/autoSTOP",powerEntity:"Encja poboru mocy",disable_window:"Wyłącz okno",disable_autoStartStop:"Wyłącz autoSTART/autoSTOP",disable_overpowering:"Wyłącz przeciążenie",disable_heat:"Wyłącz tryb grzania",disable_cool:"Wyłącz tryb chłodzenia",disable_heat_cool:"Wyłącz tryb 'grzanie/chłodzenie'",disable_auto:"Wyłącz tryb automatyczny",disable_fan_only:"Wyłącz tryb wentylatora",disable_dry:"Wyłącz tryb osuszania",disable_off:"Wyłącz tryb 'OFF'",disable_sleep:"Wyłącz tryb uśpienia",disable_menu:"Wyłącz menu",set_current_as_main:"Zamień temperaturę docelową z temperaturą pomieszczenia",disable_safety_warning:"Wyłącz ostrzeżenie bezpieczeństwa",disable_buttons:"Wyłącz przyciski +/- (plus/minus)",disable_power_infos:"Wyłącz komunikaty mocy",disable_auto_fan_infos:"Wyłącz komunikaty autowentylacji",disable_name:"Wyłącz nazwę",disable_target_icon:"Wyłącz ikonę",theme:"Motyw",theme_classic:"Klasyczny",theme_vtherm:"VTherm",theme_uncolored:"Bez koloru",theme_gunmalmg:"Gunmalmg",section_all_themes:"Dla wszystkich motywów",section_classic_only:"Dla motywu klasycznego, bez koloru i VTherm",menu_system:"Menu systemowe",disable_presets:"Wyłącz presety",disable_timed_preset:"Wyłącz czas trwania presetu",use_manual_duration_input:"Zamiast selektora zezwól na ręczne ustawienie czasu",allow_preset_modification:"Zezwól na modyfikację temperatur ustawień wstępnych",show_status_text:"Pokaż aktualny status jako tekst",show_background_gradient_on_active:"Pokaż gradient tła suwaka, gdy encja jest aktywna",show_regulation_chart:"Show regulation chart"}}},ue={window_open:"Otwarte okno",window_bypass:"Załączone pomijanie okien",night_mode:"Tryb nocny",eco:"Tryb Eko",overpowering:"Wykryte przeciążenie",none:"Ręczny",theme:"Motyw",theme_classic:"Klasyczny",theme_vtherm:"VTherm",theme_uncolored:"Bez koloru",theme_gunmalmg:"Gunmalmg",comfort:"Komfort",boost:"Boost",frost:"Ochrona przed mrozem",power:"Przeciążenie",activity:"Wykryto aktywność",presence:"Wykryto obecność",motion:"Wykryto ruch",undefined:"Brak",auto_regulation_light:"Słaby",auto_regulation_medium:"Średni",auto_regulation_strong:"Silny",auto_regulation_slow:"Powolny",auto_regulation_expert:"Ekspert",auto_fan_mode:"Autowentylacja",auto_fan_mode_off:"Wyłączony",auto_fan_none:"Brak",auto_fan_low:"Niski",auto_fan_medium:"Średni",auto_fan_high:"Wysoki",auto_fan_boost:"Boost",fan_low:"Niski",fan_low_mid:"Niskośredni",fan_mid:"Średni",fan_mid_high:"Średniowysoki",fan_high:"Wysoki",fan_mute:"Cichy",fan_turbo:"Turbo",fan_none:"Brak",fan_auto:"Auto",change_message:"Kliknij aby zmienić preset",toggle_message:"Kliknij aby przełączyć",auto_start_stop:"Zatrzymany przez autoSTART/autoSTOP",auto_start_stop_enable:"Załącz/wyłącz autoSTART/autoSTOP",auto_start_stop_label:"AutoSTART/autoSTOP",temp_unavailable:"-",sleep:"Uśpienie","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Temp. pomieszczenia",outdoor_temp:"Temp. zewnętrzna",safety_warning:"Ostrzeżenie",safety_warning_msg:"Błąd temperatury",hvac_off_manual:"Wyłączony ręcznie",hvac_off_auto_start_stop:"Wyłączony przez autoSTART/autoSTOP",hvac_off_window_detection:"Wyłączony prze otwarcie okna",hvac_off_sleep_mode:"Wyłączony przez tryb uśpienia",hvac_off_safety_detection:"Wyłączony przez tryb bezpieczny",hvac_off_central_mode:"Wyłączony przez tryb główny",safety_detected:"Wykryty tryb bezpieczny",overpowering_detected:"Wykryte przeciążenie",target_temp_window_eco:"Docelowa temp.: Eko okno",target_temp_window_frost:"Docelowa temp.: ochr. przed mrozem okno",target_temp_power:"Docelowa temp.: moc",target_temp_central_mode:"Docelowa temp.: tryb główny",target_temp_activity_detected:"Docelowa temp.: wykryta aktywność",target_temp_activity_not_detected:"Docelowa temp.: brak aktywności",target_temp_absence_detected:"Docelowa temp.: wykryta nieobecność","messages-button":"Dlaczego taki stan?",recalculation_scheduled:"Aktualizacja urządzeń w toku","window-bypass-button":"Przełącz pomijanie okna",lock_users_active:"Sterowanie użytkownika zablokowane",lock_automations_active:"Zmiany automatyzacji zablokowane",code_error:"Błędny kod",lock:"Zablokuj",unlock:"Odblokuj",heating_failure:"Wykryto błąd ogrzewania",cooling_failure:"Wykryto błąd chłodzenia",fan_1:"Prędkość 1",fan_2:"Prędkość 2",fan_3:"Prędkość 3",fan_4:"Prędkość 4",fan_5:"Prędkość 5",target_temp_timed_preset:"Aktywny preset czasowy",timed_preset_title:"Czas trwania (w min., 0 = stały)",timed_preset_active:"Aktywny preset czasowy",cancel_timed_preset:"Usuń preset czasowy",increase_temp:"Zwiększ temperaturę",decrease_temp:"Obniż temperaturę",not_initialized:"Błąd inicjalizacji",preset_mod_title:"Temperatury ustawień wstępnych",preset_mod_no_entities:"Nie znaleziono jednostek temperatury ustawień wstępnych dla tego urządzenia.",preset_row_heat:"Ogrzewanie",preset_row_heat_away:"Ogrzewanie (nieobecność)",preset_row_cool:"Chłodzenie",preset_row_cool_away:"Chłodzenie (nieobecność)",regulation_chart_title:"Regulation chart"},me={common:de,editor:he,extra_states:ue},pe=Object.freeze({__proto__:null,common:de,default:me,editor:he,extra_states:ue}),_e={version:"verzia",current:"aktuálny"},ge={card:{climate:{disable_window:"Zakázať okno",disable_overpowering:"Zakázať leto",disable_heat:"Zakázať kúrenie",disable_cool:"Zakázať chladenie",disable_heat_cool:"Zakázať kúrenie/chladenie",disable_auto:"Zakázat automatic",disable_fan_only:"Zakázať režim ventilátora",disable_dry:"Zakázať sušenie",disable_off:"Vypnúť",disable_menu:"Zakázať menu",disable_safety_warning:"Zakázať bezpečnostné správy",disable_buttons:"Zakázať plus/mínus tlačidlá",eco_temperature:"Eco teplota",set_current_as_main:"Vymeňte cieľ za miesta s aktuálnou teplotou",allow_lock_toggle:"Povoliť uzamknutie/odomknutie z karty",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_autoStartStop:"Disable auto-startStop",disable_sleep:"Disable sleep mode",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Povoliť úpravu teplôt predvolieb",show_status_text:"Zobraziť aktuálny stav textom",show_background_gradient_on_active:"Zobraziť prechod pozadia posúvača, keď je entita aktívna",show_regulation_chart:"Show regulation chart"}}},fe={window_open:"Okno otvorené",night_mode:"Nočný mód",eco:"Eco",overpowering:"Leto",lock_users_active:"Ovládanie používateľa zamknuté",lock_automations_active:"Zmeny automatizácie zamknuté",code_error:"Chybný kód",lock:"Zamknúť",unlock:"Odomknúť",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Teploty predvolieb",preset_mod_no_entities:"Pre toto zariadenie neboli nájdené žiadne entity teplôt predvolieb.",preset_row_heat:"Kúrenie",preset_row_heat_away:"Kúrenie (neprítomnosť)",preset_row_cool:"Chladenie",preset_row_cool_away:"Chladenie (neprítomnosť)",regulation_chart_title:"Regulation chart"},be="Téma",ve="Klasický",ye="VTherm",we="Bez farby",xe="Gunmalmg",ke={common:_e,editor:ge,extra_states:fe,theme:be,theme_classic:ve,theme_vtherm:ye,theme_uncolored:we,theme_gunmalmg:xe},Te={version:"Verzió",current:"Aktuális"},Se={card:{climate:{disable_window:"Ablak kikapcsolás",disable_overpowering:"Nyár kikapcsolás",disable_heat:"Fűtés kikacsolás",disable_cool:"Hűtés kikapcsolás",disable_heat_cool:"Fűtés/Hűtés kikapcsolás",disable_auto:"Auto kikapcsolás",disable_fan_only:"Csak ventillátor kikapcsolás",disable_dry:"Szárítás kikapcsolás",disable_off:"Kikapcsolás inaktiválás",eco_temperature:"Eco hőmérséklet",set_current_as_main:"Aktuális hőmérséklet használata",allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_autoStartStop:"Disable auto-startStop",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Előbeállítási hőmérsékletek módosításának engedélyezése",show_status_text:"Aktuális állapot megjelenítése szövegként",show_background_gradient_on_active:"A csúszka háttérszínátmenetének megjelenítése, ha az entitás aktív",show_regulation_chart:"Show regulation chart"}}},Me={window_open:"Ablak nyitva",night_mode:"Éjszakai mód",eco:"Eco",overpowering:"Nyár",lock_users_active:"Felhasználói vezérlők zárolva",lock_automations_active:"Automatizálási változtatások zárolva",code_error:"Rossz kód",lock:"Zárolás",unlock:"Feloldás",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Előbeállítási hőmérsékletek",preset_mod_no_entities:"Nem találhatók előbeállítási hőmérséklet entitások ehhez az eszközhöz.",preset_row_heat:"Fűtés",preset_row_heat_away:"Fűtés (távol)",preset_row_cool:"Hűtés",preset_row_cool_away:"Hűtés (távol)",regulation_chart_title:"Regulation chart"},De="Téma",Ce="Klasszikus",Ae="VTherm",Pe="Színtelen",Ee="Gunmalmg",Le={common:Te,editor:Se,extra_states:Me,theme:De,theme_classic:Ce,theme_vtherm:Ae,theme_uncolored:Pe,theme_gunmalmg:Ee},$e={version:"version",current:"nuværende"},ze={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Tillad ændring af forudindstillingstemperaturer",show_status_text:"Vis aktuel status som tekst",show_background_gradient_on_active:"Vis skyderens baggrundsgradient, når enheden er aktiv",show_regulation_chart:"Show regulation chart"}}},Oe={window_open:"Vindue åben",night_mode:"Nattilstand",eco:"Eco",overpowering:"Overpowering",lock_users_active:"Brugerkontroller låst",lock_automations_active:"Automatiske ændringer låst",code_error:"Forkert kode",lock:"Lås",unlock:"Lås op",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Forudindstilte temperaturer",preset_mod_no_entities:"Ingen forudindstillede temperaturenheder fundet for denne enhed.",preset_row_heat:"Varme",preset_row_heat_away:"Varme fraværende",preset_row_cool:"Køling",preset_row_cool_away:"Køling fraværende",regulation_chart_title:"Regulation chart"},Ve="Tema",He="Klassisk",Re="VTherm",Ie="Ufarvet",Ne="Gunmalmg",Fe={common:$e,editor:ze,extra_states:Oe,theme:Ve,theme_classic:He,theme_vtherm:Re,theme_uncolored:Ie,theme_gunmalmg:Ne},We={version:"version",current:"Actual"},Be={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",show_status_text:"Mostrar el estado actual en texto",show_background_gradient_on_active:"Mostrar el degradado de fondo del control deslizante cuando la entidad está activa",allow_preset_modification:"Allow preset temperature modification",show_regulation_chart:"Show regulation chart"}}},je={window_open:"Ventana abierta",night_mode:"Modo noche",eco:"Eco",overpowering:"Verano",lock_users_active:"Controles de usuario bloqueados",lock_automations_active:"Cambios de automatización bloqueados",code_error:"Código incorrecto",lock:"Bloquear",unlock:"Desbloquear",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",increase_temp:"Aumentar la temperatura",decrease_temp:"Disminuir la temperatura",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",not_initialized:"Initialisation error",preset_mod_title:"Temperaturas de presets",preset_mod_no_entities:"No se encontraron entidades de temperatura de preset para este dispositivo.",preset_row_heat:"Calefacción",preset_row_heat_away:"Calefacción ausente",preset_row_cool:"Refrigeración",preset_row_cool_away:"Refrigeración ausente",regulation_chart_title:"Regulation chart"},Ue="Tema",Ye="Clásico",qe="VTherm",Ze="Sin color",Xe="Gunmalmg",Ke={common:We,editor:Be,extra_states:je,theme:Ue,theme_classic:Ye,theme_vtherm:qe,theme_uncolored:Ze,theme_gunmalmg:Xe},Ge={version:"versiyon",current:"şimdiki"},Qe={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Ön ayar sıcaklıklarının değiştirilmesine izin ver",show_status_text:"Mevcut durumu metin olarak göster",show_background_gradient_on_active:"Varlık etkinken kaydırıcı arka plan gradyanını göster",show_regulation_chart:"Show regulation chart"}}},Je={window_open:"Pencere açık",night_mode:"Gece modu",eco:"Eco",overpowering:"Yaz",lock_users_active:"Kullanıcı kontrolleri kilitlendi",lock_automations_active:"Otomasyon değişiklikleri kilitlendi",code_error:"Hatalı kod",lock:"Kilitle",unlock:"Kilidi aç",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Ön ayar sıcaklıkları",preset_mod_no_entities:"Bu cihaz için ön ayar sıcaklığı varlıkları bulunamadı.",preset_row_heat:"Isıtma",preset_row_heat_away:"Isıtma (uzakta)",preset_row_cool:"Soğutma",preset_row_cool_away:"Soğutma (uzakta)",regulation_chart_title:"Regulation chart"},ti="Tema",ei="Klasik",ii="VTherm",oi="Renksiz",ni="Gunmalmg",ai={common:Ge,editor:Qe,extra_states:Je,theme:ti,theme_classic:ei,theme_vtherm:ii,theme_uncolored:oi,theme_gunmalmg:ni},si={version:"versione",current:"attuale"},ri={card:{climate:{autoStartStopEnableEntity:"Entità di avvio/arresto automatico",powerEntity:"Entità di consumo energetico",theme:"Tema",theme_classic:"Classico",theme_vtherm:"VTherm",theme_uncolored:"Senza colore",theme_gunmalmg:"Gunmalmg",section_all_themes:"Per tutti i temi",section_classic_only:"Per i temi Classic, VTherm e Uncolored",menu_system:"System menu",disable_window:"Disabilita la finestra",disable_autoStartStop:"Disabilita Avvio/Arresto automatico",disable_overpowering:"Disabilita la sovralimentazione",disable_heat:"Disabilita Riscalda",disable_cool:"Disabilita Raffresca",disable_heat_cool:"Disabilita Riscalda/Raffredda",disable_auto:"Disabilita Automatico",disable_fan_only:"Disabilita Ventilazione",disable_dry:"Disabilita Deumidifica",disable_off:"Disabilita off",disable_menu:"Disabilita menu",set_current_as_main:"Scambia Setpoint con Temperatura ambiente",disable_safety_warning:"Disabilita i messaggi di sicurezza",disable_buttons:"Disabilita pulsanti Più/Meno",disable_power_infos:"Disabilita Info Potenza",disable_auto_fan_infos:"Disabilita Info auto-fan",disable_name:"Disabilita nome",disable_target_icon:"Disabilita icona obbiettivo",allow_lock_toggle:"Consenti blocco/sblocco dalla card",disable_sleep:"Disabilita modo riposo",disable_timed_preset:"Disattiva immissione durata preimpostata",use_manual_duration_input:"Consenti l'inserimento manuale della durata invece della selezione",disable_presets:"Disabilita preimpostazioni",allow_preset_modification:"Consenti la modifica delle temperature dei preset",show_status_text:"Mostra lo stato attuale come testo",show_background_gradient_on_active:"Mostra il gradiente di sfondo del cursore quando l'entità è attiva",show_regulation_chart:"Show regulation chart"}}},li={window_open:"Finestra aperta",window_bypass:"Bypass finestra Attivo",eco:"Eco",overpowering:"Rilevata Sovrapotenza",none:"Manuale",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Sovrapotenza",activity:"Rilevata Attività",presence:"Rilevata Presenza",motion:"Rilevato movimento",auto_regulation_light:"Leggero",auto_regulation_medium:"Medio",auto_regulation_strong:"Forte",auto_regulation_slow:"Lento",auto_regulation_expert:"Esperto",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"Nulla",auto_fan_none:"Nulla",auto_fan_low:"Basso",auto_fan_medium:"Medio",auto_fan_high:"Alto",auto_fan_boost:"Boost",fan_low:"Basso",fan_low_mid:"Medio-basso",fan_mid:"Medio",fan_mid_high:"Medio-alto",fan_high:"Alto",fan_mute:"Silenzioso",fan_turbo:"Turbo",fan_none:"Nulla",fan_auto:"Auto",fan_1:"Velocità 1",fan_2:"Velocità 2",fan_3:"Velocità 3",fan_4:"Velocità 4",fan_5:"Velocità 5",change_message:"Click per cambio preimpostazione",toggle_message:"Click per commutare",auto_start_stop:"Fermato da auto-start/stop",auto_start_stop_enable:"Abilita/disabilita auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Riposo","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Temp. ambiente",outdoor_temp:"Temp. esterna",safety_warning:"Avviso",safety_warning_msg:"Guasto Temp.",hvac_off_manual:"Spento manualmente",hvac_off_auto_start_stop:"Spento da auto-start/stop",hvac_off_window_detection:"Spento da rilevamento finestra",hvac_off_sleep_mode:"Spento da modo notte",hvac_off_safety_detection:"Spento da modalità sicurezza",hvac_off_central_mode:"Spento da modalità centralizzato",safety_detected:"Modalità sicurezza rilavata",overpowering_detected:"Sovrapotenza rilevata",target_temp_window_eco:"Temp. impostata: window eco",target_temp_window_frost:"Temp. impostata: window freddo",target_temp_power:"Temp. impostata: power",target_temp_central_mode:"Temp. impostata: modalità centralizzata",target_temp_activity_detected:"Temp. impostata: rilevata atività",target_temp_activity_not_detected:"Temp. impostata: attività non rilevata",target_temp_absence_detected:"Temp. impostata: assenza rilevata",target_temp_timed_preset:"Preimpostazione a tempo attiva",lock_users_active:"Controlli utente bloccati",lock_automations_active:"Modifiche automazioni bloccate","messages-button":"Perchè questo stato?",recalculation_scheduled:"Aggiornamento sottostanti in corso","window-bypass-button":"Commuta bypass finestra",code_error:"Codice errato",lock:"Blocca",unlock:"Sblocca",timed_preset_title:"Durata in minuti (0 = permanente)",timed_preset_active:"Preimpostazione temporizzata attiva",cancel_timed_preset:"Disattiva Preimpostazione temporizzata",heating_failure:"Rilevato guasto al riscaldamento",cooling_failure:"Rilevato guasto al raffrescamento",increase_temp:"Aumenta la temperatura",decrease_temp:"Diminuisci la temperatura",night_mode:"Modalità notte",undefined:"Nulla",not_initialized:"Errore di inizializzazione",preset_mod_title:"Temperature dei preset",preset_mod_no_entities:"Nessuna entità di temperatura preset trovata per questo dispositivo.",preset_row_heat:"Riscaldamento",preset_row_heat_away:"Riscaldamento (assente)",preset_row_cool:"Raffreddamento",preset_row_cool_away:"Raffreddamento (assente)",regulation_chart_title:"Regulation chart"},ci={common:si,editor:ri,extra_states:li},di={version:"versão",current:"actual"},hi={card:{climate:{disable_window:"Desactivar Janela",disable_overpowering:"Desactivar Verão",disable_heat:"Desactivar Aquecimento",disable_cool:"Desactivar Arrefecimento",disable_heat_cool:"Desactivar Aquecimento/Arrefecimento",disable_auto:"Desactivar Auto",disable_fan_only:"Desactivar Ventilação",disable_dry:"Desactivar Secagem",disable_off:"Desactivar Off",eco_temperature:"Modo Eco",set_current_as_main:"Mudar para a temperatura local actual",theme:"Tema",theme_classic:"Clássico",theme_vtherm:"VTherm",theme_uncolored:"Sem cor",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",menu_system:"System menu",disable_autoStartStop:"Disable auto-startStop",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Permitir modificação das temperaturas de predefinição",show_status_text:"Mostrar o estado atual em texto",show_background_gradient_on_active:"Mostrar o gradiente de fundo do controle deslizante quando a entidade está ativa",show_regulation_chart:"Show regulation chart"}}},ui={window_open:"Janela Aberta",night_mode:"Modo Noturno",eco:"Eco",overpowering:"Verão",lock_users_active:"Controlos de utilizador bloqueados",lock_automations_active:"Alterações de automação bloqueadas",code_error:"Código incorreto",lock:"Bloquear",unlock:"Desbloquear",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Temperaturas das predefinições",preset_mod_no_entities:"Nenhuma entidade de temperatura de predefinição encontrada para este dispositivo.",preset_row_heat:"Aquecimento",preset_row_heat_away:"Aquecimento (ausente)",preset_row_cool:"Arrefecimento",preset_row_cool_away:"Arrefecimento (ausente)",regulation_chart_title:"Regulation chart"},mi={common:di,editor:hi,extra_states:ui},pi={version:"版本",current:"当前"},_i={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"允许修改预设温度",show_status_text:"以文本形式显示当前状态",show_background_gradient_on_active:"当实体处于活动状态时显示滑块背景渐变",show_regulation_chart:"Show regulation chart"}}},gi={window_open:"窗户打开",night_mode:"夜间模式",eco:"节能",overpowering:"夏季",lock_users_active:"用户控制已锁定",lock_automations_active:"自动化更改已锁定",code_error:"代码错误",lock:"锁定",unlock:"解锁",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"预设温度",preset_mod_no_entities:"未找到该设备的预设温度实体。",preset_row_heat:"制热",preset_row_heat_away:"制热(离开)",preset_row_cool:"制冷",preset_row_cool_away:"制冷(离开)",regulation_chart_title:"Regulation chart"},fi="VTherm",bi="Gunmalmg",vi={common:pi,editor:_i,extra_states:gi,theme:"主题",theme_classic:"经典",theme_vtherm:fi,theme_uncolored:"无颜色",theme_gunmalmg:bi},yi={version:"версія",current:"поточний"},wi={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Дозволити зміну температур попередніх налаштувань",show_status_text:"Показувати поточний статус у вигляді тексту",show_background_gradient_on_active:"Показувати фоновий градієнт повзунка, коли сутність активна",show_regulation_chart:"Show regulation chart"}}},xi={window_open:"Вікно відчинено",night_mode:"Нічний режим",eco:"Економія",overpowering:"Літо",lock_users_active:"Керування користувача заблоковано",lock_automations_active:"Зміни автоматизації заблоковані",code_error:"Невірний код",lock:"Блокувати",unlock:"Розблокувати",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Температури попередніх налаштувань",preset_mod_no_entities:"Не знайдено об'єктів температури попередніх налаштувань для цього пристрою.",preset_row_heat:"Опалення",preset_row_heat_away:"Опалення (відсутність)",preset_row_cool:"Охолодження",preset_row_cool_away:"Охолодження (відсутність)",regulation_chart_title:"Regulation chart"},ki="Тема",Ti="Класичний",Si="VTherm",Mi="Без кольору",Di="Gunmalmg",Ci={common:yi,editor:wi,extra_states:xi,theme:ki,theme_classic:Ti,theme_vtherm:Si,theme_uncolored:Mi,theme_gunmalmg:Di},Ai={version:"έκδοση",current:"τρέχουσα"},Pi={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Να επιτρέπεται η τροποποίηση θερμοκρασιών προεπιλογής",show_status_text:"Εμφάνιση τρέχουσας κατάστασης σε κείμενο",show_background_gradient_on_active:"Εμφάνιση της διαβάθμισης φόντου του ρυθμιστικού όταν η οντότητα είναι ενεργή",show_regulation_chart:"Show regulation chart"}}},Ei={window_open:"Παράθυρο ανοικτό",night_mode:"Λειτουργία νυκτός",eco:"Εξοικονόμηση",overpowering:"Καλοκαίρι",lock_users_active:"Έλεγχοι χρήστη κλειδωμένοι",lock_automations_active:"Αλλαγές αυτοματισμών κλειδωμένες",code_error:"Λάθος κωδικός",lock:"Κλείδωμα",unlock:"Ξεκλείδωμα",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Θερμοκρασίες προεπιλογής",preset_mod_no_entities:"Δεν βρέθηκαν οντότητες θερμοκρασίας προεπιλογής για αυτή τη συσκευή.",preset_row_heat:"Θέρμανση",preset_row_heat_away:"Θέρμανση (απουσία)",preset_row_cool:"Ψύξη",preset_row_cool_away:"Ψύξη (απουσία)",regulation_chart_title:"Regulation chart"},Li="Θέμα",$i="Κλασικό",zi="VTherm",Oi="Χωρίς χρώμα",Vi="Gunmalmg",Hi={common:Ai,editor:Pi,extra_states:Ei,theme:Li,theme_classic:$i,theme_vtherm:zi,theme_uncolored:Oi,theme_gunmalmg:Vi},Ri={version:"versie",current:"huidig"},Ii={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Voorkeursinstellingstemperaturen aanpassen toestaan",show_status_text:"Toon huidige status als tekst",show_background_gradient_on_active:"Toon achtergrondgradiënt van de schuifregelaar wanneer de entiteit actief is",show_regulation_chart:"Show regulation chart"}}},Ni={window_open:"Raam open",night_mode:"Nacht modus",eco:"Eco",overpowering:"Zomer",lock_users_active:"Gebruikersbediening vergrendeld",lock_automations_active:"Automatisatie wijzigingen vergrendeld",code_error:"Foute code",lock:"Vergrendelen",unlock:"Ontgrendelen",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Voorkeursinstellingstemperaturen",preset_mod_no_entities:"Geen entiteiten voor voorkeursinstellingstemperaturen gevonden voor dit apparaat.",preset_row_heat:"Verwarming",preset_row_heat_away:"Verwarming (afwezig)",preset_row_cool:"Koeling",preset_row_cool_away:"Koeling (afwezig)",regulation_chart_title:"Regulation chart"},Fi="Thema",Wi="Classic",Bi="VTherm",ji="Ongekleurd",Ui="Gunmalmg",Yi={common:Ri,editor:Ii,extra_states:Ni,theme:Fi,theme_classic:Wi,theme_vtherm:Bi,theme_uncolored:ji,theme_gunmalmg:Ui},qi={version:"versjon",current:"nåværende"},Zi={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Tillat endring av forhåndsinnstillingstemperaturer",show_status_text:"Vis gjeldende status som tekst",show_background_gradient_on_active:"Vis glidebryterens bakgrunnsgradient når enheten er aktiv",show_regulation_chart:"Show regulation chart"}}},Xi={window_open:"Vindu åpent",night_mode:"Nattmodus",eco:"Eco",overpowering:"Sommer",lock_users_active:"Brukerkontroller låst",lock_automations_active:"Automatiseringsendringer låst",code_error:"Feil kode",lock:"Lås",unlock:"Lås opp",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Forhåndsinnstillingstemperaturer",preset_mod_no_entities:"Ingen forhåndsinnstillingstemperaturenheter funnet for denne enheten.",preset_row_heat:"Varme",preset_row_heat_away:"Varme (fraværende)",preset_row_cool:"Kjøling",preset_row_cool_away:"Kjøling (fraværende)",regulation_chart_title:"Regulation chart"},Ki="Tema",Gi="Klassisk",Qi="VTherm",Ji="Uten farge",to="Gunmalmg",eo={common:qi,editor:Zi,extra_states:Xi,theme:Ki,theme_classic:Gi,theme_vtherm:Qi,theme_uncolored:Ji,theme_gunmalmg:to},io={version:"verze",current:"aktuální"},oo={card:{climate:{disable_window:"Zakázat okno",disable_overpowering:"Zakázat léto",disable_heat:"Zakázat topení",disable_cool:"Zakázat chlazení",disable_heat_cool:"Zakázat topení/chlazení",disable_auto:"Zakázať automatic",disable_fan_only:"Zakázat pouze ventilátor",disable_dry:"Zakázat sušení",disable_off:"Zakázat vypnuto",disable_menu:"Zakázat menu",disable_safety_warning:"Zakázat bezpečnostní oznámení",disable_buttons:"Zakázat tlačítka plus/minus",eco_temperature:"Eco teplota",set_current_as_main:"Prohodit místa cílovoé a aktáalní teploty",allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_autoStartStop:"Disable auto-startStop",disable_sleep:"Disable sleep mode",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Povolit úpravu teplot předvoleb",show_status_text:"Zobrazit aktuální stav textem",show_background_gradient_on_active:"Zobrazit přechod pozadí posuvníku, když je entita aktivní",show_regulation_chart:"Show regulation chart"}}},no={window_open:"okno otevřeno",night_mode:"Noční režim",eco:"Eco",overpowering:"Léto",lock_users_active:"Uživatelské ovládání zamčeno",lock_automations_active:"Změny automatizace zamčeny",code_error:"Chybný kód",lock:"Zamknout",unlock:"Odemknout",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Teploty předvoleb",preset_mod_no_entities:"Pro toto zařízení nebyly nalezeny žádné entity teplot předvoleb.",preset_row_heat:"Topení",preset_row_heat_away:"Topení nepřítomnost",preset_row_cool:"Chlazení",preset_row_cool_away:"Chlazení nepřítomnost",regulation_chart_title:"Regulation chart"},ao="Téma",so="Klasické",ro="VTherm",lo="Bez barvy",co="Gunmalmg",ho={common:io,editor:oo,extra_states:no,theme:ao,theme_classic:so,theme_vtherm:ro,theme_uncolored:lo,theme_gunmalmg:co},uo={version:"različica",current:"trenutno"},mo={card:{climate:{allow_lock_toggle:"Dovoli zaklepanje/odklepanje iz kartice",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Dovoli spremembo temperatur prednastavitev",show_status_text:"Prikaži trenutno stanje kot besedilo",show_background_gradient_on_active:"Prikaži preliv ozadja drsnika, ko je entiteta aktivna",show_regulation_chart:"Show regulation chart"}}},po={window_open:"Okno odprto",night_mode:"Nočni način",eco:"Eko",overpowering:"Poletje",lock_users_active:"Uporabniške kontrole zaklenjene",lock_automations_active:"Spremembe avtomatizacije zaklenjene",code_error:"Napačna koda",lock:"Zakleni",unlock:"Odkleni",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Temperature prednastavitev",preset_mod_no_entities:"Za to napravo ni bila najdena nobena entiteta temperature prednastavitve.",preset_row_heat:"Ogrevanje",preset_row_heat_away:"Ogrevanje (odsotnost)",preset_row_cool:"Hlajenje",preset_row_cool_away:"Hlajenje (odsotnost)",regulation_chart_title:"Regulation chart"},_o="Tema",go="Klasična",fo="VTherm",bo="Brez barve",vo="Gunmalmg",yo={common:uo,editor:mo,extra_states:po,theme:_o,theme_classic:go,theme_vtherm:fo,theme_uncolored:bo,theme_gunmalmg:vo},wo={version:"version",current:"Nuvarande"},xo={window_open:"Fönster öppet",night_mode:"Nattläge",eco:"Eco",overpowering:"Sommar",lock_users_active:"Användarkontroller låsta",lock_automations_active:"Automationsändringar låsta",code_error:"Fel kod",lock:"Lås",unlock:"Lås upp",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Förinställningstemperaturer",preset_mod_no_entities:"Inga förinställningstemperaturenheter hittades för den här enheten.",preset_row_heat:"Värme",preset_row_heat_away:"Värme (frånvaro)",preset_row_cool:"Kyla",preset_row_cool_away:"Kyla (frånvaro)",regulation_chart_title:"Regulation chart"},ko="Tema",To="Klassisk",So="VTherm",Mo="Omdfärgad",Do="Gunmalmg",Co={card:{climate:{autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",allow_lock_toggle:"Allow lock/unlock from card",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Tillåt ändring av förinställningstemperaturer",show_status_text:"Visa aktuell status som text",show_background_gradient_on_active:"Visa reglagets bakgrundsgradient när entiteten är aktiv",show_regulation_chart:"Show regulation chart"}}},Ao={common:wo,extra_states:xo,theme:ko,theme_classic:To,theme_vtherm:So,theme_uncolored:Mo,theme_gunmalmg:Do,editor:Co},Po={version:"версия",currrent:"текущий",current:"current"},Eo={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Позволи промяна на температурите на предварителни настройки",show_status_text:"Показване на статуса като текст",show_background_gradient_on_active:"Показване на фоновия градиент на плъзгача, когато обектът е активен",show_regulation_chart:"Show regulation chart"}}},Lo={window_open:"Отворен прозорец",night_mode:"Нощен режим",eco:"Екологичен режим",overpowering:"Лято",lock_users_active:"Потребителските контроли са заключени",lock_automations_active:"Промените от автоматизации са заключени",code_error:"Грешен код",lock:"Заключване",unlock:"Отключване",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Температури на предварителни настройки",preset_mod_no_entities:"Не са намерени обекти за температура на предварителни настройки за това устройство.",preset_row_heat:"Отопление",preset_row_heat_away:"Отопление (отсъствие)",preset_row_cool:"Охлаждане",preset_row_cool_away:"Охлаждане (отсъствие)",regulation_chart_title:"Regulation chart"},$o="Тема",zo="Класически",Oo="VTherm",Vo="Без цвят",Ho="Gunmalmg",Ro={common:Po,editor:Eo,extra_states:Lo,theme:$o,theme_classic:zo,theme_vtherm:Oo,theme_uncolored:Vo,theme_gunmalmg:Ho},Io={version:"version",current:"Nykyinen"},No={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Salli esiasetuslämpötilojen muokkaus",show_status_text:"Näytä nykyinen tila tekstinä",show_background_gradient_on_active:"Näytä liukusäätimen taustaliukuväri, kun entiteetti on aktiivinen",show_regulation_chart:"Show regulation chart"}}},Fo={window_open:"Ikkuna auki",night_mode:"Yötila",eco:"Eco",overpowering:"Kesä",lock_users_active:"Käyttäjän säädöt lukittu",lock_automations_active:"Automaation muutokset lukittu",code_error:"Virheellinen koodi",lock:"Lukitse",unlock:"Avaa lukitus",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Esiasetuslämpötilat",preset_mod_no_entities:"Tälle laitteelle ei löydetty esiasetuslämpötilaobjekteja.",preset_row_heat:"Lämmitys",preset_row_heat_away:"Lämmitys (poissa)",preset_row_cool:"Jäähdytys",preset_row_cool_away:"Jäähdytys (poissa)",regulation_chart_title:"Regulation chart"},Wo="Teema",Bo="Klassinen",jo="VTherm",Uo="Väritön",Yo="Gunmalmg",qo={common:Io,editor:No,extra_states:Fo,theme:Wo,theme_classic:Bo,theme_vtherm:jo,theme_uncolored:Uo,theme_gunmalmg:Yo},Zo={version:"versiune",current:"curent"},Xo={card:{climate:{allow_lock_toggle:"Permite blocarea/deblocarea din card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Permite modificarea temperaturilor presetate",show_status_text:"Afișează starea curentă ca text",show_background_gradient_on_active:"Afișează gradientul de fundal al glisorului când entitatea este activă",show_regulation_chart:"Show regulation chart"}}},Ko={window_open:"Fereastră deschisă",night_mode:"Mod noapte",eco:"Eco",overpowering:"Vară",lock_users_active:"Comenzi utilizator blocate",lock_automations_active:"Modificări automatizări blocate",code_error:"Cod incorect",lock:"Blocare",unlock:"Deblocare",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Temperaturi presetate",preset_mod_no_entities:"Nu s-au găsit entități de temperatură presetată pentru acest dispozitiv.",preset_row_heat:"Încălzire",preset_row_heat_away:"Încălzire (absent)",preset_row_cool:"Răcire",preset_row_cool_away:"Răcire (absent)",regulation_chart_title:"Regulation chart"},Go="Temă",Qo="Clasic",Jo="VTherm",tn="Fără culoare",en="Gunmalmg",on={common:Zo,editor:Xo,extra_states:Ko,theme:Go,theme_classic:Qo,theme_vtherm:Jo,theme_uncolored:tn,theme_gunmalmg:en},nn={version:"versió",current:"Actual"},an={card:{climate:{allow_lock_toggle:"Allow lock/unlock from card",autoStartStopEnableEntity:"Auto-start/stop entity",powerEntity:"Power consumption entity",theme:"Theme",theme_classic:"Classic",theme_vtherm:"VTherm",theme_uncolored:"Uncolored",theme_gunmalmg:"Gunmalmg",section_all_themes:"For all themes",section_classic_only:"For Classic, VTherm and Uncolored themes",menu_system:"System menu",disable_window:"Disable window",disable_autoStartStop:"Disable auto-startStop",disable_overpowering:"Disable overpowering",disable_heat:"Disable heat mode",disable_cool:"Disable cool mode",disable_heat_cool:"Disable heat/cool mode",disable_auto:"Disable auto mode",disable_fan_only:"Disable fan only mode",disable_dry:"Disable dry mode",disable_off:"Disable off mode",disable_sleep:"Disable sleep mode",disable_menu:"Disable menu",set_current_as_main:"Exchange target temperature and room temperature",disable_safety_warning:"Disable safety warning",disable_buttons:"Disable plus/minus buttons",disable_power_infos:"Disable power infos",disable_auto_fan_infos:"Disable auto-fan infos",disable_name:"Disable name",disable_target_icon:"Disable the target icon",disable_presets:"Disable presets",disable_timed_preset:"Disable timed preset duration input",use_manual_duration_input:"Allow manual duration input instead of selector",allow_preset_modification:"Permet la modificació de les temperatures de preset",show_status_text:"Mostra l'estat actual en text",show_background_gradient_on_active:"Mostra el degradat de fons del control lliscant quan l'entitat està activa",show_regulation_chart:"Show regulation chart"}}},sn={window_open:"Finestra oberta",night_mode:"Mode nocturn",eco:"Eco",overpowering:"Estiu",lock_users_active:"Controls d'usuari bloquejats",lock_automations_active:"Canvis d'automatització bloquejats",code_error:"Codi incorrecte",lock:"Bloquejar",unlock:"Desbloquejar",heating_failure:"Heating failure detected",cooling_failure:"Cooling failure detected",window_bypass:"Bypass window activated",none:"Manual",comfort:"Comfort",boost:"Boost",frost:"Frost",power:"Overpowering",activity:"Activity detected",presence:"Presence detected",motion:"Motion detected",undefined:"None",auto_regulation_light:"Light",auto_regulation_medium:"Medium",auto_regulation_strong:"Strong",auto_regulation_slow:"Slow",auto_regulation_expert:"Expert",auto_fan_mode:"Auto-fan",auto_fan_mode_off:"None",auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_boost:"Boost",fan_low:"Low",fan_low_mid:"Low-medium",fan_mid:"Medium",fan_mid_high:"Medium-high",fan_high:"High",fan_mute:"Mute",fan_turbo:"Turbo",fan_none:"None",fan_auto:"Auto",fan_1:"Speed 1",fan_2:"Speed 2",fan_3:"Speed 3",fan_4:"Speed 4",fan_5:"Speed 5",change_message:"Click to change preset",toggle_message:"Click to toggle",auto_start_stop:"Stopped by auto-start/stop",auto_start_stop_enable:"Enable/disable auto-start/stop",auto_start_stop_label:"Auto-start/stop",temp_unavailable:"-",sleep:"Sleeping","New strings for recent edits. Please translate":"-------------------------------------",minutes:"min",room_temp:"Room temp.",outdoor_temp:"Outdoor temp.",safety_warning:"Warning",safety_warning_msg:"Temp. fault",hvac_off_manual:"Turned off manually",hvac_off_auto_start_stop:"Turned off by auto-start/stop",hvac_off_window_detection:"Turned off by window detection",hvac_off_sleep_mode:"Turned off by sleep mode",hvac_off_safety_detection:"Turned off by safety mode",hvac_off_central_mode:"Turned off by central mode",safety_detected:"Safety mode detected",overpowering_detected:"Overpowering detected",target_temp_window_eco:"Target temp.: window eco",target_temp_window_frost:"Target temp.: window frost",target_temp_power:"Target temp.: power",target_temp_central_mode:"Target temp.: central mode",target_temp_activity_detected:"Target temp.: activity detected",target_temp_activity_not_detected:"Target temp.: activity not detected",target_temp_absence_detected:"Target temp.: absence detected",target_temp_timed_preset:"Timed preset active","messages-button":"Why this state?",recalculation_scheduled:"Underlying update in progress","window-bypass-button":"Toggle window bypass",timed_preset_title:"Duration in minutes (0 = permanent)",timed_preset_active:"Timed preset active",cancel_timed_preset:"Cancel timed preset",increase_temp:"Increase temperature",decrease_temp:"Decrease temperature",not_initialized:"Initialisation error",preset_mod_title:"Temperatures dels presets",preset_mod_no_entities:"No s'han trobat entitats de temperatura de preset per a aquest dispositiu.",preset_row_heat:"Calefacció",preset_row_heat_away:"Calefacció absent",preset_row_cool:"Refrigeració",preset_row_cool_away:"Refrigeració absent",regulation_chart_title:"Regulation chart"},rn="Tema",ln="Clàssic",cn="VTherm",dn="Sense color",hn="Gunmalmg",un={common:nn,editor:an,extra_states:sn,theme:rn,theme_classic:ln,theme_vtherm:cn,theme_uncolored:dn,theme_gunmalmg:hn};const mn={en:Bt,de:Zt,fr:Jt,ru:ce,sk:Object.freeze({__proto__:null,common:_e,default:ke,editor:ge,extra_states:fe,theme:be,theme_classic:ve,theme_gunmalmg:xe,theme_uncolored:we,theme_vtherm:ye}),hu:Object.freeze({__proto__:null,common:Te,default:Le,editor:Se,extra_states:Me,theme:De,theme_classic:Ce,theme_gunmalmg:Ee,theme_uncolored:Pe,theme_vtherm:Ae}),pl:pe,da:Object.freeze({__proto__:null,common:$e,default:Fe,editor:ze,extra_states:Oe,theme:Ve,theme_classic:He,theme_gunmalmg:Ne,theme_uncolored:Ie,theme_vtherm:Re}),es:Object.freeze({__proto__:null,common:We,default:Ke,editor:Be,extra_states:je,theme:Ue,theme_classic:Ye,theme_gunmalmg:Xe,theme_uncolored:Ze,theme_vtherm:qe}),tr:Object.freeze({__proto__:null,common:Ge,default:ai,editor:Qe,extra_states:Je,theme:ti,theme_classic:ei,theme_gunmalmg:ni,theme_uncolored:oi,theme_vtherm:ii}),it:Object.freeze({__proto__:null,common:si,default:ci,editor:ri,extra_states:li}),pt:Object.freeze({__proto__:null,common:di,default:mi,editor:hi,extra_states:ui}),cn:Object.freeze({__proto__:null,common:pi,default:vi,editor:_i,extra_states:gi,theme:"主题",theme_classic:"经典",theme_gunmalmg:bi,theme_uncolored:"无颜色",theme_vtherm:fi}),uk:Object.freeze({__proto__:null,common:yi,default:Ci,editor:wi,extra_states:xi,theme:ki,theme_classic:Ti,theme_gunmalmg:Di,theme_uncolored:Mi,theme_vtherm:Si}),el:Object.freeze({__proto__:null,common:Ai,default:Hi,editor:Pi,extra_states:Ei,theme:Li,theme_classic:$i,theme_gunmalmg:Vi,theme_uncolored:Oi,theme_vtherm:zi}),nl:Object.freeze({__proto__:null,common:Ri,default:Yi,editor:Ii,extra_states:Ni,theme:Fi,theme_classic:Wi,theme_gunmalmg:Ui,theme_uncolored:ji,theme_vtherm:Bi}),no:Object.freeze({__proto__:null,common:qi,default:eo,editor:Zi,extra_states:Xi,theme:Ki,theme_classic:Gi,theme_gunmalmg:to,theme_uncolored:Ji,theme_vtherm:Qi}),cs:Object.freeze({__proto__:null,common:io,default:ho,editor:oo,extra_states:no,theme:ao,theme_classic:so,theme_gunmalmg:co,theme_uncolored:lo,theme_vtherm:ro}),sl:Object.freeze({__proto__:null,common:uo,default:yo,editor:mo,extra_states:po,theme:_o,theme_classic:go,theme_gunmalmg:vo,theme_uncolored:bo,theme_vtherm:fo}),sv:Object.freeze({__proto__:null,common:wo,default:Ao,editor:Co,extra_states:xo,theme:ko,theme_classic:To,theme_gunmalmg:Do,theme_uncolored:Mo,theme_vtherm:So}),bg:Object.freeze({__proto__:null,common:Po,default:Ro,editor:Eo,extra_states:Lo,theme:$o,theme_classic:zo,theme_gunmalmg:Ho,theme_uncolored:Vo,theme_vtherm:Oo}),fi:Object.freeze({__proto__:null,common:Io,default:qo,editor:No,extra_states:Fo,theme:Wo,theme_classic:Bo,theme_gunmalmg:Yo,theme_uncolored:Uo,theme_vtherm:jo}),ro:Object.freeze({__proto__:null,common:Zo,default:on,editor:Xo,extra_states:Ko,theme:Go,theme_classic:Qo,theme_gunmalmg:en,theme_uncolored:tn,theme_vtherm:Jo}),ca:Object.freeze({__proto__:null,common:nn,default:un,editor:an,extra_states:sn,theme:rn,theme_classic:ln,theme_gunmalmg:hn,theme_uncolored:dn,theme_vtherm:cn})},pn="en";function _n({hass:t,string:e,search:i="",replace:o=""}){var n;const a=null!==(n=null==t?void 0:t.locale.language)&&void 0!==n?n:pn;let s;try{s=e.split(".").reduce(((t,e)=>t[e]),mn[a])}catch(t){s=e.split(".").reduce(((t,e)=>t[e]),mn.en)}return void 0===s&&(s=e.split(".").reduce(((t,e)=>t[e]),mn.en)),""!==i&&""!==o&&(s=s.replace(i,o)),s}function gn(t,e){try{return t.split(".").reduce(((t,e)=>t[e]),mn[e])}catch(t){return}}function fn(t){return function(e){var i;let o=gn(e,null!==(i=null==t?void 0:t.locale.language)&&void 0!==i?i:pn);return o||(o=gn(e,pn)),null!=o?o:e}}var bn,vn,yn=Number.isNaN||function(t){return"number"==typeof t&&t!=t};function wn(t,e){if(t.length!==e.length)return!1;for(var i=0;i<t.length;i++)if(o=t[i],n=e[i],!(o===n||yn(o)&&yn(n)))return!1;var o,n;return!0}function xn(t,e){void 0===e&&(e=wn);var i=null;function o(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];if(i&&i.lastThis===this&&e(o,i.lastArgs))return i.lastResult;var a=t.apply(this,o);return i={lastResult:a,lastArgs:o,lastThis:this},a}return o.clear=function(){i=null},o}xn((t=>new Intl.DateTimeFormat(t.language,{weekday:"long",month:"long",day:"numeric"}))),xn((t=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"long",day:"numeric"}))),xn((t=>new Intl.DateTimeFormat(t.language,{year:"numeric",month:"numeric",day:"numeric"}))),xn((t=>new Intl.DateTimeFormat(t.language,{day:"numeric",month:"short"}))),xn((t=>new Intl.DateTimeFormat(t.language,{month:"long",year:"numeric"}))),xn((t=>new Intl.DateTimeFormat(t.language,{month:"long"}))),xn((t=>new Intl.DateTimeFormat(t.language,{year:"numeric"}))),function(t){t.language="language",t.system="system",t.comma_decimal="comma_decimal",t.decimal_comma="decimal_comma",t.space_comma="space_comma",t.none="none"}(bn||(bn={})),function(t){t.language="language",t.system="system",t.am_pm="12",t.twenty_four="24"}(vn||(vn={}));const kn=xn((t=>{if(t.time_format===vn.language||t.time_format===vn.system){const e=t.time_format===vn.language?t.language:void 0,i=(new Date).toLocaleString(e);return i.includes("AM")||i.includes("PM")}return t.time_format===vn.am_pm}));xn((t=>new Intl.DateTimeFormat("en"!==t.language||kn(t)?t.language:"en-u-hc-h23",{year:"numeric",month:"long",day:"numeric",hour:kn(t)?"numeric":"2-digit",minute:"2-digit",hour12:kn(t)}))),xn((t=>new Intl.DateTimeFormat("en"!==t.language||kn(t)?t.language:"en-u-hc-h23",{year:"numeric",month:"long",day:"numeric",hour:kn(t)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hour12:kn(t)}))),xn((t=>new Intl.DateTimeFormat("en"!==t.language||kn(t)?t.language:"en-u-hc-h23",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",hour12:kn(t)}))),xn((t=>new Intl.DateTimeFormat("en"!==t.language||kn(t)?t.language:"en-u-hc-h23",{hour:"numeric",minute:"2-digit",hour12:kn(t)}))),xn((t=>new Intl.DateTimeFormat("en"!==t.language||kn(t)?t.language:"en-u-hc-h23",{hour:kn(t)?"numeric":"2-digit",minute:"2-digit",second:"2-digit",hour12:kn(t)}))),xn((t=>new Intl.DateTimeFormat("en"!==t.language||kn(t)?t.language:"en-u-hc-h23",{weekday:"long",hour:kn(t)?"numeric":"2-digit",minute:"2-digit",hour12:kn(t)})));const Tn=(t,e,i,o)=>{o=o||{},i=null==i?{}:i;const n=new Event(e,{bubbles:void 0===o.bubbles||o.bubbles,cancelable:Boolean(o.cancelable),composed:void 0===o.composed||o.composed});return n.detail=i,t.dispatchEvent(n),n},Sn=(t,e,i)=>Math.min(Math.max(t,e),i),Mn=(t,e,i)=>{const o=e?(t=>{switch(t.number_format){case bn.comma_decimal:return["en-US","en"];case bn.decimal_comma:return["de","es","it"];case bn.space_comma:return["fr","sv","cs"];case bn.system:return;default:return t.language}})(e):void 0;if(Number.isNaN=Number.isNaN||function t(e){return"number"==typeof e&&t(e)},(null==e?void 0:e.number_format)!==bn.none&&!Number.isNaN(Number(t))&&Intl)try{return new Intl.NumberFormat(o,Dn(t,i)).format(Number(t))}catch(e){return console.error(e),new Intl.NumberFormat(void 0,Dn(t,i)).format(Number(t))}return"string"==typeof t?t:`${((t,e=2)=>Math.round(t*10**e)/10**e)(t,null==i?void 0:i.maximumFractionDigits).toString()}${"currency"===(null==i?void 0:i.style)?` ${i.currency}`:""}`},Dn=(t,e)=>{const i=Object.assign({maximumFractionDigits:2},e);if("string"!=typeof t)return i;if(!e||!e.minimumFractionDigits&&!e.maximumFractionDigits){const e=t.indexOf(".")>-1?t.split(".")[1].length:0;i.minimumFractionDigits=e,i.maximumFractionDigits=e}return i};class Cn extends TypeError{constructor(t,e){let i;const{message:o,explanation:n,...a}=t,{path:s}=t,r=0===s.length?o:`At path: ${s.join(".")} -- ${o}`;super(n??r),null!=n&&(this.cause=r),Object.assign(this,a),this.name=this.constructor.name,this.failures=()=>i??(i=[t,...e()])}}function An(t){return"object"==typeof t&&null!=t}function Pn(t){return"symbol"==typeof t?t.toString():"string"==typeof t?JSON.stringify(t):`${t}`}function En(t,e,i,o){if(!0===t)return;!1===t?t={}:"string"==typeof t&&(t={message:t});const{path:n,branch:a}=e,{type:s}=i,{refinement:r,message:l=`Expected a value of type \`${s}\`${r?` with refinement \`${r}\``:""}, but received: \`${Pn(o)}\``}=t;return{value:o,type:s,refinement:r,key:n[n.length-1],path:n,branch:a,...t,message:l}}function*Ln(t,e,i,o){(function(t){return An(t)&&"function"==typeof t[Symbol.iterator]})(t)||(t=[t]);for(const n of t){const t=En(n,e,i,o);t&&(yield t)}}function*$n(t,e,i={}){const{path:o=[],branch:n=[t],coerce:a=!1,mask:s=!1}=i,r={path:o,branch:n};if(a&&(t=e.coercer(t,r),s&&"type"!==e.type&&An(e.schema)&&An(t)&&!Array.isArray(t)))for(const i in t)void 0===e.schema[i]&&delete t[i];let l="valid";for(const o of e.validator(t,r))o.explanation=i.message,l="not_valid",yield[o,void 0];for(let[c,d,h]of e.entries(t,r)){const e=$n(d,h,{path:void 0===c?o:[...o,c],branch:void 0===c?n:[...n,d],coerce:a,mask:s,message:i.message});for(const i of e)i[0]?(l=null!=i[0].refinement?"not_refined":"not_valid",yield[i[0],void 0]):a&&(d=i[1],void 0===c?t=d:t instanceof Map?t.set(c,d):t instanceof Set?t.add(d):An(t)&&(void 0!==d||c in t)&&(t[c]=d))}if("not_valid"!==l)for(const o of e.refiner(t,r))o.explanation=i.message,l="not_refined",yield[o,void 0];"valid"===l&&(yield[void 0,t])}class zn{constructor(t){const{type:e,schema:i,validator:o,refiner:n,coercer:a=(t=>t),entries:s=function*(){}}=t;this.type=e,this.schema=i,this.entries=s,this.coercer=a,this.validator=o?(t,e)=>Ln(o(t,e),e,this,t):()=>[],this.refiner=n?(t,e)=>Ln(n(t,e),e,this,t):()=>[]}assert(t,e){return On(t,this,e)}create(t,e){return function(t,e,i){const o=Vn(t,e,{coerce:!0,message:i});if(o[0])throw o[0];return o[1]}(t,this,e)}is(t){return function(t,e){const i=Vn(t,e);return!i[0]}(t,this)}mask(t,e){return function(t,e,i){const o=Vn(t,e,{coerce:!0,mask:!0,message:i});if(o[0])throw o[0];return o[1]}(t,this,e)}validate(t,e={}){return Vn(t,this,e)}}function On(t,e,i){const o=Vn(t,e,{message:i});if(o[0])throw o[0]}function Vn(t,e,i={}){const o=$n(t,e,i),n=function(t){const{done:e,value:i}=t.next();return e?void 0:i}(o);if(n[0]){const t=new Cn(n[0],(function*(){for(const t of o)t[0]&&(yield t[0])}));return[t,void 0]}return[void 0,n[1]]}function Hn(t,e){return new zn({type:t,schema:null,validator:e})}function Rn(){return Hn("any",(()=>!0))}function In(t){return new zn({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[i,o]of e.entries())yield[i,o,t]},coercer:t=>Array.isArray(t)?t.slice():t,validator:t=>Array.isArray(t)||`Expected an array value, but received: ${Pn(t)}`})}function Nn(){return Hn("boolean",(t=>"boolean"==typeof t))}function Fn(t){const e=Pn(t),i=typeof t;return new zn({type:"literal",schema:"string"===i||"number"===i||"boolean"===i?t:null,validator:i=>i===t||`Expected the literal \`${e}\`, but received: ${Pn(i)}`})}function Wn(){return Hn("number",(t=>"number"==typeof t&&!isNaN(t)||`Expected a number, but received: ${Pn(t)}`))}function Bn(t){const e=t?Object.keys(t):[],i=Hn("never",(()=>!1));return new zn({type:"object",schema:t||null,*entries(o){if(t&&An(o)){const n=new Set(Object.keys(o));for(const i of e)n.delete(i),yield[i,o[i],t[i]];for(const t of n)yield[t,o[t],i]}},validator:t=>An(t)||`Expected an object, but received: ${Pn(t)}`,coercer:t=>An(t)?{...t}:t})}function jn(t){return new zn({...t,validator:(e,i)=>void 0===e||t.validator(e,i),refiner:(e,i)=>void 0===e||t.refiner(e,i)})}function Un(){return Hn("string",(t=>"string"==typeof t||`Expected a string, but received: ${Pn(t)}`))}function Yn(t){const e=Object.keys(t);return new zn({type:"type",schema:t,*entries(i){if(An(i))for(const o of e)yield[o,i[o],t[o]]},validator:t=>An(t)||`Expected an object, but received: ${Pn(t)}`,coercer:t=>An(t)?{...t}:t})}function qn(t){const e=t.map((t=>t.type)).join(" | ");return new zn({type:"union",schema:null,coercer(e){for(const i of t){const[t,o]=i.validate(e,{coerce:!0});if(!t)return o}return e},validator(i,o){const n=[];for(const e of t){const[...t]=$n(i,e,o),[a]=t;if(!a[0])return[];for(const[e]of t)e&&n.push(e)}return[`Expected the value to satisfy a union of \`${e}\`, but received: ${Pn(i)}`,...n]}})}const Zn=Bn({user:Un()}),Xn=qn([Nn(),Bn({text:jn(Un()),excemptions:jn(In(Zn))})]),Kn=Bn({action:Fn("url"),url_path:Un(),confirmation:jn(Xn)}),Gn=Bn({action:Fn("call-service"),service:Un(),service_data:jn(Bn()),data:jn(Bn()),target:jn(Bn({entity_id:jn(qn([Un(),In(Un())])),device_id:jn(qn([Un(),In(Un())])),area_id:jn(qn([Un(),In(Un())]))})),confirmation:jn(Xn)}),Qn=Bn({action:Fn("navigate"),navigation_path:Un(),confirmation:jn(Xn)}),Jn=Yn({action:Fn("fire-dom-event")}),ta=Bn({action:function(t){const e={},i=t.map((t=>Pn(t))).join();for(const i of t)e[i]=i;return new zn({type:"enums",schema:e,validator:e=>t.includes(e)||`Expected one of \`${i}\`, but received: ${Pn(e)}`})}(["none","toggle","more-info","call-service","url","navigate"]),confirmation:jn(Xn)});var ea;ea=t=>{if(t&&"object"==typeof t&&"action"in t)switch(t.action){case"call-service":return Gn;case"fire-dom-event":return Jn;case"navigate":return Qn;case"url":return Kn}return ta},new zn({type:"dynamic",schema:null,*entries(t,e){const i=ea(t,e);yield*i.entries(t,e)},validator:(t,e)=>ea(t,e).validator(t,e),coercer:(t,e)=>ea(t,e).coercer(t,e),refiner:(t,e)=>ea(t,e).refiner(t,e)}),s`
|
||
#sortable a:nth-of-type(2n) paper-icon-item {
|
||
animation-name: keyframes1;
|
||
animation-iteration-count: infinite;
|
||
transform-origin: 50% 10%;
|
||
animation-delay: -0.75s;
|
||
animation-duration: 0.25s;
|
||
}
|
||
|
||
#sortable a:nth-of-type(2n-1) paper-icon-item {
|
||
animation-name: keyframes2;
|
||
animation-iteration-count: infinite;
|
||
animation-direction: alternate;
|
||
transform-origin: 30% 5%;
|
||
animation-delay: -0.5s;
|
||
animation-duration: 0.33s;
|
||
}
|
||
|
||
#sortable a {
|
||
height: 48px;
|
||
display: flex;
|
||
}
|
||
|
||
#sortable {
|
||
outline: none;
|
||
display: block !important;
|
||
}
|
||
|
||
.hidden-panel {
|
||
display: flex !important;
|
||
}
|
||
|
||
.sortable-fallback {
|
||
display: none;
|
||
}
|
||
|
||
.sortable-ghost {
|
||
opacity: 0.4;
|
||
}
|
||
|
||
.sortable-fallback {
|
||
opacity: 0;
|
||
}
|
||
|
||
@keyframes keyframes1 {
|
||
0% {
|
||
transform: rotate(-1deg);
|
||
animation-timing-function: ease-in;
|
||
}
|
||
|
||
50% {
|
||
transform: rotate(1.5deg);
|
||
animation-timing-function: ease-out;
|
||
}
|
||
}
|
||
|
||
@keyframes keyframes2 {
|
||
0% {
|
||
transform: rotate(1deg);
|
||
animation-timing-function: ease-in;
|
||
}
|
||
|
||
50% {
|
||
transform: rotate(-1.5deg);
|
||
animation-timing-function: ease-out;
|
||
}
|
||
}
|
||
|
||
.show-panel,
|
||
.hide-panel {
|
||
display: none;
|
||
position: absolute;
|
||
top: 0;
|
||
right: 4px;
|
||
--mdc-icon-button-size: 40px;
|
||
}
|
||
|
||
:host([rtl]) .show-panel {
|
||
right: initial;
|
||
left: 4px;
|
||
}
|
||
|
||
.hide-panel {
|
||
top: 4px;
|
||
right: 8px;
|
||
}
|
||
|
||
:host([rtl]) .hide-panel {
|
||
right: initial;
|
||
left: 8px;
|
||
}
|
||
|
||
:host([expanded]) .hide-panel {
|
||
display: block;
|
||
}
|
||
|
||
:host([expanded]) .show-panel {
|
||
display: inline-flex;
|
||
}
|
||
|
||
paper-icon-item.hidden-panel,
|
||
paper-icon-item.hidden-panel span,
|
||
paper-icon-item.hidden-panel ha-icon[slot="item-icon"] {
|
||
color: var(--secondary-text-color);
|
||
cursor: pointer;
|
||
}
|
||
`;const ia=([[t,e],[i,o]],[n,a])=>[t*n+e*a,i*n+o*a],oa=([t,e],[i,o])=>[t+i,e+o],na=t=>t/180*Math.PI,aa=t=>{const{x:e,y:i,r:o,start:n,end:a,rotate:s=0}=t,r=e,l=i,c=o,d=o,h=na(n),u=(na(a)-h)%(2*Math.PI),m=na(s),p=(t=>[[Math.cos(t),-Math.sin(t)],[Math.sin(t),Math.cos(t)]])(m),[_,g]=oa(ia(p,[c*Math.cos(h),d*Math.sin(h)]),[r,l]),[f,b]=oa(ia(p,[c*Math.cos(h+u),d*Math.sin(h+u)]),[r,l]),v=u>Math.PI?1:0,y=u>0?1:0;return["M",_,g,"A",c,d,m/(2*Math.PI)*360,v,y,f,b].join(" ")};function sa(){return sa=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o])}return t},sa.apply(this,arguments)}function ra(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function la(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var ca;ca="function"!=typeof Object.assign?function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var o=arguments[i];if(null!=o)for(var n in o)o.hasOwnProperty(n)&&(e[n]=o[n])}return e}:Object.assign;var da,ha=ca,ua=["","webkit","Moz","MS","ms","o"],ma="undefined"==typeof document?{style:{}}:document.createElement("div"),pa=Math.round,_a=Math.abs,ga=Date.now;function fa(t,e){for(var i,o,n=e[0].toUpperCase()+e.slice(1),a=0;a<ua.length;){if((o=(i=ua[a])?i+n:e)in t)return o;a++}}da="undefined"==typeof window?{}:window;var ba=fa(ma.style,"touchAction"),va=void 0!==ba;var ya="compute",wa="auto",xa="manipulation",ka="none",Ta="pan-x",Sa="pan-y",Ma=function(){if(!va)return!1;var t={},e=da.CSS&&da.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(i){return t[i]=!e||da.CSS.supports("touch-action",i)})),t}(),Da="ontouchstart"in da,Ca=void 0!==fa(da,"PointerEvent"),Aa=Da&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),Pa="touch",Ea="mouse",La=25,$a=1,za=4,Oa=8,Va=1,Ha=2,Ra=4,Ia=8,Na=16,Fa=Ha|Ra,Wa=Ia|Na,Ba=Fa|Wa,ja=["x","y"],Ua=["clientX","clientY"];function Ya(t,e,i){var o;if(t)if(t.forEach)t.forEach(e,i);else if(void 0!==t.length)for(o=0;o<t.length;)e.call(i,t[o],o,t),o++;else for(o in t)t.hasOwnProperty(o)&&e.call(i,t[o],o,t)}function qa(t,e){return"function"==typeof t?t.apply(e&&e[0]||void 0,e):t}function Za(t,e){return t.indexOf(e)>-1}var Xa=function(){function t(t,e){this.manager=t,this.set(e)}var e=t.prototype;return e.set=function(t){t===ya&&(t=this.compute()),va&&this.manager.element.style&&Ma[t]&&(this.manager.element.style[ba]=t),this.actions=t.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var t=[];return Ya(this.manager.recognizers,(function(e){qa(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))})),function(t){if(Za(t,ka))return ka;var e=Za(t,Ta),i=Za(t,Sa);return e&&i?ka:e||i?e?Ta:Sa:Za(t,xa)?xa:wa}(t.join(" "))},e.preventDefaults=function(t){var e=t.srcEvent,i=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var o=this.actions,n=Za(o,ka)&&!Ma[ka],a=Za(o,Sa)&&!Ma[Sa],s=Za(o,Ta)&&!Ma[Ta];if(n){var r=1===t.pointers.length,l=t.distance<2,c=t.deltaTime<250;if(r&&l&&c)return}if(!s||!a)return n||a&&i&Fa||s&&i&Wa?this.preventSrc(e):void 0}},e.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},t}();function Ka(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function Ga(t){var e=t.length;if(1===e)return{x:pa(t[0].clientX),y:pa(t[0].clientY)};for(var i=0,o=0,n=0;n<e;)i+=t[n].clientX,o+=t[n].clientY,n++;return{x:pa(i/e),y:pa(o/e)}}function Qa(t){for(var e=[],i=0;i<t.pointers.length;)e[i]={clientX:pa(t.pointers[i].clientX),clientY:pa(t.pointers[i].clientY)},i++;return{timeStamp:ga(),pointers:e,center:Ga(e),deltaX:t.deltaX,deltaY:t.deltaY}}function Ja(t,e,i){i||(i=ja);var o=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return Math.sqrt(o*o+n*n)}function ts(t,e,i){i||(i=ja);var o=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return 180*Math.atan2(n,o)/Math.PI}function es(t,e){return t===e?Va:_a(t)>=_a(e)?t<0?Ha:Ra:e<0?Ia:Na}function is(t,e,i){return{x:e/t||0,y:i/t||0}}function os(t,e){var i=t.session,o=e.pointers,n=o.length;i.firstInput||(i.firstInput=Qa(e)),n>1&&!i.firstMultiple?i.firstMultiple=Qa(e):1===n&&(i.firstMultiple=!1);var a=i.firstInput,s=i.firstMultiple,r=s?s.center:a.center,l=e.center=Ga(o);e.timeStamp=ga(),e.deltaTime=e.timeStamp-a.timeStamp,e.angle=ts(r,l),e.distance=Ja(r,l),function(t,e){var i=e.center,o=t.offsetDelta||{},n=t.prevDelta||{},a=t.prevInput||{};e.eventType!==$a&&a.eventType!==za||(n=t.prevDelta={x:a.deltaX||0,y:a.deltaY||0},o=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=n.x+(i.x-o.x),e.deltaY=n.y+(i.y-o.y)}(i,e),e.offsetDirection=es(e.deltaX,e.deltaY);var c,d,h=is(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=h.x,e.overallVelocityY=h.y,e.overallVelocity=_a(h.x)>_a(h.y)?h.x:h.y,e.scale=s?(c=s.pointers,Ja((d=o)[0],d[1],Ua)/Ja(c[0],c[1],Ua)):1,e.rotation=s?function(t,e){return ts(e[1],e[0],Ua)+ts(t[1],t[0],Ua)}(s.pointers,o):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,function(t,e){var i,o,n,a,s=t.lastInterval||e,r=e.timeStamp-s.timeStamp;if(e.eventType!==Oa&&(r>La||void 0===s.velocity)){var l=e.deltaX-s.deltaX,c=e.deltaY-s.deltaY,d=is(r,l,c);o=d.x,n=d.y,i=_a(d.x)>_a(d.y)?d.x:d.y,a=es(l,c),t.lastInterval=e}else i=s.velocity,o=s.velocityX,n=s.velocityY,a=s.direction;e.velocity=i,e.velocityX=o,e.velocityY=n,e.direction=a}(i,e);var u,m=t.element,p=e.srcEvent;Ka(u=p.composedPath?p.composedPath()[0]:p.path?p.path[0]:p.target,m)&&(m=u),e.target=m}function ns(t,e,i){var o=i.pointers.length,n=i.changedPointers.length,a=e&$a&&o-n==0,s=e&(za|Oa)&&o-n==0;i.isFirst=!!a,i.isFinal=!!s,a&&(t.session={}),i.eventType=e,os(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function as(t){return t.trim().split(/\s+/g)}function ss(t,e,i){Ya(as(e),(function(e){t.addEventListener(e,i,!1)}))}function rs(t,e,i){Ya(as(e),(function(e){t.removeEventListener(e,i,!1)}))}function ls(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||window}var cs=function(){function t(t,e){var i=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){qa(t.options.enable,[t])&&i.handler(e)},this.init()}var e=t.prototype;return e.handler=function(){},e.init=function(){this.evEl&&ss(this.element,this.evEl,this.domHandler),this.evTarget&&ss(this.target,this.evTarget,this.domHandler),this.evWin&&ss(ls(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&rs(this.element,this.evEl,this.domHandler),this.evTarget&&rs(this.target,this.evTarget,this.domHandler),this.evWin&&rs(ls(this.element),this.evWin,this.domHandler)},t}();function ds(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var o=0;o<t.length;){if(i&&t[o][i]==e||!i&&t[o]===e)return o;o++}return-1}var hs={pointerdown:$a,pointermove:2,pointerup:za,pointercancel:Oa,pointerout:Oa},us={2:Pa,3:"pen",4:Ea,5:"kinect"},ms="pointerdown",ps="pointermove pointerup pointercancel";da.MSPointerEvent&&!da.PointerEvent&&(ms="MSPointerDown",ps="MSPointerMove MSPointerUp MSPointerCancel");var _s=function(t){function e(){var i,o=e.prototype;return o.evEl=ms,o.evWin=ps,(i=t.apply(this,arguments)||this).store=i.manager.session.pointerEvents=[],i}return ra(e,t),e.prototype.handler=function(t){var e=this.store,i=!1,o=t.type.toLowerCase().replace("ms",""),n=hs[o],a=us[t.pointerType]||t.pointerType,s=a===Pa,r=ds(e,t.pointerId,"pointerId");n&$a&&(0===t.button||s)?r<0&&(e.push(t),r=e.length-1):n&(za|Oa)&&(i=!0),r<0||(e[r]=t,this.callback(this.manager,n,{pointers:e,changedPointers:[t],pointerType:a,srcEvent:t}),i&&e.splice(r,1))},e}(cs);function gs(t){return Array.prototype.slice.call(t,0)}function fs(t,e,i){for(var o=[],n=[],a=0;a<t.length;){var s=e?t[a][e]:t[a];ds(n,s)<0&&o.push(t[a]),n[a]=s,a++}return i&&(o=e?o.sort((function(t,i){return t[e]>i[e]})):o.sort()),o}var bs={touchstart:$a,touchmove:2,touchend:za,touchcancel:Oa},vs=function(t){function e(){var i;return e.prototype.evTarget="touchstart touchmove touchend touchcancel",(i=t.apply(this,arguments)||this).targetIds={},i}return ra(e,t),e.prototype.handler=function(t){var e=bs[t.type],i=ys.call(this,t,e);i&&this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:Pa,srcEvent:t})},e}(cs);function ys(t,e){var i,o,n=gs(t.touches),a=this.targetIds;if(e&(2|$a)&&1===n.length)return a[n[0].identifier]=!0,[n,n];var s=gs(t.changedTouches),r=[],l=this.target;if(o=n.filter((function(t){return Ka(t.target,l)})),e===$a)for(i=0;i<o.length;)a[o[i].identifier]=!0,i++;for(i=0;i<s.length;)a[s[i].identifier]&&r.push(s[i]),e&(za|Oa)&&delete a[s[i].identifier],i++;return r.length?[fs(o.concat(r),"identifier",!0),r]:void 0}var ws={mousedown:$a,mousemove:2,mouseup:za},xs=function(t){function e(){var i,o=e.prototype;return o.evEl="mousedown",o.evWin="mousemove mouseup",(i=t.apply(this,arguments)||this).pressed=!1,i}return ra(e,t),e.prototype.handler=function(t){var e=ws[t.type];e&$a&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=za),this.pressed&&(e&za&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:Ea,srcEvent:t}))},e}(cs),ks=2500;function Ts(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var i={x:e.clientX,y:e.clientY},o=this.lastTouches;this.lastTouches.push(i);setTimeout((function(){var t=o.indexOf(i);t>-1&&o.splice(t,1)}),ks)}}function Ss(t,e){t&$a?(this.primaryTouch=e.changedPointers[0].identifier,Ts.call(this,e)):t&(za|Oa)&&Ts.call(this,e)}function Ms(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,o=0;o<this.lastTouches.length;o++){var n=this.lastTouches[o],a=Math.abs(e-n.x),s=Math.abs(i-n.y);if(a<=25&&s<=25)return!0}return!1}var Ds=function(){var t=function(t){function e(e,i){var o;return(o=t.call(this,e,i)||this).handler=function(t,e,i){var n=i.pointerType===Pa,a=i.pointerType===Ea;if(!(a&&i.sourceCapabilities&&i.sourceCapabilities.firesTouchEvents)){if(n)Ss.call(la(la(o)),e,i);else if(a&&Ms.call(la(la(o)),i))return;o.callback(t,e,i)}},o.touch=new vs(o.manager,o.handler),o.mouse=new xs(o.manager,o.handler),o.primaryTouch=null,o.lastTouches=[],o}return ra(e,t),e.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},e}(cs);return t}();function Cs(t,e,i){return!!Array.isArray(t)&&(Ya(t,i[e],i),!0)}var As=32,Ps=1;function Es(t,e){var i=e.manager;return i?i.get(t):t}function Ls(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}var $s=function(){function t(t){void 0===t&&(t={}),this.options=sa({enable:!0},t),this.id=Ps++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var e=t.prototype;return e.set=function(t){return ha(this.options,t),this.manager&&this.manager.touchAction.update(),this},e.recognizeWith=function(t){if(Cs(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=Es(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},e.dropRecognizeWith=function(t){return Cs(t,"dropRecognizeWith",this)||(t=Es(t,this),delete this.simultaneous[t.id]),this},e.requireFailure=function(t){if(Cs(t,"requireFailure",this))return this;var e=this.requireFail;return-1===ds(e,t=Es(t,this))&&(e.push(t),t.requireFailure(this)),this},e.dropRequireFailure=function(t){if(Cs(t,"dropRequireFailure",this))return this;t=Es(t,this);var e=ds(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},e.hasRequireFailures=function(){return this.requireFail.length>0},e.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},e.emit=function(t){var e=this,i=this.state;function o(i){e.manager.emit(i,t)}i<8&&o(e.options.event+Ls(i)),o(e.options.event),t.additionalEvent&&o(t.additionalEvent),i>=8&&o(e.options.event+Ls(i))},e.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=As},e.canEmit=function(){for(var t=0;t<this.requireFail.length;){if(!(33&this.requireFail[t].state))return!1;t++}return!0},e.recognize=function(t){var e=ha({},t);if(!qa(this.options.enable,[this,e]))return this.reset(),void(this.state=As);56&this.state&&(this.state=1),this.state=this.process(e),30&this.state&&this.tryEmit(e)},e.process=function(t){},e.getTouchAction=function(){},e.reset=function(){},t}(),zs=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,sa({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},e))||this).pTime=!1,i.pCenter=!1,i._timer=null,i._input=null,i.count=0,i}ra(e,t);var i=e.prototype;return i.getTouchAction=function(){return[xa]},i.process=function(t){var e=this,i=this.options,o=t.pointers.length===i.pointers,n=t.distance<i.threshold,a=t.deltaTime<i.time;if(this.reset(),t.eventType&$a&&0===this.count)return this.failTimeout();if(n&&a&&o){if(t.eventType!==za)return this.failTimeout();var s=!this.pTime||t.timeStamp-this.pTime<i.interval,r=!this.pCenter||Ja(this.pCenter,t.center)<i.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,r&&s?this.count+=1:this.count=1,this._input=t,0===this.count%i.taps)return this.hasRequireFailures()?(this._timer=setTimeout((function(){e.state=8,e.tryEmit()}),i.interval),2):8}return As},i.failTimeout=function(){var t=this;return this._timer=setTimeout((function(){t.state=As}),this.options.interval),As},i.reset=function(){clearTimeout(this._timer)},i.emit=function(){8===this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},e}($s),Os=function(t){function e(e){return void 0===e&&(e={}),t.call(this,sa({pointers:1},e))||this}ra(e,t);var i=e.prototype;return i.attrTest=function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},i.process=function(t){var e=this.state,i=t.eventType,o=6&e,n=this.attrTest(t);return o&&(i&Oa||!n)?16|e:o||n?i&za?8|e:2&e?4|e:2:As},e}($s);function Vs(t){return t===Na?"down":t===Ia?"up":t===Ha?"left":t===Ra?"right":""}var Hs=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,sa({event:"pan",threshold:10,pointers:1,direction:Ba},e))||this).pX=null,i.pY=null,i}ra(e,t);var i=e.prototype;return i.getTouchAction=function(){var t=this.options.direction,e=[];return t&Fa&&e.push(Sa),t&Wa&&e.push(Ta),e},i.directionTest=function(t){var e=this.options,i=!0,o=t.distance,n=t.direction,a=t.deltaX,s=t.deltaY;return n&e.direction||(e.direction&Fa?(n=0===a?Va:a<0?Ha:Ra,i=a!==this.pX,o=Math.abs(t.deltaX)):(n=0===s?Va:s<0?Ia:Na,i=s!==this.pY,o=Math.abs(t.deltaY))),t.direction=n,i&&o>e.threshold&&n&e.direction},i.attrTest=function(t){return Os.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},i.emit=function(e){this.pX=e.deltaX,this.pY=e.deltaY;var i=Vs(e.direction);i&&(e.additionalEvent=this.options.event+i),t.prototype.emit.call(this,e)},e}(Os),Rs=function(t){function e(e){return void 0===e&&(e={}),t.call(this,sa({event:"swipe",threshold:10,velocity:.3,direction:Fa|Wa,pointers:1},e))||this}ra(e,t);var i=e.prototype;return i.getTouchAction=function(){return Hs.prototype.getTouchAction.call(this)},i.attrTest=function(e){var i,o=this.options.direction;return o&(Fa|Wa)?i=e.overallVelocity:o&Fa?i=e.overallVelocityX:o&Wa&&(i=e.overallVelocityY),t.prototype.attrTest.call(this,e)&&o&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers===this.options.pointers&&_a(i)>this.options.velocity&&e.eventType&za},i.emit=function(t){var e=Vs(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)},e}(Os),Is=function(t){function e(e){return void 0===e&&(e={}),t.call(this,sa({event:"pinch",threshold:0,pointers:2},e))||this}ra(e,t);var i=e.prototype;return i.getTouchAction=function(){return[ka]},i.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},i.emit=function(e){if(1!==e.scale){var i=e.scale<1?"in":"out";e.additionalEvent=this.options.event+i}t.prototype.emit.call(this,e)},e}(Os),Ns=function(t){function e(e){return void 0===e&&(e={}),t.call(this,sa({event:"rotate",threshold:0,pointers:2},e))||this}ra(e,t);var i=e.prototype;return i.getTouchAction=function(){return[ka]},i.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)},e}(Os),Fs=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,sa({event:"press",pointers:1,time:251,threshold:9},e))||this)._timer=null,i._input=null,i}ra(e,t);var i=e.prototype;return i.getTouchAction=function(){return[wa]},i.process=function(t){var e=this,i=this.options,o=t.pointers.length===i.pointers,n=t.distance<i.threshold,a=t.deltaTime>i.time;if(this._input=t,!n||!o||t.eventType&(za|Oa)&&!a)this.reset();else if(t.eventType&$a)this.reset(),this._timer=setTimeout((function(){e.state=8,e.tryEmit()}),i.time);else if(t.eventType&za)return 8;return As},i.reset=function(){clearTimeout(this._timer)},i.emit=function(t){8===this.state&&(t&&t.eventType&za?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=ga(),this.manager.emit(this.options.event,this._input)))},e}($s),Ws={domEvents:!1,touchAction:ya,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Bs=[[Ns,{enable:!1}],[Is,{enable:!1},["rotate"]],[Rs,{direction:Fa}],[Hs,{direction:Fa},["swipe"]],[zs],[zs,{event:"doubletap",taps:2},["tap"]],[Fs]];function js(t,e){var i,o=t.element;o.style&&(Ya(t.options.cssProps,(function(n,a){i=fa(o.style,a),e?(t.oldCssProps[i]=o.style[i],o.style[i]=n):o.style[i]=t.oldCssProps[i]||""})),e||(t.oldCssProps={}))}var Us=function(){function t(t,e){var i,o=this;this.options=ha({},Ws,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((i=this).options.inputClass||(Ca?_s:Aa?vs:Da?Ds:xs))(i,ns),this.touchAction=new Xa(this,this.options.touchAction),js(this,!0),Ya(this.options.recognizers,(function(t){var e=o.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])}),this)}var e=t.prototype;return e.set=function(t){return ha(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},e.stop=function(t){this.session.stopped=t?2:1},e.recognize=function(t){var e=this.session;if(!e.stopped){var i;this.touchAction.preventDefaults(t);var o=this.recognizers,n=e.curRecognizer;(!n||n&&8&n.state)&&(e.curRecognizer=null,n=null);for(var a=0;a<o.length;)i=o[a],2===e.stopped||n&&i!==n&&!i.canRecognizeWith(n)?i.reset():i.recognize(t),!n&&14&i.state&&(e.curRecognizer=i,n=i),a++}},e.get=function(t){if(t instanceof $s)return t;for(var e=this.recognizers,i=0;i<e.length;i++)if(e[i].options.event===t)return e[i];return null},e.add=function(t){if(Cs(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},e.remove=function(t){if(Cs(t,"remove",this))return this;var e=this.get(t);if(t){var i=this.recognizers,o=ds(i,e);-1!==o&&(i.splice(o,1),this.touchAction.update())}return this},e.on=function(t,e){if(void 0===t||void 0===e)return this;var i=this.handlers;return Ya(as(t),(function(t){i[t]=i[t]||[],i[t].push(e)})),this},e.off=function(t,e){if(void 0===t)return this;var i=this.handlers;return Ya(as(t),(function(t){e?i[t]&&i[t].splice(ds(i[t],e),1):delete i[t]})),this},e.emit=function(t,e){this.options.domEvents&&function(t,e){var i=document.createEvent("Event");i.initEvent(t,!0,!0),i.gesture=e,e.target.dispatchEvent(i)}(t,e);var i=this.handlers[t]&&this.handlers[t].slice();if(i&&i.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var o=0;o<i.length;)i[o](e),o++}},e.destroy=function(){this.element&&js(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},t}(),Ys={touchstart:$a,touchmove:2,touchend:za,touchcancel:Oa},qs=function(t){function e(){var i,o=e.prototype;return o.evTarget="touchstart",o.evWin="touchstart touchmove touchend touchcancel",(i=t.apply(this,arguments)||this).started=!1,i}return ra(e,t),e.prototype.handler=function(t){var e=Ys[t.type];if(e===$a&&(this.started=!0),this.started){var i=Zs.call(this,t,e);e&(za|Oa)&&i[0].length-i[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:Pa,srcEvent:t})}},e}(cs);function Zs(t,e){var i=gs(t.touches),o=gs(t.changedTouches);return e&(za|Oa)&&(i=fs(i.concat(o),"identifier",!0)),[i,o]}function Xs(t,e,i){var o="DEPRECATED METHOD: "+e+"\n"+i+" AT \n";return function(){var e=new Error("get-stack-trace"),i=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",n=window.console&&(window.console.warn||window.console.log);return n&&n.call(window.console,o,i),t.apply(this,arguments)}}var Ks=Xs((function(t,e,i){for(var o=Object.keys(e),n=0;n<o.length;)(!i||i&&void 0===t[o[n]])&&(t[o[n]]=e[o[n]]),n++;return t}),"extend","Use `assign`."),Gs=Xs((function(t,e){return Ks(t,e,!0)}),"merge","Use `assign`.");function Qs(t,e,i){var o,n=e.prototype;(o=t.prototype=Object.create(n)).constructor=t,o._super=n,i&&ha(o,i)}function Js(t,e){return function(){return t.apply(e,arguments)}}var tr=function(){var t=function(t,e){return void 0===e&&(e={}),new Us(t,sa({recognizers:Bs.concat()},e))};return t.VERSION="2.0.17-rc",t.DIRECTION_ALL=Ba,t.DIRECTION_DOWN=Na,t.DIRECTION_LEFT=Ha,t.DIRECTION_RIGHT=Ra,t.DIRECTION_UP=Ia,t.DIRECTION_HORIZONTAL=Fa,t.DIRECTION_VERTICAL=Wa,t.DIRECTION_NONE=Va,t.DIRECTION_DOWN=Na,t.INPUT_START=$a,t.INPUT_MOVE=2,t.INPUT_END=za,t.INPUT_CANCEL=Oa,t.STATE_POSSIBLE=1,t.STATE_BEGAN=2,t.STATE_CHANGED=4,t.STATE_ENDED=8,t.STATE_RECOGNIZED=8,t.STATE_CANCELLED=16,t.STATE_FAILED=As,t.Manager=Us,t.Input=cs,t.TouchAction=Xa,t.TouchInput=vs,t.MouseInput=xs,t.PointerEventInput=_s,t.TouchMouseInput=Ds,t.SingleTouchInput=qs,t.Recognizer=$s,t.AttrRecognizer=Os,t.Tap=zs,t.Pan=Hs,t.Swipe=Rs,t.Pinch=Is,t.Rotate=Ns,t.Press=Fs,t.on=ss,t.off=rs,t.each=Ya,t.merge=Gs,t.extend=Ks,t.bindFn=Js,t.assign=ha,t.inherit=Qs,t.bindFn=Js,t.prefixed=fa,t.toArray=gs,t.inArray=ds,t.uniqueArray=fs,t.splitStr=as,t.boolOrFn=qa,t.hasParent=Ka,t.addEventListeners=ss,t.removeEventListeners=rs,t.defaults=ha({},Ws,{preset:Bs}),t}();tr.defaults;
|
||
/**
|
||
* @license
|
||
* Copyright 2018 Google LLC
|
||
* SPDX-License-Identifier: BSD-3-Clause
|
||
*/
|
||
const er=270;const ir=new Set(["ArrowRight","ArrowUp","ArrowLeft","ArrowDown","PageUp","PageDown","Home","End"]);let or=class extends rt{constructor(){super(...arguments),this.disabled=!1,this.step=1,this.min=0,this.max=100,this._localValue=this.value,this._localLow=this.low,this._localHigh=this.high,this._getPercentageFromEvent=t=>{const e=this._slider.getBoundingClientRect(),i=2*(t.center.x-e.left-e.width/2)/e.width,o=2*(t.center.y-e.top-e.height/2)/e.height,[,n]=function(t,e){return[Math.sqrt(t*t+e*e),Math.atan2(e,t)]}(i,o),a=(n/(2*Math.PI)*360+45-135+360)%360-45;return Math.max(Math.min(a/er,1),0)}}_valueToPercentage(t){return(Sn(t,this.min,this.max)-this.min)/(this.max-this.min)}_percentageToValue(t){return(this.max-this.min)*t+this.min}_steppedValue(t){return Math.round(t/this.step)*this.step}_boundedValue(t){var e,i;const o="high"===this._activeSlider?Math.min(null!==(e=this._localLow)&&void 0!==e?e:this.max):this.min,n="low"===this._activeSlider?Math.max(null!==(i=this._localHigh)&&void 0!==i?i:this.min):this.max;return Math.min(Math.max(t,o),n)}firstUpdated(t){super.firstUpdated(t),this._setupListeners()}updated(t){super.updated(t),this._activeSlider||(t.has("value")&&(this._localValue=this.value),t.has("low")&&(this._localLow=this.low),t.has("high")&&(this._localHigh=this.high))}connectedCallback(){super.connectedCallback(),this._setupListeners()}disconnectedCallback(){super.disconnectedCallback()}_findActiveSlider(t){var e,i;if(!this.dual)return"value";const o=Math.max(null!==(e=this._localLow)&&void 0!==e?e:this.min,this.min),n=Math.min(null!==(i=this._localHigh)&&void 0!==i?i:this.max,this.max);if(o>=t)return"low";if(n<=t)return"high";return Math.abs(t-o)<=Math.abs(t-n)?"low":"high"}_setActiveValue(t){switch(this._activeSlider){case"high":this._localHigh=t;break;case"low":this._localLow=t;break;case"value":this._localValue=t}}_getActiveValue(){switch(this._activeSlider){case"high":return this._localHigh;case"low":return this._localLow;case"value":return this._localValue}}_setupListeners(){this._interaction&&!this._mc&&(this._mc=new Us(this._interaction,{inputClass:Ds}),this._mc.add(new Hs({direction:Ba,enable:!0,threshold:0})),this._mc.add(new zs({event:"singletap"})),this._mc.on("pan",(t=>{t.srcEvent.stopPropagation(),t.srcEvent.preventDefault()})),this._mc.on("panstart",(t=>{var e,i;if(this.disabled)return;const o=this._getPercentageFromEvent(t),n=this._percentageToValue(o);this._activeSlider=this._findActiveSlider(n),this._lastSlider=this._activeSlider,null===(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.getElementById("#slider"))||void 0===i||i.focus()})),this._mc.on("pancancel",(()=>{this.disabled||(this._activeSlider=void 0)})),this._mc.on("panmove",(t=>{if(this.disabled)return;const e=this._getPercentageFromEvent(t),i=this._percentageToValue(e),o=this._boundedValue(i);this._setActiveValue(o);const n=this._steppedValue(o);this._activeSlider&&Tn(this,`${this._activeSlider}-changing`,{value:n})})),this._mc.on("panend",(t=>{if(this.disabled)return;const e=this._getPercentageFromEvent(t),i=this._percentageToValue(e),o=this._boundedValue(i),n=this._steppedValue(o);this._setActiveValue(n),this._activeSlider&&(Tn(this,`${this._activeSlider}-changing`,{value:void 0}),Tn(this,`${this._activeSlider}-changed`,{value:n})),this._activeSlider=void 0})),this._mc.on("singletap",(t=>{var e,i;if(this.disabled)return;const o=this._getPercentageFromEvent(t),n=this._percentageToValue(o);this._activeSlider=this._findActiveSlider(n);const a=this._boundedValue(n),s=this._steppedValue(a);this._setActiveValue(s),this._activeSlider&&(Tn(this,`${this._activeSlider}-changing`,{value:void 0}),Tn(this,`${this._activeSlider}-changed`,{value:s})),this._lastSlider=this._activeSlider,null===(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.getElementById("#slider"))||void 0===i||i.focus(),this._activeSlider=void 0})))}get _tenPercentStep(){return Math.max(this.step,(this.max-this.min)/10)}_handleKeyDown(t){var e,i,o;if(!ir.has(t.code))return;t.preventDefault(),this._lastSlider&&(null===(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.getElementById(this._lastSlider))||void 0===i||i.focus()),this._activeSlider=null!==(o=this._lastSlider)&&void 0!==o?o:t.currentTarget.id,this._lastSlider=void 0;const n=this._getActiveValue();switch(t.code){case"ArrowRight":case"ArrowUp":this._setActiveValue(this._boundedValue((null!=n?n:this.min)+this.step));break;case"ArrowLeft":case"ArrowDown":this._setActiveValue(this._boundedValue((null!=n?n:this.min)-this.step));break;case"PageUp":this._setActiveValue(this._steppedValue(this._boundedValue((null!=n?n:this.min)+this._tenPercentStep)));break;case"PageDown":this._setActiveValue(this._steppedValue(this._boundedValue((null!=n?n:this.min)-this._tenPercentStep)));break;case"Home":this._setActiveValue(this._boundedValue(this.min));break;case"End":this._setActiveValue(this._boundedValue(this.max))}Tn(this,`${this._activeSlider}-changing`,{value:this._getActiveValue()}),this._activeSlider=void 0}_handleKeyUp(t){ir.has(t.code)&&(this._activeSlider=t.currentTarget.id,t.preventDefault(),Tn(this,`${this._activeSlider}-changing`,{value:void 0}),Tn(this,`${this._activeSlider}-changed`,{value:this._getActiveValue()}),this._activeSlider=void 0)}destroyListeners(){this._mc&&(this._mc.destroy(),this._mc=void 0)}_strokeCircleDashArc(t){return this._strokeDashArc(t,t)}_strokeDashArc(t,e){const i=this._valueToPercentage(t),o=this._valueToPercentage(e),n=290*Math.PI*er/360,a=Math.max((o-i)*n,0);return[`${a} ${n-a}`,`-${i*n-.5}`]}renderArc(t,e,i){var o,n;if(this.disabled)return Y;const a=aa({x:0,y:0,start:0,end:er,r:145}),s="end"===i?this.max:this.min,r=null!==(o=this.current)&&void 0!==o?o:s,l=null!=e?e:s,c="end"===i?l<=r:"start"===i&&r<=l,d=c?"end"===i?this._strokeDashArc(l,r):this._strokeDashArc(r,l):this._strokeCircleDashArc(l),h="full"===i?this._strokeDashArc(this.min,this.max):"end"===i?this._strokeDashArc(l,s):this._strokeDashArc(s,l),u=this._strokeCircleDashArc(l),m=null!=this.current&&this.current<=this.max&&this.current>=this.min&&(c||"full"===this.mode)?this._strokeCircleDashArc(this.current):void 0;return j`
|
||
<g class=${bt({inactive:Boolean(this.inactive)})}>
|
||
<path
|
||
class="arc arc-clear"
|
||
d=${a}
|
||
stroke-dasharray=${h[0]}
|
||
stroke-dashoffset=${h[1]}
|
||
/>
|
||
<path
|
||
class="arc arc-colored ${bt({[t]:!0})}"
|
||
d=${a}
|
||
stroke-dasharray=${h[0]}
|
||
stroke-dashoffset=${h[1]}
|
||
/>
|
||
<path
|
||
.id=${t}
|
||
d=${a}
|
||
class="arc arc-active ${bt({[t]:!0})}"
|
||
stroke-dasharray=${d[0]}
|
||
stroke-dashoffset=${d[1]}
|
||
role="slider"
|
||
tabindex="0"
|
||
aria-valuemin=${this.min}
|
||
aria-valuemax=${this.max}
|
||
aria-valuenow=${null!=this._localValue?this._steppedValue(this._localValue):void 0}
|
||
aria-disabled=${this.disabled}
|
||
aria-label=${(t=>t??Y)(null!==(n=this.lowLabel)&&void 0!==n?n:this.label)}
|
||
@keydown=${this._handleKeyDown}
|
||
@keyup=${this._handleKeyUp}
|
||
/>
|
||
${m?j`
|
||
<path
|
||
class="current arc-current"
|
||
d=${a}
|
||
stroke-dasharray=${m[0]}
|
||
stroke-dashoffset=${m[1]}
|
||
/>
|
||
`:Y}
|
||
<path
|
||
class="target-border ${bt({[t]:!0})}"
|
||
d=${a}
|
||
stroke-dasharray=${u[0]}
|
||
stroke-dashoffset=${u[1]}
|
||
/>
|
||
<path
|
||
class="target"
|
||
d=${a}
|
||
stroke-dasharray=${u[0]}
|
||
stroke-dashoffset=${u[1]}
|
||
/>
|
||
</g>
|
||
`}render(){const t=aa({x:0,y:0,start:0,end:er,r:145}),e=this.dual?this._localLow:this._localValue,i=this._localHigh,o=this.current,n=o?this._strokeCircleDashArc(o):void 0;return B`
|
||
<svg
|
||
id="slider"
|
||
viewBox="0 0 320 320"
|
||
overflow="visible"
|
||
class=${bt({pressed:Boolean(this._activeSlider)})}
|
||
@keydown=${this._handleKeyDown}
|
||
tabindex=${this._lastSlider?"0":"-1"}
|
||
>
|
||
<g
|
||
id="container"
|
||
transform="translate(160 160) rotate(${135})"
|
||
>
|
||
<g id="interaction">
|
||
<path d=${t} />
|
||
</g>
|
||
<g id="display">
|
||
<path class="background" d=${t} />
|
||
${n?j`
|
||
<path
|
||
class="current"
|
||
d=${t}
|
||
stroke-dasharray=${n[0]}
|
||
stroke-dashoffset=${n[1]}
|
||
/>
|
||
`:Y}
|
||
${null!=e?this.renderArc(this.dual?"low":"value",e,!this.dual&&this.mode||"start"):Y}
|
||
${this.dual&&null!=i?this.renderArc("high",i,"end"):Y}
|
||
</g>
|
||
</g>
|
||
</svg>
|
||
<slot></slot>
|
||
`}static get styles(){return s`
|
||
:host {
|
||
--clear-background-color: #111111;
|
||
--control-circular-slider-color: var(--primary-color);
|
||
--control-circular-slider-background: var(--disabled-color);
|
||
--control-circular-slider-background-opacity: 0.3;
|
||
--control-circular-slider-low-color: var(
|
||
--control-circular-slider-color
|
||
);
|
||
--control-circular-slider-high-color: var(
|
||
--control-circular-slider-color
|
||
);
|
||
}
|
||
#wrapper {
|
||
position: relative;
|
||
}
|
||
svg {
|
||
width: 320px;
|
||
display: block;
|
||
}
|
||
#slider {
|
||
width: 100%;
|
||
max-width: 233px;
|
||
outline: none;
|
||
margin: 0 auto;
|
||
margin-top: 1em;
|
||
position: relative;
|
||
}
|
||
#interaction {
|
||
display: flex;
|
||
fill: none;
|
||
stroke: transparent;
|
||
stroke-linecap: round;
|
||
stroke-width: 48px;
|
||
cursor: pointer;
|
||
}
|
||
#display {
|
||
pointer-events: none;
|
||
}
|
||
:host([disabled]) #interaction {
|
||
cursor: initial;
|
||
}
|
||
|
||
.background {
|
||
fill: none;
|
||
stroke: var(--control-circular-slider-background);
|
||
opacity: var(--control-circular-slider-background-opacity);
|
||
transition:
|
||
stroke 180ms ease-in-out,
|
||
opacity 180ms ease-in-out;
|
||
stroke-linecap: round;
|
||
stroke-width: 24px;
|
||
}
|
||
|
||
.arc {
|
||
fill: none;
|
||
stroke-linecap: round;
|
||
stroke-width: 24px;
|
||
transition:
|
||
stroke-width 300ms ease-in-out,
|
||
stroke-dasharray 300ms ease-in-out,
|
||
stroke-dashoffset 300ms ease-in-out,
|
||
stroke 180ms ease-in-out,
|
||
opacity 180ms ease-in-out;
|
||
}
|
||
|
||
.target {
|
||
fill: none;
|
||
stroke-linecap: round;
|
||
stroke-width: 18px;
|
||
stroke: white;
|
||
transition:
|
||
stroke-width 300ms ease-in-out,
|
||
stroke-dasharray 300ms ease-in-out,
|
||
stroke-dashoffset 300ms ease-in-out,
|
||
stroke 180ms ease-in-out,
|
||
opacity 180ms ease-in-out;
|
||
}
|
||
|
||
.target-border {
|
||
fill: none;
|
||
stroke-linecap: round;
|
||
stroke-width: 24px;
|
||
stroke: white;
|
||
transition:
|
||
stroke-width 300ms ease-in-out,
|
||
stroke-dasharray 300ms ease-in-out,
|
||
stroke-dashoffset 300ms ease-in-out,
|
||
stroke 180ms ease-in-out,
|
||
opacity 180ms ease-in-out;
|
||
}
|
||
|
||
|
||
|
||
.current {
|
||
fill: none;
|
||
stroke-linecap: round;
|
||
stroke-width: 8px;
|
||
stroke: var(--primary-text-color);
|
||
opacity: 0.5;
|
||
transition:
|
||
stroke-width 300ms ease-in-out,
|
||
stroke-dasharray 300ms ease-in-out,
|
||
stroke-dashoffset 300ms ease-in-out,
|
||
stroke 180ms ease-in-out,
|
||
opacity 180ms ease-in-out;
|
||
}
|
||
|
||
.arc-current {
|
||
stroke: var(--clear-background-color);
|
||
}
|
||
|
||
.arc-clear {
|
||
stroke: var(--clear-background-color);
|
||
}
|
||
.arc-colored {
|
||
opacity: 0.5;
|
||
}
|
||
.arc-active {
|
||
outline: none;
|
||
}
|
||
.arc-active:focus-visible {
|
||
stroke-width: 28px;
|
||
}
|
||
|
||
.pressed .arc,
|
||
.pressed .target,
|
||
.pressed .target-border,
|
||
.pressed .current {
|
||
transition:
|
||
stroke-width 300ms ease-in-out,
|
||
stroke 180ms ease-in-out,
|
||
opacity 180ms ease-in-out;
|
||
}
|
||
|
||
.inactive .arc,
|
||
.inactive .arc-current {
|
||
opacity: 0;
|
||
}
|
||
|
||
.value {
|
||
stroke: var(--control-circular-slider-color);
|
||
}
|
||
|
||
.low {
|
||
stroke: var(--control-circular-slider-low-color);
|
||
}
|
||
|
||
.high {
|
||
stroke: var(--state-climate-cool-color);
|
||
}
|
||
`}};function nr(t){var e,i;return B`
|
||
<ha-card class="gunmalmg-card ${t.hvacMode} ${t._isLocked?"locked":""}">
|
||
${t._showClassicPopup?function(t){var e,i,o;return B`
|
||
<div class="classic-popup-backdrop" @click=${()=>t._closeClassicPopup()}></div>
|
||
<div class="classic-popup-container">
|
||
<ha-icon-button
|
||
class="classic-popup-close"
|
||
.path=${kt}
|
||
@click=${()=>t._closeClassicPopup()}
|
||
tabindex="0"
|
||
></ha-icon-button>
|
||
${(null===(e=t._config)||void 0===e?void 0:e.disable_menu)?"":B`
|
||
<ha-icon-button
|
||
class="classic-popup-more-info"
|
||
.label=${t.hass.localize("ui.panel.lovelace.cards.show_more_info")}
|
||
.path=${Tt}
|
||
@click=${()=>{t._closeClassicPopup(),t._handleMoreInfo()}}
|
||
tabindex="0"
|
||
></ha-icon-button>
|
||
`}
|
||
<div class="classic-popup-content ${(null===(i=t._config)||void 0===i?void 0:i.allow_preset_modification)?"has-preset-mod":""} ${(null===(o=t._config)||void 0===o?void 0:o.show_regulation_chart)?"has-regulation-chart":""}">
|
||
${t._renderClassicContent(!0)}
|
||
</div>
|
||
</div>
|
||
`}(t):""}
|
||
|
||
<div class="gunmalmg-grid">
|
||
<div class="gunmalmg-name name">${t.name}</div>
|
||
<div class="gunmalmg-left">
|
||
<div class="hvac-mode-tile">
|
||
${t._renderIcon(t.hvacMode,t.hvacMode,!0)}
|
||
</div>
|
||
</div>
|
||
<div class="gunmalmg-center" @click=${()=>t._openClassicPopup()}>
|
||
<div class="temps">
|
||
${(()=>{var e,i,o,n;const a=(null===(e=t.hass)||void 0===e?void 0:e.locale)||void 0,s=new Intl.NumberFormat(a,{minimumFractionDigits:1,maximumFractionDigits:1}),r=t._display_top,l=t._display_bottom,c=(null===(n=null===(o=null===(i=t.hass)||void 0===i?void 0:i.config)||void 0===o?void 0:o.unit_system)||void 0===n?void 0:n.temperature)||"",d=null==r?t.hass?t.hass.localize("extra_states.temp_unavailable"):"":s.format(r),h=null==l?null:s.format(l);return B`
|
||
<div class="gunmalmg-temps-inline">
|
||
<span class="gunmalmg-temp-main ${t._hasError?"has-error":""}">${d}<span class="gunmalmg-uom"> ${c}</span></span>
|
||
${h?B`<span class="gunmalmg-temp-secondary">(${h}<span class="gunmalmg-uom"> ${c}</span>)</span>`:""}
|
||
</div>
|
||
`})()}
|
||
</div>
|
||
</div>
|
||
<div class="gunmalmg-right">
|
||
<div class="gunmalmg-presets-scroll">
|
||
<div id="presets" class="gunmalmg-presets">
|
||
${(null===(e=t._config)||void 0===e?void 0:e.disable_presets)?"":t.presets.map((e=>B`${t._renderPreset(e,t.preset)}`))}
|
||
</div>
|
||
</div>
|
||
<div class="gunmalmg-actions">
|
||
${(null===(i=t._config)||void 0===i?void 0:i.allow_lock_toggle)?B`
|
||
<ha-icon-button
|
||
class="gunmalmg-lock-btn ${t._isLocked?"locked":"unlocked"}"
|
||
.path=${t._isLocked?Pt:Et}
|
||
@click=${t._handleLockToggle}
|
||
tabindex="0"
|
||
></ha-icon-button>
|
||
`:""}
|
||
${function(t){var e,i,o,n;return(null===(e=t._config)||void 0===e?void 0:e.disable_timed_preset)?B``:B`
|
||
<div class="gunmalmg-timed-preset">
|
||
${t.timedPresetActive?B`
|
||
<span class="gunmalmg-timed-remaining"
|
||
title="${_n({hass:t.hass,string:"extra_states.cancel_timed_preset"})}"
|
||
@click=${t._handleCancelTimedPreset}>
|
||
${t._formatRemainingTime(t.timedPresetRemainingTime)}
|
||
</span>
|
||
${(null!==(i=t.timedPresetRemainingTime)&&void 0!==i?i:0)<60?B`
|
||
<span class="gunmalmg-timed-label">${_n({hass:t.hass,string:"extra_states.minutes"})}</span>
|
||
`:""}
|
||
`:(null===(o=t._config)||void 0===o?void 0:o.use_manual_duration_input)?B`
|
||
<input
|
||
type="number"
|
||
class="gunmalmg-timed-input ${t.timedPresetDuration?"active":""}"
|
||
.value=${null!==(n=t.timedPresetDuration)&&void 0!==n?n:""}
|
||
@input=${t._handleTimedPresetDurationChange}
|
||
placeholder="0"
|
||
min="0"
|
||
max="1440"
|
||
title="${_n({hass:t.hass,string:"extra_states.timed_preset_title"})}"
|
||
/>
|
||
<span class="gunmalmg-timed-label">${_n({hass:t.hass,string:"extra_states.minutes"})}</span>
|
||
`:B`
|
||
<select
|
||
class="gunmalmg-timed-select ${t.timedPresetDuration?"active":""}"
|
||
@change=${t._handleTimedPresetSelectChange}
|
||
title="${_n({hass:t.hass,string:"extra_states.timed_preset_title"})}"
|
||
>
|
||
<option value="" ?selected=${!t.timedPresetDuration}>--</option>
|
||
<option value="15" ?selected=${15===t.timedPresetDuration}>15 ${_n({hass:t.hass,string:"extra_states.minutes"})}</option>
|
||
<option value="30" ?selected=${30===t.timedPresetDuration}>30 ${_n({hass:t.hass,string:"extra_states.minutes"})}</option>
|
||
<option value="60" ?selected=${60===t.timedPresetDuration}>1 h</option>
|
||
<option value="120" ?selected=${120===t.timedPresetDuration}>2 h</option>
|
||
<option value="240" ?selected=${240===t.timedPresetDuration}>4 h</option>
|
||
<option value="480" ?selected=${480===t.timedPresetDuration}>8 h</option>
|
||
<option value="1440" ?selected=${1440===t.timedPresetDuration}>24 h</option>
|
||
</select>
|
||
`}
|
||
</div>
|
||
`}(t)}
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</ha-card>
|
||
`}t([ut({type:Boolean,reflect:!0})],or.prototype,"disabled",void 0),t([ut({type:Boolean})],or.prototype,"dual",void 0),t([ut({type:String})],or.prototype,"mode",void 0),t([ut({type:Boolean})],or.prototype,"inactive",void 0),t([ut({type:String})],or.prototype,"label",void 0),t([ut({type:String,attribute:"low-label"})],or.prototype,"lowLabel",void 0),t([ut({type:String,attribute:"high-label"})],or.prototype,"highLabel",void 0),t([ut({type:Number})],or.prototype,"value",void 0),t([ut({type:Number})],or.prototype,"low",void 0),t([ut({type:Number})],or.prototype,"high",void 0),t([ut({type:Number})],or.prototype,"current",void 0),t([ut({type:Number})],or.prototype,"step",void 0),t([ut({type:Number})],or.prototype,"min",void 0),t([ut({type:Number})],or.prototype,"max",void 0),t([mt()],or.prototype,"_localValue",void 0),t([mt()],or.prototype,"_localLow",void 0),t([mt()],or.prototype,"_localHigh",void 0),t([mt()],or.prototype,"_activeSlider",void 0),t([mt()],or.prototype,"_lastSlider",void 0),t([_t("#slider")],or.prototype,"_slider",void 0),t([_t("#interaction")],or.prototype,"_interaction",void 0),or=t([ct("vt-ha-control-circular-slider")],or);const ar=s`
|
||
:host([theme="gunmalmg"]) vt-ha-control-circular-slider { display: none; }
|
||
:host([theme="gunmalmg"]) vt-ha-control-circular-slider { display: none !important; }
|
||
:host([theme="gunmalmg"]) .disabled-circle-container { display: block; background: none; }
|
||
|
||
/* Gunmalmg theme - minimalist compact list style */
|
||
:host([theme="gunmalmg"]) ha-card {
|
||
color: var(--primary-text-color);
|
||
border-radius: 10px;
|
||
padding: 0px 0px;
|
||
box-shadow: none;
|
||
}
|
||
:host([theme="gunmalmg"]) .name { font-weight: 600; color: var(--primary-text-color); font-size: 17px; text-align: left;}
|
||
:host([theme="gunmalmg"]) .content { display: flex; position: relative; width: 100%; height: auto; max-width: none; transform: none; left: 0; top: 0; padding: 0; align-items: center; justify-content: center; }
|
||
:host([theme="gunmalmg"]) .current-info, :host([theme="gunmalmg"]) #left-infos, :host([theme="gunmalmg"]) #vt-control-buttons { display: none !important; }
|
||
:host([theme="gunmalmg"]) .disabled-circle-container { height: 84px; background: transparent; }
|
||
|
||
/* Presets as pill buttons - single horizontal row */
|
||
:host([theme="gunmalmg"]) #presets {
|
||
display: flex;
|
||
flex-direction: row;
|
||
flex-wrap: nowrap;
|
||
margin-top: 0;
|
||
align-items: center;
|
||
gap: 6px;
|
||
margin-bottom: 0em;
|
||
width: max-content;
|
||
}
|
||
:host([theme="gunmalmg"]) .preset-label {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
margin: 0; padding: 0;
|
||
flex-shrink: 0;
|
||
height: 70px;
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .preset-label ha-icon-button {
|
||
--mdc-icon-size: 50px;
|
||
width: 70px;
|
||
height: 70px;
|
||
border-radius: 16px;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
background: var(--secondary-background-color);
|
||
color: var(--secondary-text-color);
|
||
border: 1px solid var(--divider-color);
|
||
}
|
||
:host([theme="gunmalmg"]) .preset-label .selected-icon {
|
||
box-shadow: 0 2px 0 rgba(0,0,0,0.3) inset;
|
||
}
|
||
|
||
/* Presets base: icon grey, secondary background */
|
||
:host([theme="gunmalmg"]) .preset-label ha-icon-button {
|
||
background: var(--secondary-background-color);
|
||
border: 1px solid var(--divider-color);
|
||
}
|
||
|
||
/* Only selected preset icon should be colored */
|
||
:host([theme="gunmalmg"]) .preset-label ha-icon-button.selected-icon {
|
||
background: var(--secondary-background-color);
|
||
color: white !important;
|
||
transition: background-color 180ms ease, color 180ms ease;
|
||
}
|
||
|
||
/* Selected colors mapping */
|
||
:host([theme="gunmalmg"]) .preset-frost ha-icon-button.selected-icon { background: #3a9ff2; } /* blue */
|
||
:host([theme="gunmalmg"]) .preset-eco ha-icon-button.selected-icon { background: #5dd461; } /* green */
|
||
:host([theme="gunmalmg"]) .preset-comfort ha-icon-button.selected-icon { background: #f9a21f; } /* orange */
|
||
:host([theme="gunmalmg"]) .preset-boost ha-icon-button.selected-icon { background: #f75252; } /* red-ish */
|
||
:host([theme="gunmalmg"]) .preset-activity ha-icon-button.selected-icon { background: #c455f7; } /* blue */
|
||
/* Left-side compact hvac icon + action for gunmalmg */
|
||
:host([theme="gunmalmg"]) #left-infos-gunmalmg {
|
||
position: absolute;
|
||
left: 12px;
|
||
top: 50%;
|
||
transform: translateY(-50%);
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
z-index: 4;
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .hvac-mode ha-icon-button {
|
||
width: 56px;
|
||
height: 56px;
|
||
border-radius: 50%;
|
||
--mdc-icon-size: 28px;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
background: var(--secondary-background-color);
|
||
color: var(--secondary-text-color);
|
||
border: none;
|
||
transition: background-color 220ms ease, color 220ms ease, transform 160ms ease;
|
||
}
|
||
|
||
/* Colored states for hvac mode icon */
|
||
:host([theme="gunmalmg"]) ha-card.heat .hvac-mode-tile ha-icon-button,
|
||
:host([theme="gunmalmg"]) ha-card.heat_cool .hvac-mode-tile ha-icon-button {
|
||
background: rgba(251, 150, 0, 0.15);
|
||
color: #fb9600;
|
||
}
|
||
:host([theme="gunmalmg"]) ha-card.cool .hvac-mode-tile ha-icon-button {
|
||
background: rgba(3, 141, 254, 0.15);
|
||
color: #038dfe;
|
||
}
|
||
:host([theme="gunmalmg"]) ha-card.off .hvac-mode-tile ha-icon-button {
|
||
background: var(--secondary-background-color);
|
||
color: var(--secondary-text-color);
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .hvac-action svg {
|
||
width: 20px;
|
||
height: 20px;
|
||
fill: var(--primary-text-color);
|
||
opacity: 0.95;
|
||
}
|
||
|
||
/* Badge: top-right white icon on colored background */
|
||
:host([theme="gunmalmg"]) .hvac-badge-container { position: relative; display: inline-block; }
|
||
:host([theme="gunmalmg"]) .hvac-badge {
|
||
position: absolute;
|
||
top: -6px;
|
||
right: -6px;
|
||
width: 20px;
|
||
height: 20px;
|
||
border-radius: 10px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
color: #ffffff;
|
||
}
|
||
:host([theme="gunmalmg"]) .hvac-badge.heating { background: #f44336; }
|
||
:host([theme="gunmalmg"]) .hvac-badge.cooling { background: #03A9F4; }
|
||
:host([theme="gunmalmg"]) .hvac-badge.warning { background: #ff9800; }
|
||
:host([theme="gunmalmg"]) .hvac-badge svg { fill: #ffffff; width: 14px; height: 14px; } /* badge always on colored bg */
|
||
|
||
/* Preset pills tweaks */
|
||
:host([theme="gunmalmg"]) .preset-label {
|
||
border-radius: 10px;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
}
|
||
|
||
/* Temperatures look: main number larger, unit and secondary smaller */
|
||
:host([theme="gunmalmg"]) .main-value { font-size: 16px; font-weight: 600; }
|
||
:host([theme="gunmalmg"]) #current { font-size: 12px; }
|
||
:host([theme="gunmalmg"]) .content .name + * { color: var(--secondary-text-color); font-size: 10px; }
|
||
|
||
/* Inline temperature display (left-aligned, no wrapping) */
|
||
:host([theme="gunmalmg"]) .gunmalmg-temps-inline { display: flex; gap: 4px; align-items: baseline; justify-content: flex-start; flex-wrap: nowrap; white-space: nowrap; }
|
||
:host([theme="gunmalmg"]) .gunmalmg-temp-main { font-size: 17px; font-weight: 700; color: var(--secondary-text-color); white-space: nowrap; }
|
||
:host([theme="gunmalmg"]) .gunmalmg-temp-main.has-error { color: var(--error-color, #db4437); }
|
||
:host([theme="gunmalmg"]) .gunmalmg-temp-main.has-error .gunmalmg-uom { color: var(--error-color, #db4437); }
|
||
:host([theme="gunmalmg"]) .gunmalmg-temp-secondary { font-size: 13px; color: var(--secondary-text-color); margin-left: 4px; white-space: nowrap; }
|
||
:host([theme="gunmalmg"]) .gunmalmg-uom { font-size: 11px; color: var(--secondary-text-color); margin-left: 1px; }
|
||
|
||
/* Hide the classic timed-preset-container (we use our own gunmalmg-timed-preset) */
|
||
:host([theme="gunmalmg"]) .timed-preset-container { display: none !important; }
|
||
|
||
/* Grid layout: name spans columns 1-2 on first row; left/center/right on second row */
|
||
:host([theme="gunmalmg"]) .gunmalmg-grid {
|
||
display: grid;
|
||
grid-template-columns: 0.8fr 1.6fr 2.4fr;
|
||
grid-template-areas:
|
||
"name name right"
|
||
"left center right";
|
||
gap: 6px;
|
||
align-items: center;
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .gunmalmg-name {
|
||
grid-area: name;
|
||
text-align: left;
|
||
padding-left: 8px;
|
||
display: -webkit-box;
|
||
-webkit-line-clamp: 2;
|
||
-webkit-box-orient: vertical;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: normal;
|
||
line-height: 1.2;
|
||
margin: 0.5em;
|
||
}
|
||
:host([theme="gunmalmg"]) .gunmalmg-left { grid-area: left; }
|
||
:host([theme="gunmalmg"]) .gunmalmg-center { grid-area: center; }
|
||
:host([theme="gunmalmg"]) .gunmalmg-right { grid-area: right; }
|
||
|
||
@media (max-width: 480px) {
|
||
:host([theme="gunmalmg"]) .gunmalmg-grid {
|
||
grid-template-columns: 1fr 1fr;
|
||
grid-template-areas:
|
||
"name right"
|
||
"left center";
|
||
}
|
||
:host([theme="gunmalmg"]) .gunmalmg-right {
|
||
margin-top: 8px;
|
||
justify-content: center;
|
||
padding-right: 0;
|
||
}
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .gunmalmg-left { background: transparent; padding: 0; display: flex; align-items: center; justify-content: center; }
|
||
:host([theme="gunmalmg"]) .gunmalmg-center { text-align: left; max-width: 100%; display:flex; flex-direction:column; justify-content:left; }
|
||
:host([theme="gunmalmg"]) .gunmalmg-right {
|
||
padding: 0;
|
||
display: flex;
|
||
flex-direction: row;
|
||
align-items: stretch;
|
||
min-width: 0;
|
||
}
|
||
|
||
/* Scrollable presets zone */
|
||
:host([theme="gunmalmg"]) .gunmalmg-presets-scroll {
|
||
flex: 1 1 0;
|
||
overflow-x: auto;
|
||
overflow-y: hidden;
|
||
min-width: 0;
|
||
scrollbar-width: thin;
|
||
scrollbar-color: var(--secondary-text-color, #888) rgba(128,128,128,0.15);
|
||
}
|
||
:host([theme="gunmalmg"]) .gunmalmg-presets-scroll::-webkit-scrollbar { height: 5px; }
|
||
:host([theme="gunmalmg"]) .gunmalmg-presets-scroll::-webkit-scrollbar-thumb { background: var(--secondary-text-color, #888); border-radius: 3px; }
|
||
:host([theme="gunmalmg"]) .gunmalmg-presets-scroll::-webkit-scrollbar-track { background: rgba(128,128,128,0.15); border-radius: 3px; }
|
||
|
||
/* Fixed actions zone (lock + timed preset) */
|
||
:host([theme="gunmalmg"]) .gunmalmg-actions {
|
||
flex: 0 0 auto;
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
justify-content: flex-start;
|
||
padding: 4px 4px;
|
||
gap: 4px;
|
||
min-width: 48px;
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .hvac-mode-tile { display: flex; align-items: center; justify-content: center; padding: 0; background: transparent; }
|
||
|
||
:host([theme="gunmalmg"]) .hvac-mode-tile ha-icon-button { overflow: hidden; box-shadow: none; border-radius: 30px; }
|
||
|
||
/* Dim hvac mode and preset icons when locked */
|
||
:host([theme="gunmalmg"]) ha-card.locked .hvac-mode-tile ha-icon-button,
|
||
:host([theme="gunmalmg"]) ha-card.locked #presets ha-icon-button,
|
||
:host([theme="gunmalmg"]) ha-card.locked #presets .preset-label,
|
||
:host([theme="gunmalmg"]) ha-card.locked .gunmalmg-timed-preset {
|
||
opacity: 0.45;
|
||
color: var(--disabled-text-color);
|
||
pointer-events: none;
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .gunmalmg-presets {
|
||
display: flex;
|
||
flex-direction: row;
|
||
flex-wrap: nowrap;
|
||
gap: 6px;
|
||
align-items: center;
|
||
justify-content: flex-start;
|
||
padding: 4px 4px;
|
||
min-height: 80px;
|
||
width: max-content;
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .more-info { color: var(--primary-text-color); z-index: 6; }
|
||
|
||
/* Lock button styles */
|
||
:host([theme="gunmalmg"]) .gunmalmg-lock-btn {
|
||
--mdc-icon-size: 24px;
|
||
width: 40px;
|
||
height: 40px;
|
||
border-radius: 12px;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
transition: background-color 200ms ease, color 200ms ease;
|
||
}
|
||
:host([theme="gunmalmg"]) .gunmalmg-lock-btn.locked {
|
||
background: rgba(244, 67, 54, 0.20);
|
||
color: #f44336;
|
||
}
|
||
:host([theme="gunmalmg"]) .gunmalmg-lock-btn.unlocked {
|
||
background: rgba(76, 175, 80, 0.20);
|
||
color: #4CAF50;
|
||
}
|
||
|
||
/* Timed preset styles for gunmalmg */
|
||
:host([theme="gunmalmg"]) .gunmalmg-timed-preset {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
gap: 2px;
|
||
}
|
||
:host([theme="gunmalmg"]) .gunmalmg-timed-remaining {
|
||
font-size: 13px;
|
||
font-weight: 600;
|
||
color: #f9a21f;
|
||
white-space: nowrap;
|
||
cursor: pointer;
|
||
user-select: none;
|
||
border-radius: 8px;
|
||
padding: 2px 6px;
|
||
transition: background-color 200ms ease;
|
||
}
|
||
:host([theme="gunmalmg"]) .gunmalmg-timed-remaining:hover {
|
||
background: rgba(249, 162, 31, 0.15);
|
||
}
|
||
:host([theme="gunmalmg"]) .gunmalmg-timed-label {
|
||
font-size: 9px;
|
||
color: var(--secondary-text-color);
|
||
}
|
||
:host([theme="gunmalmg"]) .gunmalmg-timed-input {
|
||
width: 35px;
|
||
height: 25px;
|
||
border: 1px solid var(--divider-color);
|
||
border-radius: 8px;
|
||
background: var(--secondary-background-color);
|
||
color: var(--primary-text-color);
|
||
font-size: 12px;
|
||
text-align: center;
|
||
outline: none;
|
||
-moz-appearance: textfield;
|
||
}
|
||
:host([theme="gunmalmg"]) .gunmalmg-timed-input:focus {
|
||
border-color: #f9a21f;
|
||
}
|
||
:host([theme="gunmalmg"]) .gunmalmg-timed-input.active {
|
||
border-color: #f9a21f;
|
||
color: #f9a21f;
|
||
}
|
||
:host([theme="gunmalmg"]) .gunmalmg-timed-input::-webkit-outer-spin-button,
|
||
:host([theme="gunmalmg"]) .gunmalmg-timed-input::-webkit-inner-spin-button {
|
||
-webkit-appearance: none;
|
||
margin: 0;
|
||
}
|
||
:host([theme="gunmalmg"]) .gunmalmg-timed-select {
|
||
width: 40px;
|
||
height: 30px;
|
||
border: 1px solid var(--divider-color);
|
||
border-radius: 8px;
|
||
background: var(--secondary-background-color);
|
||
color: var(--primary-text-color);
|
||
font-size: 10px;
|
||
text-align: center;
|
||
outline: none;
|
||
cursor: pointer;
|
||
-webkit-appearance: none;
|
||
-moz-appearance: none;
|
||
appearance: none;
|
||
padding: 0 4px;
|
||
}
|
||
:host([theme="gunmalmg"]) .gunmalmg-timed-select:focus {
|
||
border-color: #f9a21f;
|
||
}
|
||
:host([theme="gunmalmg"]) .gunmalmg-timed-select.active {
|
||
border-color: #f9a21f;
|
||
color: #f9a21f;
|
||
}
|
||
:host([theme="gunmalmg"]) .theme-menu { background: var(--card-background-color); color: var(--primary-text-color); border-color: var(--divider-color); }
|
||
:host([theme="gunmalmg"]) .theme-menu-item { color: var(--primary-text-color); }
|
||
:host([theme="gunmalmg"]) .theme-menu-header { display:flex; align-items:center; justify-content:space-between; padding: 8px 12px; border-bottom: 1px solid var(--divider-color); }
|
||
:host([theme="gunmalmg"]) .theme-menu-title { font-weight:600; cursor:pointer; }
|
||
|
||
/* Gunmalmg center clickable area */
|
||
:host([theme="gunmalmg"]) .gunmalmg-center {
|
||
cursor: pointer;
|
||
}
|
||
|
||
/* Classic popup styles */
|
||
:host([theme="gunmalmg"]) .classic-popup-backdrop {
|
||
position: fixed;
|
||
top: 0;
|
||
left: 0;
|
||
width: 100vw;
|
||
height: 100vh;
|
||
background: rgba(0, 0, 0, 0.7);
|
||
z-index: 1000;
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .classic-popup-container {
|
||
position: fixed;
|
||
top: 50%;
|
||
left: 50%;
|
||
transform: translate(-50%, -50%);
|
||
z-index: 1001;
|
||
background: var(--card-background-color, #fff);
|
||
border-radius: 12px;
|
||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
|
||
max-width: 95vw;
|
||
max-height: 90vh;
|
||
overflow: auto;
|
||
min-width: 300px;
|
||
}
|
||
|
||
/* Mobile: full screen */
|
||
@media (max-width: 600px) {
|
||
:host([theme="gunmalmg"]) .classic-popup-container {
|
||
width: 100vw;
|
||
height: 100vh;
|
||
max-width: 100vw;
|
||
max-height: 100vh;
|
||
border-radius: 0;
|
||
top: 0;
|
||
left: 0;
|
||
transform: none;
|
||
}
|
||
}
|
||
|
||
/* Desktop: similar to more-info dialog */
|
||
@media (min-width: 601px) {
|
||
:host([theme="gunmalmg"]) .classic-popup-container {
|
||
width: 450px;
|
||
max-height: 90vh;
|
||
}
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .classic-popup-close {
|
||
position: absolute;
|
||
top: 8px;
|
||
left: 8px;
|
||
z-index: 1002;
|
||
--mdc-icon-size: 24px;
|
||
color: var(--primary-text-color);
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .classic-popup-more-info {
|
||
position: absolute;
|
||
top: 8px;
|
||
right: 8px;
|
||
z-index: 1002;
|
||
--mdc-icon-size: 24px;
|
||
color: var(--secondary-text-color);
|
||
cursor: pointer;
|
||
border-radius: 100%;
|
||
}
|
||
|
||
/* ===== Popup content: reset ALL gunmalmg overrides to classic appearance ===== */
|
||
:host([theme="gunmalmg"]) .classic-popup-content {
|
||
position: relative;
|
||
padding: 1em;
|
||
padding-top: 1.5em;
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .classic-popup-content.has-preset-mod {
|
||
padding-bottom: calc(1em + 38px);
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .classic-popup-content.has-regulation-chart {
|
||
padding-bottom: calc(1em + 38px);
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .classic-popup-content.has-preset-mod.has-regulation-chart {
|
||
padding-bottom: calc(1em + 76px);
|
||
}
|
||
|
||
/* Same correction as in the main card: compensate for the 50% shift
|
||
caused by the popup content growing when panels are active. */
|
||
:host([theme="gunmalmg"]) .classic-popup-content.has-preset-mod .content,
|
||
:host([theme="gunmalmg"]) .classic-popup-content.has-regulation-chart .content {
|
||
top: calc(50% - 40px - 19px) !important;
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .classic-popup-content.has-preset-mod.has-regulation-chart .content {
|
||
top: calc(50% - 40px - 38px) !important;
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .classic-popup-content.has-preset-mod .content.no-presets,
|
||
:host([theme="gunmalmg"]) .classic-popup-content.has-regulation-chart .content.no-presets {
|
||
top: calc(60% - 30px - 19px) !important;
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .classic-popup-content.has-preset-mod.has-regulation-chart .content.no-presets {
|
||
top: calc(60% - 30px - 38px) !important;
|
||
}
|
||
|
||
/* Name */
|
||
:host([theme="gunmalmg"]) .classic-popup-content .name {
|
||
display: block;
|
||
width: 100%;
|
||
text-align: center;
|
||
font-size: 20px;
|
||
word-break: keep-all;
|
||
white-space: nowrap;
|
||
text-overflow: ellipsis;
|
||
overflow: hidden;
|
||
color: var(--primary-text-color);
|
||
font-weight: normal;
|
||
}
|
||
|
||
/* Circular slider: force visible */
|
||
:host([theme="gunmalmg"]) .classic-popup-content vt-ha-control-circular-slider {
|
||
display: block !important;
|
||
}
|
||
|
||
/* Content overlay inside slider: reset to classic absolute positioning */
|
||
:host([theme="gunmalmg"]) .classic-popup-content .content {
|
||
position: absolute !important;
|
||
width: calc(70% - 40px) !important;
|
||
height: calc(70% - 100px) !important;
|
||
box-sizing: border-box;
|
||
border-radius: 100%;
|
||
left: 50% !important;
|
||
top: calc(50% - 40px) !important;
|
||
text-align: center;
|
||
overflow-wrap: break-word;
|
||
pointer-events: none;
|
||
display: flex !important;
|
||
align-items: center;
|
||
place-content: center;
|
||
flex-flow: wrap;
|
||
transform: translate(-50%,-50%) !important;
|
||
max-width: 155px !important;
|
||
padding: 0;
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .classic-popup-content .content.no-presets {
|
||
top: calc(60% - 30px) !important;
|
||
}
|
||
|
||
/* SVG inside popup */
|
||
:host([theme="gunmalmg"]) .classic-popup-content #main {
|
||
transform: scale(2.3);
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .classic-popup-content svg {
|
||
height: auto;
|
||
margin: auto;
|
||
display: block;
|
||
width: 100%;
|
||
-webkit-backface-visibility: hidden;
|
||
max-width: 233px;
|
||
}
|
||
|
||
/* current-info: force visible */
|
||
:host([theme="gunmalmg"]) .classic-popup-content .current-info {
|
||
display: flex !important;
|
||
}
|
||
|
||
/* Reset font overrides to classic values */
|
||
:host([theme="gunmalmg"]) .classic-popup-content .main-value {
|
||
font-size: inherit !important;
|
||
font-weight: normal !important;
|
||
}
|
||
:host([theme="gunmalmg"]) .classic-popup-content .main-value.temp-main {
|
||
font-size: 15px !important;
|
||
}
|
||
:host([theme="gunmalmg"]) .classic-popup-content .main-value.temp-secondary {
|
||
font-size: 6px !important;
|
||
}
|
||
|
||
/* Hide gunmalmg badges in popup (classic has its own hvac action icon) */
|
||
:host([theme="gunmalmg"]) .classic-popup-content .hvac-badge {
|
||
display: none !important;
|
||
}
|
||
|
||
/* Temperature styles: reset to classic */
|
||
:host([theme="gunmalmg"]) .classic-popup-content .temp-main {
|
||
font-size: 15px;
|
||
}
|
||
:host([theme="gunmalmg"]) .classic-popup-content .temp-main .uom {
|
||
font-size: 5px;
|
||
}
|
||
:host([theme="gunmalmg"]) .classic-popup-content .temp-secondary {
|
||
font-size: 6px;
|
||
}
|
||
:host([theme="gunmalmg"]) .classic-popup-content .temp-secondary .uom {
|
||
font-size: 3px;
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .classic-popup-content line {
|
||
stroke: #e7e7e8;
|
||
stroke-width: 0.5;
|
||
}
|
||
|
||
/* Modes: reset to classic */
|
||
:host([theme="gunmalmg"]) .classic-popup-content #modes {
|
||
z-index: 0;
|
||
position: relative;
|
||
display: flex;
|
||
width: auto;
|
||
justify-content: center;
|
||
margin-top: -3em;
|
||
margin-bottom: 1em;
|
||
}
|
||
|
||
/* Control buttons +/-: reset to classic absolute positioning */
|
||
:host([theme="gunmalmg"]) .classic-popup-content #vt-control-buttons {
|
||
z-index: 0;
|
||
position: absolute !important;
|
||
display: block !important;
|
||
width: auto;
|
||
justify-content: center;
|
||
padding-bottom: 0.2em;
|
||
left: 90%;
|
||
top: 35%;
|
||
}
|
||
|
||
/* Presets: reset to classic */
|
||
:host([theme="gunmalmg"]) .classic-popup-content #presets {
|
||
z-index: 0;
|
||
position: relative;
|
||
display: flex;
|
||
width: 100%;
|
||
justify-content: center;
|
||
align-items: center;
|
||
margin-top: -1em;
|
||
margin-bottom: 1em;
|
||
flex-direction: row;
|
||
flex-wrap: wrap;
|
||
gap: 0;
|
||
}
|
||
|
||
/* Preset labels: reset to classic style */
|
||
:host([theme="gunmalmg"]) .classic-popup-content .preset-label {
|
||
cursor: pointer;
|
||
user-select: none;
|
||
display: flex;
|
||
position: relative;
|
||
align-items: center;
|
||
justify-content: flex-start;
|
||
overflow: hidden;
|
||
padding: 0 5px;
|
||
outline: 0px;
|
||
height: 48px;
|
||
margin: 0 5px;
|
||
border-radius: 0;
|
||
flex-shrink: initial;
|
||
}
|
||
|
||
/* Preset icon buttons: reset to classic (no gunmalmg pill background) */
|
||
:host([theme="gunmalmg"]) .classic-popup-content .preset-label ha-icon-button {
|
||
--mdc-icon-size: 24px;
|
||
width: auto;
|
||
height: auto;
|
||
border-radius: 100%;
|
||
background: transparent !important;
|
||
border: none !important;
|
||
box-shadow: none !important;
|
||
}
|
||
|
||
/* Reset selected preset icon colors to classic */
|
||
:host([theme="gunmalmg"]) .classic-popup-content .preset-label ha-icon-button.selected-icon {
|
||
background: transparent !important;
|
||
color: var(--label-badge-yellow) !important;
|
||
}
|
||
|
||
/* Timed preset container: force visible */
|
||
:host([theme="gunmalmg"]) .classic-popup-content .timed-preset-container {
|
||
display: flex !important;
|
||
}
|
||
|
||
/* Left infos: reset to classic absolute positioning */
|
||
:host([theme="gunmalmg"]) .classic-popup-content #left-infos {
|
||
z-index: 3;
|
||
position: absolute !important;
|
||
display: block !important;
|
||
width: auto;
|
||
justify-content: center;
|
||
padding-bottom: 0.2em;
|
||
left: 0%;
|
||
top: 15%;
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .classic-popup-content #left-infos.no-presets {
|
||
top: 30%;
|
||
}
|
||
|
||
/* Right lock: align center with +/- buttons */
|
||
:host([theme="gunmalmg"]) .classic-popup-content #right-lock {
|
||
z-index: 0;
|
||
position: absolute;
|
||
left: 86%;
|
||
top: 15%;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
padding-right: 0;
|
||
}
|
||
|
||
/* Disabled circle container fallback (when no slider) */
|
||
:host([theme="gunmalmg"]) .classic-popup-content .disabled-circle-container {
|
||
height: 145px !important;
|
||
background: radial-gradient(var(--hvac-mode-color), transparent 50%) !important;
|
||
}
|
||
|
||
:host([theme="gunmalmg"]) .classic-popup-content .disabled-circle-container.no-background-color {
|
||
background: none !important;
|
||
}
|
||
`,sr=s`
|
||
:host([theme="vtherm"]) ha-card { background: var(--card-background-color); color: var(--primary-text-color); }
|
||
:host([theme="vtherm"]) .vtherm-grid { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 8px; align-items: center; }
|
||
:host([theme="vtherm"]) .vtherm-left { display:flex; justify-content:center; }
|
||
:host([theme="vtherm"]) .vtherm-center { text-align:center; }
|
||
:host([theme="vtherm"]) .vtherm-right { display:flex; justify-content:flex-end; }
|
||
:host([theme="vtherm"]) .more-info { z-index:6 }
|
||
:host([theme="vtherm"]) .theme-menu { background: var(--card-background-color); }
|
||
/* Dim hvac mode and preset icons when locked */
|
||
:host([theme="vtherm"]) ha-card.locked .vtherm-left ha-icon-button,
|
||
:host([theme="vtherm"]) ha-card.locked .vtherm-right ha-icon-button,
|
||
:host([theme="vtherm"]) ha-card.locked .vtherm-right .preset-label {
|
||
opacity: 0.5;
|
||
color: var(--disabled-text-color);
|
||
pointer-events: none;
|
||
}
|
||
`;var rr;let lr=rr=class extends rt{constructor(){super(...arguments),this.hass=null,this.entityId="",this.visible=!1,this.targetTemp=null,this.roomTemp=null,this.regulatedTemp=null,this.extTemp=null,this.powerPercent=null,this._history=[],this._loading=!1,this._chart=null,this._canvas=null,this._chartReady=!1,this._destroyed=!1,this._lastEntityId="",this._initialViewSet=!1}connectedCallback(){super.connectedCallback(),this._destroyed=!1}disconnectedCallback(){super.disconnectedCallback(),this._destroyed=!0,this._destroyChart()}async firstUpdated(){var t;await this._initChart(),this._addLiveDataPoint(),this.entityId&&this.hass&&(this._lastEntityId=this.entityId,await this._fetchHistory()),this.visible&&this._chartReady&&(null===(t=this._chart)||void 0===t||t.resize(),this._updateChart(),this._applyInitialView())}updated(t){if(t.has("visible")&&this.visible&&this._chartReady)return void requestAnimationFrame((()=>{var t;null===(t=this._chart)||void 0===t||t.resize(),this._updateChart(),this._applyInitialView()}));if(t.has("entityId")&&this.entityId&&this.entityId!==this._lastEntityId)return this._lastEntityId=this.entityId,this._history=[],void this._fetchHistory().then((()=>{var t;this._chartReady&&this.visible&&(null===(t=this._chart)||void 0===t||t.resize(),this._updateChart(),this._initialViewSet=!1,this._applyInitialView())}));const e=["targetTemp","roomTemp","regulatedTemp","extTemp","powerPercent"].some((e=>t.has(e)));!e||null===this.targetTemp&&null===this.roomTemp&&null===this.powerPercent||(this._addLiveDataPoint(),this._chartReady&&this.visible&&this._updateChart())}async _fetchHistory(){if(!this.hass||!this.entityId)return;this._loading=!0;const t=new Date,e=`history/period/${new Date(t.getTime()-864e5).toISOString()}?filter_entity_id=${this.entityId}&end_time=${t.toISOString()}&significant_changes_only=false&minimal_response=false`;try{const t=await this.hass.callApi("GET",e);if(!Array.isArray(t)||0===t.length)return;const i=t[0].filter((t=>t.attributes&&t.last_updated)).map((t=>{var e,i,o,n,a,s,r,l,c,d,h,u,m,p,_,g,f,b,v,y,w,x,k;return{timestamp:new Date(t.last_updated).getTime(),targetTemp:null!==(e=t.attributes.temperature)&&void 0!==e?e:null,roomTemp:null!==(i=t.attributes.current_temperature)&&void 0!==i?i:null,regulatedTemp:null!==(l=null!==(s=null===(a=null===(n=null===(o=t.attributes)||void 0===o?void 0:o.vtherm_over_climate)||void 0===n?void 0:n.regulation)||void 0===a?void 0:a.regulated_target_temperature)&&void 0!==s?s:null===(r=t.attributes)||void 0===r?void 0:r.regulated_target_temperature)&&void 0!==l?l:null,extTemp:null!==(h=null===(d=null===(c=t.attributes)||void 0===c?void 0:c.specific_states)||void 0===d?void 0:d.ext_current_temperature)&&void 0!==h?h:null,powerPercent:null!==(k=null!==(v=null!==(g=null!==(m=null===(u=t.attributes)||void 0===u?void 0:u.power_percent)&&void 0!==m?m:null===(_=null===(p=t.attributes)||void 0===p?void 0:p.specific_states)||void 0===_?void 0:_.power_percent)&&void 0!==g?g:null===(b=null===(f=t.attributes)||void 0===f?void 0:f.vtherm_over_switch)||void 0===b?void 0:b.power_percent)&&void 0!==v?v:null===(x=null===(w=null===(y=t.attributes)||void 0===y?void 0:y.vtherm_over_climate)||void 0===w?void 0:w.valve_regulation)||void 0===x?void 0:x.power_percent)&&void 0!==k?k:null}})).filter((t=>null!==t.targetTemp||null!==t.roomTemp)),o=i.length>0?i[i.length-1].timestamp:0,n=this._history.filter((t=>t.timestamp>o));this._history=[...i,...n].slice(-rr.MAX_POINTS)}catch(t){console.error("[VtRegulationChart] History fetch failed:",t)}finally{this._loading=!1}}_addLiveDataPoint(){var t,e;const i=Date.now(),o=this._history[this._history.length-1],n={timestamp:i,targetTemp:this.targetTemp,roomTemp:this.roomTemp,regulatedTemp:null!==(t=this.regulatedTemp)&&void 0!==t?t:null,extTemp:null!==(e=this.extTemp)&&void 0!==e?e:null,powerPercent:this.powerPercent};o&&i-o.timestamp<3e4?this._history=[...this._history.slice(0,-1),n]:this._history=[...this._history,n].slice(-rr.MAX_POINTS)}_resolveColor(t,e){return getComputedStyle(this).getPropertyValue(t).trim()||e}async _initChart(){var t,e;if(!this._destroyed&&(this._canvas=null!==(e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector("canvas"))&&void 0!==e?e:null,this._canvas))try{const[{Chart:t,registerables:e},{default:i}]=await Promise.all([Promise.resolve().then((function(){return r_})),Promise.resolve().then((function(){return pg}))]);if(await Promise.resolve().then((function(){return Ob})),this._destroyed)return;t.register(...e,i);const o=this._resolveColor("--primary-text-color","#e5e5e5"),n=this._resolveColor("--secondary-text-color","#9e9e9e"),a="rgba(128,128,128,0.18)";this._chart=new t(this._canvas,{type:"line",data:{datasets:[{label:"Consigne",data:[],borderColor:"#f9a21f",backgroundColor:"rgba(249,162,31,0.08)",borderWidth:2,pointRadius:0,pointHoverRadius:4,tension:.3,yAxisID:"yTemp"},{label:"Pièce",data:[],borderColor:"#3a9ff2",backgroundColor:"rgba(58,159,242,0.08)",borderWidth:2,pointRadius:0,pointHoverRadius:4,tension:.3,yAxisID:"yTemp"},{label:"Régulée",data:[],borderColor:"#5dd461",backgroundColor:"rgba(93,212,97,0.08)",borderWidth:2,borderDash:[5,4],pointRadius:0,pointHoverRadius:4,tension:.3,yAxisID:"yTemp",hidden:!0},{label:"Ext.",data:[],borderColor:"#a78bfa",backgroundColor:"rgba(167,139,250,0.08)",borderWidth:1.5,borderDash:[3,3],pointRadius:1,pointHoverRadius:4,tension:.3,yAxisID:"yTemp",hidden:!0},{label:"Puissance %",data:[],borderColor:"#f75252",backgroundColor:"rgba(247,82,82,0.12)",borderWidth:1.5,pointRadius:1,pointHoverRadius:4,tension:.3,fill:!0,yAxisID:"yPercent",hidden:!0}]},options:{responsive:!0,maintainAspectRatio:!1,animation:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{display:!0,position:"top",labels:{boxWidth:12,font:{size:10},color:o,padding:8}},tooltip:{enabled:!0,callbacks:{label:t=>{const e=t.parsed.y,i="yPercent"===t.dataset.yAxisID?"%":"°";return null!==e?` ${t.dataset.label}: ${e.toFixed(1)}${i}`:""}}},zoom:{pan:{enabled:!0,mode:"x"},zoom:{wheel:{enabled:!0,speed:.015},pinch:{enabled:!0},mode:"x"},limits:{x:{minRange:6e4}}}},scales:{x:{type:"time",time:{tooltipFormat:"HH:mm:ss",displayFormats:{millisecond:"HH:mm:ss",second:"HH:mm:ss",minute:"HH:mm",hour:"HH:mm",day:"dd/MM"}},grid:{color:a},ticks:{maxTicksLimit:8,color:n,font:{size:10},maxRotation:0}},yTemp:{type:"linear",position:"left",grid:{color:a},ticks:{color:n,font:{size:10},callback:t=>`${t}°`}},yPercent:{type:"linear",position:"right",min:0,max:100,grid:{drawOnChartArea:!1},ticks:{color:"#f75252",font:{size:10},callback:t=>`${t}%`,stepSize:25}}}}}),this._chartReady=!0,this._updateChart()}catch(t){console.error("[VtRegulationChart] Failed to initialise Chart.js:",t)}}_updateChart(){if(!this._chart)return;const t=(t,e)=>t.filter((t=>null!==t[e]&&void 0!==t[e])).map((t=>({x:t.timestamp,y:t[e]}))),e=this._chart.data.datasets;e[0].data=t(this._history,"targetTemp"),e[1].data=t(this._history,"roomTemp"),e[2].data=t(this._history,"regulatedTemp"),e[3].data=t(this._history,"extTemp"),e[4].data=t(this._history,"powerPercent"),e[2].hidden=0===e[2].data.length,e[3].hidden=0===e[3].data.length,e[4].hidden=0===e[4].data.length,this._chart.update("none")}_applyInitialView(){!this._initialViewSet&&this._chart&&(this._initialViewSet=!0,this._zoomTo2h())}_zoomTo2h(){if(!this._chart)return;const t=Date.now();this._chart.zoomScale("x",{min:t-72e5,max:t},"none")}resetZoom(){var t,e;null===(e=null===(t=this._chart)||void 0===t?void 0:t.resetZoom)||void 0===e||e.call(t)}clearHistory(){this._history=[],this._updateChart()}_destroyChart(){this._chart&&(this._chart.destroy(),this._chart=null,this._chartReady=!1)}render(){return B`
|
||
<div class="chart-wrapper">
|
||
${this._loading?B`<div class="chart-loading"></div>`:""}
|
||
<canvas></canvas>
|
||
<div class="zoom-btns">
|
||
<button class="reset-zoom-btn" @click=${()=>this._zoomTo2h()} title="Vue 2 heures">2h</button>
|
||
<button class="reset-zoom-btn" @click=${()=>this.resetZoom()} title="Vue 24 heures">1d</button>
|
||
</div>
|
||
</div>
|
||
`}static get styles(){return s`
|
||
:host {
|
||
display: block;
|
||
width: 100%;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.chart-wrapper {
|
||
position: relative;
|
||
width: 100%;
|
||
height: 180px;
|
||
}
|
||
|
||
canvas {
|
||
display: block;
|
||
width: 100% !important;
|
||
height: 100% !important;
|
||
}
|
||
|
||
.zoom-btns {
|
||
position: absolute;
|
||
top: -4px;
|
||
right: 4px;
|
||
display: flex;
|
||
gap: 4px;
|
||
z-index: 10;
|
||
}
|
||
|
||
.reset-zoom-btn {
|
||
position: static;
|
||
background: var(--secondary-background-color, rgba(0,0,0,0.08));
|
||
border: 1px solid var(--divider-color, #ccc);
|
||
border-radius: 4px;
|
||
cursor: pointer;
|
||
font-size: 12px;
|
||
padding: 2px 6px;
|
||
color: var(--secondary-text-color, #666);
|
||
z-index: 10;
|
||
line-height: 1.4;
|
||
transition: background-color 150ms ease;
|
||
opacity: 0.7;
|
||
}
|
||
|
||
.chart-loading {
|
||
position: absolute;
|
||
top: 50%;
|
||
left: 50%;
|
||
transform: translate(-50%, -50%);
|
||
width: 24px;
|
||
height: 24px;
|
||
border: 3px solid var(--divider-color, rgba(128,128,128,0.3));
|
||
border-top-color: var(--primary-color, #03a9f4);
|
||
border-radius: 50%;
|
||
animation: vt-spin 0.8s linear infinite;
|
||
z-index: 5;
|
||
}
|
||
|
||
@keyframes vt-spin {
|
||
to { transform: translate(-50%, -50%) rotate(360deg); }
|
||
}
|
||
`}};lr.MAX_POINTS=1440,t([ut({attribute:!1})],lr.prototype,"hass",void 0),t([ut({type:String})],lr.prototype,"entityId",void 0),t([ut({type:Boolean})],lr.prototype,"visible",void 0),t([ut({type:Number})],lr.prototype,"targetTemp",void 0),t([ut({type:Number})],lr.prototype,"roomTemp",void 0),t([ut({type:Number})],lr.prototype,"regulatedTemp",void 0),t([ut({type:Number})],lr.prototype,"extTemp",void 0),t([ut({type:Number})],lr.prototype,"powerPercent",void 0),t([mt()],lr.prototype,"_history",void 0),t([mt()],lr.prototype,"_loading",void 0),lr=rr=t([ct("vt-regulation-chart")],lr);const cr={auto:"M18,11V12.5C21.19,12.5 23.09,16.05 21.33,18.71L20.24,17.62C21.06,15.96 19.85,14 18,14V15.5L15.75,13.25L18,11M18,22V20.5C14.81,20.5 12.91,16.95 14.67,14.29L15.76,15.38C14.94,17.04 16.15,19 18,19V17.5L20.25,19.75L18,22M19,3H18V1H16V3H8V1H6V3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H14C13.36,20.45 12.86,19.77 12.5,19H5V8H19V10.59C19.71,10.7 20.39,10.94 21,11.31V5A2,2 0 0,0 19,3Z",heat_cool:"M12,6V9L16,5L12,1V4A8,8 0 0,0 4,12C4,13.57 4.46,15.03 5.24,16.26L6.7,14.8C6.25,13.97 6,13 6,12A6,6 0 0,1 12,6M18.76,7.74L17.3,9.2C17.74,10.04 18,11 18,12A6,6 0 0,1 12,18V15L8,19L12,23V20A8,8 0 0,0 20,12C20,10.43 19.54,8.97 18.76,7.74Z",heat:"M17.66 11.2C17.43 10.9 17.15 10.64 16.89 10.38C16.22 9.78 15.46 9.35 14.82 8.72C13.33 7.26 13 4.85 13.95 3C13 3.23 12.17 3.75 11.46 4.32C8.87 6.4 7.85 10.07 9.07 13.22C9.11 13.32 9.15 13.42 9.15 13.55C9.15 13.77 9 13.97 8.8 14.05C8.57 14.15 8.33 14.09 8.14 13.93C8.08 13.88 8.04 13.83 8 13.76C6.87 12.33 6.69 10.28 7.45 8.64C5.78 10 4.87 12.3 5 14.47C5.06 14.97 5.12 15.47 5.29 15.97C5.43 16.57 5.7 17.17 6 17.7C7.08 19.43 8.95 20.67 10.96 20.92C13.1 21.19 15.39 20.8 17.03 19.32C18.86 17.66 19.5 15 18.56 12.72L18.43 12.46C18.22 12 17.66 11.2 17.66 11.2M14.5 17.5C14.22 17.74 13.76 18 13.4 18.1C12.28 18.5 11.16 17.94 10.5 17.28C11.69 17 12.4 16.12 12.61 15.23C12.78 14.43 12.46 13.77 12.33 13C12.21 12.26 12.23 11.63 12.5 10.94C12.69 11.32 12.89 11.7 13.13 12C13.9 13 15.11 13.44 15.37 14.8C15.41 14.94 15.43 15.08 15.43 15.23C15.46 16.05 15.1 16.95 14.5 17.5H14.5Z",cool:"M20.79,13.95L18.46,14.57L16.46,13.44V10.56L18.46,9.43L20.79,10.05L21.31,8.12L19.54,7.65L20,5.88L18.07,5.36L17.45,7.69L15.45,8.82L13,7.38V5.12L14.71,3.41L13.29,2L12,3.29L10.71,2L9.29,3.41L11,5.12V7.38L8.5,8.82L6.5,7.69L5.92,5.36L4,5.88L4.47,7.65L2.7,8.12L3.22,10.05L5.55,9.43L7.55,10.56V13.45L5.55,14.58L3.22,13.96L2.7,15.89L4.47,16.36L4,18.12L5.93,18.64L6.55,16.31L8.55,15.18L11,16.62V18.88L9.29,20.59L10.71,22L12,20.71L13.29,22L14.7,20.59L13,18.88V16.62L15.5,15.17L17.5,16.3L18.12,18.63L20,18.12L19.53,16.35L21.3,15.88L20.79,13.95M9.5,10.56L12,9.11L14.5,10.56V13.44L12,14.89L9.5,13.44V10.56Z",off:"M16.56,5.44L15.11,6.89C16.84,7.94 18,9.83 18,12A6,6 0 0,1 12,18A6,6 0 0,1 6,12C6,9.83 7.16,7.94 8.88,6.88L7.44,5.44C5.36,6.88 4,9.28 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12C20,9.28 18.64,6.88 16.56,5.44M13,3H11V13H13",fan_only:St,dry:Vt,window_open:Ht,windowBypass:Rt,presence:Ct,motion:$t,eco:"M17,8C8,10 5.9,16.17 3.82,21.34L5.71,22L6.66,19.7C7.14,19.87 7.64,20 8,20C19,20 22,3 22,3C21,5 14,5.25 9,6.25C4,7.25 2,11.5 2,13.5C2,15.5 3.75,17.25 3.75,17.25C7,8 17,8 17,8Z",comfort:"M12.5 7C12.5 5.89 13.39 5 14.5 5H18C19.1 5 20 5.9 20 7V9.16C18.84 9.57 18 10.67 18 11.97V14H12.5V7M6 11.96V14H11.5V7C11.5 5.89 10.61 5 9.5 5H6C4.9 5 4 5.9 4 7V9.15C5.16 9.56 6 10.67 6 11.96M20.66 10.03C19.68 10.19 19 11.12 19 12.12V15H5V12C5 10.9 4.11 10 3 10S1 10.9 1 12V17C1 18.1 1.9 19 3 19V21H5V19H19V21H21V19C22.1 19 23 18.1 23 17V12C23 10.79 21.91 9.82 20.66 10.03Z",boost:"M13.13 22.19L11.5 18.36C13.07 17.78 14.54 17 15.9 16.09L13.13 22.19M5.64 12.5L1.81 10.87L7.91 8.1C7 9.46 6.22 10.93 5.64 12.5M21.61 2.39C21.61 2.39 16.66 .269 11 5.93C8.81 8.12 7.5 10.53 6.65 12.64C6.37 13.39 6.56 14.21 7.11 14.77L9.24 16.89C9.79 17.45 10.61 17.63 11.36 17.35C13.5 16.53 15.88 15.19 18.07 13C23.73 7.34 21.61 2.39 21.61 2.39M14.54 9.46C13.76 8.68 13.76 7.41 14.54 6.63S16.59 5.85 17.37 6.63C18.14 7.41 18.15 8.68 17.37 9.46C16.59 10.24 15.32 10.24 14.54 9.46M8.88 16.53L7.47 15.12L8.88 16.53M6.24 22L9.88 18.36C9.54 18.27 9.21 18.12 8.91 17.91L4.83 22H6.24M2 22H3.41L8.18 17.24L6.76 15.83L2 20.59V22M2 19.17L6.09 15.09C5.88 14.79 5.73 14.47 5.64 14.12L2 17.76V19.17Z",frost:"M14.46 9.41L11 7.38V5.12L12.71 3.41L11.29 2L10 3.29L8.71 2L7.29 3.41L9 5.12V7.38L6.5 8.82L4.5 7.69L3.92 5.36L2 5.88L2.47 7.65L.7 8.12L1.22 10.05L3.55 9.43L5.55 10.56V13.45L3.55 14.58L1.22 13.96L.7 15.89L2.47 16.36L2 18.12L3.93 18.64L4.55 16.31L6.55 15.18L9 16.62V18.88L7.29 20.59L8.71 22L10 20.71L11.29 22L12.7 20.59L11 18.88V16.62L14.46 14.61M7.5 10.56L10 9.11L12.5 10.56V13.44L10 14.89L7.5 13.44M19 5C17.89 5 17 5.89 17 7V13.76C16.36 14.33 16 15.15 16 16C16 17.66 17.34 19 19 19S22 17.66 22 16C22 15.15 21.64 14.33 21 13.77V7C21 5.89 20.11 5 19 5M19 6C19.55 6 20 6.45 20 7V8H18V7C18 6.45 18.45 6 19 6",activity:$t,power:"M12 3L2 12H5V20H19V12H22L12 3M11.5 18V14H9L12.5 7V11H15L11.5 18Z",flashAlert:Mt,temperature:"M15 13V5A3 3 0 0 0 9 5V13A5 5 0 1 0 15 13M12 4A1 1 0 0 1 13 5V8H11V5A1 1 0 0 1 12 4Z",humidity:Vt,ok:vt,thermometerAlert:Ot,none:"M23 17C23 20.31 20.31 23 17 23V21.5C19.5 21.5 21.5 19.5 21.5 17H23M1 7C1 3.69 3.69 1 7 1V2.5C4.5 2.5 2.5 4.5 2.5 7H1M8 4.32L3.41 8.92C.19 12.14 .19 17.37 3.41 20.59S11.86 23.81 15.08 20.59L22.15 13.5C22.64 13.03 22.64 12.24 22.15 11.75C21.66 11.26 20.87 11.26 20.38 11.75L15.96 16.17L15.25 15.46L21.79 8.92C22.28 8.43 22.28 7.64 21.79 7.15S20.5 6.66 20 7.15L14.19 13L13.5 12.27L20.37 5.38C20.86 4.89 20.86 4.1 20.37 3.61S19.09 3.12 18.6 3.61L11.71 10.5L11 9.8L16.5 4.32C17 3.83 17 3.04 16.5 2.55S15.22 2.06 14.73 2.55L7.11 10.17C8.33 11.74 8.22 14 6.78 15.45L6.07 14.74C7.24 13.57 7.24 11.67 6.07 10.5L5.72 10.15L9.79 6.08C10.28 5.59 10.28 4.8 9.79 4.31C9.29 3.83 8.5 3.83 8 4.32Z",auto_regulation_mode:Lt,power_percent:Lt,mean_power_cycle:"M7,2V13H10V22L17,10H13L17,2H7Z",valve_open_percent:"M22 13V21H20V19H16.58C15.81 20.76 14.05 22 12 22S8.19 20.76 7.42 19H4V21H2V13H4V15H7.43C7.93 13.85 8.85 12.93 10 12.42V11H8V9H16V11H14V12.42C15.15 12.93 16.07 13.85 16.57 15H20V13H22M17 2H7C6.45 2 6 2.45 6 3S6.45 4 7 4H10V5H11V8H13V5H14V4H17C17.55 4 18 3.55 18 3S17.55 2 17 2Z",regulated_target_temperature:"M12 14C11.7 13.6 11.4 13.3 11 13V5C11 3.3 9.7 2 8 2S5 3.3 5 5V13C2.8 14.7 2.3 17.8 4 20S8.8 22.7 11 21 13.7 16.2 12 14M9 8H7V5C7 4.5 7.5 4 8 4S9 4.5 9 5V8M18 3H16L12.8 12H14.7L15.4 10H18.6L19.3 12H21.2L18 3M15.8 8.7L17 5L18.2 8.7H15.8Z",auto_fan_mode:"M12.5 2C8.93 2 8.14 5.96 10.13 9.65C9.72 9.97 9.4 10.39 9.21 10.87C8.28 10.68 7.23 10.25 6.73 9.26C5.56 6.89 2 7 2 11.5C2 15.07 5.95 15.85 9.64 13.87C9.96 14.27 10.39 14.59 10.88 14.79C10.68 15.71 10.24 16.75 9.26 17.24C6.9 18.42 7 22 11.5 22C12.31 22 13 21.78 13.5 21.41C13.19 20.67 13 19.86 13 19C13 17.59 13.5 16.3 14.3 15.28C14.17 14.97 14.03 14.65 13.86 14.34C14.26 14 14.57 13.59 14.77 13.11C15.26 13.21 15.78 13.39 16.25 13.67C17.07 13.25 18 13 19 13C20.05 13 21.03 13.27 21.89 13.74C21.95 13.37 22 12.96 22 12.5C22 8.92 18.03 8.13 14.33 10.13C14 9.73 13.59 9.42 13.11 9.22C13.3 8.29 13.74 7.24 14.73 6.75C17.09 5.57 17 2 12.5 2M12 11C12.54 11 13 11.45 13 12C13 12.55 12.54 13 12 13C11.43 13 11 12.55 11 12C11 11.45 11.43 11 12 11M18 15C16.89 15 16 15.9 16 17V23H18V21H20V23H22V17C22 15.9 21.1 15 20 15M18 17H20V19H18Z",auto_fan_mode_off:"M12.5,2C9.64,2 8.57,4.55 9.29,7.47L15,13.16C15.87,13.37 16.81,13.81 17.28,14.73C18.46,17.1 22.03,17 22.03,12.5C22.03,8.92 18.05,8.13 14.35,10.13C14.03,9.73 13.61,9.42 13.13,9.22C13.32,8.29 13.76,7.24 14.75,6.75C17.11,5.57 17,2 12.5,2M3.28,4L2,5.27L4.47,7.73C3.22,7.74 2,8.87 2,11.5C2,15.07 5.96,15.85 9.65,13.87C9.97,14.27 10.4,14.59 10.89,14.79C10.69,15.71 10.25,16.75 9.27,17.24C6.91,18.42 7,22 11.5,22C13.8,22 14.94,20.36 14.94,18.21L18.73,22L20,20.72L3.28,4Z",fan_mode:St,power_sleep:zt,sleep:"M23,12H17V10L20.39,6H17V4H23V6L19.62,10H23V12M15,16H9V14L12.39,10H9V8H15V10L11.62,14H15V16M7,20H1V18L4.39,14H1V12H7V14L3.62,18H7V20Z"},dr="none",hr="off",ur="sleep",mr="auto_fan_none",pr="cooling",_r="heating",gr={auto_fan_none:"None",auto_fan_low:"Low",auto_fan_medium:"Medium",auto_fan_high:"High",auto_fan_turbo:"Turbo"},fr="classic",br="vtherm",vr="gunmalmg";function yr(t){const e=window;e.customCards=e.customCards||[],e.customCards.push(Object.assign(Object.assign({},t),{preview:!0}))}function wr(t){const e=(new Date).getTime()-t.getTime();return Math.floor(e/6e4)}function xr(t,e){const i=Math.round(t*e)/e;return parseFloat(i.toFixed(e))}console.info("%c VersatileThermostatUI-CARD \n%c version: 3.2.0 ","color: orange; font-weight: bold; background: black","color: white; font-weight: bold; background: dimgray"),yr({type:"versatile-thermostat-ui-card",name:"Versatile Thermostat Climate Card",description:"Card for climate entity"});let kr=class extends rt{_highChanged(t){if(this.isUserLocked)return;const e=t.detail.value;if(isNaN(e))return;const i=t.type.replace("-changed","");this.value=Object.assign(Object.assign({},this.value),{[i]:e}),this._selectTargetTemperature=i,this._callService(i)}_highChanging(t){if(this.isUserLocked)return;const e=t.detail.value;if(isNaN(e))return;const i=t.type.replace("-changing","");this.value=Object.assign(Object.assign({},this.value),{[i]:e}),this._selectTargetTemperature=i,this._updateDisplay(),this._vibrate(20)}_callService(t){this.isUserLocked||("high"!==t&&"low"!==t?this.hass.callService("climate","set_temperature",{entity_id:this.stateObj.entity_id,temperature:this.value.value}):this.hass.callService("climate","set_temperature",{entity_id:this.stateObj.entity_id,target_temp_low:this.value.low,target_temp_high:this.value.high}))}_handleButton(t){var e;if(this.isUserLocked)return;const i=t.currentTarget.target,o=t.currentTarget.step,n="high"===i?this.max:this.min;let a=null!==(e=this.value[i])&&void 0!==e?e:n;a+=o,a=Sn(a,this.min,this.max),"high"===i&&null!=this.value.low&&(a=Sn(a,this.value.low,this.max)),"low"===i&&null!=this.value.high&&(a=Sn(a,this.min,this.value.high)),this.value=Object.assign(Object.assign({},this.value),{[i]:a}),this._updateDisplay(),this._vibrate(40),this._debouncedCallService(i)}_handleTempUp(){var t;if(this.isUserLocked)return;const e=this.step||.5;let i="number"==typeof(null===(t=this.value)||void 0===t?void 0:t.value)?this.value.value:this.min;i+=e,i=Math.min(i,this.max),this.value=Object.assign(Object.assign({},this.value),{value:i}),this._callService("value")}_handleTempDown(){var t;if(this.isUserLocked)return;const e=this.step||.5;let i="number"==typeof(null===(t=this.value)||void 0===t?void 0:t.value)?this.value.value:this.min;i-=e,i=Math.max(i,this.min),this.value=Object.assign(Object.assign({},this.value),{value:i}),this._callService("value")}_handleSelectTemp(t){if(this.isUserLocked)return;const e=t.currentTarget.target;this._selectTargetTemperature=e,this._updateDisplay(),this._vibrate(40)}setConfig(t){this._config=Object.assign({tap_action:{action:"toggle"},hold_action:{action:"more-info"}},t),this._gunmalmgPresetScrollDone=!1;const e=this._config&&this._config.theme?this._config.theme:"";this.theme=e,this.theme?this.setAttribute("theme",this.theme):this.setAttribute("theme","classic"),this._config&&this._config.theme&&this.setAttribute("theme",this._config.theme)}_applyThemeOverrides(t){}get effectiveDisableCircle(){return(this._config&&this._config.theme?this._config.theme:"classic")!==fr}get effectiveDisableBackgroundColor(){const t=this._config&&this._config.theme?this._config.theme:"classic";return t!==fr&&t!==br}getCardSize(){return 1}_vibrate(t){try{navigator.vibrate(t)}catch(t){}}_toggleThemeMenu(){this._showThemeMenu=!this._showThemeMenu}_closeThemeMenu(){this._showThemeMenu=!1}_openClassicPopup(){this._hasError&&(this.displayMessages=!0),this._showClassicPopup=!0}_closeClassicPopup(){this._showClassicPopup=!1,this.displayMessages=!1}_renderRegulationChartPanel(){var t,e,i,o,n,a,s,r,l,c,d,h,u,m;return(null===(t=this._config)||void 0===t?void 0:t.show_regulation_chart)?B`
|
||
<div class="regulation-chart-panel">
|
||
<div
|
||
class="regulation-chart-header"
|
||
@click=${()=>{this._regulationChartOpen=!this._regulationChartOpen}}
|
||
>
|
||
<span class="regulation-chart-title">${_n({hass:this.hass,string:"extra_states.regulation_chart_title"})}</span>
|
||
<ha-svg-icon
|
||
class="regulation-chart-chevron"
|
||
.path=${this._regulationChartOpen?wt:xt}
|
||
></ha-svg-icon>
|
||
</div>
|
||
<div class="regulation-chart-body" style=${this._regulationChartOpen?"":"display:none"}>
|
||
<vt-regulation-chart
|
||
.hass=${this.hass}
|
||
.entityId=${null!==(i=null===(e=this._config)||void 0===e?void 0:e.entity)&&void 0!==i?i:""}
|
||
.visible=${this._regulationChartOpen}
|
||
.targetTemp=${null!==(o=this.temperature)&&void 0!==o?o:null}
|
||
.roomTemp=${null!==(n=this.current)&&void 0!==n?n:null}
|
||
.regulatedTemp=${this.regulatedTargetTemperature}
|
||
.extTemp=${null!==(u=null===(h=null===(d=null===(c=null===(s=null===(a=this.hass)||void 0===a?void 0:a.states)||void 0===s?void 0:s[null!==(l=null===(r=this._config)||void 0===r?void 0:r.entity)&&void 0!==l?l:""])||void 0===c?void 0:c.attributes)||void 0===d?void 0:d.specific_states)||void 0===h?void 0:h.ext_current_temperature)&&void 0!==u?u:null}
|
||
.powerPercent=${null!==(m=this.powerPercent)&&void 0!==m?m:null}
|
||
></vt-regulation-chart>
|
||
</div>
|
||
</div>
|
||
`:B``}_renderPresetModificationPanel(){var t;if(!(null===(t=this._config)||void 0===t?void 0:t.allow_preset_modification))return B``;const e=["frost","eco","comfort","boost"],i={frost:_n({hass:this.hass,string:"extra_states.frost"}),eco:_n({hass:this.hass,string:"extra_states.eco"}),comfort:_n({hass:this.hass,string:"extra_states.comfort"}),boost:_n({hass:this.hass,string:"extra_states.boost"})},o=new Map;for(const t of this._presetTempEntities){const e=`${t.mode}_${t.away?"away":"present"}_${t.preset}`;o.set(e,t.entityId)}const n=[{mode:"heat",away:!1,labelKey:"extra_states.preset_row_heat"},{mode:"heat",away:!0,labelKey:"extra_states.preset_row_heat_away"},{mode:"cool",away:!1,labelKey:"extra_states.preset_row_cool"},{mode:"cool",away:!0,labelKey:"extra_states.preset_row_cool_away"}].filter((t=>e.some((e=>o.has(`${t.mode}_${t.away?"away":"present"}_${e}`))))),a=this._presetTempEntities.length>0,s=(t,e,i)=>{var n,a,s,r,l,c,d;const h=`${t}_${e?"away":"present"}_${i}`,u=o.get(h);if(!u)return B`<td class="preset-temp-cell empty">–</td>`;const m=null===(n=this.hass)||void 0===n?void 0:n.states[u],p=m?parseFloat(m.state):null,_=null!==(s=null===(a=null==m?void 0:m.attributes)||void 0===a?void 0:a.step)&&void 0!==s?s:.5,g=null!==(l=null===(r=null==m?void 0:m.attributes)||void 0===r?void 0:r.min)&&void 0!==l?l:7,f=null!==(d=null===(c=null==m?void 0:m.attributes)||void 0===c?void 0:c.max)&&void 0!==d?d:35,b=t=>{const e=Math.round(Math.min(f,Math.max(g,t))/_)*_,i=Math.round(100*e)/100;this.hass.callService("number","set_value",{entity_id:u,value:i})};return B`
|
||
<td class="preset-temp-cell preset-col-${i}">
|
||
<div class="preset-temp-stepper">
|
||
<input
|
||
type="number"
|
||
class="preset-temp-input"
|
||
.value=${null===p||isNaN(p)?"":String(p)}
|
||
step=${_}
|
||
min=${g}
|
||
max=${f}
|
||
@change=${t=>{const e=parseFloat(t.target.value);isNaN(e)||b(e)}}
|
||
/>
|
||
<div class="preset-step-btns">
|
||
<button class="preset-step-btn preset-step-up" @click=${()=>{null===p||isNaN(p)||b(p+_)}}>+</button>
|
||
<button class="preset-step-btn preset-step-down" @click=${()=>{null===p||isNaN(p)||b(p-_)}}>−</button>
|
||
</div>
|
||
</div>
|
||
</td>
|
||
`};return B`
|
||
<div class="preset-mod-panel ${this._isLocked?"locked":""}">
|
||
<div
|
||
class="preset-mod-header"
|
||
@click=${()=>{this._isLocked||(this._presetsPanelOpen=!this._presetsPanelOpen)}}
|
||
title=${_n({hass:this.hass,string:"extra_states.preset_mod_title"})}
|
||
>
|
||
<span class="preset-mod-title">${_n({hass:this.hass,string:"extra_states.preset_mod_title"})}</span>
|
||
<ha-svg-icon
|
||
class="preset-mod-chevron ${this._presetsPanelOpen?"open":""}"
|
||
.path=${this._presetsPanelOpen?wt:xt}
|
||
></ha-svg-icon>
|
||
</div>
|
||
${this._presetsPanelOpen?B`
|
||
<div class="preset-mod-body">
|
||
${a?B`
|
||
<table class="preset-temp-table">
|
||
<thead>
|
||
<tr>
|
||
<th class="preset-temp-row-label"></th>
|
||
${e.map((t=>B`<th class="preset-temp-col-label col-${t}">${i[t]}</th>`))}
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
${n.map((t=>B`
|
||
<tr>
|
||
<td class="preset-temp-row-label">
|
||
${_n({hass:this.hass,string:t.labelKey})}
|
||
</td>
|
||
${e.map((e=>s(t.mode,t.away,e)))}
|
||
</tr>
|
||
`))}
|
||
</tbody>
|
||
</table>
|
||
`:B`
|
||
<div class="preset-mod-empty">
|
||
${_n({hass:this.hass,string:"extra_states.preset_mod_no_entities"})}
|
||
</div>
|
||
`}
|
||
</div>
|
||
`:""}
|
||
</div>
|
||
`}_renderClassicContent(t=!1){var e,i,o,n,a,s,r,l,c,d,h,u,m,p,_,g,f,b,v,y,w,x,k;const T=!t&&this.effectiveDisableCircle,S=!t&&this.effectiveDisableBackgroundColor;this._renderingAsClassic=t;const M=B`
|
||
${this.name.length>0?B`
|
||
<div class="name">${this.name}</div>
|
||
`:""}
|
||
|
||
${(null===(e=this.safety_state)||void 0===e?void 0:e.length)>0&&!this.displayMessages?B`
|
||
<div class="security">
|
||
<ha-icon-button class="alert" .path=${Ot}>
|
||
</ha-icon-button>
|
||
${B`
|
||
${this.safety_state.map((t=>B`<span>${t.name}: ${t.security_msg}</span>`))}
|
||
`}
|
||
</div>
|
||
`:""}
|
||
${this.messages.length>0&&this.displayMessages?B`
|
||
<div class="messages">
|
||
<ha-icon-button class="alert" .path=${this._hasError?yt:At}>
|
||
</ha-icon-button>
|
||
${this.messages.map((t=>B`<span>${t}</span>`))}
|
||
</div>
|
||
`:""}
|
||
|
||
<div title="${this.buildTitle()}" class="${T?"disabled-circle-container":""} ${S?"no-background-color":""} ${this.hvacMode}_${this.hvacAction} ${this._hasWindow?"window_open":""} ${this.overpowering?"overpowering":""}">
|
||
${T?B`
|
||
<!-- No circle configured -->
|
||
`:null!=this.value.low&&null!=this.value.high&&"unavailable"!==(null===(i=this.stateObj)||void 0===i?void 0:i.state)?B`
|
||
<vt-ha-control-circular-slider
|
||
class="${null!==this.safety_state||this.displayMessages?"security_msg":""} ${this._hasWindow?"window_open":""} ${this.overpowering?"overpowering":""} ${this.presence?"presence":""} ${this.motion?"motion":""} ${this._hasWindowByPass?"windowByPass":""} ${(null===(o=this._config)||void 0===o?void 0:o.show_background_gradient_on_active)&&this.isDeviceActive?"with-background-gradient":""}"
|
||
.inactive=${this._hasWindow}
|
||
dual
|
||
.low=${this.value.low}
|
||
.high=${this.value.high}
|
||
.min=${this.min}
|
||
.max=${this.max}
|
||
.step=${this.step}
|
||
.current=${this.current}
|
||
@low-changed=${this._highChanged}
|
||
@low-changing=${this._highChanging}
|
||
@high-changed=${this._highChanged}
|
||
@high-changing=${this._highChanging}
|
||
>
|
||
`:B`
|
||
<vt-ha-control-circular-slider
|
||
class="${null!==this.safety_state||this.displayMessages?"security_msg":""} ${this._hasWindow?"window_open":""} ${this.overpowering?"overpowering":""} ${this.presence?"presence":""} ${this.motion?"motion":""} ${this._hasWindowByPass?"windowByPass":""} ${(null===(n=this._config)||void 0===n?void 0:n.show_background_gradient_on_active)&&this.isDeviceActive?"with-background-gradient":""}"
|
||
.inactive=${this._hasWindow}
|
||
.mode="start"
|
||
@value-changed=${this._highChanged}
|
||
@value-changing=${this._highChanging}
|
||
.value=${this.value.value}
|
||
.current=${this.current}
|
||
step=${this.step}
|
||
min=${this.min}
|
||
max=${this.max}
|
||
>
|
||
`}
|
||
<div class="content${(null===(a=this._config)||void 0===a?void 0:a.disable_presets)?" no-presets":""} ${0==this.name.length?" noname":""} ${null!==this.safety_state||this.displayMessages?" security_msg":""} ${this._hasWindow?" window_open":""} ${this.overpowering?" overpowering":""} ${this.presence?" presence":""} ${this.motion?" motion":""} ${this._hasWindowByPass?" windowByPass":""} " >
|
||
<svg id="main" viewbox="0 0 125 100">
|
||
<g transform="translate(57.5,37) scale(0.35)">
|
||
${this._hasWindowByPass?j`
|
||
<g transform="${this._hasWindowByPass?"translate(-50.25,0)":""}" @click=${this._handleToggleWindowByPass} class="icon-group">
|
||
<rect width="24" height="24" fill="transparent" style="cursor: pointer;"/>
|
||
<path class="window window-by-pass ${this._hasWindowByPass?"active":""}" id="window-by-pass" d=${Rt}/>
|
||
</g>
|
||
`:""}
|
||
${this._hasWindowByPass||!this._hasWindow||(null===(s=this._config)||void 0===s?void 0:s.disable_window)?"":j`
|
||
<g transform="${this._hasWindow&&!(null===(r=this._config)||void 0===r?void 0:r.disable_window)?"translate(-50.25,0)":""}" @click=${this._handleToggleWindowByPass} class="icon-group">
|
||
<rect width="24" height="24" fill="transparent" style="cursor: pointer;"/>
|
||
<path class="window ${this._hasWindow?"active":""}" id="window" d=${Ht}/>
|
||
</g>
|
||
`}
|
||
${this._hasOverpowering&&!(null===(l=this._config)||void 0===l?void 0:l.disable_overpowering)?j`
|
||
<path class="overpowering ${this.overpowering?"active":""}" transform="${this._hasOverpowering&&!(null===(c=this._config)||void 0===c?void 0:c.disable_overpowering)?"translate(-25.25,0)":""}" id="overpowering" d=${Mt} />
|
||
`:""}
|
||
${this._hasPresence?j`
|
||
<path class="presence ${this.presence?"active":""}" transform="${this._hasPresence?"translate(0.25,0)":""}" id="overpowering" d=${Ct} />
|
||
`:""}
|
||
${this._hasAutoStartStop&&!(null===(d=this._config)||void 0===d?void 0:d.disable_autoStartStop)?j`
|
||
<path class="auto-start-stop" transform="${this._hasAutoStartStop&&!(null===(h=this._config)||void 0===h?void 0:h.disable_autoStartStop)?"translate(25.25,0)":""}" id="autoStartStop" d=${zt}/>
|
||
`:""}
|
||
${this._hasMotion?j`
|
||
<path class="motion ${this.motion?"active":""}" transform="${this._hasMotion?"translate(50.25,0)":""}" id="motion" d=${$t} />
|
||
`:""}
|
||
</g>
|
||
|
||
${T?j`
|
||
${this._renderStatusText("62.5","50")}
|
||
${this._renderTemperature(this._display_top,!0,"55","62%",!(null===(u=null==this?void 0:this._config)||void 0===u?void 0:u.set_current_as_main))}
|
||
${this._renderTemperature(this._display_bottom,!1,"90","62%",1==(null===(m=null==this?void 0:this._config)||void 0===m?void 0:m.set_current_as_main))}
|
||
<g class="current-info" transform="translate(100,65)">
|
||
${this._renderHVACAction()}
|
||
</g>
|
||
`:j`
|
||
${this._renderStatusText("62.5","50")}
|
||
${this._renderTemperature(this._display_top,!0,"50%","62%",!(null===(p=null==this?void 0:this._config)||void 0===p?void 0:p.set_current_as_main))}
|
||
<line x1="35" y1="72" x2="90" y2="72" stroke="#e7e7e8" stroke-width="0.5" />
|
||
<g class="current-info" transform="translate(62.5,80)">
|
||
${this._renderTemperature(this._display_bottom,!1,"-5%","0%",1==(null===(_=null==this?void 0:this._config)||void 0===_?void 0:_.set_current_as_main))}
|
||
${this._renderHVACAction()}
|
||
</g>
|
||
`}
|
||
</svg>
|
||
</div>
|
||
${T?"":B`
|
||
</vt-ha-control-circular-slider>`}
|
||
</div>
|
||
<div id="modes" class="${null!==this.safety_state||this.displayMessages?"security_msg":""}">
|
||
${j`
|
||
${this.modes.map((t=>{var e,i,o,n,a,s,r,l;return(null===(e=this._config)||void 0===e?void 0:e.disable_heat)&&"heat"===t||(null===(i=this._config)||void 0===i?void 0:i.disable_auto)&&"auto"===t||(null===(o=this._config)||void 0===o?void 0:o.disable_cool)&&"cool"===t||(null===(n=this._config)||void 0===n?void 0:n.disable_heat_cool)&&"heat_cool"===t||(null===(a=this._config)||void 0===a?void 0:a.disable_dry)&&"dry"===t||(null===(s=this._config)||void 0===s?void 0:s.disable_fan_only)&&"fan_only"===t||(null===(r=this._config)||void 0===r?void 0:r.disable_off)&&"off"===t||(null===(l=this._config)||void 0===l?void 0:l.disable_sleep)&&"sleep"===t?B``:this._renderIcon(t,this.hvacMode)}))}
|
||
`}
|
||
</div>
|
||
${(null===(g=null==this?void 0:this._config)||void 0===g?void 0:g.disable_buttons)?B``:B`
|
||
<div id="vt-control-buttons" class="${null!==this.safety_state||this.displayMessages?"security_msg":""}">
|
||
<div class="button">
|
||
<vt-ha-outlined-icon-button
|
||
.target=${this.target}
|
||
.step=${this.step}
|
||
@click=${this._handleButton}
|
||
>
|
||
<ha-svg-icon .path=${"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"}></ha-svg-icon>
|
||
</vt-ha-outlined-icon-button>
|
||
</div>
|
||
<div class="button">
|
||
<vt-ha-outlined-icon-button
|
||
.target=${this.target}
|
||
.step=${-this.step}
|
||
@click=${this._handleButton}
|
||
>
|
||
<ha-svg-icon .path=${"M19,13H5V11H19V13Z"}></ha-svg-icon>
|
||
</vt-ha-outlined-icon-button>
|
||
</div>
|
||
</div>
|
||
`}
|
||
|
||
${(null===(f=this._config)||void 0===f?void 0:f.disable_presets)?"":B`
|
||
<div id="presets" class="${null!==this.safety_state||this.displayMessages?"security_msg":""}">
|
||
${j`
|
||
${this.presets.map((t=>this._renderPreset(t,this.preset)))}
|
||
`}
|
||
${(null===(b=this._config)||void 0===b?void 0:b.disable_timed_preset)?"":B`
|
||
<div class="timed-preset-container ${this._isLocked?"locked":""}">
|
||
${this.timedPresetActive?B`
|
||
<span class="timed-preset-remaining"
|
||
title="${_n({hass:this.hass,string:"extra_states.cancel_timed_preset"})}"
|
||
@click=${this._handleCancelTimedPreset}>
|
||
${this._formatRemainingTime(this.timedPresetRemainingTime)}
|
||
</span>
|
||
${(null!==(v=this.timedPresetRemainingTime)&&void 0!==v?v:0)<60?B`
|
||
<span class="timed-preset-label">${_n({hass:this.hass,string:"extra_states.minutes"})}</span>
|
||
`:""}
|
||
`:(null===(y=this._config)||void 0===y?void 0:y.use_manual_duration_input)?B`
|
||
<input
|
||
type="number"
|
||
class="timed-preset-input ${this.timedPresetDuration?"active":""}"
|
||
.value=${null!==(w=this.timedPresetDuration)&&void 0!==w?w:""}
|
||
@input=${this._handleTimedPresetDurationChange}
|
||
placeholder="0"
|
||
min="0"
|
||
max="1440"
|
||
title="${_n({hass:this.hass,string:"extra_states.timed_preset_title"})}"
|
||
/>
|
||
<span class="timed-preset-label">${_n({hass:this.hass,string:"extra_states.minutes"})}</span>
|
||
`:B`
|
||
<select
|
||
class="timed-preset-select ${this.timedPresetDuration?"active":""}"
|
||
@change=${this._handleTimedPresetSelectChange}
|
||
title="${_n({hass:this.hass,string:"extra_states.timed_preset_title"})}"
|
||
>
|
||
<option value="" ?selected=${!this.timedPresetDuration}>--</option>
|
||
<option value="15" ?selected=${15===this.timedPresetDuration}>15 ${_n({hass:this.hass,string:"extra_states.minutes"})}</option>
|
||
<option value="30" ?selected=${30===this.timedPresetDuration}>30 ${_n({hass:this.hass,string:"extra_states.minutes"})}</option>
|
||
<option value="60" ?selected=${60===this.timedPresetDuration}>1 h</option>
|
||
<option value="120" ?selected=${120===this.timedPresetDuration}>2 h</option>
|
||
<option value="240" ?selected=${240===this.timedPresetDuration}>4 h</option>
|
||
<option value="480" ?selected=${480===this.timedPresetDuration}>8 h</option>
|
||
<option value="1440" ?selected=${1440===this.timedPresetDuration}>24 h</option>
|
||
</select>
|
||
`}
|
||
</div>
|
||
`}
|
||
</div>
|
||
`}
|
||
|
||
<div id="left-infos" class="${(null===(x=this._config)||void 0===x?void 0:x.disable_presets)?"no-presets":""}">
|
||
${this.isRecalculateScheduled?j`
|
||
${this._renderRecalculateScheduledButton()}
|
||
`:""}
|
||
${this.messages.length>0?j`
|
||
${this._renderMessagesButton()}
|
||
`:""}
|
||
${this._config.autoStartStopEnableEntity&&this._isAutoStartStopConfigured?j`
|
||
${this._renderAutoStartStopEnable()}
|
||
`:""}
|
||
${j`
|
||
${this._externalPowerInfos.map((t=>this._renderPowerInfo(t)))}
|
||
`}
|
||
${j`
|
||
${this.powerInfos.map((t=>this._renderPowerInfo(t)))}
|
||
`}
|
||
${j`
|
||
${this.autoFanInfos.map((t=>this._renderAutoFanInfo(t)))}
|
||
`}
|
||
</div>
|
||
|
||
<div id="right-lock">
|
||
${(null===(k=this._config)||void 0===k?void 0:k.allow_lock_toggle)?B`
|
||
<ha-icon-button
|
||
class="lock-icon ${this._isLocked?"locked":"unlocked"}"
|
||
.path=${this._isLocked?Pt:Et}
|
||
@click=${this._handleLockToggle}
|
||
tabindex="0"
|
||
></ha-icon-button>
|
||
`:""}
|
||
</div>
|
||
<div class="bottom-panels ${this._renderingAsClassic?"in-popup":"in-card"}">
|
||
${this._renderPresetModificationPanel()}
|
||
${this._renderRegulationChartPanel()}
|
||
</div>
|
||
`;return this._renderingAsClassic=!1,M}_applyTheme(t){this._config||(this._config={}),this._config.theme=t,Tn(this,"config-changed",{config:this._config}),this._closeThemeMenu(),this.setAttribute("theme",t),this._applyThemeOverrides(t)}async _menuLockToggle(){var t;if((null===(t=this._config)||void 0===t?void 0:t.entity)&&this.hass&&this.stateObj){if(this._hasLockCode)return this.isLocking=!this._isLocked,this.showDigicodeModal=!0,void(this.enteredCode="");try{this._isLocked?this._isLockConfigured?await this.hass.callService("versatile_thermostat","unlock",{entity_id:this._config.entity}):(this._isLocked=this.isUserLocked=!1,this.requestUpdate()):this._isLockConfigured?await this.hass.callService("versatile_thermostat","lock",{entity_id:this._config.entity}):(this._isLocked=this.isUserLocked=!0,this.requestUpdate())}catch(t){console.error(t)}}}_menuCancelTimedPreset(){this.timedPresetActive&&this._handleCancelTimedPreset()}firstUpdated(t){this._init=!1}shouldUpdate(t){return void 0!==t.has("_config")&&void 0!==t.get("_config")&&(this._hasOverpowering=!1,this._hasWindow=!1,this._hasWindowByPass=!1,this._hasMotion=!1,this._hasPresence=!1,this._hasAutoStartStop=!1,this._isAutoStartStopEnabled=!1,this.humidity=0),void 0!==t.get("hass")&&(this._init=!1),!0}updated(t){var e,i,o;super.updated(t),this._firstRender=!1,"gunmalmg"!==(null===(e=this._config)||void 0===e?void 0:e.theme)||this._gunmalmgPresetScrollDone||requestAnimationFrame((()=>{var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".gunmalmg-presets-scroll"),i=null==e?void 0:e.querySelector(".selected-icon");if(i&&e){this._gunmalmgPresetScrollDone=!0;const t=i.closest(".preset-label")||i,o=t.offsetLeft,n=t.offsetWidth,a=e.clientWidth,s=n,r=Math.max(0,o-(a-n)/2+s);e.scrollLeft=r}})),t.has("showDigicodeModal")&&(this.showDigicodeModal?window.addEventListener("keydown",this._handleKeyDown):window.removeEventListener("keydown",this._handleKeyDown)),null===(o=null===(i=null==this?void 0:this.shadowRoot)||void 0===i?void 0:i.querySelector(".security"))||void 0===o||o.addEventListener("click",(()=>{var t,e,i,o;null===(e=null===(t=null==this?void 0:this.shadowRoot)||void 0===t?void 0:t.querySelector(".security"))||void 0===e||e.remove(),null===(o=null===(i=null==this?void 0:this.shadowRoot)||void 0===i?void 0:i.querySelector(".content"))||void 0===o||o.classList.remove("security_msg"),this._vibrate(2)}))}_willUpdatePower(){let t,e,i;this._externalPowerInfos=[],this._config.powerEntity&&(console.log(`There is a powerEntity ${this._config.powerEntity}`),t=this.hass.states[this._config.powerEntity],e=Number(t.state),i=t.attributes.unit_of_measurement,console.log(`Power found ${e} ${i} for ${name}`)),e&&(console.log("J'ai pushé du power"),this._externalPowerInfos.push({name:"mean_power_cycle",value:e,unit:i,class:"vt-power-color"}))}_classifyPresetEntity(t){const e=t.toLowerCase(),i=/_cool_/.test(e)||e.endsWith("_cool")||/_ac_(away_)?temp$/.test(e),o=e.includes("_away");let n=null;return e.includes("frost")||e.includes("hors_gel")?n="frost":e.includes("eco")?n="eco":e.includes("comfort")?n="comfort":e.includes("boost")&&(n="boost"),n?{entityId:t,preset:n,mode:i?"cool":"heat",away:o}:null}_discoverPresetTempEntities(){var t,e;if(!this.hass||!(null===(t=this._config)||void 0===t?void 0:t.entity))return;const i=this.hass.entities;if(!i)return void console.log("[PresetMod] hass.entities not available");const o=i[this._config.entity];if(!(null==o?void 0:o.device_id))return void console.log(`[PresetMod] No device_id for entity ${this._config.entity}`);const n=o.device_id;console.log(`[PresetMod] device_id=${n}`);const a=[];for(const[t,o]of Object.entries(i)){if(o.device_id!==n)continue;if(!t.startsWith("number."))continue;const i=this.hass.states[t];if(!i)continue;if("temperature"!==(null===(e=i.attributes)||void 0===e?void 0:e.device_class))continue;const s=this._classifyPresetEntity(t);s&&(console.log(`[PresetMod] found entity: ${t} preset=${s.preset} mode=${s.mode} away=${s.away}`),a.push(s))}const s=this._presetTempEntities.map((t=>t.entityId)).join(","),r=a.map((t=>t.entityId)).join(",");s!==r&&(this._presetTempEntities=a)}willUpdate(t){var e,i,o,n,a,s,r,l,c,d,h,u,m,p,_,g,f,b,v,y,w,x,k,T,S,M,D,C,A,P,E,L,$,z,O,V,H,R,I,N,F,W,B,j,U,Y,q,Z,X,K,G,Q,J;if(!this.hass||!this._config||!t.has("hass")&&!t.has("_config"))return;const tt=this._config.entity;this._willUpdatePower(),(null===(e=this._config)||void 0===e?void 0:e.allow_preset_modification)&&this._discoverPresetTempEntities();const et=this.hass.states[tt];if(!et)return void console.log("No state");const it=t.get("hass");if(!it||it.states[tt]!==et){if(!this._config||!this.hass||!this._config.entity)return void console.log("No change return");console.log("Something may have change"),this.stateObj=et;const t=this.stateObj.attributes,e=this.stateObj.state;this._isLockConfigured=!0===(null==t?void 0:t.is_lock_configured),(null==t?void 0:t.lock_manager)&&(this._isLocked=(null===(i=null==t?void 0:t.lock_manager)||void 0===i?void 0:i.is_locked)||!1),this.isUserLocked=this._isLocked&&(!this._isLockConfigured||(null===(o=null==t?void 0:t.lock_manager)||void 0===o?void 0:o.lock_users)||!1),this.isAutomationLocked=this._isLocked&&((null===(n=null==t?void 0:t.lock_manager)||void 0===n?void 0:n.lock_automations)||!1),this._hasLockCode=!0===(null===(a=null==t?void 0:t.lock_manager)||void 0===a?void 0:a.lock_code),console.log(`Lock states. isConfigured:${this._isLockConfigured} isLocked=${this._isLocked} isUserLocked=${this.isUserLocked} isAutomationLocked=${this.isAutomationLocked} hasLockCode=${this._hasLockCode}`),this.name="",this.hvacMode=e||hr,this.hvacAction=null==t?void 0:t.hvac_action,this.preset=null==t?void 0:t.preset_mode,this.modes=(null==t?void 0:t.hvac_modes)?Object.values(t.hvac_modes):[],this.presets=t.preset_modes?Object.values(t.preset_modes):[],this.isSleeping=!0===(null===(s=null==t?void 0:t.specific_states)||void 0===s?void 0:s.is_sleeping),this.powerPercent=(null===(r=null==t?void 0:t.vtherm_over_switch)||void 0===r?void 0:r.power_percent)||(null===(c=null===(l=null==t?void 0:t.vtherm_over_climate)||void 0===l?void 0:l.valve_regulation)||void 0===c?void 0:c.power_percent)||0,void 0===(null===(d=null==t?void 0:t.specific_states)||void 0===d?void 0:d.is_device_active)?(this.isDeviceActive=this.hvacAction==_r||this.hvacAction==pr,console.log(`is_device_active not found value=${this.isDeviceActive}`)):(this.isDeviceActive=!0===(null===(h=null==t?void 0:t.specific_states)||void 0===h?void 0:h.is_device_active),console.log(`is_device_active found value=${this.isDeviceActive}`)),this.temperature=null==t?void 0:t.temperature,this.step=(null===(u=null==t?void 0:t.configuration)||void 0===u?void 0:u.target_temperature_step)||.5,this.min=(null==t?void 0:t.min_temp)||7,this.max=(null==t?void 0:t.max_temp)||35,this.current=(null==t?void 0:t.current_temperature)||0,this.windowState=null===(m=null==t?void 0:t.window_manager)||void 0===m?void 0:m.window_state,this.windowAutoState=null===(p=null==t?void 0:t.window_manager)||void 0===p?void 0:p.window_auto_state,this.humidity=(null==t?void 0:t.humidity)?parseFloat(t.humidity):0,this.overpoweringState=(null===(_=null==t?void 0:t.power_manager)||void 0===_?void 0:_.overpowering_state)||"off",this.presenceState=(null===(g=null==t?void 0:t.presence_manager)||void 0===g?void 0:g.presence_state)||"off",this.motionState=(null===(f=null==t?void 0:t.motion_manager)||void 0===f?void 0:f.motion_state)||"off",this._hasWindowByPass=!0===(null===(b=null==t?void 0:t.window_manager)||void 0===b?void 0:b.is_window_bypass),this.safetyState=(null===(v=null==t?void 0:t.safety_manager)||void 0===v?void 0:v.safety_state)||"off",this.meanCyclePower=(null===(y=null==t?void 0:t.power_manager)||void 0===y?void 0:y.mean_cycle_power)||0,this.valveOpenPercent=(null===(w=null==t?void 0:t.vtherm_over_valve)||void 0===w?void 0:w.valve_open_percent)||(null===(k=null===(x=null==t?void 0:t.vtherm_over_climate_valve)||void 0===x?void 0:x.valve_regulation)||void 0===k?void 0:k.valve_open_percent)||0,this.devicePower=(null===(T=null==t?void 0:t.power_manager)||void 0===T?void 0:T.device_power)||0,this.isRegulated=!0===(null===(S=null==t?void 0:t.vtherm_over_climate)||void 0===S?void 0:S.is_regulated),this.regulatedTargetTemperature=(null===(D=null===(M=null==t?void 0:t.vtherm_over_climate)||void 0===M?void 0:M.regulation)||void 0===D?void 0:D.regulated_target_temperature)||null,this.autoRegulationMode=(null===(A=null===(C=null==t?void 0:t.vtherm_over_climate)||void 0===C?void 0:C.regulation)||void 0===A?void 0:A.auto_regulation_mode)||null,this.currentAutoFanMode=(null===(P=null==t?void 0:t.vtherm_over_climate)||void 0===P?void 0:P.current_auto_fan_mode)||null,this.autoFanMode=(null===(E=null==t?void 0:t.vtherm_over_climate)||void 0===E?void 0:E.auto_fan_mode)||null,this.fanMode=(null==t?void 0:t.fan_mode)||null,this.hvacOffReason=(null===(L=null==t?void 0:t.specific_states)||void 0===L?void 0:L.hvac_off_reason)||null,this.isRecalculateScheduled=(null===($=null==t?void 0:t.specific_states)||void 0===$?void 0:$.is_recalculate_scheduled)||null,this.isOn=!0===(null===(z=null==t?void 0:t.specific_states)||void 0===z?void 0:z.is_on),this.timedPresetActive=!0===(null===(O=null==t?void 0:t.timed_preset_manager)||void 0===O?void 0:O.is_active),this.timedPresetRemainingTime=(null===(V=null==t?void 0:t.timed_preset_manager)||void 0===V?void 0:V.remaining_time_min)||null,this.timedPresetPreset=(null===(H=null==t?void 0:t.timed_preset_manager)||void 0===H?void 0:H.preset)||null;const tt=(null===(R=null==t?void 0:t.requested_state)||void 0===R?void 0:R.hvac_mode)||null;let it=(null===(I=null==t?void 0:t.specific_states)||void 0===I?void 0:I.messages)||[];it&&!Array.isArray(it)&&(it=[it]);const ot=1==(null===(N=null==t?void 0:t.vtherm_over_climate_valve)||void 0===N?void 0:N.have_valve_regulation);if((null===(F=this._config)||void 0===F?void 0:F.disable_name)||(this.name=this._config.name?this._config.name:t.friendly_name),this.hvacMode==hr&&!0===this.isSleeping&&(this.hvacMode=ur),console.log(`Mode is ${this.hvacMode}`),!0===(null==t?void 0:t.is_over_switch)&&this.powerPercent>0&&(this.hvacAction="heat"==tt?_r:pr,console.log(`After hvac_action patch ${this.hvacAction}`)),console.log(`Modes are ${this.modes}`),this.modes.length>1&&this.modes.includes(hr)&&this.modes.sort(((t,e)=>"off"===t?1:"off"===e?-1:t.localeCompare(e))),console.log(`After sort modes are ${this.modes}`),this.presets.length>0&&(this.presets=this.presets.filter((t=>t!=dr&&("cool"!=e||"frost"!=t)))),this.value={value:(null==t?void 0:t.temperature)||0,low:(null==t?void 0:t.target_temp_low)||null,high:(null==t?void 0:t.target_temp_high)||null},"on"===this.windowState||"on"===this.windowAutoState?this._hasWindow=!0:this._hasWindow=!1,"on"===this.overpoweringState?(this._hasOverpowering=!0,this.overpowering=!0):(this._hasOverpowering=!1,this.overpowering=!1),"on"===this.presenceState?(this._hasPresence=!0,this.presence=!0):(this._hasPresence=!1,this.presence=!1),"on"===this.motionState?(this._hasMotion=!0,this.motion=!0):(this._hasMotion=!1,this.motion=!1),"on"!==this.safetyState||(null===(W=null==this?void 0:this._config)||void 0===W?void 0:W.disable_safety_warning))this.safety_state=null;else{if(this.safety_state=[],this.safety_state.push({name:_n({hass:this.hass,string:"extra_states.safety_warning"}),security_msg:_n({hass:this.hass,string:"extra_states.safety_warning_msg"})}),null===(B=t.specific_states)||void 0===B?void 0:B.last_temperature_datetime){let e=wr(new Date(null===(j=t.specific_states)||void 0===j?void 0:j.last_temperature_datetime));e>0&&this.safety_state.push({name:_n({hass:this.hass,string:"extra_states.room_temp"}),security_msg:e+" "+_n({hass:this.hass,string:"extra_states.minutes"})})}if(null===(U=t.specific_states)||void 0===U?void 0:U.last_ext_temperature_datetime){let e=wr(new Date(null===(Y=t.specific_states)||void 0===Y?void 0:Y.last_ext_temperature_datetime));e>0&&this.safety_state.push({name:_n({hass:this.hass,string:"extra_states.outdoor_temp"}),security_msg:e+" "+_n({hass:this.hass,string:"extra_states.minutes"})})}}if(console.log(`Brut messages=${it}`),this.messages=[],this._hasError=!1,this.safety_state)for(const t of this.safety_state)this.messages.push(`${t.name}: ${t.security_msg}`),this._hasError=!0;for(const t of it)this.messages.push(_n({hass:this.hass,string:`extra_states.${t}`}));const nt=null==t?void 0:t.heating_failure_detection_manager,at="on"===(null==nt?void 0:nt.heating_failure_state),st="on"===(null==nt?void 0:nt.cooling_failure_state);if(at&&(this.messages.push(_n({hass:this.hass,string:"extra_states.heating_failure"})),this._hasError=!0),st&&(this.messages.push(_n({hass:this.hass,string:"extra_states.cooling_failure"})),this._hasError=!0),console.log(`Messages=${JSON.stringify(this.messages)}`),this.powerInfos=[],console.log(`MeanCyclePower=${this.meanCyclePower} PowerPercent=${this.powerPercent} ValveOpenPercent=${this.valveOpenPercent} DevicePower=${this.devicePower}`),(null===(q=this._config)||void 0===q?void 0:q.disable_power_infos)||!this.isOn&&!ot?console.log(`No power to disply is_on=${this.isOn} or disabled`):((null==t?void 0:t.is_over_switch)&&(this.meanCyclePower&&!(null===(Z=this._config)||void 0===Z?void 0:Z.powerEntity)&&this.powerInfos.push({name:"mean_power_cycle",value:xr(this.meanCyclePower,1),unit:this.meanCyclePower<7?"kW":"W",class:"vt-power-color"}),this.powerInfos.push({name:"power_percent",value:this.powerPercent,unit:"%",class:"vt-power-color"})),((null==t?void 0:t.is_over_valve)||ot)&&(this.meanCyclePower&&!(null===(X=this._config)||void 0===X?void 0:X.powerEntity)&&this.powerInfos.push({name:"mean_power_cycle",value:xr(this.meanCyclePower,1),unit:this.meanCyclePower<7?"kW":"W",class:"vt-power-color"}),this.powerInfos.push({name:"valve_open_percent",value:this.valveOpenPercent,unit:"%",class:"vt-power-color"})),(null==t?void 0:t.is_over_climate)&&!ot&&(this.devicePower&&!(null===(K=this._config)||void 0===K?void 0:K.powerEntity)&&this.powerInfos.push({name:"mean_power_cycle",value:this.devicePower,unit:this.devicePower<7?"kW":"W",class:"vt-power-color"}),this.isRegulated&&(this.powerInfos.push({name:"regulated_target_temperature",value:this.regulatedTargetTemperature,unit:null===(G=null==t?void 0:t.configuration)||void 0===G?void 0:G.temperature_unit,class:"vt-temp-color"}),this.powerInfos.push({name:"auto_regulation_mode",value:_n({hass:this.hass,string:`extra_states.${this.autoRegulationMode}`}),unit:"",class:"vt-label-color"})))),this.autoFanInfos=[],!(null===(Q=null==this?void 0:this._config)||void 0===Q?void 0:Q.disable_auto_fan_infos)&&(null==t?void 0:t.is_over_climate)&&!ot){const t=this.currentAutoFanMode!=mr?"auto_fan_mode":"auto_fan_mode_off";console.log(`VersatileThermostat UI : auto_fan icon name ${t}`),this.autoFanInfos.push({name:t,value:_n({hass:this.hass,string:`extra_states.${this.currentAutoFanMode}`}),unit:"",class:"vt-label-color"}),this.fanMode&&this.autoFanInfos.push({name:"fan_mode",value:_n({hass:this.hass,string:`extra_states.fan_${this.fanMode}`}),unit:"",class:"vt-label-color"})}this._hasAutoStartStop="hvac_off_auto_start_stop"===this.hvacOffReason,this._isAutoStartStopConfigured=!0===(null==t?void 0:t.is_auto_start_stop_configured),this._isAutoStartStopEnabled=!0===(null===(J=null==t?void 0:t.auto_start_stop_manager)||void 0===J?void 0:J.auto_start_stop_enable),console.log(`_isAutoStartStopConfigured=${this._isAutoStartStopConfigured} _isAutoStartStopEnabled=${this._isAutoStartStopEnabled} hvac_off_reason=${this.hvacOffReason}`),this._updateDisplay()}}_updateDisplay(){var t;(null===(t=null==this?void 0:this._config)||void 0===t?void 0:t.set_current_as_main)?(this._display_bottom=this._getCurrentSetpoint(),this._display_top=this.current):(this._display_bottom=this.current,this._display_top=this._getCurrentSetpoint())}_handleAction(t){this.isUserLocked||(t.currentTarget.mode===ur?this.hass.callService("versatile_thermostat","set_hvac_mode_sleep",{entity_id:this._config.entity}):this.hass.callService("climate","set_hvac_mode",{entity_id:this._config.entity,hvac_mode:t.currentTarget.mode}))}_handleDisplayMessages(){this.displayMessages=!this.displayMessages,this.requestUpdate(),this._vibrate(40)}_handlePreset(t){if(this.isUserLocked)return;this.last_target_temperature=this.temperature;const e=t.currentTarget.preset;this.timedPresetDuration&&this.timedPresetDuration>0?(this.hass.callService("versatile_thermostat","set_timed_preset",{entity_id:this._config.entity,preset:e,duration_minutes:this.timedPresetDuration}),this.timedPresetDuration=null):this.hass.callService("climate","set_preset_mode",{entity_id:this._config.entity,preset_mode:e})}_formatRemainingTime(t){if(null===t||t<=0)return"0";if(t<60)return`${t}`;const e=Math.floor(t/60),i=t%60;return 0===i?`${e}h`:`${e}h${i}`}_handleTimedPresetDurationChange(t){const e=t.target,i=e.value?parseInt(e.value,10):null;this.timedPresetDuration=i&&i>0?i:null}_handleTimedPresetSelectChange(t){const e=t.target,i=e.value?parseInt(e.value,10):null;this.timedPresetDuration=i&&i>0?i:null}_handleCancelTimedPreset(){this.isUserLocked||(console.info("VersatileThermostatUI-CARD canceling timed preset"),this.hass.callService("versatile_thermostat","cancel_timed_preset",{entity_id:this._config.entity}))}_handleClickAutoFanInfo(){if(this.isUserLocked)return;let t=mr;this.currentAutoFanMode==mr&&(t=this.autoFanMode);const e=gr[t];console.info(`VersatileThermostatUI-CARD changing auto_fan_mode to ${t} (mapped=$${e}`),e?this.hass.callService("versatile_thermostat","set_auto_fan_mode",{entity_id:this._config.entity,auto_fan_mode:e}):console.warn(`VersatileThermostatUI-CARD: auto_fan_mode ${t} has no mapping, aborting change.`)}_handleClickAutoStartStopEnable(){if(this.isUserLocked)return;let t=!this._isAutoStartStopEnabled;console.info(`VersatileThermostatUI-CARD changing auto_start_stop_enable to ${t}`),this.hass.callService("switch","toggle",{entity_id:this._config.autoStartStopEnableEntity})}_handleToggleWindowByPass(){if(this.isUserLocked)return;console.log(`_handleToggleWindowByPass called. Current windowByPass is ${this._hasWindowByPass}`);let t=!this._hasWindowByPass;console.info(`VersatileThermostatUI-CARD changing windowByPass to ${t}`),this.hass.callService("versatile_thermostat","set_window_bypass",{entity_id:this._config.entity,window_bypass:t})}_getCurrentSetpoint(){var t,e,i,o,n,a,s,r;return null!==(null===(t=null==this?void 0:this.value)||void 0===t?void 0:t.high)&&null!==(null===(e=null==this?void 0:this.value)||void 0===e?void 0:e.low)?((null===(i=null==this?void 0:this.value)||void 0===i?void 0:i.low)||0)>=this.current?(null===(o=null==this?void 0:this.value)||void 0===o?void 0:o.low)||0:((null===(n=null==this?void 0:this.value)||void 0===n?void 0:n.high)||0)<=this.current?(null===(a=null==this?void 0:this.value)||void 0===a?void 0:a.high)||0:(null===(s=null==this?void 0:this.value)||void 0===s?void 0:s.low)||0:(null===(r=null==this?void 0:this.value)||void 0===r?void 0:r.value)||0}_renderStatusText(t,e){var i;if(!(null===(i=this._config)||void 0===i?void 0:i.show_status_text)||!this.hvacAction)return j``;const o=this.hass.localize(`component.climate.entity_component._.state_attributes.hvac_action.state.${this.hvacAction}`)||this.hvacAction;return j`
|
||
<text class="hvac-action-text-svg ${this.hvacAction}" x="${t}" y="${e}" dominant-baseline="middle" text-anchor="middle">
|
||
${o}
|
||
</text>
|
||
`}_renderHVACAction(){return this.hvacAction&&"off"!==this.hvacAction&&"idle"!==this.hvacAction?"heating"===this.hvacAction?j`<path class="status ${this.isDeviceActive?"active":""}" transform="translate(5,-4) scale(0.25)" fill="#9d9d9d" d="${Dt}" />`:"cooling"===this.hvacAction||"cool"==this.hvacMode?j`<path class="status cooler ${this.isDeviceActive?"active":""}" transform="translate(5,-4) scale(0.25)" fill="#9d9d9d" d="${vt}" />`:j`<path class="status" transform="translate(5,-4) scale(0.25)" fill="#9d9d9d" d="${kt}" />`:B``}_renderHVACActionBadge(){return this.hvacAction&&"off"!==this.hvacAction&&"idle"!==this.hvacAction?"heating"===this.hvacAction?j`<svg viewBox="0 0 24 24" aria-hidden="true"><path d="${Dt}"/></svg>`:"cooling"===this.hvacAction?j`<svg viewBox="0 0 24 24" aria-hidden="true"><path d="${vt}"/></svg>`:j`<svg viewBox="0 0 24 24" aria-hidden="true"><path d="${yt}"/></svg>`:B``}_renderIcon(t,e,i){if(!cr[t])return B``;const o=this.hass.localize(`component.climate.state._.${t}`)||_n({hass:this.hass,string:`extra_states.${t}`});return B`
|
||
<div class="hvac-badge-container">
|
||
<ha-icon-button
|
||
title="${e===t?t:""}"
|
||
class=${bt({"selected-icon":e===t})}
|
||
.mode=${t}
|
||
@click=${i?this._cycleHvacMode:this._handleAction}
|
||
tabindex="0"
|
||
.path=${cr[t]}
|
||
.label=${o}
|
||
></ha-icon-button>
|
||
${(()=>{if(this.theme!==vr||this._renderingAsClassic)return B``;let t="";return this.hvacAction&&"off"!==this.hvacAction&&"idle"!==this.hvacAction?(t="heating"===this.hvacAction?"heating":"cooling"===this.hvacAction?"cooling":"warning",B`<div class="hvac-badge ${t}">${this._renderHVACActionBadge()}</div>`):B``})()}
|
||
</div>
|
||
`}async _cycleHvacMode(){var t;if(!(null===(t=this._config)||void 0===t?void 0:t.entity)||!this.hass)return;const e=Array.isArray(this.modes)&&this.modes.length>0?this.modes:[];if(0===e.length)return;const i=this.hvacMode||"";let o=e.indexOf(i);-1===o&&(o=0);const n=e[(o+1)%e.length];try{n===ur?await this.hass.callService("versatile_thermostat","set_hvac_mode_sleep",{entity_id:this._config.entity}):await this.hass.callService("climate","set_hvac_mode",{entity_id:this._config.entity,hvac_mode:n})}catch(t){console.error(t)}}_renderMessagesButton(){const t=_n({hass:this.hass,string:"extra_states.messages-button"});return B`
|
||
<ha-icon-button
|
||
title="${t}"
|
||
class="messages-button ${this._hasError?"error":""}"
|
||
@click=${this._handleDisplayMessages}
|
||
tabindex="0"
|
||
.path=${this._hasError?yt:At}
|
||
.label=${t}
|
||
>
|
||
</ha-icon-button>
|
||
`}_renderRecalculateScheduledButton(){const t=_n({hass:this.hass,string:"extra_states.recalculation_scheduled"});return B`
|
||
<ha-icon-button
|
||
title="${t}"
|
||
class="messages-button"
|
||
tabindex="0"
|
||
.path=${"M21,10.12H14.22L16.96,7.3C14.23,4.6 9.81,4.5 7.08,7.2C4.35,9.91 4.35,14.28 7.08,17C9.81,19.7 14.23,19.7 16.96,17C18.32,15.65 19,14.08 19,12.1H21C21,14.08 20.12,16.65 18.36,18.39C14.85,21.87 9.15,21.87 5.64,18.39C2.14,14.92 2.11,9.28 5.62,5.81C9.13,2.34 14.76,2.34 18.27,5.81L21,3V10.12M12.5,8V12.25L16,14.33L15.28,15.54L11,13V8H12.5Z"}
|
||
.label=${t}
|
||
>
|
||
</ha-icon-button>
|
||
`}_renderWindowByPassButton(){const t=_n({hass:this.hass,string:"extra_states.window-bypass-button"});return B`
|
||
<ha-icon-button
|
||
title="${t}"
|
||
class="window-bypass-button"
|
||
@click=${this._handleToggleWindowByPass}
|
||
tabindex="0"
|
||
.path=${Rt}
|
||
.label=${t}
|
||
>
|
||
</ha-icon-button>
|
||
`}_renderPreset(t,e){const i=(this.hass.localize(`component.climate.state._.${t}`)||_n({hass:this.hass,string:`extra_states.${t}`}))+"\n"+_n({hass:this.hass,string:"extra_states.change_message"});return B`
|
||
<div class="preset-label preset-${t}">
|
||
<ha-icon-button
|
||
title="${e===t?t:""}"
|
||
class=${bt({"selected-icon":e===t})}
|
||
.preset=${t}
|
||
@click=${this._handlePreset}
|
||
tabindex="0"
|
||
.path=${cr[t]}
|
||
.label=${i}
|
||
>
|
||
</ha-icon-button>
|
||
</div>
|
||
`}_renderPowerInfo(t){const e=this.hass.localize(`component.climate.state._.${t.name}`)||_n({hass:this.hass,string:`extra_states.${t.name}`});return B`
|
||
<div class="left-info-label">
|
||
<span>
|
||
<ha-icon-button
|
||
title="${e}"
|
||
class=${t.class}
|
||
.name=${t.name}
|
||
tabindex="0"
|
||
.path=${cr[t.name]}
|
||
.label=${e}
|
||
>
|
||
</ha-icon-button>
|
||
</span>
|
||
<span>${t.value} ${t.unit}</span>
|
||
</div>
|
||
`}_renderAutoFanInfo(t){const e=(this.hass.localize(`component.climate.state._.${t.name}`)||_n({hass:this.hass,string:`extra_states.${t.name}`}))+"\n"+_n({hass:this.hass,string:"extra_states.toggle_message"});return B`
|
||
<div class="left-info-label">
|
||
<span>
|
||
<ha-icon-button
|
||
title="${e}"
|
||
class=${t.class}
|
||
.name=${t.name}
|
||
@click=${this._handleClickAutoFanInfo}
|
||
tabindex="0"
|
||
.path=${cr[t.name]}
|
||
.label=${e}
|
||
>
|
||
</ha-icon-button>
|
||
</span>
|
||
<span>${t.value} ${t.unit}</span>
|
||
</div>
|
||
`}_renderAutoStartStopEnable(){const t=_n({hass:this.hass,string:"extra_states.auto_start_stop_enable"}),e=_n({hass:this.hass,string:"extra_states.auto_start_stop_label"}),i=this._isAutoStartStopEnabled?"checked":"";return console.log(`checked=${i}`),B`
|
||
<div class="left-info-label" title="${t}">
|
||
<span>
|
||
<input type="checkbox" .checked=${this._isAutoStartStopEnabled} class="auto-start-stop-enable" @click=${this._handleClickAutoStartStopEnable} .label="${t}" name="auto-start-stop-enable">
|
||
</span>
|
||
<span>${e}</span>
|
||
</div>
|
||
`}_handleMoreInfo(){Tn(this,"hass-more-info",{entityId:this._config.entity})}_handleLockToggle(){var t,e;if((null===(t=this._config)||void 0===t?void 0:t.allow_lock_toggle)&&(null===(e=this._config)||void 0===e?void 0:e.entity)&&this.hass&&this.stateObj)if(this._isLocked){if(this._hasLockCode)return this.isLocking=!1,this.showDigicodeModal=!0,void(this.enteredCode="");this._isLockConfigured?this.hass.callService("versatile_thermostat","unlock",{entity_id:this._config.entity}):(this._isLocked=this.isUserLocked=!1,this.requestUpdate())}else{if(this._hasLockCode)return this.isLocking=!0,this.showDigicodeModal=!0,void(this.enteredCode="");this._isLockConfigured?this.hass.callService("versatile_thermostat","lock",{entity_id:this._config.entity}):(this._isLocked=this.isUserLocked=!0,this.requestUpdate())}}_handleKeypadPress(t){this.enteredCode.length<4&&(this.enteredCode+=t,this.codeError=!1,4===this.enteredCode.length&&this._handleValidate())}_handleKeypadClear(){this.enteredCode=this.enteredCode.slice(0,-1),this.codeError=!1}_handleModalClose(){this.showDigicodeModal=!1,this.enteredCode="",this.codeError=!1}async _handleValidate(){if(4===this.enteredCode.length){const t=this.isLocking?"lock":"unlock";try{await this.hass.callService("versatile_thermostat",t,{entity_id:this._config.entity,code:this.enteredCode}),this._handleModalClose()}catch(t){this.codeError=!0,this.enteredCode="",this._vibrate(200)}}else this.codeError=!0,this.enteredCode="",this._vibrate(200)}buildTitle(){var t,e,i;let o="";return this._hasWindow&&!(null===(t=this._config)||void 0===t?void 0:t.disable_window)&&(o+=_n({hass:this.hass,string:"extra_states.window_open"})+"\n"),this._hasWindowByPass&&(o+=_n({hass:this.hass,string:"extra_states.window_bypass"})+"\n"),this._hasOverpowering&&!(null===(e=this._config)||void 0===e?void 0:e.disable_overpowering)&&(o+=_n({hass:this.hass,string:"extra_states.overpowering"})+"\n"),this._hasPresence&&(o+=_n({hass:this.hass,string:"extra_states.presence"})+"\n"),this._hasAutoStartStop&&!(null===(i=this._config)||void 0===i?void 0:i.disable_autoStartStop)&&(o+=_n({hass:this.hass,string:"extra_states.auto_start_stop"})+"\n"),this._hasMotion&&(o+=_n({hass:this.hass,string:"extra_states.motion"})+"\n"),o}_renderTemperature(t,e,i,o,n){var a;let s=76,r=56,l=.2;const c=e?-2:-1,d=e?-5.5:-2;let h;h=t?Mn(t,this.hass.locale,{minimumFractionDigits:1,maximumFractionDigits:1}):this.hass.localize("extra_states.temp_unavailable"),n&&e&&(s=this.effectiveDisableCircle?30:35,r=56,l=.25);const u=e?"temp-main":"temp-secondary";return j`
|
||
${n&&!(null===(a=this._config)||void 0===a?void 0:a.disable_target_icon)?j`
|
||
<path
|
||
class="target-icon"
|
||
transform="translate(${s}, ${r}) scale(${l})"
|
||
fill="var(--primary-text-color)"
|
||
d="${"M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,10.84 21.79,9.69 21.39,8.61L19.79,10.21C19.93,10.8 20,11.4 20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.6,4 13.2,4.07 13.79,4.21L15.4,2.6C14.31,2.21 13.16,2 12,2M19,2L15,6V7.5L12.45,10.05C12.3,10 12.15,10 12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12C14,11.85 14,11.7 13.95,11.55L16.5,9H18L22,5H19V2M12,6A6,6 0 0,0 6,12A6,6 0 0,0 12,18A6,6 0 0,0 18,12H16A4,4 0 0,1 12,16A4,4 0 0,1 8,12A4,4 0 0,1 12,8V6Z"}"
|
||
/>`:""}
|
||
<text class="main-value ${u}" x="${i}" y="${o}" dominant-baseline="middle" text-anchor="middle">
|
||
${j`${h}`}
|
||
<tspan class="uom" dx="${c}" dy="${d}">
|
||
${j`
|
||
${this.hass.config.unit_system.temperature}
|
||
`}
|
||
</tspan>
|
||
</text>
|
||
`}constructor(){super(),this.value={},this._selectTargetTemperature="low",this.current=0,this.humidity=0,this.temperature=0,this.min=7,this.max=35,this.step=.5,this.powerPercent=0,this.meanCyclePower=0,this.valveOpenPercent=0,this.devicePower=0,this.regulatedTargetTemperature=null,this.isOn=!1,this.window=!1,this.windowByPass=!1,this.presence=!1,this.motion=!1,this.overpowering=!1,this.isDeviceActive=!1,this.isSleeping=!1,this.isRegulated=!1,this.isRecalculateScheduled=!1,this.windowState="off",this.windowAutoState="off",this.overpoweringState="off",this.presenceState="off",this.motionState="off",this.safetyState="off",this.status="loading",this.hvacMode=hr,this.hvacAction="idle",this.preset=dr,this.autoRegulationMode="",this.currentAutoFanMode=mr,this.autoFanMode=mr,this.fanMode="",this.hvacOffReason="",this.dragging=!1,this.name="",this.target="value",this._debouncedCallService=((t,e,i=!1)=>{let o;const n=(...n)=>{const a=i&&!o;clearTimeout(o),o=window.setTimeout((()=>{o=void 0,i||t(...n)}),e),a&&t(...n)};return n.cancel=()=>{clearTimeout(o)},n})((t=>this._callService(t)),1e3),this._init=!0,this._firstRender=!0,this._gunmalmgPresetScrollDone=!1,this._ignore=!1,this._hasWindow=!1,this._hasWindowByPass=!1,this._hasPresence=!1,this._hasMotion=!1,this._hasOverpowering=!1,this._hasAutoStartStop=!1,this._isAutoStartStopEnabled=!1,this._isAutoStartStopConfigured=!1,this._isLockConfigured=!1,this._isLocked=!1,this._hasLockCode=!1,this._oldValueMin=0,this._oldValueMax=0,this._display_bottom=0,this._display_top=0,this.modes=[],this.presets=[],this.safety_state={},this.powerInfos=[],this._externalPowerInfos=[],this.autoFanInfos=[],this.messages=[],this.displayMessages=!1,this._hasError=!1,this._renderingAsClassic=!1,this._showThemeMenu=!1,this._showClassicPopup=!1,this.theme="",this.isLocked=!1,this.isUserLocked=!1,this.isAutomationLocked=!1,this.showDigicodeModal=!1,this.enteredCode="",this.codeError=!1,this.isLocking=!1,this.timedPresetDuration=null,this.timedPresetActive=!1,this.timedPresetRemainingTime=null,this.timedPresetPreset=null,this._presetsPanelOpen=!1,this._regulationChartOpen=!1,this._presetTempEntities=[],this._handleKeyDown=t=>{t.key>="0"&&t.key<="9"?this._handleKeypadPress(t.key):"Backspace"===t.key&&this._handleKeypadClear()},this.render=()=>{var t,e,i,o,n;return(null===(t=this._config)||void 0===t?void 0:t.theme)===vr?(console.log("Rendering Gunmalmg theme"),nr(this)):B`
|
||
<ha-card class=${bt({[this.hvacMode]:!0,locked:this.isUserLocked,"has-preset-mod":!!(null===(e=this._config)||void 0===e?void 0:e.allow_preset_modification),"has-regulation-chart":!!(null===(i=this._config)||void 0===i?void 0:i.show_regulation_chart)})}
|
||
>
|
||
${(null===(o=this._config)||void 0===o?void 0:o.disable_menu)?"":B`
|
||
<ha-icon-button
|
||
class="more-info"
|
||
.label=${this.hass.localize("ui.panel.lovelace.cards.show_more_info")}
|
||
.path=${Tt}
|
||
@click=${this._toggleThemeMenu}
|
||
tabindex="0"
|
||
></ha-icon-button>
|
||
${this._showThemeMenu?B`
|
||
<div class="menu-backdrop" @click=${this._closeThemeMenu}></div>
|
||
<div class="theme-menu">
|
||
<div class="theme-menu-header">
|
||
<div class="theme-menu-title" @click=${()=>{this._handleMoreInfo(),this._closeThemeMenu()}}>${_n({hass:this.hass,string:"editor.card.climate.menu_system"})}</div>
|
||
</div>
|
||
<div class="theme-menu-item" style="border-top:1px solid var(--divider-color, #e0e0e0);"></div>
|
||
${""}
|
||
${(null===(n=this._config)||void 0===n?void 0:n.theme)===vr?B`
|
||
<div class="theme-menu-item" @click=${()=>{this._menuLockToggle(),this._closeThemeMenu()}}>
|
||
${this._isLocked?_n({hass:this.hass,string:"extra_states.unlock"}):_n({hass:this.hass,string:"extra_states.lock"})}
|
||
</div>
|
||
${this.timedPresetActive?B`
|
||
<div class="theme-menu-item" @click=${()=>{this._menuCancelTimedPreset(),this._closeThemeMenu()}}>
|
||
${_n({hass:this.hass,string:"extra_states.cancel_timed_preset"})}
|
||
</div>
|
||
`:""}
|
||
`:""}
|
||
<div class="theme-menu-item" @click=${()=>this._applyTheme("classic")}>${_n({hass:this.hass,string:"editor.card.climate.theme_classic"})}</div>
|
||
<div class="theme-menu-item" @click=${()=>this._applyTheme("vtherm")}>${_n({hass:this.hass,string:"editor.card.climate.theme_vtherm"})}</div>
|
||
<div class="theme-menu-item" @click=${()=>this._applyTheme("uncolored")}>${_n({hass:this.hass,string:"editor.card.climate.theme_uncolored"})}</div>
|
||
<div class="theme-menu-item" @click=${()=>this._applyTheme("gunmalmg")}>${_n({hass:this.hass,string:"editor.card.climate.theme_gunmalmg"})}</div>
|
||
</div>
|
||
`:""}
|
||
`}
|
||
|
||
${this._renderClassicContent()}
|
||
|
||
<ha-dialog
|
||
.open=${this.showDigicodeModal}
|
||
@closed=${this._handleModalClose}
|
||
hideActions
|
||
class="digicode-dialog"
|
||
>
|
||
<div class="dialog-content">
|
||
<h2 class="dialog-title">
|
||
${this.isLocking?_n({hass:this.hass,string:"extra_states.lock"}):_n({hass:this.hass,string:"extra_states.unlock"})} ${this.name}
|
||
</h2>
|
||
<div class="code-display ${this.codeError?"error":""}">
|
||
<span class="digit ${this.enteredCode.length>0?"filled":""}"></span>
|
||
<span class="digit ${this.enteredCode.length>1?"filled":""}"></span>
|
||
<span class="digit ${this.enteredCode.length>2?"filled":""}"></span>
|
||
<span class="digit ${this.enteredCode.length>3?"filled":""}"></span>
|
||
</div>
|
||
<div class="error-message ${this.codeError?"visible":""}">
|
||
${_n({hass:this.hass,string:"extra_states.code_error"})}
|
||
</div>
|
||
|
||
<div class="keypad">
|
||
<div class="keypad-row">
|
||
<mwc-button class="keypad-btn" @click=${()=>this._handleKeypadPress("1")}>1</mwc-button>
|
||
<mwc-button class="keypad-btn" @click=${()=>this._handleKeypadPress("2")}>2</mwc-button>
|
||
<mwc-button class="keypad-btn" @click=${()=>this._handleKeypadPress("3")}>3</mwc-button>
|
||
</div>
|
||
<div class="keypad-row">
|
||
<mwc-button class="keypad-btn" @click=${()=>this._handleKeypadPress("4")}>4</mwc-button>
|
||
<mwc-button class="keypad-btn" @click=${()=>this._handleKeypadPress("5")}>5</mwc-button>
|
||
<mwc-button class="keypad-btn" @click=${()=>this._handleKeypadPress("6")}>6</mwc-button>
|
||
</div>
|
||
<div class="keypad-row">
|
||
<mwc-button class="keypad-btn" @click=${()=>this._handleKeypadPress("7")}>7</mwc-button>
|
||
<mwc-button class="keypad-btn" @click=${()=>this._handleKeypadPress("8")}>8</mwc-button>
|
||
<mwc-button class="keypad-btn" @click=${()=>this._handleKeypadPress("9")}>9</mwc-button>
|
||
</div>
|
||
<div class="keypad-row">
|
||
<mwc-button class="keypad-btn spacer" disabled></mwc-button>
|
||
<mwc-button class="keypad-btn" @click=${()=>this._handleKeypadPress("0")}>0</mwc-button>
|
||
<mwc-button class="keypad-btn action-btn clear" @click=${this._handleKeypadClear}><ha-svg-icon .path=${"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12L19,15.59M22,3A2,2 0 0,1 24,5V19A2,2 0 0,1 22,21H7C6.31,21 5.77,20.64 5.41,20.11L0,12L5.41,3.88C5.77,3.35 6.31,3 7,3H22M22,5H7L2.28,12L7,19H22V5Z"}></ha-svg-icon></mwc-button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</ha-dialog>
|
||
</ha-card>
|
||
`}}connectedCallback(){super.connectedCallback(),this._gunmalmgPresetScrollDone=!1}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("keydown",this._handleKeyDown)}static async getConfigElement(){return await Promise.resolve().then((function(){return Bb})),document.createElement("versatile-thermostat-ui-card-editor")}static async getStubConfig(t){const e=Object.keys(t.states).filter((t=>["climate"].includes(t.split(".")[0]))),i=e.filter((e=>{var i;return null===(i=t.states[e].attributes)||void 0===i?void 0:i.specific_states}));return{type:"custom:versatile-thermostat-ui-card",entity:i[0]||e[0]}}};function Tr(t){return t+.5|0}kr.styles=[s`
|
||
:host {
|
||
display: block;
|
||
box-sizing: border-box;
|
||
position: relative;
|
||
container: vt-card / inline-size;
|
||
}
|
||
|
||
ha-card {
|
||
overflow: visible;
|
||
height: 100%;
|
||
width: 100%;
|
||
vertical-align: middle;
|
||
justify-content: center;
|
||
justify-items: center;
|
||
padding-left: 1em;
|
||
padding-right: 1em;
|
||
padding-top: 1.5em;
|
||
box-sizing: border-box;
|
||
position: relative;
|
||
display: flex;
|
||
flex-direction: column;
|
||
flex-wrap: nowrap;
|
||
align-content: center;
|
||
justify-content: center;
|
||
align-items: center;
|
||
}
|
||
|
||
ha-card.locked #modes ha-icon-button,
|
||
ha-card.locked #vt-control-buttons vt-ha-outlined-icon-button,
|
||
ha-card.locked #vt-control-buttons ha-svg-icon,
|
||
ha-card.locked #presets ha-icon-button,
|
||
ha-card.locked #presets .preset-label,
|
||
ha-card.locked vt-ha-control-circular-slider,
|
||
ha-card.locked .left-info-label .auto-start-stop-enable,
|
||
ha-card.locked .left-info-label ha-icon-button {
|
||
opacity: 0.8;
|
||
pointer-events: none;
|
||
}
|
||
|
||
ha-card.locked #presets .preset-label {
|
||
cursor: default !important;
|
||
}
|
||
|
||
.disabled-circle-container{
|
||
height: 145px;
|
||
width: 100%;
|
||
background: radial-gradient(var(--hvac-mode-color), transparent 50%);
|
||
}
|
||
|
||
.disabled-circle-container.no-background-color{
|
||
background: none;
|
||
}
|
||
|
||
vt-ha-outlined-icon-button {
|
||
border: 1px solid var(--secondary-text-color);
|
||
border-radius: 100%;
|
||
padding: 0.5em;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.content.security_msg, vt-ha-control-circular-slider.security_msg, #modes.security_msg, #presets.security_msg, #vt-control-buttons.security_msg {
|
||
opacity: 0.5;
|
||
filter: blur(5px);
|
||
pointer-events: none;
|
||
}
|
||
|
||
|
||
.security, .messages {
|
||
position: absolute;
|
||
display: flex;
|
||
flex-flow: column;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 100%;
|
||
height: 100%;
|
||
box-sizing: border-box;
|
||
left: 0px;
|
||
top: 0px;
|
||
background: rgba(200, 200, 200, 0.16);
|
||
border-radius: var(--ha-card-border-radius,12px);
|
||
border-width: var(--ha-card-border-width,1px);
|
||
border-style: solid;
|
||
border-color: var(--ha-card-border-color,var(--divider-color,#e0e0e0));
|
||
pointer-events: all;
|
||
font-size: 22px;
|
||
text-align: center;
|
||
line-height: 40px;
|
||
padding: 1em;
|
||
--mdc-icon-size: 40px;
|
||
z-index: 2;
|
||
}
|
||
|
||
.messages-button.error {
|
||
color: var(--error-color) !important;
|
||
animation: pulse 2s infinite;
|
||
}
|
||
|
||
|
||
.unavailable {
|
||
opacity: 0.3;
|
||
}
|
||
|
||
.unavailable #bar, .unavailable .main-value, .unavailable #value,.unavailable #current, .unavailable .current-info,
|
||
.unknown #bar, .unknown .main-value, .unknown #value,.unknown #current, .unknown .current-info {
|
||
display: none;
|
||
}
|
||
|
||
.more-info {
|
||
position: absolute;
|
||
cursor: pointer;
|
||
top: 0px;
|
||
right: 0px;
|
||
inset-inline-end: 0px;
|
||
inset-inline-start: initial;
|
||
border-radius: 100%;
|
||
color: var(--secondary-text-color);
|
||
z-index: 3;
|
||
direction: var(--direction);
|
||
}
|
||
.container {
|
||
position: relative;
|
||
width: 100%;
|
||
height: 100%;
|
||
}
|
||
vt-ha-control-circular-slider {
|
||
--primary-color: var(--hvac-mode-color);
|
||
}
|
||
vt-ha-control-circular-slider.with-background-gradient {
|
||
z-index: 0;
|
||
position: relative;
|
||
}
|
||
vt-ha-control-circular-slider.with-background-gradient::before {
|
||
content: "";
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
width: 100%;
|
||
height: 100%;
|
||
background: radial-gradient(circle, var(--hvac-mode-color) 0%, transparent 65%);
|
||
border-radius: 50%;
|
||
opacity: 0.45;
|
||
z-index: -1;
|
||
pointer-events: none;
|
||
}
|
||
|
||
.content {
|
||
position: absolute;
|
||
width: calc(70% - 40px);
|
||
height: calc(70% - 100px);
|
||
box-sizing: border-box;
|
||
border-radius: 100%;
|
||
left: 50%;
|
||
top: calc(50% - 40px);
|
||
text-align: center;
|
||
overflow-wrap: break-word;
|
||
pointer-events: none;
|
||
display: flex;
|
||
align-items: center;
|
||
place-content: center;
|
||
flex-flow: wrap;
|
||
transform: translate(-50%,-50%);
|
||
max-width: 155px;
|
||
}
|
||
.content.no-presets {
|
||
top: calc(60% - 30px);
|
||
}
|
||
|
||
#main {
|
||
transform: scale(2.3);
|
||
}
|
||
|
||
.name {
|
||
display: block;
|
||
width: 100%;
|
||
text-align: center;
|
||
font-size: 20px;
|
||
word-break: keep-all;
|
||
white-space: nowrap;
|
||
text-overflow: ellipsis;
|
||
overflow: hidden;
|
||
}
|
||
svg {
|
||
height: auto;
|
||
margin: auto;
|
||
display: block;
|
||
width: 100%;
|
||
-webkit-backface-visibility: hidden;
|
||
max-width: 233px;
|
||
}
|
||
|
||
path {
|
||
stroke-linecap: round;
|
||
stroke-width: 1;
|
||
}
|
||
|
||
text {
|
||
fill: var(--primary-text-color);
|
||
}
|
||
|
||
/* Temperature display styles */
|
||
.temp-main {
|
||
font-size: 15px;
|
||
}
|
||
.temp-main .uom {
|
||
font-size: 5px;
|
||
}
|
||
.temp-secondary {
|
||
font-size: 6px;
|
||
}
|
||
.temp-secondary .uom {
|
||
font-size: 3px;
|
||
}
|
||
|
||
.auto,
|
||
.heat_cool {
|
||
--hvac-mode-color: var(--state-climate-auto-color);
|
||
}
|
||
.cool {
|
||
--mode-color: var(--label-badge-blue);
|
||
}
|
||
.heat, .heat_cool {
|
||
--mode-color: var(--label-badge-red);
|
||
}
|
||
.manual {
|
||
--mode-color: var(--state-climate-manual-color);
|
||
}
|
||
.off {
|
||
--mode-color: var(--slider-track-color);
|
||
}
|
||
.sleep {
|
||
--mode-color: #2641a3ff !important;
|
||
}
|
||
.fan_only {
|
||
--mode-color: var(--state-climate-fan_only-color);
|
||
}
|
||
.dry {
|
||
--mode-color: var(--state-climate-dry-color);
|
||
}
|
||
.idle {
|
||
--mode-color: var(--state-climate-dry-color);
|
||
}
|
||
.unknown-mode {
|
||
--mode-color: var(--state-unknown-color);
|
||
}
|
||
|
||
.window_open {
|
||
--mode-color: #80a7c4 !important;
|
||
}
|
||
|
||
.overpowering {
|
||
--mode-color: var(--error-color) !important;
|
||
}
|
||
|
||
.heat_heating {
|
||
--hvac-mode-color: var(--label-badge-red);
|
||
}
|
||
|
||
.heat_idle, .heat_off {
|
||
--hvac-mode-color: var(--label-badge-yellow);
|
||
}
|
||
|
||
.cool_cooling {
|
||
--hvac-mode-color: var(--label-badge-blue);
|
||
}
|
||
|
||
.cool_idle {
|
||
--hvac-mode-color:rgb(125, 194, 225);
|
||
}
|
||
|
||
.off_off, .off_idle {
|
||
--hvac-mode-color: var(--slider-track-color);
|
||
}
|
||
|
||
.off_heating {
|
||
--hvac-mode-color: #c7b598ff;
|
||
}
|
||
|
||
.off_cooling {
|
||
--hvac-mode-color: #90acb8ff;
|
||
}
|
||
|
||
|
||
.sleep_off, .sleep_idle {
|
||
--hvac-mode-color: #2641a3ff;
|
||
}
|
||
|
||
#modes {
|
||
z-index: 0;
|
||
position: relative;
|
||
display: flex;
|
||
width: auto;
|
||
justify-content: center;
|
||
margin-top: -3em;
|
||
margin-bottom: 1em;
|
||
}
|
||
|
||
#presets {
|
||
z-index: 0;
|
||
position: relative;
|
||
display: flex;
|
||
width: 100%;
|
||
justify-content: center;
|
||
align-items: center;
|
||
margin-top: -1em;
|
||
margin-bottom: 1em;
|
||
}
|
||
|
||
#presets > * {
|
||
color: var(--disabled-text-color);
|
||
}
|
||
#presets .selected-icon {
|
||
color: var(--label-badge-yellow);
|
||
}
|
||
|
||
.timed-preset-container {
|
||
display: flex;
|
||
align-items: center;
|
||
margin-left: 10px;
|
||
padding-left: 10px;
|
||
border-left: 1px solid var(--divider-color, #e0e0e0);
|
||
}
|
||
|
||
.timed-preset-input {
|
||
width: 30px;
|
||
height: 32px;
|
||
border: 1px solid var(--divider-color, #e0e0e0);
|
||
border-radius: 4px;
|
||
padding: 0 8px;
|
||
font-size: 14px;
|
||
text-align: center;
|
||
background: var(--card-background-color, #fff);
|
||
color: var(--primary-text-color);
|
||
outline: none;
|
||
transition: border-color 0.2s ease;
|
||
}
|
||
|
||
.timed-preset-input:focus {
|
||
border-color: var(--primary-color);
|
||
}
|
||
|
||
.timed-preset-input::-webkit-outer-spin-button,
|
||
.timed-preset-input::-webkit-inner-spin-button {
|
||
-webkit-appearance: none;
|
||
margin: 0;
|
||
}
|
||
|
||
.timed-preset-input[type=number] {
|
||
-moz-appearance: textfield;
|
||
}
|
||
|
||
.timed-preset-label {
|
||
font-size: 12px;
|
||
color: var(--secondary-text-color);
|
||
margin-left: 4px;
|
||
}
|
||
|
||
.timed-preset-input.active {
|
||
border-color: var(--primary-color);
|
||
background: var(--primary-color);
|
||
color: var(--text-primary-color, #fff);
|
||
}
|
||
|
||
.timed-preset-select {
|
||
height: 32px;
|
||
border: 1px solid var(--divider-color, #e0e0e0);
|
||
border-radius: 4px;
|
||
padding: 0 4px;
|
||
font-size: 14px;
|
||
background: var(--card-background-color, #fff);
|
||
color: var(--primary-text-color);
|
||
outline: none;
|
||
cursor: pointer;
|
||
transition: border-color 0.2s ease;
|
||
}
|
||
|
||
.timed-preset-select:focus {
|
||
border-color: var(--primary-color);
|
||
}
|
||
|
||
.timed-preset-select.active {
|
||
border-color: var(--primary-color);
|
||
background: var(--primary-color);
|
||
color: var(--text-primary-color, #fff);
|
||
}
|
||
|
||
.timed-preset-remaining {
|
||
font-size: 16px;
|
||
font-weight: 500;
|
||
color: var(--primary-color);
|
||
min-width: 30px;
|
||
text-align: center;
|
||
cursor: pointer;
|
||
user-select: none;
|
||
border-radius: 8px;
|
||
padding: 2px 6px;
|
||
transition: background-color 200ms ease;
|
||
}
|
||
|
||
.timed-preset-remaining:hover {
|
||
background: rgba(var(--rgb-primary-color, 33, 150, 243), 0.12);
|
||
}
|
||
|
||
/* Timed preset container locked state */
|
||
.timed-preset-container.locked {
|
||
opacity: 0.45;
|
||
pointer-events: none;
|
||
user-select: none;
|
||
}
|
||
|
||
.preset-label {
|
||
cursor: pointer;
|
||
user-select: none;
|
||
-webkit-tap-highlight-color: transparent;
|
||
display: flex;
|
||
position: relative;
|
||
align-items: center;
|
||
justify-content: flex-start;
|
||
overflow: hidden;
|
||
padding-top: 0px;
|
||
padding-bottom: 0px;
|
||
padding-left: 5px;
|
||
padding-right: 5px;
|
||
outline: 0px;
|
||
height: 48px;
|
||
color: var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87));
|
||
margin-left: 5px;
|
||
margin-right: 5px;
|
||
}
|
||
|
||
#left-infos {
|
||
z-index: 3;
|
||
position: absolute;
|
||
display: block;
|
||
width: auto;
|
||
justify-content: center;
|
||
padding-bottom: 0.2em;
|
||
left: 0%;
|
||
top: 15%;
|
||
}
|
||
#left-infos.no-presets {
|
||
top: 30%;
|
||
}
|
||
|
||
#right-lock {
|
||
z-index: 0;
|
||
position: absolute;
|
||
right: 0;
|
||
top: 15%;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: flex-end;
|
||
padding-right: 0.2em;
|
||
}
|
||
|
||
#left-infos > * {
|
||
color: var(--enabled-text-color);
|
||
}
|
||
|
||
.left-info-label {
|
||
-webkit-tap-highlight-color: transparent;
|
||
display: flex;
|
||
position: relative;
|
||
align-items: center;
|
||
justify-content: flex-start;
|
||
overflow: hidden;
|
||
padding: 0px 0px;
|
||
height: 30px;
|
||
}
|
||
|
||
.left-info-label input {
|
||
width: 40px;
|
||
}
|
||
|
||
#vt-control-buttons {
|
||
z-index: 0;
|
||
position: absolute;
|
||
display: block;
|
||
width: auto;
|
||
justify-content: center;
|
||
padding-bottom: 0.2em;
|
||
left: 90%;
|
||
top: 35%;
|
||
}
|
||
|
||
#vt-control-buttons .button {
|
||
z-index: 0;
|
||
position: relative;
|
||
display: flex;
|
||
width: auto;
|
||
justify-content: center;
|
||
margin-bottom: 15px;
|
||
margin-left: -5px;
|
||
}
|
||
|
||
#modes > * {
|
||
color: var(--disabled-text-color);
|
||
cursor: pointer;
|
||
display: inline-block;
|
||
}
|
||
#modes .selected-icon {
|
||
color: var(--mode-color);
|
||
}
|
||
|
||
#shadowpath {
|
||
stroke: #e7e7e8;
|
||
}
|
||
|
||
#value {
|
||
fill: var(--mode-color);
|
||
r: 5;
|
||
z-index: 4 !important;
|
||
transition: r 0.3s ease-in-out, fill 0.6s ease-in-out;
|
||
}
|
||
|
||
#value,#current {
|
||
filter: drop-shadow(0px 0px 1px #000);
|
||
}
|
||
|
||
#value:hover, #value:active, #value:focus, #value.active {
|
||
r: 8 !important;
|
||
}
|
||
|
||
#current {
|
||
pointer-events: none;
|
||
fill: var(--label-badge-grey);
|
||
}
|
||
|
||
.status {
|
||
transition: fill 0.6s ease-in-out, filter 0.6s ease-in-out;
|
||
filter: none;
|
||
}
|
||
.status.active {
|
||
fill: var(--error-color);
|
||
filter: drop-shadow(0px 0px 6px var(--error-color));
|
||
}
|
||
|
||
.status.cooler.active {
|
||
fill: #03A9F4;
|
||
filter: drop-shadow(0px 0px 6px #03A9F4);
|
||
}
|
||
|
||
#bar {
|
||
stroke: var(--mode-color);
|
||
stroke-dasharray: 176;
|
||
stroke-dashoffset: 0;
|
||
transition: stroke-dashoffset 5.1s ease-in-out 0s, stroke 0.6s ease-in-out;
|
||
}
|
||
|
||
#bar.drag {
|
||
transition: none !important;
|
||
}
|
||
#c-minus,#c-plus {
|
||
cursor: pointer;
|
||
}
|
||
.control {
|
||
cursor: pointer;
|
||
pointer-events: none;
|
||
}
|
||
ha-icon-button {
|
||
transition: color 0.6s ease-in-out;
|
||
}
|
||
.eco ha-icon-button[title="heat"], .window_open ha-icon-button[title="heat"], .overpowering ha-icon-button[title="heat"] {
|
||
--mode-color: var(--disabled-text-color);
|
||
}
|
||
|
||
.icon-group {
|
||
cursor: pointer;
|
||
pointer-events: auto;
|
||
}
|
||
|
||
.window {
|
||
transition: fill 0.3s ease;
|
||
fill: var(--warning-color);
|
||
cursor: pointer;
|
||
pointer-events: all;
|
||
}
|
||
|
||
.auto-start-stop {
|
||
transition: fill 0.3s ease;
|
||
fill: var(--state-icon-color);
|
||
}
|
||
|
||
.overpowering {
|
||
transition: fill 0.3s ease;
|
||
fill: var(--error-color);
|
||
}
|
||
.presence {
|
||
transition: fill 0.3s ease;
|
||
fill: var(--success-color);
|
||
}
|
||
.motion {
|
||
transition: fill 0.3s ease;
|
||
fill: var(--info-color);
|
||
}
|
||
|
||
.windowByPass {
|
||
transition: fill 0.3s ease;
|
||
fill: var(--accent-color);
|
||
}
|
||
|
||
.lock-icon {
|
||
--mdc-icon-size: 24px;
|
||
}
|
||
|
||
.lock-icon.locked {
|
||
color: var(--error-color);
|
||
}
|
||
|
||
.lock-icon.unlocked {
|
||
color: var(--success-color);
|
||
}
|
||
|
||
line {
|
||
stroke: var(--disabled-text-color);
|
||
}
|
||
|
||
ha-icon-button[title="eco"] {
|
||
--mode-color: var(--energy-non-fossil-color) !important;
|
||
}
|
||
@container vt-card (max-width: 280px) {
|
||
.content {
|
||
top: calc(50% - 10px);
|
||
}
|
||
}
|
||
@container vt-card (max-width: 255px) {
|
||
#modes {
|
||
margin-top: -2em;
|
||
}
|
||
#presets {
|
||
margin-top: -1em;
|
||
}
|
||
ha-card {
|
||
padding-top: 2em;
|
||
}
|
||
}
|
||
/* Dialog Customization */
|
||
ha-dialog.digicode-dialog {
|
||
--mdc-dialog-min-width: 400px;
|
||
--mdc-dialog-max-width: 450px;
|
||
--mdc-theme-primary: var(--primary-color);
|
||
--mdc-theme-surface: var(--card-background-color);
|
||
}
|
||
|
||
/* Theme menu styles */
|
||
.theme-menu {
|
||
position: absolute;
|
||
right: 8px;
|
||
top: 36px;
|
||
background: var(--card-background-color, #fff);
|
||
border: 1px solid var(--divider-color, #e0e0e0);
|
||
border-radius: 4px;
|
||
box-shadow: 0 2px 10px rgba(0,0,0,0.2);
|
||
z-index: 10;
|
||
min-width: 160px;
|
||
max-height: 60vh;
|
||
overflow-y: auto;
|
||
box-sizing: border-box;
|
||
}
|
||
.theme-menu-header {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
padding: 8px 12px;
|
||
border-bottom: 1px solid var(--divider-color, #e0e0e0);
|
||
}
|
||
.theme-menu-title {
|
||
font-weight: 600;
|
||
cursor: pointer;
|
||
}
|
||
.menu-backdrop {
|
||
position: fixed;
|
||
left: 0;
|
||
top: 0;
|
||
right: 0;
|
||
bottom: 0;
|
||
z-index: 9;
|
||
background: transparent;
|
||
}
|
||
/* theme-menu-close removed: menu header no longer contains a close button */
|
||
.theme-menu-item {
|
||
padding: 8px 12px;
|
||
cursor: pointer;
|
||
}
|
||
.theme-menu-item:hover { background: var(--divider-color, #f1f1f1); }
|
||
|
||
/* Theme variations ------------------------------------------------- */
|
||
:host([theme="classic"]) vt-ha-control-circular-slider { display: block; }
|
||
:host([theme="classic"]) .disabled-circle-container { display: none !important; }
|
||
|
||
:host([theme="vtherm"]) vt-ha-control-circular-slider { display: none !important; }
|
||
:host([theme="vtherm"]) .disabled-circle-container { display: block !important; background: radial-gradient(var(--hvac-mode-color), transparent 50%); }
|
||
|
||
:host([theme="uncolored"]) vt-ha-control-circular-slider { display: none; }
|
||
:host([theme="uncolored"]) .disabled-circle-container { display: block !important; background: none !important; }
|
||
|
||
/* gunmalmg theme rules moved to src/themes/gunmalmg.ts */
|
||
|
||
|
||
.dialog-content {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
padding: 20px 0;
|
||
}
|
||
|
||
.dialog-title {
|
||
margin-top: 0;
|
||
margin-bottom: 40px;
|
||
font-size: 24px;
|
||
font-weight: 400;
|
||
text-align: center;
|
||
}
|
||
|
||
.error-message {
|
||
color: var(--error-color);
|
||
font-size: 14px;
|
||
height: 20px;
|
||
margin-top: 4px;
|
||
margin-bottom: 20px;
|
||
text-align: center;
|
||
opacity: 0;
|
||
transition: opacity 0.2s ease;
|
||
}
|
||
|
||
.error-message.visible {
|
||
opacity: 1;
|
||
}
|
||
|
||
.code-display {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 200px;
|
||
padding: 20px 0;
|
||
border-bottom: 1px solid var(--secondary-text-color);
|
||
}
|
||
|
||
.digit {
|
||
width: 12px;
|
||
height: 12px;
|
||
margin: 0 5px;
|
||
border-radius: 50%;
|
||
background-color: var(--secondary-text-color);
|
||
opacity: 0.3;
|
||
transition: all 0.2s ease;
|
||
}
|
||
|
||
.digit.filled {
|
||
opacity: 1;
|
||
background-color: var(--primary-text-color);
|
||
transform: scale(1.2);
|
||
}
|
||
|
||
.code-display.error {
|
||
animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
|
||
color: var(--error-color);
|
||
}
|
||
|
||
.keypad {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 16px;
|
||
width: 100%;
|
||
max-width: 320px;
|
||
}
|
||
|
||
.keypad-row {
|
||
display: flex;
|
||
justify-content: space-around;
|
||
gap: 16px;
|
||
}
|
||
|
||
.keypad-btn {
|
||
flex: 1;
|
||
--mdc-shape-small: 4px;
|
||
--mdc-typography-button-font-size: 24px;
|
||
--mdc-typography-button-font-weight: 400;
|
||
height: 64px;
|
||
--mdc-theme-primary: var(--primary-text-color);
|
||
--mdc-button-outline-color: transparent;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
.keypad-btn.spacer {
|
||
visibility: hidden;
|
||
pointer-events: none;
|
||
}
|
||
|
||
@keyframes shake {
|
||
10%, 90% { transform: translate3d(-1px, 0, 0); }
|
||
20%, 80% { transform: translate3d(2px, 0, 0); }
|
||
30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
|
||
40%, 60% { transform: translate3d(4px, 0, 0); }
|
||
}
|
||
|
||
ha-card.has-preset-mod {
|
||
padding-bottom: 38px;
|
||
}
|
||
|
||
ha-card.has-regulation-chart {
|
||
padding-bottom: 38px;
|
||
}
|
||
|
||
ha-card.has-preset-mod.has-regulation-chart {
|
||
padding-bottom: 76px;
|
||
}
|
||
|
||
/* When bottom panels are active the card grows (auto-height/masonry layout).
|
||
top: 50% on .content shifts down by half the extra padding — compensate here. */
|
||
ha-card.has-preset-mod .content,
|
||
ha-card.has-regulation-chart .content {
|
||
top: calc(50% - 40px - 19px);
|
||
}
|
||
|
||
ha-card.has-preset-mod.has-regulation-chart .content {
|
||
top: calc(50% - 40px - 38px);
|
||
}
|
||
|
||
ha-card.has-preset-mod .content.no-presets,
|
||
ha-card.has-regulation-chart .content.no-presets {
|
||
top: calc(60% - 30px - 19px);
|
||
}
|
||
|
||
ha-card.has-preset-mod.has-regulation-chart .content.no-presets {
|
||
top: calc(60% - 30px - 38px);
|
||
}
|
||
|
||
/* ── Container commun pour les panneaux du bas ── */
|
||
.bottom-panels.in-card {
|
||
position: absolute;
|
||
bottom: 0;
|
||
left: 0;
|
||
right: 0;
|
||
background: var(--ha-card-background, var(--card-background-color, #fff));
|
||
border-radius: 0 0 var(--ha-card-border-radius, 12px) var(--ha-card-border-radius, 12px);
|
||
z-index: 4;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.bottom-panels.in-popup {
|
||
position: absolute;
|
||
bottom: 0;
|
||
left: 0;
|
||
right: 0;
|
||
background: var(--ha-card-background, var(--card-background-color, #fff));
|
||
border-radius: 0 0 12px 12px;
|
||
z-index: 4;
|
||
overflow: hidden;
|
||
}
|
||
|
||
/* ── Preset modification collapsible panel ── */
|
||
.preset-mod-panel {
|
||
box-sizing: border-box;
|
||
border-top: 1px solid var(--divider-color, #e0e0e0);
|
||
padding: 0 8px;
|
||
}
|
||
|
||
.preset-mod-header {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
cursor: pointer;
|
||
padding: 6px 4px;
|
||
user-select: none;
|
||
color: var(--secondary-text-color);
|
||
}
|
||
|
||
.preset-mod-header:hover {
|
||
color: var(--primary-text-color);
|
||
}
|
||
|
||
.preset-mod-title {
|
||
font-size: 12px;
|
||
font-weight: 500;
|
||
letter-spacing: 0.03em;
|
||
text-transform: uppercase;
|
||
}
|
||
|
||
.preset-mod-chevron {
|
||
--mdc-icon-size: 18px;
|
||
}
|
||
|
||
.preset-mod-chevron.open {
|
||
/* no rotation - icon is swapped directly */
|
||
}
|
||
|
||
.preset-mod-body {
|
||
padding: 4px 0 8px 0;
|
||
animation: fadeIn 0.15s ease;
|
||
}
|
||
|
||
@keyframes fadeIn {
|
||
from { opacity: 0; transform: translateY(-4px); }
|
||
to { opacity: 1; transform: translateY(0); }
|
||
}
|
||
|
||
.preset-mod-empty {
|
||
font-size: 12px;
|
||
color: var(--secondary-text-color);
|
||
text-align: center;
|
||
padding: 8px;
|
||
}
|
||
|
||
.preset-temp-table {
|
||
width: 100%;
|
||
border-collapse: collapse;
|
||
font-size: 12px;
|
||
}
|
||
|
||
.preset-temp-table th,
|
||
.preset-temp-table td {
|
||
padding: 3px 4px;
|
||
text-align: center;
|
||
vertical-align: middle;
|
||
}
|
||
|
||
.preset-temp-col-label {
|
||
font-weight: 600;
|
||
color: var(--secondary-text-color);
|
||
font-size: 11px;
|
||
text-transform: uppercase;
|
||
letter-spacing: 0.04em;
|
||
}
|
||
|
||
.preset-temp-row-label {
|
||
text-align: left !important;
|
||
color: var(--secondary-text-color);
|
||
font-size: 11px;
|
||
white-space: nowrap;
|
||
padding-right: 6px;
|
||
}
|
||
|
||
.preset-temp-cell.empty {
|
||
color: var(--disabled-text-color, #bbb);
|
||
}
|
||
|
||
.preset-temp-input {
|
||
width: 40px;
|
||
padding: 2px 1px;
|
||
border: 1px solid var(--divider-color, #ccc);
|
||
border-right: none;
|
||
border-radius: 4px 0 0 4px;
|
||
background: var(--card-background-color, #fff);
|
||
color: var(--primary-text-color);
|
||
font-size: 13px;
|
||
text-align: center;
|
||
-moz-appearance: textfield;
|
||
height: 40px;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.preset-temp-input::-webkit-outer-spin-button,
|
||
.preset-temp-input::-webkit-inner-spin-button {
|
||
-webkit-appearance: none;
|
||
margin: 0;
|
||
}
|
||
|
||
.preset-temp-input:focus {
|
||
outline: none;
|
||
border-color: var(--primary-color);
|
||
}
|
||
|
||
/* Stepper: input + vertical ± buttons */
|
||
.preset-temp-stepper {
|
||
display: inline-flex;
|
||
flex-direction: row;
|
||
align-items: stretch;
|
||
border-radius: 4px;
|
||
overflow: hidden;
|
||
}
|
||
|
||
/* Vertical stack for + and − */
|
||
.preset-step-btns {
|
||
display: flex;
|
||
flex-direction: column;
|
||
width: 24px;
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.preset-step-btn {
|
||
flex: 1;
|
||
padding: 0;
|
||
border: 1px solid var(--divider-color, #ccc);
|
||
border-left: none;
|
||
background: var(--secondary-background-color, #f5f5f5);
|
||
color: var(--primary-text-color);
|
||
font-size: 14px;
|
||
font-weight: 700;
|
||
cursor: pointer;
|
||
user-select: none;
|
||
line-height: 1;
|
||
transition: background-color 150ms ease;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
min-height: 19px;
|
||
}
|
||
|
||
.preset-step-up {
|
||
border-bottom: 1px solid var(--divider-color, #ccc);
|
||
border-radius: 0 4px 0 0;
|
||
}
|
||
|
||
.preset-step-down {
|
||
border-top: none;
|
||
border-radius: 0 0 4px 0;
|
||
}
|
||
|
||
.preset-step-btn:hover {
|
||
background: var(--primary-color);
|
||
color: white;
|
||
}
|
||
|
||
.preset-step-btn:active {
|
||
opacity: 0.75;
|
||
}
|
||
|
||
/* Column colors */
|
||
.preset-temp-col-label.col-frost { color: #3a9ff2; }
|
||
.preset-temp-col-label.col-eco { color: #5dd461; }
|
||
.preset-temp-col-label.col-comfort { color: #f9a21f; }
|
||
.preset-temp-col-label.col-boost { color: #f75252; }
|
||
|
||
.preset-col-frost .preset-step-btn { background: rgba(58,159,242,0.15); color: #3a9ff2; border-color: rgba(58,159,242,0.4); }
|
||
.preset-col-frost .preset-step-btn:hover { background: #3a9ff2; color: white; }
|
||
.preset-col-frost .preset-step-up { border-bottom-color: rgba(58,159,242,0.4); }
|
||
.preset-col-frost .preset-temp-input { border-color: rgba(58,159,242,0.4); }
|
||
|
||
.preset-col-eco .preset-step-btn { background: rgba(93,212,97,0.15); color: #5dd461; border-color: rgba(93,212,97,0.4); }
|
||
.preset-col-eco .preset-step-btn:hover { background: #5dd461; color: white; }
|
||
.preset-col-eco .preset-step-up { border-bottom-color: rgba(93,212,97,0.4); }
|
||
.preset-col-eco .preset-temp-input { border-color: rgba(93,212,97,0.4); }
|
||
|
||
.preset-col-comfort .preset-step-btn { background: rgba(249,162,31,0.15); color: #f9a21f; border-color: rgba(249,162,31,0.4); }
|
||
.preset-col-comfort .preset-step-btn:hover { background: #f9a21f; color: white; }
|
||
.preset-col-comfort .preset-step-up { border-bottom-color: rgba(249,162,31,0.4); }
|
||
.preset-col-comfort .preset-temp-input { border-color: rgba(249,162,31,0.4); }
|
||
|
||
.preset-col-boost .preset-step-btn { background: rgba(247,82,82,0.15); color: #f75252; border-color: rgba(247,82,82,0.4); }
|
||
.preset-col-boost .preset-step-btn:hover { background: #f75252; color: white; }
|
||
.preset-col-boost .preset-step-up { border-bottom-color: rgba(247,82,82,0.4); }
|
||
.preset-col-boost .preset-temp-input { border-color: rgba(247,82,82,0.4); }
|
||
|
||
/* Preset modification panel locked state */
|
||
.preset-mod-panel.locked {
|
||
opacity: 0.45;
|
||
pointer-events: none;
|
||
user-select: none;
|
||
}
|
||
|
||
/* ── Regulation chart collapsible panel ── */
|
||
.regulation-chart-panel {
|
||
box-sizing: border-box;
|
||
border-top: 1px solid var(--divider-color, #e0e0e0);
|
||
padding: 0 8px;
|
||
}
|
||
|
||
.regulation-chart-header {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
cursor: pointer;
|
||
padding: 6px 4px;
|
||
user-select: none;
|
||
color: var(--secondary-text-color);
|
||
}
|
||
|
||
.regulation-chart-header:hover {
|
||
color: var(--primary-text-color);
|
||
}
|
||
|
||
.regulation-chart-title {
|
||
font-size: 12px;
|
||
font-weight: 500;
|
||
letter-spacing: 0.03em;
|
||
text-transform: uppercase;
|
||
}
|
||
|
||
.regulation-chart-chevron {
|
||
--mdc-icon-size: 18px;
|
||
}
|
||
|
||
.regulation-chart-body {
|
||
padding: 4px 0 8px 0;
|
||
min-height: 60px;
|
||
animation: fadeIn 0.15s ease;
|
||
}
|
||
}
|
||
|
||
@keyframes shake {
|
||
10%, 90% { transform: translate3d(-1px, 0, 0); }
|
||
20%, 80% { transform: translate3d(2px, 0, 0); }
|
||
30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
|
||
40%, 60% { transform: translate3d(4px, 0, 0); }
|
||
}
|
||
|
||
.hvac-action-text-svg {
|
||
text-anchor: middle;
|
||
font-weight: var(--ha-font-weight-light);
|
||
font-size: 6px;
|
||
text-align: center;
|
||
display: -webkit-box;
|
||
-webkit-line-clamp: 2;
|
||
-webkit-box-orient: vertical;
|
||
overflow: hidden;
|
||
line-height: var(--ha-line-height-normal);
|
||
min-height: 1.5em;
|
||
white-space: nowrap;
|
||
filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.8));
|
||
}
|
||
.hvac-action-text-svg.heating {
|
||
fill: var(--hvac-mode-color, #f44336);
|
||
}
|
||
|
||
`,ar,sr],kr.additionalThemeStyles=[sr],t([ut({attribute:!1})],kr.prototype,"hass",void 0),t([ut({type:Number})],kr.prototype,"value",void 0),t([mt()],kr.prototype,"_selectTargetTemperature",void 0),t([ut({type:Number})],kr.prototype,"current",void 0),t([ut({type:Number})],kr.prototype,"humidity",void 0),t([ut({type:Number})],kr.prototype,"temperature",void 0),t([ut({type:Number})],kr.prototype,"min",void 0),t([ut({type:Number})],kr.prototype,"max",void 0),t([ut({type:Number})],kr.prototype,"step",void 0),t([ut({type:Number})],kr.prototype,"powerPercent",void 0),t([ut({type:Number})],kr.prototype,"meanCyclePower",void 0),t([ut({type:Number})],kr.prototype,"valveOpenPercent",void 0),t([ut({type:Number})],kr.prototype,"devicePower",void 0),t([ut({type:Number})],kr.prototype,"regulatedTargetTemperature",void 0),t([ut({type:Boolean})],kr.prototype,"isOn",void 0),t([ut({type:Boolean})],kr.prototype,"window",void 0),t([ut({type:Boolean})],kr.prototype,"windowByPass",void 0),t([ut({type:Boolean})],kr.prototype,"presence",void 0),t([ut({type:Boolean})],kr.prototype,"motion",void 0),t([ut({type:Boolean})],kr.prototype,"overpowering",void 0),t([ut({type:Boolean})],kr.prototype,"isDeviceActive",void 0),t([ut({type:Boolean})],kr.prototype,"isSleeping",void 0),t([ut({type:Boolean})],kr.prototype,"isRegulated",void 0),t([ut({type:Boolean})],kr.prototype,"isRecalculateScheduled",void 0),t([ut({type:String})],kr.prototype,"windowState",void 0),t([ut({type:String})],kr.prototype,"windowAutoState",void 0),t([ut({type:String})],kr.prototype,"overpoweringState",void 0),t([ut({type:String})],kr.prototype,"presenceState",void 0),t([ut({type:String})],kr.prototype,"motionState",void 0),t([ut({type:String})],kr.prototype,"safetyState",void 0),t([ut({type:String})],kr.prototype,"status",void 0),t([ut({type:String})],kr.prototype,"hvacMode",void 0),t([ut({type:String})],kr.prototype,"hvacAction",void 0),t([ut({type:String})],kr.prototype,"preset",void 0),t([ut({type:String})],kr.prototype,"autoRegulationMode",void 0),t([ut({type:String})],kr.prototype,"currentAutoFanMode",void 0),t([ut({type:String})],kr.prototype,"autoFanMode",void 0),t([ut({type:String})],kr.prototype,"fanMode",void 0),t([ut({type:String})],kr.prototype,"hvacOffReason",void 0),t([ut({type:Boolean,reflect:!0})],kr.prototype,"dragging",void 0),t([ut({type:String})],kr.prototype,"name",void 0),t([mt()],kr.prototype,"changingHigh",void 0),t([mt()],kr.prototype,"_hasError",void 0),t([mt()],kr.prototype,"_config",void 0),t([mt()],kr.prototype,"_showThemeMenu",void 0),t([mt()],kr.prototype,"_showClassicPopup",void 0),t([ut({type:String})],kr.prototype,"theme",void 0),t([mt()],kr.prototype,"isLocked",void 0),t([mt()],kr.prototype,"isUserLocked",void 0),t([mt()],kr.prototype,"isAutomationLocked",void 0),t([mt()],kr.prototype,"showDigicodeModal",void 0),t([mt()],kr.prototype,"enteredCode",void 0),t([mt()],kr.prototype,"codeError",void 0),t([mt()],kr.prototype,"isLocking",void 0),t([mt()],kr.prototype,"timedPresetDuration",void 0),t([mt()],kr.prototype,"timedPresetActive",void 0),t([mt()],kr.prototype,"timedPresetRemainingTime",void 0),t([mt()],kr.prototype,"timedPresetPreset",void 0),t([mt()],kr.prototype,"_presetsPanelOpen",void 0),t([mt()],kr.prototype,"_regulationChartOpen",void 0),t([mt()],kr.prototype,"_presetTempEntities",void 0),kr=t([ct("versatile-thermostat-ui-card")],kr);const Sr=(t,e,i)=>Math.max(Math.min(t,i),e);function Mr(t){return Sr(Tr(2.55*t),0,255)}function Dr(t){return Sr(Tr(255*t),0,255)}function Cr(t){return Sr(Tr(t/2.55)/100,0,1)}function Ar(t){return Sr(Tr(100*t),0,100)}const Pr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Er=[..."0123456789ABCDEF"],Lr=t=>Er[15&t],$r=t=>Er[(240&t)>>4]+Er[15&t],zr=t=>(240&t)>>4==(15&t);function Or(t){var e=(t=>zr(t.r)&&zr(t.g)&&zr(t.b)&&zr(t.a))(t)?Lr:$r;return t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0}const Vr=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Hr(t,e,i){const o=e*Math.min(i,1-i),n=(e,n=(e+t/30)%12)=>i-o*Math.max(Math.min(n-3,9-n,1),-1);return[n(0),n(8),n(4)]}function Rr(t,e,i){const o=(o,n=(o+t/60)%6)=>i-i*e*Math.max(Math.min(n,4-n,1),0);return[o(5),o(3),o(1)]}function Ir(t,e,i){const o=Hr(t,1,.5);let n;for(e+i>1&&(n=1/(e+i),e*=n,i*=n),n=0;n<3;n++)o[n]*=1-e-i,o[n]+=e;return o}function Nr(t){const e=t.r/255,i=t.g/255,o=t.b/255,n=Math.max(e,i,o),a=Math.min(e,i,o),s=(n+a)/2;let r,l,c;return n!==a&&(c=n-a,l=s>.5?c/(2-n-a):c/(n+a),r=function(t,e,i,o,n){return t===n?(e-i)/o+(e<i?6:0):e===n?(i-t)/o+2:(t-e)/o+4}(e,i,o,c,n),r=60*r+.5),[0|r,l||0,s]}function Fr(t,e,i,o){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,o)).map(Dr)}function Wr(t,e,i){return Fr(Hr,t,e,i)}function Br(t){return(t%360+360)%360}function jr(t){const e=Vr.exec(t);let i,o=255;if(!e)return;e[5]!==i&&(o=e[6]?Mr(+e[5]):Dr(+e[5]));const n=Br(+e[2]),a=+e[3]/100,s=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return Fr(Ir,t,e,i)}(n,a,s):"hsv"===e[1]?function(t,e,i){return Fr(Rr,t,e,i)}(n,a,s):Wr(n,a,s),{r:i[0],g:i[1],b:i[2],a:o}}const Ur={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Yr={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let qr;function Zr(t){qr||(qr=function(){const t={},e=Object.keys(Yr),i=Object.keys(Ur);let o,n,a,s,r;for(o=0;o<e.length;o++){for(s=r=e[o],n=0;n<i.length;n++)a=i[n],r=r.replace(a,Ur[a]);a=parseInt(Yr[s],16),t[r]=[a>>16&255,a>>8&255,255&a]}return t}(),qr.transparent=[0,0,0,0]);const e=qr[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const Xr=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const Kr=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,Gr=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function Qr(t,e,i){if(t){let o=Nr(t);o[e]=Math.max(0,Math.min(o[e]+o[e]*i,0===e?360:1)),o=Wr(o),t.r=o[0],t.g=o[1],t.b=o[2]}}function Jr(t,e){return t?Object.assign(e||{},t):t}function tl(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=Dr(t[3]))):(e=Jr(t,{r:0,g:0,b:0,a:1})).a=Dr(e.a),e}function el(t){return"r"===t.charAt(0)?function(t){const e=Xr.exec(t);let i,o,n,a=255;if(e){if(e[7]!==i){const t=+e[7];a=e[8]?Mr(t):Sr(255*t,0,255)}return i=+e[1],o=+e[3],n=+e[5],i=255&(e[2]?Mr(i):Sr(i,0,255)),o=255&(e[4]?Mr(o):Sr(o,0,255)),n=255&(e[6]?Mr(n):Sr(n,0,255)),{r:i,g:o,b:n,a:a}}}(t):jr(t)}class il{constructor(t){if(t instanceof il)return t;const e=typeof t;let i;var o,n,a;"object"===e?i=tl(t):"string"===e&&(a=(o=t).length,"#"===o[0]&&(4===a||5===a?n={r:255&17*Pr[o[1]],g:255&17*Pr[o[2]],b:255&17*Pr[o[3]],a:5===a?17*Pr[o[4]]:255}:7!==a&&9!==a||(n={r:Pr[o[1]]<<4|Pr[o[2]],g:Pr[o[3]]<<4|Pr[o[4]],b:Pr[o[5]]<<4|Pr[o[6]],a:9===a?Pr[o[7]]<<4|Pr[o[8]]:255})),i=n||Zr(t)||el(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=Jr(this._rgb);return t&&(t.a=Cr(t.a)),t}set rgb(t){this._rgb=tl(t)}rgbString(){return this._valid?function(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Cr(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}(this._rgb):void 0}hexString(){return this._valid?Or(this._rgb):void 0}hslString(){return this._valid?function(t){if(!t)return;const e=Nr(t),i=e[0],o=Ar(e[1]),n=Ar(e[2]);return t.a<255?`hsla(${i}, ${o}%, ${n}%, ${Cr(t.a)})`:`hsl(${i}, ${o}%, ${n}%)`}(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,o=t.rgb;let n;const a=e===n?.5:e,s=2*a-1,r=i.a-o.a,l=((s*r==-1?s:(s+r)/(1+s*r))+1)/2;n=1-l,i.r=255&l*i.r+n*o.r+.5,i.g=255&l*i.g+n*o.g+.5,i.b=255&l*i.b+n*o.b+.5,i.a=a*i.a+(1-a)*o.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,i){const o=Gr(Cr(t.r)),n=Gr(Cr(t.g)),a=Gr(Cr(t.b));return{r:Dr(Kr(o+i*(Gr(Cr(e.r))-o))),g:Dr(Kr(n+i*(Gr(Cr(e.g))-n))),b:Dr(Kr(a+i*(Gr(Cr(e.b))-a))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new il(this.rgb)}alpha(t){return this._rgb.a=Dr(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=Tr(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Qr(this._rgb,2,t),this}darken(t){return Qr(this._rgb,2,-t),this}saturate(t){return Qr(this._rgb,1,t),this}desaturate(t){return Qr(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=Nr(t);i[0]=Br(i[0]+e),i=Wr(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function ol(){}const nl=(()=>{let t=0;return()=>t++})();function al(t){return null==t}function sl(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function rl(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function ll(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function cl(t,e){return ll(t)?t:e}function dl(t,e){return void 0===t?e:t}const hl=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function ul(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function ml(t,e,i,o){let n,a,s;if(sl(t))if(a=t.length,o)for(n=a-1;n>=0;n--)e.call(i,t[n],n);else for(n=0;n<a;n++)e.call(i,t[n],n);else if(rl(t))for(s=Object.keys(t),a=s.length,n=0;n<a;n++)e.call(i,t[s[n]],s[n])}function pl(t,e){let i,o,n,a;if(!t||!e||t.length!==e.length)return!1;for(i=0,o=t.length;i<o;++i)if(n=t[i],a=e[i],n.datasetIndex!==a.datasetIndex||n.index!==a.index)return!1;return!0}function _l(t){if(sl(t))return t.map(_l);if(rl(t)){const e=Object.create(null),i=Object.keys(t),o=i.length;let n=0;for(;n<o;++n)e[i[n]]=_l(t[i[n]]);return e}return t}function gl(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function fl(t,e,i,o){if(!gl(t))return;const n=e[t],a=i[t];rl(n)&&rl(a)?bl(n,a,o):e[t]=_l(a)}function bl(t,e,i){const o=sl(e)?e:[e],n=o.length;if(!rl(t))return t;const a=(i=i||{}).merger||fl;let s;for(let e=0;e<n;++e){if(s=o[e],!rl(s))continue;const n=Object.keys(s);for(let e=0,o=n.length;e<o;++e)a(n[e],t,s,i)}return t}function vl(t,e){return bl(t,e,{merger:yl})}function yl(t,e,i){if(!gl(t))return;const o=e[t],n=i[t];rl(o)&&rl(n)?vl(o,n):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=_l(n))}const wl={"":t=>t,x:t=>t.x,y:t=>t.y};function xl(t,e){const i=wl[e]||(wl[e]=function(t){const e=function(t){const e=t.split("."),i=[];let o="";for(const t of e)o+=t,o.endsWith("\\")?o=o.slice(0,-1)+".":(i.push(o),o="");return i}(t);return t=>{for(const i of e){if(""===i)break;t=t&&t[i]}return t}}(e));return i(t)}function kl(t){return t.charAt(0).toUpperCase()+t.slice(1)}const Tl=t=>void 0!==t,Sl=t=>"function"==typeof t,Ml=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0};const Dl=Math.PI,Cl=2*Dl,Al=Cl+Dl,Pl=Number.POSITIVE_INFINITY,El=Dl/180,Ll=Dl/2,$l=Dl/4,zl=2*Dl/3,Ol=Math.log10,Vl=Math.sign;function Hl(t,e,i){return Math.abs(t-e)<i}function Rl(t){const e=Math.round(t);t=Hl(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(Ol(t))),o=t/i;return(o<=1?1:o<=2?2:o<=5?5:10)*i}function Il(t){return!function(t){return"symbol"==typeof t||"object"==typeof t&&null!==t&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function Nl(t,e,i){let o,n,a;for(o=0,n=t.length;o<n;o++)a=t[o][i],isNaN(a)||(e.min=Math.min(e.min,a),e.max=Math.max(e.max,a))}function Fl(t){return t*(Dl/180)}function Wl(t){return t*(180/Dl)}function Bl(t){if(!ll(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i}function jl(t,e){const i=e.x-t.x,o=e.y-t.y,n=Math.sqrt(i*i+o*o);let a=Math.atan2(o,i);return a<-.5*Dl&&(a+=Cl),{angle:a,distance:n}}function Ul(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Yl(t,e){return(t-e+Al)%Cl-Dl}function ql(t){return(t%Cl+Cl)%Cl}function Zl(t,e,i,o){const n=ql(t),a=ql(e),s=ql(i),r=ql(a-n),l=ql(s-n),c=ql(n-a),d=ql(n-s);return n===a||n===s||o&&a===s||r>l&&c<d}function Xl(t,e,i){return Math.max(e,Math.min(i,t))}function Kl(t,e,i,o=1e-6){return t>=Math.min(e,i)-o&&t<=Math.max(e,i)+o}function Gl(t,e,i){i=i||(i=>t[i]<e);let o,n=t.length-1,a=0;for(;n-a>1;)o=a+n>>1,i(o)?a=o:n=o;return{lo:a,hi:n}}const Ql=(t,e,i,o)=>Gl(t,i,o?o=>{const n=t[o][e];return n<i||n===i&&t[o+1][e]===i}:o=>t[o][e]<i),Jl=(t,e,i)=>Gl(t,i,(o=>t[o][e]>=i));const tc=["push","pop","shift","splice","unshift"];function ec(t,e){const i=t._chartjs;if(!i)return;const o=i.listeners,n=o.indexOf(e);-1!==n&&o.splice(n,1),o.length>0||(tc.forEach((e=>{delete t[e]})),delete t._chartjs)}function ic(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const oc="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function nc(t,e){let i=[],o=!1;return function(...n){i=n,o||(o=!0,oc.call(window,(()=>{o=!1,t.apply(e,i)})))}}const ac=t=>"start"===t?"left":"end"===t?"right":"center",sc=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function rc(t,e,i){const o=e.length;let n=0,a=o;if(t._sorted){const{iScale:s,vScale:r,_parsed:l}=t,c=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,d=s.axis,{min:h,max:u,minDefined:m,maxDefined:p}=s.getUserBounds();if(m){if(n=Math.min(Ql(l,d,h).lo,i?o:Ql(e,d,s.getPixelForValue(h)).lo),c){const t=l.slice(0,n+1).reverse().findIndex((t=>!al(t[r.axis])));n-=Math.max(0,t)}n=Xl(n,0,o-1)}if(p){let t=Math.max(Ql(l,s.axis,u,!0).hi+1,i?0:Ql(e,d,s.getPixelForValue(u),!0).hi+1);if(c){const e=l.slice(t-1).findIndex((t=>!al(t[r.axis])));t+=Math.max(0,e)}a=Xl(t,n,o)-n}else a=o-n}return{start:n,count:a}}function lc(t){const{xScale:e,yScale:i,_scaleRanges:o}=t,n={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!o)return t._scaleRanges=n,!0;const a=o.xmin!==e.min||o.xmax!==e.max||o.ymin!==i.min||o.ymax!==i.max;return Object.assign(o,n),a}const cc=t=>0===t||1===t,dc=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*Cl/i),hc=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*Cl/i)+1,uc={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*Ll),easeOutSine:t=>Math.sin(t*Ll),easeInOutSine:t=>-.5*(Math.cos(Dl*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>cc(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>cc(t)?t:dc(t,.075,.3),easeOutElastic:t=>cc(t)?t:hc(t,.075,.3),easeInOutElastic(t){const e=.1125;return cc(t)?t:t<.5?.5*dc(2*t,e,.45):.5+.5*hc(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-uc.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*uc.easeInBounce(2*t):.5*uc.easeOutBounce(2*t-1)+.5};function mc(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function pc(t){return mc(t)?t:new il(t)}function _c(t){return mc(t)?t:new il(t).saturate(.5).darken(.1).hexString()}const gc=["x","y","borderWidth","radius","tension"],fc=["color","borderColor","backgroundColor"];const bc=new Map;function vc(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let o=bc.get(i);return o||(o=new Intl.NumberFormat(t,e),bc.set(i,o)),o}(e,i).format(t)}const yc={values:t=>sl(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const o=this.chart.options.locale;let n,a=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(n="scientific"),a=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const s=Ol(Math.abs(a)),r=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:n,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),vc(t,o,l)},logarithmic(t,e,i){if(0===t)return"0";const o=i[e].significand||t/Math.pow(10,Math.floor(Ol(t)));return[1,2,3,5,10,15].includes(o)||e>.8*i.length?yc.numeric.call(this,t,e,i):""}};var wc={formatters:yc};const xc=Object.create(null),kc=Object.create(null);function Tc(t,e){if(!e)return t;const i=e.split(".");for(let e=0,o=i.length;e<o;++e){const o=i[e];t=t[o]||(t[o]=Object.create(null))}return t}function Sc(t,e,i){return"string"==typeof e?bl(Tc(t,e),i):bl(Tc(t,""),e)}class Mc{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>_c(e.backgroundColor),this.hoverBorderColor=(t,e)=>_c(e.borderColor),this.hoverColor=(t,e)=>_c(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return Sc(this,t,e)}get(t){return Tc(this,t)}describe(t,e){return Sc(kc,t,e)}override(t,e){return Sc(xc,t,e)}route(t,e,i,o){const n=Tc(this,t),a=Tc(this,i),s="_"+e;Object.defineProperties(n,{[s]:{value:n[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[s],e=a[o];return rl(t)?Object.assign({},e,t):dl(t,e)},set(t){this[s]=t}}})}apply(t){t.forEach((t=>t(this)))}}var Dc=new Mc({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:fc},numbers:{type:"number",properties:gc}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:wc.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function Cc(t,e,i,o,n){let a=e[n];return a||(a=e[n]=t.measureText(n).width,i.push(n)),a>o&&(o=a),o}function Ac(t,e,i,o){let n=(o=o||{}).data=o.data||{},a=o.garbageCollect=o.garbageCollect||[];o.font!==e&&(n=o.data={},a=o.garbageCollect=[],o.font=e),t.save(),t.font=e;let s=0;const r=i.length;let l,c,d,h,u;for(l=0;l<r;l++)if(h=i[l],null==h||sl(h)){if(sl(h))for(c=0,d=h.length;c<d;c++)u=h[c],null==u||sl(u)||(s=Cc(t,n,a,s,u))}else s=Cc(t,n,a,s,h);t.restore();const m=a.length/2;if(m>i.length){for(l=0;l<m;l++)delete n[a[l]];a.splice(0,m)}return s}function Pc(t,e,i){const o=t.currentDevicePixelRatio,n=0!==i?Math.max(i/2,.5):0;return Math.round((e-n)*o)/o+n}function Ec(t,e){(e||t)&&((e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function Lc(t,e,i,o){$c(t,e,i,o,null)}function $c(t,e,i,o,n){let a,s,r,l,c,d,h,u;const m=e.pointStyle,p=e.rotation,_=e.radius;let g=(p||0)*El;if(m&&"object"==typeof m&&(a=m.toString(),"[object HTMLImageElement]"===a||"[object HTMLCanvasElement]"===a))return t.save(),t.translate(i,o),t.rotate(g),t.drawImage(m,-m.width/2,-m.height/2,m.width,m.height),void t.restore();if(!(isNaN(_)||_<=0)){switch(t.beginPath(),m){default:n?t.ellipse(i,o,n/2,_,0,0,Cl):t.arc(i,o,_,0,Cl),t.closePath();break;case"triangle":d=n?n/2:_,t.moveTo(i+Math.sin(g)*d,o-Math.cos(g)*_),g+=zl,t.lineTo(i+Math.sin(g)*d,o-Math.cos(g)*_),g+=zl,t.lineTo(i+Math.sin(g)*d,o-Math.cos(g)*_),t.closePath();break;case"rectRounded":c=.516*_,l=_-c,s=Math.cos(g+$l)*l,h=Math.cos(g+$l)*(n?n/2-c:l),r=Math.sin(g+$l)*l,u=Math.sin(g+$l)*(n?n/2-c:l),t.arc(i-h,o-r,c,g-Dl,g-Ll),t.arc(i+u,o-s,c,g-Ll,g),t.arc(i+h,o+r,c,g,g+Ll),t.arc(i-u,o+s,c,g+Ll,g+Dl),t.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*_,d=n?n/2:l,t.rect(i-d,o-l,2*d,2*l);break}g+=$l;case"rectRot":h=Math.cos(g)*(n?n/2:_),s=Math.cos(g)*_,r=Math.sin(g)*_,u=Math.sin(g)*(n?n/2:_),t.moveTo(i-h,o-r),t.lineTo(i+u,o-s),t.lineTo(i+h,o+r),t.lineTo(i-u,o+s),t.closePath();break;case"crossRot":g+=$l;case"cross":h=Math.cos(g)*(n?n/2:_),s=Math.cos(g)*_,r=Math.sin(g)*_,u=Math.sin(g)*(n?n/2:_),t.moveTo(i-h,o-r),t.lineTo(i+h,o+r),t.moveTo(i+u,o-s),t.lineTo(i-u,o+s);break;case"star":h=Math.cos(g)*(n?n/2:_),s=Math.cos(g)*_,r=Math.sin(g)*_,u=Math.sin(g)*(n?n/2:_),t.moveTo(i-h,o-r),t.lineTo(i+h,o+r),t.moveTo(i+u,o-s),t.lineTo(i-u,o+s),g+=$l,h=Math.cos(g)*(n?n/2:_),s=Math.cos(g)*_,r=Math.sin(g)*_,u=Math.sin(g)*(n?n/2:_),t.moveTo(i-h,o-r),t.lineTo(i+h,o+r),t.moveTo(i+u,o-s),t.lineTo(i-u,o+s);break;case"line":s=n?n/2:Math.cos(g)*_,r=Math.sin(g)*_,t.moveTo(i-s,o-r),t.lineTo(i+s,o+r);break;case"dash":t.moveTo(i,o),t.lineTo(i+Math.cos(g)*(n?n/2:_),o+Math.sin(g)*_);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}}function zc(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function Oc(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Vc(t){t.restore()}function Hc(t,e,i,o,n){if(!e)return t.lineTo(i.x,i.y);if("middle"===n){const o=(e.x+i.x)/2;t.lineTo(o,e.y),t.lineTo(o,i.y)}else"after"===n!=!!o?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function Rc(t,e,i,o){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(o?e.cp1x:e.cp2x,o?e.cp1y:e.cp2y,o?i.cp2x:i.cp1x,o?i.cp2y:i.cp1y,i.x,i.y)}function Ic(t,e,i,o,n){if(n.strikethrough||n.underline){const a=t.measureText(o),s=e-a.actualBoundingBoxLeft,r=e+a.actualBoundingBoxRight,l=i-a.actualBoundingBoxAscent,c=i+a.actualBoundingBoxDescent,d=n.strikethrough?(l+c)/2:c;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=n.decorationWidth||2,t.moveTo(s,d),t.lineTo(r,d),t.stroke()}}function Nc(t,e){const i=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=i}function Fc(t,e,i,o,n,a={}){const s=sl(e)?e:[e],r=a.strokeWidth>0&&""!==a.strokeColor;let l,c;for(t.save(),t.font=n.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),al(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,a),l=0;l<s.length;++l)c=s[l],a.backdrop&&Nc(t,a.backdrop),r&&(a.strokeColor&&(t.strokeStyle=a.strokeColor),al(a.strokeWidth)||(t.lineWidth=a.strokeWidth),t.strokeText(c,i,o,a.maxWidth)),t.fillText(c,i,o,a.maxWidth),Ic(t,i,o,c,a),o+=Number(n.lineHeight);t.restore()}function Wc(t,e){const{x:i,y:o,w:n,h:a,radius:s}=e;t.arc(i+s.topLeft,o+s.topLeft,s.topLeft,1.5*Dl,Dl,!0),t.lineTo(i,o+a-s.bottomLeft),t.arc(i+s.bottomLeft,o+a-s.bottomLeft,s.bottomLeft,Dl,Ll,!0),t.lineTo(i+n-s.bottomRight,o+a),t.arc(i+n-s.bottomRight,o+a-s.bottomRight,s.bottomRight,Ll,0,!0),t.lineTo(i+n,o+s.topRight),t.arc(i+n-s.topRight,o+s.topRight,s.topRight,0,-Ll,!0),t.lineTo(i+s.topLeft,o)}const Bc=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,jc=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Uc(t,e){const i=(""+t).match(Bc);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}const Yc=t=>+t||0;function qc(t,e){const i={},o=rl(e),n=o?Object.keys(e):e,a=rl(t)?o?i=>dl(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of n)i[t]=Yc(a(t));return i}function Zc(t){return qc(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Xc(t){return qc(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Kc(t){const e=Zc(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Gc(t,e){t=t||{},e=e||Dc.font;let i=dl(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let o=dl(t.style,e.style);o&&!(""+o).match(jc)&&(console.warn('Invalid font style specified: "'+o+'"'),o=void 0);const n={family:dl(t.family,e.family),lineHeight:Uc(dl(t.lineHeight,e.lineHeight),i),size:i,style:o,weight:dl(t.weight,e.weight),string:""};return n.string=function(t){return!t||al(t.size)||al(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(n),n}function Qc(t,e,i,o){let n,a,s,r=!0;for(n=0,a=t.length;n<a;++n)if(s=t[n],void 0!==s&&(void 0!==e&&"function"==typeof s&&(s=s(e),r=!1),void 0!==i&&sl(s)&&(s=s[i%s.length],r=!1),void 0!==s))return o&&!r&&(o.cacheable=!1),s}function Jc(t,e){return Object.assign(Object.create(t),e)}function td(t,e=[""],i,o,n=(()=>t[0])){const a=i||t;void 0===o&&(o=hd("_fallback",t));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:a,_fallback:o,_getTarget:n,override:i=>td([i,...t],e,a,o)};return new Proxy(s,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,o)=>ad(i,o,(()=>function(t,e,i,o){let n;for(const a of e)if(n=hd(od(a,t),i),void 0!==n)return nd(t,n)?cd(i,o,t,n):n}(o,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>ud(t).includes(e),ownKeys:t=>ud(t),set(t,e,i){const o=t._storage||(t._storage=n());return t[e]=o[e]=i,delete t._keys,!0}})}function ed(t,e,i,o){const n={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:id(t,o),setContext:e=>ed(t,e,i,o),override:n=>ed(t.override(n),e,i,o)};return new Proxy(n,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>ad(t,e,(()=>function(t,e,i){const{_proxy:o,_context:n,_subProxy:a,_descriptors:s}=t;let r=o[e];Sl(r)&&s.isScriptable(e)&&(r=function(t,e,i,o){const{_proxy:n,_context:a,_subProxy:s,_stack:r}=i;if(r.has(t))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+t);r.add(t);let l=e(a,s||o);r.delete(t),nd(t,l)&&(l=cd(n._scopes,n,t,l));return l}(e,r,t,i));sl(r)&&r.length&&(r=function(t,e,i,o){const{_proxy:n,_context:a,_subProxy:s,_descriptors:r}=i;if(void 0!==a.index&&o(t))return e[a.index%e.length];if(rl(e[0])){const i=e,o=n._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=cd(o,n,t,l);e.push(ed(i,a,s&&s[t],r))}}return e}(e,r,t,s.isIndexable));nd(e,r)&&(r=ed(r,n,a&&a[e],s));return r}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,o)=>(t[i]=o,delete e[i],!0)})}function id(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:o=e.indexable,_allKeys:n=e.allKeys}=t;return{allKeys:n,scriptable:i,indexable:o,isScriptable:Sl(i)?i:()=>i,isIndexable:Sl(o)?o:()=>o}}const od=(t,e)=>t?t+kl(e):e,nd=(t,e)=>rl(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function ad(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e)||"constructor"===e)return t[e];const o=i();return t[e]=o,o}function sd(t,e,i){return Sl(t)?t(e,i):t}const rd=(t,e)=>!0===t?e:"string"==typeof t?xl(e,t):void 0;function ld(t,e,i,o,n){for(const a of e){const e=rd(i,a);if(e){t.add(e);const a=sd(e._fallback,i,n);if(void 0!==a&&a!==i&&a!==o)return a}else if(!1===e&&void 0!==o&&i!==o)return null}return!1}function cd(t,e,i,o){const n=e._rootScopes,a=sd(e._fallback,i,o),s=[...t,...n],r=new Set;r.add(o);let l=dd(r,s,i,a||i,o);return null!==l&&((void 0===a||a===i||(l=dd(r,s,a,l,o),null!==l))&&td(Array.from(r),[""],n,a,(()=>function(t,e,i){const o=t._getTarget();e in o||(o[e]={});const n=o[e];if(sl(n)&&rl(i))return i;return n||{}}(e,i,o))))}function dd(t,e,i,o,n){for(;i;)i=ld(t,e,i,o,n);return i}function hd(t,e){for(const i of e){if(!i)continue;const e=i[t];if(void 0!==e)return e}}function ud(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}function md(t,e,i,o){const{iScale:n}=t,{key:a="r"}=this._parsing,s=new Array(o);let r,l,c,d;for(r=0,l=o;r<l;++r)c=r+i,d=e[c],s[r]={r:n.parse(xl(d,a),c)};return s}const pd=Number.EPSILON||1e-14,_d=(t,e)=>e<t.length&&!t[e].skip&&t[e],gd=t=>"x"===t?"y":"x";function fd(t,e,i,o){const n=t.skip?e:t,a=e,s=i.skip?e:i,r=Ul(a,n),l=Ul(s,a);let c=r/(r+l),d=l/(r+l);c=isNaN(c)?0:c,d=isNaN(d)?0:d;const h=o*c,u=o*d;return{previous:{x:a.x-h*(s.x-n.x),y:a.y-h*(s.y-n.y)},next:{x:a.x+u*(s.x-n.x),y:a.y+u*(s.y-n.y)}}}function bd(t,e="x"){const i=gd(e),o=t.length,n=Array(o).fill(0),a=Array(o);let s,r,l,c=_d(t,0);for(s=0;s<o;++s)if(r=l,l=c,c=_d(t,s+1),l){if(c){const t=c[e]-l[e];n[s]=0!==t?(c[i]-l[i])/t:0}a[s]=r?c?Vl(n[s-1])!==Vl(n[s])?0:(n[s-1]+n[s])/2:n[s-1]:n[s]}!function(t,e,i){const o=t.length;let n,a,s,r,l,c=_d(t,0);for(let d=0;d<o-1;++d)l=c,c=_d(t,d+1),l&&c&&(Hl(e[d],0,pd)?i[d]=i[d+1]=0:(n=i[d]/e[d],a=i[d+1]/e[d],r=Math.pow(n,2)+Math.pow(a,2),r<=9||(s=3/Math.sqrt(r),i[d]=n*s*e[d],i[d+1]=a*s*e[d])))}(t,n,a),function(t,e,i="x"){const o=gd(i),n=t.length;let a,s,r,l=_d(t,0);for(let c=0;c<n;++c){if(s=r,r=l,l=_d(t,c+1),!r)continue;const n=r[i],d=r[o];s&&(a=(n-s[i])/3,r[`cp1${i}`]=n-a,r[`cp1${o}`]=d-a*e[c]),l&&(a=(l[i]-n)/3,r[`cp2${i}`]=n+a,r[`cp2${o}`]=d+a*e[c])}}(t,a,e)}function vd(t,e,i){return Math.max(Math.min(t,i),e)}function yd(t,e,i,o,n){let a,s,r,l;if(e.spanGaps&&(t=t.filter((t=>!t.skip))),"monotone"===e.cubicInterpolationMode)bd(t,n);else{let i=o?t[t.length-1]:t[0];for(a=0,s=t.length;a<s;++a)r=t[a],l=fd(i,r,t[Math.min(a+1,s-(o?0:1))%s],e.tension),r.cp1x=l.previous.x,r.cp1y=l.previous.y,r.cp2x=l.next.x,r.cp2y=l.next.y,i=r}e.capBezierPoints&&function(t,e){let i,o,n,a,s,r=zc(t[0],e);for(i=0,o=t.length;i<o;++i)s=a,a=r,r=i<o-1&&zc(t[i+1],e),a&&(n=t[i],s&&(n.cp1x=vd(n.cp1x,e.left,e.right),n.cp1y=vd(n.cp1y,e.top,e.bottom)),r&&(n.cp2x=vd(n.cp2x,e.left,e.right),n.cp2y=vd(n.cp2y,e.top,e.bottom)))}(t,i)}function wd(){return"undefined"!=typeof window&&"undefined"!=typeof document}function xd(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function kd(t,e,i){let o;return"string"==typeof t?(o=parseInt(t,10),-1!==t.indexOf("%")&&(o=o/100*e.parentNode[i])):o=t,o}const Td=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);const Sd=["top","right","bottom","left"];function Md(t,e,i){const o={};i=i?"-"+i:"";for(let n=0;n<4;n++){const a=Sd[n];o[a]=parseFloat(t[e+"-"+a+i])||0}return o.width=o.left+o.right,o.height=o.top+o.bottom,o}const Dd=(t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot);function Cd(t,e){if("native"in t)return t;const{canvas:i,currentDevicePixelRatio:o}=e,n=Td(i),a="border-box"===n.boxSizing,s=Md(n,"padding"),r=Md(n,"border","width"),{x:l,y:c,box:d}=function(t,e){const i=t.touches,o=i&&i.length?i[0]:t,{offsetX:n,offsetY:a}=o;let s,r,l=!1;if(Dd(n,a,t.target))s=n,r=a;else{const t=e.getBoundingClientRect();s=o.clientX-t.left,r=o.clientY-t.top,l=!0}return{x:s,y:r,box:l}}(t,i),h=s.left+(d&&r.left),u=s.top+(d&&r.top);let{width:m,height:p}=e;return a&&(m-=s.width+r.width,p-=s.height+r.height),{x:Math.round((l-h)/m*i.width/o),y:Math.round((c-u)/p*i.height/o)}}const Ad=t=>Math.round(10*t)/10;function Pd(t,e,i,o){const n=Td(t),a=Md(n,"margin"),s=kd(n.maxWidth,t,"clientWidth")||Pl,r=kd(n.maxHeight,t,"clientHeight")||Pl,l=function(t,e,i){let o,n;if(void 0===e||void 0===i){const a=t&&xd(t);if(a){const t=a.getBoundingClientRect(),s=Td(a),r=Md(s,"border","width"),l=Md(s,"padding");e=t.width-l.width-r.width,i=t.height-l.height-r.height,o=kd(s.maxWidth,a,"clientWidth"),n=kd(s.maxHeight,a,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:o||Pl,maxHeight:n||Pl}}(t,e,i);let{width:c,height:d}=l;if("content-box"===n.boxSizing){const t=Md(n,"border","width"),e=Md(n,"padding");c-=e.width+t.width,d-=e.height+t.height}c=Math.max(0,c-a.width),d=Math.max(0,o?c/o:d-a.height),c=Ad(Math.min(c,s,l.maxWidth)),d=Ad(Math.min(d,r,l.maxHeight)),c&&!d&&(d=Ad(c/2));return(void 0!==e||void 0!==i)&&o&&l.height&&d>l.height&&(d=l.height,c=Ad(Math.floor(d*o))),{width:c,height:d}}function Ed(t,e,i){const o=e||1,n=Ad(t.height*o),a=Ad(t.width*o);t.height=Ad(t.height),t.width=Ad(t.width);const s=t.canvas;return s.style&&(i||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==o||s.height!==n||s.width!==a)&&(t.currentDevicePixelRatio=o,s.height=n,s.width=a,t.ctx.setTransform(o,0,0,o,0,0),!0)}const Ld=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};wd()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(t){}return t}();function $d(t,e){const i=function(t,e){return Td(t).getPropertyValue(e)}(t,e),o=i&&i.match(/^(\d+)(\.\d+)?px$/);return o?+o[1]:void 0}function zd(t,e,i,o){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function Od(t,e,i,o){return{x:t.x+i*(e.x-t.x),y:"middle"===o?i<.5?t.y:e.y:"after"===o?i<1?t.y:e.y:i>0?e.y:t.y}}function Vd(t,e,i,o){const n={x:t.cp2x,y:t.cp2y},a={x:e.cp1x,y:e.cp1y},s=zd(t,n,i),r=zd(n,a,i),l=zd(a,e,i),c=zd(s,r,i),d=zd(r,l,i);return zd(c,d,i)}function Hd(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function Rd(t,e){let i,o;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,o=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=o)}function Id(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Nd(t){return"angle"===t?{between:Zl,compare:Yl,normalize:ql}:{between:Kl,compare:(t,e)=>t-e,normalize:t=>t}}function Fd({start:t,end:e,count:i,loop:o,style:n}){return{start:t%i,end:e%i,loop:o&&(e-t+1)%i==0,style:n}}function Wd(t,e,i){if(!i)return[t];const{property:o,start:n,end:a}=i,s=e.length,{compare:r,between:l,normalize:c}=Nd(o),{start:d,end:h,loop:u,style:m}=function(t,e,i){const{property:o,start:n,end:a}=i,{between:s,normalize:r}=Nd(o),l=e.length;let c,d,{start:h,end:u,loop:m}=t;if(m){for(h+=l,u+=l,c=0,d=l;c<d&&s(r(e[h%l][o]),n,a);++c)h--,u--;h%=l,u%=l}return u<h&&(u+=l),{start:h,end:u,loop:m,style:t.style}}(t,e,i),p=[];let _,g,f,b=!1,v=null;const y=()=>b||l(n,f,_)&&0!==r(n,f),w=()=>!b||0===r(a,_)||l(a,f,_);for(let t=d,i=d;t<=h;++t)g=e[t%s],g.skip||(_=c(g[o]),_!==f&&(b=l(_,n,a),null===v&&y()&&(v=0===r(_,n)?t:i),null!==v&&w()&&(p.push(Fd({start:v,end:t,loop:u,count:s,style:m})),v=null),i=t,f=_));return null!==v&&p.push(Fd({start:v,end:h,loop:u,count:s,style:m})),p}function Bd(t,e){const i=[],o=t.segments;for(let n=0;n<o.length;n++){const a=Wd(o[n],t.points,e);a.length&&i.push(...a)}return i}function jd(t,e,i,o){return o&&o.setContext&&i?function(t,e,i,o){const n=t._chart.getContext(),a=Ud(t.options),{_datasetIndex:s,options:{spanGaps:r}}=t,l=i.length,c=[];let d=a,h=e[0].start,u=h;function m(t,e,o,n){const a=r?-1:1;if(t!==e){for(t+=l;i[t%l].skip;)t-=a;for(;i[e%l].skip;)e+=a;t%l!=e%l&&(c.push({start:t%l,end:e%l,loop:o,style:n}),d=n,h=e%l)}}for(const t of e){h=r?h:t.start;let e,a=i[h%l];for(u=h+1;u<=t.end;u++){const r=i[u%l];e=Ud(o.setContext(Jc(n,{type:"segment",p0:a,p1:r,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:s}))),Yd(e,d)&&m(h,u-1,t.loop,d),a=r,d=e}h<u-1&&m(h,u-1,t.loop,d)}return c}(t,e,i,o):e}function Ud(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Yd(t,e){if(!e)return!1;const i=[],o=function(t,e){return mc(e)?(i.includes(e)||i.push(e),i.indexOf(e)):e};return JSON.stringify(t,o)!==JSON.stringify(e,o)}function qd(t,e,i){return t.options.clip?t[i]:e[i]}function Zd(t,e){const i=e._clip;if(i.disabled)return!1;const o=function(t,e){const{xScale:i,yScale:o}=t;return i&&o?{left:qd(i,e,"left"),right:qd(i,e,"right"),top:qd(o,e,"top"),bottom:qd(o,e,"bottom")}:e}(e,t.chartArea);return{left:!1===i.left?0:o.left-(!0===i.left?0:i.left),right:!1===i.right?t.width:o.right+(!0===i.right?0:i.right),top:!1===i.top?0:o.top-(!0===i.top?0:i.top),bottom:!1===i.bottom?t.height:o.bottom+(!0===i.bottom?0:i.bottom)}}class Xd{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,o){const n=e.listeners[o],a=e.duration;n.forEach((o=>o({chart:t,initial:e.initial,numSteps:a,currentStep:Math.min(i-e.start,a)})))}_refresh(){this._request||(this._running=!0,this._request=oc.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,o)=>{if(!i.running||!i.items.length)return;const n=i.items;let a,s=n.length-1,r=!1;for(;s>=0;--s)a=n[s],a._active?(a._total>i.duration&&(i.duration=a._total),a.tick(t),r=!0):(n[s]=n[n.length-1],n.pop());r&&(o.draw(),this._notify(o,i,t,"progress")),n.length||(i.running=!1,this._notify(o,i,t,"complete"),i.initial=!1),e+=n.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let o=i.length-1;for(;o>=0;--o)i[o].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Kd=new Xd;const Gd="transparent",Qd={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const o=pc(t||Gd),n=o.valid&&pc(e||Gd);return n&&n.valid?n.mix(o,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class Jd{constructor(t,e,i,o){const n=e[i];o=Qc([t.to,o,n,t.from]);const a=Qc([t.from,n,o]);this._active=!0,this._fn=t.fn||Qd[t.type||typeof a],this._easing=uc[t.easing]||uc.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=a,this._to=o,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const o=this._target[this._prop],n=i-this._start,a=this._duration-n;this._start=i,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=n,this._loop=!!t.loop,this._to=Qc([t.to,e,o,t.from]),this._from=Qc([t.from,o,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,o=this._prop,n=this._from,a=this._loop,s=this._to;let r;if(this._active=n!==s&&(a||e<i),!this._active)return this._target[o]=s,void this._notify(!0);e<0?this._target[o]=n:(r=e/i%2,r=a&&r>1?2-r:r,r=this._easing(Math.min(1,Math.max(0,r))),this._target[o]=this._fn(n,s,r))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t<i.length;t++)i[t][e]()}}class th{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!rl(t))return;const e=Object.keys(Dc.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach((o=>{const n=t[o];if(!rl(n))return;const a={};for(const t of e)a[t]=n[t];(sl(n.properties)&&n.properties||[o]).forEach((t=>{t!==o&&i.has(t)||i.set(t,a)}))}))}_animateOptions(t,e){const i=e.options,o=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!o)return[];const n=this._createAnimations(o,i);return i.$shared&&function(t,e){const i=[],o=Object.keys(e);for(let e=0;e<o.length;e++){const n=t[o[e]];n&&n.active()&&i.push(n.wait())}return Promise.all(i)}(t.options.$animations,i).then((()=>{t.options=i}),(()=>{})),n}_createAnimations(t,e){const i=this._properties,o=[],n=t.$animations||(t.$animations={}),a=Object.keys(e),s=Date.now();let r;for(r=a.length-1;r>=0;--r){const l=a[r];if("$"===l.charAt(0))continue;if("options"===l){o.push(...this._animateOptions(t,e));continue}const c=e[l];let d=n[l];const h=i.get(l);if(d){if(h&&d.active()){d.update(h,c,s);continue}d.cancel()}h&&h.duration?(n[l]=d=new Jd(h,t,l,c),o.push(d)):t[l]=c}return o}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(Kd.add(this._chart,i),!0):void 0}}function eh(t,e){const i=t&&t.options||{},o=i.reverse,n=void 0===i.min?e:0,a=void 0===i.max?e:0;return{start:o?a:n,end:o?n:a}}function ih(t,e){const i=[],o=t._getSortedDatasetMetas(e);let n,a;for(n=0,a=o.length;n<a;++n)i.push(o[n].index);return i}function oh(t,e,i,o={}){const n=t.keys,a="single"===o.mode;let s,r,l,c;if(null===e)return;let d=!1;for(s=0,r=n.length;s<r;++s){if(l=+n[s],l===i){if(d=!0,o.all)continue;break}c=t.values[l],ll(c)&&(a||0===e||Vl(e)===Vl(c))&&(e+=c)}return d||o.all?e:0}function nh(t,e){const i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function ah(t,e,i){const o=t[e]||(t[e]={});return o[i]||(o[i]={})}function sh(t,e,i,o){for(const n of e.getMatchingVisibleMetas(o).reverse()){const e=t[n.index];if(i&&e>0||!i&&e<0)return n.index}return null}function rh(t,e){const{chart:i,_cachedMeta:o}=t,n=i._stacks||(i._stacks={}),{iScale:a,vScale:s,index:r}=o,l=a.axis,c=s.axis,d=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(a,s,o),h=e.length;let u;for(let t=0;t<h;++t){const i=e[t],{[l]:a,[c]:h}=i;u=(i._stacks||(i._stacks={}))[c]=ah(n,d,a),u[r]=h,u._top=sh(u,s,!0,o.type),u._bottom=sh(u,s,!1,o.type);(u._visualValues||(u._visualValues={}))[r]=h}}function lh(t,e){const i=t.scales;return Object.keys(i).filter((t=>i[t].axis===e)).shift()}function ch(t,e){const i=t.controller.index,o=t.vScale&&t.vScale.axis;if(o){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[o]||void 0===e[o][i])return;delete e[o][i],void 0!==e[o]._visualValues&&void 0!==e[o]._visualValues[i]&&delete e[o]._visualValues[i]}}}const dh=t=>"reset"===t||"none"===t,hh=(t,e)=>e?t:Object.assign({},t);class uh{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=nh(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&ch(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),o=(t,e,i,o)=>"x"===t?e:"r"===t?o:i,n=e.xAxisID=dl(i.xAxisID,lh(t,"x")),a=e.yAxisID=dl(i.yAxisID,lh(t,"y")),s=e.rAxisID=dl(i.rAxisID,lh(t,"r")),r=e.indexAxis,l=e.iAxisID=o(r,n,a,s),c=e.vAxisID=o(r,a,n,s);e.xScale=this.getScaleForId(n),e.yScale=this.getScaleForId(a),e.rScale=this.getScaleForId(s),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&ec(this._data,this),t._stacked&&ch(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(rl(e)){const t=this._cachedMeta;this._data=function(t,e){const{iScale:i,vScale:o}=e,n="x"===i.axis?"x":"y",a="x"===o.axis?"x":"y",s=Object.keys(t),r=new Array(s.length);let l,c,d;for(l=0,c=s.length;l<c;++l)d=s[l],r[l]={[n]:d,[a]:t[d]};return r}(e,t)}else if(i!==e){if(i){ec(i,this);const t=this._cachedMeta;ch(t),t._parsed=[]}e&&Object.isExtensible(e)&&function(t,e){t._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),tc.forEach((e=>{const i="_onData"+kl(e),o=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...e){const n=o.apply(this,e);return t._chartjs.listeners.forEach((t=>{"function"==typeof t[i]&&t[i](...e)})),n}})})))}(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let o=!1;this._dataCheck();const n=e._stacked;e._stacked=nh(e.vScale,e),e.stack!==i.stack&&(o=!0,ch(e),e.stack=i.stack),this._resyncElements(t),(o||n!==e._stacked)&&(rh(this,e._parsed),e._stacked=nh(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:o}=this,{iScale:n,_stacked:a}=i,s=n.axis;let r,l,c,d=0===t&&e===o.length||i._sorted,h=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=o,i._sorted=!0,c=o;else{c=sl(o[t])?this.parseArrayData(i,o,t,e):rl(o[t])?this.parseObjectData(i,o,t,e):this.parsePrimitiveData(i,o,t,e);const n=()=>null===l[s]||h&&l[s]<h[s];for(r=0;r<e;++r)i._parsed[r+t]=l=c[r],d&&(n()&&(d=!1),h=l);i._sorted=d}a&&rh(this,c)}parsePrimitiveData(t,e,i,o){const{iScale:n,vScale:a}=t,s=n.axis,r=a.axis,l=n.getLabels(),c=n===a,d=new Array(o);let h,u,m;for(h=0,u=o;h<u;++h)m=h+i,d[h]={[s]:c||n.parse(l[m],m),[r]:a.parse(e[m],m)};return d}parseArrayData(t,e,i,o){const{xScale:n,yScale:a}=t,s=new Array(o);let r,l,c,d;for(r=0,l=o;r<l;++r)c=r+i,d=e[c],s[r]={x:n.parse(d[0],c),y:a.parse(d[1],c)};return s}parseObjectData(t,e,i,o){const{xScale:n,yScale:a}=t,{xAxisKey:s="x",yAxisKey:r="y"}=this._parsing,l=new Array(o);let c,d,h,u;for(c=0,d=o;c<d;++c)h=c+i,u=e[h],l[c]={x:n.parse(xl(u,s),h),y:a.parse(xl(u,r),h)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const o=this.chart,n=this._cachedMeta,a=e[t.axis];return oh({keys:ih(o,!0),values:e._stacks[t.axis]._visualValues},a,n.index,{mode:i})}updateRangeFromParsed(t,e,i,o){const n=i[e.axis];let a=null===n?NaN:n;const s=o&&i._stacks[e.axis];o&&s&&(o.values=s,a=oh(o,n,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,e){const i=this._cachedMeta,o=i._parsed,n=i._sorted&&t===i.iScale,a=o.length,s=this._getOtherScale(t),r=((t,e,i)=>t&&!e.hidden&&e._stacked&&{keys:ih(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:d}=function(t){const{min:e,max:i,minDefined:o,maxDefined:n}=t.getUserBounds();return{min:o?e:Number.NEGATIVE_INFINITY,max:n?i:Number.POSITIVE_INFINITY}}(s);let h,u;function m(){u=o[h];const e=u[s.axis];return!ll(u[t.axis])||c>e||d<e}for(h=0;h<a&&(m()||(this.updateRangeFromParsed(l,t,u,r),!n));++h);if(n)for(h=a-1;h>=0;--h)if(!m()){this.updateRangeFromParsed(l,t,u,r);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let o,n,a;for(o=0,n=e.length;o<n;++o)a=e[o][t.axis],ll(a)&&i.push(a);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,o=e.vScale,n=this.getParsed(t);return{label:i?""+i.getLabelForValue(n[i.axis]):"",value:o?""+o.getLabelForValue(n[o.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=function(t){let e,i,o,n;return rl(t)?(e=t.top,i=t.right,o=t.bottom,n=t.left):e=i=o=n=t,{top:e,right:i,bottom:o,left:n,disabled:!1===t}}(dl(this.options.clip,function(t,e,i){if(!1===i)return!1;const o=eh(t,i),n=eh(e,i);return{top:n.end,right:o.end,bottom:n.start,left:o.start}}(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,o=i.data||[],n=e.chartArea,a=[],s=this._drawStart||0,r=this._drawCount||o.length-s,l=this.options.drawActiveElementsOnTop;let c;for(i.dataset&&i.dataset.draw(t,n,s,r),c=s;c<s+r;++c){const e=o[c];e.hidden||(e.active&&l?a.push(e):e.draw(t,n))}for(c=0;c<a.length;++c)a[c].draw(t,n)}getStyle(t,e){const i=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const o=this.getDataset();let n;if(t>=0&&t<this._cachedMeta.data.length){const e=this._cachedMeta.data[t];n=e.$context||(e.$context=function(t,e,i){return Jc(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:i,index:e,mode:"default",type:"data"})}(this.getContext(),t,e)),n.parsed=this.getParsed(t),n.raw=o.data[t],n.index=n.dataIndex=t}else n=this.$context||(this.$context=function(t,e){return Jc(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),n.dataset=o,n.index=n.datasetIndex=this.index;return n.active=!!e,n.mode=i,n}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const o="active"===e,n=this._cachedDataOpts,a=t+"-"+e,s=n[a],r=this.enableOptionSharing&&Tl(i);if(s)return hh(s,r);const l=this.chart.config,c=l.datasetElementScopeKeys(this._type,t),d=o?[`${t}Hover`,"hover",t,""]:[t,""],h=l.getOptionScopes(this.getDataset(),c),u=Object.keys(Dc.elements[t]),m=l.resolveNamedOptions(h,u,(()=>this.getContext(i,o,e)),d);return m.$shared&&(m.$shared=r,n[a]=Object.freeze(hh(m,r))),m}_resolveAnimations(t,e,i){const o=this.chart,n=this._cachedDataOpts,a=`animation-${e}`,s=n[a];if(s)return s;let r;if(!1!==o.options.animation){const o=this.chart.config,n=o.datasetAnimationScopeKeys(this._type,e),a=o.getOptionScopes(this.getDataset(),n);r=o.createResolver(a,this.getContext(t,i,e))}const l=new th(o,r&&r.animations);return r&&r._cacheable&&(n[a]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||dh(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),o=this._sharedOptions,n=this.getSharedOptions(i),a=this.includeOptions(e,n)||n!==o;return this.updateSharedOptions(n,e,i),{sharedOptions:n,includeOptions:a}}updateElement(t,e,i,o){dh(o)?Object.assign(t,i):this._resolveAnimations(e,o).update(t,i)}updateSharedOptions(t,e,i){t&&!dh(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,o){t.active=o;const n=this.getStyle(e,o);this._resolveAnimations(e,i,o).update(t,{options:!o&&this.getSharedOptions(n)||n})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const o=i.length,n=e.length,a=Math.min(n,o);a&&this.parse(0,a),n>o?this._insertElements(o,n-o,t):n<o&&this._removeElements(n,o-n)}_insertElements(t,e,i=!0){const o=this._cachedMeta,n=o.data,a=t+e;let s;const r=t=>{for(t.length+=e,s=t.length-1;s>=a;s--)t[s]=t[s-e]};for(r(n),s=t;s<a;++s)n[s]=new this.dataElementType;this._parsing&&r(o._parsed),this.parse(t,e),i&&this.updateElements(n,t,e,"reset")}updateElements(t,e,i,o){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const o=i._parsed.splice(t,e);i._stacked&&ch(i,o)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,o]=t;this[e](i,o)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function mh(t){const e=t.iScale,i=function(t,e){if(!t._cache.$bar){const i=t.getMatchingVisibleMetas(e);let o=[];for(let e=0,n=i.length;e<n;e++)o=o.concat(i[e].controller.getAllParsedValues(t));t._cache.$bar=ic(o.sort(((t,e)=>t-e)))}return t._cache.$bar}(e,t.type);let o,n,a,s,r=e._length;const l=()=>{32767!==a&&-32768!==a&&(Tl(s)&&(r=Math.min(r,Math.abs(a-s)||r)),s=a)};for(o=0,n=i.length;o<n;++o)a=e.getPixelForValue(i[o]),l();for(s=void 0,o=0,n=e.ticks.length;o<n;++o)a=e.getPixelForTick(o),l();return r}function ph(t,e,i,o){return sl(t)?function(t,e,i,o){const n=i.parse(t[0],o),a=i.parse(t[1],o),s=Math.min(n,a),r=Math.max(n,a);let l=s,c=r;Math.abs(s)>Math.abs(r)&&(l=r,c=s),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:n,end:a,min:s,max:r}}(t,e,i,o):e[i.axis]=i.parse(t,o),e}function _h(t,e,i,o){const n=t.iScale,a=t.vScale,s=n.getLabels(),r=n===a,l=[];let c,d,h,u;for(c=i,d=i+o;c<d;++c)u=e[c],h={},h[n.axis]=r||n.parse(s[c],c),l.push(ph(u,h,a,c));return l}function gh(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function fh(t,e,i,o){let n=e.borderSkipped;const a={};if(!n)return void(t.borderSkipped=a);if(!0===n)return void(t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:s,end:r,reverse:l,top:c,bottom:d}=function(t){let e,i,o,n,a;return t.horizontal?(e=t.base>t.x,i="left",o="right"):(e=t.base<t.y,i="bottom",o="top"),e?(n="end",a="start"):(n="start",a="end"),{start:i,end:o,reverse:e,top:n,bottom:a}}(t);"middle"===n&&i&&(t.enableBorderRadius=!0,(i._top||0)===o?n=c:(i._bottom||0)===o?n=d:(a[bh(d,s,r,l)]=!0,n=c)),a[bh(n,s,r,l)]=!0,t.borderSkipped=a}function bh(t,e,i,o){var n,a,s;return o?(s=i,t=vh(t=(n=t)===(a=e)?s:n===s?a:n,i,e)):t=vh(t,e,i),t}function vh(t,e,i){return"start"===t?e:"end"===t?i:t}function yh(t,{inflateAmount:e},i){t.inflateAmount="auto"===e?1===i?.33:0:e}class wh extends uh{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,e,i,o){return _h(t,e,i,o)}parseArrayData(t,e,i,o){return _h(t,e,i,o)}parseObjectData(t,e,i,o){const{iScale:n,vScale:a}=t,{xAxisKey:s="x",yAxisKey:r="y"}=this._parsing,l="x"===n.axis?s:r,c="x"===a.axis?s:r,d=[];let h,u,m,p;for(h=i,u=i+o;h<u;++h)p=e[h],m={},m[n.axis]=n.parse(xl(p,l),h),d.push(ph(xl(p,c),m,a,h));return d}updateRangeFromParsed(t,e,i,o){super.updateRangeFromParsed(t,e,i,o);const n=i._custom;n&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,n.min),t.max=Math.max(t.max,n.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:o}=e,n=this.getParsed(t),a=n._custom,s=gh(a)?"["+a.start+", "+a.end+"]":""+o.getLabelForValue(n[o.axis]);return{label:""+i.getLabelForValue(n[i.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();this._cachedMeta.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,o){const n="reset"===o,{index:a,_cachedMeta:{vScale:s}}=this,r=s.getBasePixel(),l=s.isHorizontal(),c=this._getRuler(),{sharedOptions:d,includeOptions:h}=this._getSharedOptions(e,o);for(let u=e;u<e+i;u++){const e=this.getParsed(u),i=n||al(e[s.axis])?{base:r,head:r}:this._calculateBarValuePixels(u),m=this._calculateBarIndexPixels(u,c),p=(e._stacks||{})[s.axis],_={horizontal:l,base:i.base,enableBorderRadius:!p||gh(e._custom)||a===p._top||a===p._bottom,x:l?i.head:m.center,y:l?m.center:i.head,height:l?m.size:Math.abs(i.size),width:l?Math.abs(i.size):m.size};h&&(_.options=d||this.resolveDataElementOptions(u,t[u].active?"active":o));const g=_.options||t[u].options;fh(_,g,p,a),yh(_,g,c.ratio),this.updateElement(t[u],u,_,o)}}_getStacks(t,e){const{iScale:i}=this._cachedMeta,o=i.getMatchingVisibleMetas(this._type).filter((t=>t.controller.options.grouped)),n=i.options.stacked,a=[],s=this._cachedMeta.controller.getParsed(e),r=s&&s[i.axis],l=t=>{const e=t._parsed.find((t=>t[i.axis]===r)),o=e&&e[t.vScale.axis];if(al(o)||isNaN(o))return!0};for(const i of o)if((void 0===e||!l(i))&&((!1===n||-1===a.indexOf(i.stack)||void 0===n&&void 0===i.stack)&&a.push(i.stack),i.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter((i=>t[i].axis===e)).shift()}_getAxis(){const t={},e=this.getFirstScaleIdForIndexAxis();for(const i of this.chart.data.datasets)t[dl("x"===this.chart.options.indexAxis?i.xAxisID:i.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,i){const o=this._getStacks(t,i),n=void 0!==e?o.indexOf(e):-1;return-1===n?o.length-1:n}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,o=[];let n,a;for(n=0,a=e.data.length;n<a;++n)o.push(i.getPixelForValue(this.getParsed(n)[i.axis],n));const s=t.barThickness;return{min:s||mh(e),pixels:o,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:s?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i,index:o},options:{base:n,minBarLength:a}}=this,s=n||0,r=this.getParsed(t),l=r._custom,c=gh(l);let d,h,u=r[e.axis],m=0,p=i?this.applyStack(e,r,i):u;p!==u&&(m=p-u,p=u),c&&(u=l.barStart,p=l.barEnd-l.barStart,0!==u&&Vl(u)!==Vl(l.barEnd)&&(m=0),m+=u);const _=al(n)||c?m:n;let g=e.getPixelForValue(_);if(d=this.chart.getDataVisibility(t)?e.getPixelForValue(m+p):g,h=d-g,Math.abs(h)<a){h=function(t,e,i){return 0!==t?Vl(t):(e.isHorizontal()?1:-1)*(e.min>=i?1:-1)}(h,e,s)*a,u===s&&(g-=h/2);const t=e.getPixelForDecimal(0),n=e.getPixelForDecimal(1),l=Math.min(t,n),m=Math.max(t,n);g=Math.max(Math.min(g,m),l),d=g+h,i&&!c&&(r._stacks[e.axis]._visualValues[o]=e.getValueForPixel(d)-e.getValueForPixel(g))}if(g===e.getPixelForValue(s)){const t=Vl(h)*e.getLineWidthForValue(s)/2;g+=t,h-=t}return{size:h,base:g,head:d,center:d+h/2}}_calculateBarIndexPixels(t,e){const i=e.scale,o=this.options,n=o.skipNull,a=dl(o.maxBarThickness,1/0);let s,r;const l=this._getAxisCount();if(e.grouped){const i=n?this._getStackCount(t):e.stackCount,c="flex"===o.barThickness?function(t,e,i,o){const n=e.pixels,a=n[t];let s=t>0?n[t-1]:null,r=t<n.length-1?n[t+1]:null;const l=i.categoryPercentage;null===s&&(s=a-(null===r?e.end-e.start:r-a)),null===r&&(r=a+a-s);const c=a-(a-Math.min(s,r))/2*l;return{chunk:Math.abs(r-s)/2*l/o,ratio:i.barPercentage,start:c}}(t,e,o,i*l):function(t,e,i,o){const n=i.barThickness;let a,s;return al(n)?(a=e.min*i.categoryPercentage,s=i.barPercentage):(a=n*o,s=1),{chunk:a/o,ratio:s,start:e.pixels[t]-a/2}}(t,e,o,i*l),d="x"===this.chart.options.indexAxis?this.getDataset().xAxisID:this.getDataset().yAxisID,h=this._getAxis().indexOf(dl(d,this.getFirstScaleIdForIndexAxis())),u=this._getStackIndex(this.index,this._cachedMeta.stack,n?t:void 0)+h;s=c.start+c.chunk*u+c.chunk/2,r=Math.min(a,c.chunk*c.ratio)}else s=i.getPixelForValue(this.getParsed(t)[i.axis],t),r=Math.min(a,e.min*e.ratio);return{base:s-r/2,head:s+r/2,center:s,size:r}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,o=i.length;let n=0;for(;n<o;++n)null===this.getParsed(n)[e.axis]||i[n].hidden||i[n].draw(this._ctx)}}class xh extends uh{static id="bubble";static defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,o){const n=super.parsePrimitiveData(t,e,i,o);for(let t=0;t<n.length;t++)n[t]._custom=this.resolveDataElementOptions(t+i).radius;return n}parseArrayData(t,e,i,o){const n=super.parseArrayData(t,e,i,o);for(let t=0;t<n.length;t++){const o=e[i+t];n[t]._custom=dl(o[2],this.resolveDataElementOptions(t+i).radius)}return n}parseObjectData(t,e,i,o){const n=super.parseObjectData(t,e,i,o);for(let t=0;t<n.length;t++){const o=e[i+t];n[t]._custom=dl(o&&o.r&&+o.r,this.resolveDataElementOptions(t+i).radius)}return n}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:o,yScale:n}=e,a=this.getParsed(t),s=o.getLabelForValue(a.x),r=n.getLabelForValue(a.y),l=a._custom;return{label:i[t]||"",value:"("+s+", "+r+(l?", "+l:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,o){const n="reset"===o,{iScale:a,vScale:s}=this._cachedMeta,{sharedOptions:r,includeOptions:l}=this._getSharedOptions(e,o),c=a.axis,d=s.axis;for(let h=e;h<e+i;h++){const e=t[h],i=!n&&this.getParsed(h),u={},m=u[c]=n?a.getPixelForDecimal(.5):a.getPixelForValue(i[c]),p=u[d]=n?s.getBasePixel():s.getPixelForValue(i[d]);u.skip=isNaN(m)||isNaN(p),l&&(u.options=r||this.resolveDataElementOptions(h,e.active?"active":o),n&&(u.options.radius=0)),this.updateElement(e,h,u,o)}}resolveDataElementOptions(t,e){const i=this.getParsed(t);let o=super.resolveDataElementOptions(t,e);o.$shared&&(o=Object.assign({},o,{$shared:!1}));const n=o.radius;return"active"!==e&&(o.radius=0),o.radius+=dl(i&&i._custom,n),o}}class kh extends uh{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data,{labels:{pointStyle:i,textAlign:o,color:n,useBorderRadius:a,borderRadius:s}}=t.legend.options;return e.labels.length&&e.datasets.length?e.labels.map(((e,r)=>{const l=t.getDatasetMeta(0).controller.getStyle(r);return{text:e,fillStyle:l.backgroundColor,fontColor:n,hidden:!t.getDataVisibility(r),lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:l.borderWidth,strokeStyle:l.borderColor,textAlign:o,pointStyle:i,borderRadius:a&&(s||l.borderRadius),index:r}})):[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,o=this._cachedMeta;if(!1===this._parsing)o._parsed=i;else{let n,a,s=t=>+i[t];if(rl(i[t])){const{key:t="value"}=this._parsing;s=e=>+xl(i[e],t)}for(n=t,a=t+e;n<a;++n)o._parsed[n]=s(n)}}_getRotation(){return Fl(this.options.rotation-90)}_getCircumference(){return Fl(this.options.circumference)}_getRotationExtents(){let t=Cl,e=-Cl;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const o=this.chart.getDatasetMeta(i).controller,n=o._getRotation(),a=o._getCircumference();t=Math.min(t,n),e=Math.max(e,n+a)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:i}=e,o=this._cachedMeta,n=o.data,a=this.getMaxBorderWidth()+this.getMaxOffset(n)+this.options.spacing,s=Math.max((Math.min(i.width,i.height)-a)/2,0),r=Math.min((l=this.options.cutout,c=s,"string"==typeof l&&l.endsWith("%")?parseFloat(l)/100:+l/c),1);var l,c;const d=this._getRingWeight(this.index),{circumference:h,rotation:u}=this._getRotationExtents(),{ratioX:m,ratioY:p,offsetX:_,offsetY:g}=function(t,e,i){let o=1,n=1,a=0,s=0;if(e<Cl){const r=t,l=r+e,c=Math.cos(r),d=Math.sin(r),h=Math.cos(l),u=Math.sin(l),m=(t,e,o)=>Zl(t,r,l,!0)?1:Math.max(e,e*i,o,o*i),p=(t,e,o)=>Zl(t,r,l,!0)?-1:Math.min(e,e*i,o,o*i),_=m(0,c,h),g=m(Ll,d,u),f=p(Dl,c,h),b=p(Dl+Ll,d,u);o=(_-f)/2,n=(g-b)/2,a=-(_+f)/2,s=-(g+b)/2}return{ratioX:o,ratioY:n,offsetX:a,offsetY:s}}(u,h,r),f=(i.width-a)/m,b=(i.height-a)/p,v=Math.max(Math.min(f,b)/2,0),y=hl(this.options.radius,v),w=(y-Math.max(y*r,0))/this._getVisibleDatasetWeightTotal();this.offsetX=_*y,this.offsetY=g*y,o.total=this.calculateTotal(),this.outerRadius=y-w*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-w*d,0),this.updateElements(n,0,n.length,t)}_circumference(t,e){const i=this.options,o=this._cachedMeta,n=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===o._parsed[t]||o.data[t].hidden?0:this.calculateCircumference(o._parsed[t]*n/Cl)}updateElements(t,e,i,o){const n="reset"===o,a=this.chart,s=a.chartArea,r=a.options.animation,l=(s.left+s.right)/2,c=(s.top+s.bottom)/2,d=n&&r.animateScale,h=d?0:this.innerRadius,u=d?0:this.outerRadius,{sharedOptions:m,includeOptions:p}=this._getSharedOptions(e,o);let _,g=this._getRotation();for(_=0;_<e;++_)g+=this._circumference(_,n);for(_=e;_<e+i;++_){const e=this._circumference(_,n),i=t[_],a={x:l+this.offsetX,y:c+this.offsetY,startAngle:g,endAngle:g+e,circumference:e,outerRadius:u,innerRadius:h};p&&(a.options=m||this.resolveDataElementOptions(_,i.active?"active":o)),g+=e,this.updateElement(i,_,a,o)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let i,o=0;for(i=0;i<e.length;i++){const n=t._parsed[i];null===n||isNaN(n)||!this.chart.getDataVisibility(i)||e[i].hidden||(o+=Math.abs(n))}return o}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?Cl*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,o=i.data.labels||[],n=vc(e._parsed[t],i.options.locale);return{label:o[t]||"",value:n}}getMaxBorderWidth(t){let e=0;const i=this.chart;let o,n,a,s,r;if(!t)for(o=0,n=i.data.datasets.length;o<n;++o)if(i.isDatasetVisible(o)){a=i.getDatasetMeta(o),t=a.data,s=a.controller;break}if(!t)return 0;for(o=0,n=t.length;o<n;++o)r=s.resolveDataElementOptions(o),"inner"!==r.borderAlign&&(e=Math.max(e,r.borderWidth||0,r.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,o=t.length;i<o;++i){const t=this.resolveDataElementOptions(i);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(dl(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class Th extends uh{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:o=[],_dataset:n}=e,a=this.chart._animationsDisabled;let{start:s,count:r}=rc(e,o,a);this._drawStart=s,this._drawCount=r,lc(e)&&(s=0,r=o.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!n._decimated,i.points=o;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!a,options:l},t),this.updateElements(o,s,r,t)}updateElements(t,e,i,o){const n="reset"===o,{iScale:a,vScale:s,_stacked:r,_dataset:l}=this._cachedMeta,{sharedOptions:c,includeOptions:d}=this._getSharedOptions(e,o),h=a.axis,u=s.axis,{spanGaps:m,segment:p}=this.options,_=Il(m)?m:Number.POSITIVE_INFINITY,g=this.chart._animationsDisabled||n||"none"===o,f=e+i,b=t.length;let v=e>0&&this.getParsed(e-1);for(let i=0;i<b;++i){const m=t[i],b=g?m:{};if(i<e||i>=f){b.skip=!0;continue}const y=this.getParsed(i),w=al(y[u]),x=b[h]=a.getPixelForValue(y[h],i),k=b[u]=n||w?s.getBasePixel():s.getPixelForValue(r?this.applyStack(s,y,r):y[u],i);b.skip=isNaN(x)||isNaN(k)||w,b.stop=i>0&&Math.abs(y[h]-v[h])>_,p&&(b.parsed=y,b.raw=l.data[i]),d&&(b.options=c||this.resolveDataElementOptions(i,m.active?"active":o)),g||this.updateElement(m,i,b,o),v=y}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,o=t.data||[];if(!o.length)return i;const n=o[0].size(this.resolveDataElementOptions(0)),a=o[o.length-1].size(this.resolveDataElementOptions(o.length-1));return Math.max(i,n,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}class Sh extends uh{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:o}}=t.legend.options;return e.labels.map(((e,n)=>{const a=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,fontColor:o,lineWidth:a.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,o=i.data.labels||[],n=vc(e._parsed[t].r,i.options.locale);return{label:o[t]||"",value:n}}parseObjectData(t,e,i,o){return md.bind(this)(t,e,i,o)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach(((t,i)=>{const o=this.getParsed(i).r;!isNaN(o)&&this.chart.getDataVisibility(i)&&(o<e.min&&(e.min=o),o>e.max&&(e.max=o))})),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,o=Math.min(e.right-e.left,e.bottom-e.top),n=Math.max(o/2,0),a=(n-Math.max(i.cutoutPercentage?n/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=n-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,e,i,o){const n="reset"===o,a=this.chart,s=a.options.animation,r=this._cachedMeta.rScale,l=r.xCenter,c=r.yCenter,d=r.getIndexAngle(0)-.5*Dl;let h,u=d;const m=360/this.countVisibleElements();for(h=0;h<e;++h)u+=this._computeAngle(h,o,m);for(h=e;h<e+i;h++){const e=t[h];let i=u,p=u+this._computeAngle(h,o,m),_=a.getDataVisibility(h)?r.getDistanceFromCenterForValue(this.getParsed(h).r):0;u=p,n&&(s.animateScale&&(_=0),s.animateRotate&&(i=p=d));const g={x:l,y:c,innerRadius:0,outerRadius:_,startAngle:i,endAngle:p,options:this.resolveDataElementOptions(h,e.active?"active":o)};this.updateElement(e,h,g,o)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach(((t,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++})),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?Fl(this.resolveDataElementOptions(t,e).angle||i):0}}class Mh extends kh{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}class Dh extends uh{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,o){return md.bind(this)(t,e,i,o)}update(t){const e=this._cachedMeta,i=e.dataset,o=e.data||[],n=e.iScale.getLabels();if(i.points=o,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const a={_loop:!0,_fullLoop:n.length===o.length,options:e};this.updateElement(i,void 0,a,t)}this.updateElements(o,0,o.length,t)}updateElements(t,e,i,o){const n=this._cachedMeta.rScale,a="reset"===o;for(let s=e;s<e+i;s++){const e=t[s],i=this.resolveDataElementOptions(s,e.active?"active":o),r=n.getPointPositionForValue(s,this.getParsed(s).r),l=a?n.xCenter:r.x,c=a?n.yCenter:r.y,d={x:l,y:c,angle:r.angle,skip:isNaN(l)||isNaN(c),options:i};this.updateElement(e,s,d,o)}}}class Ch extends uh{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:o,yScale:n}=e,a=this.getParsed(t),s=o.getLabelForValue(a.x),r=n.getLabelForValue(a.y);return{label:i[t]||"",value:"("+s+", "+r+")"}}update(t){const e=this._cachedMeta,{data:i=[]}=e,o=this.chart._animationsDisabled;let{start:n,count:a}=rc(e,i,o);if(this._drawStart=n,this._drawCount=a,lc(e)&&(n=0,a=i.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:n,_dataset:a}=e;n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!a._decimated,n.points=i;const s=this.resolveDatasetElementOptions(t);s.segment=this.options.segment,this.updateElement(n,void 0,{animated:!o,options:s},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(i,n,a,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,i,o){const n="reset"===o,{iScale:a,vScale:s,_stacked:r,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(e,o),d=this.getSharedOptions(c),h=this.includeOptions(o,d),u=a.axis,m=s.axis,{spanGaps:p,segment:_}=this.options,g=Il(p)?p:Number.POSITIVE_INFINITY,f=this.chart._animationsDisabled||n||"none"===o;let b=e>0&&this.getParsed(e-1);for(let c=e;c<e+i;++c){const e=t[c],i=this.getParsed(c),p=f?e:{},v=al(i[m]),y=p[u]=a.getPixelForValue(i[u],c),w=p[m]=n||v?s.getBasePixel():s.getPixelForValue(r?this.applyStack(s,i,r):i[m],c);p.skip=isNaN(y)||isNaN(w)||v,p.stop=c>0&&Math.abs(i[u]-b[u])>g,_&&(p.parsed=i,p.raw=l.data[c]),h&&(p.options=d||this.resolveDataElementOptions(c,e.active?"active":o)),f||this.updateElement(e,c,p,o),b=i}this.updateSharedOptions(d,o,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let i=e.length-1;i>=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}const i=t.dataset,o=i.options&&i.options.borderWidth||0;if(!e.length)return o;const n=e[0].size(this.resolveDataElementOptions(0)),a=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(o,n,a)/2}}var Ah=Object.freeze({__proto__:null,BarController:wh,BubbleController:xh,DoughnutController:kh,LineController:Th,PieController:Mh,PolarAreaController:Sh,RadarController:Dh,ScatterController:Ch});function Ph(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Eh{static override(t){Object.assign(Eh.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return Ph()}parse(){return Ph()}format(){return Ph()}add(){return Ph()}diff(){return Ph()}startOf(){return Ph()}endOf(){return Ph()}}var Lh={_date:Eh};function $h(t,e,i,o){const{controller:n,data:a,_sorted:s}=t,r=n._cachedMeta.iScale,l=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(r&&e===r.axis&&"r"!==e&&s&&a.length){const s=r._reversePixels?Jl:Ql;if(!o){const o=s(a,e,i);if(l){const{vScale:e}=n._cachedMeta,{_parsed:i}=t,a=i.slice(0,o.lo+1).reverse().findIndex((t=>!al(t[e.axis])));o.lo-=Math.max(0,a);const s=i.slice(o.hi).findIndex((t=>!al(t[e.axis])));o.hi+=Math.max(0,s)}return o}if(n._sharedOptions){const t=a[0],o="function"==typeof t.getRange&&t.getRange(e);if(o){const t=s(a,e,i-o),n=s(a,e,i+o);return{lo:t.lo,hi:n.hi}}}}return{lo:0,hi:a.length-1}}function zh(t,e,i,o,n){const a=t.getSortedVisibleDatasetMetas(),s=i[e];for(let t=0,i=a.length;t<i;++t){const{index:i,data:r}=a[t],{lo:l,hi:c}=$h(a[t],e,s,n);for(let t=l;t<=c;++t){const e=r[t];e.skip||o(e,i,t)}}}function Oh(t,e,i,o,n){const a=[];if(!n&&!t.isPointInArea(e))return a;return zh(t,i,e,(function(i,s,r){(n||zc(i,t.chartArea,0))&&i.inRange(e.x,e.y,o)&&a.push({element:i,datasetIndex:s,index:r})}),!0),a}function Vh(t,e,i,o,n,a){let s=[];const r=function(t){const e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,o){const n=e?Math.abs(t.x-o.x):0,a=i?Math.abs(t.y-o.y):0;return Math.sqrt(Math.pow(n,2)+Math.pow(a,2))}}(i);let l=Number.POSITIVE_INFINITY;return zh(t,i,e,(function(i,c,d){const h=i.inRange(e.x,e.y,n);if(o&&!h)return;const u=i.getCenterPoint(n);if(!(!!a||t.isPointInArea(u))&&!h)return;const m=r(e,u);m<l?(s=[{element:i,datasetIndex:c,index:d}],l=m):m===l&&s.push({element:i,datasetIndex:c,index:d})})),s}function Hh(t,e,i,o,n,a){return a||t.isPointInArea(e)?"r"!==i||o?Vh(t,e,i,o,n,a):function(t,e,i,o){let n=[];return zh(t,i,e,(function(t,i,a){const{startAngle:s,endAngle:r}=t.getProps(["startAngle","endAngle"],o),{angle:l}=jl(t,{x:e.x,y:e.y});Zl(l,s,r)&&n.push({element:t,datasetIndex:i,index:a})})),n}(t,e,i,n):[]}function Rh(t,e,i,o,n){const a=[],s="x"===i?"inXRange":"inYRange";let r=!1;return zh(t,i,e,((t,o,l)=>{t[s]&&t[s](e[i],n)&&(a.push({element:t,datasetIndex:o,index:l}),r=r||t.inRange(e.x,e.y,n))})),o&&!r?[]:a}var Ih={evaluateInteractionItems:zh,modes:{index(t,e,i,o){const n=Cd(e,t),a=i.axis||"x",s=i.includeInvisible||!1,r=i.intersect?Oh(t,n,a,o,s):Hh(t,n,a,!1,o,s),l=[];return r.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=r[0].index,i=t.data[e];i&&!i.skip&&l.push({element:i,datasetIndex:t.index,index:e})})),l):[]},dataset(t,e,i,o){const n=Cd(e,t),a=i.axis||"xy",s=i.includeInvisible||!1;let r=i.intersect?Oh(t,n,a,o,s):Hh(t,n,a,!1,o,s);if(r.length>0){const e=r[0].datasetIndex,i=t.getDatasetMeta(e).data;r=[];for(let t=0;t<i.length;++t)r.push({element:i[t],datasetIndex:e,index:t})}return r},point:(t,e,i,o)=>Oh(t,Cd(e,t),i.axis||"xy",o,i.includeInvisible||!1),nearest(t,e,i,o){const n=Cd(e,t),a=i.axis||"xy",s=i.includeInvisible||!1;return Hh(t,n,a,i.intersect,o,s)},x:(t,e,i,o)=>Rh(t,Cd(e,t),"x",i.intersect,o),y:(t,e,i,o)=>Rh(t,Cd(e,t),"y",i.intersect,o)}};const Nh=["left","top","right","bottom"];function Fh(t,e){return t.filter((t=>t.pos===e))}function Wh(t,e){return t.filter((t=>-1===Nh.indexOf(t.pos)&&t.box.axis===e))}function Bh(t,e){return t.sort(((t,i)=>{const o=e?i:t,n=e?t:i;return o.weight===n.weight?o.index-n.index:o.weight-n.weight}))}function jh(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:o,stackWeight:n}=i;if(!t||!Nh.includes(o))continue;const a=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=n}return e}(t),{vBoxMaxWidth:o,hBoxMaxHeight:n}=e;let a,s,r;for(a=0,s=t.length;a<s;++a){r=t[a];const{fullSize:s}=r.box,l=i[r.stack],c=l&&r.stackWeight/l.weight;r.horizontal?(r.width=c?c*o:s&&e.availableWidth,r.height=n):(r.width=o,r.height=c?c*n:s&&e.availableHeight)}return i}function Uh(t,e,i,o){return Math.max(t[i],e[i])+Math.max(t[o],e[o])}function Yh(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function qh(t,e,i,o){const{pos:n,box:a}=i,s=t.maxPadding;if(!rl(n)){i.size&&(t[n]-=i.size);const e=o[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?a.height:a.width),i.size=e.size/e.count,t[n]+=i.size}a.getPadding&&Yh(s,a.getPadding());const r=Math.max(0,e.outerWidth-Uh(s,t,"left","right")),l=Math.max(0,e.outerHeight-Uh(s,t,"top","bottom")),c=r!==t.w,d=l!==t.h;return t.w=r,t.h=l,i.horizontal?{same:c,other:d}:{same:d,other:c}}function Zh(t,e){const i=e.maxPadding;function o(t){const o={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{o[t]=Math.max(e[t],i[t])})),o}return o(t?["left","right"]:["top","bottom"])}function Xh(t,e,i,o){const n=[];let a,s,r,l,c,d;for(a=0,s=t.length,c=0;a<s;++a){r=t[a],l=r.box,l.update(r.width||e.w,r.height||e.h,Zh(r.horizontal,e));const{same:s,other:h}=qh(e,i,r,o);c|=s&&n.length,d=d||h,l.fullSize||n.push(r)}return c&&Xh(n,e,i,o)||d}function Kh(t,e,i,o,n){t.top=i,t.left=e,t.right=e+o,t.bottom=i+n,t.width=o,t.height=n}function Gh(t,e,i,o){const n=i.padding;let{x:a,y:s}=e;for(const r of t){const t=r.box,l=o[r.stack]||{count:1,placed:0,weight:1},c=r.stackWeight/l.weight||1;if(r.horizontal){const o=e.w*c,a=l.size||t.height;Tl(l.start)&&(s=l.start),t.fullSize?Kh(t,n.left,s,i.outerWidth-n.right-n.left,a):Kh(t,e.left+l.placed,s,o,a),l.start=s,l.placed+=o,s=t.bottom}else{const o=e.h*c,s=l.size||t.width;Tl(l.start)&&(a=l.start),t.fullSize?Kh(t,a,n.top,s,i.outerHeight-n.bottom-n.top):Kh(t,a,e.top+l.placed,s,o),l.start=a,l.placed+=o,a=t.right}}e.x=a,e.y=s}var Qh={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(t,e,i,o){if(!t)return;const n=Kc(t.options.layout.padding),a=Math.max(e-n.width,0),s=Math.max(i-n.height,0),r=function(t){const e=function(t){const e=[];let i,o,n,a,s,r;for(i=0,o=(t||[]).length;i<o;++i)n=t[i],({position:a,options:{stack:s,stackWeight:r=1}}=n),e.push({index:i,box:n,pos:a,horizontal:n.isHorizontal(),weight:n.weight,stack:s&&a+s,stackWeight:r});return e}(t),i=Bh(e.filter((t=>t.box.fullSize)),!0),o=Bh(Fh(e,"left"),!0),n=Bh(Fh(e,"right")),a=Bh(Fh(e,"top"),!0),s=Bh(Fh(e,"bottom")),r=Wh(e,"x"),l=Wh(e,"y");return{fullSize:i,leftAndTop:o.concat(a),rightAndBottom:n.concat(l).concat(s).concat(r),chartArea:Fh(e,"chartArea"),vertical:o.concat(n).concat(l),horizontal:a.concat(s).concat(r)}}(t.boxes),l=r.vertical,c=r.horizontal;ml(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const d=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,h=Object.freeze({outerWidth:e,outerHeight:i,padding:n,availableWidth:a,availableHeight:s,vBoxMaxWidth:a/2/d,hBoxMaxHeight:s/2}),u=Object.assign({},n);Yh(u,Kc(o));const m=Object.assign({maxPadding:u,w:a,h:s,x:n.left,y:n.top},n),p=jh(l.concat(c),h);Xh(r.fullSize,m,h,p),Xh(l,m,h,p),Xh(c,m,h,p)&&Xh(l,m,h,p),function(t){const e=t.maxPadding;function i(i){const o=Math.max(e[i]-t[i],0);return t[i]+=o,o}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(m),Gh(r.leftAndTop,m,h,p),m.x+=m.w,m.y+=m.h,Gh(r.rightAndBottom,m,h,p),t.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},ml(r.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})}))}};class Jh{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,o){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,o?Math.floor(e/o):i)}}isAttached(t){return!0}updateConfig(t){}}class tu extends Jh{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const eu="$chartjs",iu={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},ou=t=>null===t||""===t;const nu=!!Ld&&{passive:!0};function au(t,e,i){t&&t.canvas&&t.canvas.removeEventListener(e,i,nu)}function su(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function ru(t,e,i){const o=t.canvas,n=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||su(i.addedNodes,o),e=e&&!su(i.removedNodes,o);e&&i()}));return n.observe(document,{childList:!0,subtree:!0}),n}function lu(t,e,i){const o=t.canvas,n=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||su(i.removedNodes,o),e=e&&!su(i.addedNodes,o);e&&i()}));return n.observe(document,{childList:!0,subtree:!0}),n}const cu=new Map;let du=0;function hu(){const t=window.devicePixelRatio;t!==du&&(du=t,cu.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function uu(t,e,i){const o=t.canvas,n=o&&xd(o);if(!n)return;const a=nc(((t,e)=>{const o=n.clientWidth;i(t,e),o<n.clientWidth&&i()}),window),s=new ResizeObserver((t=>{const e=t[0],i=e.contentRect.width,o=e.contentRect.height;0===i&&0===o||a(i,o)}));return s.observe(n),function(t,e){cu.size||window.addEventListener("resize",hu),cu.set(t,e)}(t,a),s}function mu(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){cu.delete(t),cu.size||window.removeEventListener("resize",hu)}(t)}function pu(t,e,i){const o=t.canvas,n=nc((e=>{null!==t.ctx&&i(function(t,e){const i=iu[t.type]||t.type,{x:o,y:n}=Cd(t,e);return{type:i,chart:e,native:t,x:void 0!==o?o:null,y:void 0!==n?n:null}}(e,t))}),t);return function(t,e,i){t&&t.addEventListener(e,i,nu)}(o,e,n),n}class _u extends Jh{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,o=t.getAttribute("height"),n=t.getAttribute("width");if(t[eu]={initial:{height:o,width:n,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",ou(n)){const e=$d(t,"width");void 0!==e&&(t.width=e)}if(ou(o))if(""===t.style.height)t.height=t.width/(e||2);else{const e=$d(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[eu])return!1;const i=e[eu].initial;["height","width"].forEach((t=>{const o=i[t];al(o)?e.removeAttribute(t):e.setAttribute(t,o)}));const o=i.style||{};return Object.keys(o).forEach((t=>{e.style[t]=o[t]})),e.width=e.width,delete e[eu],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const o=t.$proxies||(t.$proxies={}),n={attach:ru,detach:lu,resize:uu}[e]||pu;o[e]=n(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),o=i[e];if(!o)return;({attach:mu,detach:mu,resize:mu}[e]||au)(t,e,o),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,o){return Pd(t,e,i,o)}isAttached(t){const e=t&&xd(t);return!(!e||!e.isConnected)}}function gu(t){return!wd()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?tu:_u}class fu{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return Il(this.x)&&Il(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const o={};return t.forEach((t=>{o[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),o}}function bu(t,e){const i=t.options.ticks,o=function(t){const e=t.options.offset,i=t._tickSize(),o=t._length/i+(e?0:1),n=t._maxLength/i;return Math.floor(Math.min(o,n))}(t),n=Math.min(i.maxTicksLimit||o,o),a=i.major.enabled?function(t){const e=[];let i,o;for(i=0,o=t.length;i<o;i++)t[i].major&&e.push(i);return e}(e):[],s=a.length,r=a[0],l=a[s-1],c=[];if(s>n)return function(t,e,i,o){let n,a=0,s=i[0];for(o=Math.ceil(o),n=0;n<t.length;n++)n===s&&(e.push(t[n]),a++,s=i[a*o])}(e,c,a,s/n),c;const d=function(t,e,i){const o=function(t){const e=t.length;let i,o;if(e<2)return!1;for(o=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==o)return!1;return o}(t),n=e.length/i;if(!o)return Math.max(n,1);const a=function(t){const e=[],i=Math.sqrt(t);let o;for(o=1;o<i;o++)t%o==0&&(e.push(o),e.push(t/o));return i===(0|i)&&e.push(i),e.sort(((t,e)=>t-e)).pop(),e}(o);for(let t=0,e=a.length-1;t<e;t++){const e=a[t];if(e>n)return e}return Math.max(n,1)}(a,e,n);if(s>0){let t,i;const o=s>1?Math.round((l-r)/(s-1)):null;for(vu(e,c,d,al(o)?0:r-o,r),t=0,i=s-1;t<i;t++)vu(e,c,d,a[t],a[t+1]);return vu(e,c,d,l,al(o)?e.length:l+o),c}return vu(e,c,d),c}function vu(t,e,i,o,n){const a=dl(o,0),s=Math.min(dl(n,t.length),t.length);let r,l,c,d=0;for(i=Math.ceil(i),n&&(r=n-o,i=r/Math.floor(r/i)),c=a;c<0;)d++,c=Math.round(a+d*i);for(l=Math.max(a,0);l<s;l++)l===c&&(e.push(t[l]),d++,c=Math.round(a+d*i))}const yu=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i,wu=(t,e)=>Math.min(e||t,t);function xu(t,e){const i=[],o=t.length/e,n=t.length;let a=0;for(;a<n;a+=o)i.push(t[Math.floor(a)]);return i}function ku(t,e,i){const o=t.ticks.length,n=Math.min(e,o-1),a=t._startPixel,s=t._endPixel,r=1e-6;let l,c=t.getPixelForTick(n);if(!(i&&(l=1===o?Math.max(c-a,s-c):0===e?(t.getPixelForTick(1)-c)/2:(c-t.getPixelForTick(n-1))/2,c+=n<e?l:-l,c<a-r||c>s+r)))return c}function Tu(t){return t.drawTicks?t.tickLength:0}function Su(t,e){if(!t.display)return 0;const i=Gc(t.font,e),o=Kc(t.padding);return(sl(t.text)?t.text.length:1)*i.lineHeight+o.height}function Mu(t,e,i){let o=ac(t);return(i&&"right"!==e||!i&&"right"===e)&&(o=(t=>"left"===t?"right":"right"===t?"left":t)(o)),o}class Du extends fu{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:o}=this;return t=cl(t,Number.POSITIVE_INFINITY),e=cl(e,Number.NEGATIVE_INFINITY),i=cl(i,Number.POSITIVE_INFINITY),o=cl(o,Number.NEGATIVE_INFINITY),{min:cl(t,i),max:cl(e,o),minDefined:ll(t),maxDefined:ll(e)}}getMinMax(t){let e,{min:i,max:o,minDefined:n,maxDefined:a}=this.getUserBounds();if(n&&a)return{min:i,max:o};const s=this.getMatchingVisibleMetas();for(let r=0,l=s.length;r<l;++r)e=s[r].controller.getMinMax(this,t),n||(i=Math.min(i,e.min)),a||(o=Math.max(o,e.max));return i=a&&i>o?o:i,o=n&&i>o?i:o,{min:cl(i,cl(o,i)),max:cl(o,cl(i,o))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){ul(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:o,grace:n,ticks:a}=this.options,s=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:o,max:n}=t,a=hl(e,(n-o)/2),s=(t,e)=>i&&0===t?0:t+e;return{min:s(o,-Math.abs(a)),max:s(n,a)}}(this,n,o),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const r=s<this.ticks.length;this._convertTicksToLabels(r?xu(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||"auto"===a.source)&&(this.ticks=bu(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),r&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,i=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,i=!i),this._startPixel=t,this._endPixel=e,this._reversePixels=i,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){ul(this.options.afterUpdate,[this])}beforeSetDimensions(){ul(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){ul(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),ul(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){ul(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let i,o,n;for(i=0,o=t.length;i<o;i++)n=t[i],n.label=ul(e.callback,[n.value,i,t],this)}afterTickToLabelConversion(){ul(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){ul(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=wu(this.ticks.length,t.ticks.maxTicksLimit),o=e.minRotation||0,n=e.maxRotation;let a,s,r,l=o;if(!this._isVisible()||!e.display||o>=n||i<=1||!this.isHorizontal())return void(this.labelRotation=o);const c=this._getLabelSizes(),d=c.widest.width,h=c.highest.height,u=Xl(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/i:u/(i-1),d+6>a&&(a=u/(i-(t.offset?.5:1)),s=this.maxHeight-Tu(t.grid)-e.padding-Su(t.title,this.chart.options.font),r=Math.sqrt(d*d+h*h),l=Wl(Math.min(Math.asin(Xl((c.highest.height+6)/a,-1,1)),Math.asin(Xl(s/r,-1,1))-Math.asin(Xl(h/r,-1,1)))),l=Math.max(o,Math.min(n,l))),this.labelRotation=l}afterCalculateLabelRotation(){ul(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){ul(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:o,grid:n}}=this,a=this._isVisible(),s=this.isHorizontal();if(a){const a=Su(o,e.options.font);if(s?(t.width=this.maxWidth,t.height=Tu(n)+a):(t.height=this.maxHeight,t.width=Tu(n)+a),i.display&&this.ticks.length){const{first:e,last:o,widest:n,highest:a}=this._getLabelSizes(),r=2*i.padding,l=Fl(this.labelRotation),c=Math.cos(l),d=Math.sin(l);if(s){const e=i.mirror?0:d*n.width+c*a.height;t.height=Math.min(this.maxHeight,t.height+e+r)}else{const e=i.mirror?0:c*n.width+d*a.height;t.width=Math.min(this.maxWidth,t.width+e+r)}this._calculatePadding(e,o,d,c)}}this._handleMargins(),s?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,o){const{ticks:{align:n,padding:a},position:s}=this.options,r=0!==this.labelRotation,l="top"!==s&&"x"===this.axis;if(this.isHorizontal()){const s=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let d=0,h=0;r?l?(d=o*t.width,h=i*e.height):(d=i*t.height,h=o*e.width):"start"===n?h=e.width:"end"===n?d=t.width:"inner"!==n&&(d=t.width/2,h=e.width/2),this.paddingLeft=Math.max((d-s+a)*this.width/(this.width-s),0),this.paddingRight=Math.max((h-c+a)*this.width/(this.width-c),0)}else{let i=e.height/2,o=t.height/2;"start"===n?(i=0,o=t.height):"end"===n&&(i=e.height,o=0),this.paddingTop=i+a,this.paddingBottom=o+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){ul(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e<i;e++)al(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=xu(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,i){const{ctx:o,_longestTextCache:n}=this,a=[],s=[],r=Math.floor(e/wu(e,i));let l,c,d,h,u,m,p,_,g,f,b,v=0,y=0;for(l=0;l<e;l+=r){if(h=t[l].label,u=this._resolveTickFontOptions(l),o.font=m=u.string,p=n[m]=n[m]||{data:{},gc:[]},_=u.lineHeight,g=f=0,al(h)||sl(h)){if(sl(h))for(c=0,d=h.length;c<d;++c)b=h[c],al(b)||sl(b)||(g=Cc(o,p.data,p.gc,g,b),f+=_)}else g=Cc(o,p.data,p.gc,g,h),f=_;a.push(g),s.push(f),v=Math.max(g,v),y=Math.max(f,y)}!function(t,e){ml(t,(t=>{const i=t.gc,o=i.length/2;let n;if(o>e){for(n=0;n<o;++n)delete t.data[i[n]];i.splice(0,o)}}))}(n,e);const w=a.indexOf(v),x=s.indexOf(y),k=t=>({width:a[t]||0,height:s[t]||0});return{first:k(0),last:k(e-1),widest:k(w),highest:k(x),widths:a,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Xl(this._alignToPixels?Pc(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const i=e[t];return i.$context||(i.$context=function(t,e,i){return Jc(t,{tick:i,index:e,type:"tick"})}(this.getContext(),t,i))}return this.$context||(this.$context=Jc(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){const t=this.options.ticks,e=Fl(this.labelRotation),i=Math.abs(Math.cos(e)),o=Math.abs(Math.sin(e)),n=this._getLabelSizes(),a=t.autoSkipPadding||0,s=n?n.widest.width+a:0,r=n?n.highest.height+a:0;return this.isHorizontal()?r*i>s*o?s/i:r/o:r*o<s*i?r/i:s/o}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,o=this.options,{grid:n,position:a,border:s}=o,r=n.offset,l=this.isHorizontal(),c=this.ticks.length+(r?1:0),d=Tu(n),h=[],u=s.setContext(this.getContext()),m=u.display?u.width:0,p=m/2,_=function(t){return Pc(i,t,m)};let g,f,b,v,y,w,x,k,T,S,M,D;if("top"===a)g=_(this.bottom),w=this.bottom-d,k=g-p,S=_(t.top)+p,D=t.bottom;else if("bottom"===a)g=_(this.top),S=t.top,D=_(t.bottom)-p,w=g+p,k=this.top+d;else if("left"===a)g=_(this.right),y=this.right-d,x=g-p,T=_(t.left)+p,M=t.right;else if("right"===a)g=_(this.left),T=t.left,M=_(t.right)-p,y=g+p,x=this.left+d;else if("x"===e){if("center"===a)g=_((t.top+t.bottom)/2+.5);else if(rl(a)){const t=Object.keys(a)[0],e=a[t];g=_(this.chart.scales[t].getPixelForValue(e))}S=t.top,D=t.bottom,w=g+p,k=w+d}else if("y"===e){if("center"===a)g=_((t.left+t.right)/2);else if(rl(a)){const t=Object.keys(a)[0],e=a[t];g=_(this.chart.scales[t].getPixelForValue(e))}y=g-p,x=y-d,T=t.left,M=t.right}const C=dl(o.ticks.maxTicksLimit,c),A=Math.max(1,Math.ceil(c/C));for(f=0;f<c;f+=A){const t=this.getContext(f),e=n.setContext(t),o=s.setContext(t),a=e.lineWidth,c=e.color,d=o.dash||[],u=o.dashOffset,m=e.tickWidth,p=e.tickColor,_=e.tickBorderDash||[],g=e.tickBorderDashOffset;b=ku(this,f,r),void 0!==b&&(v=Pc(i,b,a),l?y=x=T=M=v:w=k=S=D=v,h.push({tx1:y,ty1:w,tx2:x,ty2:k,x1:T,y1:S,x2:M,y2:D,width:a,color:c,borderDash:d,borderDashOffset:u,tickWidth:m,tickColor:p,tickBorderDash:_,tickBorderDashOffset:g}))}return this._ticksLength=c,this._borderValue=g,h}_computeLabelItems(t){const e=this.axis,i=this.options,{position:o,ticks:n}=i,a=this.isHorizontal(),s=this.ticks,{align:r,crossAlign:l,padding:c,mirror:d}=n,h=Tu(i.grid),u=h+c,m=d?-c:u,p=-Fl(this.labelRotation),_=[];let g,f,b,v,y,w,x,k,T,S,M,D,C="middle";if("top"===o)w=this.bottom-m,x=this._getXAxisLabelAlignment();else if("bottom"===o)w=this.top+m,x=this._getXAxisLabelAlignment();else if("left"===o){const t=this._getYAxisLabelAlignment(h);x=t.textAlign,y=t.x}else if("right"===o){const t=this._getYAxisLabelAlignment(h);x=t.textAlign,y=t.x}else if("x"===e){if("center"===o)w=(t.top+t.bottom)/2+u;else if(rl(o)){const t=Object.keys(o)[0],e=o[t];w=this.chart.scales[t].getPixelForValue(e)+u}x=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===o)y=(t.left+t.right)/2-u;else if(rl(o)){const t=Object.keys(o)[0],e=o[t];y=this.chart.scales[t].getPixelForValue(e)}x=this._getYAxisLabelAlignment(h).textAlign}"y"===e&&("start"===r?C="top":"end"===r&&(C="bottom"));const A=this._getLabelSizes();for(g=0,f=s.length;g<f;++g){b=s[g],v=b.label;const t=n.setContext(this.getContext(g));k=this.getPixelForTick(g)+n.labelOffset,T=this._resolveTickFontOptions(g),S=T.lineHeight,M=sl(v)?v.length:1;const e=M/2,i=t.color,r=t.textStrokeColor,c=t.textStrokeWidth;let h,u=x;if(a?(y=k,"inner"===x&&(u=g===f-1?this.options.reverse?"left":"right":0===g?this.options.reverse?"right":"left":"center"),D="top"===o?"near"===l||0!==p?-M*S+S/2:"center"===l?-A.highest.height/2-e*S+S:-A.highest.height+S/2:"near"===l||0!==p?S/2:"center"===l?A.highest.height/2-e*S:A.highest.height-M*S,d&&(D*=-1),0===p||t.showLabelBackdrop||(y+=S/2*Math.sin(p))):(w=k,D=(1-M)*S/2),t.showLabelBackdrop){const e=Kc(t.backdropPadding),i=A.heights[g],o=A.widths[g];let n=D-e.top,a=0-e.left;switch(C){case"middle":n-=i/2;break;case"bottom":n-=i}switch(x){case"center":a-=o/2;break;case"right":a-=o;break;case"inner":g===f-1?a-=o:g>0&&(a-=o/2)}h={left:a,top:n,width:o+e.width,height:i+e.height,color:t.backdropColor}}_.push({label:v,font:T,textOffset:D,options:{rotation:p,color:i,strokeColor:r,strokeWidth:c,textAlign:u,textBaseline:C,translation:[y,w],backdrop:h}})}return _}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-Fl(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align?i="right":"inner"===e.align&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:o,padding:n}}=this.options,a=t+n,s=this._getLabelSizes().widest.width;let r,l;return"left"===e?o?(l=this.right+n,"near"===i?r="left":"center"===i?(r="center",l+=s/2):(r="right",l+=s)):(l=this.right-a,"near"===i?r="right":"center"===i?(r="center",l-=s/2):(r="left",l=this.left)):"right"===e?o?(l=this.left+n,"near"===i?r="right":"center"===i?(r="center",l-=s/2):(r="left",l-=s)):(l=this.left+a,"near"===i?r="left":"center"===i?(r="center",l+=s/2):(r="right",l=this.right)):r="right",{textAlign:r,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:o,width:n,height:a}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,o,n,a),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const i=this.ticks.findIndex((e=>e.value===t));if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,o=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let n,a;const s=(t,e,o)=>{o.width&&o.color&&(i.save(),i.lineWidth=o.width,i.strokeStyle=o.color,i.setLineDash(o.borderDash||[]),i.lineDashOffset=o.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(n=0,a=o.length;n<a;++n){const t=o[n];e.drawOnChartArea&&s({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&s({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:i,grid:o}}=this,n=i.setContext(this.getContext()),a=i.display?n.width:0;if(!a)return;const s=o.setContext(this.getContext(0)).lineWidth,r=this._borderValue;let l,c,d,h;this.isHorizontal()?(l=Pc(t,this.left,a)-a/2,c=Pc(t,this.right,s)+s/2,d=h=r):(d=Pc(t,this.top,a)-a/2,h=Pc(t,this.bottom,s)+s/2,l=c=r),e.save(),e.lineWidth=n.width,e.strokeStyle=n.color,e.beginPath(),e.moveTo(l,d),e.lineTo(c,h),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const e=this.ctx,i=this._computeLabelArea();i&&Oc(e,i);const o=this.getLabelItems(t);for(const t of o){const i=t.options,o=t.font;Fc(e,t.label,0,t.textOffset,o,i)}i&&Vc(e)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:o}}=this;if(!i.display)return;const n=Gc(i.font),a=Kc(i.padding),s=i.align;let r=n.lineHeight/2;"bottom"===e||"center"===e||rl(e)?(r+=a.bottom,sl(i.text)&&(r+=n.lineHeight*(i.text.length-1))):r+=a.top;const{titleX:l,titleY:c,maxWidth:d,rotation:h}=function(t,e,i,o){const{top:n,left:a,bottom:s,right:r,chart:l}=t,{chartArea:c,scales:d}=l;let h,u,m,p=0;const _=s-n,g=r-a;if(t.isHorizontal()){if(u=sc(o,a,r),rl(i)){const t=Object.keys(i)[0],o=i[t];m=d[t].getPixelForValue(o)+_-e}else m="center"===i?(c.bottom+c.top)/2+_-e:yu(t,i,e);h=r-a}else{if(rl(i)){const t=Object.keys(i)[0],o=i[t];u=d[t].getPixelForValue(o)-g+e}else u="center"===i?(c.left+c.right)/2-g+e:yu(t,i,e);m=sc(o,s,n),p="left"===i?-Ll:Ll}return{titleX:u,titleY:m,maxWidth:h,rotation:p}}(this,r,e,s);Fc(t,i.text,0,0,n,{color:i.color,maxWidth:d,rotation:h,textAlign:Mu(s,e,o),textBaseline:"middle",translation:[l,c]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,i=dl(t.grid&&t.grid.z,-1),o=dl(t.border&&t.border.z,0);return this._isVisible()&&this.draw===Du.prototype.draw?[{z:i,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:o,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",o=[];let n,a;for(n=0,a=e.length;n<a;++n){const a=e[n];a[i]!==this.id||t&&a.type!==t||o.push(a)}return o}_resolveTickFontOptions(t){return Gc(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Cu{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let i;(function(t){return"id"in t&&"defaults"in t})(e)&&(i=this.register(e));const o=this.items,n=t.id,a=this.scope+"."+n;if(!n)throw new Error("class does not have id: "+t);return n in o||(o[n]=t,function(t,e,i){const o=bl(Object.create(null),[i?Dc.get(i):{},Dc.get(e),t.defaults]);Dc.set(e,o),t.defaultRoutes&&function(t,e){Object.keys(e).forEach((i=>{const o=i.split("."),n=o.pop(),a=[t].concat(o).join("."),s=e[i].split("."),r=s.pop(),l=s.join(".");Dc.route(a,n,l,r)}))}(e,t.defaultRoutes);t.descriptors&&Dc.describe(e,t.descriptors)}(t,a,i),this.override&&Dc.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,o=this.scope;i in e&&delete e[i],o&&i in Dc[o]&&(delete Dc[o][i],this.override&&delete xc[i])}}class Au{constructor(){this.controllers=new Cu(uh,"datasets",!0),this.elements=new Cu(fu,"elements"),this.plugins=new Cu(Object,"plugins"),this.scales=new Cu(Du,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach((e=>{const o=i||this._getRegistryForType(e);i||o.isForType(e)||o===this.plugins&&e.id?this._exec(t,o,e):ml(e,(e=>{const o=i||this._getRegistryForType(e);this._exec(t,o,e)}))}))}_exec(t,e,i){const o=kl(t);ul(i["before"+o],[],i),e[t](i),ul(i["after"+o],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const o=e.get(t);if(void 0===o)throw new Error('"'+t+'" is not a registered '+i+".");return o}}var Pu=new Au;class Eu{constructor(){this._init=void 0}notify(t,e,i,o){if("beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),void 0===this._init)return;const n=o?this._descriptors(t).filter(o):this._descriptors(t),a=this._notify(n,t,e,i);return"afterDestroy"===e&&(this._notify(n,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),a}_notify(t,e,i,o){o=o||{};for(const n of t){const t=n.plugin;if(!1===ul(t[i],[e,o,n.options],t)&&o.cancelable)return!1}return!0}invalidate(){al(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,o=dl(i.options&&i.options.plugins,{}),n=function(t){const e={},i=[],o=Object.keys(Pu.plugins.items);for(let t=0;t<o.length;t++)i.push(Pu.getPlugin(o[t]));const n=t.plugins||[];for(let t=0;t<n.length;t++){const o=n[t];-1===i.indexOf(o)&&(i.push(o),e[o.id]=!0)}return{plugins:i,localIds:e}}(i);return!1!==o||e?function(t,{plugins:e,localIds:i},o,n){const a=[],s=t.getContext();for(const r of e){const e=r.id,l=Lu(o[e],n);null!==l&&a.push({plugin:r,options:$u(t.config,{plugin:r,local:i[e]},l,s)})}return a}(t,n,o,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,o=(t,e)=>t.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(o(e,i),t,"stop"),this._notify(o(i,e),t,"start")}}function Lu(t,e){return e||!1!==t?!0===t?{}:t:null}function $u(t,{plugin:e,local:i},o,n){const a=t.pluginScopeKeys(e),s=t.getOptionScopes(o,a);return i&&e.defaults&&s.push(e.defaults),t.createResolver(s,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function zu(t,e){const i=Dc.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function Ou(t){if("x"===t||"y"===t||"r"===t)return t}function Vu(t,...e){if(Ou(t))return t;for(const o of e){const e=o.axis||("top"===(i=o.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.length>1&&Ou(t[0].toLowerCase());if(e)return e}var i;throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Hu(t,e,i){if(i[e+"AxisID"]===t)return{axis:e}}function Ru(t,e){const i=xc[t.type]||{scales:{}},o=e.scales||{},n=zu(t.type,e),a=Object.create(null);return Object.keys(o).forEach((e=>{const s=o[e];if(!rl(s))return console.error(`Invalid scale configuration for scale: ${e}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);const r=Vu(e,s,function(t,e){if(e.data&&e.data.datasets){const i=e.data.datasets.filter((e=>e.xAxisID===t||e.yAxisID===t));if(i.length)return Hu(t,"x",i[0])||Hu(t,"y",i[0])}return{}}(e,t),Dc.scales[s.type]),l=function(t,e){return t===e?"_index_":"_value_"}(r,n),c=i.scales||{};a[e]=vl(Object.create(null),[{axis:r},s,c[r],c[l]])})),t.data.datasets.forEach((i=>{const n=i.type||t.type,s=i.indexAxis||zu(n,e),r=(xc[n]||{}).scales||{};Object.keys(r).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,s),n=i[e+"AxisID"]||e;a[n]=a[n]||Object.create(null),vl(a[n],[{axis:e},o[n],r[t]])}))})),Object.keys(a).forEach((t=>{const e=a[t];vl(e,[Dc.scales[e.type],Dc.scale])})),a}function Iu(t){const e=t.options||(t.options={});e.plugins=dl(e.plugins,{}),e.scales=Ru(t,e)}function Nu(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const Fu=new Map,Wu=new Set;function Bu(t,e){let i=Fu.get(t);return i||(i=e(),Fu.set(t,i),Wu.add(i)),i}const ju=(t,e,i)=>{const o=xl(e,i);void 0!==o&&t.add(o)};class Uu{constructor(t){this._config=function(t){return(t=t||{}).data=Nu(t.data),Iu(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Nu(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Iu(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Bu(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return Bu(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return Bu(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return Bu(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let o=i.get(t);return o&&!e||(o=new Map,i.set(t,o)),o}getOptionScopes(t,e,i){const{options:o,type:n}=this,a=this._cachedScopes(t,i),s=a.get(e);if(s)return s;const r=new Set;e.forEach((e=>{t&&(r.add(t),e.forEach((e=>ju(r,t,e)))),e.forEach((t=>ju(r,o,t))),e.forEach((t=>ju(r,xc[n]||{},t))),e.forEach((t=>ju(r,Dc,t))),e.forEach((t=>ju(r,kc,t)))}));const l=Array.from(r);return 0===l.length&&l.push(Object.create(null)),Wu.has(e)&&a.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,xc[e]||{},Dc.datasets[e]||{},{type:e},Dc,kc]}resolveNamedOptions(t,e,i,o=[""]){const n={$shared:!0},{resolver:a,subPrefixes:s}=Yu(this._resolverCache,t,o);let r=a;if(function(t,e){const{isScriptable:i,isIndexable:o}=id(t);for(const n of e){const e=i(n),a=o(n),s=(a||e)&&t[n];if(e&&(Sl(s)||qu(s))||a&&sl(s))return!0}return!1}(a,e)){n.$shared=!1;r=ed(a,i=Sl(i)?i():i,this.createResolver(t,i,s))}for(const t of e)n[t]=r[t];return n}createResolver(t,e,i=[""],o){const{resolver:n}=Yu(this._resolverCache,t,i);return rl(e)?ed(n,e,void 0,o):n}}function Yu(t,e,i){let o=t.get(e);o||(o=new Map,t.set(e,o));const n=i.join();let a=o.get(n);if(!a){a={resolver:td(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},o.set(n,a)}return a}const qu=t=>rl(t)&&Object.getOwnPropertyNames(t).some((e=>Sl(t[e])));const Zu=["top","bottom","left","right","chartArea"];function Xu(t,e){return"top"===t||"bottom"===t||-1===Zu.indexOf(t)&&"x"===e}function Ku(t,e){return function(i,o){return i[t]===o[t]?i[e]-o[e]:i[t]-o[t]}}function Gu(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),ul(i&&i.onComplete,[t],e)}function Qu(t){const e=t.chart,i=e.options.animation;ul(i&&i.onProgress,[t],e)}function Ju(t){return wd()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const tm={},em=t=>{const e=Ju(t);return Object.values(tm).filter((t=>t.canvas===e)).pop()};function im(t,e,i){const o=Object.keys(t);for(const n of o){const o=+n;if(o>=e){const a=t[n];delete t[n],(i>0||o>e)&&(t[o+i]=a)}}}class om{static defaults=Dc;static instances=tm;static overrides=xc;static registry=Pu;static version="4.5.1";static getChart=em;static register(...t){Pu.add(...t),nm()}static unregister(...t){Pu.remove(...t),nm()}constructor(t,e){const i=this.config=new Uu(e),o=Ju(t),n=em(o);if(n)throw new Error("Canvas is already in use. Chart with ID '"+n.id+"' must be destroyed before the canvas with ID '"+n.canvas.id+"' can be reused.");const a=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||gu(o)),this.platform.updateConfig(i);const s=this.platform.acquireContext(o,a.aspectRatio),r=s&&s.canvas,l=r&&r.height,c=r&&r.width;this.id=nl(),this.ctx=s,this.canvas=r,this.width=c,this.height=l,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Eu,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...o){return e?(clearTimeout(i),i=setTimeout(t,e,o)):t.apply(this,o),e}}((t=>this.update(t)),a.resizeDelay||0),this._dataChanges=[],tm[this.id]=this,s&&r?(Kd.listen(this,"complete",Gu),Kd.listen(this,"progress",Qu),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:o,_aspectRatio:n}=this;return al(t)?e&&n?n:o?i/o:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Pu}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Ed(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ec(this.canvas,this.ctx),this}stop(){return Kd.stop(this),this}resize(t,e){Kd.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,o=this.canvas,n=i.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(o,t,e,n),s=i.devicePixelRatio||this.platform.getDevicePixelRatio(),r=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Ed(this,s,!0)&&(this.notifyPlugins("resize",{size:a}),ul(i.onResize,[this,a],this),this.attached&&this._doResize(r)&&this.render())}ensureScalesHaveIDs(){ml(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,o=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let n=[];e&&(n=n.concat(Object.keys(e).map((t=>{const i=e[t],o=Vu(t,i),n="r"===o,a="x"===o;return{options:i,dposition:n?"chartArea":a?"bottom":"left",dtype:n?"radialLinear":a?"category":"linear"}})))),ml(n,(e=>{const n=e.options,a=n.id,s=Vu(a,n),r=dl(n.type,e.dtype);void 0!==n.position&&Xu(n.position,s)===Xu(e.dposition)||(n.position=e.dposition),o[a]=!0;let l=null;if(a in i&&i[a].type===r)l=i[a];else{l=new(Pu.getScale(r))({id:a,type:r,ctx:this.ctx,chart:this}),i[l.id]=l}l.init(n,t)})),ml(o,((t,e)=>{t||delete i[e]})),ml(i,(t=>{Qh.configure(this,t,t.options),Qh.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;t<i;++t)this._destroyDatasetMeta(t);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(Ku("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,o;for(this._removeUnreferencedMetasets(),i=0,o=e.length;i<o;i++){const o=e[i];let n=this.getDatasetMeta(i);const a=o.type||this.config.type;if(n.type&&n.type!==a&&(this._destroyDatasetMeta(i),n=this.getDatasetMeta(i)),n.type=a,n.indexAxis=o.indexAxis||zu(a,this.options),n.order=o.order||0,n.index=i,n.label=""+o.label,n.visible=this.isDatasetVisible(i),n.controller)n.controller.updateIndex(i),n.controller.linkScales();else{const e=Pu.getController(a),{datasetElementType:o,dataElementType:s}=Dc.datasets[a];Object.assign(e,{dataElementType:Pu.getElement(s),datasetElementType:o&&Pu.getElement(o)}),n.controller=new e(this,i),t.push(n.controller)}}return this._updateMetasets(),t}_resetElements(){ml(this.data.datasets,((t,e)=>{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),o=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const n=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let t=0,e=this.data.datasets.length;t<e;t++){const{controller:e}=this.getDatasetMeta(t),i=!o&&-1===n.indexOf(e);e.buildOrUpdateElements(i),a=Math.max(+e.getMaxOverflow(),a)}a=this._minPadding=i.layout.autoPadding?a:0,this._updateLayout(a),o||ml(n,(t=>{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Ku("z","_idx"));const{_active:s,_lastEvent:r}=this;r?this._eventHandler(r,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){ml(this.scales,(t=>{Qh.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);Ml(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:o,count:n}of e){im(t,o,"_removeElements"===i?-n:n)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),o=i(0);for(let t=1;t<e;t++)if(!Ml(o,i(t)))return;return Array.from(o).map((t=>t.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;Qh.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],ml(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,Sl(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),o={meta:i,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",o)&&(i.controller._update(e),o.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",o))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(Kd.has(this)?this.attached&&!Kd.running(this)&&Kd.start(this):(this.draw(),Gu({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(t,e)}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let o,n;for(o=0,n=e.length;o<n;++o){const n=e[o];t&&!n.visible||i.push(n)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i={meta:t,index:t.index,cancelable:!0},o=Zd(this,t);!1!==this.notifyPlugins("beforeDatasetDraw",i)&&(o&&Oc(e,o),t.controller.draw(),o&&Vc(e),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(t){return zc(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,o){const n=Ih.modes[e];return"function"==typeof n?n(this,t,i,o):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let o=i.filter((t=>t&&t._dataset===e)).pop();return o||(o={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(o)),o}getContext(){return this.$context||(this.$context=Jc(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const o=i?"show":"hide",n=this.getDatasetMeta(t),a=n.controller._resolveAnimations(void 0,o);Tl(e)?(n.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),a.update(n,{visible:i}),this.update((e=>e.datasetIndex===t?o:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Kd.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Ec(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete tm[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,i=(i,o)=>{e.addEventListener(this,i,o),t[i]=o},o=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};ml(this.options.events,(t=>i(t,o)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,o)=>{e.addEventListener(this,i,o),t[i]=o},o=(i,o)=>{t[i]&&(e.removeEventListener(this,i,o),delete t[i])},n=(t,e)=>{this.canvas&&this.resize(t,e)};let a;const s=()=>{o("attach",s),this.attached=!0,this.resize(),i("resize",n),i("detach",a)};a=()=>{this.attached=!1,o("resize",n),this._stop(),this._resize(0,0),i("attach",s)},e.isAttached(this.canvas)?s():a()}unbindEvents(){ml(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},ml(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const o=i?"set":"remove";let n,a,s,r;for("dataset"===e&&(n=this.getDatasetMeta(t[0].datasetIndex),n.controller["_"+o+"DatasetHoverStyle"]()),s=0,r=t.length;s<r;++s){a=t[s];const e=a&&this.getDatasetMeta(a.datasetIndex).controller;e&&e[o+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map((({datasetIndex:t,index:e})=>{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!pl(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return 1===this._plugins._cache.filter((e=>e.plugin.id===t)).length}_updateHoverStyles(t,e,i){const o=this.options.hover,n=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),a=n(e,t),s=i?t:n(t,e);a.length&&this.updateHoverStyle(a,o.mode,!1),s.length&&o.mode&&this.updateHoverStyle(s,o.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},o=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,o))return;const n=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,o),(n||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:o=[],options:n}=this,a=e,s=this._getActiveElements(t,o,i,a),r=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),l=function(t,e,i,o){return i&&"mouseout"!==t.type?o?e:t:null}(t,this._lastEvent,i,r);i&&(this._lastEvent=null,ul(n.onHover,[t,s,this],this),r&&ul(n.onClick,[t,s,this],this));const c=!pl(s,o);return(c||e)&&(this._active=s,this._updateHoverStyles(s,o,e)),this._lastEvent=l,c}_getActiveElements(t,e,i,o){if("mouseout"===t.type)return[];if(!i)return e;const n=this.options.hover;return this.getElementsAtEventForMode(t,n.mode,n,o)}}function nm(){return ml(om.instances,(t=>t._plugins.invalidate()))}function am(t,e,i,o){const n=qc(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const a=(i-e)/2,s=Math.min(a,o*e/2),r=t=>{const e=(i-Math.min(a,t))*o/2;return Xl(t,0,Math.min(a,e))};return{outerStart:r(n.outerStart),outerEnd:r(n.outerEnd),innerStart:Xl(n.innerStart,0,s),innerEnd:Xl(n.innerEnd,0,s)}}function sm(t,e,i,o){return{x:i+t*Math.cos(e),y:o+t*Math.sin(e)}}function rm(t,e,i,o,n,a){const{x:s,y:r,startAngle:l,pixelMargin:c,innerRadius:d}=e,h=Math.max(e.outerRadius+o+i-c,0),u=d>0?d+o+i+c:0;let m=0;const p=n-l;if(o){const t=((d>0?d-o:0)+(h>0?h-o:0))/2;m=(p-(0!==t?p*t/(t+o):p))/2}const _=(p-Math.max(.001,p*h-i/Dl)/h)/2,g=l+_+m,f=n-_-m,{outerStart:b,outerEnd:v,innerStart:y,innerEnd:w}=am(e,u,h,f-g),x=h-b,k=h-v,T=g+b/x,S=f-v/k,M=u+y,D=u+w,C=g+y/M,A=f-w/D;if(t.beginPath(),a){const e=(T+S)/2;if(t.arc(s,r,h,T,e),t.arc(s,r,h,e,S),v>0){const e=sm(k,S,s,r);t.arc(e.x,e.y,v,S,f+Ll)}const i=sm(D,f,s,r);if(t.lineTo(i.x,i.y),w>0){const e=sm(D,A,s,r);t.arc(e.x,e.y,w,f+Ll,A+Math.PI)}const o=(f-w/u+(g+y/u))/2;if(t.arc(s,r,u,f-w/u,o,!0),t.arc(s,r,u,o,g+y/u,!0),y>0){const e=sm(M,C,s,r);t.arc(e.x,e.y,y,C+Math.PI,g-Ll)}const n=sm(x,g,s,r);if(t.lineTo(n.x,n.y),b>0){const e=sm(x,T,s,r);t.arc(e.x,e.y,b,g-Ll,T)}}else{t.moveTo(s,r);const e=Math.cos(T)*h+s,i=Math.sin(T)*h+r;t.lineTo(e,i);const o=Math.cos(S)*h+s,n=Math.sin(S)*h+r;t.lineTo(o,n)}t.closePath()}function lm(t,e,i,o,n){const{fullCircles:a,startAngle:s,circumference:r,options:l}=e,{borderWidth:c,borderJoinStyle:d,borderDash:h,borderDashOffset:u,borderRadius:m}=l,p="inner"===l.borderAlign;if(!c)return;t.setLineDash(h||[]),t.lineDashOffset=u,p?(t.lineWidth=2*c,t.lineJoin=d||"round"):(t.lineWidth=c,t.lineJoin=d||"bevel");let _=e.endAngle;if(a){rm(t,e,i,o,_,n);for(let e=0;e<a;++e)t.stroke();isNaN(r)||(_=s+(r%Cl||Cl))}p&&function(t,e,i){const{startAngle:o,pixelMargin:n,x:a,y:s,outerRadius:r,innerRadius:l}=e;let c=n/r;t.beginPath(),t.arc(a,s,r,o-c,i+c),l>n?(c=n/l,t.arc(a,s,l,i+c,o-c,!0)):t.arc(a,s,n,i+Ll,o-Ll),t.closePath(),t.clip()}(t,e,_),l.selfJoin&&_-s>=Dl&&0===m&&"miter"!==d&&function(t,e,i){const{startAngle:o,x:n,y:a,outerRadius:s,innerRadius:r,options:l}=e,{borderWidth:c,borderJoinStyle:d}=l,h=Math.min(c/s,ql(o-i));if(t.beginPath(),t.arc(n,a,s-c/2,o+h/2,i-h/2),r>0){const e=Math.min(c/r,ql(o-i));t.arc(n,a,r+c/2,i-e/2,o+e/2,!0)}else{const e=Math.min(c/2,s*ql(o-i));if("round"===d)t.arc(n,a,e,i-Dl/2,o+Dl/2,!0);else if("bevel"===d){const s=2*e*e,r=-s*Math.cos(i+Dl/2)+n,l=-s*Math.sin(i+Dl/2)+a,c=s*Math.cos(o+Dl/2)+n,d=s*Math.sin(o+Dl/2)+a;t.lineTo(r,l),t.lineTo(c,d)}}t.closePath(),t.moveTo(0,0),t.rect(0,0,t.canvas.width,t.canvas.height),t.clip("evenodd")}(t,e,_),a||(rm(t,e,i,o,_,n),t.stroke())}class cm extends fu{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const o=this.getProps(["x","y"],i),{angle:n,distance:a}=jl(o,{x:t,y:e}),{startAngle:s,endAngle:r,innerRadius:l,outerRadius:c,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),h=(this.options.spacing+this.options.borderWidth)/2,u=dl(d,r-s),m=Zl(n,s,r)&&s!==r,p=u>=Cl||m,_=Kl(a,l+h,c+h);return p&&_}getCenterPoint(t){const{x:e,y:i,startAngle:o,endAngle:n,innerRadius:a,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:r,spacing:l}=this.options,c=(o+n)/2,d=(a+s+l+r)/2;return{x:e+Math.cos(c)*d,y:i+Math.sin(c)*d}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,o=(e.offset||0)/4,n=(e.spacing||0)/2,a=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>Cl?Math.floor(i/Cl):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();const s=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(s)*o,Math.sin(s)*o);const r=o*(1-Math.sin(Math.min(Dl,i||0)));t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,function(t,e,i,o,n){const{fullCircles:a,startAngle:s,circumference:r}=e;let l=e.endAngle;if(a){rm(t,e,i,o,l,n);for(let e=0;e<a;++e)t.fill();isNaN(r)||(l=s+(r%Cl||Cl))}rm(t,e,i,o,l,n),t.fill()}(t,this,r,n,a),lm(t,this,r,n,a),t.restore()}}function dm(t,e,i=e){t.lineCap=dl(i.borderCapStyle,e.borderCapStyle),t.setLineDash(dl(i.borderDash,e.borderDash)),t.lineDashOffset=dl(i.borderDashOffset,e.borderDashOffset),t.lineJoin=dl(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=dl(i.borderWidth,e.borderWidth),t.strokeStyle=dl(i.borderColor,e.borderColor)}function hm(t,e,i){t.lineTo(i.x,i.y)}function um(t,e,i={}){const o=t.length,{start:n=0,end:a=o-1}=i,{start:s,end:r}=e,l=Math.max(n,s),c=Math.min(a,r),d=n<s&&a<s||n>r&&a>r;return{count:o,start:l,loop:e.loop,ilen:c<l&&!d?o+c-l:c-l}}function mm(t,e,i,o){const{points:n,options:a}=e,{count:s,start:r,loop:l,ilen:c}=um(n,i,o),d=function(t){return t.stepped?Hc:t.tension||"monotone"===t.cubicInterpolationMode?Rc:hm}(a);let h,u,m,{move:p=!0,reverse:_}=o||{};for(h=0;h<=c;++h)u=n[(r+(_?c-h:h))%s],u.skip||(p?(t.moveTo(u.x,u.y),p=!1):d(t,m,u,_,a.stepped),m=u);return l&&(u=n[(r+(_?c:0))%s],d(t,m,u,_,a.stepped)),!!l}function pm(t,e,i,o){const n=e.points,{count:a,start:s,ilen:r}=um(n,i,o),{move:l=!0,reverse:c}=o||{};let d,h,u,m,p,_,g=0,f=0;const b=t=>(s+(c?r-t:t))%a,v=()=>{m!==p&&(t.lineTo(g,p),t.lineTo(g,m),t.lineTo(g,_))};for(l&&(h=n[b(0)],t.moveTo(h.x,h.y)),d=0;d<=r;++d){if(h=n[b(d)],h.skip)continue;const e=h.x,i=h.y,o=0|e;o===u?(i<m?m=i:i>p&&(p=i),g=(f*g+e)/++f):(v(),t.lineTo(e,i),u=o,f=0,m=p=i),_=i}v()}function _m(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?pm:mm}const gm="function"==typeof Path2D;function fm(t,e,i,o){gm&&!e.options.segment?function(t,e,i,o){let n=e._path;n||(n=e._path=new Path2D,e.path(n,i,o)&&n.closePath()),dm(t,e.options),t.stroke(n)}(t,e,i,o):function(t,e,i,o){const{segments:n,options:a}=e,s=_m(e);for(const r of n)dm(t,a,r.style),t.beginPath(),s(t,e,r,{start:i,end:i+o-1})&&t.closePath(),t.stroke()}(t,e,i,o)}class bm extends fu{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const o=i.spanGaps?this._loop:this._fullLoop;yd(this._points,i,t,o,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,o=t.options.spanGaps,n=i.length;if(!n)return[];const a=!!t._loop,{start:s,end:r}=function(t,e,i,o){let n=0,a=e-1;if(i&&!o)for(;n<e&&!t[n].skip;)n++;for(;n<e&&t[n].skip;)n++;for(n%=e,i&&(a+=n);a>n&&t[a%e].skip;)a--;return a%=e,{start:n,end:a}}(i,n,a,o);return jd(t,!0===o?[{start:s,end:r,loop:a}]:function(t,e,i,o){const n=t.length,a=[];let s,r=e,l=t[e];for(s=e+1;s<=i;++s){const i=t[s%n];i.skip||i.stop?l.skip||(o=!1,a.push({start:e%n,end:(s-1)%n,loop:o}),e=r=i.stop?s:null):(r=s,l.skip&&(e=s)),l=i}return null!==r&&a.push({start:e%n,end:r%n,loop:o}),a}(i,s,r<s?r+n:r,!!t._fullLoop&&0===s&&r===n-1),i,e)}(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,o=t[e],n=this.points,a=Bd(this,{property:e,start:o,end:o});if(!a.length)return;const s=[],r=function(t){return t.stepped?Od:t.tension||"monotone"===t.cubicInterpolationMode?Vd:zd}(i);let l,c;for(l=0,c=a.length;l<c;++l){const{start:c,end:d}=a[l],h=n[c],u=n[d];if(h===u){s.push(h);continue}const m=r(h,u,Math.abs((o-h[e])/(u[e]-h[e])),i.stepped);m[e]=t[e],s.push(m)}return 1===s.length?s[0]:s}pathSegment(t,e,i){return _m(this)(t,this,e,i)}path(t,e,i){const o=this.segments,n=_m(this);let a=this._loop;e=e||0,i=i||this.points.length-e;for(const s of o)a&=n(t,this,s,{start:e,end:e+i-1});return!!a}draw(t,e,i,o){const n=this.options||{};(this.points||[]).length&&n.borderWidth&&(t.save(),fm(t,this,i,o),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function vm(t,e,i,o){const n=t.options,{[i]:a}=t.getProps([i],o);return Math.abs(e-a)<n.radius+n.hitRadius}class ym extends fu{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const o=this.options,{x:n,y:a}=this.getProps(["x","y"],i);return Math.pow(t-n,2)+Math.pow(e-a,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(t,e){return vm(this,t,"x",e)}inYRange(t,e){return vm(this,t,"y",e)}getCenterPoint(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){let e=(t=t||this.options||{}).radius||0;e=Math.max(e,e&&t.hoverRadius||0);return 2*(e+(e&&t.borderWidth||0))}draw(t,e){const i=this.options;this.skip||i.radius<.1||!zc(this,e,this.size(i)/2)||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,Lc(t,i,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function wm(t,e){const{x:i,y:o,base:n,width:a,height:s}=t.getProps(["x","y","base","width","height"],e);let r,l,c,d,h;return t.horizontal?(h=s/2,r=Math.min(i,n),l=Math.max(i,n),c=o-h,d=o+h):(h=a/2,r=i-h,l=i+h,c=Math.min(o,n),d=Math.max(o,n)),{left:r,top:c,right:l,bottom:d}}function xm(t,e,i,o){return t?0:Xl(e,i,o)}function km(t){const e=wm(t),i=e.right-e.left,o=e.bottom-e.top,n=function(t,e,i){const o=t.options.borderWidth,n=t.borderSkipped,a=Zc(o);return{t:xm(n.top,a.top,0,i),r:xm(n.right,a.right,0,e),b:xm(n.bottom,a.bottom,0,i),l:xm(n.left,a.left,0,e)}}(t,i/2,o/2),a=function(t,e,i){const{enableBorderRadius:o}=t.getProps(["enableBorderRadius"]),n=t.options.borderRadius,a=Xc(n),s=Math.min(e,i),r=t.borderSkipped,l=o||rl(n);return{topLeft:xm(!l||r.top||r.left,a.topLeft,0,s),topRight:xm(!l||r.top||r.right,a.topRight,0,s),bottomLeft:xm(!l||r.bottom||r.left,a.bottomLeft,0,s),bottomRight:xm(!l||r.bottom||r.right,a.bottomRight,0,s)}}(t,i/2,o/2);return{outer:{x:e.left,y:e.top,w:i,h:o,radius:a},inner:{x:e.left+n.l,y:e.top+n.t,w:i-n.l-n.r,h:o-n.t-n.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(n.t,n.l)),topRight:Math.max(0,a.topRight-Math.max(n.t,n.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(n.b,n.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(n.b,n.r))}}}}function Tm(t,e,i,o){const n=null===e,a=null===i,s=t&&!(n&&a)&&wm(t,o);return s&&(n||Kl(e,s.left,s.right))&&(a||Kl(i,s.top,s.bottom))}function Sm(t,e){t.rect(e.x,e.y,e.w,e.h)}function Mm(t,e,i={}){const o=t.x!==i.x?-e:0,n=t.y!==i.y?-e:0,a=(t.x+t.w!==i.x+i.w?e:0)-o,s=(t.y+t.h!==i.y+i.h?e:0)-n;return{x:t.x+o,y:t.y+n,w:t.w+a,h:t.h+s,radius:t.radius}}class Dm extends fu{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:o}}=this,{inner:n,outer:a}=km(this),s=(r=a.radius).topLeft||r.topRight||r.bottomLeft||r.bottomRight?Wc:Sm;var r;t.save(),a.w===n.w&&a.h===n.h||(t.beginPath(),s(t,Mm(a,e,n)),t.clip(),s(t,Mm(n,-e,a)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),s(t,Mm(n,e)),t.fillStyle=o,t.fill(),t.restore()}inRange(t,e,i){return Tm(this,t,e,i)}inXRange(t,e){return Tm(this,t,null,e)}inYRange(t,e){return Tm(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:o,horizontal:n}=this.getProps(["x","y","base","horizontal"],t);return{x:n?(e+o)/2:e,y:n?i:(i+o)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}var Cm=Object.freeze({__proto__:null,ArcElement:cm,BarElement:Dm,LineElement:bm,PointElement:ym});const Am=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],Pm=Am.map((t=>t.replace("rgb(","rgba(").replace(")",", 0.5)")));function Em(t){return Am[t%Am.length]}function Lm(t){return Pm[t%Pm.length]}function $m(t){let e=0;return(i,o)=>{const n=t.getDatasetMeta(o).controller;n instanceof kh?e=function(t,e){return t.backgroundColor=t.data.map((()=>Em(e++))),e}(i,e):n instanceof Sh?e=function(t,e){return t.backgroundColor=t.data.map((()=>Lm(e++))),e}(i,e):n&&(e=function(t,e){return t.borderColor=Em(e),t.backgroundColor=Lm(e),++e}(i,e))}}function zm(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}var Om={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,i){if(!i.enabled)return;const{data:{datasets:o},options:n}=t.config,{elements:a}=n,s=zm(o)||(r=n)&&(r.borderColor||r.backgroundColor)||a&&zm(a)||"rgba(0,0,0,0.1)"!==Dc.borderColor||"rgba(0,0,0,0.1)"!==Dc.backgroundColor;var r;if(!i.forceOverride&&s)return;const l=$m(t);o.forEach(l)}};function Vm(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function Hm(t){t.data.datasets.forEach((t=>{Vm(t)}))}var Rm={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void Hm(t);const o=t.width;t.data.datasets.forEach(((e,n)=>{const{_data:a,indexAxis:s}=e,r=t.getDatasetMeta(n),l=a||e.data;if("y"===Qc([s,t.options.indexAxis]))return;if(!r.controller.supportsDecimation)return;const c=t.scales[r.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let{start:d,count:h}=function(t,e){const i=e.length;let o,n=0;const{iScale:a}=t,{min:s,max:r,minDefined:l,maxDefined:c}=a.getUserBounds();return l&&(n=Xl(Ql(e,a.axis,s).lo,0,i-1)),o=c?Xl(Ql(e,a.axis,r).hi+1,n,i)-n:i-n,{start:n,count:o}}(r,l);if(h<=(i.threshold||4*o))return void Vm(e);let u;switch(al(a)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":u=function(t,e,i,o,n){const a=n.samples||o;if(a>=i)return t.slice(e,e+i);const s=[],r=(i-2)/(a-2);let l=0;const c=e+i-1;let d,h,u,m,p,_=e;for(s[l++]=t[_],d=0;d<a-2;d++){let o,n=0,a=0;const c=Math.floor((d+1)*r)+1+e,g=Math.min(Math.floor((d+2)*r)+1,i)+e,f=g-c;for(o=c;o<g;o++)n+=t[o].x,a+=t[o].y;n/=f,a/=f;const b=Math.floor(d*r)+1+e,v=Math.min(Math.floor((d+1)*r)+1,i)+e,{x:y,y:w}=t[_];for(u=m=-1,o=b;o<v;o++)m=.5*Math.abs((y-n)*(t[o].y-w)-(y-t[o].x)*(a-w)),m>u&&(u=m,h=t[o],p=o);s[l++]=h,_=p}return s[l++]=t[c],s}(l,d,h,o,i);break;case"min-max":u=function(t,e,i,o){let n,a,s,r,l,c,d,h,u,m,p=0,_=0;const g=[],f=e+i-1,b=t[e].x,v=t[f].x-b;for(n=e;n<e+i;++n){a=t[n],s=(a.x-b)/v*o,r=a.y;const e=0|s;if(e===l)r<u?(u=r,c=n):r>m&&(m=r,d=n),p=(_*p+a.x)/++_;else{const i=n-1;if(!al(c)&&!al(d)){const e=Math.min(c,d),o=Math.max(c,d);e!==h&&e!==i&&g.push({...t[e],x:p}),o!==h&&o!==i&&g.push({...t[o],x:p})}n>0&&i!==h&&g.push(t[i]),g.push(a),l=e,_=0,u=m=r,c=d=h=n}}return g}(l,d,h,o);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=u}))},destroy(t){Hm(t)}};function Im(t,e,i,o){if(o)return;let n=e[t],a=i[t];return"angle"===t&&(n=ql(n),a=ql(a)),{property:t,start:n,end:a}}function Nm(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function Fm(t,e,i,o){return t&&e?o(t[i],e[i]):t?t[i]:e?e[i]:0}function Wm(t,e){let i=[],o=!1;return sl(t)?(o=!0,i=t):i=function(t,e){const{x:i=null,y:o=null}=t||{},n=e.points,a=[];return e.segments.forEach((({start:t,end:e})=>{e=Nm(t,e,n);const s=n[t],r=n[e];null!==o?(a.push({x:s.x,y:o}),a.push({x:r.x,y:o})):null!==i&&(a.push({x:i,y:s.y}),a.push({x:i,y:r.y}))})),a}(t,e),i.length?new bm({points:i,options:{tension:0},_loop:o,_fullLoop:o}):null}function Bm(t){return t&&!1!==t.fill}function jm(t,e,i){let o=t[e].fill;const n=[e];let a;if(!i)return o;for(;!1!==o&&-1===n.indexOf(o);){if(!ll(o))return o;if(a=t[o],!a)return!1;if(a.visible)return o;n.push(o),o=a.fill}return!1}function Um(t,e,i){const o=function(t){const e=t.options,i=e.fill;let o=dl(i&&i.target,i);void 0===o&&(o=!!e.backgroundColor);if(!1===o||null===o)return!1;if(!0===o)return"origin";return o}(t);if(rl(o))return!isNaN(o.value)&&o;let n=parseFloat(o);return ll(n)&&Math.floor(n)===n?function(t,e,i,o){"-"!==t&&"+"!==t||(i=e+i);if(i===e||i<0||i>=o)return!1;return i}(o[0],e,n,i):["origin","start","end","stack","shape"].indexOf(o)>=0&&o}function Ym(t,e,i){const o=[];for(let n=0;n<i.length;n++){const a=i[n],{first:s,last:r,point:l}=qm(a,e,"x");if(!(!l||s&&r))if(s)o.unshift(l);else if(t.push(l),!r)break}t.push(...o)}function qm(t,e,i){const o=t.interpolate(e,i);if(!o)return{};const n=o[i],a=t.segments,s=t.points;let r=!1,l=!1;for(let t=0;t<a.length;t++){const e=a[t],o=s[e.start][i],c=s[e.end][i];if(Kl(n,o,c)){r=n===o,l=n===c;break}}return{first:r,last:l,point:o}}class Zm{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:o,y:n,radius:a}=this;return e=e||{start:0,end:Cl},t.arc(o,n,a,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:o}=this,n=t.angle;return{x:e+Math.cos(n)*o,y:i+Math.sin(n)*o,angle:n}}}function Xm(t){const{chart:e,fill:i,line:o}=t;if(ll(i))return function(t,e){const i=t.getDatasetMeta(e),o=i&&t.isDatasetVisible(e);return o?i.dataset:null}(e,i);if("stack"===i)return function(t){const{scale:e,index:i,line:o}=t,n=[],a=o.segments,s=o.points,r=function(t,e){const i=[],o=t.getMatchingVisibleMetas("line");for(let t=0;t<o.length;t++){const n=o[t];if(n.index===e)break;n.hidden||i.unshift(n.dataset)}return i}(e,i);r.push(Wm({x:null,y:e.bottom},o));for(let t=0;t<a.length;t++){const e=a[t];for(let t=e.start;t<=e.end;t++)Ym(n,s[t],r)}return new bm({points:n,options:{}})}(t);if("shape"===i)return!0;const n=function(t){const e=t.scale||{};if(e.getPointPositionForValue)return function(t){const{scale:e,fill:i}=t,o=e.options,n=e.getLabels().length,a=o.reverse?e.max:e.min,s=function(t,e,i){let o;return o="start"===t?i:"end"===t?e.options.reverse?e.min:e.max:rl(t)?t.value:e.getBaseValue(),o}(i,e,a),r=[];if(o.grid.circular){const t=e.getPointPositionForValue(0,a);return new Zm({x:t.x,y:t.y,radius:e.getDistanceFromCenterForValue(s)})}for(let t=0;t<n;++t)r.push(e.getPointPositionForValue(t,s));return r}(t);return function(t){const{scale:e={},fill:i}=t,o=function(t,e){let i=null;return"start"===t?i=e.bottom:"end"===t?i=e.top:rl(t)?i=e.getPixelForValue(t.value):e.getBasePixel&&(i=e.getBasePixel()),i}(i,e);if(ll(o)){const t=e.isHorizontal();return{x:t?o:null,y:t?null:o}}return null}(t)}(t);return n instanceof Zm?n:Wm(n,o)}function Km(t,e,i){const o=Xm(e),{chart:n,index:a,line:s,scale:r,axis:l}=e,c=s.options,d=c.fill,h=c.backgroundColor,{above:u=h,below:m=h}=d||{},p=n.getDatasetMeta(a),_=Zd(n,p);o&&s.points.length&&(Oc(t,i),function(t,e){const{line:i,target:o,above:n,below:a,area:s,scale:r,clip:l}=e,c=i._loop?"angle":e.axis;t.save();let d=a;a!==n&&("x"===c?(Gm(t,o,s.top),Jm(t,{line:i,target:o,color:n,scale:r,property:c,clip:l}),t.restore(),t.save(),Gm(t,o,s.bottom)):"y"===c&&(Qm(t,o,s.left),Jm(t,{line:i,target:o,color:a,scale:r,property:c,clip:l}),t.restore(),t.save(),Qm(t,o,s.right),d=n));Jm(t,{line:i,target:o,color:d,scale:r,property:c,clip:l}),t.restore()}(t,{line:s,target:o,above:u,below:m,area:i,scale:r,axis:l,clip:_}),Vc(t))}function Gm(t,e,i){const{segments:o,points:n}=e;let a=!0,s=!1;t.beginPath();for(const r of o){const{start:o,end:l}=r,c=n[o],d=n[Nm(o,l,n)];a?(t.moveTo(c.x,c.y),a=!1):(t.lineTo(c.x,i),t.lineTo(c.x,c.y)),s=!!e.pathSegment(t,r,{move:s}),s?t.closePath():t.lineTo(d.x,i)}t.lineTo(e.first().x,i),t.closePath(),t.clip()}function Qm(t,e,i){const{segments:o,points:n}=e;let a=!0,s=!1;t.beginPath();for(const r of o){const{start:o,end:l}=r,c=n[o],d=n[Nm(o,l,n)];a?(t.moveTo(c.x,c.y),a=!1):(t.lineTo(i,c.y),t.lineTo(c.x,c.y)),s=!!e.pathSegment(t,r,{move:s}),s?t.closePath():t.lineTo(i,d.y)}t.lineTo(i,e.first().y),t.closePath(),t.clip()}function Jm(t,e){const{line:i,target:o,property:n,color:a,scale:s,clip:r}=e,l=function(t,e,i){const o=t.segments,n=t.points,a=e.points,s=[];for(const t of o){let{start:o,end:r}=t;r=Nm(o,r,n);const l=Im(i,n[o],n[r],t.loop);if(!e.segments){s.push({source:t,target:l,start:n[o],end:n[r]});continue}const c=Bd(e,l);for(const e of c){const o=Im(i,a[e.start],a[e.end],e.loop),r=Wd(t,n,o);for(const t of r)s.push({source:t,target:e,start:{[i]:Fm(l,o,"start",Math.max)},end:{[i]:Fm(l,o,"end",Math.min)}})}}return s}(i,o,n);for(const{source:e,target:c,start:d,end:h}of l){const{style:{backgroundColor:l=a}={}}=e,u=!0!==o;t.save(),t.fillStyle=l,tp(t,s,r,u&&Im(n,d,h)),t.beginPath();const m=!!i.pathSegment(t,e);let p;if(u){m?t.closePath():ep(t,o,h,n);const e=!!o.pathSegment(t,c,{move:m,reverse:!0});p=m&&e,p||ep(t,o,d,n)}t.closePath(),t.fill(p?"evenodd":"nonzero"),t.restore()}}function tp(t,e,i,o){const n=e.chart.chartArea,{property:a,start:s,end:r}=o||{};if("x"===a||"y"===a){let e,o,l,c;"x"===a?(e=s,o=n.top,l=r,c=n.bottom):(e=n.left,o=s,l=n.right,c=r),t.beginPath(),i&&(e=Math.max(e,i.left),l=Math.min(l,i.right),o=Math.max(o,i.top),c=Math.min(c,i.bottom)),t.rect(e,o,l-e,c-o),t.clip()}}function ep(t,e,i,o){const n=e.interpolate(i,o);n&&t.lineTo(n.x,n.y)}var ip={id:"filler",afterDatasetsUpdate(t,e,i){const o=(t.data.datasets||[]).length,n=[];let a,s,r,l;for(s=0;s<o;++s)a=t.getDatasetMeta(s),r=a.dataset,l=null,r&&r.options&&r instanceof bm&&(l={visible:t.isDatasetVisible(s),index:s,fill:Um(r,s,o),chart:t,axis:a.controller.options.indexAxis,scale:a.vScale,line:r}),a.$filler=l,n.push(l);for(s=0;s<o;++s)l=n[s],l&&!1!==l.fill&&(l.fill=jm(n,s,i.propagate))},beforeDraw(t,e,i){const o="beforeDraw"===i.drawTime,n=t.getSortedVisibleDatasetMetas(),a=t.chartArea;for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;i&&(i.line.updateControlPoints(a,i.axis),o&&i.fill&&Km(t.ctx,i,a))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const o=t.getSortedVisibleDatasetMetas();for(let e=o.length-1;e>=0;--e){const i=o[e].$filler;Bm(i)&&Km(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const o=e.meta.$filler;Bm(o)&&"beforeDatasetDraw"===i.drawTime&&Km(t.ctx,o,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const op=(t,e)=>{let{boxHeight:i=e,boxWidth:o=e}=t;return t.usePointStyle&&(i=Math.min(i,e),o=t.pointStyleWidth||Math.min(o,e)),{boxWidth:o,boxHeight:i,itemHeight:Math.max(e,i)}};class np extends fu{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=ul(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,o=Gc(i.font),n=o.size,a=this._computeTitleHeight(),{boxWidth:s,itemHeight:r}=op(i,n);let l,c;e.font=o.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(a,n,s,r)+10):(c=this.maxHeight,l=this._fitCols(a,o,s,r)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,o){const{ctx:n,maxWidth:a,options:{labels:{padding:s}}}=this,r=this.legendHitBoxes=[],l=this.lineWidths=[0],c=o+s;let d=t;n.textAlign="left",n.textBaseline="middle";let h=-1,u=-c;return this.legendItems.forEach(((t,m)=>{const p=i+e/2+n.measureText(t.text).width;(0===m||l[l.length-1]+p+2*s>a)&&(d+=c,l[l.length-(m>0?0:1)]=0,u+=c,h++),r[m]={left:0,top:u,row:h,width:p,height:o},l[l.length-1]+=p+s})),d}_fitCols(t,e,i,o){const{ctx:n,maxHeight:a,options:{labels:{padding:s}}}=this,r=this.legendHitBoxes=[],l=this.columnSizes=[],c=a-t;let d=s,h=0,u=0,m=0,p=0;return this.legendItems.forEach(((t,a)=>{const{itemWidth:_,itemHeight:g}=function(t,e,i,o,n){const a=function(t,e,i,o){let n=t.text;n&&"string"!=typeof n&&(n=n.reduce(((t,e)=>t.length>e.length?t:e)));return e+i.size/2+o.measureText(n).width}(o,t,e,i),s=function(t,e,i){let o=t;"string"!=typeof e.text&&(o=ap(e,i));return o}(n,o,e.lineHeight);return{itemWidth:a,itemHeight:s}}(i,e,n,t,o);a>0&&u+g+2*s>c&&(d+=h+s,l.push({width:h,height:u}),m+=h+s,p++,h=u=0),r[a]={left:m,top:u,col:p,width:_,height:g},h=Math.max(h,_),u+=g+s})),d+=h,l.push({width:h,height:u}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:o},rtl:n}}=this,a=Hd(n,this.left,this.width);if(this.isHorizontal()){let n=0,s=sc(i,this.left+o,this.right-this.lineWidths[n]);for(const r of e)n!==r.row&&(n=r.row,s=sc(i,this.left+o,this.right-this.lineWidths[n])),r.top+=this.top+t+o,r.left=a.leftForLtr(a.x(s),r.width),s+=r.width+o}else{let n=0,s=sc(i,this.top+t+o,this.bottom-this.columnSizes[n].height);for(const r of e)r.col!==n&&(n=r.col,s=sc(i,this.top+t+o,this.bottom-this.columnSizes[n].height)),r.top=s,r.left+=this.left+o,r.left=a.leftForLtr(a.x(r.left),r.width),s+=r.height+o}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;Oc(t,this),this._draw(),Vc(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:o}=this,{align:n,labels:a}=t,s=Dc.color,r=Hd(t.rtl,this.left,this.width),l=Gc(a.font),{padding:c}=a,d=l.size,h=d/2;let u;this.drawTitle(),o.textAlign=r.textAlign("left"),o.textBaseline="middle",o.lineWidth=.5,o.font=l.string;const{boxWidth:m,boxHeight:p,itemHeight:_}=op(a,d),g=this.isHorizontal(),f=this._computeTitleHeight();u=g?{x:sc(n,this.left+c,this.right-i[0]),y:this.top+c+f,line:0}:{x:this.left+c,y:sc(n,this.top+f+c,this.bottom-e[0].height),line:0},Rd(this.ctx,t.textDirection);const b=_+c;this.legendItems.forEach(((v,y)=>{o.strokeStyle=v.fontColor,o.fillStyle=v.fontColor;const w=o.measureText(v.text).width,x=r.textAlign(v.textAlign||(v.textAlign=a.textAlign)),k=m+h+w;let T=u.x,S=u.y;r.setWidth(this.width),g?y>0&&T+k+c>this.right&&(S=u.y+=b,u.line++,T=u.x=sc(n,this.left+c,this.right-i[u.line])):y>0&&S+b>this.bottom&&(T=u.x=T+e[u.line].width+c,u.line++,S=u.y=sc(n,this.top+f+c,this.bottom-e[u.line].height));if(function(t,e,i){if(isNaN(m)||m<=0||isNaN(p)||p<0)return;o.save();const n=dl(i.lineWidth,1);if(o.fillStyle=dl(i.fillStyle,s),o.lineCap=dl(i.lineCap,"butt"),o.lineDashOffset=dl(i.lineDashOffset,0),o.lineJoin=dl(i.lineJoin,"miter"),o.lineWidth=n,o.strokeStyle=dl(i.strokeStyle,s),o.setLineDash(dl(i.lineDash,[])),a.usePointStyle){const s={radius:p*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:n},l=r.xPlus(t,m/2);$c(o,s,l,e+h,a.pointStyleWidth&&m)}else{const a=e+Math.max((d-p)/2,0),s=r.leftForLtr(t,m),l=Xc(i.borderRadius);o.beginPath(),Object.values(l).some((t=>0!==t))?Wc(o,{x:s,y:a,w:m,h:p,radius:l}):o.rect(s,a,m,p),o.fill(),0!==n&&o.stroke()}o.restore()}(r.x(T),S,v),T=((t,e,i,o)=>t===(o?"left":"right")?i:"center"===t?(e+i)/2:e)(x,T+m+h,g?T+k:this.right,t.rtl),function(t,e,i){Fc(o,i.text,t,e+_/2,l,{strikethrough:i.hidden,textAlign:r.textAlign(i.textAlign)})}(r.x(T),S,v),g)u.x+=k+c;else if("string"!=typeof v.text){const t=l.lineHeight;u.y+=ap(v,t)+c}else u.y+=b})),Id(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=Gc(e.font),o=Kc(e.padding);if(!e.display)return;const n=Hd(t.rtl,this.left,this.width),a=this.ctx,s=e.position,r=i.size/2,l=o.top+r;let c,d=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),c=this.top+l,d=sc(t.align,d,this.right-h);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);c=l+sc(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const u=sc(s,d,d+h);a.textAlign=n.textAlign(ac(s)),a.textBaseline="middle",a.strokeStyle=e.color,a.fillStyle=e.color,a.font=i.string,Fc(a,e.text,u,c,i)}_computeTitleHeight(){const t=this.options.title,e=Gc(t.font),i=Kc(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,o,n;if(Kl(t,this.left,this.right)&&Kl(e,this.top,this.bottom))for(n=this.legendHitBoxes,i=0;i<n.length;++i)if(o=n[i],Kl(t,o.left,o.left+o.width)&&Kl(e,o.top,o.top+o.height))return this.legendItems[i];return null}handleEvent(t){const e=this.options;if(!function(t,e){if(("mousemove"===t||"mouseout"===t)&&(e.onHover||e.onLeave))return!0;if(e.onClick&&("click"===t||"mouseup"===t))return!0;return!1}(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type||"mouseout"===t.type){const o=this._hoveredItem,n=((t,e)=>null!==t&&null!==e&&t.datasetIndex===e.datasetIndex&&t.index===e.index)(o,i);o&&!n&&ul(e.onLeave,[t,o,this],this),this._hoveredItem=i,i&&!n&&ul(e.onHover,[t,i,this],this)}else i&&ul(e.onClick,[t,i,this],this)}}function ap(t,e){return e*(t.text?t.text.length:0)}var sp={id:"legend",_element:np,start(t,e,i){const o=t.legend=new np({ctx:t.ctx,options:i,chart:t});Qh.configure(t,o,i),Qh.addBox(t,o)},stop(t){Qh.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const o=t.legend;Qh.configure(t,o,i),o.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const o=e.datasetIndex,n=i.chart;n.isDatasetVisible(o)?(n.hide(o),e.hidden=!0):(n.show(o),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:o,textAlign:n,color:a,useBorderRadius:s,borderRadius:r}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const l=t.controller.getStyle(i?0:void 0),c=Kc(l.borderWidth);return{text:e[t.index].label,fillStyle:l.backgroundColor,fontColor:a,hidden:!t.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:l.borderColor,pointStyle:o||l.pointStyle,rotation:l.rotation,textAlign:n||l.textAlign,borderRadius:s&&(r||l.borderRadius),datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class rp extends fu{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const o=sl(i.text)?i.text.length:1;this._padding=Kc(i.padding);const n=o*Gc(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=n:this.width=n}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:o,right:n,options:a}=this,s=a.align;let r,l,c,d=0;return this.isHorizontal()?(l=sc(s,i,n),c=e+t,r=n-i):("left"===a.position?(l=i+t,c=sc(s,o,e),d=-.5*Dl):(l=n-t,c=sc(s,e,o),d=.5*Dl),r=o-e),{titleX:l,titleY:c,maxWidth:r,rotation:d}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=Gc(e.font),o=i.lineHeight/2+this._padding.top,{titleX:n,titleY:a,maxWidth:s,rotation:r}=this._drawArgs(o);Fc(t,e.text,0,0,i,{color:e.color,maxWidth:s,rotation:r,textAlign:ac(e.align),textBaseline:"middle",translation:[n,a]})}}var lp={id:"title",_element:rp,start(t,e,i){!function(t,e){const i=new rp({ctx:t.ctx,options:e,chart:t});Qh.configure(t,i,e),Qh.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;Qh.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const o=t.titleBlock;Qh.configure(t,o,i),o.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const cp=new WeakMap;var dp={id:"subtitle",start(t,e,i){const o=new rp({ctx:t.ctx,options:i,chart:t});Qh.configure(t,o,i),Qh.addBox(t,o),cp.set(t,o)},stop(t){Qh.removeBox(t,cp.get(t)),cp.delete(t)},beforeUpdate(t,e,i){const o=cp.get(t);Qh.configure(t,o,i),o.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const hp={average(t){if(!t.length)return!1;let e,i,o=new Set,n=0,a=0;for(e=0,i=t.length;e<i;++e){const i=t[e].element;if(i&&i.hasValue()){const t=i.tooltipPosition();o.add(t.x),n+=t.y,++a}}if(0===a||0===o.size)return!1;const s=[...o].reduce(((t,e)=>t+e))/o.size;return{x:s,y:n/a}},nearest(t,e){if(!t.length)return!1;let i,o,n,a=e.x,s=e.y,r=Number.POSITIVE_INFINITY;for(i=0,o=t.length;i<o;++i){const o=t[i].element;if(o&&o.hasValue()){const t=Ul(e,o.getCenterPoint());t<r&&(r=t,n=o)}}if(n){const t=n.tooltipPosition();a=t.x,s=t.y}return{x:a,y:s}}};function up(t,e){return e&&(sl(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function mp(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function pp(t,e){const{element:i,datasetIndex:o,index:n}=e,a=t.getDatasetMeta(o).controller,{label:s,value:r}=a.getLabelAndValue(n);return{chart:t,label:s,parsed:a.getParsed(n),raw:t.data.datasets[o].data[n],formattedValue:r,dataset:a.getDataset(),dataIndex:n,datasetIndex:o,element:i}}function _p(t,e){const i=t.chart.ctx,{body:o,footer:n,title:a}=t,{boxWidth:s,boxHeight:r}=e,l=Gc(e.bodyFont),c=Gc(e.titleFont),d=Gc(e.footerFont),h=a.length,u=n.length,m=o.length,p=Kc(e.padding);let _=p.height,g=0,f=o.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(f+=t.beforeBody.length+t.afterBody.length,h&&(_+=h*c.lineHeight+(h-1)*e.titleSpacing+e.titleMarginBottom),f){_+=m*(e.displayColors?Math.max(r,l.lineHeight):l.lineHeight)+(f-m)*l.lineHeight+(f-1)*e.bodySpacing}u&&(_+=e.footerMarginTop+u*d.lineHeight+(u-1)*e.footerSpacing);let b=0;const v=function(t){g=Math.max(g,i.measureText(t).width+b)};return i.save(),i.font=c.string,ml(t.title,v),i.font=l.string,ml(t.beforeBody.concat(t.afterBody),v),b=e.displayColors?s+2+e.boxPadding:0,ml(o,(t=>{ml(t.before,v),ml(t.lines,v),ml(t.after,v)})),b=0,i.font=d.string,ml(t.footer,v),i.restore(),g+=p.width,{width:g,height:_}}function gp(t,e,i,o){const{x:n,width:a}=i,{width:s,chartArea:{left:r,right:l}}=t;let c="center";return"center"===o?c=n<=(r+l)/2?"left":"right":n<=a/2?c="left":n>=s-a/2&&(c="right"),function(t,e,i,o){const{x:n,width:a}=o,s=i.caretSize+i.caretPadding;return"left"===t&&n+a+s>e.width||"right"===t&&n-a-s<0||void 0}(c,t,e,i)&&(c="center"),c}function fp(t,e,i){const o=i.yAlign||e.yAlign||function(t,e){const{y:i,height:o}=e;return i<o/2?"top":i>t.height-o/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||gp(t,e,i,o),yAlign:o}}function bp(t,e,i,o){const{caretSize:n,caretPadding:a,cornerRadius:s}=t,{xAlign:r,yAlign:l}=i,c=n+a,{topLeft:d,topRight:h,bottomLeft:u,bottomRight:m}=Xc(s);let p=function(t,e){let{x:i,width:o}=t;return"right"===e?i-=o:"center"===e&&(i-=o/2),i}(e,r);const _=function(t,e,i){let{y:o,height:n}=t;return"top"===e?o+=i:o-="bottom"===e?n+i:n/2,o}(e,l,c);return"center"===l?"left"===r?p+=c:"right"===r&&(p-=c):"left"===r?p-=Math.max(d,u)+n:"right"===r&&(p+=Math.max(h,m)+n),{x:Xl(p,0,o.width-e.width),y:Xl(_,0,o.height-e.height)}}function vp(t,e,i){const o=Kc(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-o.right:t.x+o.left}function yp(t){return up([],mp(t))}function wp(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}const xp={beforeTitle:ol,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,o=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(o>0&&e.dataIndex<o)return i[e.dataIndex]}return""},afterTitle:ol,beforeBody:ol,beforeLabel:ol,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const i=t.formattedValue;return al(i)||(e+=i),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:ol,afterBody:ol,beforeFooter:ol,footer:ol,afterFooter:ol};function kp(t,e,i,o){const n=t[e].call(i,o);return void 0===n?xp[e].call(i,o):n}class Tp extends fu{static positioners=hp;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),o=i.enabled&&e.options.animation&&i.animations,n=new th(this.chart,o);return o._cacheable&&(this._cachedAnimations=Object.freeze(n)),n}getContext(){return this.$context||(this.$context=(t=this.chart.getContext(),e=this,i=this._tooltipItems,Jc(t,{tooltip:e,tooltipItems:i,type:"tooltip"})));var t,e,i}getTitle(t,e){const{callbacks:i}=e,o=kp(i,"beforeTitle",this,t),n=kp(i,"title",this,t),a=kp(i,"afterTitle",this,t);let s=[];return s=up(s,mp(o)),s=up(s,mp(n)),s=up(s,mp(a)),s}getBeforeBody(t,e){return yp(kp(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:i}=e,o=[];return ml(t,(t=>{const e={before:[],lines:[],after:[]},n=wp(i,t);up(e.before,mp(kp(n,"beforeLabel",this,t))),up(e.lines,kp(n,"label",this,t)),up(e.after,mp(kp(n,"afterLabel",this,t))),o.push(e)})),o}getAfterBody(t,e){return yp(kp(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,o=kp(i,"beforeFooter",this,t),n=kp(i,"footer",this,t),a=kp(i,"afterFooter",this,t);let s=[];return s=up(s,mp(o)),s=up(s,mp(n)),s=up(s,mp(a)),s}_createItems(t){const e=this._active,i=this.chart.data,o=[],n=[],a=[];let s,r,l=[];for(s=0,r=e.length;s<r;++s)l.push(pp(this.chart,e[s]));return t.filter&&(l=l.filter(((e,o,n)=>t.filter(e,o,n,i)))),t.itemSort&&(l=l.sort(((e,o)=>t.itemSort(e,o,i)))),ml(l,(e=>{const i=wp(t.callbacks,e);o.push(kp(i,"labelColor",this,e)),n.push(kp(i,"labelPointStyle",this,e)),a.push(kp(i,"labelTextColor",this,e))})),this.labelColors=o,this.labelPointStyles=n,this.labelTextColors=a,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),o=this._active;let n,a=[];if(o.length){const t=hp[i.position].call(this,o,this._eventPosition);a=this._createItems(i),this.title=this.getTitle(a,i),this.beforeBody=this.getBeforeBody(a,i),this.body=this.getBody(a,i),this.afterBody=this.getAfterBody(a,i),this.footer=this.getFooter(a,i);const e=this._size=_p(this,i),s=Object.assign({},t,e),r=fp(this.chart,i,s),l=bp(i,s,r,this.chart);this.xAlign=r.xAlign,this.yAlign=r.yAlign,n={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(n={opacity:0});this._tooltipItems=a,this.$context=void 0,n&&this._resolveAnimations().update(this,n),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,o){const n=this.getCaretPosition(t,i,o);e.lineTo(n.x1,n.y1),e.lineTo(n.x2,n.y2),e.lineTo(n.x3,n.y3)}getCaretPosition(t,e,i){const{xAlign:o,yAlign:n}=this,{caretSize:a,cornerRadius:s}=i,{topLeft:r,topRight:l,bottomLeft:c,bottomRight:d}=Xc(s),{x:h,y:u}=t,{width:m,height:p}=e;let _,g,f,b,v,y;return"center"===n?(v=u+p/2,"left"===o?(_=h,g=_-a,b=v+a,y=v-a):(_=h+m,g=_+a,b=v-a,y=v+a),f=_):(g="left"===o?h+Math.max(r,c)+a:"right"===o?h+m-Math.max(l,d)-a:this.caretX,"top"===n?(b=u,v=b-a,_=g-a,f=g+a):(b=u+p,v=b+a,_=g+a,f=g-a),y=b),{x1:_,x2:g,x3:f,y1:b,y2:v,y3:y}}drawTitle(t,e,i){const o=this.title,n=o.length;let a,s,r;if(n){const l=Hd(i.rtl,this.x,this.width);for(t.x=vp(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",a=Gc(i.titleFont),s=i.titleSpacing,e.fillStyle=i.titleColor,e.font=a.string,r=0;r<n;++r)e.fillText(o[r],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+s,r+1===n&&(t.y+=i.titleMarginBottom-s)}}_drawColorBox(t,e,i,o,n){const a=this.labelColors[i],s=this.labelPointStyles[i],{boxHeight:r,boxWidth:l}=n,c=Gc(n.bodyFont),d=vp(this,"left",n),h=o.x(d),u=r<c.lineHeight?(c.lineHeight-r)/2:0,m=e.y+u;if(n.usePointStyle){const e={radius:Math.min(l,r)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},i=o.leftForLtr(h,l)+l/2,c=m+r/2;t.strokeStyle=n.multiKeyBackground,t.fillStyle=n.multiKeyBackground,Lc(t,e,i,c),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,Lc(t,e,i,c)}else{t.lineWidth=rl(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const e=o.leftForLtr(h,l),i=o.leftForLtr(o.xPlus(h,1),l-2),s=Xc(a.borderRadius);Object.values(s).some((t=>0!==t))?(t.beginPath(),t.fillStyle=n.multiKeyBackground,Wc(t,{x:e,y:m,w:l,h:r,radius:s}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),Wc(t,{x:i,y:m+1,w:l-2,h:r-2,radius:s}),t.fill()):(t.fillStyle=n.multiKeyBackground,t.fillRect(e,m,l,r),t.strokeRect(e,m,l,r),t.fillStyle=a.backgroundColor,t.fillRect(i,m+1,l-2,r-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:o}=this,{bodySpacing:n,bodyAlign:a,displayColors:s,boxHeight:r,boxWidth:l,boxPadding:c}=i,d=Gc(i.bodyFont);let h=d.lineHeight,u=0;const m=Hd(i.rtl,this.x,this.width),p=function(i){e.fillText(i,m.x(t.x+u),t.y+h/2),t.y+=h+n},_=m.textAlign(a);let g,f,b,v,y,w,x;for(e.textAlign=a,e.textBaseline="middle",e.font=d.string,t.x=vp(this,_,i),e.fillStyle=i.bodyColor,ml(this.beforeBody,p),u=s&&"right"!==_?"center"===a?l/2+c:l+2+c:0,v=0,w=o.length;v<w;++v){for(g=o[v],f=this.labelTextColors[v],e.fillStyle=f,ml(g.before,p),b=g.lines,s&&b.length&&(this._drawColorBox(e,t,v,m,i),h=Math.max(d.lineHeight,r)),y=0,x=b.length;y<x;++y)p(b[y]),h=d.lineHeight;ml(g.after,p)}u=0,h=d.lineHeight,ml(this.afterBody,p),t.y-=n}drawFooter(t,e,i){const o=this.footer,n=o.length;let a,s;if(n){const r=Hd(i.rtl,this.x,this.width);for(t.x=vp(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=r.textAlign(i.footerAlign),e.textBaseline="middle",a=Gc(i.footerFont),e.fillStyle=i.footerColor,e.font=a.string,s=0;s<n;++s)e.fillText(o[s],r.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+i.footerSpacing}}drawBackground(t,e,i,o){const{xAlign:n,yAlign:a}=this,{x:s,y:r}=t,{width:l,height:c}=i,{topLeft:d,topRight:h,bottomLeft:u,bottomRight:m}=Xc(o.cornerRadius);e.fillStyle=o.backgroundColor,e.strokeStyle=o.borderColor,e.lineWidth=o.borderWidth,e.beginPath(),e.moveTo(s+d,r),"top"===a&&this.drawCaret(t,e,i,o),e.lineTo(s+l-h,r),e.quadraticCurveTo(s+l,r,s+l,r+h),"center"===a&&"right"===n&&this.drawCaret(t,e,i,o),e.lineTo(s+l,r+c-m),e.quadraticCurveTo(s+l,r+c,s+l-m,r+c),"bottom"===a&&this.drawCaret(t,e,i,o),e.lineTo(s+u,r+c),e.quadraticCurveTo(s,r+c,s,r+c-u),"center"===a&&"left"===n&&this.drawCaret(t,e,i,o),e.lineTo(s,r+d),e.quadraticCurveTo(s,r,s+d,r),e.closePath(),e.fill(),o.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,o=i&&i.x,n=i&&i.y;if(o||n){const i=hp[t.position].call(this,this._active,this._eventPosition);if(!i)return;const a=this._size=_p(this,t),s=Object.assign({},i,this._size),r=fp(e,t,s),l=bp(t,s,r,e);o._to===l.x&&n._to===l.y||(this.xAlign=r.xAlign,this.yAlign=r.yAlign,this.width=a.width,this.height=a.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const o={width:this.width,height:this.height},n={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const a=Kc(e.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&s&&(t.save(),t.globalAlpha=i,this.drawBackground(n,t,o,e),Rd(t,e.textDirection),n.y+=a.top,this.drawTitle(n,t,e),this.drawBody(n,t,e),this.drawFooter(n,t,e),Id(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,o=t.map((({datasetIndex:t,index:e})=>{const i=this.chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),n=!pl(i,o),a=this._positionChanged(o,e);(n||a)&&(this._active=o,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const o=this.options,n=this._active||[],a=this._getActiveElements(t,n,e,i),s=this._positionChanged(a,t),r=e||!pl(a,n)||s;return r&&(this._active=a,(o.enabled||o.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),r}_getActiveElements(t,e,i,o){const n=this.options;if("mouseout"===t.type)return[];if(!o)return e.filter((t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index)));const a=this.chart.getElementsAtEventForMode(t,n.mode,n,i);return n.reverse&&a.reverse(),a}_positionChanged(t,e){const{caretX:i,caretY:o,options:n}=this,a=hp[n.position].call(this,t,e);return!1!==a&&(i!==a.x||o!==a.y)}}var Sp={id:"tooltip",_element:Tp,positioners:hp,afterInit(t,e,i){i&&(t.tooltip=new Tp({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",{...i,cancelable:!0}))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:xp},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Mp=Object.freeze({__proto__:null,Colors:Om,Decimation:Rm,Filler:ip,Legend:sp,SubTitle:dp,Title:lp,Tooltip:Sp});function Dp(t,e,i,o){const n=t.indexOf(e);if(-1===n)return((t,e,i,o)=>("string"==typeof e?(i=t.push(e)-1,o.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,o);return n!==t.lastIndexOf(e)?i:n}function Cp(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class Ap extends Du{static id="category";static defaults={ticks:{callback:Cp}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:i,label:o}of e)t[i]===o&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(al(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:Xl(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:Dp(i,t,dl(e,t),this._addedLabels),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:o}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(o=this.getLabels().length-1)),this.min=i,this.max=o}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,o=[];let n=this.getLabels();n=0===t&&e===n.length-1?n:n.slice(t,e+1),this._valueRange=Math.max(n.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)o.push({value:i});return o}getLabelForValue(t){return Cp.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Pp(t,e){const i=[],{bounds:o,step:n,min:a,max:s,precision:r,count:l,maxTicks:c,maxDigits:d,includeBounds:h}=t,u=n||1,m=c-1,{min:p,max:_}=e,g=!al(a),f=!al(s),b=!al(l),v=(_-p)/(d+1);let y,w,x,k,T=Rl((_-p)/m/u)*u;if(T<1e-14&&!g&&!f)return[{value:p},{value:_}];k=Math.ceil(_/T)-Math.floor(p/T),k>m&&(T=Rl(k*T/m/u)*u),al(r)||(y=Math.pow(10,r),T=Math.ceil(T*y)/y),"ticks"===o?(w=Math.floor(p/T)*T,x=Math.ceil(_/T)*T):(w=p,x=_),g&&f&&n&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((s-a)/n,T/1e3)?(k=Math.round(Math.min((s-a)/T,c)),T=(s-a)/k,w=a,x=s):b?(w=g?a:w,x=f?s:x,k=l-1,T=(x-w)/k):(k=(x-w)/T,k=Hl(k,Math.round(k),T/1e3)?Math.round(k):Math.ceil(k));const S=Math.max(Bl(T),Bl(w));y=Math.pow(10,al(r)?S:r),w=Math.round(w*y)/y,x=Math.round(x*y)/y;let M=0;for(g&&(h&&w!==a?(i.push({value:a}),w<a&&M++,Hl(Math.round((w+M*T)*y)/y,a,Ep(a,v,t))&&M++):w<a&&M++);M<k;++M){const t=Math.round((w+M*T)*y)/y;if(f&&t>s)break;i.push({value:t})}return f&&h&&x!==s?i.length&&Hl(i[i.length-1].value,s,Ep(s,v,t))?i[i.length-1].value=s:i.push({value:s}):f&&x!==s||i.push({value:x}),i}function Ep(t,e,{horizontal:i,minRotation:o}){const n=Fl(o),a=(i?Math.sin(n):Math.cos(n))||.001,s=.75*e*(""+t).length;return Math.min(e/a,s)}class Lp extends Du{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return al(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:o,max:n}=this;const a=t=>o=e?o:t,s=t=>n=i?n:t;if(t){const t=Vl(o),e=Vl(n);t<0&&e<0?s(0):t>0&&e>0&&a(0)}if(o===n){let e=0===n?1:Math.abs(.05*n);s(n+e),t||a(o-e)}this.min=o,this.max=n}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:o}=t;return o?(e=Math.ceil(this.max/o)-Math.floor(this.min/o)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${o} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const o=Pp({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&Nl(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const o=(i-e)/Math.max(t.length-1,1)/2;e-=o,i+=o}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return vc(t,this.chart.options.locale,this.options.ticks.format)}}class $p extends Lp{static id="linear";static defaults={ticks:{callback:wc.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=ll(t)?t:0,this.max=ll(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=Fl(this.options.ticks.minRotation),o=(t?Math.sin(i):Math.cos(i))||.001,n=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,n.lineHeight/o))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const zp=t=>Math.floor(Ol(t)),Op=(t,e)=>Math.pow(10,zp(t)+e);function Vp(t){return 1===t/Math.pow(10,zp(t))}function Hp(t,e,i){const o=Math.pow(10,i),n=Math.floor(t/o);return Math.ceil(e/o)-n}function Rp(t,{min:e,max:i}){e=cl(t.min,e);const o=[],n=zp(e);let a=function(t,e){let i=zp(e-t);for(;Hp(t,e,i)>10;)i++;for(;Hp(t,e,i)<10;)i--;return Math.min(i,zp(t))}(e,i),s=a<0?Math.pow(10,Math.abs(a)):1;const r=Math.pow(10,a),l=n>a?Math.pow(10,n):0,c=Math.round((e-l)*s)/s,d=Math.floor((e-l)/r/10)*r*10;let h=Math.floor((c-d)/Math.pow(10,a)),u=cl(t.min,Math.round((l+d+h*Math.pow(10,a))*s)/s);for(;u<i;)o.push({value:u,major:Vp(u),significand:h}),h>=10?h=h<15?15:20:h++,h>=20&&(a++,h=2,s=a>=0?1:s),u=Math.round((l+d+h*Math.pow(10,a))*s)/s;const m=cl(t.max,u);return o.push({value:m,major:Vp(m),significand:h}),o}class Ip extends Du{static id="logarithmic";static defaults={ticks:{callback:wc.formatters.logarithmic,major:{enabled:!0}}};constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Lp.prototype.parse.apply(this,[t,e]);if(0!==i)return ll(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=ll(t)?Math.max(0,t):null,this.max=ll(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ll(this._userMin)&&(this.min=t===Op(this.min,0)?Op(this.min,-1):Op(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,o=this.max;const n=e=>i=t?i:e,a=t=>o=e?o:t;i===o&&(i<=0?(n(1),a(10)):(n(Op(i,-1)),a(Op(o,1)))),i<=0&&n(Op(o,-1)),o<=0&&a(Op(i,1)),this.min=i,this.max=o}buildTicks(){const t=this.options,e=Rp({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&Nl(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return void 0===t?"0":vc(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Ol(t),this._valueRange=Ol(this.max)-Ol(t)}getPixelForValue(t){return void 0!==t&&0!==t||(t=this.min),null===t||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Ol(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function Np(t){const e=t.ticks;if(e.display&&t.display){const t=Kc(e.backdropPadding);return dl(e.font&&e.font.size,Dc.font.size)+t.height}return 0}function Fp(t,e,i,o,n){return t===o||t===n?{start:e-i/2,end:e+i/2}:t<o||t>n?{start:e-i,end:e}:{start:e,end:e+i}}function Wp(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),o=[],n=[],a=t._pointLabels.length,s=t.options.pointLabels,r=s.centerPointLabels?Dl/a:0;for(let h=0;h<a;h++){const a=s.setContext(t.getPointLabelContext(h));n[h]=a.padding;const u=t.getPointPosition(h,t.drawingArea+n[h],r),m=Gc(a.font),p=(l=t.ctx,c=m,d=sl(d=t._pointLabels[h])?d:[d],{w:Ac(l,c.string,d),h:d.length*c.lineHeight});o[h]=p;const _=ql(t.getIndexAngle(h)+r),g=Math.round(Wl(_));Bp(i,e,_,Fp(g,u.x,p.w,0,180),Fp(g,u.y,p.h,90,270))}var l,c,d;t.setCenterPoint(e.l-i.l,i.r-e.r,e.t-i.t,i.b-e.b),t._pointLabelItems=function(t,e,i){const o=[],n=t._pointLabels.length,a=t.options,{centerPointLabels:s,display:r}=a.pointLabels,l={extra:Np(a)/2,additionalAngle:s?Dl/n:0};let c;for(let a=0;a<n;a++){l.padding=i[a],l.size=e[a];const n=jp(t,a,l);o.push(n),"auto"===r&&(n.visible=Up(n,c),n.visible&&(c=n))}return o}(t,o,n)}function Bp(t,e,i,o,n){const a=Math.abs(Math.sin(i)),s=Math.abs(Math.cos(i));let r=0,l=0;o.start<e.l?(r=(e.l-o.start)/a,t.l=Math.min(t.l,e.l-r)):o.end>e.r&&(r=(o.end-e.r)/a,t.r=Math.max(t.r,e.r+r)),n.start<e.t?(l=(e.t-n.start)/s,t.t=Math.min(t.t,e.t-l)):n.end>e.b&&(l=(n.end-e.b)/s,t.b=Math.max(t.b,e.b+l))}function jp(t,e,i){const o=t.drawingArea,{extra:n,additionalAngle:a,padding:s,size:r}=i,l=t.getPointPosition(e,o+n+s,a),c=Math.round(Wl(ql(l.angle+Ll))),d=function(t,e,i){90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e);return t}(l.y,r.h,c),h=function(t){if(0===t||180===t)return"center";if(t<180)return"left";return"right"}(c),u=function(t,e,i){"right"===i?t-=e:"center"===i&&(t-=e/2);return t}(l.x,r.w,h);return{visible:!0,x:l.x,y:d,textAlign:h,left:u,top:d,right:u+r.w,bottom:d+r.h}}function Up(t,e){if(!e)return!0;const{left:i,top:o,right:n,bottom:a}=t;return!(zc({x:i,y:o},e)||zc({x:i,y:a},e)||zc({x:n,y:o},e)||zc({x:n,y:a},e))}function Yp(t,e,i){const{left:o,top:n,right:a,bottom:s}=i,{backdropColor:r}=e;if(!al(r)){const i=Xc(e.borderRadius),l=Kc(e.backdropPadding);t.fillStyle=r;const c=o-l.left,d=n-l.top,h=a-o+l.width,u=s-n+l.height;Object.values(i).some((t=>0!==t))?(t.beginPath(),Wc(t,{x:c,y:d,w:h,h:u,radius:i}),t.fill()):t.fillRect(c,d,h,u)}}function qp(t,e,i,o){const{ctx:n}=t;if(i)n.arc(t.xCenter,t.yCenter,e,0,Cl);else{let i=t.getPointPosition(0,e);n.moveTo(i.x,i.y);for(let a=1;a<o;a++)i=t.getPointPosition(a,e),n.lineTo(i.x,i.y)}}class Zp extends Lp{static id="radialLinear";static defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:wc.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=Kc(Np(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=ll(t)&&!isNaN(t)?t:0,this.max=ll(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Np(this.options))}generateTickLabels(t){Lp.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map(((t,e)=>{const i=ul(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""})).filter(((t,e)=>this.chart.getDataVisibility(e)))}fit(){const t=this.options;t.display&&t.pointLabels.display?Wp(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,o){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-o)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,o))}getIndexAngle(t){return ql(t*(Cl/(this._pointLabels.length||1))+Fl(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(al(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(al(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const i=e[t];return function(t,e,i){return Jc(t,{label:i,index:e,type:"pointLabel"})}(this.getContext(),t,i)}}getPointPosition(t,e,i=0){const o=this.getIndexAngle(t)-Ll+i;return{x:Math.cos(o)*e+this.xCenter,y:Math.sin(o)*e+this.yCenter,angle:o}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:o,bottom:n}=this._pointLabelItems[t];return{left:e,top:i,right:o,bottom:n}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),qp(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:i,grid:o,border:n}=e,a=this._pointLabels.length;let s,r,l;if(e.pointLabels.display&&function(t,e){const{ctx:i,options:{pointLabels:o}}=t;for(let n=e-1;n>=0;n--){const e=t._pointLabelItems[n];if(!e.visible)continue;const a=o.setContext(t.getPointLabelContext(n));Yp(i,a,e);const s=Gc(a.font),{x:r,y:l,textAlign:c}=e;Fc(i,t._pointLabels[n],r,l+s.lineHeight/2,s,{color:a.color,textAlign:c,textBaseline:"middle"})}}(this,a),o.display&&this.ticks.forEach(((t,e)=>{if(0!==e||0===e&&this.min<0){r=this.getDistanceFromCenterForValue(t.value);const i=this.getContext(e),s=o.setContext(i),l=n.setContext(i);!function(t,e,i,o,n){const a=t.ctx,s=e.circular,{color:r,lineWidth:l}=e;!s&&!o||!r||!l||i<0||(a.save(),a.strokeStyle=r,a.lineWidth=l,a.setLineDash(n.dash||[]),a.lineDashOffset=n.dashOffset,a.beginPath(),qp(t,i,s,o),a.closePath(),a.stroke(),a.restore())}(this,s,r,a,l)}})),i.display){for(t.save(),s=a-1;s>=0;s--){const o=i.setContext(this.getPointLabelContext(s)),{color:n,lineWidth:a}=o;a&&n&&(t.lineWidth=a,t.strokeStyle=n,t.setLineDash(o.borderDash),t.lineDashOffset=o.borderDashOffset,r=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),l=this.getPointPosition(s,r),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const o=this.getIndexAngle(0);let n,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(o),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((o,s)=>{if(0===s&&this.min>=0&&!e.reverse)return;const r=i.setContext(this.getContext(s)),l=Gc(r.font);if(n=this.getDistanceFromCenterForValue(this.ticks[s].value),r.showLabelBackdrop){t.font=l.string,a=t.measureText(o.label).width,t.fillStyle=r.backdropColor;const e=Kc(r.backdropPadding);t.fillRect(-a/2-e.left,-n-l.size/2-e.top,a+e.width,l.size+e.height)}Fc(t,o.label,0,-n,l,{color:r.color,strokeColor:r.textStrokeColor,strokeWidth:r.textStrokeWidth})})),t.restore()}drawTitle(){}}const Xp={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Kp=Object.keys(Xp);function Gp(t,e){return t-e}function Qp(t,e){if(al(e))return null;const i=t._adapter,{parser:o,round:n,isoWeekday:a}=t._parseOpts;let s=e;return"function"==typeof o&&(s=o(s)),ll(s)||(s="string"==typeof o?i.parse(s,o):i.parse(s)),null===s?null:(n&&(s="week"!==n||!Il(a)&&!0!==a?i.startOf(s,n):i.startOf(s,"isoWeek",a)),+s)}function Jp(t,e,i,o){const n=Kp.length;for(let a=Kp.indexOf(t);a<n-1;++a){const t=Xp[Kp[a]],n=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((i-e)/(n*t.size))<=o)return Kp[a]}return Kp[n-1]}function t_(t,e,i){if(i){if(i.length){const{lo:o,hi:n}=Gl(i,e);t[i[o]>=e?i[o]:i[n]]=!0}}else t[e]=!0}function e_(t,e,i){const o=[],n={},a=e.length;let s,r;for(s=0;s<a;++s)r=e[s],n[r]=s,o.push({value:r,major:!1});return 0!==a&&i?function(t,e,i,o){const n=t._adapter,a=+n.startOf(e[0].value,o),s=e[e.length-1].value;let r,l;for(r=a;r<=s;r=+n.add(r,1,o))l=i[r],l>=0&&(e[l].major=!0);return e}(t,o,n,i):o}class i_ extends Du{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const i=t.time||(t.time={}),o=this._adapter=new Lh._date(t.adapters.date);o.init(e),vl(i.displayFormats,o.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:Qp(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:o,max:n,minDefined:a,maxDefined:s}=this.getUserBounds();function r(t){a||isNaN(t.min)||(o=Math.min(o,t.min)),s||isNaN(t.max)||(n=Math.max(n,t.max))}a&&s||(r(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||r(this.getMinMax(!1))),o=ll(o)&&!isNaN(o)?o:+e.startOf(Date.now(),i),n=ll(n)&&!isNaN(n)?n:+e.endOf(Date.now(),i)+1,this.min=Math.min(o,n-1),this.max=Math.max(o+1,n)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,o="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&o.length&&(this.min=this._userMin||o[0],this.max=this._userMax||o[o.length-1]);const n=this.min,a=function(t,e,i){let o=0,n=t.length;for(;o<n&&t[o]<e;)o++;for(;n>o&&t[n-1]>i;)n--;return o>0||n<t.length?t.slice(o,n):t}(o,n,this.max);return this._unit=e.unit||(i.autoSkip?Jp(e.minUnit,this.min,this.max,this._getLabelCapacity(n)):function(t,e,i,o,n){for(let a=Kp.length-1;a>=Kp.indexOf(i);a--){const i=Kp[a];if(Xp[i].common&&t._adapter.diff(n,o,i)>=e-1)return i}return Kp[i?Kp.indexOf(i):0]}(this,a.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=Kp.indexOf(t)+1,i=Kp.length;e<i;++e)if(Xp[Kp[e]].common)return Kp[e]}(this._unit):void 0,this.initOffsets(o),t.reverse&&a.reverse(),e_(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map((t=>+t.value)))}initOffsets(t=[]){let e,i,o=0,n=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),o=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,i=this.getDecimalForValue(t[t.length-1]),n=1===t.length?i:(i-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;o=Xl(o,0,a),n=Xl(n,0,a),this._offsets={start:o,end:n,factor:1/(o+1+n)}}_generate(){const t=this._adapter,e=this.min,i=this.max,o=this.options,n=o.time,a=n.unit||Jp(n.minUnit,e,i,this._getLabelCapacity(e)),s=dl(o.ticks.stepSize,1),r="week"===a&&n.isoWeekday,l=Il(r)||!0===r,c={};let d,h,u=e;if(l&&(u=+t.startOf(u,"isoWeek",r)),u=+t.startOf(u,l?"day":a),t.diff(i,e,a)>1e5*s)throw new Error(e+" and "+i+" are too far apart with stepSize of "+s+" "+a);const m="data"===o.ticks.source&&this.getDataTimestamps();for(d=u,h=0;d<i;d=+t.add(d,s,a),h++)t_(c,d,m);return d!==i&&"ticks"!==o.bounds&&1!==h||t_(c,d,m),Object.keys(c).sort(Gp).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){const i=this.options.time.displayFormats,o=this._unit,n=e||i[o];return this._adapter.format(t,n)}_tickFormatFunction(t,e,i,o){const n=this.options,a=n.ticks.callback;if(a)return ul(a,[t,e,i],this);const s=n.time.displayFormats,r=this._unit,l=this._majorUnit,c=r&&s[r],d=l&&s[l],h=i[e],u=l&&d&&h&&h.major;return this._adapter.format(t,o||(u?d:c))}generateTickLabels(t){let e,i,o;for(e=0,i=t.length;e<i;++e)o=t[e],o.label=this._tickFormatFunction(o.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,i=this.ctx.measureText(t).width,o=Fl(this.isHorizontal()?e.maxRotation:e.minRotation),n=Math.cos(o),a=Math.sin(o),s=this._resolveTickFontOptions(0).size;return{w:i*n+s*a,h:i*a+s*n}}_getLabelCapacity(t){const e=this.options.time,i=e.displayFormats,o=i[e.unit]||i.millisecond,n=this._tickFormatFunction(t,0,e_(this,[t],this._majorUnit),o),a=this._getLabelSize(n),s=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return s>0?s:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const o=this.getMatchingVisibleMetas();if(this._normalized&&o.length)return this._cache.data=o[0].controller.getAllParsedValues(this);for(t=0,e=o.length;t<e;++t)i=i.concat(o[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(i)}getLabelTimestamps(){const t=this._cache.labels||[];let e,i;if(t.length)return t;const o=this.getLabels();for(e=0,i=o.length;e<i;++e)t.push(Qp(this,o[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return ic(t.sort(Gp))}}function o_(t,e,i){let o,n,a,s,r=0,l=t.length-1;i?(e>=t[r].pos&&e<=t[l].pos&&({lo:r,hi:l}=Ql(t,"pos",e)),({pos:o,time:a}=t[r]),({pos:n,time:s}=t[l])):(e>=t[r].time&&e<=t[l].time&&({lo:r,hi:l}=Ql(t,"time",e)),({time:o,pos:a}=t[r]),({time:n,pos:s}=t[l]));const c=n-o;return c?a+(s-a)*(e-o)/c:a}class n_ extends i_{static id="timeseries";static defaults=i_.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=o_(e,this.min),this._tableRange=o_(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,o=[],n=[];let a,s,r,l,c;for(a=0,s=t.length;a<s;++a)l=t[a],l>=e&&l<=i&&o.push(l);if(o.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(a=0,s=o.length;a<s;++a)c=o[a+1],r=o[a-1],l=o[a],Math.round((c+r)/2)!==l&&n.push({time:l,pos:a/(s-1)});return n}_generate(){const t=this.min,e=this.max;let i=super.getDataTimestamps();return i.includes(t)&&i.length||i.splice(0,0,t),i.includes(e)&&1!==i.length||i.push(e),i.sort(((t,e)=>t-e))}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return t=e.length&&i.length?this.normalize(e.concat(i)):e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(o_(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return o_(this._table,i*this._tableRange+this._minPos,!0)}}var a_=Object.freeze({__proto__:null,CategoryScale:Ap,LinearScale:$p,LogarithmicScale:Ip,RadialLinearScale:Zp,TimeScale:i_,TimeSeriesScale:n_});const s_=[Ah,Cm,Mp,a_];var r_=Object.freeze({__proto__:null,Animation:Jd,Animations:th,ArcElement:cm,BarController:wh,BarElement:Dm,BasePlatform:Jh,BasicPlatform:tu,BubbleController:xh,CategoryScale:Ap,Chart:om,Colors:Om,DatasetController:uh,Decimation:Rm,DomPlatform:_u,DoughnutController:kh,Element:fu,Filler:ip,Interaction:Ih,Legend:sp,LineController:Th,LineElement:bm,LinearScale:$p,LogarithmicScale:Ip,PieController:Mh,PointElement:ym,PolarAreaController:Sh,RadarController:Dh,RadialLinearScale:Zp,Scale:Du,ScatterController:Ch,SubTitle:dp,Ticks:wc,TimeScale:i_,TimeSeriesScale:n_,Title:lp,Tooltip:Sp,_adapters:Lh,_detectPlatform:gu,animator:Kd,controllers:Ah,defaults:Dc,elements:Cm,layouts:Qh,plugins:Mp,registerables:s_,registry:Pu,scales:a_});function l_(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var c_,d_={exports:{}};c_=d_,function(t,e,i,o){var n,a=["","webkit","Moz","MS","ms","o"],s=e.createElement("div"),r="function",l=Math.round,c=Math.abs,d=Date.now;function h(t,e,i){return setTimeout(b(t,i),e)}function u(t,e,i){return!!Array.isArray(t)&&(m(t,i[e],i),!0)}function m(t,e,i){var n;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==o)for(n=0;n<t.length;)e.call(i,t[n],n,t),n++;else for(n in t)t.hasOwnProperty(n)&&e.call(i,t[n],n,t)}function p(e,i,o){var n="DEPRECATED METHOD: "+i+"\n"+o+" AT \n";return function(){var i=new Error("get-stack-trace"),o=i&&i.stack?i.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",a=t.console&&(t.console.warn||t.console.log);return a&&a.call(t.console,n,o),e.apply(this,arguments)}}n="function"!=typeof Object.assign?function(t){if(t===o||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(n!==o&&null!==n)for(var a in n)n.hasOwnProperty(a)&&(e[a]=n[a])}return e}:Object.assign;var _=p((function(t,e,i){for(var n=Object.keys(e),a=0;a<n.length;)(!i||i&&t[n[a]]===o)&&(t[n[a]]=e[n[a]]),a++;return t}),"extend","Use `assign`."),g=p((function(t,e){return _(t,e,!0)}),"merge","Use `assign`.");function f(t,e,i){var o,a=e.prototype;(o=t.prototype=Object.create(a)).constructor=t,o._super=a,i&&n(o,i)}function b(t,e){return function(){return t.apply(e,arguments)}}function v(t,e){return typeof t==r?t.apply(e&&e[0]||o,e):t}function y(t,e){return t===o?e:t}function w(t,e,i){m(S(e),(function(e){t.addEventListener(e,i,!1)}))}function x(t,e,i){m(S(e),(function(e){t.removeEventListener(e,i,!1)}))}function k(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function T(t,e){return t.indexOf(e)>-1}function S(t){return t.trim().split(/\s+/g)}function M(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var o=0;o<t.length;){if(i&&t[o][i]==e||!i&&t[o]===e)return o;o++}return-1}function D(t){return Array.prototype.slice.call(t,0)}function C(t,e,i){for(var o=[],n=[],a=0;a<t.length;){var s=e?t[a][e]:t[a];M(n,s)<0&&o.push(t[a]),n[a]=s,a++}return i&&(o=e?o.sort((function(t,i){return t[e]>i[e]})):o.sort()),o}function A(t,e){for(var i,n,s=e[0].toUpperCase()+e.slice(1),r=0;r<a.length;){if((n=(i=a[r])?i+s:e)in t)return n;r++}return o}var P=1;function E(e){var i=e.ownerDocument||e;return i.defaultView||i.parentWindow||t}var L="ontouchstart"in t,$=A(t,"PointerEvent")!==o,z=L&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),O="touch",V="mouse",H=25,R=1,I=4,N=8,F=1,W=2,B=4,j=8,U=16,Y=W|B,q=j|U,Z=Y|q,X=["x","y"],K=["clientX","clientY"];function G(t,e){var i=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){v(t.options.enable,[t])&&i.handler(e)},this.init()}function Q(t,e,i){var n=i.pointers.length,a=i.changedPointers.length,s=e&R&&n-a==0,r=e&(I|N)&&n-a==0;i.isFirst=!!s,i.isFinal=!!r,s&&(t.session={}),i.eventType=e,function(t,e){var i=t.session,n=e.pointers,a=n.length;i.firstInput||(i.firstInput=J(e)),a>1&&!i.firstMultiple?i.firstMultiple=J(e):1===a&&(i.firstMultiple=!1);var s=i.firstInput,r=i.firstMultiple,l=r?r.center:s.center,h=e.center=tt(n);e.timeStamp=d(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=nt(l,h),e.distance=ot(l,h),function(t,e){var i=e.center,o=t.offsetDelta||{},n=t.prevDelta||{},a=t.prevInput||{};e.eventType!==R&&a.eventType!==I||(n=t.prevDelta={x:a.deltaX||0,y:a.deltaY||0},o=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=n.x+(i.x-o.x),e.deltaY=n.y+(i.y-o.y)}(i,e),e.offsetDirection=it(e.deltaX,e.deltaY);var u,m,p=et(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=p.x,e.overallVelocityY=p.y,e.overallVelocity=c(p.x)>c(p.y)?p.x:p.y,e.scale=r?(u=r.pointers,ot((m=n)[0],m[1],K)/ot(u[0],u[1],K)):1,e.rotation=r?function(t,e){return nt(e[1],e[0],K)+nt(t[1],t[0],K)}(r.pointers,n):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,function(t,e){var i,n,a,s,r=t.lastInterval||e,l=e.timeStamp-r.timeStamp;if(e.eventType!=N&&(l>H||r.velocity===o)){var d=e.deltaX-r.deltaX,h=e.deltaY-r.deltaY,u=et(l,d,h);n=u.x,a=u.y,i=c(u.x)>c(u.y)?u.x:u.y,s=it(d,h),t.lastInterval=e}else i=r.velocity,n=r.velocityX,a=r.velocityY,s=r.direction;e.velocity=i,e.velocityX=n,e.velocityY=a,e.direction=s}(i,e);var _=t.element;k(e.srcEvent.target,_)&&(_=e.srcEvent.target),e.target=_}(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function J(t){for(var e=[],i=0;i<t.pointers.length;)e[i]={clientX:l(t.pointers[i].clientX),clientY:l(t.pointers[i].clientY)},i++;return{timeStamp:d(),pointers:e,center:tt(e),deltaX:t.deltaX,deltaY:t.deltaY}}function tt(t){var e=t.length;if(1===e)return{x:l(t[0].clientX),y:l(t[0].clientY)};for(var i=0,o=0,n=0;n<e;)i+=t[n].clientX,o+=t[n].clientY,n++;return{x:l(i/e),y:l(o/e)}}function et(t,e,i){return{x:e/t||0,y:i/t||0}}function it(t,e){return t===e?F:c(t)>=c(e)?t<0?W:B:e<0?j:U}function ot(t,e,i){i||(i=X);var o=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return Math.sqrt(o*o+n*n)}function nt(t,e,i){i||(i=X);var o=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return 180*Math.atan2(n,o)/Math.PI}G.prototype={handler:function(){},init:function(){this.evEl&&w(this.element,this.evEl,this.domHandler),this.evTarget&&w(this.target,this.evTarget,this.domHandler),this.evWin&&w(E(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&x(this.element,this.evEl,this.domHandler),this.evTarget&&x(this.target,this.evTarget,this.domHandler),this.evWin&&x(E(this.element),this.evWin,this.domHandler)}};var at={mousedown:R,mousemove:2,mouseup:I},st="mousedown",rt="mousemove mouseup";function lt(){this.evEl=st,this.evWin=rt,this.pressed=!1,G.apply(this,arguments)}f(lt,G,{handler:function(t){var e=at[t.type];e&R&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=I),this.pressed&&(e&I&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:V,srcEvent:t}))}});var ct={pointerdown:R,pointermove:2,pointerup:I,pointercancel:N,pointerout:N},dt={2:O,3:"pen",4:V,5:"kinect"},ht="pointerdown",ut="pointermove pointerup pointercancel";function mt(){this.evEl=ht,this.evWin=ut,G.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}t.MSPointerEvent&&!t.PointerEvent&&(ht="MSPointerDown",ut="MSPointerMove MSPointerUp MSPointerCancel"),f(mt,G,{handler:function(t){var e=this.store,i=!1,o=t.type.toLowerCase().replace("ms",""),n=ct[o],a=dt[t.pointerType]||t.pointerType,s=a==O,r=M(e,t.pointerId,"pointerId");n&R&&(0===t.button||s)?r<0&&(e.push(t),r=e.length-1):n&(I|N)&&(i=!0),r<0||(e[r]=t,this.callback(this.manager,n,{pointers:e,changedPointers:[t],pointerType:a,srcEvent:t}),i&&e.splice(r,1))}});var pt={touchstart:R,touchmove:2,touchend:I,touchcancel:N};function _t(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,G.apply(this,arguments)}function gt(t,e){var i=D(t.touches),o=D(t.changedTouches);return e&(I|N)&&(i=C(i.concat(o),"identifier",!0)),[i,o]}f(_t,G,{handler:function(t){var e=pt[t.type];if(e===R&&(this.started=!0),this.started){var i=gt.call(this,t,e);e&(I|N)&&i[0].length-i[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:O,srcEvent:t})}}});var ft={touchstart:R,touchmove:2,touchend:I,touchcancel:N},bt="touchstart touchmove touchend touchcancel";function vt(){this.evTarget=bt,this.targetIds={},G.apply(this,arguments)}function yt(t,e){var i=D(t.touches),o=this.targetIds;if(e&(2|R)&&1===i.length)return o[i[0].identifier]=!0,[i,i];var n,a,s=D(t.changedTouches),r=[],l=this.target;if(a=i.filter((function(t){return k(t.target,l)})),e===R)for(n=0;n<a.length;)o[a[n].identifier]=!0,n++;for(n=0;n<s.length;)o[s[n].identifier]&&r.push(s[n]),e&(I|N)&&delete o[s[n].identifier],n++;return r.length?[C(a.concat(r),"identifier",!0),r]:void 0}f(vt,G,{handler:function(t){var e=ft[t.type],i=yt.call(this,t,e);i&&this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:O,srcEvent:t})}});var wt=2500;function xt(){G.apply(this,arguments);var t=b(this.handler,this);this.touch=new vt(this.manager,t),this.mouse=new lt(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function kt(t,e){t&R?(this.primaryTouch=e.changedPointers[0].identifier,Tt.call(this,e)):t&(I|N)&&Tt.call(this,e)}function Tt(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var i={x:e.clientX,y:e.clientY};this.lastTouches.push(i);var o=this.lastTouches;setTimeout((function(){var t=o.indexOf(i);t>-1&&o.splice(t,1)}),wt)}}function St(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,o=0;o<this.lastTouches.length;o++){var n=this.lastTouches[o],a=Math.abs(e-n.x),s=Math.abs(i-n.y);if(a<=25&&s<=25)return!0}return!1}f(xt,G,{handler:function(t,e,i){var o=i.pointerType==O,n=i.pointerType==V;if(!(n&&i.sourceCapabilities&&i.sourceCapabilities.firesTouchEvents)){if(o)kt.call(this,e,i);else if(n&&St.call(this,i))return;this.callback(t,e,i)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var Mt=A(s.style,"touchAction"),Dt=Mt!==o,Ct="compute",At="auto",Pt="manipulation",Et="none",Lt="pan-x",$t="pan-y",zt=function(){if(!Dt)return!1;var e={},i=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(o){e[o]=!i||t.CSS.supports("touch-action",o)})),e}();function Ot(t,e){this.manager=t,this.set(e)}Ot.prototype={set:function(t){t==Ct&&(t=this.compute()),Dt&&this.manager.element.style&&zt[t]&&(this.manager.element.style[Mt]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return m(this.manager.recognizers,(function(e){v(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))})),function(t){if(T(t,Et))return Et;var e=T(t,Lt),i=T(t,$t);return e&&i?Et:e||i?e?Lt:$t:T(t,Pt)?Pt:At}(t.join(" "))},preventDefaults:function(t){var e=t.srcEvent,i=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var o=this.actions,n=T(o,Et)&&!zt[Et],a=T(o,$t)&&!zt[$t],s=T(o,Lt)&&!zt[Lt];if(n){var r=1===t.pointers.length,l=t.distance<2,c=t.deltaTime<250;if(r&&l&&c)return}if(!s||!a)return n||a&&i&Y||s&&i&q?this.preventSrc(e):void 0}},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var Vt=1,Ht=32;function Rt(t){this.options=n({},this.defaults,t||{}),this.id=P++,this.manager=null,this.options.enable=y(this.options.enable,!0),this.state=Vt,this.simultaneous={},this.requireFail=[]}function It(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}function Nt(t){return t==U?"down":t==j?"up":t==W?"left":t==B?"right":""}function Ft(t,e){var i=e.manager;return i?i.get(t):t}function Wt(){Rt.apply(this,arguments)}function Bt(){Wt.apply(this,arguments),this.pX=null,this.pY=null}function jt(){Wt.apply(this,arguments)}function Ut(){Rt.apply(this,arguments),this._timer=null,this._input=null}function Yt(){Wt.apply(this,arguments)}function qt(){Wt.apply(this,arguments)}function Zt(){Rt.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function Xt(t,e){return(e=e||{}).recognizers=y(e.recognizers,Xt.defaults.preset),new Kt(t,e)}function Kt(t,e){var i;this.options=n({},Xt.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((i=this).options.inputClass||($?mt:z?vt:L?xt:lt))(i,Q),this.touchAction=new Ot(this,this.options.touchAction),Gt(this,!0),m(this.options.recognizers,(function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])}),this)}function Gt(t,e){var i,o=t.element;o.style&&(m(t.options.cssProps,(function(n,a){i=A(o.style,a),e?(t.oldCssProps[i]=o.style[i],o.style[i]=n):o.style[i]=t.oldCssProps[i]||""})),e||(t.oldCssProps={}))}Rt.prototype={defaults:{},set:function(t){return n(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(u(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=Ft(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return u(t,"dropRecognizeWith",this)||(t=Ft(t,this),delete this.simultaneous[t.id]),this},requireFailure:function(t){if(u(t,"requireFailure",this))return this;var e=this.requireFail;return-1===M(e,t=Ft(t,this))&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(u(t,"dropRequireFailure",this))return this;t=Ft(t,this);var e=M(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,i=this.state;function o(i){e.manager.emit(i,t)}i<8&&o(e.options.event+It(i)),o(e.options.event),t.additionalEvent&&o(t.additionalEvent),i>=8&&o(e.options.event+It(i))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=Ht},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(Ht|Vt)))return!1;t++}return!0},recognize:function(t){var e=n({},t);if(!v(this.options.enable,[this,e]))return this.reset(),void(this.state=Ht);56&this.state&&(this.state=Vt),this.state=this.process(e),30&this.state&&this.tryEmit(e)},process:function(t){},getTouchAction:function(){},reset:function(){}},f(Wt,Rt,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,i=t.eventType,o=6&e,n=this.attrTest(t);return o&&(i&N||!n)?16|e:o||n?i&I?8|e:2&e?4|e:2:Ht}}),f(Bt,Wt,{defaults:{event:"pan",threshold:10,pointers:1,direction:Z},getTouchAction:function(){var t=this.options.direction,e=[];return t&Y&&e.push($t),t&q&&e.push(Lt),e},directionTest:function(t){var e=this.options,i=!0,o=t.distance,n=t.direction,a=t.deltaX,s=t.deltaY;return n&e.direction||(e.direction&Y?(n=0===a?F:a<0?W:B,i=a!=this.pX,o=Math.abs(t.deltaX)):(n=0===s?F:s<0?j:U,i=s!=this.pY,o=Math.abs(t.deltaY))),t.direction=n,i&&o>e.threshold&&n&e.direction},attrTest:function(t){return Wt.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Nt(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),f(jt,Wt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Et]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),f(Ut,Rt,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[At]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,o=t.distance<e.threshold,n=t.deltaTime>e.time;if(this._input=t,!o||!i||t.eventType&(I|N)&&!n)this.reset();else if(t.eventType&R)this.reset(),this._timer=h((function(){this.state=8,this.tryEmit()}),e.time,this);else if(t.eventType&I)return 8;return Ht},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&t.eventType&I?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=d(),this.manager.emit(this.options.event,this._input)))}}),f(Yt,Wt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Et]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),f(qt,Wt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Y|q,pointers:1},getTouchAction:function(){return Bt.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(Y|q)?e=t.overallVelocity:i&Y?e=t.overallVelocityX:i&q&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&c(e)>this.options.velocity&&t.eventType&I},emit:function(t){var e=Nt(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),f(Zt,Rt,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Pt]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,o=t.distance<e.threshold,n=t.deltaTime<e.time;if(this.reset(),t.eventType&R&&0===this.count)return this.failTimeout();if(o&&n&&i){if(t.eventType!=I)return this.failTimeout();var a=!this.pTime||t.timeStamp-this.pTime<e.interval,s=!this.pCenter||ot(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,s&&a?this.count+=1:this.count=1,this._input=t,0==this.count%e.taps)return this.hasRequireFailures()?(this._timer=h((function(){this.state=8,this.tryEmit()}),e.interval,this),2):8}return Ht},failTimeout:function(){return this._timer=h((function(){this.state=Ht}),this.options.interval,this),Ht},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),Xt.VERSION="2.0.7",Xt.defaults={domEvents:!1,touchAction:Ct,enable:!0,inputTarget:null,inputClass:null,preset:[[Yt,{enable:!1}],[jt,{enable:!1},["rotate"]],[qt,{direction:Y}],[Bt,{direction:Y},["swipe"]],[Zt],[Zt,{event:"doubletap",taps:2},["tap"]],[Ut]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Kt.prototype={set:function(t){return n(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?2:1},recognize:function(t){var e=this.session;if(!e.stopped){var i;this.touchAction.preventDefaults(t);var o=this.recognizers,n=e.curRecognizer;(!n||n&&8&n.state)&&(n=e.curRecognizer=null);for(var a=0;a<o.length;)i=o[a],2===e.stopped||n&&i!=n&&!i.canRecognizeWith(n)?i.reset():i.recognize(t),!n&&14&i.state&&(n=e.curRecognizer=i),a++}},get:function(t){if(t instanceof Rt)return t;for(var e=this.recognizers,i=0;i<e.length;i++)if(e[i].options.event==t)return e[i];return null},add:function(t){if(u(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(u(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,i=M(e,t);-1!==i&&(e.splice(i,1),this.touchAction.update())}return this},on:function(t,e){if(t!==o&&e!==o){var i=this.handlers;return m(S(t),(function(t){i[t]=i[t]||[],i[t].push(e)})),this}},off:function(t,e){if(t!==o){var i=this.handlers;return m(S(t),(function(t){e?i[t]&&i[t].splice(M(i[t],e),1):delete i[t]})),this}},emit:function(t,i){this.options.domEvents&&function(t,i){var o=e.createEvent("Event");o.initEvent(t,!0,!0),o.gesture=i,i.target.dispatchEvent(o)}(t,i);var o=this.handlers[t]&&this.handlers[t].slice();if(o&&o.length){i.type=t,i.preventDefault=function(){i.srcEvent.preventDefault()};for(var n=0;n<o.length;)o[n](i),n++}},destroy:function(){this.element&&Gt(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},n(Xt,{INPUT_START:R,INPUT_MOVE:2,INPUT_END:I,INPUT_CANCEL:N,STATE_POSSIBLE:Vt,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:Ht,DIRECTION_NONE:F,DIRECTION_LEFT:W,DIRECTION_RIGHT:B,DIRECTION_UP:j,DIRECTION_DOWN:U,DIRECTION_HORIZONTAL:Y,DIRECTION_VERTICAL:q,DIRECTION_ALL:Z,Manager:Kt,Input:G,TouchAction:Ot,TouchInput:vt,MouseInput:lt,PointerEventInput:mt,TouchMouseInput:xt,SingleTouchInput:_t,Recognizer:Rt,AttrRecognizer:Wt,Tap:Zt,Pan:Bt,Swipe:qt,Pinch:jt,Rotate:Yt,Press:Ut,on:w,off:x,each:m,merge:g,extend:_,assign:n,inherit:f,bindFn:b,prefixed:A}),(void 0!==t?t:"undefined"!=typeof self?self:{}).Hammer=Xt,"function"==typeof o&&o.amd?o((function(){return Xt})):c_.exports?c_.exports=Xt:t.Hammer=Xt}(window,document);var h_=l_(d_.exports);const u_=t=>t&&t.enabled&&t.modifierKey,m_=(t,e)=>t&&e[t+"Key"],p_=(t,e)=>t&&!e[t+"Key"];function __(t,e,i){return void 0===t||("string"==typeof t?-1!==t.indexOf(e):"function"==typeof t&&-1!==t({chart:i}).indexOf(e))}function g_(t,e){return"function"==typeof t&&(t=t({chart:e})),"string"==typeof t?{x:-1!==t.indexOf("x"),y:-1!==t.indexOf("y")}:{x:!1,y:!1}}function f_(t,e,i){const{mode:o="xy",scaleMode:n,overScaleMode:a}=t||{},s=function({x:t,y:e},i){const o=i.scales,n=Object.keys(o);for(let i=0;i<n.length;i++){const a=o[n[i]];if(e>=a.top&&e<=a.bottom&&t>=a.left&&t<=a.right)return a}return null}(e,i),r=g_(o,i),l=g_(n,i);if(a){const t=g_(a,i);for(const e of["x","y"])t[e]&&(l[e]=r[e],r[e]=!1)}if(s&&l[s.axis])return[s];const c=[];return ml(i.scales,(function(t){r[t.axis]&&c.push(t)})),c}const b_=new WeakMap;function v_(t){let e=b_.get(t);return e||(e={originalScaleLimits:{},updatedScaleLimits:{},handlers:{},panDelta:{},dragging:!1,panning:!1},b_.set(t,e)),e}function y_(t,e,i,o){const n=Math.max(0,Math.min(1,(t-e)/i||0));return{min:o*n,max:o*(1-n)}}function w_(t,e){const i=t.isHorizontal()?e.x:e.y;return t.getValueForPixel(i)}function x_(t,e,i){const o=t.max-t.min,n=o*(e-1);return y_(w_(t,i),t.min,o,n)}function k_(t,e,i,o,n){let a=i[o];if("original"===a){const i=t.originalScaleLimits[e.id][o];a=dl(i.options,i.scale)}return dl(a,n)}function T_(t,{min:e,max:i},o,n=!1){const a=v_(t.chart),{options:s}=t,r=function(t,e){return e&&(e[t.id]||e[t.axis])||{}}(t,o),{minRange:l=0}=r,c=k_(a,t,r,"min",-1/0),d=k_(a,t,r,"max",1/0);if("pan"===n&&(e<c||i>d))return!0;const h=t.max-t.min,u=n?Math.max(i-e,l):h;if(n&&u===l&&h<=l)return!0;const m=function(t,{min:e,max:i,minLimit:o,maxLimit:n},a){const s=(t-i+e)/2;e-=s,i+=s;const r=a.min.options??a.min.scale,l=a.max.options??a.max.scale,c=t/1e6;return Hl(e,r,c)&&(e=r),Hl(i,l,c)&&(i=l),e<o?(e=o,i=Math.min(o+t,n)):i>n&&(i=n,e=Math.max(n-t,o)),{min:e,max:i}}(u,{min:e,max:i,minLimit:c,maxLimit:d},a.originalScaleLimits[t.id]);return s.min=m.min,s.max=m.max,a.updatedScaleLimits[t.id]=m,t.parse(m.min)!==t.min||t.parse(m.max)!==t.max}const S_=t=>0===t||isNaN(t)?0:t<0?Math.min(Math.round(t),-1):Math.max(Math.round(t),1);const M_={second:500,minute:3e4,hour:18e5,day:432e5,week:3024e5,month:1296e6,quarter:5184e6,year:157248e5};function D_(t,e,i,o=!1){const{min:n,max:a,options:s}=t,r=s.time&&s.time.round,l=M_[r]||0,c=t.getValueForPixel(t.getPixelForValue(n+l)-e),d=t.getValueForPixel(t.getPixelForValue(a+l)-e);return!(!isNaN(c)&&!isNaN(d))||T_(t,{min:c,max:d},i,!!o&&"pan")}function C_(t,e,i){return D_(t,e,i,!0)}const A_={category:function(t,e,i,o){const n=x_(t,e,i);return t.min===t.max&&e<1&&function(t){const e=t.getLabels().length-1;t.min>0&&(t.min-=1),t.max<e&&(t.max+=1)}(t),T_(t,{min:t.min+S_(n.min),max:t.max-S_(n.max)},o,!0)},default:function(t,e,i,o){const n=x_(t,e,i);return T_(t,{min:t.min+n.min,max:t.max-n.max},o,!0)},logarithmic:function(t,e,i,o){const n=function(t,e,i){const o=w_(t,i);if(void 0===o)return{min:t.min,max:t.max};const n=Math.log10(t.min),a=Math.log10(t.max),s=a-n,r=y_(Math.log10(o),n,s,s*(e-1));return{min:Math.pow(10,n+r.min),max:Math.pow(10,a-r.max)}}(t,e,i);return T_(t,n,o,!0)}},P_={default:function(t,e,i,o){T_(t,function(t,e,i){const o=t.getValueForPixel(e),n=t.getValueForPixel(i);return{min:Math.min(o,n),max:Math.max(o,n)}}(t,e,i),o,!0)}},E_={category:function(t,e,i){const o=t.getLabels().length-1;let{min:n,max:a}=t;const s=Math.max(a-n,1),r=Math.round(function(t){return t.isHorizontal()?t.width:t.height}(t)/Math.max(s,10)),l=Math.round(Math.abs(e/r));let c;return e<-r?(a=Math.min(a+l,o),n=1===s?a:a-s,c=a===o):e>r&&(n=Math.max(0,n-l),a=1===s?n:n+s,c=0===n),T_(t,{min:n,max:a},i)||c},default:D_,logarithmic:C_,timeseries:C_};function L_(t,e){ml(t,((i,o)=>{e[o]||delete t[o]}))}function $_(t,e){const{scales:i}=t,{originalScaleLimits:o,updatedScaleLimits:n}=e;return ml(i,(function(t){(function(t,e,i){const{id:o,options:{min:n,max:a}}=t;if(!e[o]||!i[o])return!0;const s=i[o];return s.min!==n||s.max!==a})(t,o,n)&&(o[t.id]={min:{scale:t.min,options:t.options.min},max:{scale:t.max,options:t.options.max}})})),L_(o,i),L_(n,i),o}function z_(t,e,i,o){ul(A_[t.type]||A_.default,[t,e,i,o])}function O_(t,e,i,o){ul(P_[t.type]||P_.default,[t,e,i,o])}function V_(t){const e=t.chartArea;return{x:(e.left+e.right)/2,y:(e.top+e.bottom)/2}}function H_(t,e,i="none",o="api"){const{x:n=1,y:a=1,focalPoint:s=V_(t)}="number"==typeof e?{x:e,y:e}:e,r=v_(t),{options:{limits:l,zoom:c}}=r;$_(t,r);const d=1!==n,h=1!==a;ml(f_(c,s,t)||t.scales,(function(t){t.isHorizontal()&&d?z_(t,n,s,l):!t.isHorizontal()&&h&&z_(t,a,s,l)})),t.update(i),ul(c.onZoom,[{chart:t,trigger:o}])}function R_(t,e,i,o="none",n="api"){const a=v_(t),{options:{limits:s,zoom:r}}=a,{mode:l="xy"}=r;$_(t,a);const c=__(l,"x",t),d=__(l,"y",t);ml(t.scales,(function(t){t.isHorizontal()&&c?O_(t,e.x,i.x,s):!t.isHorizontal()&&d&&O_(t,e.y,i.y,s)})),t.update(o),ul(r.onZoom,[{chart:t,trigger:n}])}function I_(t,e,i,o="none",n="api"){const a=v_(t);$_(t,a);T_(t.scales[e],i,void 0,!0),t.update(o),ul(a.options.zoom?.onZoom,[{chart:t,trigger:n}])}function N_(t,e="default"){const i=v_(t),o=$_(t,i);ml(t.scales,(function(t){const e=t.options;o[t.id]?(e.min=o[t.id].min.options,e.max=o[t.id].max.options):(delete e.min,delete e.max),delete i.updatedScaleLimits[t.id]})),t.update(e),ul(i.options.zoom.onZoomComplete,[{chart:t}])}function F_(t){const e=v_(t);let i=1,o=1;return ml(t.scales,(function(t){const n=function(t,e){const i=t.originalScaleLimits[e];if(!i)return;const{min:o,max:n}=i;return dl(n.options,n.scale)-dl(o.options,o.scale)}(e,t.id);if(n){const e=Math.round(n/(t.max-t.min)*100)/100;i=Math.min(i,e),o=Math.max(o,e)}})),i<1?i:o}function W_(t,e,i,o){const{panDelta:n}=o,a=n[t.id]||0;Vl(a)===Vl(e)&&(e+=a);ul(E_[t.type]||E_.default,[t,e,i])?n[t.id]=0:n[t.id]=e}function B_(t,e,i,o="none"){const{x:n=0,y:a=0}="number"==typeof e?{x:e,y:e}:e,s=v_(t),{options:{pan:r,limits:l}}=s,{onPan:c}=r||{};$_(t,s);const d=0!==n,h=0!==a;ml(i||t.scales,(function(t){t.isHorizontal()&&d?W_(t,n,l,s):!t.isHorizontal()&&h&&W_(t,a,l,s)})),t.update(o),ul(c,[{chart:t}])}function j_(t){const e=v_(t);$_(t,e);const i={};for(const o of Object.keys(t.scales)){const{min:t,max:n}=e.originalScaleLimits[o]||{min:{},max:{}};i[o]={min:t.scale,max:n.scale}}return i}function U_(t){const e=v_(t);return e.panning||e.dragging}const Y_=(t,e,i)=>Math.min(i,Math.max(e,t));function q_(t,e){const{handlers:i}=v_(t),o=i[e];o&&o.target&&(o.target.removeEventListener(e,o),delete i[e])}function Z_(t,e,i,o){const{handlers:n,options:a}=v_(t),s=n[i];if(s&&s.target===e)return;q_(t,i),n[i]=e=>o(t,e,a),n[i].target=e;const r="wheel"!==i&&void 0;e.addEventListener(i,n[i],{passive:r})}function X_(t,e){const i=v_(t);i.dragStart&&(i.dragging=!0,i.dragEnd=e,t.update("none"))}function K_(t,e){const i=v_(t);i.dragStart&&"Escape"===e.key&&(q_(t,"keydown"),i.dragging=!1,i.dragStart=i.dragEnd=null,t.update("none"))}function G_(t,e){if(t.target!==e.canvas){const i=e.canvas.getBoundingClientRect();return{x:t.clientX-i.left,y:t.clientY-i.top}}return Cd(t,e)}function Q_(t,e,i){const{onZoomStart:o,onZoomRejected:n}=i;if(o){if(!1===ul(o,[{chart:t,event:e,point:G_(e,t)}]))return ul(n,[{chart:t,event:e}]),!1}}function J_(t,e){if(t.legend){if(zc(Cd(e,t),t.legend))return}const i=v_(t),{pan:o,zoom:n={}}=i.options;if(0!==e.button||m_(u_(o),e)||p_(u_(n.drag),e))return ul(n.onZoomRejected,[{chart:t,event:e}]);!1!==Q_(t,e,n)&&(i.dragStart=e,Z_(t,t.canvas.ownerDocument,"mousemove",X_),Z_(t,window.document,"keydown",K_))}function tg(t,e,i,{min:o,max:n,prop:a}){t[o]=Y_(Math.min(i.begin[a],i.end[a]),e[o],e[n]),t[n]=Y_(Math.max(i.begin[a],i.end[a]),e[o],e[n])}function eg(t,e,i){const o={begin:G_(e.dragStart,t),end:G_(e.dragEnd,t)};if(i){!function({begin:t,end:e},i){let o=e.x-t.x,n=e.y-t.y;const a=Math.abs(o/n);a>i?o=Math.sign(o)*Math.abs(n*i):a<i&&(n=Math.sign(n)*Math.abs(o/i)),e.x=t.x+o,e.y=t.y+n}(o,t.chartArea.width/t.chartArea.height)}return o}function ig(t,e,i,o){const n=__(e,"x",t),a=__(e,"y",t),{top:s,left:r,right:l,bottom:c,width:d,height:h}=t.chartArea,u={top:s,left:r,right:l,bottom:c},m=eg(t,i,o&&n&&a);n&&tg(u,t.chartArea,m,{min:"left",max:"right",prop:"x"}),a&&tg(u,t.chartArea,m,{min:"top",max:"bottom",prop:"y"});const p=u.right-u.left,_=u.bottom-u.top;return{...u,width:p,height:_,zoomX:n&&p?1+(d-p)/d:1,zoomY:a&&_?1+(h-_)/h:1}}function og(t,e){const i=v_(t);if(!i.dragStart)return;q_(t,"mousemove");const{mode:o,onZoomComplete:n,drag:{threshold:a=0,maintainAspectRatio:s}}=i.options.zoom,r=ig(t,o,{dragStart:i.dragStart,dragEnd:e},s),l=__(o,"x",t)?r.width:0,c=__(o,"y",t)?r.height:0,d=Math.sqrt(l*l+c*c);if(i.dragStart=i.dragEnd=null,d<=a)return i.dragging=!1,void t.update("none");R_(t,{x:r.left,y:r.top},{x:r.right,y:r.bottom},"zoom","drag"),i.dragging=!1,i.filterNextClick=!0,ul(n,[{chart:t}])}function ng(t,e){const{handlers:{onZoomComplete:i},options:{zoom:o}}=v_(t);if(!function(t,e,i){if(p_(u_(i.wheel),e))ul(i.onZoomRejected,[{chart:t,event:e}]);else if(!1!==Q_(t,e,i)&&(e.cancelable&&e.preventDefault(),void 0!==e.deltaY))return!0}(t,e,o))return;const n=e.target.getBoundingClientRect(),a=o.wheel.speed,s=e.deltaY>=0?2-1/(1-a):1+a;H_(t,{x:s,y:s,focalPoint:{x:e.clientX-n.left,y:e.clientY-n.top}},"zoom","wheel"),ul(i,[{chart:t}])}function ag(t,e,i,o){i&&(v_(t).handlers[e]=function(t,e){let i;return function(){return clearTimeout(i),i=setTimeout(t,e),e}}((()=>ul(i,[{chart:t}])),o))}function sg(t,e){return function(i,o){const{pan:n,zoom:a={}}=e.options;if(!n||!n.enabled)return!1;const s=o&&o.srcEvent;return!s||(!(!e.panning&&"mouse"===o.pointerType&&(p_(u_(n),s)||m_(u_(a.drag),s)))||(ul(n.onPanRejected,[{chart:t,event:o}]),!1))}}function rg(t,e,i){if(e.scale){const{center:o,pointers:n}=i,a=1/e.scale*i.scale,s=i.target.getBoundingClientRect(),r=function(t,e){const i=Math.abs(t.clientX-e.clientX),o=Math.abs(t.clientY-e.clientY),n=i/o;let a,s;return n>.3&&n<1.7?a=s=!0:i>o?a=!0:s=!0,{x:a,y:s}}(n[0],n[1]),l=e.options.zoom.mode;H_(t,{x:r.x&&__(l,"x",t)?a:1,y:r.y&&__(l,"y",t)?a:1,focalPoint:{x:o.x-s.left,y:o.y-s.top}},"zoom","pinch"),e.scale=i.scale}}function lg(t,e,i){const o=e.delta;o&&(e.panning=!0,B_(t,{x:i.deltaX-o.x,y:i.deltaY-o.y},e.panScales),e.delta={x:i.deltaX,y:i.deltaY})}const cg=new WeakMap;function dg(t,e){const i=v_(t),o=t.canvas,{pan:n,zoom:a}=e,s=new h_.Manager(o);a&&a.pinch.enabled&&(s.add(new h_.Pinch),s.on("pinchstart",(e=>function(t,e,i){if(e.options.zoom.pinch.enabled){const o=Cd(i,t);!1===ul(e.options.zoom.onZoomStart,[{chart:t,event:i,point:o}])?(e.scale=null,ul(e.options.zoom.onZoomRejected,[{chart:t,event:i}])):e.scale=1}}(t,i,e))),s.on("pinch",(e=>rg(t,i,e))),s.on("pinchend",(e=>function(t,e,i){e.scale&&(rg(t,e,i),e.scale=null,ul(e.options.zoom.onZoomComplete,[{chart:t}]))}(t,i,e)))),n&&n.enabled&&(s.add(new h_.Pan({threshold:n.threshold,enable:sg(t,i)})),s.on("panstart",(e=>function(t,e,i){const{enabled:o,onPanStart:n,onPanRejected:a}=e.options.pan;if(!o)return;const s=i.target.getBoundingClientRect(),r={x:i.center.x-s.left,y:i.center.y-s.top};if(!1===ul(n,[{chart:t,event:i,point:r}]))return ul(a,[{chart:t,event:i}]);e.panScales=f_(e.options.pan,r,t),e.delta={x:0,y:0},lg(t,e,i)}(t,i,e))),s.on("panmove",(e=>lg(t,i,e))),s.on("panend",(()=>function(t,e){e.delta=null,e.panning&&(e.panning=!1,e.filterNextClick=!0,ul(e.options.pan.onPanComplete,[{chart:t}]))}(t,i)))),cg.set(t,s)}function hg(t){const e=cg.get(t);e&&(e.remove("pinchstart"),e.remove("pinch"),e.remove("pinchend"),e.remove("panstart"),e.remove("pan"),e.remove("panend"),e.destroy(),cg.delete(t))}function ug(t,e,i){const o=i.zoom.drag,{dragStart:n,dragEnd:a}=v_(t);if(o.drawTime!==e||!a)return;const{left:s,top:r,width:l,height:c}=ig(t,i.zoom.mode,{dragStart:n,dragEnd:a},o.maintainAspectRatio),d=t.ctx;d.save(),d.beginPath(),d.fillStyle=o.backgroundColor||"rgba(225,225,225,0.3)",d.fillRect(s,r,l,c),o.borderWidth>0&&(d.lineWidth=o.borderWidth,d.strokeStyle=o.borderColor||"rgba(225,225,225)",d.strokeRect(s,r,l,c)),d.restore()}var mg={id:"zoom",version:"2.2.0",defaults:{pan:{enabled:!1,mode:"xy",threshold:10,modifierKey:null},zoom:{wheel:{enabled:!1,speed:.1,modifierKey:null},drag:{enabled:!1,drawTime:"beforeDatasetsDraw",modifierKey:null},pinch:{enabled:!1},mode:"xy"}},start:function(t,e,i){v_(t).options=i,Object.prototype.hasOwnProperty.call(i.zoom,"enabled")&&console.warn("The option `zoom.enabled` is no longer supported. Please use `zoom.wheel.enabled`, `zoom.drag.enabled`, or `zoom.pinch.enabled`."),(Object.prototype.hasOwnProperty.call(i.zoom,"overScaleMode")||Object.prototype.hasOwnProperty.call(i.pan,"overScaleMode"))&&console.warn("The option `overScaleMode` is deprecated. Please use `scaleMode` instead (and update `mode` as desired)."),h_&&dg(t,i),t.pan=(e,i,o)=>B_(t,e,i,o),t.zoom=(e,i)=>H_(t,e,i),t.zoomRect=(e,i,o)=>R_(t,e,i,o),t.zoomScale=(e,i,o)=>I_(t,e,i,o),t.resetZoom=e=>N_(t,e),t.getZoomLevel=()=>F_(t),t.getInitialScaleBounds=()=>j_(t),t.getZoomedScaleBounds=()=>function(t){const e=v_(t),i={};for(const o of Object.keys(t.scales))i[o]=e.updatedScaleLimits[o];return i}(t),t.isZoomedOrPanned=()=>function(t){const e=j_(t);for(const i of Object.keys(t.scales)){const{min:o,max:n}=e[i];if(void 0!==o&&t.scales[i].min!==o)return!0;if(void 0!==n&&t.scales[i].max!==n)return!0}return!1}(t),t.isZoomingOrPanning=()=>U_(t)},beforeEvent(t,{event:e}){if(U_(t))return!1;if("click"===e.type||"mouseup"===e.type){const e=v_(t);if(e.filterNextClick)return e.filterNextClick=!1,!1}},beforeUpdate:function(t,e,i){const o=v_(t),n=o.options;o.options=i,function(t,e){const{pan:i,zoom:o}=t,{pan:n,zoom:a}=e;return o?.zoom?.pinch?.enabled!==a?.zoom?.pinch?.enabled||i?.enabled!==n?.enabled||i?.threshold!==n?.threshold}(n,i)&&(hg(t),dg(t,i)),function(t,e){const i=t.canvas,{wheel:o,drag:n,onZoomComplete:a}=e.zoom;o.enabled?(Z_(t,i,"wheel",ng),ag(t,"onZoomComplete",a,250)):q_(t,"wheel"),n.enabled?(Z_(t,i,"mousedown",J_),Z_(t,i.ownerDocument,"mouseup",og)):(q_(t,"mousedown"),q_(t,"mousemove"),q_(t,"mouseup"),q_(t,"keydown"))}(t,i)},beforeDatasetsDraw(t,e,i){ug(t,"beforeDatasetsDraw",i)},afterDatasetsDraw(t,e,i){ug(t,"afterDatasetsDraw",i)},beforeDraw(t,e,i){ug(t,"beforeDraw",i)},afterDraw(t,e,i){ug(t,"afterDraw",i)},stop:function(t){!function(t){q_(t,"mousedown"),q_(t,"mousemove"),q_(t,"mouseup"),q_(t,"wheel"),q_(t,"click"),q_(t,"keydown")}(t),h_&&hg(t),function(t){b_.delete(t)}(t)},panFunctions:E_,zoomFunctions:A_,zoomRectFunctions:P_},pg=Object.freeze({__proto__:null,default:mg,pan:B_,resetZoom:N_,zoom:H_,zoomRect:R_,zoomScale:I_});function _g(t){const e=Object.prototype.toString.call(t);return t instanceof Date||"object"==typeof t&&"[object Date]"===e?new t.constructor(+t):"number"==typeof t||"[object Number]"===e||"string"==typeof t||"[object String]"===e?new Date(t):new Date(NaN)}function gg(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}function fg(t,e){const i=_g(t);return isNaN(e)?gg(t,NaN):e?(i.setDate(i.getDate()+e),i):i}function bg(t,e){const i=_g(t);if(isNaN(e))return gg(t,NaN);if(!e)return i;const o=i.getDate(),n=gg(t,i.getTime());n.setMonth(i.getMonth()+e+1,0);return o>=n.getDate()?n:(i.setFullYear(n.getFullYear(),n.getMonth(),o),i)}function vg(t,e){return gg(t,+_g(t)+e)}const yg=6048e5,wg=864e5,xg=6e4,kg=36e5;let Tg={};function Sg(){return Tg}function Mg(t,e){const i=Sg(),o=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,n=_g(t),a=n.getDay(),s=(a<o?7:0)+a-o;return n.setDate(n.getDate()-s),n.setHours(0,0,0,0),n}function Dg(t){return Mg(t,{weekStartsOn:1})}function Cg(t){const e=_g(t),i=e.getFullYear(),o=gg(t,0);o.setFullYear(i+1,0,4),o.setHours(0,0,0,0);const n=Dg(o),a=gg(t,0);a.setFullYear(i,0,4),a.setHours(0,0,0,0);const s=Dg(a);return e.getTime()>=n.getTime()?i+1:e.getTime()>=s.getTime()?i:i-1}function Ag(t){const e=_g(t);return e.setHours(0,0,0,0),e}function Pg(t){const e=_g(t),i=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return i.setUTCFullYear(e.getFullYear()),+t-+i}function Eg(t,e){const i=Ag(t),o=Ag(e),n=+i-Pg(i),a=+o-Pg(o);return Math.round((n-a)/wg)}function Lg(t,e){const i=_g(t),o=_g(e),n=i.getTime()-o.getTime();return n<0?-1:n>0?1:n}function $g(t){if(!(e=t,e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)||"number"==typeof t))return!1;var e;const i=_g(t);return!isNaN(Number(i))}function zg(t,e){const i=_g(t),o=_g(e),n=Og(i,o),a=Math.abs(Eg(i,o));i.setDate(i.getDate()-n*a);const s=n*(a-Number(Og(i,o)===-n));return 0===s?0:s}function Og(t,e){const i=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return i<0?-1:i>0?1:i}function Vg(t){return e=>{const i=(t?Math[t]:Math.trunc)(e);return 0===i?0:i}}function Hg(t,e){return+_g(t)-+_g(e)}function Rg(t){const e=_g(t);return e.setHours(23,59,59,999),e}function Ig(t){const e=_g(t),i=e.getMonth();return e.setFullYear(e.getFullYear(),i+1,0),e.setHours(23,59,59,999),e}function Ng(t,e){const i=_g(t),o=_g(e),n=Lg(i,o),a=Math.abs(function(t,e){const i=_g(t),o=_g(e);return 12*(i.getFullYear()-o.getFullYear())+(i.getMonth()-o.getMonth())}(i,o));let s;if(a<1)s=0;else{1===i.getMonth()&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-n*a);let e=Lg(i,o)===-n;(function(t){const e=_g(t);return+Rg(e)==+Ig(e)})(_g(t))&&1===a&&1===Lg(t,o)&&(e=!1),s=n*(a-Number(e))}return 0===s?0:s}function Fg(t,e){const i=_g(t),o=_g(e),n=Lg(i,o),a=Math.abs(function(t,e){const i=_g(t),o=_g(e);return i.getFullYear()-o.getFullYear()}(i,o));i.setFullYear(1584),o.setFullYear(1584);const s=n*(a-+(Lg(i,o)===-n));return 0===s?0:s}function Wg(t){const e=_g(t),i=gg(t,0);return i.setFullYear(e.getFullYear(),0,1),i.setHours(0,0,0,0),i}const Bg={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function jg(t){return(e={})=>{const i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}const Ug={date:jg({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:jg({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:jg({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Yg={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function qg(t){return(e,i)=>{let o;if("formatting"===(i?.context?String(i.context):"standalone")&&t.formattingValues){const e=t.defaultFormattingWidth||t.defaultWidth,n=i?.width?String(i.width):e;o=t.formattingValues[n]||t.formattingValues[e]}else{const e=t.defaultWidth,n=i?.width?String(i.width):t.defaultWidth;o=t.values[n]||t.values[e]}return o[t.argumentCallback?t.argumentCallback(e):e]}}const Zg={ordinalNumber:(t,e)=>{const i=Number(t),o=i%100;if(o>20||o<10)switch(o%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},era:qg({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:qg({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:t=>t-1}),month:qg({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:qg({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:qg({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function Xg(t){return(e,i={})=>{const o=i.width,n=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],a=e.match(n);if(!a)return null;const s=a[0],r=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(r)?function(t,e){for(let i=0;i<t.length;i++)if(e(t[i]))return i;return}(r,(t=>t.test(s))):function(t,e){for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&e(t[i]))return i;return}(r,(t=>t.test(s)));let c;c=t.valueCallback?t.valueCallback(l):l,c=i.valueCallback?i.valueCallback(c):c;return{value:c,rest:e.slice(s.length)}}}const Kg={ordinalNumber:(Gg={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:t=>parseInt(t,10)},(t,e={})=>{const i=t.match(Gg.matchPattern);if(!i)return null;const o=i[0],n=t.match(Gg.parsePattern);if(!n)return null;let a=Gg.valueCallback?Gg.valueCallback(n[0]):n[0];return a=e.valueCallback?e.valueCallback(a):a,{value:a,rest:t.slice(o.length)}}),era:Xg({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Xg({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:t=>t+1}),month:Xg({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Xg({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Xg({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};var Gg;const Qg={code:"en-US",formatDistance:(t,e,i)=>{let o;const n=Bg[t];return o="string"==typeof n?n:1===e?n.one:n.other.replace("{{count}}",e.toString()),i?.addSuffix?i.comparison&&i.comparison>0?"in "+o:o+" ago":o},formatLong:Ug,formatRelative:(t,e,i,o)=>Yg[t],localize:Zg,match:Kg,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Jg(t){const e=_g(t),i=+Dg(e)-+function(t){const e=Cg(t),i=gg(t,0);return i.setFullYear(e,0,4),i.setHours(0,0,0,0),Dg(i)}(e);return Math.round(i/yg)+1}function tf(t,e){const i=_g(t),o=i.getFullYear(),n=Sg(),a=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=gg(t,0);s.setFullYear(o+1,0,a),s.setHours(0,0,0,0);const r=Mg(s,e),l=gg(t,0);l.setFullYear(o,0,a),l.setHours(0,0,0,0);const c=Mg(l,e);return i.getTime()>=r.getTime()?o+1:i.getTime()>=c.getTime()?o:o-1}function ef(t,e){const i=_g(t),o=+Mg(i,e)-+function(t,e){const i=Sg(),o=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,n=tf(t,e),a=gg(t,0);return a.setFullYear(n,0,o),a.setHours(0,0,0,0),Mg(a,e)}(i,e);return Math.round(o/yg)+1}function of(t,e){return(t<0?"-":"")+Math.abs(t).toString().padStart(e,"0")}const nf={y(t,e){const i=t.getFullYear(),o=i>0?i:1-i;return of("yy"===e?o%100:o,e.length)},M(t,e){const i=t.getMonth();return"M"===e?String(i+1):of(i+1,2)},d:(t,e)=>of(t.getDate(),e.length),a(t,e){const i=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.toUpperCase();case"aaa":return i;case"aaaaa":return i[0];default:return"am"===i?"a.m.":"p.m."}},h:(t,e)=>of(t.getHours()%12||12,e.length),H:(t,e)=>of(t.getHours(),e.length),m:(t,e)=>of(t.getMinutes(),e.length),s:(t,e)=>of(t.getSeconds(),e.length),S(t,e){const i=e.length,o=t.getMilliseconds();return of(Math.trunc(o*Math.pow(10,i-3)),e.length)}},af="midnight",sf="noon",rf="morning",lf="afternoon",cf="evening",df="night",hf={G:function(t,e,i){const o=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(o,{width:"abbreviated"});case"GGGGG":return i.era(o,{width:"narrow"});default:return i.era(o,{width:"wide"})}},y:function(t,e,i){if("yo"===e){const e=t.getFullYear(),o=e>0?e:1-e;return i.ordinalNumber(o,{unit:"year"})}return nf.y(t,e)},Y:function(t,e,i,o){const n=tf(t,o),a=n>0?n:1-n;if("YY"===e){return of(a%100,2)}return"Yo"===e?i.ordinalNumber(a,{unit:"year"}):of(a,e.length)},R:function(t,e){return of(Cg(t),e.length)},u:function(t,e){return of(t.getFullYear(),e.length)},Q:function(t,e,i){const o=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(o);case"QQ":return of(o,2);case"Qo":return i.ordinalNumber(o,{unit:"quarter"});case"QQQ":return i.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(o,{width:"narrow",context:"formatting"});default:return i.quarter(o,{width:"wide",context:"formatting"})}},q:function(t,e,i){const o=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(o);case"qq":return of(o,2);case"qo":return i.ordinalNumber(o,{unit:"quarter"});case"qqq":return i.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(o,{width:"narrow",context:"standalone"});default:return i.quarter(o,{width:"wide",context:"standalone"})}},M:function(t,e,i){const o=t.getMonth();switch(e){case"M":case"MM":return nf.M(t,e);case"Mo":return i.ordinalNumber(o+1,{unit:"month"});case"MMM":return i.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(o,{width:"narrow",context:"formatting"});default:return i.month(o,{width:"wide",context:"formatting"})}},L:function(t,e,i){const o=t.getMonth();switch(e){case"L":return String(o+1);case"LL":return of(o+1,2);case"Lo":return i.ordinalNumber(o+1,{unit:"month"});case"LLL":return i.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(o,{width:"narrow",context:"standalone"});default:return i.month(o,{width:"wide",context:"standalone"})}},w:function(t,e,i,o){const n=ef(t,o);return"wo"===e?i.ordinalNumber(n,{unit:"week"}):of(n,e.length)},I:function(t,e,i){const o=Jg(t);return"Io"===e?i.ordinalNumber(o,{unit:"week"}):of(o,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getDate(),{unit:"date"}):nf.d(t,e)},D:function(t,e,i){const o=function(t){const e=_g(t);return Eg(e,Wg(e))+1}(t);return"Do"===e?i.ordinalNumber(o,{unit:"dayOfYear"}):of(o,e.length)},E:function(t,e,i){const o=t.getDay();switch(e){case"E":case"EE":case"EEE":return i.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},e:function(t,e,i,o){const n=t.getDay(),a=(n-o.weekStartsOn+8)%7||7;switch(e){case"e":return String(a);case"ee":return of(a,2);case"eo":return i.ordinalNumber(a,{unit:"day"});case"eee":return i.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(n,{width:"short",context:"formatting"});default:return i.day(n,{width:"wide",context:"formatting"})}},c:function(t,e,i,o){const n=t.getDay(),a=(n-o.weekStartsOn+8)%7||7;switch(e){case"c":return String(a);case"cc":return of(a,e.length);case"co":return i.ordinalNumber(a,{unit:"day"});case"ccc":return i.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(n,{width:"narrow",context:"standalone"});case"cccccc":return i.day(n,{width:"short",context:"standalone"});default:return i.day(n,{width:"wide",context:"standalone"})}},i:function(t,e,i){const o=t.getDay(),n=0===o?7:o;switch(e){case"i":return String(n);case"ii":return of(n,e.length);case"io":return i.ordinalNumber(n,{unit:"day"});case"iii":return i.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},a:function(t,e,i){const o=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,e,i){const o=t.getHours();let n;switch(n=12===o?sf:0===o?af:o/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(n,{width:"narrow",context:"formatting"});default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(t,e,i){const o=t.getHours();let n;switch(n=o>=17?cf:o>=12?lf:o>=4?rf:df,e){case"B":case"BB":case"BBB":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(n,{width:"narrow",context:"formatting"});default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){let e=t.getHours()%12;return 0===e&&(e=12),i.ordinalNumber(e,{unit:"hour"})}return nf.h(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getHours(),{unit:"hour"}):nf.H(t,e)},K:function(t,e,i){const o=t.getHours()%12;return"Ko"===e?i.ordinalNumber(o,{unit:"hour"}):of(o,e.length)},k:function(t,e,i){let o=t.getHours();return 0===o&&(o=24),"ko"===e?i.ordinalNumber(o,{unit:"hour"}):of(o,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getMinutes(),{unit:"minute"}):nf.m(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getSeconds(),{unit:"second"}):nf.s(t,e)},S:function(t,e){return nf.S(t,e)},X:function(t,e,i){const o=t.getTimezoneOffset();if(0===o)return"Z";switch(e){case"X":return mf(o);case"XXXX":case"XX":return pf(o);default:return pf(o,":")}},x:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"x":return mf(o);case"xxxx":case"xx":return pf(o);default:return pf(o,":")}},O:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+uf(o,":");default:return"GMT"+pf(o,":")}},z:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+uf(o,":");default:return"GMT"+pf(o,":")}},t:function(t,e,i){return of(Math.trunc(t.getTime()/1e3),e.length)},T:function(t,e,i){return of(t.getTime(),e.length)}};function uf(t,e=""){const i=t>0?"-":"+",o=Math.abs(t),n=Math.trunc(o/60),a=o%60;return 0===a?i+String(n):i+String(n)+e+of(a,2)}function mf(t,e){if(t%60==0){return(t>0?"-":"+")+of(Math.abs(t)/60,2)}return pf(t,e)}function pf(t,e=""){const i=t>0?"-":"+",o=Math.abs(t);return i+of(Math.trunc(o/60),2)+e+of(o%60,2)}const _f=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},gf=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},ff={p:gf,P:(t,e)=>{const i=t.match(/(P+)(p+)?/)||[],o=i[1],n=i[2];if(!n)return _f(t,e);let a;switch(o){case"P":a=e.dateTime({width:"short"});break;case"PP":a=e.dateTime({width:"medium"});break;case"PPP":a=e.dateTime({width:"long"});break;default:a=e.dateTime({width:"full"})}return a.replace("{{date}}",_f(o,e)).replace("{{time}}",gf(n,e))}},bf=/^D+$/,vf=/^Y+$/,yf=["D","DD","YY","YYYY"];function wf(t){return bf.test(t)}function xf(t){return vf.test(t)}function kf(t,e,i){const o=function(t,e,i){const o="Y"===t[0]?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${o} to the input \`${i}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(t,e,i);if(console.warn(o),yf.includes(t))throw new RangeError(o)}const Tf=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Sf=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Mf=/^'([^]*?)'?$/,Df=/''/g,Cf=/[a-zA-Z]/;function Af(t){const e=t.match(Mf);return e?e[1].replace(Df,"'"):t}class Pf{subPriority=0;validate(t,e){return!0}}class Ef extends Pf{constructor(t,e,i,o,n){super(),this.value=t,this.validateValue=e,this.setValue=i,this.priority=o,n&&(this.subPriority=n)}validate(t,e){return this.validateValue(t,this.value,e)}set(t,e,i){return this.setValue(t,e,this.value,i)}}class Lf extends Pf{priority=10;subPriority=-1;set(t,e){return e.timestampIsSet?t:gg(t,function(t,e){const i=e instanceof Date?gg(e,0):new e(0);return i.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),i.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),i}(t,Date))}}class $f{run(t,e,i,o){const n=this.parse(t,e,i,o);return n?{setter:new Ef(n.value,this.validate,this.set,this.priority,this.subPriority),rest:n.rest}:null}validate(t,e,i){return!0}}const zf=/^(1[0-2]|0?\d)/,Of=/^(3[0-1]|[0-2]?\d)/,Vf=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,Hf=/^(5[0-3]|[0-4]?\d)/,Rf=/^(2[0-3]|[0-1]?\d)/,If=/^(2[0-4]|[0-1]?\d)/,Nf=/^(1[0-1]|0?\d)/,Ff=/^(1[0-2]|0?\d)/,Wf=/^[0-5]?\d/,Bf=/^[0-5]?\d/,jf=/^\d/,Uf=/^\d{1,2}/,Yf=/^\d{1,3}/,qf=/^\d{1,4}/,Zf=/^-?\d+/,Xf=/^-?\d/,Kf=/^-?\d{1,2}/,Gf=/^-?\d{1,3}/,Qf=/^-?\d{1,4}/,Jf=/^([+-])(\d{2})(\d{2})?|Z/,tb=/^([+-])(\d{2})(\d{2})|Z/,eb=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,ib=/^([+-])(\d{2}):(\d{2})|Z/,ob=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function nb(t,e){return t?{value:e(t.value),rest:t.rest}:t}function ab(t,e){const i=e.match(t);return i?{value:parseInt(i[0],10),rest:e.slice(i[0].length)}:null}function sb(t,e){const i=e.match(t);if(!i)return null;if("Z"===i[0])return{value:0,rest:e.slice(1)};const o="+"===i[1]?1:-1,n=i[2]?parseInt(i[2],10):0,a=i[3]?parseInt(i[3],10):0,s=i[5]?parseInt(i[5],10):0;return{value:o*(n*kg+a*xg+1e3*s),rest:e.slice(i[0].length)}}function rb(t){return ab(Zf,t)}function lb(t,e){switch(t){case 1:return ab(jf,e);case 2:return ab(Uf,e);case 3:return ab(Yf,e);case 4:return ab(qf,e);default:return ab(new RegExp("^\\d{1,"+t+"}"),e)}}function cb(t,e){switch(t){case 1:return ab(Xf,e);case 2:return ab(Kf,e);case 3:return ab(Gf,e);case 4:return ab(Qf,e);default:return ab(new RegExp("^-?\\d{1,"+t+"}"),e)}}function db(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function hb(t,e){const i=e>0,o=i?e:1-e;let n;if(o<=50)n=t||100;else{const e=o+50;n=t+100*Math.trunc(e/100)-(t>=e%100?100:0)}return i?n:1-n}function ub(t){return t%400==0||t%4==0&&t%100!=0}const mb=[31,28,31,30,31,30,31,31,30,31,30,31],pb=[31,29,31,30,31,30,31,31,30,31,30,31];function _b(t,e,i){const o=Sg(),n=i?.weekStartsOn??i?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,a=_g(t),s=a.getDay(),r=7-n;return fg(a,e<0||e>6?e-(s+r)%7:((e%7+7)%7+r)%7-(s+r)%7)}function gb(t,e){const i=_g(t),o=function(t){let e=_g(t).getDay();return 0===e&&(e=7),e}(i);return fg(i,e-o)}const fb={G:new class extends $f{priority=140;parse(t,e,i){switch(e){case"G":case"GG":case"GGG":return i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"});case"GGGGG":return i.era(t,{width:"narrow"});default:return i.era(t,{width:"wide"})||i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"})}}set(t,e,i){return e.era=i,t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["R","u","t","T"]},y:new class extends $f{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,e,i){const o=t=>({year:t,isTwoDigitYear:"yy"===e});switch(e){case"y":return nb(lb(4,t),o);case"yo":return nb(i.ordinalNumber(t,{unit:"year"}),o);default:return nb(lb(e.length,t),o)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,i){const o=t.getFullYear();if(i.isTwoDigitYear){const e=hb(i.year,o);return t.setFullYear(e,0,1),t.setHours(0,0,0,0),t}const n="era"in e&&1!==e.era?1-i.year:i.year;return t.setFullYear(n,0,1),t.setHours(0,0,0,0),t}},Y:new class extends $f{priority=130;parse(t,e,i){const o=t=>({year:t,isTwoDigitYear:"YY"===e});switch(e){case"Y":return nb(lb(4,t),o);case"Yo":return nb(i.ordinalNumber(t,{unit:"year"}),o);default:return nb(lb(e.length,t),o)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,i,o){const n=tf(t,o);if(i.isTwoDigitYear){const e=hb(i.year,n);return t.setFullYear(e,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),Mg(t,o)}const a="era"in e&&1!==e.era?1-i.year:i.year;return t.setFullYear(a,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),Mg(t,o)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:new class extends $f{priority=130;parse(t,e){return cb("R"===e?4:e.length,t)}set(t,e,i){const o=gg(t,0);return o.setFullYear(i,0,4),o.setHours(0,0,0,0),Dg(o)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:new class extends $f{priority=130;parse(t,e){return cb("u"===e?4:e.length,t)}set(t,e,i){return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]},Q:new class extends $f{priority=120;parse(t,e,i){switch(e){case"Q":case"QQ":return lb(e.length,t);case"Qo":return i.ordinalNumber(t,{unit:"quarter"});case"QQQ":return i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(t,{width:"narrow",context:"formatting"});default:return i.quarter(t,{width:"wide",context:"formatting"})||i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=1&&e<=4}set(t,e,i){return t.setMonth(3*(i-1),1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:new class extends $f{priority=120;parse(t,e,i){switch(e){case"q":case"qq":return lb(e.length,t);case"qo":return i.ordinalNumber(t,{unit:"quarter"});case"qqq":return i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(t,{width:"narrow",context:"standalone"});default:return i.quarter(t,{width:"wide",context:"standalone"})||i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=1&&e<=4}set(t,e,i){return t.setMonth(3*(i-1),1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:new class extends $f{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,e,i){const o=t=>t-1;switch(e){case"M":return nb(ab(zf,t),o);case"MM":return nb(lb(2,t),o);case"Mo":return nb(i.ordinalNumber(t,{unit:"month"}),o);case"MMM":return i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(t,{width:"narrow",context:"formatting"});default:return i.month(t,{width:"wide",context:"formatting"})||i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=11}set(t,e,i){return t.setMonth(i,1),t.setHours(0,0,0,0),t}},L:new class extends $f{priority=110;parse(t,e,i){const o=t=>t-1;switch(e){case"L":return nb(ab(zf,t),o);case"LL":return nb(lb(2,t),o);case"Lo":return nb(i.ordinalNumber(t,{unit:"month"}),o);case"LLL":return i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(t,{width:"narrow",context:"standalone"});default:return i.month(t,{width:"wide",context:"standalone"})||i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=11}set(t,e,i){return t.setMonth(i,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:new class extends $f{priority=100;parse(t,e,i){switch(e){case"w":return ab(Hf,t);case"wo":return i.ordinalNumber(t,{unit:"week"});default:return lb(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,i,o){return Mg(function(t,e,i){const o=_g(t),n=ef(o,i)-e;return o.setDate(o.getDate()-7*n),o}(t,i,o),o)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:new class extends $f{priority=100;parse(t,e,i){switch(e){case"I":return ab(Hf,t);case"Io":return i.ordinalNumber(t,{unit:"week"});default:return lb(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,i){return Dg(function(t,e){const i=_g(t),o=Jg(i)-e;return i.setDate(i.getDate()-7*o),i}(t,i))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:new class extends $f{priority=90;subPriority=1;parse(t,e,i){switch(e){case"d":return ab(Of,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return lb(e.length,t)}}validate(t,e){const i=ub(t.getFullYear()),o=t.getMonth();return i?e>=1&&e<=pb[o]:e>=1&&e<=mb[o]}set(t,e,i){return t.setDate(i),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:new class extends $f{priority=90;subpriority=1;parse(t,e,i){switch(e){case"D":case"DD":return ab(Vf,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return lb(e.length,t)}}validate(t,e){return ub(t.getFullYear())?e>=1&&e<=366:e>=1&&e<=365}set(t,e,i){return t.setMonth(0,i),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:new class extends $f{priority=90;parse(t,e,i){switch(e){case"E":case"EE":case"EEE":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,i,o){return(t=_b(t,i,o)).setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]},e:new class extends $f{priority=90;parse(t,e,i,o){const n=t=>{const e=7*Math.floor((t-1)/7);return(t+o.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return nb(lb(e.length,t),n);case"eo":return nb(i.ordinalNumber(t,{unit:"day"}),n);case"eee":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeeee":return i.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,i,o){return(t=_b(t,i,o)).setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:new class extends $f{priority=90;parse(t,e,i,o){const n=t=>{const e=7*Math.floor((t-1)/7);return(t+o.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return nb(lb(e.length,t),n);case"co":return nb(i.ordinalNumber(t,{unit:"day"}),n);case"ccc":return i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"ccccc":return i.day(t,{width:"narrow",context:"standalone"});case"cccccc":return i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});default:return i.day(t,{width:"wide",context:"standalone"})||i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=6}set(t,e,i,o){return(t=_b(t,i,o)).setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:new class extends $f{priority=90;parse(t,e,i){const o=t=>0===t?7:t;switch(e){case"i":case"ii":return lb(e.length,t);case"io":return i.ordinalNumber(t,{unit:"day"});case"iii":return nb(i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o);case"iiiii":return nb(i.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return nb(i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o);default:return nb(i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o)}}validate(t,e){return e>=1&&e<=7}set(t,e,i){return(t=gb(t,i)).setHours(0,0,0,0),t}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:new class extends $f{priority=80;parse(t,e,i){switch(e){case"a":case"aa":case"aaa":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,i){return t.setHours(db(i),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]},b:new class extends $f{priority=80;parse(t,e,i){switch(e){case"b":case"bb":case"bbb":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,i){return t.setHours(db(i),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]},B:new class extends $f{priority=80;parse(t,e,i){switch(e){case"B":case"BB":case"BBB":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,i){return t.setHours(db(i),0,0,0),t}incompatibleTokens=["a","b","t","T"]},h:new class extends $f{priority=70;parse(t,e,i){switch(e){case"h":return ab(Ff,t);case"ho":return i.ordinalNumber(t,{unit:"hour"});default:return lb(e.length,t)}}validate(t,e){return e>=1&&e<=12}set(t,e,i){const o=t.getHours()>=12;return o&&i<12?t.setHours(i+12,0,0,0):o||12!==i?t.setHours(i,0,0,0):t.setHours(0,0,0,0),t}incompatibleTokens=["H","K","k","t","T"]},H:new class extends $f{priority=70;parse(t,e,i){switch(e){case"H":return ab(Rf,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return lb(e.length,t)}}validate(t,e){return e>=0&&e<=23}set(t,e,i){return t.setHours(i,0,0,0),t}incompatibleTokens=["a","b","h","K","k","t","T"]},K:new class extends $f{priority=70;parse(t,e,i){switch(e){case"K":return ab(Nf,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return lb(e.length,t)}}validate(t,e){return e>=0&&e<=11}set(t,e,i){return t.getHours()>=12&&i<12?t.setHours(i+12,0,0,0):t.setHours(i,0,0,0),t}incompatibleTokens=["h","H","k","t","T"]},k:new class extends $f{priority=70;parse(t,e,i){switch(e){case"k":return ab(If,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return lb(e.length,t)}}validate(t,e){return e>=1&&e<=24}set(t,e,i){const o=i<=24?i%24:i;return t.setHours(o,0,0,0),t}incompatibleTokens=["a","b","h","H","K","t","T"]},m:new class extends $f{priority=60;parse(t,e,i){switch(e){case"m":return ab(Wf,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return lb(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,i){return t.setMinutes(i,0,0),t}incompatibleTokens=["t","T"]},s:new class extends $f{priority=50;parse(t,e,i){switch(e){case"s":return ab(Bf,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return lb(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,i){return t.setSeconds(i,0),t}incompatibleTokens=["t","T"]},S:new class extends $f{priority=30;parse(t,e){return nb(lb(e.length,t),(t=>Math.trunc(t*Math.pow(10,3-e.length))))}set(t,e,i){return t.setMilliseconds(i),t}incompatibleTokens=["t","T"]},X:new class extends $f{priority=10;parse(t,e){switch(e){case"X":return sb(Jf,t);case"XX":return sb(tb,t);case"XXXX":return sb(eb,t);case"XXXXX":return sb(ob,t);default:return sb(ib,t)}}set(t,e,i){return e.timestampIsSet?t:gg(t,t.getTime()-Pg(t)-i)}incompatibleTokens=["t","T","x"]},x:new class extends $f{priority=10;parse(t,e){switch(e){case"x":return sb(Jf,t);case"xx":return sb(tb,t);case"xxxx":return sb(eb,t);case"xxxxx":return sb(ob,t);default:return sb(ib,t)}}set(t,e,i){return e.timestampIsSet?t:gg(t,t.getTime()-Pg(t)-i)}incompatibleTokens=["t","T","X"]},t:new class extends $f{priority=40;parse(t){return rb(t)}set(t,e,i){return[gg(t,1e3*i),{timestampIsSet:!0}]}incompatibleTokens="*"},T:new class extends $f{priority=20;parse(t){return rb(t)}set(t,e,i){return[gg(t,i),{timestampIsSet:!0}]}incompatibleTokens="*"}},bb=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,vb=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,yb=/^'([^]*?)'?$/,wb=/''/g,xb=/\S/,kb=/[a-zA-Z]/;function Tb(t,e,i,o){const n=Object.assign({},Sg()),a=o?.locale??n.locale??Qg,s=o?.firstWeekContainsDate??o?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,r=o?.weekStartsOn??o?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0;if(""===e)return""===t?_g(i):gg(i,NaN);const l={firstWeekContainsDate:s,weekStartsOn:r,locale:a},c=[new Lf],d=e.match(vb).map((t=>{const e=t[0];if(e in ff){return(0,ff[e])(t,a.formatLong)}return t})).join("").match(bb),h=[];for(let n of d){!o?.useAdditionalWeekYearTokens&&xf(n)&&kf(n,e,t),!o?.useAdditionalDayOfYearTokens&&wf(n)&&kf(n,e,t);const s=n[0],r=fb[s];if(r){const{incompatibleTokens:e}=r;if(Array.isArray(e)){const t=h.find((t=>e.includes(t.token)||t.token===s));if(t)throw new RangeError(`The format string mustn't contain \`${t.fullToken}\` and \`${n}\` at the same time`)}else if("*"===r.incompatibleTokens&&h.length>0)throw new RangeError(`The format string mustn't contain \`${n}\` and any other token at the same time`);h.push({token:s,fullToken:n});const o=r.run(t,n,a.match,l);if(!o)return gg(i,NaN);c.push(o.setter),t=o.rest}else{if(s.match(kb))throw new RangeError("Format string contains an unescaped latin alphabet character `"+s+"`");if("''"===n?n="'":"'"===s&&(n=n.match(yb)[1].replace(wb,"'")),0!==t.indexOf(n))return gg(i,NaN);t=t.slice(n.length)}}if(t.length>0&&xb.test(t))return gg(i,NaN);const u=c.map((t=>t.priority)).sort(((t,e)=>e-t)).filter(((t,e,i)=>i.indexOf(t)===e)).map((t=>c.filter((e=>e.priority===t)).sort(((t,e)=>e.subPriority-t.subPriority)))).map((t=>t[0]));let m=_g(i);if(isNaN(m.getTime()))return gg(i,NaN);const p={};for(const t of u){if(!t.validate(m,l))return gg(i,NaN);const e=t.set(m,p,l);Array.isArray(e)?(m=e[0],Object.assign(p,e[1])):m=e}return gg(i,m)}function Sb(t,e){const i=e?.additionalDigits??2,o=function(t){const e={},i=t.split(Mb.dateTimeDelimiter);let o;if(i.length>2)return e;/:/.test(i[0])?o=i[0]:(e.date=i[0],o=i[1],Mb.timeZoneDelimiter.test(e.date)&&(e.date=t.split(Mb.timeZoneDelimiter)[0],o=t.substr(e.date.length,t.length)));if(o){const t=Mb.timezone.exec(o);t?(e.time=o.replace(t[1],""),e.timezone=t[1]):e.time=o}return e}(t);let n;if(o.date){const t=function(t,e){const i=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),o=t.match(i);if(!o)return{year:NaN,restDateString:""};const n=o[1]?parseInt(o[1]):null,a=o[2]?parseInt(o[2]):null;return{year:null===a?n:100*a,restDateString:t.slice((o[1]||o[2]).length)}}(o.date,i);n=function(t,e){if(null===e)return new Date(NaN);const i=t.match(Db);if(!i)return new Date(NaN);const o=!!i[4],n=Pb(i[1]),a=Pb(i[2])-1,s=Pb(i[3]),r=Pb(i[4]),l=Pb(i[5])-1;if(o)return function(t,e,i){return e>=1&&e<=53&&i>=0&&i<=6}(0,r,l)?function(t,e,i){const o=new Date(0);o.setUTCFullYear(t,0,4);const n=o.getUTCDay()||7,a=7*(e-1)+i+1-n;return o.setUTCDate(o.getUTCDate()+a),o}(e,r,l):new Date(NaN);{const t=new Date(0);return function(t,e,i){return e>=0&&e<=11&&i>=1&&i<=(Lb[e]||($b(t)?29:28))}(e,a,s)&&function(t,e){return e>=1&&e<=($b(t)?366:365)}(e,n)?(t.setUTCFullYear(e,a,Math.max(n,s)),t):new Date(NaN)}}(t.restDateString,t.year)}if(!n||isNaN(n.getTime()))return new Date(NaN);const a=n.getTime();let s,r=0;if(o.time&&(r=function(t){const e=t.match(Cb);if(!e)return NaN;const i=Eb(e[1]),o=Eb(e[2]),n=Eb(e[3]);if(!function(t,e,i){if(24===t)return 0===e&&0===i;return i>=0&&i<60&&e>=0&&e<60&&t>=0&&t<25}(i,o,n))return NaN;return i*kg+o*xg+1e3*n}(o.time),isNaN(r)))return new Date(NaN);if(!o.timezone){const t=new Date(a+r),e=new Date(0);return e.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),e.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),e}return s=function(t){if("Z"===t)return 0;const e=t.match(Ab);if(!e)return 0;const i="+"===e[1]?-1:1,o=parseInt(e[2]),n=e[3]&&parseInt(e[3])||0;if(!function(t,e){return e>=0&&e<=59}(0,n))return NaN;return i*(o*kg+n*xg)}(o.timezone),isNaN(s)?new Date(NaN):new Date(a+r+s)}const Mb={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Db=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Cb=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Ab=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Pb(t){return t?parseInt(t):1}function Eb(t){return t&&parseFloat(t.replace(",","."))||0}const Lb=[31,null,31,30,31,30,31,31,30,31,30,31];function $b(t){return t%400==0||t%4==0&&t%100!=0}const zb={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};Lh._date.override({_id:"date-fns",formats:function(){return zb},parse:function(t,e){if(null==t)return null;const i=typeof t;return"number"===i||t instanceof Date?t=_g(t):"string"===i&&(t="string"==typeof e?Tb(t,e,new Date,this.options):Sb(t,this.options)),$g(t)?t.getTime():null},format:function(t,e){return function(t,e,i){const o=Sg(),n=i?.locale??o.locale??Qg,a=i?.firstWeekContainsDate??i?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,s=i?.weekStartsOn??i?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,r=_g(t);if(!$g(r))throw new RangeError("Invalid time value");let l=e.match(Sf).map((t=>{const e=t[0];return"p"===e||"P"===e?(0,ff[e])(t,n.formatLong):t})).join("").match(Tf).map((t=>{if("''"===t)return{isToken:!1,value:"'"};const e=t[0];if("'"===e)return{isToken:!1,value:Af(t)};if(hf[e])return{isToken:!0,value:t};if(e.match(Cf))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return{isToken:!1,value:t}}));n.localize.preprocessor&&(l=n.localize.preprocessor(r,l));const c={firstWeekContainsDate:a,weekStartsOn:s,locale:n};return l.map((o=>{if(!o.isToken)return o.value;const a=o.value;return(!i?.useAdditionalWeekYearTokens&&xf(a)||!i?.useAdditionalDayOfYearTokens&&wf(a))&&kf(a,e,String(t)),(0,hf[a[0]])(r,a,n.localize,c)})).join("")}(t,e,this.options)},add:function(t,e,i){switch(i){case"millisecond":return vg(t,e);case"second":return function(t,e){return vg(t,1e3*e)}(t,e);case"minute":return function(t,e){return vg(t,e*xg)}(t,e);case"hour":return function(t,e){return vg(t,e*kg)}(t,e);case"day":return fg(t,e);case"week":return function(t,e){return fg(t,7*e)}(t,e);case"month":return bg(t,e);case"quarter":return function(t,e){return bg(t,3*e)}(t,e);case"year":return function(t,e){return bg(t,12*e)}(t,e);default:return t}},diff:function(t,e,i){switch(i){case"millisecond":return Hg(t,e);case"second":return function(t,e,i){const o=Hg(t,e)/1e3;return Vg(i?.roundingMethod)(o)}(t,e);case"minute":return function(t,e,i){const o=Hg(t,e)/xg;return Vg(i?.roundingMethod)(o)}(t,e);case"hour":return function(t,e,i){const o=Hg(t,e)/kg;return Vg(i?.roundingMethod)(o)}(t,e);case"day":return zg(t,e);case"week":return function(t,e,i){const o=zg(t,e)/7;return Vg(i?.roundingMethod)(o)}(t,e);case"month":return Ng(t,e);case"quarter":return function(t,e,i){const o=Ng(t,e)/3;return Vg(i?.roundingMethod)(o)}(t,e);case"year":return Fg(t,e);default:return 0}},startOf:function(t,e,i){switch(e){case"second":return function(t){const e=_g(t);return e.setMilliseconds(0),e}(t);case"minute":return function(t){const e=_g(t);return e.setSeconds(0,0),e}(t);case"hour":return function(t){const e=_g(t);return e.setMinutes(0,0,0),e}(t);case"day":return Ag(t);case"week":return Mg(t);case"isoWeek":return Mg(t,{weekStartsOn:+i});case"month":return function(t){const e=_g(t);return e.setDate(1),e.setHours(0,0,0,0),e}(t);case"quarter":return function(t){const e=_g(t),i=e.getMonth(),o=i-i%3;return e.setMonth(o,1),e.setHours(0,0,0,0),e}(t);case"year":return Wg(t);default:return t}},endOf:function(t,e){switch(e){case"second":return function(t){const e=_g(t);return e.setMilliseconds(999),e}(t);case"minute":return function(t){const e=_g(t);return e.setSeconds(59,999),e}(t);case"hour":return function(t){const e=_g(t);return e.setMinutes(59,59,999),e}(t);case"day":return Rg(t);case"week":return function(t,e){const i=Sg(),o=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,n=_g(t),a=n.getDay(),s=6+(a<o?-7:0)-(a-o);return n.setDate(n.getDate()+s),n.setHours(23,59,59,999),n}(t);case"month":return Ig(t);case"quarter":return function(t){const e=_g(t),i=e.getMonth(),o=i-i%3+3;return e.setMonth(o,0),e.setHours(23,59,59,999),e}(t);case"year":return function(t){const e=_g(t),i=e.getFullYear();return e.setFullYear(i+1,0,0),e.setHours(23,59,59,999),e}(t);default:return t}}});var Ob=Object.freeze({__proto__:null});const Vb=function(...t){const e="type"===t[0].type,i=t.map((t=>t.schema)),o=Object.assign({},...i);return e?Yn(o):Bn(o)}(Bn({index:jn(Wn()),view_index:jn(Wn()),view_layout:Rn(),type:Un()}),Bn({entity:jn(Un()),name:jn(Un()),icon:jn(Un()),autoStartStopEnableEntity:jn(Un()),powerEntity:jn(Un()),visibility:jn(Rn())}),Bn({disable_name:jn(Nn()),disable_window:jn(Nn()),disable_autoStartStop:jn(Nn()),disable_overpowering:jn(Nn()),disable_heat:jn(Nn()),disable_cool:jn(Nn()),disable_heat_cool:jn(Nn()),disable_auto:jn(Nn()),disable_dry:jn(Nn()),disable_fan_only:jn(Nn()),disable_off:jn(Nn()),disable_sleep:jn(Nn()),disable_safety_warning:jn(Nn()),disable_power_infos:jn(Nn()),disable_auto_fan_infos:jn(Nn()),disable_target_icon:jn(Nn()),set_current_as_main:jn(Nn()),eco_temperature:jn(Wn()),disable_menu:jn(Nn()),disable_buttons:jn(Nn()),allow_lock_toggle:jn(Nn()),disable_presets:jn(Nn()),theme:jn(qn([Fn("classic"),Fn("vtherm"),Fn("uncolored"),Fn("gunmalmg")])),disable_timed_preset:jn(Nn()),use_manual_duration_input:jn(Nn()),allow_preset_modification:jn(Nn()),show_status_text:jn(Nn()),show_background_gradient_on_active:jn(Nn()),show_regulation_chart:jn(Nn())}));var Hb;const Rb=["icon_color","layout","fill_container","primary_info","secondary_info","icon_type","content_info","use_entity_picture","collapsible_controls","icon_animation"],Ib=t=>{var e,i;customElements.get("ha-form")&&(customElements.get("hui-action-editor")||((t,e,i,o)=>{const[n,a,s]=t.split(".",3);return Number(n)>e||Number(n)===e&&(void 0===o?Number(a)>=i:Number(a)>i)||void 0!==o&&Number(n)===e&&Number(a)===i&&Number(s)>=o})(t,2022,11))||null===(e=customElements.get("hui-button-card"))||void 0===e||e.getConfigElement(),customElements.get("ha-entity-picker")||null===(i=customElements.get("hui-entities-card"))||void 0===i||i.getConfigElement()},Nb=["theme","autoStartStopEnableEntity","powerEntity","section_all_themes","section_classic_only","disable_name","disable_window","disable_autoStartStop","disable_overpowering","disable_heat","disable_cool","disable_heat_cool","disable_auto","disable_dry","disable_fan_only","disable_off","disable_sleep","disable_menu","disable_safety_warning","disable_buttons","set_current_as_main","disable_power_infos","disable_auto_fan_infos","disable_target_icon","allow_lock_toggle","disable_presets","disable_timed_preset","use_manual_duration_input","allow_preset_modification","show_status_text","show_background_gradient_on_active","show_regulation_chart"],Fb=xn(((t,e)=>[{name:"entity",selector:{entity:{domain:["climate"]}}},{name:"name",selector:{text:{}}},{name:"theme",selector:{select:{options:t}}},{type:"grid",name:"",schema:[{name:"autoStartStopEnableEntity",selector:{entity:{domain:["switch"]}}},{name:"powerEntity",selector:{entity:{domain:["sensor","input_number"]}}}]},{type:"expandable",name:"section_all_themes",icon:"mdi:cog",schema:[{name:"disable_name",selector:{boolean:{}}},{name:"disable_safety_warning",selector:{boolean:{}}},{name:"set_current_as_main",selector:{boolean:{}}},{name:"allow_lock_toggle",selector:{boolean:{}}},{name:"disable_timed_preset",selector:{boolean:{}}},{name:"use_manual_duration_input",selector:{boolean:{}}},{name:"allow_preset_modification",selector:{boolean:{}}},{name:"show_regulation_chart",selector:{boolean:{}}}]},...e?[]:[{type:"expandable",name:"section_classic_only",icon:"mdi:palette-outline",schema:[{name:"disable_window",selector:{boolean:{}}},{name:"disable_autoStartStop",selector:{boolean:{}}},{name:"disable_overpowering",selector:{boolean:{}}},{name:"disable_heat",selector:{boolean:{}}},{name:"disable_cool",selector:{boolean:{}}},{name:"disable_heat_cool",selector:{boolean:{}}},{name:"disable_auto",selector:{boolean:{}}},{name:"disable_dry",selector:{boolean:{}}},{name:"disable_fan_only",selector:{boolean:{}}},{name:"disable_off",selector:{boolean:{}}},{name:"disable_sleep",selector:{boolean:{}}},{name:"disable_menu",selector:{boolean:{}}},{name:"disable_buttons",selector:{boolean:{}}},{name:"disable_power_infos",selector:{boolean:{}}},{name:"disable_auto_fan_infos",selector:{boolean:{}}},{name:"disable_target_icon",selector:{boolean:{}}},{name:"disable_presets",selector:{boolean:{}}},{name:"show_status_text",selector:{boolean:{}}},{name:"show_background_gradient_on_active",selector:{boolean:{}}}]}]]));let Wb=Hb=class extends rt{constructor(){super(...arguments),this._computeLabel=t=>{const e=fn(this.hass);return Rb.includes(t.name)?e(`editor.card.generic.${t.name}`):Nb.includes(t.name)?e(`editor.card.climate.${t.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)}}connectedCallback(){super.connectedCallback(),Ib(this.hass.connection.haVersion)}setConfig(t){On(t,Vb),this._config=t}render(){var t;if(!this.hass||!this._config)return B``;const e=fn(this.hass),i=[{value:"classic",label:e("editor.card.climate.theme_classic")||"Classic"},{value:"vtherm",label:e("editor.card.climate.theme_vtherm")||"VTherm"},{value:"uncolored",label:e("editor.card.climate.theme_uncolored")||"Uncolored"},{value:"gunmalmg",label:e("editor.card.climate.theme_gunmalmg")||"Gunmalmg"}],o="gunmalmg"===(null===(t=this._config)||void 0===t?void 0:t.theme),n=Fb(i,o),a=Object.assign({},this._config),s={};for(const t of Hb.ALL_THEMES_KEYS)void 0!==this._config[t]&&(s[t]=this._config[t]),delete a[t];if(a.section_all_themes=s,!o){const t={};for(const e of Hb.CLASSIC_ONLY_KEYS)void 0!==this._config[e]&&(t[e]=this._config[e]),delete a[e];a.section_classic_only=t}return B`
|
||
<ha-form
|
||
.hass=${this.hass}
|
||
.data=${a}
|
||
.schema=${n}
|
||
.computeLabel=${this._computeLabel}
|
||
@value-changed=${this._valueChanged}
|
||
></ha-form>
|
||
`}_valueChanged(t){const e=t.detail.value,{section_all_themes:i,section_classic_only:o}=e,n=function(t,e){var i={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(i[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(t);n<o.length;n++)e.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(t,o[n])&&(i[o[n]]=t[o[n]])}return i}(e,["section_all_themes","section_classic_only"]),a=Object.assign(Object.assign(Object.assign({},n),i||{}),o||{});a.theme||(a.theme="classic"),Tn(this,"config-changed",{config:a}),Tn(this,"hass",{config:a})}};Wb.ALL_THEMES_KEYS=["disable_name","disable_safety_warning","set_current_as_main","allow_lock_toggle","disable_timed_preset","use_manual_duration_input","allow_preset_modification","show_regulation_chart"],Wb.CLASSIC_ONLY_KEYS=["disable_window","disable_autoStartStop","disable_overpowering","disable_heat","disable_cool","disable_heat_cool","disable_auto","disable_dry","disable_fan_only","disable_off","disable_sleep","disable_menu","disable_buttons","disable_power_infos","disable_auto_fan_infos","disable_target_icon","disable_presets","show_status_text","show_background_gradient_on_active"],t([mt()],Wb.prototype,"_config",void 0),t([ut({attribute:!1})],Wb.prototype,"hass",void 0),Wb=Hb=t([ct("versatile-thermostat-ui-card-editor")],Wb);var Bb=Object.freeze({__proto__:null,get ClimateCardEditor(){return Wb}});export{kr as VersatileThermostatUi,yr as registerCustomCard};
|