homebridge-config-ui-x 5.6.2-beta.3 → 5.6.2-beta.5

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 (75) hide show
  1. package/CHANGELOG.md +1 -0
  2. package/package.json +4 -4
  3. package/public/{chunk-57USPN63.js → chunk-2U4A7JIA.js} +1 -1
  4. package/public/{chunk-3F5BIND2.js → chunk-2YWIGYRQ.js} +1 -1
  5. package/public/{chunk-XOZXV7OE.js → chunk-4JL4TGFX.js} +1 -1
  6. package/public/{chunk-Y276Q4AC.js → chunk-4XDXTE6Q.js} +1 -1
  7. package/public/{chunk-E762XFMI.js → chunk-4ZJF4BRP.js} +1 -1
  8. package/public/{chunk-ZPVJRQ5M.js → chunk-54VEQSYX.js} +1 -1
  9. package/public/{chunk-X3WPXPQW.js → chunk-5H2H6GV5.js} +1 -1
  10. package/public/{chunk-2XYBM4MH.js → chunk-5JDHV5WO.js} +1 -1
  11. package/public/{chunk-WIZAF6OS.js → chunk-5M7A3XMS.js} +1 -1
  12. package/public/{chunk-BU6Y5VTM.js → chunk-5XSDDD4U.js} +1 -1
  13. package/public/{chunk-HOXTULXI.js → chunk-63H66SN7.js} +1 -1
  14. package/public/{chunk-7CNAISDX.js → chunk-6IZWTQQA.js} +1 -1
  15. package/public/{chunk-JF53BTNR.js → chunk-6K47JJJN.js} +1 -1
  16. package/public/{chunk-4SBLGP5S.js → chunk-77SV5TMG.js} +1 -1
  17. package/public/{chunk-3GHYGIKS.js → chunk-7FYFNZTQ.js} +1 -1
  18. package/public/{chunk-RM6ZRRFA.js → chunk-7XGJYWYJ.js} +1 -1
  19. package/public/{chunk-NR4KD4TZ.js → chunk-7ZQT7GPI.js} +1 -1
  20. package/public/{chunk-BYLMWAKC.js → chunk-B5KGSPBB.js} +1 -1
  21. package/public/{chunk-KT5YSOXO.js → chunk-BGUMMZ2C.js} +1 -1
  22. package/public/{chunk-DVZ3YL7I.js → chunk-CMFP5UNE.js} +1 -1
  23. package/public/{chunk-YNCF23QK.js → chunk-CMYYLT6V.js} +1 -1
  24. package/public/{chunk-546OL3I5.js → chunk-CO4NZMWO.js} +1 -1
  25. package/public/{chunk-2AKQTDK2.js → chunk-CUR56OIQ.js} +1 -1
  26. package/public/{chunk-WO2FS67T.js → chunk-E7V47C3O.js} +1 -1
  27. package/public/{chunk-72ARQWTQ.js → chunk-FKNEWYVP.js} +1 -1
  28. package/public/{chunk-N3CNSNVN.js → chunk-FZKZZ4RE.js} +1 -1
  29. package/public/{chunk-SOOM4MXN.js → chunk-FZSUY7NB.js} +1 -1
  30. package/public/{chunk-WXWGOW2V.js → chunk-G262EKYR.js} +1 -1
  31. package/public/{chunk-QDMF6BOL.js → chunk-HDDWXQCC.js} +1 -1
  32. package/public/{chunk-2EXPOLE6.js → chunk-HLBXNZT2.js} +1 -1
  33. package/public/{chunk-AYY2VA7S.js → chunk-IPYUZTFM.js} +1 -1
  34. package/public/{chunk-BOFQVJNK.js → chunk-ITOBTSSK.js} +1 -1
  35. package/public/chunk-IVRRJDMF.js +1 -0
  36. package/public/{chunk-3ZU7ZAMP.js → chunk-J2VLADZD.js} +1 -1
  37. package/public/{chunk-O3NFPA75.js → chunk-LJEJT7XC.js} +1 -1
  38. package/public/chunk-M33HG622.js +5 -0
  39. package/public/{chunk-U7F7IBMH.js → chunk-MDBPS3HU.js} +1 -1
  40. package/public/{chunk-J743S3EV.js → chunk-MLO5MHQZ.js} +1 -1
  41. package/public/chunk-MZXVAALT.js +1 -0
  42. package/public/{chunk-HIPMWDXV.js → chunk-N6F46ZR6.js} +1 -1
  43. package/public/{chunk-5HTOQ66O.js → chunk-NE45RJPZ.js} +1 -1
  44. package/public/{chunk-EDO563GI.js → chunk-NG5KAPYX.js} +1 -1
  45. package/public/{chunk-ARORIS5Y.js → chunk-NYBBGETL.js} +1 -1
  46. package/public/{chunk-Z23NNQSY.js → chunk-OJHYMECP.js} +1 -1
  47. package/public/{chunk-DJERPV5R.js → chunk-PAVMGVYO.js} +1 -1
  48. package/public/chunk-PG65YVBK.js +1 -0
  49. package/public/{chunk-YO25OOIG.js → chunk-Q2242BUJ.js} +1 -1
  50. package/public/{chunk-36W6YTL5.js → chunk-QBPL6XFG.js} +1 -1
  51. package/public/{chunk-5U6QEGMI.js → chunk-QISNGTEW.js} +1 -1
  52. package/public/{chunk-MCPFJTIS.js → chunk-QPTX7IVE.js} +1 -1
  53. package/public/{chunk-OVARMF6W.js → chunk-QQCYNHHX.js} +2 -2
  54. package/public/{chunk-VW52SC3D.js → chunk-S6QABMMB.js} +18 -18
  55. package/public/{chunk-MO7W4MOJ.js → chunk-S7JFZWBJ.js} +1 -1
  56. package/public/{chunk-AA4REKSK.js → chunk-V6OEXTM4.js} +1 -1
  57. package/public/{chunk-WSDYJWQD.js → chunk-V7G4OBHO.js} +1 -1
  58. package/public/{chunk-55Q6EZGV.js → chunk-V7QYRB3O.js} +1 -1
  59. package/public/{chunk-6LB7WDKS.js → chunk-VHUDBTN7.js} +1 -1
  60. package/public/{chunk-JUVYAPCW.js → chunk-XCTMQV5H.js} +1 -1
  61. package/public/{chunk-B3WZBAWL.js → chunk-XQAFGYWU.js} +1 -1
  62. package/public/{chunk-QO4FJH55.js → chunk-XW456IS6.js} +1 -1
  63. package/public/{chunk-ZZ3RKEVV.js → chunk-Y54JZMAX.js} +1 -1
  64. package/public/{chunk-A36BWWK3.js → chunk-YG7LM534.js} +1 -1
  65. package/public/{chunk-NBY4ULRZ.js → chunk-YHK4PENP.js} +1 -1
  66. package/public/{chunk-JXYRZXHD.js → chunk-YIXNA3NA.js} +1 -1
  67. package/public/{chunk-AGEX2BP6.js → chunk-YPAGUJHG.js} +1 -1
  68. package/public/{chunk-OA6WLAM2.js → chunk-Z6YBMUNH.js} +1 -1
  69. package/public/{chunk-R2QGD4ZP.js → chunk-ZHUPJTJI.js} +1 -1
  70. package/public/index.html +1 -1
  71. package/public/{main-YNYFOLF2.js → main-QERAHIA4.js} +1 -1
  72. package/public/chunk-7VJ7U6KC.js +0 -1
  73. package/public/chunk-SO446G3M.js +0 -1
  74. package/public/chunk-V6PG2WY3.js +0 -1
  75. package/public/chunk-WWMJUVLA.js +0 -5
package/CHANGELOG.md CHANGED
@@ -15,6 +15,7 @@ All notable changes to `homebridge-config-ui-x` will be documented in this file.
15
15
  - add search bar on settings page for filtering options
16
16
  - added config option to advertise the ui over mdns
17
17
  - implement html page titles on section pages (#2579)
18
+ - fix for custom uis showing schema form
18
19
 
19
20
  ### Other Changes
20
21
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "homebridge-config-ui-x",
3
3
  "displayName": "Homebridge UI",
4
- "version": "5.6.2-beta.3",
4
+ "version": "5.6.2-beta.5",
5
5
  "description": "A web based management, configuration and control platform for Homebridge.",
6
6
  "author": "oznu <dev@oz.nu>",
7
7
  "license": "MIT",
@@ -120,12 +120,12 @@
120
120
  "unzipper": "0.12.3"
121
121
  },
122
122
  "devDependencies": {
123
- "@antfu/eslint-config": "^5.3.0",
123
+ "@antfu/eslint-config": "^5.4.1",
124
124
  "@nestjs/testing": "^11.1.6",
125
125
  "@prettier/plugin-xml": "^3.4.2",
126
126
  "@types/fs-extra": "^11.0.4",
127
127
  "@types/lodash": "^4.17.20",
128
- "@types/node": "^24.5.0",
128
+ "@types/node": "^24.5.2",
129
129
  "@types/node-schedule": "^2.1.8",
130
130
  "@types/passport-jwt": "^4.0.1",
131
131
  "@types/semver": "^7.7.1",
@@ -134,7 +134,7 @@
134
134
  "@types/unzipper": "^0.10.11",
135
135
  "@vitest/coverage-v8": "^3.2.4",
136
136
  "concurrently": "^9.2.1",
137
- "eslint-plugin-format": "^1.0.1",
137
+ "eslint-plugin-format": "^1.0.2",
138
138
  "form-data": "^4.0.4",
139
139
  "nodemon": "^3.1.10",
140
140
  "rimraf": "^6.0.1",
@@ -1 +1 @@
1
- import{a as b}from"./chunk-ZPVJRQ5M.js";import"./chunk-QDMF6BOL.js";import{d as k}from"./chunk-6LB7WDKS.js";import{b as w}from"./chunk-DVZ3YL7I.js";import{k as C,l as $,n as T,q as S}from"./chunk-O3NFPA75.js";import{Eb as E,Ga as x,Ib as h,La as n,Vb as a,Wa as _,Wb as s,gc as g,ja as o,lb as d,mb as f,mc as m,nc as c,oc as y,vb as r,wb as i,xb as l}from"./chunk-WWMJUVLA.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(S);$router=o(k);$settings=o(w);$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-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-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-54VEQSYX.js";import"./chunk-HDDWXQCC.js";import{d as k}from"./chunk-VHUDBTN7.js";import{b as w}from"./chunk-CMFP5UNE.js";import{k as C,l as $,n as T,q as S}from"./chunk-LJEJT7XC.js";import{Eb as E,Ga as x,Ib as h,La as n,Vb as a,Wa as _,Wb as s,gc as g,ja as o,lb as d,mb as f,mc as m,nc as c,oc as y,vb as r,wb as i,xb as l}from"./chunk-M33HG622.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(S);$router=o(k);$settings=o(w);$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-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-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{a as H}from"./chunk-TUN7H57E.js";import{a as X}from"./chunk-SOOM4MXN.js";import{a as G}from"./chunk-WO2FS67T.js";import{a as Z}from"./chunk-Y276Q4AC.js";import"./chunk-2XYBM4MH.js";import{a as R}from"./chunk-E762XFMI.js";import{n as E}from"./chunk-3ZU7ZAMP.js";import"./chunk-MCPFJTIS.js";import{a as j}from"./chunk-ZPVJRQ5M.js";import{b as A}from"./chunk-QDMF6BOL.js";import{a as q,c as N,d as V,e as W,f as D}from"./chunk-6LB7WDKS.js";import{b as T}from"./chunk-DVZ3YL7I.js";import{k as L,l as U,p as $}from"./chunk-O3NFPA75.js";import{Db as S,Gb as _,Ib as x,Kc as O,La as i,Pa as F,Vb as g,Wa as P,Wb as v,Xc as K,fc as h,g as Y,gc as M,h as I,ja as u,kb as m,lb as w,mb as y,mc as d,nc as s,oa as b,pa as C,rb as c,sb as n,tb as a,ub as p,w as z}from"./chunk-WWMJUVLA.js";var Q=Y(Z(),1);var B=()=>["/"],te=o=>({"hamburger-icon-cross":o}),ne=o=>({expanded:o}),ie=()=>({exact:!0}),oe=()=>["/plugins"],re=()=>["/accessories"],ae=()=>["/logs"],de=()=>["/support"],se=()=>["/platform-tools/terminal"],le=()=>["/config"],pe=()=>["/settings"],ce=()=>["/power-options"];function me(o,k){if(o&1){let e=S();n(0,"div",10)(1,"div",20),d(2,"translate"),d(3,"translate"),_("click",function(){b(e);let t=x();return C(t.openUnderVoltageModal())})("keydown",function(t){b(e);let r=x();return C(r.handleKeydown(t))}),n(4,"div",12),p(5,"i",21),a(),n(6,"div",14),g(7),d(8,"translate"),a()()()}o&2&&(i(),m("aria-label",s(2,2,"rpi.throttled.undervoltage_title")+" - "+s(3,4,"rpi.throttled.undervoltage_description")),i(6),v(s(8,6,"rpi.throttled.undervoltage_title")))}function ue(o,k){if(o&1){let e=S();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){b(e);let r=x();return C(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",22),a(),n(5,"div",14),g(6),d(7,"translate"),a()()()}o&2&&(i(),c("routerLink",h(8,se))("routerLinkActive","active"),m("aria-label",s(2,4,"menu.linux.label_terminal")),i(5),v(s(7,6,"menu.linux.label_terminal")))}function _e(o,k){if(o&1){let e=S();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){b(e);let r=x();return C(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",23),a(),n(5,"div",14),g(6),d(7,"translate"),a()()()}o&2&&(i(),c("routerLink",h(8,le))("routerLinkActive","active"),m("aria-label",s(2,4,"menu.config_json_editor")),i(5),v(s(7,6,"menu.config_json_editor")))}function ge(o,k){if(o&1){let e=S();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){b(e);let r=x();return C(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",24),a(),n(5,"div",14),g(6),d(7,"translate"),a()()()}o&2&&(i(),c("routerLink",h(8,pe))("routerLinkActive","active"),m("aria-label",s(2,4,"menu.label_settings")),i(5),v(s(7,6,"menu.label_settings")))}function fe(o,k){if(o&1){let e=S();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){b(e);let r=x();return C(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",25),a(),n(5,"div",14),g(6),d(7,"translate"),a()()()}o&2&&(i(),c("routerLink",h(8,ce))("routerLinkActive","active"),m("aria-label",s(2,4,"menu.restart.title")),i(5),v(s(7,6,"menu.restart.title")))}function ve(o,k){if(o&1){let e=S();n(0,"div",10)(1,"div",20),d(2,"translate"),_("click",function(){b(e);let t=x();return C(t.reloadPage())})("keydown",function(t){b(e);let r=x();return C(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",26),a(),n(5,"div",14),g(6),d(7,"translate"),a()()()}o&2&&(i(),m("aria-label",s(2,2,"menu.reload")),i(5),v(s(7,4,"menu.reload")))}function he(o,k){if(o&1){let e=S();n(0,"div",10)(1,"div",20),d(2,"translate"),_("click",function(){b(e);let t=x();return C(t.logout())})("keydown",function(t){b(e);let r=x();return C(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",27),a(),n(5,"div",14),g(6),d(7,"translate"),a()()()}o&2&&(i(),m("aria-label",s(2,2,"menu.tooltip_logout")),i(5),v(s(7,4,"menu.tooltip_logout")))}var J=(()=>{class o{$auth=u(A);$settings=u(T);$modal=u(E);$notification=u(G);$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=H();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 q&&(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(X,{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-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||o)};static \u0275cmp=P({type:o,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-house"],[1,"title"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive"],[1,"fa","fa-plug"],[1,"fa","fa-lightbulb"],[1,"fa","fa-wave-square"],[1,"fa","fa-question-circle-o"],["role","menuitem","tabindex","0",1,"link-row",3,"click","keydown"],[1,"fas","fa-bolt","fa-beat","yellow-text",2,"--fa-beat-scale","1.5"],[1,"fa","fa-terminal"],[1,"fa","fa-code"],[1,"fa","fa-cog"],[1,"fa","fa-power-off"],[1,"fa","fa-refresh"],[1,"fa","fa-right-from-bracket"]],template:function(l,t){l&1&&(n(0,"div",0),d(1,"translate"),_("click",function(){return t.toggleSidebar()})("keydown",function(f){return t.handleKeydown(f)}),p(2,"span",1),n(3,"a",2),d(4,"translate"),p(5,"img",3),n(6,"div",4),g(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(f){return t.handleKeydown(f)}),n(15,"a",2),d(16,"translate"),p(17,"img",3),n(18,"div",8),g(19,"Homebridge"),a()()(),n(20,"div",9)(21,"div",10)(22,"div",11),d(23,"translate"),_("keydown",function(f){return t.handleKeydown(f)}),n(24,"div",12),p(25,"i",13),a(),n(26,"div",14),g(27),d(28,"translate"),a()()(),w(29,me,9,8,"div",10),n(30,"div",10)(31,"div",15),d(32,"translate"),_("keydown",function(f){return t.handleKeydown(f)}),n(33,"div",12),p(34,"i",16),a(),n(35,"div",14),g(36),d(37,"translate"),a()()(),n(38,"div",10)(39,"div",15),d(40,"translate"),_("keydown",function(f){return t.handleKeydown(f)}),n(41,"div",12),p(42,"i",17),a(),n(43,"div",14),g(44),d(45,"translate"),a()()(),n(46,"div",10)(47,"div",15),d(48,"translate"),_("keydown",function(f){return t.handleKeydown(f)}),n(49,"div",12),p(50,"i",18),a(),n(51,"div",14),g(52),d(53,"translate"),a()()(),w(54,ue,8,9,"div",10),w(55,_e,8,9,"div",10),w(56,ge,8,9,"div",10),n(57,"div",10)(58,"div",15),d(59,"translate"),_("keydown",function(f){return t.handleKeydown(f)}),n(60,"div",12),p(61,"i",19),a(),n(62,"div",14),g(63),d(64,"translate"),a()()(),w(65,fe,8,9,"div",10),w(66,ve,8,6,"div",10),w(67,he,8,6,"div",10),a()()),l&2&&(m("aria-expanded",t.isExpanded?"true":"false")("aria-controls","sidebar")("aria-label",s(1,37,"menu.sidebar.aria_menu")),i(3),c("routerLink",h(63,B)),m("aria-label",s(4,39,"menu.label_status")),i(5),c("ngClass",M(64,te,t.isExpanded)),i(5),c("ngClass",M(66,ne,t.isExpanded)),i(2),c("routerLink",h(68,B)),m("aria-label",s(16,41,"menu.label_status")),i(7),c("routerLink",h(69,B))("routerLinkActive","active")("routerLinkActiveOptions",h(70,ie)),m("aria-label",s(23,43,"menu.label_status")),i(5),v(s(28,45,"menu.label_status")),i(2),y(t.rPiWasUnderVoltage||t.rPiCurrentlyUnderVoltage?29:-1),i(2),c("routerLink",h(71,oe))("routerLinkActive","active"),m("aria-label",s(32,47,"menu.label_plugins")),i(5),v(s(37,49,"menu.label_plugins")),i(3),c("routerLink",h(72,re))("routerLinkActive","active"),m("aria-label",s(40,51,"menu.label_accessories")),i(5),v(s(45,53,"menu.label_accessories")),i(3),c("routerLink",h(73,ae))("routerLinkActive","active"),m("aria-label",s(48,55,"menu.linux.label_logs")),i(5),v(s(53,57,"menu.linux.label_logs")),i(2),y(t.enableTerminalAccess&&t.isAdmin?54:-1),i(),y(t.isAdmin?55:-1),i(),y(t.isAdmin?56:-1),i(2),c("routerLink",h(74,de))("routerLinkActive","active"),m("aria-label",s(59,59,"support.title")),i(5),v(s(64,61,"support.title")),i(2),y(t.isAdmin?65:-1),i(),y(t.isPwa?66:-1),i(),y(t.formAuth?67:-1))},dependencies:[W,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-x:hidden;overflow-y:auto;max-height:calc(100vh - 80px)!important;scrollbar-width:thin}@media (max-width: 767px){.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{padding-bottom:60px}}.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;transform:rotate(0);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;transform:rotate(0);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){transform:rotate(45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){transform:rotate(-45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:10px;width:0;left:50%}}"]})}return o})();var be=o=>({sidebarExpanded:o}),Re=(()=>{class o{$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.endsWith("/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||o)};static \u0275cmp=P({type:o,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),i(),c("ngClass",M(2,be,t.sidebarExpanded)))},dependencies:[J,O,N],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 o})();export{Re as LayoutComponent};
1
+ import{a as H}from"./chunk-TUN7H57E.js";import{a as X}from"./chunk-FZSUY7NB.js";import{a as G}from"./chunk-E7V47C3O.js";import{a as Z}from"./chunk-4XDXTE6Q.js";import"./chunk-5JDHV5WO.js";import{a as R}from"./chunk-4ZJF4BRP.js";import{n as E}from"./chunk-J2VLADZD.js";import"./chunk-QPTX7IVE.js";import{a as j}from"./chunk-54VEQSYX.js";import{b as A}from"./chunk-HDDWXQCC.js";import{a as q,c as N,d as V,e as W,f as D}from"./chunk-VHUDBTN7.js";import{b as T}from"./chunk-CMFP5UNE.js";import{k as L,l as U,p as $}from"./chunk-LJEJT7XC.js";import{Db as S,Gb as _,Ib as x,Kc as O,La as i,Pa as F,Vb as g,Wa as P,Wb as v,Xc as K,fc as h,g as Y,gc as M,h as I,ja as u,kb as m,lb as w,mb as y,mc as d,nc as s,oa as b,pa as C,rb as c,sb as n,tb as a,ub as p,w as z}from"./chunk-M33HG622.js";var Q=Y(Z(),1);var B=()=>["/"],te=o=>({"hamburger-icon-cross":o}),ne=o=>({expanded:o}),ie=()=>({exact:!0}),oe=()=>["/plugins"],re=()=>["/accessories"],ae=()=>["/logs"],de=()=>["/support"],se=()=>["/platform-tools/terminal"],le=()=>["/config"],pe=()=>["/settings"],ce=()=>["/power-options"];function me(o,k){if(o&1){let e=S();n(0,"div",10)(1,"div",20),d(2,"translate"),d(3,"translate"),_("click",function(){b(e);let t=x();return C(t.openUnderVoltageModal())})("keydown",function(t){b(e);let r=x();return C(r.handleKeydown(t))}),n(4,"div",12),p(5,"i",21),a(),n(6,"div",14),g(7),d(8,"translate"),a()()()}o&2&&(i(),m("aria-label",s(2,2,"rpi.throttled.undervoltage_title")+" - "+s(3,4,"rpi.throttled.undervoltage_description")),i(6),v(s(8,6,"rpi.throttled.undervoltage_title")))}function ue(o,k){if(o&1){let e=S();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){b(e);let r=x();return C(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",22),a(),n(5,"div",14),g(6),d(7,"translate"),a()()()}o&2&&(i(),c("routerLink",h(8,se))("routerLinkActive","active"),m("aria-label",s(2,4,"menu.linux.label_terminal")),i(5),v(s(7,6,"menu.linux.label_terminal")))}function _e(o,k){if(o&1){let e=S();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){b(e);let r=x();return C(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",23),a(),n(5,"div",14),g(6),d(7,"translate"),a()()()}o&2&&(i(),c("routerLink",h(8,le))("routerLinkActive","active"),m("aria-label",s(2,4,"menu.config_json_editor")),i(5),v(s(7,6,"menu.config_json_editor")))}function ge(o,k){if(o&1){let e=S();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){b(e);let r=x();return C(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",24),a(),n(5,"div",14),g(6),d(7,"translate"),a()()()}o&2&&(i(),c("routerLink",h(8,pe))("routerLinkActive","active"),m("aria-label",s(2,4,"menu.label_settings")),i(5),v(s(7,6,"menu.label_settings")))}function fe(o,k){if(o&1){let e=S();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){b(e);let r=x();return C(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",25),a(),n(5,"div",14),g(6),d(7,"translate"),a()()()}o&2&&(i(),c("routerLink",h(8,ce))("routerLinkActive","active"),m("aria-label",s(2,4,"menu.restart.title")),i(5),v(s(7,6,"menu.restart.title")))}function ve(o,k){if(o&1){let e=S();n(0,"div",10)(1,"div",20),d(2,"translate"),_("click",function(){b(e);let t=x();return C(t.reloadPage())})("keydown",function(t){b(e);let r=x();return C(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",26),a(),n(5,"div",14),g(6),d(7,"translate"),a()()()}o&2&&(i(),m("aria-label",s(2,2,"menu.reload")),i(5),v(s(7,4,"menu.reload")))}function he(o,k){if(o&1){let e=S();n(0,"div",10)(1,"div",20),d(2,"translate"),_("click",function(){b(e);let t=x();return C(t.logout())})("keydown",function(t){b(e);let r=x();return C(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",27),a(),n(5,"div",14),g(6),d(7,"translate"),a()()()}o&2&&(i(),m("aria-label",s(2,2,"menu.tooltip_logout")),i(5),v(s(7,4,"menu.tooltip_logout")))}var J=(()=>{class o{$auth=u(A);$settings=u(T);$modal=u(E);$notification=u(G);$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=H();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 q&&(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(X,{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-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||o)};static \u0275cmp=P({type:o,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-house"],[1,"title"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive"],[1,"fa","fa-plug"],[1,"fa","fa-lightbulb"],[1,"fa","fa-wave-square"],[1,"fa","fa-question-circle-o"],["role","menuitem","tabindex","0",1,"link-row",3,"click","keydown"],[1,"fas","fa-bolt","fa-beat","yellow-text",2,"--fa-beat-scale","1.5"],[1,"fa","fa-terminal"],[1,"fa","fa-code"],[1,"fa","fa-cog"],[1,"fa","fa-power-off"],[1,"fa","fa-refresh"],[1,"fa","fa-right-from-bracket"]],template:function(l,t){l&1&&(n(0,"div",0),d(1,"translate"),_("click",function(){return t.toggleSidebar()})("keydown",function(f){return t.handleKeydown(f)}),p(2,"span",1),n(3,"a",2),d(4,"translate"),p(5,"img",3),n(6,"div",4),g(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(f){return t.handleKeydown(f)}),n(15,"a",2),d(16,"translate"),p(17,"img",3),n(18,"div",8),g(19,"Homebridge"),a()()(),n(20,"div",9)(21,"div",10)(22,"div",11),d(23,"translate"),_("keydown",function(f){return t.handleKeydown(f)}),n(24,"div",12),p(25,"i",13),a(),n(26,"div",14),g(27),d(28,"translate"),a()()(),w(29,me,9,8,"div",10),n(30,"div",10)(31,"div",15),d(32,"translate"),_("keydown",function(f){return t.handleKeydown(f)}),n(33,"div",12),p(34,"i",16),a(),n(35,"div",14),g(36),d(37,"translate"),a()()(),n(38,"div",10)(39,"div",15),d(40,"translate"),_("keydown",function(f){return t.handleKeydown(f)}),n(41,"div",12),p(42,"i",17),a(),n(43,"div",14),g(44),d(45,"translate"),a()()(),n(46,"div",10)(47,"div",15),d(48,"translate"),_("keydown",function(f){return t.handleKeydown(f)}),n(49,"div",12),p(50,"i",18),a(),n(51,"div",14),g(52),d(53,"translate"),a()()(),w(54,ue,8,9,"div",10),w(55,_e,8,9,"div",10),w(56,ge,8,9,"div",10),n(57,"div",10)(58,"div",15),d(59,"translate"),_("keydown",function(f){return t.handleKeydown(f)}),n(60,"div",12),p(61,"i",19),a(),n(62,"div",14),g(63),d(64,"translate"),a()()(),w(65,fe,8,9,"div",10),w(66,ve,8,6,"div",10),w(67,he,8,6,"div",10),a()()),l&2&&(m("aria-expanded",t.isExpanded?"true":"false")("aria-controls","sidebar")("aria-label",s(1,37,"menu.sidebar.aria_menu")),i(3),c("routerLink",h(63,B)),m("aria-label",s(4,39,"menu.label_status")),i(5),c("ngClass",M(64,te,t.isExpanded)),i(5),c("ngClass",M(66,ne,t.isExpanded)),i(2),c("routerLink",h(68,B)),m("aria-label",s(16,41,"menu.label_status")),i(7),c("routerLink",h(69,B))("routerLinkActive","active")("routerLinkActiveOptions",h(70,ie)),m("aria-label",s(23,43,"menu.label_status")),i(5),v(s(28,45,"menu.label_status")),i(2),y(t.rPiWasUnderVoltage||t.rPiCurrentlyUnderVoltage?29:-1),i(2),c("routerLink",h(71,oe))("routerLinkActive","active"),m("aria-label",s(32,47,"menu.label_plugins")),i(5),v(s(37,49,"menu.label_plugins")),i(3),c("routerLink",h(72,re))("routerLinkActive","active"),m("aria-label",s(40,51,"menu.label_accessories")),i(5),v(s(45,53,"menu.label_accessories")),i(3),c("routerLink",h(73,ae))("routerLinkActive","active"),m("aria-label",s(48,55,"menu.linux.label_logs")),i(5),v(s(53,57,"menu.linux.label_logs")),i(2),y(t.enableTerminalAccess&&t.isAdmin?54:-1),i(),y(t.isAdmin?55:-1),i(),y(t.isAdmin?56:-1),i(2),c("routerLink",h(74,de))("routerLinkActive","active"),m("aria-label",s(59,59,"support.title")),i(5),v(s(64,61,"support.title")),i(2),y(t.isAdmin?65:-1),i(),y(t.isPwa?66:-1),i(),y(t.formAuth?67:-1))},dependencies:[W,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-x:hidden;overflow-y:auto;max-height:calc(100vh - 80px)!important;scrollbar-width:thin}@media (max-width: 767px){.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{padding-bottom:60px}}.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;transform:rotate(0);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;transform:rotate(0);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){transform:rotate(45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){transform:rotate(-45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:10px;width:0;left:50%}}"]})}return o})();var be=o=>({sidebarExpanded:o}),Re=(()=>{class o{$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.endsWith("/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||o)};static \u0275cmp=P({type:o,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),i(),c("ngClass",M(2,be,t.sidebarExpanded)))},dependencies:[J,O,N],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 o})();export{Re as LayoutComponent};
@@ -1,4 +1,4 @@
1
- import{Pb as Ut,Qb as Dt,Wa as _t,e as d,g as He,h as Lt,xb as xt,xc as Ft,ya as qt}from"./chunk-WWMJUVLA.js";var zt=d((Dn,kt)=>{kt.exports=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}});var N=d(P=>{var st,Ve=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];P.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};P.getSymbolTotalCodewords=function(t){return Ve[t]};P.getBCHDigit=function(n){let t=0;for(;n!==0;)t++,n>>>=1;return t};P.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');st=t};P.isKanjiModeEnabled=function(){return typeof st<"u"};P.toSJIS=function(t){return st(t)}});var Q=d(w=>{w.L={bit:1};w.M={bit:0};w.Q={bit:3};w.H={bit:2};function Ke(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return w.L;case"m":case"medium":return w.M;case"q":case"quartile":return w.Q;case"h":case"high":return w.H;default:throw new Error("Unknown EC Level: "+n)}}w.isValid=function(t){return t&&typeof t.bit<"u"&&t.bit>=0&&t.bit<4};w.from=function(t,e){if(w.isValid(t))return t;try{return Ke(t)}catch{return e}}});var Kt=d((zn,Vt)=>{function Ht(){this.buffer=[],this.length=0}Ht.prototype={get:function(n){let t=Math.floor(n/8);return(this.buffer[t]>>>7-n%8&1)===1},put:function(n,t){for(let e=0;e<t;e++)this.putBit((n>>>t-e-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(n){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),n&&(this.buffer[t]|=128>>>this.length%8),this.length++}};Vt.exports=Ht});var Ot=d((Hn,Jt)=>{function k(n){if(!n||n<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=n,this.data=new Uint8Array(n*n),this.reservedBit=new Uint8Array(n*n)}k.prototype.set=function(n,t,e,r){let o=n*this.size+t;this.data[o]=e,r&&(this.reservedBit[o]=!0)};k.prototype.get=function(n,t){return this.data[n*this.size+t]};k.prototype.xor=function(n,t,e){this.data[n*this.size+t]^=e};k.prototype.isReserved=function(n,t){return this.reservedBit[n*this.size+t]};Jt.exports=k});var Yt=d(v=>{var Je=N().getSymbolSize;v.getRowColCoords=function(t){if(t===1)return[];let e=Math.floor(t/7)+2,r=Je(t),o=r===145?26:Math.ceil((r-13)/(2*e-2))*2,i=[r-7];for(let s=1;s<e-1;s++)i[s]=i[s-1]-o;return i.push(6),i.reverse()};v.getPositions=function(t){let e=[],r=v.getRowColCoords(t),o=r.length;for(let i=0;i<o;i++)for(let s=0;s<o;s++)i===0&&s===0||i===0&&s===o-1||i===o-1&&s===0||e.push([r[i],r[s]]);return e}});var jt=d(vt=>{var Oe=N().getSymbolSize,Qt=7;vt.getPositions=function(t){let e=Oe(t);return[[0,0],[e-Qt,0],[0,e-Qt]]}});var Gt=d(g=>{g.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var b={N1:3,N2:3,N3:40,N4:10};g.isValid=function(t){return t!=null&&t!==""&&!isNaN(t)&&t>=0&&t<=7};g.from=function(t){return g.isValid(t)?parseInt(t,10):void 0};g.getPenaltyN1=function(t){let e=t.size,r=0,o=0,i=0,s=null,u=null;for(let c=0;c<e;c++){o=i=0,s=u=null;for(let l=0;l<e;l++){let a=t.get(c,l);a===s?o++:(o>=5&&(r+=b.N1+(o-5)),s=a,o=1),a=t.get(l,c),a===u?i++:(i>=5&&(r+=b.N1+(i-5)),u=a,i=1)}o>=5&&(r+=b.N1+(o-5)),i>=5&&(r+=b.N1+(i-5))}return r};g.getPenaltyN2=function(t){let e=t.size,r=0;for(let o=0;o<e-1;o++)for(let i=0;i<e-1;i++){let s=t.get(o,i)+t.get(o,i+1)+t.get(o+1,i)+t.get(o+1,i+1);(s===4||s===0)&&r++}return r*b.N2};g.getPenaltyN3=function(t){let e=t.size,r=0,o=0,i=0;for(let s=0;s<e;s++){o=i=0;for(let u=0;u<e;u++)o=o<<1&2047|t.get(s,u),u>=10&&(o===1488||o===93)&&r++,i=i<<1&2047|t.get(u,s),u>=10&&(i===1488||i===93)&&r++}return r*b.N3};g.getPenaltyN4=function(t){let e=0,r=t.data.length;for(let i=0;i<r;i++)e+=t.data[i];return Math.abs(Math.ceil(e*100/r/5)-10)*b.N4};function Ye(n,t,e){switch(n){case g.Patterns.PATTERN000:return(t+e)%2===0;case g.Patterns.PATTERN001:return t%2===0;case g.Patterns.PATTERN010:return e%3===0;case g.Patterns.PATTERN011:return(t+e)%3===0;case g.Patterns.PATTERN100:return(Math.floor(t/2)+Math.floor(e/3))%2===0;case g.Patterns.PATTERN101:return t*e%2+t*e%3===0;case g.Patterns.PATTERN110:return(t*e%2+t*e%3)%2===0;case g.Patterns.PATTERN111:return(t*e%3+(t+e)%2)%2===0;default:throw new Error("bad maskPattern:"+n)}}g.applyMask=function(t,e){let r=e.size;for(let o=0;o<r;o++)for(let i=0;i<r;i++)e.isReserved(i,o)||e.xor(i,o,Ye(t,i,o))};g.getBestMask=function(t,e){let r=Object.keys(g.Patterns).length,o=0,i=1/0;for(let s=0;s<r;s++){e(s),g.applyMask(s,t);let u=g.getPenaltyN1(t)+g.getPenaltyN2(t)+g.getPenaltyN3(t)+g.getPenaltyN4(t);g.applyMask(s,t),u<i&&(i=u,o=s)}return o}});var ct=d(ut=>{var I=Q(),j=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],G=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];ut.getBlocksCount=function(t,e){switch(e){case I.L:return j[(t-1)*4+0];case I.M:return j[(t-1)*4+1];case I.Q:return j[(t-1)*4+2];case I.H:return j[(t-1)*4+3];default:return}};ut.getTotalCodewordsCount=function(t,e){switch(e){case I.L:return G[(t-1)*4+0];case I.M:return G[(t-1)*4+1];case I.Q:return G[(t-1)*4+2];case I.H:return G[(t-1)*4+3];default:return}}});var $t=d(W=>{var z=new Uint8Array(512),$=new Uint8Array(256);(function(){let t=1;for(let e=0;e<255;e++)z[e]=t,$[t]=e,t<<=1,t&256&&(t^=285);for(let e=255;e<512;e++)z[e]=z[e-255]})();W.log=function(t){if(t<1)throw new Error("log("+t+")");return $[t]};W.exp=function(t){return z[t]};W.mul=function(t,e){return t===0||e===0?0:z[$[t]+$[e]]}});var Wt=d(H=>{var lt=$t();H.mul=function(t,e){let r=new Uint8Array(t.length+e.length-1);for(let o=0;o<t.length;o++)for(let i=0;i<e.length;i++)r[o+i]^=lt.mul(t[o],e[i]);return r};H.mod=function(t,e){let r=new Uint8Array(t);for(;r.length-e.length>=0;){let o=r[0];for(let s=0;s<e.length;s++)r[s]^=lt.mul(e[s],o);let i=0;for(;i<r.length&&r[i]===0;)i++;r=r.slice(i)}return r};H.generateECPolynomial=function(t){let e=new Uint8Array([1]);for(let r=0;r<t;r++)e=H.mul(e,new Uint8Array([1,lt.exp(r)]));return e}});var te=d((vn,Xt)=>{var Zt=Wt();function at(n){this.genPoly=void 0,this.degree=n,this.degree&&this.initialize(this.degree)}at.prototype.initialize=function(t){this.degree=t,this.genPoly=Zt.generateECPolynomial(this.degree)};at.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");let e=new Uint8Array(t.length+this.degree);e.set(t);let r=Zt.mod(e,this.genPoly),o=this.degree-r.length;if(o>0){let i=new Uint8Array(this.degree);return i.set(r,o),i}return r};Xt.exports=at});var ft=d(ee=>{ee.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}});var dt=d(B=>{var ne="[0-9]+",Qe="[A-Z $%*+\\-./:]+",V="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";V=V.replace(/u/g,"\\u");var ve="(?:(?![A-Z0-9 $%*+\\-./:]|"+V+`)(?:.|[\r
1
+ import{Pb as Ut,Qb as Dt,Wa as _t,e as d,g as He,h as Lt,xb as xt,xc as Ft,ya as qt}from"./chunk-M33HG622.js";var zt=d((Dn,kt)=>{kt.exports=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}});var N=d(P=>{var st,Ve=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];P.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};P.getSymbolTotalCodewords=function(t){return Ve[t]};P.getBCHDigit=function(n){let t=0;for(;n!==0;)t++,n>>>=1;return t};P.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');st=t};P.isKanjiModeEnabled=function(){return typeof st<"u"};P.toSJIS=function(t){return st(t)}});var Q=d(w=>{w.L={bit:1};w.M={bit:0};w.Q={bit:3};w.H={bit:2};function Ke(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return w.L;case"m":case"medium":return w.M;case"q":case"quartile":return w.Q;case"h":case"high":return w.H;default:throw new Error("Unknown EC Level: "+n)}}w.isValid=function(t){return t&&typeof t.bit<"u"&&t.bit>=0&&t.bit<4};w.from=function(t,e){if(w.isValid(t))return t;try{return Ke(t)}catch{return e}}});var Kt=d((zn,Vt)=>{function Ht(){this.buffer=[],this.length=0}Ht.prototype={get:function(n){let t=Math.floor(n/8);return(this.buffer[t]>>>7-n%8&1)===1},put:function(n,t){for(let e=0;e<t;e++)this.putBit((n>>>t-e-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(n){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),n&&(this.buffer[t]|=128>>>this.length%8),this.length++}};Vt.exports=Ht});var Ot=d((Hn,Jt)=>{function k(n){if(!n||n<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=n,this.data=new Uint8Array(n*n),this.reservedBit=new Uint8Array(n*n)}k.prototype.set=function(n,t,e,r){let o=n*this.size+t;this.data[o]=e,r&&(this.reservedBit[o]=!0)};k.prototype.get=function(n,t){return this.data[n*this.size+t]};k.prototype.xor=function(n,t,e){this.data[n*this.size+t]^=e};k.prototype.isReserved=function(n,t){return this.reservedBit[n*this.size+t]};Jt.exports=k});var Yt=d(v=>{var Je=N().getSymbolSize;v.getRowColCoords=function(t){if(t===1)return[];let e=Math.floor(t/7)+2,r=Je(t),o=r===145?26:Math.ceil((r-13)/(2*e-2))*2,i=[r-7];for(let s=1;s<e-1;s++)i[s]=i[s-1]-o;return i.push(6),i.reverse()};v.getPositions=function(t){let e=[],r=v.getRowColCoords(t),o=r.length;for(let i=0;i<o;i++)for(let s=0;s<o;s++)i===0&&s===0||i===0&&s===o-1||i===o-1&&s===0||e.push([r[i],r[s]]);return e}});var jt=d(vt=>{var Oe=N().getSymbolSize,Qt=7;vt.getPositions=function(t){let e=Oe(t);return[[0,0],[e-Qt,0],[0,e-Qt]]}});var Gt=d(g=>{g.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var b={N1:3,N2:3,N3:40,N4:10};g.isValid=function(t){return t!=null&&t!==""&&!isNaN(t)&&t>=0&&t<=7};g.from=function(t){return g.isValid(t)?parseInt(t,10):void 0};g.getPenaltyN1=function(t){let e=t.size,r=0,o=0,i=0,s=null,u=null;for(let c=0;c<e;c++){o=i=0,s=u=null;for(let l=0;l<e;l++){let a=t.get(c,l);a===s?o++:(o>=5&&(r+=b.N1+(o-5)),s=a,o=1),a=t.get(l,c),a===u?i++:(i>=5&&(r+=b.N1+(i-5)),u=a,i=1)}o>=5&&(r+=b.N1+(o-5)),i>=5&&(r+=b.N1+(i-5))}return r};g.getPenaltyN2=function(t){let e=t.size,r=0;for(let o=0;o<e-1;o++)for(let i=0;i<e-1;i++){let s=t.get(o,i)+t.get(o,i+1)+t.get(o+1,i)+t.get(o+1,i+1);(s===4||s===0)&&r++}return r*b.N2};g.getPenaltyN3=function(t){let e=t.size,r=0,o=0,i=0;for(let s=0;s<e;s++){o=i=0;for(let u=0;u<e;u++)o=o<<1&2047|t.get(s,u),u>=10&&(o===1488||o===93)&&r++,i=i<<1&2047|t.get(u,s),u>=10&&(i===1488||i===93)&&r++}return r*b.N3};g.getPenaltyN4=function(t){let e=0,r=t.data.length;for(let i=0;i<r;i++)e+=t.data[i];return Math.abs(Math.ceil(e*100/r/5)-10)*b.N4};function Ye(n,t,e){switch(n){case g.Patterns.PATTERN000:return(t+e)%2===0;case g.Patterns.PATTERN001:return t%2===0;case g.Patterns.PATTERN010:return e%3===0;case g.Patterns.PATTERN011:return(t+e)%3===0;case g.Patterns.PATTERN100:return(Math.floor(t/2)+Math.floor(e/3))%2===0;case g.Patterns.PATTERN101:return t*e%2+t*e%3===0;case g.Patterns.PATTERN110:return(t*e%2+t*e%3)%2===0;case g.Patterns.PATTERN111:return(t*e%3+(t+e)%2)%2===0;default:throw new Error("bad maskPattern:"+n)}}g.applyMask=function(t,e){let r=e.size;for(let o=0;o<r;o++)for(let i=0;i<r;i++)e.isReserved(i,o)||e.xor(i,o,Ye(t,i,o))};g.getBestMask=function(t,e){let r=Object.keys(g.Patterns).length,o=0,i=1/0;for(let s=0;s<r;s++){e(s),g.applyMask(s,t);let u=g.getPenaltyN1(t)+g.getPenaltyN2(t)+g.getPenaltyN3(t)+g.getPenaltyN4(t);g.applyMask(s,t),u<i&&(i=u,o=s)}return o}});var ct=d(ut=>{var I=Q(),j=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],G=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];ut.getBlocksCount=function(t,e){switch(e){case I.L:return j[(t-1)*4+0];case I.M:return j[(t-1)*4+1];case I.Q:return j[(t-1)*4+2];case I.H:return j[(t-1)*4+3];default:return}};ut.getTotalCodewordsCount=function(t,e){switch(e){case I.L:return G[(t-1)*4+0];case I.M:return G[(t-1)*4+1];case I.Q:return G[(t-1)*4+2];case I.H:return G[(t-1)*4+3];default:return}}});var $t=d(W=>{var z=new Uint8Array(512),$=new Uint8Array(256);(function(){let t=1;for(let e=0;e<255;e++)z[e]=t,$[t]=e,t<<=1,t&256&&(t^=285);for(let e=255;e<512;e++)z[e]=z[e-255]})();W.log=function(t){if(t<1)throw new Error("log("+t+")");return $[t]};W.exp=function(t){return z[t]};W.mul=function(t,e){return t===0||e===0?0:z[$[t]+$[e]]}});var Wt=d(H=>{var lt=$t();H.mul=function(t,e){let r=new Uint8Array(t.length+e.length-1);for(let o=0;o<t.length;o++)for(let i=0;i<e.length;i++)r[o+i]^=lt.mul(t[o],e[i]);return r};H.mod=function(t,e){let r=new Uint8Array(t);for(;r.length-e.length>=0;){let o=r[0];for(let s=0;s<e.length;s++)r[s]^=lt.mul(e[s],o);let i=0;for(;i<r.length&&r[i]===0;)i++;r=r.slice(i)}return r};H.generateECPolynomial=function(t){let e=new Uint8Array([1]);for(let r=0;r<t;r++)e=H.mul(e,new Uint8Array([1,lt.exp(r)]));return e}});var te=d((vn,Xt)=>{var Zt=Wt();function at(n){this.genPoly=void 0,this.degree=n,this.degree&&this.initialize(this.degree)}at.prototype.initialize=function(t){this.degree=t,this.genPoly=Zt.generateECPolynomial(this.degree)};at.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");let e=new Uint8Array(t.length+this.degree);e.set(t);let r=Zt.mod(e,this.genPoly),o=this.degree-r.length;if(o>0){let i=new Uint8Array(this.degree);return i.set(r,o),i}return r};Xt.exports=at});var ft=d(ee=>{ee.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}});var dt=d(B=>{var ne="[0-9]+",Qe="[A-Z $%*+\\-./:]+",V="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";V=V.replace(/u/g,"\\u");var ve="(?:(?![A-Z0-9 $%*+\\-./:]|"+V+`)(?:.|[\r
2
2
  ]))+`;B.KANJI=new RegExp(V,"g");B.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");B.BYTE=new RegExp(ve,"g");B.NUMERIC=new RegExp(ne,"g");B.ALPHANUMERIC=new RegExp(Qe,"g");var je=new RegExp("^"+V+"$"),Ge=new RegExp("^"+ne+"$"),$e=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");B.testKanji=function(t){return je.test(t)};B.testNumeric=function(t){return Ge.test(t)};B.testAlphanumeric=function(t){return $e.test(t)}});var M=d(p=>{var We=ft(),gt=dt();p.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]};p.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]};p.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]};p.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]};p.MIXED={bit:-1};p.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!We.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]};p.getBestModeForData=function(t){return gt.testNumeric(t)?p.NUMERIC:gt.testAlphanumeric(t)?p.ALPHANUMERIC:gt.testKanji(t)?p.KANJI:p.BYTE};p.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")};p.isValid=function(t){return t&&t.bit&&t.ccBits};function Ze(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return p.NUMERIC;case"alphanumeric":return p.ALPHANUMERIC;case"kanji":return p.KANJI;case"byte":return p.BYTE;default:throw new Error("Unknown mode: "+n)}}p.from=function(t,e){if(p.isValid(t))return t;try{return Ze(t)}catch{return e}}});var ue=d(R=>{var Z=N(),Xe=ct(),re=Q(),S=M(),ht=ft(),ie=7973,oe=Z.getBCHDigit(ie);function tn(n,t,e){for(let r=1;r<=40;r++)if(t<=R.getCapacity(r,e,n))return r}function se(n,t){return S.getCharCountIndicator(n,t)+4}function en(n,t){let e=0;return n.forEach(function(r){let o=se(r.mode,t);e+=o+r.getBitsLength()}),e}function nn(n,t){for(let e=1;e<=40;e++)if(en(n,e)<=R.getCapacity(e,t,S.MIXED))return e}R.from=function(t,e){return ht.isValid(t)?parseInt(t,10):e};R.getCapacity=function(t,e,r){if(!ht.isValid(t))throw new Error("Invalid QR Code version");typeof r>"u"&&(r=S.BYTE);let o=Z.getSymbolTotalCodewords(t),i=Xe.getTotalCodewordsCount(t,e),s=(o-i)*8;if(r===S.MIXED)return s;let u=s-se(r,t);switch(r){case S.NUMERIC:return Math.floor(u/10*3);case S.ALPHANUMERIC:return Math.floor(u/11*2);case S.KANJI:return Math.floor(u/13);case S.BYTE:default:return Math.floor(u/8)}};R.getBestVersionForData=function(t,e){let r,o=re.from(e,re.M);if(Array.isArray(t)){if(t.length>1)return nn(t,o);if(t.length===0)return 1;r=t[0]}else r=t;return tn(r.mode,r.getLength(),o)};R.getEncodedBits=function(t){if(!ht.isValid(t)||t<7)throw new Error("Invalid QR Code version");let e=t<<12;for(;Z.getBCHDigit(e)-oe>=0;)e^=ie<<Z.getBCHDigit(e)-oe;return t<<12|e}});var fe=d(ae=>{var pt=N(),le=1335,rn=21522,ce=pt.getBCHDigit(le);ae.getEncodedBits=function(t,e){let r=t.bit<<3|e,o=r<<10;for(;pt.getBCHDigit(o)-ce>=0;)o^=le<<pt.getBCHDigit(o)-ce;return(r<<10|o)^rn}});var ge=d((Xn,de)=>{var on=M();function _(n){this.mode=on.NUMERIC,this.data=n.toString()}_.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)};_.prototype.getLength=function(){return this.data.length};_.prototype.getBitsLength=function(){return _.getBitsLength(this.data.length)};_.prototype.write=function(t){let e,r,o;for(e=0;e+3<=this.data.length;e+=3)r=this.data.substr(e,3),o=parseInt(r,10),t.put(o,10);let i=this.data.length-e;i>0&&(r=this.data.substr(e),o=parseInt(r,10),t.put(o,i*3+1))};de.exports=_});var pe=d((tr,he)=>{var sn=M(),mt=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function x(n){this.mode=sn.ALPHANUMERIC,this.data=n}x.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};x.prototype.getLength=function(){return this.data.length};x.prototype.getBitsLength=function(){return x.getBitsLength(this.data.length)};x.prototype.write=function(t){let e;for(e=0;e+2<=this.data.length;e+=2){let r=mt.indexOf(this.data[e])*45;r+=mt.indexOf(this.data[e+1]),t.put(r,11)}this.data.length%2&&t.put(mt.indexOf(this.data[e]),6)};he.exports=x});var we=d((er,me)=>{var un=M();function U(n){this.mode=un.BYTE,typeof n=="string"?this.data=new TextEncoder().encode(n):this.data=new Uint8Array(n)}U.getBitsLength=function(t){return t*8};U.prototype.getLength=function(){return this.data.length};U.prototype.getBitsLength=function(){return U.getBitsLength(this.data.length)};U.prototype.write=function(n){for(let t=0,e=this.data.length;t<e;t++)n.put(this.data[t],8)};me.exports=U});var Ee=d((nr,ye)=>{var cn=M(),ln=N();function D(n){this.mode=cn.KANJI,this.data=n}D.getBitsLength=function(t){return t*13};D.prototype.getLength=function(){return this.data.length};D.prototype.getBitsLength=function(){return D.getBitsLength(this.data.length)};D.prototype.write=function(n){let t;for(t=0;t<this.data.length;t++){let e=ln.toSJIS(this.data[t]);if(e>=33088&&e<=40956)e-=33088;else if(e>=57408&&e<=60351)e-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+`
3
3
  Make sure your charset is UTF-8`);e=(e>>>8&255)*192+(e&255),n.put(e,13)}};ye.exports=D});var Ce=d((rr,wt)=>{"use strict";var K={single_source_shortest_paths:function(n,t,e){var r={},o={};o[t]=0;var i=K.PriorityQueue.make();i.push(t,0);for(var s,u,c,l,a,m,h,y,A;!i.empty();){s=i.pop(),u=s.value,l=s.cost,a=n[u]||{};for(c in a)a.hasOwnProperty(c)&&(m=a[c],h=l+m,y=o[c],A=typeof o[c]>"u",(A||y>h)&&(o[c]=h,i.push(c,h),r[c]=u))}if(typeof e<"u"&&typeof o[e]>"u"){var T=["Could not find a path from ",t," to ",e,"."].join("");throw new Error(T)}return r},extract_shortest_path_from_predecessor_list:function(n,t){for(var e=[],r=t,o;r;)e.push(r),o=n[r],r=n[r];return e.reverse(),e},find_path:function(n,t,e){var r=K.single_source_shortest_paths(n,t,e);return K.extract_shortest_path_from_predecessor_list(r,e)},PriorityQueue:{make:function(n){var t=K.PriorityQueue,e={},r;n=n||{};for(r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e.queue=[],e.sorter=n.sorter||t.default_sorter,e},default_sorter:function(n,t){return n.cost-t.cost},push:function(n,t){var e={value:n,cost:t};this.queue.push(e),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};typeof wt<"u"&&(wt.exports=K)});var Pe=d(F=>{var f=M(),Te=ge(),Ne=pe(),Ie=we(),Me=Ee(),J=dt(),X=N(),an=Ce();function Be(n){return unescape(encodeURIComponent(n)).length}function O(n,t,e){let r=[],o;for(;(o=n.exec(e))!==null;)r.push({data:o[0],index:o.index,mode:t,length:o[0].length});return r}function Se(n){let t=O(J.NUMERIC,f.NUMERIC,n),e=O(J.ALPHANUMERIC,f.ALPHANUMERIC,n),r,o;return X.isKanjiModeEnabled()?(r=O(J.BYTE,f.BYTE,n),o=O(J.KANJI,f.KANJI,n)):(r=O(J.BYTE_KANJI,f.BYTE,n),o=[]),t.concat(e,r,o).sort(function(s,u){return s.index-u.index}).map(function(s){return{data:s.data,mode:s.mode,length:s.length}})}function yt(n,t){switch(t){case f.NUMERIC:return Te.getBitsLength(n);case f.ALPHANUMERIC:return Ne.getBitsLength(n);case f.KANJI:return Me.getBitsLength(n);case f.BYTE:return Ie.getBitsLength(n)}}function fn(n){return n.reduce(function(t,e){let r=t.length-1>=0?t[t.length-1]:null;return r&&r.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)},[])}function dn(n){let t=[];for(let e=0;e<n.length;e++){let r=n[e];switch(r.mode){case f.NUMERIC:t.push([r,{data:r.data,mode:f.ALPHANUMERIC,length:r.length},{data:r.data,mode:f.BYTE,length:r.length}]);break;case f.ALPHANUMERIC:t.push([r,{data:r.data,mode:f.BYTE,length:r.length}]);break;case f.KANJI:t.push([r,{data:r.data,mode:f.BYTE,length:Be(r.data)}]);break;case f.BYTE:t.push([{data:r.data,mode:f.BYTE,length:Be(r.data)}])}}return t}function gn(n,t){let e={},r={start:{}},o=["start"];for(let i=0;i<n.length;i++){let s=n[i],u=[];for(let c=0;c<s.length;c++){let l=s[c],a=""+i+c;u.push(a),e[a]={node:l,lastCount:0},r[a]={};for(let m=0;m<o.length;m++){let h=o[m];e[h]&&e[h].node.mode===l.mode?(r[h][a]=yt(e[h].lastCount+l.length,l.mode)-yt(e[h].lastCount,l.mode),e[h].lastCount+=l.length):(e[h]&&(e[h].lastCount=l.length),r[h][a]=yt(l.length,l.mode)+4+f.getCharCountIndicator(l.mode,t))}}o=u}for(let i=0;i<o.length;i++)r[o[i]].end=0;return{map:r,table:e}}function Ae(n,t){let e,r=f.getBestModeForData(n);if(e=f.from(t,r),e!==f.BYTE&&e.bit<r.bit)throw new Error('"'+n+'" cannot be encoded with mode '+f.toString(e)+`.
4
4
  Suggested mode is: `+f.toString(r));switch(e===f.KANJI&&!X.isKanjiModeEnabled()&&(e=f.BYTE),e){case f.NUMERIC:return new Te(n);case f.ALPHANUMERIC:return new Ne(n);case f.KANJI:return new Me(n);case f.BYTE:return new Ie(n)}}F.fromArray=function(t){return t.reduce(function(e,r){return typeof r=="string"?e.push(Ae(r,null)):r.data&&e.push(Ae(r.data,r.mode)),e},[])};F.fromString=function(t,e){let r=Se(t,X.isKanjiModeEnabled()),o=dn(r),i=gn(o,e),s=an.find_path(i.map,"start","end"),u=[];for(let c=1;c<s.length-1;c++)u.push(i.table[s[c]].node);return F.fromArray(fn(u))};F.rawSplit=function(t){return F.fromArray(Se(t,X.isKanjiModeEnabled()))}});var Re=d(be=>{var et=N(),Et=Q(),hn=Kt(),pn=Ot(),mn=Yt(),wn=jt(),At=Gt(),Tt=ct(),yn=te(),tt=ue(),En=fe(),Cn=M(),Ct=Pe();function Bn(n,t){let e=n.size,r=wn.getPositions(t);for(let o=0;o<r.length;o++){let i=r[o][0],s=r[o][1];for(let u=-1;u<=7;u++)if(!(i+u<=-1||e<=i+u))for(let c=-1;c<=7;c++)s+c<=-1||e<=s+c||(u>=0&&u<=6&&(c===0||c===6)||c>=0&&c<=6&&(u===0||u===6)||u>=2&&u<=4&&c>=2&&c<=4?n.set(i+u,s+c,!0,!0):n.set(i+u,s+c,!1,!0))}}function An(n){let t=n.size;for(let e=8;e<t-8;e++){let r=e%2===0;n.set(e,6,r,!0),n.set(6,e,r,!0)}}function Tn(n,t){let e=mn.getPositions(t);for(let r=0;r<e.length;r++){let o=e[r][0],i=e[r][1];for(let s=-2;s<=2;s++)for(let u=-2;u<=2;u++)s===-2||s===2||u===-2||u===2||s===0&&u===0?n.set(o+s,i+u,!0,!0):n.set(o+s,i+u,!1,!0)}}function Nn(n,t){let e=n.size,r=tt.getEncodedBits(t),o,i,s;for(let u=0;u<18;u++)o=Math.floor(u/3),i=u%3+e-8-3,s=(r>>u&1)===1,n.set(o,i,s,!0),n.set(i,o,s,!0)}function Bt(n,t,e){let r=n.size,o=En.getEncodedBits(t,e),i,s;for(i=0;i<15;i++)s=(o>>i&1)===1,i<6?n.set(i,8,s,!0):i<8?n.set(i+1,8,s,!0):n.set(r-15+i,8,s,!0),i<8?n.set(8,r-i-1,s,!0):i<9?n.set(8,15-i-1+1,s,!0):n.set(8,15-i-1,s,!0);n.set(r-8,8,1,!0)}function In(n,t){let e=n.size,r=-1,o=e-1,i=7,s=0;for(let u=e-1;u>0;u-=2)for(u===6&&u--;;){for(let c=0;c<2;c++)if(!n.isReserved(o,u-c)){let l=!1;s<t.length&&(l=(t[s]>>>i&1)===1),n.set(o,u-c,l),i--,i===-1&&(s++,i=7)}if(o+=r,o<0||e<=o){o-=r,r=-r;break}}}function Mn(n,t,e){let r=new hn;e.forEach(function(c){r.put(c.mode.bit,4),r.put(c.getLength(),Cn.getCharCountIndicator(c.mode,n)),c.write(r)});let o=et.getSymbolTotalCodewords(n),i=Tt.getTotalCodewordsCount(n,t),s=(o-i)*8;for(r.getLengthInBits()+4<=s&&r.put(0,4);r.getLengthInBits()%8!==0;)r.putBit(0);let u=(s-r.getLengthInBits())/8;for(let c=0;c<u;c++)r.put(c%2?17:236,8);return Sn(r,n,t)}function Sn(n,t,e){let r=et.getSymbolTotalCodewords(t),o=Tt.getTotalCodewordsCount(t,e),i=r-o,s=Tt.getBlocksCount(t,e),u=r%s,c=s-u,l=Math.floor(r/s),a=Math.floor(i/s),m=a+1,h=l-a,y=new yn(h),A=0,T=new Array(s),bt=new Array(s),rt=0,ze=new Uint8Array(n.buffer);for(let q=0;q<s;q++){let it=q<c?a:m;T[q]=ze.slice(A,A+it),bt[q]=y.encode(T[q]),A+=it,rt=Math.max(rt,it)}let ot=new Uint8Array(r),Rt=0,E,C;for(E=0;E<rt;E++)for(C=0;C<s;C++)E<T[C].length&&(ot[Rt++]=T[C][E]);for(E=0;E<h;E++)for(C=0;C<s;C++)ot[Rt++]=bt[C][E];return ot}function Pn(n,t,e,r){let o;if(Array.isArray(n))o=Ct.fromArray(n);else if(typeof n=="string"){let l=t;if(!l){let a=Ct.rawSplit(n);l=tt.getBestVersionForData(a,e)}o=Ct.fromString(n,l||40)}else throw new Error("Invalid data");let i=tt.getBestVersionForData(o,e);if(!i)throw new Error("The amount of data is too big to be stored in a QR Code");if(!t)t=i;else if(t<i)throw new Error(`