homebridge-config-ui-x 5.3.1-beta.12 → 5.3.1-beta.13

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.
Files changed (94) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/package.json +1 -1
  3. package/public/assets/accessory-icons/air-purifier.svg +1 -11
  4. package/public/assets/accessory-icons/contact-sensor.svg +45 -0
  5. package/public/chunk-2X6JIXBJ.js +12 -0
  6. package/public/{chunk-JKJHLGVC.js → chunk-3DSPE7GJ.js} +1 -1
  7. package/public/{chunk-YLMTQPGU.js → chunk-4FCAJYAY.js} +1 -1
  8. package/public/{chunk-MTMHNGPO.js → chunk-5CXUHYYU.js} +1 -1
  9. package/public/{chunk-W4W37SH5.js → chunk-5EOVZCNY.js} +1 -1
  10. package/public/{chunk-BS5ST2OL.js → chunk-6KZ73TWH.js} +1 -1
  11. package/public/{chunk-N7EZXKV6.js → chunk-7JSZLOAR.js} +1 -1
  12. package/public/{chunk-U7LHGRNR.js → chunk-7K45YNNW.js} +1 -1
  13. package/public/{chunk-5W57S525.js → chunk-7KOOVJKG.js} +1 -1
  14. package/public/{chunk-J7WULMVX.js → chunk-7LN6QR4H.js} +1 -1
  15. package/public/{chunk-JGMM5V4L.js → chunk-AI2E5XQJ.js} +1 -1
  16. package/public/{chunk-CQTV7GFN.js → chunk-AM5BQOZR.js} +1 -1
  17. package/public/{chunk-QKWWJ6LS.js → chunk-AP3T467N.js} +1 -1
  18. package/public/{chunk-KE7FIF36.js → chunk-CJUCE7Y6.js} +1 -1
  19. package/public/{chunk-BB7BMNZ5.js → chunk-CUH5VGTG.js} +1 -1
  20. package/public/{chunk-UF7VL23T.js → chunk-CXEQVJNG.js} +1 -1
  21. package/public/{chunk-V2ZBY57I.js → chunk-EA6YVIQU.js} +1 -1
  22. package/public/{chunk-MEA7IEYM.js → chunk-F4YE22QV.js} +1 -1
  23. package/public/{chunk-OE7MOFW7.js → chunk-G7T7KOJA.js} +1 -1
  24. package/public/{chunk-QFHRMLON.js → chunk-HCBFHEMF.js} +1 -1
  25. package/public/{chunk-4KCBKGRR.js → chunk-HJHH7Y7A.js} +1 -1
  26. package/public/{chunk-DTK2DKDU.js → chunk-K2Y5ABFE.js} +1 -1
  27. package/public/{chunk-FQIIP3PN.js → chunk-K6MSIPN4.js} +1 -1
  28. package/public/{chunk-DGAMOEAQ.js → chunk-KXS3TLYQ.js} +1 -1
  29. package/public/{chunk-GG2D4T4P.js → chunk-LNH65L44.js} +1 -1
  30. package/public/{chunk-WMCF6NAJ.js → chunk-M3BLV5IG.js} +1 -1
  31. package/public/{chunk-XKYV2F36.js → chunk-M76NCR73.js} +1 -1
  32. package/public/{chunk-JLSZYWUI.js → chunk-MPW2CV3F.js} +1 -1
  33. package/public/{chunk-SO5OSLLM.js → chunk-NG6DMWDO.js} +1 -1
  34. package/public/{chunk-KV2FDS74.js → chunk-NVZBF2L7.js} +1 -1
  35. package/public/{chunk-TVOMC6TE.js → chunk-PF7WC27K.js} +1 -1
  36. package/public/{chunk-I6XAD3RL.js → chunk-PJMVE7ND.js} +1 -1
  37. package/public/{chunk-I62E22ZI.js → chunk-PL62KZEB.js} +1 -1
  38. package/public/{chunk-3TYIDWEK.js → chunk-QQPSHTC2.js} +1 -1
  39. package/public/{chunk-DFLQA6JZ.js → chunk-QXQRV4WW.js} +1 -1
  40. package/public/{chunk-S3TVGXBV.js → chunk-R42SJDLQ.js} +1 -1
  41. package/public/{chunk-6KIUATW6.js → chunk-TGW72B3Y.js} +1 -1
  42. package/public/{chunk-4ND3C2F7.js → chunk-TYTYQHIZ.js} +1 -1
  43. package/public/{chunk-4VESQ6LL.js → chunk-UBQOKDSO.js} +1 -1
  44. package/public/{chunk-THIRFSHL.js → chunk-UIMHMEZF.js} +1 -1
  45. package/public/{chunk-RGHOKFFM.js → chunk-VCWU3EQT.js} +1 -1
  46. package/public/{chunk-KG7Z7CI7.js → chunk-VG3QEH5O.js} +1 -1
  47. package/public/{chunk-DEBQ5JMA.js → chunk-VYIG4YRS.js} +1 -1
  48. package/public/chunk-WBJOO4V7.js +1 -0
  49. package/public/{chunk-KJV5QZPK.js → chunk-WEQ2PIH6.js} +1 -1
  50. package/public/{chunk-E3F5ICTU.js → chunk-X52P3KFH.js} +1 -1
  51. package/public/{chunk-K2ZZ3JAN.js → chunk-Y7SBCRZV.js} +1 -1
  52. package/public/{chunk-KXCKM2H4.js → chunk-ZC53O5GD.js} +1 -1
  53. package/public/index.html +1 -1
  54. package/public/{main-J4NXE6O5.js → main-LEWM4WGX.js} +1 -1
  55. package/public/assets/hap-icons/contact-sensor-closed.svg +0 -36
  56. package/public/assets/hap-icons/contact-sensor-open.svg +0 -81
  57. package/public/assets/monaco/min/vs/editor/editor.main.nls.de.js +0 -41
  58. package/public/assets/monaco/min/vs/editor/editor.main.nls.es.js +0 -42
  59. package/public/assets/monaco/min/vs/editor/editor.main.nls.fr.js +0 -43
  60. package/public/assets/monaco/min/vs/editor/editor.main.nls.it.js +0 -43
  61. package/public/assets/monaco/min/vs/editor/editor.main.nls.ja.js +0 -31
  62. package/public/assets/monaco/min/vs/editor/editor.main.nls.ko.js +0 -31
  63. package/public/assets/monaco/min/vs/editor/editor.main.nls.ru.js +0 -42
  64. package/public/assets/monaco/min/vs/editor/editor.main.nls.zh-cn.js +0 -26
  65. package/public/assets/monaco/min/vs/editor/editor.main.nls.zh-tw.js +0 -27
  66. package/public/assets/monaco/min-maps/vs/base/worker/workerMain.js.map +0 -1
  67. package/public/assets/monaco/min-maps/vs/editor/editor.main.js.map +0 -1
  68. package/public/assets/monaco/min-maps/vs/editor/editor.main.nls.de.js.map +0 -1
  69. package/public/assets/monaco/min-maps/vs/editor/editor.main.nls.es.js.map +0 -1
  70. package/public/assets/monaco/min-maps/vs/editor/editor.main.nls.fr.js.map +0 -1
  71. package/public/assets/monaco/min-maps/vs/editor/editor.main.nls.it.js.map +0 -1
  72. package/public/assets/monaco/min-maps/vs/editor/editor.main.nls.ja.js.map +0 -1
  73. package/public/assets/monaco/min-maps/vs/editor/editor.main.nls.js.map +0 -1
  74. package/public/assets/monaco/min-maps/vs/editor/editor.main.nls.ko.js.map +0 -1
  75. package/public/assets/monaco/min-maps/vs/editor/editor.main.nls.ru.js.map +0 -1
  76. package/public/assets/monaco/min-maps/vs/editor/editor.main.nls.zh-cn.js.map +0 -1
  77. package/public/assets/monaco/min-maps/vs/editor/editor.main.nls.zh-tw.js.map +0 -1
  78. package/public/assets/monaco/min-maps/vs/loader.js.map +0 -1
  79. package/public/assets/monaco/monaco.d.ts +0 -7144
  80. package/public/chunk-FP7TVFBN.js +0 -12
  81. package/public/chunk-GZPPQR2X.js +0 -1
  82. /package/public/assets/{monaco → monaco-0.21.3}/LICENSE +0 -0
  83. /package/public/assets/{monaco → monaco-0.21.3}/README.md +0 -0
  84. /package/public/assets/{monaco → monaco-0.21.3}/ThirdPartyNotices.txt +0 -0
  85. /package/public/assets/{monaco → monaco-0.21.3}/min/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
  86. /package/public/assets/{monaco → monaco-0.21.3}/min/vs/base/worker/workerMain.js +0 -0
  87. /package/public/assets/{monaco → monaco-0.21.3}/min/vs/basic-languages/shell/shell.js +0 -0
  88. /package/public/assets/{monaco → monaco-0.21.3}/min/vs/editor/editor.main.css +0 -0
  89. /package/public/assets/{monaco → monaco-0.21.3}/min/vs/editor/editor.main.js +0 -0
  90. /package/public/assets/{monaco → monaco-0.21.3}/min/vs/editor/editor.main.nls.js +0 -0
  91. /package/public/assets/{monaco → monaco-0.21.3}/min/vs/language/json/jsonMode.js +0 -0
  92. /package/public/assets/{monaco → monaco-0.21.3}/min/vs/language/json/jsonWorker.js +0 -0
  93. /package/public/assets/{monaco → monaco-0.21.3}/min/vs/loader.js +0 -0
  94. /package/public/assets/{monaco → monaco-0.21.3}/package.json +0 -0
@@ -1 +1 @@
1
- import{B as G,C as Q,c as $,d as C,e as B,f as O,g as T,j as w,m as q,q as z,r as D,y as H,z as A}from"./chunk-KUNMS7VX.js";import{b as K}from"./chunk-V2ZBY57I.js";import{d as U}from"./chunk-25NXLXGL.js";import{b as J}from"./chunk-4VESQ6LL.js";import{m as W}from"./chunk-UF7VL23T.js";import{b as j}from"./chunk-CPAHENLQ.js";import"./chunk-RJOGO4M5.js";import{Dc as f,Hc as l,Ib as u,Ic as d,Jb as c,M as I,Ob as m,Pb as r,Qb as a,Rb as s,Sc as b,Uc as L,Xa as x,ab as i,bc as E,dc as M,h as y,id as N,kc as v,la as p,lc as F,ld as V,mb as k,qc as g,rc as h,sc as R,w as S,zd as P}from"./chunk-WEVBEUAJ.js";var Y=["password"],Z=["username"],ee=["otp"],te=e=>({background:e}),ie=e=>({anim:e}),X=e=>({"is-invalid":e});function ne(e,_){if(e&1&&(r(0,"div",8)(1,"span",12),s(2,"i",13),a(),s(3,"input",14,0),l(5,"translate"),a(),r(6,"div",8)(7,"span",12),s(8,"i",15),a(),s(9,"input",16,1),l(11,"translate"),a()),e&2){let n=M();i(3),m("placeholder",d(5,4,"users.label_username"))("ngClass",f(8,X,n.form.controls.username.dirty&&n.form.controls.username.errors)),i(6),m("placeholder",d(11,6,"users.label_password"))("ngClass",f(10,X,n.form.controls.password.dirty&&n.form.controls.password.errors))}}function oe(e,_){e&1&&(r(0,"div",8)(1,"span",12),s(2,"i",17),a(),s(3,"input",18,2),l(5,"translate"),a()),e&2&&(i(3),m("placeholder",d(5,1,"login.label_2fa_code")))}function ae(e,_){e&1&&(r(0,"div",9)(1,"div",12),s(2,"i",19),a(),r(3,"div",20)(4,"div",21),g(5),l(6,"translate"),a(),s(7,"div",22),l(8,"translate"),a()()),e&2&&(i(5),h(d(6,2,"login.invalid_credentials")),i(2),m("innerHTML",d(8,4,"login.invalid_credentials_2"),x))}function re(e,_){e&1&&(r(0,"div",9)(1,"div",12),s(2,"i",19),a(),r(3,"div",20)(4,"div",21),g(5),l(6,"translate"),a(),s(7,"div",22),l(8,"translate"),a()()),e&2&&(i(5),h(d(6,2,"login.invalid_code")),i(2),m("innerHTML",d(8,4,"login.invalid_credentials_2"),x))}var _e=(()=>{class e{$auth=p(K);$cdr=p(L);$router=p(U);$settings=p(J);targetRoute;validNonAdminRoutes=["/accessories","/plugins","/logs","/support"];passwordInput=b("password");usernameInput=b("username");otpInput=b("otp");backgroundStyle;invalidCredentials=!1;invalid2faCode=!1;twoFactorCodeRequired=!1;inProgress=!1;form;ngOnInit(){this.form=new T({username:new w(""),password:new w("")}),this.form.valueChanges.pipe(I(500)).subscribe(n=>{let o=this.passwordInput()?.nativeElement.value;o&&o!==n.password&&this.form.controls.password.setValue(o)}),this.targetRoute=window.sessionStorage.getItem("target_route")||"",this.setBackground()}ngAfterViewChecked(){this.$cdr.detectChanges()}onSubmit(){return y(this,null,function*(){this.invalidCredentials=!1,this.invalid2faCode=!1,this.inProgress=!0,document.getElementById("submit-button")?.blur();let n=this.passwordInput()?.nativeElement.value;n&&n!==this.form.get("password").value&&this.form.controls.password.setValue(n);let o=this.usernameInput()?.nativeElement.value;if(o&&o!==this.form.get("username").value&&this.form.controls.username.setValue(o),this.twoFactorCodeRequired){let t=this.otpInput()?.nativeElement.value;t&&t!==this.form.get("otp").value&&this.form.controls.username.setValue(t)}try{yield this.$auth.login(this.form.getRawValue()),!this.$auth.user.admin&&!this.validNonAdminRoutes.includes(this.targetRoute)&&(this.targetRoute="/"),this.$router.navigateByUrl(this.targetRoute),window.sessionStorage.removeItem("target_route")}catch(t){t.status===412?(this.form.controls.otp?(this.form.controls.otp.setErrors(["Invalid Code"]),this.invalid2faCode=!0):this.form.addControl("otp",new w("",[C.required,C.minLength(6),C.maxLength(6)])),this.twoFactorCodeRequired=!0,setTimeout(()=>{document.getElementById("form-ota").focus()},100)):this.invalidCredentials=!0}this.inProgress=!1})}setBackground(){return y(this,null,function*(){if(this.$settings.settingsLoaded||(yield S(this.$settings.onSettingsLoaded)),this.$settings.env.customWallpaperHash){let n=`${W.api.base}/auth/wallpaper/${this.$settings.env.customWallpaperHash}`;this.backgroundStyle=`url('${n}') center/cover`}})}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=k({type:e,selectors:[["ng-component"]],viewQuery:function(o,t){o&1&&(v(t.passwordInput,Y,5),v(t.usernameInput,Z,5),v(t.otpInput,ee,5)),o&2&&F(3)},decls:15,vars:18,consts:[["username",""],["password",""],["otp",""],[1,"login-container","gradient","d-flex","align-items-start","justify-content-center",3,"ngStyle","ngClass"],[1,"w-100","login-card","d-flex","py-4","flex-column"],["ngSrc","/assets/homebridge-color-round.svg","alt","Homebridge Logo","height","100","width","100","priority","true",1,"homebridge-logo","mx-auto","my-3"],["novalidate","",3,"ngSubmit","formGroup"],[1,"mb-4","text-center"],[1,"input-group","mb-4"],[1,"input-group","no-border","mb-4"],[1,"text-center"],["tabindex","3","id","submit-button","type","submit",1,"btn","btn-primary","mb-2",3,"disabled"],[1,"input-group-text","custom-input"],[1,"fas","fa-fw","fa-user","primary-text","fa-lg"],["formControlName","username","type","text","id","form-username","autofocus","","autocomplete","username","autocapitalize","none","tabindex","1","required","",1,"form-control","custom-input",3,"placeholder","ngClass"],[1,"fas","fa-fw","fa-lock","primary-text","fa-lg"],["formControlName","password","type","password","id","form-pass","autocomplete","current-password","tabindex","2","required","",1,"form-control","custom-input",3,"placeholder","ngClass"],[1,"fas","fa-fw","fa-key","primary-text","fa-lg"],["formControlName","otp","type","text","id","form-ota","autofocus","","autocomplete","one-time-code","autocapitalize","none","inputmode","numeric","pattern","[0-9]*","tabindex","1",1,"form-control","custom-input",3,"placeholder"],[1,"fas","fa-fw","fa-exclamation-triangle","pink-text","fa-lg"],[1,"form-control","custom-input"],[1,"small","grey-text","fw-semibold"],[1,"small","grey-text",3,"innerHTML"]],template:function(o,t){o&1&&(r(0,"div",3)(1,"div",4),s(2,"img",5),r(3,"form",6),E("ngSubmit",function(){return t.onSubmit()}),r(4,"h4",7),g(5),l(6,"translate"),a(),u(7,ne,12,12),u(8,oe,6,3,"div",8),u(9,ae,9,6,"div",9),u(10,re,9,6,"div",9),r(11,"div",10)(12,"button",11),g(13),l(14,"translate"),a()()()()()),o&2&&(m("ngStyle",f(14,te,t.backgroundStyle))("ngClass",f(16,ie,!t.backgroundStyle)),i(3),m("formGroup",t.form),i(2),h(d(6,10,"setup.welcome_to_homebridge")),i(2),c(t.twoFactorCodeRequired?-1:7),i(),c(t.twoFactorCodeRequired?8:-1),i(),c(t.invalidCredentials?9:-1),i(),c(t.invalid2faCode?10:-1),i(2),m("disabled",t.form.invalid),i(),R(" ",d(14,12,"form.button_continue")," "))},dependencies:[V,G,q,$,B,O,H,A,Q,z,D,N,P,j],styles:["body{overflow:scroll!important} body.dark-mode .login-card{background-color:#2b2b2b;color:#fff}.login-container[_ngcontent-%COMP%]{z-index:-1;padding-top:2em;padding-bottom:2em;min-height:100%;background-size:300% 300%}.anim[_ngcontent-%COMP%]{-webkit-animation:_ngcontent-%COMP%_gradient 20s ease infinite;-moz-animation:gradient 20s ease infinite;-o-animation:gradient 20s ease infinite;animation:_ngcontent-%COMP%_gradient 20s ease infinite}@keyframes _ngcontent-%COMP%_gradient{0%{background-position:0 50%}50%{background-position:100% 50%}to{background-position:0 50%}}.login-card[_ngcontent-%COMP%]{max-width:550px;border-radius:1rem;padding-right:25px;padding-left:25px;background-color:#ffffffe6}.login-card[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus{background-color:inherit!important}@media screen and (max-width: 575px){.login-card[_ngcontent-%COMP%]{margin-left:1em;margin-right:1em}}.homebridge-logo[_ngcontent-%COMP%]{margin-bottom:10px}"]})}return e})();export{_e as LoginComponent};
1
+ import{B as G,C as Q,c as $,d as C,e as B,f as O,g as T,j as w,m as q,q as z,r as D,y as H,z as A}from"./chunk-KUNMS7VX.js";import{b as K}from"./chunk-EA6YVIQU.js";import{d as U}from"./chunk-25NXLXGL.js";import{b as J}from"./chunk-UBQOKDSO.js";import{m as W}from"./chunk-CXEQVJNG.js";import{b as j}from"./chunk-CPAHENLQ.js";import"./chunk-RJOGO4M5.js";import{Dc as f,Hc as l,Ib as u,Ic as d,Jb as c,M as I,Ob as m,Pb as r,Qb as a,Rb as s,Sc as b,Uc as L,Xa as x,ab as i,bc as E,dc as M,h as y,id as N,kc as v,la as p,lc as F,ld as V,mb as k,qc as g,rc as h,sc as R,w as S,zd as P}from"./chunk-WEVBEUAJ.js";var Y=["password"],Z=["username"],ee=["otp"],te=e=>({background:e}),ie=e=>({anim:e}),X=e=>({"is-invalid":e});function ne(e,_){if(e&1&&(r(0,"div",8)(1,"span",12),s(2,"i",13),a(),s(3,"input",14,0),l(5,"translate"),a(),r(6,"div",8)(7,"span",12),s(8,"i",15),a(),s(9,"input",16,1),l(11,"translate"),a()),e&2){let n=M();i(3),m("placeholder",d(5,4,"users.label_username"))("ngClass",f(8,X,n.form.controls.username.dirty&&n.form.controls.username.errors)),i(6),m("placeholder",d(11,6,"users.label_password"))("ngClass",f(10,X,n.form.controls.password.dirty&&n.form.controls.password.errors))}}function oe(e,_){e&1&&(r(0,"div",8)(1,"span",12),s(2,"i",17),a(),s(3,"input",18,2),l(5,"translate"),a()),e&2&&(i(3),m("placeholder",d(5,1,"login.label_2fa_code")))}function ae(e,_){e&1&&(r(0,"div",9)(1,"div",12),s(2,"i",19),a(),r(3,"div",20)(4,"div",21),g(5),l(6,"translate"),a(),s(7,"div",22),l(8,"translate"),a()()),e&2&&(i(5),h(d(6,2,"login.invalid_credentials")),i(2),m("innerHTML",d(8,4,"login.invalid_credentials_2"),x))}function re(e,_){e&1&&(r(0,"div",9)(1,"div",12),s(2,"i",19),a(),r(3,"div",20)(4,"div",21),g(5),l(6,"translate"),a(),s(7,"div",22),l(8,"translate"),a()()),e&2&&(i(5),h(d(6,2,"login.invalid_code")),i(2),m("innerHTML",d(8,4,"login.invalid_credentials_2"),x))}var _e=(()=>{class e{$auth=p(K);$cdr=p(L);$router=p(U);$settings=p(J);targetRoute;validNonAdminRoutes=["/accessories","/plugins","/logs","/support"];passwordInput=b("password");usernameInput=b("username");otpInput=b("otp");backgroundStyle;invalidCredentials=!1;invalid2faCode=!1;twoFactorCodeRequired=!1;inProgress=!1;form;ngOnInit(){this.form=new T({username:new w(""),password:new w("")}),this.form.valueChanges.pipe(I(500)).subscribe(n=>{let o=this.passwordInput()?.nativeElement.value;o&&o!==n.password&&this.form.controls.password.setValue(o)}),this.targetRoute=window.sessionStorage.getItem("target_route")||"",this.setBackground()}ngAfterViewChecked(){this.$cdr.detectChanges()}onSubmit(){return y(this,null,function*(){this.invalidCredentials=!1,this.invalid2faCode=!1,this.inProgress=!0,document.getElementById("submit-button")?.blur();let n=this.passwordInput()?.nativeElement.value;n&&n!==this.form.get("password").value&&this.form.controls.password.setValue(n);let o=this.usernameInput()?.nativeElement.value;if(o&&o!==this.form.get("username").value&&this.form.controls.username.setValue(o),this.twoFactorCodeRequired){let t=this.otpInput()?.nativeElement.value;t&&t!==this.form.get("otp").value&&this.form.controls.username.setValue(t)}try{yield this.$auth.login(this.form.getRawValue()),!this.$auth.user.admin&&!this.validNonAdminRoutes.includes(this.targetRoute)&&(this.targetRoute="/"),this.$router.navigateByUrl(this.targetRoute),window.sessionStorage.removeItem("target_route")}catch(t){t.status===412?(this.form.controls.otp?(this.form.controls.otp.setErrors(["Invalid Code"]),this.invalid2faCode=!0):this.form.addControl("otp",new w("",[C.required,C.minLength(6),C.maxLength(6)])),this.twoFactorCodeRequired=!0,setTimeout(()=>{document.getElementById("form-ota").focus()},100)):this.invalidCredentials=!0}this.inProgress=!1})}setBackground(){return y(this,null,function*(){if(this.$settings.settingsLoaded||(yield S(this.$settings.onSettingsLoaded)),this.$settings.env.customWallpaperHash){let n=`${W.api.base}/auth/wallpaper/${this.$settings.env.customWallpaperHash}`;this.backgroundStyle=`url('${n}') center/cover`}})}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=k({type:e,selectors:[["ng-component"]],viewQuery:function(o,t){o&1&&(v(t.passwordInput,Y,5),v(t.usernameInput,Z,5),v(t.otpInput,ee,5)),o&2&&F(3)},decls:15,vars:18,consts:[["username",""],["password",""],["otp",""],[1,"login-container","gradient","d-flex","align-items-start","justify-content-center",3,"ngStyle","ngClass"],[1,"w-100","login-card","d-flex","py-4","flex-column"],["ngSrc","/assets/homebridge-color-round.svg","alt","Homebridge Logo","height","100","width","100","priority","true",1,"homebridge-logo","mx-auto","my-3"],["novalidate","",3,"ngSubmit","formGroup"],[1,"mb-4","text-center"],[1,"input-group","mb-4"],[1,"input-group","no-border","mb-4"],[1,"text-center"],["tabindex","3","id","submit-button","type","submit",1,"btn","btn-primary","mb-2",3,"disabled"],[1,"input-group-text","custom-input"],[1,"fas","fa-fw","fa-user","primary-text","fa-lg"],["formControlName","username","type","text","id","form-username","autofocus","","autocomplete","username","autocapitalize","none","tabindex","1","required","",1,"form-control","custom-input",3,"placeholder","ngClass"],[1,"fas","fa-fw","fa-lock","primary-text","fa-lg"],["formControlName","password","type","password","id","form-pass","autocomplete","current-password","tabindex","2","required","",1,"form-control","custom-input",3,"placeholder","ngClass"],[1,"fas","fa-fw","fa-key","primary-text","fa-lg"],["formControlName","otp","type","text","id","form-ota","autofocus","","autocomplete","one-time-code","autocapitalize","none","inputmode","numeric","pattern","[0-9]*","tabindex","1",1,"form-control","custom-input",3,"placeholder"],[1,"fas","fa-fw","fa-exclamation-triangle","pink-text","fa-lg"],[1,"form-control","custom-input"],[1,"small","grey-text","fw-semibold"],[1,"small","grey-text",3,"innerHTML"]],template:function(o,t){o&1&&(r(0,"div",3)(1,"div",4),s(2,"img",5),r(3,"form",6),E("ngSubmit",function(){return t.onSubmit()}),r(4,"h4",7),g(5),l(6,"translate"),a(),u(7,ne,12,12),u(8,oe,6,3,"div",8),u(9,ae,9,6,"div",9),u(10,re,9,6,"div",9),r(11,"div",10)(12,"button",11),g(13),l(14,"translate"),a()()()()()),o&2&&(m("ngStyle",f(14,te,t.backgroundStyle))("ngClass",f(16,ie,!t.backgroundStyle)),i(3),m("formGroup",t.form),i(2),h(d(6,10,"setup.welcome_to_homebridge")),i(2),c(t.twoFactorCodeRequired?-1:7),i(),c(t.twoFactorCodeRequired?8:-1),i(),c(t.invalidCredentials?9:-1),i(),c(t.invalid2faCode?10:-1),i(2),m("disabled",t.form.invalid),i(),R(" ",d(14,12,"form.button_continue")," "))},dependencies:[V,G,q,$,B,O,H,A,Q,z,D,N,P,j],styles:["body{overflow:scroll!important} body.dark-mode .login-card{background-color:#2b2b2b;color:#fff}.login-container[_ngcontent-%COMP%]{z-index:-1;padding-top:2em;padding-bottom:2em;min-height:100%;background-size:300% 300%}.anim[_ngcontent-%COMP%]{-webkit-animation:_ngcontent-%COMP%_gradient 20s ease infinite;-moz-animation:gradient 20s ease infinite;-o-animation:gradient 20s ease infinite;animation:_ngcontent-%COMP%_gradient 20s ease infinite}@keyframes _ngcontent-%COMP%_gradient{0%{background-position:0 50%}50%{background-position:100% 50%}to{background-position:0 50%}}.login-card[_ngcontent-%COMP%]{max-width:550px;border-radius:1rem;padding-right:25px;padding-left:25px;background-color:#ffffffe6}.login-card[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus{background-color:inherit!important}@media screen and (max-width: 575px){.login-card[_ngcontent-%COMP%]{margin-left:1em;margin-right:1em}}.homebridge-logo[_ngcontent-%COMP%]{margin-bottom:10px}"]})}return e})();export{_e as LoginComponent};
@@ -1 +1 @@
1
- import{a as n}from"./chunk-5W57S525.js";import"./chunk-V2ZBY57I.js";import{g as r}from"./chunk-25NXLXGL.js";import"./chunk-4VESQ6LL.js";import"./chunk-UF7VL23T.js";import"./chunk-CPAHENLQ.js";import"./chunk-RJOGO4M5.js";import{ha as o,nb as e}from"./chunk-WEVBEUAJ.js";var c=[{path:"",loadComponent:()=>import("./chunk-MTMHNGPO.js").then(t=>t.SettingsComponent),canActivate:[n]}],m=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=e({type:t});static \u0275inj=o({imports:[r.forChild(c),r]})}return t})();var l=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=e({type:t});static \u0275inj=o({imports:[m]})}return t})();export{l as SettingsModule};
1
+ import{a as n}from"./chunk-7KOOVJKG.js";import"./chunk-EA6YVIQU.js";import{g as r}from"./chunk-25NXLXGL.js";import"./chunk-UBQOKDSO.js";import"./chunk-CXEQVJNG.js";import"./chunk-CPAHENLQ.js";import"./chunk-RJOGO4M5.js";import{ha as o,nb as e}from"./chunk-WEVBEUAJ.js";var c=[{path:"",loadComponent:()=>import("./chunk-5CXUHYYU.js").then(t=>t.SettingsComponent),canActivate:[n]}],m=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=e({type:t});static \u0275inj=o({imports:[r.forChild(c),r]})}return t})();var l=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=e({type:t});static \u0275inj=o({imports:[m]})}return t})();export{l as SettingsModule};
@@ -1,2 +1,2 @@
1
- import{a as D}from"./chunk-KUNMS7VX.js";import{Bc as N,Da as l,E as c,Ub as g,fa as _,ha as M,hc as y,ic as b,ja as v,jc as E,la as a,mb as h,nb as w,qb as u,rd as O,ub as C,vb as f}from"./chunk-WEVBEUAJ.js";var T=["editorContainer"],z="[_nghost-%COMP%]{display:block;height:200px}.editor-container[_ngcontent-%COMP%]{width:100%;height:98%}",I=new v("NGX_MONACO_EDITOR_CONFIG"),R=!1,q,x=(()=>{let i=class i{constructor(){this.config=a(I),this.onInit=new C,this._insideNg=!1}set insideNg(e){this._insideNg=e,this._editor&&(this._editor.dispose(),this.initMonaco(this._options,this.insideNg))}get insideNg(){return this._insideNg}ngAfterViewInit(){R?q.then(()=>{this.initMonaco(this._options,this.insideNg)}):(R=!0,q=new Promise(e=>{let t=this.config.baseUrl;if((t==="assets"||!t)&&(t="./assets/monaco/min/vs"),typeof window.monaco=="object"){this.initMonaco(this._options,this.insideNg),e();return}let o=r=>{let m=r||window.require,p={paths:{vs:`${t}`}};Object.assign(p,this.config.requireConfig||{}),m.config(p),m(["vs/editor/editor.main"],()=>{typeof this.config.onMonacoLoad=="function"&&this.config.onMonacoLoad(),this.initMonaco(this._options,this.insideNg),e()})};if(this.config.monacoRequire)o(this.config.monacoRequire);else if(window.require)if(window.require.config)o();else{var s=`${t}/loader.js`,d=new XMLHttpRequest;d.addEventListener("load",()=>{let r=document.createElement("script");r.type="text/javascript",r.text=["var nodeRequire = require;",d.responseText.replace('"use strict";',""),"var monacoAmdRequire = require;","require = nodeRequire;","require.nodeRequire = require;"].join(`
1
+ import{a as D}from"./chunk-KUNMS7VX.js";import{Bc as N,Da as l,E as c,Ub as g,fa as _,ha as M,hc as y,ic as b,ja as v,jc as E,la as a,mb as h,nb as w,qb as u,rd as O,ub as C,vb as f}from"./chunk-WEVBEUAJ.js";var T=["editorContainer"],z="[_nghost-%COMP%]{display:block;height:200px}.editor-container[_ngcontent-%COMP%]{width:100%;height:98%}",I=new v("NGX_MONACO_EDITOR_CONFIG"),R=!1,q,x=(()=>{let i=class i{constructor(){this.config=a(I),this.onInit=new C,this._insideNg=!1}set insideNg(e){this._insideNg=e,this._editor&&(this._editor.dispose(),this.initMonaco(this._options,this.insideNg))}get insideNg(){return this._insideNg}ngAfterViewInit(){R?q.then(()=>{this.initMonaco(this._options,this.insideNg)}):(R=!0,q=new Promise(e=>{let t=this.config.baseUrl;if((t==="assets"||!t)&&(t="./assets/monaco-0.21.3/min/vs"),typeof window.monaco=="object"){this.initMonaco(this._options,this.insideNg),e();return}let o=r=>{let m=r||window.require,p={paths:{vs:`${t}`}};Object.assign(p,this.config.requireConfig||{}),m.config(p),m(["vs/editor/editor.main"],()=>{typeof this.config.onMonacoLoad=="function"&&this.config.onMonacoLoad(),this.initMonaco(this._options,this.insideNg),e()})};if(this.config.monacoRequire)o(this.config.monacoRequire);else if(window.require)if(window.require.config)o();else{var s=`${t}/loader.js`,d=new XMLHttpRequest;d.addEventListener("load",()=>{let r=document.createElement("script");r.type="text/javascript",r.text=["var nodeRequire = require;",d.responseText.replace('"use strict";',""),"var monacoAmdRequire = require;","require = nodeRequire;","require.nodeRequire = require;"].join(`
2
2
  `),document.body.appendChild(r),o(window.monacoAmdRequire)}),d.open("GET",s),d.send()}else{let r=document.createElement("script");r.type="text/javascript",r.src=`${t}/loader.js`,r.addEventListener("load",()=>{o()}),document.body.appendChild(r)}}))}ngOnDestroy(){this._windowResizeSubscription&&this._windowResizeSubscription.unsubscribe(),this._editor&&(this._editor.dispose(),this._editor=void 0)}};i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=h({type:i,selectors:[["ng-component"]],viewQuery:function(t,o){if(t&1&&y(T,7),t&2){let s;b(s=E())&&(o._editorContainer=s.first)}},inputs:{insideNg:"insideNg"},outputs:{onInit:"onInit"},standalone:!1,decls:0,vars:0,template:function(t,o){},encapsulation:2});let n=i;return n})(),X=(()=>{let i=class i extends x{constructor(){super(...arguments),this.zone=a(f),this._value="",this.propagateChange=e=>{},this.onTouched=()=>{}}set options(e){this._options=Object.assign({},this.config.defaultOptions,e),this._editor&&(this._editor.dispose(),this.initMonaco(this._options,this.insideNg))}get options(){return this._options}set model(e){this.options.model=e,this._editor&&(this._editor.dispose(),this.initMonaco(this.options,this.insideNg))}writeValue(e){this._value=e||"",setTimeout(()=>{this._editor&&!this.options.model&&this._editor.setValue(this._value)})}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.options.readOnly=e}initMonaco(e,t){let o=!!e.model;if(o){let s=monaco.editor.getModel(e.model.uri||"");s?(e.model=s,e.model.setValue(this._value)):e.model=monaco.editor.createModel(e.model.value,e.model.language,e.model.uri)}t?this._editor=monaco.editor.create(this._editorContainer.nativeElement,e):this.zone.runOutsideAngular(()=>{this._editor=monaco.editor.create(this._editorContainer.nativeElement,e)}),o||this._editor.setValue(this._value),this._editor.onDidChangeModelContent(s=>{let d=this._editor.getValue();this.zone.run(()=>{this.propagateChange(d),this._value=d})}),this._editor.onDidBlurEditorWidget(()=>{this.onTouched()}),this._editor.setTheme=s=>{this.options.theme=s,monaco.editor.setTheme(s)},this._windowResizeSubscription&&this._windowResizeSubscription.unsubscribe(),this._windowResizeSubscription=c(window,"resize").subscribe(()=>this._editor.layout()),this.onInit.emit(this._editor)}};i.\u0275fac=(()=>{let e;return function(o){return(e||(e=l(i)))(o||i)}})(),i.\u0275cmp=h({type:i,selectors:[["ngx-monaco-editor"]],inputs:{options:"options",model:"model"},features:[N([{provide:D,useExisting:_(()=>i),multi:!0}]),u],decls:2,vars:0,consts:[["editorContainer",""],[1,"editor-container"]],template:function(t,o){t&1&&g(0,"div",1,0)},styles:["[_nghost-%COMP%]{display:block;height:200px}.editor-container[_ngcontent-%COMP%]{width:100%;height:98%}"],changeDetection:0});let n=i;return n})(),$=(()=>{let i=class i extends x{constructor(){super(...arguments),this.zone=a(f)}set options(e){this._options=Object.assign({},this.config.defaultOptions,e),this._editor&&(this._editor.dispose(),this.initMonaco(this._options,this.insideNg))}get options(){return this._options}set originalModel(e){this._originalModel=e,this._editor&&(this._editor.dispose(),this.initMonaco(this.options,this.insideNg))}set modifiedModel(e){this._modifiedModel=e,this._editor&&(this._editor.dispose(),this.initMonaco(this.options,this.insideNg))}initMonaco(e,t){if(!this._originalModel||!this._modifiedModel)throw new Error("originalModel or modifiedModel not found for ngx-monaco-diff-editor");this._originalModel.language=this._originalModel.language||e.language,this._modifiedModel.language=this._modifiedModel.language||e.language;let o=monaco.editor.createModel(this._originalModel.code,this._originalModel.language),s=monaco.editor.createModel(this._modifiedModel.code,this._modifiedModel.language);this._editorContainer.nativeElement.innerHTML="";let d=e.theme;t?this._editor=monaco.editor.createDiffEditor(this._editorContainer.nativeElement,e):this.zone.runOutsideAngular(()=>{this._editor=monaco.editor.createDiffEditor(this._editorContainer.nativeElement,e)}),e.theme=d,this._editor.setModel({original:o,modified:s}),this._windowResizeSubscription&&this._windowResizeSubscription.unsubscribe(),this._windowResizeSubscription=c(window,"resize").subscribe(()=>this._editor.layout()),this.onInit.emit(this._editor)}};i.\u0275fac=(()=>{let e;return function(o){return(e||(e=l(i)))(o||i)}})(),i.\u0275cmp=h({type:i,selectors:[["ngx-monaco-diff-editor"]],inputs:{options:"options",originalModel:"originalModel",modifiedModel:"modifiedModel"},features:[u],decls:2,vars:0,consts:[["editorContainer",""],[1,"editor-container"]],template:function(t,o){t&1&&g(0,"div",1,0)},styles:[z],changeDetection:0});let n=i;return n})(),H=(()=>{let i=class i{static forRoot(e={}){return{ngModule:i,providers:[{provide:I,useValue:e}]}}};i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=w({type:i}),i.\u0275inj=M({imports:[O]});let n=i;return n})();export{X as a,$ as b,H as c};
@@ -1 +1 @@
1
- import{a as s}from"./chunk-YLMTQPGU.js";import"./chunk-WMCF6NAJ.js";import"./chunk-DFLQA6JZ.js";import"./chunk-S7AIVWKK.js";import"./chunk-F27XTST6.js";import"./chunk-KUNMS7VX.js";import"./chunk-OE7MOFW7.js";import"./chunk-V2ZBY57I.js";import{g as i}from"./chunk-25NXLXGL.js";import"./chunk-4VESQ6LL.js";import"./chunk-UF7VL23T.js";import"./chunk-CPAHENLQ.js";import"./chunk-RJOGO4M5.js";import{ha as e,nb as t}from"./chunk-WEVBEUAJ.js";var u=[{path:"",loadComponent:()=>import("./chunk-FQIIP3PN.js").then(o=>o.AccessoriesComponent)}],c=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=t({type:o});static \u0275inj=e({imports:[i.forChild(u),i]})}return o})();var l=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=t({type:o});static \u0275inj=e({imports:[s,c]})}return o})();export{l as AccessoriesModule};
1
+ import{a as s}from"./chunk-4FCAJYAY.js";import"./chunk-M3BLV5IG.js";import"./chunk-QXQRV4WW.js";import"./chunk-S7AIVWKK.js";import"./chunk-F27XTST6.js";import"./chunk-KUNMS7VX.js";import"./chunk-G7T7KOJA.js";import"./chunk-EA6YVIQU.js";import{g as i}from"./chunk-25NXLXGL.js";import"./chunk-UBQOKDSO.js";import"./chunk-CXEQVJNG.js";import"./chunk-CPAHENLQ.js";import"./chunk-RJOGO4M5.js";import{ha as e,nb as t}from"./chunk-WEVBEUAJ.js";var u=[{path:"",loadComponent:()=>import("./chunk-K6MSIPN4.js").then(o=>o.AccessoriesComponent)}],c=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=t({type:o});static \u0275inj=e({imports:[i.forChild(u),i]})}return o})();var l=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=t({type:o});static \u0275inj=e({imports:[s,c]})}return o})();export{l as AccessoriesModule};
@@ -1 +1 @@
1
- import{b as s}from"./chunk-V2ZBY57I.js";import{d as i}from"./chunk-25NXLXGL.js";import{k as o}from"./chunk-UF7VL23T.js";import{a}from"./chunk-CPAHENLQ.js";import{ga as e,la as r}from"./chunk-WEVBEUAJ.js";var v=(()=>{class t{$auth=r(s);$router=r(i);$translate=r(a);$toastr=r(o);canActivate(){return this.$auth.user&&this.$auth.user.admin?!0:(this.$toastr.error(this.$translate.instant("toast.no_auth"),this.$translate.instant("toast.title_error")),this.$router.navigate(["/"]),!1)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=e({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{v as a};
1
+ import{b as s}from"./chunk-EA6YVIQU.js";import{d as i}from"./chunk-25NXLXGL.js";import{k as o}from"./chunk-CXEQVJNG.js";import{a}from"./chunk-CPAHENLQ.js";import{ga as e,la as r}from"./chunk-WEVBEUAJ.js";var v=(()=>{class t{$auth=r(s);$router=r(i);$translate=r(a);$toastr=r(o);canActivate(){return this.$auth.user&&this.$auth.user.admin?!0:(this.$toastr.error(this.$translate.instant("toast.no_auth"),this.$translate.instant("toast.title_error")),this.$router.navigate(["/"]),!1)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=e({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{v as a};
@@ -1,4 +1,4 @@
1
- import{a as W1}from"./chunk-SO5OSLLM.js";import{a as $p,c as L1,d as z1,e as ua,f as Bi,g as jq}from"./chunk-JLSZYWUI.js";import{a as F1}from"./chunk-N7EZXKV6.js";import{a as B1}from"./chunk-AKD24HZC.js";import{a as H1}from"./chunk-KG7Z7CI7.js";import{a as V1,b as j1,c as R1}from"./chunk-H337OZRD.js";import{a as $s}from"./chunk-IMT3YYMD.js";import{a as U1}from"./chunk-UKEZ5GGN.js";import{a as lc,b as dc}from"./chunk-RPRM66DV.js";import{a as uc,b as cc}from"./chunk-S7AIVWKK.js";import{a as q1}from"./chunk-Z2JFLSVB.js";import{a as nc,b as ic,c as rc,d as oc,e as ac,f as sc,g as la,m as Et,n as en,o as M1,p as k1,q as A1,r as D1,s as N1,t as jr}from"./chunk-F27XTST6.js";import{A as O1,B as Ii,C as Ss,a as C1,b as qr,c as yo,e as In,f as x1,h as w1,i as I1,j as S1,k as $1,l as wi,m as E1,o as T1,p as Vr,s as sa,t as vo,u as P1,v as bo}from"./chunk-KUNMS7VX.js";import{a as Br}from"./chunk-OE7MOFW7.js";import{d as Ri}from"./chunk-25NXLXGL.js";import{b as Pt}from"./chunk-4VESQ6LL.js";import{k as pt,m as Rr,n as rt}from"./chunk-UF7VL23T.js";import{a as ft,b as Tt}from"./chunk-CPAHENLQ.js";import{e as b1}from"./chunk-RJOGO4M5.js";import{$a as f1,Ac as g1,Bc as _1,Ca as kr,Cc as dt,D as s1,Da as d1,Dc as xi,Ec as go,Fa as ra,Fc as ai,Gc as aa,Hb as me,Hc as A,Ib as j,Ic as V,Jb as R,Jc as At,Lb as vn,M as na,Mb as bn,Nb as Cn,Ob as E,Pb as y,Qb as v,Qc as xn,Rb as q,Rc as le,Sb as Yu,Sc as Fr,Tb as Xu,Ub as Zu,Uc as y1,Vb as ws,Wb as Is,Xa as Ke,Z as xp,_b as ue,a as ye,aa as xs,ab as m,b as at,bc as Z,cc as Qu,dc as S,e as I,fa as l1,fb as Ku,g as st,ga as Kn,gb as ur,h as pe,ha as ia,hc as wp,ib as po,ic as Ip,id as si,ja as u1,jc as Sp,jd as _o,k as i1,ka as c1,kc as Ar,kd as wn,la as L,lc as Dr,mb as Ce,mc as h1,n as Gn,nb as oa,nc as Ci,o as Cp,ob as mo,oc as Nr,pb as p1,pc as ve,q as r1,qc as M,ra as Y,rc as se,rd as tc,sa as X,sb as Me,sc as ie,tc as ho,ub as m1,uc as ec,v as o1,vb as Ju,w as je,x as a1,xc as lt,yc as ut,za as Gu,zc as ct,zd as v1}from"./chunk-WEVBEUAJ.js";var ev=I(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.formatNames=zi.fastFormats=zi.fullFormats=void 0;function Li(e,n){return{validate:e,compare:n}}zi.fullFormats={date:Li(Y1,Op),time:Li(Tp(!0),Mp),"date-time":Li(G1(!0),Z1),"iso-time":Li(Tp(),X1),"iso-date-time":Li(G1(),Q1),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:Hq,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:Zq,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:Wq,int32:{type:"number",validate:Jq},int64:{type:"number",validate:Yq},float:{type:"number",validate:J1},double:{type:"number",validate:J1},password:!0,binary:!0};zi.fastFormats=at(ye({},zi.fullFormats),{date:Li(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Op),time:Li(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Mp),"date-time":Li(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Z1),"iso-time":Li(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,X1),"iso-date-time":Li(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Q1),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i});zi.formatNames=Object.keys(zi.fullFormats);function Rq(e){return e%4===0&&(e%100!==0||e%400===0)}var Bq=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Lq=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Y1(e){let n=Bq.exec(e);if(!n)return!1;let t=+n[1],i=+n[2],r=+n[3];return i>=1&&i<=12&&r>=1&&r<=(i===2&&Rq(t)?29:Lq[i])}function Op(e,n){if(e&&n)return e>n?1:e<n?-1:0}var Ep=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Tp(e){return function(t){let i=Ep.exec(t);if(!i)return!1;let r=+i[1],a=+i[2],l=+i[3],u=i[4],d=i[5]==="-"?-1:1,p=+(i[6]||0),h=+(i[7]||0);if(p>23||h>59||e&&!u)return!1;if(r<=23&&a<=59&&l<60)return!0;let _=a-h*d,C=r-p*d-(_<0?1:0);return(C===23||C===-1)&&(_===59||_===-1)&&l<61}}function Mp(e,n){if(!(e&&n))return;let t=new Date("2020-01-01T"+e).valueOf(),i=new Date("2020-01-01T"+n).valueOf();if(t&&i)return t-i}function X1(e,n){if(!(e&&n))return;let t=Ep.exec(e),i=Ep.exec(n);if(t&&i)return e=t[1]+t[2]+t[3],n=i[1]+i[2]+i[3],e>n?1:e<n?-1:0}var Pp=/t|\s/i;function G1(e){let n=Tp(e);return function(i){let r=i.split(Pp);return r.length===2&&Y1(r[0])&&n(r[1])}}function Z1(e,n){if(!(e&&n))return;let t=new Date(e).valueOf(),i=new Date(n).valueOf();if(t&&i)return t-i}function Q1(e,n){if(!(e&&n))return;let[t,i]=e.split(Pp),[r,a]=n.split(Pp),l=Op(t,r);if(l!==void 0)return l||Mp(i,a)}var zq=/\/|:/,Uq=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function Hq(e){return zq.test(e)&&Uq.test(e)}var K1=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function Wq(e){return K1.lastIndex=0,K1.test(e)}var Gq=-(2**31),Kq=2**31-1;function Jq(e){return Number.isInteger(e)&&e<=Kq&&e>=Gq}function Yq(e){return Number.isInteger(e)}function J1(){return!0}var Xq=/[^\\]\\Z/;function Zq(e){if(Xq.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var Ps=I(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.regexpCode=et.getEsmExportName=et.getProperty=et.safeStringify=et.stringify=et.strConcat=et.addCodeArg=et.str=et._=et.nil=et._Code=et.Name=et.IDENTIFIER=et._CodeOrName=void 0;var Es=class{};et._CodeOrName=Es;et.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Co=class extends Es{constructor(n){if(super(),!et.IDENTIFIER.test(n))throw new Error("CodeGen: name must be a valid identifier");this.str=n}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};et.Name=Co;var li=class extends Es{constructor(n){super(),this._items=typeof n=="string"?[n]:n}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let n=this._items[0];return n===""||n==='""'}get str(){var n;return(n=this._str)!==null&&n!==void 0?n:this._str=this._items.reduce((t,i)=>`${t}${i}`,"")}get names(){var n;return(n=this._names)!==null&&n!==void 0?n:this._names=this._items.reduce((t,i)=>(i instanceof Co&&(t[i.str]=(t[i.str]||0)+1),t),{})}};et._Code=li;et.nil=new li("");function tv(e,...n){let t=[e[0]],i=0;for(;i<n.length;)Ap(t,n[i]),t.push(e[++i]);return new li(t)}et._=tv;var kp=new li("+");function nv(e,...n){let t=[Ts(e[0])],i=0;for(;i<n.length;)t.push(kp),Ap(t,n[i]),t.push(kp,Ts(e[++i]));return Qq(t),new li(t)}et.str=nv;function Ap(e,n){n instanceof li?e.push(...n._items):n instanceof Co?e.push(n):e.push(nV(n))}et.addCodeArg=Ap;function Qq(e){let n=1;for(;n<e.length-1;){if(e[n]===kp){let t=eV(e[n-1],e[n+1]);if(t!==void 0){e.splice(n-1,3,t);continue}e[n++]="+"}n++}}function eV(e,n){if(n==='""')return e;if(e==='""')return n;if(typeof e=="string")return n instanceof Co||e[e.length-1]!=='"'?void 0:typeof n!="string"?`${e.slice(0,-1)}${n}"`:n[0]==='"'?e.slice(0,-1)+n.slice(1):void 0;if(typeof n=="string"&&n[0]==='"'&&!(e instanceof Co))return`"${e}${n.slice(1)}`}function tV(e,n){return n.emptyStr()?e:e.emptyStr()?n:nv`${e}${n}`}et.strConcat=tV;function nV(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Ts(Array.isArray(e)?e.join(","):e)}function iV(e){return new li(Ts(e))}et.stringify=iV;function Ts(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}et.safeStringify=Ts;function rV(e){return typeof e=="string"&&et.IDENTIFIER.test(e)?new li(`.${e}`):tv`[${e}]`}et.getProperty=rV;function oV(e){if(typeof e=="string"&&et.IDENTIFIER.test(e))return new li(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}et.getEsmExportName=oV;function aV(e){return new li(e.toString())}et.regexpCode=aV});var Fp=I(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.ValueScope=Dn.ValueScopeName=Dn.Scope=Dn.varKinds=Dn.UsedValueState=void 0;var An=Ps(),Dp=class extends Error{constructor(n){super(`CodeGen: "code" for ${n} not defined`),this.value=n.value}},fc=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(fc||(Dn.UsedValueState=fc={}));Dn.varKinds={const:new An.Name("const"),let:new An.Name("let"),var:new An.Name("var")};var pc=class{constructor({prefixes:n,parent:t}={}){this._names={},this._prefixes=n,this._parent=t}toName(n){return n instanceof An.Name?n:this.name(n)}name(n){return new An.Name(this._newName(n))}_newName(n){let t=this._names[n]||this._nameGroup(n);return`${n}${t.index++}`}_nameGroup(n){var t,i;if(!((i=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||i===void 0)&&i.has(n)||this._prefixes&&!this._prefixes.has(n))throw new Error(`CodeGen: prefix "${n}" is not allowed in this scope`);return this._names[n]={prefix:n,index:0}}};Dn.Scope=pc;var mc=class extends An.Name{constructor(n,t){super(t),this.prefix=n}setValue(n,{property:t,itemIndex:i}){this.value=n,this.scopePath=(0,An._)`.${new An.Name(t)}[${i}]`}};Dn.ValueScopeName=mc;var sV=(0,An._)`\n`,Np=class extends pc{constructor(n){super(n),this._values={},this._scope=n.scope,this.opts=at(ye({},n),{_n:n.lines?sV:An.nil})}get(){return this._scope}name(n){return new mc(n,this._newName(n))}value(n,t){var i;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let r=this.toName(n),{prefix:a}=r,l=(i=t.key)!==null&&i!==void 0?i:t.ref,u=this._values[a];if(u){let h=u.get(l);if(h)return h}else u=this._values[a]=new Map;u.set(l,r);let d=this._scope[a]||(this._scope[a]=[]),p=d.length;return d[p]=t.ref,r.setValue(t,{property:a,itemIndex:p}),r}getValue(n,t){let i=this._values[n];if(i)return i.get(t)}scopeRefs(n,t=this._values){return this._reduceValues(t,i=>{if(i.scopePath===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return(0,An._)`${n}${i.scopePath}`})}scopeCode(n=this._values,t,i){return this._reduceValues(n,r=>{if(r.value===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return r.value.code},t,i)}_reduceValues(n,t,i={},r){let a=An.nil;for(let l in n){let u=n[l];if(!u)continue;let d=i[l]=i[l]||new Map;u.forEach(p=>{if(d.has(p))return;d.set(p,fc.Started);let h=t(p);if(h){let _=this.opts.es5?Dn.varKinds.var:Dn.varKinds.const;a=(0,An._)`${a}${_} ${p} = ${h};${this.opts._n}`}else if(h=r?.(p))a=(0,An._)`${a}${h}${this.opts._n}`;else throw new Dp(p);d.set(p,fc.Completed)})}return a}};Dn.ValueScope=Np});var xe=I(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.or=Le.and=Le.not=Le.CodeGen=Le.operators=Le.varKinds=Le.ValueScopeName=Le.ValueScope=Le.Scope=Le.Name=Le.regexpCode=Le.stringify=Le.getProperty=Le.nil=Le.strConcat=Le.str=Le._=void 0;var Xe=Ps(),Si=Fp(),Lr=Ps();Object.defineProperty(Le,"_",{enumerable:!0,get:function(){return Lr._}});Object.defineProperty(Le,"str",{enumerable:!0,get:function(){return Lr.str}});Object.defineProperty(Le,"strConcat",{enumerable:!0,get:function(){return Lr.strConcat}});Object.defineProperty(Le,"nil",{enumerable:!0,get:function(){return Lr.nil}});Object.defineProperty(Le,"getProperty",{enumerable:!0,get:function(){return Lr.getProperty}});Object.defineProperty(Le,"stringify",{enumerable:!0,get:function(){return Lr.stringify}});Object.defineProperty(Le,"regexpCode",{enumerable:!0,get:function(){return Lr.regexpCode}});Object.defineProperty(Le,"Name",{enumerable:!0,get:function(){return Lr.Name}});var vc=Fp();Object.defineProperty(Le,"Scope",{enumerable:!0,get:function(){return vc.Scope}});Object.defineProperty(Le,"ValueScope",{enumerable:!0,get:function(){return vc.ValueScope}});Object.defineProperty(Le,"ValueScopeName",{enumerable:!0,get:function(){return vc.ValueScopeName}});Object.defineProperty(Le,"varKinds",{enumerable:!0,get:function(){return vc.varKinds}});Le.operators={GT:new Xe._Code(">"),GTE:new Xe._Code(">="),LT:new Xe._Code("<"),LTE:new Xe._Code("<="),EQ:new Xe._Code("==="),NEQ:new Xe._Code("!=="),NOT:new Xe._Code("!"),OR:new Xe._Code("||"),AND:new Xe._Code("&&"),ADD:new Xe._Code("+")};var cr=class{optimizeNodes(){return this}optimizeNames(n,t){return this}},qp=class extends cr{constructor(n,t,i){super(),this.varKind=n,this.name=t,this.rhs=i}render({es5:n,_n:t}){let i=n?Si.varKinds.var:this.varKind,r=this.rhs===void 0?"":` = ${this.rhs}`;return`${i} ${this.name}${r};`+t}optimizeNames(n,t){if(n[this.name.str])return this.rhs&&(this.rhs=ca(this.rhs,n,t)),this}get names(){return this.rhs instanceof Xe._CodeOrName?this.rhs.names:{}}},gc=class extends cr{constructor(n,t,i){super(),this.lhs=n,this.rhs=t,this.sideEffects=i}render({_n:n}){return`${this.lhs} = ${this.rhs};`+n}optimizeNames(n,t){if(!(this.lhs instanceof Xe.Name&&!n[this.lhs.str]&&!this.sideEffects))return this.rhs=ca(this.rhs,n,t),this}get names(){let n=this.lhs instanceof Xe.Name?{}:ye({},this.lhs.names);return yc(n,this.rhs)}},Vp=class extends gc{constructor(n,t,i,r){super(n,i,r),this.op=t}render({_n:n}){return`${this.lhs} ${this.op}= ${this.rhs};`+n}},jp=class extends cr{constructor(n){super(),this.label=n,this.names={}}render({_n:n}){return`${this.label}:`+n}},Rp=class extends cr{constructor(n){super(),this.label=n,this.names={}}render({_n:n}){return`break${this.label?` ${this.label}`:""};`+n}},Bp=class extends cr{constructor(n){super(),this.error=n}render({_n:n}){return`throw ${this.error};`+n}get names(){return this.error.names}},Lp=class extends cr{constructor(n){super(),this.code=n}render({_n:n}){return`${this.code};`+n}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(n,t){return this.code=ca(this.code,n,t),this}get names(){return this.code instanceof Xe._CodeOrName?this.code.names:{}}},Os=class extends cr{constructor(n=[]){super(),this.nodes=n}render(n){return this.nodes.reduce((t,i)=>t+i.render(n),"")}optimizeNodes(){let{nodes:n}=this,t=n.length;for(;t--;){let i=n[t].optimizeNodes();Array.isArray(i)?n.splice(t,1,...i):i?n[t]=i:n.splice(t,1)}return n.length>0?this:void 0}optimizeNames(n,t){let{nodes:i}=this,r=i.length;for(;r--;){let a=i[r];a.optimizeNames(n,t)||(lV(n,a.names),i.splice(r,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce((n,t)=>xo(n,t.names),{})}},dr=class extends Os{render(n){return"{"+n._n+super.render(n)+"}"+n._n}},zp=class extends Os{},Up=(()=>{class e extends dr{}return e.kind="else",e})(),hc=(()=>{class e extends dr{constructor(t,i){super(i),this.condition=t}render(t){let i=`if(${this.condition})`+super.render(t);return this.else&&(i+="else "+this.else.render(t)),i}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let i=this.else;if(i){let r=i.optimizeNodes();i=this.else=Array.isArray(r)?new Up(r):r}if(i)return t===!1?i instanceof e?i:i.nodes:this.nodes.length?this:new e(sv(t),i instanceof e?[i]:i.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,i){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(t,i),!!(super.optimizeNames(t,i)||this.else))return this.condition=ca(this.condition,t,i),this}get names(){let t=super.names;return yc(t,this.condition),this.else&&xo(t,this.else.names),t}}return e.kind="if",e})(),bc=(()=>{class e extends dr{}return e.kind="for",e})(),Hp=class extends bc{constructor(n){super(),this.iteration=n}render(n){return`for(${this.iteration})`+super.render(n)}optimizeNames(n,t){if(super.optimizeNames(n,t))return this.iteration=ca(this.iteration,n,t),this}get names(){return xo(super.names,this.iteration.names)}},Wp=class extends bc{constructor(n,t,i,r){super(),this.varKind=n,this.name=t,this.from=i,this.to=r}render(n){let t=n.es5?Si.varKinds.var:this.varKind,{name:i,from:r,to:a}=this;return`for(${t} ${i}=${r}; ${i}<${a}; ${i}++)`+super.render(n)}get names(){let n=yc(super.names,this.from);return yc(n,this.to)}},_c=class extends bc{constructor(n,t,i,r){super(),this.loop=n,this.varKind=t,this.name=i,this.iterable=r}render(n){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(n)}optimizeNames(n,t){if(super.optimizeNames(n,t))return this.iterable=ca(this.iterable,n,t),this}get names(){return xo(super.names,this.iterable.names)}},iv=(()=>{class e extends dr{constructor(t,i,r){super(),this.name=t,this.args=i,this.async=r}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),rv=(()=>{class e extends Os{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Gp=class extends dr{render(n){let t="try"+super.render(n);return this.catch&&(t+=this.catch.render(n)),this.finally&&(t+=this.finally.render(n)),t}optimizeNodes(){var n,t;return super.optimizeNodes(),(n=this.catch)===null||n===void 0||n.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(n,t){var i,r;return super.optimizeNames(n,t),(i=this.catch)===null||i===void 0||i.optimizeNames(n,t),(r=this.finally)===null||r===void 0||r.optimizeNames(n,t),this}get names(){let n=super.names;return this.catch&&xo(n,this.catch.names),this.finally&&xo(n,this.finally.names),n}},ov=(()=>{class e extends dr{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),av=(()=>{class e extends dr{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),Kp=class{constructor(n,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=at(ye({},t),{_n:t.lines?`
1
+ import{a as W1}from"./chunk-NG6DMWDO.js";import{a as $p,c as L1,d as z1,e as ua,f as Bi,g as jq}from"./chunk-MPW2CV3F.js";import{a as F1}from"./chunk-7JSZLOAR.js";import{a as B1}from"./chunk-AKD24HZC.js";import{a as H1}from"./chunk-VG3QEH5O.js";import{a as V1,b as j1,c as R1}from"./chunk-H337OZRD.js";import{a as $s}from"./chunk-IMT3YYMD.js";import{a as U1}from"./chunk-UKEZ5GGN.js";import{a as lc,b as dc}from"./chunk-RPRM66DV.js";import{a as uc,b as cc}from"./chunk-S7AIVWKK.js";import{a as q1}from"./chunk-Z2JFLSVB.js";import{a as nc,b as ic,c as rc,d as oc,e as ac,f as sc,g as la,m as Et,n as en,o as M1,p as k1,q as A1,r as D1,s as N1,t as jr}from"./chunk-F27XTST6.js";import{A as O1,B as Ii,C as Ss,a as C1,b as qr,c as yo,e as In,f as x1,h as w1,i as I1,j as S1,k as $1,l as wi,m as E1,o as T1,p as Vr,s as sa,t as vo,u as P1,v as bo}from"./chunk-KUNMS7VX.js";import{a as Br}from"./chunk-G7T7KOJA.js";import{d as Ri}from"./chunk-25NXLXGL.js";import{b as Pt}from"./chunk-UBQOKDSO.js";import{k as pt,m as Rr,n as rt}from"./chunk-CXEQVJNG.js";import{a as ft,b as Tt}from"./chunk-CPAHENLQ.js";import{e as b1}from"./chunk-RJOGO4M5.js";import{$a as f1,Ac as g1,Bc as _1,Ca as kr,Cc as dt,D as s1,Da as d1,Dc as xi,Ec as go,Fa as ra,Fc as ai,Gc as aa,Hb as me,Hc as A,Ib as j,Ic as V,Jb as R,Jc as At,Lb as vn,M as na,Mb as bn,Nb as Cn,Ob as E,Pb as y,Qb as v,Qc as xn,Rb as q,Rc as le,Sb as Yu,Sc as Fr,Tb as Xu,Ub as Zu,Uc as y1,Vb as ws,Wb as Is,Xa as Ke,Z as xp,_b as ue,a as ye,aa as xs,ab as m,b as at,bc as Z,cc as Qu,dc as S,e as I,fa as l1,fb as Ku,g as st,ga as Kn,gb as ur,h as pe,ha as ia,hc as wp,ib as po,ic as Ip,id as si,ja as u1,jc as Sp,jd as _o,k as i1,ka as c1,kc as Ar,kd as wn,la as L,lc as Dr,mb as Ce,mc as h1,n as Gn,nb as oa,nc as Ci,o as Cp,ob as mo,oc as Nr,pb as p1,pc as ve,q as r1,qc as M,ra as Y,rc as se,rd as tc,sa as X,sb as Me,sc as ie,tc as ho,ub as m1,uc as ec,v as o1,vb as Ju,w as je,x as a1,xc as lt,yc as ut,za as Gu,zc as ct,zd as v1}from"./chunk-WEVBEUAJ.js";var ev=I(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.formatNames=zi.fastFormats=zi.fullFormats=void 0;function Li(e,n){return{validate:e,compare:n}}zi.fullFormats={date:Li(Y1,Op),time:Li(Tp(!0),Mp),"date-time":Li(G1(!0),Z1),"iso-time":Li(Tp(),X1),"iso-date-time":Li(G1(),Q1),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:Hq,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:Zq,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:Wq,int32:{type:"number",validate:Jq},int64:{type:"number",validate:Yq},float:{type:"number",validate:J1},double:{type:"number",validate:J1},password:!0,binary:!0};zi.fastFormats=at(ye({},zi.fullFormats),{date:Li(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Op),time:Li(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Mp),"date-time":Li(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Z1),"iso-time":Li(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,X1),"iso-date-time":Li(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Q1),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i});zi.formatNames=Object.keys(zi.fullFormats);function Rq(e){return e%4===0&&(e%100!==0||e%400===0)}var Bq=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Lq=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Y1(e){let n=Bq.exec(e);if(!n)return!1;let t=+n[1],i=+n[2],r=+n[3];return i>=1&&i<=12&&r>=1&&r<=(i===2&&Rq(t)?29:Lq[i])}function Op(e,n){if(e&&n)return e>n?1:e<n?-1:0}var Ep=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Tp(e){return function(t){let i=Ep.exec(t);if(!i)return!1;let r=+i[1],a=+i[2],l=+i[3],u=i[4],d=i[5]==="-"?-1:1,p=+(i[6]||0),h=+(i[7]||0);if(p>23||h>59||e&&!u)return!1;if(r<=23&&a<=59&&l<60)return!0;let _=a-h*d,C=r-p*d-(_<0?1:0);return(C===23||C===-1)&&(_===59||_===-1)&&l<61}}function Mp(e,n){if(!(e&&n))return;let t=new Date("2020-01-01T"+e).valueOf(),i=new Date("2020-01-01T"+n).valueOf();if(t&&i)return t-i}function X1(e,n){if(!(e&&n))return;let t=Ep.exec(e),i=Ep.exec(n);if(t&&i)return e=t[1]+t[2]+t[3],n=i[1]+i[2]+i[3],e>n?1:e<n?-1:0}var Pp=/t|\s/i;function G1(e){let n=Tp(e);return function(i){let r=i.split(Pp);return r.length===2&&Y1(r[0])&&n(r[1])}}function Z1(e,n){if(!(e&&n))return;let t=new Date(e).valueOf(),i=new Date(n).valueOf();if(t&&i)return t-i}function Q1(e,n){if(!(e&&n))return;let[t,i]=e.split(Pp),[r,a]=n.split(Pp),l=Op(t,r);if(l!==void 0)return l||Mp(i,a)}var zq=/\/|:/,Uq=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function Hq(e){return zq.test(e)&&Uq.test(e)}var K1=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function Wq(e){return K1.lastIndex=0,K1.test(e)}var Gq=-(2**31),Kq=2**31-1;function Jq(e){return Number.isInteger(e)&&e<=Kq&&e>=Gq}function Yq(e){return Number.isInteger(e)}function J1(){return!0}var Xq=/[^\\]\\Z/;function Zq(e){if(Xq.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var Ps=I(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.regexpCode=et.getEsmExportName=et.getProperty=et.safeStringify=et.stringify=et.strConcat=et.addCodeArg=et.str=et._=et.nil=et._Code=et.Name=et.IDENTIFIER=et._CodeOrName=void 0;var Es=class{};et._CodeOrName=Es;et.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Co=class extends Es{constructor(n){if(super(),!et.IDENTIFIER.test(n))throw new Error("CodeGen: name must be a valid identifier");this.str=n}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};et.Name=Co;var li=class extends Es{constructor(n){super(),this._items=typeof n=="string"?[n]:n}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let n=this._items[0];return n===""||n==='""'}get str(){var n;return(n=this._str)!==null&&n!==void 0?n:this._str=this._items.reduce((t,i)=>`${t}${i}`,"")}get names(){var n;return(n=this._names)!==null&&n!==void 0?n:this._names=this._items.reduce((t,i)=>(i instanceof Co&&(t[i.str]=(t[i.str]||0)+1),t),{})}};et._Code=li;et.nil=new li("");function tv(e,...n){let t=[e[0]],i=0;for(;i<n.length;)Ap(t,n[i]),t.push(e[++i]);return new li(t)}et._=tv;var kp=new li("+");function nv(e,...n){let t=[Ts(e[0])],i=0;for(;i<n.length;)t.push(kp),Ap(t,n[i]),t.push(kp,Ts(e[++i]));return Qq(t),new li(t)}et.str=nv;function Ap(e,n){n instanceof li?e.push(...n._items):n instanceof Co?e.push(n):e.push(nV(n))}et.addCodeArg=Ap;function Qq(e){let n=1;for(;n<e.length-1;){if(e[n]===kp){let t=eV(e[n-1],e[n+1]);if(t!==void 0){e.splice(n-1,3,t);continue}e[n++]="+"}n++}}function eV(e,n){if(n==='""')return e;if(e==='""')return n;if(typeof e=="string")return n instanceof Co||e[e.length-1]!=='"'?void 0:typeof n!="string"?`${e.slice(0,-1)}${n}"`:n[0]==='"'?e.slice(0,-1)+n.slice(1):void 0;if(typeof n=="string"&&n[0]==='"'&&!(e instanceof Co))return`"${e}${n.slice(1)}`}function tV(e,n){return n.emptyStr()?e:e.emptyStr()?n:nv`${e}${n}`}et.strConcat=tV;function nV(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Ts(Array.isArray(e)?e.join(","):e)}function iV(e){return new li(Ts(e))}et.stringify=iV;function Ts(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}et.safeStringify=Ts;function rV(e){return typeof e=="string"&&et.IDENTIFIER.test(e)?new li(`.${e}`):tv`[${e}]`}et.getProperty=rV;function oV(e){if(typeof e=="string"&&et.IDENTIFIER.test(e))return new li(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}et.getEsmExportName=oV;function aV(e){return new li(e.toString())}et.regexpCode=aV});var Fp=I(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.ValueScope=Dn.ValueScopeName=Dn.Scope=Dn.varKinds=Dn.UsedValueState=void 0;var An=Ps(),Dp=class extends Error{constructor(n){super(`CodeGen: "code" for ${n} not defined`),this.value=n.value}},fc=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(fc||(Dn.UsedValueState=fc={}));Dn.varKinds={const:new An.Name("const"),let:new An.Name("let"),var:new An.Name("var")};var pc=class{constructor({prefixes:n,parent:t}={}){this._names={},this._prefixes=n,this._parent=t}toName(n){return n instanceof An.Name?n:this.name(n)}name(n){return new An.Name(this._newName(n))}_newName(n){let t=this._names[n]||this._nameGroup(n);return`${n}${t.index++}`}_nameGroup(n){var t,i;if(!((i=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||i===void 0)&&i.has(n)||this._prefixes&&!this._prefixes.has(n))throw new Error(`CodeGen: prefix "${n}" is not allowed in this scope`);return this._names[n]={prefix:n,index:0}}};Dn.Scope=pc;var mc=class extends An.Name{constructor(n,t){super(t),this.prefix=n}setValue(n,{property:t,itemIndex:i}){this.value=n,this.scopePath=(0,An._)`.${new An.Name(t)}[${i}]`}};Dn.ValueScopeName=mc;var sV=(0,An._)`\n`,Np=class extends pc{constructor(n){super(n),this._values={},this._scope=n.scope,this.opts=at(ye({},n),{_n:n.lines?sV:An.nil})}get(){return this._scope}name(n){return new mc(n,this._newName(n))}value(n,t){var i;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let r=this.toName(n),{prefix:a}=r,l=(i=t.key)!==null&&i!==void 0?i:t.ref,u=this._values[a];if(u){let h=u.get(l);if(h)return h}else u=this._values[a]=new Map;u.set(l,r);let d=this._scope[a]||(this._scope[a]=[]),p=d.length;return d[p]=t.ref,r.setValue(t,{property:a,itemIndex:p}),r}getValue(n,t){let i=this._values[n];if(i)return i.get(t)}scopeRefs(n,t=this._values){return this._reduceValues(t,i=>{if(i.scopePath===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return(0,An._)`${n}${i.scopePath}`})}scopeCode(n=this._values,t,i){return this._reduceValues(n,r=>{if(r.value===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return r.value.code},t,i)}_reduceValues(n,t,i={},r){let a=An.nil;for(let l in n){let u=n[l];if(!u)continue;let d=i[l]=i[l]||new Map;u.forEach(p=>{if(d.has(p))return;d.set(p,fc.Started);let h=t(p);if(h){let _=this.opts.es5?Dn.varKinds.var:Dn.varKinds.const;a=(0,An._)`${a}${_} ${p} = ${h};${this.opts._n}`}else if(h=r?.(p))a=(0,An._)`${a}${h}${this.opts._n}`;else throw new Dp(p);d.set(p,fc.Completed)})}return a}};Dn.ValueScope=Np});var xe=I(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.or=Le.and=Le.not=Le.CodeGen=Le.operators=Le.varKinds=Le.ValueScopeName=Le.ValueScope=Le.Scope=Le.Name=Le.regexpCode=Le.stringify=Le.getProperty=Le.nil=Le.strConcat=Le.str=Le._=void 0;var Xe=Ps(),Si=Fp(),Lr=Ps();Object.defineProperty(Le,"_",{enumerable:!0,get:function(){return Lr._}});Object.defineProperty(Le,"str",{enumerable:!0,get:function(){return Lr.str}});Object.defineProperty(Le,"strConcat",{enumerable:!0,get:function(){return Lr.strConcat}});Object.defineProperty(Le,"nil",{enumerable:!0,get:function(){return Lr.nil}});Object.defineProperty(Le,"getProperty",{enumerable:!0,get:function(){return Lr.getProperty}});Object.defineProperty(Le,"stringify",{enumerable:!0,get:function(){return Lr.stringify}});Object.defineProperty(Le,"regexpCode",{enumerable:!0,get:function(){return Lr.regexpCode}});Object.defineProperty(Le,"Name",{enumerable:!0,get:function(){return Lr.Name}});var vc=Fp();Object.defineProperty(Le,"Scope",{enumerable:!0,get:function(){return vc.Scope}});Object.defineProperty(Le,"ValueScope",{enumerable:!0,get:function(){return vc.ValueScope}});Object.defineProperty(Le,"ValueScopeName",{enumerable:!0,get:function(){return vc.ValueScopeName}});Object.defineProperty(Le,"varKinds",{enumerable:!0,get:function(){return vc.varKinds}});Le.operators={GT:new Xe._Code(">"),GTE:new Xe._Code(">="),LT:new Xe._Code("<"),LTE:new Xe._Code("<="),EQ:new Xe._Code("==="),NEQ:new Xe._Code("!=="),NOT:new Xe._Code("!"),OR:new Xe._Code("||"),AND:new Xe._Code("&&"),ADD:new Xe._Code("+")};var cr=class{optimizeNodes(){return this}optimizeNames(n,t){return this}},qp=class extends cr{constructor(n,t,i){super(),this.varKind=n,this.name=t,this.rhs=i}render({es5:n,_n:t}){let i=n?Si.varKinds.var:this.varKind,r=this.rhs===void 0?"":` = ${this.rhs}`;return`${i} ${this.name}${r};`+t}optimizeNames(n,t){if(n[this.name.str])return this.rhs&&(this.rhs=ca(this.rhs,n,t)),this}get names(){return this.rhs instanceof Xe._CodeOrName?this.rhs.names:{}}},gc=class extends cr{constructor(n,t,i){super(),this.lhs=n,this.rhs=t,this.sideEffects=i}render({_n:n}){return`${this.lhs} = ${this.rhs};`+n}optimizeNames(n,t){if(!(this.lhs instanceof Xe.Name&&!n[this.lhs.str]&&!this.sideEffects))return this.rhs=ca(this.rhs,n,t),this}get names(){let n=this.lhs instanceof Xe.Name?{}:ye({},this.lhs.names);return yc(n,this.rhs)}},Vp=class extends gc{constructor(n,t,i,r){super(n,i,r),this.op=t}render({_n:n}){return`${this.lhs} ${this.op}= ${this.rhs};`+n}},jp=class extends cr{constructor(n){super(),this.label=n,this.names={}}render({_n:n}){return`${this.label}:`+n}},Rp=class extends cr{constructor(n){super(),this.label=n,this.names={}}render({_n:n}){return`break${this.label?` ${this.label}`:""};`+n}},Bp=class extends cr{constructor(n){super(),this.error=n}render({_n:n}){return`throw ${this.error};`+n}get names(){return this.error.names}},Lp=class extends cr{constructor(n){super(),this.code=n}render({_n:n}){return`${this.code};`+n}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(n,t){return this.code=ca(this.code,n,t),this}get names(){return this.code instanceof Xe._CodeOrName?this.code.names:{}}},Os=class extends cr{constructor(n=[]){super(),this.nodes=n}render(n){return this.nodes.reduce((t,i)=>t+i.render(n),"")}optimizeNodes(){let{nodes:n}=this,t=n.length;for(;t--;){let i=n[t].optimizeNodes();Array.isArray(i)?n.splice(t,1,...i):i?n[t]=i:n.splice(t,1)}return n.length>0?this:void 0}optimizeNames(n,t){let{nodes:i}=this,r=i.length;for(;r--;){let a=i[r];a.optimizeNames(n,t)||(lV(n,a.names),i.splice(r,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce((n,t)=>xo(n,t.names),{})}},dr=class extends Os{render(n){return"{"+n._n+super.render(n)+"}"+n._n}},zp=class extends Os{},Up=(()=>{class e extends dr{}return e.kind="else",e})(),hc=(()=>{class e extends dr{constructor(t,i){super(i),this.condition=t}render(t){let i=`if(${this.condition})`+super.render(t);return this.else&&(i+="else "+this.else.render(t)),i}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let i=this.else;if(i){let r=i.optimizeNodes();i=this.else=Array.isArray(r)?new Up(r):r}if(i)return t===!1?i instanceof e?i:i.nodes:this.nodes.length?this:new e(sv(t),i instanceof e?[i]:i.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,i){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(t,i),!!(super.optimizeNames(t,i)||this.else))return this.condition=ca(this.condition,t,i),this}get names(){let t=super.names;return yc(t,this.condition),this.else&&xo(t,this.else.names),t}}return e.kind="if",e})(),bc=(()=>{class e extends dr{}return e.kind="for",e})(),Hp=class extends bc{constructor(n){super(),this.iteration=n}render(n){return`for(${this.iteration})`+super.render(n)}optimizeNames(n,t){if(super.optimizeNames(n,t))return this.iteration=ca(this.iteration,n,t),this}get names(){return xo(super.names,this.iteration.names)}},Wp=class extends bc{constructor(n,t,i,r){super(),this.varKind=n,this.name=t,this.from=i,this.to=r}render(n){let t=n.es5?Si.varKinds.var:this.varKind,{name:i,from:r,to:a}=this;return`for(${t} ${i}=${r}; ${i}<${a}; ${i}++)`+super.render(n)}get names(){let n=yc(super.names,this.from);return yc(n,this.to)}},_c=class extends bc{constructor(n,t,i,r){super(),this.loop=n,this.varKind=t,this.name=i,this.iterable=r}render(n){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(n)}optimizeNames(n,t){if(super.optimizeNames(n,t))return this.iterable=ca(this.iterable,n,t),this}get names(){return xo(super.names,this.iterable.names)}},iv=(()=>{class e extends dr{constructor(t,i,r){super(),this.name=t,this.args=i,this.async=r}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),rv=(()=>{class e extends Os{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Gp=class extends dr{render(n){let t="try"+super.render(n);return this.catch&&(t+=this.catch.render(n)),this.finally&&(t+=this.finally.render(n)),t}optimizeNodes(){var n,t;return super.optimizeNodes(),(n=this.catch)===null||n===void 0||n.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(n,t){var i,r;return super.optimizeNames(n,t),(i=this.catch)===null||i===void 0||i.optimizeNames(n,t),(r=this.finally)===null||r===void 0||r.optimizeNames(n,t),this}get names(){let n=super.names;return this.catch&&xo(n,this.catch.names),this.finally&&xo(n,this.finally.names),n}},ov=(()=>{class e extends dr{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),av=(()=>{class e extends dr{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),Kp=class{constructor(n,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=at(ye({},t),{_n:t.lines?`
2
2
  `:""}),this._extScope=n,this._scope=new Si.Scope({parent:n}),this._nodes=[new zp]}toString(){return this._root.render(this.opts)}name(n){return this._scope.name(n)}scopeName(n){return this._extScope.name(n)}scopeValue(n,t){let i=this._extScope.value(n,t);return(this._values[i.prefix]||(this._values[i.prefix]=new Set)).add(i),i}getScopeValue(n,t){return this._extScope.getValue(n,t)}scopeRefs(n){return this._extScope.scopeRefs(n,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(n,t,i,r){let a=this._scope.toName(t);return i!==void 0&&r&&(this._constants[a.str]=i),this._leafNode(new qp(n,a,i)),a}const(n,t,i){return this._def(Si.varKinds.const,n,t,i)}let(n,t,i){return this._def(Si.varKinds.let,n,t,i)}var(n,t,i){return this._def(Si.varKinds.var,n,t,i)}assign(n,t,i){return this._leafNode(new gc(n,t,i))}add(n,t){return this._leafNode(new Vp(n,Le.operators.ADD,t))}code(n){return typeof n=="function"?n():n!==Xe.nil&&this._leafNode(new Lp(n)),this}object(...n){let t=["{"];for(let[i,r]of n)t.length>1&&t.push(","),t.push(i),(i!==r||this.opts.es5)&&(t.push(":"),(0,Xe.addCodeArg)(t,r));return t.push("}"),new Xe._Code(t)}if(n,t,i){if(this._blockNode(new hc(n)),t&&i)this.code(t).else().code(i).endIf();else if(t)this.code(t).endIf();else if(i)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(n){return this._elseNode(new hc(n))}else(){return this._elseNode(new Up)}endIf(){return this._endBlockNode(hc,Up)}_for(n,t){return this._blockNode(n),t&&this.code(t).endFor(),this}for(n,t){return this._for(new Hp(n),t)}forRange(n,t,i,r,a=this.opts.es5?Si.varKinds.var:Si.varKinds.let){let l=this._scope.toName(n);return this._for(new Wp(a,l,t,i),()=>r(l))}forOf(n,t,i,r=Si.varKinds.const){let a=this._scope.toName(n);if(this.opts.es5){let l=t instanceof Xe.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,Xe._)`${l}.length`,u=>{this.var(a,(0,Xe._)`${l}[${u}]`),i(a)})}return this._for(new _c("of",r,a,t),()=>i(a))}forIn(n,t,i,r=this.opts.es5?Si.varKinds.var:Si.varKinds.const){if(this.opts.ownProperties)return this.forOf(n,(0,Xe._)`Object.keys(${t})`,i);let a=this._scope.toName(n);return this._for(new _c("in",r,a,t),()=>i(a))}endFor(){return this._endBlockNode(bc)}label(n){return this._leafNode(new jp(n))}break(n){return this._leafNode(new Rp(n))}return(n){let t=new rv;if(this._blockNode(t),this.code(n),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(rv)}try(n,t,i){if(!t&&!i)throw new Error('CodeGen: "try" without "catch" and "finally"');let r=new Gp;if(this._blockNode(r),this.code(n),t){let a=this.name("e");this._currNode=r.catch=new ov(a),t(a)}return i&&(this._currNode=r.finally=new av,this.code(i)),this._endBlockNode(ov,av)}throw(n){return this._leafNode(new Bp(n))}block(n,t){return this._blockStarts.push(this._nodes.length),n&&this.code(n).endBlock(t),this}endBlock(n){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let i=this._nodes.length-t;if(i<0||n!==void 0&&i!==n)throw new Error(`CodeGen: wrong number of nodes: ${i} vs ${n} expected`);return this._nodes.length=t,this}func(n,t=Xe.nil,i,r){return this._blockNode(new iv(n,t,i)),r&&this.code(r).endFunc(),this}endFunc(){return this._endBlockNode(iv)}optimize(n=1){for(;n-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(n){return this._currNode.nodes.push(n),this}_blockNode(n){this._currNode.nodes.push(n),this._nodes.push(n)}_endBlockNode(n,t){let i=this._currNode;if(i instanceof n||t&&i instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${n.kind}/${t.kind}`:n.kind}"`)}_elseNode(n){let t=this._currNode;if(!(t instanceof hc))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=n,this}get _root(){return this._nodes[0]}get _currNode(){let n=this._nodes;return n[n.length-1]}set _currNode(n){let t=this._nodes;t[t.length-1]=n}};Le.CodeGen=Kp;function xo(e,n){for(let t in n)e[t]=(e[t]||0)+(n[t]||0);return e}function yc(e,n){return n instanceof Xe._CodeOrName?xo(e,n.names):e}function ca(e,n,t){if(e instanceof Xe.Name)return i(e);if(!r(e))return e;return new Xe._Code(e._items.reduce((a,l)=>(l instanceof Xe.Name&&(l=i(l)),l instanceof Xe._Code?a.push(...l._items):a.push(l),a),[]));function i(a){let l=t[a.str];return l===void 0||n[a.str]!==1?a:(delete n[a.str],l)}function r(a){return a instanceof Xe._Code&&a._items.some(l=>l instanceof Xe.Name&&n[l.str]===1&&t[l.str]!==void 0)}}function lV(e,n){for(let t in n)e[t]=(e[t]||0)-(n[t]||0)}function sv(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,Xe._)`!${Jp(e)}`}Le.not=sv;var uV=lv(Le.operators.AND);function cV(...e){return e.reduce(uV)}Le.and=cV;var dV=lv(Le.operators.OR);function fV(...e){return e.reduce(dV)}Le.or=fV;function lv(e){return(n,t)=>n===Xe.nil?t:t===Xe.nil?n:(0,Xe._)`${Jp(n)} ${e} ${Jp(t)}`}function Jp(e){return e instanceof Xe.Name?e:(0,Xe._)`(${e})`}});var We=I(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.checkStrictMode=ze.getErrorPath=ze.Type=ze.useFunc=ze.setEvaluated=ze.evaluatedPropsToName=ze.mergeEvaluated=ze.eachItem=ze.unescapeJsonPointer=ze.escapeJsonPointer=ze.escapeFragment=ze.unescapeFragment=ze.schemaRefOrVal=ze.schemaHasRulesButRef=ze.schemaHasRules=ze.checkUnknownRules=ze.alwaysValidSchema=ze.toHash=void 0;var _t=xe(),pV=Ps();function mV(e){let n={};for(let t of e)n[t]=!0;return n}ze.toHash=mV;function hV(e,n){return typeof n=="boolean"?n:Object.keys(n).length===0?!0:(dv(e,n),!fv(n,e.self.RULES.all))}ze.alwaysValidSchema=hV;function dv(e,n=e.schema){let{opts:t,self:i}=e;if(!t.strictSchema||typeof n=="boolean")return;let r=i.RULES.keywords;for(let a in n)r[a]||hv(e,`unknown keyword: "${a}"`)}ze.checkUnknownRules=dv;function fv(e,n){if(typeof e=="boolean")return!e;for(let t in e)if(n[t])return!0;return!1}ze.schemaHasRules=fv;function gV(e,n){if(typeof e=="boolean")return!e;for(let t in e)if(t!=="$ref"&&n.all[t])return!0;return!1}ze.schemaHasRulesButRef=gV;function _V({topSchemaRef:e,schemaPath:n},t,i,r){if(!r){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,_t._)`${t}`}return(0,_t._)`${e}${n}${(0,_t.getProperty)(i)}`}ze.schemaRefOrVal=_V;function yV(e){return pv(decodeURIComponent(e))}ze.unescapeFragment=yV;function vV(e){return encodeURIComponent(Xp(e))}ze.escapeFragment=vV;function Xp(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}ze.escapeJsonPointer=Xp;function pv(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}ze.unescapeJsonPointer=pv;function bV(e,n){if(Array.isArray(e))for(let t of e)n(t);else n(e)}ze.eachItem=bV;function uv({mergeNames:e,mergeToName:n,mergeValues:t,resultToName:i}){return(r,a,l,u)=>{let d=l===void 0?a:l instanceof _t.Name?(a instanceof _t.Name?e(r,a,l):n(r,a,l),l):a instanceof _t.Name?(n(r,l,a),a):t(a,l);return u===_t.Name&&!(d instanceof _t.Name)?i(r,d):d}}ze.mergeEvaluated={props:uv({mergeNames:(e,n,t)=>e.if((0,_t._)`${t} !== true && ${n} !== undefined`,()=>{e.if((0,_t._)`${n} === true`,()=>e.assign(t,!0),()=>e.assign(t,(0,_t._)`${t} || {}`).code((0,_t._)`Object.assign(${t}, ${n})`))}),mergeToName:(e,n,t)=>e.if((0,_t._)`${t} !== true`,()=>{n===!0?e.assign(t,!0):(e.assign(t,(0,_t._)`${t} || {}`),Zp(e,t,n))}),mergeValues:(e,n)=>e===!0?!0:ye(ye({},e),n),resultToName:mv}),items:uv({mergeNames:(e,n,t)=>e.if((0,_t._)`${t} !== true && ${n} !== undefined`,()=>e.assign(t,(0,_t._)`${n} === true ? true : ${t} > ${n} ? ${t} : ${n}`)),mergeToName:(e,n,t)=>e.if((0,_t._)`${t} !== true`,()=>e.assign(t,n===!0?!0:(0,_t._)`${t} > ${n} ? ${t} : ${n}`)),mergeValues:(e,n)=>e===!0?!0:Math.max(e,n),resultToName:(e,n)=>e.var("items",n)})};function mv(e,n){if(n===!0)return e.var("props",!0);let t=e.var("props",(0,_t._)`{}`);return n!==void 0&&Zp(e,t,n),t}ze.evaluatedPropsToName=mv;function Zp(e,n,t){Object.keys(t).forEach(i=>e.assign((0,_t._)`${n}${(0,_t.getProperty)(i)}`,!0))}ze.setEvaluated=Zp;var cv={};function CV(e,n){return e.scopeValue("func",{ref:n,code:cv[n.code]||(cv[n.code]=new pV._Code(n.code))})}ze.useFunc=CV;var Yp=function(e){return e[e.Num=0]="Num",e[e.Str=1]="Str",e}(Yp||(ze.Type=Yp={}));function xV(e,n,t){if(e instanceof _t.Name){let i=n===Yp.Num;return t?i?(0,_t._)`"[" + ${e} + "]"`:(0,_t._)`"['" + ${e} + "']"`:i?(0,_t._)`"/" + ${e}`:(0,_t._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,_t.getProperty)(e).toString():"/"+Xp(e)}ze.getErrorPath=xV;function hv(e,n,t=e.opts.strictSchema){if(t){if(n=`strict mode: ${n}`,t===!0)throw new Error(n);e.self.logger.warn(n)}}ze.checkStrictMode=hv});var ui=I(Qp=>{"use strict";Object.defineProperty(Qp,"__esModule",{value:!0});var un=xe(),wV={data:new un.Name("data"),valCxt:new un.Name("valCxt"),instancePath:new un.Name("instancePath"),parentData:new un.Name("parentData"),parentDataProperty:new un.Name("parentDataProperty"),rootData:new un.Name("rootData"),dynamicAnchors:new un.Name("dynamicAnchors"),vErrors:new un.Name("vErrors"),errors:new un.Name("errors"),this:new un.Name("this"),self:new un.Name("self"),scope:new un.Name("scope"),json:new un.Name("json"),jsonPos:new un.Name("jsonPos"),jsonLen:new un.Name("jsonLen"),jsonPart:new un.Name("jsonPart")};Qp.default=wV});var Ms=I(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.extendErrors=cn.resetErrorsCount=cn.reportExtraError=cn.reportError=cn.keyword$DataError=cn.keywordError=void 0;var Qe=xe(),Cc=We(),Sn=ui();cn.keywordError={message:({keyword:e})=>(0,Qe.str)`must pass "${e}" keyword validation`};cn.keyword$DataError={message:({keyword:e,schemaType:n})=>n?(0,Qe.str)`"${e}" keyword must be ${n} ($data)`:(0,Qe.str)`"${e}" keyword is invalid ($data)`};function IV(e,n=cn.keywordError,t,i){let{it:r}=e,{gen:a,compositeRule:l,allErrors:u}=r,d=yv(e,n,t);i??(l||u)?gv(a,d):_v(r,(0,Qe._)`[${d}]`)}cn.reportError=IV;function SV(e,n=cn.keywordError,t){let{it:i}=e,{gen:r,compositeRule:a,allErrors:l}=i,u=yv(e,n,t);gv(r,u),a||l||_v(i,Sn.default.vErrors)}cn.reportExtraError=SV;function $V(e,n){e.assign(Sn.default.errors,n),e.if((0,Qe._)`${Sn.default.vErrors} !== null`,()=>e.if(n,()=>e.assign((0,Qe._)`${Sn.default.vErrors}.length`,n),()=>e.assign(Sn.default.vErrors,null)))}cn.resetErrorsCount=$V;function EV({gen:e,keyword:n,schemaValue:t,data:i,errsCount:r,it:a}){if(r===void 0)throw new Error("ajv implementation error");let l=e.name("err");e.forRange("i",r,Sn.default.errors,u=>{e.const(l,(0,Qe._)`${Sn.default.vErrors}[${u}]`),e.if((0,Qe._)`${l}.instancePath === undefined`,()=>e.assign((0,Qe._)`${l}.instancePath`,(0,Qe.strConcat)(Sn.default.instancePath,a.errorPath))),e.assign((0,Qe._)`${l}.schemaPath`,(0,Qe.str)`${a.errSchemaPath}/${n}`),a.opts.verbose&&(e.assign((0,Qe._)`${l}.schema`,t),e.assign((0,Qe._)`${l}.data`,i))})}cn.extendErrors=EV;function gv(e,n){let t=e.const("err",n);e.if((0,Qe._)`${Sn.default.vErrors} === null`,()=>e.assign(Sn.default.vErrors,(0,Qe._)`[${t}]`),(0,Qe._)`${Sn.default.vErrors}.push(${t})`),e.code((0,Qe._)`${Sn.default.errors}++`)}function _v(e,n){let{gen:t,validateName:i,schemaEnv:r}=e;r.$async?t.throw((0,Qe._)`new ${e.ValidationError}(${n})`):(t.assign((0,Qe._)`${i}.errors`,n),t.return(!1))}var wo={keyword:new Qe.Name("keyword"),schemaPath:new Qe.Name("schemaPath"),params:new Qe.Name("params"),propertyName:new Qe.Name("propertyName"),message:new Qe.Name("message"),schema:new Qe.Name("schema"),parentSchema:new Qe.Name("parentSchema")};function yv(e,n,t){let{createErrors:i}=e.it;return i===!1?(0,Qe._)`{}`:TV(e,n,t)}function TV(e,n,t={}){let{gen:i,it:r}=e,a=[PV(r,t),OV(e,t)];return MV(e,n,a),i.object(...a)}function PV({errorPath:e},{instancePath:n}){let t=n?(0,Qe.str)`${e}${(0,Cc.getErrorPath)(n,Cc.Type.Str)}`:e;return[Sn.default.instancePath,(0,Qe.strConcat)(Sn.default.instancePath,t)]}function OV({keyword:e,it:{errSchemaPath:n}},{schemaPath:t,parentSchema:i}){let r=i?n:(0,Qe.str)`${n}/${e}`;return t&&(r=(0,Qe.str)`${r}${(0,Cc.getErrorPath)(t,Cc.Type.Str)}`),[wo.schemaPath,r]}function MV(e,{params:n,message:t},i){let{keyword:r,data:a,schemaValue:l,it:u}=e,{opts:d,propertyName:p,topSchemaRef:h,schemaPath:_}=u;i.push([wo.keyword,r],[wo.params,typeof n=="function"?n(e):n||(0,Qe._)`{}`]),d.messages&&i.push([wo.message,typeof t=="function"?t(e):t]),d.verbose&&i.push([wo.schema,l],[wo.parentSchema,(0,Qe._)`${h}${_}`],[Sn.default.data,a]),p&&i.push([wo.propertyName,p])}});var bv=I(da=>{"use strict";Object.defineProperty(da,"__esModule",{value:!0});da.boolOrEmptySchema=da.topBoolOrEmptySchema=void 0;var kV=Ms(),AV=xe(),DV=ui(),NV={message:"boolean schema is false"};function FV(e){let{gen:n,schema:t,validateName:i}=e;t===!1?vv(e,!1):typeof t=="object"&&t.$async===!0?n.return(DV.default.data):(n.assign((0,AV._)`${i}.errors`,null),n.return(!0))}da.topBoolOrEmptySchema=FV;function qV(e,n){let{gen:t,schema:i}=e;i===!1?(t.var(n,!1),vv(e)):t.var(n,!0)}da.boolOrEmptySchema=qV;function vv(e,n){let{gen:t,data:i}=e,r={gen:t,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,kV.reportError)(r,NV,void 0,n)}});var em=I(fa=>{"use strict";Object.defineProperty(fa,"__esModule",{value:!0});fa.getRules=fa.isJSONType=void 0;var VV=["string","number","integer","boolean","null","object","array"],jV=new Set(VV);function RV(e){return typeof e=="string"&&jV.has(e)}fa.isJSONType=RV;function BV(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:at(ye({},e),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}fa.getRules=BV});var tm=I(zr=>{"use strict";Object.defineProperty(zr,"__esModule",{value:!0});zr.shouldUseRule=zr.shouldUseGroup=zr.schemaHasRulesForType=void 0;function LV({schema:e,self:n},t){let i=n.RULES.types[t];return i&&i!==!0&&Cv(e,i)}zr.schemaHasRulesForType=LV;function Cv(e,n){return n.rules.some(t=>xv(e,t))}zr.shouldUseGroup=Cv;function xv(e,n){var t;return e[n.keyword]!==void 0||((t=n.definition.implements)===null||t===void 0?void 0:t.some(i=>e[i]!==void 0))}zr.shouldUseRule=xv});var ks=I(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.reportTypeError=dn.checkDataTypes=dn.checkDataType=dn.coerceAndCheckDataType=dn.getJSONTypes=dn.getSchemaTypes=dn.DataType=void 0;var zV=em(),UV=tm(),HV=Ms(),qe=xe(),wv=We(),pa=function(e){return e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong",e}(pa||(dn.DataType=pa={}));function WV(e){let n=Iv(e.type);if(n.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!n.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&n.push("null")}return n}dn.getSchemaTypes=WV;function Iv(e){let n=Array.isArray(e)?e:e?[e]:[];if(n.every(zV.isJSONType))return n;throw new Error("type must be JSONType or JSONType[]: "+n.join(","))}dn.getJSONTypes=Iv;function GV(e,n){let{gen:t,data:i,opts:r}=e,a=KV(n,r.coerceTypes),l=n.length>0&&!(a.length===0&&n.length===1&&(0,UV.schemaHasRulesForType)(e,n[0]));if(l){let u=im(n,i,r.strictNumbers,pa.Wrong);t.if(u,()=>{a.length?JV(e,n,a):rm(e)})}return l}dn.coerceAndCheckDataType=GV;var Sv=new Set(["string","number","integer","boolean","null"]);function KV(e,n){return n?e.filter(t=>Sv.has(t)||n==="array"&&t==="array"):[]}function JV(e,n,t){let{gen:i,data:r,opts:a}=e,l=i.let("dataType",(0,qe._)`typeof ${r}`),u=i.let("coerced",(0,qe._)`undefined`);a.coerceTypes==="array"&&i.if((0,qe._)`${l} == 'object' && Array.isArray(${r}) && ${r}.length == 1`,()=>i.assign(r,(0,qe._)`${r}[0]`).assign(l,(0,qe._)`typeof ${r}`).if(im(n,r,a.strictNumbers),()=>i.assign(u,r))),i.if((0,qe._)`${u} !== undefined`);for(let p of t)(Sv.has(p)||p==="array"&&a.coerceTypes==="array")&&d(p);i.else(),rm(e),i.endIf(),i.if((0,qe._)`${u} !== undefined`,()=>{i.assign(r,u),YV(e,u)});function d(p){switch(p){case"string":i.elseIf((0,qe._)`${l} == "number" || ${l} == "boolean"`).assign(u,(0,qe._)`"" + ${r}`).elseIf((0,qe._)`${r} === null`).assign(u,(0,qe._)`""`);return;case"number":i.elseIf((0,qe._)`${l} == "boolean" || ${r} === null
3
3
  || (${l} == "string" && ${r} && ${r} == +${r})`).assign(u,(0,qe._)`+${r}`);return;case"integer":i.elseIf((0,qe._)`${l} === "boolean" || ${r} === null
4
4
  || (${l} === "string" && ${r} && ${r} == +${r} && !(${r} % 1))`).assign(u,(0,qe._)`+${r}`);return;case"boolean":i.elseIf((0,qe._)`${r} === "false" || ${r} === 0 || ${r} === null`).assign(u,!1).elseIf((0,qe._)`${r} === "true" || ${r} === 1`).assign(u,!0);return;case"null":i.elseIf((0,qe._)`${r} === "" || ${r} === 0 || ${r} === false`),i.assign(u,null);return;case"array":i.elseIf((0,qe._)`${l} === "string" || ${l} === "number"
@@ -1 +1 @@
1
- import{a as b}from"./chunk-OE7MOFW7.js";import"./chunk-V2ZBY57I.js";import{d as k}from"./chunk-25NXLXGL.js";import{b as S}from"./chunk-4VESQ6LL.js";import{k as T,n as w}from"./chunk-UF7VL23T.js";import{a as C,b as $}from"./chunk-CPAHENLQ.js";import"./chunk-RJOGO4M5.js";import{$b as E,Dc as g,Hc as m,Ib as d,Ic as c,Jb as f,Jc as y,Sb as r,Tb as i,Ub as l,Xa as x,ab as n,dc as h,la as o,mb as _,qc as a,rc as s}from"./chunk-WEVBEUAJ.js";var I=t=>({command:t});function D(t,u){if(t&1&&(r(0,"div",7),a(1),i()),t&2){let e=h();n(),s(e.error)}}function R(t,u){t&1&&(r(0,"p",9),a(1),m(2,"translate"),i(),r(3,"div",10)(4,"div",11),l(5,"i",12),i()()),t&2&&(n(),s(c(2,1,"restart.please_wait_while_server_restarts")))}function B(t,u){if(t&1&&(r(0,"div",8)(1,"p"),a(2),m(3,"translate"),i(),l(4,"p",13),m(5,"translate"),i()),t&2){let e=h();n(2),s(c(3,2,"platform.docker.server_long_time")),n(2),E("innerHTML",y(5,4,"platform.docker.run_with_restart",g(7,I,e.command)),x)}}var U=(()=>{class t{$api=o(w);$router=o(k);$settings=o(S);$toastr=o(T);$translate=o(C);$ws=o(b);checkTimeout;checkDelay;io;resp={};timeout=!1;error=!1;command='<span class="font-monospace">--restart=always</span>';ngOnInit(){this.io=this.$ws.connectToNamespace("status"),this.io.connected.subscribe(()=>{this.io.socket.emit("monitor-server-status"),this.$settings.getAppSettings().catch(()=>{})}),this.$api.put("/platform-tools/docker/restart-container",{}).subscribe({next:e=>{this.resp=e,this.checkIfServerUp()},error:e=>{this.error=this.$translate.instant("restart.toast_server_restart_error"),console.error(e),this.$toastr.error(this.$translate.instant("restart.toast_server_restart_error"),this.$translate.instant("toast.title_error"))}})}ngOnDestroy(){this.io.end(),clearTimeout(this.checkDelay),clearTimeout(this.checkTimeout)}checkIfServerUp(){this.checkDelay=setTimeout(()=>{this.io.socket.on("homebridge-status",e=>{(e.status==="up"||e.status==="pending")&&(this.$toastr.success(this.$translate.instant("platform.docker.container_restarted"),this.$translate.instant("toast.title_success")),this.$router.navigate(["/"]))})},1e4),this.checkTimeout=setTimeout(()=>{this.$toastr.warning(this.$translate.instant("restart.toast_server_restart_timeout"),this.$translate.instant("toast.title_warning"),{timeOut:1e4}),this.timeout=!0},6e4)}static \u0275fac=function(p){return new(p||t)};static \u0275cmp=_({type:t,selectors:[["ng-component"]],decls:14,vars:8,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fab","fa-fw","fa-docker",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"alert","alert-error","my-4"],[1,"alert","alert-warning","my-4"],[1,"grey-text"],[1,"justify-content-center","my-4"],[1,"restart-progress-box","primary-text"],[1,"fas","fa-fw","fa-spinner","fa-spin"],[1,"grey-text","mb-0",3,"innerHTML"]],template:function(p,v){p&1&&(r(0,"div",0)(1,"h3",1),a(2),m(3,"translate"),i()(),r(4,"div",2)(5,"div",3),l(6,"i",4),i(),r(7,"div",5)(8,"h4",6),a(9),m(10,"translate"),i(),d(11,D,2,1,"div",7)(12,R,6,3),d(13,B,6,9,"div",8),i()()),p&2&&(n(2),s(c(3,4,"menu.restart.title")),n(7),s(c(10,6,"platform.docker.title_restarting")),n(2),f(v.error?11:12),n(2),f(v.timeout?13:-1))},dependencies:[$],styles:[".restart-progress-box[_ngcontent-%COMP%]{font-size:22px;font-weight:300;margin-top:15px}"]})}return t})();export{U as ContainerRestartComponent};
1
+ import{a as b}from"./chunk-G7T7KOJA.js";import"./chunk-EA6YVIQU.js";import{d as k}from"./chunk-25NXLXGL.js";import{b as S}from"./chunk-UBQOKDSO.js";import{k as T,n as w}from"./chunk-CXEQVJNG.js";import{a as C,b as $}from"./chunk-CPAHENLQ.js";import"./chunk-RJOGO4M5.js";import{$b as E,Dc as g,Hc as m,Ib as d,Ic as c,Jb as f,Jc as y,Sb as r,Tb as i,Ub as l,Xa as x,ab as n,dc as h,la as o,mb as _,qc as a,rc as s}from"./chunk-WEVBEUAJ.js";var I=t=>({command:t});function D(t,u){if(t&1&&(r(0,"div",7),a(1),i()),t&2){let e=h();n(),s(e.error)}}function R(t,u){t&1&&(r(0,"p",9),a(1),m(2,"translate"),i(),r(3,"div",10)(4,"div",11),l(5,"i",12),i()()),t&2&&(n(),s(c(2,1,"restart.please_wait_while_server_restarts")))}function B(t,u){if(t&1&&(r(0,"div",8)(1,"p"),a(2),m(3,"translate"),i(),l(4,"p",13),m(5,"translate"),i()),t&2){let e=h();n(2),s(c(3,2,"platform.docker.server_long_time")),n(2),E("innerHTML",y(5,4,"platform.docker.run_with_restart",g(7,I,e.command)),x)}}var U=(()=>{class t{$api=o(w);$router=o(k);$settings=o(S);$toastr=o(T);$translate=o(C);$ws=o(b);checkTimeout;checkDelay;io;resp={};timeout=!1;error=!1;command='<span class="font-monospace">--restart=always</span>';ngOnInit(){this.io=this.$ws.connectToNamespace("status"),this.io.connected.subscribe(()=>{this.io.socket.emit("monitor-server-status"),this.$settings.getAppSettings().catch(()=>{})}),this.$api.put("/platform-tools/docker/restart-container",{}).subscribe({next:e=>{this.resp=e,this.checkIfServerUp()},error:e=>{this.error=this.$translate.instant("restart.toast_server_restart_error"),console.error(e),this.$toastr.error(this.$translate.instant("restart.toast_server_restart_error"),this.$translate.instant("toast.title_error"))}})}ngOnDestroy(){this.io.end(),clearTimeout(this.checkDelay),clearTimeout(this.checkTimeout)}checkIfServerUp(){this.checkDelay=setTimeout(()=>{this.io.socket.on("homebridge-status",e=>{(e.status==="up"||e.status==="pending")&&(this.$toastr.success(this.$translate.instant("platform.docker.container_restarted"),this.$translate.instant("toast.title_success")),this.$router.navigate(["/"]))})},1e4),this.checkTimeout=setTimeout(()=>{this.$toastr.warning(this.$translate.instant("restart.toast_server_restart_timeout"),this.$translate.instant("toast.title_warning"),{timeOut:1e4}),this.timeout=!0},6e4)}static \u0275fac=function(p){return new(p||t)};static \u0275cmp=_({type:t,selectors:[["ng-component"]],decls:14,vars:8,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fab","fa-fw","fa-docker",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"alert","alert-error","my-4"],[1,"alert","alert-warning","my-4"],[1,"grey-text"],[1,"justify-content-center","my-4"],[1,"restart-progress-box","primary-text"],[1,"fas","fa-fw","fa-spinner","fa-spin"],[1,"grey-text","mb-0",3,"innerHTML"]],template:function(p,v){p&1&&(r(0,"div",0)(1,"h3",1),a(2),m(3,"translate"),i()(),r(4,"div",2)(5,"div",3),l(6,"i",4),i(),r(7,"div",5)(8,"h4",6),a(9),m(10,"translate"),i(),d(11,D,2,1,"div",7)(12,R,6,3),d(13,B,6,9,"div",8),i()()),p&2&&(n(2),s(c(3,4,"menu.restart.title")),n(7),s(c(10,6,"platform.docker.title_restarting")),n(2),f(v.error?11:12),n(2),f(v.timeout?13:-1))},dependencies:[$],styles:[".restart-progress-box[_ngcontent-%COMP%]{font-size:22px;font-weight:300;margin-top:15px}"]})}return t})();export{U as ContainerRestartComponent};
@@ -1 +1 @@
1
- import{t as k}from"./chunk-F27XTST6.js";import"./chunk-KUNMS7VX.js";import{d as P}from"./chunk-25NXLXGL.js";import{b as I}from"./chunk-4VESQ6LL.js";import{k as $,n as O}from"./chunk-UF7VL23T.js";import{a as y,b as T}from"./chunk-CPAHENLQ.js";import"./chunk-RJOGO4M5.js";import{Hc as a,Ib as f,Ic as s,Jb as v,Ob as h,Pb as o,Qb as r,Rb as C,_b as w,ab as n,bc as m,dc as b,la as c,mb as g,qc as l,ra as u,rc as S,sa as _,sc as d}from"./chunk-WEVBEUAJ.js";function E(t,x){if(t&1){let i=w();o(0,"p",5)(1,"button",6),m("click",function(){u(i);let e=b();return _(e.restartServer())}),l(2),a(3,"translate"),r()()}t&2&&(n(2),d(" ",s(3,1,"menu.linux.label_restart_server")," "))}function H(t,x){if(t&1){let i=w();o(0,"p",5)(1,"button",6),m("click",function(){u(i);let e=b();return _(e.shutdownServer())}),l(2),a(3,"translate"),r()()}t&2&&(n(2),d(" ",s(3,1,"menu.linux.label_shutdown_server")," "))}function B(t,x){if(t&1){let i=w();o(0,"p",5)(1,"button",6),m("click",function(){u(i);let e=b();return _(e.dockerRestartContainer())}),l(2),a(3,"translate"),r()()}t&2&&(n(2),d(" ",s(3,1,"menu.docker.restart_container")," "))}var G=(()=>{class t{$api=c(O);$router=c(P);$settings=c(I);$toastr=c($);$translate=c(y);canShutdownRestartHost=this.$settings.env.canShutdownRestartHost;runningInDocker=this.$settings.env.runningInDocker;restartHomebridge(){this.$router.navigate(["/restart"])}restartHomebridgeService(){this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).subscribe({next:()=>{this.$router.navigate(["/restart"])},error:i=>{console.error(i),this.$toastr.error(i.message,this.$translate.instant("toast.title_error"))}})}restartServer(){this.$router.navigate(["/platform-tools/linux/restart-server"])}shutdownServer(){this.$router.navigate(["/platform-tools/linux/shutdown-server"])}dockerRestartContainer(){this.$router.navigate(["/platform-tools/docker/restart-container"])}static \u0275fac=function(p){return new(p||t)};static \u0275cmp=g({type:t,selectors:[["ng-component"]],decls:19,vars:16,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fas","fa-fw","fa-power-off",2,"font-size","75px"],[1,"w-100","text-center","my-5"],["type","button",1,"btn","btn-primary","p-3","my-0",2,"width","85%",3,"click"],["type","button","container","body","triggers","hover",1,"btn","btn-primary","p-3","my-0",2,"width","85%",3,"click","openDelay","ngbTooltip"]],template:function(p,e){p&1&&(o(0,"div",0)(1,"h3",1),l(2),a(3,"translate"),r()(),o(4,"div",2)(5,"div",3),C(6,"i",4),r(),o(7,"p",5)(8,"button",6),m("click",function(){return e.restartHomebridge()}),l(9),a(10,"translate"),r()(),o(11,"p",5)(12,"button",7),a(13,"translate"),m("click",function(){return e.restartHomebridgeService()}),l(14),a(15,"translate"),r()(),f(16,E,4,3,"p",5),f(17,H,4,3,"p",5),f(18,B,4,3,"p",5),r()),p&2&&(n(2),S(s(3,8,"menu.restart.title")),n(7),d(" ",s(10,10,"menu.hbrestart.confirm_hb")," "),n(3),h("openDelay",150)("ngbTooltip",s(13,12,"reset.force_restart_hb_help_text")),n(2),d(" ",s(15,14,"menu.hbrestart.confirm_ui")," "),n(2),v(e.canShutdownRestartHost?16:-1),n(),v(e.canShutdownRestartHost?17:-1),n(),v(e.runningInDocker?18:-1))},dependencies:[k,T],encapsulation:2})}return t})();export{G as PowerOptionsComponent};
1
+ import{t as k}from"./chunk-F27XTST6.js";import"./chunk-KUNMS7VX.js";import{d as P}from"./chunk-25NXLXGL.js";import{b as I}from"./chunk-UBQOKDSO.js";import{k as $,n as O}from"./chunk-CXEQVJNG.js";import{a as y,b as T}from"./chunk-CPAHENLQ.js";import"./chunk-RJOGO4M5.js";import{Hc as a,Ib as f,Ic as s,Jb as v,Ob as h,Pb as o,Qb as r,Rb as C,_b as w,ab as n,bc as m,dc as b,la as c,mb as g,qc as l,ra as u,rc as S,sa as _,sc as d}from"./chunk-WEVBEUAJ.js";function E(t,x){if(t&1){let i=w();o(0,"p",5)(1,"button",6),m("click",function(){u(i);let e=b();return _(e.restartServer())}),l(2),a(3,"translate"),r()()}t&2&&(n(2),d(" ",s(3,1,"menu.linux.label_restart_server")," "))}function H(t,x){if(t&1){let i=w();o(0,"p",5)(1,"button",6),m("click",function(){u(i);let e=b();return _(e.shutdownServer())}),l(2),a(3,"translate"),r()()}t&2&&(n(2),d(" ",s(3,1,"menu.linux.label_shutdown_server")," "))}function B(t,x){if(t&1){let i=w();o(0,"p",5)(1,"button",6),m("click",function(){u(i);let e=b();return _(e.dockerRestartContainer())}),l(2),a(3,"translate"),r()()}t&2&&(n(2),d(" ",s(3,1,"menu.docker.restart_container")," "))}var G=(()=>{class t{$api=c(O);$router=c(P);$settings=c(I);$toastr=c($);$translate=c(y);canShutdownRestartHost=this.$settings.env.canShutdownRestartHost;runningInDocker=this.$settings.env.runningInDocker;restartHomebridge(){this.$router.navigate(["/restart"])}restartHomebridgeService(){this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).subscribe({next:()=>{this.$router.navigate(["/restart"])},error:i=>{console.error(i),this.$toastr.error(i.message,this.$translate.instant("toast.title_error"))}})}restartServer(){this.$router.navigate(["/platform-tools/linux/restart-server"])}shutdownServer(){this.$router.navigate(["/platform-tools/linux/shutdown-server"])}dockerRestartContainer(){this.$router.navigate(["/platform-tools/docker/restart-container"])}static \u0275fac=function(p){return new(p||t)};static \u0275cmp=g({type:t,selectors:[["ng-component"]],decls:19,vars:16,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fas","fa-fw","fa-power-off",2,"font-size","75px"],[1,"w-100","text-center","my-5"],["type","button",1,"btn","btn-primary","p-3","my-0",2,"width","85%",3,"click"],["type","button","container","body","triggers","hover",1,"btn","btn-primary","p-3","my-0",2,"width","85%",3,"click","openDelay","ngbTooltip"]],template:function(p,e){p&1&&(o(0,"div",0)(1,"h3",1),l(2),a(3,"translate"),r()(),o(4,"div",2)(5,"div",3),C(6,"i",4),r(),o(7,"p",5)(8,"button",6),m("click",function(){return e.restartHomebridge()}),l(9),a(10,"translate"),r()(),o(11,"p",5)(12,"button",7),a(13,"translate"),m("click",function(){return e.restartHomebridgeService()}),l(14),a(15,"translate"),r()(),f(16,E,4,3,"p",5),f(17,H,4,3,"p",5),f(18,B,4,3,"p",5),r()),p&2&&(n(2),S(s(3,8,"menu.restart.title")),n(7),d(" ",s(10,10,"menu.hbrestart.confirm_hb")," "),n(3),h("openDelay",150)("ngbTooltip",s(13,12,"reset.force_restart_hb_help_text")),n(2),d(" ",s(15,14,"menu.hbrestart.confirm_ui")," "),n(2),v(e.canShutdownRestartHost?16:-1),n(),v(e.canShutdownRestartHost?17:-1),n(),v(e.runningInDocker?18:-1))},dependencies:[k,T],encapsulation:2})}return t})();export{G as PowerOptionsComponent};
@@ -1 +1 @@
1
- import{a as H}from"./chunk-PDQ4VVCA.js";import{a as X}from"./chunk-O4DNLPYF.js";import{a as Z}from"./chunk-RPRM66DV.js";import"./chunk-S7AIVWKK.js";import{a as R}from"./chunk-Z2JFLSVB.js";import{n as E}from"./chunk-F27XTST6.js";import"./chunk-KUNMS7VX.js";import{a as j}from"./chunk-OE7MOFW7.js";import{b as A}from"./chunk-V2ZBY57I.js";import{a as W,c as q,d as V,e as N,f as D}from"./chunk-25NXLXGL.js";import{b as T}from"./chunk-4VESQ6LL.js";import{m as $}from"./chunk-UF7VL23T.js";import{a as L,b as U}from"./chunk-CPAHENLQ.js";import"./chunk-RJOGO4M5.js";import{Cc as h,Dc as M,Hb as m,Hc as s,Ib as x,Ic as d,Jb as y,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,la as u,mb as P,qc as f,ra as b,rc as v,sa as w,w as z,zd as K}from"./chunk-WEVBEUAJ.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-PDQ4VVCA.js";import{a as X}from"./chunk-O4DNLPYF.js";import{a as Z}from"./chunk-RPRM66DV.js";import"./chunk-S7AIVWKK.js";import{a as R}from"./chunk-Z2JFLSVB.js";import{n as E}from"./chunk-F27XTST6.js";import"./chunk-KUNMS7VX.js";import{a as j}from"./chunk-G7T7KOJA.js";import{b as A}from"./chunk-EA6YVIQU.js";import{a as W,c as q,d as V,e as N,f as D}from"./chunk-25NXLXGL.js";import{b as T}from"./chunk-UBQOKDSO.js";import{m as $}from"./chunk-CXEQVJNG.js";import{a as L,b as U}from"./chunk-CPAHENLQ.js";import"./chunk-RJOGO4M5.js";import{Cc as h,Dc as M,Hb as m,Hc as s,Ib as x,Ic as d,Jb as y,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,la as u,mb as P,qc as f,ra as b,rc as v,sa as w,w as z,zd as K}from"./chunk-WEVBEUAJ.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 +1 @@
1
- import{g as r}from"./chunk-25NXLXGL.js";import"./chunk-RJOGO4M5.js";import{ha as t,nb as e}from"./chunk-WEVBEUAJ.js";var u=[{path:"",loadComponent:()=>import("./chunk-DTK2DKDU.js").then(o=>o.LogsComponent)}],n=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[r.forChild(u),r]})}return o})();var p=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[n]})}return o})();export{p as LogsModule};
1
+ import{g as r}from"./chunk-25NXLXGL.js";import"./chunk-RJOGO4M5.js";import{ha as t,nb as e}from"./chunk-WEVBEUAJ.js";var u=[{path:"",loadComponent:()=>import("./chunk-K2Y5ABFE.js").then(o=>o.LogsComponent)}],n=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[r.forChild(u),r]})}return o})();var p=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[n]})}return o})();export{p as LogsModule};
@@ -1 +1 @@
1
- import{k as _,n as h}from"./chunk-UF7VL23T.js";import{a as v,b as E}from"./chunk-CPAHENLQ.js";import"./chunk-RJOGO4M5.js";import{Hc as p,Ib as c,Ic as s,Jb as x,Sb as i,Tb as e,Ub as f,ab as n,dc as u,la as l,mb as d,qc as o,rc as a}from"./chunk-WEVBEUAJ.js";function y(t,w){if(t&1&&(i(0,"div",7),o(1),e()),t&2){let r=u();n(),a(r.error)}}function C(t,w){t&1&&(i(0,"p",8),o(1),p(2,"translate"),e()),t&2&&(n(),a(s(2,1,"platform.linux.server_will_power_down")))}var B=(()=>{class t{$api=l(h);$toastr=l(_);$translate=l(v);error=!1;ngOnInit(){this.$api.put("/platform-tools/linux/shutdown-host",{}).subscribe({error:r=>{console.error(r),this.error=this.$translate.instant("platform.linux.server_restart_error"),this.$toastr.error(this.$translate.instant("platform.linux.server_restart_error"),this.$translate.instant("toast.title_error"))}})}static \u0275fac=function(m){return new(m||t)};static \u0275cmp=d({type:t,selectors:[["ng-component"]],decls:13,vars:7,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fas","fa-fw","fa-power-off",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"alert","alert-error","my-4"],[1,"grey-text"]],template:function(m,S){m&1&&(i(0,"div",0)(1,"h3",1),o(2),p(3,"translate"),e()(),i(4,"div",2)(5,"div",3),f(6,"i",4),e(),i(7,"div",5)(8,"h4",6),o(9),p(10,"translate"),e(),c(11,y,2,1,"div",7)(12,C,3,3,"p",8),e()()),m&2&&(n(2),a(s(3,3,"menu.restart.title")),n(7),a(s(10,5,"platform.linux.shutting_down_server")),n(2),x(S.error?11:12))},dependencies:[E],encapsulation:2})}return t})();export{B as ShutdownLinuxComponent};
1
+ import{k as _,n as h}from"./chunk-CXEQVJNG.js";import{a as v,b as E}from"./chunk-CPAHENLQ.js";import"./chunk-RJOGO4M5.js";import{Hc as p,Ib as c,Ic as s,Jb as x,Sb as i,Tb as e,Ub as f,ab as n,dc as u,la as l,mb as d,qc as o,rc as a}from"./chunk-WEVBEUAJ.js";function y(t,w){if(t&1&&(i(0,"div",7),o(1),e()),t&2){let r=u();n(),a(r.error)}}function C(t,w){t&1&&(i(0,"p",8),o(1),p(2,"translate"),e()),t&2&&(n(),a(s(2,1,"platform.linux.server_will_power_down")))}var B=(()=>{class t{$api=l(h);$toastr=l(_);$translate=l(v);error=!1;ngOnInit(){this.$api.put("/platform-tools/linux/shutdown-host",{}).subscribe({error:r=>{console.error(r),this.error=this.$translate.instant("platform.linux.server_restart_error"),this.$toastr.error(this.$translate.instant("platform.linux.server_restart_error"),this.$translate.instant("toast.title_error"))}})}static \u0275fac=function(m){return new(m||t)};static \u0275cmp=d({type:t,selectors:[["ng-component"]],decls:13,vars:7,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fas","fa-fw","fa-power-off",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"alert","alert-error","my-4"],[1,"grey-text"]],template:function(m,S){m&1&&(i(0,"div",0)(1,"h3",1),o(2),p(3,"translate"),e()(),i(4,"div",2)(5,"div",3),f(6,"i",4),e(),i(7,"div",5)(8,"h4",6),o(9),p(10,"translate"),e(),c(11,y,2,1,"div",7)(12,C,3,3,"p",8),e()()),m&2&&(n(2),a(s(3,3,"menu.restart.title")),n(7),a(s(10,5,"platform.linux.shutting_down_server")),n(2),x(S.error?11:12))},dependencies:[E],encapsulation:2})}return t})();export{B as ShutdownLinuxComponent};