efbab04b39
A single or double-width media player tile takes Display -> Album cover on a Guition: the cover of what plays in the icon's place, like Home Assistant's own tile. It rides in the page's strip of 0.2.91: the request and the answer are the same, a media player is simply among the tiles. The app fetches a player's picture only when its address changes; a page with a camera loads at the camera's pace with the cover reused, a page of media tiles alone loads once, and a new track (the picture's mark in the state, part of the page's wish) asks again at once. A player without a picture keeps its icon and is not asked for; the double-width tile keeps its controls; the tile over the whole page keeps the card's big cover. Firmware 0.2.78. Host harness 31 checks (docs/TEST_RESULTS_0292.md). CYD firmware 1,633,760 B, 89.0 %. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
29 lines
326 KiB
JavaScript
29 lines
326 KiB
JavaScript
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const r of l.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&s(r)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function s(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}})();function Jo(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Re={},Un=[],Kt=()=>{},hr=()=>!1,Ei=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ai=e=>e.startsWith("onUpdate:"),tt=Object.assign,Xo=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Nu=Object.prototype.hasOwnProperty,Te=(e,t)=>Nu.call(e,t),pe=Array.isArray,wn=e=>Hs(e)==="[object Map]",rn=e=>Hs(e)==="[object Set]",Il=e=>Hs(e)==="[object Date]",_e=e=>typeof e=="function",We=e=>typeof e=="string",qt=e=>typeof e=="symbol",Pe=e=>e!==null&&typeof e=="object",mr=e=>(Pe(e)||_e(e))&&_e(e.then)&&_e(e.catch),br=Object.prototype.toString,Hs=e=>br.call(e),Fu=e=>Hs(e).slice(8,-1),vr=e=>Hs(e)==="[object Object]",Zo=e=>We(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ys=Jo(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Pi=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},Du=/-\w/g,ct=Pi(e=>e.replace(Du,t=>t.slice(1).toUpperCase())),Uu=/\B([A-Z])/g,En=Pi(e=>e.replace(Uu,"-$1").toLowerCase()),Oi=Pi(e=>e.charAt(0).toUpperCase()+e.slice(1)),Gi=Pi(e=>e?`on${Oi(e)}`:""),Bt=(e,t)=>!Object.is(e,t),si=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},gr=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Ii=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Ll;const Li=()=>Ll||(Ll=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ue(e){if(pe(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],i=We(s)?Wu(s):Ue(s);if(i)for(const l in i)t[l]=i[l]}return t}else if(We(e)||Pe(e))return e}const ju=/;(?![^(]*\))/g,Hu=/:([^]+)/,Vu=/"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;function Wu(e){const t={};return e.replace(Vu,n=>n.startsWith("/*")?"":n).split(ju).forEach(n=>{if(n){const s=n.split(Hu);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function he(e){let t="";if(We(e))t=e;else if(pe(e))for(let n=0;n<e.length;n++){const s=he(e[n]);s&&(t+=s+" ")}else if(Pe(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Bu="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Ku=Jo(Bu);function _r(e){return!!e||e===""}function zu(e,t,n){if(e.length!==t.length)return!1;let s=!0;for(let i=0;s&&i<e.length;i++)s=Rt(e[i],t[i],n);return s}function Ml(e,t,n){if(e.size!==t.size)return!1;const s=Array.from(t),i=new Uint8Array(s.length);for(const l of e){let r=-1;for(let u=0;u<s.length;u++)if(!i[u]&&Rt(l,s[u],n)){r=u;break}if(r<0)return!1;i[r]=1}return!0}function qu(e,t,n){let s=wn(e),i=wn(t);if(s||i||(s=rn(e),i=rn(t),s||i))return s&&i?Ml(e,t,n):!1;const l=Object.keys(e).length,r=Object.keys(t).length;if(l!==r)return!1;for(const u in e){const f=e.hasOwnProperty(u),h=t.hasOwnProperty(u);if(f&&!h||!f&&h||!Rt(e[u],t[u],n))return!1}return String(e)===String(t)}function Rl(e,t,n,s){n||(n=[new Map,new Map]);const[i,l]=n;if(i.has(e)||l.has(t))return i.get(e)===t&&l.get(t)===e;i.set(e,t),l.set(t,e);const r=s(e,t,n);return i.delete(e),l.delete(t),r}function Rt(e,t,n){if(e===t)return!0;let s=Il(e),i=Il(t);return s||i?s&&i?e.getTime()===t.getTime():!1:(s=qt(e),i=qt(t),s||i?e===t:(s=pe(e),i=pe(t),s||i?s&&i?Rl(e,t,n,zu):!1:(s=Pe(e),i=Pe(t),s||i?!s||!i?!1:Rl(e,t,n,qu):String(e)===String(t))))}function Qo(e,t){return e.findIndex(n=>Rt(n,t))}const yr=e=>!!(e&&e.__v_isRef===!0),d=e=>We(e)?e:e==null?"":pe(e)||Pe(e)&&(e.toString===br||!_e(e.toString))?yr(e)?d(e.value):JSON.stringify(e,wr,2):String(e),wr=(e,t)=>yr(t)?wr(e,t.value):wn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,i],l)=>(n[Ji(s,l)+" =>"]=i,n),{})}:rn(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Ji(n))}:qt(t)?Ji(t):Pe(t)&&!pe(t)&&!vr(t)?String(t):t,Ji=(e,t="")=>{var n;return qt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};let Je;class kr{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Je&&(Je.active?(this.parent=Je,this.index=(Je.scopes||(Je.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){const s=this.scopes.slice();for(t=0,n=s.length;t<n;t++)s[t].pause()}for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes){const i=this.scopes.slice();for(t=0,n=i.length;t<n;t++)i[t].resume()}const s=this.effects.slice();for(t=0,n=s.length;t<n;t++)s[t].resume()}}run(t){if(this._active){const n=Je;try{return Je=this,t()}finally{Je=n}}}on(){++this._on===1&&(this.prevScope=Je,Je=this)}off(){if(this._on>0&&--this._on===0){if(Je===this)Je=this.prevScope;else{let t=Je;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(this.effects.length=0,n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){const i=this.scopes.slice();for(n=0,s=i.length;n<s;n++)i[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0}}}function Yu(e){return new kr(e)}function $r(){return Je}function Gu(e,t=!1){Je&&Je.cleanups.push(e)}let Ne;const Xi=new WeakSet;class xr{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Je&&(Je.active?Je.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Xi.has(this)&&(Xi.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Cr(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Nl(this),Tr(this);const t=Ne,n=Mt;Ne=this,Mt=!0;try{return this.fn()}finally{Er(this),Ne=t,Mt=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)nl(t);this.deps=this.depsTail=void 0,Nl(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Xi.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){yo(this)&&this.run()}get dirty(){return yo(this)}}let Sr=0,ws,ks;function Cr(e,t=!1){if(e.flags|=8,t){e.next=ks,ks=e;return}e.next=ws,ws=e}function el(){Sr++}function tl(){if(--Sr>0)return;if(ks){let t=ks;for(ks=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;ws;){let t=ws;for(ws=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function Tr(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Er(e){let t,n=e.depsTail,s=n;for(;s;){const i=s.prevDep;s.version===-1?(s===n&&(n=i),nl(s),Ju(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=i}e.deps=t,e.depsTail=n}function yo(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ar(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ar(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ts)||(e.globalVersion=Ts,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!yo(e))))return;e.flags|=2;const t=e.dep,n=Ne,s=Mt;Ne=e,Mt=!0;try{Tr(e);const i=e.fn(e._value);(t.version===0||Bt(i,e._value))&&(e.flags|=128,e._value=i,t.version++)}catch(i){throw t.version++,i}finally{Ne=n,Mt=s,Er(e),e.flags&=-3}}function nl(e,t=!1){const{dep:n,prevSub:s,nextSub:i}=e;if(s&&(s.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let l=n.computed.deps;l;l=l.nextDep)nl(l,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Ju(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Mt=!0;const Pr=[];function cn(){Pr.push(Mt),Mt=!1}function un(){const e=Pr.pop();Mt=e===void 0?!0:e}function Nl(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ne;Ne=void 0;try{t()}finally{Ne=n}}}let Ts=0;class Xu{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class sl{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Ne||!Mt||Ne===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ne)n=this.activeLink=new Xu(Ne,this),Ne.deps?(n.prevDep=Ne.depsTail,Ne.depsTail.nextDep=n,Ne.depsTail=n):Ne.deps=Ne.depsTail=n,Or(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=Ne.depsTail,n.nextDep=void 0,Ne.depsTail.nextDep=n,Ne.depsTail=n,Ne.deps===n&&(Ne.deps=s)}return n}trigger(t){this.version++,Ts++,this.notify(t)}notify(t){el();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{tl()}}}function Or(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)Or(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const wo=new WeakMap,Hn=Symbol(""),ko=Symbol(""),Es=Symbol("");function nt(e,t,n){if(Mt&&Ne){let s=wo.get(e);s||wo.set(e,s=new Map);let i=s.get(n);i||(s.set(n,i=new sl),i.map=s,i.key=n),i.track()}}function en(e,t,n,s,i,l){const r=wo.get(e);if(!r){Ts++;return}const u=f=>{f&&f.trigger()};if(el(),t==="clear")r.forEach(u);else{const f=pe(e),h=f&&Zo(n);if(f&&n==="length"){const p=Number(s);r.forEach((b,v)=>{(v==="length"||v===Es||!qt(v)&&v>=p)&&u(b)})}else switch((n!==void 0||r.has(void 0))&&u(r.get(n)),h&&u(r.get(Es)),t){case"add":f?h&&u(r.get("length")):(u(r.get(Hn)),wn(e)&&u(r.get(ko)));break;case"delete":f||(u(r.get(Hn)),wn(e)&&u(r.get(ko)));break;case"set":wn(e)&&u(r.get(Hn));break}}tl()}function Gn(e){const t=xe(e);return t===e||(nt(t,"iterate",Es),Ct(e))?t:Yt(e)?kn(e)?t.map(n=>$n(Pt(n))):t.map($n):t.map(Pt)}function Mi(e){return nt(e=xe(e),"iterate",Es),e}function Vt(e,t){return Yt(e)?$n(kn(e)?Pt(t):t):Pt(t)}const Zu={__proto__:null,[Symbol.iterator](){return Zi(this,Symbol.iterator,e=>Vt(this,e))},concat(...e){return Gn(this).concat(...e.map(t=>pe(t)?Gn(t):t))},entries(){return Zi(this,"entries",e=>(e[1]=Vt(this,e[1]),e))},every(e,t){return Gt(this,"every",e,t,void 0,arguments)},filter(e,t){return Gt(this,"filter",e,t,n=>n.map(s=>Vt(this,s)),arguments)},find(e,t){return Gt(this,"find",e,t,n=>Vt(this,n),arguments)},findIndex(e,t){return Gt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Gt(this,"findLast",e,t,n=>Vt(this,n),arguments)},findLastIndex(e,t){return Gt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Gt(this,"forEach",e,t,void 0,arguments)},includes(...e){return Qi(this,"includes",e)},indexOf(...e){return Qi(this,"indexOf",e)},join(e){return Gn(this).join(e)},lastIndexOf(...e){return Qi(this,"lastIndexOf",e)},map(e,t){return Gt(this,"map",e,t,void 0,arguments)},pop(){return ds(this,"pop")},push(...e){return ds(this,"push",e)},reduce(e,...t){return Fl(this,"reduce",e,t)},reduceRight(e,...t){return Fl(this,"reduceRight",e,t)},shift(){return ds(this,"shift")},some(e,t){return Gt(this,"some",e,t,void 0,arguments)},splice(...e){return ds(this,"splice",e)},toReversed(){return Gn(this).toReversed()},toSorted(e){return Gn(this).toSorted(e)},toSpliced(...e){return Gn(this).toSpliced(...e)},unshift(...e){return ds(this,"unshift",e)},values(){return Zi(this,"values",e=>Vt(this,e))}};function Zi(e,t,n){const s=Mi(e),i=s[t]();return s!==e&&!Ct(e)&&(i._next=i.next,i.next=()=>{const l=i._next();return l.done||(l.value=n(l.value)),l}),i}const Qu=Array.prototype;function Gt(e,t,n,s,i,l){const r=Mi(e),u=r!==e&&!Ct(e),f=r[t];if(f!==Qu[t]){const b=f.apply(e,l);return u?Pt(b):b}let h=n;r!==e&&(u?h=function(b,v){return n.call(this,Vt(e,b),v,e)}:n.length>2&&(h=function(b,v){return n.call(this,b,v,e)}));const p=f.call(r,h,s);return u&&i?i(p):p}function Fl(e,t,n,s){const i=Mi(e),l=i!==e&&!Ct(e);let r=n,u=!1;i!==e&&(l?(u=s.length===0,r=function(h,p,b){return u&&(u=!1,h=Vt(e,h)),n.call(this,h,Vt(e,p),b,e)}):n.length>3&&(r=function(h,p,b){return n.call(this,h,p,b,e)}));const f=i[t](r,...s);return u?Vt(e,f):f}function Qi(e,t,n){const s=xe(e);nt(s,"iterate",Es);const i=s[t](...n);return(i===-1||i===!1)&&ll(n[0])?(n[0]=xe(n[0]),s[t](...n)):i}function ds(e,t,n=[]){cn(),el();const s=xe(e)[t].apply(e,n);return tl(),un(),s}const ed=Jo("__proto__,__v_isRef,__isVue"),Ir=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(qt));function td(e){qt(e)||(e=String(e));const t=xe(this);return nt(t,"has",e),t.hasOwnProperty(e)}class Lr{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const i=this._isReadonly,l=this._isShallow;if(n==="__v_isReactive")return!i;if(n==="__v_isReadonly")return i;if(n==="__v_isShallow")return l;if(n==="__v_raw")return s===(i?l?dd:Fr:l?Nr:Rr).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const r=pe(t);if(!i){let f;if(r&&(f=Zu[n]))return f;if(n==="hasOwnProperty")return td}const u=Reflect.get(t,n,et(t)?t:s);if((qt(n)?Ir.has(n):ed(n))||(i||nt(t,"get",n),l))return u;if(et(u)){const f=r&&Zo(n)?u:u.value;return i&&Pe(f)?xo(f):f}return Pe(u)?i?xo(u):qn(u):u}}class Mr extends Lr{constructor(t=!1){super(!1,t)}set(t,n,s,i){let l=t[n];const r=pe(t)&&Zo(n);if(!this._isShallow){const h=Yt(l);if(!Ct(s)&&!Yt(s)&&(l=xe(l),s=xe(s)),!r&&et(l)&&!et(s))return h||(l.value=s),!0}const u=r?Number(n)<t.length:Te(t,n),f=Reflect.set(t,n,s,et(t)?t:i);return t===xe(i)&&f&&(u?Bt(s,l)&&en(t,"set",n,s):en(t,"add",n,s)),f}deleteProperty(t,n){const s=Te(t,n);t[n];const i=Reflect.deleteProperty(t,n);return i&&s&&en(t,"delete",n,void 0),i}has(t,n){const s=Reflect.has(t,n);return(!qt(n)||!Ir.has(n))&&nt(t,"has",n),s}ownKeys(t){return nt(t,"iterate",pe(t)?"length":Hn),Reflect.ownKeys(t)}}class nd extends Lr{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const sd=new Mr,id=new nd,od=new Mr(!0);const $o=e=>e,Gs=e=>Reflect.getPrototypeOf(e);function ld(e,t,n){return function(...s){const i=this.__v_raw,l=xe(i),r=wn(l),u=e==="entries"||e===Symbol.iterator&&r,f=e==="keys"&&r,h=i[e](...s),p=n?$o:t?$n:Pt;return!t&&nt(l,"iterate",f?ko:Hn),tt(Object.create(h),{next(){const{value:b,done:v}=h.next();return v?{value:b,done:v}:{value:u?[p(b[0]),p(b[1])]:p(b),done:v}}})}}function Js(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function ad(e,t){const n={get(i){const l=this.__v_raw,r=xe(l),u=xe(i);e||(Bt(i,u)&&nt(r,"get",i),nt(r,"get",u));const{has:f}=Gs(r),h=t?$o:e?$n:Pt;if(f.call(r,i))return h(l.get(i));if(f.call(r,u))return h(l.get(u));l!==r&&l.get(i)},get size(){const i=this.__v_raw;return!e&&nt(xe(i),"iterate",Hn),i.size},has(i){const l=this.__v_raw,r=xe(l),u=xe(i);return e||(Bt(i,u)&&nt(r,"has",i),nt(r,"has",u)),i===u?l.has(i):l.has(i)||l.has(u)},forEach(i,l){const r=this,u=r.__v_raw,f=xe(u),h=t?$o:e?$n:Pt;return!e&&nt(f,"iterate",Hn),u.forEach((p,b)=>i.call(l,h(p),h(b),r))}};return tt(n,e?{add:Js("add"),set:Js("set"),delete:Js("delete"),clear:Js("clear")}:{add(i){const l=xe(this),r=Gs(l),u=xe(i),f=!t&&!Ct(i)&&!Yt(i)?u:i;return r.has.call(l,f)||Bt(i,f)&&r.has.call(l,i)||Bt(u,f)&&r.has.call(l,u)||(l.add(f),en(l,"add",f,f)),this},set(i,l){!t&&!Ct(l)&&!Yt(l)&&(l=xe(l));const r=xe(this),{has:u,get:f}=Gs(r);let h=u.call(r,i);h||(i=xe(i),h=u.call(r,i));const p=f.call(r,i);return r.set(i,l),h?Bt(l,p)&&en(r,"set",i,l):en(r,"add",i,l),this},delete(i){const l=xe(this),{has:r,get:u}=Gs(l);let f=r.call(l,i);f||(i=xe(i),f=r.call(l,i)),u&&u.call(l,i);const h=l.delete(i);return f&&en(l,"delete",i,void 0),h},clear(){const i=xe(this),l=i.size!==0,r=i.clear();return l&&en(i,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(i=>{n[i]=ld(i,e,t)}),n}function il(e,t){const n=ad(e,t);return(s,i,l)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?s:Reflect.get(Te(n,i)&&i in s?n:s,i,l)}const rd={get:il(!1,!1)},cd={get:il(!1,!0)},ud={get:il(!0,!1)};const Rr=new WeakMap,Nr=new WeakMap,Fr=new WeakMap,dd=new WeakMap;function fd(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function qn(e){return Yt(e)?e:ol(e,!1,sd,rd,Rr)}function pd(e){return ol(e,!1,od,cd,Nr)}function xo(e){return ol(e,!0,id,ud,Fr)}function ol(e,t,n,s,i){if(!Pe(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const l=i.get(e);if(l)return l;const r=fd(Fu(e));if(r===0)return e;const u=new Proxy(e,r===2?s:n);return i.set(e,u),u}function kn(e){return Yt(e)?kn(e.__v_raw):!!(e&&e.__v_isReactive)}function Yt(e){return!!(e&&e.__v_isReadonly)}function Ct(e){return!!(e&&e.__v_isShallow)}function ll(e){return e?!!e.__v_raw:!1}function xe(e){const t=e&&e.__v_raw;return t?xe(t):e}function hd(e){return!Te(e,"__v_skip")&&Object.isExtensible(e)&&gr(e,"__v_skip",!0),e}const Pt=e=>Pe(e)?qn(e):e,$n=e=>Pe(e)?xo(e):e;function et(e){return e?e.__v_isRef===!0:!1}function $e(e){return Dr(e,!1)}function md(e){return Dr(e,!0)}function Dr(e,t){return et(e)?e:new bd(e,t)}class bd{constructor(t,n){this.dep=new sl,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:xe(t),this._value=n?t:Pt(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||Ct(t)||Yt(t);t=s?t:xe(t),Bt(t,n)&&(this._rawValue=t,this._value=s?t:Pt(t),this.dep.trigger())}}function a(e){return et(e)?e.value:e}const vd={get:(e,t,n)=>t==="__v_raw"?e:a(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const i=e[t];return et(i)&&!et(n)?(i.value=n,!0):Reflect.set(e,t,n,s)}};function Ur(e){return kn(e)?e:new Proxy(e,vd)}class gd{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new sl(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ts-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&Ne!==this)return Cr(this,!0),!0}get value(){const t=this.dep.track();return Ar(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function _d(e,t,n=!1){let s,i;return _e(e)?s=e:(s=e.get,i=e.set),new gd(s,i,n)}const Xs={},ai=new WeakMap;let Fn;function yd(e,t=!1,n=Fn){if(n){let s=ai.get(n);s||ai.set(n,s=[]),s.push(e)}}function wd(e,t,n=Re){const{immediate:s,deep:i,once:l,scheduler:r,augmentJob:u,call:f}=n,h=C=>i?C:Ct(C)||i===!1||i===0?tn(C,1):tn(C);let p,b,v,y,I=!1,T=!1;if(et(e)?(b=()=>e.value,I=Ct(e)):kn(e)?(b=()=>h(e),I=!0):pe(e)?(T=!0,I=e.some(C=>kn(C)||Ct(C)),b=()=>e.map(C=>{if(et(C))return C.value;if(kn(C))return h(C);if(_e(C))return f?f(C,2):C()})):_e(e)?t?b=f?()=>f(e,2):e:b=()=>{if(v){cn();try{v()}finally{un()}}const C=Fn;Fn=p;try{return f?f(e,3,[y]):e(y)}finally{Fn=C}}:b=Kt,t&&i){const C=b,K=i===!0?1/0:i;b=()=>tn(C(),K)}const k=$r(),A=()=>{p.stop(),k&&k.active&&Xo(k.effects,p)};if(l&&t){const C=t;t=(...K)=>{const O=C(...K);return A(),O}}let S=T?new Array(e.length).fill(Xs):Xs;const U=C=>{if(!(!(p.flags&1)||!p.dirty&&!C))if(t){const K=p.run();if(C||i||I||(T?K.some((O,E)=>Bt(O,S[E])):Bt(K,S))){v&&v();const O=Fn;Fn=p;try{const E=[K,S===Xs?void 0:T&&S[0]===Xs?[]:S,y];S=K,f?f(t,3,E):t(...E)}finally{Fn=O}}}else p.run()};return u&&u(U),p=new xr(b),p.scheduler=r?()=>r(U,!1):U,y=C=>yd(C,!1,p),v=p.onStop=()=>{const C=ai.get(p);if(C){if(f)f(C,4);else for(const K of C)K();ai.delete(p)}},t?s?U(!0):S=p.run():r?r(U.bind(null,!0),!0):p.run(),A.pause=p.pause.bind(p),A.resume=p.resume.bind(p),A.stop=A,A}function tn(e,t=1/0,n){if(t<=0||!Pe(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,et(e))tn(e.value,t,n);else if(pe(e))for(let s=0;s<e.length;s++)tn(e[s],t,n);else if(rn(e)||wn(e))e.forEach(s=>{tn(s,t,n)});else if(vr(e)){for(const s in e)tn(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&tn(e[s],t,n)}return e}function Vs(e,t,n,s){try{return s?e(...s):e()}catch(i){Ri(i,t,n)}}function Nt(e,t,n,s){if(_e(e)){const i=Vs(e,t,n,s);return i&&mr(i)&&i.catch(l=>{Ri(l,t,n)}),i}if(pe(e)){const i=[];for(let l=0;l<e.length;l++)i.push(Nt(e[l],t,n,s));return i}}function Ri(e,t,n,s=!0){const i=t?t.vnode:null,{errorHandler:l,throwUnhandledErrorInProduction:r}=t&&t.appContext.config||Re;if(t){let u=t.parent;const f=t.proxy,h=`https://vuejs.org/error-reference/#runtime-${n}`;for(;u;){const p=u.ec;if(p){for(let b=0;b<p.length;b++)if(p[b](e,f,h)===!1)return}u=u.parent}if(l){cn(),Vs(l,null,10,[e,f,h]),un();return}}kd(e,n,i,s,r)}function kd(e,t,n,s=!0,i=!1){if(i)throw e;console.error(e)}const rt=[];let jt=-1;const Qn=[];let gn=null,Jn=0;const jr=Promise.resolve();let ri=null;function Ni(e){const t=ri||jr;return e?t.then(this?e.bind(this):e):t}function $d(e){let t=jt+1,n=rt.length;for(;t<n;){const s=t+n>>>1,i=rt[s],l=As(i);l<e||l===e&&i.flags&2?t=s+1:n=s}return t}function al(e){if(!(e.flags&1)){const t=As(e),n=rt[rt.length-1];!n||!(e.flags&2)&&t>=As(n)?rt.push(e):rt.splice($d(t),0,e),e.flags|=1,Hr()}}function Hr(){ri||(ri=jr.then(Wr))}function xd(e){if(!pe(e))gn&&e.id===-1?gn.splice(Jn+1,0,e):e.flags&1||(Qn.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)Qn.push(e[t]);Hr()}function Dl(e,t,n=jt+1){for(;n<rt.length;n++){const s=rt[n];if(s&&s.flags&2){if(e&&s.id!==e.uid)continue;rt.splice(n,1),n--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function Vr(e){if(Qn.length){const t=[...new Set(Qn)].sort((n,s)=>As(n)-As(s));if(Qn.length=0,gn){for(let n=0;n<t.length;n++)gn.push(t[n]);return}for(gn=t,Jn=0;Jn<gn.length;Jn++){const n=gn[Jn];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}gn=null,Jn=0}}const As=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Wr(e){try{for(jt=0;jt<rt.length;jt++){const t=rt[jt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Vs(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;jt<rt.length;jt++){const t=rt[jt];t&&(t.flags&=-2)}jt=-1,rt.length=0,Vr(),ri=null,(rt.length||Qn.length)&&Wr()}}let bt=null,Br=null;function ci(e){const t=bt;return bt=e,Br=e&&e.type.__scopeId||null,t}function oe(e,t=bt,n){if(!t||e._n)return e;const s=(...i)=>{s._d&&fi(-1);const l=ci(t),r=Vn.length;let u;try{u=e(...i)}finally{for(let f=Vn.length;f>r;f--)bc();ci(l),s._d&&fi(1)}return u};return s._n=!0,s._c=!0,s._d=!0,s}function Ee(e,t){if(bt===null)return e;const n=ji(bt),s=e.dirs||(e.dirs=[]);for(let i=0;i<t.length;i++){let[l,r,u,f=Re]=t[i];l&&(_e(l)&&(l={mounted:l,updated:l}),l.deep&&tn(r),s.push({dir:l,instance:n,value:r,oldValue:void 0,arg:u,modifiers:f}))}return e}function Rn(e,t,n,s){const i=e.dirs,l=t&&t.dirs;for(let r=0;r<i.length;r++){const u=i[r];l&&(u.oldValue=l[r].value);let f=u.dir[s];f&&(cn(),Nt(f,n,8,[e.el,u,e,t]),un())}}function Sd(e,t){if(st){let n=st.provides;const s=st.parent&&st.parent.provides;s===n&&(n=st.provides=Object.create(s)),n[e]=t}}function $s(e,t,n=!1){const s=_c();if(s||es){let i=es?es._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&_e(t)?t.call(s&&s.proxy):t}}const Cd=Symbol.for("v-scx"),Td=()=>$s(Cd);function Tt(e,t,n){return Kr(e,t,n)}function Kr(e,t,n=Re){const{immediate:s,deep:i,flush:l,once:r}=n,u=tt({},n),f=t&&s||!t&&l!=="post";let h;if(Is){if(l==="sync"){const y=Td();h=y.__watcherHandles||(y.__watcherHandles=[])}else if(!f){const y=()=>{};return y.stop=Kt,y.resume=Kt,y.pause=Kt,y}}const p=st;u.call=(y,I,T)=>Nt(y,p,I,T);let b=!1;l==="post"?u.scheduler=y=>{dt(y,p&&p.suspense)}:l!=="sync"&&(b=!0,u.scheduler=(y,I)=>{I?y():al(y)}),u.augmentJob=y=>{t&&(y.flags|=4),b&&(y.flags|=2,p&&(y.id=p.uid,y.i=p))};const v=wd(e,t,u);return Is&&(h?h.push(v):f&&v()),v}function Ed(e,t,n){const s=this.proxy,i=We(e)?e.includes(".")?zr(s,e):()=>s[e]:e.bind(s,s);let l;_e(t)?l=t:(l=t.handler,n=t);const r=Ks(this),u=Kr(i,l.bind(s),n);return r(),u}function zr(e,t){const n=t.split(".");return()=>{let s=e;for(let i=0;i<n.length&&s;i++)s=s[n[i]];return s}}const Ad=Symbol("_vte"),Fi=e=>e.__isTeleport,eo=Symbol("_leaveCb");function Pd(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==dn){t=n;break}}return t}function qr(e){if(!cl(e))return Fi(e.type)&&e.children?Pd(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&_e(n.default))return n.default()}}function rl(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;rl(Fi(n.type)&&qr(n)||n,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Le(e,t){return _e(e)?tt({name:e.name},t,{setup:e}):e}function Yr(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Ul(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const ui=new WeakMap;function xs(e,t,n,s,i=!1){if(pe(e)){e.forEach((T,k)=>xs(T,t&&(pe(t)?t[k]:t),n,s,i));return}if(Ss(s)&&!i){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&xs(e,t,n,s.component.subTree);return}const l=s.shapeFlag&4?ji(s.component):s.el,r=i?null:l,{i:u,r:f}=e,h=t&&t.r,p=u.refs===Re?u.refs={}:u.refs,b=u.setupState,v=xe(b),y=b===Re?hr:T=>Ul(p,T)?!1:Te(v,T),I=(T,k)=>!(k&&Ul(p,k));if(h!=null&&h!==f){if(jl(t),We(h))p[h]=null,y(h)&&(b[h]=null);else if(et(h)){const T=t;I(h,T.k)&&(h.value=null),T.k&&(p[T.k]=null)}}if(_e(f))Vs(f,u,12,[r,p]);else{const T=We(f),k=et(f);if(T||k){const A=()=>{if(e.f){const S=T?y(f)?b[f]:p[f]:I()||!e.k?f.value:p[e.k];if(i)pe(S)&&Xo(S,l);else if(pe(S))S.includes(l)||S.push(l);else if(T)p[f]=[l],y(f)&&(b[f]=p[f]);else{const U=[l];I(f,e.k)&&(f.value=U),e.k&&(p[e.k]=U)}}else T?(p[f]=r,y(f)&&(b[f]=r)):k&&(I(f,e.k)&&(f.value=r),e.k&&(p[e.k]=r))};if(r){const S=()=>{A(),ui.delete(e)};S.id=-1,ui.set(e,S),dt(S,n)}else jl(e),A()}}}function jl(e){const t=ui.get(e);t&&(t.flags|=8,ui.delete(e))}Li().requestIdleCallback;Li().cancelIdleCallback;const Ss=e=>!!e.type.__asyncLoader,cl=e=>e.type.__isKeepAlive;function Od(e,t){Gr(e,"a",t)}function Id(e,t){Gr(e,"da",t)}function Gr(e,t,n=st){const s=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(Di(t,s,n),n){let i=n.parent;for(;i&&i.parent;)cl(i.parent.vnode)&&Ld(s,t,n,i),i=i.parent}}function Ld(e,t,n,s){const i=Di(t,e,s,!0);ul(()=>{Xo(s[t],i)},n)}function Di(e,t,n=st,s=!1){if(n){const i=n[e]||(n[e]=[]),l=t.__weh||(t.__weh=(...r)=>{cn();const u=Ks(n),f=Nt(t,n,e,r);return u(),un(),f});return s?i.unshift(l):i.push(l),l}}const mn=e=>(t,n=st)=>{(!Is||e==="sp")&&Di(e,(...s)=>t(...s),n)},Md=mn("bm"),An=mn("m"),Rd=mn("bu"),Nd=mn("u"),rs=mn("bum"),ul=mn("um"),Fd=mn("sp"),Dd=mn("rtg"),Ud=mn("rtc");function jd(e,t=st){Di("ec",e,t)}const Jr="components";function Ws(e,t){return Zr(Jr,e,!0,t)||e}const Xr=Symbol.for("v-ndc");function Hd(e){return We(e)?Zr(Jr,e,!1)||e:e||Xr}function Zr(e,t,n=!0,s=!1){const i=bt||st;if(i){const l=i.type;{const u=Sf(l,!1);if(u&&(u===t||u===ct(t)||u===Oi(ct(t))))return l}const r=Hl(i[e]||l[e],t)||Hl(i.appContext[e],t);return!r&&s?l:r}}function Hl(e,t){return e&&(e[t]||e[ct(t)]||e[Oi(ct(t))])}function me(e,t,n,s){let i;const l=n,r=pe(e);if(r||We(e)){const u=r&&kn(e);let f=!1,h=!1;u&&(f=!Ct(e),h=Yt(e),e=Mi(e)),i=new Array(e.length);for(let p=0,b=e.length;p<b;p++)i[p]=t(f?h?$n(Pt(e[p])):Pt(e[p]):e[p],p,void 0,l)}else if(typeof e=="number"){i=new Array(e);for(let u=0;u<e;u++)i[u]=t(u+1,u,void 0,l)}else if(Pe(e))if(e[Symbol.iterator])i=Array.from(e,(u,f)=>t(u,f,void 0,l));else{const u=Object.keys(e);i=new Array(u.length);for(let f=0,h=u.length;f<h;f++){const p=u[f];i[f]=t(e[p],p,f,l)}}else i=[];return i}const So=e=>e?yc(e)?ji(e):So(e.parent):null,Cs=tt(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>So(e.parent),$root:e=>So(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>ec(e),$forceUpdate:e=>e.f||(e.f=()=>{al(e.update)}),$nextTick:e=>e.n||(e.n=Ni.bind(e.proxy)),$watch:e=>Ed.bind(e)}),to=(e,t)=>e!==Re&&!e.__isScriptSetup&&Te(e,t),Vd={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:i,props:l,accessCache:r,type:u,appContext:f}=e;if(t[0]!=="$"){const v=r[t];if(v!==void 0)switch(v){case 1:return s[t];case 2:return i[t];case 4:return n[t];case 3:return l[t]}else{if(to(s,t))return r[t]=1,s[t];if(i!==Re&&Te(i,t))return r[t]=2,i[t];if(Te(l,t))return r[t]=3,l[t];if(n!==Re&&Te(n,t))return r[t]=4,n[t];Co&&(r[t]=0)}}const h=Cs[t];let p,b;if(h)return t==="$attrs"&&nt(e.attrs,"get",""),h(e);if((p=u.__cssModules)&&(p=p[t]))return p;if(n!==Re&&Te(n,t))return r[t]=4,n[t];if(b=f.config.globalProperties,Te(b,t))return b[t]},set({_:e},t,n){const{data:s,setupState:i,ctx:l}=e;return to(i,t)?(i[t]=n,!0):s!==Re&&Te(s,t)?(s[t]=n,!0):Te(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(l[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:i,props:l,type:r}},u){let f;return!!(n[u]||e!==Re&&u[0]!=="$"&&Te(e,u)||to(t,u)||Te(l,u)||Te(s,u)||Te(Cs,u)||Te(i.config.globalProperties,u)||(f=r.__cssModules)&&f[u])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Te(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Vl(e){return pe(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Co=!0;function Wd(e){const t=ec(e),n=e.proxy,s=e.ctx;Co=!1,t.beforeCreate&&Wl(t.beforeCreate,e,"bc");const{data:i,computed:l,methods:r,watch:u,provide:f,inject:h,created:p,beforeMount:b,mounted:v,beforeUpdate:y,updated:I,activated:T,deactivated:k,beforeDestroy:A,beforeUnmount:S,destroyed:U,unmounted:C,render:K,renderTracked:O,renderTriggered:E,errorCaptured:R,serverPrefetch:L,expose:D,inheritAttrs:M,components:Y,directives:te,filters:ye}=t;if(h&&Bd(h,s,null),r)for(const ge in r){const we=r[ge];_e(we)&&(s[ge]=we.bind(n))}if(i){const ge=i.call(n,n);Pe(ge)&&(e.data=qn(ge))}if(Co=!0,l)for(const ge in l){const we=l[ge],Ge=_e(we)?we.bind(n,n):_e(we.get)?we.get.bind(n,n):Kt,qe=!_e(we)&&_e(we.set)?we.set.bind(n):Kt,le=$({get:Ge,set:qe});Object.defineProperty(s,ge,{enumerable:!0,configurable:!0,get:()=>le.value,set:Z=>le.value=Z})}if(u)for(const ge in u)Qr(u[ge],s,n,ge);if(f){const ge=_e(f)?f.call(n):f;Reflect.ownKeys(ge).forEach(we=>{Sd(we,ge[we])})}p&&Wl(p,e,"c");function be(ge,we){pe(we)?we.forEach(Ge=>ge(Ge.bind(n))):we&&ge(we.bind(n))}if(be(Md,b),be(An,v),be(Rd,y),be(Nd,I),be(Od,T),be(Id,k),be(jd,R),be(Ud,O),be(Dd,E),be(rs,S),be(ul,C),be(Fd,L),pe(D))if(D.length){const ge=e.exposed||(e.exposed={});D.forEach(we=>{Object.defineProperty(ge,we,{get:()=>n[we],set:Ge=>n[we]=Ge,enumerable:!0})})}else e.exposed||(e.exposed={});K&&e.render===Kt&&(e.render=K),M!=null&&(e.inheritAttrs=M),Y&&(e.components=Y),te&&(e.directives=te),L&&Yr(e)}function Bd(e,t,n=Kt){pe(e)&&(e=To(e));for(const s in e){const i=e[s];let l;Pe(i)?"default"in i?l=$s(i.from||s,i.default,!0):l=$s(i.from||s):l=$s(i),et(l)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>l.value,set:r=>l.value=r}):t[s]=l}}function Wl(e,t,n){Nt(pe(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Qr(e,t,n,s){let i=s.includes(".")?zr(n,s):()=>n[s];if(We(e)){const l=t[e];_e(l)&&Tt(i,l)}else if(_e(e))Tt(i,e.bind(n));else if(Pe(e))if(pe(e))e.forEach(l=>Qr(l,t,n,s));else{const l=_e(e.handler)?e.handler.bind(n):t[e.handler];_e(l)&&Tt(i,l,e)}}function ec(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:i,optionsCache:l,config:{optionMergeStrategies:r}}=e.appContext,u=l.get(t);let f;return u?f=u:!i.length&&!n&&!s?f=t:(f={},i.length&&i.forEach(h=>di(f,h,r,!0)),di(f,t,r)),Pe(t)&&l.set(t,f),f}function di(e,t,n,s=!1){const{mixins:i,extends:l}=t;l&&di(e,l,n,!0),i&&i.forEach(r=>di(e,r,n,!0));for(const r in t)if(!(s&&r==="expose")){const u=Kd[r]||n&&n[r];e[r]=u?u(e[r],t[r]):t[r]}return e}const Kd={data:Bl,props:Kl,emits:Kl,methods:ms,computed:ms,beforeCreate:lt,created:lt,beforeMount:lt,mounted:lt,beforeUpdate:lt,updated:lt,beforeDestroy:lt,beforeUnmount:lt,destroyed:lt,unmounted:lt,activated:lt,deactivated:lt,errorCaptured:lt,serverPrefetch:lt,components:ms,directives:ms,watch:qd,provide:Bl,inject:zd};function Bl(e,t){return t?e?function(){return tt(_e(e)?e.call(this,this):e,_e(t)?t.call(this,this):t)}:t:e}function zd(e,t){return ms(To(e),To(t))}function To(e){if(pe(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function lt(e,t){return e?[...new Set([].concat(e,t))]:t}function ms(e,t){return e?tt(Object.create(null),e,t):t}function Kl(e,t){return e?pe(e)&&pe(t)?[...new Set([...e,...t])]:tt(Object.create(null),Vl(e),Vl(t??{})):t}function qd(e,t){if(!e)return t;if(!t)return e;const n=tt(Object.create(null),e);for(const s in t)n[s]=lt(e[s],t[s]);return n}function tc(){return{app:null,config:{isNativeTag:hr,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Yd=0;function Gd(e,t){return function(s,i=null){_e(s)||(s=tt({},s)),i!=null&&!Pe(i)&&(i=null);const l=tc(),r=new WeakSet,u=[];let f=!1;const h=l.app={_uid:Yd++,_component:s,_props:i,_container:null,_context:l,_instance:null,version:Tf,get config(){return l.config},set config(p){},use(p,...b){return r.has(p)||(p&&_e(p.install)?(r.add(p),p.install(h,...b)):_e(p)&&(r.add(p),p(h,...b))),h},mixin(p){return l.mixins.includes(p)||l.mixins.push(p),h},component(p,b){return b?(l.components[p]=b,h):l.components[p]},directive(p,b){return b?(l.directives[p]=b,h):l.directives[p]},mount(p,b,v){if(!f){const y=h._ceVNode||se(s,i);return y.appContext=l,v===!0?v="svg":v===!1&&(v=void 0),e(y,p,v),f=!0,h._container=p,p.__vue_app__=h,ji(y.component)}},onUnmount(p){u.push(p)},unmount(){f&&(Nt(u,h._instance,16),e(null,h._container),delete h._container.__vue_app__)},provide(p,b){return l.provides[p]=b,h},runWithContext(p){const b=es;es=h;try{return p()}finally{es=b}}};return h}}let es=null;const Jd=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ct(t)}Modifiers`]||e[`${En(t)}Modifiers`];function Xd(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||Re;let i=n;const l=t.startsWith("update:"),r=l&&Jd(s,t.slice(7));r&&(r.trim&&(i=n.map(p=>We(p)?p.trim():p)),r.number&&(i=i.map(Ii)));let u,f=s[u=Gi(t)]||s[u=Gi(ct(t))];!f&&l&&(f=s[u=Gi(En(t))]),f&&Nt(f,e,6,i);const h=s[u+"Once"];if(h){if(!e.emitted)e.emitted={};else if(e.emitted[u])return;e.emitted[u]=!0,Nt(h,e,6,i)}}const Zd=new WeakMap;function nc(e,t,n=!1){const s=n?Zd:t.emitsCache,i=s.get(e);if(i!==void 0)return i;const l=e.emits;let r={},u=!1;if(!_e(e)){const f=h=>{const p=nc(h,t,!0);p&&(u=!0,tt(r,p))};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}return!l&&!u?(Pe(e)&&s.set(e,null),null):(pe(l)?l.forEach(f=>r[f]=null):tt(r,l),Pe(e)&&s.set(e,r),r)}function Ui(e,t){return!e||!Ei(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),Te(e,t[0].toLowerCase()+t.slice(1))||Te(e,En(t))||Te(e,t))}function zl(e){const{type:t,vnode:n,proxy:s,withProxy:i,propsOptions:[l],slots:r,attrs:u,emit:f,render:h,renderCache:p,props:b,data:v,setupState:y,ctx:I,inheritAttrs:T}=e,k=ci(e);let A,S;try{if(n.shapeFlag&4){const C=i||s,K=C;A=Wt(h.call(K,C,p,b,y,v,I)),S=u}else{const C=t;A=Wt(C.length>1?C(b,{attrs:u,slots:r,emit:f}):C(b,null)),S=t.props?u:Qd(u)}}catch(C){Vn.length=0,Ri(C,e,1),A=se(dn)}let U=A;if(S&&T!==!1){const C=Object.keys(S),{shapeFlag:K}=U;C.length&&K&7&&(l&&C.some(Ai)&&(S=ef(S,l)),U=ss(U,S,!1,!0))}if(n.dirs&&(U=ss(U,null,!1,!0),U.dirs=U.dirs?U.dirs.concat(n.dirs):n.dirs),n.transition){const C=Fi(U.type)&&qr(U)||U;rl(C,n.transition)}return A=U,ci(k),A}const Qd=e=>{let t;for(const n in e)(n==="class"||n==="style"||Ei(n))&&((t||(t={}))[n]=e[n]);return t},ef=(e,t)=>{const n={};for(const s in e)(!Ai(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function tf(e,t,n){const{props:s,children:i,component:l}=e,{props:r,children:u,patchFlag:f}=t,h=l.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&f>=0){if(f&1024)return!0;if(f&16)return s?ql(s,r,h):!!r;if(f&8){const p=t.dynamicProps;for(let b=0;b<p.length;b++){const v=p[b];if(sc(r,s,v)&&!Ui(h,v))return!0}}}else return(i||u)&&(!u||!u.$stable)?!0:s===r?!1:s?r?ql(s,r,h):!0:!!r;return!1}function ql(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let i=0;i<s.length;i++){const l=s[i];if(sc(t,e,l)&&!Ui(n,l))return!0}return!1}function sc(e,t,n){const s=e[n],i=t[n];return n==="style"&&Pe(s)&&Pe(i)?!Rt(s,i):s!==i}function nf({vnode:e,parent:t,suspense:n},s){for(;t;){const i=t.subTree;if(i.suspense&&i.suspense.activeBranch===e&&(i.suspense.vnode.el=i.el=s,e=i),i===e)(e=t.vnode).el=s,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=s)}const ic={},oc=()=>Object.create(ic),lc=e=>Object.getPrototypeOf(e)===ic;function sf(e,t,n,s=!1){const i={},l=oc();e.propsDefaults=Object.create(null),ac(e,t,i,l);for(const r in e.propsOptions[0])r in i||(i[r]=void 0);n?e.props=s?i:pd(i):e.type.props?e.props=i:e.props=l,e.attrs=l}function of(e,t,n,s){const{props:i,attrs:l,vnode:{patchFlag:r}}=e,u=xe(i),[f]=e.propsOptions;let h=!1;if((s||r>0)&&!(r&16)){if(r&8){const p=e.vnode.dynamicProps;for(let b=0;b<p.length;b++){let v=p[b];if(Ui(e.emitsOptions,v))continue;const y=t[v];if(f)if(Te(l,v))y!==l[v]&&(l[v]=y,h=!0);else{const I=ct(v);i[I]=Eo(f,u,I,y,e,!1)}else y!==l[v]&&(l[v]=y,h=!0)}}}else{ac(e,t,i,l)&&(h=!0);let p;for(const b in u)(!t||!Te(t,b)&&((p=En(b))===b||!Te(t,p)))&&(f?n&&(n[b]!==void 0||n[p]!==void 0)&&(i[b]=Eo(f,u,b,void 0,e,!0)):delete i[b]);if(l!==u)for(const b in l)(!t||!Te(t,b))&&(delete l[b],h=!0)}h&&en(e.attrs,"set","")}function ac(e,t,n,s){const[i,l]=e.propsOptions;let r=!1,u;if(t)for(let f in t){if(ys(f))continue;const h=t[f];let p;i&&Te(i,p=ct(f))?!l||!l.includes(p)?n[p]=h:(u||(u={}))[p]=h:Ui(e.emitsOptions,f)||(!(f in s)||h!==s[f])&&(s[f]=h,r=!0)}if(l){const f=xe(n),h=u||Re;for(let p=0;p<l.length;p++){const b=l[p];n[b]=Eo(i,f,b,h[b],e,!Te(h,b))}}return r}function Eo(e,t,n,s,i,l){const r=e[n];if(r!=null){const u=Te(r,"default");if(u&&s===void 0){const f=r.default;if(r.type!==Function&&!r.skipFactory&&_e(f)){const{propsDefaults:h}=i;if(n in h)s=h[n];else{const p=Ks(i);s=h[n]=f.call(null,t),p()}}else s=f;i.ce&&i.ce._setProp(n,s)}r[0]&&(l&&!u?s=!1:r[1]&&(s===""||s===En(n))&&(s=!0))}return s}const lf=new WeakMap;function rc(e,t,n=!1){const s=n?lf:t.propsCache,i=s.get(e);if(i)return i;const l=e.props,r={},u=[];let f=!1;if(!_e(e)){const p=b=>{f=!0;const[v,y]=rc(b,t,!0);tt(r,v),y&&u.push(...y)};!n&&t.mixins.length&&t.mixins.forEach(p),e.extends&&p(e.extends),e.mixins&&e.mixins.forEach(p)}if(!l&&!f)return Pe(e)&&s.set(e,Un),Un;if(pe(l))for(let p=0;p<l.length;p++){const b=ct(l[p]);Yl(b)&&(r[b]=Re)}else if(l)for(const p in l){const b=ct(p);if(Yl(b)){const v=l[p],y=r[b]=pe(v)||_e(v)?{type:v}:tt({},v),I=y.type;let T=!1,k=!0;if(pe(I))for(let A=0;A<I.length;++A){const S=I[A],U=_e(S)&&S.name;if(U==="Boolean"){T=!0;break}else U==="String"&&(k=!1)}else T=_e(I)&&I.name==="Boolean";y[0]=T,y[1]=k,(T||Te(y,"default"))&&u.push(b)}}const h=[r,u];return Pe(e)&&s.set(e,h),h}function Yl(e){return e[0]!=="$"&&!ys(e)}const dl=e=>e==="_"||e==="_ctx"||e==="$stable",fl=e=>pe(e)?e.map(Wt):[Wt(e)],af=(e,t,n)=>{if(t._n)return t;const s=oe((...i)=>fl(t(...i)),n);return s._c=!1,s},cc=(e,t,n)=>{const s=e._ctx;for(const i in e){if(dl(i))continue;const l=e[i];if(_e(l))t[i]=af(i,l,s);else if(l!=null){const r=fl(l);t[i]=()=>r}}},uc=(e,t)=>{const n=fl(t);e.slots.default=()=>n},dc=(e,t,n)=>{for(const s in t)(n||!dl(s))&&(e[s]=t[s])},rf=(e,t,n)=>{const s=e.slots=oc();if(e.vnode.shapeFlag&32){const i=t._;i?(dc(s,t,n),n&&gr(s,"_",i,!0)):cc(t,s)}else t&&uc(e,t)},cf=(e,t,n)=>{const{vnode:s,slots:i}=e;let l=!0,r=Re;if(s.shapeFlag&32){const u=t._;u?n&&u===1?l=!1:dc(i,t,n):(l=!t.$stable,cc(t,i)),r=t}else t&&(uc(e,t),r={default:1});if(l)for(const u in i)!dl(u)&&r[u]==null&&delete i[u]},dt=hf;function uf(e){return df(e)}function df(e,t){const n=Li();n.__VUE__=!0;const{insert:s,remove:i,patchProp:l,createElement:r,createText:u,createComment:f,setText:h,setElementText:p,parentNode:b,nextSibling:v,setScopeId:y=Kt,insertStaticContent:I}=e,T=(w,x,N,z=null,j=null,V=null,X=void 0,J=null,G=!!x.dynamicChildren)=>{if(w===x)return;w&&!fs(w,x)&&(z=ie(w),Z(w,j,V,!0),w=null),x.patchFlag===-2&&(G=!1,x.dynamicChildren=null),x.dynamicChildren&&w&&w.dynamicChildren&&w.dynamicChildren.hasOnce&&(x.dynamicChildren===Un&&(x.dynamicChildren=[]),x.dynamicChildren.hasOnce=!0);const{type:H,ref:de,shapeFlag:ee}=x;switch(H){case Bs:k(w,x,N,z);break;case dn:A(w,x,N,z);break;case so:w==null&&S(x,N,z,X);break;case q:Y(w,x,N,z,j,V,X,J,G);break;default:ee&1?K(w,x,N,z,j,V,X,J,G):ee&6?te(w,x,N,z,j,V,X,J,G):(ee&64||ee&128)&&H.process(w,x,N,z,j,V,X,J,G,Mn)}de!=null&&j?xs(de,w&&w.ref,V,x||w,!x):de==null&&w&&w.ref!=null&&xs(w.ref,null,V,w,!0)},k=(w,x,N,z)=>{if(w==null)s(x.el=u(x.children),N,z);else{const j=x.el=w.el;x.children!==w.children&&h(j,x.children)}},A=(w,x,N,z)=>{w==null?s(x.el=f(x.children||""),N,z):x.el=w.el},S=(w,x,N,z)=>{[w.el,w.anchor]=I(w.children,x,N,z,w.el,w.anchor)},U=({el:w,anchor:x},N,z)=>{let j;for(;w&&w!==x;)j=v(w),s(w,N,z),w=j;s(x,N,z)},C=({el:w,anchor:x})=>{let N;for(;w&&w!==x;)N=v(w),i(w),w=N;i(x)},K=(w,x,N,z,j,V,X,J,G)=>{if(x.type==="svg"?X="svg":x.type==="math"&&(X="mathml"),w==null)O(x,N,z,j,V,X,J,G);else{const H=w.el&&w.el._isVueCE?w.el:null;try{H&&H._beginPatch(),L(w,x,j,V,X,J,G)}finally{H&&H._endPatch()}}},O=(w,x,N,z,j,V,X,J)=>{let G,H;const{props:de,shapeFlag:ee,transition:Q,dirs:P}=w;if(G=w.el=r(w.type,V,de&&de.is,de),ee&8?p(G,w.children):ee&16&&R(w.children,G,null,z,j,no(w,V),X,J),P&&Rn(w,null,z,"created"),E(G,w,w.scopeId,X,z),de){for(const ce in de)ce!=="value"&&!ys(ce)&&l(G,ce,null,de[ce],V,z);"value"in de&&l(G,"value",null,de.value,V),(H=de.onVnodeBeforeMount)&&Ut(H,z,w)}P&&Rn(w,null,z,"beforeMount");const F=ff(j,Q);F&&Q.beforeEnter(G),s(G,x,N),((H=de&&de.onVnodeMounted)||F||P)&&dt(()=>{H&&Ut(H,z,w),F&&Q.enter(G),P&&Rn(w,null,z,"mounted")},j)},E=(w,x,N,z,j)=>{if(N&&y(w,N),z)for(let V=0;V<z.length;V++)y(w,z[V]);if(j){let V=j.subTree;if(x===V||mc(V.type)&&(V.ssContent===x||V.ssFallback===x)){const X=j.vnode;E(w,X,X.scopeId,X.slotScopeIds,j.parent)}}},R=(w,x,N,z,j,V,X,J,G=0)=>{for(let H=G;H<w.length;H++){const de=w[H]=J?Zt(w[H]):Wt(w[H]);T(null,de,x,N,z,j,V,X,J)}},L=(w,x,N,z,j,V,X)=>{const J=x.el=w.el;let{patchFlag:G,dynamicChildren:H,dirs:de}=x;G|=w.patchFlag&16;const ee=w.props||Re,Q=x.props||Re;let P;if(N&&Nn(N,!1),(P=Q.onVnodeBeforeUpdate)&&Ut(P,N,x,w),de&&Rn(x,w,N,"beforeUpdate"),N&&Nn(N,!0),H&&(!w.dynamicChildren||w.dynamicChildren.length!==H.length)&&(G=0,X=!1,H=null),(ee.innerHTML&&Q.innerHTML==null||ee.textContent&&Q.textContent==null)&&p(J,""),H?D(w.dynamicChildren,H,J,N,z,no(x,j),V):X||we(w,x,J,null,N,z,no(x,j),V,!1),G>0){if(G&16)M(J,ee,Q,N,j);else if(G&2&&ee.class!==Q.class&&l(J,"class",null,Q.class,j),G&4&&l(J,"style",ee.style,Q.style,j),G&8){const F=x.dynamicProps;for(let ce=0;ce<F.length;ce++){const fe=F[ce],Oe=ee[fe],De=Q[fe];(De!==Oe||fe==="value")&&l(J,fe,Oe,De,j,N)}}G&1&&w.children!==x.children&&p(J,x.children)}else!X&&H==null&&M(J,ee,Q,N,j);((P=Q.onVnodeUpdated)||de)&&dt(()=>{P&&Ut(P,N,x,w),de&&Rn(x,w,N,"updated")},z)},D=(w,x,N,z,j,V,X)=>{for(let J=0;J<x.length;J++){const G=w[J],H=x[J],de=G.el&&(G.type===q||!fs(G,H)||G.shapeFlag&198)?b(G.el):N;T(G,H,de,null,z,j,V,X,!0)}},M=(w,x,N,z,j)=>{if(x!==N){if(x!==Re)for(const V in x)!ys(V)&&!(V in N)&&l(w,V,x[V],null,j,z);for(const V in N){if(ys(V))continue;const X=N[V],J=x[V];X!==J&&V!=="value"&&l(w,V,J,X,j,z)}"value"in N&&l(w,"value",x.value,N.value,j)}},Y=(w,x,N,z,j,V,X,J,G)=>{const H=x.el=w?w.el:u(""),de=x.anchor=w?w.anchor:u("");let{patchFlag:ee,dynamicChildren:Q,slotScopeIds:P}=x;P&&(J=J?J.concat(P):P),w==null?(s(H,N,z),s(de,N,z),R(x.children||[],N,de,j,V,X,J,G)):ee>0&&ee&64&&Q&&w.dynamicChildren&&w.dynamicChildren.length===Q.length?(D(w.dynamicChildren,Q,N,j,V,X,J),(x.key!=null||j&&x===j.subTree)&&fc(w,x,!0)):we(w,x,N,de,j,V,X,J,G)},te=(w,x,N,z,j,V,X,J,G)=>{x.slotScopeIds=J,w==null?x.shapeFlag&512?j.ctx.activate(x,N,z,X,G):ye(x,N,z,j,V,X,G):re(w,x,G)},ye=(w,x,N,z,j,V,X)=>{const J=w.component=yf(w,z,j);if(cl(w)&&(J.ctx.renderer=Mn),wf(J,!1,X),J.asyncDep){if(j&&j.registerDep(J,be,X),!w.el){const G=J.subTree=se(dn);A(null,G,x,N),w.placeholder=G.el}}else be(J,w,x,N,j,V,X)},re=(w,x,N)=>{const z=x.component=w.component;if(tf(w,x,N))if(z.asyncDep&&!z.asyncResolved){x.el=w.el,ge(z,x,N);return}else z.next=x,z.update();else x.el=w.el,z.vnode=x},be=(w,x,N,z,j,V,X)=>{const J=()=>{if(w.isMounted){let{next:ee,bu:Q,u:P,parent:F,vnode:ce}=w;{const kt=pc(w);if(kt){ee&&(ee.el=ce.el,ge(w,ee,X)),kt.asyncDep.then(()=>{dt(()=>{w.isUnmounted||H()},j)});return}}let fe=ee,Oe;Nn(w,!1),ee?(ee.el=ce.el,ge(w,ee,X)):ee=ce,Q&&si(Q),(Oe=ee.props&&ee.props.onVnodeBeforeUpdate)&&Ut(Oe,F,ee,ce),Nn(w,!0);const De=zl(w),Ve=w.subTree;w.subTree=De,T(Ve,De,b(Ve.el),ie(Ve),w,j,V),ee.el=De.el,fe===null&&nf(w,De.el),P&&dt(P,j),(Oe=ee.props&&ee.props.onVnodeUpdated)&&dt(()=>Ut(Oe,F,ee,ce),j)}else{let ee;const{el:Q,props:P}=x,{bm:F,m:ce,parent:fe,root:Oe,type:De}=w,Ve=Ss(x);Nn(w,!1),F&&si(F),!Ve&&(ee=P&&P.onVnodeBeforeMount)&&Ut(ee,fe,x),Nn(w,!0);{Oe.ce&&Oe.ce._hasShadowRoot()&&Oe.ce._injectChildStyle(De,w.parent?w.parent.type:void 0);const kt=w.subTree=zl(w);T(null,kt,N,z,w,j,V),x.el=kt.el}if(ce&&dt(ce,j),!Ve&&(ee=P&&P.onVnodeMounted)){const kt=x;dt(()=>Ut(ee,fe,kt),j)}(x.shapeFlag&256||fe&&Ss(fe.vnode)&&fe.vnode.shapeFlag&256)&&w.a&&dt(w.a,j),w.isMounted=!0,x=N=z=null}};w.scope.on();const G=w.effect=new xr(J);w.scope.off();const H=w.update=G.run.bind(G),de=w.job=G.runIfDirty.bind(G);de.i=w,de.id=w.uid,G.scheduler=()=>al(de),Nn(w,!0),H()},ge=(w,x,N)=>{x.component=w;const z=w.vnode.props;w.vnode=x,w.next=null,of(w,x.props,z,N),cf(w,x.children,N),cn(),Dl(w),un()},we=(w,x,N,z,j,V,X,J,G=!1)=>{const H=w&&w.children,de=w?w.shapeFlag:0,ee=x.children,{patchFlag:Q,shapeFlag:P}=x;if(Q>0){if(Q&128){qe(H,ee,N,z,j,V,X,J,G);return}else if(Q&256){Ge(H,ee,N,z,j,V,X,J,G);return}}P&8?(de&16&&ne(H,j,V),ee!==H&&p(N,ee)):de&16?P&16?qe(H,ee,N,z,j,V,X,J,G):ne(H,j,V,!0):(de&8&&p(N,""),P&16&&R(ee,N,z,j,V,X,J,G))},Ge=(w,x,N,z,j,V,X,J,G)=>{w=w||Un,x=x||Un;const H=w.length,de=x.length,ee=Math.min(H,de);let Q;for(Q=0;Q<ee;Q++){const P=x[Q]=G?Zt(x[Q]):Wt(x[Q]);T(w[Q],P,N,null,j,V,X,J,G)}H>de?ne(w,j,V,!0,!1,ee):R(x,N,z,j,V,X,J,G,ee)},qe=(w,x,N,z,j,V,X,J,G)=>{let H=0;const de=x.length;let ee=w.length-1,Q=de-1;for(;H<=ee&&H<=Q;){const P=w[H],F=x[H]=G?Zt(x[H]):Wt(x[H]);if(fs(P,F))T(P,F,N,null,j,V,X,J,G);else break;H++}for(;H<=ee&&H<=Q;){const P=w[ee],F=x[Q]=G?Zt(x[Q]):Wt(x[Q]);if(fs(P,F))T(P,F,N,null,j,V,X,J,G);else break;ee--,Q--}if(H>ee){if(H<=Q){const P=Q+1,F=P<de?x[P].el:z;for(;H<=Q;)T(null,x[H]=G?Zt(x[H]):Wt(x[H]),N,F,j,V,X,J,G),H++}}else if(H>Q)for(;H<=ee;)Z(w[H],j,V,!0),H++;else{const P=H,F=H,ce=new Map;for(H=F;H<=Q;H++){const ht=x[H]=G?Zt(x[H]):Wt(x[H]);ht.key!=null&&ce.set(ht.key,H)}let fe,Oe=0;const De=Q-F+1;let Ve=!1,kt=0;const Yn=new Array(De);for(H=0;H<De;H++)Yn[H]=0;for(H=P;H<=ee;H++){const ht=w[H];if(Oe>=De){Z(ht,j,V,!0);continue}let Dt;if(ht.key!=null)Dt=ce.get(ht.key);else for(fe=F;fe<=Q;fe++)if(Yn[fe-F]===0&&fs(ht,x[fe])){Dt=fe;break}Dt===void 0?Z(ht,j,V,!0):(Yn[Dt-F]=H+1,Dt>=kt?kt=Dt:Ve=!0,T(ht,x[Dt],N,null,j,V,X,J,G),Oe++)}const Al=Ve?pf(Yn):Un;for(fe=Al.length-1,H=De-1;H>=0;H--){const ht=F+H,Dt=x[ht],Pl=x[ht+1],Ol=ht+1<de?Pl.el||hc(Pl):z;Yn[H]===0?T(null,Dt,N,Ol,j,V,X,J,G):Ve&&(fe<0||H!==Al[fe]?le(Dt,N,Ol,2):fe--)}}},le=(w,x,N,z,j=null)=>{const{el:V,type:X,transition:J,children:G,shapeFlag:H}=w;if(H&6){le(w.component.subTree,x,N,z);return}if(H&128){w.suspense.move(x,N,z);return}if(H&64){X.move(w,x,N,Mn);return}if(X===q){s(V,x,N);for(let ee=0;ee<G.length;ee++)le(G[ee],x,N,z);s(w.anchor,x,N);return}if(X===so){U(w,x,N);return}if(z!==2&&H&1&&J)if(z===0)J.persisted&&!V[eo]?s(V,x,N):(J.beforeEnter(V),s(V,x,N),dt(()=>J.enter(V),j));else{const{leave:ee,delayLeave:Q,afterLeave:P}=J,F=()=>{w.ctx.isUnmounted?i(V):s(V,x,N)},ce=()=>{const fe=V._isLeaving||!!V[eo];V._isLeaving&&V[eo](!0),J.persisted&&!fe?F():ee(V,()=>{F(),P&&P()})};Q?Q(V,F,ce):ce()}else s(V,x,N)},Z=(w,x,N,z=!1,j=!1)=>{const{type:V,props:X,ref:J,children:G,dynamicChildren:H,shapeFlag:de,patchFlag:ee,dirs:Q,cacheIndex:P,memo:F}=w;if((ee===-2||H&&H.hasOnce)&&(j=!1),J!=null&&(cn(),xs(J,null,N,w,!0),un()),P!=null&&(!w.ctx||w.ctx===x)&&(x.renderCache[P]=void 0),de&256){x.ctx.deactivate(w);return}const ce=de&1&&Q,fe=!Ss(w);let Oe;if(fe&&(Oe=X&&X.onVnodeBeforeUnmount)&&Ut(Oe,x,w),de&6)B(w.component,N,z);else{if(de&128){w.suspense.unmount(N,z);return}ce&&Rn(w,null,x,"beforeUnmount"),de&64?w.type.remove(w,x,N,Mn,z):H&&!H.hasOnce&&(V!==q||ee>0&&ee&64)?ne(H,x,N,!1,!0):(V===q&&ee&384||!j&&de&16)&&ne(G,x,N),z&&ue(w)}const De=F!=null&&P==null;(fe&&(Oe=X&&X.onVnodeUnmounted)||ce||De)&&dt(()=>{Oe&&Ut(Oe,x,w),ce&&Rn(w,null,x,"unmounted"),De&&(w.el=null)},N)},ue=w=>{const{type:x,el:N,anchor:z,transition:j}=w;if(x===q){ke(N,z);return}if(x===so){C(w),j&&!j.persisted&&j.afterLeave&&j.afterLeave();return}const V=()=>{i(N),j&&!j.persisted&&j.afterLeave&&j.afterLeave()};if(w.shapeFlag&1&&j&&!j.persisted){const{leave:X,delayLeave:J}=j,G=()=>X(N,V);J?J(w.el,V,G):G()}else V()},ke=(w,x)=>{let N;for(;w!==x;)N=v(w),i(w),w=N;i(x)},B=(w,x,N)=>{const{bum:z,scope:j,job:V,subTree:X,um:J,m:G,a:H}=w;Gl(G),Gl(H),z&&si(z),j.stop(),V?(V.flags|=8,Z(X,w,x,N)):w.vnode.el&&X&&(X.transition=w.vnode.transition,Z(X,w,x,N)),J&&dt(J,x),dt(()=>{w.isUnmounted=!0},x)},ne=(w,x,N,z=!1,j=!1,V=0)=>{for(let X=V;X<w.length;X++)Z(w[X],x,N,z,j)},ie=w=>{if(w.shapeFlag&6)return ie(w.component.subTree);if(w.shapeFlag&128)return w.suspense.next();const x=v(w.anchor||w.el),N=x&&x[Ad];return N?v(N):x};let wt=!1;const Ln=(w,x,N)=>{let z;w==null?x._vnode&&(Z(x._vnode,null,null,!0),z=x._vnode.component):T(x._vnode||null,w,x,null,null,null,N),x._vnode=w,wt||(wt=!0,Dl(z),Vr(),wt=!1)},Mn={p:T,um:Z,m:le,r:ue,mt:ye,mc:R,pc:we,pbc:D,n:ie,o:e};return{render:Ln,hydrate:void 0,createApp:Gd(Ln)}}function no({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Nn({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ff(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function fc(e,t,n=!1){const s=e.children,i=t.children;if(pe(s)&&pe(i))for(let l=0;l<s.length;l++){const r=s[l];let u=i[l];u.shapeFlag&1&&!u.dynamicChildren&&((u.patchFlag<=0||u.patchFlag===32)&&(u=i[l]=Zt(i[l]),u.el=r.el),!n&&u.patchFlag!==-2&&fc(r,u)),u.type===Bs&&(u.patchFlag===-1&&(u=i[l]=Zt(u)),u.el=r.el),u.type===dn&&!u.el&&(u.el=r.el)}}function pf(e){const t=e.slice(),n=[0];let s,i,l,r,u;const f=e.length;for(s=0;s<f;s++){const h=e[s];if(h!==0){if(i=n[n.length-1],e[i]<h){t[s]=i,n.push(s);continue}for(l=0,r=n.length-1;l<r;)u=l+r>>1,e[n[u]]<h?l=u+1:r=u;h<e[n[l]]&&(l>0&&(t[s]=n[l-1]),n[l]=s)}}for(l=n.length,r=n[l-1];l-- >0;)n[l]=r,r=t[r];return n}function pc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:pc(t)}function Gl(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function hc(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?hc(t.subTree):null}const mc=e=>e.__isSuspense;function hf(e,t){t&&t.pendingBranch?pe(e)?t.effects.push(...e):t.effects.push(e):xd(e)}const q=Symbol.for("v-fgt"),Bs=Symbol.for("v-txt"),dn=Symbol.for("v-cmt"),so=Symbol.for("v-stc"),Vn=[];let vt=null;function g(e=!1){Vn.push(vt=e?null:[])}function bc(){Vn.pop(),vt=Vn[Vn.length-1]||null}let Ps=1;function fi(e,t=!1){Ps+=e,e<0&&vt&&t&&(vt.hasOnce=!0)}function vc(e){return e.dynamicChildren=Ps>0?vt||Un:null,bc(),Ps>0&&vt&&vt.push(e),e}function _(e,t,n,s,i,l){return vc(o(e,t,n,s,i,l,!0))}function it(e,t,n,s,i){return vc(se(e,t,n,s,i,!0))}function pi(e){return e?e.__v_isVNode===!0:!1}function fs(e,t){return e.type===t.type&&e.key===t.key}const gc=({key:e})=>e??null,ii=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?We(e)||et(e)||_e(e)?{i:bt,r:e,k:t,f:!!n}:e:null);function o(e,t=null,n=null,s=0,i=null,l=e===q?0:1,r=!1,u=!1){const f={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&gc(t),ref:t&&ii(t),scopeId:Br,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:l,patchFlag:s,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:bt};return u?(hi(f,n),l&128&&e.normalize(f)):n&&(f.shapeFlag|=We(n)?8:16),Ps>0&&!r&&vt&&(f.patchFlag>0||l&6)&&f.patchFlag!==32&&vt.push(f),f}const se=mf;function mf(e,t=null,n=null,s=0,i=null,l=!1){if((!e||e===Xr)&&(e=dn),pi(e)){const u=ss(e,t,!0);return n&&hi(u,n),Ps>0&&!l&&vt&&(u.shapeFlag&6?vt[vt.indexOf(e)]=u:vt.push(u)),u.patchFlag=-2,u}if(Cf(e)&&(e=e.__vccOpts),t){t=bf(t);let{class:u,style:f}=t;u&&!We(u)&&(t.class=he(u)),Pe(f)&&(ll(f)&&!pe(f)&&(f=tt({},f)),t.style=Ue(f))}const r=We(e)?1:mc(e)?128:Fi(e)?64:Pe(e)?4:_e(e)?2:0;return o(e,t,n,s,i,r,l,!0)}function bf(e){return e?ll(e)||lc(e)?tt({},e):e:null}function ss(e,t,n=!1,s=!1){const{props:i,ref:l,patchFlag:r,children:u,transition:f}=e,h=t?vf(i||{},t):i,p={__v_isVNode:!0,__v_skip:!0,type:e.type,props:h,key:h&&gc(h),ref:t&&t.ref?n&&l?pe(l)?l.concat(ii(t)):[l,ii(t)]:ii(t):l,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:u,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==q?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:f,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ss(e.ssContent),ssFallback:e.ssFallback&&ss(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return f&&s&&rl(p,f.clone(p)),p}function Me(e=" ",t=0){return se(Bs,null,e,t)}function W(e="",t=!1){return t?(g(),it(dn,null,e)):se(dn,null,e)}function Wt(e){return e==null||typeof e=="boolean"?se(dn):pe(e)?se(q,null,e.slice()):pi(e)?Zt(e):se(Bs,null,String(e))}function Zt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ss(e)}function hi(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(pe(t))n=16;else if(typeof t=="object")if(s&65){const i=t.default;i&&(i._c&&(i._d=!1),hi(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!lc(t)?t._ctx=bt:i===3&&bt&&(bt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(_e(t)){if(s&65){hi(e,{default:t});return}t={default:t,_ctx:bt},n=32}else t=String(t),s&64?(n=16,t=[Me(t)]):n=8;e.children=t,e.shapeFlag|=n}function vf(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const i in s)if(i==="class")t.class!==s.class&&(t.class=he([t.class,s.class]));else if(i==="style")t.style=Ue([t.style,s.style]);else if(Ei(i)){const l=t[i],r=s[i];r&&l!==r&&!(pe(l)&&l.includes(r))?t[i]=l?[].concat(l,r):r:r==null&&l==null&&!Ai(i)&&(t[i]=r)}else i!==""&&(t[i]=s[i])}return t}function Ut(e,t,n,s=null){Nt(e,t,7,[n,s])}const gf=tc();let _f=0;function yf(e,t,n){const s=e.type,i=(t?t.appContext:e.appContext)||gf,l={uid:_f++,vnode:e,type:s,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new kr(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:rc(s,i),emitsOptions:nc(s,i),emit:null,emitted:null,propsDefaults:Re,inheritAttrs:s.inheritAttrs,ctx:Re,data:Re,props:Re,attrs:Re,slots:Re,refs:Re,setupState:Re,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return l.ctx={_:l},l.root=t?t.root:l,l.emit=Xd.bind(null,l),e.ce&&e.ce(l),l}let st=null;const _c=()=>st||bt;let mi,Os;{const e=Li(),t=(n,s)=>{let i;return(i=e[n])||(i=e[n]=[]),i.push(s),l=>{i.length>1?i.forEach(r=>r(l)):i[0](l)}};mi=t("__VUE_INSTANCE_SETTERS__",n=>st=n),Os=t("__VUE_SSR_SETTERS__",n=>Is=n)}const Ks=e=>{const t=st;return mi(e),e.scope.on(),()=>{e.scope.off(),mi(t)}},Jl=()=>{st&&st.scope.off(),mi(null)};function yc(e){return e.vnode.shapeFlag&4}let Is=!1;function wf(e,t=!1,n=!1){t&&Os(t);const{props:s,children:i}=e.vnode,l=yc(e);sf(e,s,l,t),rf(e,i,n||t);const r=l?kf(e,t):void 0;return t&&Os(!1),r}function kf(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Vd);const{setup:s}=n;if(s){cn();const i=e.setupContext=s.length>1?xf(e):null,l=Ks(e),r=Vs(s,e,0,[e.props,i]),u=mr(r);if(un(),l(),(u||e.sp)&&!Ss(e)&&Yr(e),u){if(r.then(Jl,Jl),t)return r.then(f=>{Os(!0);try{Xl(e,f,t)}finally{Os(!1)}}).catch(f=>{Ri(f,e,0)});e.asyncDep=r}else Xl(e,r)}else wc(e)}function Xl(e,t,n){_e(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Pe(t)&&(e.setupState=Ur(t)),wc(e)}function wc(e,t,n){const s=e.type;e.render||(e.render=s.render||Kt);{const i=Ks(e);cn();try{Wd(e)}finally{un(),i()}}}const $f={get(e,t){return nt(e,"get",""),e[t]}};function xf(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,$f),slots:e.slots,emit:e.emit,expose:t}}function ji(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ur(hd(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Cs)return Cs[n](e)},has(t,n){return n in t||n in Cs}})):e.proxy}function Sf(e,t=!0){return _e(e)?e.displayName||e.name:e.name||t&&e.__name}function Cf(e){return _e(e)&&"__vccOpts"in e}const $=(e,t)=>_d(e,t,Is);function bi(e,t,n){try{fi(-1);const s=arguments.length;return s===2?Pe(t)&&!pe(t)?pi(t)?se(e,null,[t]):se(e,t):se(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&pi(n)&&(n=[n]),se(e,t,n))}finally{fi(1)}}const Tf="3.5.43";let Ao;const Zl=typeof window<"u"&&window.trustedTypes;if(Zl)try{Ao=Zl.createPolicy("vue",{createHTML:e=>e})}catch{}const kc=Ao?e=>Ao.createHTML(e):e=>e,Ef="http://www.w3.org/2000/svg",Af="http://www.w3.org/1998/Math/MathML",Xt=typeof document<"u"?document:null,Ql=Xt&&Xt.createElement("template"),Pf={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const i=t==="svg"?Xt.createElementNS(Ef,e):t==="mathml"?Xt.createElementNS(Af,e):n?Xt.createElement(e,{is:n}):Xt.createElement(e);return e==="select"&&s&&s.multiple!=null&&i.setAttribute("multiple",s.multiple),i},createText:e=>Xt.createTextNode(e),createComment:e=>Xt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Xt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,i,l){const r=n?n.previousSibling:t.lastChild;if(i&&(i===l||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===l||!(i=i.nextSibling)););else{Ql.innerHTML=kc(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const u=Ql.content;if(s==="svg"||s==="mathml"){const f=u.firstChild;for(;f.firstChild;)u.appendChild(f.firstChild);u.removeChild(f)}t.insertBefore(u,n)}return[r?r.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Of=Symbol("_vtc");function If(e,t,n){const s=e[Of];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const ea=Symbol("_vod"),Lf=Symbol("_vsh"),Mf=Symbol(""),Rf=/(?:^|;)\s*display\s*:/;function Nf(e,t,n){const s=e.style,i=We(n);let l=!1;if(n&&!i){if(t)if(We(t))for(const r of t.split(";")){const u=r.slice(0,r.indexOf(":")).trim();n[u]==null&&bs(s,u,"")}else for(const r in t)n[r]==null&&bs(s,r,"");for(const r in n){r==="display"&&(l=!0);const u=n[r];u!=null?Df(e,r,!We(t)&&t?t[r]:void 0,u)||bs(s,r,u):bs(s,r,"")}}else if(i){if(t!==n){const r=s[Mf];r&&(n+=";"+r),s.cssText=n,l=Rf.test(n)}}else t&&e.removeAttribute("style");ea in e&&(e[ea]=l?s.display:"",e[Lf]&&(s.display="none"))}const Zs=/\s*!important$/;function bs(e,t,n){if(pe(n))n.forEach(s=>bs(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))Zs.test(n)?e.setProperty(t,n.replace(Zs,""),"important"):e.setProperty(t,n);else{const s=Ff(e,t);Zs.test(n)?e.setProperty(En(s),n.replace(Zs,""),"important"):e[s]=n}}const ta=["Webkit","Moz","ms"],io={};function Ff(e,t){const n=io[t];if(n)return n;let s=ct(t);if(s!=="filter"&&s in e)return io[t]=s;s=Oi(s);for(let i=0;i<ta.length;i++){const l=ta[i]+s;if(l in e)return io[t]=l}return t}function Df(e,t,n,s){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&We(s)&&n===s}const na="http://www.w3.org/1999/xlink";function sa(e,t,n,s,i,l=Ku(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(na,t.slice(6,t.length)):e.setAttributeNS(na,t,n):n==null||l&&!_r(n)?e.removeAttribute(t):e.setAttribute(t,l?"":qt(n)?String(n):n)}function ia(e,t,n,s,i){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?kc(n):n);return}const l=e.tagName;if(t==="value"&&l!=="PROGRESS"&&!l.includes("-")){const u=l==="OPTION"?e.getAttribute("value")||"":e.value,f=n==null?e.type==="checkbox"?"on":"":String(n);(u!==f||!("_value"in e))&&(e.value=f),n==null&&e.removeAttribute(t),e._value=n;return}let r=!1;if(n===""||n==null){const u=typeof e[t];u==="boolean"?n=_r(n):n==null&&u==="string"?(n="",r=!0):u==="number"&&(n=0,r=!0)}try{e[t]=n}catch{}r&&e.removeAttribute(i||t)}function nn(e,t,n,s){e.addEventListener(t,n,s)}function Uf(e,t,n,s){e.removeEventListener(t,n,s)}const oa=Symbol("_vei");function jf(e,t,n,s,i=null){const l=e[oa]||(e[oa]={}),r=l[t];if(s&&r)r.value=s;else{const[u,f]=Wf(t);if(s){const h=l[t]=zf(s,i);nn(e,u,h,f)}else r&&(Uf(e,u,r,f),l[t]=void 0)}}const Hf=/(Once|Passive|Capture)$/,Vf=/^on:?(?:Once|Passive|Capture)$/;function Wf(e){let t,n;for(;(n=e.match(Hf))&&!Vf.test(e);)t||(t={}),e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):En(e.slice(2)),t]}let oo=0;const Bf=Promise.resolve(),Kf=()=>oo||(Bf.then(()=>oo=0),oo=Date.now());function zf(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const i=n.value;if(pe(i)){const l=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{l.call(s),s._stopped=!0};const r=i.slice(),u=[s];for(let f=0;f<r.length&&!s._stopped;f++){const h=r[f];h&&Nt(h,t,5,u)}}else Nt(i,t,5,[s])};return n.value=e,n.attached=Kf(),n}const la=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,qf=(e,t,n,s,i,l)=>{const r=i==="svg";t==="class"?If(e,s,r):t==="style"?Nf(e,n,s):Ei(t)?Ai(t)||jf(e,t,n,s,l):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Yf(e,t,s,r))?(ia(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&sa(e,t,s,r,l,t!=="value")):e._isVueCE&&(Gf(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!We(s)))?ia(e,ct(t),s,l,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),sa(e,t,s,r))};function Yf(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&la(t)&&_e(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const i=e.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return la(t)&&We(n)?!1:t in e}function Gf(e,t){const n=e._def.props;if(!n)return!1;const s=ct(t);return Array.isArray(n)?n.some(i=>ct(i)===s):Object.keys(n).some(i=>ct(i)===s)}const xn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return pe(t)?n=>si(t,n):t};function Jf(e){e.target.composing=!0}function aa(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const gt=Symbol("_assign"),Qs=Symbol("_initialValue");function lo(e,t,n){return t&&(e=e.trim()),n&&(e=Ii(e)),e}const Xe={created(e,{modifiers:{lazy:t,trim:n,number:s}},i){e.parentNode&&(e.type==="text"?e[Qs]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[Qs]=e.defaultValue.replace(/\r\n?/g,`
|
||
`))),e[gt]=xn(i);const l=s||i.props&&i.props.type==="number";nn(e,t?"change":"input",r=>{r.target.composing||e[gt](lo(e.value,n,l))}),(n||l)&&nn(e,"change",()=>{e.value=lo(e.value,n,l)}),t||(nn(e,"compositionstart",Jf),nn(e,"compositionend",aa),nn(e,"change",aa))},mounted(e,{value:t,modifiers:{trim:n,number:s}}){const i=t??"",l=e[Qs];delete e[Qs],l!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==l?e[gt](lo(e.value,n,s)):e.value=i},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:i,number:l}},r){if(e[gt]=xn(r),e.composing)return;const u=(l||e.type==="number")&&!/^0\d/.test(e.value)?Ii(e.value):e.value,f=t??"";if(u===f)return;const h=e.getRootNode();(h instanceof Document||h instanceof ShadowRoot)&&h.activeElement===e&&e.type!=="range"&&(s&&t===n||i&&e.value.trim()===f)||(e.value=f)}},Xf={deep:!0,created(e,t,n){e[gt]=xn(n),nn(e,"change",()=>{const s=e._modelValue,i=is(e),l=e.checked,r=e[gt];if(pe(s)){const u=Qo(s,i),f=u!==-1;if(l&&!f)r(s.concat(i));else if(!l&&f){const h=[...s];h.splice(u,1),r(h)}}else if(rn(s)){const u=new Set(s);l?u.add(i):u.delete(i),r(u)}else r($c(e,l))})},mounted:ra,beforeUpdate(e,t,n){e[gt]=xn(n),ra(e,t,n)}};function ra(e,{value:t,oldValue:n},s){e._modelValue=t;let i;if(pe(t))i=Qo(t,s.props.value)>-1;else if(rn(t))i=t.has(s.props.value);else{if(t===n)return;i=Rt(t,$c(e,!0))}e.checked!==i&&(e.checked=i)}const ca={created(e,{value:t},n){e.checked=Rt(t,n.props.value),e[gt]=xn(n),nn(e,"change",()=>{e[gt](is(e))})},beforeUpdate(e,{value:t,oldValue:n},s){e[gt]=xn(s),t!==n&&(e.checked=Rt(t,s.props.value))}},Wn={deep:!0,created(e,{value:t,modifiers:{number:n}},s){e._modelValue=t,nn(e,"change",()=>{const i=Array.prototype.filter.call(e.options,f=>f.selected).map(f=>n?Ii(is(f)):is(f)),l=e.multiple,r=l?rn(e._modelValue)?new Set(i):i:i[0],u=e._pendingValue=[l,l?pe(r)?i.slice():i:r];try{e[gt](r)}finally{Ni(()=>{e._pendingValue===u&&(e._pendingValue=void 0)})}}),e[gt]=xn(s)},mounted(e,{value:t}){ua(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[gt]=xn(n)},updated(e,{value:t}){const n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!Zf(t,n[1],n[0]))&&ua(e,t)}};function Zf(e,t,n){if(!n||pe(e))return Rt(e,t);if(rn(e)){if(e.size!==t.length)return!1;for(const s of t)if(!e.has(s))return!1;return!0}return!1}function ua(e,t){const n=e.multiple,s=pe(t);if(!(n&&!s&&!rn(t))){for(let i=0,l=e.options.length;i<l;i++){const r=e.options[i],u=is(r);if(n)if(s){const f=typeof u;f==="string"||f==="number"?r.selected=t.some(h=>String(h)===String(u)):r.selected=Qo(t,u)>-1}else r.selected=t.has(u);else if(Rt(is(r),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function is(e){return"_value"in e?e._value:e.value}function $c(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Qf=["ctrl","shift","alt","meta"],ep={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Qf.some(n=>e[`${n}Key`]&&!t.includes(n))},Ot=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=((i,...l)=>{for(let r=0;r<t.length;r++){const u=ep[t[r]];if(u&&u(i,t))return}return e(i,...l)}))},tp={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},xc=(e,t)=>{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=(i=>{if(!("key"in i))return;const l=En(i.key);if(t.some(r=>r===l||tp[r]===l))return e(i)}))},np=tt({patchProp:qf},Pf);let da;function sp(){return da||(da=uf(np))}const ip=((...e)=>{const t=sp().createApp(...e),{mount:n}=t;return t.mount=s=>{const i=lp(s);if(!i)return;const l=t._component;!_e(l)&&!l.render&&!l.template&&(l.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const r=n(i,!1,op(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),r},t});function op(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function lp(e){return We(e)?document.querySelector(e):e}const ap="modulepreload",rp=function(e,t){return new URL(e,t).href},fa={},bn=function(t,n,s){let i=Promise.resolve();if(n&&n.length>0){let h=function(p){return Promise.all(p.map(b=>Promise.resolve(b).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};const r=document.getElementsByTagName("link"),u=document.querySelector("meta[property=csp-nonce]"),f=u?.nonce||u?.getAttribute("nonce");i=h(n.map(p=>{if(p=rp(p,s),p in fa)return;fa[p]=!0;const b=p.endsWith(".css"),v=b?'[rel="stylesheet"]':"";if(s)for(let I=r.length-1;I>=0;I--){const T=r[I];if(T.href===p&&(!b||T.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${p}"]${v}`))return;const y=document.createElement("link");if(y.rel=b?"stylesheet":ap,b||(y.as="script"),y.crossOrigin="",y.href=p,f&&y.setAttribute("nonce",f),document.head.appendChild(y),b)return new Promise((I,T)=>{y.addEventListener("load",I),y.addEventListener("error",()=>T(new Error(`Unable to preload CSS for ${p}`)))})}))}function l(r){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=r,window.dispatchEvent(u),!u.defaultPrevented)throw r}return i.then(r=>{for(const u of r||[])u.status==="rejected"&&l(u.reason);return t().catch(l)})},cp={de:{name:"Deutsch",english:"German",script:"latin",plural:"one_other",clock:"24",checked:!1},"en-GB":{name:"English (UK)",english:"English (UK)",script:"latin",plural:"one_other",clock:"24",checked:!0},en:{name:"English (US)",english:"English (US)",script:"latin",plural:"one_other",clock:"12",checked:!0},es:{name:"Español",english:"Spanish",script:"latin",plural:"one_other",clock:"24",checked:!1},fr:{name:"Français",english:"French",script:"latin",plural:"one_upto_1",clock:"24",checked:!1},it:{name:"Italiano",english:"Italian",script:"latin",plural:"one_other",clock:"24",checked:!1},nl:{name:"Nederlands",english:"Dutch",script:"latin",plural:"one_other",clock:"24",checked:!1},pl:{name:"Polski",english:"Polish",script:"latin",plural:"slavic_pl",clock:"24",checked:!1},pt:{name:"Português",english:"Portuguese",script:"latin",plural:"one_other",clock:"24",checked:!1}};const vi=typeof window<"u",Pn=(e,t=!1)=>t?Symbol.for(e):Symbol(e),up=(e,t,n)=>dp({l:e,k:t,s:n}),dp=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Ye=e=>typeof e=="number"&&isFinite(e),Sc=e=>hl(e)==="[object Date]",gi=e=>hl(e)==="[object RegExp]",pl=e=>Fe(e)&&Object.keys(e).length===0,ot=Object.assign,fp=Object.create,Ie=(e=null)=>fp(e);let pa;const pp=()=>pa||(pa=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Ie()),hp=Object.prototype.hasOwnProperty;function St(e,t){return hp.call(e,t)}const je=Array.isArray,Be=e=>typeof e=="function",ae=e=>typeof e=="string",Ke=e=>typeof e=="boolean",Se=e=>e!==null&&typeof e=="object",mp=e=>Se(e)&&Be(e.then)&&Be(e.catch),Cc=Object.prototype.toString,hl=e=>Cc.call(e),Fe=e=>hl(e)==="[object Object]",bp=e=>e==null?"":je(e)||Fe(e)&&e.toString===Cc?JSON.stringify(e,null,2):String(e);function vp(e,t=""){return e.reduce((n,s,i)=>i===0?n+s:n+t+s,"")}function gp(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}function ha(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/").replace(/=/g,"=")}function _p(e){return e.replace(/&(?![a-z0-9#]{2,6};)/gi,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}const yp=/^javascript:/i,wp=/^(?:href|src|action|formaction)$/i,kp=/&#(?:x([0-9a-f]+)|(\d+));?/gi,$p=/&(?:Tab|NewLine);/g,xp=/:?/gi,Sp=/[\u0000-\u0020\u007f-\u009f]/g,Cp=/(?:^|[\s"'<>/])on\w+\s*=\s*["']?[^"'>]+["']?/i,Tp=/(^|[\s"'<>/])on(\w+\s*=)/gi,Ep=/(^|[\s"'<>/])((?:href|src|action|formaction)\s*=\s*)([^\s"'=<>`]+)/gi;function Ap(e,t,n){const s=t||n;if(!s)return e;const i=Number.parseInt(s,t?16:10);return i<=127?String.fromCharCode(i):e}function ml(e){const t=e.replace(kp,Ap).replace($p,"").replace(xp,":").replace(Sp,"");return yp.test(t)}function Pp(e){const t=/url\s*\(/gi;let n="",s=0,i;for(;(i=t.exec(e))!==null;){const l=i.index,r=t.lastIndex-1;let u=r+1,f=1,h=null;for(;u<e.length;u++){const v=e[u];if(h){v===h&&(h=null);continue}if(v==='"'||v==="'")h=v;else if(v==="(")f++;else if(v===")"&&(f--,f===0))break}if(f!==0)break;const p=e.slice(r+1,u).trim(),b=p.startsWith('"')&&p.endsWith('"')||p.startsWith("'")&&p.endsWith("'")?p.slice(1,-1).trim():p;n+=e.slice(s,l),n+=ml(b)?"url(about:blank)":e.slice(l,u+1),s=u+1}return n+e.slice(s)}function ma(e,t){if(wp.test(e)&&ml(t))return"about:blank";const n=e.toLowerCase()==="style"?Pp(t):t;return _p(n)}function Op(e){return e=e.replace(/([\w:-]+)\s*=\s*"([^"]*)"/g,(t,n,s)=>`${n}="${ma(n,s)}"`),e=e.replace(/([\w:-]+)\s*=\s*'([^']*)'/g,(t,n,s)=>`${n}='${ma(n,s)}'`),Cp.test(e)&&(e=e.replace(Tp,"$1on$2")),e=e.replace(Ep,(t,n,s,i)=>ml(i)?`${n}${s}about:blank`:t),e}const ba=e=>!Se(e)||je(e);function oi(e,t){if(ba(e)||ba(t))throw new Error("Invalid value");const n=[{src:e,des:t}];for(;n.length;){const{src:s,des:i}=n.pop();Object.keys(s).forEach(l=>{if(l==="__proto__")return;const r=s[l];if(je(r)){const u=[];u.length=r.length,i[l]=u,n.push({src:r,des:u})}else Se(r)?((!Se(i[l])||je(i[l]))&&(i[l]=Ie()),n.push({src:r,des:i[l]})):i[l]=r})}}const Ip=17;function Tc(e,t,n={}){const{domain:s,messages:i,args:l}=n,r=e,u=new SyntaxError(String(r));return u.code=e,u.domain=s,u}function zt(e){return Se(e)&&bl(e)===0&&(St(e,"b")||St(e,"body"))}const Ec=["b","body"];function Lp(e){return On(e,Ec)}const Ac=["c","cases"];function Mp(e){return On(e,Ac,[])}const Pc=["s","static"];function Rp(e){return On(e,Pc)}const Oc=["i","items"];function Np(e){return On(e,Oc,[])}const Ic=["t","type"];function bl(e){return On(e,Ic)}const Lc=["v","value"];function ei(e,t){const n=On(e,Lc);if(n!=null)return n;throw Ls(t)}const Mc=["m","modifier"];function Fp(e){return On(e,Mc)}const Rc=["k","key"];function Dp(e){const t=On(e,Rc);if(t)return t;throw Ls(6)}function On(e,t,n){for(let s=0;s<t.length;s++){const i=t[s];if(St(e,i)&&e[i]!=null)return e[i]}return n}const Nc=[...Ec,...Ac,...Pc,...Oc,...Rc,...Mc,...Lc,...Ic];function Ls(e){return new Error(`unhandled node type: ${e}`)}function va(e){return n=>Up(n,e)}function Up(e,t){const n=Lp(t);if(n==null)throw Ls(0);if(bl(n)===1){const l=Mp(n);return e.plural(l.reduce((r,u)=>[...r,ga(e,u)],[]))}else return ga(e,n)}function ga(e,t){const n=Rp(t);if(n!=null)return e.type==="text"?n:e.normalize([n]);{const s=Np(t).reduce((i,l)=>[...i,Po(e,l)],[]);return e.normalize(s)}}function Po(e,t){const n=bl(t);switch(n){case 3:return ei(t,n);case 9:return ei(t,n);case 4:{const s=t;if(St(s,"k")&&s.k)return e.interpolate(e.named(s.k));if(St(s,"key")&&s.key)return e.interpolate(e.named(s.key));throw Ls(n)}case 5:{const s=t;if(St(s,"i")&&Ye(s.i))return e.interpolate(e.list(s.i));if(St(s,"index")&&Ye(s.index))return e.interpolate(e.list(s.index));throw Ls(n)}case 6:{const s=t,i=Fp(s),l=Dp(s);return e.linked(Po(e,l),i?Po(e,i):void 0,e.type)}case 7:return ei(t,n);case 8:return ei(t,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}let _a=Ie();function jp(e,t){{const n=e.cacheKey;if(n){const s=_a[n];return s||(_a[n]=va(e))}else return va(e)}}const sn={INVALID_ARGUMENT:Ip,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},Hp=24;function on(e){return Tc(e,null,void 0)}function vl(e,t){return t.locale!=null?ya(t.locale):ya(e.locale)}let ao;function ya(e){if(ae(e))return e;if(Be(e)){if(e.resolvedOnce&&ao!=null)return ao;if(e.constructor.name==="Function"){const t=e();if(mp(t))throw on(sn.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return ao=t}else throw on(sn.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw on(sn.NOT_SUPPORT_LOCALE_TYPE)}function Vp(e,t,n){return[...new Set([n,...je(t)?t:Se(t)?Object.keys(t).filter(s=>s!=="default"):ae(t)?[t]:[n]])]}function Oo(e,t,n){const s=ae(n)?n:_i,i=e;let l;Se(t)?(i.__localeChainObjectCache||(i.__localeChainObjectCache=new WeakMap),l=i.__localeChainObjectCache.get(t),l||(l=new Map,i.__localeChainObjectCache.set(t,l))):(i.__localeChainCache||(i.__localeChainCache=new Map),l=i.__localeChainCache.get(t),l||(l=new Map,i.__localeChainCache.set(t,l)));const r=l.get(s);if(r)return r;const u=[];let f=[n];for(;je(f);)f=wa(u,f,t);const h=je(t)||!Fe(t)?t:t.default?t.default:null;return f=ae(h)?[h]:h,je(f)&&wa(u,f,!1),l.set(s,u),u}function wa(e,t,n){let s=!0;for(let i=0;i<t.length&&Ke(s);i++){const l=t[i];ae(l)&&(s=Wp(e,t[i],n))}return s}function Wp(e,t,n){let s;const i=t.split("-");do{const l=i.join("-");s=Bp(e,l,n),i.splice(-1,1)}while(i.length&&s===!0);return s}function Bp(e,t,n){let s=!1;if(!e.includes(t)&&(s=!0,t)){s=t[t.length-1]!=="!";const i=t.replace(/!/g,"");e.push(i),(je(n)||Fe(n))&&n[i]&&(s=n[i])}return s}const In=[];In[0]={w:[0],i:[3,0],"[":[4],o:[7]};In[1]={w:[1],".":[2],"[":[4],o:[7]};In[2]={w:[2],i:[3,0],0:[3,0]};In[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]};In[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]};In[5]={"'":[4,0],o:8,l:[5,0]};In[6]={'"':[4,0],o:8,l:[6,0]};const Kp=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function zp(e){return Kp.test(e)}function qp(e){const t=e.charCodeAt(0),n=e.charCodeAt(e.length-1);return t===n&&(t===34||t===39)?e.slice(1,-1):e}function Yp(e){if(e==null)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function Gp(e){const t=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:zp(t)?qp(t):"*"+t}function Jp(e){const t=[];let n=-1,s=0,i=0,l,r,u,f,h,p,b;const v=[];v[0]=()=>{r===void 0?r=u:r+=u},v[1]=()=>{r!==void 0&&(t.push(r),r=void 0)},v[2]=()=>{v[0](),i++},v[3]=()=>{if(i>0)i--,s=4,v[0]();else{if(i=0,r===void 0||(r=Gp(r),r===!1))return!1;v[1]()}};function y(){const I=e[n+1];if(s===5&&I==="'"||s===6&&I==='"')return n++,u="\\"+I,v[0](),!0}for(;s!==null;)if(n++,l=e[n],!(l==="\\"&&y())){if(f=Yp(l),b=In[s],h=b[f]||b.l||8,h===8||(s=h[0],h[1]!==void 0&&(p=v[h[1]],p&&(u=l,p()===!1))))return;if(s===7)return t}}const ka=new Map;function Xp(e,t){return Se(e)?e[t]:null}function Zp(e,t){if(!Se(e))return null;let n=ka.get(t);if(n||(n=Jp(t),n&&ka.set(t,n)),!n)return null;const s=n.length;let i=e,l=0;for(;l<s;){const r=n[l];if(Nc.includes(r)&&zt(i)||!Se(i)||!St(i,r))return null;const u=i[r];if(u===void 0||Be(i))return null;i=u,l++}return i}const Qp="11.4.12",Hi=-1,_i="en-US",yi="",$a=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function eh(){return{upper:(e,t)=>t==="text"&&ae(e)?e.toUpperCase():t==="vnode"&&Se(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&ae(e)?e.toLowerCase():t==="vnode"&&Se(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&ae(e)?$a(e):t==="vnode"&&Se(e)&&"__v_isVNode"in e?$a(e.children):e}}let Fc;function th(e){Fc=e}let Dc;function nh(e){Dc=e}let Uc;function sh(e){Uc=e}let jc=null;const xa=e=>{jc=e},Sa=()=>jc;let Ca=0;function ih(e={}){const t=Be(e.onWarn)?e.onWarn:gp,n=ae(e.version)?e.version:Qp,s=ae(e.locale)||Be(e.locale)?e.locale:_i,i=Be(s)?_i:s,l=je(e.fallbackLocale)||Fe(e.fallbackLocale)||ae(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:i,r=Fe(e.messages)?e.messages:ro(i),u=Fe(e.datetimeFormats)?e.datetimeFormats:ro(i),f=Fe(e.numberFormats)?e.numberFormats:ro(i),h=ot(Ie(),e.modifiers,eh()),p=e.pluralRules||Ie(),b=Be(e.missing)?e.missing:null,v=Ke(e.missingWarn)||gi(e.missingWarn)?e.missingWarn:!0,y=Ke(e.fallbackWarn)||gi(e.fallbackWarn)?e.fallbackWarn:!0,I=!!e.fallbackFormat,T=!!e.unresolving,k=Be(e.postTranslation)?e.postTranslation:null,A=Fe(e.processor)?e.processor:null,S=Ke(e.warnHtmlMessage)?e.warnHtmlMessage:!0,U=!!e.escapeParameter,C=Be(e.messageCompiler)?e.messageCompiler:Fc,K=Be(e.messageResolver)?e.messageResolver:Dc||Xp,O=Be(e.localeFallbacker)?e.localeFallbacker:Uc||Vp,E=Se(e.fallbackContext)?e.fallbackContext:void 0,R=e,L=Se(R.__datetimeFormatters)?R.__datetimeFormatters:new Map,D=Se(R.__numberFormatters)?R.__numberFormatters:new Map,M=Se(R.__meta)?R.__meta:{};Ca++;const Y={version:n,cid:Ca,locale:s,fallbackLocale:l,messages:r,modifiers:h,pluralRules:p,missing:b,missingWarn:v,fallbackWarn:y,fallbackFormat:I,unresolving:T,postTranslation:k,processor:A,warnHtmlMessage:S,escapeParameter:U,messageCompiler:C,messageResolver:K,localeFallbacker:O,fallbackContext:E,onWarn:t,__meta:M};return Y.datetimeFormats=u,Y.numberFormats=f,Y.__datetimeFormatters=L,Y.__numberFormatters=D,Y}const ro=e=>({[e]:Ie()});function Hc(e,t,n,s,i){const{missing:l,onWarn:r}=e;if(l!==null){const u=l(e,n,t,i);return ae(u)?u:t}else return t}function Ta(e,t){const n=e;Se(t)?n.__localeChainObjectCache?.delete(t):n.__localeChainCache?.delete(t)}function ti(e,t,n){Ta(e,n),e.fallbackContext&&Ta(e.fallbackContext,n),e.localeFallbacker(e,n,t)}function oh(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function lh(e,t){const n=t.indexOf(e);if(n===-1)return!1;for(let s=n+1;s<t.length;s++)if(oh(e,t[s]))return!0;return!1}function Vc(e,t,n,s,i,l,r){const{fallbackLocale:u,localeFallbacker:f,onWarn:h}=e,p=f(e,u,n);for(let b=0;b<p.length;b++){const v=p[b],y=(s[v]||{})[t];if(Fe(y)&&ae(v))return v;Hc(e,t,v,i,r)}return null}function Wc(e,t,n){let s=`${e}__${t}`;return Fe(n)&&!pl(n)&&(s=`${s}__${JSON.stringify(n)}`),s}function Bc(e,t,n){for(const s in n){const i=`${t}__${s}`;for(const l of e.keys())(l===i||l.startsWith(`${i}__`))&&e.delete(l)}}function Kc(e,t,n,s){const[,i,l,r]=e;let u=n;return ae(i)?t.key=i:Fe(i)&&Object.keys(i).forEach(f=>{s.includes(f)?u[f]=i[f]:t[f]=i[f]}),ae(l)?t.locale=l:Fe(l)&&(u=l),Fe(r)&&(u=r),u}function Ea(e,...t){const{datetimeFormats:n,unresolving:s,onWarn:i}=e,{__datetimeFormatters:l}=e;if(!ae(t[0])&&!Sc(t[0])&&!Ye(t[0]))return yi;const[r,u,f,h]=Io(...t),p=Ke(f.missingWarn)?f.missingWarn:e.missingWarn,b=Ke(f.fallbackWarn)?f.fallbackWarn:e.fallbackWarn,v=!!f.part,y=vl(e,f);if(!ae(r)||r===""){const S=new Intl.DateTimeFormat(y.replace(/!/g,""),h);return v?S.formatToParts(u):S.format(u)}const I=Vc(e,r,y,n,p,b,"datetime format");if(!ae(I))return s?Hi:r;const T=n[I][r],k=Wc(I,r,h);let A=l.get(k);return A||(A=new Intl.DateTimeFormat(I,ot({},T,h)),l.set(k,A)),v?A.formatToParts(u):A.format(u)}const zc=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function Io(...e){const[t]=e,n=Ie(),s=Ie();let i;if(ae(t)){const r=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!r)throw on(sn.INVALID_ISO_DATE_ARGUMENT);const u=r[3]?r[3].trim().startsWith("T")?`${r[1].trim()}${r[3].trim()}`:`${r[1].trim()}T${r[3].trim()}`:r[1].trim();i=new Date(u);try{i.toISOString()}catch{throw on(sn.INVALID_ISO_DATE_ARGUMENT)}}else if(Sc(t)){if(isNaN(t.getTime()))throw on(sn.INVALID_DATE_ARGUMENT);i=t}else if(Ye(t))i=t;else throw on(sn.INVALID_ARGUMENT);const l=Kc(e,n,s,zc);return[n.key||"",i,n,l]}function Aa(e,t,n){Bc(e.__datetimeFormatters,t,n)}function Pa(e,...t){const{numberFormats:n,unresolving:s,onWarn:i}=e,{__numberFormatters:l}=e;if(!Ye(t[0]))return yi;const[r,u,f,h]=Lo(...t),p=Ke(f.missingWarn)?f.missingWarn:e.missingWarn,b=Ke(f.fallbackWarn)?f.fallbackWarn:e.fallbackWarn,v=!!f.part,y=vl(e,f);if(!ae(r)||r===""){const S=new Intl.NumberFormat(y.replace(/!/g,""),h);return v?S.formatToParts(u):S.format(u)}const I=Vc(e,r,y,n,p,b,"number format");if(!ae(I))return s?Hi:r;const T=n[I][r],k=Wc(I,r,h);let A=l.get(k);return A||(A=new Intl.NumberFormat(I,ot({},T,h)),l.set(k,A)),v?A.formatToParts(u):A.format(u)}const qc=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function Lo(...e){const[t]=e,n=Ie(),s=Ie();if(!Ye(t))throw on(sn.INVALID_ARGUMENT);const i=t,l=Kc(e,n,s,qc);return[n.key||"",i,n,l]}function Oa(e,t,n){Bc(e.__numberFormatters,t,n)}const ah=e=>e,rh=e=>"",ch="text",uh=e=>e.length===0?"":vp(e),dh=bp;function co(e,t){return e=Math.abs(e),t===2?e===1?0:1:Math.min(e,2)}function fh(e){const t=Ye(e.pluralIndex)?e.pluralIndex:-1;return Ye(e.named?.count)?e.named.count:Ye(e.named?.n)?e.named.n:t}function ph(e={}){const t=e.locale,n=fh(e),s=ae(t)&&Be(e.pluralRules?.[t])?e.pluralRules[t]:co,i=s===co?void 0:co,l=A=>A[s(n,A.length,i)],r=e.list||[],u=A=>r[A],f=e.named||Ie();Ye(e.pluralIndex)&&(f.count||=e.pluralIndex,f.n||=e.pluralIndex);const h=A=>f[A];function p(A,S){const U=Be(e.messages)?e.messages(A,!!S):Se(e.messages)?e.messages[A]:!1;return U||(e.parent?e.parent.message(A):rh)}const b=A=>e.modifiers?e.modifiers[A]:ah,v=Be(e.processor?.normalize)?e.processor.normalize:uh,y=Be(e.processor?.interpolate)?e.processor.interpolate:dh,I=ae(e.processor?.type)?e.processor.type:ch,k={list:u,named:h,plural:l,linked:(A,...S)=>{const[U,C]=S;let K="text",O="";S.length===1?Se(U)?(O=U.modifier||O,K=U.type||K):ae(U)&&(O=U||O):S.length===2&&(ae(U)&&(O=U||O),ae(C)&&(K=C||K));const E=p(A,!0)(k),R=E===""||E===void 0?A:E,L=K==="vnode"&&je(R)&&O?R[0]:R;return O?b(O)(L,K):L},message:p,type:I,interpolate:y,normalize:v,values:ot(Ie(),r,f)};return k}const Ia=()=>"",ln=e=>Be(e);function La(e,...t){const{fallbackFormat:n,postTranslation:s,unresolving:i,messageCompiler:l,fallbackLocale:r,messages:u}=e,[f,h]=Mo(...t),p=Ke(h.missingWarn)?h.missingWarn:e.missingWarn,b=Ke(h.fallbackWarn)?h.fallbackWarn:e.fallbackWarn,v=Ke(h.escapeParameter)?h.escapeParameter:e.escapeParameter,y=!!h.resolvedMessage,I=ae(h.default)||Ke(h.default)?Ke(h.default)?l?f:()=>f:h.default:n?l?f:()=>f:null,T=n||I!=null&&(ae(I)||Be(I)),k=vl(e,h);v&&hh(h);let[A,S,U]=y?[f,k,u[k]||Ie()]:Yc(e,f,k,r,b,p),C=A,K=f;if(!y&&!(ae(C)||zt(C)||ln(C))&&T&&(C=I,K=C),!y&&(!(ae(C)||zt(C)||ln(C))||!ae(S)))return i?Hi:f;let O=!1;const E=()=>{O=!0},R=ln(C)?C:Gc(e,f,S,C,K,E);if(O)return C;const L=vh(e,S,U,h),D=ph(L),M=mh(e,R,D);let Y=s?s(M,f):M;return v&&ae(Y)&&(Y=Op(Y)),Y}function hh(e){je(e.list)?e.list=e.list.map(t=>ae(t)?ha(t):t):Se(e.named)&&Object.keys(e.named).forEach(t=>{ae(e.named[t])&&(e.named[t]=ha(e.named[t]))})}function Yc(e,t,n,s,i,l){const{messages:r,onWarn:u,messageResolver:f,localeFallbacker:h}=e,p=h(e,s,n);let b=Ie(),v,y=null;const I="translate";for(let T=0;T<p.length&&(v=p[T],b=r[v]||Ie(),(y=f(b,t))===null&&(y=b[t]),!(ae(y)||zt(y)||ln(y)));T++)if(!lh(v,p)){const k=Hc(e,t,v,l,I);k!==t&&(y=k)}return[y,v,b]}function Gc(e,t,n,s,i,l){const{messageCompiler:r,warnHtmlMessage:u}=e;if(ln(s)){const h=s;return h.locale=h.locale||n,h.key=h.key||t,h}if(r==null){const h=(()=>s);return h.locale=n,h.key=t,h}const f=r(s,bh(e,n,i,s,u,l));return f.locale=n,f.key=t,f.source=s,f}function mh(e,t,n){return t(n)}function Mo(...e){const[t,n,s]=e,i=Ie();if(!ae(t)&&!Ye(t)&&!ln(t)&&!zt(t))throw on(sn.INVALID_ARGUMENT);const l=Ye(t)?String(t):(ln(t),t);return Ye(n)?i.plural=n:ae(n)?i.default=n:Fe(n)&&!pl(n)?i.named=n:je(n)&&(i.list=n),Ye(s)?i.plural=s:ae(s)?i.default=s:Fe(s)&&ot(i,s),[l,i]}function bh(e,t,n,s,i,l){return{locale:t,key:n,warnHtmlMessage:i,onError:r=>{throw l&&l(r),r},onCacheKey:r=>up(t,n,r)}}function vh(e,t,n,s){const{modifiers:i,pluralRules:l,messageResolver:r,fallbackLocale:u,fallbackWarn:f,missingWarn:h,fallbackContext:p}=e,v={locale:t,modifiers:i,pluralRules:l,messages:(y,I)=>{let T=r(n,y);if(T==null&&(p||I)){const[k,,A]=Yc(p||e,y,t,u,f,h);T=k??r(A,y)}if(ae(T)||zt(T)){let k=!1;const S=Gc(e,y,t,T,y,()=>{k=!0});return k?Ia:S}else return ln(T)?T:Ia}};return e.processor&&(v.processor=e.processor),s.list&&(v.list=s.list),s.named&&(v.named=s.named),Ye(s.plural)&&(v.pluralIndex=s.plural),v}const gh="11.4.12",_t={UNEXPECTED_RETURN_TYPE:Hp,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function Et(e,...t){return Tc(e,null,void 0)}const Ro=Pn("__translateVNode"),No=Pn("__datetimeParts"),Fo=Pn("__numberParts"),_h=Pn("__setPluralRules"),yh=Pn("__injectWithOption"),Zn=Pn("__dispose");let Jc=null;{const e=pp().__VUE_INSTANCE_SETTERS__;je(e)&&e.push(t=>{Jc=t})}function Ms(e){if(!Se(e)||zt(e))return e;for(const t in e)if(St(e,t))if(!t.includes("."))Se(e[t])&&Ms(e[t]);else{const n=t.split("."),s=n.length-1;let i=e,l=!1;for(let r=0;r<s;r++){if(n[r]==="__proto__")throw new Error(`unsafe key: ${n[r]}`);if(n[r]in i||(i[n[r]]=Ie()),!Se(i[n[r]])){l=!0;break}i=i[n[r]]}if(l||(zt(i)?Nc.includes(n[s])||delete e[t]:(i[n[s]]=e[t],delete e[t])),!zt(i)){const r=i[n[s]];Se(r)&&Ms(r)}}return e}function Xc(e,t){const{messages:n,__i18n:s,messageResolver:i,flatJson:l}=t,r=Fe(n)?n:je(s)?Ie():{[e]:Ie()};if(je(s)&&s.forEach(u=>{if("locale"in u&&"resource"in u){const{locale:f,resource:h}=u;f?(r[f]=r[f]||Ie(),oi(h,r[f])):oi(h,r)}else ae(u)&&oi(JSON.parse(u),r)}),i==null&&l)for(const u in r)St(r,u)&&Ms(r[u]);return r}function wh(e){return e.type}function kh(e,t,n){let s=Se(t.messages)?t.messages:Ie();"__i18nGlobal"in n&&(s=Xc(e.locale.value,{messages:s,__i18n:n.__i18nGlobal}));const i=Object.keys(s);i.length&&i.forEach(l=>{e.mergeLocaleMessage(l,s[l])});{if(Se(t.datetimeFormats)){const l=Object.keys(t.datetimeFormats);l.length&&l.forEach(r=>{e.mergeDateTimeFormat(r,t.datetimeFormats[r])})}if(Se(t.numberFormats)){const l=Object.keys(t.numberFormats);l.length&&l.forEach(r=>{e.mergeNumberFormat(r,t.numberFormats[r])})}}}function Ma(e){return se(Bs,null,e,0)}function Zc(){return Jc??_c()}const Ra=()=>[],$h=()=>!1;let Na=0;function Fa(e){return((t,n,s,i)=>e(n,s,Zc()||void 0,i))}function Do(e={}){const{__root:t,__injectWithOption:n}=e,s=t===void 0,i=e.flatJson,l=vi?$e:md;let r=Ke(e.inheritLocale)?e.inheritLocale:!0;const u=l(t&&r?t.locale.value:ae(e.locale)?e.locale:_i),f=l(t&&r?t.fallbackLocale.value:ae(e.fallbackLocale)||je(e.fallbackLocale)||Fe(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:u.value),h=l(Xc(u.value,e)),p=l(Fe(e.datetimeFormats)?e.datetimeFormats:{[u.value]:{}}),b=l(Fe(e.numberFormats)?e.numberFormats:{[u.value]:{}});let v=t?t.missingWarn:Ke(e.missingWarn)||gi(e.missingWarn)?e.missingWarn:!0,y=t?t.fallbackWarn:Ke(e.fallbackWarn)||gi(e.fallbackWarn)?e.fallbackWarn:!0,I=t?t.fallbackRoot:Ke(e.fallbackRoot)?e.fallbackRoot:!0,T=!!e.fallbackFormat,k=Be(e.missing)?e.missing:null,A=Be(e.missing)?Fa(e.missing):null,S=Be(e.postTranslation)?e.postTranslation:null,U=t?t.warnHtmlMessage:Ke(e.warnHtmlMessage)?e.warnHtmlMessage:!0,C=!!e.escapeParameter;const K=t?t.modifiers:Fe(e.modifiers)?e.modifiers:{};let O=e.pluralRules||t&&t.pluralRules,E;E=(()=>{s&&xa(null);const P={version:gh,locale:u.value,fallbackLocale:f.value,messages:h.value,modifiers:K,pluralRules:O,missing:A===null?void 0:A,missingWarn:v,fallbackWarn:y,fallbackFormat:T,unresolving:!0,postTranslation:S===null?void 0:S,warnHtmlMessage:U,escapeParameter:C,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};P.datetimeFormats=p.value,P.numberFormats=b.value,P.__datetimeFormatters=Fe(E)?E.__datetimeFormatters:void 0,P.__numberFormatters=Fe(E)?E.__numberFormatters:void 0;const F=ih(P);return s&&xa(F),F})(),ti(E,u.value,f.value);function L(){return[u.value,f.value,h.value,p.value,b.value]}const D=$({get:()=>u.value,set:P=>{E.locale=P,u.value=P}});function M(P){s||(E.fallbackContext=t?Sa():void 0);try{ti(E,u.value,P)}finally{s||(E.fallbackContext=void 0)}}const Y=$({get:()=>f.value,set:P=>{f.value=P,E.fallbackLocale=f.value,M(f.value)}}),te=$(()=>h.value),ye=$(()=>p.value),re=$(()=>b.value);function be(){return Be(S)?S:null}function ge(P){S=P,E.postTranslation=P}function we(){return k}function Ge(P){P!==null&&(A=Fa(P)),k=P,E.missing=A}const qe=(P,F,ce,fe,Oe,De)=>{L();let Ve;try{s||(E.fallbackContext=t?Sa():void 0),Ve=P(E)}finally{s||(E.fallbackContext=void 0)}if(ce!=="translate exists"&&Ye(Ve)&&Ve===Hi||ce==="translate exists"&&!Ve){const[kt,Yn]=F();return t&&I?fe(t):Oe(kt)}else{if(De(Ve))return Ve;throw Et(_t.UNEXPECTED_RETURN_TYPE)}};function le(...P){return qe(F=>Reflect.apply(La,null,[F,...P]),()=>Mo(...P),"translate",F=>Reflect.apply(F.t,F,[...P]),F=>F,F=>ae(F))}function Z(...P){const[F,ce,fe]=P;if(fe&&!Se(fe))throw Et(_t.INVALID_ARGUMENT);return le(F,ce,ot({resolvedMessage:!0},fe||{}))}function ue(...P){return qe(F=>Reflect.apply(Ea,null,[F,...P]),()=>Io(...P),"datetime format",F=>Reflect.apply(F.d,F,[...P]),()=>yi,F=>ae(F)||je(F))}function ke(...P){return qe(F=>Reflect.apply(Pa,null,[F,...P]),()=>Lo(...P),"number format",F=>Reflect.apply(F.n,F,[...P]),()=>yi,F=>ae(F)||je(F))}function B(P){return P.map(F=>ae(F)||Ye(F)||Ke(F)?Ma(String(F)):F)}const ie={normalize:B,interpolate:P=>P,type:"vnode"};function wt(...P){return qe(F=>{let ce;const fe=F;try{fe.processor=ie,ce=Reflect.apply(La,null,[fe,...P])}finally{fe.processor=null}return ce},()=>Mo(...P),"translate",F=>F[Ro](...P),F=>[Ma(F)],F=>je(F))}function Ln(...P){return qe(F=>Reflect.apply(Pa,null,[F,...P]),()=>Lo(...P),"number format",F=>F[Fo](...P),Ra,F=>ae(F)||je(F))}function Mn(...P){return qe(F=>Reflect.apply(Ea,null,[F,...P]),()=>Io(...P),"datetime format",F=>F[No](...P),Ra,F=>ae(F)||je(F))}function El(P){O=P,E.pluralRules=O}function w(P,F){return qe(()=>{if(!P)return!1;const ce=ae(F)?F:u.value,fe=ae(F)?[ce]:Oo(E,f.value,ce);for(let Oe=0;Oe<fe.length;Oe++){const De=z(fe[Oe]);let Ve=E.messageResolver(De,P);if(Ve===null&&(Ve=De[P]),zt(Ve)||ln(Ve)||ae(Ve))return!0}return!1},()=>[P],"translate exists",ce=>Reflect.apply(ce.te,ce,[P,F]),$h,ce=>Ke(ce))}function x(P){let F=null;const ce=Oo(E,f.value,u.value);for(let fe=0;fe<ce.length;fe++){const Oe=h.value[ce[fe]]||{},De=E.messageResolver(Oe,P);if(De!=null){F=De;break}}return F}function N(P){const F=x(P);return F??(t?t.tm(P)||{}:{})}function z(P){return h.value[P]||{}}function j(P,F){if(i){const ce={[P]:F};for(const fe in ce)St(ce,fe)&&Ms(ce[fe]);F=ce[P]}h.value[P]=F,E.messages=h.value}function V(P,F){h.value[P]=h.value[P]||{};const ce={[P]:F};if(i)for(const fe in ce)St(ce,fe)&&Ms(ce[fe]);F=ce[P],oi(F,h.value[P]),E.messages=h.value}function X(P){return p.value[P]||{}}function J(P,F){p.value[P]=F,E.datetimeFormats=p.value,Aa(E,P,F)}function G(P,F){p.value[P]=ot(p.value[P]||{},F),E.datetimeFormats=p.value,Aa(E,P,F)}function H(P){return b.value[P]||{}}function de(P,F){b.value[P]=F,E.numberFormats=b.value,Oa(E,P,F)}function ee(P,F){b.value[P]=ot(b.value[P]||{},F),E.numberFormats=b.value,Oa(E,P,F)}Na++,Tt(f,()=>M(f.value),{deep:!0,flush:"sync"}),t&&vi&&(Tt(t.locale,P=>{r&&(u.value=P,E.locale=P,ti(E,u.value,f.value))}),Tt(t.fallbackLocale,P=>{r&&(f.value=P,E.fallbackLocale=f.value,ti(E,u.value,f.value))}));const Q={id:Na,locale:D,fallbackLocale:Y,get inheritLocale(){return r},set inheritLocale(P){r=P,P&&t&&(D.value=t.locale.value,Y.value=t.fallbackLocale.value)},get availableLocales(){return Object.keys(h.value).sort()},messages:te,get modifiers(){return K},get pluralRules(){return O||{}},get isGlobal(){return s},get missingWarn(){return v},set missingWarn(P){v=P,E.missingWarn=v},get fallbackWarn(){return y},set fallbackWarn(P){y=P,E.fallbackWarn=y},get fallbackRoot(){return I},set fallbackRoot(P){I=P},get fallbackFormat(){return T},set fallbackFormat(P){T=P,E.fallbackFormat=T},get warnHtmlMessage(){return U},set warnHtmlMessage(P){U=P,E.warnHtmlMessage=P},get escapeParameter(){return C},set escapeParameter(P){C=P,E.escapeParameter=P},t:le,getLocaleMessage:z,setLocaleMessage:j,mergeLocaleMessage:V,getPostTranslationHandler:be,setPostTranslationHandler:ge,getMissingHandler:we,setMissingHandler:Ge,[_h]:El};return Q.datetimeFormats=ye,Q.numberFormats=re,Q.rt=Z,Q.te=w,Q.tm=N,Q.d=ue,Q.n=ke,Q.getDateTimeFormat=X,Q.setDateTimeFormat=J,Q.mergeDateTimeFormat=G,Q.getNumberFormat=H,Q.setNumberFormat=de,Q.mergeNumberFormat=ee,Q[yh]=n,Q[Ro]=wt,Q[No]=Mn,Q[Fo]=Ln,Q}const gl={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function xh({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((s,i)=>[...s,...i.type===q?i.children:[i]],[]):t.reduce((n,s)=>{const i=e[s];return i&&(n[s]=i()),n},Ie())}function Qc(){return q}const Sh=Le({name:"i18n-t",props:ot({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>Ye(e)||!isNaN(e)}},gl),setup(e,t){const{slots:n,attrs:s}=t,i=e.i18n||_l({useScope:e.scope,__useComponent:!0});return()=>{const l=()=>{const f=Object.keys(n).filter(b=>b[0]!=="_"),h=Ie();e.locale&&(h.locale=e.locale),e.plural!==void 0&&(h.plural=ae(e.plural)?+e.plural:e.plural);const p=xh(t,f);return i[Ro](e.keypath,p,h)},r=ot(Ie(),s),u=ae(e.tag)||Se(e.tag)?e.tag:Qc();return Se(u)?bi(u,r,{default:l}):bi(u,r,l())}}}),Da=Sh;function Ch(e){return je(e)&&!ae(e[0])}function eu(e,t,n,s){const{slots:i,attrs:l}=t;return()=>{const r=()=>{const h={part:!0};let p=Ie();e.locale&&(h.locale=e.locale),ae(e.format)?h.key=e.format:Se(e.format)&&(ae(e.format.key)&&(h.key=e.format.key),p=Object.keys(e.format).reduce((y,I)=>n.includes(I)?ot(Ie(),y,{[I]:e.format[I]}):y,Ie()));const b=s(e.value,h,p);let v=[h.key];return je(b)?v=b.map((y,I)=>{const T=i[y.type],k=T?T({[y.type]:y.value,index:I,parts:b}):[y.value];return Ch(k)&&(k[0].key=`${y.type}-${I}`),k}):ae(b)&&(v=[b]),v},u=ot(Ie(),l),f=ae(e.tag)||Se(e.tag)?e.tag:Qc();return Se(f)?bi(f,u,{default:r}):bi(f,u,r())}}const Th=Le({name:"i18n-n",props:ot({value:{type:Number,required:!0},format:{type:[String,Object]}},gl),setup(e,t){const n=e.i18n||_l({useScope:e.scope,__useComponent:!0});return eu(e,t,qc,(...s)=>n[Fo](...s))}}),Ua=Th;function Eh(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const s=n.__getInstance(t);return s!=null?s.__composer:e.global.__composer}}function Ah(e){const t=r=>{const{instance:u,value:f}=r;if(!u||!u.$)throw Et(_t.UNEXPECTED_ERROR);const h=Eh(e,u.$),p=ja(f);return[Reflect.apply(h.t,h,[...Ha(p)]),h]};return{created:(r,u)=>{const[f,h]=t(u);vi&&(r.__i18nWatcher=Tt(h.locale,()=>{u.instance&&u.instance.$forceUpdate()})),r.__composer=h,r.textContent=f},unmounted:r=>{vi&&r.__i18nWatcher&&(r.__i18nWatcher(),r.__i18nWatcher=void 0,delete r.__i18nWatcher),r.__composer&&(r.__composer=void 0,delete r.__composer)},beforeUpdate:(r,{value:u})=>{if(r.__composer){const f=r.__composer,h=ja(u);r.textContent=Reflect.apply(f.t,f,[...Ha(h)])}},getSSRProps:r=>{const[u]=t(r);return{textContent:u}}}}function ja(e){if(ae(e))return{path:e};if(Fe(e)){if(!("path"in e))throw Et(_t.REQUIRED_VALUE,"path");return e}else throw Et(_t.INVALID_VALUE)}function Ha(e){const{path:t,locale:n,args:s,choice:i,plural:l}=e,r={},u=s||{};return ae(n)&&(r.locale=n),Ye(i)&&(r.plural=i),Ye(l)&&(r.plural=l),[t,u,r]}function Ph(e,t,...n){const s=Fe(n[0])?n[0]:{};(!Ke(s.globalInstall)||s.globalInstall)&&([Da.name,"I18nT"].forEach(l=>e.component(l,Da)),[Ua.name,"I18nN"].forEach(l=>e.component(l,Ua)),[Ba.name,"I18nD"].forEach(l=>e.component(l,Ba))),e.directive("t",Ah(t))}const Oh=Pn("global-vue-i18n");function Ih(e={}){const t=Ke(e.globalInjection)?e.globalInjection:!0,n=new Map,[s,i]=Lh(e),l=Pn("");function r(p){return n.get(p)||null}function u(p,b){n.set(p,b)}function f(p){n.delete(p)}const h={get mode(){return"composition"},async install(p,...b){if(p.__VUE_I18N_SYMBOL__=l,p.provide(p.__VUE_I18N_SYMBOL__,h),Fe(b[0])){const I=b[0];h.__composerExtend=I.__composerExtend,h.__vueI18nExtend=I.__vueI18nExtend}let v=null;t&&(v=jh(p,h.global)),Ph(p,h,...b);const y=p.unmount;p.unmount=()=>{v&&v(),h.dispose(),y()}},get global(){return i},dispose(){s.stop()},__instances:n,__getInstance:r,__setInstance:u,__deleteInstance:f};return h}function _l(e={}){const t=Zc();if(t==null)throw Et(_t.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw Et(_t.NOT_INSTALLED);const n=Mh(t),s=Nh(n),i=wh(t),l=Rh(e,i);if(l==="global")return kh(s,e,i),s;if(l==="parent"){let f=Va(n,t,e.__useComponent);return f==null&&(f=s),f}if(l==="isolated"){if(n.mode!=="composition")throw Et(_t.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const f=n,h=ot({},e),p=Va(n,t);h.__root=p||s;const b=Do(h);return f.__composerExtend&&(b[Zn]=f.__composerExtend(b)),$r()&&Gu(()=>{const y=b[Zn];y&&(y(),delete b[Zn])}),b}const r=n;let u=r.__getInstance(t);if(u==null){const f=ot({},e);"__i18n"in i&&(f.__i18n=i.__i18n),s&&(f.__root=s),u=Do(f),r.__composerExtend&&(u[Zn]=r.__composerExtend(u)),Dh(r,t,u),r.__setInstance(t,u)}return u}function Lh(e,t){const n=Yu(),s=n.run(()=>Do(e));if(s==null)throw Et(_t.UNEXPECTED_ERROR);return[n,s]}function Mh(e){const t=$s(e.isCE?Oh:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw Et(e.isCE?_t.NOT_INSTALLED_WITH_PROVIDE:_t.UNEXPECTED_ERROR);return t}function Rh(e,t){return pl(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function Nh(e){return e.mode==="composition"?e.global:e.global.__composer}function Va(e,t,n=!1){let s=null;const i=t.root;let l=Fh(t,n);for(;l!=null;){const r=e;if(e.mode==="composition"&&(s=r.__getInstance(l)),s!=null||i===l)break;l=l.parent}return s}function Fh(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function Dh(e,t,n){An(()=>{},t),ul(()=>{const s=n;e.__deleteInstance(t);const i=s[Zn];i&&(i(),delete s[Zn])},t)}const Uh=["locale","fallbackLocale","availableLocales"],Wa=["t","rt","d","n","tm","te"];function jh(e,t){const n=Object.create(null);return Uh.forEach(i=>{const l=Object.getOwnPropertyDescriptor(t,i);if(!l)throw Et(_t.UNEXPECTED_ERROR);const r=et(l.value)?{get(){return l.value.value},set(u){l.value.value=u}}:{get(){return l.get&&l.get()}};Object.defineProperty(n,i,r)}),e.config.globalProperties.$i18n=n,Wa.forEach(i=>{const l=Object.getOwnPropertyDescriptor(t,i);if(!l||!l.value)throw Et(_t.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${i}`,l)}),()=>{delete e.config.globalProperties.$i18n,Wa.forEach(i=>{delete e.config.globalProperties[`$${i}`]})}}const Hh=Le({name:"i18n-d",props:ot({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},gl),setup(e,t){const n=e.i18n||_l({useScope:e.scope,__useComponent:!0});return eu(e,t,zc,(...s)=>n[No](...s))}}),Ba=Hh;th(jp);nh(Zp);sh(Oo);const Vh={editor:{common:{undo:{t:0,b:{t:2,i:[{t:3}],s:"Undo"}},online:{t:0,b:{t:2,i:[{t:3}],s:"Online"}},offline:{t:0,b:{t:2,i:[{t:3}],s:"Offline"}},unknown:{t:0,b:{t:2,i:[{t:3}],s:"unknown"}},unsaved:{t:0,b:{t:2,i:[{t:3}],s:"Unsaved changes"}},cancel:{t:0,b:{t:2,i:[{t:3}],s:"Cancel"}},open_integrations:{t:0,b:{t:2,i:[{t:3}],s:"Open Devices & services"}},save_send:{t:0,b:{t:2,i:[{t:3}],s:"Save & send"}},saving:{t:0,b:{t:2,i:[{t:3}],s:"Saving…"}},read_current_data:{t:0,b:{t:2,i:[{t:3}],s:"Read current data"}},results:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"1 result. Keep typing to narrow it down."},{t:2,i:[{t:4,k:"n"},{t:3,v:" results. Keep typing to narrow it down."}]}]}},close:{t:0,b:{t:2,i:[{t:3}],s:"Close"}},remove:{t:0,b:{t:2,i:[{t:3}],s:"Remove"}},change:{t:0,b:{t:2,i:[{t:3}],s:"Change"}},loading:{t:0,b:{t:2,i:[{t:3}],s:"Loading…"}},back:{t:0,b:{t:2,i:[{t:3}],s:"← Back"}},copy:{t:0,b:{t:2,i:[{t:3}],s:"Copy"}}},nav:{new_screen:{t:0,b:{t:2,i:[{t:3}],s:"New screen"}},firmware:{t:0,b:{t:2,i:[{t:3}],s:"Firmware & USB"}},alerts:{t:0,b:{t:2,i:[{t:3}],s:"Alerts"}},settings:{t:0,b:{t:2,i:[{t:3}],s:"Settings"}},new_screen_detail:{t:0,b:{t:2,i:[{t:3}],s:"Connect and install"}}},api:{failed:{t:0,b:{t:2,i:[{t:3}],s:"That didn't work. Refresh the page and try again."}}},copy:{api_key:{copied:{t:0,b:{t:2,i:[{t:3}],s:"API key copied."}},selected:{t:0,b:{t:2,i:[{t:3}],s:"API key is selected. Copy with Ctrl+C or Command+C."}}},layout_json:{copied:{t:0,b:{t:2,i:[{t:3}],s:"Layout JSON copied."}},selected:{t:0,b:{t:2,i:[{t:3}],s:"Layout JSON is selected. Copy with Ctrl+C or Command+C."}}},action_name:{copied:{t:0,b:{t:2,i:[{t:3}],s:"Action name copied."}},selected:{t:0,b:{t:2,i:[{t:3}],s:"Action name is selected. Copy with Ctrl+C or Command+C."}}},yaml:{copied:{t:0,b:{t:2,i:[{t:3}],s:"YAML copied."}},selected:{t:0,b:{t:2,i:[{t:3}],s:"YAML is selected. Copy with Ctrl+C or Command+C."}}},icon_name:{copied:{t:0,b:{t:2,i:[{t:3}],s:"Icon name copied."}},selected:{t:0,b:{t:2,i:[{t:3}],s:"Icon name is selected. Copy with Ctrl+C or Command+C."}}},empty_color:{copied:{t:0,b:{t:2,i:[{t:3}],s:"Empty color copied."}},selected:{t:0,b:{t:2,i:[{t:3}],s:"Empty color is selected. Copy with Ctrl+C or Command+C."}}},color_name:{copied:{t:0,b:{t:2,i:[{t:3}],s:"Color name copied."}},selected:{t:0,b:{t:2,i:[{t:3}],s:"Color name is selected. Copy with Ctrl+C or Command+C."}}}},sidebar:{connection:{unreachable:{t:0,b:{t:2,i:[{t:3}],s:"Management page unreachable · retrying…"}},connected:{t:0,b:{t:2,i:[{t:3}],s:"Home Assistant connected"}},reconnecting:{t:0,b:{t:2,i:[{t:3}],s:"Reconnecting to Home Assistant…"}}},search:{t:0,b:{t:2,i:[{t:3}],s:"Search"}},screens:{t:0,b:{t:2,i:[{t:3}],s:"Screens"}},more:{t:0,b:{t:2,i:[{t:3}],s:"More"}},refresh:{t:0,b:{t:2,i:[{t:3}],s:"Refresh"}},update:{pill:{t:0,b:{t:2,i:[{t:3}],s:"Update"}},button:{t:0,b:{t:2,i:[{t:3}],s:"Update"}},queued:{t:0,b:{t:2,i:[{t:3}],s:"Queued for the update"}},available:{t:0,b:{t:2,i:[{t:3,v:"Update "},{t:4,k:"version"}]}},no_profile:{t:0,b:{t:2,i:[{t:3}],s:"No ESPHome profile found with this device name."}},whats_new:{t:0,b:{t:2,i:[{t:3}],s:"What's new"}},full_log:{t:0,b:{t:2,i:[{t:3}],s:"Full log"}}},host:{hint:{t:0,b:{t:2,i:[{t:3}],s:"The IP address, once; new firmware reports it itself."}},placeholder:{t:0,b:{t:2,i:[{t:3}],s:"IP address, e.g. 192.168.1.50"}},label:{t:0,b:{t:2,i:[{t:3}],s:"IP address"}},start:{t:0,b:{t:2,i:[{t:3}],s:"Start"}}},pending:{installed:{t:0,b:{t:2,i:[{t:3}],s:"Installed, but not yet in Home Assistant. Add the discovered ESPHome device under Settings → Devices & services, paste the API key there, and turn on “Allow the device to perform Home Assistant actions” under Configure."}},downloaded:{t:0,b:{t:2,i:[{t:3}],s:"Firmware downloaded, not yet in Home Assistant. Put it on the screen with ESPHome Web, then add the discovered ESPHome device under Settings → Devices & services, paste the API key there, and allow the Home Assistant actions under Configure."}},not_flashed:{t:0,b:{t:2,i:[{t:3,v:"Not yet in Home Assistant. Already flashed? Add the ESPHome device under Settings → Devices & services, then allow the Home Assistant actions under Configure. Not flashed yet? Firmware & USB → "},{t:4,k:"file"},{t:3,v:"."}]}}},copy_api_key:{t:0,b:{t:2,i:[{t:3}],s:"Copy API key"}}},palette:{groups:{screens:{t:0,b:{t:2,i:[{t:3}],s:"Screens"}},actions:{t:0,b:{t:2,i:[{t:3}],s:"Actions"}},add:{t:0,b:{t:2,i:[{t:3}],s:"Add to this screen"}}},alerts_detail:{t:0,b:{t:2,i:[{t:3}],s:"Cheatsheet and a test alert"}},settings_detail:{t:0,b:{t:2,i:[{t:3}],s:"Updates, Claude"}},nothing_to_save:{t:0,b:{t:2,i:[{t:3}],s:"Nothing to save"}},identify:{t:0,b:{t:2,i:[{t:3}],s:"Identify this screen"}},identify_detail:{t:0,b:{t:2,i:[{t:3}],s:"Blinks the backlight and shows a card"}},identify_needs:{t:0,b:{t:2,i:[{t:3}],s:"Needs a newer firmware"}},export:{t:0,b:{t:2,i:[{t:3}],s:"Export layout"}},export_detail:{t:0,b:{t:2,i:[{t:3}],s:"Download and copy as JSON"}},placeholder:{t:0,b:{t:2,i:[{t:3}],s:"Search screens, entities, actions…"}},empty:{t:0,b:{t:2,i:[{t:3}],s:"Nothing matches. Type part of a screen, entity or action."}}},empty:{choose:{title:{t:0,b:{t:2,i:[{t:3}],s:"Choose a screen"}},text:{t:0,b:{t:2,i:[{t:3}],s:"Pick one of your screens on the left to change its tiles, top bar and settings."}}},start:{title:{t:0,b:{t:2,i:[{t:3}],s:"Start with a screen"}},text:{t:0,b:{t:2,i:[{t:3}],s:"Connect a CYD or Guition via USB to your Home Assistant machine. Profile, firmware, and the first flash happen in one go."}},button:{t:0,b:{t:2,i:[{t:3}],s:"Install new screen"}}}},screen_view:{confirm:{switch:{t:0,b:{t:2,i:[{t:3}],s:"You have unsaved changes. Open a different screen anyway?"}},copy:{t:0,b:{t:2,i:[{t:3}],s:"Replace the unsaved layout with a copy of the other screen's?"}},import:{t:0,b:{t:2,i:[{t:3}],s:"Replace the unsaved layout with the imported one?"}}},saved:{current:{t:0,b:{t:2,i:[{t:3}],s:"Saved. Your screen is being updated."}},other:{t:0,b:{t:2,i:[{t:3,v:"Saved. "},{t:4,k:"name"},{t:3,v:" is being updated."}]}},other_unnamed:{t:0,b:{t:2,i:[{t:3}],s:"Saved. The screen is being updated."}},newer_edit:{t:0,b:{t:2,i:[{t:3}],s:"Saved. Your newest change isn't sent yet: press Save & send again."}}},identified:{t:0,b:{t:2,i:[{t:4,k:"name"},{t:3,v:" blinks and shows a card for a few seconds."}]}},offline:{t:0,b:{t:2,i:[{t:3}],s:"Offline · changes are saved"}},tabs:{layout:{t:0,b:{t:2,i:[{t:3}],s:"Layout"}},settings:{t:0,b:{t:2,i:[{t:3}],s:"Screen settings"}}},sent:{t:0,b:{t:2,i:[{t:3}],s:"Saved · sent to screen"}},all_saved:{t:0,b:{t:2,i:[{t:3}],s:"All saved"}},more:{t:0,b:{t:2,i:[{t:3}],s:"More"}},menu:{identify:{t:0,b:{t:2,i:[{t:3}],s:"Identify"}},identify_hint:{t:0,b:{t:2,i:[{t:3}],s:"blink the screen"}},identify_needs:{t:0,b:{t:2,i:[{t:3}],s:"Needs firmware 0.2.31 or newer"}},inspect_hint:{t:0,b:{t:2,i:[{t:3}],s:"from Home Assistant"}},copy:{t:0,b:{t:2,i:[{t:3}],s:"Copy layout from…"}},copy_screens:{t:0,b:{t:1,c:[{t:2,i:[{t:4,k:"n"},{t:3,v:" screen"}]},{t:2,i:[{t:4,k:"n"},{t:3,v:" screens"}]}]}},copy_none:{t:0,b:{t:2,i:[{t:3}],s:"no other screen"}},copy_tiles:{t:0,b:{t:1,c:[{t:2,i:[{t:4,k:"n"},{t:3,v:" tile"}]},{t:2,i:[{t:4,k:"n"},{t:3,v:" tiles"}]}]}},export:{t:0,b:{t:2,i:[{t:3}],s:"Export layout"}},import:{t:0,b:{t:2,i:[{t:3}],s:"Import layout…"}},override:{t:0,b:{t:2,i:[{t:3}],s:"Override YAML"}},override_hint:{t:0,b:{t:2,i:[{t:3}],s:"advanced"}},override_none:{t:0,b:{t:2,i:[{t:3}],s:"No ESPHome profile found for this screen"}},update:{t:0,b:{t:2,i:[{t:3}],s:"Update firmware"}}}},layout:{removed:{t:0,b:{t:2,i:[{t:4,k:"name"},{t:3,v:" removed"}]}},no_room:{t:0,b:{t:2,i:[{t:3,v:"There is no room for this tile on page "},{t:4,k:"page"},{t:3,v:"."}]}},no_free_page:{t:0,b:{t:2,i:[{t:3}],s:"No page is free for a full-page tile. Free a page first."}},page_taken:{t:0,b:{t:2,i:[{t:3,v:"This screen already has a tile that goes to page "},{t:4,k:"page"},{t:3,v:"."}]}},copied:{t:0,b:{t:2,i:[{t:3,v:"Layout of "},{t:4,k:"name"},{t:3,v:" copied. Save & send when it looks right."}]}},copied_part:{t:0,b:{t:2,i:[{t:3,v:"Layout of "},{t:4,k:"name"},{t:3,v:" copied: "},{t:4,k:"kept"},{t:3,v:" of "},{t:4,k:"total"},{t:3,v:" tiles fit this screen's firmware. Save & send when it looks right."}]}},imported:{t:0,b:{t:2,i:[{t:3}],s:"Layout imported. Save & send when it looks right."}},imported_part:{t:0,b:{t:2,i:[{t:3,v:"Layout imported: "},{t:4,k:"kept"},{t:3,v:" of "},{t:4,k:"total"},{t:3,v:" tiles fit this screen's firmware. Save & send when it looks right."}]}},not_json:{t:0,b:{t:2,i:[{t:3}],s:"That isn't JSON. Export a layout first, or paste one from another ESP Screens."}},no_tiles_in_file:{t:0,b:{t:2,i:[{t:3}],s:"No tiles in this file. Expected a layout exported from ESP Screens."}},count:{t:0,b:{t:1,c:[{t:2,i:[{t:4,k:"n"},{t:3,v:" page · "},{t:4,k:"tiles"},{t:3,v:" / "},{t:4,k:"limit"},{t:3,v:" tiles"}]},{t:2,i:[{t:4,k:"n"},{t:3,v:" pages · "},{t:4,k:"tiles"},{t:3,v:" / "},{t:4,k:"limit"},{t:3,v:" tiles"}]}]}},no_tiles:{t:0,b:{t:2,i:[{t:3}],s:"Add your first light, scene, or device from the library."}},how_to:{t:0,b:{t:2,i:[{t:3}],s:"Tap the top bar or a tile to change it. Drag to move; drop on the next page for a new one."}},positions_hint:{t:0,b:{t:2,i:[{t:3,v:"Empty slots and fixed positions work from firmware 0.2.26. This screen (firmware "},{t:4,k:"firmware"},{t:3,v:") shifts the tiles up to the first free slot until that update."}]}},aria:{t:0,b:{t:2,i:[{t:3}],s:"Screen layout"}},add_page:{t:0,b:{t:2,i:[{t:3}],s:"+ Add page"}},max_pages:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"1 page is the most"},{t:2,i:[{t:4,k:"n"},{t:3,v:" pages is the most"}]}]}}},page:{label:{t:0,b:{t:2,i:[{t:3,v:"Page "},{t:4,k:"page"}]}},remove:{t:0,b:{t:2,i:[{t:3}],s:"Remove page"}},remove_title:{t:0,b:{t:2,i:[{t:3}],s:"The pages after this one shift up one slot"}},edit_bar:{t:0,b:{t:2,i:[{t:3}],s:"Edit top bar"}},cell:{title:{t:0,b:{t:2,i:[{t:3}],s:"Empty slot. Click to add a tile here, or drag one over."}},aria:{t:0,b:{t:2,i:[{t:3,v:"Empty slot "},{t:4,k:"slot"},{t:3,v:" on page "},{t:4,k:"page"},{t:3,v:": add the next tile here"}]}},next:{t:0,b:{t:2,i:[{t:3}],s:"Next tile goes here"}},empty:{t:0,b:{t:2,i:[{t:3}],s:"Empty"}}}},library:{title:{t:0,b:{t:2,i:[{t:3}],s:"Library"}},entities:{t:0,b:{t:1,c:[{t:2,i:[{t:4,k:"n"},{t:3,v:" entity"}]},{t:2,i:[{t:4,k:"n"},{t:3,v:" entities"}]}]}},search:{t:0,b:{t:2,i:[{t:3}],s:"Search by name, device, or room…"}},search_label:{t:0,b:{t:2,i:[{t:3}],s:"Add an entity"}},filters:{all:{t:0,b:{t:2,i:[{t:3}],s:"All"}},light:{t:0,b:{t:2,i:[{t:3}],s:"Lights"}},climate:{t:0,b:{t:2,i:[{t:3}],s:"Climate"}},switch:{t:0,b:{t:2,i:[{t:3}],s:"Switches"}},binary_sensor:{t:0,b:{t:2,i:[{t:3}],s:"Status"}},button:{t:0,b:{t:2,i:[{t:3}],s:"Actions"}},script:{t:0,b:{t:2,i:[{t:3}],s:"Scripts"}},fan:{t:0,b:{t:2,i:[{t:3}],s:"Fans"}},cover:{t:0,b:{t:2,i:[{t:3}],s:"Covers"}},scene:{t:0,b:{t:2,i:[{t:3}],s:"Scenes"}},vacuum:{t:0,b:{t:2,i:[{t:3}],s:"Vacuum"}},sensor:{t:0,b:{t:2,i:[{t:3}],s:"Sensors"}},media_player:{t:0,b:{t:2,i:[{t:3}],s:"Media"}},weather:{t:0,b:{t:2,i:[{t:3}],s:"Weather"}},number:{t:0,b:{t:2,i:[{t:3}],s:"Values"}},select:{t:0,b:{t:2,i:[{t:3}],s:"Selects"}},person:{t:0,b:{t:2,i:[{t:3}],s:"People"}},timer:{t:0,b:{t:2,i:[{t:3}],s:"Timers"}},screen:{t:0,b:{t:2,i:[{t:3}],s:"Screen"}}},room:{t:0,b:{t:2,i:[{t:3}],s:"Room"}},all_rooms:{t:0,b:{t:2,i:[{t:3}],s:"All rooms"}},hide_placed:{t:0,b:{t:2,i:[{t:3}],s:"Hide placed"}},hide_placed_title:{t:0,b:{t:2,i:[{t:3}],s:"Hide what is already on this screen"}},all_placed:{t:0,b:{t:2,i:[{t:3}],s:"Everything here is already on this screen."}},none_found:{t:0,b:{t:2,i:[{t:3}],s:"No entities found. Try a different name, room or filter."}},full:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"This screen holds 1 tile."},{t:2,i:[{t:3,v:"This screen holds "},{t:4,k:"n"},{t:3,v:" tiles."}]}]}},full_update:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"This screen holds 1 tile; update its firmware for 48."},{t:2,i:[{t:3,v:"This screen holds "},{t:4,k:"n"},{t:3,v:" tiles; update its firmware for 48."}]}]}},hint:{t:0,b:{t:2,i:[{t:3}],s:"Drag onto a page, or tap + to add to the first free slot. ⌘K searches everything."}}},domains:{light:{t:0,b:{t:2,i:[{t:3}],s:"Light"}},climate:{t:0,b:{t:2,i:[{t:3}],s:"Climate"}},vacuum:{t:0,b:{t:2,i:[{t:3}],s:"Vacuum"}},fan:{t:0,b:{t:2,i:[{t:3}],s:"Fan"}},cover:{t:0,b:{t:2,i:[{t:3}],s:"Cover"}},media_player:{t:0,b:{t:2,i:[{t:3}],s:"Media"}},sensor:{t:0,b:{t:2,i:[{t:3}],s:"Sensor"}},binary_sensor:{t:0,b:{t:2,i:[{t:3}],s:"Status"}},switch:{t:0,b:{t:2,i:[{t:3}],s:"Switch"}},input_boolean:{t:0,b:{t:2,i:[{t:3}],s:"Switch"}},scene:{t:0,b:{t:2,i:[{t:3}],s:"Scene"}},script:{t:0,b:{t:2,i:[{t:3}],s:"Script"}},weather:{t:0,b:{t:2,i:[{t:3}],s:"Weather"}},number:{t:0,b:{t:2,i:[{t:3}],s:"Value"}},input_number:{t:0,b:{t:2,i:[{t:3}],s:"Value"}},select:{t:0,b:{t:2,i:[{t:3}],s:"Select"}},input_select:{t:0,b:{t:2,i:[{t:3}],s:"Select"}},button:{t:0,b:{t:2,i:[{t:3}],s:"Action"}},input_button:{t:0,b:{t:2,i:[{t:3}],s:"Action"}},screen:{t:0,b:{t:2,i:[{t:3}],s:"Screen"}},sun:{t:0,b:{t:2,i:[{t:3}],s:"Sun"}},timer:{t:0,b:{t:2,i:[{t:3}],s:"Timer"}},person:{t:0,b:{t:2,i:[{t:3}],s:"Person"}},camera:{t:0,b:{t:2,i:[{t:3}],s:"Camera"}},image:{t:0,b:{t:2,i:[{t:3}],s:"Image"}},entity:{t:0,b:{t:2,i:[{t:3}],s:"Entity"}}},displays:{standard:{t:0,b:{t:2,i:[{t:3}],s:"standard"}},watch:{t:0,b:{t:2,i:[{t:3}],s:"large value"}},forecast:{t:0,b:{t:2,i:[{t:3}],s:"weather forecast"}},graph:{t:0,b:{t:2,i:[{t:3}],s:"graph"}},digital:{t:0,b:{t:2,i:[{t:3}],s:"digital clock"}},analog:{t:0,b:{t:2,i:[{t:3}],s:"analog clock"}},sunpath:{t:0,b:{t:2,i:[{t:3}],s:"sun path"}},live:{t:0,b:{t:2,i:[{t:3}],s:"live picture"}},cover:{t:0,b:{t:2,i:[{t:3}],s:"album cover"}}},sizes:{single:{t:0,b:{t:2,i:[{t:3}],s:"normal"}},wide:{t:0,b:{t:2,i:[{t:3}],s:"double"}},full:{t:0,b:{t:2,i:[{t:3}],s:"full page"}}},tile:{name:{t:0,b:{t:2,i:[{t:3}],s:"Name on the screen"}},icon:{auto_ha:{t:0,b:{t:2,i:[{t:3}],s:"Automatic (from Home Assistant)"}},auto_default:{t:0,b:{t:2,i:[{t:3}],s:"Automatic (default)"}},needs_firmware:{t:0,b:{t:2,i:[{t:3}],s:"The screen shows a chosen icon from firmware 0.2.18."}}},goes_to:{label:{t:0,b:{t:2,i:[{t:3}],s:"Goes to page"}},empty:{t:0,b:{t:2,i:[{t:4,k:"page"},{t:3,v:" (empty)"}]}},needs_firmware:{t:0,b:{t:2,i:[{t:3}],s:"Navigation tiles need firmware 0.2.62: press Update on the screen first."}},no_page:{t:0,b:{t:2,i:[{t:3,v:"This screen has no page "},{t:4,k:"page"},{t:3,v:", so a tap opens its last page. Choose another page."}]}},hint:{t:0,b:{t:2,i:[{t:3}],s:"A tap on the tile opens that page."}}},display:{label:{t:0,b:{t:2,i:[{t:3}],s:"Display"}},digital:{t:0,b:{t:2,i:[{t:3}],s:"Digital clock"}},analog:{t:0,b:{t:2,i:[{t:3}],s:"Analog clock"}},standard:{t:0,b:{t:2,i:[{t:3}],s:"Name and status"}},watch:{t:0,b:{t:2,i:[{t:3}],s:"Large value"}},forecast:{t:0,b:{t:2,i:[{t:3}],s:"Weather forecast"}},graph:{t:0,b:{t:2,i:[{t:3}],s:"Graph"}},sunpath:{t:0,b:{t:2,i:[{t:3}],s:"Sun path"}},live:{t:0,b:{t:2,i:[{t:3}],s:"Live picture"}},live_hint:{t:0,b:{t:2,i:[{t:3}],s:"A small picture of the camera in the icon's place, refreshed at the pace below while the page is on screen. A tap still opens it full screen."}},live_needs_firmware:{t:0,b:{t:2,i:[{t:3}],s:"A live picture needs firmware 0.2.77 or newer: press Update on the screen after saving."}},cover:{t:0,b:{t:2,i:[{t:3}],s:"Album cover"}},cover_hint:{t:0,b:{t:2,i:[{t:3}],s:"The album cover of what plays in the icon's place, like Home Assistant's own tile; a player without a picture keeps its icon. A tap still opens the card."}},cover_needs_firmware:{t:0,b:{t:2,i:[{t:3}],s:"The album cover on the tile needs firmware 0.2.78 or newer: press Update on the screen after saving."}},no_graph:{t:0,b:{t:2,i:[{t:3}],s:"Home Assistant has no numbers for this entity, so the graph stays empty. Choose another display."}},no_forecast:{t:0,b:{t:2,i:[{t:3}],s:"This weather service has no daily forecast in Home Assistant. Choose another display."}}},refresh:{label:{t:0,b:{t:2,i:[{t:3}],s:"Refresh"}},seconds:{t:0,b:{t:2,i:[{t:3,v:"Every "},{t:4,k:"n"},{t:3,v:" s"}]}}},size:{label:{t:0,b:{t:2,i:[{t:3}],s:"Size"}},single:{t:0,b:{t:2,i:[{t:3}],s:"Normal"}},wide:{t:0,b:{t:2,i:[{t:3}],s:"Double-width"}},full:{t:0,b:{t:2,i:[{t:3}],s:"Full page"}},full_hint:{t:0,b:{t:2,i:[{t:3}],s:"Full page: one big button in the tile's own colour; a slider, controls or a graph sit at the bottom of it."}},needs_firmware:{t:0,b:{t:2,i:[{t:3}],s:"A full-page tile needs firmware 0.2.62: press Update on the screen first."}}},page:{label:{t:0,b:{t:2,i:[{t:3}],s:"Page"}},new:{t:0,b:{t:2,i:[{t:3}],s:"New page"}}},controls:{label:{t:0,b:{t:2,i:[{t:3}],s:"Direct control on the tile"}},not_offered:{t:0,b:{t:2,i:[{t:3}],s:"Home Assistant doesn't offer this control for this entity, so it stays empty on the screen. Choose another one."}},full_hint:{t:0,b:{t:2,i:[{t:3}],s:"At the bottom of the full-page tile; a tap anywhere else works as set below."}},wide_hint:{t:0,b:{t:2,i:[{t:3}],s:"On the right of the double-width tile, like the rows in Home Assistant. Tapping the name works as set below."}},needs_firmware:{t:0,b:{t:2,i:[{t:3}],s:"The screen shows direct control from firmware 0.2.19; until then the tile stays as it was."}}},tap:{label:{t:0,b:{t:2,i:[{t:3}],s:"On tap"}},auto:{t:0,b:{t:2,i:[{t:3}],s:"Automatic"}},detail:{t:0,b:{t:2,i:[{t:3}],s:"Open control"}},none:{t:0,b:{t:2,i:[{t:3}],s:"View only"}},toggle:{t:0,b:{t:2,i:[{t:3}],s:"On / off"}},action:{t:0,b:{t:2,i:[{t:3}],s:"Perform action"}},no_toggle:{t:0,b:{t:2,i:[{t:3}],s:"Home Assistant can't turn this on and off, so a tap does nothing. Choose another option."}},toggle_needs_firmware:{t:0,b:{t:2,i:[{t:3}],s:"The screen switches this from firmware 0.2.58: press Update on the screen. Until then a tap opens its card."}},hold:{t:0,b:{t:2,i:[{t:3}],s:"Hold the tile to open its card."}}},slider:{label:{t:0,b:{t:2,i:[{t:3}],s:"Small slider on the tile"}},no:{t:0,b:{t:2,i:[{t:3}],s:"No"}},yes:{t:0,b:{t:2,i:[{t:3}],s:"Yes, control directly"}},nothing:{t:0,b:{t:2,i:[{t:3}],s:"Home Assistant has nothing a slider can change for this entity. Choose No."}}},history:{label:{t:0,b:{t:2,i:[{t:3}],s:"History"}},hours:{t:0,b:{t:1,c:[{t:2,i:[{t:4,k:"n"},{t:3,v:" hour"}]},{t:2,i:[{t:4,k:"n"},{t:3,v:" hours"}]}]}}},background:{label:{t:0,b:{t:2,i:[{t:3}],s:"Pastel background"}},aria:{t:0,b:{t:2,i:[{t:3,v:"Background: "},{t:4,k:"name"}]}}}},tile_card:{label:{t:0,b:{t:2,i:[{t:4,k:"name"},{t:3,v:", slot "},{t:4,k:"slot"},{t:3,v:" on page "},{t:4,k:"page"},{t:3,v:". Enter: configure, arrow keys: move"}]}},remove:{t:0,b:{t:2,i:[{t:3}],s:"Remove tile"}},remove_named:{t:0,b:{t:2,i:[{t:3,v:"Remove "},{t:4,k:"name"}]}}},action:{label:{t:0,b:{t:2,i:[{t:3}],s:"Action"}},asking:{t:0,b:{t:2,i:[{t:3}],s:"Asking Home Assistant which actions this entity has…"}},not_answering:{t:0,b:{t:2,i:[{t:3}],s:"Home Assistant isn't answering right now. Try again in a moment."}},choose:{t:0,b:{t:2,i:[{t:3}],s:"Choose an action"}},search:{t:0,b:{t:2,i:[{t:3}],s:"Search, for example toggle, position, or play"}},search_label:{t:0,b:{t:2,i:[{t:3}],s:"Search for an action"}},none_found:{t:0,b:{t:2,i:[{t:3}],s:"No action found."}},gone:{t:0,b:{t:2,i:[{t:3}],s:"Home Assistant doesn't offer this action for this entity any more, so a tap does nothing. Choose another one."}},optional:{t:0,b:{t:2,i:[{t:4,k:"name"},{t:3,v:" (optional)"}]}},not_set:{t:0,b:{t:2,i:[{t:3}],s:"Not set"}},on:{t:0,b:{t:2,i:[{t:3}],s:"On"}},off:{t:0,b:{t:2,i:[{t:3}],s:"Off"}},needs:{t:0,b:{t:2,i:[{t:3,v:"Home Assistant needs "},{t:4,k:"fields"},{t:3,v:"."}]}},needs_firmware:{t:0,b:{t:2,i:[{t:3}],s:"The screen performs an action from firmware 0.2.58: press Update on the screen. Until then a tap works as Automatic."}}},icon:{label:{t:0,b:{t:2,i:[{t:3}],s:"Icon"}},none:{t:0,b:{t:2,i:[{t:3}],s:"No icon"}},search:{t:0,b:{t:2,i:[{t:3}],s:"Search, for example lamp, music, or door"}},search_label:{t:0,b:{t:2,i:[{t:3}],s:"Search for an icon"}},none_text_only:{t:0,b:{t:2,i:[{t:3}],s:"No icon, text only"}},aria:{t:0,b:{t:2,i:[{t:3,v:"Icon: "},{t:4,k:"name"}]}},none_found:{t:0,b:{t:2,i:[{t:3}],s:"No icon found."}}},inspect:{title:{t:0,b:{t:2,i:[{t:3}],s:"Current data"}},subtitle:{t:0,b:{t:2,i:[{t:3}],s:"Connection, status, and supported properties"}},reading:{t:0,b:{t:2,i:[{t:3}],s:"Reading…"}},fetching:{t:0,b:{t:2,i:[{t:3}],s:"Fetching current HA status…"}},status:{t:0,b:{t:2,i:[{t:3,v:"Status: "},{t:4,k:"status"}]}},options:{t:0,b:{t:2,i:[{t:3,v:"Small slider: "},{t:4,k:"slider"},{t:3,v:" · Display: "},{t:4,k:"display"},{t:3,v:" · Size: "},{t:4,k:"size"},{t:3,v:" · Control: "},{t:4,k:"control"},{t:3,v:" · Background: "},{t:4,k:"background"}]}},yes:{t:0,b:{t:2,i:[{t:3}],s:"yes"}},no:{t:0,b:{t:2,i:[{t:3}],s:"no"}},control_none:{t:0,b:{t:2,i:[{t:3}],s:"none"}},background_default:{t:0,b:{t:2,i:[{t:3}],s:"Default"}},read_again:{t:0,b:{t:2,i:[{t:3}],s:"Read again"}}},topbar:{removed:{t:0,b:{t:2,i:[{t:4,k:"name"},{t:3,v:" removed from the top bar"}]}},full:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"The top bar has room for 1 item."},{t:2,i:[{t:3,v:"The top bar has room for "},{t:4,k:"n"},{t:3,v:" items."}]}]}},already:{t:0,b:{t:2,i:[{t:3}],s:"This is already in the top bar."}},title:{t:0,b:{t:2,i:[{t:3}],s:"Top bar"}},aria:{t:0,b:{t:2,i:[{t:3,v:"Top bar: "},{t:4,k:"name"}]}},builtin:{t:0,b:{t:2,i:[{t:3}],s:"From the screen itself, also works without Home Assistant"}},items:{t:0,b:{t:1,c:[{t:2,i:[{t:4,k:"used"},{t:3,v:" of "},{t:4,k:"n"},{t:3,v:" item"}]},{t:2,i:[{t:4,k:"used"},{t:3,v:" of "},{t:4,k:"n"},{t:3,v:" items"}]}]}},name:{t:0,b:{t:2,i:[{t:3}],s:"Left: name"}},name_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"For example: Living room"}},right:{t:0,b:{t:2,i:[{t:3}],s:"Right: time, sensors, or a clock"}},item_label:{t:0,b:{t:2,i:[{t:4,k:"name"},{t:3,v:", slot "},{t:4,k:"slot"},{t:3,v:". Enter: configure, arrows: move"}]}},remove_named:{t:0,b:{t:2,i:[{t:3,v:"Remove "},{t:4,k:"name"},{t:3,v:" from the top bar"}]}},max:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"Maximum 1 item"},{t:2,i:[{t:3,v:"Maximum "},{t:4,k:"n"},{t:3,v:" items"}]}]}},add_title:{t:0,b:{t:2,i:[{t:3}],s:"Add the time, date, analog clock, or an entity"}},add_button:{t:0,b:{t:2,i:[{t:3}],s:"+ Add time, date, or an entity"}},hint:{overflow:{t:0,b:{t:2,i:[{t:3}],s:"Not everything fits next to the name: the screen drops the dashed items. Remove one or choose a shorter name."}},reorder:{t:0,b:{t:2,i:[{t:3}],s:"Drag to reorder; tap an item to configure it."}},needs_firmware:{t:0,b:{t:2,i:[{t:3,v:"Sensors, the date, and the analog clock appear from firmware "},{t:4,k:"version"},{t:3,v:"; until that update, this screen shows the name and, if the time is in the bar, the clock."}]}}},detail:{hidden:{t:0,b:{t:2,i:[{t:3}],s:"Hidden: not active right now"}},overflow:{t:0,b:{t:2,i:[{t:3}],s:"Doesn't fit next to the name"}},dial:{t:0,b:{t:2,i:[{t:3}],s:"Dial"}}},live:{hidden:{t:0,b:{t:2,i:[{t:3}],s:"Hidden right now: not active"}},overflow:{t:0,b:{t:2,i:[{t:3}],s:"Doesn't currently fit next to the name"}},looks:{t:0,b:{t:2,i:[{t:3}],s:"How it looks on the screen"}}},analog_sample:{t:0,b:{t:2,i:[{t:3}],s:"Small dial with the time"}},content:{label:{t:0,b:{t:2,i:[{t:3}],s:"What to show"}},hint:{t:0,b:{t:2,i:[{t:3}],s:"Last changed keeps counting on the screen itself: “Just now”, “5 min ago”, “Yesterday”."}}},auto_icon:{t:0,b:{t:2,i:[{t:3}],s:"Automatic (like Home Assistant)"}},show:{label:{t:0,b:{t:2,i:[{t:3}],s:"Show"}},hint:{t:0,b:{t:2,i:[{t:3}],s:"Only when active hides the item as long as it's off, closed, away, or 0. Handy for an open door, a running washing machine, or who's home."}}},clock_24:{t:0,b:{t:2,i:[{t:3,v:"24 hour clock · change under "},{t:4,k:"settings"}]}},clock_12:{t:0,b:{t:2,i:[{t:3,v:"12 hour clock · change under "},{t:4,k:"settings"}]}},clock_settings:{t:0,b:{t:2,i:[{t:3}],s:"Settings → Language & region"}},date_hint:{t:0,b:{t:2,i:[{t:4,k:"date"},{t:3,v:" today. The date follows the screen's own clock."}]}},up:{t:0,b:{t:2,i:[{t:3}],s:"↑ Up"}},down:{t:0,b:{t:2,i:[{t:3}],s:"↓ Down"}},add:{title:{t:0,b:{t:2,i:[{t:3}],s:"Add to the top bar"}},slots:{t:0,b:{t:1,c:[{t:2,i:[{t:4,k:"used"},{t:3,v:" of "},{t:4,k:"n"},{t:3,v:" slot used"}]},{t:2,i:[{t:4,k:"used"},{t:3,v:" of "},{t:4,k:"n"},{t:3,v:" slots used"}]}]}},builtin:{t:0,b:{t:2,i:[{t:3}],s:"From the screen itself"}},added:{t:0,b:{t:2,i:[{t:3}],s:"Already added"}},suggestions:{t:0,b:{t:2,i:[{t:3}],s:"Suggestions from Home Assistant"}},entity:{t:0,b:{t:2,i:[{t:3}],s:"An entity"}},search:{t:0,b:{t:2,i:[{t:3}],s:"Search by name, room, or entity, e.g. temperature or door"}},search_label:{t:0,b:{t:2,i:[{t:3}],s:"Search for an entity for the top bar"}},none_found:{t:0,b:{t:2,i:[{t:3}],s:"No entities found."}}}},screen_settings:{groups:{brightness:{t:0,b:{t:2,i:[{t:3}],s:"Brightness"}},night:{t:0,b:{t:2,i:[{t:3}],s:"Night"}},screen:{t:0,b:{t:2,i:[{t:3}],s:"Screen"}}},rows:{brightness:{t:0,b:{t:2,i:[{t:3}],s:"Brightness"}},dark_mode:{t:0,b:{t:2,i:[{t:3}],s:"Dark mode"}},standby_enabled:{t:0,b:{t:2,i:[{t:3}],s:"Auto standby"}},standby_seconds:{t:0,b:{t:2,i:[{t:3}],s:"Standby after"}},standby_brightness:{t:0,b:{t:2,i:[{t:3}],s:"Standby brightness"}},night_enabled:{t:0,b:{t:2,i:[{t:3}],s:"Night mode"}},night_start:{t:0,b:{t:2,i:[{t:3}],s:"Starts"}},night_end:{t:0,b:{t:2,i:[{t:3}],s:"Ends"}},night_brightness:{t:0,b:{t:2,i:[{t:3}],s:"Night brightness"}},auto_home:{t:0,b:{t:2,i:[{t:3}],s:"Back to page 1"}},auto_home_seconds:{t:0,b:{t:2,i:[{t:3}],s:"After"}},home_on_standby:{t:0,b:{t:2,i:[{t:3}],s:"Also on standby"}},swipe_pages:{t:0,b:{t:2,i:[{t:3}],s:"Swipe between pages"}},page_buttons:{t:0,b:{t:2,i:[{t:3}],s:"Page buttons"}},rotation:{t:0,b:{t:2,i:[{t:3}],s:"Rotation"}}},duration:{seconds:{t:0,b:{t:2,i:[{t:4,k:"n"},{t:3,v:" sec"}]}},minutes:{t:0,b:{t:2,i:[{t:4,k:"n"},{t:3,v:" min"}]}},hours:{t:0,b:{t:2,i:[{t:4,k:"n"},{t:3,v:" h"}]}},hours_minutes:{t:0,b:{t:2,i:[{t:4,k:"h"},{t:3,v:" h "},{t:4,k:"m"}]}}},time:{am:{t:0,b:{t:2,i:[{t:4,k:"time"},{t:3,v:" AM"}]}},pm:{t:0,b:{t:2,i:[{t:4,k:"time"},{t:3,v:" PM"}]}}},other_screen_busy:{t:0,b:{t:2,i:[{t:3}],s:"Still saving the other screen's settings. Try again in a moment."}},reach:{intro:{t:0,b:{t:2,i:[{t:3}],s:"Page buttons and swiping are off, so only Go to page tiles change the page."}},pages:{t:0,b:{t:1,c:[{t:2,i:[{t:3,v:"page "},{t:4,k:"list"}]},{t:2,i:[{t:3,v:"pages "},{t:4,k:"list"}]}]}},tiles:{t:0,b:{t:1,c:[{t:2,i:[{t:3,v:"You have "},{t:4,k:"n"},{t:3,v:" Go to page tile, to "},{t:4,k:"targets"},{t:3,v:"."}]},{t:2,i:[{t:3,v:"You have "},{t:4,k:"n"},{t:3,v:" Go to page tiles, to "},{t:4,k:"targets"},{t:3,v:"."}]}]}},tiles_missing_one:{t:0,b:{t:1,c:[{t:2,i:[{t:3,v:"You have "},{t:4,k:"n"},{t:3,v:" Go to page tile, to "},{t:4,k:"targets"},{t:3,v:", but none to "},{t:4,k:"missing"},{t:3,v:", so you can't reach it."}]},{t:2,i:[{t:3,v:"You have "},{t:4,k:"n"},{t:3,v:" Go to page tiles, to "},{t:4,k:"targets"},{t:3,v:", but none to "},{t:4,k:"missing"},{t:3,v:", so you can't reach it."}]}]}},tiles_missing_more:{t:0,b:{t:1,c:[{t:2,i:[{t:3,v:"You have "},{t:4,k:"n"},{t:3,v:" Go to page tile, to "},{t:4,k:"targets"},{t:3,v:", but none to "},{t:4,k:"missing"},{t:3,v:", so you can't reach them."}]},{t:2,i:[{t:3,v:"You have "},{t:4,k:"n"},{t:3,v:" Go to page tiles, to "},{t:4,k:"targets"},{t:3,v:", but none to "},{t:4,k:"missing"},{t:3,v:", so you can't reach them."}]}]}},none:{t:0,b:{t:2,i:[{t:3}],s:"You have no Go to page tiles."}},none_missing_one:{t:0,b:{t:2,i:[{t:3,v:"You have no Go to page tiles to "},{t:4,k:"missing"},{t:3,v:", so you can't reach it."}]}},none_missing_more:{t:0,b:{t:2,i:[{t:3,v:"You have no Go to page tiles to "},{t:4,k:"missing"},{t:3,v:", so you can't reach them."}]}},cut_off:{t:0,b:{t:2,i:[{t:3,v:"The tiles to "},{t:4,k:"pages"},{t:3,v:" are only on pages you can't reach."}]}},no_way_back:{t:0,b:{t:2,i:[{t:3,v:"From "},{t:4,k:"pages"},{t:3,v:" no tile leads back to page 1."}]}}},status:{offline:{t:0,b:{t:2,i:[{t:3}],s:"This screen is offline. Its settings can change once it's back."}},screen:{t:0,b:{t:2,i:[{t:3}],s:"Changes apply on the screen at once, and show up here when they change there."}},app:{t:0,b:{t:2,i:[{t:3}],s:"Changes apply at once. Firmware 0.2.49 lets the screen keep them itself."}}},unavailable:{t:0,b:{t:2,i:[{t:3}],s:"This entity is off in Home Assistant, or the screen is restarting."}},lower:{t:0,b:{t:2,i:[{t:4,k:"name"},{t:3,v:" lower"}]}},higher:{t:0,b:{t:2,i:[{t:4,k:"name"},{t:3,v:" higher"}]}}},update:{starting:{t:0,b:{t:2,i:[{t:3}],s:"Starting update…"}},building:{t:0,b:{t:2,i:[{t:3}],s:"Building the firmware…"}},writing:{t:0,b:{t:2,i:[{t:3}],s:"Writing the firmware over Wi-Fi…"}},phases:{install:{t:0,b:{t:2,i:[{t:3}],s:"Building and installing…"}},verify:{t:0,b:{t:2,i:[{t:3}],s:"Waiting for the screen to come back…"}},settle:{t:0,b:{t:2,i:[{t:3}],s:"Checking that it stays stable…"}}},new_language:{t:0,b:{t:2,i:[{t:3,v:"New language: "},{t:4,k:"name"}]}}},settings:{updates:{auto_on:{t:0,b:{t:2,i:[{t:3}],s:"Screens will now update automatically at night."}},auto_off:{t:0,b:{t:2,i:[{t:3}],s:"Automatic updates are off."}},title:{t:0,b:{t:2,i:[{t:3}],s:"Firmware updates"}},busy:{t:0,b:{t:2,i:[{t:3,v:"Updating to firmware "},{t:4,k:"version"},{t:3,v:"…"}]}},no_screens:{t:0,b:{t:2,i:[{t:3,v:"No screen paired yet. New screens get firmware "},{t:4,k:"version"},{t:3,v:"."}]}},available:{t:0,b:{t:1,c:[{t:2,i:[{t:3,v:"Firmware "},{t:4,k:"version"},{t:3,v:" is available for "},{t:4,k:"n"},{t:3,v:" screen."}]},{t:2,i:[{t:3,v:"Firmware "},{t:4,k:"version"},{t:3,v:" is available for "},{t:4,k:"n"},{t:3,v:" screens."}]}]}},current:{t:0,b:{t:2,i:[{t:3,v:"All screens have firmware "},{t:4,k:"version"},{t:3,v:"."}]}},all:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"Update 1 screen"},{t:2,i:[{t:3,v:"Update all "},{t:4,k:"n"},{t:3,v:" screens"}]}]}},whats_new:{t:0,b:{t:2,i:[{t:3,v:"What's new in firmware "},{t:4,k:"version"}]}},auto_label:{t:0,b:{t:2,i:[{t:3}],s:"Update automatically every night"}},auto_hint:{t:0,b:{t:2,i:[{t:3}],s:"Between 03:00 and 06:00, one screen at a time. Stops on an error and reports it in Home Assistant."}}},claude:{installed:{t:0,b:{t:2,i:[{t:3}],s:"Skill installed. Claude Code picks it up right away."}},installed_restart:{t:0,b:{t:2,i:[{t:3}],s:"Skill installed. Restart Claude Code once so it finds the new skills folder."}},text:{t:0,b:{t:2,i:[{t:3}],s:'Teach Claude about ESP Screens, then ask: "Show an alert on all my screens when the mailbox is full." Claude knows the alert events, every field, color, and icon.'}},install:{t:0,b:{t:2,i:[{t:3}],s:"Install for Claude Code"}},install_again:{t:0,b:{t:2,i:[{t:3}],s:"Install again"}},update:{t:0,b:{t:2,i:[{t:3}],s:"Update the skill"}},not_installed:{t:0,b:{t:2,i:[{t:3}],s:"Not installed"}},installed_chip:{t:0,b:{t:2,i:[{t:3}],s:"● Installed"}},newer:{t:0,b:{t:2,i:[{t:3}],s:"Installed · a newer version is ready"}},writes:{t:0,b:{t:2,i:[{t:3,v:"For Claude Code in Home Assistant. Writes one file to "},{t:4,k:"path"},{t:3,v:"; installing again replaces it."}]}},download:{t:0,b:{t:2,i:[{t:3}],s:"Download for claude.ai"}},upload:{t:0,b:{t:2,i:[{t:3}],s:"Upload the zip in Claude under Customize → Skills."}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Everything around your screens."}},back:{t:0,b:{t:2,i:[{t:3}],s:"← My screens"}},screens:{title:{t:0,b:{t:2,i:[{t:3}],s:"Screens"}},text:{t:0,b:{t:2,i:[{t:3}],s:"Add a screen, or build and reinstall the firmware of one you already have."}},firmware_detail:{t:0,b:{t:2,i:[{t:3}],s:"Build and install via USB or Wi-Fi"}}},language:{title:{t:0,b:{t:2,i:[{t:3}],s:"Language & region"}},screen_language:{t:0,b:{t:2,i:[{t:3}],s:"Screen language"}},auto:{t:0,b:{t:2,i:[{t:3,v:"Home Assistant's language ("},{t:4,k:"name"},{t:3,v:")"}]}},auto_plain:{t:0,b:{t:2,i:[{t:3}],s:"Home Assistant's language"}},ha_missing:{t:0,b:{t:2,i:[{t:3}],s:"The screens use English until Home Assistant's language is available."}},unchecked:{t:0,b:{t:2,i:[{t:4,k:"name"},{t:3,v:" · not checked yet, help welcome"}]}},help:{t:0,b:{t:2,i:[{t:4,k:"name"},{t:3,v:" is not checked yet, help welcome: "},{t:4,k:"guide"}]}},guide:{t:0,b:{t:2,i:[{t:3}],s:"how to translate"}},update_hint:{t:0,b:{t:2,i:[{t:3}],s:"After a change every screen needs a firmware update, one build each: with its Update button, or in the nightly updates."}},time:{t:0,b:{t:2,i:[{t:3}],s:"Time format"}},time_auto:{t:0,b:{t:2,i:[{t:3,v:"Automatic, follows the language ("},{t:4,k:"clock"},{t:3,v:")"}]}},clock_24:{t:0,b:{t:2,i:[{t:3}],s:"24 hour"}},clock_12:{t:0,b:{t:2,i:[{t:3}],s:"12 hour"}},numbers:{t:0,b:{t:2,i:[{t:3}],s:"Number format"}},numbers_auto:{t:0,b:{t:2,i:[{t:3,v:"Automatic, follows the language ("},{t:4,k:"example"},{t:3,v:")"}]}},profile:{t:0,b:{t:2,i:[{t:3,v:"Your Home Assistant profile: "},{t:4,k:"formats"}]}},use_profile:{t:0,b:{t:2,i:[{t:3}],s:"Use these"}},editor_hint:{t:0,b:{t:2,i:[{t:3}],s:"The editor itself follows the language of your Home Assistant profile."}},saved:{t:0,b:{t:2,i:[{t:3}],s:"Saved."}},saved_language:{t:0,b:{t:2,i:[{t:3}],s:"Saved. Every screen takes the new language with its next update."}}},alerts:{text:{t:0,b:{t:2,i:[{t:3}],s:"A card over the whole screen from an automation, on one screen or on all of them. The cheatsheet has the action names, fields, icons, and colors, and a form to try one."}},detail:{t:0,b:{t:2,i:[{t:3}],s:"Full-screen notifications, from an automation"}}}},firmware:{title:{t:0,b:{t:2,i:[{t:3}],s:"Build and install screen firmware"}},intro:{t:0,b:{t:2,i:[{t:3,v:"The built-in ESPHome CLI uses your own profile (YAML with keys) and secrets. Choose the screen's profile, then a USB port (screen connected to the Home Assistant machine), "},{t:4,k:"ota"},{t:3,v:" with the hostname, or "},{t:4,k:"download"},{t:3,v:" to put the firmware on the screen from your own computer. "},{t:4,k:"check"},{t:3,v:" only validates, "},{t:4,k:"build"},{t:3,v:" compiles, "},{t:4,k:"install"},{t:3,v:" puts the firmware on the screen. Your tiles stay as they are in ESP Screens. The first build takes a few minutes."}]}},ota:{t:0,b:{t:2,i:[{t:3}],s:"Wi-Fi / OTA"}},download:{t:0,b:{t:2,i:[{t:3}],s:"Download"}},check:{t:0,b:{t:2,i:[{t:3}],s:"Check"}},build:{t:0,b:{t:2,i:[{t:3}],s:"Build only"}},install:{t:0,b:{t:2,i:[{t:3}],s:"Build & install"}},build_download:{t:0,b:{t:2,i:[{t:3}],s:"Build & download"}},no_cli:{t:0,b:{t:2,i:[{t:3}],s:"The ESPHome CLI is missing. Update the app to 0.2.0."}},choose:{t:0,b:{t:2,i:[{t:3}],s:"Choose the intended profile, then a USB port, an IP address, or Download."}},profile:{t:0,b:{t:2,i:[{t:3}],s:"ESPHome profile"}},install_to:{t:0,b:{t:2,i:[{t:3}],s:"Install to"}},no_board:{t:0,b:{t:2,i:[{t:3}],s:"USB · no board found on the Home Assistant machine yet"}},download_target:{t:0,b:{t:2,i:[{t:3}],s:"Download · flash from your own computer"}},host:{t:0,b:{t:2,i:[{t:3}],s:"IP address or hostname"}},download_file:{t:0,b:{t:2,i:[{t:3,v:"Download "},{t:4,k:"name"}]}},download_how:{t:0,b:{t:2,i:[{t:3,v:"Put it on the screen with "},{t:4,k:"esphome_web"},{t:3,v:" in Chrome or Edge: Connect, choose the screen's USB port, Install, and select this file. It holds your Wi-Fi password and the screen's keys: keep it to yourself."}]}}},installer:{title:{setup:{t:0,b:{t:2,i:[{t:3}],s:"Connect and install."}},saved:{t:0,b:{t:2,i:[{t:3}],s:"Profile saved."}},running:{t:0,b:{t:2,i:[{t:3}],s:"One moment…"}},ready:{t:0,b:{t:2,i:[{t:3}],s:"Ready to download."}},done:{t:0,b:{t:2,i:[{t:3}],s:"Done."}},failed:{t:0,b:{t:2,i:[{t:3}],s:"That didn't work."}}},intro:{t:0,b:{t:2,i:[{t:3}],s:"ESP Screens creates the screen's own profile with unique keys and builds the firmware. Connect the screen with a USB data cable to the machine running Home Assistant, or download the firmware and put it on the screen from your own computer."}},board:{t:0,b:{t:2,i:[{t:3}],s:"Which screen do you have?"}},board_cyd:{t:0,b:{t:2,i:[{t:3}],s:"CYD · 2.8 inch"}},board_guition:{t:0,b:{t:2,i:[{t:3}],s:"Guition · 4 inch"}},name:{t:0,b:{t:2,i:[{t:3}],s:"Name"}},name_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"Living room screen"}},device_name:{t:0,b:{t:2,i:[{t:3}],s:"Device name"}},customize:{t:0,b:{t:2,i:[{t:3}],s:"customize"}},name_hint:{t:0,b:{t:2,i:[{t:3}],s:"Every screen gets its own profile with its own keys. Four screens? Go through this four times with a different name."}},device_name_hint:{t:0,b:{t:2,i:[{t:3}],s:"Lowercase letters, digits, and dashes. A different name for each screen."}},wifi:{title:{t:0,b:{t:2,i:[{t:3}],s:"Wi-Fi"}},ssid:{t:0,b:{t:2,i:[{t:3}],s:"Wi-Fi name (2.4 GHz)"}},password:{t:0,b:{t:2,i:[{t:3}],s:"Wi-Fi password"}},new:{t:0,b:{t:2,i:[{t:3}],s:"Fill in once: ESP Screens saves this in ESPHome secrets.yaml, later screens use it automatically."}},missing:{t:0,b:{t:2,i:[{t:3}],s:"Your ESPHome secrets.yaml is still missing Wi-Fi details. ESP Screens only fills in the missing lines."}},ready:{t:0,b:{t:2,i:[{t:3}],s:"Wi-Fi comes from your ESPHome secrets.yaml."}},invalid:{t:0,b:{t:2,i:[{t:3}],s:"secrets.yaml in the ESPHome folder isn't valid YAML. Fix the file first; it won't be overwritten."}}},install_via:{t:0,b:{t:2,i:[{t:3}],s:"Install via"}},later:{t:0,b:{t:2,i:[{t:3}],s:"Later · save profile only"}},target:{usb:{t:0,b:{t:2,i:[{t:3}],s:"Connect the screen with a USB data cable to the Home Assistant machine; the list refreshes on its own. Or choose Download to use your own computer."}},download:{t:0,b:{t:2,i:[{t:3}],s:"Download the firmware and put it on the screen from your own computer, in Chrome or Edge. After that, updates go over Wi-Fi."}},later:{t:0,b:{t:2,i:[{t:3}],s:"The profile goes into the ESPHome folder. You can install later via Firmware & USB, or from ESPHome Device Builder."}},several:{t:0,b:{t:2,i:[{t:3}],s:"More than one board connected: choose this screen's port."}},once:{t:0,b:{t:2,i:[{t:3}],s:"Once over USB; after that, everything is wireless."}}},install:{t:0,b:{t:2,i:[{t:3}],s:"Install"}},save_profile:{t:0,b:{t:2,i:[{t:3}],s:"Save profile"}},busy:{t:0,b:{t:2,i:[{t:3,v:"A build or installation is already running ("},{t:4,k:"file"},{t:3,v:"). Wait for it to finish."}]}},no_cli:{t:0,b:{t:2,i:[{t:3}],s:"The ESPHome CLI is missing from this installation; only saving the profile is possible."}},progress:{saved:{t:0,b:{t:2,i:[{t:4,k:"file"},{t:3,v:" is in the ESPHome folder"}]}},writing:{t:0,b:{t:2,i:[{t:3,v:"Writing firmware to "},{t:4,k:"name"},{t:3,v:"…"}]}},building:{t:0,b:{t:2,i:[{t:3}],s:"Building firmware…"}},ready:{t:0,b:{t:2,i:[{t:3,v:"Firmware for "},{t:4,k:"name"},{t:3,v:" is ready"}]}},installed:{t:0,b:{t:2,i:[{t:3,v:"Firmware is on "},{t:4,k:"name"}]}},build_failed:{t:0,b:{t:2,i:[{t:3}],s:"Build failed"}},install_failed:{t:0,b:{t:2,i:[{t:3}],s:"Install failed"}}},detail:{saved:{t:0,b:{t:2,i:[{t:3}],s:"Install it later from Firmware & USB: choose this profile, then the USB port of the Home Assistant machine, or Download to put the firmware on the screen from your own computer. Save the API key for pairing:"}},uploading:{t:0,b:{t:2,i:[{t:3}],s:"Don't disconnect the USB cable yet."}},building:{t:0,b:{t:2,i:[{t:3}],s:"A first build takes a few minutes on a Raspberry Pi. You can leave this page: the installation keeps running and you'll find it again under New screen."}},building_download:{t:0,b:{t:2,i:[{t:3}],s:"A first build takes a few minutes on a Raspberry Pi. You can leave this page: the build keeps running and you'll find it again under New screen."}},downloaded:{t:0,b:{t:2,i:[{t:3}],s:"Put it on the screen from your own computer, then pair the screen with Home Assistant."}},booted:{t:0,b:{t:2,i:[{t:3}],s:"The screen boots up and connects to your Wi-Fi. Pair it with Home Assistant now:"}},booted_cyd:{t:0,b:{t:2,i:[{t:3}],s:"The screen boots up and connects to your Wi-Fi. The CYD first asks for a touch calibration: tap the crosshairs. Pair it with Home Assistant now:"}},see_log:{t:0,b:{t:2,i:[{t:3}],s:"See the log below."}}},download_steps:{plug:{t:0,b:{t:2,i:[{t:4,k:"bold"},{t:3,v:" with a USB data cable."}]}},plug_bold:{t:0,b:{t:2,i:[{t:3}],s:"Plug the screen into your computer"}},open:{t:0,b:{t:2,i:[{t:4,k:"bold"},{t:3,v:" in Chrome or Edge, click Connect and choose the screen's USB port."}]}},open_bold:{t:0,b:{t:2,i:[{t:3,v:"Open "},{t:4,k:"esphome_web"}]}},install:{t:0,b:{t:2,i:[{t:4,k:"bold"},{t:3,v:" and select "},{t:4,k:"file"},{t:3,v:". The screen restarts and joins your Wi-Fi."}]}},install_cyd:{t:0,b:{t:2,i:[{t:4,k:"bold"},{t:3,v:" and select "},{t:4,k:"file"},{t:3,v:". The screen restarts and joins your Wi-Fi. The CYD first asks for a touch calibration: tap the crosshairs."}]}},install_bold:{t:0,b:{t:2,i:[{t:3}],s:"Click Install"}}},download_keep:{t:0,b:{t:2,i:[{t:3}],s:"The file holds your Wi-Fi password and the screen's keys: keep it to yourself."}},api_key:{t:0,b:{t:2,i:[{t:3}],s:"API key"}},pairing:{ha:{t:0,b:{t:2,i:[{t:4,k:"bold"},{t:3,v:" This happens outside ESP Screens. Home Assistant discovers "},{t:4,k:"name"},{t:3,v:" as an ESPHome device; click Add. Not discovered? Add ESPHome manually with the screen's IP address."}]}},ha_bold:{t:0,b:{t:2,i:[{t:3}],s:"Go to Home Assistant → Settings → Devices & services."}},key:{t:0,b:{t:2,i:[{t:4,k:"bold"},{t:3,v:" above when Home Assistant asks for an encryption key."}]}},key_bold:{t:0,b:{t:2,i:[{t:3}],s:"Paste the API key"}},actions:{t:0,b:{t:2,i:[{t:4,k:"bold"},{t:3,v:" ESPHome integration → Configure → “Allow the device to perform Home Assistant actions”. Without this, the screen sees everything but controls nothing."}]}},actions_bold:{t:0,b:{t:2,i:[{t:3}],s:"Allow HA actions:"}},tiles:{t:0,b:{t:2,i:[{t:4,k:"bold"},{t:3,v:" Back in ESP Screens, the screen appears in the list on the left within about thirty seconds; until then it's shown there as “not yet in Home Assistant”."}]}},tiles_bold:{t:0,b:{t:2,i:[{t:3}],s:"Choose your tiles."}}},log:{t:0,b:{t:2,i:[{t:3}],s:"ESPHome log"}},retry:{t:0,b:{t:2,i:[{t:3}],s:"Retry"}},another:{t:0,b:{t:2,i:[{t:3}],s:"Install another screen"}},start_over:{t:0,b:{t:2,i:[{t:3}],s:"Start over"}},done:{t:0,b:{t:2,i:[{t:3}],s:"Done"}}},alerts:{eyebrow:{t:0,b:{t:2,i:[{t:3}],s:"Alerts · cheatsheet"}},title:{t:0,b:{t:2,i:[{t:3}],s:"A full-screen notification, from an automation."}},intro:{t:0,b:{t:2,i:[{t:3,v:"Every screen has the "},{t:4,k:"action"},{t:3,v:" action. It places a card over everything, wakes the screen, and keeps the backlight at normal brightness until someone taps the button or the timeout runs out. Home Assistant itself shows no explanation or dropdowns for ESPHome actions; everything you can fill in is listed here."}]}},loading:{t:0,b:{t:2,i:[{t:3}],s:"The cheatsheet is still loading; one moment."}},example:{title:{t:0,b:{t:2,i:[{t:3}],s:"Someone is at the door"}},subtitle:{t:0,b:{t:2,i:[{t:3}],s:"Door 3, back"}},button:{t:0,b:{t:2,i:[{t:3}],s:"Coming"}}},sections:{t:0,b:{t:2,i:[{t:3}],s:"Sections"}},nav:{try:{t:0,b:{t:2,i:[{t:3}],s:"Try it"}},screens:{t:0,b:{t:2,i:[{t:3}],s:"Your screens"}},howto:{t:0,b:{t:2,i:[{t:3}],s:"In an automation"}},all:{t:0,b:{t:2,i:[{t:3}],s:"All screens"}},fields:{t:0,b:{t:2,i:[{t:3}],s:"The fields"}},icons:{t:0,b:{t:2,i:[{t:3}],s:"Icons"}},colors:{t:0,b:{t:2,i:[{t:3}],s:"Colors"}},behaviour:{t:0,b:{t:2,i:[{t:3}],s:"Behavior"}},events:{t:0,b:{t:2,i:[{t:3}],s:"Events"}},tips:{t:0,b:{t:2,i:[{t:3}],s:"Tips"}}},try:{text:{t:0,b:{t:2,i:[{t:3}],s:"Send one alert now, with the same fields an automation sends. The screen shows the card and, with blinking on, flashes its backlight."}},screen:{t:0,b:{t:2,i:[{t:3}],s:"Screen"}},all:{t:0,b:{t:2,i:[{t:3,v:"All screens ("},{t:4,k:"ready"},{t:3,v:" ready)"}]}},not_ready:{t:0,b:{t:2,i:[{t:4,k:"name"},{t:3,v:" · not ready"}]}},title:{t:0,b:{t:2,i:[{t:3}],s:"Title"}},subtitle:{t:0,b:{t:2,i:[{t:3}],s:"Subtitle"}},icon:{t:0,b:{t:2,i:[{t:3}],s:"Icon"}},color:{t:0,b:{t:2,i:[{t:3}],s:"Color"}},button:{t:0,b:{t:2,i:[{t:3}],s:"Button text"}},timeout:{t:0,b:{t:2,i:[{t:3}],s:"Timeout (seconds, 0 waits for the button)"}},flash:{t:0,b:{t:2,i:[{t:3}],s:"Blink the backlight"}},flash_hint:{t:0,b:{t:2,i:[{t:3}],s:"Four times when the alert arrives."}},sending:{t:0,b:{t:2,i:[{t:3}],s:"Sending…"}},send:{t:0,b:{t:2,i:[{t:3}],s:"Send alert"}},sent_all:{t:0,b:{t:1,c:[{t:2,i:[{t:3,v:"Sent to "},{t:4,k:"n"},{t:3,v:" screen."}]},{t:2,i:[{t:3,v:"Sent to "},{t:4,k:"n"},{t:3,v:" screens."}]}]}},sent_to:{t:0,b:{t:2,i:[{t:3,v:"Sent to "},{t:4,k:"name"},{t:3,v:"."}]}},sent_one:{t:0,b:{t:2,i:[{t:3}],s:"Sent to the screen."}},skipped:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"1 skipped (offline or old firmware)."},{t:2,i:[{t:4,k:"n"},{t:3,v:" skipped (offline or old firmware)."}]}]}},left_empty:{t:0,b:{t:2,i:[{t:3,v:"Left empty: "},{t:4,k:"fields"},{t:3,v:"."}]}},nothing:{t:0,b:{t:2,i:[{t:3,v:"No screen could show it: check that a screen is online with firmware "},{t:4,k:"version"},{t:3,v:" or newer."}]}}},white:{t:0,b:{t:2,i:[{t:3}],s:"White (default)"}},screens:{text:{t:0,b:{t:2,i:[{t:3,v:"Every screen has its own action, with the device name in it. From firmware "},{t:4,k:"version"},{t:3,v:"; update an older screen with its Update button under Screens."}]}},none:{t:0,b:{t:2,i:[{t:3}],s:"No screen paired yet. Install one via New screen; the action appears once Home Assistant sees the screen."}},ready:{t:0,b:{t:2,i:[{t:3,v:"● firmware "},{t:4,k:"version"}]}},update:{t:0,b:{t:2,i:[{t:3,v:"Update needed · firmware "},{t:4,k:"version"}]}},unknown:{t:0,b:{t:2,i:[{t:3}],s:"Device name unknown · update the screen"}},show:{t:0,b:{t:2,i:[{t:3}],s:"Show alert"}},dismiss:{t:0,b:{t:2,i:[{t:3}],s:"Dismiss alert"}}},howto:{add:{t:0,b:{t:2,i:[{t:4,k:"add"},{t:3,v:" and search for "},{t:4,k:"esphome"},{t:3,v:`. Choose your screen's action: Home Assistant calls it "Performs the action show_alert of the node `},{t:4,k:"device"},{t:3,v:'".'}]}},add_bold:{t:0,b:{t:2,i:[{t:3}],s:"Add action"}},device:{t:0,b:{t:2,i:[{t:3}],s:"device name"}},fields:{t:0,b:{t:2,i:[{t:4,k:"bold"},{t:3,v:" Home Assistant asks for all seven; leave what you don't use empty ("},{t:4,k:"empty"},{t:3,v:", "},{t:4,k:"zero"},{t:3,v:", off)."}]}},fields_bold:{t:0,b:{t:2,i:[{t:3}],s:"Fill in the fields."}},yaml:{t:0,b:{t:2,i:[{t:3,v:"Prefer YAML? Choose "},{t:4,k:"edit"},{t:3,v:" on the action and paste the example below."}]}},example_for:{t:0,b:{t:2,i:[{t:3}],s:"Example for"}},no_screen:{t:0,b:{t:2,i:[{t:3}],s:"a screen (not paired yet)"}}},edit_yaml:{t:0,b:{t:2,i:[{t:3}],s:"Edit in YAML"}},copy_yaml:{t:0,b:{t:2,i:[{t:3}],s:"Copy YAML"}},all:{title:{t:0,b:{t:2,i:[{t:3}],s:"All screens at once"}},text:{t:0,b:{t:2,i:[{t:3,v:"Fire the event "},{t:4,k:"show"},{t:3,v:" with the same fields, and ESP Screens passes the alert on to every screen that is online, including screens you add later. "},{t:4,k:"dismiss"},{t:3,v:" clears it everywhere. In an automation, add the "},{t:4,k:"event"},{t:3,v:" action or paste the example under "},{t:4,k:"edit"},{t:3,v:". Leave out the fields you don't use. ESP Screens has to be running for this."}]}},event:{t:0,b:{t:2,i:[{t:3}],s:"Fire manual event"}}},fields:{text:{t:0,b:{t:2,i:[{t:3}],s:"Text is free-form; the limit is in bytes, and an accented letter counts as two. What doesn't fit gets an ellipsis (title) or is dropped (subtitle)."}},field:{t:0,b:{t:2,i:[{t:3}],s:"Field"}},type:{t:0,b:{t:2,i:[{t:3}],s:"Type"}},what:{t:0,b:{t:2,i:[{t:3}],s:"What it does"}},example:{t:0,b:{t:2,i:[{t:3}],s:"Example"}},limit:{t:0,b:{t:2,i:[{t:3}],s:"Limit"}},types:{string:{t:0,b:{t:2,i:[{t:3}],s:"text"}},int:{t:0,b:{t:2,i:[{t:3}],s:"number"}},bool:{t:0,b:{t:2,i:[{t:3}],s:"on / off"}},entity:{t:0,b:{t:2,i:[{t:3}],s:"entity"}}},bytes:{t:0,b:{t:2,i:[{t:3,v:"CYD "},{t:4,k:"cyd"},{t:3,v:" · Guition "},{t:4,k:"guition"},{t:3,v:" bytes"}]}},seconds:{t:0,b:{t:2,i:[{t:3}],s:"0 to 86400 s"}},camera_limit:{t:0,b:{t:2,i:[{t:3}],s:"Guition, firmware 0.2.57+"}}},icons:{text:{t:0,b:{t:2,i:[{t:3,v:"Fill in the name in "},{t:4,k:"field"},{t:3,v:", for example "},{t:4,k:"example"},{t:3,v:". "},{t:4,k:"mdi"},{t:3,v:" and the hex codepoint ("},{t:4,k:"hex"},{t:3,v:") also work. Only these icons are included in the firmware; any other name shows the warning triangle. Tap an icon to copy its name."}]}},handy:{t:0,b:{t:2,i:[{t:3}],s:"Handy for notifications"}},search_label:{t:0,b:{t:2,i:[{t:3}],s:"Search for an icon"}},search:{t:0,b:{t:2,i:[{t:3}],s:"Search by name or description…"}},extra:{t:0,b:{t:2,i:[{t:3}],s:"Also available: control and weather icons"}},copy:{t:0,b:{t:2,i:[{t:3,v:"Copy "},{t:4,k:"name"}]}},none:{t:0,b:{t:2,i:[{t:3,v:'No icon for "'},{t:4,k:"query"},{t:3,v:'". Unknown names show the warning triangle ('},{t:4,k:"fallback"},{t:3,v:")."}]}}},colors:{text:{t:0,b:{t:2,i:[{t:3,v:"Fill in the name in "},{t:4,k:"field"},{t:3,v:". These are the pastel shades of the tiles, with dark text. Empty or unknown gives the white card. Tap to copy."}]}}},behaviour:{wakes:{t:0,b:{t:2,i:[{t:4,k:"bold"},{t:3,v:" An alert immediately wakes a dimmed or dark screen and appears above every page, every open light card, and the standby layer."}]}},wakes_bold:{t:0,b:{t:2,i:[{t:3}],s:"Wakes the screen."}},on:{t:0,b:{t:2,i:[{t:4,k:"bold"},{t:3,v:" As long as the card is showing, the backlight stays at normal brightness. Standby and night hours wait. After the button, the regular standby time starts again."}]}},on_bold:{t:0,b:{t:2,i:[{t:3}],s:"On until the button."}},timeout:{t:0,b:{t:2,i:[{t:4,k:"bold"},{t:3,v:" "},{t:4,k:"zero"},{t:3,v:" waits for the button, however long that takes. With "},{t:4,k:"minute"},{t:3,v:" the card disappears after a minute, but the button closes it sooner."}]}},timeout_bold:{t:0,b:{t:2,i:[{t:3}],s:"Timeout."}},blinking:{t:0,b:{t:2,i:[{t:4,k:"bold"},{t:3,v:" "},{t:4,k:"flash"},{t:3,v:" blinks the backlight four times when the alert arrives (about a second) and leaves the screen on afterward."}]}},blinking_bold:{t:0,b:{t:2,i:[{t:3}],s:"Blinking."}},replacing:{t:0,b:{t:2,i:[{t:4,k:"bold"},{t:3,v:" A new alert replaces the current one; there's no stack. The replaced alert reports itself as "},{t:4,k:"replaced"},{t:3,v:"."}]}},replacing_bold:{t:0,b:{t:2,i:[{t:3}],s:"Replacing."}},closing:{t:0,b:{t:2,i:[{t:4,k:"bold"},{t:3,v:" "},{t:4,k:"dismiss"},{t:3,v:" clears the card, for example if the door is already open. Without an alert, that action does nothing."}]}},closing_bold:{t:0,b:{t:2,i:[{t:3}],s:"Closing remotely."}},beside:{t:0,b:{t:2,i:[{t:4,k:"bold"},{t:3,v:" does nothing; only the button closes it. That way a wake-up tap never accidentally dismisses the alert."}]}},beside_bold:{t:0,b:{t:2,i:[{t:3}],s:"Tapping beside the card"}}},events:{text:{t:0,b:{t:2,i:[{t:3,v:"Every end fires the event "},{t:4,k:"event"},{t:3,v:" with "},{t:4,k:"action"},{t:3,v:", "},{t:4,k:"title"},{t:3,v:", "},{t:4,k:"screen"},{t:3,v:" (the device name) and the "},{t:4,k:"device_id"},{t:3,v:" that Home Assistant adds. Visible under Settings → Tools → Events."}]}},when:{t:0,b:{t:2,i:[{t:3}],s:"When"}},wait:{t:0,b:{t:2,i:[{t:3}],s:"Waiting until someone presses the button"}}},tips:{color:{t:0,b:{t:2,i:[{t:3,v:"Use a "},{t:4,k:"bold"},{t:3,v:': orange for the door, red for smoke or water, green for "done". The text always stays dark and readable.'}]}},color_bold:{t:0,b:{t:2,i:[{t:3}],s:"color per kind of notification"}},short:{t:0,b:{t:2,i:[{t:3,v:"Keep the title "},{t:4,k:"bold"},{t:3,v:"; a screen shows about twenty characters on one line and ends a longer title with an ellipsis. Put details in the subtitle."}]}},short_bold:{t:0,b:{t:2,i:[{t:3}],s:"short"}},button:{t:0,b:{t:2,i:[{t:3,v:"A "},{t:4,k:"bold"},{t:3,v:' turns the notification into a question: "Coming", "Seen", "Turn off". The event then tells you who responded.'}]}},button_bold:{t:0,b:{t:2,i:[{t:3}],s:"custom button text"}},resolve:{t:0,b:{t:2,i:[{t:3,v:"For an alert that resolves itself (the door opens, the laundry gets taken out) close it in the same automation with "},{t:4,k:"dismiss"},{t:3,v:"."}]}},every:{t:0,b:{t:2,i:[{t:3,v:"Every screen? Fire "},{t:4,k:"event"},{t:3,v:" once (see All screens at once). The screens still work independently and each reports with its own "},{t:4,k:"screen"},{t:3,v:"."}]}},claude:{t:0,b:{t:2,i:[{t:3,v:"Rather "},{t:4,k:"bold"},{t:3,v:" for the automation? Install the ESP Screens skill under Settings → Claude."}]}},claude_bold:{t:0,b:{t:2,i:[{t:3}],s:"ask Claude"}}},wait_yaml:{comment:{t:0,b:{t:2,i:[{t:3}],s:"Doorbell: show the alert and wait until someone presses the button."}},message:{t:0,b:{t:2,i:[{t:3}],s:"Someone is coming to the door."}}}},override:{eyebrow:{t:0,b:{t:2,i:[{t:3}],s:"Advanced · local override"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Override YAML"}},title_named:{t:0,b:{t:2,i:[{t:3,v:"Override YAML · "},{t:4,k:"name"}]}},intro:{t:0,b:{t:2,i:[{t:3}],s:"This small file is yours. It is loaded after the shared screen package and stays in place when ESP Screens updates. Change hardware-specific details here, such as a display model."}},safe_title:{t:0,b:{t:2,i:[{t:3}],s:"What is safe to change?"}},safe_text:{t:0,b:{t:2,i:[{t:3}],s:"Display, touchscreen, substitutions, pins and other device details. Name, Wi-Fi, API, OTA and package links remain managed."}},active:{t:0,b:{t:2,i:[{t:3}],s:"Active"}},ready:{t:0,b:{t:2,i:[{t:3}],s:"Ready to attach"}},editor_label:{t:0,b:{t:2,i:[{t:3}],s:"Local override YAML"}},use_example:{t:0,b:{t:2,i:[{t:3}],s:"Use example"}},clear:{t:0,b:{t:2,i:[{t:3}],s:"Clear"}},characters:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"1 character"},{t:2,i:[{t:4,k:"n"},{t:3,v:" characters"}]}]}},lines:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"1 line"},{t:2,i:[{t:4,k:"n"},{t:3,v:" lines"}]}]}},save_check:{t:0,b:{t:2,i:[{t:3}],s:"Save & check"}},save:{t:0,b:{t:2,i:[{t:3}],s:"Save override"}},no_profile:{t:0,b:{t:2,i:[{t:3}],s:"No ESPHome profile was found for this screen."}},attached:{t:0,b:{t:2,i:[{t:3}],s:"Changes here apply on the next build."}},not_attached:{t:0,b:{t:2,i:[{t:3}],s:"Save once to attach this file to the profile."}},saving:{t:0,b:{t:2,i:[{t:3}],s:"Checking and saving…"}},saved:{t:0,b:{t:2,i:[{t:3}],s:"Saved. The override is kept during firmware updates."}},saved_toast:{t:0,b:{t:2,i:[{t:3}],s:"Override YAML saved."}},checking:{t:0,b:{t:2,i:[{t:3}],s:"Saved. ESPHome is checking the complete profile…"}},checking_profile:{t:0,b:{t:2,i:[{t:3}],s:"ESPHome is checking the profile…"}},checking_stage:{t:0,b:{t:2,i:[{t:3,v:"ESPHome is checking the profile… "},{t:4,k:"stage"}]}},valid:{t:0,b:{t:2,i:[{t:3}],s:"The complete profile is valid. Safe to build and install."}},rejected:{t:0,b:{t:2,i:[{t:3}],s:"ESPHome rejected the complete profile. See Firmware & USB for the full log."}},confirm_example:{t:0,b:{t:2,i:[{t:3}],s:"Replace the current text with the example?"}},example_loaded:{t:0,b:{t:2,i:[{t:3}],s:"Example loaded. Save it when you are ready."}},confirm_clear:{t:0,b:{t:2,i:[{t:3}],s:"Clear the local override?"}},cleared:{t:0,b:{t:2,i:[{t:3}],s:"The override will be empty after you save."}}},mockup:{home:{t:0,b:{t:2,i:[{t:3}],s:"Home"}},unknown:{t:0,b:{t:2,i:[{t:3}],s:"Unknown"}}}},screen:{ha:{on:{t:0,b:{t:2,i:[{t:3}],s:"On"}},off:{t:0,b:{t:2,i:[{t:3}],s:"Off"}},unavailable:{t:0,b:{t:2,i:[{t:3}],s:"Unavailable"}},climate:{off:{t:0,b:{t:2,i:[{t:3}],s:"Off"}},heat:{t:0,b:{t:2,i:[{t:3}],s:"Heat"}},cool:{t:0,b:{t:2,i:[{t:3}],s:"Cool"}},heat_cool:{t:0,b:{t:2,i:[{t:3}],s:"Heat/Cool"}},auto:{t:0,b:{t:2,i:[{t:3}],s:"Auto"}},dry:{t:0,b:{t:2,i:[{t:3}],s:"Dry"}},fan_only:{t:0,b:{t:2,i:[{t:3}],s:"Fan only"}}},hvac_action:{heating:{t:0,b:{t:2,i:[{t:3}],s:"Heating"}},cooling:{t:0,b:{t:2,i:[{t:3}],s:"Cooling"}},idle:{t:0,b:{t:2,i:[{t:3}],s:"Idle"}},off:{t:0,b:{t:2,i:[{t:3}],s:"Off"}},drying:{t:0,b:{t:2,i:[{t:3}],s:"Drying"}},fan:{t:0,b:{t:2,i:[{t:3}],s:"Fan"}},preheating:{t:0,b:{t:2,i:[{t:3}],s:"Preheating"}},defrosting:{t:0,b:{t:2,i:[{t:3}],s:"Defrosting"}}},cover:{open:{t:0,b:{t:2,i:[{t:3}],s:"Open"}},closed:{t:0,b:{t:2,i:[{t:3}],s:"Closed"}},opening:{t:0,b:{t:2,i:[{t:3}],s:"Opening"}},closing:{t:0,b:{t:2,i:[{t:3}],s:"Closing"}}},media:{playing:{t:0,b:{t:2,i:[{t:3}],s:"Playing"}},paused:{t:0,b:{t:2,i:[{t:3}],s:"Paused"}},idle:{t:0,b:{t:2,i:[{t:3}],s:"Idle"}},standby:{t:0,b:{t:2,i:[{t:3}],s:"Standby"}}},person:{home:{t:0,b:{t:2,i:[{t:3}],s:"Home"}},not_home:{t:0,b:{t:2,i:[{t:3}],s:"Away"}}},sun:{above_horizon:{t:0,b:{t:2,i:[{t:3}],s:"Above horizon"}},below_horizon:{t:0,b:{t:2,i:[{t:3}],s:"Below horizon"}}},vacuum:{docked:{t:0,b:{t:2,i:[{t:3}],s:"Docked"}},cleaning:{t:0,b:{t:2,i:[{t:3}],s:"Cleaning"}},paused:{t:0,b:{t:2,i:[{t:3}],s:"Paused"}},returning:{t:0,b:{t:2,i:[{t:3}],s:"Returning to dock"}},idle:{t:0,b:{t:2,i:[{t:3}],s:"Idle"}}},weather:{sunny:{t:0,b:{t:2,i:[{t:3}],s:"Sunny"}},clear_night:{t:0,b:{t:2,i:[{t:3}],s:"Clear, night"}},cloudy:{t:0,b:{t:2,i:[{t:3}],s:"Cloudy"}},partlycloudy:{t:0,b:{t:2,i:[{t:3}],s:"Partly cloudy"}},rainy:{t:0,b:{t:2,i:[{t:3}],s:"Rainy"}},pouring:{t:0,b:{t:2,i:[{t:3}],s:"Pouring"}},snowy:{t:0,b:{t:2,i:[{t:3}],s:"Snowy"}},snowy_rainy:{t:0,b:{t:2,i:[{t:3}],s:"Snowy, rainy"}},fog:{t:0,b:{t:2,i:[{t:3}],s:"Fog"}},hail:{t:0,b:{t:2,i:[{t:3}],s:"Hail"}},lightning:{t:0,b:{t:2,i:[{t:3}],s:"Lightning"}},lightning_rainy:{t:0,b:{t:2,i:[{t:3}],s:"Lightning, rainy"}},windy:{t:0,b:{t:2,i:[{t:3}],s:"Windy"}},exceptional:{t:0,b:{t:2,i:[{t:3}],s:"Exceptional"}}},binary:{battery_on:{t:0,b:{t:2,i:[{t:3}],s:"Low"}},battery_off:{t:0,b:{t:2,i:[{t:3}],s:"Normal"}},battery_charging_on:{t:0,b:{t:2,i:[{t:3}],s:"Charging"}},battery_charging_off:{t:0,b:{t:2,i:[{t:3}],s:"Not charging"}},carbon_monoxide_on:{t:0,b:{t:2,i:[{t:3}],s:"Detected"}},carbon_monoxide_off:{t:0,b:{t:2,i:[{t:3}],s:"Clear"}},cold_on:{t:0,b:{t:2,i:[{t:3}],s:"Cold"}},cold_off:{t:0,b:{t:2,i:[{t:3}],s:"Normal"}},connectivity_on:{t:0,b:{t:2,i:[{t:3}],s:"Connected"}},connectivity_off:{t:0,b:{t:2,i:[{t:3}],s:"Disconnected"}},door_on:{t:0,b:{t:2,i:[{t:3}],s:"Open"}},door_off:{t:0,b:{t:2,i:[{t:3}],s:"Closed"}},garage_door_on:{t:0,b:{t:2,i:[{t:3}],s:"Open"}},garage_door_off:{t:0,b:{t:2,i:[{t:3}],s:"Closed"}},gas_on:{t:0,b:{t:2,i:[{t:3}],s:"Detected"}},gas_off:{t:0,b:{t:2,i:[{t:3}],s:"Clear"}},heat_on:{t:0,b:{t:2,i:[{t:3}],s:"Hot"}},heat_off:{t:0,b:{t:2,i:[{t:3}],s:"Normal"}},light_on:{t:0,b:{t:2,i:[{t:3}],s:"Light detected"}},light_off:{t:0,b:{t:2,i:[{t:3}],s:"No light"}},lock_on:{t:0,b:{t:2,i:[{t:3}],s:"Unlocked"}},lock_off:{t:0,b:{t:2,i:[{t:3}],s:"Locked"}},moisture_on:{t:0,b:{t:2,i:[{t:3}],s:"Wet"}},moisture_off:{t:0,b:{t:2,i:[{t:3}],s:"Dry"}},motion_on:{t:0,b:{t:2,i:[{t:3}],s:"Detected"}},motion_off:{t:0,b:{t:2,i:[{t:3}],s:"Clear"}},moving_on:{t:0,b:{t:2,i:[{t:3}],s:"Moving"}},moving_off:{t:0,b:{t:2,i:[{t:3}],s:"Not moving"}},occupancy_on:{t:0,b:{t:2,i:[{t:3}],s:"Detected"}},occupancy_off:{t:0,b:{t:2,i:[{t:3}],s:"Clear"}},opening_on:{t:0,b:{t:2,i:[{t:3}],s:"Open"}},opening_off:{t:0,b:{t:2,i:[{t:3}],s:"Closed"}},plug_on:{t:0,b:{t:2,i:[{t:3}],s:"Plugged in"}},plug_off:{t:0,b:{t:2,i:[{t:3}],s:"Unplugged"}},power_on:{t:0,b:{t:2,i:[{t:3}],s:"On"}},power_off:{t:0,b:{t:2,i:[{t:3}],s:"Off"}},presence_on:{t:0,b:{t:2,i:[{t:3}],s:"Home"}},presence_off:{t:0,b:{t:2,i:[{t:3}],s:"Away"}},problem_on:{t:0,b:{t:2,i:[{t:3}],s:"Problem"}},problem_off:{t:0,b:{t:2,i:[{t:3}],s:"OK"}},running_on:{t:0,b:{t:2,i:[{t:3}],s:"Running"}},running_off:{t:0,b:{t:2,i:[{t:3}],s:"Not running"}},safety_on:{t:0,b:{t:2,i:[{t:3}],s:"Unsafe"}},safety_off:{t:0,b:{t:2,i:[{t:3}],s:"Safe"}},smoke_on:{t:0,b:{t:2,i:[{t:3}],s:"Detected"}},smoke_off:{t:0,b:{t:2,i:[{t:3}],s:"Clear"}},sound_on:{t:0,b:{t:2,i:[{t:3}],s:"Detected"}},sound_off:{t:0,b:{t:2,i:[{t:3}],s:"Clear"}},tamper_on:{t:0,b:{t:2,i:[{t:3}],s:"Tampering detected"}},tamper_off:{t:0,b:{t:2,i:[{t:3}],s:"Clear"}},update_on:{t:0,b:{t:2,i:[{t:3}],s:"Update available"}},update_off:{t:0,b:{t:2,i:[{t:3}],s:"Up-to-date"}},vibration_on:{t:0,b:{t:2,i:[{t:3}],s:"Detected"}},vibration_off:{t:0,b:{t:2,i:[{t:3}],s:"Clear"}},window_on:{t:0,b:{t:2,i:[{t:3}],s:"Open"}},window_off:{t:0,b:{t:2,i:[{t:3}],s:"Closed"}}},button:{activate:{t:0,b:{t:2,i:[{t:3}],s:"Activate"}},run:{t:0,b:{t:2,i:[{t:3}],s:"Run"}},press:{t:0,b:{t:2,i:[{t:3}],s:"Press"}}},climate_fan:{auto:{t:0,b:{t:2,i:[{t:3}],s:"Auto"}},low:{t:0,b:{t:2,i:[{t:3}],s:"Low"}},medium:{t:0,b:{t:2,i:[{t:3}],s:"Medium"}},high:{t:0,b:{t:2,i:[{t:3}],s:"High"}},middle:{t:0,b:{t:2,i:[{t:3}],s:"Middle"}},focus:{t:0,b:{t:2,i:[{t:3}],s:"Focus"}},diffuse:{t:0,b:{t:2,i:[{t:3}],s:"Diffuse"}},top:{t:0,b:{t:2,i:[{t:3}],s:"Top"}},on:{t:0,b:{t:2,i:[{t:3}],s:"On"}},off:{t:0,b:{t:2,i:[{t:3}],s:"Off"}}},climate_swing:{on:{t:0,b:{t:2,i:[{t:3}],s:"On"}},off:{t:0,b:{t:2,i:[{t:3}],s:"Off"}},both:{t:0,b:{t:2,i:[{t:3}],s:"Both"}},vertical:{t:0,b:{t:2,i:[{t:3}],s:"Vertical"}},horizontal:{t:0,b:{t:2,i:[{t:3}],s:"Horizontal"}}}},time:{just_now:{t:0,b:{t:2,i:[{t:3}],s:"Just now"}},minutes_ago:{t:0,b:{t:2,i:[{t:4,k:"n"},{t:3,v:" min ago"}]}},hours_ago:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"1 hour ago"},{t:2,i:[{t:4,k:"n"},{t:3,v:" hours ago"}]}]}},yesterday:{t:0,b:{t:2,i:[{t:3}],s:"Yesterday"}},days_ago:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"1 day ago"},{t:2,i:[{t:4,k:"n"},{t:3,v:" days ago"}]}]}},weeks_ago:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"1 week ago"},{t:2,i:[{t:4,k:"n"},{t:3,v:" weeks ago"}]}]}},months_ago:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"1 month ago"},{t:2,i:[{t:4,k:"n"},{t:3,v:" months ago"}]}]}},years_ago:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"1 year ago"},{t:2,i:[{t:4,k:"n"},{t:3,v:" years ago"}]}]}},in_minutes:{t:0,b:{t:2,i:[{t:3,v:"In "},{t:4,k:"n"},{t:3,v:" min"}]}},in_hours:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"In 1 hour"},{t:2,i:[{t:3,v:"In "},{t:4,k:"n"},{t:3,v:" hours"}]}]}},tomorrow:{t:0,b:{t:2,i:[{t:3}],s:"Tomorrow"}},in_days:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"In 1 day"},{t:2,i:[{t:3,v:"In "},{t:4,k:"n"},{t:3,v:" days"}]}]}},am:{t:0,b:{t:2,i:[{t:3}],s:"AM"}},pm:{t:0,b:{t:2,i:[{t:3}],s:"PM"}}},date:{weekdays:[{t:0,b:{t:2,i:[{t:3}],s:"Sunday"}},{t:0,b:{t:2,i:[{t:3}],s:"Monday"}},{t:0,b:{t:2,i:[{t:3}],s:"Tuesday"}},{t:0,b:{t:2,i:[{t:3}],s:"Wednesday"}},{t:0,b:{t:2,i:[{t:3}],s:"Thursday"}},{t:0,b:{t:2,i:[{t:3}],s:"Friday"}},{t:0,b:{t:2,i:[{t:3}],s:"Saturday"}}],weekdays_short:[{t:0,b:{t:2,i:[{t:3}],s:"Sun"}},{t:0,b:{t:2,i:[{t:3}],s:"Mon"}},{t:0,b:{t:2,i:[{t:3}],s:"Tue"}},{t:0,b:{t:2,i:[{t:3}],s:"Wed"}},{t:0,b:{t:2,i:[{t:3}],s:"Thu"}},{t:0,b:{t:2,i:[{t:3}],s:"Fri"}},{t:0,b:{t:2,i:[{t:3}],s:"Sat"}}],weekdays_min:[{t:0,b:{t:2,i:[{t:3}],s:"Su"}},{t:0,b:{t:2,i:[{t:3}],s:"Mo"}},{t:0,b:{t:2,i:[{t:3}],s:"Tu"}},{t:0,b:{t:2,i:[{t:3}],s:"We"}},{t:0,b:{t:2,i:[{t:3}],s:"Th"}},{t:0,b:{t:2,i:[{t:3}],s:"Fr"}},{t:0,b:{t:2,i:[{t:3}],s:"Sa"}}],months:[{t:0,b:{t:2,i:[{t:3}],s:"January"}},{t:0,b:{t:2,i:[{t:3}],s:"February"}},{t:0,b:{t:2,i:[{t:3}],s:"March"}},{t:0,b:{t:2,i:[{t:3}],s:"April"}},{t:0,b:{t:2,i:[{t:3}],s:"May"}},{t:0,b:{t:2,i:[{t:3}],s:"June"}},{t:0,b:{t:2,i:[{t:3}],s:"July"}},{t:0,b:{t:2,i:[{t:3}],s:"August"}},{t:0,b:{t:2,i:[{t:3}],s:"September"}},{t:0,b:{t:2,i:[{t:3}],s:"October"}},{t:0,b:{t:2,i:[{t:3}],s:"November"}},{t:0,b:{t:2,i:[{t:3}],s:"December"}}],months_short:[{t:0,b:{t:2,i:[{t:3}],s:"Jan"}},{t:0,b:{t:2,i:[{t:3}],s:"Feb"}},{t:0,b:{t:2,i:[{t:3}],s:"Mar"}},{t:0,b:{t:2,i:[{t:3}],s:"Apr"}},{t:0,b:{t:2,i:[{t:3}],s:"May"}},{t:0,b:{t:2,i:[{t:3}],s:"Jun"}},{t:0,b:{t:2,i:[{t:3}],s:"Jul"}},{t:0,b:{t:2,i:[{t:3}],s:"Aug"}},{t:0,b:{t:2,i:[{t:3}],s:"Sep"}},{t:0,b:{t:2,i:[{t:3}],s:"Oct"}},{t:0,b:{t:2,i:[{t:3}],s:"Nov"}},{t:0,b:{t:2,i:[{t:3}],s:"Dec"}}],top_bar:{t:0,b:{t:2,i:[{t:4,k:"weekday_min"},{t:3,v:" "},{t:4,k:"day"},{t:3,v:" "},{t:4,k:"month"}]}},full:{t:0,b:{t:2,i:[{t:4,k:"weekday"},{t:3,v:" "},{t:4,k:"day"},{t:3,v:" "},{t:4,k:"month"}]}},day_month:{t:0,b:{t:2,i:[{t:4,k:"day"},{t:3,v:" "},{t:4,k:"month"}]}},weekday_time:{t:0,b:{t:2,i:[{t:4,k:"weekday"},{t:3,v:" "},{t:4,k:"time"}]}}},number:{decimal:{t:0,b:{t:2,i:[{t:3}],s:"."}},group:{t:0,b:{t:2,i:[{t:3}],s:","}},group_min:{t:0,b:{t:2,i:[{t:3}],s:"1"}},percent:{t:0,b:{t:2,i:[{t:3}],s:"%"}}},tile:{page:{t:0,b:{t:2,i:[{t:3,v:"Page "},{t:4,k:"n"}]}}}}},Wh=Vh,Ka=e=>e%10>=2&&e%10<=4&&(e%100<12||e%100>14),za={one_other:e=>e===1?0:1,one_upto_1:e=>Math.abs(e)<=1?0:1,slavic_pl:e=>e===1?0:Ka(e)?1:2,east_slavic:e=>e%10===1&&e%100!==11?0:Ka(e)?1:2,none:()=>0},Bh=Object.assign({"../../screen_manager/translations/de.json":()=>bn(()=>import("./de-B91bzzJv.js"),[],import.meta.url).then(e=>e.default),"../../screen_manager/translations/en-GB.json":()=>bn(()=>import("./en-GB-v7qWKoyN.js"),[],import.meta.url).then(e=>e.default),"../../screen_manager/translations/es.json":()=>bn(()=>import("./es-DVs9Eema.js"),[],import.meta.url).then(e=>e.default),"../../screen_manager/translations/fr.json":()=>bn(()=>import("./fr-uzS0ol44.js"),[],import.meta.url).then(e=>e.default),"../../screen_manager/translations/it.json":()=>bn(()=>import("./it-Dpzyqhcz.js"),[],import.meta.url).then(e=>e.default),"../../screen_manager/translations/nl.json":()=>bn(()=>import("./nl-BhHjNiTy.js"),[],import.meta.url).then(e=>e.default),"../../screen_manager/translations/pl.json":()=>bn(()=>import("./pl-DSfDGiw6.js"),[],import.meta.url).then(e=>e.default),"../../screen_manager/translations/pt.json":()=>bn(()=>import("./pt-C_sKl9l8.js"),[],import.meta.url).then(e=>e.default)}),Kh=Object.fromEntries(Object.entries(Bh).map(([e,t])=>[e.slice(e.lastIndexOf("/")+1,-5),t])),Rs={...cp},tu=new Set(["en"]),yl={},nu=e=>yl[e]=(t,n)=>Math.min((za[Rs[e]?.plural]||za.one_other)(t),n-1),wl=()=>["en",...Object.keys(Rs).filter(e=>e!=="en").sort()];wl().forEach(nu);const cs=Ih({locale:"en",fallbackLocale:"en",messages:{en:Wh},pluralRules:yl,missingWarn:!1,fallbackWarn:!1,missing:(e,t)=>{}}),c=cs.global.t,zh=(e,t="en")=>cs.global.te(e,t),kl=()=>cs.global.locale.value,qh=e=>Rs[e];function Yh(e=window){try{if(e.parent!==e){const t=e.parent.document.documentElement.lang;if(t)return t}}catch{}return e.navigator.language||"en"}function su(e,t=wl()){const n=i=>t.find(l=>l.toLowerCase()===i.toLowerCase()),s=(e||"").trim();return s?n(s)||n(s.split("-")[0]):void 0}const iu=(e,t=wl())=>su(e,t)||"en";function Gh(e,t,n=Rs[e]){n&&(Rs[e]=n),yl[e]||nu(e),cs.global.setLocaleMessage(e,t),tu.add(e)}const qa={};function ou(e){if(tu.has(e))return Promise.resolve(!0);const t=Kh[e];return t?qa[e]??=t().then(n=>(Gh(e,n),!0),()=>(delete qa[e],!1)):Promise.resolve(!1)}async function Jh(e=iu(Yh())){const t=await ou(e)?e:"en";return cs.global.locale.value=t,document.documentElement.lang=t,t}const os={point:{decimal:".",group:",",from:4},comma:{decimal:",",group:".",from:4},space:{decimal:",",group:" ",from:4}};function lu(e,t){const n=String(e),s=/^(-?)(\d+)(?:\.(\d+))?$/.exec(n);if(!s)return n;const i=s[2].length>=t.from?s[2].replace(/\B(?=(\d{3})+$)/g,t.group):s[2];return`${s[1]}${i}${s[3]!==void 0?t.decimal+s[3]:""}`}const Ya={comma_decimal:"point",decimal_comma:"comma",space_comma:"space"};function Xh(e=window){try{if(e.parent===e)return{};const t=e.parent.document.querySelector("home-assistant")?.hass?.locale,n=["12","24"].includes(t?.time_format)?t.time_format:void 0;return{...n?{clock:n}:{},...Ya[t?.number_format]?{numbers:Ya[t.number_format]}:{}}}catch{return{}}}const Zh=(e,t=kl())=>new Intl.ListFormat(t==="en"?"en-GB":t,{type:"conjunction"}).format(e.map(String)),ze=6,fn=8,Ns=fn*ze,au=["single","wide","full"],Sn=e=>e===!0?"wide":e===!1?"single":e,us=e=>/^screen\.page_[1-8]$/.test(e)?Number(e.slice(-1)):0,ut=e=>au.includes(e.options?.size)?e.options.size:"single",Uo=e=>ut(e)!=="single",ru=e=>ut(e)==="full",cu=e=>e-e%ze,uu=e=>e-e%2,At=e=>Math.floor(e/ze),$l=e=>Sn(e)==="full"?ze:Sn(e)==="wide"?2:1,Bn=(e,t)=>Sn(t)==="full"?Array.from({length:ze},(n,s)=>cu(e)+s):Sn(t)==="wide"?[e,e+1]:[e],Ga=(e,t)=>Sn(t)==="full"?cu(e):Sn(t)==="wide"?uu(e):e,Ze=e=>e.tiles.map(t=>({tile:t,slot:t.slot}));function du(e){let t=0;return e.map(n=>{const s=ut(n);s==="full"&&t%ze?t+=ze-t%ze:s==="wide"&&t%2===1&&t++;const i=t;return t+=$l(s),i})}function Qh(e){const t=du(e);return e.some((n,s)=>n.slot!==t[s])}function Vi(e){if(e.tiles.some(t=>!Number.isInteger(t.slot))){const t=du(e.tiles);e.tiles.forEach((n,s)=>n.slot=t[s])}e.tiles.sort((t,n)=>t.slot-n.slot)}function ts(e){const t=new Set;for(const{tile:n,slot:s}of e)for(const i of Bn(s,ut(n)))t.add(i);return t}const Fs=(e,t,n)=>Number.isInteger(t)&&t>=0&&t<Ns&&(Sn(n)==="full"?t%ze===0:Sn(n)==="wide"?t+1<Ns&&!(t%2):!0)&&Bn(t,n).every(s=>!e.has(s));function wi(e,t,n=0){for(let s=n;s<Ns;s++)if(Fs(e,s,t))return s;return-1}function fu(e,t,n){let s=-1;for(let i=0;i<Ns;i++)Fs(e,i,t)&&(s<0||Math.abs(i-n)<=Math.abs(s-n))&&(s=i);return s}function pu(e,t,n){const s=ut(t);if(n=Ga(n,s),!Fs(new Set,n,s))return null;const i=Bn(n,s),l=e.includes(t)?Bn(t.slot,s):[],r=[{tile:t,slot:n}],u=[];for(const f of e)f!==t&&(Bn(f.slot,ut(f)).some(h=>i.includes(h))?u.push(f):r.push({tile:f,slot:f.slot}));for(const f of u){const h=ut(f),p=ts(r);let b=l.map(v=>Ga(v,h)).find(v=>Fs(p,v,h));if(b===void 0&&(b=fu(p,h,f.slot)),b<0)return null;r.push({tile:f,slot:b})}return r.sort((f,h)=>f.slot-h.slot)}function It(e,t=1){const n=Math.max(0,...e.map(({tile:s,slot:i})=>i+$l(ut(s))));return Math.min(fn,Math.max(1,Math.ceil(n/ze),t||1))}function em(e,t){const n=Array.from({length:t},()=>new Set);let s=0;for(const{tile:h,slot:p}of e){const b=us(h.entity)-1,v=At(p);b<0||b>=t||v>=t||(s++,n[v].add(b))}const i=h=>{const p=new Set([0]),b=[0];for(;b.length;)for(const v of h(b.shift()))p.has(v)||(p.add(v),b.push(v));return p},l=i(h=>[...n[h]]),r=i(h=>n.flatMap((p,b)=>p.has(h)?[b]:[])),u=Array.from({length:t},(h,p)=>p),f=h=>h.map(p=>p+1);return{tiles:s,targets:f(u.filter(h=>n.some(p=>p.has(h)))),unreachable:f(u.filter(h=>!l.has(h))),noWayBack:f(u.filter(h=>l.has(h)&&!r.has(h)))}}function tm(e){const t=e.split(".")[0];return t==="sun"?{options:{display:"sunpath",size:"wide"}}:t==="weather"?{options:{display:"forecast",size:"wide"}}:us(e)?{}:t==="screen"?{options:{display:"digital",size:"wide"}}:{}}const hu=e=>({entity:e,name:"",slot:-1,...tm(e)});function mu(e,t){const n=e.entity.split(".")[0],s=t.controls?.[n],i=e.options||{};if(!s||!["wide","full"].includes(i.size)||!["standard","cover"].includes(i.display||"standard")||i.inline==="slider")return null;const l=i.controls??(i.size==="full"?"none":s.default);return l==="none"?null:l}function nm(e,t){const n=mu(e,t);return n?t.controls?.[e.entity.split(".")[0]]?.choices.find(s=>s.key===n)?.label||n:c("editor.inspect.control_none")}const jo=e=>(/^(\d+)\.(\d+)\.(\d+)$/.exec(e||"")||[]).slice(1).map(Number);function pn(e,t){const[n,s]=[jo(e),jo(t)];if(n.length!==3||s.length!==3)return!1;for(let i=0;i<3;i++)if(n[i]!==s[i])return n[i]>s[i];return!0}const sm=(e,t,n,s)=>pn(e,`${t}.${n}.${s}`),im=Ns;function om(e){return jo(e).length!==3?10:pn(e,"0.2.62")?im:pn(e,"0.2.7")?20:10}const lm=["standard","watch","forecast","graph","digital","analog","sunpath","live","cover"],bu=e=>lm.includes(e)?c(`editor.displays.${e}`):e,am=e=>c(`editor.sizes.${au.includes(e)?e:"single"}`),Ja=["light","switch","input_boolean","fan","media_player","climate"],rm=["light","fan","cover","number","input_number","media_player"],cm={light:["☀","#ad7600","#fff3d3"],climate:["❄","#c86620","#ffebdc"],vacuum:["◉","#008577","#def3ed"],fan:["✣","#008aab","#def5fa"],cover:["▤","#8053af","#eee5f8"],media_player:["▶","#007cad","#def2fc"],sensor:["⌁","#3476b1","#e5effa"],binary_sensor:["◈","#ad7600","#fff3d3"],switch:["⏻","#ad7600","#fff3d3"],input_boolean:["⏻","#ad7600","#fff3d3"],scene:["✦","#8053af","#eee5f8"],script:["▷","#8053af","#eee5f8"],weather:["☁","#007cad","#def2fc"],number:["±","#008577","#def3ed"],input_number:["±","#008577","#def3ed"],select:["≡","#5862af","#eaecfa"],input_select:["≡","#5862af","#eaecfa"],button:["↗","#5862af","#eaecfa"],input_button:["↗","#5862af","#eaecfa"],screen:["◷","#25282c","#e9ecf1"],sun:["☼","#c86620","#ffebdc"],timer:["⏱","#008577","#def3ed"],person:["☺","#2f7d32","#e1f2e2"],camera:["◧","#3d4a57","#e6ebf0"],image:["◧","#3d4a57","#e6ebf0"]};function Ht(e){const t=e.split(".")[0],n=cm[t];return n?[c(`editor.domains.${t}`),...n]:[c("editor.domains.entity"),"◇","#637184","#edf0f4"]}const vu={clock:"clock-outline",analog:"clock-outline",date:"calendar"},at=e=>JSON.stringify(e),Ae=e=>String.fromCodePoint(parseInt(e,16));function Wi(e,t=new Date,n){const s=String(t.getMinutes()).padStart(2,"0");if(e)return`${String(t.getHours()).padStart(2,"0")}:${s}`;const i=`${t.getHours()%12||12}:${s}`;return n?`${i} ${c(`screen.time.${t.getHours()<12?"am":"pm"}`,{},{locale:n})}`:i}const xl=(e=new Date,t="en")=>c("screen.date.top_bar",{weekday:c(`screen.date.weekdays_short.${e.getDay()}`,{},{locale:t}),weekday_min:c(`screen.date.weekdays_min.${e.getDay()}`,{},{locale:t}),day:e.getDate(),month:c(`screen.date.months_short.${e.getMonth()}`,{},{locale:t})},{locale:t});function um(e,t=Math.floor(Date.now()/1e3),n="en"){const s=t-e,i=Math.abs(s),l=u=>Math.floor(i/u),r=(u,f)=>f===void 0?c(`screen.time.${u}`,{},{locale:n}):c(`screen.time.${u}`,f,{locale:n});return s<0?i<3600?r("in_minutes",Math.max(1,l(60))):i<86400?r("in_hours",l(3600)):i<172800?r("tomorrow"):r("in_days",l(86400)):i<60?r("just_now"):i<3600?r("minutes_ago",l(60)):i<86400?r("hours_ago",l(3600)):i<172800?r("yesterday"):i<604800?r("days_ago",l(86400)):i<2592e3?r("weeks_ago",l(604800)):i<31536e3?r("months_ago",l(2592e3)):r("years_ago",l(31536e3))}const dm={guition:{width:448,top:36,name:27,text:21,icon:26},cyd:{width:298,top:24,name:18,text:14,icon:18}};let ps;const Ho=new Map,fm=()=>Ho.clear();function Dn(e,t){const n=`${t}|${e}`;let s=Ho.get(n);if(!s){if(ps===void 0&&(ps=document.createElement("canvas").getContext("2d")),ps){ps.font=t;const i=ps.measureText(e);s={left:-i.actualBoundingBoxLeft,right:i.actualBoundingBoxRight,top:-i.actualBoundingBoxAscent,bottom:i.actualBoundingBoxDescent,advance:i.width}}else{const i=Number(/(\d+(?:\.\d+)?)px/.exec(t)?.[1]||14),l=[...e].length*i*.55;s={left:0,right:l,top:-i*.72,bottom:i*.02,advance:l}}Ho.set(n,s)}return s}const pm=e=>({name:`500 ${e.name}px "Bar Roboto"`,text:`400 ${e.text}px "Bar Roboto"`,icon:`${e.icon}px "Tile Icons"`});function hm(e){return{icon:Math.max(2,Math.floor((e*4+5)/10)),item:Math.max(6,Math.floor((e*125+50)/100)),name:Math.max(8,Math.floor((e*16+5)/10))}}function gu(e,t,n,s){const i=pm(t),l=Dn("0",i.text),r=Math.round(l.bottom-l.top),u=hm(r),f=Dn(String.fromCodePoint(983376),i.icon),h=Math.round(f.bottom-f.top),p=e.map((C,K)=>{const O=s(C),E={index:K,item:C,view:O,shown:O.shown,width:0};return O.analog?(E.dial=h,E.width=h,E):(O.icon&&(E.icon={glyph:Ae(O.icon),ink:Dn(Ae(O.icon),i.icon)},E.width+=E.icon.ink.right-E.icon.ink.left),O.text&&(E.text={value:O.text,ink:Dn(O.text,i.text)},E.width+=(E.icon?u.icon:0)+E.text.ink.right-E.text.ink.left),E)}),b=p.filter(C=>C.shown),v=Dn(n,i.name).advance,y=Math.min(v,Math.floor(t.width*35/100)),I=C=>C.reduce((K,O)=>K+O.width,0)+Math.max(0,C.length-1)*u.item;let T=0;for(;T<b.length&&I(b.slice(T))+u.name+y>t.width;)T++;const k=b.slice(T),A=new Set(b.slice(0,T).map(C=>C.index));let S=t.width-I(k);for(const C of k)C.x=S,S+=C.width+u.item;const U=k.length?k[0].x-u.name:t.width;return{metrics:t,fonts:i,cap:r,zero:l,gaps:u,parts:p,placed:k,dropped:A,nameText:n,natural:v,nameRoom:U}}function mm(e,t,n){if(Dn(e,t).advance<=n)return e;const s=[...e];for(;s.length&&Dn(s.join("")+"...",t).advance>n;)s.pop();return s.join("")+"..."}function bm(e){"fonts"in document&&Promise.all([document.fonts.load('500 27px "Bar Roboto"',"Studio 0"),document.fonts.load('400 21px "Bar Roboto"',"Away 0"),document.fonts.load('26px "Tile Icons"',String.fromCodePoint(983376))]).then(()=>{fm(),e()}).catch(()=>{})}let _u="";function vm(e){_u=e||""}async function Sl(e,t={}){const n=await fetch(`api/${e}`,{...t,headers:{"Content-Type":"application/json","X-Screen-CSRF":_u,"X-ESP-Screens-Language":kl(),...t.headers}});if(!n.ok){let s=c("editor.api.failed");try{const i=(await n.json())?.error;typeof i=="string"&&i.trim()&&(s=i)}catch{}throw new Error(s)}return n}const Ft=async e=>(await Sl(e)).json(),ft=async(e,t,n,s={})=>{const l=await(await Sl(e,{method:t,body:n===void 0?void 0:JSON.stringify(n),...s})).text();return l?JSON.parse(l):null},m=qn({inventory:{screens:[],entities:[]},connected:!1,reachable:!0,selected:null,layout:null,dirty:!1,busy:!1,saved:0,tab:"layout",selectedTile:null,inspector:null,iconPickerOpen:!1,actionPickerOpen:!1,actionSearch:"",insertAt:-1,filter:"",search:"",capabilities:{},entityActions:{},topbarPreviews:{},topbarAdded:null,topbarOverflow:[],settingEdits:{},settingPending:!1,updating:[],toast:null,now:Date.now(),fontsVersion:0,route:location.hash,overrideProfile:null,overrideFriendly:"",drag:{active:!1,moving:null,preview:null},menuOpen:!1,liveStates:{},room:"",hidePlaced:!1,palette:!1,firmwareJob:null}),yt=$(()=>m.inventory.screens.find(e=>e.id===m.selected)),ls=e=>(e&&"firmware_known"in e?e.firmware_known:e?.firmware)||"",yu=$(()=>ls(yt.value)),$t=(e,t,n)=>sm(yu.value,e,t,n),Kn=$(()=>{const e=yt.value?.tile_limit;return typeof e=="number"&&Number.isInteger(e)&&e>0?e:om(yu.value)}),Xa=$(()=>{const e=yt.value?.full_page;return typeof e=="boolean"?e:$t(0,2,62)}),gm=$(()=>{const e=yt.value?.page_tiles_repeat;return typeof e=="boolean"?e:$t(0,2,65)}),Bi=e=>gm.value&&us(e)>0,Ki=$(()=>yt.value?.board==="guition"),wu=$(()=>dm[Ki.value?"guition":"cyd"]),uo=$(()=>m.selectedTile&&m.layout?.tiles.includes(m.selectedTile)?m.selectedTile:void 0),Cl=e=>!!m.selectedTile&&xe(m.selectedTile)===xe(e);let Za=0;function Ce(e,t){m.toast={message:e,action:t},clearTimeout(Za),Za=window.setTimeout(()=>m.toast=null,t?8e3:5e3)}function _m(){m.toast=null}async function Lt(e,t,n="api_key"){try{if(!navigator.clipboard||!window.isSecureContext)throw new Error;await navigator.clipboard.writeText(e),Ce(c(`editor.copy.${n}.copied`))}catch{if(t){const s=document.createRange();s.selectNodeContents(t);const i=window.getSelection();i?.removeAllRanges(),i?.addRange(s)}Ce(c(document.execCommand("copy")?`editor.copy.${n}.copied`:`editor.copy.${n}.selected`))}}function ki(){const e="/config/integrations/dashboard";try{window.top.location.assign(e)}catch{window.open(e,"_blank")}}const ym=["","#settings","#new-screen","#firmware","#alerts","#override"],xt=$(()=>ym.includes(m.route)?m.route:"");function He(e){if(location.hash===e){m.route=e;return}location.hash=e}window.addEventListener("hashchange",()=>{m.route=location.hash,window.scrollTo(0,0)});function zs(e){return m.inventory.entities.find(t=>t.id===e)?.name||m.inventory.builtin?.find(t=>t.id===e)?.name||e}let fo={source:null,byName:{}};function qs(e){return fo.source!==m.inventory.icons&&(fo={source:m.inventory.icons,byName:Object.fromEntries((m.inventory.icons?.groups||[]).flatMap(t=>t.icons.map(n=>[n.name,n])))}),e?fo.byName[e]:void 0}function Cn(e){const t=m.inventory.icons;if(!t)return"F0335";const n=m.inventory.entities.find(i=>i.id===e),s=e.split(".")[0];return t.builtin?.[e]?t.builtin[e]:n?.icon?n.icon:s==="weather"?t.weather[n?.state||""]||t.weather.partlycloudy:s==="sun"?t.sun[n?.state||""]||t.sun.below_horizon:t.defaults[s]||t.fallback}const vs=e=>qs(e.options?.icon)?.cp||Cn(e.entity),po=new Set;async function zi(e){const t=[...new Set(e)].filter(n=>!po.has(n)&&!n.startsWith("screen."));if(t.length){t.forEach(n=>po.add(n));try{for(let n=0;n<t.length;n+=40){const s=t.slice(n,n+40).map(i=>`entity=${encodeURIComponent(i)}`).join("&");Object.assign(m.capabilities,(await Ft(`capabilities?${s}`)).capabilities||{})}}catch{t.forEach(n=>po.delete(n))}}}const ho=new Set;async function wm(e){if(!ho.has(e)){ho.add(e);try{m.entityActions[e]=(await Ft(`entity-actions?entity=${encodeURIComponent(e)}`)).actions}catch{ho.delete(e)}}}let mo=!1;async function qi(){const e=[...new Set((m.layout?.tiles||[]).map(t=>t.entity).filter(t=>!t.startsWith("screen.")))];if(!(!e.length||mo)){mo=!0;try{for(let t=0;t<e.length;t+=60){const n=e.slice(t,t+60).map(s=>`entity=${encodeURIComponent(s)}`).join("&");Object.assign(m.liveStates,(await Ft(`states?${n}`)).states||{})}}catch{}finally{mo=!1}}}function km(e){const t=m.liveStates[e];if(t)return t;const n=m.inventory.entities.find(s=>s.id===e);return n?.state?{state:n.state,word:null,a:{}}:null}let Vo=0;function pt(){m.dirty=!0,m.saved=0,Vo++}function ku(e){if(e===m.selected&&m.layout&&m.dirty){Qe(),m.tab="layout",m.menuOpen=!1,He("");return}if(e!==m.selected&&m.dirty&&!confirm(c("editor.screen_view.confirm.switch")))return;e!==m.selected&&(Us(),m.settingEdits={}),m.selected=e,m.selectedTile=null,m.inspector=null,m.tab="layout",m.menuOpen=!1;const t=m.inventory.screens.find(s=>s.id===e);if(!t){m.layout=null;return}const n=JSON.parse(JSON.stringify(t.layout));Vi(n),n.pages=It(Ze(n),n.pages),m.layout=n,m.insertAt=-1,m.dirty=!1,m.saved=0,Yi(0),zi(n.tiles.map(s=>s.entity)),qi(),He("")}const $m=()=>m.layout?Ze(m.layout):[];function xm(e){const t=m.layout,n=t.tiles.map(i=>`${i.entity}@${i.slot}`).join();for(const{tile:i,slot:l}of e)i.slot=l,t.tiles.includes(i)||t.tiles.push(i);Vi(t),t.pages=It(Ze(t),t.pages);const s=t.tiles.map(i=>`${i.entity}@${i.slot}`).join()!==n;return s&&pt(),s}function Ys(e,t){if(!m.layout)return!1;zi([e.entity]);const n=pu(m.layout.tiles,e,t),s=n?xm(n):!1;return s&&!m.liveStates[e.entity]&&qi(),s}function $u(e){const t=m.layout;if(!t||!Bi(e)&&t.tiles.some(i=>i.entity===e)||t.tiles.length>=Kn.value)return;const n=hu(e),s=m.insertAt>=0?m.insertAt:wi(ts(Ze(t)),ut(n));m.insertAt=-1,s>=0&&Ys(n,s)&&Wo(n)}function xu(e){const t=m.layout;if(!t)return;const n=t.tiles.indexOf(e);n<0||(t.tiles.splice(n,1),Cl(e)&&Qe(),pt(),t.pages=It(Ze(t),t.pages),Ce(c("editor.layout.removed",{name:e.name||zs(e.entity)}),{label:c("editor.common.undo"),run:()=>Ys(e,e.slot)}))}function Qa(){const e=m.layout;e&&(e.pages=Math.min(fn,It(Ze(e),e.pages)+1),pt())}function Sm(e){const t=m.layout;if(t){for(const n of t.tiles)At(n.slot)>e&&(n.slot-=ze);t.pages=Math.max(1,It(Ze(t),t.pages)-1),pt()}}function Cm(e,t){const n=m.layout;if(!n||!Number.isInteger(t)||t<0||t>=fn||t===At(e.slot))return!1;const s=wi(ts(Ze(n).filter(l=>l.tile!==e)),ut(e),t*ze),i=Ys(e,s>=0&&At(s)===t?s:t*ze);return i||Ce(c("editor.layout.no_room",{page:t+1})),i}function Tm(){const e=m.layout;if(!e)return 1;const t=m.drag.preview||Ze(e),n=It(t,e.pages);return m.drag.active&&n<fn?n+1:n}function Jt(e,t,n){const s=e.entity.split(".")[0],i=m.capabilities[e.entity],l=Uo(e),r=ut(e);e.options={...e.options,[t]:n},t==="display"&&n==="watch"&&(e.options.inline="none",m.inventory.controls?.[s]&&(e.options.controls="none")),t==="display"&&["forecast","sunpath"].includes(n)&&(e.options.size="wide"),t==="inline"&&n==="slider"&&(e.options.display="standard",m.inventory.controls?.[s]&&(e.options.controls="none")),t==="controls"&&n!=="none"&&(e.options.display="standard",e.options.inline="none");const u=m.inventory.controls?.[s];t==="size"&&n==="wide"&&i&&u&&!("controls"in e.options)&&!i.controls.includes(u.default)&&(e.options.controls=u.choices.find(h=>h.key!=="none"&&i.controls.includes(h.key))?.key||"none"),pt();const f=m.layout;if(f){if(ru(e)&&r!=="full"){const h=At(e.slot),p=f.tiles.filter(y=>y!==e&&At(y.slot)===h),b=ts(Ze(f).filter(y=>y.tile!==e&&!p.includes(y.tile))),v=[];for(const y of p){const I=wi(b,ut(y),(h+1)*ze);if(I<0){v.length=0;break}v.push([y,I]);for(const T of Bn(I,ut(y)))b.add(T)}if(v.length===p.length){for(const[y,I]of v)y.slot=I;e.slot=h*ze}else{const y=wi(ts(Ze(f).filter(I=>I.tile!==e)),"full");y>=0?e.slot=y:(e.options.size=r,Ce(c("editor.layout.no_free_page")))}}else if(Uo(e)&&!l){const h=ts(Ze(f).filter(v=>v.tile!==e)),p=uu(e.slot),b=Fs(h,p,"wide")?p:fu(h,"wide",p);b>=0&&(e.slot=b)}Vi(f),f.pages=It(Ze(f),f.pages)}}function Em(e,t){const n=`screen.page_${t}`,s=m.layout;return!s||n===e.entity||!us(n)?!1:!Bi(n)&&s.tiles.some(i=>i.entity===n)?(Ce(c("editor.layout.page_taken",{page:t})),!1):(e.entity=n,s.pages=Math.max(It(Ze(s),s.pages),t),pt(),!0)}function Wo(e){Cl(e)||(m.iconPickerOpen=!1,m.actionPickerOpen=!1,m.actionSearch=""),m.selectedTile=e,m.inspector={kind:"tile"},zi([e.entity])}function Qt(e){m.inspector?.kind==="bar"&&m.inspector.index===e||(m.iconPickerOpen=!1),m.selectedTile=null,m.inspector={kind:"bar",index:e}}function er(){m.selectedTile=null,m.inspector={kind:"bar-add"}}function Qe(){m.inspector=null,m.selectedTile=null}async function Bo(){if(m.busy||!m.layout||!m.selected)return;m.busy=!0;const e=Vo,t=m.selected;try{const{settings:n,...s}=m.layout;if(await ft(`screens/${encodeURIComponent(m.selected)}`,"PUT",s),m.selected!==t){const i=m.inventory.screens.find(l=>l.id===t)?.name;Ce(i?c("editor.screen_view.saved.other",{name:i}):c("editor.screen_view.saved.other_unnamed"))}else Vo===e?(m.dirty=!1,m.saved=Date.now(),Ce(c("editor.screen_view.saved.current"))):Ce(c("editor.screen_view.saved.newer_edit"));await Tn()}catch(n){Ce(n.message)}finally{m.busy=!1}}const zn=e=>!!(e&&e.alert_action&&pn(ls(e),m.inventory.alerts?.min_firmware||"0.2.31"));async function Su(e){try{await ft(`screens/${encodeURIComponent(e.id)}/identify`,"POST"),Ce(c("editor.screen_view.identified",{name:e.name}))}catch(t){Ce(t.message)}}async function Am(e,t){return await ft("alerts/test","POST",{screen:e,data:t})}const Pm=["title","tiles","header","pages"];function Cu(e,t){const n=m.layout;if(!n)return;const s=(Array.isArray(e.tiles)?e.tiles:[]).filter(u=>!!(u&&typeof u=="object"&&typeof u.entity=="string"&&u.entity.includes("."))).map(u=>({entity:u.entity,name:typeof u.name=="string"?u.name:"",slot:Number.isInteger(u.slot)?u.slot:-1,...u.options&&typeof u.options=="object"?{options:{...u.options}}:{}})),i=new Set,l=s.filter(u=>Bi(u.entity)||!i.has(u.entity)&&i.add(u.entity)),r=l.slice(0,Kn.value);n.tiles=r,e.header&&Array.isArray(e.header.items)?n.header={items:e.header.items.map(u=>({...u}))}:delete n.header,n.pages=Number.isInteger(e.pages)?e.pages:1,Vi(n),n.pages=It(Ze(n),n.pages),Qe(),pt(),zi(r.map(u=>u.entity)),qi(),Yi(0),Ce(t(r.length<l.length?{kept:r.length,total:l.length}:void 0))}function Om(e){const t=m.inventory.screens.find(n=>n.id===e);!t||!m.layout||Cu(JSON.parse(JSON.stringify(t.layout)),n=>n?c("editor.layout.copied_part",{name:t.name,...n}):c("editor.layout.copied",{name:t.name}))}function Im(){const e=m.layout;if(!e)return"";const t={esp_screens_layout:1};for(const n of Pm)e[n]!==void 0&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function Tu(){const e=Im();if(!e)return;const t=`${(yt.value?.name||"screen").toLowerCase().replace(/[^a-z0-9]+/g,"-")}.layout.json`,n=URL.createObjectURL(new Blob([e],{type:"application/json"})),s=document.createElement("a");s.href=n,s.download=t,s.click(),setTimeout(()=>URL.revokeObjectURL(n),5e3),Lt(e,void 0,"layout_json")}function Lm(e){let t;try{t=JSON.parse(e)}catch{Ce(c("editor.layout.not_json"));return}if(!t||typeof t!="object"||!Array.isArray(t.tiles)){Ce(c("editor.layout.no_tiles_in_file"));return}Cu(t,n=>n?c("editor.layout.imported_part",n):c("editor.layout.imported"))}function Mm(e){const t=m.inventory.updates?.target,n=m.inventory.changelog;if(!Array.isArray(n)||!t)return[];const s=ls(e),i=[];for(const l of n)if(!(pn(l.firmware,t)&&l.firmware!==t)&&!(s&&pn(s,l.firmware)))for(const r of l.lines)i.includes(r)||i.push(r);return i}let bo=!1;async function Rm(){if(!bo){bo=!0;try{const e=await Ft("firmware");m.firmwareJob={job:e.job,logs:e.logs||[]}}catch{}finally{bo=!1}}}const Ko=()=>m.inventory.screens.some(e=>e.update?.state==="running")||m.updating.length>0;function Xn(e){const t=e.update||{};if(!(t.state==="running"||m.updating.includes(e.id)))return null;const n=m.firmwareJob?.job?.stage;return t.phase==="verify"?{percent:78,text:_s("verify")}:t.phase==="settle"?{percent:92,text:_s("settle")}:t.phase==="install"||!t.phase?n==="upload"?{percent:66,text:c("editor.update.writing")}:n?{percent:40,text:c("editor.update.building")}:{percent:12,text:_s("install")}:{percent:12,text:_s(t.phase)}}const hn=()=>m.layout?.header?.items??(m.layout?.settings?.show_clock??!0?[{type:"clock"}]:[]),_n=()=>m.inventory.header?.max_items||6;function Ds(e){m.layout&&(m.layout.header={items:e},pt(),Yi())}let tr=0;function Yi(e=150){clearTimeout(tr),tr=window.setTimeout(async()=>{const t=hn();if(t.some(n=>n.type==="entity"))try{const n=await ft("header-preview","POST",{header:{items:t}});t.forEach((s,i)=>m.topbarPreviews[at(s)]=n.items[i])}catch{}},e)}function gs(e){return e.type==="entity"?zs(e.entity):m.inventory.header?.builtin.find(t=>t.type===e.type)?.label||e.type}function vn(e){const t=new Date(m.now);if(e.type==="clock")return{text:Wi(as.value,t,an.value),shown:!0};if(e.type==="date")return{text:xl(t,an.value),shown:!0};if(e.type==="analog")return{analog:!0,shown:!0};const n=m.topbarPreviews[at(e)];return n?{icon:n.i||null,text:n.k==="ago"?um(n.e,Math.floor(m.now/1e3),an.value):n.t,color:n.c?`#${n.c}`:null,shown:n.shown}:{icon:e.icon==="none"?null:qs(e.icon)?.cp||Cn(e.entity),text:"…",shown:!0,loading:!0}}function vo(e,t){const n=[...hn()];return t<0||t>=n.length||e===t?!1:(n.splice(t,0,...n.splice(e,1)),Ds(n),!0)}function nr(e){const t=[...hn()],[n]=t.splice(e,1);n&&(m.inspector?.kind==="bar"&&Qe(),Ds(t),Ce(c("editor.topbar.removed",{name:gs(n)}),{label:c("editor.common.undo"),run:()=>{const s=[...hn()];s.splice(Math.min(e,s.length),0,n),Ds(s)}}))}function go(e){const t=hn();if(t.length>=_n())return Ce(c("editor.topbar.full",_n()));if(t.some(n=>at(n)===at(e)))return Ce(c("editor.topbar.already"));m.topbarAdded={key:at(e),time:Date.now()},Ds([...t,e]),Qt(t.length)}const Nm=[{group:"brightness",icon:"F0599",rows:[{key:"brightness",kind:"number",min:5,max:100,step:5,unit:"%"},{key:"dark_mode",kind:"toggle"},{key:"standby_enabled",kind:"toggle"},{key:"standby_seconds",kind:"duration",min:60,max:86400,needs:"standby_enabled"},{key:"standby_brightness",kind:"number",min:0,max:100,step:5,unit:"%",needs:"standby_enabled",cap:"brightness"}]},{group:"night",icon:"F0594",rows:[{key:"night_enabled",kind:"toggle"},{key:"night_start",kind:"moment",needs:"night_enabled"},{key:"night_end",kind:"moment",needs:"night_enabled"},{key:"night_brightness",kind:"number",min:0,max:100,step:5,unit:"%",needs:"night_enabled",cap:"brightness"}]},{group:"screen",icon:"F0379",rows:[{key:"auto_home",kind:"toggle"},{key:"auto_home_seconds",kind:"duration",min:30,max:3600,needs:"auto_home"},{key:"home_on_standby",kind:"toggle"},{key:"swipe_pages",kind:"toggle"},{key:"page_buttons",kind:"toggle"},{key:"rotation",kind:"choice",options:[0,90,180,270]}]}],_o=e=>c(`editor.screen_settings.rows.${e.key}`),Fm=(e,t)=>`${t}°`;function Eu(e=$m(),t=m.layout?It(e,m.layout.pages):1){const n=xi();if(t<2||n.page_buttons!==!1||n.swipe_pages!==!1)return"";const{tiles:s,targets:i,unreachable:l,noWayBack:r}=em(e,t);if(!l.length&&!r.length)return"";const u=v=>c("editor.screen_settings.reach.pages",{list:Zh(v)},v.length),f=l.filter(v=>!i.includes(v)),h=l.filter(v=>i.includes(v)),p=f.length===1?"one":"more",b=[c("editor.screen_settings.reach.intro")];return s&&f.length?b.push(c(`editor.screen_settings.reach.tiles_missing_${p}`,{targets:u(i),missing:u(f)},s)):s?b.push(c("editor.screen_settings.reach.tiles",{targets:u(i)},s)):f.length?b.push(c(`editor.screen_settings.reach.none_missing_${p}`,{missing:u(f)})):b.push(c("editor.screen_settings.reach.none")),h.length&&b.push(c("editor.screen_settings.reach.cut_off",{pages:u(h)})),r.length&&b.push(c("editor.screen_settings.reach.no_way_back",{pages:u(r)})),b.join(" ")}const Au=4e3;let yn={},ns=null,$i=0,li=null;const Tl=()=>yt.value?.settings;function xi(){const e=Tl(),t={...e?.values||{}};for(const[n,s]of Object.entries(m.settingEdits))t[n]=s.value;return t}const Dm=e=>e<300?30:e<900?60:e<3600?300:e<7200?900:1800;function sr(e,t,n,s,i){if(e.kind==="moment"){let u=s&&t%60?Math.floor(t/60)*60+(n>0?60:0):t+n*(s?60:15);return u%=1440,u<0?u+1440:u}const l=e.kind==="duration"?Dm(n<0?t-1:t):e.step,r=e.cap?Math.min(e.max,i[e.cap]):e.max;return Math.min(r,Math.max(e.min,t+n*l))}function Um(e){if(e<60)return c("editor.screen_settings.duration.seconds",{n:e});if(e<3600)return c("editor.screen_settings.duration.minutes",{n:Math.floor(e/60)});const t=Math.floor(e/3600),n=Math.floor(e%3600/60);return n?c("editor.screen_settings.duration.hours_minutes",{h:t,m:String(n).padStart(2,"0")}):c("editor.screen_settings.duration.hours",{n:t})}function jm(e,t){const n=Math.floor(e/60),s=String(e%60).padStart(2,"0");return t?`${String(n).padStart(2,"0")}:${s}`:c(n<12?"editor.screen_settings.time.am":"editor.screen_settings.time.pm",{time:`${n%12||12}:${s}`})}function Hm(e,t){const n=t[e.key];return n==null?"—":e.kind==="number"?`${n}${e.unit||""}`:e.kind==="duration"?Um(n):e.kind==="moment"?jm(n,as.value):""}function ni(e,t,n){if(ns&&ns!==m.selected&&Object.keys(yn).length){Us(),Ce(c("editor.screen_settings.other_screen_busy"));return}ns=m.selected;const s=xi();if(m.settingEdits[e]={value:t,at:Date.now()},yn[e]=t,e==="brightness")for(const i of["standby_brightness","night_brightness"])s[i]>t&&(m.settingEdits[i]={value:t,at:Date.now()});m.settingPending=!0,clearTimeout($i),$i=window.setTimeout(()=>Us(),n)}async function Us(e=!1){if(clearTimeout($i),li||!Object.keys(yn).length||!ns)return;const t=ns,n=yn;yn={};const s=Sl(`screens/${encodeURIComponent(t)}/settings`,{method:"PUT",body:JSON.stringify({settings:n}),keepalive:e});li=s;try{const i=await(await s).json(),l=m.inventory.screens.find(r=>r.id===t);l&&(l.settings=i)}catch(i){if(Ce(i.message),t===m.selected)for(const l of Object.keys(n))delete m.settingEdits[l];if(t===m.selected&&n.brightness!==void 0)for(const l of["standby_brightness","night_brightness"])delete m.settingEdits[l]}finally{li=null,Object.keys(yn).length?$i=window.setTimeout(()=>Us(),150):ns=null,m.settingPending=!!Object.keys(yn).length,t===m.selected&&Si(),setTimeout(()=>{t===m.selected&&Si()},Au+100)}}function Si(){const e=Tl();for(const[t,n]of Object.entries(m.settingEdits))yn[t]!==void 0||li||(e&&e.values[t]===n.value||Date.now()-n.at>Au)&&delete m.settingEdits[t]}const _s=e=>["install","verify","settle"].includes(e||"")?c(`editor.update.phases.${e}`):c("editor.update.starting");async function zo(e,t){m.updating.push(e.id);try{await ft(`screens/${encodeURIComponent(e.id)}/update`,"POST",t?{host:t}:{}),await Tn()}catch(n){m.updating=m.updating.filter(s=>s!==e.id),Ce(n.message)}}async function ir(){try{await ft("updates/run","POST"),await Tn()}catch(e){Ce(e.message)}}async function Vm(e){try{await ft("updates","PUT",{auto:e}),m.inventory.updates&&(m.inventory.updates.auto=e),Ce(c(e?"editor.settings.updates.auto_on":"editor.settings.updates.auto_off"))}catch(t){Ce(t.message)}}async function Wm(){try{m.inventory.claude_skill=await ft("claude-skill","POST"),Ce(c(m.inventory.claude_skill?.restart?"editor.settings.claude.installed_restart":"editor.settings.claude.installed"))}catch(e){Ce(e.message)}}const an=$(()=>iu(m.inventory.language?.effective));Tt(an,e=>ou(e),{immediate:!0});const jn=(e,t={})=>c(e,t,{locale:an.value}),Bm=e=>m.inventory.language?.languages?.find(t=>t.code===e)?.name||qh(e||"")?.name||e||"",Pu=e=>!!(e.update?.available||e.update?.language),or=()=>c("editor.update.new_language",{name:Bm(m.inventory.language?.effective)}),as=$(()=>m.inventory.language?.clock_effective!=="12"),Km=$(()=>{const e=m.inventory.language;return{...os[e?.numbers_effective||"point"]||os.point,from:(e?.group_min||1)>=2?5:4}}),zm=$(()=>{const e=m.inventory.language;return{...os[e?.numbers_auto||"point"]||os.point,from:(e?.group_min_auto||1)>=2?5:4}});function lr(e){return!e||e==="°"?e||"":e==="%"?m.inventory.language?.percent_space?" %":"%":` ${e}`}const qm=e=>m.inventory.builtin?.find(t=>t.id===e)?.screen_name;async function ar(e){try{const t=await ft("language","PUT",e);return t?.language&&(m.inventory.language=t.language),Ce(c(e.setting===void 0?"editor.settings.language.saved":"editor.settings.language.saved_language")),await Tn(),!0}catch(t){return Ce(t.message),!1}}async function Tn(e=!0){try{const t=await Ft(e?"inventory":"inventory?light=1");m.inventory=e?t:{...m.inventory,...t},t.csrf&&vm(t.csrf),m.connected=!!m.inventory.connected,m.reachable=!0;for(const n of m.inventory.screens)n.update?.state==="running"&&(m.updating=m.updating.filter(s=>s!==n.id));m.selected&&Si()}catch{m.reachable=!1}}function Ym(e){m.inventory={...m.inventory,...e},m.connected=!!m.inventory.connected;for(const t of m.inventory.screens)t.update?.state==="running"&&(m.updating=m.updating.filter(n=>n!==t.id));m.selected&&Si()}let rr=0,qo=Date.now(),Ci=!1,hs=null;function Gm(){hs||typeof EventSource>"u"||(hs=new EventSource(`api/events?language=${encodeURIComponent(kl())}`),hs.onopen=()=>{Ci=!0,js()},hs.onmessage=e=>{document.hidden||Ym(JSON.parse(e.data))},hs.onerror=()=>{Ci=!1,js()})}function js(){clearTimeout(rr);const e=Ci?6e4:m.inventory.updates?.busy?3e3:1e4;rr=window.setTimeout(async()=>{if(!document.hidden){const t=Date.now()-qo>=3e5;t&&(qo=Date.now()),(t||!Ci)&&await Tn(t)}js()},e)}let cr=!1;function Jm(){cr||(cr=!0,Tn(),Gm(),js(),bm(()=>m.fontsVersion++),setInterval(()=>{!m.layout||document.hidden||m.drag.active||(m.now=Date.now(),Yi(0))},3e4),setInterval(()=>{!document.hidden&&m.layout&&m.tab==="layout"&&xt.value===""&&qi()},8e3),setInterval(()=>{!document.hidden&&Ko()?Rm():m.firmwareJob&&!Ko()&&(m.firmwareJob=null)},3e3),document.addEventListener("visibilitychange",async()=>{document.hidden||(qo=Date.now(),m.now=Date.now(),await Tn(),js())}),window.addEventListener("pagehide",()=>Us(!0)),window.addEventListener("beforeunload",e=>{m.dirty&&(e.preventDefault(),e.returnValue="")}))}const Xm={class:"side"},Zm={class:"label"},Qm={id:"screens"},eb=["aria-current","onClick"],tb={class:"txt"},nb=["aria-label","title"],sb={key:1,class:"pill"},ib={key:2,class:"spin small"},ob=["onSubmit"],lb=["placeholder","aria-label"],ab={type:"submit",class:"btn mini primary"},rb=["aria-label"],cb=["disabled","title","onClick"],ub={key:2,class:"whatsnew"},db=["aria-valuenow"],fb={class:"progress-text"},pb=["title"],hb=["title"],mb={id:"pending"},bb={class:"pending-actions"},vb=["onClick"],gb=["aria-current"],_b={class:"txt"},yb={class:"more"},wb={class:"label"},kb=["aria-current"],$b={class:"mdi"},xb={class:"txt"},Sb=["aria-current"],Cb={class:"mdi"},Tb={class:"txt"},Eb=["aria-current"],Ab={class:"mdi"},Pb={class:"txt"},Ob={class:"txt"},Ib=Le({__name:"Sidebar",setup(e){const t=$e(null),n=$e(""),s=p=>{const b=p.update||{};return!!b.language&&(!b.target||pn(ls(p),b.target))};function i(p){const b=p.update||{};return b.state==="running"||m.updating.includes(p.id)?{kind:"running",text:_s(b.phase)}:b.state==="queued"?{kind:"queued",text:c("editor.sidebar.update.queued")}:Pu(p)&&p.online?{kind:"available",text:s(p)?or():c("editor.sidebar.update.available",{version:b.target})}:b.result&&Date.now()/1e3-b.result.time<86400?{kind:b.result.state==="failed"?"failed":"done",text:b.result.message}:null}const l=p=>[...p.update?.language&&!s(p)?[or()]:[],...Mm(p)];function r(p){const b=p.update||{};b.host&&b.profile?zo(p):b.profile&&(t.value=p.id,n.value="")}function u(p){const b=n.value.trim();b&&(t.value=null,zo(p,b))}const f=()=>{const p=m.firmwareJob?.logs||[];return p.length?p[p.length-1]:""},h=p=>p.installed?c("editor.sidebar.pending.installed"):p.downloaded?c("editor.sidebar.pending.downloaded"):c("editor.sidebar.pending.not_flashed",{file:p.file});return(p,b)=>(g(),_("aside",Xm,[b[13]||(b[13]=o("div",{class:"brand"},[o("span",{class:"mark"},"▦"),o("span",null,"ESP Screens")],-1)),o("span",{id:"connection",class:he(["conn",{online:a(m).connected}]),role:"status"},d(a(m).reachable?a(m).connected?a(c)("editor.sidebar.connection.connected"):a(c)("editor.sidebar.connection.reconnecting"):a(c)("editor.sidebar.connection.unreachable")),3),o("button",{type:"button",class:"search-btn",id:"open-palette",onClick:b[0]||(b[0]=v=>a(m).palette=!0)},[Me("⌕ "+d(a(c)("editor.sidebar.search")),1),b[10]||(b[10]=o("kbd",null,"⌘K",-1))]),o("div",Zm,d(a(c)("editor.sidebar.screens")),1),o("div",Qm,[(g(!0),_(q,null,me(a(m).inventory.screens,v=>(g(),_("div",{key:v.id,class:he(["screen-item",{selected:v.id===a(m).selected&&a(xt)===""}])},[o("button",{type:"button",class:"nav-item","aria-current":v.id===a(m).selected&&a(xt)===""?"true":"false",onClick:y=>a(ku)(v.id)},[o("span",{class:he(["dot",{off:!v.online}])},null,2),o("span",tb,[o("span",null,d(v.name),1),o("small",null,d(v.online?a(c)("editor.common.online"):a(c)("editor.common.offline"))+d(v.area?" · "+v.area:"")+" · "+d(v.firmware||a(c)("editor.common.unknown")),1)]),v.id===a(m).selected&&a(m).dirty?(g(),_("span",{key:0,class:"unsaved",role:"img","aria-label":a(c)("editor.common.unsaved"),title:a(c)("editor.common.unsaved")},null,8,nb)):W("",!0),i(v)?.kind==="available"?(g(),_("span",sb,d(a(c)("editor.sidebar.update.pill")),1)):i(v)?.kind==="running"?(g(),_("span",ib)):W("",!0)],8,eb),i(v)?(g(),_("div",{key:0,class:he(["screen-update",i(v).kind])},[i(v).kind==="available"?(g(),_(q,{key:0},[t.value===v.id?(g(),_(q,{key:0},[o("small",null,d(a(c)("editor.sidebar.host.hint")),1),o("form",{class:"screen-host",onSubmit:Ot(y=>u(v),["prevent"])},[Ee(o("input",{"onUpdate:modelValue":b[1]||(b[1]=y=>n.value=y),placeholder:a(c)("editor.sidebar.host.placeholder"),required:"",pattern:"[A-Za-z0-9][A-Za-z0-9.\\-]*","aria-label":a(c)("editor.sidebar.host.label"),autofocus:""},null,8,lb),[[Xe,n.value]]),o("button",ab,d(a(c)("editor.sidebar.host.start")),1),o("button",{type:"button",class:"icon-btn","aria-label":a(c)("editor.common.cancel"),onClick:b[2]||(b[2]=y=>t.value=null)},"✕",8,rb)],40,ob)],64)):(g(),_(q,{key:1},[o("small",null,d(i(v).text),1),o("button",{type:"button",class:"btn mini primary",disabled:!v.update?.profile,title:v.update?.profile?"":a(c)("editor.sidebar.update.no_profile"),onClick:y=>r(v)},d(a(c)("editor.sidebar.update.button")),9,cb)],64)),l(v).length?(g(),_("details",ub,[o("summary",null,d(a(c)("editor.sidebar.update.whats_new")),1),o("ul",null,[(g(!0),_(q,null,me(l(v).slice(0,8),y=>(g(),_("li",{key:y},d(y),1))),128))])])):W("",!0)],64)):i(v).kind==="running"&&a(Xn)(v)?(g(),_(q,{key:1},[o("div",{class:"progress",role:"progressbar","aria-valuenow":a(Xn)(v).percent,"aria-valuemin":"0","aria-valuemax":"100"},[o("i",{style:Ue({width:a(Xn)(v).percent+"%"})},null,4)],8,db),o("div",fb,[o("span",null,d(a(Xn)(v).percent)+" %",1),o("span",{title:f()},d(a(Xn)(v).text),9,pb)]),f()?(g(),_("small",{key:0,title:f(),style:{"white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis"}},d(f()),9,hb)):W("",!0),o("button",{type:"button",class:"btn link mini",style:{"justify-self":"start"},onClick:b[3]||(b[3]=y=>a(He)("#firmware"))},d(a(c)("editor.sidebar.update.full_log")),1)],64)):(g(),_("small",{key:2,class:he({failed:i(v).kind==="failed"})},d(i(v).text),3))],2)):W("",!0)],2))),128))]),o("div",mb,[(g(!0),_(q,null,me(a(m).inventory.pending||[],v=>(g(),_("div",{key:v.file,class:"pending"},[o("strong",null,d(v.friendly),1),o("small",null,d(h(v)),1),o("div",bb,[o("button",{type:"button",class:"btn mini quiet",onClick:b[4]||(b[4]=(...y)=>a(ki)&&a(ki)(...y))},d(a(c)("editor.common.open_integrations")),1),v.api_key?(g(),_("button",{key:0,type:"button",class:"btn mini quiet",onClick:y=>a(Lt)(v.api_key)},d(a(c)("editor.sidebar.copy_api_key")),9,vb)):W("",!0)])]))),128))]),o("button",{id:"new-screen",type:"button",class:"nav-item ghost","aria-current":a(xt)==="#new-screen"?"true":"false",onClick:b[5]||(b[5]=v=>a(He)("#new-screen"))},[b[11]||(b[11]=o("span",{class:"plus"},"+",-1)),o("span",_b,d(a(c)("editor.nav.new_screen")),1)],8,gb),b[14]||(b[14]=o("div",{class:"spacer"},null,-1)),o("div",yb,[o("div",wb,d(a(c)("editor.sidebar.more")),1),o("button",{id:"open-firmware",type:"button",class:"nav-item","aria-current":a(xt)==="#firmware"?"true":"false",onClick:b[6]||(b[6]=v=>a(He)("#firmware"))},[o("span",$b,d(a(Ae)("F0241")),1),o("span",xb,d(a(c)("editor.nav.firmware")),1)],8,kb),o("button",{id:"open-alerts",type:"button",class:"nav-item","aria-current":a(xt)==="#alerts"?"true":"false",onClick:b[7]||(b[7]=v=>a(He)("#alerts"))},[o("span",Cb,d(a(Ae)("F0594")),1),o("span",Tb,d(a(c)("editor.nav.alerts")),1)],8,Sb),o("button",{id:"open-settings",type:"button",class:"nav-item","aria-current":a(xt)==="#settings"?"true":"false",onClick:b[8]||(b[8]=v=>a(He)("#settings"))},[o("span",Ab,d(a(Ae)("F0493")),1),o("span",Pb,d(a(c)("editor.nav.settings")),1)],8,Eb),o("button",{id:"refresh",type:"button",class:"nav-item ghost",onClick:b[9]||(b[9]=v=>a(Tn)())},[b[12]||(b[12]=o("span",{class:"plus"},"↻",-1)),o("span",Ob,d(a(c)("editor.sidebar.refresh")),1)])])]))}}),Lb={key:0,id:"toast",class:"toast",role:"status"},Mb=Le({__name:"Toast",setup(e){return(t,n)=>a(m).toast?(g(),_("div",Lb,[o("span",null,d(a(m).toast.message),1),a(m).toast.action?(g(),_("button",{key:0,type:"button",onClick:n[0]||(n[0]=s=>{a(m).toast.action.run(),a(_m)()})},d(a(m).toast.action.label),1)):W("",!0)])):W("",!0)}}),Rb=["aria-label"],Nb=["placeholder","aria-label"],Fb={class:"palette-list"},Db={class:"palette-group"},Ub=["onMouseenter","onClick"],jb={key:0,class:"mdi"},Hb={key:1,class:"glyph"},Vb={class:"tx"},Wb={key:0},Bb={key:2,class:"hint-key"},Kb={key:0,class:"palette-empty"},zb=Le({__name:"CommandPalette",setup(e){const t=$e(""),n=$e(0),s=$e(null),i=$(()=>{const h=t.value.trim().toLocaleLowerCase(),p=[],b=c("editor.palette.groups.screens"),v=c("editor.palette.groups.actions");for(const T of m.inventory.screens)p.push({group:b,label:T.name,detail:`${T.online?c("editor.common.online"):c("editor.common.offline")} · ${T.firmware||c("editor.common.unknown")}`,glyphText:"▦",run:()=>ku(T.id)});const y=yt.value,I=[{group:v,label:c("editor.nav.new_screen"),detail:c("editor.nav.new_screen_detail"),glyphText:"+",run:()=>He("#new-screen")},{group:v,label:c("editor.nav.firmware"),icon:"F0241",run:()=>He("#firmware")},{group:v,label:c("editor.nav.alerts"),detail:c("editor.palette.alerts_detail"),icon:"F0594",run:()=>He("#alerts")},{group:v,label:c("editor.nav.settings"),detail:c("editor.palette.settings_detail"),icon:"F0493",run:()=>He("#settings")}];if(y&&m.layout&&I.unshift({group:v,label:c("editor.common.save_send"),detail:m.dirty?c("editor.common.unsaved"):c("editor.palette.nothing_to_save"),key:"⌘S",run:()=>Bo()},{group:v,label:c("editor.screen_view.tabs.layout"),detail:y.name,run:()=>{He(""),m.tab="layout"}},{group:v,label:c("editor.screen_view.tabs.settings"),detail:y.name,run:()=>{He(""),m.tab="settings"}},{group:v,label:c("editor.palette.identify"),detail:zn(y)?c("editor.palette.identify_detail"):c("editor.palette.identify_needs"),run:()=>{zn(y)&&Su(y)}},{group:v,label:c("editor.palette.export"),detail:c("editor.palette.export_detail"),run:Tu}),p.push(...I),y&&m.layout&&h){const T=new Set(m.layout.tiles.map(A=>A.entity)),k=m.layout.tiles.length>=Kn.value;for(const A of m.inventory.entities)if(!(A.tile===!1||T.has(A.id))&&`${A.name} ${A.id} ${A.area||""} ${A.device||""}`.toLocaleLowerCase().includes(h)&&(p.push({group:c("editor.palette.groups.add"),label:A.name,detail:[Ht(A.id)[0],A.area].filter(Boolean).join(" · "),icon:m.inventory.icons?Cn(A.id):void 0,run:()=>{k||$u(A.id)}}),p.length>60))break}return h?p.filter(T=>`${T.label} ${T.detail||""}`.toLocaleLowerCase().includes(h)):p}),l=$(()=>{const h=[];return i.value.forEach((p,b)=>{(h.find(y=>y.group===p.group)||(h.push({group:p.group,items:[]}),h[h.length-1])).items.push({item:p,index:b})}),h});function r(){m.palette=!1}function u(h){r(),h.run()}function f(h){if(h.key==="Escape")h.preventDefault(),r();else if(h.key==="ArrowDown")h.preventDefault(),n.value=Math.min(i.value.length-1,n.value+1);else if(h.key==="ArrowUp")h.preventDefault(),n.value=Math.max(0,n.value-1);else if(h.key==="Enter"){h.preventDefault();const p=i.value[n.value];p&&u(p)}}return Tt(t,()=>n.value=0),Tt(()=>m.palette,async h=>{h&&(t.value="",n.value=0,await Ni(),s.value?.focus())}),(h,p)=>a(m).palette?(g(),_("div",{key:0,class:"palette-backdrop",onClick:r},[o("div",{class:"palette",role:"dialog","aria-label":a(c)("editor.sidebar.search"),onClick:p[1]||(p[1]=Ot(()=>{},["stop"])),onKeydown:f},[Ee(o("input",{ref_key:"input",ref:s,"onUpdate:modelValue":p[0]||(p[0]=b=>t.value=b),id:"palette-input",placeholder:a(c)("editor.palette.placeholder"),"aria-label":a(c)("editor.sidebar.search"),autocomplete:"off"},null,8,Nb),[[Xe,t.value]]),o("div",Fb,[(g(!0),_(q,null,me(l.value,b=>(g(),_(q,{key:b.group},[o("div",Db,d(b.group),1),(g(!0),_(q,null,me(b.items,({item:v,index:y})=>(g(),_("button",{key:y,type:"button",class:he(["palette-item",{active:y===n.value}]),onMouseenter:I=>n.value=y,onClick:I=>u(v)},[v.icon?(g(),_("span",jb,d(a(Ae)(v.icon)),1)):(g(),_("span",Hb,d(v.glyphText||"›"),1)),o("span",Vb,[o("span",null,d(v.label),1),v.detail?(g(),_("small",Wb,d(v.detail),1)):W("",!0)]),v.key?(g(),_("kbd",Bb,d(v.key),1)):W("",!0)],42,Ub))),128))],64))),128)),i.value.length?W("",!0):(g(),_("p",Kb,d(a(c)("editor.palette.empty")),1))])],40,Rb)])):W("",!0)}}),ve={source:null,element:null,ghost:null,timer:0,start:null,offset:{x:0,y:0},pointerId:null,suppressUntil:0,last:null,scroller:0,target:null},Ou={mounted(e,t){e.__dragSource=t.value,e.addEventListener("pointerdown",s=>{const i=e.__dragSource;if(!(s.button!==0||e.disabled||s.target.closest(".remove"))){s.pointerType!=="touch"&&s.preventDefault(),Object.assign(ve,{source:i,element:e,start:{x:s.clientX,y:s.clientY},pointerId:s.pointerId});try{e.setPointerCapture(s.pointerId)}catch{}clearTimeout(ve.timer),s.pointerType==="touch"&&(ve.timer=window.setTimeout(()=>ur(s),260))}}),e.addEventListener("pointermove",s=>{if(m.drag.active||!ve.start||ve.element!==e)return;const i=Math.hypot(s.clientX-ve.start.x,s.clientY-ve.start.y);if(s.pointerType==="touch"){i>10&&(clearTimeout(ve.timer),ve.start=null);return}i>=6&&ur(s)});const n=()=>{ve.element===e&&!m.drag.active&&(clearTimeout(ve.timer),ve.start=null)};e.addEventListener("pointerup",n),e.addEventListener("pointercancel",n)},updated(e,t){e.__dragSource=t.value}};function ur(e){if(m.drag.active||!ve.start||!ve.source||!ve.element)return;m.drag.active=!0,m.drag.moving=ve.source.kind==="tile"?ve.source.tile:hu(ve.source.id),m.drag.preview=null,ve.target=null,getSelection()?.removeAllRanges();const t=ve.element.getBoundingClientRect(),n=ve.element.cloneNode(!0);n.classList.add("drag-ghost"),n.style.width=`${t.width}px`,n.style.height=`${t.height}px`,ve.offset={x:e.clientX-t.left,y:e.clientY-t.top},document.body.append(n),ve.ghost=n,document.addEventListener("pointermove",Yo),document.addEventListener("pointerup",Ti),document.addEventListener("pointercancel",Ti);try{ve.element.releasePointerCapture(ve.pointerId)}catch{}try{document.documentElement.setPointerCapture(ve.pointerId)}catch{}document.addEventListener("touchmove",Iu,{passive:!1}),ve.scroller=window.setInterval(()=>{if(!ve.last)return;const{x:s,y:i}=qb(document),l=s?pr(ve.last.x,fr(s,"x")):0,r=i?pr(ve.last.y,fr(i,"y")):0;l&&s.scrollBy(l,0),r&&i.scrollBy(0,r),(l||r)&&Go(Lu(ve.last.x,ve.last.y))},16),Go(-1),Yo(e)}function dr(e,t){if(!e)return!1;const n=t==="x"?e.scrollWidth>e.clientWidth:e.scrollHeight>e.clientHeight,s=getComputedStyle(e)[t==="x"?"overflowX":"overflowY"];return n&&(s==="auto"||s==="scroll")}function qb(e){const t=e.querySelector(".pages"),n=e.querySelector(".canvas");return{x:dr(t,"x")?t:n,y:dr(n,"y")?n:e.scrollingElement}}function fr(e,t){const n=t==="x"?window.innerWidth:window.innerHeight;if(e===e.ownerDocument.scrollingElement)return[0,n];const s=e.getBoundingClientRect();return t==="x"?[Math.max(s.left,0),Math.min(s.right,n)]:[Math.max(s.top,0),Math.min(s.bottom,n)]}function pr(e,[t,n]){return e<t+60?-12:e>n-60?12:0}function Iu(e){m.drag.active&&e.preventDefault()}function Ti(e){e.pointerId===ve.pointerId&&Yb(e.type==="pointerup")}function Yo(e){!ve.ghost||e.pointerId!==ve.pointerId||(ve.last={x:e.clientX,y:e.clientY},ve.ghost.style.transform=`translate(${e.clientX-ve.offset.x}px, ${e.clientY-ve.offset.y}px)`,Go(Lu(e.clientX,e.clientY)))}function Lu(e,t){let n=null,s=1/0;for(const l of document.querySelectorAll(".pages [data-slot]")){const r=l.getBoundingClientRect(),u=Math.hypot(Math.max(r.left-e,0,e-r.right),Math.max(r.top-t,0,t-r.bottom));u<s&&(s=u,n={cell:l,r})}if(!n||s>16)return-1;let i=Number(n.cell.dataset.slot);return n.cell.classList.contains("wide")&&e>(n.r.left+n.r.right)/2&&(i+=1),i}function Go(e){ve.target===e||!m.layout||!m.drag.moving||(ve.target=e,m.drag.preview=e>=0?pu(m.layout.tiles,m.drag.moving,e):null)}function Yb(e){const t=m.drag.preview,n=m.drag.moving;document.removeEventListener("pointermove",Yo),document.removeEventListener("pointerup",Ti),document.removeEventListener("pointercancel",Ti),document.removeEventListener("touchmove",Iu);try{document.documentElement.releasePointerCapture(ve.pointerId)}catch{}if(ve.ghost?.remove(),Object.assign(ve,{ghost:null,suppressUntil:Date.now()+400,last:null,start:null,target:null,element:null,source:null}),clearInterval(ve.scroller),m.drag.active=!1,m.drag.preview=null,m.drag.moving=null,e&&t&&n&&m.layout){const s=m.layout.tiles.map(l=>`${l.entity}@${l.slot}`).join(),i=!m.layout.tiles.includes(n);for(const{tile:l,slot:r}of t)l.slot=r,m.layout.tiles.includes(l)||m.layout.tiles.push(l);m.layout.tiles.sort((l,r)=>l.slot-r.slot),m.layout.tiles.map(l=>`${l.entity}@${l.slot}`).join()!==s&&pt(),i&&Ys(n,n.slot)}}window.addEventListener("click",e=>{Date.now()<ve.suppressUntil&&(e.stopPropagation(),e.preventDefault())},!0);const Gb=["data-slot","tabindex","role","aria-label"],Jb={class:"clockface",viewBox:"0 0 60 60","aria-hidden":"true"},Xb=["transform"],Zb=["transform"],Qb=["transform"],ev={key:0,class:"lead"},tv={class:"tx"},nv={class:"nm"},sv={class:"st"},iv={class:"ic mdi"},ov={class:"lead"},lv={class:"big"},av={class:"nm"},rv={class:"lead"},cv={class:"nm"},uv={key:0,class:"goto"},dv={key:1,class:"big"},fv={key:0},pv={key:1,class:"ctl"},hv={key:1,class:"stp"},mv={class:"mdi"},bv={class:"mdi"},vv={class:"key mdi"},gv={class:"key mdi"},_v={class:"key mdi"},yv={class:"key mdi"},wv={class:"key mdi"},kv={class:"key mdi"},$v={class:"key mdi"},xv={key:5,class:"run"},Sv={class:"lead"},Cv={class:"tx"},Tv={class:"nm"},Ev={key:0,class:"goto"},Av={key:1,class:"big"},Pv={key:0},Ov={key:1,class:"ctl"},Iv={key:1,class:"stp"},Lv={class:"mdi"},Mv={class:"mdi"},Rv={class:"key mdi"},Nv={class:"key mdi"},Fv={key:3,class:"stp"},Dv={class:"mdi"},Uv={class:"mdi"},jv={class:"key mdi"},Hv={class:"key mdi"},Vv={class:"key mdi"},Wv={class:"key mdi"},Bv={class:"key mdi"},Kv={class:"key mdi"},zv={class:"key mdi"},qv={class:"key mdi"},Yv={class:"key mdi"},Gv={class:"key mdi"},Jv={class:"key mdi"},Xv={class:"key mdi"},Zv={class:"key mdi"},Qv={class:"key mdi"},eg={class:"key mdi"},tg={key:10,class:"run"},ng={class:"tx"},sg={class:"nm"},ig={key:0,class:"goto"},og={key:0,class:"big"},lg={key:0},ag=["title","aria-label"],rg=Le({__name:"TileCard",props:{tile:{},slot:{},placeholder:{type:Boolean}},setup(e){const t=e,n=$(()=>t.tile.name||b.value==="screen"&&qm(t.tile.entity)||zs(t.tile.entity)),s=$(()=>ru(t.tile)),i=$(()=>Uo(t.tile)&&!s.value),l=$(()=>us(t.tile.entity)),r=$(()=>m.inventory.backgrounds?.[t.tile.options?.background||""]?.color),u=$(()=>t.tile.options?.background==="none"),f=$(()=>t.tile.options?.display||"standard"),h=$(()=>f.value!=="standard"?bu(f.value):""),p=$(()=>mu(t.tile,m.inventory)),b=$(()=>t.tile.entity.split(".")[0]),v=$(()=>m.inventory.icons?.controls||{}),y=B=>v.value[B]?Ae(v.value[B]):"",I=$(()=>Cl(t.tile)&&m.inspector?.kind==="tile"),T=$(()=>!t.placeholder&&m.layout?.tiles.includes(t.tile)),k=$(()=>c("editor.tile_card.label",{name:n.value,slot:t.slot%ze+1,page:At(t.slot)+1})),A=$(()=>new Date(m.now)),S=$(()=>(A.value.getHours()%12+A.value.getMinutes()/60)*30),U=$(()=>A.value.getMinutes()*6),C=$(()=>b.value==="screen"?null:km(t.tile.entity)),K=$(()=>!C.value||["unavailable","unknown",""].includes(C.value.state)),O=$(()=>!!C.value&&!K.value&&C.value.state!=="off"&&C.value.state!=="closed"&&C.value.state!=="standby"&&C.value.state!=="idle"&&C.value.state!=="docked"),E=$(()=>["light","switch","input_boolean","fan"].includes(b.value)&&C.value?.state==="on"),R=$(()=>C.value?.a?.unit_of_measurement),L=B=>B.charAt(0).toUpperCase()+B.slice(1).replace(/_/g," "),D=B=>lu(B,Km.value),M=["number","input_number","counter"],Y=B=>R.value||M.includes(b.value)?`${D(B)}${lr(R.value)}`:B,te={climate:"climate",cover:"cover",media_player:"media",person:"person",sun:"sun",vacuum:"vacuum",weather:"weather"};function ye(B){const ne=wt=>zh(`screen.ha.${wt}`)?jn(`screen.ha.${wt}`):"",ie=B.state==="windy-variant"?"windy":B.state.replace(/-/g,"_");return b.value==="binary_sensor"&&["on","off"].includes(ie)?ne(`binary.${B.a?.device_class}_${ie}`)||ne(ie):te[b.value]?ne(`${te[b.value]}.${ie}`)||(["on","off"].includes(ie)?ne(ie):""):["on","off"].includes(ie)?ne(ie):""}const re=["scene","script","button","input_button"],be=$(()=>{const B=C.value;if(!B||re.includes(b.value))return h.value;if(K.value)return jn(B.state==="unknown"?"editor.mockup.unknown":"screen.ha.unavailable");const ne=B.a||{},ie=B.word||ye(B)||L(B.state);return b.value==="climate"?`${ne.current_temperature!==void 0?`${D(ne.current_temperature)}° · `:""}${ie}`:b.value==="weather"?`${ie}${ne.temperature!==void 0?` · ${D(ne.temperature)}°`:""}`:b.value==="cover"&&ne.current_position!==void 0&&ne.current_position>0&&ne.current_position<100?`${ie} · ${ne.current_position}${lr("%")}`:b.value==="media_player"&&ne.media_title?`${ie} · ${ne.media_title}`:b.value==="sensor"||M.includes(b.value)?Y(B.state):ie}),ge=$(()=>C.value&&!K.value?R.value||M.includes(b.value)?D(C.value.state):C.value.state:"—"),we=$(()=>{const B=C.value;if(!B||K.value)return 0;const ne=B.a||{};if(b.value==="light")return B.state==="on"?ne.brightness!==void 0?Math.round(ne.brightness/255*100):100:0;if(b.value==="fan")return B.state==="on"?ne.percentage??100:0;if(b.value==="cover")return 100-(ne.current_position??(B.state==="open"?100:0));if(b.value==="media_player")return Math.round((ne.volume_level??0)*100);if(b.value==="number"||b.value==="input_number"){const ie=Number(B.state),wt=Number(ne.min??0),Ln=Number(ne.max??100);return Number.isFinite(ie)&&Ln>wt?Math.round((ie-wt)/(Ln-wt)*100):0}return 0}),Ge=$(()=>jn(`screen.ha.button.${{scene:"activate",script:"run"}[b.value]||"press"}`)),qe=$(()=>`${jn("screen.tile.page",{n:l.value})} ›`),le=$(()=>({background:`linear-gradient(to right, ${we.value?"#ffbf38":"#c9ccd1"} ${we.value}%, ${we.value?"#fff1d3":"#e6e8ec"} ${we.value}%)`})),Z=$(()=>({background:`linear-gradient(to right, #2196f3 ${we.value}%, #d3e8fb ${we.value}%)`})),ue=$(()=>{const B=C.value?.a?.temperature;return B!=null?`${D(B)}°`:"—"});async function ke(B){if(B.key==="Enter"||B.key===" "){B.preventDefault(),Wo(t.tile);return}const ne={ArrowLeft:-1,ArrowRight:1,ArrowUp:-2,ArrowDown:2}[B.key];ne&&(B.preventDefault(),Ys(t.tile,t.tile.slot+(s.value?Math.sign(ne)*ze:i.value?Math.sign(ne)*2:ne))&&(await Ni(),document.querySelector(`.pages [data-slot="${t.tile.slot}"]`)?.focus()))}return(B,ne)=>Ee((g(),_("div",{class:he(["tile",{wide:i.value,full:s.value,bare:u.value,placeholder:e.placeholder||!T.value,chosen:I.value}]),"data-slot":e.slot,style:Ue(r.value&&!u.value?{backgroundColor:r.value}:void 0),tabindex:T.value?0:-1,role:T.value?"button":void 0,"aria-label":T.value?k.value:void 0,onClick:ne[1]||(ne[1]=ie=>T.value&&a(Wo)(e.tile)),onKeydown:ne[2]||(ne[2]=ie=>T.value&&ke(ie))},[f.value==="analog"?(g(),_(q,{key:0},[(g(),_("svg",Jb,[ne[3]||(ne[3]=o("circle",{cx:"30",cy:"30",r:"27",fill:"#fff",stroke:"#c9ccd1"},null,-1)),(g(),_(q,null,me([0,90,180,270],ie=>o("line",{key:ie,x1:"30",y1:"5",x2:"30",y2:"9",stroke:"#1b1b1b","stroke-width":"1.5",transform:`rotate(${ie} 30 30)`},null,8,Xb)),64)),o("line",{x1:"30",y1:"30",x2:"30",y2:"16",stroke:"#1b1b1b","stroke-width":"2.4","stroke-linecap":"round",transform:`rotate(${S.value} 30 30)`},null,8,Zb),o("line",{x1:"30",y1:"30",x2:"30",y2:"11",stroke:"#1b1b1b","stroke-width":"1.6","stroke-linecap":"round",transform:`rotate(${U.value} 30 30)`},null,8,Qb),ne[4]||(ne[4]=o("circle",{cx:"30",cy:"30",r:"1.8",fill:"#1b1b1b"},null,-1))])),i.value?(g(),_("span",ev,[o("span",tv,[o("span",nv,d(n.value),1),o("span",sv,d(h.value),1)])])):W("",!0)],64)):f.value==="digital"&&b.value==="screen"?(g(),_(q,{key:1},[o("span",iv,d(a(Ae)(a(vs)(e.tile))),1),o("span",ov,[o("span",lv,d(a(Wi)(a(as),A.value)),1),o("span",av,d(n.value),1)])],64)):s.value?(g(),_(q,{key:2},[o("span",{class:he(["ic mdi",{lit:E.value,thumb:f.value==="live"||f.value==="cover"}])},d(a(Ae)(a(vs)(e.tile))),3),o("span",rv,[o("span",cv,d(n.value),1),l.value?(g(),_("span",uv,d(qe.value),1)):f.value==="watch"?(g(),_("span",dv,[Me(d(ge.value),1),R.value&&!K.value?(g(),_("small",fv,d(R.value),1)):W("",!0)])):be.value?(g(),_("span",{key:2,class:he(["st",{off:K.value}])},d(be.value),3)):W("",!0)]),e.tile.options?.inline==="slider"?(g(),_("span",{key:0,class:"mini-slider",style:Ue(le.value)},null,4)):W("",!0),p.value?(g(),_("span",pv,[p.value==="toggle"?(g(),_("span",{key:0,class:he(["tog",{off:!O.value}])},null,2)):p.value==="setpoint"?(g(),_("span",hv,[o("span",mv,d(y("minus")||"−"),1),o("b",null,d(ue.value),1),o("span",bv,d(y("plus")||"+"),1)])):p.value==="volume"?(g(),_(q,{key:2},[o("span",{class:"range",style:Ue(Z.value)},null,4),o("span",vv,d(y("volume-high")),1)],64)):p.value==="playback"?(g(),_(q,{key:3},[o("span",gv,d(y("skip-previous")),1),o("span",_v,d(y(O.value?"pause":"play")||y("play")),1),o("span",yv,d(y("skip-next")),1)],64)):p.value==="buttons"&&b.value==="cover"?(g(),_(q,{key:4},[o("span",wv,d(y("arrow-expand-horizontal")),1),o("span",kv,d(y("stop")),1),o("span",$v,d(y("arrow-collapse-horizontal")),1)],64)):p.value==="run"?(g(),_("span",xv,d(Ge.value),1)):(g(),_("span",{key:6,class:"range",style:Ue({background:`linear-gradient(to right, #2196f3 ${we.value}%, #d3e8fb ${we.value}%)`})},null,4))])):W("",!0)],64)):i.value?(g(),_(q,{key:3},[o("span",Sv,[o("span",{class:he(["ic mdi",{lit:E.value,thumb:f.value==="live"||f.value==="cover"}])},d(a(Ae)(a(vs)(e.tile))),3),o("span",Cv,[o("span",Tv,d(n.value),1),l.value?(g(),_("span",Ev,d(qe.value),1)):f.value==="watch"?(g(),_("span",Av,[Me(d(ge.value),1),R.value&&!K.value?(g(),_("small",Pv,d(R.value),1)):W("",!0)])):be.value?(g(),_("span",{key:2,class:he(["st",{off:K.value}])},d(be.value),3)):W("",!0)])]),e.tile.options?.inline==="slider"?(g(),_("span",{key:0,class:"mini-slider",style:Ue(le.value)},null,4)):W("",!0),p.value?(g(),_("span",Ov,[p.value==="toggle"?(g(),_("span",{key:0,class:he(["tog",{off:!O.value}])},null,2)):p.value==="setpoint"?(g(),_("span",Iv,[o("span",Lv,d(y("minus")||"−"),1),o("b",null,d(ue.value),1),o("span",Mv,d(y("plus")||"+"),1)])):p.value==="stepper"&&b.value.endsWith("select")?(g(),_(q,{key:2},[o("span",Rv,d(y("chevron-left")),1),o("span",Nv,d(y("chevron-right")),1)],64)):p.value==="stepper"?(g(),_("span",Fv,[o("span",Dv,d(y("minus")||"−"),1),o("b",null,d(ge.value),1),o("span",Uv,d(y("plus")||"+"),1)])):p.value==="mode"?(g(),_(q,{key:4},[o("span",jv,d(y("power")),1),o("span",Hv,d(y("fire")),1),o("span",Vv,d(y("snowflake")),1)],64)):p.value==="volume"?(g(),_(q,{key:5},[o("span",{class:"range",style:Ue(Z.value)},null,4),o("span",Wv,d(y("volume-high")),1)],64)):p.value==="playback"?(g(),_(q,{key:6},[o("span",Bv,d(y("skip-previous")),1),o("span",Kv,d(y(O.value?"pause":"play")||y("play")),1),o("span",zv,d(y("skip-next")),1)],64)):p.value==="buttons"&&b.value==="cover"?(g(),_(q,{key:7},[o("span",qv,d(y("arrow-expand-horizontal")),1),o("span",Yv,d(y("stop")),1),o("span",Gv,d(y("arrow-collapse-horizontal")),1)],64)):p.value==="buttons"&&b.value==="vacuum"?(g(),_(q,{key:8},[o("span",Jv,d(y("play")),1),o("span",Xv,d(y("stop")),1),o("span",Zv,d(y("home-map-marker")),1)],64)):p.value==="buttons"&&b.value==="timer"?(g(),_(q,{key:9},[o("span",Qv,d(y("play")),1),o("span",eg,d(y("close")),1)],64)):p.value==="run"?(g(),_("span",tg,d(Ge.value),1)):(g(),_("span",{key:11,class:"range",style:Ue({background:`linear-gradient(to right, #2196f3 ${we.value}%, #d3e8fb ${we.value}%)`})},null,4))])):W("",!0)],64)):(g(),_(q,{key:4},[o("span",{class:he(["head",{top:f.value==="watch"}])},[o("span",{class:he(["ic mdi",{lit:E.value,thumb:f.value==="live"||f.value==="cover"}])},d(a(Ae)(a(vs)(e.tile))),3),o("span",ng,[o("span",sg,d(n.value),1),l.value?(g(),_("span",ig,d(qe.value),1)):f.value!=="watch"&&be.value?(g(),_("span",{key:1,class:he(["st",{off:K.value}])},d(be.value),3)):W("",!0)])],2),f.value==="watch"?(g(),_("span",og,[Me(d(ge.value),1),R.value&&!K.value?(g(),_("small",lg,d(R.value),1)):W("",!0)])):W("",!0),e.tile.options?.inline==="slider"?(g(),_("span",{key:1,class:"mini-slider",style:Ue(le.value)},null,4)):W("",!0)],64)),T.value?(g(),_("button",{key:5,type:"button",class:"remove",title:a(c)("editor.tile_card.remove"),"aria-label":a(c)("editor.tile_card.remove_named",{name:n.value}),onClick:ne[0]||(ne[0]=Ot(ie=>a(xu)(e.tile),["stop"]))},"✕",8,ag)):W("",!0)],46,Gb)),[[a(Ou),{kind:"tile",tile:e.tile}]])}}),cg=["viewBox","aria-label"],ug=["y"],dg=["cx","cy","r","stroke","stroke-width"],fg=["x1","y1","x2","y2","stroke","stroke-width"],pg=["x","y","fill"],hg=["x","y"],Mu=Le({__name:"TopbarSvg",props:{items:{},nameText:{},single:{type:Boolean}},setup(e,{expose:t}){const n=e,s=$(()=>{m.fontsVersion,m.now,m.topbarPreviews;const k=n.items||hn();return gu(k,wu.value,n.nameText??(m.layout?.title||jn("editor.mockup.home")),vn)}),i=$(()=>s.value.metrics),l=$(()=>n.single?Math.round(i.value.text*1.4):i.value.top+Math.round(i.value.name*.45)),r=$(()=>n.single?Math.round(i.value.text*1.05):i.value.top),u=$(()=>{if(!n.single)return s.value.placed;const k=s.value.parts[0];return k&&(k.x=0),k?[k]:[]}),f=$(()=>n.single?`-2 0 ${Math.max(1,u.value[0]?.width||1)+4} ${l.value}`:`0 0 ${i.value.width} ${l.value}`),h=$(()=>r.value+(s.value.zero.top+s.value.zero.bottom)/2),p=$(()=>mm(s.value.nameText,s.value.fonts.name,Math.min(s.value.natural,s.value.nameRoom))),b=$(()=>new Date(m.now));function v(k){const A=b.value;return[[(A.getHours()%12+A.getMinutes()/60)*30,k*.24],[A.getMinutes()*6,k*.34]].map(([S,U])=>{const C=S*Math.PI/180;return{x2:U*Math.sin(C),y2:-U*Math.cos(C)}})}const y=k=>k.x-k.icon.ink.left,I=k=>(k.icon?k.x+(k.icon.ink.right-k.icon.ink.left)+s.value.gaps.icon:k.x)-k.text.ink.left,T=$(()=>`${(Math.max(1,u.value[0]?.width||1)+4)*(26/i.value.icon)}px`);return t({lay:s}),(k,A)=>(g(),_("svg",{viewBox:f.value,role:"img","aria-label":e.single?a(c)("editor.topbar.live.looks"):a(c)("editor.topbar.aria",{name:s.value.nameText}),style:Ue(e.single?{width:T.value}:void 0)},[e.single?W("",!0):(g(),_("text",{key:0,x:"0",y:i.value.top,fill:"#1b1b1b",style:Ue({font:s.value.fonts.name})},d(p.value),13,ug)),o("g",null,[(g(!0),_(q,null,me(u.value,S=>(g(),_(q,{key:S.index},[S.dial?(g(),_(q,{key:0},[o("circle",{cx:S.x+S.dial/2,cy:h.value,r:S.dial/2-Math.max(1,Math.round(S.dial/10))/2,fill:"none",stroke:S.view.color||"#46525e","stroke-width":Math.max(1,Math.round(S.dial/10))},null,8,dg),(g(!0),_(q,null,me(v(S.dial),(U,C)=>(g(),_("line",{key:C,x1:S.x+S.dial/2,y1:h.value,x2:S.x+S.dial/2+U.x2,y2:h.value+U.y2,stroke:S.view.color||"#46525e","stroke-width":Math.max(1,Math.round(S.dial*.075)),"stroke-linecap":"round"},null,8,fg))),128))],64)):(g(),_(q,{key:1},[S.icon?(g(),_("text",{key:0,x:y(S),y:h.value-(S.icon.ink.top+S.icon.ink.bottom)/2,fill:S.view.color||"#46525e",style:Ue({font:s.value.fonts.icon})},d(S.icon.glyph),13,pg)):W("",!0),S.text?(g(),_("text",{key:1,x:I(S),y:r.value,fill:"#46525e",style:Ue({font:s.value.fonts.text})},d(S.text.value),13,hg)):W("",!0)],64))],64))),128))])],12,cg))}}),mg={class:"page"},bg={class:"page-label"},vg=["title"],gg={key:1},_g=["title"],yg={class:"tiles"},wg=["data-slot","title","aria-label","onClick"],kg=Le({__name:"DevicePage",props:{page:{},entries:{},pages:{},moving:{}},setup(e){const t=e,n=$(()=>new Map(t.entries.map(h=>[h.slot,h]))),s=$(()=>new Set(t.entries.flatMap(h=>Bn(h.slot,ut(h.tile)).slice(1)))),i=$(()=>Array.from({length:ze},(h,p)=>t.page*ze+p).filter(h=>!s.value.has(h))),l=$(()=>t.pages>1&&!t.entries.some(h=>At(h.slot)===t.page)),r=$(()=>m.inspector?.kind==="bar"||m.inspector?.kind==="bar-add"),u=$(()=>t.entries.filter(h=>At(h.slot)===t.page).reduce((h,p)=>h+$l(ut(p.tile)),0));function f(h){const p=m.insertAt===h;m.insertAt=p?-1:h,m.insertAt>=0&&document.querySelector("#search")?.focus()}return(h,p)=>(g(),_("div",mg,[o("div",bg,[o("span",null,d(a(c)("editor.page.label",{page:e.page+1})),1),l.value?(g(),_("button",{key:0,type:"button",class:"btn mini",title:a(c)("editor.page.remove_title"),onClick:p[0]||(p[0]=b=>a(Sm)(e.page))},d(a(c)("editor.page.remove")),9,vg)):(g(),_("span",gg,d(u.value)+" / "+d(a(ze)),1))]),o("div",{class:he(["device",{cyd:!a(Ki)}])},[o("div",{class:he(["bar-wrap",{selected:r.value}]),title:a(c)("editor.page.edit_bar"),role:"button",tabindex:"0",onClick:p[1]||(p[1]=b=>a(Qt)(0)),onKeydown:p[2]||(p[2]=xc(Ot(b=>a(Qt)(0),["prevent"]),["enter"]))},[se(Mu)],42,_g),o("div",yg,[(g(!0),_(q,null,me(i.value,b=>(g(),_(q,{key:b},[n.value.get(b)?(g(),it(rg,{key:0,tile:n.value.get(b).tile,slot:b,placeholder:n.value.get(b).tile===e.moving},null,8,["tile","slot","placeholder"])):(g(),_("button",{key:1,type:"button",class:he(["cell",{"insert-here":a(m).insertAt===b}]),"data-slot":b,title:a(c)("editor.page.cell.title"),"aria-label":a(c)("editor.page.cell.aria",{slot:b%a(ze)+1,page:e.page+1}),onClick:v=>f(b)},[p[3]||(p[3]=o("span",null,"+",-1)),o("small",null,d(a(m).insertAt===b?a(c)("editor.page.cell.next"):a(c)("editor.page.cell.empty")),1)],10,wg))],64))),128))])],2)]))}}),$g={class:"library",id:"library"},xg={class:"lib-head"},Sg={class:"lib-title"},Cg=["placeholder","aria-label"],Tg={class:"filters",id:"filters"},Eg=["aria-pressed","onClick"],Ag={class:"lib-row"},Pg=["aria-label"],Og={value:""},Ig=["value"],Lg=["aria-pressed","title"],Mg={class:"lib-list",id:"results","aria-live":"polite"},Rg=["title","disabled","onClick"],Ng={class:"tx"},Fg={key:0,class:"hint"},Dg={key:1,class:"hint"},Ug={class:"lib-foot"},jg=Le({__name:"Library",setup(e){const t=["","light","climate","switch","binary_sensor","button","script","fan","cover","scene","vacuum","sensor","media_player","weather","number","select","person","timer","screen"],n={switch:"input_boolean",number:"input_number",select:"input_select",weather:"sun",button:"input_button"},s=$(()=>new Set(m.layout?.tiles.map(p=>p.entity)||[])),i=p=>s.value.has(p)&&!Bi(p),l=$(()=>[...new Set(m.inventory.entities.map(p=>p.area).filter(p=>!!p))].sort((p,b)=>p.localeCompare(b))),r=$(()=>{const p=m.search.toLocaleLowerCase(),b=m.filter,v=m.room;return[...m.inventory.builtin||[],...m.inventory.entities].filter(y=>y.tile!==!1&&(Ki.value||!["camera","image"].includes(y.id.split(".")[0]))&&(!b||y.id.startsWith(b+".")||n[b]===y.id.split(".")[0])&&(!v||y.area===v)&&(!m.hidePlaced||!i(y.id))&&`${y.name} ${y.id} ${y.device||""} ${y.area||""}`.toLocaleLowerCase().includes(p))}),u=$(()=>(m.layout?.tiles.length||0)>=Kn.value),f=$(()=>m.inventory.entities.length),h=p=>{const b=p.id.split(".")[0];return p.state==="unavailable"||p.state==="unknown"?"gone":["light","switch","input_boolean","fan"].includes(b)&&p.state==="on"?"on":""};return(p,b)=>(g(),_("aside",$g,[o("div",xg,[o("div",Sg,[Me(d(a(c)("editor.library.title"))+" ",1),o("small",null,d(a(c)("editor.library.entities",f.value)),1)]),Ee(o("input",{id:"search","onUpdate:modelValue":b[0]||(b[0]=v=>a(m).search=v),type:"search",placeholder:a(c)("editor.library.search"),autocomplete:"off","aria-label":a(c)("editor.library.search_label")},null,8,Cg),[[Xe,a(m).search]]),o("div",Tg,[(g(),_(q,null,me(t,v=>o("button",{key:v,type:"button","aria-pressed":a(m).filter===v?"true":"false",onClick:y=>a(m).filter=v},[v?(g(),_("span",{key:0,class:"domain-icon",style:Ue({color:a(Ht)(v+".")[2],background:a(Ht)(v+".")[3]}),"aria-hidden":"true"},d(a(Ht)(v+".")[1]),5)):W("",!0),Me(d(a(c)(`editor.library.filters.${v||"all"}`)),1)],8,Eg)),64))]),o("div",Ag,[Ee(o("select",{id:"room","onUpdate:modelValue":b[1]||(b[1]=v=>a(m).room=v),"aria-label":a(c)("editor.library.room")},[o("option",Og,d(a(c)("editor.library.all_rooms")),1),(g(!0),_(q,null,me(l.value,v=>(g(),_("option",{key:v,value:v},d(v),9,Ig))),128))],8,Pg),[[Wn,a(m).room]]),o("button",{type:"button",class:"chip-toggle",id:"hide-placed","aria-pressed":a(m).hidePlaced?"true":"false",title:a(c)("editor.library.hide_placed_title"),onClick:b[2]||(b[2]=v=>a(m).hidePlaced=!a(m).hidePlaced)},d(a(c)("editor.library.hide_placed")),9,Lg)])]),o("div",Mg,[(g(!0),_(q,null,me(r.value.slice(0,80),v=>Ee((g(),_("button",{key:v.id,type:"button",class:"ent",title:v.id,disabled:i(v.id)||u.value,onClick:y=>a($u)(v.id)},[o("span",{class:he(["av mdi",h(v)]),style:Ue({color:a(Ht)(v.id)[2],background:a(Ht)(v.id)[3]})},d(a(m).inventory.icons?a(Ae)(a(Cn)(v.id)):a(Ht)(v.id)[1]),7),o("span",Ng,[o("b",null,d(v.name),1),o("small",null,d([a(Ht)(v.id)[0],v.area,v.device].filter(Boolean).join(" · ")),1)]),o("span",{class:he(["add",{done:i(v.id)}])},d(i(v.id)?"✓":"+"),3)],8,Rg)),[[a(Ou),{kind:"entity",id:v.id}]])),128)),r.value.length?r.value.length>80?(g(),_("p",Dg,d(a(c)("editor.common.results",r.value.length)),1)):W("",!0):(g(),_("p",Fg,d(a(m).hidePlaced&&!a(m).search&&!a(m).filter&&!a(m).room?a(c)("editor.library.all_placed"):a(c)("editor.library.none_found")),1))]),o("div",Ug,d(u.value?a(c)(a(Kn)<48?"editor.library.full_update":"editor.library.full",a(Kn)):a(c)("editor.library.hint")),1)]))}}),Hg={class:"canvas-head"},Vg={id:"count"},Wg={key:0,id:"no-tiles"},Bg={key:1},Kg={key:2,id:"positions-hint",class:"warn"},zg={key:3,id:"page-reach-hint",class:"warn"},qg=["aria-label"],Yg={class:"page-label"},Gg=["tabindex"],Jg=Le({__name:"LayoutView",setup(e){const t=$(()=>m.layout),n=$(()=>m.drag.preview||Ze(t.value)),s=$(()=>It(n.value,t.value.pages)),i=$(()=>Tm()),l=$(()=>s.value<fn),r=$(()=>Qh(t.value.tiles)&&!$t(0,2,26)?c("editor.layout.positions_hint",{firmware:yt.value?.firmware||c("editor.common.unknown")}):""),u=$(()=>Eu(n.value,s.value));function f(h){h.target.closest(".device, .page-label, .canvas-head")||m.inspector&&Qe()}return(h,p)=>(g(),_(q,null,[o("div",{class:"canvas",id:"canvas",onClick:f},[o("div",Hg,[o("b",Vg,d(a(c)("editor.layout.count",{tiles:t.value.tiles.length,limit:a(Kn)},s.value)),1),t.value.tiles.length?(g(),_("span",Bg,d(a(c)("editor.layout.how_to")),1)):(g(),_("span",Wg,d(a(c)("editor.layout.no_tiles")),1)),r.value?(g(),_("span",Kg,d(r.value),1)):W("",!0),u.value?(g(),_("span",zg,d(u.value),1)):W("",!0)]),o("div",{class:"pages",id:"layout-preview","aria-label":a(c)("editor.layout.aria")},[(g(!0),_(q,null,me(i.value,b=>(g(),it(kg,{key:b,page:b-1,entries:n.value,pages:s.value,moving:a(m).drag.moving},null,8,["page","entries","pages","moving"]))),128)),o("div",{class:he(["page ghost",{disabled:!l.value}])},[o("div",Yg,[o("span",null,d(a(c)("editor.page.label",{page:i.value+1})),1)]),o("div",{class:he(["device",{cyd:a(yt)?.board!=="guition"}]),id:"add-page",role:"button",tabindex:l.value?0:-1,onClick:p[0]||(p[0]=b=>l.value&&a(Qa)()),onKeydown:p[1]||(p[1]=xc(Ot(b=>l.value&&a(Qa)(),["prevent"]),["enter"]))},d(l.value?a(c)("editor.layout.add_page"):a(c)("editor.layout.max_pages",a(fn))),43,Gg)],2)],8,qg)]),se(jg)],64))}}),Xg={class:"status",id:"settings-status",role:"status"},Zg={key:0,class:"set-grid",id:"settings-groups"},Qg={class:"mdi"},e_=["data-setting","title","onClick"],t_=["id"],n_={class:"s-control"},s_=["id","aria-checked","aria-labelledby","disabled","onClick"],i_=["aria-labelledby"],o_=["aria-pressed","disabled","onClick"],l_={key:2,class:"step"},a_=["aria-label","disabled","onPointerdown","onClick"],r_={class:"mdi"},c_=["id","aria-labelledby"],u_=["aria-label","disabled","onPointerdown","onClick"],d_={class:"mdi"},f_={key:0,class:"hint warn",id:"settings-page-reach"},p_=Le({__name:"SettingsTab",setup(e){const t=$(()=>Tl()),n=$(()=>xi()),s=$(()=>t.value?.owner==="screen"&&!yt.value?.online),i=$(()=>Nm.map(T=>({...T,rows:T.rows.filter(k=>t.value?.keys.includes(k.key))})).filter(T=>T.rows.length)),l=$(()=>Eu()),r=T=>s.value||!!t.value?.unavailable.includes(T.key),u=T=>T.needs?!!n.value[T.needs]:!0,f=$(()=>s.value?c("editor.screen_settings.status.offline"):m.settingPending?c("editor.common.saving"):t.value?.owner==="screen"?c("editor.screen_settings.status.screen"):c("editor.screen_settings.status.app")),h=(T,k)=>{const A=n.value[T.key];return r(T)||!u(T)||A===null||A===void 0?!0:T.kind!=="moment"&&sr(T,A,k,!1,n.value)===A},p=new WeakMap;function b(T,k,A){const S=xi(),U=sr(T,S[T.key],k,A,S);U!==S[T.key]&&ni(T.key,U,600)}function v(T,k,A){const S=T.currentTarget;if(S.disabled||T.button!==0)return;const U={timer:0,held:!1};p.set(S,U);let C=0;U.timer=window.setTimeout(function K(){U.held=!0,C+=1,b(k,A,C>5),U.timer=window.setTimeout(K,180)},450)}function y(T){const k=p.get(T.currentTarget);k&&clearTimeout(k.timer)}function I(T,k,A){const S=p.get(T.currentTarget);if(S?.held){S.held=!1;return}b(k,A,!1)}return(T,k)=>(g(),_("div",{class:he(["settings",{offline:s.value}]),id:"general-settings"},[o("span",Xg,d(f.value),1),t.value?(g(),_("div",Zg,[(g(!0),_(q,null,me(i.value,A=>(g(),_("section",{key:A.group,class:"set-card"},[o("h4",null,[o("span",Qg,d(a(Ae)(A.icon)),1),Me(d(a(c)(`editor.screen_settings.groups.${A.group}`)),1)]),(g(!0),_(q,null,me(A.rows,S=>(g(),_("div",{key:S.key,class:he(["srow",[`setting-${S.kind}`,{inactive:!u(S)||r(S)}]]),"data-setting":S.key,title:r(S)&&!s.value?a(c)("editor.screen_settings.unavailable"):"",onClick:U=>S.kind==="toggle"&&U.target.closest(".srow")===U.currentTarget&&!U.target.closest("button")&&!r(S)&&a(ni)(S.key,!n.value[S.key],150)},[o("span",{class:"s-label",id:`setting-label-${S.key}`},d(a(_o)(S)),9,t_),o("div",n_,[S.kind==="toggle"?(g(),_("button",{key:0,type:"button",class:he(["switch",{unknown:n.value[S.key]===null||n.value[S.key]===void 0}]),role:"switch",id:`setting-${S.key}`,"aria-checked":n.value[S.key]?"true":"false","aria-labelledby":`setting-label-${S.key}`,disabled:r(S),onClick:Ot(U=>a(ni)(S.key,!n.value[S.key],150),["stop"])},null,10,s_)):S.kind==="choice"?(g(),_("div",{key:1,class:"seg",role:"group","aria-labelledby":`setting-label-${S.key}`},[(g(!0),_(q,null,me(S.options,U=>(g(),_("button",{key:String(U),type:"button","aria-pressed":n.value[S.key]===U?"true":"false",disabled:r(S),onClick:C=>a(ni)(S.key,U,150)},d(a(Fm)(S,U)),9,o_))),128))],8,i_)):(g(),_("div",l_,[o("button",{type:"button","aria-label":a(c)("editor.screen_settings.lower",{name:a(_o)(S)}),disabled:h(S,-1),onPointerdown:U=>v(U,S,-1),onPointerup:y,onPointercancel:y,onPointerleave:y,onClick:U=>I(U,S,-1)},[o("span",r_,d(a(Ae)("F0374")),1)],40,a_),o("output",{id:`setting-${S.key}`,"aria-labelledby":`setting-label-${S.key}`},d(a(Hm)(S,n.value)),9,c_),o("button",{type:"button","aria-label":a(c)("editor.screen_settings.higher",{name:a(_o)(S)}),disabled:h(S,1),onPointerdown:U=>v(U,S,1),onPointerup:y,onPointercancel:y,onPointerleave:y,onClick:U=>I(U,S,1)},[o("span",d_,d(a(Ae)("F0415")),1)],40,u_)]))])],10,e_))),128)),l.value&&A.rows.some(S=>S.key==="page_buttons")?(g(),_("p",f_,d(l.value),1)):W("",!0)]))),128))])):W("",!0)],2))}}),h_={class:"seg wrap",role:"group"},m_=["disabled","aria-pressed","onClick"],mt=Le({__name:"Segmented",props:{choices:{},value:{},disabled:{type:Boolean}},emits:["pick"],setup(e,{emit:t}){const n=t;return(s,i)=>(g(),_("div",h_,[(g(!0),_(q,null,me(e.choices,([l,r])=>(g(),_("button",{key:String(l),type:"button",disabled:e.disabled,"aria-pressed":String(l)===String(e.value)?"true":"false",onClick:u=>n("pick",l)},d(r),9,m_))),128))]))}}),b_={class:"f"},v_={class:"f-label"},g_={key:0},__={key:1,class:"warn"},y_=["aria-expanded"],w_={class:"tx"},k_={key:0,class:"mono"},$_={class:"link"},x_={key:0,class:"picker"},S_=["placeholder","aria-label"],C_={class:"action-list"},T_=["aria-pressed","onClick"],E_={key:0,class:"hint"},A_={key:1,class:"warn"},P_={class:"f-label"},O_=["aria-label","value","onChange"],I_={value:""},L_=["value"],M_={key:3,class:"action-number"},R_=["aria-label","value","onInput"],N_=["onClick"],F_={key:4,class:"action-number"},D_=["aria-label","min","max","step","value","placeholder","onInput"],U_={key:0},j_=["aria-label","value","placeholder","onInput"],H_={key:6},V_={key:0,class:"warn"},W_={key:3},B_=Le({__name:"ActionPicker",props:{tile:{}},setup(e){const t=e,n=$(()=>m.entityActions[t.tile.entity]),s=$(()=>t.tile.options?.action),i=$(()=>n.value?.find(C=>C.action===s.value?.action)),l=$(()=>m.actionPickerOpen||!s.value),r=$(()=>{const C=m.actionSearch.trim().toLocaleLowerCase();return(n.value||[]).filter(K=>`${K.name} ${K.action} ${K.description}`.toLocaleLowerCase().includes(C))});n.value===void 0&&wm(t.tile.entity);function u(C){const K=C.action===s.value?.action;t.tile.options={...t.tile.options,action:K?s.value:{action:C.action}},m.actionPickerOpen=!1,pt()}function f(C,K){const O={...t.tile.options?.action?.data||{}};K===void 0?delete O[C]:O[C]=K,t.tile.options={...t.tile.options,action:{action:s.value.action,...Object.keys(O).length?{data:O}:{}}},pt()}const h=$(()=>{if(!i.value)return[];const C=t.tile.options?.action?.data||{};return i.value.fields.filter(K=>K.required&&C[K.key]===void 0).map(K=>K.name)}),p=C=>Object.keys(C.selector||{})[0]||"text",b=C=>(C.selector||{})[p(C)]||{},v=C=>C.example===void 0?"":typeof C.example=="string"?C.example:JSON.stringify(C.example);function y(C){const K=b(C),O=p(C);return Array.isArray(C.options)?C.options.map(E=>[E,E]):O==="select"&&Array.isArray(K.options)&&!K.multiple?K.options.map(E=>E&&typeof E=="object"?[String(E.value),String(E.label??E.value)]:[String(E),String(E)]):null}const I=C=>"#"+C.map(K=>Math.max(0,Math.min(255,Number(K)||0)).toString(16).padStart(2,"0")).join(""),T=C=>Array.isArray(C)&&C.length===3?I(C):"#ffffff",k=C=>C===void 0?"":typeof C=="string"?C:JSON.stringify(C);function A(C,K){const O=K.trim();if(!O)return f(C.key,void 0);if(p(C)==="text")return f(C.key,K);try{f(C.key,JSON.parse(O))}catch{f(C.key,K)}}function S(C,K){f(C.key,K===""||!Number.isFinite(Number(K))?void 0:Number(K))}const U=C=>b(C).unit_of_measurement||p(C)==="color_temp"&&b(C).unit||"";return(C,K)=>(g(),_("div",b_,[o("span",v_,d(a(c)("editor.action.label")),1),n.value===void 0?(g(),_("small",g_,d(a(c)("editor.action.asking")),1)):n.value===null?(g(),_("small",__,d(a(c)("editor.action.not_answering")),1)):(g(),_(q,{key:2},[o("button",{type:"button",class:"row","aria-expanded":l.value?"true":"false",onClick:K[0]||(K[0]=O=>a(m).actionPickerOpen=!l.value)},[o("span",w_,[o("b",null,d(i.value?i.value.name:s.value?s.value.action:a(c)("editor.action.choose")),1),s.value?(g(),_("small",k_,d(s.value.action),1)):W("",!0)]),o("span",$_,d(l.value?a(c)("editor.common.close"):a(c)("editor.common.change")),1)],8,y_),l.value?(g(),_("div",x_,[Ee(o("input",{"onUpdate:modelValue":K[1]||(K[1]=O=>a(m).actionSearch=O),type:"search",placeholder:a(c)("editor.action.search"),"aria-label":a(c)("editor.action.search_label")},null,8,S_),[[Xe,a(m).actionSearch]]),o("div",C_,[(g(!0),_(q,null,me(r.value,O=>(g(),_("button",{key:O.action,type:"button",class:"action-choice","aria-pressed":O.action===s.value?.action?"true":"false",onClick:E=>u(O)},[o("strong",null,d(O.name),1),o("small",null,d(O.description?`${O.action} · ${O.description}`:O.action),1)],8,T_))),128)),r.value.length?W("",!0):(g(),_("p",E_,d(a(c)("editor.action.none_found")),1))])])):W("",!0),s.value&&!i.value?(g(),_("small",A_,d(a(c)("editor.action.gone")),1)):W("",!0),i.value&&!l.value?(g(),_(q,{key:2},[(g(!0),_(q,null,me(i.value.fields,O=>(g(),_("div",{key:O.key,class:"f"},[o("span",P_,d(O.required?O.name:a(c)("editor.action.optional",{name:O.name})),1),p(O)==="boolean"?(g(),it(mt,{key:0,choices:[["",a(c)("editor.action.not_set")],["true",a(c)("editor.action.on")],["false",a(c)("editor.action.off")]],value:s.value?.data?.[O.key]===void 0?"":String(s.value?.data?.[O.key]),onPick:E=>f(O.key,E===""?void 0:E==="true")},null,8,["choices","value","onPick"])):y(O)&&y(O).length<=4?(g(),it(mt,{key:1,choices:[["",a(c)("editor.action.not_set")],...y(O)],value:s.value?.data?.[O.key]===void 0?"":String(s.value?.data?.[O.key]),onPick:E=>f(O.key,E===""?void 0:E)},null,8,["choices","value","onPick"])):y(O)?(g(),_("select",{key:2,"aria-label":O.name,value:String(s.value?.data?.[O.key]??""),onChange:E=>f(O.key,E.target.value===""?void 0:E.target.value)},[o("option",I_,d(a(c)("editor.action.not_set")),1),(g(!0),_(q,null,me(y(O),([E,R])=>(g(),_("option",{key:E,value:E},d(R),9,L_))),128))],40,O_)):p(O)==="color_rgb"?(g(),_("div",M_,[o("input",{type:"color","aria-label":O.name,value:T(s.value?.data?.[O.key]),onInput:E=>f(O.key,[1,3,5].map(R=>parseInt(E.target.value.slice(R,R+2),16)))},null,40,R_),o("button",{type:"button",class:"btn quiet mini",onClick:E=>f(O.key,void 0)},d(a(c)("editor.action.not_set")),9,N_)])):p(O)==="number"||p(O)==="color_temp"?(g(),_("div",F_,[o("input",{type:"number","aria-label":O.name,min:b(O).min,max:b(O).max,step:b(O).step==="any"?"any":b(O).step,value:s.value?.data?.[O.key]??"",placeholder:v(O),onInput:E=>S(O,E.target.value)},null,40,D_),U(O)?(g(),_("span",U_,d(U(O)),1)):W("",!0)])):(g(),_("input",{key:5,type:"text","aria-label":O.name,value:k(s.value?.data?.[O.key]),placeholder:v(O),onInput:E=>A(O,E.target.value)},null,40,j_)),O.description?(g(),_("small",H_,d(O.description),1)):W("",!0)]))),128)),h.value.length?(g(),_("small",V_,d(a(c)("editor.action.needs",{fields:h.value.join(", ")})),1)):W("",!0)],64)):W("",!0),a($t)(0,2,58)?W("",!0):(g(),_("small",W_,d(a(c)("editor.action.needs_firmware")),1))],64))]))}}),K_={class:"f"},z_={class:"f-label"},q_=["aria-expanded"],Y_={class:"av mdi"},G_={class:"tx"},J_={class:"link"},X_={key:0,class:"picker"},Z_=["placeholder","aria-label"],Q_=["aria-pressed","title"],ey={class:"mdi"},ty=["aria-pressed","title"],ny={class:"icon-list"},sy={class:"icon-grid"},iy=["title","aria-label","aria-pressed","onClick"],oy={class:"mdi"},ly={key:0,class:"hint"},ay={key:1},Ru=Le({__name:"IconPicker",props:{selected:{},automatic:{},autoLabel:{},allowNone:{type:Boolean},note:{}},emits:["pick"],setup(e,{emit:t}){const n=e,s=t,i=$e(""),l=$(()=>qs(n.selected)),r=$(()=>n.selected==="none"?"":Ae(l.value?.cp||n.automatic)),u=$(()=>n.selected==="none"?c("editor.icon.none"):l.value?.label||n.autoLabel),f=$(()=>{const h=i.value.trim().toLocaleLowerCase();return(m.inventory.icons?.groups||[]).map(p=>({label:p.label,icons:p.icons.filter(b=>!h||`${b.label} ${b.name.replaceAll("-"," ")} ${p.label}`.toLocaleLowerCase().includes(h))})).filter(p=>p.icons.length)});return(h,p)=>(g(),_("div",K_,[o("span",z_,d(a(c)("editor.icon.label")),1),o("button",{type:"button",class:"row","aria-expanded":a(m).iconPickerOpen?"true":"false",onClick:p[0]||(p[0]=b=>a(m).iconPickerOpen=!a(m).iconPickerOpen)},[o("span",Y_,d(r.value),1),o("span",G_,[o("b",null,d(u.value),1)]),o("span",J_,d(a(m).iconPickerOpen?a(c)("editor.common.close"):a(c)("editor.common.change")),1)],8,q_),a(m).iconPickerOpen?(g(),_("div",X_,[Ee(o("input",{"onUpdate:modelValue":p[1]||(p[1]=b=>i.value=b),type:"search",placeholder:a(c)("editor.icon.search"),"aria-label":a(c)("editor.icon.search_label")},null,8,Z_),[[Xe,i.value]]),o("button",{type:"button",class:"icon-choice icon-auto","aria-pressed":e.selected==="auto"?"true":"false",title:e.autoLabel,onClick:p[2]||(p[2]=b=>s("pick","auto"))},[o("span",ey,d(a(Ae)(e.automatic)),1),o("span",null,d(e.autoLabel),1)],8,Q_),e.allowNone?(g(),_("button",{key:0,type:"button",class:"icon-choice icon-auto","aria-pressed":e.selected==="none"?"true":"false",title:a(c)("editor.icon.none"),onClick:p[3]||(p[3]=b=>s("pick","none"))},[p[4]||(p[4]=o("span",{class:"mdi"},null,-1)),o("span",null,d(a(c)("editor.icon.none_text_only")),1)],8,ty)):W("",!0),o("div",ny,[(g(!0),_(q,null,me(f.value,b=>(g(),_("section",{key:b.label},[o("small",null,d(b.label),1),o("div",sy,[(g(!0),_(q,null,me(b.icons,v=>(g(),_("button",{key:v.name,type:"button",class:"icon-choice",title:v.label,"aria-label":a(c)("editor.icon.aria",{name:v.label}),"aria-pressed":e.selected===v.name?"true":"false",onClick:y=>s("pick",v.name)},[o("span",oy,d(a(Ae)(v.cp)),1)],8,iy))),128))])]))),128)),f.value.length?W("",!0):(g(),_("p",ly,d(a(c)("editor.icon.none_found")),1))])])):W("",!0),e.note?(g(),_("small",ay,d(e.note),1)):W("",!0)]))}}),ry={class:"dr-head"},cy={class:"tx"},uy={class:"mono"},dy=["aria-label"],fy={class:"dr-body"},py={class:"f"},hy={class:"f-label",for:"tile-name"},my=["value","placeholder"],by={key:1,class:"f"},vy={class:"f-label"},gy={key:2,class:"f"},_y={class:"f-label"},yy={key:3,class:"f"},wy={class:"f-label"},ky={class:"f"},$y={class:"f-label"},xy={key:0},Sy={key:4,class:"f"},Cy={class:"f-label"},Ty={key:5,class:"f"},Ey={class:"f-label"},Ay={key:6,class:"f"},Py={class:"f-label"},Oy={key:8,class:"f"},Iy={class:"f-label"},Ly={key:0,class:"warn"},My={key:9,class:"f"},Ry={class:"f-label"},Ny={class:"f"},Fy={class:"f-label"},Dy={class:"sw"},Uy=["aria-label","aria-pressed","onClick"],jy={class:"dr-foot"},Hy=Le({__name:"TileInspector",props:{tile:{}},setup(e){const t=e,n=$(()=>t.tile.entity.split(".")[0]),s=$(()=>zs(t.tile.entity)),i=$(()=>us(t.tile.entity)),l=$(()=>m.layout?It(Ze(m.layout),m.layout.pages):1),r=$(()=>At(t.tile.slot)+1),u=le=>!m.layout?.tiles.some(Z=>At(Z.slot)===le-1),f=$(()=>{const le=Array.from({length:Math.min(fn,l.value+1)},(Z,ue)=>ue+1);return i.value>le.length&&le.push(i.value),le.map(Z=>[Z,u(Z)?c("editor.tile.goes_to.empty",{page:Z}):String(Z)])}),h=$(()=>Xa.value?i.value>l.value?{text:c("editor.tile.goes_to.no_page",{page:i.value}),warn:!0}:{text:c("editor.tile.goes_to.hint"),warn:!1}:{text:c("editor.tile.goes_to.needs_firmware"),warn:!1}),p=$(()=>!m.layout?.tiles.some(le=>xe(le)!==xe(t.tile)&&At(le.slot)===r.value-1)),b=$(()=>{const le=Array.from({length:l.value},(Z,ue)=>[ue+1,String(ue+1)]);return l.value<fn&&!(p.value&&r.value===l.value)&&le.push([l.value+1,c("editor.tile.page.new")]),le}),v=$(()=>(i.value?["single","wide"]:["single","wide","full"]).map(le=>[le,c(`editor.tile.size.${le}`)])),y=$(()=>i.value?"":Xa.value?c("editor.tile.size.full_hint"):c("editor.tile.size.needs_firmware")),I=$(()=>m.capabilities[t.tile.entity]),T=(le,Z)=>t.tile.options?.[le]??Z,k=$(()=>T("display",n.value==="screen"?"digital":"standard")),A=$(()=>{const le=n.value==="screen"?["digital","analog"]:["standard","watch"],Z=I.value;return n.value==="weather"&&(!Z||Z.displays.includes("forecast")||k.value==="forecast")&&le.push("forecast"),n.value==="sensor"&&(!Z||Z.displays.includes("graph")||k.value==="graph")&&le.push("graph"),n.value==="sun"&&le.push("sunpath"),["camera","image"].includes(n.value)&&le.push("live"),n.value==="media_player"&&(Ki.value||k.value==="cover")&&C.value!=="full"&&le.push("cover"),le.map(ue=>[ue,c(`editor.tile.display.${ue}`)])}),S=$(()=>{const le=I.value;return le&&k.value==="graph"&&!le.displays.includes("graph")?c("editor.tile.display.no_graph"):le&&k.value==="forecast"&&!le.displays.includes("forecast")?c("editor.tile.display.no_forecast"):k.value==="live"?c($t(0,2,77)?"editor.tile.display.live_hint":"editor.tile.display.live_needs_firmware"):k.value==="cover"?c($t(0,2,78)?"editor.tile.display.cover_hint":"editor.tile.display.cover_needs_firmware"):""}),U=$(()=>T("refresh",15)),C=$(()=>T("size","single")),K=$(()=>m.inventory.controls?.[n.value]),O=$(()=>T("controls",C.value==="full"?"none":K.value?.default)),E=$(()=>{const le=I.value;return(K.value?.choices||[]).filter(Z=>!le||Z.key==="none"||Z.key===O.value||le.controls.includes(Z.key)).map(Z=>[Z.key,Z.label])}),R=$(()=>{const le=I.value;return le&&O.value!=="none"&&!le.controls.includes(O.value)?{text:c("editor.tile.controls.not_offered"),warn:!0}:{text:$t(0,2,19)?c(C.value==="full"?"editor.tile.controls.full_hint":"editor.tile.controls.wide_hint"):c("editor.tile.controls.needs_firmware"),warn:!1}}),L=$(()=>T("tap","auto")),D=$(()=>{const le=["auto","detail","none"];return((I.value?I.value.toggle:Ja.includes(n.value))||L.value==="toggle")&&le.push("toggle"),le.push("action"),le.map(Z=>[Z,c(`editor.tile.tap.${Z}`)])}),M=$(()=>L.value==="toggle"&&I.value&&!I.value.toggle?{text:c("editor.tile.tap.no_toggle"),warn:!0}:L.value==="toggle"&&!Ja.includes(n.value)&&!$t(0,2,58)?{text:c("editor.tile.tap.toggle_needs_firmware"),warn:!1}:L.value==="toggle"?{text:c("editor.tile.tap.hold"),warn:!1}:null),Y=$(()=>T("inline","none")),te=$(()=>rm.includes(n.value)&&(!I.value||I.value.inline||Y.value==="slider")),ye=$(()=>Y.value==="slider"&&I.value&&!I.value.inline),re=$(()=>T("history_hours",24)),be=$(()=>Object.entries(m.inventory.backgrounds||{})),ge=$(()=>!!m.inventory.entities.find(le=>le.id===t.tile.entity)?.icon),we=$(()=>!!m.inventory.icons&&(n.value!=="screen"||i.value>0)&&!["forecast","sunpath"].includes(k.value));function Ge(le){t.tile.name=le,pt()}function qe(){m.inspector={kind:"inspect",entity:t.tile.entity}}return(le,Z)=>(g(),_(q,null,[o("div",ry,[o("span",{class:"av mdi",style:Ue({color:a(Ht)(e.tile.entity)[2],background:a(Ht)(e.tile.entity)[3]})},d(a(Ae)(a(vs)(e.tile))),5),o("span",cy,[o("b",null,d(e.tile.name||s.value),1),o("small",uy,d(e.tile.entity),1)]),o("button",{type:"button",class:"icon-btn","aria-label":a(c)("editor.common.close"),onClick:Z[0]||(Z[0]=(...ue)=>a(Qe)&&a(Qe)(...ue))},"✕",8,dy)]),o("div",fy,[o("div",py,[o("label",hy,d(a(c)("editor.tile.name")),1),o("input",{id:"tile-name",value:e.tile.name,placeholder:s.value,maxlength:"60",onInput:Z[1]||(Z[1]=ue=>Ge(ue.target.value))},null,40,my)]),we.value?(g(),it(Ru,{key:0,selected:e.tile.options?.icon||"auto",automatic:a(Cn)(e.tile.entity),"auto-label":a(c)(ge.value?"editor.tile.icon.auto_ha":"editor.tile.icon.auto_default"),note:a($t)(0,2,18)?"":a(c)("editor.tile.icon.needs_firmware"),onPick:Z[2]||(Z[2]=ue=>a(Jt)(e.tile,"icon",ue))},null,8,["selected","automatic","auto-label","note"])):W("",!0),i.value?(g(),_("div",by,[o("span",vy,d(a(c)("editor.tile.goes_to.label")),1),se(mt,{choices:f.value,value:i.value,onPick:Z[3]||(Z[3]=ue=>a(Em)(e.tile,Number(ue)))},null,8,["choices","value"]),o("small",{class:he({warn:h.value.warn})},d(h.value.text),3)])):(g(),_("div",gy,[o("span",_y,d(a(c)("editor.tile.display.label")),1),se(mt,{choices:A.value,value:k.value,onPick:Z[4]||(Z[4]=ue=>a(Jt)(e.tile,"display",ue))},null,8,["choices","value"]),S.value?(g(),_("small",{key:0,class:he({warn:!(k.value==="live"&&a($t)(0,2,77))&&!(k.value==="cover"&&a($t)(0,2,78))})},d(S.value),3)):W("",!0)])),k.value==="live"?(g(),_("div",yy,[o("span",wy,d(a(c)("editor.tile.refresh.label")),1),se(mt,{choices:[15,30].map(ue=>[ue,a(c)("editor.tile.refresh.seconds",{n:ue})]),value:U.value,onPick:Z[5]||(Z[5]=ue=>a(Jt)(e.tile,"refresh",Number(ue)))},null,8,["choices","value"])])):W("",!0),o("div",ky,[o("span",$y,d(a(c)("editor.tile.size.label")),1),se(mt,{choices:v.value,value:C.value,onPick:Z[6]||(Z[6]=ue=>a(Jt)(e.tile,"size",ue))},null,8,["choices","value"]),y.value?(g(),_("small",xy,d(y.value),1)):W("",!0)]),b.value.length>1?(g(),_("div",Sy,[o("span",Cy,d(a(c)("editor.tile.page.label")),1),se(mt,{choices:b.value,value:r.value,onPick:Z[7]||(Z[7]=ue=>a(Cm)(e.tile,Number(ue)-1))},null,8,["choices","value"])])):W("",!0),K.value&&C.value!=="single"&&!i.value?(g(),_("div",Ty,[o("span",Ey,d(a(c)("editor.tile.controls.label")),1),se(mt,{choices:E.value,value:O.value,onPick:Z[8]||(Z[8]=ue=>a(Jt)(e.tile,"controls",ue))},null,8,["choices","value"]),o("small",{class:he({warn:R.value.warn})},d(R.value.text),3)])):W("",!0),n.value!=="screen"&&!i.value?(g(),_("div",Ay,[o("span",Py,d(a(c)("editor.tile.tap.label")),1),se(mt,{choices:D.value,value:L.value,onPick:Z[9]||(Z[9]=ue=>a(Jt)(e.tile,"tap",ue))},null,8,["choices","value"]),M.value?(g(),_("small",{key:0,class:he({warn:M.value.warn})},d(M.value.text),3)):W("",!0)])):W("",!0),n.value!=="screen"&&!i.value&&L.value==="action"?(g(),it(B_,{key:7,tile:e.tile},null,8,["tile"])):W("",!0),te.value&&!i.value?(g(),_("div",Oy,[o("span",Iy,d(a(c)("editor.tile.slider.label")),1),se(mt,{choices:[["none",a(c)("editor.tile.slider.no")],["slider",a(c)("editor.tile.slider.yes")]],value:Y.value,onPick:Z[10]||(Z[10]=ue=>a(Jt)(e.tile,"inline",ue))},null,8,["choices","value"]),ye.value?(g(),_("small",Ly,d(a(c)("editor.tile.slider.nothing")),1)):W("",!0)])):W("",!0),n.value==="sensor"&&!i.value?(g(),_("div",My,[o("span",Ry,d(a(c)("editor.tile.history.label")),1),se(mt,{choices:[1,6,24].map(ue=>[ue,a(c)("editor.tile.history.hours",ue)]),value:re.value,onPick:Z[11]||(Z[11]=ue=>a(Jt)(e.tile,"history_hours",Number(ue)))},null,8,["choices","value"])])):W("",!0),o("div",Ny,[o("span",Fy,d(a(c)("editor.tile.background.label")),1),o("div",Dy,[(g(!0),_(q,null,me(be.value,([ue,ke])=>(g(),_("button",{key:ue,type:"button","aria-label":a(c)("editor.tile.background.aria",{name:ke.label}),"aria-pressed":(e.tile.options?.background||"auto")===ue?"true":"false",onClick:B=>a(Jt)(e.tile,"background",ue)},[o("i",{class:he(ke.color?"":ue==="none"?"none":"auto"),style:Ue(ke.color?{background:ke.color}:void 0)},null,6),Me(d(ke.label),1)],8,Uy))),128))])])]),o("div",jy,[o("button",{type:"button",class:"btn danger",onClick:Z[12]||(Z[12]=ue=>a(xu)(e.tile))},d(a(c)("editor.common.remove")),1),Z[13]||(Z[13]=o("span",{class:"spacer"},null,-1)),n.value!=="screen"?(g(),_("button",{key:0,type:"button",class:"btn quiet",onClick:qe},d(a(c)("editor.common.read_current_data")),1)):W("",!0)])],64))}}),Vy={class:"dr-head"},Wy={class:"av mdi",style:{background:"var(--seg)",color:"var(--ink-2)"}},By={class:"tx"},Ky=["aria-label"],zy={class:"dr-body"},qy={class:"f"},Yy={class:"f-label",for:"title"},Gy=["value","placeholder"],Jy={class:"f"},Xy={class:"f-label",id:"topbar-caption"},Zy={style:{"text-transform":"none","letter-spacing":"0","font-weight":"500"}},Qy={class:"items",id:"topbar-chips",role:"list","aria-labelledby":"topbar-caption"},e0=["data-index","aria-label","onPointerdown","onClick","onKeydown"],t0={class:"tx"},n0=["aria-label","onClick"],s0=["disabled","title"],i0={class:"live",id:"topbar-live"},o0={class:"f"},l0={class:"f-label"},a0={class:"f"},r0={class:"f-label"},c0={href:"#settings"},u0={key:2},d0={key:0,class:"dr-foot"},f0=["disabled"],p0=["disabled"],h0=Le({__name:"TopbarInspector",props:{index:{}},setup(e){const t=e,n=$(()=>hn()),s=$(()=>n.value[t.index]),i=$(()=>(m.fontsVersion,m.now,m.topbarPreviews,gu(n.value,wu.value,m.layout?.title||jn("editor.mockup.home"),vn))),l=$(()=>i.value.dropped),r=$(()=>m.inventory.header?.min_firmware||"0.2.32"),u=$(()=>{const[Y,te,ye]=r.value.split(".").map(Number);return $t(Y,te,ye)}),f=$(()=>u.value?c(l.value.size?"editor.topbar.hint.overflow":"editor.topbar.hint.reorder"):c("editor.topbar.hint.needs_firmware",{version:r.value})),h=(Y,te)=>{const ye=vn(Y);return ye.shown?l.value.has(te)?c("editor.topbar.detail.overflow"):ye.analog?c("editor.topbar.detail.dial"):ye.text:c("editor.topbar.detail.hidden")},p=Y=>{const te=vn(Y);return te.analog||Y.type!=="entity"?qs(vu[Y.type])?.cp:te.icon},b=Y=>m.topbarAdded?.key===at(Y)&&Date.now()-m.topbarAdded.time<1200;function v(Y){m.layout&&(m.layout.title=Y,pt())}function y(Y){const te=[...n.value];te[t.index]={...te[t.index],...Y},Ds(te)}const I=$(()=>s.value?vn(s.value).shown?l.value.has(t.index)?c("editor.topbar.live.overflow"):c("editor.topbar.live.looks"):c("editor.topbar.live.hidden"):""),T=$(()=>({clock:Wi(as.value,new Date(m.now),an.value),analog:c("editor.topbar.analog_sample"),date:xl(new Date(m.now),an.value)})),k=$e({index:-1,active:!1,moved:!1});let A=null,S=0,U=null,C=0;function K(Y,te){Y.button!==0||Y.target.closest(".x")||(Y.pointerType!=="touch"&&Y.preventDefault(),k.value={index:te,active:!1,moved:!1},A={x:Y.clientX,y:Y.clientY},U=Y.pointerId,clearTimeout(S),Y.pointerType==="touch"&&(S=window.setTimeout(O,260)),document.addEventListener("pointermove",R),document.addEventListener("pointerup",L),document.addEventListener("pointercancel",L))}function O(){k.value.active=!0,document.addEventListener("touchmove",E,{passive:!1})}function E(Y){k.value.active&&Y.preventDefault()}function R(Y){if(Y.pointerId!==U||!A)return;if(!k.value.active){const re=Math.hypot(Y.clientX-A.x,Y.clientY-A.y);if(Y.pointerType==="touch"){re>10&&(clearTimeout(S),A=null);return}if(re<6)return;O()}const te=[...document.querySelectorAll(".items .item[data-index]")];let ye=k.value.index;if(te.forEach((re,be)=>{const ge=re.getBoundingClientRect();be<k.value.index&&Y.clientY<ge.top+ge.height/2&&(ye=Math.min(ye,be)),be>k.value.index&&Y.clientY>ge.top+ge.height/2&&(ye=Math.max(ye,be))}),ye!==k.value.index&&m.layout){const re=[...n.value];re.splice(ye,0,...re.splice(k.value.index,1)),m.layout.header={items:re};const be=t.index===k.value.index;k.value.index=ye,k.value.moved=!0,be&&Qt(ye)}}function L(Y){Y.pointerId===U&&(clearTimeout(S),document.removeEventListener("pointermove",R),document.removeEventListener("pointerup",L),document.removeEventListener("pointercancel",L),document.removeEventListener("touchmove",E),k.value.active&&(C=Date.now()+400,k.value.moved&&pt()),k.value={index:-1,active:!1,moved:!1},A=null,U=null)}function D(Y){Date.now()<C||Qt(Y)}function M(Y,te){if(Y.key==="Enter"||Y.key===" "){Y.preventDefault(),Qt(te);return}const ye={ArrowUp:-1,ArrowDown:1}[Y.key];ye&&vo(te,te+ye)&&(t.index===te&&Qt(te+ye),Y.preventDefault())}return(Y,te)=>{const ye=Ws("i18n-t");return g(),_(q,null,[o("div",Vy,[o("span",Wy,d(s.value?a(Ae)(p(s.value)||"F0150"):a(Ae)("F0150")),1),o("span",By,[o("b",null,d(s.value?s.value.type==="entity"?a(zs)(s.value.entity):a(gs)(s.value):a(c)("editor.topbar.title")),1),o("small",{class:he({mono:s.value?.type==="entity"})},d(s.value?s.value.type==="entity"?s.value.entity:a(c)("editor.topbar.builtin"):a(c)("editor.topbar.items",{used:n.value.length},a(_n)())),3)]),o("button",{type:"button",class:"icon-btn","aria-label":a(c)("editor.common.close"),onClick:te[0]||(te[0]=(...re)=>a(Qe)&&a(Qe)(...re))},"✕",8,Ky)]),o("div",zy,[o("div",qy,[o("label",Yy,d(a(c)("editor.topbar.name")),1),o("input",{id:"title",value:a(m).layout?.title,maxlength:"60",placeholder:a(c)("editor.topbar.name_placeholder"),onInput:te[1]||(te[1]=re=>v(re.target.value))},null,40,Gy)]),o("div",Jy,[o("span",Xy,[Me(d(a(c)("editor.topbar.right"))+" ",1),o("span",Zy," · "+d(n.value.length)+" / "+d(a(_n)()),1)]),o("div",Qy,[(g(!0),_(q,null,me(n.value,(re,be)=>(g(),_("div",{key:a(at)(re)+be,class:he(["item",{selected:be===e.index,"is-hidden":!a(vn)(re).shown,"is-overflow":l.value.has(be),"just-added":b(re),"dragging-chip":k.value.active&&k.value.index===be}]),role:"listitem",tabindex:"0","data-index":be,"aria-label":a(c)("editor.topbar.item_label",{name:a(gs)(re),slot:be+1}),onPointerdown:ge=>K(ge,be),onClick:ge=>D(be),onKeydown:ge=>M(ge,be)},[te[9]||(te[9]=o("span",{class:"grip","aria-hidden":"true"},"⋮⋮",-1)),o("span",{class:"av mdi",style:Ue(a(vn)(re).color?{color:a(vn)(re).color}:void 0)},d(p(re)?a(Ae)(p(re)):""),5),o("span",t0,[o("b",null,d(a(gs)(re)),1),o("small",null,d(h(re,be)),1)]),o("button",{type:"button",class:"x","aria-label":a(c)("editor.topbar.remove_named",{name:a(gs)(re)}),onClick:Ot(ge=>a(nr)(be),["stop"])},"✕",8,n0)],42,e0))),128)),o("button",{type:"button",class:"ghost-btn",id:"topbar-add",disabled:n.value.length>=a(_n)(),title:n.value.length>=a(_n)()?a(c)("editor.topbar.max",a(_n)()):a(c)("editor.topbar.add_title"),onClick:te[2]||(te[2]=(...re)=>a(er)&&a(er)(...re))},d(a(c)("editor.topbar.add_button")),9,s0)]),o("small",{id:"topbar-hint",class:he({warn:l.value.size>0&&u.value})},d(f.value),3)]),s.value?(g(),_(q,{key:0},[o("div",i0,[o("small",null,d(I.value),1),se(Mu,{items:[s.value],single:""},null,8,["items"])]),s.value.type==="entity"?(g(),_(q,{key:0},[o("div",o0,[o("span",l0,d(a(c)("editor.topbar.content.label")),1),se(mt,{choices:(a(m).inventory.header?.contents||[]).map(re=>[re.key,re.label]),value:s.value.content,onPick:te[3]||(te[3]=re=>y({content:re}))},null,8,["choices","value"]),o("small",null,d(a(c)("editor.topbar.content.hint")),1)]),se(Ru,{selected:s.value.icon||"auto",automatic:a(m).topbarPreviews[a(at)(s.value)]?.auto_icon||a(Cn)(s.value.entity),"auto-label":a(c)("editor.topbar.auto_icon"),"allow-none":"",onPick:te[4]||(te[4]=re=>y({icon:re}))},null,8,["selected","automatic","auto-label"]),o("div",a0,[o("span",r0,d(a(c)("editor.topbar.show.label")),1),se(mt,{choices:(a(m).inventory.header?.shows||[]).map(re=>[re.key,re.label]),value:s.value.show,onPick:te[5]||(te[5]=re=>y({show:re}))},null,8,["choices","value"]),o("small",null,d(a(c)("editor.topbar.show.hint")),1)])],64)):s.value.type!=="date"?(g(),it(ye,{key:1,keypath:a(as)?"editor.topbar.clock_24":"editor.topbar.clock_12",tag:"small",id:"topbar-clock",scope:"global"},{settings:oe(()=>[o("a",c0,d(a(c)("editor.topbar.clock_settings")),1)]),_:1},8,["keypath"])):(g(),_("small",u0,d(a(c)("editor.topbar.date_hint",{date:T.value.date})),1))],64)):W("",!0)]),s.value?(g(),_("div",d0,[o("button",{type:"button",class:"btn danger",onClick:te[6]||(te[6]=re=>a(nr)(e.index))},d(a(c)("editor.common.remove")),1),te[10]||(te[10]=o("span",{class:"spacer"},null,-1)),o("button",{type:"button",class:"btn quiet",disabled:e.index===0,onClick:te[7]||(te[7]=re=>a(vo)(e.index,e.index-1)&&a(Qt)(e.index-1))},d(a(c)("editor.topbar.up")),9,f0),o("button",{type:"button",class:"btn quiet",disabled:e.index>=n.value.length-1,onClick:te[8]||(te[8]=re=>a(vo)(e.index,e.index+1)&&a(Qt)(e.index+1))},d(a(c)("editor.topbar.down")),9,p0)])):W("",!0)],64)}}}),m0={class:"dr-head"},b0={class:"tx"},v0=["aria-label"],g0={class:"dr-body"},_0={class:"f"},y0={class:"f-label"},w0={class:"options"},k0=["disabled","onClick"],$0={class:"mdi"},x0={class:"tx"},S0={key:0,class:"f"},C0={class:"f-label"},T0={class:"options"},E0=["disabled","onClick"],A0={class:"mdi"},P0={class:"tx"},O0={class:"f"},I0={class:"f-label",for:"topbar-search"},L0=["placeholder","aria-label"],M0={class:"options"},R0=["disabled","onClick"],N0={class:"mdi"},F0={class:"tx"},D0={key:0,class:"hint"},U0={key:1,class:"hint"},j0={class:"dr-foot"},H0=Le({__name:"TopbarAdd",setup(e){const t=$e(""),n=$(()=>new Set(hn().map(at))),s=$(()=>({clock:Wi(as.value,new Date(m.now),an.value),analog:c("editor.topbar.analog_sample"),date:xl(new Date(m.now),an.value)})),i=$(()=>m.inventory.header?.suggestions?.[m.selected||""]||[]),l=$(()=>{const u=t.value.trim().toLocaleLowerCase();return m.inventory.entities.filter(f=>`${f.name} ${f.id} ${f.area||""} ${f.device||""}`.toLocaleLowerCase().includes(u))}),r=u=>({type:"entity",entity:u,content:"state",icon:"auto",show:"always"});return(u,f)=>(g(),_(q,null,[o("div",m0,[f[3]||(f[3]=o("span",{class:"av",style:{background:"var(--seg)",color:"var(--ink-2)","font-size":"18px"}},"+",-1)),o("span",b0,[o("b",null,d(a(c)("editor.topbar.add.title")),1),o("small",null,d(a(c)("editor.topbar.add.slots",{used:a(hn)().length},a(_n)())),1)]),o("button",{type:"button",class:"icon-btn","aria-label":a(c)("editor.common.close"),onClick:f[0]||(f[0]=(...h)=>a(Qe)&&a(Qe)(...h))},"✕",8,v0)]),o("div",g0,[o("div",_0,[o("span",y0,d(a(c)("editor.topbar.add.builtin")),1),o("div",w0,[(g(!0),_(q,null,me(a(m).inventory.header?.builtin||[],h=>(g(),_("button",{key:h.type,type:"button",class:"option",disabled:n.value.has(a(at)({type:h.type})),onClick:p=>a(go)({type:h.type})},[o("span",$0,d(a(Ae)(a(qs)(a(vu)[h.type])?.cp||"F0150")),1),o("span",x0,[o("strong",null,d(h.label),1),o("small",null,d(n.value.has(a(at)({type:h.type}))?a(c)("editor.topbar.add.added"):s.value[h.type]),1)])],8,k0))),128))])]),i.value.length?(g(),_("div",S0,[o("span",C0,d(a(c)("editor.topbar.add.suggestions")),1),o("div",T0,[(g(!0),_(q,null,me(i.value,h=>(g(),_("button",{key:a(at)(h.item),type:"button",class:"option",disabled:n.value.has(a(at)(h.item)),onClick:p=>a(go)(h.item)},[o("span",A0,d(a(Ae)(h.icon||a(Cn)(h.item.entity))),1),o("span",P0,[o("strong",null,d(h.label),1),o("small",null,d(n.value.has(a(at)(h.item))?a(c)("editor.topbar.add.added"):[h.name,h.area].filter(Boolean).join(" · ")),1)])],8,E0))),128))])])):W("",!0),o("div",O0,[o("label",I0,d(a(c)("editor.topbar.add.entity")),1),Ee(o("input",{id:"topbar-search","onUpdate:modelValue":f[1]||(f[1]=h=>t.value=h),type:"search",placeholder:a(c)("editor.topbar.add.search"),"aria-label":a(c)("editor.topbar.add.search_label")},null,8,L0),[[Xe,t.value]]),o("div",M0,[(g(!0),_(q,null,me(l.value.slice(0,40),h=>(g(),_("button",{key:h.id,type:"button",class:"option",disabled:n.value.has(a(at)(r(h.id))),onClick:p=>a(go)(r(h.id))},[o("span",N0,d(a(Ae)(a(Cn)(h.id))),1),o("span",F0,[o("strong",null,d(h.name),1),o("small",null,d([h.area,h.id].filter(Boolean).join(" · ")),1)])],8,R0))),128)),l.value.length?l.value.length>40?(g(),_("p",U0,d(a(c)("editor.common.results",l.value.length)),1)):W("",!0):(g(),_("p",D0,d(a(c)("editor.topbar.add.none_found")),1))])])]),o("div",j0,[f[4]||(f[4]=o("span",{class:"spacer"},null,-1)),o("button",{type:"button",class:"btn quiet",onClick:f[2]||(f[2]=(...h)=>a(Qe)&&a(Qe)(...h))},d(a(c)("editor.common.cancel")),1)])],64))}}),V0={class:"dr-head"},W0={class:"tx"},B0=["aria-label"],K0={class:"dr-body",id:"inspector-section"},z0={id:"inspection-summary"},q0={key:0,class:"hint warn"},Y0={key:1,class:"hint"},G0={id:"inspection"},J0={class:"dr-foot"},X0=Le({__name:"InspectPanel",props:{entity:{}},setup(e){const t=e,n=$e(null),s=$e(c("editor.inspect.reading")),i=$e("");async function l(){if(m.selected){n.value=null,i.value="",s.value=c("editor.inspect.fetching");try{const u=await Ft(`screens/${encodeURIComponent(m.selected)}/inspect`),f=t.entity?u.tiles.filter(h=>h.entity===t.entity):u.tiles;n.value=f,s.value=JSON.stringify(t.entity?f[0]:u,null,2)}catch(u){i.value=u.message,s.value="",Ce(u.message)}}}const r=u=>{const f=m.layout?.tiles.find(h=>h.entity===u)?.options||{};return c("editor.inspect.options",{slider:c(f.inline==="slider"?"editor.inspect.yes":"editor.inspect.no"),display:bu(f.display||"standard"),size:am(f.size),control:nm({entity:u,options:f},m.inventory),background:m.inventory.backgrounds?.[f.background||"auto"]?.label||c("editor.inspect.background_default")})};return An(l),Tt(()=>t.entity,l),(u,f)=>(g(),_(q,null,[o("div",V0,[f[1]||(f[1]=o("span",{class:"av",style:{background:"var(--seg)",color:"var(--ink-2)","font-size":"16px"}},"⌕",-1)),o("span",W0,[o("b",null,d(a(c)("editor.inspect.title")),1),o("small",{class:he({mono:e.entity})},d(e.entity||a(c)("editor.inspect.subtitle")),3)]),o("button",{type:"button",class:"icon-btn","aria-label":a(c)("editor.common.close"),onClick:f[0]||(f[0]=(...h)=>a(Qe)&&a(Qe)(...h))},"✕",8,B0)]),o("div",K0,[o("div",z0,[i.value?(g(),_("p",q0,d(i.value),1)):n.value?W("",!0):(g(),_("p",Y0,d(a(c)("editor.inspect.fetching")),1)),(g(!0),_(q,null,me(n.value||[],(h,p)=>(g(),_("article",{key:p,class:"inspection-tile"},[o("strong",null,d(h.entity),1),o("span",null,d(a(c)("editor.inspect.status",{status:h.word||h.state})),1),o("small",null,d(r(h.entity)),1)]))),128))]),o("pre",G0,d(s.value),1)]),o("div",J0,[o("button",{type:"button",class:"btn quiet",onClick:l},d(a(c)("editor.inspect.read_again")),1),f[2]||(f[2]=o("span",{class:"spacer"},null,-1))])],64))}}),Z0=["aria-hidden"],Q0=Le({__name:"Drawer",setup(e){const t=$(()=>!!(m.inspector&&(m.inspector.kind!=="tile"||uo.value)));return(n,s)=>(g(),_("aside",{class:he(["drawer",{open:t.value}]),id:"tile-sheet","aria-hidden":t.value?"false":"true",onClick:s[0]||(s[0]=Ot(()=>{},["stop"]))},[a(m).inspector?(g(),_(q,{key:0},[a(m).inspector.kind==="tile"&&a(uo)?(g(),it(Hy,{key:0,tile:a(uo)},null,8,["tile"])):a(m).inspector.kind==="bar"?(g(),it(h0,{key:1,index:a(m).inspector.index},null,8,["index"])):a(m).inspector.kind==="bar-add"?(g(),it(H0,{key:2})):a(m).inspector.kind==="inspect"?(g(),it(X0,{key:3,entity:a(m).inspector.entity},null,8,["entity"])):W("",!0)],64)):W("",!0)],10,Z0))}}),e1={class:"main-head"},t1={class:"eyebrow",id:"screen-name"},n1=["title"],s1={class:"head-right"},i1={class:"seg",role:"tablist"},o1=["aria-pressed"],l1=["aria-pressed"],a1={key:1,id:"dirty",class:"chip dirty"},r1=["disabled"],c1={key:0,class:"spin small"},u1=["aria-label","aria-expanded"],d1={key:3,class:"menu",role:"menu"},f1=["disabled","title"],p1=["disabled","aria-expanded"],h1={key:0,class:"sub"},m1=["onClick"],b1=["disabled","title"],v1={class:"body",id:"body"},g1=Le({__name:"ScreenView",setup(e){const t=$(()=>yt.value),n=$(()=>t.value.online?`${t.value.delivery} · ${t.value.status}`:c("editor.screen_view.offline")),s=$(()=>Pu(t.value)&&t.value.online&&t.value.update?.profile&&t.value.update?.host),i=$(()=>m.inventory.screens.filter(T=>T.id!==t.value.id&&T.layout?.tiles?.length)),l=$e(!1),r=$e(null);function u(){m.menuOpen=!1,l.value=!1}function f(){u(),m.overrideProfile=t.value.update?.profile||null,m.overrideFriendly=t.value.name,He("#override")}function h(){u(),m.selectedTile=null,m.inspector={kind:"inspect"}}function p(T){u(),!(m.dirty&&!confirm(c("editor.screen_view.confirm.copy")))&&Om(T)}function b(){u(),r.value?.click()}async function v(T){const k=T.target,A=k.files?.[0];k.value="",A&&(m.dirty&&!confirm(c("editor.screen_view.confirm.import"))||Lm(await A.text()))}function y(T){if(T.key==="Escape")if(m.menuOpen)u();else{if(m.palette)return;m.inspector&&!T.target?.closest?.(".picker")&&Qe()}else(T.metaKey||T.ctrlKey)&&T.key.toLowerCase()==="s"&&(T.preventDefault(),m.dirty&&Bo())}function I(T){m.menuOpen&&!T.target.closest(".head-right .menu, #more")&&u()}return An(()=>{document.addEventListener("keydown",y),document.addEventListener("click",I)}),rs(()=>{document.removeEventListener("keydown",y),document.removeEventListener("click",I)}),(T,k)=>(g(),_(q,null,[o("header",e1,[o("div",null,[o("span",t1,d(t.value.name),1),o("h1",null,d(a(m).layout?.title||a(jn)("editor.mockup.home")),1)]),o("span",{id:"delivery",class:he(["chip",{off:!t.value.online}]),title:n.value},[k[9]||(k[9]=o("span",{class:"dot"},null,-1)),Me(d(n.value),1)],10,n1),o("div",s1,[o("div",i1,[o("button",{type:"button",id:"tab-layout",role:"tab","aria-pressed":a(m).tab==="layout"?"true":"false",onClick:k[0]||(k[0]=A=>a(m).tab="layout")},d(a(c)("editor.screen_view.tabs.layout")),9,o1),o("button",{type:"button",id:"tab-settings",role:"tab","aria-pressed":a(m).tab==="settings"?"true":"false",onClick:k[1]||(k[1]=A=>{a(m).tab="settings",a(Qe)()})},d(a(c)("editor.screen_view.tabs.settings")),9,l1)]),a(m).dirty?(g(),_("span",a1,d(a(c)("editor.common.unsaved")),1)):(g(),_("span",{key:0,id:"dirty",class:he(["chip",{sent:a(m).saved}])},d(a(m).saved?a(c)("editor.screen_view.sent"):a(c)("editor.screen_view.all_saved")),3)),a(m).dirty?(g(),_("button",{key:2,id:"save",type:"button",class:"btn primary",disabled:a(m).busy,title:"⌘S",onClick:k[2]||(k[2]=A=>a(Bo)())},[a(m).busy?(g(),_("span",c1)):W("",!0),Me(d(a(m).busy?a(c)("editor.common.saving"):a(c)("editor.common.save_send")),1)],8,r1)):W("",!0),o("button",{id:"more",type:"button",class:"icon-btn","aria-label":a(c)("editor.screen_view.more"),"aria-haspopup":"menu","aria-expanded":a(m).menuOpen?"true":"false",onClick:k[3]||(k[3]=Ot(A=>{a(m).menuOpen=!a(m).menuOpen,l.value=!1},["stop"]))},"···",8,u1),a(m).menuOpen?(g(),_("div",d1,[o("button",{type:"button",role:"menuitem",id:"identify",disabled:!a(zn)(t.value)||!t.value.online,title:a(zn)(t.value)?"":a(c)("editor.screen_view.menu.identify_needs"),onClick:k[4]||(k[4]=A=>{u(),a(Su)(t.value)})},[Me(d(a(c)("editor.screen_view.menu.identify"))+" ",1),o("small",null,d(a(c)("editor.screen_view.menu.identify_hint")),1)],8,f1),o("button",{type:"button",role:"menuitem",id:"inspect",onClick:h},[Me(d(a(c)("editor.common.read_current_data"))+" ",1),o("small",null,d(a(c)("editor.screen_view.menu.inspect_hint")),1)]),k[12]||(k[12]=o("div",{class:"sep"},null,-1)),o("button",{type:"button",role:"menuitem",id:"copy-layout",disabled:!i.value.length,"aria-expanded":l.value?"true":"false",onClick:k[5]||(k[5]=Ot(A=>l.value=!l.value,["stop"]))},[Me(d(a(c)("editor.screen_view.menu.copy"))+" ",1),o("small",null,d(i.value.length?a(c)("editor.screen_view.menu.copy_screens",i.value.length):a(c)("editor.screen_view.menu.copy_none")),1)],8,p1),l.value?(g(),_("div",h1,[(g(!0),_(q,null,me(i.value,A=>(g(),_("button",{key:A.id,type:"button",role:"menuitem",onClick:S=>p(A.id)},[Me(d(A.name)+" ",1),o("small",null,d(a(c)("editor.screen_view.menu.copy_tiles",A.layout.tiles.length)),1)],8,m1))),128))])):W("",!0),o("button",{type:"button",role:"menuitem",id:"export-layout",onClick:k[6]||(k[6]=A=>{u(),a(Tu)()})},[Me(d(a(c)("editor.screen_view.menu.export"))+" ",1),k[10]||(k[10]=o("small",null,"JSON",-1))]),o("button",{type:"button",role:"menuitem",id:"import-layout",onClick:b},[Me(d(a(c)("editor.screen_view.menu.import"))+" ",1),k[11]||(k[11]=o("small",null,"JSON",-1))]),k[13]||(k[13]=o("div",{class:"sep"},null,-1)),o("button",{type:"button",role:"menuitem",id:"open-override",disabled:!t.value.update?.profile,title:t.value.update?.profile?"":a(c)("editor.screen_view.menu.override_none"),onClick:f},[Me(d(a(c)("editor.screen_view.menu.override"))+" ",1),o("small",null,d(a(c)("editor.screen_view.menu.override_hint")),1)],8,b1),o("button",{type:"button",role:"menuitem",onClick:k[7]||(k[7]=A=>{u(),a(He)("#firmware")})},d(a(c)("editor.nav.firmware")),1),s.value?(g(),_("button",{key:1,type:"button",role:"menuitem",onClick:k[8]||(k[8]=A=>{u(),a(zo)(t.value)})},[Me(d(a(c)("editor.screen_view.menu.update"))+" ",1),o("small",null,d(t.value.update?.target),1)])):W("",!0)])):W("",!0),o("input",{ref_key:"fileInput",ref:r,type:"file",accept:"application/json,.json",hidden:"",onChange:v},null,544)])]),o("div",v1,[a(m).tab==="layout"?(g(),it(Jg,{key:0})):(g(),it(p_,{key:1})),se(Q0)])],64))}}),_1={key:0,id:"choose",class:"empty"},y1={key:1,id:"empty",class:"empty"},w1=Le({__name:"EmptyState",setup(e){return(t,n)=>a(m).inventory.screens.length?(g(),_("section",_1,[n[1]||(n[1]=o("span",{class:"empty-icon"},"▦",-1)),o("h2",null,d(a(c)("editor.empty.choose.title")),1),o("p",null,d(a(c)("editor.empty.choose.text")),1)])):(g(),_("section",y1,[n[2]||(n[2]=o("span",{class:"empty-icon"},"▦",-1)),o("h2",null,d(a(c)("editor.empty.start.title")),1),o("p",null,d(a(c)("editor.empty.start.text")),1),o("button",{id:"start",type:"button",class:"btn primary",onClick:n[0]||(n[0]=s=>a(He)("#new-screen"))},d(a(c)("editor.empty.start.button")),1)]))}}),k1={class:"panel",id:"settings-view"},$1={class:"panel-head"},x1={class:"tx"},S1={class:"eyebrow"},C1={id:"settings-title"},T1={class:"card-grid"},E1={class:"card"},A1={class:"tools"},P1={class:"tx"},O1={class:"tx"},I1={key:0,class:"card updates",id:"updates"},L1={id:"updates-hint"},M1=["aria-valuenow"],R1={class:"progress-text"},N1={key:0,class:"log-lines"},F1={key:2,class:"whatsnew"},D1={class:"check"},U1=["checked"],j1={key:1,class:"card",id:"language"},H1={class:"field"},V1={class:"f-label",for:"screen-language"},W1=["value","disabled"],B1={value:"auto"},K1=["value"],z1={key:0,id:"language-ha-missing"},q1={class:"field"},Y1={class:"f-label",for:"time-format"},G1=["value","disabled"],J1={value:"auto"},X1={value:"24"},Z1={value:"12"},Q1={class:"field"},e2={class:"f-label",for:"number-format"},t2=["value","disabled"],n2={value:"auto"},s2=["value"],i2={key:0,class:"actions",id:"language-profile"},o2=["disabled"],l2={class:"card"},a2={class:"tools"},r2={class:"tx"},c2={class:"card",id:"claude"},u2={class:"actions"},d2=["disabled"],f2={id:"claude-path"},p2={class:"actions"},h2={class:"btn quiet",id:"claude-download",href:"api/claude-skill.zip",download:"esp-screens.zip"},m2="https://github.com/MaxGramser/homeassistant_espscreen/blob/main/docs/TRANSLATING.md",b2=Le({__name:"AppSettingsView",setup(e){const t=$(()=>m.inventory.updates),n=$(()=>m.inventory.screens.filter(E=>E.update?.available).length),s=$(()=>t.value?t.value.busy?c("editor.settings.updates.busy",{version:t.value.target}):m.inventory.screens.length?n.value?c("editor.settings.updates.available",{version:t.value.target},n.value):c("editor.settings.updates.current",{version:t.value.target}):c("editor.settings.updates.no_screens",{version:t.value.target}):""),i=$(()=>m.inventory.screens.find(E=>E.update?.state==="running"||m.updating.includes(E.id))),l=$(()=>i.value?Xn(i.value):null),r=$(()=>(m.firmwareJob?.logs||[]).slice(-12).join(`
|
||
`)),u=$(()=>{const E=m.inventory.changelog,R=t.value?.target;return!Array.isArray(E)||!R?[]:E.filter(L=>L.firmware===R).flatMap(L=>L.lines).slice(0,10)}),f=$(()=>m.inventory.claude_skill),h=$e(!1);async function p(){h.value=!0;try{await Wm()}finally{h.value=!1}}const b=["point","comma","space"],v=$(()=>m.inventory.language),y=$(()=>{const E=v.value,R=E?.ha?su(E.ha,E.languages.map(L=>L.code)):void 0;return E?.languages.find(L=>L.code===R)?.name}),I=$(()=>v.value?.languages.find(E=>E.code===v.value.effective&&!E.checked)),T=E=>c(E==="12"?"editor.settings.language.clock_12":"editor.settings.language.clock_24"),k=E=>lu("1234.5",E),A=Xh(),S=$(()=>{const E=v.value;return E?{...A.clock&&A.clock!==(E.clock_effective||"24")?{clock:A.clock}:{},...A.numbers&&A.numbers!==(E.numbers_effective||"point")?{numbers:A.numbers}:{}}:{}}),U=$(()=>[S.value.clock&&T(S.value.clock),S.value.numbers&&k(os[S.value.numbers])].filter(Boolean).join(" · ")),C=$e(!1);async function K(E,R){const L=R.target;C.value=!0;const D=await ar({[E]:L.value});C.value=!1,D||(L.value=String(v.value?.[E]??"auto"))}async function O(){C.value=!0,await ar(S.value),C.value=!1}return(E,R)=>{const L=Ws("i18n-t");return g(),_("div",k1,[o("div",$1,[o("div",x1,[o("span",S1,d(a(c)("editor.nav.settings")),1),o("h1",C1,d(a(c)("editor.settings.title")),1)]),o("button",{type:"button",class:"btn quiet",id:"close-settings",onClick:R[0]||(R[0]=D=>a(He)(""))},d(a(c)("editor.settings.back")),1)]),o("div",T1,[o("section",E1,[o("h2",null,d(a(c)("editor.settings.screens.title")),1),o("p",null,d(a(c)("editor.settings.screens.text")),1),o("div",A1,[o("button",{type:"button",class:"tool",onClick:R[1]||(R[1]=D=>a(He)("#new-screen"))},[R[9]||(R[9]=o("span",{class:"tool-icon"},"+",-1)),o("span",P1,[o("b",null,d(a(c)("editor.nav.new_screen")),1),o("small",null,d(a(c)("editor.nav.new_screen_detail")),1)])]),o("button",{type:"button",class:"tool",onClick:R[2]||(R[2]=D=>a(He)("#firmware"))},[R[10]||(R[10]=o("span",{class:"tool-icon"},"⇪",-1)),o("span",O1,[o("b",null,d(a(c)("editor.nav.firmware")),1),o("small",null,d(a(c)("editor.settings.screens.firmware_detail")),1)])])])]),t.value?(g(),_("section",I1,[o("h2",null,d(a(c)("editor.settings.updates.title")),1),o("p",L1,d(s.value),1),i.value&&l.value?(g(),_(q,{key:0},[o("div",{class:"progress",role:"progressbar","aria-valuenow":l.value.percent,"aria-valuemin":"0","aria-valuemax":"100"},[o("i",{style:Ue({width:l.value.percent+"%"})},null,4)],8,M1),o("div",R1,[o("span",null,d(i.value.name)+" · "+d(l.value.percent)+" %",1),o("span",null,d(l.value.text),1)]),r.value?(g(),_("pre",N1,d(r.value),1)):W("",!0)],64)):W("",!0),t.value.pending&&!t.value.busy&&t.value.pending>=2?(g(),_("button",{key:1,id:"update-all",type:"button",class:"btn primary",onClick:R[3]||(R[3]=(...D)=>a(ir)&&a(ir)(...D))},d(a(c)("editor.settings.updates.all",t.value.pending)),1)):W("",!0),u.value.length&&!a(Ko)()?(g(),_("details",F1,[o("summary",null,d(a(c)("editor.settings.updates.whats_new",{version:t.value.target})),1),o("ul",null,[(g(!0),_(q,null,me(u.value,D=>(g(),_("li",{key:D},d(D),1))),128))])])):W("",!0),o("label",D1,[o("input",{type:"checkbox",id:"auto-update",checked:!!t.value.auto,onChange:R[4]||(R[4]=D=>a(Vm)(D.target.checked))},null,40,U1),o("span",null,[Me(d(a(c)("editor.settings.updates.auto_label")),1),o("small",null,d(a(c)("editor.settings.updates.auto_hint")),1)])])])):W("",!0),v.value?(g(),_("section",j1,[o("h2",null,d(a(c)("editor.settings.language.title")),1),o("div",H1,[o("label",V1,d(a(c)("editor.settings.language.screen_language")),1),o("select",{id:"screen-language",value:v.value.setting,disabled:C.value,onChange:R[5]||(R[5]=D=>K("setting",D))},[o("option",B1,d(y.value?a(c)("editor.settings.language.auto",{name:y.value}):a(c)("editor.settings.language.auto_plain")),1),(g(!0),_(q,null,me(v.value.languages,D=>(g(),_("option",{key:D.code,value:D.code},d(D.checked?D.name:a(c)("editor.settings.language.unchecked",{name:D.name})),9,K1))),128))],40,W1),v.value.setting==="auto"&&!y.value?(g(),_("small",z1,d(a(c)("editor.settings.language.ha_missing")),1)):W("",!0),I.value?(g(),it(L,{key:1,keypath:"editor.settings.language.help",tag:"small",id:"language-help",scope:"global"},{name:oe(()=>[Me(d(I.value.name),1)]),guide:oe(()=>[o("a",{href:m2,target:"_blank",rel:"noopener"},d(a(c)("editor.settings.language.guide")),1)]),_:1})):W("",!0),o("small",null,d(a(c)("editor.settings.language.update_hint")),1)]),o("div",q1,[o("label",Y1,d(a(c)("editor.settings.language.time")),1),o("select",{id:"time-format",value:v.value.clock||"auto",disabled:C.value,onChange:R[6]||(R[6]=D=>K("clock",D))},[o("option",J1,d(a(c)("editor.settings.language.time_auto",{clock:T(v.value.clock_auto||v.value.clock_effective)})),1),o("option",X1,d(T("24")),1),o("option",Z1,d(T("12")),1)],40,G1)]),o("div",Q1,[o("label",e2,d(a(c)("editor.settings.language.numbers")),1),o("select",{id:"number-format",value:v.value.numbers||"auto",disabled:C.value,onChange:R[7]||(R[7]=D=>K("numbers",D))},[o("option",n2,d(a(c)("editor.settings.language.numbers_auto",{example:k(a(zm))})),1),(g(),_(q,null,me(b,D=>o("option",{key:D,value:D},d(k(a(os)[D])),9,s2)),64))],40,t2)]),U.value?(g(),_("div",i2,[o("small",null,d(a(c)("editor.settings.language.profile",{formats:U.value})),1),o("button",{type:"button",class:"btn quiet mini",disabled:C.value,onClick:O},d(a(c)("editor.settings.language.use_profile")),9,o2)])):W("",!0),o("small",null,d(a(c)("editor.settings.language.editor_hint")),1)])):W("",!0),o("section",l2,[o("h2",null,d(a(c)("editor.nav.alerts")),1),o("p",null,d(a(c)("editor.settings.alerts.text")),1),o("div",a2,[o("button",{type:"button",class:"tool",onClick:R[8]||(R[8]=D=>a(He)("#alerts"))},[R[11]||(R[11]=o("span",{class:"tool-icon"},"!",-1)),o("span",r2,[o("b",null,d(a(c)("editor.nav.alerts")),1),o("small",null,d(a(c)("editor.settings.alerts.detail")),1)])])])]),o("section",c2,[R[12]||(R[12]=o("h2",null,"Claude",-1)),o("p",null,d(a(c)("editor.settings.claude.text")),1),o("div",u2,[o("button",{type:"button",id:"claude-install",class:he(["btn",f.value?.installed&&f.value.current?"quiet":"primary"]),disabled:!f.value||h.value,onClick:p},d(!f.value||!f.value.installed?a(c)("editor.settings.claude.install"):f.value.current?a(c)("editor.settings.claude.install_again"):a(c)("editor.settings.claude.update")),11,d2),o("span",{id:"claude-status",class:he(["chip",f.value&&f.value.installed?f.value.current?"good":"update":""]),role:"status"},d(f.value?f.value.installed?f.value.current?a(c)("editor.settings.claude.installed_chip"):a(c)("editor.settings.claude.newer"):a(c)("editor.settings.claude.not_installed"):a(c)("editor.common.loading")),3)]),se(L,{keypath:"editor.settings.claude.writes",tag:"small",scope:"global"},{path:oe(()=>[o("code",f2,d(f.value?.path||"/homeassistant/.claude/skills/esp-screens"),1)]),_:1}),o("div",p2,[o("a",h2,d(a(c)("editor.settings.claude.download")),1),o("small",null,d(a(c)("editor.settings.claude.upload")),1)])])])])}}}),v2={class:"panel",id:"installer"},g2={class:"panel-head"},_2={class:"tx"},y2={class:"eyebrow"},w2={id:"install-title"},k2={key:0},$2=["aria-label"],x2={class:"boards"},S2={class:"board"},C2={class:"board"},T2={class:"field"},E2={class:"f-label",for:"friendly_name"},A2=["placeholder"],P2={class:"node-line"},O2={id:"node-preview"},I2={key:0,class:"field",id:"node-label"},L2={class:"f-label",for:"node-name"},M2={key:1,id:"wifi-fields",class:"wifi"},R2={class:"hint",id:"wifi-status"},N2={key:0,class:"field",id:"wifi-ssid-label"},F2={class:"f-label",for:"wifi_ssid"},D2={key:1,class:"field",id:"wifi-password-label"},U2={class:"f-label",for:"wifi_password"},j2={class:"field"},H2={class:"f-label",for:"install-target"},V2={key:0,value:"usb"},W2=["value"],B2={value:"download"},K2={value:""},z2={id:"target-hint"},q2={key:2,class:"hint",id:"install-note"},Y2={class:"actions"},G2=["disabled"],J2={id:"install-status",class:"status-line error",role:"status"},X2={key:1,id:"install-progress",class:"card"},Z2={class:"progress-head"},Q2={key:0,class:"spin",id:"progress-spin"},ew={id:"progress-title"},tw={id:"progress-detail"},nw={key:0,id:"install-download",class:"card",style:{background:"var(--surface-2)"}},sw=["href","download"],iw={class:"steps",id:"download-steps"},ow={key:1,id:"install-result",class:"field"},lw={class:"key-box"},aw={class:"steps",id:"install-steps"},rw=["open"],cw={id:"install-log",class:"log"},uw={class:"actions"},dw="https://web.esphome.io/?dashboard_install",fw=Le({__name:"InstallerView",setup(e){const t=qn({board:"cyd",friendly_name:"",name:"",wifi_ssid:"",wifi_password:"",target:""}),n=qn({view:"setup",file:null,friendly:"",board:"cyd",target:"",apiKey:null,nodeEdited:!1,jobState:null,picked:!1,action:null}),s=$e(!1),i=$e(null),l=$e(null),r=$e([]),u=$e(""),f=$e(""),h=$e(!1),p=$e(!1),b=$e(null);let v=0;function y(ke){return ke.toLowerCase().normalize("NFD").replace(/[̀-ͯ]/g,"").replace(/[^a-z0-9]+/g,"-").replace(/^[^a-z]+/,"").slice(0,30).replace(/-+$/,"")||"screen"}function I(ke){const B=ke.replace(/^\/dev\/serial\/by-id\/usb-/,"").replace(/-if\d+(-port\d+)?$/,"").replace(/_/g," ");return`USB · ${B===ke?ke.replace(/^\/dev\//,""):B}`}Tt(()=>t.friendly_name,()=>{n.nodeEdited||(t.name=y(t.friendly_name))});const T=$(()=>t.name||"…"),k=$(()=>i.value?.ports||[]),A=$(()=>i.value?.wifi),S=$(()=>A.value?.state==="new"||A.value?.state==="missing"),U=$(()=>A.value?.missing||[]),C=$(()=>c(A.value?.state==="new"?"editor.installer.wifi.new":"editor.installer.wifi.missing")),K=$(()=>A.value?.state==="ready"?c("editor.installer.wifi.ready"):A.value?.state==="invalid"?c("editor.installer.wifi.invalid"):""),O=$(()=>c(t.target==="usb"?"editor.installer.target.usb":t.target==="download"?"editor.installer.target.download":t.target?k.value.length>1?"editor.installer.target.several":"editor.installer.target.once":"editor.installer.target.later")),E=$(()=>t.target==="download"?c("editor.firmware.build_download"):t.target?c("editor.installer.install"):c("editor.installer.save_profile")),R=$(()=>i.value?.job?.state==="running"&&!(n.file&&i.value.job.file===n.file)),L=$(()=>h.value||A.value?.state==="invalid"||t.target==="usb"||!!t.target&&(R.value||!i.value?.available));function D(){const ke=t.target;(ke==="download"||ke===""?n.picked:k.value.includes(ke))||(t.target=k.value[0]||"usb")}async function M(){let ke;try{ke=await Ft("firmware")}catch(ie){u.value=ie.message;return}i.value=ke;const B=ke.job,ne=B&&n.file&&B.file===n.file;if(ne&&(n.jobState=B.state),n.view==="setup"){if(ne&&B.state==="running"){Y(B,ke.logs||[]);return}D(),u.value=R.value?c("editor.installer.busy",{file:B.file}):!ke.available&&t.target?c("editor.installer.no_cli"):K.value}else n.view==="progress"&&ne&&(l.value=B,r.value=ke.logs||[],B.state!=="running"&&B.state!=="success"&&(p.value=!0))}function Y(ke,B){n.view="progress",n.jobState=ke.state,n.action=ke.action,l.value=ke,r.value=B}const te=$(()=>l.value?.state==="running"),ye=$(()=>n.view==="done"||l.value?.state==="success"),re=$(()=>n.action==="download"),be=$(()=>c(n.view==="done"?"editor.installer.title.saved":te.value?"editor.installer.title.running":ye.value?re.value?"editor.installer.title.ready":"editor.installer.title.done":"editor.installer.title.failed")),ge=$(()=>n.view==="done"?c("editor.installer.progress.saved",{file:n.file}):te.value?l.value?.stage==="upload"?c("editor.installer.progress.writing",{name:n.friendly}):c("editor.installer.progress.building"):ye.value?re.value?c("editor.installer.progress.ready",{name:n.friendly}):c("editor.installer.progress.installed",{name:n.friendly}):c(re.value?"editor.installer.progress.build_failed":"editor.installer.progress.install_failed")),we=$(()=>n.view==="done"?c("editor.installer.detail.saved"):te.value?l.value?.stage==="upload"?c("editor.installer.detail.uploading"):c(re.value?"editor.installer.detail.building_download":"editor.installer.detail.building"):ye.value?re.value?c("editor.installer.detail.downloaded"):c(n.board==="cyd"?"editor.installer.detail.booted_cyd":"editor.installer.detail.booted"):r.value.filter(ke=>/error/i.test(ke)).pop()||r.value.filter(ke=>/failed/i.test(ke)).pop()||c("editor.installer.detail.see_log")),Ge=$(()=>({href:`api/firmware/profiles/${encodeURIComponent(n.file||"")}/download`,name:(n.file||"").replace(/\.yaml$/,"")+".factory.bin"}));async function qe(ke){const B=ke.target;if(n.nodeEdited||(t.name=y(t.friendly_name)),!!B.reportValidity()){h.value=!0,f.value="";try{const ne={board:t.board,friendly_name:t.friendly_name,name:t.name,target:t.target};S.value&&(U.value.includes("wifi_ssid")&&(ne.wifi_ssid=t.wifi_ssid),U.value.includes("wifi_password")&&(ne.wifi_password=t.wifi_password));const ie=await ft("firmware/profiles","POST",ne);Object.assign(n,{file:ie.file,apiKey:ie.api_key,friendly:t.friendly_name.trim(),board:t.board,target:t.target}),t.wifi_password="",ie.job?Y(ie.job,[]):n.view="done"}catch(ne){f.value=ne.message}finally{h.value=!1}}}async function le(){try{if(!re.value){const{ports:B}=await Ft("firmware");!B.includes(n.target)&&B.length===1&&(n.target=B[0])}const ke=await ft("firmware/jobs","POST",re.value?{file:n.file,action:"download"}:{file:n.file,action:"install",target:n.target});Y(ke,[])}catch(ke){Ce(ke.message)}}function Z(){Object.assign(n,{view:"setup",file:null,apiKey:null,nodeEdited:!1,jobState:null,target:"",picked:!1,action:null}),Object.assign(t,{board:"cyd",friendly_name:"",name:"",wifi_ssid:"",wifi_password:"",target:""}),s.value=!1,l.value=null,r.value=[],f.value="",u.value="",p.value=!1,M()}function ue(){n.view==="progress"&&n.jobState!=="running"&&(n.view="done"),He("")}return An(()=>{M(),v=window.setInterval(M,3e3)}),rs(()=>clearInterval(v)),(ke,B)=>{const ne=Ws("i18n-t");return g(),_("div",v2,[o("div",g2,[o("div",_2,[o("span",y2,d(a(c)("editor.nav.new_screen")),1),o("h1",w2,d(n.view==="setup"?a(c)("editor.installer.title.setup"):be.value),1),n.view==="setup"?(g(),_("p",k2,d(a(c)("editor.installer.intro")),1)):W("",!0)]),o("button",{type:"button",class:"btn quiet",id:"close-install","aria-label":a(c)("editor.common.close"),onClick:ue},d(a(c)("editor.common.back")),9,$2)]),n.view==="setup"?(g(),_("form",{key:0,id:"install-form",class:"card",onSubmit:Ot(qe,["prevent"])},[o("fieldset",null,[o("legend",null,d(a(c)("editor.installer.board")),1),o("div",x2,[o("label",S2,[Ee(o("input",{type:"radio",name:"board",value:"cyd","onUpdate:modelValue":B[0]||(B[0]=ie=>t.board=ie)},null,512),[[ca,t.board]]),o("span",null,[o("b",null,d(a(c)("editor.installer.board_cyd")),1),B[13]||(B[13]=o("small",null,"ESP32-2432S028 · 320 × 240",-1))])]),o("label",C2,[Ee(o("input",{type:"radio",name:"board",value:"guition","onUpdate:modelValue":B[1]||(B[1]=ie=>t.board=ie)},null,512),[[ca,t.board]]),o("span",null,[o("b",null,d(a(c)("editor.installer.board_guition")),1),B[14]||(B[14]=o("small",null,"ESP32-S3-4848S040 · 480 × 480 · GT911",-1))])])])]),o("div",T2,[o("label",E2,d(a(c)("editor.installer.name")),1),Ee(o("input",{id:"friendly_name",name:"friendly_name","onUpdate:modelValue":B[2]||(B[2]=ie=>t.friendly_name=ie),required:"",maxlength:"60",placeholder:a(c)("editor.installer.name_placeholder"),autocomplete:"off"},null,8,A2),[[Xe,t.friendly_name]]),o("small",P2,[Me(d(a(c)("editor.installer.device_name"))+" ",1),o("code",O2,d(T.value),1),o("button",{type:"button",class:"btn link mini",id:"edit-node",onClick:B[3]||(B[3]=ie=>{n.nodeEdited=!0,s.value=!0})},d(a(c)("editor.installer.customize")),1)]),o("small",null,d(a(c)("editor.installer.name_hint")),1)]),s.value?(g(),_("div",I2,[o("label",L2,d(a(c)("editor.installer.device_name")),1),Ee(o("input",{id:"node-name",name:"name","onUpdate:modelValue":B[4]||(B[4]=ie=>t.name=ie),pattern:"[a-z][a-z0-9\\-]{0,29}",maxlength:"30",autocomplete:"off",onInput:B[5]||(B[5]=ie=>n.nodeEdited=!0)},null,544),[[Xe,t.name]]),o("small",null,d(a(c)("editor.installer.device_name_hint")),1)])):W("",!0),S.value?(g(),_("fieldset",M2,[o("legend",null,d(a(c)("editor.installer.wifi.title")),1),o("p",R2,d(C.value),1),U.value.includes("wifi_ssid")?(g(),_("div",N2,[o("label",F2,d(a(c)("editor.installer.wifi.ssid")),1),Ee(o("input",{id:"wifi_ssid",name:"wifi_ssid","onUpdate:modelValue":B[6]||(B[6]=ie=>t.wifi_ssid=ie),autocomplete:"off"},null,512),[[Xe,t.wifi_ssid]])])):W("",!0),U.value.includes("wifi_password")?(g(),_("div",D2,[o("label",U2,d(a(c)("editor.installer.wifi.password")),1),Ee(o("input",{id:"wifi_password",name:"wifi_password",type:"password","onUpdate:modelValue":B[7]||(B[7]=ie=>t.wifi_password=ie),autocomplete:"new-password"},null,512),[[Xe,t.wifi_password]])])):W("",!0)])):W("",!0),o("div",j2,[o("label",H2,d(a(c)("editor.installer.install_via")),1),Ee(o("select",{id:"install-target",name:"target","onUpdate:modelValue":B[8]||(B[8]=ie=>t.target=ie),onChange:B[9]||(B[9]=ie=>{n.picked=!0,M()})},[k.value.length?W("",!0):(g(),_("option",V2,d(a(c)("editor.firmware.no_board")),1)),(g(!0),_(q,null,me(k.value,ie=>(g(),_("option",{key:ie,value:ie},d(I(ie)),9,W2))),128)),o("option",B2,d(a(c)("editor.firmware.download_target")),1),o("option",K2,d(a(c)("editor.installer.later")),1)],544),[[Wn,t.target]]),o("small",z2,d(O.value),1)]),u.value?(g(),_("p",q2,d(u.value),1)):W("",!0),o("div",Y2,[o("button",{type:"submit",class:"btn primary",id:"install-go",disabled:L.value},d(E.value),9,G2),o("span",J2,d(f.value),1)])],32)):(g(),_("div",X2,[o("div",Z2,[te.value?(g(),_("span",Q2)):(g(),_("span",{key:1,class:he(["outcome",ye.value?"ok":"bad"]),id:"progress-mark"},d(ye.value?"✓":"✕"),3)),o("strong",ew,d(ge.value),1)]),o("p",tw,d(we.value),1),ye.value&&re.value&&n.view!=="done"?(g(),_("div",nw,[o("a",{class:"btn primary",id:"download-firmware",href:Ge.value.href,download:Ge.value.name},d(a(c)("editor.firmware.download_file",{name:Ge.value.name})),9,sw),o("ol",iw,[o("li",null,[se(ne,{keypath:"editor.installer.download_steps.plug",scope:"global"},{bold:oe(()=>[o("b",null,d(a(c)("editor.installer.download_steps.plug_bold")),1)]),_:1})]),o("li",null,[se(ne,{keypath:"editor.installer.download_steps.open",scope:"global"},{bold:oe(()=>[o("b",null,[se(ne,{keypath:"editor.installer.download_steps.open_bold",scope:"global"},{esphome_web:oe(()=>[o("a",{href:dw,target:"_blank",rel:"noopener"},"ESPHome Web")]),_:1})])]),_:1})]),o("li",null,[se(ne,{keypath:n.board==="cyd"?"editor.installer.download_steps.install_cyd":"editor.installer.download_steps.install",scope:"global"},{bold:oe(()=>[o("b",null,d(a(c)("editor.installer.download_steps.install_bold")),1)]),file:oe(()=>[Me(d(Ge.value.name),1)]),_:1},8,["keypath"])])]),o("small",null,d(a(c)("editor.installer.download_keep")),1)])):W("",!0),ye.value?(g(),_("div",ow,[o("div",lw,[o("span",null,d(a(c)("editor.installer.api_key")),1),o("code",{id:"api-key",ref_key:"keyBox",ref:b},d(n.apiKey||""),513),o("button",{type:"button",class:"btn quiet mini",id:"copy-key",onClick:B[10]||(B[10]=ie=>a(Lt)(n.apiKey||"",b.value))},d(a(c)("editor.common.copy")),1)]),o("ol",aw,[o("li",null,[se(ne,{keypath:"editor.installer.pairing.ha",scope:"global"},{bold:oe(()=>[o("b",null,d(a(c)("editor.installer.pairing.ha_bold")),1)]),name:oe(()=>[Me(d(n.friendly),1)]),_:1}),B[15]||(B[15]=Me()),o("button",{type:"button",class:"btn quiet mini",onClick:B[11]||(B[11]=(...ie)=>a(ki)&&a(ki)(...ie))},d(a(c)("editor.common.open_integrations")),1)]),o("li",null,[se(ne,{keypath:"editor.installer.pairing.key",scope:"global"},{bold:oe(()=>[o("b",null,d(a(c)("editor.installer.pairing.key_bold")),1)]),_:1})]),o("li",null,[se(ne,{keypath:"editor.installer.pairing.actions",scope:"global"},{bold:oe(()=>[o("b",null,d(a(c)("editor.installer.pairing.actions_bold")),1)]),_:1})]),o("li",null,[se(ne,{keypath:"editor.installer.pairing.tiles",scope:"global"},{bold:oe(()=>[o("b",null,d(a(c)("editor.installer.pairing.tiles_bold")),1)]),_:1})])])])):W("",!0),n.view!=="done"?(g(),_("details",{key:2,id:"install-log-wrap",class:"log-wrap",open:p.value,onToggle:B[12]||(B[12]=ie=>p.value=ie.target.open)},[o("summary",null,d(a(c)("editor.installer.log")),1),o("pre",cw,d(r.value.join(`
|
||
`)),1)],40,rw)):W("",!0),o("div",uw,[!te.value&&!ye.value?(g(),_("button",{key:0,type:"button",class:"btn primary",id:"install-retry",onClick:le},d(a(c)("editor.installer.retry")),1)):W("",!0),o("button",{type:"button",class:"btn quiet",id:"install-close",onClick:Z},d(ye.value?a(c)("editor.installer.another"):a(c)("editor.installer.start_over")),1),o("button",{type:"button",class:he(["btn",ye.value?"primary":"quiet"]),onClick:ue},d(ye.value?a(c)("editor.installer.done"):a(c)("editor.common.close")),3)])]))])}}}),pw={class:"panel",id:"firmware-dialog"},hw={class:"panel-head"},mw={class:"tx"},bw={class:"eyebrow"},vw={class:"card"},gw={class:"card-grid"},_w={class:"field"},yw={class:"f-label",for:"firmware-file"},ww=["value"],kw={class:"field"},$w={class:"f-label",for:"firmware-port"},xw={value:"ota"},Sw={key:0,value:"usb"},Cw=["value"],Tw={value:"download"},Ew={key:0,class:"field",id:"firmware-host-label"},Aw={class:"f-label",for:"firmware-host"},Pw=["placeholder"],Ow={class:"actions"},Iw=["disabled"],Lw=["disabled"],Mw=["disabled"],Rw={key:0,class:"spin"},Nw={id:"firmware-status",class:"status-line",role:"status"},Fw={key:0,id:"firmware-download",class:"card",style:{background:"var(--surface-2)"}},Dw=["href","download"],Uw={id:"firmware-log",class:"log"},jw="https://web.esphome.io/?dashboard_install",Hw=Le({__name:"FirmwareView",setup(e){const t=$e(null),n=$e(""),s=$e("ota"),i=$e("");let l=0;async function r(T=!1){try{const k=await Ft("firmware");t.value=k,(T||!n.value)&&(n.value=k.profiles[0]?.file||"");const A=k.ports||[];s.value.startsWith("/")&&!A.includes(s.value)&&(s.value=A[0]||"usb"),s.value==="usb"&&A.length&&(s.value=A[0])}catch(k){Ce(k.message)}}const u=$(()=>t.value?.job?.state==="running"),f=$(()=>!t.value||u.value||!t.value.available||!t.value.profiles?.length),h=$(()=>f.value||s.value==="usb"),p=$(()=>t.value?.ports||[]),b=$(()=>t.value?t.value.available?t.value.job?`${t.value.job.file} · ${t.value.job.action} · ${t.value.job.state}`:c("editor.firmware.choose"):c("editor.firmware.no_cli"):c("editor.common.loading")),v=$(()=>s.value==="download"&&!!n.value&&!!t.value?.downloads?.includes(n.value)),y=$(()=>({href:`api/firmware/profiles/${encodeURIComponent(n.value)}/download`,name:n.value.replace(/\.yaml$/,"")+".factory.bin"}));async function I(T){try{await ft("firmware/jobs","POST",{file:n.value,action:T==="validate"?"validate":T==="build"?"build":s.value==="download"?"download":"install",target:s.value==="ota"?i.value.trim():s.value==="download"?"":s.value}),await r()}catch(k){Ce(k.message)}}return An(()=>{r(!0),l=window.setInterval(()=>r(),3e3)}),rs(()=>clearInterval(l)),(T,k)=>{const A=Ws("i18n-t");return g(),_("div",pw,[o("div",hw,[o("div",mw,[o("span",bw,d(a(c)("editor.nav.firmware")),1),o("h1",null,d(a(c)("editor.firmware.title")),1),se(A,{keypath:"editor.firmware.intro",tag:"p",scope:"global"},{ota:oe(()=>[o("b",null,d(a(c)("editor.firmware.ota")),1)]),download:oe(()=>[o("b",null,d(a(c)("editor.firmware.download")),1)]),check:oe(()=>[o("b",null,d(a(c)("editor.firmware.check")),1)]),build:oe(()=>[o("b",null,d(a(c)("editor.firmware.build")),1)]),install:oe(()=>[o("b",null,d(a(c)("editor.firmware.install")),1)]),_:1})]),o("button",{type:"button",class:"btn quiet",id:"close-firmware",onClick:k[0]||(k[0]=S=>a(He)(""))},d(a(c)("editor.common.back")),1)]),o("div",vw,[o("div",gw,[o("div",_w,[o("label",yw,d(a(c)("editor.firmware.profile")),1),Ee(o("select",{id:"firmware-file","onUpdate:modelValue":k[1]||(k[1]=S=>n.value=S)},[(g(!0),_(q,null,me(t.value?.profiles||[],S=>(g(),_("option",{key:S.file,value:S.file},d(S.file),9,ww))),128))],512),[[Wn,n.value]])]),o("div",kw,[o("label",$w,d(a(c)("editor.firmware.install_to")),1),Ee(o("select",{id:"firmware-port","onUpdate:modelValue":k[2]||(k[2]=S=>s.value=S)},[o("option",xw,d(a(c)("editor.firmware.ota")),1),p.value.length?W("",!0):(g(),_("option",Sw,d(a(c)("editor.firmware.no_board")),1)),(g(!0),_(q,null,me(p.value,S=>(g(),_("option",{key:S,value:S},d(S),9,Cw))),128)),o("option",Tw,d(a(c)("editor.firmware.download_target")),1)],512),[[Wn,s.value]])]),s.value==="ota"?(g(),_("div",Ew,[o("label",Aw,d(a(c)("editor.firmware.host")),1),Ee(o("input",{id:"firmware-host","onUpdate:modelValue":k[3]||(k[3]=S=>i.value=S),placeholder:n.value?n.value.replace(/\.yaml$/,".local"):"screen-livingroom.local"},null,8,Pw),[[Xe,i.value]])])):W("",!0)]),o("div",Ow,[o("button",{type:"button",class:"btn quiet",id:"firmware-validate",disabled:f.value,onClick:k[4]||(k[4]=S=>I("validate"))},d(a(c)("editor.firmware.check")),9,Iw),o("button",{type:"button",class:"btn quiet",id:"firmware-build",disabled:f.value,onClick:k[5]||(k[5]=S=>I("build"))},d(a(c)("editor.firmware.build")),9,Lw),o("button",{type:"button",class:"btn primary",id:"firmware-install",disabled:h.value,onClick:k[6]||(k[6]=S=>I("install"))},d(s.value==="download"?a(c)("editor.firmware.build_download"):a(c)("editor.firmware.install")),9,Mw),u.value?(g(),_("span",Rw)):W("",!0)]),o("p",Nw,d(b.value),1),v.value?(g(),_("div",Fw,[o("a",{class:"btn primary",id:"firmware-download-link",href:y.value.href,download:y.value.name},d(a(c)("editor.firmware.download_file",{name:y.value.name})),9,Dw),se(A,{keypath:"editor.firmware.download_how",tag:"small",scope:"global"},{esphome_web:oe(()=>[o("a",{href:jw,target:"_blank",rel:"noopener"},"ESPHome Web")]),_:1})])):W("",!0)]),o("pre",Uw,d((t.value?.logs||[]).join(`
|
||
`)),1)])}}}),Vw={class:"panel wide alerts",id:"alerts-dialog"},Ww={class:"panel-head"},Bw={class:"tx"},Kw={class:"eyebrow"},zw={key:0,class:"hint"},qw={class:"alert-hero"},Yw={class:"alert-mock",id:"alert-mock","aria-hidden":"true"},Gw={class:"mdi alert-mock-icon",id:"alert-mock-icon"},Jw={id:"alert-mock-title"},Xw={id:"alert-mock-subtitle"},Zw={class:"fake",id:"alert-mock-button"},Qw=["aria-label"],ek=["data-jump","onClick"],tk={id:"alerts-try",class:"card"},nk={class:"field"},sk={class:"f-label",for:"try-screen"},ik={value:"all"},ok=["value","disabled"],lk={class:"field"},ak={class:"f-label",for:"try-title"},rk={class:"field"},ck={class:"f-label",for:"try-subtitle"},uk={class:"field"},dk={class:"f-label",for:"try-icon"},fk={id:"try-icons"},pk=["value"],hk={class:"field"},mk={class:"f-label",for:"try-color"},bk={value:""},vk=["value"],gk={class:"field"},_k={class:"f-label",for:"try-button"},yk={class:"field"},wk={class:"f-label",for:"try-timeout"},kk={class:"check field"},$k={class:"actions field wide"},xk=["disabled"],Sk={class:"status-line",id:"try-result",role:"status"},Ck={id:"alerts-screens",class:"card"},Tk={id:"alerts-min-firmware"},Ek={id:"alerts-screen-list",class:"options"},Ak={key:0,class:"hint"},Pk={class:"alert-screen-head"},Ok={class:"copy-label"},Ik=["onClick"],Lk={id:"alerts-howto",class:"card"},Mk={class:"steps"},Rk={class:"field"},Nk={class:"f-label",for:"alerts-example-screen"},Fk=["value"],Dk={key:0,value:""},Uk={class:"copy-line"},jk={id:"alerts-example"},Hk={id:"alerts-all",class:"card"},Vk={id:"alerts-all-event"},Wk={id:"alerts-all-dismiss"},Bk={class:"copy-line"},Kk={id:"alerts-all-example"},zk={id:"alerts-fields",class:"card"},qk={class:"table-scroll"},Yk={id:"alerts-field-table"},Gk={key:0},Jk={id:"alerts-icons",class:"card"},Xk={class:"subhead"},Zk={class:"chips",id:"alerts-suggested"},Qk=["onClick"],e3={class:"mdi"},t3={class:"field"},n3={class:"f-label",for:"alerts-icon-search"},s3=["placeholder"],i3={id:"alerts-icon-groups"},o3={class:"subhead"},l3={class:"alert-icon-grid"},a3=["title","onClick"],r3={class:"mdi"},c3={key:0},u3={key:0,class:"hint"},d3={id:"alerts-colors",class:"card"},f3={class:"swatches",id:"alerts-swatches"},p3=["onClick"],h3={id:"alerts-behaviour",class:"card"},m3={class:"alerts-list"},b3={id:"alerts-events",class:"card"},v3={id:"alerts-event-name"},g3={class:"table-scroll"},_3={id:"alerts-ending-table"},y3={class:"subhead"},w3={class:"copy-line"},k3={id:"alerts-wait-example"},$3={id:"alerts-tips",class:"card"},x3={class:"alerts-list"},S3=Le({__name:"AlertsView",setup(e){const t=$(()=>m.inventory.alerts),n=qn({screen:"all",title:c("editor.alerts.example.title"),subtitle:c("editor.alerts.example.subtitle"),icon:"doorbell",color:"orange",button_text:c("editor.alerts.example.button"),timeout:30,flash:!0}),s=$e(!1),i=$e(""),l=$(()=>m.inventory.screens.filter(R=>zn(R)&&R.online));async function r(){s.value=!0,i.value="";try{const{screen:R,...L}=n,D=await Am(R,L),M=m.inventory.screens.find(te=>te.id===R)?.name,Y=R==="all"?c("editor.alerts.try.sent_all",D.sent):M?c("editor.alerts.try.sent_to",{name:M}):c("editor.alerts.try.sent_one");i.value=D.sent?[Y,D.skipped?c("editor.alerts.try.skipped",D.skipped):"",D.unusable?.length?c("editor.alerts.try.left_empty",{fields:D.unusable.join(", ")}):""].filter(Boolean).join(" "):c("editor.alerts.try.nothing",{version:t.value?.min_firmware||"0.2.31"})}catch(R){i.value=R.message}finally{s.value=!1}}const u=$(()=>m.inventory.icons),f=$e(""),h=$e(""),p=R=>`"${String(R).replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`,b=R=>R.type==="string"?/^[a-z][a-z0-9-]*$/.test(R.example)?R.example:p(R.example):R.example===!0?"true":R.example===!1?"false":String(R.example),v=$(()=>m.inventory.screens.filter(R=>R.alert_action)),y=$(()=>f.value||v.value[0]?.alert_action||""),I=$(()=>{const R=(t.value?.fields||[]).map(L=>` ${L.name}: ${b(L)}`);return`action: ${y.value||"esphome.<device_name>_show_alert"}
|
||
data:
|
||
${R.join(`
|
||
`)}`}),T=(R,L)=>p((t.value?.fields||[]).find(D=>D.name===R)?.example||L),k=$(()=>[`# ${c("editor.alerts.wait_yaml.comment")}`,"actions:",` - action: ${y.value||"esphome.<device_name>_show_alert"}`," data:",` title: ${T("title","Someone is at the door")}`,` subtitle: ${T("subtitle","Door 3, back")}`," icon: doorbell"," color: orange",` button_text: ${T("button_text","Coming")}`," timeout: 0"," flash: true"," - wait_for_trigger:"," - trigger: event",` event_type: ${t.value?.event||"esphome.screen_alert"}`," event_data:"," action: ok",' timeout: "00:05:00"'," - if:"," - condition: template",' value_template: "{{ wait.trigger is not none }}"'," then:"," - action: notify.notify"," data:",` message: ${p(c("editor.alerts.wait_yaml.message"))}`].join(`
|
||
`)),A=$(()=>{const R=(t.value?.fields||[]).map(D=>` ${D.name}: ${b(D)}`),L=t.value?.camera;return L&&R.push(` # ${L.name}: ${L.example} # a Guition shows its picture on the card`),`event: ${t.value?.broadcast?.show||"esp_screens_show_alert"}
|
||
event_data:
|
||
${R.join(`
|
||
`)}`}),S=$(()=>{if(!t.value||!u.value)return[];const R=h.value.trim().toLowerCase();return[...u.value.groups,{label:c("editor.alerts.icons.extra"),icons:t.value.extra_icons}].map(D=>({label:D.label,icons:D.icons.filter(M=>!R||M.name.includes(R)||(M.label||"").toLowerCase().includes(R))})).filter(D=>D.icons.length)}),U=$(()=>t.value?.suggested_icons?.find(R=>R.name==="doorbell")),C=$(()=>t.value?.colors?.find(R=>R.name==="orange")),K=R=>["string","int","bool"].includes(R)?c(`editor.alerts.fields.types.${R}`):R;function O(R){document.getElementById(R)?.scrollIntoView({behavior:"smooth",block:"start"})}const E=["alerts-try","alerts-screens","alerts-howto","alerts-all","alerts-fields","alerts-icons","alerts-colors","alerts-behaviour","alerts-events","alerts-tips"];return(R,L)=>{const D=Ws("i18n-t");return g(),_("div",Vw,[o("div",Ww,[o("div",Bw,[o("span",Kw,d(a(c)("editor.alerts.eyebrow")),1),o("h1",null,d(a(c)("editor.alerts.title")),1),se(D,{keypath:"editor.alerts.intro",tag:"p",scope:"global"},{action:oe(()=>[...L[15]||(L[15]=[o("code",null,"show_alert",-1)])]),_:1})]),o("button",{type:"button",class:"btn quiet",id:"close-alerts",onClick:L[0]||(L[0]=M=>a(He)(""))},d(a(c)("editor.common.back")),1)]),t.value?(g(),_(q,{key:1},[o("div",qw,[o("div",Yw,[o("div",{class:"alert-mock-card",style:Ue(C.value?{background:C.value.color}:void 0)},[o("span",Gw,d(U.value?a(Ae)(U.value.cp):""),1),o("strong",Jw,d(a(c)("editor.alerts.example.title")),1),o("span",Xw,d(a(c)("editor.alerts.example.subtitle")),1),o("span",Zw,d(a(c)("editor.alerts.example.button")),1)],4)]),o("nav",{class:"alerts-nav","aria-label":a(c)("editor.alerts.sections")},[(g(),_(q,null,me(E,M=>o("button",{key:M,type:"button","data-jump":M,onClick:Y=>O(M)},d(a(c)(`editor.alerts.nav.${M.slice(7)}`)),9,ek)),64))],8,Qw)]),o("section",tk,[o("h2",null,d(a(c)("editor.alerts.nav.try")),1),o("p",null,d(a(c)("editor.alerts.try.text")),1),o("form",{class:"try-grid",onSubmit:Ot(r,["prevent"])},[o("div",nk,[o("label",sk,d(a(c)("editor.alerts.try.screen")),1),Ee(o("select",{id:"try-screen","onUpdate:modelValue":L[1]||(L[1]=M=>n.screen=M)},[o("option",ik,d(a(c)("editor.alerts.try.all",{ready:l.value.length})),1),(g(!0),_(q,null,me(a(m).inventory.screens,M=>(g(),_("option",{key:M.id,value:M.id,disabled:!a(zn)(M)||!M.online},d(a(zn)(M)&&M.online?M.name:a(c)("editor.alerts.try.not_ready",{name:M.name})),9,ok))),128))],512),[[Wn,n.screen]])]),o("div",lk,[o("label",ak,d(a(c)("editor.alerts.try.title")),1),Ee(o("input",{id:"try-title","onUpdate:modelValue":L[2]||(L[2]=M=>n.title=M),maxlength:"64"},null,512),[[Xe,n.title]])]),o("div",rk,[o("label",ck,d(a(c)("editor.alerts.try.subtitle")),1),Ee(o("input",{id:"try-subtitle","onUpdate:modelValue":L[3]||(L[3]=M=>n.subtitle=M),maxlength:"240"},null,512),[[Xe,n.subtitle]])]),o("div",uk,[o("label",dk,d(a(c)("editor.alerts.try.icon")),1),Ee(o("input",{id:"try-icon","onUpdate:modelValue":L[4]||(L[4]=M=>n.icon=M),list:"try-icons",placeholder:"doorbell"},null,512),[[Xe,n.icon]]),o("datalist",fk,[(g(!0),_(q,null,me(t.value.suggested_icons,M=>(g(),_("option",{key:M.name,value:M.name},d(M.label||M.name),9,pk))),128))])]),o("div",hk,[o("label",mk,d(a(c)("editor.alerts.try.color")),1),Ee(o("select",{id:"try-color","onUpdate:modelValue":L[5]||(L[5]=M=>n.color=M)},[o("option",bk,d(a(c)("editor.alerts.white")),1),(g(!0),_(q,null,me(t.value.colors,M=>(g(),_("option",{key:M.name,value:M.name},d(M.label),9,vk))),128))],512),[[Wn,n.color]])]),o("div",gk,[o("label",_k,d(a(c)("editor.alerts.try.button")),1),Ee(o("input",{id:"try-button","onUpdate:modelValue":L[6]||(L[6]=M=>n.button_text=M),maxlength:"16"},null,512),[[Xe,n.button_text]])]),o("div",yk,[o("label",wk,d(a(c)("editor.alerts.try.timeout")),1),Ee(o("input",{id:"try-timeout","onUpdate:modelValue":L[7]||(L[7]=M=>n.timeout=M),type:"number",min:"0",max:"86400"},null,512),[[Xe,n.timeout,void 0,{number:!0}]])]),o("label",kk,[Ee(o("input",{type:"checkbox",id:"try-flash","onUpdate:modelValue":L[8]||(L[8]=M=>n.flash=M)},null,512),[[Xf,n.flash]]),o("span",null,[Me(d(a(c)("editor.alerts.try.flash")),1),o("small",null,d(a(c)("editor.alerts.try.flash_hint")),1)])]),o("div",$k,[o("button",{type:"submit",class:"btn primary",id:"try-send",disabled:s.value||!l.value.length},d(s.value?a(c)("editor.alerts.try.sending"):a(c)("editor.alerts.try.send")),9,xk),o("span",Sk,d(i.value),1)])],32)]),o("section",Ck,[o("h2",null,d(a(c)("editor.alerts.nav.screens")),1),se(D,{keypath:"editor.alerts.screens.text",tag:"p",scope:"global"},{version:oe(()=>[o("code",Tk,d(t.value.min_firmware),1)]),_:1}),o("div",Ek,[a(m).inventory.screens.length?W("",!0):(g(),_("p",Ak,d(a(c)("editor.alerts.screens.none")),1)),(g(!0),_(q,null,me(a(m).inventory.screens,M=>(g(),_("div",{key:M.id,class:"alert-screen"},[o("div",Pk,[o("strong",null,d(M.name),1),o("span",{class:he(["chip",a(pn)(a(ls)(M),t.value.min_firmware)&&M.alert_action?"good":"update"])},d(a(pn)(a(ls)(M),t.value.min_firmware)&&M.alert_action?a(c)("editor.alerts.screens.ready",{version:M.firmware}):M.alert_action?a(c)("editor.alerts.screens.update",{version:M.firmware||a(c)("editor.common.unknown")}):a(c)("editor.alerts.screens.unknown")),3)]),(g(!0),_(q,null,me([[a(c)("editor.alerts.screens.show"),M.alert_action],[a(c)("editor.alerts.screens.dismiss"),M.dismiss_action]],([Y,te])=>(g(),_("div",{key:Y,class:"copy-line"},[o("span",Ok,d(Y),1),o("code",null,d(te||"esphome.<device_name>_show_alert"),1),te?(g(),_("button",{key:0,type:"button",class:"btn quiet mini",onClick:ye=>a(Lt)(te,void 0,"action_name")},d(a(c)("editor.common.copy")),9,Ik)):W("",!0)]))),128))]))),128))])]),o("section",Lk,[o("h2",null,d(a(c)("editor.alerts.nav.howto")),1),o("ol",Mk,[se(D,{keypath:"editor.alerts.howto.add",tag:"li",scope:"global"},{add:oe(()=>[o("b",null,d(a(c)("editor.alerts.howto.add_bold")),1)]),esphome:oe(()=>[...L[16]||(L[16]=[o("b",null,"ESPHome",-1)])]),device:oe(()=>[o("i",null,d(a(c)("editor.alerts.howto.device")),1)]),_:1}),se(D,{keypath:"editor.alerts.howto.fields",tag:"li",scope:"global"},{bold:oe(()=>[o("b",null,d(a(c)("editor.alerts.howto.fields_bold")),1)]),empty:oe(()=>[...L[17]||(L[17]=[o("code",null,'""',-1)])]),zero:oe(()=>[...L[18]||(L[18]=[o("code",null,"0",-1)])]),_:1}),se(D,{keypath:"editor.alerts.howto.yaml",tag:"li",scope:"global"},{edit:oe(()=>[o("b",null,d(a(c)("editor.alerts.edit_yaml")),1)]),_:1})]),o("div",Rk,[o("label",Nk,d(a(c)("editor.alerts.howto.example_for")),1),Ee(o("select",{id:"alerts-example-screen","onUpdate:modelValue":L[9]||(L[9]=M=>f.value=M),style:{"max-width":"360px"}},[(g(!0),_(q,null,me(v.value,M=>(g(),_("option",{key:M.id,value:M.alert_action},d(M.name),9,Fk))),128)),v.value.length?W("",!0):(g(),_("option",Dk,d(a(c)("editor.alerts.howto.no_screen")),1))],512),[[Wn,f.value]])]),o("div",Uk,[o("pre",jk,d(I.value),1),o("button",{type:"button",class:"btn quiet mini",id:"alerts-example-copy",onClick:L[10]||(L[10]=M=>a(Lt)(I.value,void 0,"yaml"))},d(a(c)("editor.alerts.copy_yaml")),1)])]),o("section",Hk,[o("h2",null,d(a(c)("editor.alerts.all.title")),1),se(D,{keypath:"editor.alerts.all.text",tag:"p",scope:"global"},{show:oe(()=>[o("code",Vk,d(t.value.broadcast?.show||"esp_screens_show_alert"),1)]),dismiss:oe(()=>[o("code",Wk,d(t.value.broadcast?.dismiss||"esp_screens_dismiss_alert"),1)]),event:oe(()=>[o("b",null,d(a(c)("editor.alerts.all.event")),1)]),edit:oe(()=>[o("b",null,d(a(c)("editor.alerts.edit_yaml")),1)]),_:1}),o("div",Bk,[o("pre",Kk,d(A.value),1),o("button",{type:"button",class:"btn quiet mini",id:"alerts-all-copy",onClick:L[11]||(L[11]=M=>a(Lt)(A.value,void 0,"yaml"))},d(a(c)("editor.alerts.copy_yaml")),1)])]),o("section",zk,[o("h2",null,d(a(c)("editor.alerts.nav.fields")),1),o("p",null,d(a(c)("editor.alerts.fields.text")),1),o("div",qk,[o("table",Yk,[o("tr",null,[o("th",null,d(a(c)("editor.alerts.fields.field")),1),o("th",null,d(a(c)("editor.alerts.fields.type")),1),o("th",null,d(a(c)("editor.alerts.fields.what")),1),o("th",null,d(a(c)("editor.alerts.fields.example")),1),o("th",null,d(a(c)("editor.alerts.fields.limit")),1)]),(g(!0),_(q,null,me(t.value.fields,M=>(g(),_("tr",{key:M.name},[o("td",null,[o("code",null,d(M.name),1),o("small",null,d(M.label),1)]),o("td",null,d(K(M.type)),1),o("td",null,d(M.help),1),o("td",null,[o("code",null,d(typeof M.example=="string"?M.example:String(M.example)),1)]),o("td",null,d(t.value.limits.cyd[M.name]?a(c)("editor.alerts.fields.bytes",{cyd:t.value.limits.cyd[M.name],guition:t.value.limits.guition[M.name]}):M.type==="int"?a(c)("editor.alerts.fields.seconds"):"—"),1)]))),128)),t.value.camera?(g(),_("tr",Gk,[o("td",null,[o("code",null,d(t.value.camera.name),1),o("small",null,d(t.value.camera.label),1)]),o("td",null,d(a(c)("editor.alerts.fields.types.entity")),1),o("td",null,d(t.value.camera.help),1),o("td",null,[o("code",null,d(t.value.camera.example),1)]),o("td",null,d(a(c)("editor.alerts.fields.camera_limit")),1)])):W("",!0)])])]),o("section",Jk,[o("h2",null,d(a(c)("editor.alerts.nav.icons")),1),se(D,{keypath:"editor.alerts.icons.text",tag:"p",scope:"global"},{field:oe(()=>[...L[19]||(L[19]=[o("code",null,"icon",-1)])]),example:oe(()=>[...L[20]||(L[20]=[o("code",null,"doorbell",-1)])]),mdi:oe(()=>[...L[21]||(L[21]=[o("code",null,"mdi:doorbell",-1)])]),hex:oe(()=>[...L[22]||(L[22]=[o("code",null,"F12E6",-1)])]),_:1}),o("p",Xk,d(a(c)("editor.alerts.icons.handy")),1),o("div",Zk,[(g(!0),_(q,null,me(t.value.suggested_icons,M=>(g(),_("button",{key:M.name,type:"button",class:"chip",onClick:Y=>a(Lt)(M.name,void 0,"icon_name")},[o("span",e3,d(a(Ae)(M.cp)),1),o("code",null,d(M.name),1)],8,Qk))),128))]),o("div",t3,[o("label",n3,d(a(c)("editor.alerts.icons.search_label")),1),Ee(o("input",{id:"alerts-icon-search","onUpdate:modelValue":L[12]||(L[12]=M=>h.value=M),type:"search",placeholder:a(c)("editor.alerts.icons.search"),autocomplete:"off"},null,8,s3),[[Xe,h.value]])]),o("div",i3,[(g(!0),_(q,null,me(S.value,M=>(g(),_("div",{key:M.label,class:"field"},[o("p",o3,d(M.label)+" · "+d(M.icons.length),1),o("div",l3,[(g(!0),_(q,null,me(M.icons,Y=>(g(),_("button",{key:Y.name,type:"button",class:"alert-icon",title:a(c)("editor.alerts.icons.copy",{name:Y.name}),onClick:te=>a(Lt)(Y.name,void 0,"icon_name")},[o("span",r3,d(a(Ae)(Y.cp)),1),o("code",null,d(Y.name),1),Y.label?(g(),_("small",c3,d(Y.label),1)):W("",!0)],8,a3))),128))])]))),128)),S.value.length?W("",!0):(g(),_("p",u3,d(a(c)("editor.alerts.icons.none",{query:h.value,fallback:t.value.fallback_icon})),1))])]),o("section",d3,[o("h2",null,d(a(c)("editor.alerts.nav.colors")),1),se(D,{keypath:"editor.alerts.colors.text",tag:"p",scope:"global"},{field:oe(()=>[...L[23]||(L[23]=[o("code",null,"color",-1)])]),_:1}),o("div",f3,[o("button",{type:"button",class:"swatch",onClick:L[13]||(L[13]=M=>a(Lt)("",void 0,"empty_color"))},[L[25]||(L[25]=o("i",{style:{background:"#ffffff"}},null,-1)),o("span",null,[L[24]||(L[24]=o("code",null,"empty",-1)),o("small",null,d(a(c)("editor.alerts.white")),1)])]),(g(!0),_(q,null,me(t.value.colors,M=>(g(),_("button",{key:M.name,type:"button",class:"swatch",onClick:Y=>a(Lt)(M.name,void 0,"color_name")},[o("i",{style:Ue({background:M.color})},null,4),o("span",null,[o("code",null,d(M.name),1),o("small",null,d(M.label)+" · "+d(M.color),1)])],8,p3))),128))])]),o("section",h3,[o("h2",null,d(a(c)("editor.alerts.nav.behaviour")),1),o("ul",m3,[se(D,{keypath:"editor.alerts.behaviour.wakes",tag:"li",scope:"global"},{bold:oe(()=>[o("b",null,d(a(c)("editor.alerts.behaviour.wakes_bold")),1)]),_:1}),se(D,{keypath:"editor.alerts.behaviour.on",tag:"li",scope:"global"},{bold:oe(()=>[o("b",null,d(a(c)("editor.alerts.behaviour.on_bold")),1)]),_:1}),se(D,{keypath:"editor.alerts.behaviour.timeout",tag:"li",scope:"global"},{bold:oe(()=>[o("b",null,d(a(c)("editor.alerts.behaviour.timeout_bold")),1)]),zero:oe(()=>[...L[26]||(L[26]=[o("code",null,"timeout: 0",-1)])]),minute:oe(()=>[...L[27]||(L[27]=[o("code",null,"timeout: 60",-1)])]),_:1}),se(D,{keypath:"editor.alerts.behaviour.blinking",tag:"li",scope:"global"},{bold:oe(()=>[o("b",null,d(a(c)("editor.alerts.behaviour.blinking_bold")),1)]),flash:oe(()=>[...L[28]||(L[28]=[o("code",null,"flash: true",-1)])]),_:1}),se(D,{keypath:"editor.alerts.behaviour.replacing",tag:"li",scope:"global"},{bold:oe(()=>[o("b",null,d(a(c)("editor.alerts.behaviour.replacing_bold")),1)]),replaced:oe(()=>[...L[29]||(L[29]=[o("code",null,"replaced",-1)])]),_:1}),se(D,{keypath:"editor.alerts.behaviour.closing",tag:"li",scope:"global"},{bold:oe(()=>[o("b",null,d(a(c)("editor.alerts.behaviour.closing_bold")),1)]),dismiss:oe(()=>[...L[30]||(L[30]=[o("code",null,"dismiss_alert",-1)])]),_:1}),se(D,{keypath:"editor.alerts.behaviour.beside",tag:"li",scope:"global"},{bold:oe(()=>[o("b",null,d(a(c)("editor.alerts.behaviour.beside_bold")),1)]),_:1})])]),o("section",b3,[o("h2",null,d(a(c)("editor.alerts.nav.events")),1),se(D,{keypath:"editor.alerts.events.text",tag:"p",scope:"global"},{event:oe(()=>[o("code",v3,d(t.value.event),1)]),action:oe(()=>[...L[31]||(L[31]=[o("code",null,"action",-1)])]),title:oe(()=>[...L[32]||(L[32]=[o("code",null,"title",-1)])]),screen:oe(()=>[...L[33]||(L[33]=[o("code",null,"screen",-1)])]),device_id:oe(()=>[...L[34]||(L[34]=[o("code",null,"device_id",-1)])]),_:1}),o("div",g3,[o("table",_3,[o("tr",null,[L[35]||(L[35]=o("th",null,"action",-1)),o("th",null,d(a(c)("editor.alerts.events.when")),1)]),(g(!0),_(q,null,me(t.value.endings,M=>(g(),_("tr",{key:M.action},[o("td",null,[o("code",null,d(M.action),1)]),o("td",null,d(M.label),1)]))),128))])]),o("p",y3,d(a(c)("editor.alerts.events.wait")),1),o("div",w3,[o("pre",k3,d(k.value),1),o("button",{type:"button",class:"btn quiet mini",id:"alerts-wait-copy",onClick:L[14]||(L[14]=M=>a(Lt)(k.value,void 0,"yaml"))},d(a(c)("editor.alerts.copy_yaml")),1)])]),o("section",$3,[o("h2",null,d(a(c)("editor.alerts.nav.tips")),1),o("ul",x3,[se(D,{keypath:"editor.alerts.tips.color",tag:"li",scope:"global"},{bold:oe(()=>[o("b",null,d(a(c)("editor.alerts.tips.color_bold")),1)]),_:1}),se(D,{keypath:"editor.alerts.tips.short",tag:"li",scope:"global"},{bold:oe(()=>[o("b",null,d(a(c)("editor.alerts.tips.short_bold")),1)]),_:1}),se(D,{keypath:"editor.alerts.tips.button",tag:"li",scope:"global"},{bold:oe(()=>[o("b",null,d(a(c)("editor.alerts.tips.button_bold")),1)]),_:1}),se(D,{keypath:"editor.alerts.tips.resolve",tag:"li",scope:"global"},{dismiss:oe(()=>[...L[36]||(L[36]=[o("code",null,"dismiss_alert",-1)])]),_:1}),se(D,{keypath:"editor.alerts.tips.every",tag:"li",scope:"global"},{event:oe(()=>[o("code",null,d(t.value.broadcast?.show||"esp_screens_show_alert"),1)]),screen:oe(()=>[...L[37]||(L[37]=[o("code",null,"screen",-1)])]),_:1}),se(D,{keypath:"editor.alerts.tips.claude",tag:"li",scope:"global"},{bold:oe(()=>[o("b",null,d(a(c)("editor.alerts.tips.claude_bold")),1)]),_:1})])])],64)):(g(),_("p",zw,d(a(c)("editor.alerts.loading")),1))])}}}),C3={class:"panel",id:"override-dialog"},T3={class:"panel-head"},E3={class:"tx"},A3={class:"eyebrow"},P3={id:"override-title"},O3={class:"notice"},I3={class:"mdi"},L3={class:"file-row"},M3={id:"override-file"},R3={class:"yaml-editor",id:"yaml-editor-wrap"},N3=["aria-label"],F3={class:"actions"},D3={id:"override-count",class:"hint"},U3={class:"actions"},j3=["disabled"],H3=["disabled"],V3=`# Hardware-specific changes for this screen.
|
||
# This file is kept when the shared firmware package updates.
|
||
# Do not add esphome:, api:, ota:, wifi: or packages: here.
|
||
|
||
# Example: a CYD with the ST7789V display controller.
|
||
# "!extend" changes the display the shared package already defines;
|
||
# a bare id would add a second, incomplete display and fail the build.
|
||
display:
|
||
- id: !extend my_display
|
||
model: ST7789V
|
||
`,W3=Le({__name:"OverrideView",setup(e){const t=$(()=>m.overrideProfile),n=$e(""),s=$e(""),i=$e(!1),l=$e(c("editor.common.loading")),r=$e(""),u=$e(!1),f=$e(null),h=$e(null),p=$(()=>n.value.split(`
|
||
`).length),b=$(()=>Array.from({length:p.value},(O,E)=>E+1).join(`
|
||
`)),v=$(()=>`${c("editor.override.characters",n.value.length)} · ${c("editor.override.lines",p.value)}`);let y=!0;function I(O,E=""){l.value=O,r.value=E}async function T(){if(!t.value){I(c("editor.override.no_profile"),"error");return}I(c("editor.common.loading"));try{const O=await Ft(`firmware/profiles/${encodeURIComponent(t.value)}/override`);s.value=O.override_file,i.value=!!O.attached,n.value=O.exists&&O.content!==`{}
|
||
`?O.content:"",I(c(O.attached?"editor.override.attached":"editor.override.not_attached"))}catch(O){I(O.message,"error")}}async function k(O=!1){if(!(!t.value||u.value)){u.value=!0,I(c("editor.override.saving"));try{const E=await ft(`firmware/profiles/${encodeURIComponent(t.value)}/override`,"PUT",{content:n.value});if(s.value=E.override_file,i.value=!0,!O){I(c("editor.override.saved"),"ok"),Ce(c("editor.override.saved_toast"));return}I(c("editor.override.checking")),await ft("firmware/jobs","POST",{file:t.value,action:"validate"}),A()}catch(E){I(E.message,"error")}finally{u.value=!1}}}function A(){const O=Date.now(),E=t.value,R=async()=>{if(!(!y||t.value!==E))try{const L=await Ft("firmware"),D=L.job;if(D&&D.file===E&&D.state==="running")I(D.stage?c("editor.override.checking_stage",{stage:D.stage}):c("editor.override.checking_profile"));else if(D&&D.file===E&&D.state==="success"){I(c("editor.override.valid"),"ok");return}else if(D&&D.file===E&&D.state==="failed"){const M=(L.logs||[]).filter(Y=>/error|failed/i.test(Y)).pop();I(M||c("editor.override.rejected"),"error");return}Date.now()-O<72e5&&setTimeout(R,1200)}catch(L){I(L.message,"error")}};R()}function S(){(!n.value.trim()||confirm(c("editor.override.confirm_example")))&&(n.value=V3,I(c("editor.override.example_loaded")),f.value?.focus())}function U(){(!n.value.trim()||confirm(c("editor.override.confirm_clear")))&&(n.value="",I(c("editor.override.cleared")),f.value?.focus())}function C(O){const E=f.value;if(O.key==="Tab"){O.preventDefault();const R=E.selectionStart,L=E.selectionEnd;E.setRangeText(" ",R,L,"end"),n.value=E.value}else(O.ctrlKey||O.metaKey)&&O.key.toLowerCase()==="s"&&(O.preventDefault(),k(!1))}function K(){h.value&&f.value&&(h.value.scrollTop=f.value.scrollTop)}return An(T),rs(()=>{y=!1}),(O,E)=>(g(),_("div",C3,[o("div",T3,[o("div",E3,[o("span",A3,d(a(c)("editor.override.eyebrow")),1),o("h1",P3,d(a(m).overrideFriendly?a(c)("editor.override.title_named",{name:a(m).overrideFriendly}):a(c)("editor.override.title")),1),o("p",null,d(a(c)("editor.override.intro")),1)]),o("button",{type:"button",class:"btn quiet",id:"close-override",onClick:E[0]||(E[0]=R=>a(He)(""))},d(a(c)("editor.common.back")),1)]),o("div",O3,[o("span",I3,d(a(Ae)("F0493")),1),o("div",null,[o("strong",null,d(a(c)("editor.override.safe_title")),1),o("span",null,d(a(c)("editor.override.safe_text")),1)])]),o("div",L3,[o("code",M3,d(s.value||t.value||""),1),o("span",{id:"override-state",class:he(["chip",{good:i.value}])},d(i.value?a(c)("editor.override.active"):a(c)("editor.override.ready")),3)]),o("div",R3,[o("div",{ref_key:"gutter",ref:h,class:"yaml-gutter",id:"override-gutter","aria-hidden":"true"},d(b.value),513),Ee(o("textarea",{ref_key:"editor",ref:f,id:"override-editor","onUpdate:modelValue":E[1]||(E[1]=R=>n.value=R),spellcheck:"false",autocapitalize:"off",autocomplete:"off",autocorrect:"off","aria-label":a(c)("editor.override.editor_label"),placeholder:`# Example
|
||
display:
|
||
- id: !extend my_display
|
||
model: ST7789V`,onKeydown:C,onScroll:K},null,40,N3),[[Xe,n.value]])]),o("div",F3,[o("button",{type:"button",class:"btn quiet mini",id:"override-example",onClick:S},d(a(c)("editor.override.use_example")),1),o("button",{type:"button",class:"btn quiet mini",id:"override-empty",onClick:U},d(a(c)("editor.override.clear")),1),o("span",D3,d(v.value),1)]),o("p",{id:"override-status",class:he(["status-line",r.value]),role:"status"},d(l.value),3),o("div",U3,[o("button",{type:"button",class:"btn quiet",id:"override-check",disabled:u.value||!t.value,onClick:E[2]||(E[2]=R=>k(!0))},d(a(c)("editor.override.save_check")),9,j3),o("button",{type:"button",class:"btn primary",id:"override-save",disabled:u.value||!t.value,onClick:E[3]||(E[3]=R=>k(!1))},d(a(c)("editor.override.save")),9,H3)])]))}}),B3={class:"main"},K3=Le({__name:"App",setup(e){const t=$(()=>xt.value==="#settings"?b2:xt.value==="#new-screen"?fw:xt.value==="#firmware"?Hw:xt.value==="#alerts"?S3:xt.value==="#override"?W3:yt.value&&m.layout?g1:w1);function n(s){(s.metaKey||s.ctrlKey)&&s.key.toLowerCase()==="k"&&(s.preventDefault(),m.palette=!m.palette)}return An(()=>document.addEventListener("keydown",n)),rs(()=>document.removeEventListener("keydown",n)),(s,i)=>(g(),_("div",{class:he(["app",{dragging:a(m).drag.active}])},[se(Ib),o("main",B3,[(g(),it(Hd(t.value)))]),se(Mb),se(zb)],2))}});Jh().finally(()=>{ip(K3).use(cs).mount("#app"),Jm()});
|