import{d as _,a as c,a9 as o,aa as n,T as y,a6 as k,u as h,ac as m,a7 as p,a8 as f}from"./app-CPb3bToC.js";const N=_("model_kb_by_v2_keys",{state:()=>({keys:[],macros:[],layers:[],current_layer:0,product_name:""}),actions:{reset(){const r=c();if(!r.current_device)return null;let e=o(),s=[];for(let t=0;tthis.macros.length-1&&(a=0),this.macros.length===0){let u=m(0,Number(this.keys[t].pos-8));this.keys[t].name=u.name,this.keys[t].value=u.value,this.keys[t].type=y.BASIC;continue}let l=JSON.parse(JSON.stringify(this.macros[a]));this.keys[t].name=l.name,this.keys[t].value=JSON.parse(JSON.stringify(l)),this.keys[t].type="macro"}else{let a=0;a+=s[i+0]*Math.pow(256,3),a+=s[i+1]*Math.pow(256,2),a+=s[i+2]*Math.pow(256,1),a+=s[i+3]*Math.pow(256,0),this.keys[t].value="0x"+p(a,8);const l=f(this.keys[t].value);try{this.keys[t].name=l.name,this.keys[t].type=l.type,a===0&&(this.keys[t].name="")}catch{a===0&&(this.keys[t].name="");continue}}}return this._sync_data_to_device(),!0}catch{return!1}},async fetch_custom_light(){try{const s=await(await h().controller).get_custom_light();for(let t=0;t