platypush/platypush/backend/http/webapp/dist/static/js/6062.20e624e0.js

2 lines
29 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[6062],{3222:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var a=n(6252),s=n(3577);const l={class:"no-items-container"};function i(e,t,n,i,o,r){return(0,a.wg)(),(0,a.iD)("div",l,[(0,a._)("div",{class:(0,s.C_)(["no-items fade-in",{shadow:n.withShadow}])},[(0,a.WI)(e.$slots,"default",{},void 0,!0)],2)])}var o={name:"NoItems",props:{withShadow:{type:Boolean,default:!0}}},r=n(3744);const c=(0,r.Z)(o,[["render",i],["__scopeId","data-v-4856c4d7"]]);var u=c},4558:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return f}});var a=n(6252),s=n(3577),l=n(9963);const i={key:0,class:"children fade-in"};function o(e,t,n,o,r,c){const u=(0,a.up)("Entity",!0);return(0,a.wg)(),(0,a.iD)("div",{class:(0,s.C_)(["entity-container-wrapper",{"with-children":c.hasChildren,collapsed:c.isCollapsed,hidden:!e.value?.name?.length}])},[(0,a._)("div",{class:(0,s.C_)(["row item entity-container",{"with-children":c.hasChildren,collapsed:c.isCollapsed,blink:r.justUpdated}])},[(0,a._)("div",{class:(0,s.C_)(["adjuster",{"with-children":c.hasChildren}])},[((0,a.wg)(),(0,a.j4)((0,a.LL)(r.component),{value:e.value,parent:e.parent,children:e.children,loading:e.loading,ref:"instance",error:e.error||0==e.value?.reachable,onClick:c.onClick,onInput:t[0]||(t[0]=t=>e.$emit("input",t)),onLoading:t[1]||(t[1]=t=>e.$emit("loading",t))},null,40,["value","parent","children","loading","error","onClick"]))],2),c.hasChildren?((0,a.wg)(),(0,a.iD)("div",{key:0,class:"col-1 collapse-toggler",onClick:t[2]||(t[2]=(0,l.iM)(((...e)=>c.toggleCollapsed&&c.toggleCollapsed(...e)),["stop"]))},[(0,a._)("i",{class:(0,s.C_)(["fas",{"fa-chevron-down":c.isCollapsed,"fa-chevron-up":!c.isCollapsed}])},null,2)])):(0,a.kq)("",!0)],2),c.hasChildren&&!c.isCollapsed?((0,a.wg)(),(0,a.iD)("div",i,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.children,(n=>((0,a.wg)(),(0,a.iD)("div",{class:"child",key:n.id},[(0,a.Wm)(u,{value:n,parent:e.value,children:c.childrenByParentId(n.id),loading:e.loading,level:e.level+1,onShowModal:t[3]||(t[3]=t=>e.$emit("show-modal",t)),onInput:t=>e.$emit("input",n)},null,8,["value","parent","children","loading","level","onInput"])])))),128))])):(0,a.kq)("",!0)],2)}var r=n(2262),c=n(847),u=n(5250),d={name:"Entity",mixins:[c["default"]],emits:["input","loading","update","show-modal"],data(){return{component:null,justUpdated:!1}},computed:{hasChildren(){return!!Object.keys(this.children||{}).length},isCollapsed(){return!this.hasChildren||this.collapsed},instance(){return this.$refs.instance}},methods:{valuesEqual(e,t){e={...e},t={...t};for(const n of["updated_at","data"])delete e[n],delete t[n];return this.objectsEqual(e,t)},childrenByParentId(e){const t=this.allEntities?.[e];return t?(t.children_ids||[]).reduce(((e,t)=>{const n=this.allEntities[t];return n&&!n.is_configuration&&(e[n.id]=n),e}),{}):{}},onClick(e){e.stopPropagation(),e.target.classList.contains("label")||e.target.classList.contains("head")?this.toggleCollapsed():this.$emit("show-modal",this.value.id)},onEntityUpdate(e){const t=e?.id,n=null!=t&&this.children&&t in this.children;n&&this.notifyUpdate()},toggleCollapsed(){this.collapsed=!this.collapsed,this.instance&&(this.instance.collapsed=!this.instance.collapsed)},notifyUpdate(){this.justUpdated=!0;const e=this;setTimeout((()=>e.justUpdated=!1),1e3)}},mounted(){if("Entity"!==this.type){const e=this.type.split("_").map((e=>e[0].toUpperCase()+e.slice(1))).join("");this.$watch((()=>this.value),((e,t)=>{if(this.valuesEqual(t,e))return!1;this.notifyUpdate(),this.$emit("update",{value:e})})),this.component=(0,r.XI)((0,a.RC)((()=>n(7243)(`./${e}`))))}u.$.onEntity(this.onEntityUpdate)}},m=n(3744);const p=(0,m.Z)(d,[["render",o],["__scopeId","data-v-7b0732e4"]]);var f=p},4967:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return f}});var a=n(6252),s=n(3577);const l=["title"],i={key:0,class:"fas fa-spinner fa-spin loading"},o={key:1,class:"fas fa-circle-exclamation error"};function r(e,t,n,r,c,u){const d=(0,a.up)("Icon");return(0,a.wg)(),(0,a.iD)("div",{class:(0,s.C_)(["entity-icon-container",{"with-color-fill":!!u.colorFill}]),title:e.prettify(n.entity.type||""),style:(0,s.j5)(u.colorFillStyle)},[n.loading?((0,a.wg)(),(0,a.iD)("i",i)):n.error?((0,a.wg)(),(0,a.iD)("i",o)):((0,a.wg)(),(0,a.j4)(d,(0,s.vs)((0,a.dG)({key:2},u.computedIconNormalized)),null,16))],14,l)}var c=n(657),u=n(8637),d={name:"EntityIcon",components:{Icon:c.Z},mixins:[u.Z],props:{loading:{type:Boolean,default:!1},error:{type:Boolean,default:!1},entity:{type:Object,required:!0},icon:{type:Object,default:()=>{}},hasColorFill:{type:Boolean,default:!1}},data(){return{component:null,modalVisible:!1}},computed:{computedIcon(){let e={...this.entity?.meta?.icon||{}};return Object.keys(this.icon||{}).length&&(e=this.icon),{...e}},colorFill(){return this.hasColorFill&&this.computedIcon.color},colorFillStyle(){return this.colorFill&&!this.error?{background:this.colorFill}:{}},computedIconNormalized(){const e={...this.computedIcon};return this.colorFill&&delete e.color,e},type(){let e=this.entity.type||"";return e.charAt(0).toUpperCase()+e.slice(1)}}},m=n(3744);const p=(0,m.Z)(d,[["render",r],["__scopeId","data-v-49689016"]]);var f=p},847:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return i}});var a=n(8637),s={name:"EntityMixin",mixins:[a.Z],emits:["input","loading"],props:{loading:{type:Boolean,default:!1},error:{type:Boolean,default:!1},value:{type:Object,required:!0},parent:{type:Object,default:()=>{}},children:{type:Object,default:()=>{}},allEntities:{type:Object,default:()=>{}},level:{type:Number,default:0}},data(){return{modalVisible:!1,collapsed:!0}},computed:{type(){let e=this.value.type||"";return e.split("_").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join("")}}};const l=s;var i=l},1999:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return st}});var a=n(6252),s=n(3577),l=n(9963);const i=e=>((0,a.dD)("data-v-6fce01a8"),e=e(),(0,a.Cn)(),e),o=i((()=>(0,a._)("b",null,"sure",-1))),r=i((()=>(0,a._)("br",null,null,-1))),c=i((()=>(0,a._)("br",null,null,-1))),u=i((()=>(0,a._)("br",null,null,-1))),d=i((()=>(0,a._)("br",null,null,-1))),m={class:"table-row"},p={class:"title"},f={class:"value"},h=["textContent"],v={class:"table-row"},y={class:"title"},_={class:"value icon-canvas"},g={key:0,class:"icon-editor"},S=i((()=>(0,a._)("i",{class:"fas fa-rotate-left"},null,-1))),w=[S],C=i((()=>(0,a._)("span",{class:"help"},[(0,a.Uk)(" Supported: image URLs or "),(0,a._)("a",{href:"https://fontawesome.com/icons",target:"_blank"},"FontAwesome icon classes"),(0,a.Uk)(". ")],-1))),k={class:"table-row"},b=i((()=>(0,a._)("div",{class:"title"}," Icon color ",-1))),I={class:"value icon-color-picker"},x=["value"],D=i((()=>(0,a._)("i",{class:"fas fa-rotate-left"},null,-1))),E=[D],j={class:"table-row"},q=i((()=>(0,a._)("div",{class:"title"},"Plugin",-1))),U=["textContent"],B={class:"table-row"},M=i((()=>(0,a._)("div",{class:"title"},"Internal ID",-1))),$=["textContent"],A={key:0,class:"table-row"},N=i((()=>(0,a._)("div",{class:"title"},"External ID",-1))),O=["textContent"],F={key:1,class:"table-row"},P=i((()=>(0,a._)("div",{class:"title"},"Description",-1))),W=["textContent"],T={key:2,class:"table-row"},z=i((()=>(0,a._)("div",{class:"title"},"External URL",-1))),L={class:"value url"},V=["href","text"],Z={key:3,class:"table-row"},H=i((()=>(0,a._)("div",{class:"title"},"Image",-1))),R={class:"value"},K=["src"],Y={key:4,class:"table-row"},Q=i((()=>(0,a._)("div",{class:"title"},"Parent",-1))),G={class:"value"},J=["textContent"],X={key:5,class:"table-row"},ee=i((()=>(0,a._)("div",{class:"title"},"Created at",-1))),te=["textContent"],ne={key:6,class:"table-row"},ae=i((()=>(0,a._)("div",{class:"title"},"Updated at",-1))),se=["textContent"],le=i((()=>(0,a._)("div",{class:"title"},"Delete Entity",-1))),ie={class:"value"},oe=i((()=>(0,a._)("i",{class:"fas fa-trash"},null,-1))),re=[oe],ce={key:7,class:"section children-container"},ue=i((()=>(0,a._)("div",{class:"col-11"},[(0,a._)("i",{class:"fas fa-sitemap"}),(0,a.Uk)("   Children ")],-1))),de={class:"col-1 pull-right"},me={key:0,class:"children-container-info"},pe={class:"title"},fe={class:"value"},he=["onClick","textContent"],ve={class:"section extra-info-container"},ye=i((()=>(0,a._)("div",{class:"col-11"},[(0,a._)("i",{class:"fas fa-circle-info"}),(0,a.Uk)("   Extra Info ")],-1))),_e={class:"col-1 pull-right"},ge={key:0,class:"extra-info"},Se={key:0,class:"table-row"},we=["textContent"],Ce=["textContent"],ke={key:0,class:"table-row"},be=["textContent"],Ie=["textContent"],xe={key:8,class:"section config-container"},De=i((()=>(0,a._)("div",{class:"col-11"},[(0,a._)("i",{class:"fas fa-screwdriver-wrench"}),(0,a.Uk)("   Configuration ")],-1))),Ee={class:"col-1 pull-right"},je={key:0,class:"entities"};function qe(e,t,n,i,S,D){const oe=(0,a.up)("ConfirmDialog"),qe=(0,a.up)("EditButton"),Ue=(0,a.up)("NameEditor"),Be=(0,a.up)("Icon"),Me=(0,a.up)("EntityIcon"),$e=(0,a.up)("Entity"),Ae=(0,a.up)("Modal",!0);return n.entity?((0,a.wg)(),(0,a.j4)(Ae,{key:0,visible:n.visible,class:"entity-modal",title:n.entity.name||n.entity.external_id},{default:(0,a.w5)((()=>[(0,a.Wm)(oe,{ref:"deleteConfirmDiag",title:"Confirm entity deletion",onInput:D.onDelete},{default:(0,a.w5)((()=>[(0,a.Uk)(" Are you "),o,(0,a.Uk)(" that you want to delete this entity? "),r,c,(0,a.Uk)(" Note: you should only delete an entity if its plugin has been disabled or the entity is no longer reachable."),u,d,(0,a.Uk)(" Otherwise, the entity will simply be created again upon the next scan. ")])),_:1},8,["onInput"]),(0,a._)("div",m,[(0,a._)("div",p,[(0,a.Uk)(" Name "),S.editName?(0,a.kq)("",!0):((0,a.wg)(),(0,a.j4)(qe,{key:0,onClick:t[0]||(t[0]=e=>S.editName=!0)}))]),(0,a._)("div",f,[S.editName?((0,a.wg)(),(0,a.j4)(Ue,{key:0,value:n.entity.name,onInput:D.onRename,onCancel:t[1]||(t[1]=e=>S.editName=!1),disabled:S.loading},null,8,["value","onInput","disabled"])):((0,a.wg)(),(0,a.iD)("span",{key:1,textContent:(0,s.zw)(n.entity.name)},null,8,h))])]),(0,a._)("div",v,[(0,a._)("div",y,[(0,a.Uk)(" Icon "),S.editIcon?(0,a.kq)("",!0):((0,a.wg)(),(0,a.j4)(qe,{key:0,onClick:t[2]||(t[2]=e=>S.editIcon=!0)}))]),(0,a._)("div",_,[S.editIcon?((0,a.wg)(),(0,a.iD)("span",g,[(0,a.Wm)(Ue,{value:n.entity.meta?.icon?.class||n.entity.meta?.icon?.url,onInput:D.onIconEdit,onCancel:t[5]||(t[5]=e=>S.editIcon=!1),disabled:S.loading},{default:(0,a.w5)((()=>[(0,a._)("button",{type:"button",title:"Reset",onClick:t[3]||(t[3]=e=>D.onIconEdit(null)),onTouch:t[4]||(t[4]=e=>D.onIconEdit(null))},w,32)])),_:1},8,["value","onInput","disabled"]),C])):((0,a.wg)(),(0,a.j4)(Be,(0,s.vs)((0,a.dG)({key:1},n.entity?.meta?.icon||{})),null,16))])]),(0,a._)("div",k,[b,(0,a._)("div",I,[(0,a._)("input",{type:"color",value:n.entity.meta?.icon?.color,onChange:t[6]||(t[6]=(...e)=>D.onIconColorEdit&&D.onIconColorEdit(...e))},null,40,x),(0,a._)("button",{type:"button",title:"Reset",onClick:t[7]||(t[7]=e=>D.onIconColorEdit(null)),onTouch:t[8]||(t[8]=e=>D.onIconColorEdit(null))},E,32)])]),(0,a._)("div",j,[q,(0,a._)("div",{class:"value",textContent:(0,s.zw)(n.entity.plugin)},null,8,U)]),(0,a._)("div",B,[M,(0,a._)("div",{class:"value",textContent:(0,s.zw)(n.entity.id)},null,8,$)]),n.entity.external_id?((0,a.wg)(),(0,a.iD)("div",A,[N,(0,a._)("div",{class:"value",textContent:(0,s.zw)(n.entity.external_id)},null,8,O)])):(0,a.kq)("",!0),n.entity.description?((0,a.wg)(),(0,a.iD)("div",F,[P,(0,a._)("div",{class:"value",textContent:(0,s.zw)(n.entity.description)},null,8,W)])):(0,a.kq)("",!0),n.entity.external_url?((0,a.wg)(),(0,a.iD)("div",T,[z,(0,a._)("div",L,[(0,a._)("a",{href:n.entity.external_url,target:"_blank",text:n.entity.external_url},null,8,V)])])):(0,a.kq)("",!0),n.entity.image_url?((0,a.wg)(),(0,a.iD)("div",Z,[H,(0,a._)("div",R,[(0,a._)("img",{class:"entity-image",src:n.entity.image_url},null,8,K)])])):(0,a.kq)("",!0),n.parent?((0,a.wg)(),(0,a.iD)("div",Y,[Q,(0,a._)("div",G,[(0,a._)("a",{class:"url",onClick:t[9]||(t[9]=t=>e.$emit("entity-update",n.parent.id)),textContent:(0,s.zw)(n.parent.name)},null,8,J)])])):(0,a.kq)("",!0),n.entity.created_at?((0,a.wg)(),(0,a.iD)("div",X,[ee,(0,a._)("div",{class:"value",textContent:(0,s.zw)(e.formatDateTime(n.entity.created_at))},null,8,te)])):(0,a.kq)("",!0),n.entity.updated_at?((0,a.wg)(),(0,a.iD)("div",ne,[ae,(0,a._)("div",{class:"value",textContent:(0,s.zw)(e.formatDateTime(n.entity.updated_at))},null,8,se)])):(0,a.kq)("",!0),(0,a._)("div",{class:"table-row delete-entity-container",onClick:t[11]||(t[11]=t=>e.$refs.deleteConfirmDiag.show())},[le,(0,a._)("div",ie,[(0,a._)("button",{onClick:t[10]||(t[10]=(0,l.iM)((t=>e.$refs.deleteConfirmDiag.show()),["stop"]))},re)])]),Object.keys(n.children||{}).length?((0,a.wg)(),(0,a.iD)("div",ce,[(0,a._)("div",{class:"title section-title",onClick:t[12]||(t[12]=e=>S.childrenCollapsed=!S.childrenCollapsed)},[ue,(0,a._)("div",de,[(0,a._)("i",{class:(0,s.C_)(["fas",{"fa-chevron-down":S.childrenCollapsed,"fa-chevron-up":!S.childrenCollapsed}])},null,2)])]),S.childrenCollapsed?(0,a.kq)("",!0):((0,a.wg)(),(0,a.iD)("div",me,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(n.children,(t=>((0,a.wg)(),(0,a.iD)("div",{class:(0,s.C_)(["table-row",{hidden:!t.name?.length||t.is_configuration}]),key:t.id},[(0,a._)("div",pe,[(0,a.Wm)(Me,{entity:n.entity,icon:n.entity.meta?.icon},null,8,["entity","icon"]),(0,a.Uk)("   "+(0,s.zw)(e.prettify(t.type)),1)]),(0,a._)("div",fe,[(0,a._)("a",{class:"url",onClick:n=>e.$emit("entity-update",t.id),textContent:(0,s.zw)(t.name)},null,8,he)])],2)))),128))]))])):(0,a.kq)("",!0),(0,a._)("div",ve,[(0,a._)("div",{class:"title section-title",onClick:t[13]||(t[13]=e=>S.extraInfoCollapsed=!S.extraInfoCollapsed)},[ye,(0,a._)("div",_e,[(0,a._)("i",{class:(0,s.C_)(["fas",{"fa-chevron-down":S.extraInfoCollapsed,"fa-chevron-up":!S.extraInfoCollapsed}])},null,2)])]),S.extraInfoCollapsed?(0,a.kq)("",!0):((0,a.wg)(),(0,a.iD)("div",ge,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(n.entity,((t,n)=>((0,a.wg)(),(0,a.iD)("div",{key:n},[null!=t&&S.specialFields.indexOf(n)<0?((0,a.wg)(),(0,a.iD)("div",Se,[(0,a._)("div",{class:"title",textContent:(0,s.zw)(e.prettify(n))},null,8,we),(0,a._)("div",{class:"value",textContent:(0,s.zw)(D.stringify(t))},null,8,Ce)])):(0,a.kq)("",!0)])))),128)),((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(n.entity.data||{},((t,n)=>((0,a.wg)(),(0,a.iD)("div",{key:n},[null!=t?((0,a.wg)(),(0,a.iD)("div",ke,[(0,a._)("div",{class:"title",textContent:(0,s.zw)(e.prettify(n))},null,8,be),(0,a._)("div",{class:"value",textContent:(0,s.zw)(D.stringify(t))},null,8,Ie)])):(0,a.kq)("",!0)])))),128))]))]),D.computedConfig.length?((0,a.wg)(),(0,a.iD)("div",xe,[(0,a._)("div",{class:"title section-title",onClick:t[14]||(t[14]=e=>S.configCollapsed=!S.configCollapsed)},[De,(0,a._)("div",Ee,[(0,a._)("i",{class:(0,s.C_)(["fas",{"fa-chevron-down":S.configCollapsed,"fa-chevron-up":!S.configCollapsed}])},null,2)])]),S.configCollapsed?(0,a.kq)("",!0):((0,a.wg)(),(0,a.iD)("div",je,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(D.computedConfig,(t=>((0,a.wg)(),(0,a.j4)($e,{key:t.id,value:t,onInput:n=>e.$emit("input",t)},null,8,["value","onInput"])))),128))]))])):(0,a.kq)("",!0)])),_:1},8,["visible","title"])):(0,a.kq)("",!0)}var Ue=n(3493),Be=n(657),Me=n(6936);const $e=e=>((0,a.dD)("data-v-3344f2bf"),e=e(),(0,a.Cn)(),e),Ae=$e((()=>(0,a._)("i",{class:"fas fa-pen-to-square"},null,-1))),Ne=[Ae];function Oe(e,t,n,s,l,i){return(0,a.wg)(),(0,a.iD)("button",{class:"edit-btn",onClick:t[0]||(t[0]=e=>i.proxy(e)),onTouch:t[1]||(t[1]=e=>i.proxy(e)),onInput:t[2]||(t[2]=e=>i.proxy(e))},Ne,32)}var Fe={emits:["input","click","touch"],methods:{proxy(e){this.$emit(e.type,e)}}},Pe=n(3744);const We=(0,Pe.Z)(Fe,[["render",Oe],["__scopeId","data-v-3344f2bf"]]);var Te=We,ze=n(4967);const Le=e=>((0,a.dD)("data-v-600cb1a8"),e=e(),(0,a.Cn)(),e),Ve=["disabled"],Ze=Le((()=>(0,a._)("button",{type:"submit"},[(0,a._)("i",{class:"fas fa-circle-check"})],-1))),He=Le((()=>(0,a._)("i",{class:"fas fa-ban"},null,-1))),Re=[He];function Ke(e,t,n,s,i,o){return(0,a.wg)(),(0,a.iD)("form",{onSubmit:t[3]||(t[3]=(0,l.iM)(((...e)=>o.submit&&o.submit(...e)),["prevent"])),class:"name-editor"},[(0,a.wy)((0,a._)("input",{type:"text","onUpdate:modelValue":t[0]||(t[0]=e=>i.text=e),disabled:n.disabled,ref:"input"},null,8,Ve),[[l.nr,i.text]]),Ze,(0,a._)("button",{class:"cancel",onClick:t[1]||(t[1]=t=>e.$emit("cancel")),onTouch:t[2]||(t[2]=t=>e.$emit("cancel"))},Re,32),(0,a.WI)(e.$slots,"default",{},void 0,!0)],32)}var Ye={emits:["input","cancel"],props:{value:{type:String},disabled:{type:Boolean,default:!1}},data(){return{text:null}},methods:{proxy(e){this.$emit(e.type,e)},submit(){return this.$emit("input",this.text),!1}},mounted(){this.text=this.value,this.$refs.input.focus()}};const Qe=(0,Pe.Z)(Ye,[["render",Ke],["__scopeId","data-v-600cb1a8"]]);var Ge=Qe,Je=n(8637),Xe=n(4558),et=n(7369);const tt=["created_at","data","description","external_id","external_url","id","image_url","is_configuration","meta","name","plugin","updated_at","parent_id"];var nt={name:"EntityModal",components:{Entity:Xe["default"],EntityIcon:ze["default"],Modal:Ue.Z,EditButton:Te,NameEditor:Ge,Icon:Be.Z,ConfirmDialog:Me.Z},mixins:[Je.Z],emits:["input","loading","entity-update"],props:{entity:{type:Object,required:!0},parent:{type:Object},children:{type:Object},visible:{type:Boolean,default:!1},configValues:{type:Object,default:()=>{}}},computed:{computedConfig(){return Object.values(this.configValues).sort(((e,t)=>(e.name||"").localeCompare(t.name||"")))}},data(){return{loading:!1,editName:!1,editIcon:!1,configCollapsed:!0,childrenCollapsed:!0,extraInfoCollapsed:!0,specialFields:tt}},methods:{async onRename(e){this.loading=!0;try{const t={};t[this.entity.id]=e,await this.request("entities.rename",t)}finally{this.loading=!1,this.editName=!1}},async onDelete(){this.loading=!0;try{await this.request("entities.delete",[this.entity.id])}finally{this.loading=!1}},async onIconEdit(e){this.loading=!0;try{const t={url:null,class:null};e?.length?e.startsWith("http")?t.url=e:t.class=e:(t.url=(et[this.entity.type]||{})?.icon?.url,t.class=(et[this.entity.type]||{})?.icon?.["class"]);const n={};n[this.entity.id]={icon:t},await this.request("entities.set_meta",n)}finally{this.loading=!1,this.editIcon=!1}},async onIconColorEdit(e){this.loading=!0;try{const t=this.entity.meta?.icon||{};t.color=e?e.target.value:null;const n={};n[this.entity.id]={icon:t},await this.request("entities.set_meta",n)}finally{this.loading=!1,this.editIcon=!1}},stringify(e){return null==e?"":Array.isArray(e)||"object"===typeof e?JSON.stringify(e,null,2):""+e}}};const at=(0,Pe.Z)(nt,[["render",qe],["__scopeId","data-v-6fce01a8"]]);var st=at},7243:function(e,t,n){var a={"./Accelerometer":[6362,9,3826,6362],"./Accelerometer.vue":[6362,9,3826,6362],"./Alarm":[472,9,7651,2844,2461,1807,9381,472],"./Alarm.vue":[472,9,7651,2844,2461,1807,9381,472],"./Alarm/AlarmEditor":[9381,9,7651,2844,2461,1807,9381],"./Alarm/AlarmEditor.vue":[9381,9,7651,2844,2461,1807,9381],"./Assistant":[5795,9,2844,5795],"./Assistant.vue":[5795,9,2844,5795],"./Battery":[7590,9,7590],"./Battery.vue":[7590,9,7590],"./BinarySensor":[8621,9,2844,8621],"./BinarySensor.vue":[8621,9,2844,8621],"./BluetoothDevice":[3835,9,2844,3835],"./BluetoothDevice.vue":[3835,9,2844,3835],"./BluetoothService":[984,9,2844,984],"./BluetoothService.vue":[984,9,2844,984],"./Button":[2893,9,3826,2893],"./Button.vue":[2893,9,3826,2893],"./CloudInstance":[8769,9,8769],"./CloudInstance.vue":[8769,9,8769],"./CompositeSensor":[6362,9,3826,6362],"./CompositeSensor.vue":[6362,9,3826,6362],"./ContactSensor":[8621,9,2844,8621],"./ContactSensor.vue":[8621,9,2844,8621],"./Cpu":[2460,9,2460],"./Cpu.vue":[2460,9,2460],"./CpuInfo":[3369,9,3369],"./CpuInfo.vue":[3369,9,3369],"./CpuStats":[8769,9,8769],"./CpuStats.vue":[8769,9,8769],"./CpuTimes":[2217,9,2217],"./CpuTimes.vue":[2217,9,2217],"./CurrentSensor":[6362,9,3826,6362],"./CurrentSensor.vue":[6362,9,3826,6362],"./Device":[8769,9,8769],"./Device.vue":[8769,9,8769],"./DewPointSensor":[6362,9,3826,6362],"./DewPointSensor.vue":[6362,9,3826,6362],"./Dimmer":[9461,9,7651,9461],"./Dimmer.vue":[9461,9,7651,9461],"./Disk":[8825,9,8825],"./Disk.vue":[8825,9,8825],"./DistanceSensor":[6362,9,3826,6362],"./DistanceSensor.vue":[6362,9,3826,6362],"./EnergySensor":[6362,9,3826,6362],"./EnergySensor.vue":[6362,9,3826,6362],"./Entity":[4558,9],"./Entity.vue":[4558,9],"./EntityIcon":[4967,9],"./EntityIcon.vue":[4967,9],"./EntityMixin":[847,9],"./EntityMixin.vue":[847,9],"./EnumSensor":[2893,9,3826,2893],"./EnumSensor.vue":[2893,9,3826,2893],"./EnumSwitch":[3368,9,3368],"./EnumSwitch.vue":[3368,9,3368],"./HeartRateSensor":[6362,9,3826,6362],"./HeartRateSensor.vue":[6362,9,3826,6362],"./HumiditySensor":[6362,9,3826,6362],"./HumiditySensor.vue":[6362,9,3826,6362],"./IlluminanceSensor":[6362,9,3826,6362],"./IlluminanceSensor.vue":[6362,9,3826,6362],"./Index":[7878,9,669,2154,7878],"./Index.vue":[7878,9,669,2154,7878],"./Light":[980,9,7651,2844,980],"./Light.vue":[980,9,7651,2844,980],"./LinkQuality":[3559,9,3559],"./LinkQuality.vue":[3559,9,3559],"./Magnetometer":[6362,9,3826,6362],"./Magnetometer.vue":[6362,9,3826,6362],"./MemoryStats":[5329,9,5329],"./MemoryStats.vue":[5329,9,5329],"./Modal":[1999,9],"./Modal.vue":[1999,9],"./MotionSensor":[6362,9,3826,6362],"./MotionSensor.vue":[6362,9,3826,6362],"./Muted":[8391,9,2844,8391],"./Muted.vue":[8391,9,2844,8391],"./NetworkInterface":[457,9,729],"./NetworkInterface.vue":[457,9,729],"./NumericSensor":[6362,9,3826,6362],"./NumericSensor.vue":[6362,9,3826,6362],"./PercentSensor":[169,9,169],"./PercentSensor.vue":[169,9,169],"./PingHost":[1706,9,1706],"./PingHost.vue":[1706,9,1706],"./PowerSensor":[6362,9,3826,6362],"./PowerSensor.vue":[6362,9,3826,6362],"./PresenceSensor":[8621,9,2844,8621],"./PresenceSensor.vue":[8621,9,2844,8621],"./PressureSensor":[6362,9,3826,6362],"./PressureSensor.vue":[6362,9,3826,6362],"./RawSensor":[6362,9,3826,6362],"./RawSensor.vue":[6362,9,3826,6362],"./Selector":[667,9,2154,667],"./Selector.vue":[667,9,2154,667],"./Sensor":[6362,9,3826,6362],"./Sensor.vue":[6362,9,3826,6362],"./StepsSensor":[6362,9,3826,6362],"./StepsSensor.vue":[6362,9,3826,6362],"./SwapStats":[5329,9,5329],"./SwapStats.vue":[5329,9,5329],"./Switch":[8391,9,2844,8391],"./Switch.vue":[8391,9,2844,8391],"./SystemBattery":[7590,9,7590],"./SystemBattery.vue":[7590,9,7590],"./SystemFan":[6362,9,3826,6362],"./SystemFan.vue":[6362,9,3826,6362],"./SystemTemperature":[6362,9,3826,6362],"./SystemTemperature.vue":[6362,9,3826,6362],"./TemperatureSensor":[6362,9,3826,6362],"./TemperatureSensor.vue":[6362,9,3826,6362],"./ThreeAxisSensor":[6362,9,3826,6362],"./ThreeAxisSensor.vue":[6362,9,3826,6362],"./TimeDuration":[6362,9,3826,6362],"./TimeDuration.vue":[6362,9,3826,6362],"./Variable":[6890,9,6324],"./Variable.vue":[6890,9,6324],"./VariableModal":[2106,9,669,2106],"./VariableModal.vue":[2106,9,669,2106],"./VoltageSensor":[6362,9,3826,6362],"./VoltageSensor.vue":[6362,9,3826,6362],"./Volume":[9461,9,7651,9461],"./Volume.vue":[9461,9,7651,9461],"./Weather":[8930,9,5906,8989,8930],"./Weather.vue":[8930,9,5906,8989,8930],"./WeatherForecast":[8498,9,5906,8989,8498],"./WeatherForecast.vue":[8498,9,5906,8989,8498],"./WeatherIcon":[3322,9,5906,3322],"./WeatherIcon.vue":[3322,9,5906,3322],"./WeightSensor":[6362,9,3826,6362],"./WeightSensor.vue":[6362,9,3826,6362],"./common.scss":[65,9,6561,65],"./meta":[7369,3],"./meta.json":[7369,3],"./vars.scss":[5207,9,6561,5207]};function s(e){if(!n.o(a,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=a[e],s=t[0];return Promise.all(t.slice(2).map(n.e)).then((function(){return n.t(s,16|t[1])}))}s.keys=function(){return Object.keys(a)},s.id=7243,e.exports=s},7369:function(e){"use strict";e.exports=JSON.parse('{"alarm":{"name":"Alarm","name_plural":"Alarms","icon":{"class":"fas fa-stopwatch"}},"assistant":{"name":"Assistant","name_plural":"Assistants","icon":{"class":"fas fa-microphone-lines"}},"battery":{"name":"Battery","name_plural":"Batteries","icon":{"class":"fas fa-battery-full"}},"weather":{"name":"Weather","name_plural":"Weather","icon":{"class":"fas fa-cloud-sun-rain"}},"weather_forecast":{"name":"Weather Forecast","name_plural":"Weather Forecast","icon":{"class":"fas fa-cloud-sun-rain"}},"button":{"name":"Button","name_plural":"Buttons","icon":{"class":"fas fa-circle-dot"}},"cpu_info":{"name":"System","name_plural":"System","icon":{"class":"fas fa-circle-info"}},"cpu_stats":{"name":"System","name_plural":"System","icon":{"class":"fas fa-gauge"}},"cpu_times":{"name":"System","name_plural":"System","icon":{"class":"fas fa-clock"}},"memory_stats":{"name":"System","name_plural":"System","icon":{"class":"fas fa-memory"}},"swap_stats":{"name":"System","name_plural":"System","icon":{"class":"fas fa-memory"}},"disk":{"name":"System","name_plural":"System","icon":{"class":"fas fa-hard-drive"}},"network_interface":{"name":"System","name_plural":"System","icon":{"class":"fas fa-ethernet"}},"system_temperature":{"name":"System","name_plural":"System","icon":{"class":"fas fa-temperature-half"}},"system_fan":{"name":"System","name_plural":"System","icon":{"class":"fas fa-fan"}},"system_battery":{"name":"System","name_plural":"System","icon":{"class":"fas fa-battery-full"}},"current_sensor":{"name":"Sensor","name_plural":"Sensors","icon":{"class":"fas fa-bolt"}},"cpu":{"name":"System","name_plural":"System","icon":{"class":"fas fa-microchip"}},"motion_sensor":{"name":"Sensor","name_plural":"Sensors","icon":{"class":"fas fa-person-running"}},"distance_sensor":{"name":"Sensor","name_plural":"Sensors","icon":{"class":"fas fa-ruler-horizontal"}},"bluetooth_device":{"name":"Device","name_plural":"Devices","icon":{"class":"fab fa-bluetooth-b"}},"cloud_instance":{"name":"Cloud Entity","name_plural":"Cloud Entities","icon":{"class":"fas fa-cloud"}},"bluetooth_service":{"name":"Service","name_plural":"Services","icon":{"class":"fas fa-satellite-dish"}},"accelerometer":{"name":"Sensor","name_plural":"Sensors","icon":{"class":"fas fa-up-down-left-right"}},"magnetometer":{"name":"Sensor","name_plural":"Sensors","icon":{"class":"fas fa-magnet"}},"device":{"name":"Device","name_plural":"Devices","icon":{"class":"fas fa-gear"}},"volume":{"name":"Dimmer","name_plural":"Dimmers","icon":{"class":"fas fa-volume-high"}},"dimmer":{"name":"Dimmer","name_plural":"Dimmers","icon":{"class":"fas fa-gauge"}},"energy_sensor":{"name":"Sensor","name_plural":"Sensors","icon":{"class":"fas fa-plug"}},"entity":{"name":"Entity","name_plural":"Entities","icon":{"class":"fas fa-circle-question"}},"humidity_sensor":{"name":"Sensor","name_plural":"Sensors","icon":{"class":"fas fa-droplet"}},"dew_point_sensor":{"name":"Sensor","name_plural":"Sensors","icon":{"class":"fas fa-hand-holding-droplet"}},"illuminance_sensor":{"name":"Sensor","name_plural":"Sensors","icon":{"class":"fas fa-sun"}},"light":{"name":"Light","name_plural":"Lights","icon":{"class":"fas fa-lightbulb"}},"contact_sensor":{"name":"Sensor","name_plural":"Sensors","icon":{"class":"far fa-hand"}},"presence_sensor":{"name":"Sensor","name_plural":"Sensors","icon":{"class":"fas fa-person"}},"weight_sensor":{"name":"Sensor","name_plural":"Sensors","icon":{"class":"fas fa-weight-scale"}},"link_quality":{"name":"Link Quality","name_plural":"Link Qualities","icon":{"class":"fas fa-tower-broadcast"}},"power_sensor":{"name":"Sensor","name_plural":"Sensors","icon":{"class":"fas fa-plug"}},"temperature_sensor":{"name":"Sensor","name_plural":"Sensors","icon":{"class":"fas fa-temperature-half"}},"steps_sensor":{"name":"Sensor","name_plural":"Sensors","icon":{"class":"fas fa-shoe-prints"}},"heart_rate_sensor":{"name":"Sensor","name_plural":"Sensors","icon":{"class":"fas fa-heart-pulse"}},"ping_host":{"name":"Host","name_plural":"Hosts","icon":{"class":"fas fa-server"}},"time_duration_sensor":{"name":"Sensor","name_plural":"Sensors","icon":{"class":"fas fa-clock"}},"pressure_sensor":{"name":"Sensor","name_plural":"Sensors","icon":{"class":"fas fa-gauge"}},"muted":{"name":"Switch","name_plural":"Switches","icon":{"class":"fas fa-volume-xmark"}},"enum_switch":{"name":"Switch","name_plural":"Switches","icon":{"class":"fas fa-gauge"}},"switch":{"name":"Switch","name_plural":"Switches","icon":{"class":"fas fa-toggle-on"}},"variable":{"name":"Variable","name_plural":"Variables","icon":{"class":"fas fa-square-root-variable"}},"voltage_sensor":{"name":"Sensor","name_plural":"Sensors","icon":{"class":"fas fa-car-battery"}},"composite_sensor":{"name":"Sensor","name_plural":"Sensors","icon":{"class":"fas fa-thermometer"}},"binary_sensor":{"name":"Sensor","name_plural":"Sensors","icon":{"class":"fas fa-thermometer"}},"numeric_sensor":{"name":"Sensor","name_plural":"Sensors","icon":{"class":"fas fa-thermometer"}},"percent_sensor":{"name":"Sensor","name_plural":"Sensors","icon":{"class":"fas fa-thermometer"}},"enum_sensor":{"name":"Sensor","name_plural":"Sensors","icon":{"class":"fas fa-thermometer"}},"raw_sensor":{"name":"Sensor","name_plural":"Sensors","icon":{"class":"fas fa-thermometer"}},"sensor":{"name":"Sensor","name_plural":"Sensors","icon":{"class":"fas fa-thermometer"}}}')}}]);
//# sourceMappingURL=6062.20e624e0.js.map