homebridge-config-ui-x 5.4.2-beta.6 → 5.4.2-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -0
- package/package.json +1 -1
- package/public/{chunk-UVPJPCIC.js → chunk-27YDRGYU.js} +1 -1
- package/public/{chunk-Q7DXBR75.js → chunk-2AOMAYLO.js} +1 -1
- package/public/{chunk-DX4QDVZI.js → chunk-2L22XQX2.js} +1 -1
- package/public/{chunk-YWZ5G5CC.js → chunk-456M2QQG.js} +1 -1
- package/public/{chunk-WYRNR7DL.js → chunk-4F3BAQ5O.js} +1 -1
- package/public/{chunk-NJV37DB5.js → chunk-4HFHNSTN.js} +1 -1
- package/public/{chunk-D6J76H5C.js → chunk-4NCLSTUB.js} +1 -1
- package/public/{chunk-W2ZTZMXD.js → chunk-6OUDSSXN.js} +1 -1
- package/public/{chunk-26MF6T4F.js → chunk-6V5YFV75.js} +1 -1
- package/public/{chunk-MFCXXWZH.js → chunk-6WJPBOPW.js} +1 -1
- package/public/{chunk-ICF4QWLG.js → chunk-7Q6VGFH2.js} +1 -1
- package/public/{chunk-XIC6ZDKX.js → chunk-7SEIUUE7.js} +1 -1
- package/public/{chunk-JPTC4WQA.js → chunk-7UI7QM4V.js} +1 -1
- package/public/{chunk-MXLNBEYU.js → chunk-AAAB34AQ.js} +1 -1
- package/public/{chunk-DZEONEP6.js → chunk-BMX3HHRX.js} +1 -1
- package/public/{chunk-YTBX4R7P.js → chunk-BWN7SS7H.js} +1 -1
- package/public/{chunk-HY5ODBRP.js → chunk-BZOIXE5M.js} +1 -1
- package/public/{chunk-5W4UDGVP.js → chunk-EQ64EQAS.js} +4 -4
- package/public/{chunk-ZIOEHRRL.js → chunk-FZEXQZ5N.js} +1 -1
- package/public/{chunk-JB4F2HHO.js → chunk-IA32PJPE.js} +1 -1
- package/public/{chunk-CZ4BSJG6.js → chunk-IENA5L67.js} +1 -1
- package/public/{chunk-KOLNEZ3H.js → chunk-J2JC6ZWM.js} +1 -1
- package/public/{chunk-ZAS225DL.js → chunk-JQJAMZI2.js} +1 -1
- package/public/{chunk-ISGUOEN7.js → chunk-JWMUHHT5.js} +1 -1
- package/public/{chunk-IMSICY7J.js → chunk-KCU6EMJC.js} +1 -1
- package/public/{chunk-AUSZSKSV.js → chunk-KJFP33AO.js} +1 -1
- package/public/{chunk-HLCKYR5L.js → chunk-KXDI62KE.js} +1 -1
- package/public/{chunk-7I4POOWO.js → chunk-M425JDIT.js} +1 -1
- package/public/{chunk-5AE6DPGP.js → chunk-MFTJIWVF.js} +1 -1
- package/public/{chunk-IJU3VSN3.js → chunk-NORLI5CD.js} +1 -1
- package/public/{chunk-7PCLHR4J.js → chunk-NWUQOZLK.js} +1 -1
- package/public/{chunk-Y7ITE3YP.js → chunk-Q4UWK2FE.js} +1 -1
- package/public/{chunk-PPQR2L5C.js → chunk-QPF5PFRM.js} +1 -1
- package/public/{chunk-HHEWF4VF.js → chunk-RMAGF64Q.js} +1 -1
- package/public/{chunk-Y4HHBBVG.js → chunk-SLXQKTB6.js} +1 -1
- package/public/{chunk-RKHDDB3B.js → chunk-SRK7ZHJU.js} +1 -1
- package/public/{chunk-FRKFO2AK.js → chunk-TNZKTZDM.js} +1 -1
- package/public/{chunk-6TIBYO6N.js → chunk-TQMERWYR.js} +1 -1
- package/public/{chunk-5SGJAWBL.js → chunk-VBNG2YQZ.js} +1 -1
- package/public/{chunk-MKITXUGX.js → chunk-WST3XDBS.js} +1 -1
- package/public/{chunk-6NWZP7O3.js → chunk-X2QQNXTE.js} +1 -1
- package/public/{chunk-25OIAGTM.js → chunk-YSS66NWX.js} +1 -1
- package/public/{chunk-3Z42R37A.js → chunk-YTNU24TR.js} +1 -1
- package/public/{chunk-YKWHYPAR.js → chunk-YZHAZSGE.js} +1 -1
- package/public/{chunk-G7CL4SAC.js → chunk-Z4TBQ5ME.js} +1 -1
- package/public/{chunk-3PDJRXRO.js → chunk-Z6JMYIUL.js} +1 -1
- package/public/{chunk-4DFS3QHJ.js → chunk-ZRXHCE63.js} +1 -1
- package/public/index.html +1 -1
- package/public/{main-2GHBMEX7.js → main-PCGBMA6M.js} +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as H}from"./chunk-6I6TS7NS.js";import{a as X}from"./chunk-OXSXPR4C.js";import{a as Z}from"./chunk-SRHJQ5GP.js";import"./chunk-UFVCERK3.js";import{a as R}from"./chunk-4MSFCTVQ.js";import{n as E}from"./chunk-QRNW5KEK.js";import"./chunk-GHMXPHAP.js";import{a as j}from"./chunk-HHEWF4VF.js";import{b as A}from"./chunk-25OIAGTM.js";import{a as W,c as q,d as V,e as N,f as D}from"./chunk-WZ6F47WI.js";import{b as T}from"./chunk-7I4POOWO.js";import{m as $}from"./chunk-MFCXXWZH.js";import{a as L,b as U}from"./chunk-77UFZWOO.js";import"./chunk-KIMRA3K7.js";import{Cc as h,Dc as M,Hb as m,Ib as x,Jb as y,Jc as s,Kc as d,Ob as c,Pb as n,Qb as a,Rb as p,_b as S,ab as o,bc as _,dc as C,fb as F,g as Y,h as I,id as O,ka as u,mb as P,qa as b,qc as f,ra as w,rc as v,w as z,yd as K}from"./chunk-3CKT2OQ7.js";var Q=Y(Z(),1);function G(){var i;return typeof window<"u"&&(window?.matchMedia("(display-mode: standalone)").matches||((i=window.navigator)===null||i===void 0?void 0:i.standalone)||document.referrer.startsWith("android-app://")||window?.Windows||/trident.+(msapphost|webview)\//i.test(navigator.userAgent)||document.referrer.startsWith("app-info://platform/microsoft-store"))}var B=()=>["/"],te=i=>({"hamburger-icon-cross":i}),ne=i=>({expanded:i}),ie=()=>({exact:!0}),oe=()=>["/plugins"],re=()=>["/accessories"],ae=()=>["/logs"],se=()=>["/support"],de=()=>["/platform-tools/terminal"],le=()=>["/config"],pe=()=>["/settings"],ce=()=>["/power-options"];function me(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",20),s(2,"translate"),s(3,"translate"),_("click",function(){b(e);let t=C();return w(t.openUnderVoltageModal())})("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(4,"div",12),p(5,"i",21),a(),n(6,"div",14),f(7),s(8,"translate"),a()()()}i&2&&(o(),m("aria-label",d(2,2,"rpi.throttled.undervoltage_title")+" - "+d(3,4,"rpi.throttled.undervoltage_description")),o(6),v(d(8,6,"rpi.throttled.undervoltage_title")))}function ue(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",15),s(2,"translate"),_("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",22),a(),n(5,"div",14),f(6),s(7,"translate"),a()()()}i&2&&(o(),c("routerLink",h(8,de))("routerLinkActive","active"),m("aria-label",d(2,4,"menu.linux.label_terminal")),o(5),v(d(7,6,"menu.linux.label_terminal")))}function _e(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",15),s(2,"translate"),_("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",23),a(),n(5,"div",14),f(6),s(7,"translate"),a()()()}i&2&&(o(),c("routerLink",h(8,le))("routerLinkActive","active"),m("aria-label",d(2,4,"menu.config_json_editor")),o(5),v(d(7,6,"menu.config_json_editor")))}function fe(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",15),s(2,"translate"),_("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",24),a(),n(5,"div",14),f(6),s(7,"translate"),a()()()}i&2&&(o(),c("routerLink",h(8,pe))("routerLinkActive","active"),m("aria-label",d(2,4,"menu.label_settings")),o(5),v(d(7,6,"menu.label_settings")))}function ge(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",15),s(2,"translate"),_("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",25),a(),n(5,"div",14),f(6),s(7,"translate"),a()()()}i&2&&(o(),c("routerLink",h(8,ce))("routerLinkActive","active"),m("aria-label",d(2,4,"menu.restart.title")),o(5),v(d(7,6,"menu.restart.title")))}function ve(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",20),s(2,"translate"),_("click",function(){b(e);let t=C();return w(t.reloadPage())})("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",26),a(),n(5,"div",14),f(6),s(7,"translate"),a()()()}i&2&&(o(),m("aria-label",d(2,2,"menu.reload")),o(5),v(d(7,4,"menu.reload")))}function he(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",20),s(2,"translate"),_("click",function(){b(e);let t=C();return w(t.logout())})("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",27),a(),n(5,"div",14),f(6),s(7,"translate"),a()()()}i&2&&(o(),m("aria-label",d(2,2,"menu.tooltip_logout")),o(5),v(d(7,4,"menu.tooltip_logout")))}var J=(()=>{class i{$auth=u(A);$settings=u(T);$modal=u(E);$notification=u(X);$renderer=u(F);$router=u(V);$translate=u(L);isExpanded=!1;formAuth=this.$settings.formAuth;isAdmin=this.$auth.user.admin;enableTerminalAccess=this.$settings.env.enableTerminalAccess;rPiCurrentlyUnderVoltage=!1;rPiWasUnderVoltage=!1;isMobile=!1;freezeMenu=!1;isPwa=G();constructor(){this.isMobile=window.innerWidth<768;let e;window.addEventListener("resize",()=>{clearTimeout(e),e=setTimeout(()=>{this.updateListeners()},500)}),this.$router.events.subscribe(l=>{l instanceof W&&(this.closeSidebar(),this.freezeMenu=!0,setTimeout(()=>{this.freezeMenu=!1},750))})}ngOnInit(){this.$notification.raspberryPiThrottled.subscribe(r=>{r["Under Voltage"]&&(this.rPiCurrentlyUnderVoltage=!0),r["Under-voltage has occurred"]&&(this.rPiWasUnderVoltage=!0)}),this.$notification.formAuthEnabled.subscribe(r=>{this.formAuth=r});let e=document.querySelector(".sidebar"),l=document.querySelector(".m-header"),t=document.querySelector(".content");this.isMobile?document.addEventListener("touchstart",r=>{if(t.contains(r.target)&&this.isExpanded){r.preventDefault(),this.toggleSidebar();return}!e.contains(r.target)&&!l.contains(r.target)&&this.isExpanded&&(r.preventDefault(),this.closeSidebar())},{passive:!1}):(this.updateListeners(),l.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),l.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}),document.addEventListener("click",r=>{e.contains(r.target)&&r.clientX>60&&this.closeSidebar()},{passive:!1})),this.updateContentStyles()}toggleSidebar(){this.freezeMenu||(this.isExpanded=!this.isExpanded,this.updateContentStyles())}openUnderVoltageModal(){let e=this.$modal.open(H,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("rpi.throttled.undervoltage_title"),e.componentInstance.message=this.$translate.instant(this.rPiCurrentlyUnderVoltage?"rpi.throttled.currently_message":"rpi.throttled.previously_message"),e.componentInstance.ctaButtonLabel=this.$translate.instant("form.button_more_info"),e.componentInstance.faIconClass="fas fa-fw fa-bolt yellow-text",e.componentInstance.ctaButtonLink="https://pimylifeup.com/raspberry-pi-low-voltage-warning"}handleKeydown(e){if(e.key==="Enter"){let l=e.target;["menuitem","button"].includes(l.getAttribute("role"))&&l.click()}}reloadPage(){window.location.reload()}ngOnDestroy(){document.removeEventListener("touchstart",()=>{}),document.removeEventListener("click",()=>{})}logout(){this.$auth.logout()}openSidebar(){this.freezeMenu||(this.isExpanded=!0,this.updateContentStyles())}closeSidebar(){this.freezeMenu||(this.isExpanded=!1,this.updateContentStyles())}updateContentStyles(){let e=document.querySelector(".content");this.isExpanded?(this.$renderer.setStyle(e,"opacity","20%"),this.$renderer.setStyle(e,"pointer-events","none"),this.$renderer.setStyle(e,"overflow","hidden")):(this.$renderer.removeStyle(e,"opacity"),this.$renderer.removeStyle(e,"pointer-events"),this.$renderer.removeStyle(e,"overflow"))}updateListeners(){this.isMobile=window.innerWidth<768;let e=document.querySelector(".sidebar");e.removeAllListeners(),(this.isMobile||!this.isMobile&&this.$settings.menuMode!=="freeze")&&(e.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),e.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}))}static \u0275fac=function(l){return new(l||i)};static \u0275cmp=P({type:i,selectors:[["app-sidebar"]],inputs:{isExpanded:"isExpanded"},decls:68,vars:75,consts:[["tabindex","0","role","button",1,"m-header","text-end",3,"click","keydown"],[1,"me-2","d-block","d-lg-none",2,"font-size","0.9rem","color","#dddddd"],[3,"routerLink"],["ngSrc","../../../../assets/homebridge-logo.svg","alt","HB Logo","height","35","width","35",2,"height","35px","width","35px"],[1,"hb-logo-text-mobile"],[1,"hamburger-icon",3,"ngClass"],["role","navigation","id","sidebar",1,"sidebar",3,"ngClass"],["tabindex","0","role","button",1,"header",3,"click","keydown"],[1,"hb-logo-text"],[1,"link-wrapper"],[1,"link"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive","routerLinkActiveOptions"],[1,"icon"],[1,"fa","fa-fw","fa-house"],[1,"title"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive"],[1,"fa","fa-fw","fa-plug"],[1,"fa","fa-fw","fa-lightbulb"],[1,"fa","fa-fw","fa-wave-square"],[1,"fa","fa-fw","fa-question-circle-o"],["role","menuitem","tabindex","0",1,"link-row",3,"click","keydown"],[1,"fas","fa-fw","fa-bolt","fa-beat","yellow-text",2,"--fa-beat-scale","1.5"],[1,"fa","fa-fw","fa-terminal"],[1,"fa","fa-fw","fa-code"],[1,"fa","fa-fw","fa-cog"],[1,"fa","fa-fw","fa-power-off"],[1,"fa","fa-fw","fa-refresh"],[1,"fa","fa-fw","fa-right-from-bracket"]],template:function(l,t){l&1&&(n(0,"div",0),s(1,"translate"),_("click",function(){return t.toggleSidebar()})("keydown",function(g){return t.handleKeydown(g)}),p(2,"span",1),n(3,"a",2),s(4,"translate"),p(5,"img",3),n(6,"div",4),f(7,"Homebridge"),a()(),n(8,"div",5),p(9,"span")(10,"span")(11,"span")(12,"span"),a()(),n(13,"div",6)(14,"div",7),_("click",function(){return t.toggleSidebar()})("keydown",function(g){return t.handleKeydown(g)}),n(15,"a",2),s(16,"translate"),p(17,"img",3),n(18,"div",8),f(19,"Homebridge"),a()()(),n(20,"div",9)(21,"div",10)(22,"div",11),s(23,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(24,"div",12),p(25,"i",13),a(),n(26,"div",14),f(27),s(28,"translate"),a()()(),x(29,me,9,8,"div",10),n(30,"div",10)(31,"div",15),s(32,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(33,"div",12),p(34,"i",16),a(),n(35,"div",14),f(36),s(37,"translate"),a()()(),n(38,"div",10)(39,"div",15),s(40,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(41,"div",12),p(42,"i",17),a(),n(43,"div",14),f(44),s(45,"translate"),a()()(),n(46,"div",10)(47,"div",15),s(48,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(49,"div",12),p(50,"i",18),a(),n(51,"div",14),f(52),s(53,"translate"),a()()(),x(54,ue,8,9,"div",10),x(55,_e,8,9,"div",10),x(56,fe,8,9,"div",10),n(57,"div",10)(58,"div",15),s(59,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(60,"div",12),p(61,"i",19),a(),n(62,"div",14),f(63),s(64,"translate"),a()()(),x(65,ge,8,9,"div",10),x(66,ve,8,6,"div",10),x(67,he,8,6,"div",10),a()()),l&2&&(m("aria-expanded",t.isExpanded?"true":"false")("aria-controls","sidebar")("aria-label",d(1,37,"menu.sidebar.aria_menu")),o(3),c("routerLink",h(63,B)),m("aria-label",d(4,39,"menu.label_status")),o(5),c("ngClass",M(64,te,t.isExpanded)),o(5),c("ngClass",M(66,ne,t.isExpanded)),o(2),c("routerLink",h(68,B)),m("aria-label",d(16,41,"menu.label_status")),o(7),c("routerLink",h(69,B))("routerLinkActive","active")("routerLinkActiveOptions",h(70,ie)),m("aria-label",d(23,43,"menu.label_status")),o(5),v(d(28,45,"menu.label_status")),o(2),y(t.rPiWasUnderVoltage||t.rPiCurrentlyUnderVoltage?29:-1),o(2),c("routerLink",h(71,oe))("routerLinkActive","active"),m("aria-label",d(32,47,"menu.label_plugins")),o(5),v(d(37,49,"menu.label_plugins")),o(3),c("routerLink",h(72,re))("routerLinkActive","active"),m("aria-label",d(40,51,"menu.label_accessories")),o(5),v(d(45,53,"menu.label_accessories")),o(3),c("routerLink",h(73,ae))("routerLinkActive","active"),m("aria-label",d(48,55,"menu.linux.label_logs")),o(5),v(d(53,57,"menu.linux.label_logs")),o(2),y(t.enableTerminalAccess&&t.isAdmin?54:-1),o(),y(t.isAdmin?55:-1),o(),y(t.isAdmin?56:-1),o(2),c("routerLink",h(74,se))("routerLinkActive","active"),m("aria-label",d(59,59,"support.title")),o(5),v(d(64,61,"support.title")),o(2),y(t.isAdmin?65:-1),o(),y(t.isPwa?66:-1),o(),y(t.formAuth?67:-1))},dependencies:[N,K,O,D,U],styles:[".m-header[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:65px;z-index:510;display:flex;align-items:center;padding-left:3px;padding-right:3px}.m-header[_ngcontent-%COMP%]:hover{cursor:pointer}@media (min-width: 768px){.m-header[_ngcontent-%COMP%]{display:none}}.sidebar[_ngcontent-%COMP%]{position:fixed;left:0;top:0;height:100vh;transition:.3s;width:60px;z-index:500}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;padding:15px 10px 15px 11px;font-size:.85rem}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]:hover{cursor:pointer}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{overflow-y:auto;max-height:calc(100vh - 80px)!important}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%]{display:flex;align-items:center;padding:15px 10px;cursor:pointer;transition:.2s;font-size:17px}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{flex:0 0 38px;display:flex;align-items:center;justify-content:center}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1;transition:.3s;max-width:0;overflow:hidden;white-space:nowrap}@media (max-width: 767px){.sidebar[_ngcontent-%COMP%]{width:0}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:none}}.sidebar.expanded[_ngcontent-%COMP%]{width:210px}@media (max-width: 767px){.sidebar.expanded[_ngcontent-%COMP%]{width:210px}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:block}}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{max-width:150px;padding-left:10px}.hamburger-icon[_ngcontent-%COMP%]{margin:-7px 0 0 25px}@media (min-width: 768px){.hb-logo-text[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px}.sidebar.expanded[_ngcontent-%COMP%] .hb-logo-text[_ngcontent-%COMP%]{opacity:1;left:55px;transition:.3s}.sidebar[_ngcontent-%COMP%]:not(.expanded) .hb-logo-text[_ngcontent-%COMP%]{opacity:0;left:40px;transition:.3s}.hb-logo-text-mobile[_ngcontent-%COMP%], .hamburger-icon[_ngcontent-%COMP%]{display:none!important}}@media (max-width: 767px){.hb-logo-text[_ngcontent-%COMP%]{display:none!important}.hb-logo-text-mobile[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px;opacity:1;left:55px}.hamburger-icon[_ngcontent-%COMP%]{position:absolute;right:10px;top:28px;width:30px;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0);-webkit-transition:.5s ease-in-out;-moz-transition:.5s ease-in-out;-o-transition:.5s ease-in-out;transition:.5s ease-in-out;cursor:pointer}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;position:absolute;height:2px;width:100%;background-color:#fff;border-radius:9px;opacity:1;left:0;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0);-webkit-transition:.25s ease-in-out;-moz-transition:.25s ease-in-out;-o-transition:.25s ease-in-out;transition:.25s ease-in-out}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:0}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2), .hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){top:10px}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:20px}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:10px;width:0;left:50%}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2){-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:10px;width:0;left:50%}}"]})}return i})();var be=i=>({sidebarExpanded:i}),He=(()=>{class i{$auth=u(A);$modal=u(E);$router=u(V);$settings=u(T);$translate=u(L);$ws=u(j);io;sidebarExpanded=!1;ngOnInit(){this.io=this.$ws.connectToNamespace("app"),this.io.socket.on("reconnect",()=>{this.$auth.checkToken()}),this.compareServerUiVersion()}compareServerUiVersion(){return I(this,null,function*(){if(this.$settings.settingsLoaded||(yield z(this.$settings.onSettingsLoaded)),this.$router.url!=="/restart"&&(0,Q.lt)(this.$settings.uiVersion,$.serverTarget)){console.log(`Server restart required. UI Version: ${$.serverTarget} - Server Version: ${this.$settings.uiVersion} `);let e=this.$modal.open(R,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("platform.version.service_restart_required"),e.componentInstance.message=this.$translate.instant("platform.version.restart_required",{serverVersion:this.$settings.uiVersion,uiVersion:$.serverTarget}),e.componentInstance.confirmButtonLabel=this.$translate.instant("menu.tooltip_restart"),e.componentInstance.faIconClass="fas fa-power-off orange-text",e.result.then(()=>this.$router.navigate(["/restart"])).catch(()=>{})}})}static \u0275fac=function(l){return new(l||i)};static \u0275cmp=P({type:i,selectors:[["app-layout"]],decls:3,vars:4,consts:[[3,"isExpanded"],[1,"content","px-3","p-md-4",3,"ngClass"]],template:function(l,t){l&1&&(p(0,"app-sidebar",0),n(1,"div",1),p(2,"router-outlet"),a()),l&2&&(c("isExpanded",t.sidebarExpanded),o(),c("ngClass",M(2,be,t.sidebarExpanded)))},dependencies:[J,O,q],styles:[".content[_ngcontent-%COMP%]{margin-left:60px;transition:.3s;height:100%}@media (max-width: 767px){.content[_ngcontent-%COMP%]{margin-left:0;padding-top:85px!important}}@media (min-width: 768px){.content[_ngcontent-%COMP%]{height:100%}}a[_ngcontent-%COMP%]:hover{text-decoration:none!important}"]})}return i})();export{He as LayoutComponent};
|
|
1
|
+
import{a as H}from"./chunk-6I6TS7NS.js";import{a as X}from"./chunk-OXSXPR4C.js";import{a as Z}from"./chunk-SRHJQ5GP.js";import"./chunk-UFVCERK3.js";import{a as R}from"./chunk-4MSFCTVQ.js";import{n as E}from"./chunk-QRNW5KEK.js";import"./chunk-GHMXPHAP.js";import{a as j}from"./chunk-RMAGF64Q.js";import{b as A}from"./chunk-YSS66NWX.js";import{a as W,c as q,d as V,e as N,f as D}from"./chunk-WZ6F47WI.js";import{b as T}from"./chunk-M425JDIT.js";import{m as $}from"./chunk-6WJPBOPW.js";import{a as L,b as U}from"./chunk-77UFZWOO.js";import"./chunk-KIMRA3K7.js";import{Cc as h,Dc as M,Hb as m,Ib as x,Jb as y,Jc as s,Kc as d,Ob as c,Pb as n,Qb as a,Rb as p,_b as S,ab as o,bc as _,dc as C,fb as F,g as Y,h as I,id as O,ka as u,mb as P,qa as b,qc as f,ra as w,rc as v,w as z,yd as K}from"./chunk-3CKT2OQ7.js";var Q=Y(Z(),1);function G(){var i;return typeof window<"u"&&(window?.matchMedia("(display-mode: standalone)").matches||((i=window.navigator)===null||i===void 0?void 0:i.standalone)||document.referrer.startsWith("android-app://")||window?.Windows||/trident.+(msapphost|webview)\//i.test(navigator.userAgent)||document.referrer.startsWith("app-info://platform/microsoft-store"))}var B=()=>["/"],te=i=>({"hamburger-icon-cross":i}),ne=i=>({expanded:i}),ie=()=>({exact:!0}),oe=()=>["/plugins"],re=()=>["/accessories"],ae=()=>["/logs"],se=()=>["/support"],de=()=>["/platform-tools/terminal"],le=()=>["/config"],pe=()=>["/settings"],ce=()=>["/power-options"];function me(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",20),s(2,"translate"),s(3,"translate"),_("click",function(){b(e);let t=C();return w(t.openUnderVoltageModal())})("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(4,"div",12),p(5,"i",21),a(),n(6,"div",14),f(7),s(8,"translate"),a()()()}i&2&&(o(),m("aria-label",d(2,2,"rpi.throttled.undervoltage_title")+" - "+d(3,4,"rpi.throttled.undervoltage_description")),o(6),v(d(8,6,"rpi.throttled.undervoltage_title")))}function ue(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",15),s(2,"translate"),_("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",22),a(),n(5,"div",14),f(6),s(7,"translate"),a()()()}i&2&&(o(),c("routerLink",h(8,de))("routerLinkActive","active"),m("aria-label",d(2,4,"menu.linux.label_terminal")),o(5),v(d(7,6,"menu.linux.label_terminal")))}function _e(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",15),s(2,"translate"),_("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",23),a(),n(5,"div",14),f(6),s(7,"translate"),a()()()}i&2&&(o(),c("routerLink",h(8,le))("routerLinkActive","active"),m("aria-label",d(2,4,"menu.config_json_editor")),o(5),v(d(7,6,"menu.config_json_editor")))}function fe(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",15),s(2,"translate"),_("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",24),a(),n(5,"div",14),f(6),s(7,"translate"),a()()()}i&2&&(o(),c("routerLink",h(8,pe))("routerLinkActive","active"),m("aria-label",d(2,4,"menu.label_settings")),o(5),v(d(7,6,"menu.label_settings")))}function ge(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",15),s(2,"translate"),_("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",25),a(),n(5,"div",14),f(6),s(7,"translate"),a()()()}i&2&&(o(),c("routerLink",h(8,ce))("routerLinkActive","active"),m("aria-label",d(2,4,"menu.restart.title")),o(5),v(d(7,6,"menu.restart.title")))}function ve(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",20),s(2,"translate"),_("click",function(){b(e);let t=C();return w(t.reloadPage())})("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",26),a(),n(5,"div",14),f(6),s(7,"translate"),a()()()}i&2&&(o(),m("aria-label",d(2,2,"menu.reload")),o(5),v(d(7,4,"menu.reload")))}function he(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",20),s(2,"translate"),_("click",function(){b(e);let t=C();return w(t.logout())})("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",27),a(),n(5,"div",14),f(6),s(7,"translate"),a()()()}i&2&&(o(),m("aria-label",d(2,2,"menu.tooltip_logout")),o(5),v(d(7,4,"menu.tooltip_logout")))}var J=(()=>{class i{$auth=u(A);$settings=u(T);$modal=u(E);$notification=u(X);$renderer=u(F);$router=u(V);$translate=u(L);isExpanded=!1;formAuth=this.$settings.formAuth;isAdmin=this.$auth.user.admin;enableTerminalAccess=this.$settings.env.enableTerminalAccess;rPiCurrentlyUnderVoltage=!1;rPiWasUnderVoltage=!1;isMobile=!1;freezeMenu=!1;isPwa=G();constructor(){this.isMobile=window.innerWidth<768;let e;window.addEventListener("resize",()=>{clearTimeout(e),e=setTimeout(()=>{this.updateListeners()},500)}),this.$router.events.subscribe(l=>{l instanceof W&&(this.closeSidebar(),this.freezeMenu=!0,setTimeout(()=>{this.freezeMenu=!1},750))})}ngOnInit(){this.$notification.raspberryPiThrottled.subscribe(r=>{r["Under Voltage"]&&(this.rPiCurrentlyUnderVoltage=!0),r["Under-voltage has occurred"]&&(this.rPiWasUnderVoltage=!0)}),this.$notification.formAuthEnabled.subscribe(r=>{this.formAuth=r});let e=document.querySelector(".sidebar"),l=document.querySelector(".m-header"),t=document.querySelector(".content");this.isMobile?document.addEventListener("touchstart",r=>{if(t.contains(r.target)&&this.isExpanded){r.preventDefault(),this.toggleSidebar();return}!e.contains(r.target)&&!l.contains(r.target)&&this.isExpanded&&(r.preventDefault(),this.closeSidebar())},{passive:!1}):(this.updateListeners(),l.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),l.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}),document.addEventListener("click",r=>{e.contains(r.target)&&r.clientX>60&&this.closeSidebar()},{passive:!1})),this.updateContentStyles()}toggleSidebar(){this.freezeMenu||(this.isExpanded=!this.isExpanded,this.updateContentStyles())}openUnderVoltageModal(){let e=this.$modal.open(H,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("rpi.throttled.undervoltage_title"),e.componentInstance.message=this.$translate.instant(this.rPiCurrentlyUnderVoltage?"rpi.throttled.currently_message":"rpi.throttled.previously_message"),e.componentInstance.ctaButtonLabel=this.$translate.instant("form.button_more_info"),e.componentInstance.faIconClass="fas fa-fw fa-bolt yellow-text",e.componentInstance.ctaButtonLink="https://pimylifeup.com/raspberry-pi-low-voltage-warning"}handleKeydown(e){if(e.key==="Enter"){let l=e.target;["menuitem","button"].includes(l.getAttribute("role"))&&l.click()}}reloadPage(){window.location.reload()}ngOnDestroy(){document.removeEventListener("touchstart",()=>{}),document.removeEventListener("click",()=>{})}logout(){this.$auth.logout()}openSidebar(){this.freezeMenu||(this.isExpanded=!0,this.updateContentStyles())}closeSidebar(){this.freezeMenu||(this.isExpanded=!1,this.updateContentStyles())}updateContentStyles(){let e=document.querySelector(".content");this.isExpanded?(this.$renderer.setStyle(e,"opacity","20%"),this.$renderer.setStyle(e,"pointer-events","none"),this.$renderer.setStyle(e,"overflow","hidden")):(this.$renderer.removeStyle(e,"opacity"),this.$renderer.removeStyle(e,"pointer-events"),this.$renderer.removeStyle(e,"overflow"))}updateListeners(){this.isMobile=window.innerWidth<768;let e=document.querySelector(".sidebar");e.removeAllListeners(),(this.isMobile||!this.isMobile&&this.$settings.menuMode!=="freeze")&&(e.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),e.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}))}static \u0275fac=function(l){return new(l||i)};static \u0275cmp=P({type:i,selectors:[["app-sidebar"]],inputs:{isExpanded:"isExpanded"},decls:68,vars:75,consts:[["tabindex","0","role","button",1,"m-header","text-end",3,"click","keydown"],[1,"me-2","d-block","d-lg-none",2,"font-size","0.9rem","color","#dddddd"],[3,"routerLink"],["ngSrc","../../../../assets/homebridge-logo.svg","alt","HB Logo","height","35","width","35",2,"height","35px","width","35px"],[1,"hb-logo-text-mobile"],[1,"hamburger-icon",3,"ngClass"],["role","navigation","id","sidebar",1,"sidebar",3,"ngClass"],["tabindex","0","role","button",1,"header",3,"click","keydown"],[1,"hb-logo-text"],[1,"link-wrapper"],[1,"link"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive","routerLinkActiveOptions"],[1,"icon"],[1,"fa","fa-fw","fa-house"],[1,"title"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive"],[1,"fa","fa-fw","fa-plug"],[1,"fa","fa-fw","fa-lightbulb"],[1,"fa","fa-fw","fa-wave-square"],[1,"fa","fa-fw","fa-question-circle-o"],["role","menuitem","tabindex","0",1,"link-row",3,"click","keydown"],[1,"fas","fa-fw","fa-bolt","fa-beat","yellow-text",2,"--fa-beat-scale","1.5"],[1,"fa","fa-fw","fa-terminal"],[1,"fa","fa-fw","fa-code"],[1,"fa","fa-fw","fa-cog"],[1,"fa","fa-fw","fa-power-off"],[1,"fa","fa-fw","fa-refresh"],[1,"fa","fa-fw","fa-right-from-bracket"]],template:function(l,t){l&1&&(n(0,"div",0),s(1,"translate"),_("click",function(){return t.toggleSidebar()})("keydown",function(g){return t.handleKeydown(g)}),p(2,"span",1),n(3,"a",2),s(4,"translate"),p(5,"img",3),n(6,"div",4),f(7,"Homebridge"),a()(),n(8,"div",5),p(9,"span")(10,"span")(11,"span")(12,"span"),a()(),n(13,"div",6)(14,"div",7),_("click",function(){return t.toggleSidebar()})("keydown",function(g){return t.handleKeydown(g)}),n(15,"a",2),s(16,"translate"),p(17,"img",3),n(18,"div",8),f(19,"Homebridge"),a()()(),n(20,"div",9)(21,"div",10)(22,"div",11),s(23,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(24,"div",12),p(25,"i",13),a(),n(26,"div",14),f(27),s(28,"translate"),a()()(),x(29,me,9,8,"div",10),n(30,"div",10)(31,"div",15),s(32,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(33,"div",12),p(34,"i",16),a(),n(35,"div",14),f(36),s(37,"translate"),a()()(),n(38,"div",10)(39,"div",15),s(40,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(41,"div",12),p(42,"i",17),a(),n(43,"div",14),f(44),s(45,"translate"),a()()(),n(46,"div",10)(47,"div",15),s(48,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(49,"div",12),p(50,"i",18),a(),n(51,"div",14),f(52),s(53,"translate"),a()()(),x(54,ue,8,9,"div",10),x(55,_e,8,9,"div",10),x(56,fe,8,9,"div",10),n(57,"div",10)(58,"div",15),s(59,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(60,"div",12),p(61,"i",19),a(),n(62,"div",14),f(63),s(64,"translate"),a()()(),x(65,ge,8,9,"div",10),x(66,ve,8,6,"div",10),x(67,he,8,6,"div",10),a()()),l&2&&(m("aria-expanded",t.isExpanded?"true":"false")("aria-controls","sidebar")("aria-label",d(1,37,"menu.sidebar.aria_menu")),o(3),c("routerLink",h(63,B)),m("aria-label",d(4,39,"menu.label_status")),o(5),c("ngClass",M(64,te,t.isExpanded)),o(5),c("ngClass",M(66,ne,t.isExpanded)),o(2),c("routerLink",h(68,B)),m("aria-label",d(16,41,"menu.label_status")),o(7),c("routerLink",h(69,B))("routerLinkActive","active")("routerLinkActiveOptions",h(70,ie)),m("aria-label",d(23,43,"menu.label_status")),o(5),v(d(28,45,"menu.label_status")),o(2),y(t.rPiWasUnderVoltage||t.rPiCurrentlyUnderVoltage?29:-1),o(2),c("routerLink",h(71,oe))("routerLinkActive","active"),m("aria-label",d(32,47,"menu.label_plugins")),o(5),v(d(37,49,"menu.label_plugins")),o(3),c("routerLink",h(72,re))("routerLinkActive","active"),m("aria-label",d(40,51,"menu.label_accessories")),o(5),v(d(45,53,"menu.label_accessories")),o(3),c("routerLink",h(73,ae))("routerLinkActive","active"),m("aria-label",d(48,55,"menu.linux.label_logs")),o(5),v(d(53,57,"menu.linux.label_logs")),o(2),y(t.enableTerminalAccess&&t.isAdmin?54:-1),o(),y(t.isAdmin?55:-1),o(),y(t.isAdmin?56:-1),o(2),c("routerLink",h(74,se))("routerLinkActive","active"),m("aria-label",d(59,59,"support.title")),o(5),v(d(64,61,"support.title")),o(2),y(t.isAdmin?65:-1),o(),y(t.isPwa?66:-1),o(),y(t.formAuth?67:-1))},dependencies:[N,K,O,D,U],styles:[".m-header[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:65px;z-index:510;display:flex;align-items:center;padding-left:3px;padding-right:3px}.m-header[_ngcontent-%COMP%]:hover{cursor:pointer}@media (min-width: 768px){.m-header[_ngcontent-%COMP%]{display:none}}.sidebar[_ngcontent-%COMP%]{position:fixed;left:0;top:0;height:100vh;transition:.3s;width:60px;z-index:500}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;padding:15px 10px 15px 11px;font-size:.85rem}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]:hover{cursor:pointer}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{overflow-y:auto;max-height:calc(100vh - 80px)!important}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%]{display:flex;align-items:center;padding:15px 10px;cursor:pointer;transition:.2s;font-size:17px}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{flex:0 0 38px;display:flex;align-items:center;justify-content:center}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1;transition:.3s;max-width:0;overflow:hidden;white-space:nowrap}@media (max-width: 767px){.sidebar[_ngcontent-%COMP%]{width:0}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:none}}.sidebar.expanded[_ngcontent-%COMP%]{width:210px}@media (max-width: 767px){.sidebar.expanded[_ngcontent-%COMP%]{width:210px}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:block}}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{max-width:150px;padding-left:10px}.hamburger-icon[_ngcontent-%COMP%]{margin:-7px 0 0 25px}@media (min-width: 768px){.hb-logo-text[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px}.sidebar.expanded[_ngcontent-%COMP%] .hb-logo-text[_ngcontent-%COMP%]{opacity:1;left:55px;transition:.3s}.sidebar[_ngcontent-%COMP%]:not(.expanded) .hb-logo-text[_ngcontent-%COMP%]{opacity:0;left:40px;transition:.3s}.hb-logo-text-mobile[_ngcontent-%COMP%], .hamburger-icon[_ngcontent-%COMP%]{display:none!important}}@media (max-width: 767px){.hb-logo-text[_ngcontent-%COMP%]{display:none!important}.hb-logo-text-mobile[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px;opacity:1;left:55px}.hamburger-icon[_ngcontent-%COMP%]{position:absolute;right:10px;top:28px;width:30px;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0);-webkit-transition:.5s ease-in-out;-moz-transition:.5s ease-in-out;-o-transition:.5s ease-in-out;transition:.5s ease-in-out;cursor:pointer}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;position:absolute;height:2px;width:100%;background-color:#fff;border-radius:9px;opacity:1;left:0;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0);-webkit-transition:.25s ease-in-out;-moz-transition:.25s ease-in-out;-o-transition:.25s ease-in-out;transition:.25s ease-in-out}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:0}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2), .hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){top:10px}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:20px}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:10px;width:0;left:50%}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2){-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:10px;width:0;left:50%}}"]})}return i})();var be=i=>({sidebarExpanded:i}),He=(()=>{class i{$auth=u(A);$modal=u(E);$router=u(V);$settings=u(T);$translate=u(L);$ws=u(j);io;sidebarExpanded=!1;ngOnInit(){this.io=this.$ws.connectToNamespace("app"),this.io.socket.on("reconnect",()=>{this.$auth.checkToken()}),this.compareServerUiVersion()}compareServerUiVersion(){return I(this,null,function*(){if(this.$settings.settingsLoaded||(yield z(this.$settings.onSettingsLoaded)),this.$router.url!=="/restart"&&(0,Q.lt)(this.$settings.uiVersion,$.serverTarget)){console.log(`Server restart required. UI Version: ${$.serverTarget} - Server Version: ${this.$settings.uiVersion} `);let e=this.$modal.open(R,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("platform.version.service_restart_required"),e.componentInstance.message=this.$translate.instant("platform.version.restart_required",{serverVersion:this.$settings.uiVersion,uiVersion:$.serverTarget}),e.componentInstance.confirmButtonLabel=this.$translate.instant("menu.tooltip_restart"),e.componentInstance.faIconClass="fas fa-power-off orange-text",e.result.then(()=>this.$router.navigate(["/restart"])).catch(()=>{})}})}static \u0275fac=function(l){return new(l||i)};static \u0275cmp=P({type:i,selectors:[["app-layout"]],decls:3,vars:4,consts:[[3,"isExpanded"],[1,"content","px-3","p-md-4",3,"ngClass"]],template:function(l,t){l&1&&(p(0,"app-sidebar",0),n(1,"div",1),p(2,"router-outlet"),a()),l&2&&(c("isExpanded",t.sidebarExpanded),o(),c("ngClass",M(2,be,t.sidebarExpanded)))},dependencies:[J,O,q],styles:[".content[_ngcontent-%COMP%]{margin-left:60px;transition:.3s;height:100%}@media (max-width: 767px){.content[_ngcontent-%COMP%]{margin-left:0;padding-top:85px!important}}@media (min-width: 768px){.content[_ngcontent-%COMP%]{height:100%}}a[_ngcontent-%COMP%]:hover{text-decoration:none!important}"]})}return i})();export{He as LayoutComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Ag}from"./chunk-ZAS225DL.js";import{a as tl,c as Tg,d as Pg,e as Ds,f as ri,g as CS}from"./chunk-JB4F2HHO.js";import{a as kg}from"./chunk-EEI3BPIT.js";import{a as Ig}from"./chunk-2XWUBKEU.js";import{a as jg}from"./chunk-XIC6ZDKX.js";import{a as Sg,b as Cg,c as xg}from"./chunk-V2NELL63.js";import{a as ko}from"./chunk-QUBAEQEC.js";import{a as zg}from"./chunk-RRPADCBT.js";import{a as gn,b as hn}from"./chunk-SRHJQ5GP.js";import{a as pn,b as mn}from"./chunk-UFVCERK3.js";import{a as Hg}from"./chunk-4MSFCTVQ.js";import{a as nn,b as an,c as ln,d as dn,e as cn,f as un,g as Ns,m as Re,n as et,o as bg,p as fg,q as yg,r as vg,s as wg,t as Ei}from"./chunk-QRNW5KEK.js";import{A as wo,a as dg,b as Ni,c as js,e as yt,f as cg,h as ug,i as gg,j as pg,k as mg,l as Di,m as hg,o as Bi,r as As,s as ns,t as as,y as _g,z as Yt}from"./chunk-GHMXPHAP.js";import{a as Ri}from"./chunk-HHEWF4VF.js";import{d as oi}from"./chunk-WZ6F47WI.js";import{b as Oe}from"./chunk-7I4POOWO.js";import{k as He,m as Ui,n as ve}from"./chunk-MFCXXWZH.js";import{a as ke,b as Fe}from"./chunk-77UFZWOO.js";import{d as lg}from"./chunk-KIMRA3K7.js";import{$ as vo,$a as Qu,Ac as og,Bc as rg,Ca as Ti,Cc as Pe,D as Gu,Da as Zu,Dc as Gt,Ec as os,Fa as Ts,Fc as Et,Gc as zs,Hb as Y,Ib as I,Jb as T,Jc as H,Kc as C,Lb as ut,Lc as Ke,M as xs,Mb as gt,Nb as pt,Ob as y,Pb as m,Qb as p,Rb as x,Sb as Xr,Sc as mt,Tb as en,Tc as V,Ub as tn,Uc as Ai,Vb as tg,Wb as ig,Wc as ng,Xa as he,Y as Za,_b as $,a as J,ab as u,b as xe,bc as R,c as qu,cc as sn,dc as b,e as _,ea as Yu,fa as Pt,fb as Zr,g as je,ga as Is,gb as pi,h as G,hc as Qa,ia as Wu,ib as ts,ic as Xa,id as Ut,ja as Ju,jc as el,jd as rs,k as Ku,ka as z,kc as Pi,kd as ht,lc as zi,mb as Q,mc as sg,n as Tt,nb as Ps,nc as Lt,o as Ja,ob as is,oc as ji,pb as Xu,pc as Z,q as Vu,qa as E,qc as w,ra as U,rc as K,rd as rn,sb as de,sc as O,tc as ss,ub as eg,uc as on,v as $u,vb as Qr,w as le,x as Lu,xc as Ae,yc as Ne,yd as ag,za as Jr,zc as De}from"./chunk-3CKT2OQ7.js";var Co=_(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.regexpCode=ye.getEsmExportName=ye.getProperty=ye.safeStringify=ye.stringify=ye.strConcat=ye.addCodeArg=ye.str=ye._=ye.nil=ye._Code=ye.Name=ye.IDENTIFIER=ye._CodeOrName=void 0;var Ho=class{};ye._CodeOrName=Ho;ye.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var ls=class extends Ho{constructor(i){if(super(),!ye.IDENTIFIER.test(i))throw new Error("CodeGen: name must be a valid identifier");this.str=i}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};ye.Name=ls;var Rt=class extends Ho{constructor(i){super(),this._items=typeof i=="string"?[i]:i}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let i=this._items[0];return i===""||i==='""'}get str(){var i;return(i=this._str)!==null&&i!==void 0?i:this._str=this._items.reduce((t,s)=>`${t}${s}`,"")}get names(){var i;return(i=this._names)!==null&&i!==void 0?i:this._names=this._items.reduce((t,s)=>(s instanceof ls&&(t[s.str]=(t[s.str]||0)+1),t),{})}};ye._Code=Rt;ye.nil=new Rt("");function Ng(e,...i){let t=[e[0]],s=0;for(;s<i.length;)sl(t,i[s]),t.push(e[++s]);return new Rt(t)}ye._=Ng;var il=new Rt("+");function Dg(e,...i){let t=[So(e[0])],s=0;for(;s<i.length;)t.push(il),sl(t,i[s]),t.push(il,So(e[++s]));return xS(t),new Rt(t)}ye.str=Dg;function sl(e,i){i instanceof Rt?e.push(...i._items):i instanceof ls?e.push(i):e.push(PS(i))}ye.addCodeArg=sl;function xS(e){let i=1;for(;i<e.length-1;){if(e[i]===il){let t=IS(e[i-1],e[i+1]);if(t!==void 0){e.splice(i-1,3,t);continue}e[i++]="+"}i++}}function IS(e,i){if(i==='""')return e;if(e==='""')return i;if(typeof e=="string")return i instanceof ls||e[e.length-1]!=='"'?void 0:typeof i!="string"?`${e.slice(0,-1)}${i}"`:i[0]==='"'?e.slice(0,-1)+i.slice(1):void 0;if(typeof i=="string"&&i[0]==='"'&&!(e instanceof ls))return`"${e}${i.slice(1)}`}function TS(e,i){return i.emptyStr()?e:e.emptyStr()?i:Dg`${e}${i}`}ye.strConcat=TS;function PS(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:So(Array.isArray(e)?e.join(","):e)}function zS(e){return new Rt(So(e))}ye.stringify=zS;function So(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ye.safeStringify=So;function jS(e){return typeof e=="string"&&ye.IDENTIFIER.test(e)?new Rt(`.${e}`):Ng`[${e}]`}ye.getProperty=jS;function AS(e){if(typeof e=="string"&&ye.IDENTIFIER.test(e))return new Rt(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}ye.getEsmExportName=AS;function NS(e){return new Rt(e.toString())}ye.regexpCode=NS});var nl=_(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.ValueScope=wt.ValueScopeName=wt.Scope=wt.varKinds=wt.UsedValueState=void 0;var vt=Co(),ol=class extends Error{constructor(i){super(`CodeGen: "code" for ${i} not defined`),this.value=i.value}},_n=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(_n||(wt.UsedValueState=_n={}));wt.varKinds={const:new vt.Name("const"),let:new vt.Name("let"),var:new vt.Name("var")};var bn=class{constructor({prefixes:i,parent:t}={}){this._names={},this._prefixes=i,this._parent=t}toName(i){return i instanceof vt.Name?i:this.name(i)}name(i){return new vt.Name(this._newName(i))}_newName(i){let t=this._names[i]||this._nameGroup(i);return`${i}${t.index++}`}_nameGroup(i){var t,s;if(!((s=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||s===void 0)&&s.has(i)||this._prefixes&&!this._prefixes.has(i))throw new Error(`CodeGen: prefix "${i}" is not allowed in this scope`);return this._names[i]={prefix:i,index:0}}};wt.Scope=bn;var fn=class extends vt.Name{constructor(i,t){super(t),this.prefix=i}setValue(i,{property:t,itemIndex:s}){this.value=i,this.scopePath=(0,vt._)`.${new vt.Name(t)}[${s}]`}};wt.ValueScopeName=fn;var DS=(0,vt._)`\n`,rl=class extends bn{constructor(i){super(i),this._values={},this._scope=i.scope,this.opts=xe(J({},i),{_n:i.lines?DS:vt.nil})}get(){return this._scope}name(i){return new fn(i,this._newName(i))}value(i,t){var s;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let o=this.toName(i),{prefix:r}=o,n=(s=t.key)!==null&&s!==void 0?s:t.ref,a=this._values[r];if(a){let c=a.get(n);if(c)return c}else a=this._values[r]=new Map;a.set(n,o);let l=this._scope[r]||(this._scope[r]=[]),d=l.length;return l[d]=t.ref,o.setValue(t,{property:r,itemIndex:d}),o}getValue(i,t){let s=this._values[i];if(s)return s.get(t)}scopeRefs(i,t=this._values){return this._reduceValues(t,s=>{if(s.scopePath===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return(0,vt._)`${i}${s.scopePath}`})}scopeCode(i=this._values,t,s){return this._reduceValues(i,o=>{if(o.value===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return o.value.code},t,s)}_reduceValues(i,t,s={},o){let r=vt.nil;for(let n in i){let a=i[n];if(!a)continue;let l=s[n]=s[n]||new Map;a.forEach(d=>{if(l.has(d))return;l.set(d,_n.Started);let c=t(d);if(c){let g=this.opts.es5?wt.varKinds.var:wt.varKinds.const;r=(0,vt._)`${r}${g} ${d} = ${c};${this.opts._n}`}else if(c=o?.(d))r=(0,vt._)`${r}${c}${this.opts._n}`;else throw new ol(d);l.set(d,_n.Completed)})}return r}};wt.ValueScope=rl});var ee=_(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.or=ce.and=ce.not=ce.CodeGen=ce.operators=ce.varKinds=ce.ValueScopeName=ce.ValueScope=ce.Scope=ce.Name=ce.regexpCode=ce.stringify=ce.getProperty=ce.nil=ce.strConcat=ce.str=ce._=void 0;var _e=Co(),Wt=nl(),Fi=Co();Object.defineProperty(ce,"_",{enumerable:!0,get:function(){return Fi._}});Object.defineProperty(ce,"str",{enumerable:!0,get:function(){return Fi.str}});Object.defineProperty(ce,"strConcat",{enumerable:!0,get:function(){return Fi.strConcat}});Object.defineProperty(ce,"nil",{enumerable:!0,get:function(){return Fi.nil}});Object.defineProperty(ce,"getProperty",{enumerable:!0,get:function(){return Fi.getProperty}});Object.defineProperty(ce,"stringify",{enumerable:!0,get:function(){return Fi.stringify}});Object.defineProperty(ce,"regexpCode",{enumerable:!0,get:function(){return Fi.regexpCode}});Object.defineProperty(ce,"Name",{enumerable:!0,get:function(){return Fi.Name}});var Hn=nl();Object.defineProperty(ce,"Scope",{enumerable:!0,get:function(){return Hn.Scope}});Object.defineProperty(ce,"ValueScope",{enumerable:!0,get:function(){return Hn.ValueScope}});Object.defineProperty(ce,"ValueScopeName",{enumerable:!0,get:function(){return Hn.ValueScopeName}});Object.defineProperty(ce,"varKinds",{enumerable:!0,get:function(){return Hn.varKinds}});ce.operators={GT:new _e._Code(">"),GTE:new _e._Code(">="),LT:new _e._Code("<"),LTE:new _e._Code("<="),EQ:new _e._Code("==="),NEQ:new _e._Code("!=="),NOT:new _e._Code("!"),OR:new _e._Code("||"),AND:new _e._Code("&&"),ADD:new _e._Code("+")};var mi=class{optimizeNodes(){return this}optimizeNames(i,t){return this}},al=class extends mi{constructor(i,t,s){super(),this.varKind=i,this.name=t,this.rhs=s}render({es5:i,_n:t}){let s=i?Wt.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${o};`+t}optimizeNames(i,t){if(i[this.name.str])return this.rhs&&(this.rhs=Bs(this.rhs,i,t)),this}get names(){return this.rhs instanceof _e._CodeOrName?this.rhs.names:{}}},vn=class extends mi{constructor(i,t,s){super(),this.lhs=i,this.rhs=t,this.sideEffects=s}render({_n:i}){return`${this.lhs} = ${this.rhs};`+i}optimizeNames(i,t){if(!(this.lhs instanceof _e.Name&&!i[this.lhs.str]&&!this.sideEffects))return this.rhs=Bs(this.rhs,i,t),this}get names(){let i=this.lhs instanceof _e.Name?{}:J({},this.lhs.names);return kn(i,this.rhs)}},ll=class extends vn{constructor(i,t,s,o){super(i,s,o),this.op=t}render({_n:i}){return`${this.lhs} ${this.op}= ${this.rhs};`+i}},dl=class extends mi{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`${this.label}:`+i}},cl=class extends mi{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`break${this.label?` ${this.label}`:""};`+i}},ul=class extends mi{constructor(i){super(),this.error=i}render({_n:i}){return`throw ${this.error};`+i}get names(){return this.error.names}},gl=class extends mi{constructor(i){super(),this.code=i}render({_n:i}){return`${this.code};`+i}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(i,t){return this.code=Bs(this.code,i,t),this}get names(){return this.code instanceof _e._CodeOrName?this.code.names:{}}},xo=class extends mi{constructor(i=[]){super(),this.nodes=i}render(i){return this.nodes.reduce((t,s)=>t+s.render(i),"")}optimizeNodes(){let{nodes:i}=this,t=i.length;for(;t--;){let s=i[t].optimizeNodes();Array.isArray(s)?i.splice(t,1,...s):s?i[t]=s:i.splice(t,1)}return i.length>0?this:void 0}optimizeNames(i,t){let{nodes:s}=this,o=s.length;for(;o--;){let r=s[o];r.optimizeNames(i,t)||(BS(i,r.names),s.splice(o,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((i,t)=>ds(i,t.names),{})}},hi=class extends xo{render(i){return"{"+i._n+super.render(i)+"}"+i._n}},pl=class extends xo{},ml=(()=>{class e extends hi{}return e.kind="else",e})(),yn=(()=>{class e extends hi{constructor(t,s){super(s),this.condition=t}render(t){let s=`if(${this.condition})`+super.render(t);return this.else&&(s+="else "+this.else.render(t)),s}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let s=this.else;if(s){let o=s.optimizeNodes();s=this.else=Array.isArray(o)?new ml(o):o}if(s)return t===!1?s instanceof e?s:s.nodes:this.nodes.length?this:new e(Fg(t),s instanceof e?[s]:s.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,s){var o;if(this.else=(o=this.else)===null||o===void 0?void 0:o.optimizeNames(t,s),!!(super.optimizeNames(t,s)||this.else))return this.condition=Bs(this.condition,t,s),this}get names(){let t=super.names;return kn(t,this.condition),this.else&&ds(t,this.else.names),t}}return e.kind="if",e})(),Sn=(()=>{class e extends hi{}return e.kind="for",e})(),hl=class extends Sn{constructor(i){super(),this.iteration=i}render(i){return`for(${this.iteration})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iteration=Bs(this.iteration,i,t),this}get names(){return ds(super.names,this.iteration.names)}},_l=class extends Sn{constructor(i,t,s,o){super(),this.varKind=i,this.name=t,this.from=s,this.to=o}render(i){let t=i.es5?Wt.varKinds.var:this.varKind,{name:s,from:o,to:r}=this;return`for(${t} ${s}=${o}; ${s}<${r}; ${s}++)`+super.render(i)}get names(){let i=kn(super.names,this.from);return kn(i,this.to)}},wn=class extends Sn{constructor(i,t,s,o){super(),this.loop=i,this.varKind=t,this.name=s,this.iterable=o}render(i){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iterable=Bs(this.iterable,i,t),this}get names(){return ds(super.names,this.iterable.names)}},Bg=(()=>{class e extends hi{constructor(t,s,o){super(),this.name=t,this.args=s,this.async=o}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),Eg=(()=>{class e extends xo{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),bl=class extends hi{render(i){let t="try"+super.render(i);return this.catch&&(t+=this.catch.render(i)),this.finally&&(t+=this.finally.render(i)),t}optimizeNodes(){var i,t;return super.optimizeNodes(),(i=this.catch)===null||i===void 0||i.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(i,t){var s,o;return super.optimizeNames(i,t),(s=this.catch)===null||s===void 0||s.optimizeNames(i,t),(o=this.finally)===null||o===void 0||o.optimizeNames(i,t),this}get names(){let i=super.names;return this.catch&&ds(i,this.catch.names),this.finally&&ds(i,this.finally.names),i}},Ug=(()=>{class e extends hi{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),Rg=(()=>{class e extends hi{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),fl=class{constructor(i,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=xe(J({},t),{_n:t.lines?`
|
|
1
|
+
import{a as Ag}from"./chunk-JQJAMZI2.js";import{a as tl,c as Tg,d as Pg,e as Ds,f as ri,g as CS}from"./chunk-IA32PJPE.js";import{a as kg}from"./chunk-EEI3BPIT.js";import{a as Ig}from"./chunk-2XWUBKEU.js";import{a as jg}from"./chunk-7SEIUUE7.js";import{a as Sg,b as Cg,c as xg}from"./chunk-V2NELL63.js";import{a as ko}from"./chunk-QUBAEQEC.js";import{a as zg}from"./chunk-RRPADCBT.js";import{a as gn,b as hn}from"./chunk-SRHJQ5GP.js";import{a as pn,b as mn}from"./chunk-UFVCERK3.js";import{a as Hg}from"./chunk-4MSFCTVQ.js";import{a as nn,b as an,c as ln,d as dn,e as cn,f as un,g as Ns,m as Re,n as et,o as bg,p as fg,q as yg,r as vg,s as wg,t as Ei}from"./chunk-QRNW5KEK.js";import{A as wo,a as dg,b as Ni,c as js,e as yt,f as cg,h as ug,i as gg,j as pg,k as mg,l as Di,m as hg,o as Bi,r as As,s as ns,t as as,y as _g,z as Yt}from"./chunk-GHMXPHAP.js";import{a as Ri}from"./chunk-RMAGF64Q.js";import{d as oi}from"./chunk-WZ6F47WI.js";import{b as Oe}from"./chunk-M425JDIT.js";import{k as He,m as Ui,n as ve}from"./chunk-6WJPBOPW.js";import{a as ke,b as Fe}from"./chunk-77UFZWOO.js";import{d as lg}from"./chunk-KIMRA3K7.js";import{$ as vo,$a as Qu,Ac as og,Bc as rg,Ca as Ti,Cc as Pe,D as Gu,Da as Zu,Dc as Gt,Ec as os,Fa as Ts,Fc as Et,Gc as zs,Hb as Y,Ib as I,Jb as T,Jc as H,Kc as C,Lb as ut,Lc as Ke,M as xs,Mb as gt,Nb as pt,Ob as y,Pb as m,Qb as p,Rb as x,Sb as Xr,Sc as mt,Tb as en,Tc as V,Ub as tn,Uc as Ai,Vb as tg,Wb as ig,Wc as ng,Xa as he,Y as Za,_b as $,a as J,ab as u,b as xe,bc as R,c as qu,cc as sn,dc as b,e as _,ea as Yu,fa as Pt,fb as Zr,g as je,ga as Is,gb as pi,h as G,hc as Qa,ia as Wu,ib as ts,ic as Xa,id as Ut,ja as Ju,jc as el,jd as rs,k as Ku,ka as z,kc as Pi,kd as ht,lc as zi,mb as Q,mc as sg,n as Tt,nb as Ps,nc as Lt,o as Ja,ob as is,oc as ji,pb as Xu,pc as Z,q as Vu,qa as E,qc as w,ra as U,rc as K,rd as rn,sb as de,sc as O,tc as ss,ub as eg,uc as on,v as $u,vb as Qr,w as le,x as Lu,xc as Ae,yc as Ne,yd as ag,za as Jr,zc as De}from"./chunk-3CKT2OQ7.js";var Co=_(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.regexpCode=ye.getEsmExportName=ye.getProperty=ye.safeStringify=ye.stringify=ye.strConcat=ye.addCodeArg=ye.str=ye._=ye.nil=ye._Code=ye.Name=ye.IDENTIFIER=ye._CodeOrName=void 0;var Ho=class{};ye._CodeOrName=Ho;ye.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var ls=class extends Ho{constructor(i){if(super(),!ye.IDENTIFIER.test(i))throw new Error("CodeGen: name must be a valid identifier");this.str=i}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};ye.Name=ls;var Rt=class extends Ho{constructor(i){super(),this._items=typeof i=="string"?[i]:i}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let i=this._items[0];return i===""||i==='""'}get str(){var i;return(i=this._str)!==null&&i!==void 0?i:this._str=this._items.reduce((t,s)=>`${t}${s}`,"")}get names(){var i;return(i=this._names)!==null&&i!==void 0?i:this._names=this._items.reduce((t,s)=>(s instanceof ls&&(t[s.str]=(t[s.str]||0)+1),t),{})}};ye._Code=Rt;ye.nil=new Rt("");function Ng(e,...i){let t=[e[0]],s=0;for(;s<i.length;)sl(t,i[s]),t.push(e[++s]);return new Rt(t)}ye._=Ng;var il=new Rt("+");function Dg(e,...i){let t=[So(e[0])],s=0;for(;s<i.length;)t.push(il),sl(t,i[s]),t.push(il,So(e[++s]));return xS(t),new Rt(t)}ye.str=Dg;function sl(e,i){i instanceof Rt?e.push(...i._items):i instanceof ls?e.push(i):e.push(PS(i))}ye.addCodeArg=sl;function xS(e){let i=1;for(;i<e.length-1;){if(e[i]===il){let t=IS(e[i-1],e[i+1]);if(t!==void 0){e.splice(i-1,3,t);continue}e[i++]="+"}i++}}function IS(e,i){if(i==='""')return e;if(e==='""')return i;if(typeof e=="string")return i instanceof ls||e[e.length-1]!=='"'?void 0:typeof i!="string"?`${e.slice(0,-1)}${i}"`:i[0]==='"'?e.slice(0,-1)+i.slice(1):void 0;if(typeof i=="string"&&i[0]==='"'&&!(e instanceof ls))return`"${e}${i.slice(1)}`}function TS(e,i){return i.emptyStr()?e:e.emptyStr()?i:Dg`${e}${i}`}ye.strConcat=TS;function PS(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:So(Array.isArray(e)?e.join(","):e)}function zS(e){return new Rt(So(e))}ye.stringify=zS;function So(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ye.safeStringify=So;function jS(e){return typeof e=="string"&&ye.IDENTIFIER.test(e)?new Rt(`.${e}`):Ng`[${e}]`}ye.getProperty=jS;function AS(e){if(typeof e=="string"&&ye.IDENTIFIER.test(e))return new Rt(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}ye.getEsmExportName=AS;function NS(e){return new Rt(e.toString())}ye.regexpCode=NS});var nl=_(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.ValueScope=wt.ValueScopeName=wt.Scope=wt.varKinds=wt.UsedValueState=void 0;var vt=Co(),ol=class extends Error{constructor(i){super(`CodeGen: "code" for ${i} not defined`),this.value=i.value}},_n=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(_n||(wt.UsedValueState=_n={}));wt.varKinds={const:new vt.Name("const"),let:new vt.Name("let"),var:new vt.Name("var")};var bn=class{constructor({prefixes:i,parent:t}={}){this._names={},this._prefixes=i,this._parent=t}toName(i){return i instanceof vt.Name?i:this.name(i)}name(i){return new vt.Name(this._newName(i))}_newName(i){let t=this._names[i]||this._nameGroup(i);return`${i}${t.index++}`}_nameGroup(i){var t,s;if(!((s=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||s===void 0)&&s.has(i)||this._prefixes&&!this._prefixes.has(i))throw new Error(`CodeGen: prefix "${i}" is not allowed in this scope`);return this._names[i]={prefix:i,index:0}}};wt.Scope=bn;var fn=class extends vt.Name{constructor(i,t){super(t),this.prefix=i}setValue(i,{property:t,itemIndex:s}){this.value=i,this.scopePath=(0,vt._)`.${new vt.Name(t)}[${s}]`}};wt.ValueScopeName=fn;var DS=(0,vt._)`\n`,rl=class extends bn{constructor(i){super(i),this._values={},this._scope=i.scope,this.opts=xe(J({},i),{_n:i.lines?DS:vt.nil})}get(){return this._scope}name(i){return new fn(i,this._newName(i))}value(i,t){var s;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let o=this.toName(i),{prefix:r}=o,n=(s=t.key)!==null&&s!==void 0?s:t.ref,a=this._values[r];if(a){let c=a.get(n);if(c)return c}else a=this._values[r]=new Map;a.set(n,o);let l=this._scope[r]||(this._scope[r]=[]),d=l.length;return l[d]=t.ref,o.setValue(t,{property:r,itemIndex:d}),o}getValue(i,t){let s=this._values[i];if(s)return s.get(t)}scopeRefs(i,t=this._values){return this._reduceValues(t,s=>{if(s.scopePath===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return(0,vt._)`${i}${s.scopePath}`})}scopeCode(i=this._values,t,s){return this._reduceValues(i,o=>{if(o.value===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return o.value.code},t,s)}_reduceValues(i,t,s={},o){let r=vt.nil;for(let n in i){let a=i[n];if(!a)continue;let l=s[n]=s[n]||new Map;a.forEach(d=>{if(l.has(d))return;l.set(d,_n.Started);let c=t(d);if(c){let g=this.opts.es5?wt.varKinds.var:wt.varKinds.const;r=(0,vt._)`${r}${g} ${d} = ${c};${this.opts._n}`}else if(c=o?.(d))r=(0,vt._)`${r}${c}${this.opts._n}`;else throw new ol(d);l.set(d,_n.Completed)})}return r}};wt.ValueScope=rl});var ee=_(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.or=ce.and=ce.not=ce.CodeGen=ce.operators=ce.varKinds=ce.ValueScopeName=ce.ValueScope=ce.Scope=ce.Name=ce.regexpCode=ce.stringify=ce.getProperty=ce.nil=ce.strConcat=ce.str=ce._=void 0;var _e=Co(),Wt=nl(),Fi=Co();Object.defineProperty(ce,"_",{enumerable:!0,get:function(){return Fi._}});Object.defineProperty(ce,"str",{enumerable:!0,get:function(){return Fi.str}});Object.defineProperty(ce,"strConcat",{enumerable:!0,get:function(){return Fi.strConcat}});Object.defineProperty(ce,"nil",{enumerable:!0,get:function(){return Fi.nil}});Object.defineProperty(ce,"getProperty",{enumerable:!0,get:function(){return Fi.getProperty}});Object.defineProperty(ce,"stringify",{enumerable:!0,get:function(){return Fi.stringify}});Object.defineProperty(ce,"regexpCode",{enumerable:!0,get:function(){return Fi.regexpCode}});Object.defineProperty(ce,"Name",{enumerable:!0,get:function(){return Fi.Name}});var Hn=nl();Object.defineProperty(ce,"Scope",{enumerable:!0,get:function(){return Hn.Scope}});Object.defineProperty(ce,"ValueScope",{enumerable:!0,get:function(){return Hn.ValueScope}});Object.defineProperty(ce,"ValueScopeName",{enumerable:!0,get:function(){return Hn.ValueScopeName}});Object.defineProperty(ce,"varKinds",{enumerable:!0,get:function(){return Hn.varKinds}});ce.operators={GT:new _e._Code(">"),GTE:new _e._Code(">="),LT:new _e._Code("<"),LTE:new _e._Code("<="),EQ:new _e._Code("==="),NEQ:new _e._Code("!=="),NOT:new _e._Code("!"),OR:new _e._Code("||"),AND:new _e._Code("&&"),ADD:new _e._Code("+")};var mi=class{optimizeNodes(){return this}optimizeNames(i,t){return this}},al=class extends mi{constructor(i,t,s){super(),this.varKind=i,this.name=t,this.rhs=s}render({es5:i,_n:t}){let s=i?Wt.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${o};`+t}optimizeNames(i,t){if(i[this.name.str])return this.rhs&&(this.rhs=Bs(this.rhs,i,t)),this}get names(){return this.rhs instanceof _e._CodeOrName?this.rhs.names:{}}},vn=class extends mi{constructor(i,t,s){super(),this.lhs=i,this.rhs=t,this.sideEffects=s}render({_n:i}){return`${this.lhs} = ${this.rhs};`+i}optimizeNames(i,t){if(!(this.lhs instanceof _e.Name&&!i[this.lhs.str]&&!this.sideEffects))return this.rhs=Bs(this.rhs,i,t),this}get names(){let i=this.lhs instanceof _e.Name?{}:J({},this.lhs.names);return kn(i,this.rhs)}},ll=class extends vn{constructor(i,t,s,o){super(i,s,o),this.op=t}render({_n:i}){return`${this.lhs} ${this.op}= ${this.rhs};`+i}},dl=class extends mi{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`${this.label}:`+i}},cl=class extends mi{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`break${this.label?` ${this.label}`:""};`+i}},ul=class extends mi{constructor(i){super(),this.error=i}render({_n:i}){return`throw ${this.error};`+i}get names(){return this.error.names}},gl=class extends mi{constructor(i){super(),this.code=i}render({_n:i}){return`${this.code};`+i}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(i,t){return this.code=Bs(this.code,i,t),this}get names(){return this.code instanceof _e._CodeOrName?this.code.names:{}}},xo=class extends mi{constructor(i=[]){super(),this.nodes=i}render(i){return this.nodes.reduce((t,s)=>t+s.render(i),"")}optimizeNodes(){let{nodes:i}=this,t=i.length;for(;t--;){let s=i[t].optimizeNodes();Array.isArray(s)?i.splice(t,1,...s):s?i[t]=s:i.splice(t,1)}return i.length>0?this:void 0}optimizeNames(i,t){let{nodes:s}=this,o=s.length;for(;o--;){let r=s[o];r.optimizeNames(i,t)||(BS(i,r.names),s.splice(o,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((i,t)=>ds(i,t.names),{})}},hi=class extends xo{render(i){return"{"+i._n+super.render(i)+"}"+i._n}},pl=class extends xo{},ml=(()=>{class e extends hi{}return e.kind="else",e})(),yn=(()=>{class e extends hi{constructor(t,s){super(s),this.condition=t}render(t){let s=`if(${this.condition})`+super.render(t);return this.else&&(s+="else "+this.else.render(t)),s}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let s=this.else;if(s){let o=s.optimizeNodes();s=this.else=Array.isArray(o)?new ml(o):o}if(s)return t===!1?s instanceof e?s:s.nodes:this.nodes.length?this:new e(Fg(t),s instanceof e?[s]:s.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,s){var o;if(this.else=(o=this.else)===null||o===void 0?void 0:o.optimizeNames(t,s),!!(super.optimizeNames(t,s)||this.else))return this.condition=Bs(this.condition,t,s),this}get names(){let t=super.names;return kn(t,this.condition),this.else&&ds(t,this.else.names),t}}return e.kind="if",e})(),Sn=(()=>{class e extends hi{}return e.kind="for",e})(),hl=class extends Sn{constructor(i){super(),this.iteration=i}render(i){return`for(${this.iteration})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iteration=Bs(this.iteration,i,t),this}get names(){return ds(super.names,this.iteration.names)}},_l=class extends Sn{constructor(i,t,s,o){super(),this.varKind=i,this.name=t,this.from=s,this.to=o}render(i){let t=i.es5?Wt.varKinds.var:this.varKind,{name:s,from:o,to:r}=this;return`for(${t} ${s}=${o}; ${s}<${r}; ${s}++)`+super.render(i)}get names(){let i=kn(super.names,this.from);return kn(i,this.to)}},wn=class extends Sn{constructor(i,t,s,o){super(),this.loop=i,this.varKind=t,this.name=s,this.iterable=o}render(i){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iterable=Bs(this.iterable,i,t),this}get names(){return ds(super.names,this.iterable.names)}},Bg=(()=>{class e extends hi{constructor(t,s,o){super(),this.name=t,this.args=s,this.async=o}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),Eg=(()=>{class e extends xo{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),bl=class extends hi{render(i){let t="try"+super.render(i);return this.catch&&(t+=this.catch.render(i)),this.finally&&(t+=this.finally.render(i)),t}optimizeNodes(){var i,t;return super.optimizeNodes(),(i=this.catch)===null||i===void 0||i.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(i,t){var s,o;return super.optimizeNames(i,t),(s=this.catch)===null||s===void 0||s.optimizeNames(i,t),(o=this.finally)===null||o===void 0||o.optimizeNames(i,t),this}get names(){let i=super.names;return this.catch&&ds(i,this.catch.names),this.finally&&ds(i,this.finally.names),i}},Ug=(()=>{class e extends hi{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),Rg=(()=>{class e extends hi{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),fl=class{constructor(i,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=xe(J({},t),{_n:t.lines?`
|
|
2
2
|
`:""}),this._extScope=i,this._scope=new Wt.Scope({parent:i}),this._nodes=[new pl]}toString(){return this._root.render(this.opts)}name(i){return this._scope.name(i)}scopeName(i){return this._extScope.name(i)}scopeValue(i,t){let s=this._extScope.value(i,t);return(this._values[s.prefix]||(this._values[s.prefix]=new Set)).add(s),s}getScopeValue(i,t){return this._extScope.getValue(i,t)}scopeRefs(i){return this._extScope.scopeRefs(i,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(i,t,s,o){let r=this._scope.toName(t);return s!==void 0&&o&&(this._constants[r.str]=s),this._leafNode(new al(i,r,s)),r}const(i,t,s){return this._def(Wt.varKinds.const,i,t,s)}let(i,t,s){return this._def(Wt.varKinds.let,i,t,s)}var(i,t,s){return this._def(Wt.varKinds.var,i,t,s)}assign(i,t,s){return this._leafNode(new vn(i,t,s))}add(i,t){return this._leafNode(new ll(i,ce.operators.ADD,t))}code(i){return typeof i=="function"?i():i!==_e.nil&&this._leafNode(new gl(i)),this}object(...i){let t=["{"];for(let[s,o]of i)t.length>1&&t.push(","),t.push(s),(s!==o||this.opts.es5)&&(t.push(":"),(0,_e.addCodeArg)(t,o));return t.push("}"),new _e._Code(t)}if(i,t,s){if(this._blockNode(new yn(i)),t&&s)this.code(t).else().code(s).endIf();else if(t)this.code(t).endIf();else if(s)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(i){return this._elseNode(new yn(i))}else(){return this._elseNode(new ml)}endIf(){return this._endBlockNode(yn,ml)}_for(i,t){return this._blockNode(i),t&&this.code(t).endFor(),this}for(i,t){return this._for(new hl(i),t)}forRange(i,t,s,o,r=this.opts.es5?Wt.varKinds.var:Wt.varKinds.let){let n=this._scope.toName(i);return this._for(new _l(r,n,t,s),()=>o(n))}forOf(i,t,s,o=Wt.varKinds.const){let r=this._scope.toName(i);if(this.opts.es5){let n=t instanceof _e.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,_e._)`${n}.length`,a=>{this.var(r,(0,_e._)`${n}[${a}]`),s(r)})}return this._for(new wn("of",o,r,t),()=>s(r))}forIn(i,t,s,o=this.opts.es5?Wt.varKinds.var:Wt.varKinds.const){if(this.opts.ownProperties)return this.forOf(i,(0,_e._)`Object.keys(${t})`,s);let r=this._scope.toName(i);return this._for(new wn("in",o,r,t),()=>s(r))}endFor(){return this._endBlockNode(Sn)}label(i){return this._leafNode(new dl(i))}break(i){return this._leafNode(new cl(i))}return(i){let t=new Eg;if(this._blockNode(t),this.code(i),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Eg)}try(i,t,s){if(!t&&!s)throw new Error('CodeGen: "try" without "catch" and "finally"');let o=new bl;if(this._blockNode(o),this.code(i),t){let r=this.name("e");this._currNode=o.catch=new Ug(r),t(r)}return s&&(this._currNode=o.finally=new Rg,this.code(s)),this._endBlockNode(Ug,Rg)}throw(i){return this._leafNode(new ul(i))}block(i,t){return this._blockStarts.push(this._nodes.length),i&&this.code(i).endBlock(t),this}endBlock(i){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let s=this._nodes.length-t;if(s<0||i!==void 0&&s!==i)throw new Error(`CodeGen: wrong number of nodes: ${s} vs ${i} expected`);return this._nodes.length=t,this}func(i,t=_e.nil,s,o){return this._blockNode(new Bg(i,t,s)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(Bg)}optimize(i=1){for(;i-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(i){return this._currNode.nodes.push(i),this}_blockNode(i){this._currNode.nodes.push(i),this._nodes.push(i)}_endBlockNode(i,t){let s=this._currNode;if(s instanceof i||t&&s instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${i.kind}/${t.kind}`:i.kind}"`)}_elseNode(i){let t=this._currNode;if(!(t instanceof yn))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=i,this}get _root(){return this._nodes[0]}get _currNode(){let i=this._nodes;return i[i.length-1]}set _currNode(i){let t=this._nodes;t[t.length-1]=i}};ce.CodeGen=fl;function ds(e,i){for(let t in i)e[t]=(e[t]||0)+(i[t]||0);return e}function kn(e,i){return i instanceof _e._CodeOrName?ds(e,i.names):e}function Bs(e,i,t){if(e instanceof _e.Name)return s(e);if(!o(e))return e;return new _e._Code(e._items.reduce((r,n)=>(n instanceof _e.Name&&(n=s(n)),n instanceof _e._Code?r.push(...n._items):r.push(n),r),[]));function s(r){let n=t[r.str];return n===void 0||i[r.str]!==1?r:(delete i[r.str],n)}function o(r){return r instanceof _e._Code&&r._items.some(n=>n instanceof _e.Name&&i[n.str]===1&&t[n.str]!==void 0)}}function BS(e,i){for(let t in i)e[t]=(e[t]||0)-(i[t]||0)}function Fg(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,_e._)`!${yl(e)}`}ce.not=Fg;var ES=Og(ce.operators.AND);function US(...e){return e.reduce(ES)}ce.and=US;var RS=Og(ce.operators.OR);function FS(...e){return e.reduce(RS)}ce.or=FS;function Og(e){return(i,t)=>i===_e.nil?t:t===_e.nil?i:(0,_e._)`${yl(i)} ${e} ${yl(t)}`}function yl(e){return e instanceof _e.Name?e:(0,_e._)`(${e})`}});var ge=_(ue=>{"use strict";Object.defineProperty(ue,"__esModule",{value:!0});ue.checkStrictMode=ue.getErrorPath=ue.Type=ue.useFunc=ue.setEvaluated=ue.evaluatedPropsToName=ue.mergeEvaluated=ue.eachItem=ue.unescapeJsonPointer=ue.escapeJsonPointer=ue.escapeFragment=ue.unescapeFragment=ue.schemaRefOrVal=ue.schemaHasRulesButRef=ue.schemaHasRules=ue.checkUnknownRules=ue.alwaysValidSchema=ue.toHash=void 0;var Ie=ee(),OS=Co();function MS(e){let i={};for(let t of e)i[t]=!0;return i}ue.toHash=MS;function qS(e,i){return typeof i=="boolean"?i:Object.keys(i).length===0?!0:(Kg(e,i),!Vg(i,e.self.RULES.all))}ue.alwaysValidSchema=qS;function Kg(e,i=e.schema){let{opts:t,self:s}=e;if(!t.strictSchema||typeof i=="boolean")return;let o=s.RULES.keywords;for(let r in i)o[r]||Gg(e,`unknown keyword: "${r}"`)}ue.checkUnknownRules=Kg;function Vg(e,i){if(typeof e=="boolean")return!e;for(let t in e)if(i[t])return!0;return!1}ue.schemaHasRules=Vg;function KS(e,i){if(typeof e=="boolean")return!e;for(let t in e)if(t!=="$ref"&&i.all[t])return!0;return!1}ue.schemaHasRulesButRef=KS;function VS({topSchemaRef:e,schemaPath:i},t,s,o){if(!o){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,Ie._)`${t}`}return(0,Ie._)`${e}${i}${(0,Ie.getProperty)(s)}`}ue.schemaRefOrVal=VS;function $S(e){return $g(decodeURIComponent(e))}ue.unescapeFragment=$S;function LS(e){return encodeURIComponent(wl(e))}ue.escapeFragment=LS;function wl(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}ue.escapeJsonPointer=wl;function $g(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}ue.unescapeJsonPointer=$g;function GS(e,i){if(Array.isArray(e))for(let t of e)i(t);else i(e)}ue.eachItem=GS;function Mg({mergeNames:e,mergeToName:i,mergeValues:t,resultToName:s}){return(o,r,n,a)=>{let l=n===void 0?r:n instanceof Ie.Name?(r instanceof Ie.Name?e(o,r,n):i(o,r,n),n):r instanceof Ie.Name?(i(o,n,r),r):t(r,n);return a===Ie.Name&&!(l instanceof Ie.Name)?s(o,l):l}}ue.mergeEvaluated={props:Mg({mergeNames:(e,i,t)=>e.if((0,Ie._)`${t} !== true && ${i} !== undefined`,()=>{e.if((0,Ie._)`${i} === true`,()=>e.assign(t,!0),()=>e.assign(t,(0,Ie._)`${t} || {}`).code((0,Ie._)`Object.assign(${t}, ${i})`))}),mergeToName:(e,i,t)=>e.if((0,Ie._)`${t} !== true`,()=>{i===!0?e.assign(t,!0):(e.assign(t,(0,Ie._)`${t} || {}`),kl(e,t,i))}),mergeValues:(e,i)=>e===!0?!0:J(J({},e),i),resultToName:Lg}),items:Mg({mergeNames:(e,i,t)=>e.if((0,Ie._)`${t} !== true && ${i} !== undefined`,()=>e.assign(t,(0,Ie._)`${i} === true ? true : ${t} > ${i} ? ${t} : ${i}`)),mergeToName:(e,i,t)=>e.if((0,Ie._)`${t} !== true`,()=>e.assign(t,i===!0?!0:(0,Ie._)`${t} > ${i} ? ${t} : ${i}`)),mergeValues:(e,i)=>e===!0?!0:Math.max(e,i),resultToName:(e,i)=>e.var("items",i)})};function Lg(e,i){if(i===!0)return e.var("props",!0);let t=e.var("props",(0,Ie._)`{}`);return i!==void 0&&kl(e,t,i),t}ue.evaluatedPropsToName=Lg;function kl(e,i,t){Object.keys(t).forEach(s=>e.assign((0,Ie._)`${i}${(0,Ie.getProperty)(s)}`,!0))}ue.setEvaluated=kl;var qg={};function YS(e,i){return e.scopeValue("func",{ref:i,code:qg[i.code]||(qg[i.code]=new OS._Code(i.code))})}ue.useFunc=YS;var vl=function(e){return e[e.Num=0]="Num",e[e.Str=1]="Str",e}(vl||(ue.Type=vl={}));function WS(e,i,t){if(e instanceof Ie.Name){let s=i===vl.Num;return t?s?(0,Ie._)`"[" + ${e} + "]"`:(0,Ie._)`"['" + ${e} + "']"`:s?(0,Ie._)`"/" + ${e}`:(0,Ie._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,Ie.getProperty)(e).toString():"/"+wl(e)}ue.getErrorPath=WS;function Gg(e,i,t=e.opts.strictSchema){if(t){if(i=`strict mode: ${i}`,t===!0)throw new Error(i);e.self.logger.warn(i)}}ue.checkStrictMode=Gg});var Ft=_(Hl=>{"use strict";Object.defineProperty(Hl,"__esModule",{value:!0});var rt=ee(),JS={data:new rt.Name("data"),valCxt:new rt.Name("valCxt"),instancePath:new rt.Name("instancePath"),parentData:new rt.Name("parentData"),parentDataProperty:new rt.Name("parentDataProperty"),rootData:new rt.Name("rootData"),dynamicAnchors:new rt.Name("dynamicAnchors"),vErrors:new rt.Name("vErrors"),errors:new rt.Name("errors"),this:new rt.Name("this"),self:new rt.Name("self"),scope:new rt.Name("scope"),json:new rt.Name("json"),jsonPos:new rt.Name("jsonPos"),jsonLen:new rt.Name("jsonLen"),jsonPart:new rt.Name("jsonPart")};Hl.default=JS});var Io=_(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.extendErrors=nt.resetErrorsCount=nt.reportExtraError=nt.reportError=nt.keyword$DataError=nt.keywordError=void 0;var fe=ee(),Cn=ge(),_t=Ft();nt.keywordError={message:({keyword:e})=>(0,fe.str)`must pass "${e}" keyword validation`};nt.keyword$DataError={message:({keyword:e,schemaType:i})=>i?(0,fe.str)`"${e}" keyword must be ${i} ($data)`:(0,fe.str)`"${e}" keyword is invalid ($data)`};function ZS(e,i=nt.keywordError,t,s){let{it:o}=e,{gen:r,compositeRule:n,allErrors:a}=o,l=Jg(e,i,t);s??(n||a)?Yg(r,l):Wg(o,(0,fe._)`[${l}]`)}nt.reportError=ZS;function QS(e,i=nt.keywordError,t){let{it:s}=e,{gen:o,compositeRule:r,allErrors:n}=s,a=Jg(e,i,t);Yg(o,a),r||n||Wg(s,_t.default.vErrors)}nt.reportExtraError=QS;function XS(e,i){e.assign(_t.default.errors,i),e.if((0,fe._)`${_t.default.vErrors} !== null`,()=>e.if(i,()=>e.assign((0,fe._)`${_t.default.vErrors}.length`,i),()=>e.assign(_t.default.vErrors,null)))}nt.resetErrorsCount=XS;function eC({gen:e,keyword:i,schemaValue:t,data:s,errsCount:o,it:r}){if(o===void 0)throw new Error("ajv implementation error");let n=e.name("err");e.forRange("i",o,_t.default.errors,a=>{e.const(n,(0,fe._)`${_t.default.vErrors}[${a}]`),e.if((0,fe._)`${n}.instancePath === undefined`,()=>e.assign((0,fe._)`${n}.instancePath`,(0,fe.strConcat)(_t.default.instancePath,r.errorPath))),e.assign((0,fe._)`${n}.schemaPath`,(0,fe.str)`${r.errSchemaPath}/${i}`),r.opts.verbose&&(e.assign((0,fe._)`${n}.schema`,t),e.assign((0,fe._)`${n}.data`,s))})}nt.extendErrors=eC;function Yg(e,i){let t=e.const("err",i);e.if((0,fe._)`${_t.default.vErrors} === null`,()=>e.assign(_t.default.vErrors,(0,fe._)`[${t}]`),(0,fe._)`${_t.default.vErrors}.push(${t})`),e.code((0,fe._)`${_t.default.errors}++`)}function Wg(e,i){let{gen:t,validateName:s,schemaEnv:o}=e;o.$async?t.throw((0,fe._)`new ${e.ValidationError}(${i})`):(t.assign((0,fe._)`${s}.errors`,i),t.return(!1))}var cs={keyword:new fe.Name("keyword"),schemaPath:new fe.Name("schemaPath"),params:new fe.Name("params"),propertyName:new fe.Name("propertyName"),message:new fe.Name("message"),schema:new fe.Name("schema"),parentSchema:new fe.Name("parentSchema")};function Jg(e,i,t){let{createErrors:s}=e.it;return s===!1?(0,fe._)`{}`:tC(e,i,t)}function tC(e,i,t={}){let{gen:s,it:o}=e,r=[iC(o,t),sC(e,t)];return oC(e,i,r),s.object(...r)}function iC({errorPath:e},{instancePath:i}){let t=i?(0,fe.str)`${e}${(0,Cn.getErrorPath)(i,Cn.Type.Str)}`:e;return[_t.default.instancePath,(0,fe.strConcat)(_t.default.instancePath,t)]}function sC({keyword:e,it:{errSchemaPath:i}},{schemaPath:t,parentSchema:s}){let o=s?i:(0,fe.str)`${i}/${e}`;return t&&(o=(0,fe.str)`${o}${(0,Cn.getErrorPath)(t,Cn.Type.Str)}`),[cs.schemaPath,o]}function oC(e,{params:i,message:t},s){let{keyword:o,data:r,schemaValue:n,it:a}=e,{opts:l,propertyName:d,topSchemaRef:c,schemaPath:g}=a;s.push([cs.keyword,o],[cs.params,typeof i=="function"?i(e):i||(0,fe._)`{}`]),l.messages&&s.push([cs.message,typeof t=="function"?t(e):t]),l.verbose&&s.push([cs.schema,n],[cs.parentSchema,(0,fe._)`${c}${g}`],[_t.default.data,r]),d&&s.push([cs.propertyName,d])}});var Qg=_(Es=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});Es.boolOrEmptySchema=Es.topBoolOrEmptySchema=void 0;var rC=Io(),nC=ee(),aC=Ft(),lC={message:"boolean schema is false"};function dC(e){let{gen:i,schema:t,validateName:s}=e;t===!1?Zg(e,!1):typeof t=="object"&&t.$async===!0?i.return(aC.default.data):(i.assign((0,nC._)`${s}.errors`,null),i.return(!0))}Es.topBoolOrEmptySchema=dC;function cC(e,i){let{gen:t,schema:s}=e;s===!1?(t.var(i,!1),Zg(e)):t.var(i,!0)}Es.boolOrEmptySchema=cC;function Zg(e,i){let{gen:t,data:s}=e,o={gen:t,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,rC.reportError)(o,lC,void 0,i)}});var Sl=_(Us=>{"use strict";Object.defineProperty(Us,"__esModule",{value:!0});Us.getRules=Us.isJSONType=void 0;var uC=["string","number","integer","boolean","null","object","array"],gC=new Set(uC);function pC(e){return typeof e=="string"&&gC.has(e)}Us.isJSONType=pC;function mC(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:xe(J({},e),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}Us.getRules=mC});var Cl=_(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});Oi.shouldUseRule=Oi.shouldUseGroup=Oi.schemaHasRulesForType=void 0;function hC({schema:e,self:i},t){let s=i.RULES.types[t];return s&&s!==!0&&Xg(e,s)}Oi.schemaHasRulesForType=hC;function Xg(e,i){return i.rules.some(t=>ep(e,t))}Oi.shouldUseGroup=Xg;function ep(e,i){var t;return e[i.keyword]!==void 0||((t=i.definition.implements)===null||t===void 0?void 0:t.some(s=>e[s]!==void 0))}Oi.shouldUseRule=ep});var To=_(at=>{"use strict";Object.defineProperty(at,"__esModule",{value:!0});at.reportTypeError=at.checkDataTypes=at.checkDataType=at.coerceAndCheckDataType=at.getJSONTypes=at.getSchemaTypes=at.DataType=void 0;var _C=Sl(),bC=Cl(),fC=Io(),ne=ee(),tp=ge(),Rs=function(e){return e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong",e}(Rs||(at.DataType=Rs={}));function yC(e){let i=ip(e.type);if(i.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!i.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&i.push("null")}return i}at.getSchemaTypes=yC;function ip(e){let i=Array.isArray(e)?e:e?[e]:[];if(i.every(_C.isJSONType))return i;throw new Error("type must be JSONType or JSONType[]: "+i.join(","))}at.getJSONTypes=ip;function vC(e,i){let{gen:t,data:s,opts:o}=e,r=wC(i,o.coerceTypes),n=i.length>0&&!(r.length===0&&i.length===1&&(0,bC.schemaHasRulesForType)(e,i[0]));if(n){let a=Il(i,s,o.strictNumbers,Rs.Wrong);t.if(a,()=>{r.length?kC(e,i,r):Tl(e)})}return n}at.coerceAndCheckDataType=vC;var sp=new Set(["string","number","integer","boolean","null"]);function wC(e,i){return i?e.filter(t=>sp.has(t)||i==="array"&&t==="array"):[]}function kC(e,i,t){let{gen:s,data:o,opts:r}=e,n=s.let("dataType",(0,ne._)`typeof ${o}`),a=s.let("coerced",(0,ne._)`undefined`);r.coerceTypes==="array"&&s.if((0,ne._)`${n} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>s.assign(o,(0,ne._)`${o}[0]`).assign(n,(0,ne._)`typeof ${o}`).if(Il(i,o,r.strictNumbers),()=>s.assign(a,o))),s.if((0,ne._)`${a} !== undefined`);for(let d of t)(sp.has(d)||d==="array"&&r.coerceTypes==="array")&&l(d);s.else(),Tl(e),s.endIf(),s.if((0,ne._)`${a} !== undefined`,()=>{s.assign(o,a),HC(e,a)});function l(d){switch(d){case"string":s.elseIf((0,ne._)`${n} == "number" || ${n} == "boolean"`).assign(a,(0,ne._)`"" + ${o}`).elseIf((0,ne._)`${o} === null`).assign(a,(0,ne._)`""`);return;case"number":s.elseIf((0,ne._)`${n} == "boolean" || ${o} === null
|
|
3
3
|
|| (${n} == "string" && ${o} && ${o} == +${o})`).assign(a,(0,ne._)`+${o}`);return;case"integer":s.elseIf((0,ne._)`${n} === "boolean" || ${o} === null
|
|
4
4
|
|| (${n} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(a,(0,ne._)`+${o}`);return;case"boolean":s.elseIf((0,ne._)`${o} === "false" || ${o} === 0 || ${o} === null`).assign(a,!1).elseIf((0,ne._)`${o} === "true" || ${o} === 1`).assign(a,!0);return;case"null":s.elseIf((0,ne._)`${o} === "" || ${o} === 0 || ${o} === false`),s.assign(a,null);return;case"array":s.elseIf((0,ne._)`${n} === "string" || ${n} === "number"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as u,g as n}from"./chunk-WZ6F47WI.js";import{k as l,n as d}from"./chunk-
|
|
1
|
+
import{d as u,g as n}from"./chunk-WZ6F47WI.js";import{k as l,n as d}from"./chunk-6WJPBOPW.js";import{a as f}from"./chunk-77UFZWOO.js";import"./chunk-KIMRA3K7.js";import{fa as p,ga as i,h as m,ka as o,nb as s,w as c}from"./chunk-3CKT2OQ7.js";var a=(()=>{class r{$api=o(d);$router=o(u);$toastr=o(l);$translate=o(f);resolve(){return m(this,null,function*(){try{return yield c(this.$api.get("/users"))}catch(t){console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error")),this.$router.navigate(["/"])}})}static \u0275fac=function(e){return new(e||r)};static \u0275prov=p({token:r,factory:r.\u0275fac})}return r})();var h=[{path:"",loadComponent:()=>import("./chunk-4F3BAQ5O.js").then(r=>r.UsersComponent),resolve:{homebridgeUsers:a}}],v=(()=>{class r{static \u0275fac=function(e){return new(e||r)};static \u0275mod=s({type:r});static \u0275inj=i({imports:[n.forChild(h),n]})}return r})();var T=(()=>{class r{static \u0275fac=function(e){return new(e||r)};static \u0275mod=s({type:r});static \u0275inj=i({providers:[a],imports:[v]})}return r})();export{T as UsersModule};
|