homebridge-config-ui-x 5.6.0 → 5.6.1-beta.0

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 (178) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/core/auth/auth.controller.d.ts +2 -0
  3. package/dist/core/config/config.interfaces.d.ts +118 -0
  4. package/dist/core/config/config.interfaces.js +3 -0
  5. package/dist/core/config/config.interfaces.js.map +1 -0
  6. package/dist/core/config/config.service.d.ts +6 -74
  7. package/dist/core/config/config.service.js +5 -0
  8. package/dist/core/config/config.service.js.map +1 -1
  9. package/dist/core/config/config.startup.d.ts +2 -12
  10. package/dist/core/config/config.startup.js +12 -0
  11. package/dist/core/config/config.startup.js.map +1 -1
  12. package/dist/core/spa/spa-html.service.d.ts +5 -0
  13. package/dist/core/spa/spa-html.service.js +38 -0
  14. package/dist/core/spa/spa-html.service.js.map +1 -0
  15. package/dist/core/spa/spa.filter.d.ts +3 -0
  16. package/dist/core/spa/spa.filter.js +22 -2
  17. package/dist/core/spa/spa.filter.js.map +1 -1
  18. package/dist/globalDefaults.js +3 -0
  19. package/dist/globalDefaults.js.map +1 -1
  20. package/dist/main.js +18 -3
  21. package/dist/main.js.map +1 -1
  22. package/dist/modules/backup/backup.service.js +4 -1
  23. package/dist/modules/backup/backup.service.js.map +1 -1
  24. package/dist/modules/config-editor/config-editor.controller.d.ts +3 -3
  25. package/dist/modules/config-editor/config-editor.service.d.ts +3 -2
  26. package/dist/modules/config-editor/config-editor.service.js +36 -13
  27. package/dist/modules/config-editor/config-editor.service.js.map +1 -1
  28. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.d.ts +1 -1
  29. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.js +2 -1
  30. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.js.map +1 -1
  31. package/dist/modules/log/log.gateway.d.ts +1 -1
  32. package/dist/modules/log/log.interfaces.d.ts +4 -0
  33. package/dist/modules/log/log.interfaces.js +3 -0
  34. package/dist/modules/log/log.interfaces.js.map +1 -0
  35. package/dist/modules/log/log.service.d.ts +1 -4
  36. package/dist/modules/log/log.service.js.map +1 -1
  37. package/dist/modules/platform-tools/terminal/terminal.gateway.d.ts +1 -1
  38. package/dist/modules/platform-tools/terminal/terminal.interfaces.d.ts +8 -0
  39. package/dist/modules/platform-tools/terminal/terminal.interfaces.js +3 -0
  40. package/dist/modules/platform-tools/terminal/terminal.interfaces.js.map +1 -0
  41. package/dist/modules/platform-tools/terminal/terminal.service.d.ts +1 -8
  42. package/dist/modules/platform-tools/terminal/terminal.service.js.map +1 -1
  43. package/dist/modules/plugins/plugins.controller.d.ts +5 -5
  44. package/dist/modules/plugins/plugins.interfaces.d.ts +211 -0
  45. package/dist/modules/plugins/plugins.interfaces.js +3 -0
  46. package/dist/modules/plugins/plugins.interfaces.js.map +1 -0
  47. package/dist/modules/plugins/plugins.service.d.ts +1 -1
  48. package/dist/modules/plugins/plugins.service.js +6 -0
  49. package/dist/modules/plugins/plugins.service.js.map +1 -1
  50. package/dist/modules/server/server.controller.d.ts +3 -0
  51. package/dist/modules/server/server.controller.js +13 -0
  52. package/dist/modules/server/server.controller.js.map +1 -1
  53. package/dist/modules/server/server.service.js +5 -3
  54. package/dist/modules/server/server.service.js.map +1 -1
  55. package/dist/modules/status/status.controller.d.ts +2 -2
  56. package/dist/modules/status/status.gateway.d.ts +5 -5
  57. package/dist/modules/status/status.interfaces.d.ts +27 -0
  58. package/dist/modules/status/status.interfaces.js +10 -0
  59. package/dist/modules/status/status.interfaces.js.map +1 -0
  60. package/dist/modules/status/status.service.d.ts +2 -29
  61. package/dist/modules/status/status.service.js +4 -9
  62. package/dist/modules/status/status.service.js.map +1 -1
  63. package/package.json +1 -1
  64. package/public/3rdpartylicenses.txt +13 -13
  65. package/public/{chunk-R6UTID3Z.js → chunk-3KZ2CQME.js} +1 -1
  66. package/public/{chunk-AXPU54UR.js → chunk-3RRGKSPT.js} +1 -1
  67. package/public/{chunk-2KX534PL.js → chunk-4DK3FKYT.js} +2 -2
  68. package/public/{chunk-4MEUIWY4.js → chunk-5N45B6R7.js} +1 -1
  69. package/public/{chunk-WVUXQTE4.js → chunk-5TSHBP5C.js} +1 -1
  70. package/public/chunk-6RX2BRBU.js +49 -0
  71. package/public/chunk-6WJAO3GJ.js +1 -0
  72. package/public/chunk-6WL6JBW6.js +40 -0
  73. package/public/chunk-7B34LSFR.js +1 -0
  74. package/public/chunk-7RTQINLX.js +1 -0
  75. package/public/{chunk-5DLJ5232.js → chunk-AT26KEEX.js} +1 -1
  76. package/public/chunk-BYZTDI6B.js +1 -0
  77. package/public/{chunk-GCUB4KBA.js → chunk-CGPMZGNR.js} +1 -1
  78. package/public/chunk-CGSU6LWR.js +1 -0
  79. package/public/{chunk-I4PCV2JL.js → chunk-CL4IO7CM.js} +1 -1
  80. package/public/{chunk-4HV5VBUX.js → chunk-D2RHA7X2.js} +1 -1
  81. package/public/chunk-DCXKKXB4.js +1 -0
  82. package/public/{chunk-45O7A76J.js → chunk-FYMNQKSS.js} +1 -1
  83. package/public/chunk-GAKPDISY.js +1 -0
  84. package/public/chunk-GI6U2XR2.js +1 -0
  85. package/public/chunk-GZLH72PR.js +1 -0
  86. package/public/{chunk-YCD2MWRV.js → chunk-HIWFIZVC.js} +1 -1
  87. package/public/chunk-I2CB6FNC.js +1 -0
  88. package/public/{chunk-FXRCC47A.js → chunk-IDU7UYST.js} +1 -1
  89. package/public/chunk-IGJCCPMK.js +1 -0
  90. package/public/{chunk-YIC5UWBJ.js → chunk-IHGRCBAQ.js} +1 -1
  91. package/public/chunk-J73TLQUR.js +1 -0
  92. package/public/chunk-JFGBC67H.js +1 -0
  93. package/public/{chunk-6YLT7NDE.js → chunk-L3SI6T5C.js} +1 -1
  94. package/public/{chunk-B7ACJ247.js → chunk-LHQCUFCP.js} +1 -1
  95. package/public/chunk-LOWN3NM6.js +1 -0
  96. package/public/chunk-LV5TYHZ7.js +1 -0
  97. package/public/chunk-M5NNILBO.js +1 -0
  98. package/public/{chunk-732ZZPJC.js → chunk-MD7IQ7EC.js} +1 -1
  99. package/public/{chunk-YBEY6H6T.js → chunk-MGYPZDF6.js} +1 -1
  100. package/public/chunk-N2C6CZAF.js +1 -0
  101. package/public/{chunk-6HYJYHLY.js → chunk-ODGGUANG.js} +1 -1
  102. package/public/{chunk-5SA6BZRC.js → chunk-OQM4FTFW.js} +1 -1
  103. package/public/{chunk-A2HWJ2G5.js → chunk-OUVAQ37U.js} +1 -1
  104. package/public/{chunk-2JOEE6TH.js → chunk-PFIRHRM5.js} +1 -1
  105. package/public/chunk-PPIXBDS7.js +1 -0
  106. package/public/{chunk-AJTGODYF.js → chunk-QHDPBN4J.js} +1 -1
  107. package/public/chunk-RCXQRRQJ.js +1 -0
  108. package/public/chunk-RHAKODUV.js +1 -0
  109. package/public/chunk-S4XJ2W2R.js +1 -0
  110. package/public/chunk-SKNG2LDC.js +1 -0
  111. package/public/chunk-SZPZVJCY.js +1 -0
  112. package/public/chunk-TH354Y65.js +1 -0
  113. package/public/chunk-TUN7H57E.js +1 -0
  114. package/public/chunk-TUNQYUAE.js +2 -0
  115. package/public/chunk-U35I6VGA.js +19 -0
  116. package/public/{chunk-CWBLLOU5.js → chunk-UERLDONE.js} +1 -1
  117. package/public/chunk-UVVKDQFR.js +1 -0
  118. package/public/{chunk-WIM4XI75.js → chunk-V4K2YYFC.js} +1 -1
  119. package/public/{chunk-IJKIT7A3.js → chunk-VAMR4YGW.js} +1 -1
  120. package/public/{chunk-22PVDFCE.js → chunk-VC3QRLND.js} +1 -1
  121. package/public/chunk-VKQXCRDO.js +1 -0
  122. package/public/chunk-VVLYWC4A.js +1 -0
  123. package/public/chunk-WFHNWAZU.js +1 -0
  124. package/public/chunk-WJBYM3CK.js +1 -0
  125. package/public/chunk-X34FKKHJ.js +1 -0
  126. package/public/chunk-YA5P53NT.js +1 -0
  127. package/public/chunk-YHHN4XHF.js +1 -0
  128. package/public/chunk-YMPR6QRX.js +1 -0
  129. package/public/chunk-YO4MD7AK.js +1 -0
  130. package/public/{chunk-26EI4TMU.js → chunk-YRDGMK4T.js} +1 -1
  131. package/public/chunk-ZF77F3NH.js +1 -0
  132. package/public/chunk-ZHRPBG7M.js +5 -0
  133. package/public/index.html +2 -2
  134. package/public/main-EG2GJFYG.js +1 -0
  135. package/public/{styles-KAER7B5R.css → styles-5R4ZLUK4.css} +1 -1
  136. package/public/chunk-2GCOJOK2.js +0 -1
  137. package/public/chunk-3GLEK5PO.js +0 -1
  138. package/public/chunk-3ZPDIOJP.js +0 -1
  139. package/public/chunk-4GCXGGZP.js +0 -1
  140. package/public/chunk-5UJGNWVZ.js +0 -1
  141. package/public/chunk-5Y3BIPLQ.js +0 -1
  142. package/public/chunk-6WXBZOVI.js +0 -1
  143. package/public/chunk-72ATQTM5.js +0 -1
  144. package/public/chunk-76EY53FS.js +0 -1
  145. package/public/chunk-AZL6ANIU.js +0 -1
  146. package/public/chunk-BE6EVQ43.js +0 -1
  147. package/public/chunk-E6EWEG2S.js +0 -19
  148. package/public/chunk-EPPQKARO.js +0 -1
  149. package/public/chunk-FGRA3MLA.js +0 -1
  150. package/public/chunk-HDYZCMHI.js +0 -1
  151. package/public/chunk-HI24UXUI.js +0 -1
  152. package/public/chunk-IZEKCAEE.js +0 -1
  153. package/public/chunk-JQ3FUL2I.js +0 -2
  154. package/public/chunk-K2Y72XZA.js +0 -1
  155. package/public/chunk-LONAPMLE.js +0 -1
  156. package/public/chunk-N6G4A6CB.js +0 -1
  157. package/public/chunk-NDJSUPAE.js +0 -1
  158. package/public/chunk-O3XTJPLY.js +0 -2
  159. package/public/chunk-OROL2MAP.js +0 -1
  160. package/public/chunk-PHI3ALNA.js +0 -1
  161. package/public/chunk-QPGZQSFV.js +0 -1
  162. package/public/chunk-R3FDPMAX.js +0 -1
  163. package/public/chunk-RN4HC5ZG.js +0 -1
  164. package/public/chunk-RQLIZDI7.js +0 -1
  165. package/public/chunk-TEITZMYK.js +0 -1
  166. package/public/chunk-TGFJLZZI.js +0 -1
  167. package/public/chunk-UAPZPQGY.js +0 -49
  168. package/public/chunk-UF5PIS5O.js +0 -1
  169. package/public/chunk-ULG3QICO.js +0 -1
  170. package/public/chunk-UPC5PDCF.js +0 -40
  171. package/public/chunk-UXOQX4NL.js +0 -1
  172. package/public/chunk-VT4775CA.js +0 -4
  173. package/public/chunk-WI7OEFPB.js +0 -1
  174. package/public/chunk-XV3GV4GK.js +0 -1
  175. package/public/chunk-YQ4ML5HX.js +0 -1
  176. package/public/chunk-Z2RK3DTY.js +0 -1
  177. package/public/chunk-Z6T4OYIT.js +0 -1
  178. package/public/main-JE3N6ZQT.js +0 -1
@@ -1 +0,0 @@
1
- import{c as n}from"./chunk-BE6EVQ43.js";import"./chunk-Z2RK3DTY.js";import{g as r}from"./chunk-72ATQTM5.js";import"./chunk-OROL2MAP.js";import"./chunk-FGRA3MLA.js";import"./chunk-3GLEK5PO.js";import"./chunk-JQ3FUL2I.js";import{ga as o,pb as e}from"./chunk-VT4775CA.js";var c=[{path:"",loadComponent:()=>import("./chunk-WI7OEFPB.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 +0,0 @@
1
- import{B as D,C as I,D as E,Ea as k,L as K,O as L,X as O,_ as A,_c as H,a as w,e as G,fa as u,ia as B,ka as o,n as T,r as m,rb as z,t as h,x as S}from"./chunk-VT4775CA.js";var J=G((Fe,oe)=>{oe.exports={name:"homebridge-config-ui-x",displayName:"Homebridge UI",version:"5.6.0",description:"A web based management, configuration and control platform for Homebridge.",author:"oznu <dev@oz.nu>",license:"MIT",funding:[{type:"github",url:"https://github.com/sponsors/oznu"},{type:"paypal",url:"https://paypal.me/oznu"}],repository:{type:"git",url:"git+https://github.com/homebridge/homebridge-config-ui-x.git"},bugs:{url:"https://github.com/homebridge/homebridge-config-ui-x/issues"},keywords:["homebridge-plugin","ui","gui","web","homebridge","homebridge-config-ui-x","ui-x","config-ui-x","homebridge-x","homebridge server","homebridge ui","homebridge-ui","homebridge gui","homebridge-gui","web interface","config ui","management","config editor","linux","macOS","osx","windows","raspberry pi","accessory control","smart home","hb-service"],main:"./dist/index.js",bin:{"hb-service":"dist/bin/hb-service.js"},engines:{node:"^20.19.0 || ^22.12.0 || ^24.0.0",homebridge:"^1.8.0 || ^2.0.0-alpha.0"},scripts:{build:"npm run build:server && npm run build:ui","build:server":"rimraf dist && tsc -p tsconfig.build.json","build:ui":"npm run build --prefix ui",check:"npm run check:server && npm run check:ui","check:server":"npm install && npm outdated","check:ui":"npm install --prefix ui && npm outdated --prefix ui","lang-sync":"ts-node scripts/lang-sync.ts",lint:"eslint . --max-warnings=0","lint:fix":"npm run lint -- --fix",prepublishOnly:"npm i --package-lock-only && npm run lint && npm run build",start:"ts-node -r tsconfig-paths/register src/main.ts",test:"vitest run","test-coverage":"npm run test -- --coverage","upgrade-install":"./scripts/upgrade-install.sh",watch:'concurrently "npm run watch:ui" "npm run watch:server"',"watch:server":"nodemon","watch:ui":"npm run start --prefix ui"},dependencies:{"@fastify/helmet":"13.0.1","@fastify/multipart":"9.2.1","@fastify/static":"8.2.0","@homebridge/hap-client":"3.1.1","@homebridge/node-pty-prebuilt-multiarch":"0.13.1","@nestjs/axios":"4.0.1","@nestjs/common":"11.1.6","@nestjs/core":"11.1.6","@nestjs/jwt":"11.0.0","@nestjs/passport":"11.0.5","@nestjs/platform-fastify":"11.1.6","@nestjs/platform-socket.io":"11.1.6","@nestjs/swagger":"11.2.0","@nestjs/websockets":"11.1.6",axios:"1.11.0","bash-color":"0.0.4","class-transformer":"0.5.1","class-validator":"0.14.2",commander:"14.0.0",dayjs:"1.11.18",fastify:"5.6.0","fs-extra":"11.3.1",jsonwebtoken:"9.0.2",lodash:"4.17.21","node-cache":"5.1.2","node-schedule":"2.1.1",ora:"8.2.0",otplib:"12.0.1","p-limit":"7.1.1",passport:"0.7.0","passport-jwt":"4.0.1","reflect-metadata":"0.2.2",rxjs:"7.8.2",semver:"7.7.2",systeminformation:"5.27.8",tail:"2.2.6",tar:"7.4.3","tcp-port-used":"1.0.2",unzipper:"0.12.3"},devDependencies:{"@antfu/eslint-config":"^5.2.2","@nestjs/testing":"^11.1.6","@prettier/plugin-xml":"^3.4.2","@types/fs-extra":"^11.0.4","@types/lodash":"^4.17.20","@types/node":"^24.3.1","@types/node-schedule":"^2.1.8","@types/passport-jwt":"^4.0.1","@types/semver":"^7.7.1","@types/tail":"^2.2.3","@types/tcp-port-used":"^1.0.4","@types/unzipper":"^0.10.11","@vitest/coverage-v8":"^3.2.4",concurrently:"^9.2.1","eslint-plugin-format":"^1.0.1","form-data":"^4.0.4",nodemon:"^3.1.10",rimraf:"^6.0.1","ts-loader":"^9.5.4","ts-node":"^10.9.2","tsconfig-paths":"^4.2.0",typescript:"^5.9.2","unplugin-swc":"^1.5.7",vitest:"^3.2.4"},overrides:{"@nestjs/platform-fastify":{fastify:"5.6.0"}},maintainers:[{email:"bwp91@icloud.com",name:"bwp91"},{email:"dev@oz.nu",name:"oznu"},{email:"northern.man1@gmail.com",name:"northernman"},{email:"mail@anderl-bauer.de",name:"supereg"},{email:"khaos.tian@gmail.com",name:"khaost"},{email:"erik.baauw@xs4all.nl",name:"ebaauw"},{email:"donavan.becker@icloud.com",name:"donavanbecker"},{email:"dustin.greif@gmail.com",name:"dustin.greif"},{email:"nfarina@gmail.com",name:"nfarina"}],scarfSettings:{enabled:!1}}});var v=class{},W=(()=>{class t{handle(e){return e.key}static \u0275fac=function(n){return new(n||t)};static \u0275prov=u({token:t,factory:t.\u0275fac})}return t})(),f=class{},Z=(()=>{class t extends f{compile(e,n){return e}compileTranslations(e,n){return e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=k(t)))(r||t)}})();static \u0275prov=u({token:t,factory:t.\u0275fac})}return t})(),p=class{},Q=(()=>{class t extends p{getTranslation(e){return m({})}static \u0275fac=(()=>{let e;return function(r){return(e||(e=k(t)))(r||t)}})();static \u0275prov=u({token:t,factory:t.\u0275fac})}return t})();function F(t,a){if(t===a)return!0;if(t===null||a===null)return!1;if(t!==t&&a!==a)return!0;let e=typeof t,n=typeof a,r;if(e==n&&e=="object")if(Array.isArray(t)){if(!Array.isArray(a))return!1;if((r=t.length)==a.length){for(let s=0;s<r;s++)if(!F(t[s],a[s]))return!1;return!0}}else{if(Array.isArray(a))return!1;if(l(t)&&l(a)){let s=Object.create(null);for(let i in t){if(!F(t[i],a[i]))return!1;s[i]=!0}for(let i in a)if(!(i in s)&&typeof a[i]<"u")return!1;return!0}}return!1}function c(t){return typeof t<"u"&&t!==null}function _(t){return t!==void 0}function l(t){return y(t)&&!d(t)&&t!==null}function y(t){return typeof t=="object"&&t!==null}function d(t){return Array.isArray(t)}function x(t){return typeof t=="string"}function X(t){return typeof t=="function"}function j(t){if(d(t))return t.map(a=>j(a));if(l(t)){let a={};return Object.keys(t).forEach(e=>{a[e]=j(t[e])}),a}else return t}function V(t,a){if(!y(t))return j(a);let e=j(t);return y(e)&&y(a)&&Object.keys(a).forEach(n=>{l(a[n])?n in t?e[n]=V(t[n],a[n]):Object.assign(e,{[n]:a[n]}):Object.assign(e,{[n]:a[n]})}),e}function $(t,a){let e=a.split(".");a="";do{a+=e.shift();let n=!e.length;if(c(t)){if(l(t)&&_(t[a])&&(l(t[a])||d(t[a])||n)){t=t[a],a="";continue}if(d(t)){let r=parseInt(a,10);if(_(t[r])&&(l(t[r])||d(t[r])||n)){t=t[r],a="";continue}}}if(n){t=void 0;continue}a+="."}while(e.length);return t}function Y(t,a,e){return V(t,ee(a,e))}function ee(t,a){return t.split(".").reduceRight((e,n)=>({[n]:e}),a)}var b=class{},te=(()=>{class t extends b{templateMatcher=/{{\s?([^{}\s]*)\s?}}/g;interpolate(e,n){if(x(e))return this.interpolateString(e,n);if(X(e))return this.interpolateFunction(e,n)}interpolateFunction(e,n){return e(n)}interpolateString(e,n){return n?e.replace(this.templateMatcher,(r,s)=>{let i=this.getInterpolationReplacement(n,s);return i!==void 0?i:r}):e}getInterpolationReplacement(e,n){return this.formatValue($(e,n))}formatValue(e){if(x(e))return e;if(typeof e=="number"||typeof e=="boolean")return e.toString();if(e===null)return"null";if(d(e))return e.join(", ");if(y(e))return typeof e.toString=="function"&&e.toString!==Object.prototype.toString?e.toString():JSON.stringify(e)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=k(t)))(r||t)}})();static \u0275prov=u({token:t,factory:t.\u0275fac})}return t})(),P=(()=>{class t{_onTranslationChange=new T;_onLangChange=new T;_onFallbackLangChange=new T;fallbackLang=null;currentLang;translations={};languages=[];getTranslations(e){return this.translations[e]}setTranslations(e,n,r){this.translations[e]=r&&this.hasTranslationFor(e)?V(this.translations[e],n):n,this.addLanguages([e]),this._onTranslationChange.next({lang:e,translations:this.getTranslations(e)})}getLanguages(){return this.languages}getCurrentLang(){return this.currentLang}getFallbackLang(){return this.fallbackLang}setFallbackLang(e,n=!0){this.fallbackLang=e,n&&this._onFallbackLangChange.next({lang:e,translations:this.translations[e]})}setCurrentLang(e,n=!0){this.currentLang=e,n&&this._onLangChange.next({lang:e,translations:this.translations[e]})}get onTranslationChange(){return this._onTranslationChange.asObservable()}get onLangChange(){return this._onLangChange.asObservable()}get onFallbackLangChange(){return this._onFallbackLangChange.asObservable()}addLanguages(e){this.languages=Array.from(new Set([...this.languages,...e]))}hasTranslationFor(e){return typeof this.translations[e]<"u"}deleteTranslations(e){delete this.translations[e]}getTranslation(e){let n=this.getValue(this.currentLang,e);return n===void 0&&this.fallbackLang!=null&&this.fallbackLang!==this.currentLang&&(n=this.getValue(this.fallbackLang,e)),n}getValue(e,n){return $(this.getTranslations(e),n)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=u({token:t,factory:t.\u0275fac})}return t})(),R=new B("TRANSLATE_CONFIG"),C=t=>h(t)?t:m(t);var M=(()=>{class t{loadingTranslations;pending=!1;_translationRequests={};lastUseLanguage=null;currentLoader=o(p);compiler=o(f);parser=o(b);missingTranslationHandler=o(v);store=o(P);extend=!1;get onTranslationChange(){return this.store.onTranslationChange}get onLangChange(){return this.store.onLangChange}get onFallbackLangChange(){return this.store.onFallbackLangChange}get onDefaultLangChange(){return this.store.onFallbackLangChange}constructor(){let e=w({extend:!1,fallbackLang:null},o(R,{optional:!0}));e.lang&&this.use(e.lang),e.fallbackLang&&this.setFallbackLang(e.fallbackLang),e.extend&&(this.extend=!0)}setFallbackLang(e){this.getFallbackLang()||this.store.setFallbackLang(e,!1);let n=this.loadOrExtendLanguage(e);return h(n)?(n.pipe(L(1)).subscribe({next:()=>{this.store.setFallbackLang(e)},error:()=>{}}),n):(this.store.setFallbackLang(e),m(this.store.getTranslations(e)))}use(e){this.lastUseLanguage=e,this.getCurrentLang()||this.store.setCurrentLang(e,!1);let n=this.loadOrExtendLanguage(e);return h(n)?(n.pipe(L(1)).subscribe({next:()=>{this.changeLang(e)},error:()=>{}}),n):(this.changeLang(e),m(this.store.getTranslations(e)))}loadOrExtendLanguage(e){if(!this.store.hasTranslationFor(e)||this.extend)return this._translationRequests[e]=this._translationRequests[e]||this.loadAndCompileTranslations(e),this._translationRequests[e]}changeLang(e){e===this.lastUseLanguage&&this.store.setCurrentLang(e)}getCurrentLang(){return this.store.getCurrentLang()}loadAndCompileTranslations(e){this.pending=!0;let n=this.currentLoader.getTranslation(e).pipe(O(1),L(1));return this.loadingTranslations=n.pipe(S(r=>this.compiler.compileTranslations(r,e)),O(1),L(1)),this.loadingTranslations.subscribe({next:r=>{this.store.setTranslations(e,r,this.extend),this.pending=!1},error:r=>{this.pending=!1}}),n}setTranslation(e,n,r=!1){let s=this.compiler.compileTranslations(n,e);this.store.setTranslations(e,s,r||this.extend)}getLangs(){return this.store.getLanguages()}addLangs(e){this.store.addLanguages(e)}getParsedResultForKey(e,n){let r=this.getTextToInterpolate(e);if(c(r))return this.runInterpolation(r,n);let s=this.missingTranslationHandler.handle(w({key:e,translateService:this},n!==void 0&&{interpolateParams:n}));return s!==void 0?s:e}getFallbackLang(){return this.store.getFallbackLang()}getTextToInterpolate(e){return this.store.getTranslation(e)}runInterpolation(e,n){if(c(e))return d(e)?this.runInterpolationOnArray(e,n):l(e)?this.runInterpolationOnDict(e,n):this.parser.interpolate(e,n)}runInterpolationOnArray(e,n){return e.map(r=>this.runInterpolation(r,n))}runInterpolationOnDict(e,n){let r={};for(let s in e){let i=this.runInterpolation(e[s],n);i!==void 0&&(r[s]=i)}return r}getParsedResult(e,n){return e instanceof Array?this.getParsedResultForArray(e,n):this.getParsedResultForKey(e,n)}getParsedResultForArray(e,n){let r={},s=!1;for(let g of e)r[g]=this.getParsedResultForKey(g,n),s=s||h(r[g]);if(!s)return r;let i=e.map(g=>C(r[g]));return E(i).pipe(S(g=>{let N={};return g.forEach((U,q)=>{N[e[q]]=U}),N}))}get(e,n){if(!c(e)||!e.length)throw new Error('Parameter "key" is required and cannot be empty');return this.pending?this.loadingTranslations.pipe(K(()=>C(this.getParsedResult(e,n)))):C(this.getParsedResult(e,n))}getStreamOnTranslationChange(e,n){if(!c(e)||!e.length)throw new Error('Parameter "key" is required and cannot be empty');return D(I(()=>this.get(e,n)),this.onTranslationChange.pipe(A(()=>{let r=this.getParsedResult(e,n);return C(r)})))}stream(e,n){if(!c(e)||!e.length)throw new Error('Parameter "key" required');return D(I(()=>this.get(e,n)),this.onLangChange.pipe(A(()=>{let r=this.getParsedResult(e,n);return C(r)})))}instant(e,n){if(!c(e)||e.length===0)throw new Error('Parameter "key" is required and cannot be empty');let r=this.getParsedResult(e,n);return h(r)?Array.isArray(e)?e.reduce((s,i)=>(s[i]=i,s),{}):e:r}set(e,n,r=this.getCurrentLang()){this.store.setTranslations(r,Y(this.store.getTranslations(r),e,x(n)?this.compiler.compile(n,r):this.compiler.compileTranslations(n,r)),!1)}reloadLang(e){return this.resetLang(e),this.loadAndCompileTranslations(e)}resetLang(e){delete this._translationRequests[e],this.store.deleteTranslations(e)}static getBrowserLang(){if(typeof window>"u"||!window.navigator)return;let e=this.getBrowserCultureLang();return e?e.split(/[-_]/)[0]:void 0}static getBrowserCultureLang(){if(!(typeof window>"u"||typeof window.navigator>"u"))return window.navigator.languages?window.navigator.languages[0]:window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage}getBrowserLang(){return t.getBrowserLang()}getBrowserCultureLang(){return t.getBrowserCultureLang()}get defaultLang(){return this.getFallbackLang()}get currentLang(){return this.store.getCurrentLang()}get langs(){return this.store.getLanguages()}setDefaultLang(e){return this.setFallbackLang(e)}getDefaultLang(){return this.getFallbackLang()}static \u0275fac=function(n){return new(n||t)};static \u0275prov=u({token:t,factory:t.\u0275fac})}return t})();var ve=(()=>{class t{translate=o(M);_ref=o(H);value="";lastKey=null;lastParams=[];onTranslationChange;onLangChange;onFallbackLangChange;updateValue(e,n,r){let s=i=>{this.value=i!==void 0?i:e,this.lastKey=e,this._ref.markForCheck()};if(r){let i=this.translate.getParsedResult(e,n);h(i)?i.subscribe(s):s(i)}this.translate.get(e,n).subscribe(s)}transform(e,...n){if(!e||!e.length)return e;if(F(e,this.lastKey)&&F(n,this.lastParams))return this.value;let r;if(c(n[0])&&n.length)if(x(n[0])&&n[0].length){let s=n[0].replace(/(')?([a-zA-Z0-9_]+)(')?(\s)?:/g,'"$2":').replace(/:(\s)?(')(.*?)(')/g,':"$3"');try{r=JSON.parse(s)}catch(i){throw new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${n[0]}`)}}else l(n[0])&&(r=n[0]);return this.lastKey=e,this.lastParams=n,this.updateValue(e,r),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(s=>{(this.lastKey&&s.lang===this.translate.getCurrentLang()||s.lang===this.translate.getFallbackLang())&&(this.lastKey=null,this.updateValue(e,r,s.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(s=>{this.lastKey&&(this.lastKey=null,this.updateValue(e,r,s.translations))})),this.onFallbackLangChange||(this.onFallbackLangChange=this.translate.onFallbackLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(e,r))})),this.value}_dispose(){typeof this.onTranslationChange<"u"&&(this.onTranslationChange.unsubscribe(),this.onTranslationChange=void 0),typeof this.onLangChange<"u"&&(this.onLangChange.unsubscribe(),this.onLangChange=void 0),typeof this.onFallbackLangChange<"u"&&(this.onFallbackLangChange.unsubscribe(),this.onFallbackLangChange=void 0)}ngOnDestroy(){this._dispose()}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=z({name:"translate",type:t,pure:!1});static \u0275prov=u({token:t,factory:t.\u0275fac})}return t})();function ne(t){return{provide:p,useClass:t}}function re(t){return{provide:f,useClass:t}}function ae(t){return{provide:b,useClass:t}}function se(t){return{provide:v,useClass:t}}function we(t={}){return ie(w({compiler:re(Z),parser:ae(te),loader:ne(Q),missingTranslationHandler:se(W)},t),!0)}function ie(t={},a){let e=[];t.loader&&e.push(t.loader),t.compiler&&e.push(t.compiler),t.parser&&e.push(t.parser),t.missingTranslationHandler&&e.push(t.missingTranslationHandler),a&&e.push(P),(t.useDefaultLang||t.defaultLanguage)&&(console.warn("The `useDefaultLang` and `defaultLanguage` options are deprecated. Please use `fallbackLang` instead."),t.useDefaultLang===!0&&t.defaultLanguage&&(t.fallbackLang=t.defaultLanguage));let n={fallbackLang:t.fallbackLang??null,lang:t.lang,extend:t.extend??!1};return e.push({provide:R,useValue:n}),e.push({provide:M,useClass:M,deps:[P,p,f,b,v,R]}),e}var xe={serverTarget:J().version,production:!0,socket:"",api:{base:"/api",socket:`${window.location.protocol==="http:"?"ws://":"wss://"}${window.location.host}`,origin:window.location.origin},jwt:{tokenKey:"access_token",allowedDomains:[document.location.host],disallowedRoutes:[`${window.location.protocol}//${document.location.host}/api/auth/login`]},apiHttpOptions:{},owm:{appid:"fec67b55f7f74deaa28df89ba6a60821"}};export{M as a,ve as b,we as c,xe as d};
@@ -1 +0,0 @@
1
- import{g as r}from"./chunk-72ATQTM5.js";import"./chunk-JQ3FUL2I.js";import{ga as e,pb as o}from"./chunk-VT4775CA.js";var m=[{path:"",loadComponent:()=>import("./chunk-5Y3BIPLQ.js").then(t=>t.TerminalComponent),canDeactivate:[t=>t.canDeactivate?t.canDeactivate():!0]}],n=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=o({type:t});static \u0275inj=e({imports:[r.forChild(m),r]})}return t})();var s=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=o({type:t});static \u0275inj=e({imports:[n]})}return t})();export{s as TerminalModule};
@@ -1 +0,0 @@
1
- import{a as H}from"./chunk-22PVDFCE.js";import{a as X}from"./chunk-B7ACJ247.js";import{a as Z}from"./chunk-4MEUIWY4.js";import"./chunk-YIC5UWBJ.js";import{a as R}from"./chunk-R6UTID3Z.js";import{n as E}from"./chunk-AJTGODYF.js";import"./chunk-4HV5VBUX.js";import{a as j}from"./chunk-45O7A76J.js";import{b as A}from"./chunk-Z2RK3DTY.js";import{a as W,c as q,d as V,e as N,f as D}from"./chunk-72ATQTM5.js";import{b as T}from"./chunk-OROL2MAP.js";import"./chunk-FGRA3MLA.js";import{a as L,b as U,d as $}from"./chunk-3GLEK5PO.js";import"./chunk-JQ3FUL2I.js";import{Cd as K,Gc as h,Hc as M,Jb as m,Mb as x,Nb as y,Nc as s,Oc as d,Sb as c,Tb as n,Ub as a,Vb as p,cb as o,cc as S,fc as _,g as Y,h as I,hb as F,hc as w,ka as u,md as O,ob as P,qa as b,ra as C,uc as g,vc as v,w as z}from"./chunk-VT4775CA.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=w();return C(t.openUnderVoltageModal())})("keydown",function(t){b(e);let r=w();return C(r.handleKeydown(t))}),n(4,"div",12),p(5,"i",21),a(),n(6,"div",14),g(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=w();return C(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",22),a(),n(5,"div",14),g(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=w();return C(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",23),a(),n(5,"div",14),g(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 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=w();return C(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",24),a(),n(5,"div",14),g(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 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=w();return C(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",25),a(),n(5,"div",14),g(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=w();return C(t.reloadPage())})("keydown",function(t){b(e);let r=w();return C(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",26),a(),n(5,"div",14),g(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=w();return C(t.logout())})("keydown",function(t){b(e);let r=w();return C(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",27),a(),n(5,"div",14),g(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-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-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),s(1,"translate"),_("click",function(){return t.toggleSidebar()})("keydown",function(f){return t.handleKeydown(f)}),p(2,"span",1),n(3,"a",2),s(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),s(16,"translate"),p(17,"img",3),n(18,"div",8),g(19,"Homebridge"),a()()(),n(20,"div",9)(21,"div",10)(22,"div",11),s(23,"translate"),_("keydown",function(f){return t.handleKeydown(f)}),n(24,"div",12),p(25,"i",13),a(),n(26,"div",14),g(27),s(28,"translate"),a()()(),x(29,me,9,8,"div",10),n(30,"div",10)(31,"div",15),s(32,"translate"),_("keydown",function(f){return t.handleKeydown(f)}),n(33,"div",12),p(34,"i",16),a(),n(35,"div",14),g(36),s(37,"translate"),a()()(),n(38,"div",10)(39,"div",15),s(40,"translate"),_("keydown",function(f){return t.handleKeydown(f)}),n(41,"div",12),p(42,"i",17),a(),n(43,"div",14),g(44),s(45,"translate"),a()()(),n(46,"div",10)(47,"div",15),s(48,"translate"),_("keydown",function(f){return t.handleKeydown(f)}),n(49,"div",12),p(50,"i",18),a(),n(51,"div",14),g(52),s(53,"translate"),a()()(),x(54,ue,8,9,"div",10),x(55,_e,8,9,"div",10),x(56,ge,8,9,"div",10),n(57,"div",10)(58,"div",15),s(59,"translate"),_("keydown",function(f){return t.handleKeydown(f)}),n(60,"div",12),p(61,"i",19),a(),n(62,"div",14),g(63),s(64,"translate"),a()()(),x(65,fe,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}@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;-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 +0,0 @@
1
- import{a as b}from"./chunk-45O7A76J.js";import"./chunk-Z2RK3DTY.js";import{d as k}from"./chunk-72ATQTM5.js";import{b as w}from"./chunk-OROL2MAP.js";import{k as T,m as S}from"./chunk-FGRA3MLA.js";import{a as C,b as $}from"./chunk-3GLEK5PO.js";import"./chunk-JQ3FUL2I.js";import{Hc as g,Mb as d,Nb as f,Nc as m,Oc as c,Pc as y,Wb as r,Xb as i,Yb as l,Za as x,cb as n,dc as E,hc as h,ka as o,ob as _,uc as a,vc as s}from"./chunk-VT4775CA.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 +0,0 @@
1
- import{a as E}from"./chunk-IJKIT7A3.js";import{a as S}from"./chunk-YBEY6H6T.js";import"./chunk-732ZZPJC.js";import"./chunk-R6UTID3Z.js";import"./chunk-AJTGODYF.js";import"./chunk-4HV5VBUX.js";import"./chunk-45O7A76J.js";import"./chunk-Z2RK3DTY.js";import{b as C}from"./chunk-OROL2MAP.js";import"./chunk-FGRA3MLA.js";import{b as w}from"./chunk-3GLEK5PO.js";import"./chunk-JQ3FUL2I.js";import{Nc as y,Oc as b,Wb as m,Xb as l,Yb as h,Yc as $,bb as a,cb as c,fc as v,ka as o,n as d,ob as u,oc as f,pc as p,uc as g,vc as T}from"./chunk-VT4775CA.js";var _=["terminaloutput"],A=(()=>{class r{$terminal=o(S);$settings=o(C);$navigationGuard=o(E);resizeEvent=new d;termTarget=$("terminaloutput");onWindowResize(){this.resizeEvent.next(void 0)}onBeforeUnload(t){return this.$navigationGuard.handleBeforeUnload(t)}onWindowFocus(){this.activateTerminal()}onClick(){this.activateTerminal()}activateTerminal(){this.$terminal.isTerminalReady()&&this.$terminal.term&&this.$terminal.term.focus()}ngOnInit(){window.document.querySelector("body").classList.add("bg-black"),this.$terminal.isTerminalReady()&&this.$terminal.destroyTerminal(),this.$settings.env.terminal?.persistence&&this.$terminal.hasActiveSession()?this.$terminal.reconnectTerminal(this.termTarget(),{},this.resizeEvent):(!this.$settings.env.terminal?.persistence&&this.$terminal.hasActiveSession()&&this.$terminal.destroyPersistentSession(),this.$terminal.startTerminal(this.termTarget(),{},this.resizeEvent)),setTimeout(()=>{this.activateTerminal()},100)}ngAfterViewInit(){document.addEventListener("visibilitychange",this.onVisibilityChange.bind(this))}onVisibilityChange(){!document.hidden&&this.$terminal.isTerminalReady()&&setTimeout(()=>{this.activateTerminal()},100)}canDeactivate(){return this.$navigationGuard.canDeactivate()}ngOnDestroy(){document.removeEventListener("visibilitychange",this.onVisibilityChange.bind(this)),window.document.querySelector("body").classList.remove("bg-black"),this.$settings.env.terminal?.persistence?this.$terminal.detachTerminal():this.$terminal.destroyPersistentSession()}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=u({type:r,selectors:[["ng-component"]],viewQuery:function(e,i){e&1&&f(i.termTarget,_,5),e&2&&p()},hostBindings:function(e,i){e&1&&v("resize",function(n){return i.onWindowResize(n)},a)("beforeunload",function(n){return i.onBeforeUnload(n)},a)("focus",function(n){return i.onWindowFocus(n)},a)("click",function(n){return i.onClick(n)})},decls:8,vars:3,consts:[["terminaloutput",""],[1,"row","mb-3"],[1,"col-12"],[1,"primary-text","m-0"],[1,"flex-column","d-flex","align-items-stretch","adjust-for-mobile"],["id","docker-terminal",1,"align-self-end","w-100","h-100","mb-1"]],template:function(e,i){e&1&&(m(0,"div",1)(1,"div",2)(2,"h3",3),g(3),y(4,"translate"),l()()(),m(5,"div",4),h(6,"div",5,0),l()),e&2&&(c(3),T(b(4,1,"menu.linux.label_terminal")))},dependencies:[w],encapsulation:2})}return r})();export{A as TerminalComponent};
@@ -1 +0,0 @@
1
- import{g as r}from"./chunk-72ATQTM5.js";import"./chunk-JQ3FUL2I.js";import{ga as t,pb as e}from"./chunk-VT4775CA.js";var m=[{path:"",loadComponent:()=>import("./chunk-Z6T4OYIT.js").then(o=>o.PowerOptionsComponent)}],n=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[r.forChild(m),r]})}return o})();var d=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[n]})}return o})();export{d as PowerOptionsModule};
@@ -1 +0,0 @@
1
- import{l as dn}from"./chunk-JQ3FUL2I.js";import{$ as zt,A as De,Aa as rt,Ab as Gr,B as Er,Ba as xr,Bd as hn,C as Xe,Da as Ne,Ea as qt,Fa as Lr,Fb as Qr,Ga as Bt,Gb as Vt,H,Hb as Kr,Ib as Yr,Jb as Zr,K as ne,L as ie,N as kt,Na as jr,O as fe,Rc as nn,S as et,T as Q,Tc as Y,U as $t,V as Or,Vb as Jr,Vc as on,W as Mr,Xc as sn,Z as Dr,_ as A,_c as it,a as l,aa as S,ab as kr,b as _,bd as ot,ca as C,dd as an,fa as R,fc as Xr,ga as Nr,h as Cr,ha as Ur,hb as Ht,hd as un,i as wr,ia as T,ib as x,id as Pe,j as br,ja as K,jb as $r,jd as cn,k as Ir,ka as d,kb as zr,kc as en,kd as pe,l as Lt,lb as Fr,ld as ln,m as jt,mb as qr,mc as tn,n as q,nb as nt,nc as rn,o as N,oa as oe,ob as Br,p as B,pa as U,pb as Hr,q as w,qb as Ue,r as h,s as Me,t as Ar,u as Tr,va as Ft,wa as Pr,wb as se,x as v,xa as _r,xb as Vr,y as Je,z as I,za as tt,zb as Wr}from"./chunk-VT4775CA.js";var f="primary",We=Symbol("RouteTitle"),Yt=class{params;constructor(n){this.params=n||{}}has(n){return Object.prototype.hasOwnProperty.call(this.params,n)}get(n){if(this.has(n)){let e=this.params[n];return Array.isArray(e)?e[0]:e}return null}getAll(n){if(this.has(n)){let e=this.params[n];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}};function ce(t){return new Yt(t)}function Sn(t,n,e){let r=e.path.split("/");if(r.length>t.length||e.pathMatch==="full"&&(n.hasChildren()||r.length<t.length))return null;let i={};for(let o=0;o<r.length;o++){let s=r[o],a=t[o];if(s[0]===":")i[s.substring(1)]=a;else if(s!==a.path)return null}return{consumed:t.slice(0,r.length),posParams:i}}function fi(t,n){if(t.length!==n.length)return!1;for(let e=0;e<t.length;++e)if(!j(t[e],n[e]))return!1;return!0}function j(t,n){let e=t?Zt(t):void 0,r=n?Zt(n):void 0;if(!e||!r||e.length!=r.length)return!1;let i;for(let o=0;o<e.length;o++)if(i=e[o],!Cn(t[i],n[i]))return!1;return!0}function Zt(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}function Cn(t,n){if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length)return!1;let e=[...t].sort(),r=[...n].sort();return e.every((i,o)=>r[o]===i)}else return t===n}function wn(t){return t.length>0?t[t.length-1]:null}function W(t){return Ar(t)?t:Qr(t)?w(Promise.resolve(t)):h(t)}var pi={exact:In,subset:An},bn={exact:gi,subset:vi,ignored:()=>!0};function fn(t,n,e){return pi[e.paths](t.root,n.root,e.matrixParams)&&bn[e.queryParams](t.queryParams,n.queryParams)&&!(e.fragment==="exact"&&t.fragment!==n.fragment)}function gi(t,n){return j(t,n)}function In(t,n,e){if(!ae(t.segments,n.segments)||!ut(t.segments,n.segments,e)||t.numberOfChildren!==n.numberOfChildren)return!1;for(let r in n.children)if(!t.children[r]||!In(t.children[r],n.children[r],e))return!1;return!0}function vi(t,n){return Object.keys(n).length<=Object.keys(t).length&&Object.keys(n).every(e=>Cn(t[e],n[e]))}function An(t,n,e){return Tn(t,n,n.segments,e)}function Tn(t,n,e,r){if(t.segments.length>e.length){let i=t.segments.slice(0,e.length);return!(!ae(i,e)||n.hasChildren()||!ut(i,e,r))}else if(t.segments.length===e.length){if(!ae(t.segments,e)||!ut(t.segments,e,r))return!1;for(let i in n.children)if(!t.children[i]||!An(t.children[i],n.children[i],r))return!1;return!0}else{let i=e.slice(0,t.segments.length),o=e.slice(t.segments.length);return!ae(t.segments,i)||!ut(t.segments,i,r)||!t.children[f]?!1:Tn(t.children[f],n,o,r)}}function ut(t,n,e){return n.every((r,i)=>bn[e](t[i].parameters,r.parameters))}var $=class{root;queryParams;fragment;_queryParamMap;constructor(n=new g([],{}),e={},r=null){this.root=n,this.queryParams=e,this.fragment=r}get queryParamMap(){return this._queryParamMap??=ce(this.queryParams),this._queryParamMap}toString(){return yi.serialize(this)}},g=class{segments;children;parent=null;constructor(n,e){this.segments=n,this.children=e,Object.values(e).forEach(r=>r.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return ct(this)}},Z=class{path;parameters;_parameterMap;constructor(n,e){this.path=n,this.parameters=e}get parameterMap(){return this._parameterMap??=ce(this.parameters),this._parameterMap}toString(){return On(this)}};function mi(t,n){return ae(t,n)&&t.every((e,r)=>j(e.parameters,n[r].parameters))}function ae(t,n){return t.length!==n.length?!1:t.every((e,r)=>e.path===n[r].path)}function Ri(t,n){let e=[];return Object.entries(t.children).forEach(([r,i])=>{r===f&&(e=e.concat(n(i,r)))}),Object.entries(t.children).forEach(([r,i])=>{r!==f&&(e=e.concat(n(i,r)))}),e}var le=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:()=>new J,providedIn:"root"})}return t})(),J=class{parse(n){let e=new Xt(n);return new $(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(n){let e=`/${_e(n.root,!0)}`,r=wi(n.queryParams),i=typeof n.fragment=="string"?`#${Si(n.fragment)}`:"";return`${e}${r}${i}`}},yi=new J;function ct(t){return t.segments.map(n=>On(n)).join("/")}function _e(t,n){if(!t.hasChildren())return ct(t);if(n){let e=t.children[f]?_e(t.children[f],!1):"",r=[];return Object.entries(t.children).forEach(([i,o])=>{i!==f&&r.push(`${i}:${_e(o,!1)}`)}),r.length>0?`${e}(${r.join("//")})`:e}else{let e=Ri(t,(r,i)=>i===f?[_e(t.children[f],!1)]:[`${i}:${_e(r,!1)}`]);return Object.keys(t.children).length===1&&t.children[f]!=null?`${ct(t)}/${e[0]}`:`${ct(t)}/(${e.join("//")})`}}function En(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function st(t){return En(t).replace(/%3B/gi,";")}function Si(t){return encodeURI(t)}function Jt(t){return En(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function lt(t){return decodeURIComponent(t)}function pn(t){return lt(t.replace(/\+/g,"%20"))}function On(t){return`${Jt(t.path)}${Ci(t.parameters)}`}function Ci(t){return Object.entries(t).map(([n,e])=>`;${Jt(n)}=${Jt(e)}`).join("")}function wi(t){let n=Object.entries(t).map(([e,r])=>Array.isArray(r)?r.map(i=>`${st(e)}=${st(i)}`).join("&"):`${st(e)}=${st(r)}`).filter(e=>e);return n.length?`?${n.join("&")}`:""}var bi=/^[^\/()?;#]+/;function Wt(t){let n=t.match(bi);return n?n[0]:""}var Ii=/^[^\/()?;=#]+/;function Ai(t){let n=t.match(Ii);return n?n[0]:""}var Ti=/^[^=?&#]+/;function Ei(t){let n=t.match(Ti);return n?n[0]:""}var Oi=/^[^&#]+/;function Mi(t){let n=t.match(Oi);return n?n[0]:""}var Xt=class{url;remaining;constructor(n){this.url=n,this.remaining=n}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new g([],{}):new g([],this.parseChildren())}parseQueryParams(){let n={};if(this.consumeOptional("?"))do this.parseQueryParam(n);while(this.consumeOptional("&"));return n}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let n=[];for(this.peekStartsWith("(")||n.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),n.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let r={};return this.peekStartsWith("(")&&(r=this.parseParens(!1)),(n.length>0||Object.keys(e).length>0)&&(r[f]=new g(n,e)),r}parseSegment(){let n=Wt(this.remaining);if(n===""&&this.peekStartsWith(";"))throw new C(4009,!1);return this.capture(n),new Z(lt(n),this.parseMatrixParams())}parseMatrixParams(){let n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){let e=Ai(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let i=Wt(this.remaining);i&&(r=i,this.capture(r))}n[lt(e)]=lt(r)}parseQueryParam(n){let e=Ei(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let s=Mi(this.remaining);s&&(r=s,this.capture(r))}let i=pn(e),o=pn(r);if(n.hasOwnProperty(i)){let s=n[i];Array.isArray(s)||(s=[s],n[i]=s),s.push(o)}else n[i]=o}parseParens(n){let e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let r=Wt(this.remaining),i=this.remaining[r.length];if(i!=="/"&&i!==")"&&i!==";")throw new C(4010,!1);let o;r.indexOf(":")>-1?(o=r.slice(0,r.indexOf(":")),this.capture(o),this.capture(":")):n&&(o=f);let s=this.parseChildren();e[o]=Object.keys(s).length===1?s[f]:new g([],s),this.consumeOptional("//")}return e}peekStartsWith(n){return this.remaining.startsWith(n)}consumeOptional(n){return this.peekStartsWith(n)?(this.remaining=this.remaining.substring(n.length),!0):!1}capture(n){if(!this.consumeOptional(n))throw new C(4011,!1)}};function Mn(t){return t.segments.length>0?new g([],{[f]:t}):t}function Dn(t){let n={};for(let[r,i]of Object.entries(t.children)){let o=Dn(i);if(r===f&&o.segments.length===0&&o.hasChildren())for(let[s,a]of Object.entries(o.children))n[s]=a;else(o.segments.length>0||o.hasChildren())&&(n[r]=o)}let e=new g(t.segments,n);return Di(e)}function Di(t){if(t.numberOfChildren===1&&t.children[f]){let n=t.children[f];return new g(t.segments.concat(n.segments),n.children)}return t}function X(t){return t instanceof $}function Nn(t,n,e=null,r=null){let i=Un(t);return Pn(i,n,e,r)}function Un(t){let n;function e(o){let s={};for(let u of o.children){let c=e(u);s[u.outlet]=c}let a=new g(o.url,s);return o===t&&(n=a),a}let r=e(t.root),i=Mn(r);return n??i}function Pn(t,n,e,r){let i=t;for(;i.parent;)i=i.parent;if(n.length===0)return Gt(i,i,i,e,r);let o=Ni(n);if(o.toRoot())return Gt(i,i,new g([],{}),e,r);let s=Ui(o,i,t),a=s.processChildren?Le(s.segmentGroup,s.index,o.commands):xn(s.segmentGroup,s.index,o.commands);return Gt(i,s.segmentGroup,a,e,r)}function ht(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function ke(t){return typeof t=="object"&&t!=null&&t.outlets}function Gt(t,n,e,r,i){let o={};r&&Object.entries(r).forEach(([u,c])=>{o[u]=Array.isArray(c)?c.map(p=>`${p}`):`${c}`});let s;t===n?s=e:s=_n(t,n,e);let a=Mn(Dn(s));return new $(a,o,i)}function _n(t,n,e){let r={};return Object.entries(t.children).forEach(([i,o])=>{o===n?r[i]=e:r[i]=_n(o,n,e)}),new g(t.segments,r)}var dt=class{isAbsolute;numberOfDoubleDots;commands;constructor(n,e,r){if(this.isAbsolute=n,this.numberOfDoubleDots=e,this.commands=r,n&&r.length>0&&ht(r[0]))throw new C(4003,!1);let i=r.find(ke);if(i&&i!==wn(r))throw new C(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function Ni(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new dt(!0,0,t);let n=0,e=!1,r=t.reduce((i,o,s)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let a={};return Object.entries(o.outlets).forEach(([u,c])=>{a[u]=typeof c=="string"?c.split("/"):c}),[...i,{outlets:a}]}if(o.segmentPath)return[...i,o.segmentPath]}return typeof o!="string"?[...i,o]:s===0?(o.split("/").forEach((a,u)=>{u==0&&a==="."||(u==0&&a===""?e=!0:a===".."?n++:a!=""&&i.push(a))}),i):[...i,o]},[]);return new dt(e,n,r)}var me=class{segmentGroup;processChildren;index;constructor(n,e,r){this.segmentGroup=n,this.processChildren=e,this.index=r}};function Ui(t,n,e){if(t.isAbsolute)return new me(n,!0,0);if(!e)return new me(n,!1,NaN);if(e.parent===null)return new me(e,!0,0);let r=ht(t.commands[0])?0:1,i=e.segments.length-1+r;return Pi(e,i,t.numberOfDoubleDots)}function Pi(t,n,e){let r=t,i=n,o=e;for(;o>i;){if(o-=i,r=r.parent,!r)throw new C(4005,!1);i=r.segments.length}return new me(r,!1,i-o)}function _i(t){return ke(t[0])?t[0].outlets:{[f]:t}}function xn(t,n,e){if(t??=new g([],{}),t.segments.length===0&&t.hasChildren())return Le(t,n,e);let r=xi(t,n,e),i=e.slice(r.commandIndex);if(r.match&&r.pathIndex<t.segments.length){let o=new g(t.segments.slice(0,r.pathIndex),{});return o.children[f]=new g(t.segments.slice(r.pathIndex),t.children),Le(o,0,i)}else return r.match&&i.length===0?new g(t.segments,{}):r.match&&!t.hasChildren()?er(t,n,e):r.match?Le(t,0,i):er(t,n,e)}function Le(t,n,e){if(e.length===0)return new g(t.segments,{});{let r=_i(e),i={};if(Object.keys(r).some(o=>o!==f)&&t.children[f]&&t.numberOfChildren===1&&t.children[f].segments.length===0){let o=Le(t.children[f],n,e);return new g(t.segments,o.children)}return Object.entries(r).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(i[o]=xn(t.children[o],n,s))}),Object.entries(t.children).forEach(([o,s])=>{r[o]===void 0&&(i[o]=s)}),new g(t.segments,i)}}function xi(t,n,e){let r=0,i=n,o={match:!1,pathIndex:0,commandIndex:0};for(;i<t.segments.length;){if(r>=e.length)return o;let s=t.segments[i],a=e[r];if(ke(a))break;let u=`${a}`,c=r<e.length-1?e[r+1]:null;if(i>0&&u===void 0)break;if(u&&c&&typeof c=="object"&&c.outlets===void 0){if(!vn(u,c,s))return o;r+=2}else{if(!vn(u,{},s))return o;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}function er(t,n,e){let r=t.segments.slice(0,n),i=0;for(;i<e.length;){let o=e[i];if(ke(o)){let u=Li(o.outlets);return new g(r,u)}if(i===0&&ht(e[0])){let u=t.segments[n];r.push(new Z(u.path,gn(e[0]))),i++;continue}let s=ke(o)?o.outlets[f]:`${o}`,a=i<e.length-1?e[i+1]:null;s&&a&&ht(a)?(r.push(new Z(s,gn(a))),i+=2):(r.push(new Z(s,{})),i++)}return new g(r,{})}function Li(t){let n={};return Object.entries(t).forEach(([e,r])=>{typeof r=="string"&&(r=[r]),r!==null&&(n[e]=er(new g([],{}),0,r))}),n}function gn(t){let n={};return Object.entries(t).forEach(([e,r])=>n[e]=`${r}`),n}function vn(t,n,e){return t==e.path&&j(n,e.parameters)}var Re="imperative",m=(function(t){return t[t.NavigationStart=0]="NavigationStart",t[t.NavigationEnd=1]="NavigationEnd",t[t.NavigationCancel=2]="NavigationCancel",t[t.NavigationError=3]="NavigationError",t[t.RoutesRecognized=4]="RoutesRecognized",t[t.ResolveStart=5]="ResolveStart",t[t.ResolveEnd=6]="ResolveEnd",t[t.GuardsCheckStart=7]="GuardsCheckStart",t[t.GuardsCheckEnd=8]="GuardsCheckEnd",t[t.RouteConfigLoadStart=9]="RouteConfigLoadStart",t[t.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",t[t.ChildActivationStart=11]="ChildActivationStart",t[t.ChildActivationEnd=12]="ChildActivationEnd",t[t.ActivationStart=13]="ActivationStart",t[t.ActivationEnd=14]="ActivationEnd",t[t.Scroll=15]="Scroll",t[t.NavigationSkipped=16]="NavigationSkipped",t})(m||{}),M=class{id;url;constructor(n,e){this.id=n,this.url=e}},ee=class extends M{type=m.NavigationStart;navigationTrigger;restoredState;constructor(n,e,r="imperative",i=null){super(n,e),this.navigationTrigger=r,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},D=class extends M{urlAfterRedirects;type=m.NavigationEnd;constructor(n,e,r){super(n,e),this.urlAfterRedirects=r}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},b=(function(t){return t[t.Redirect=0]="Redirect",t[t.SupersededByNewNavigation=1]="SupersededByNewNavigation",t[t.NoDataFromResolver=2]="NoDataFromResolver",t[t.GuardRejected=3]="GuardRejected",t[t.Aborted=4]="Aborted",t})(b||{}),Se=(function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t})(Se||{}),k=class extends M{reason;code;type=m.NavigationCancel;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},z=class extends M{reason;code;type=m.NavigationSkipped;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i}},Ce=class extends M{error;target;type=m.NavigationError;constructor(n,e,r,i){super(n,e),this.error=r,this.target=i}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},$e=class extends M{urlAfterRedirects;state;type=m.RoutesRecognized;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},ft=class extends M{urlAfterRedirects;state;type=m.GuardsCheckStart;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},pt=class extends M{urlAfterRedirects;state;shouldActivate;type=m.GuardsCheckEnd;constructor(n,e,r,i,o){super(n,e),this.urlAfterRedirects=r,this.state=i,this.shouldActivate=o}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},gt=class extends M{urlAfterRedirects;state;type=m.ResolveStart;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},vt=class extends M{urlAfterRedirects;state;type=m.ResolveEnd;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},mt=class{route;type=m.RouteConfigLoadStart;constructor(n){this.route=n}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},Rt=class{route;type=m.RouteConfigLoadEnd;constructor(n){this.route=n}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},yt=class{snapshot;type=m.ChildActivationStart;constructor(n){this.snapshot=n}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},St=class{snapshot;type=m.ChildActivationEnd;constructor(n){this.snapshot=n}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Ct=class{snapshot;type=m.ActivationStart;constructor(n){this.snapshot=n}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},wt=class{snapshot;type=m.ActivationEnd;constructor(n){this.snapshot=n}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},we=class{routerEvent;position;anchor;type=m.Scroll;constructor(n,e,r){this.routerEvent=n,this.position=e,this.anchor=r}toString(){let n=this.position?`${this.position[0]}, ${this.position[1]}`:null;return`Scroll(anchor: '${this.anchor}', position: '${n}')`}},ze=class{},be=class{url;navigationBehaviorOptions;constructor(n,e){this.url=n,this.navigationBehaviorOptions=e}};function ji(t){return!(t instanceof ze)&&!(t instanceof be)}function ki(t,n){return t.providers&&!t._injector&&(t._injector=nt(t.providers,n,`Route: ${t.path}`)),t._injector??n}function L(t){return t.outlet||f}function $i(t,n){let e=t.filter(r=>L(r)===n);return e.push(...t.filter(r=>L(r)!==n)),e}function Te(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let n=t.parent;n;n=n.parent){let e=n.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}var bt=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return Te(this.route?.snapshot)??this.rootInjector}constructor(n){this.rootInjector=n,this.children=new he(this.rootInjector)}},he=(()=>{class t{rootInjector;contexts=new Map;constructor(e){this.rootInjector=e}onChildOutletCreated(e,r){let i=this.getOrCreateContext(e);i.outlet=r,this.contexts.set(e,i)}onChildOutletDestroyed(e){let r=this.getContext(e);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){let e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let r=this.getContext(e);return r||(r=new bt(this.rootInjector),this.contexts.set(e,r)),r}getContext(e){return this.contexts.get(e)||null}static \u0275fac=function(r){return new(r||t)(K(oe))};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),It=class{_root;constructor(n){this._root=n}get root(){return this._root.value}parent(n){let e=this.pathFromRoot(n);return e.length>1?e[e.length-2]:null}children(n){let e=tr(n,this._root);return e?e.children.map(r=>r.value):[]}firstChild(n){let e=tr(n,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(n){let e=rr(n,this._root);return e.length<2?[]:e[e.length-2].children.map(i=>i.value).filter(i=>i!==n)}pathFromRoot(n){return rr(n,this._root).map(e=>e.value)}};function tr(t,n){if(t===n.value)return n;for(let e of n.children){let r=tr(t,e);if(r)return r}return null}function rr(t,n){if(t===n.value)return[n];for(let e of n.children){let r=rr(t,e);if(r.length)return r.unshift(n),r}return[]}var O=class{value;children;constructor(n,e){this.value=n,this.children=e}toString(){return`TreeNode(${this.value})`}};function ve(t){let n={};return t&&t.children.forEach(e=>n[e.value.outlet]=e),n}var Fe=class extends It{snapshot;constructor(n,e){super(n),this.snapshot=e,lr(this,n)}toString(){return this.snapshot.toString()}};function Ln(t){let n=zi(t),e=new N([new Z("",{})]),r=new N({}),i=new N({}),o=new N({}),s=new N(""),a=new V(e,r,o,s,i,f,t,n.root);return a.snapshot=n.root,new Fe(new O(a,[]),n)}function zi(t){let n={},e={},r={},o=new ue([],n,r,"",e,f,t,null,{});return new qe("",new O(o,[]))}var V=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(n,e,r,i,o,s,a,u){this.urlSubject=n,this.paramsSubject=e,this.queryParamsSubject=r,this.fragmentSubject=i,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=u,this.title=this.dataSubject?.pipe(v(c=>c[We]))??h(void 0),this.url=n,this.params=e,this.queryParams=r,this.fragment=i,this.data=o}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(v(n=>ce(n))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(v(n=>ce(n))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function At(t,n,e="emptyOnly"){let r,{routeConfig:i}=t;return n!==null&&(e==="always"||i?.path===""||!n.component&&!n.routeConfig?.loadComponent)?r={params:l(l({},n.params),t.params),data:l(l({},n.data),t.data),resolve:l(l(l(l({},t.data),n.data),i?.data),t._resolvedData)}:r={params:l({},t.params),data:l({},t.data),resolve:l(l({},t.data),t._resolvedData??{})},i&&kn(i)&&(r.resolve[We]=i.title),r}var ue=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;get title(){return this.data?.[We]}constructor(n,e,r,i,o,s,a,u,c){this.url=n,this.params=e,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=s,this.component=a,this.routeConfig=u,this._resolve=c}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=ce(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=ce(this.queryParams),this._queryParamMap}toString(){let n=this.url.map(r=>r.toString()).join("/"),e=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${n}', path:'${e}')`}},qe=class extends It{url;constructor(n,e){super(e),this.url=n,lr(this,e)}toString(){return jn(this._root)}};function lr(t,n){n.value._routerState=t,n.children.forEach(e=>lr(t,e))}function jn(t){let n=t.children.length>0?` { ${t.children.map(jn).join(", ")} } `:"";return`${t.value}${n}`}function Qt(t){if(t.snapshot){let n=t.snapshot,e=t._futureSnapshot;t.snapshot=e,j(n.queryParams,e.queryParams)||t.queryParamsSubject.next(e.queryParams),n.fragment!==e.fragment&&t.fragmentSubject.next(e.fragment),j(n.params,e.params)||t.paramsSubject.next(e.params),fi(n.url,e.url)||t.urlSubject.next(e.url),j(n.data,e.data)||t.dataSubject.next(e.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function nr(t,n){let e=j(t.params,n.params)&&mi(t.url,n.url),r=!t.parent!=!n.parent;return e&&!r&&(!t.parent||nr(t.parent,n.parent))}function kn(t){return typeof t.title=="string"||t.title===null}var $n=new T(""),hr=(()=>{class t{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=f;activateEvents=new se;deactivateEvents=new se;attachEvents=new se;detachEvents=new se;routerOutletData=sn(void 0);parentContexts=d(he);location=d(zr);changeDetector=d(it);inputBinder=d(Ge,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(e){if(e.name){let{firstChange:r,previousValue:i}=e.name;if(r)return;this.isTrackedInParentContexts(i)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(i)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new C(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new C(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new C(4012,!1);this.location.detach();let e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,r){this.activated=e,this._activatedRoute=r,this.location.insert(e.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){let e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,r){if(this.isActivated)throw new C(4013,!1);this._activatedRoute=e;let i=this.location,s=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,u=new ir(e,a,i.injector,this.routerOutletData);this.activated=i.createComponent(s,{index:i.length,injector:u,environmentInjector:r}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ue({type:t,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[Ne]})}return t})(),ir=class{route;childContexts;parent;outletData;constructor(n,e,r,i){this.route=n,this.childContexts=e,this.parent=r,this.outletData=i}get(n,e){return n===V?this.route:n===he?this.childContexts:n===$n?this.outletData:this.parent.get(n,e)}},Ge=new T(""),dr=(()=>{class t{outletDataSubscriptions=new Map;bindActivatedRouteToOutletComponent(e){this.unsubscribeFromRouteData(e),this.subscribeToRouteData(e)}unsubscribeFromRouteData(e){this.outletDataSubscriptions.get(e)?.unsubscribe(),this.outletDataSubscriptions.delete(e)}subscribeToRouteData(e){let{activatedRoute:r}=e,i=Je([r.queryParams,r.params,r.data]).pipe(A(([o,s,a],u)=>(a=l(l(l({},o),s),a),u===0?h(a):Promise.resolve(a)))).subscribe(o=>{if(!e.isActivated||!e.activatedComponentRef||e.activatedRoute!==r||r.component===null){this.unsubscribeFromRouteData(e);return}let s=an(r.component);if(!s){this.unsubscribeFromRouteData(e);return}for(let{templateName:a}of s.inputs)e.activatedComponentRef.setInput(a,o[a])});this.outletDataSubscriptions.set(e,i)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),fr=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=Br({type:t,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(r,i){r&1&&Jr(0,"router-outlet")},dependencies:[hr],encapsulation:2})}return t})();function pr(t){let n=t.children&&t.children.map(pr),e=n?_(l({},t),{children:n}):l({},t);return!e.component&&!e.loadComponent&&(n||e.loadChildren)&&e.outlet&&e.outlet!==f&&(e.component=fr),e}function Fi(t,n,e){let r=Be(t,n._root,e?e._root:void 0);return new Fe(r,n)}function Be(t,n,e){if(e&&t.shouldReuseRoute(n.value,e.value.snapshot)){let r=e.value;r._futureSnapshot=n.value;let i=qi(t,n,e);return new O(r,i)}else{if(t.shouldAttach(n.value)){let o=t.retrieve(n.value);if(o!==null){let s=o.route;return s.value._futureSnapshot=n.value,s.children=n.children.map(a=>Be(t,a)),s}}let r=Bi(n.value),i=n.children.map(o=>Be(t,o));return new O(r,i)}}function qi(t,n,e){return n.children.map(r=>{for(let i of e.children)if(t.shouldReuseRoute(r.value,i.value.snapshot))return Be(t,r,i);return Be(t,r)})}function Bi(t){return new V(new N(t.url),new N(t.params),new N(t.queryParams),new N(t.fragment),new N(t.data),t.outlet,t.component,t)}var Ie=class{redirectTo;navigationBehaviorOptions;constructor(n,e){this.redirectTo=n,this.navigationBehaviorOptions=e}},zn="ngNavigationCancelingError";function Tt(t,n){let{redirectTo:e,navigationBehaviorOptions:r}=X(n)?{redirectTo:n,navigationBehaviorOptions:void 0}:n,i=Fn(!1,b.Redirect);return i.url=e,i.navigationBehaviorOptions=r,i}function Fn(t,n){let e=new Error(`NavigationCancelingError: ${t||""}`);return e[zn]=!0,e.cancellationCode=n,e}function Hi(t){return qn(t)&&X(t.url)}function qn(t){return!!t&&t[zn]}var Vi=(t,n,e,r)=>v(i=>(new or(n,i.targetRouterState,i.currentRouterState,e,r).activate(t),i)),or=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(n,e,r,i,o){this.routeReuseStrategy=n,this.futureState=e,this.currState=r,this.forwardEvent=i,this.inputBindingEnabled=o}activate(n){let e=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,r,n),Qt(this.futureState.root),this.activateChildRoutes(e,r,n)}deactivateChildRoutes(n,e,r){let i=ve(e);n.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,i[s],r),delete i[s]}),Object.values(i).forEach(o=>{this.deactivateRouteAndItsChildren(o,r)})}deactivateRoutes(n,e,r){let i=n.value,o=e?e.value:null;if(i===o)if(i.component){let s=r.getContext(i.outlet);s&&this.deactivateChildRoutes(n,e,s.children)}else this.deactivateChildRoutes(n,e,r);else o&&this.deactivateRouteAndItsChildren(e,r)}deactivateRouteAndItsChildren(n,e){n.value.component&&this.routeReuseStrategy.shouldDetach(n.value.snapshot)?this.detachAndStoreRouteSubtree(n,e):this.deactivateRouteAndOutlet(n,e)}detachAndStoreRouteSubtree(n,e){let r=e.getContext(n.value.outlet),i=r&&n.value.component?r.children:e,o=ve(n);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);if(r&&r.outlet){let s=r.outlet.detach(),a=r.children.onOutletDeactivated();this.routeReuseStrategy.store(n.value.snapshot,{componentRef:s,route:n,contexts:a})}}deactivateRouteAndOutlet(n,e){let r=e.getContext(n.value.outlet),i=r&&n.value.component?r.children:e,o=ve(n);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);r&&(r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated()),r.attachRef=null,r.route=null)}activateChildRoutes(n,e,r){let i=ve(e);n.children.forEach(o=>{this.activateRoutes(o,i[o.value.outlet],r),this.forwardEvent(new wt(o.value.snapshot))}),n.children.length&&this.forwardEvent(new St(n.value.snapshot))}activateRoutes(n,e,r){let i=n.value,o=e?e.value:null;if(Qt(i),i===o)if(i.component){let s=r.getOrCreateContext(i.outlet);this.activateChildRoutes(n,e,s.children)}else this.activateChildRoutes(n,e,r);else if(i.component){let s=r.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){let a=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),Qt(a.route.value),this.activateChildRoutes(n,null,s.children)}else s.attachRef=null,s.route=i,s.outlet&&s.outlet.activateWith(i,s.injector),this.activateChildRoutes(n,null,s.children)}else this.activateChildRoutes(n,null,r)}},Et=class{path;route;constructor(n){this.path=n,this.route=this.path[this.path.length-1]}},ye=class{component;route;constructor(n,e){this.component=n,this.route=e}};function Wi(t,n,e){let r=t._root,i=n?n._root:null;return xe(r,i,e,[r.value])}function Gi(t){let n=t.routeConfig?t.routeConfig.canActivateChild:null;return!n||n.length===0?null:{node:t,guards:n}}function Ee(t,n){let e=Symbol(),r=n.get(t,e);return r===e?typeof t=="function"&&!Ur(t)?t:n.get(t):r}function xe(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=ve(n);return t.children.forEach(s=>{Qi(s,o[s.value.outlet],e,r.concat([s.value]),i),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>je(a,e.getContext(s),i)),i}function Qi(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=t.value,s=n?n.value:null,a=e?e.getContext(t.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){let u=Ki(s,o,o.routeConfig.runGuardsAndResolvers);u?i.canActivateChecks.push(new Et(r)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?xe(t,n,a?a.children:null,r,i):xe(t,n,e,r,i),u&&a&&a.outlet&&a.outlet.isActivated&&i.canDeactivateChecks.push(new ye(a.outlet.component,s))}else s&&je(n,a,i),i.canActivateChecks.push(new Et(r)),o.component?xe(t,null,a?a.children:null,r,i):xe(t,null,e,r,i);return i}function Ki(t,n,e){if(typeof e=="function")return e(t,n);switch(e){case"pathParamsChange":return!ae(t.url,n.url);case"pathParamsOrQueryParamsChange":return!ae(t.url,n.url)||!j(t.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!nr(t,n)||!j(t.queryParams,n.queryParams);case"paramsChange":default:return!nr(t,n)}}function je(t,n,e){let r=ve(t),i=t.value;Object.entries(r).forEach(([o,s])=>{i.component?n?je(s,n.children.getContext(o),e):je(s,null,e):je(s,n,e)}),i.component?n&&n.outlet&&n.outlet.isActivated?e.canDeactivateChecks.push(new ye(n.outlet.component,i)):e.canDeactivateChecks.push(new ye(null,i)):e.canDeactivateChecks.push(new ye(null,i))}function Qe(t){return typeof t=="function"}function Yi(t){return typeof t=="boolean"}function Zi(t){return t&&Qe(t.canLoad)}function Ji(t){return t&&Qe(t.canActivate)}function Xi(t){return t&&Qe(t.canActivateChild)}function eo(t){return t&&Qe(t.canDeactivate)}function to(t){return t&&Qe(t.canMatch)}function Bn(t){return t instanceof Tr||t?.name==="EmptyError"}var at=Symbol("INITIAL_VALUE");function Ae(){return A(t=>Je(t.map(n=>n.pipe(fe(1),Dr(at)))).pipe(v(n=>{for(let e of n)if(e!==!0){if(e===at)return at;if(e===!1||ro(e))return e}return!0}),H(n=>n!==at),fe(1)))}function ro(t){return X(t)||t instanceof Ie}function no(t,n){return I(e=>{let{targetSnapshot:r,currentSnapshot:i,guards:{canActivateChecks:o,canDeactivateChecks:s}}=e;return s.length===0&&o.length===0?h(_(l({},e),{guardsResult:!0})):io(s,r,i,t).pipe(I(a=>a&&Yi(a)?oo(r,o,t,n):h(a)),v(a=>_(l({},e),{guardsResult:a})))})}function io(t,n,e,r){return w(t).pipe(I(i=>lo(i.component,i.route,e,n,r)),Q(i=>i!==!0,!0))}function oo(t,n,e,r){return w(n).pipe(ie(i=>Er(ao(i.route.parent,r),so(i.route,r),co(t,i.path,e),uo(t,i.route,e))),Q(i=>i!==!0,!0))}function so(t,n){return t!==null&&n&&n(new Ct(t)),h(!0)}function ao(t,n){return t!==null&&n&&n(new yt(t)),h(!0)}function uo(t,n,e){let r=n.routeConfig?n.routeConfig.canActivate:null;if(!r||r.length===0)return h(!0);let i=r.map(o=>Xe(()=>{let s=Te(n)??e,a=Ee(o,s),u=Ji(a)?a.canActivate(n,t):U(s,()=>a(n,t));return W(u).pipe(Q())}));return h(i).pipe(Ae())}function co(t,n,e){let r=n[n.length-1],o=n.slice(0,n.length-1).reverse().map(s=>Gi(s)).filter(s=>s!==null).map(s=>Xe(()=>{let a=s.guards.map(u=>{let c=Te(s.node)??e,p=Ee(u,c),y=Xi(p)?p.canActivateChild(r,t):U(c,()=>p(r,t));return W(y).pipe(Q())});return h(a).pipe(Ae())}));return h(o).pipe(Ae())}function lo(t,n,e,r,i){let o=n&&n.routeConfig?n.routeConfig.canDeactivate:null;if(!o||o.length===0)return h(!0);let s=o.map(a=>{let u=Te(n)??i,c=Ee(a,u),p=eo(c)?c.canDeactivate(t,n,e,r):U(u,()=>c(t,n,e,r));return W(p).pipe(Q())});return h(s).pipe(Ae())}function ho(t,n,e,r){let i=n.canLoad;if(i===void 0||i.length===0)return h(!0);let o=i.map(s=>{let a=Ee(s,t),u=Zi(a)?a.canLoad(n,e):U(t,()=>a(n,e));return W(u)});return h(o).pipe(Ae(),Hn(r))}function Hn(t){return br(S(n=>{if(typeof n!="boolean")throw Tt(t,n)}),v(n=>n===!0))}function fo(t,n,e,r){let i=n.canMatch;if(!i||i.length===0)return h(!0);let o=i.map(s=>{let a=Ee(s,t),u=to(a)?a.canMatch(n,e):U(t,()=>a(n,e));return W(u)});return h(o).pipe(Ae(),Hn(r))}var He=class{segmentGroup;constructor(n){this.segmentGroup=n||null}},Ve=class extends Error{urlTree;constructor(n){super(),this.urlTree=n}};function ge(t){return Me(new He(t))}function po(t){return Me(new C(4e3,!1))}function go(t){return Me(Fn(!1,b.GuardRejected))}var sr=class{urlSerializer;urlTree;constructor(n,e){this.urlSerializer=n,this.urlTree=e}lineralizeSegments(n,e){let r=[],i=e.root;for(;;){if(r=r.concat(i.segments),i.numberOfChildren===0)return h(r);if(i.numberOfChildren>1||!i.children[f])return po(`${n.redirectTo}`);i=i.children[f]}}applyRedirectCommands(n,e,r,i,o){return vo(e,i,o).pipe(v(s=>{if(s instanceof $)throw new Ve(s);let a=this.applyRedirectCreateUrlTree(s,this.urlSerializer.parse(s),n,r);if(s[0]==="/")throw new Ve(a);return a}))}applyRedirectCreateUrlTree(n,e,r,i){let o=this.createSegmentGroup(n,e.root,r,i);return new $(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(n,e){let r={};return Object.entries(n).forEach(([i,o])=>{if(typeof o=="string"&&o[0]===":"){let a=o.substring(1);r[i]=e[a]}else r[i]=o}),r}createSegmentGroup(n,e,r,i){let o=this.createSegments(n,e.segments,r,i),s={};return Object.entries(e.children).forEach(([a,u])=>{s[a]=this.createSegmentGroup(n,u,r,i)}),new g(o,s)}createSegments(n,e,r,i){return e.map(o=>o.path[0]===":"?this.findPosParam(n,o,i):this.findOrReturn(o,r))}findPosParam(n,e,r){let i=r[e.path.substring(1)];if(!i)throw new C(4001,!1);return i}findOrReturn(n,e){let r=0;for(let i of e){if(i.path===n.path)return e.splice(r),i;r++}return n}};function vo(t,n,e){if(typeof t=="string")return h(t);let r=t,{queryParams:i,fragment:o,routeConfig:s,url:a,outlet:u,params:c,data:p,title:y}=n;return W(U(e,()=>r({params:c,data:p,queryParams:i,fragment:o,routeConfig:s,url:a,outlet:u,title:y})))}var ar={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function mo(t,n,e,r,i){let o=Vn(t,n,e);return o.matched?(r=ki(n,r),fo(r,n,e,i).pipe(v(s=>s===!0?o:l({},ar)))):h(o)}function Vn(t,n,e){if(n.path==="**")return Ro(e);if(n.path==="")return n.pathMatch==="full"&&(t.hasChildren()||e.length>0)?l({},ar):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let i=(n.matcher||Sn)(e,t,n);if(!i)return l({},ar);let o={};Object.entries(i.posParams??{}).forEach(([a,u])=>{o[a]=u.path});let s=i.consumed.length>0?l(l({},o),i.consumed[i.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:i.consumed,remainingSegments:e.slice(i.consumed.length),parameters:s,positionalParamSegments:i.posParams??{}}}function Ro(t){return{matched:!0,parameters:t.length>0?wn(t).parameters:{},consumedSegments:t,remainingSegments:[],positionalParamSegments:{}}}function mn(t,n,e,r){return e.length>0&&Co(t,e,r)?{segmentGroup:new g(n,So(r,new g(e,t.children))),slicedSegments:[]}:e.length===0&&wo(t,e,r)?{segmentGroup:new g(t.segments,yo(t,e,r,t.children)),slicedSegments:e}:{segmentGroup:new g(t.segments,t.children),slicedSegments:e}}function yo(t,n,e,r){let i={};for(let o of e)if(Mt(t,n,o)&&!r[L(o)]){let s=new g([],{});i[L(o)]=s}return l(l({},r),i)}function So(t,n){let e={};e[f]=n;for(let r of t)if(r.path===""&&L(r)!==f){let i=new g([],{});e[L(r)]=i}return e}function Co(t,n,e){return e.some(r=>Mt(t,n,r)&&L(r)!==f)}function wo(t,n,e){return e.some(r=>Mt(t,n,r))}function Mt(t,n,e){return(t.hasChildren()||n.length>0)&&e.pathMatch==="full"?!1:e.path===""}function bo(t,n,e){return n.length===0&&!t.children[e]}var ur=class{};function Io(t,n,e,r,i,o,s="emptyOnly"){return new cr(t,n,e,r,i,s,o).recognize()}var Ao=31,cr=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(n,e,r,i,o,s,a){this.injector=n,this.configLoader=e,this.rootComponentType=r,this.config=i,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.applyRedirects=new sr(this.urlSerializer,this.urlTree)}noMatchError(n){return new C(4002,`'${n.segmentGroup}'`)}recognize(){let n=mn(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(n).pipe(v(({children:e,rootSnapshot:r})=>{let i=new O(r,e),o=new qe("",i),s=Nn(r,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),{state:o,tree:s}}))}match(n){let e=new ue([],Object.freeze({}),Object.freeze(l({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),f,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,n,f,e).pipe(v(r=>({children:r,rootSnapshot:e})),ne(r=>{if(r instanceof Ve)return this.urlTree=r.urlTree,this.match(r.urlTree.root);throw r instanceof He?this.noMatchError(r):r}))}processSegmentGroup(n,e,r,i,o){return r.segments.length===0&&r.hasChildren()?this.processChildren(n,e,r,o):this.processSegment(n,e,r,r.segments,i,!0,o).pipe(v(s=>s instanceof O?[s]:[]))}processChildren(n,e,r,i){let o=[];for(let s of Object.keys(r.children))s==="primary"?o.unshift(s):o.push(s);return w(o).pipe(ie(s=>{let a=r.children[s],u=$i(e,s);return this.processSegmentGroup(n,u,a,s,i)}),Mr((s,a)=>(s.push(...a),s)),kt(null),Or(),I(s=>{if(s===null)return ge(r);let a=Wn(s);return To(a),h(a)}))}processSegment(n,e,r,i,o,s,a){return w(e).pipe(ie(u=>this.processSegmentAgainstRoute(u._injector??n,e,u,r,i,o,s,a).pipe(ne(c=>{if(c instanceof He)return h(null);throw c}))),Q(u=>!!u),ne(u=>{if(Bn(u))return bo(r,i,o)?h(new ur):ge(r);throw u}))}processSegmentAgainstRoute(n,e,r,i,o,s,a,u){return L(r)!==s&&(s===f||!Mt(i,o,r))?ge(i):r.redirectTo===void 0?this.matchSegmentAgainstRoute(n,i,r,o,s,u):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(n,i,e,r,o,s,u):ge(i)}expandSegmentAgainstRouteUsingRedirect(n,e,r,i,o,s,a){let{matched:u,parameters:c,consumedSegments:p,positionalParamSegments:y,remainingSegments:P}=Vn(e,i,o);if(!u)return ge(e);typeof i.redirectTo=="string"&&i.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>Ao&&(this.allowRedirects=!1));let G=new ue(o,c,Object.freeze(l({},this.urlTree.queryParams)),this.urlTree.fragment,Rn(i),L(i),i.component??i._loadedComponent??null,i,yn(i)),E=At(G,a,this.paramsInheritanceStrategy);return G.params=Object.freeze(E.params),G.data=Object.freeze(E.data),this.applyRedirects.applyRedirectCommands(p,i.redirectTo,y,G,n).pipe(A(re=>this.applyRedirects.lineralizeSegments(i,re)),I(re=>this.processSegment(n,r,e,re.concat(P),s,!1,a)))}matchSegmentAgainstRoute(n,e,r,i,o,s){let a=mo(e,r,i,n,this.urlSerializer);return r.path==="**"&&(e.children={}),a.pipe(A(u=>u.matched?(n=r._injector??n,this.getChildConfig(n,r,i).pipe(A(({routes:c})=>{let p=r._loadedInjector??n,{parameters:y,consumedSegments:P,remainingSegments:G}=u,E=new ue(P,y,Object.freeze(l({},this.urlTree.queryParams)),this.urlTree.fragment,Rn(r),L(r),r.component??r._loadedComponent??null,r,yn(r)),de=At(E,s,this.paramsInheritanceStrategy);E.params=Object.freeze(de.params),E.data=Object.freeze(de.data);let{segmentGroup:re,slicedSegments:xt}=mn(e,P,G,c);if(xt.length===0&&re.hasChildren())return this.processChildren(p,c,re,E).pipe(v(Ze=>new O(E,Ze)));if(c.length===0&&xt.length===0)return h(new O(E,[]));let hi=L(r)===o;return this.processSegment(p,c,re,xt,hi?f:o,!0,E).pipe(v(Ze=>new O(E,Ze instanceof O?[Ze]:[])))}))):ge(e)))}getChildConfig(n,e,r){return e.children?h({routes:e.children,injector:n}):e.loadChildren?e._loadedRoutes!==void 0?h({routes:e._loadedRoutes,injector:e._loadedInjector}):ho(n,e,r,this.urlSerializer).pipe(I(i=>i?this.configLoader.loadChildren(n,e).pipe(S(o=>{e._loadedRoutes=o.routes,e._loadedInjector=o.injector})):go(e))):h({routes:[],injector:n})}};function To(t){t.sort((n,e)=>n.value.outlet===f?-1:e.value.outlet===f?1:n.value.outlet.localeCompare(e.value.outlet))}function Eo(t){let n=t.value.routeConfig;return n&&n.path===""}function Wn(t){let n=[],e=new Set;for(let r of t){if(!Eo(r)){n.push(r);continue}let i=n.find(o=>r.value.routeConfig===o.value.routeConfig);i!==void 0?(i.children.push(...r.children),e.add(i)):n.push(r)}for(let r of e){let i=Wn(r.children);n.push(new O(r.value,i))}return n.filter(r=>!e.has(r))}function Rn(t){return t.data||{}}function yn(t){return t.resolve||{}}function Oo(t,n,e,r,i,o){return I(s=>Io(t,n,e,r,s.extractedUrl,i,o).pipe(v(({state:a,tree:u})=>_(l({},s),{targetSnapshot:a,urlAfterRedirects:u}))))}function Mo(t,n){return I(e=>{let{targetSnapshot:r,guards:{canActivateChecks:i}}=e;if(!i.length)return h(e);let o=new Set(i.map(u=>u.route)),s=new Set;for(let u of o)if(!s.has(u))for(let c of Gn(u))s.add(c);let a=0;return w(s).pipe(ie(u=>o.has(u)?Do(u,r,t,n):(u.data=At(u,u.parent,t).resolve,h(void 0))),S(()=>a++),$t(1),I(u=>a===s.size?h(e):B))})}function Gn(t){let n=t.children.map(e=>Gn(e)).flat();return[t,...n]}function Do(t,n,e,r){let i=t.routeConfig,o=t._resolve;return i?.title!==void 0&&!kn(i)&&(o[We]=i.title),Xe(()=>(t.data=At(t,t.parent,e).resolve,No(o,t,n,r).pipe(v(s=>(t._resolvedData=s,t.data=l(l({},t.data),s),null)))))}function No(t,n,e,r){let i=Zt(t);if(i.length===0)return h({});let o={};return w(i).pipe(I(s=>Uo(t[s],n,e,r).pipe(Q(),S(a=>{if(a instanceof Ie)throw Tt(new J,a);o[s]=a}))),$t(1),v(()=>o),ne(s=>Bn(s)?B:Me(s)))}function Uo(t,n,e,r){let i=Te(n)??r,o=Ee(t,i),s=o.resolve?o.resolve(n,e):U(i,()=>o(n,e));return W(s)}function Kt(t){return A(n=>{let e=t(n);return e?w(e).pipe(v(()=>n)):h(n)})}var gr=(()=>{class t{buildTitle(e){let r,i=e.root;for(;i!==void 0;)r=this.getResolvedTitleForRoute(i)??r,i=i.children.find(o=>o.outlet===f);return r}getResolvedTitleForRoute(e){return e.data[We]}static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:()=>d(Qn),providedIn:"root"})}return t})(),Qn=(()=>{class t extends gr{title;constructor(e){super(),this.title=e}updateTitle(e){let r=this.buildTitle(e);r!==void 0&&this.title.setTitle(r)}static \u0275fac=function(r){return new(r||t)(K(dn))};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),te=new T("",{providedIn:"root",factory:()=>({})}),Oe=new T(""),Dt=(()=>{class t{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=d(nn);loadComponent(e,r){if(this.componentLoaders.get(r))return this.componentLoaders.get(r);if(r._loadedComponent)return h(r._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(r);let i=W(U(e,()=>r.loadComponent())).pipe(v(Yn),A(Zn),S(s=>{this.onLoadEndListener&&this.onLoadEndListener(r),r._loadedComponent=s}),et(()=>{this.componentLoaders.delete(r)})),o=new jt(i,()=>new q).pipe(Lt());return this.componentLoaders.set(r,o),o}loadChildren(e,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return h({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let o=Kn(r,this.compiler,e,this.onLoadEndListener).pipe(et(()=>{this.childrenLoaders.delete(r)})),s=new jt(o,()=>new q).pipe(Lt());return this.childrenLoaders.set(r,s),s}static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Kn(t,n,e,r){return W(U(e,()=>t.loadChildren())).pipe(v(Yn),A(Zn),I(i=>i instanceof qr||Array.isArray(i)?h(i):w(n.compileModuleAsync(i))),v(i=>{r&&r(t);let o,s,a=!1;return Array.isArray(i)?(s=i,a=!0):(o=i.create(e).injector,s=o.get(Oe,[],{optional:!0,self:!0}).flat()),{routes:s.map(pr),injector:o}}))}function Po(t){return t&&typeof t=="object"&&"default"in t}function Yn(t){return Po(t)?t.default:t}function Zn(t){return h(t)}var Nt=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:()=>d(_o),providedIn:"root"})}return t})(),_o=(()=>{class t{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,r){return e}static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),vr=new T(""),mr=new T("");function Jn(t,n,e){let r=t.get(mr),i=t.get(Pr);if(!i.startViewTransition||r.skipNextTransition)return r.skipNextTransition=!1,new Promise(c=>setTimeout(c));let o,s=new Promise(c=>{o=c}),a=i.startViewTransition(()=>(o(),xo(t)));a.ready.catch(c=>{});let{onViewTransitionCreated:u}=r;return u&&U(t,()=>u({transition:a,from:n,to:e})),s}function xo(t){return new Promise(n=>{Wr({read:()=>setTimeout(n)},{injector:t})})}var Rr=new T(""),Ut=(()=>{class t{currentNavigation=rt(null,{equal:()=>!1});currentTransition=null;lastSuccessfulNavigation=null;events=new q;transitionAbortWithErrorSubject=new q;configLoader=d(Dt);environmentInjector=d(oe);destroyRef=d(_r);urlSerializer=d(le);rootContexts=d(he);location=d(pe);inputBindingEnabled=d(Ge,{optional:!0})!==null;titleStrategy=d(gr);options=d(te,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=d(Nt);createViewTransition=d(vr,{optional:!0});navigationErrorHandler=d(Rr,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>h(void 0);rootComponentType=null;destroyed=!1;constructor(){let e=i=>this.events.next(new mt(i)),r=i=>this.events.next(new Rt(i));this.configLoader.onLoadEndListener=r,this.configLoader.onLoadStartListener=e,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(e){let r=++this.navigationId;Y(()=>{this.transitions?.next(_(l({},e),{extractedUrl:this.urlHandlingStrategy.extract(e.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,abortController:new AbortController,id:r}))})}setupNavigations(e){return this.transitions=new N(null),this.transitions.pipe(H(r=>r!==null),A(r=>{let i=!1;return h(r).pipe(A(o=>{if(this.navigationId>r.id)return this.cancelNavigationTransition(r,"",b.SupersededByNewNavigation),B;this.currentTransition=r,this.currentNavigation.set({id:o.id,initialUrl:o.rawUrl,extractedUrl:o.extractedUrl,targetBrowserUrl:typeof o.extras.browserUrl=="string"?this.urlSerializer.parse(o.extras.browserUrl):o.extras.browserUrl,trigger:o.source,extras:o.extras,previousNavigation:this.lastSuccessfulNavigation?_(l({},this.lastSuccessfulNavigation),{previousNavigation:null}):null,abort:()=>o.abortController.abort()});let s=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),a=o.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!s&&a!=="reload")return this.events.next(new z(o.id,this.urlSerializer.serialize(o.rawUrl),"",Se.IgnoredSameUrlNavigation)),o.resolve(!1),B;if(this.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return h(o).pipe(A(u=>(this.events.next(new ee(u.id,this.urlSerializer.serialize(u.extractedUrl),u.source,u.restoredState)),u.id!==this.navigationId?B:Promise.resolve(u))),Oo(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy),S(u=>{r.targetSnapshot=u.targetSnapshot,r.urlAfterRedirects=u.urlAfterRedirects,this.currentNavigation.update(p=>(p.finalUrl=u.urlAfterRedirects,p));let c=new $e(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(c)}));if(s&&this.urlHandlingStrategy.shouldProcessUrl(o.currentRawUrl)){let{id:u,extractedUrl:c,source:p,restoredState:y,extras:P}=o,G=new ee(u,this.urlSerializer.serialize(c),p,y);this.events.next(G);let E=Ln(this.rootComponentType).snapshot;return this.currentTransition=r=_(l({},o),{targetSnapshot:E,urlAfterRedirects:c,extras:_(l({},P),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.update(de=>(de.finalUrl=c,de)),h(r)}else return this.events.next(new z(o.id,this.urlSerializer.serialize(o.extractedUrl),"",Se.IgnoredByUrlHandlingStrategy)),o.resolve(!1),B}),S(o=>{let s=new ft(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(s)}),v(o=>(this.currentTransition=r=_(l({},o),{guards:Wi(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),r)),no(this.environmentInjector,o=>this.events.next(o)),S(o=>{if(r.guardsResult=o.guardsResult,o.guardsResult&&typeof o.guardsResult!="boolean")throw Tt(this.urlSerializer,o.guardsResult);let s=new pt(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(s)}),H(o=>o.guardsResult?!0:(this.cancelNavigationTransition(o,"",b.GuardRejected),!1)),Kt(o=>{if(o.guards.canActivateChecks.length!==0)return h(o).pipe(S(s=>{let a=new gt(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}),A(s=>{let a=!1;return h(s).pipe(Mo(this.paramsInheritanceStrategy,this.environmentInjector),S({next:()=>a=!0,complete:()=>{a||this.cancelNavigationTransition(s,"",b.NoDataFromResolver)}}))}),S(s=>{let a=new vt(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}))}),Kt(o=>{let s=a=>{let u=[];if(a.routeConfig?.loadComponent){let c=Te(a)??this.environmentInjector;u.push(this.configLoader.loadComponent(c,a.routeConfig).pipe(S(p=>{a.component=p}),v(()=>{})))}for(let c of a.children)u.push(...s(c));return u};return Je(s(o.targetSnapshot.root)).pipe(kt(null),fe(1))}),Kt(()=>this.afterPreactivation()),A(()=>{let{currentSnapshot:o,targetSnapshot:s}=r,a=this.createViewTransition?.(this.environmentInjector,o.root,s.root);return a?w(a).pipe(v(()=>r)):h(r)}),v(o=>{let s=Fi(e.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return this.currentTransition=r=_(l({},o),{targetRouterState:s}),this.currentNavigation.update(a=>(a.targetRouterState=s,a)),r}),S(()=>{this.events.next(new ze)}),Vi(this.rootContexts,e.routeReuseStrategy,o=>this.events.next(o),this.inputBindingEnabled),fe(1),zt(new Ir(o=>{let s=r.abortController.signal,a=()=>o.next();return s.addEventListener("abort",a),()=>s.removeEventListener("abort",a)}).pipe(H(()=>!i&&!r.targetRouterState),S(()=>{this.cancelNavigationTransition(r,r.abortController.signal.reason+"",b.Aborted)}))),S({next:o=>{i=!0,this.lastSuccessfulNavigation=Y(this.currentNavigation),this.events.next(new D(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects))),this.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{i=!0}}),zt(this.transitionAbortWithErrorSubject.pipe(S(o=>{throw o}))),et(()=>{i||this.cancelNavigationTransition(r,"",b.SupersededByNewNavigation),this.currentTransition?.id===r.id&&(this.currentNavigation.set(null),this.currentTransition=null)}),ne(o=>{if(this.destroyed)return r.resolve(!1),B;if(i=!0,qn(o))this.events.next(new k(r.id,this.urlSerializer.serialize(r.extractedUrl),o.message,o.cancellationCode)),Hi(o)?this.events.next(new be(o.url,o.navigationBehaviorOptions)):r.resolve(!1);else{let s=new Ce(r.id,this.urlSerializer.serialize(r.extractedUrl),o,r.targetSnapshot??void 0);try{let a=U(this.environmentInjector,()=>this.navigationErrorHandler?.(s));if(a instanceof Ie){let{message:u,cancellationCode:c}=Tt(this.urlSerializer,a);this.events.next(new k(r.id,this.urlSerializer.serialize(r.extractedUrl),u,c)),this.events.next(new be(a.redirectTo,a.navigationBehaviorOptions))}else throw this.events.next(s),o}catch(a){this.options.resolveNavigationPromiseOnError?r.resolve(!1):r.reject(a)}}return B}))}))}cancelNavigationTransition(e,r,i){let o=new k(e.id,this.urlSerializer.serialize(e.extractedUrl),r,i);this.events.next(o),e.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let e=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),r=Y(this.currentNavigation),i=r?.targetBrowserUrl??r?.extractedUrl;return e.toString()!==i?.toString()&&!r?.extras.skipLocationChange}static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Lo(t){return t!==Re}var Xn=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:()=>d(jo),providedIn:"root"})}return t})(),Ot=class{shouldDetach(n){return!1}store(n,e){}shouldAttach(n){return!1}retrieve(n){return null}shouldReuseRoute(n,e){return n.routeConfig===e.routeConfig}},jo=(()=>{class t extends Ot{static \u0275fac=(()=>{let e;return function(i){return(e||(e=qt(t)))(i||t)}})();static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),ei=(()=>{class t{urlSerializer=d(le);options=d(te,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";location=d(pe);urlHandlingStrategy=d(Nt);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new $;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}createBrowserPath({finalUrl:e,initialUrl:r,targetBrowserUrl:i}){let o=e!==void 0?this.urlHandlingStrategy.merge(e,r):r,s=i??o;return s instanceof $?this.urlSerializer.serialize(s):s}commitTransition({targetRouterState:e,finalUrl:r,initialUrl:i}){r&&e?(this.currentUrlTree=r,this.rawUrlTree=this.urlHandlingStrategy.merge(r,i),this.routerState=e):this.rawUrlTree=i}routerState=Ln(null);getRouterState(){return this.routerState}stateMemento=this.createStateMemento();updateStateMemento(){this.stateMemento=this.createStateMemento()}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}resetInternalState({finalUrl:e}){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e??this.rawUrlTree)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:()=>d(ko),providedIn:"root"})}return t})(),ko=(()=>{class t extends ei{currentPageId=0;lastSuccessfulId=-1;restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}registerNonRouterCurrentEntryChangeListener(e){return this.location.subscribe(r=>{r.type==="popstate"&&setTimeout(()=>{e(r.url,r.state,"popstate")})})}handleRouterEvent(e,r){e instanceof ee?this.updateStateMemento():e instanceof z?this.commitTransition(r):e instanceof $e?this.urlUpdateStrategy==="eager"&&(r.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof ze?(this.commitTransition(r),this.urlUpdateStrategy==="deferred"&&!r.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof k&&e.code!==b.SupersededByNewNavigation&&e.code!==b.Redirect?this.restoreHistory(r):e instanceof Ce?this.restoreHistory(r,!0):e instanceof D&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,{extras:r,id:i}){let{replaceUrl:o,state:s}=r;if(this.location.isCurrentPathEqualTo(e)||o){let a=this.browserPageId,u=l(l({},s),this.generateNgRouterState(i,a));this.location.replaceState(e,"",u)}else{let a=l(l({},s),this.generateNgRouterState(i,this.browserPageId+1));this.location.go(e,"",a)}}restoreHistory(e,r=!1){if(this.canceledNavigationResolution==="computed"){let i=this.browserPageId,o=this.currentPageId-i;o!==0?this.location.historyGo(o):this.getCurrentUrlTree()===e.finalUrl&&o===0&&(this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(r&&this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,r){return this.canceledNavigationResolution==="computed"?{navigationId:e,\u0275routerPageId:r}:{navigationId:e}}static \u0275fac=(()=>{let e;return function(i){return(e||(e=qt(t)))(i||t)}})();static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Pt(t,n){t.events.pipe(H(e=>e instanceof D||e instanceof k||e instanceof Ce||e instanceof z),v(e=>e instanceof D||e instanceof z?0:(e instanceof k?e.code===b.Redirect||e.code===b.SupersededByNewNavigation:!1)?2:1),H(e=>e!==2),fe(1)).subscribe(()=>{n()})}var $o={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},zo={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},F=(()=>{class t{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=d(Gr);stateManager=d(ei);options=d(te,{optional:!0})||{};pendingTasks=d(xr);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=d(Ut);urlSerializer=d(le);location=d(pe);urlHandlingStrategy=d(Nt);injector=d(oe);_events=new q;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=d(Xn);onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=d(Oe,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!d(Ge,{optional:!0});currentNavigation=this.navigationTransitions.currentNavigation.asReadonly();constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this).subscribe({error:e=>{this.console.warn(e)}}),this.subscribeToNavigationEvents()}eventsSubscription=new wr;subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe(r=>{try{let i=this.navigationTransitions.currentTransition,o=Y(this.navigationTransitions.currentNavigation);if(i!==null&&o!==null){if(this.stateManager.handleRouterEvent(r,o),r instanceof k&&r.code!==b.Redirect&&r.code!==b.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof D)this.navigated=!0;else if(r instanceof be){let s=r.navigationBehaviorOptions,a=this.urlHandlingStrategy.merge(r.url,i.currentRawUrl),u=l({browserUrl:i.extras.browserUrl,info:i.extras.info,skipLocationChange:i.extras.skipLocationChange,replaceUrl:i.extras.replaceUrl||this.urlUpdateStrategy==="eager"||Lo(i.source)},s);this.scheduleNavigation(a,Re,null,u,{resolve:i.resolve,reject:i.reject,promise:i.promise})}}ji(r)&&this._events.next(r)}catch(i){this.navigationTransitions.transitionAbortWithErrorSubject.next(i)}});this.eventsSubscription.add(e)}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),Re,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((e,r,i)=>{this.navigateToSyncWithBrowser(e,i,r)})}navigateToSyncWithBrowser(e,r,i){let o={replaceUrl:!0},s=i?.navigationId?i:null;if(i){let u=l({},i);delete u.navigationId,delete u.\u0275routerPageId,Object.keys(u).length!==0&&(o.state=u)}let a=this.parseUrl(e);this.scheduleNavigation(a,r,s,o).catch(u=>{this.disposed||this.injector.get(tt)(u)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return Y(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(pr),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(e,r={}){let{relativeTo:i,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:u}=r,c=u?this.currentUrlTree.fragment:s,p=null;switch(a??this.options.defaultQueryParamsHandling){case"merge":p=l(l({},this.currentUrlTree.queryParams),o);break;case"preserve":p=this.currentUrlTree.queryParams;break;default:p=o||null}p!==null&&(p=this.removeEmptyProps(p));let y;try{let P=i?i.snapshot:this.routerState.snapshot.root;y=Un(P)}catch{(typeof e[0]!="string"||e[0][0]!=="/")&&(e=[]),y=this.currentUrlTree.root}return Pn(y,e,p,c??null)}navigateByUrl(e,r={skipLocationChange:!1}){let i=X(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(i,this.rawUrlTree);return this.scheduleNavigation(o,Re,null,r)}navigate(e,r={skipLocationChange:!1}){return Fo(e),this.navigateByUrl(this.createUrlTree(e,r),r)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch{return this.urlSerializer.parse("/")}}isActive(e,r){let i;if(r===!0?i=l({},$o):r===!1?i=l({},zo):i=r,X(e))return fn(this.currentUrlTree,e,i);let o=this.parseUrl(e);return fn(this.currentUrlTree,o,i)}removeEmptyProps(e){return Object.entries(e).reduce((r,[i,o])=>(o!=null&&(r[i]=o),r),{})}scheduleNavigation(e,r,i,o,s){if(this.disposed)return Promise.resolve(!1);let a,u,c;s?(a=s.resolve,u=s.reject,c=s.promise):c=new Promise((y,P)=>{a=y,u=P});let p=this.pendingTasks.add();return Pt(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(p))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:i,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,resolve:a,reject:u,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),c.catch(y=>Promise.reject(y))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Fo(t){for(let n=0;n<t.length;n++)if(t[n]==null)throw new C(4008,!1)}var _t=(()=>{class t{router;route;tabIndexAttribute;renderer;el;locationStrategy;reactiveHref=rt(null);get href(){return Y(this.reactiveHref)}set href(e){this.reactiveHref.set(e)}target;queryParams;fragment;queryParamsHandling;state;info;relativeTo;isAnchorElement;subscription;onChanges=new q;applicationErrorHandler=d(tt);options=d(te,{optional:!0});constructor(e,r,i,o,s,a){this.router=e,this.route=r,this.tabIndexAttribute=i,this.renderer=o,this.el=s,this.locationStrategy=a,this.reactiveHref.set(d(new on("href"),{optional:!0}));let u=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement=u==="a"||u==="area"||!!(typeof customElements=="object"&&customElements.get(u)?.observedAttributes?.includes?.("href")),this.isAnchorElement?this.setTabIndexIfNotOnNativeEl("0"):this.subscribeToNavigationEventsIfNecessary()}subscribeToNavigationEventsIfNecessary(){if(this.subscription!==void 0||!this.isAnchorElement)return;let e=this.preserveFragment,r=i=>i==="merge"||i==="preserve";e||=r(this.queryParamsHandling),e||=!this.queryParamsHandling&&!r(this.options?.defaultQueryParamsHandling),e&&(this.subscription=this.router.events.subscribe(i=>{i instanceof D&&this.updateHref()}))}preserveFragment=!1;skipLocationChange=!1;replaceUrl=!1;setTabIndexIfNotOnNativeEl(e){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.isAnchorElement&&(this.updateHref(),this.subscribeToNavigationEventsIfNecessary()),this.onChanges.next(this)}routerLinkInput=null;set routerLink(e){e==null?(this.routerLinkInput=null,this.setTabIndexIfNotOnNativeEl(null)):(X(e)?this.routerLinkInput=e:this.routerLinkInput=Array.isArray(e)?e:[e],this.setTabIndexIfNotOnNativeEl("0"))}onClick(e,r,i,o,s){let a=this.urlTree;if(a===null||this.isAnchorElement&&(e!==0||r||i||o||s||typeof this.target=="string"&&this.target!="_self"))return!0;let u={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(a,u)?.catch(c=>{this.applicationErrorHandler(c)}),!this.isAnchorElement}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){let e=this.urlTree;this.reactiveHref.set(e!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(e))??"":null)}applyAttributeValue(e,r){let i=this.renderer,o=this.el.nativeElement;r!==null?i.setAttribute(o,e,r):i.removeAttribute(o,e)}get urlTree(){return this.routerLinkInput===null?null:X(this.routerLinkInput)?this.routerLinkInput:this.router.createUrlTree(this.routerLinkInput,{relativeTo:this.relativeTo!==void 0?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}static \u0275fac=function(r){return new(r||t)(x(F),x(V),Lr("tabindex"),x(Ht),x(Bt),x(Pe))};static \u0275dir=Ue({type:t,selectors:[["","routerLink",""]],hostVars:2,hostBindings:function(r,i){r&1&&Xr("click",function(s){return i.onClick(s.button,s.ctrlKey,s.shiftKey,s.altKey,s.metaKey)}),r&2&&Zr("href",i.reactiveHref(),kr)("target",i.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",ot],skipLocationChange:[2,"skipLocationChange","skipLocationChange",ot],replaceUrl:[2,"replaceUrl","replaceUrl",ot],routerLink:"routerLink"},features:[Ne]})}return t})(),qo=(()=>{class t{router;element;renderer;cdr;link;links;classes=[];routerEventsSubscription;linkInputChangesSubscription;_isActive=!1;get isActive(){return this._isActive}routerLinkActiveOptions={exact:!1};ariaCurrentWhenActive;isActiveChange=new se;constructor(e,r,i,o,s){this.router=e,this.element=r,this.renderer=i,this.cdr=o,this.link=s,this.routerEventsSubscription=e.events.subscribe(a=>{a instanceof D&&this.update()})}ngAfterContentInit(){h(this.links.changes,h(null)).pipe(De()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();let e=[...this.links.toArray(),this.link].filter(r=>!!r).map(r=>r.onChanges);this.linkInputChangesSubscription=w(e).pipe(De()).subscribe(r=>{this._isActive!==this.isLinkActive(this.router)(r)&&this.update()})}set routerLinkActive(e){let r=Array.isArray(e)?e:e.split(" ");this.classes=r.filter(i=>!!i)}ngOnChanges(e){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||queueMicrotask(()=>{let e=this.hasActiveLinks();this.classes.forEach(r=>{e?this.renderer.addClass(this.element.nativeElement,r):this.renderer.removeClass(this.element.nativeElement,r)}),e&&this.ariaCurrentWhenActive!==void 0?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this._isActive!==e&&(this._isActive=e,this.cdr.markForCheck(),this.isActiveChange.emit(e))})}isLinkActive(e){let r=Bo(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return i=>{let o=i.urlTree;return o?e.isActive(o,r):!1}}hasActiveLinks(){let e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.links.some(e)}static \u0275fac=function(r){return new(r||t)(x(F),x(Bt),x(Ht),x(it),x(_t,8))};static \u0275dir=Ue({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(r,i,o){if(r&1&&en(o,_t,5),r&2){let s;tn(s=rn())&&(i.links=s)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],features:[Ne]})}return t})();function Bo(t){return!!t.paths}var Ke=class{};var ti=(()=>{class t{router;injector;preloadingStrategy;loader;subscription;constructor(e,r,i,o){this.router=e,this.injector=r,this.preloadingStrategy=i,this.loader=o}setUpPreloading(){this.subscription=this.router.events.pipe(H(e=>e instanceof D),ie(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,r){let i=[];for(let o of r){o.providers&&!o._injector&&(o._injector=nt(o.providers,e,`Route: ${o.path}`));let s=o._injector??e,a=o._loadedInjector??s;(o.loadChildren&&!o._loadedRoutes&&o.canLoad===void 0||o.loadComponent&&!o._loadedComponent)&&i.push(this.preloadConfig(s,o)),(o.children||o._loadedRoutes)&&i.push(this.processRoutes(a,o.children??o._loadedRoutes))}return w(i).pipe(De())}preloadConfig(e,r){return this.preloadingStrategy.preload(r,()=>{let i;r.loadChildren&&r.canLoad===void 0?i=this.loader.loadChildren(e,r):i=h(null);let o=i.pipe(I(s=>s===null?h(void 0):(r._loadedRoutes=s.routes,r._loadedInjector=s.injector,this.processRoutes(s.injector??e,s.routes))));if(r.loadComponent&&!r._loadedComponent){let s=this.loader.loadComponent(e,r);return w([o,s]).pipe(De())}else return o})}static \u0275fac=function(r){return new(r||t)(K(F),K(oe),K(Ke),K(Dt))};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),ri=new T(""),Ho=(()=>{class t{urlSerializer;transitions;viewportScroller;zone;options;routerEventsSubscription;scrollEventsSubscription;lastId=0;lastSource=Re;restoredId=0;store={};constructor(e,r,i,o,s={}){this.urlSerializer=e,this.transitions=r,this.viewportScroller=i,this.zone=o,this.options=s,s.scrollPositionRestoration||="disabled",s.anchorScrolling||="disabled"}init(){this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof ee?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof D?(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment)):e instanceof z&&e.code===Se.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof we&&(e.position?this.options.scrollPositionRestoration==="top"?this.viewportScroller.scrollToPosition([0,0]):this.options.scrollPositionRestoration==="enabled"&&this.viewportScroller.scrollToPosition(e.position):e.anchor&&this.options.anchorScrolling==="enabled"?this.viewportScroller.scrollToAnchor(e.anchor):this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(e,r){this.zone.runOutsideAngular(()=>Cr(this,null,function*(){yield new Promise(i=>{setTimeout(i),typeof requestAnimationFrame<"u"&&requestAnimationFrame(i)}),this.zone.run(()=>{this.transitions.events.next(new we(e,this.lastSource==="popstate"?this.store[this.restoredId]:null,r))})}))}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static \u0275fac=function(r){$r()};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})();function Vo(t){return t.routerState.root}function Ye(t,n){return{\u0275kind:t,\u0275providers:n}}function Wo(){let t=d(Ft);return n=>{let e=t.get(Yr);if(n!==e.components[0])return;let r=t.get(F),i=t.get(ni);t.get(Sr)===1&&r.initialNavigation(),t.get(si,null,{optional:!0})?.setUpPreloading(),t.get(ri,null,{optional:!0})?.init(),r.resetRootComponentType(e.componentTypes[0]),i.closed||(i.next(),i.complete(),i.unsubscribe())}}var ni=new T("",{factory:()=>new q}),Sr=new T("",{providedIn:"root",factory:()=>1});function ii(){let t=[{provide:jr,useValue:!0},{provide:Sr,useValue:0},Vt(()=>{let n=d(Ft);return n.get(un,Promise.resolve()).then(()=>new Promise(r=>{let i=n.get(F),o=n.get(ni);Pt(i,()=>{r(!0)}),n.get(Ut).afterPreactivation=()=>(r(!0),o.closed?h(void 0):o),i.initialNavigation()}))})];return Ye(2,t)}function oi(){let t=[Vt(()=>{d(F).setUpLocationChangeListener()}),{provide:Sr,useValue:2}];return Ye(3,t)}var si=new T("");function ai(t){return Ye(0,[{provide:si,useExisting:ti},{provide:Ke,useExisting:t}])}function ui(){return Ye(8,[dr,{provide:Ge,useExisting:dr}])}function ci(t){Fr("NgRouterViewTransitions");let n=[{provide:vr,useValue:Jn},{provide:mr,useValue:l({skipNextTransition:!!t?.skipInitialTransition},t)}];return Ye(9,n)}var li=[pe,{provide:le,useClass:J},F,he,{provide:V,useFactory:Vo,deps:[F]},Dt,[]],Go=(()=>{class t{constructor(){}static forRoot(e,r){return{ngModule:t,providers:[li,[],{provide:Oe,multi:!0,useValue:e},[],r?.errorHandler?{provide:Rr,useValue:r.errorHandler}:[],{provide:te,useValue:r||{}},r?.useHash?Ko():Yo(),Qo(),r?.preloadingStrategy?ai(r.preloadingStrategy).\u0275providers:[],r?.initialNavigation?Zo(r):[],r?.bindToComponentInputs?ui().\u0275providers:[],r?.enableViewTransitions?ci().\u0275providers:[],Jo()]}}static forChild(e){return{ngModule:t,providers:[{provide:Oe,multi:!0,useValue:e}]}}static \u0275fac=function(r){return new(r||t)};static \u0275mod=Hr({type:t});static \u0275inj=Nr({})}return t})();function Qo(){return{provide:ri,useFactory:()=>{let t=d(hn),n=d(Vr),e=d(te),r=d(Ut),i=d(le);return e.scrollOffset&&t.setOffset(e.scrollOffset),new Ho(i,r,t,n,e)}}}function Ko(){return{provide:Pe,useClass:ln}}function Yo(){return{provide:Pe,useClass:cn}}function Zo(t){return[t.initialNavigation==="disabled"?oi().\u0275providers:[],t.initialNavigation==="enabledBlocking"?ii().\u0275providers:[]]}var yr=new T("");function Jo(){return[{provide:yr,useFactory:Wo},{provide:Kr,multi:!0,useExisting:yr}]}export{D as a,V as b,hr as c,F as d,_t as e,qo as f,Go as g};
@@ -1 +0,0 @@
1
- import{a as s}from"./chunk-5DLJ5232.js";import"./chunk-XV3GV4GK.js";import"./chunk-YQ4ML5HX.js";import"./chunk-YIC5UWBJ.js";import"./chunk-AJTGODYF.js";import"./chunk-4HV5VBUX.js";import"./chunk-45O7A76J.js";import"./chunk-Z2RK3DTY.js";import{g as i}from"./chunk-72ATQTM5.js";import"./chunk-OROL2MAP.js";import"./chunk-FGRA3MLA.js";import"./chunk-3GLEK5PO.js";import"./chunk-JQ3FUL2I.js";import{ga as e,pb as t}from"./chunk-VT4775CA.js";var u=[{path:"",loadComponent:()=>import("./chunk-RN4HC5ZG.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 +0,0 @@
1
- import{a as le}from"./chunk-6YLT7NDE.js";import{a as se}from"./chunk-CWBLLOU5.js";import{g as Q,m as k,n as ae}from"./chunk-AJTGODYF.js";import{B as A,C as G,b as q,c as F,d as g,e as V,f as z,g as N,j as S,m as R,p as O,q as L,r as J,z as re}from"./chunk-4HV5VBUX.js";import{b as H}from"./chunk-Z2RK3DTY.js";import{b as oe}from"./chunk-72ATQTM5.js";import{a as xe}from"./chunk-OROL2MAP.js";import{k as B,m as M}from"./chunk-FGRA3MLA.js";import{a as T,b as E}from"./chunk-3GLEK5PO.js";import"./chunk-JQ3FUL2I.js";import{Hc as D,Ic as te,Jb as u,Mb as w,Nb as h,Nc as a,Oc as o,Pb as X,Pc as ie,Qb as Y,Rb as Z,Sb as b,Tb as i,Ub as t,Vb as p,_c as ne,cb as e,cc as I,fc as f,g as ve,h as W,hc as _,ka as c,md as j,ob as y,qa as $,ra as U,uc as m,vc as d,wc as x,xc as ee}from"./chunk-VT4775CA.js";function Ce(r,C){r&1&&(i(0,"ngb-alert",13)(1,"p",20),m(2),a(3,"translate"),t()()),r&2&&(b("dismissible",!1),e(2),d(o(3,2,"login.invalid_password")))}var me=(()=>{class r{$activeModal=c(k);$api=c(M);$toastr=c(B);$translate=c(T);invalidCredentials=!1;formGroup=new N({password:new S("",[g.required])});disable2fa(){this.invalidCredentials=!1,this.$api.post("/users/otp/deactivate",this.formGroup.value).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.setup_2fa_disable_success"),this.$translate.instant("toast.title_success"))},error:()=>{this.formGroup.setValue({password:""}),this.invalidCredentials=!0}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],decls:34,vars:27,consts:[[1,"modal-content",2,"min-height","300px"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-key","primary-text",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["type","password","autocomplete","current-password",1,"form-control","custom-input",3,"formControl","placeholder"],["type","error",1,"mt-3","mb-0",3,"dismissible"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"click","disabled"],[1,"mb-0"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"div",1)(2,"h5",2),m(3),a(4,"translate"),t(),i(5,"button",3),a(6,"translate"),f("click",function(){return l.dismissModal()}),t()(),i(7,"div",4)(8,"div",5),p(9,"i",6),t(),i(10,"ul",7)(11,"li"),m(12),a(13,"translate"),t()(),i(14,"ul",8)(15,"li",9)(16,"label",10),m(17),a(18,"translate"),t(),i(19,"div",11),p(20,"input",12),a(21,"translate"),t()()(),w(22,Ce,4,4,"ngb-alert",13),t(),i(23,"div",14)(24,"div",15)(25,"button",16),a(26,"translate"),f("click",function(){return l.dismissModal()}),m(27),a(28,"translate"),t()(),p(29,"div",17),i(30,"div",18)(31,"button",19),f("click",function(){return l.disable2fa()}),m(32),a(33,"translate"),t()()()()),s&2&&(e(3),d(o(4,11,"users.setup_2fa_disable")),e(2),u("aria-label",o(6,13,"form.button_close")),e(7),d(o(13,15,"users.setup_2fa_disable_current_password")),e(5),d(o(18,17,"users.label_password")),e(3),b("formControl",l.formGroup.controls.password)("placeholder",o(21,19,"users.label_password")),e(2),h(l.invalidCredentials&&!l.formGroup.controls.password.value?22:-1),e(3),u("aria-label",o(26,21,"form.button_close")),e(2),x(" ",o(28,23,"form.button_close")," "),e(4),b("disabled",l.formGroup.invalid),e(),x(" ",o(33,25,"form.button_disable")," "))},dependencies:[A,F,V,G,O,Q,E],encapsulation:2})}return r})();var pe=ve(xe(),1);var we=r=>({timeDiffError:r});function he(r,C){r&1&&(i(0,"li"),m(1),a(2,"translate"),t()),r&2&&(e(),d(o(2,1,"users.setup_2fa_scan_qr_code")))}function ge(r,C){if(r&1&&(i(0,"ngb-alert",8)(1,"p",16),m(2),a(3,"translate"),t(),i(4,"p",17),m(5),a(6,"translate"),t()()),r&2){let n=_();b("dismissible",!1),e(2),d(o(3,3,"users.setup_2fa_cannot_setup_2fa")),e(3),d(ie(6,5,"users.setup_2fa_server_time_out",D(8,we,n.timeDiffError)))}}function Se(r,C){r&1&&p(0,"i",27)}function ye(r,C){r&1&&p(0,"i",28)}function Ee(r,C){if(r&1){let n=I();i(0,"div",21),m(1),a(2,"translate"),p(3,"br"),m(4),i(5,"a",26),f("click",function(){$(n);let l=_(2);return U(l.copySecretToClipboard())}),w(6,Se,1,0,"i",27)(7,ye,1,0,"i",28),t()()}if(r&2){let n=_(2);e(),x(" ",o(2,3,"users.setup_2fa_scan_qr_manual")),e(3),x(" ",n.otpSecret," "),e(2),h(n.secretCopied?6:7)}}function $e(r,C){if(r&1&&(i(0,"ul",9)(1,"li",18)(2,"div",19),p(3,"app-qrcode",20),t(),w(4,Ee,8,5,"div",21),t(),i(5,"li",22)(6,"label",23),m(7),a(8,"translate"),t(),i(9,"div",24),p(10,"input",25),t()()()),r&2){let n=_();e(3),b("data",n.otpString),e(),h(n.otpSecret?4:-1),e(3),d(o(8,4,"users.setup_2fa_enter_code")),e(3),b("formControl",n.formGroup.controls.code)}}function Ue(r,C){if(r&1){let n=I();i(0,"button",29),a(1,"translate"),f("click",function(){$(n);let l=_();return U(l.dismissModal())}),m(2),a(3,"translate"),t()}r&2&&(u("aria-label",o(1,2,"form.button_close")),e(2),x(" ",o(3,4,"form.button_close")," "))}function ke(r,C){if(r&1){let n=I();i(0,"button",29),a(1,"translate"),f("click",function(){$(n);let l=_();return U(l.dismissModal())}),m(2),a(3,"translate"),t()}r&2&&(u("aria-label",o(1,2,"form.button_close")),e(2),x(" ",o(3,4,"form.button_close")," "))}function Te(r,C){if(r&1){let n=I();i(0,"button",30),f("click",function(){$(n);let l=_();return U(l.enable2fa())}),m(1),a(2,"translate"),t()}if(r&2){let n=_();b("disabled",n.formGroup.invalid),e(),x(" ",o(2,2,"form.button_enable")," ")}}var de=(()=>{class r{$activeModal=c(k);$api=c(M);$toastr=c(B);$translate=c(T);copyTimeout=null;user;timeDiffError=null;otpString;otpSecret;secretCopied=!1;formGroup=new N({code:new S("",[g.required,g.minLength(6),g.maxLength(6)])});ngOnInit(){this.$api.post("/users/otp/setup",{}).subscribe({next:n=>{this.checkTimeDiff(n.timestamp),this.timeDiffError||(this.otpString=n.otpauth,this.otpSecret=new URL(this.otpString).searchParams.get("secret")||"")},error:n=>{this.$activeModal.dismiss(),console.error(n),this.$toastr.error(this.$translate.instant("users.setup_2fa_enable_error"),this.$translate.instant("toast.title_error"))}})}enable2fa(){this.$api.post("/users/otp/activate",this.formGroup.value).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("users.setup_2fa_enabled_success"),this.$translate.instant("toast.title_success")),this.$activeModal.close()},error:n=>{console.error(n),this.$toastr.error(this.$translate.instant("users.setup_2fa_activate_error"),this.$translate.instant("toast.title_error"))}})}copySecretToClipboard(){return W(this,null,function*(){yield navigator.clipboard.writeText(this.otpSecret),this.secretCopied=!0,this.copyTimeout&&clearTimeout(this.copyTimeout),this.copyTimeout=setTimeout(()=>{this.secretCopied=!1},3e3)})}dismissModal(){this.$activeModal.dismiss("Dismiss")}checkTimeDiff(n){let s=(0,pe.default)(n).diff(new Date,"millisecond");s<-5e3||s>5e3?this.timeDiffError=s:this.timeDiffError=null}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],inputs:{user:"user"},decls:24,vars:15,consts:[[1,"modal-content","setup2fa"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-key","primary-text",2,"font-size","75px"],[1,"mb-3"],["type","error",1,"mb-0",3,"dismissible"],[1,"list-group","list-group-box","mb-0"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"disabled"],[1,"fw-bold","mb-1"],[1,"mb-0"],[1,"list-group-item","text-center"],[1,"text-center","w-100","d-flex","justify-content-center","my-2"],[1,"mx-auto",2,"width","175px","height","175px",3,"data"],[1,"grey-text","small","mt-0","mb-1"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["type","text","placeholder","eg. 123456","autocomplete","one-time-code","autocapitalize","none","inputmode","numeric","pattern","[0-9]*",1,"form-control","custom-input",3,"formControl"],["href","javascript:void(0)",1,"ms-1","text-primary",3,"click"],[1,"fas","fa-check","green-text"],[1,"fas","fa-copy"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"div",1)(2,"h5",2),m(3),a(4,"translate"),t(),i(5,"button",3),a(6,"translate"),f("click",function(){return l.dismissModal()}),t()(),i(7,"div",4)(8,"div",5),p(9,"i",6),t(),i(10,"ul",7)(11,"li"),m(12),a(13,"translate"),t(),w(14,he,3,3,"li"),t(),w(15,ge,7,10,"ngb-alert",8),w(16,$e,11,6,"ul",9),t(),i(17,"div",10)(18,"div",11),w(19,Ue,4,6,"button",12),t(),i(20,"div",13),w(21,ke,4,6,"button",12),t(),i(22,"div",14),w(23,Te,3,4,"button",15),t()()()),s&2&&(e(3),d(o(4,9,"users.setup_2fa")),e(2),u("aria-label",o(6,11,"form.button_close")),e(7),d(o(13,13,"users.setup_2fa_warning")),e(2),h(l.timeDiffError?-1:14),e(),h(l.timeDiffError?15:-1),e(),h(l.timeDiffError?-1:16),e(3),h(l.timeDiffError?-1:19),e(2),h(l.timeDiffError?21:-1),e(2),h(l.timeDiffError?-1:23))},dependencies:[Q,se,A,F,V,re,G,O,E],encapsulation:2})}return r})();var ce=r=>({"is-invalid":r}),ue=(()=>{class r{$activeModal=c(k);$api=c(M);$toastr=c(B);$translate=c(T);form=new N({username:new S("",[g.required]),name:new S("",[g.required]),password:new S("",[g.compose([g.required,g.minLength(4)])]),passwordConfirm:new S("",[g.required]),admin:new S(!0)},this.matchPassword);onSubmit({value:n}){this.$api.post("/users",n).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.toast_added_new_user"),this.$translate.instant("toast.title_success"))},error:s=>{this.$toastr.error(s.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}matchPassword(n){let s=n.get("password").value,l=n.get("passwordConfirm").value;if(s!==l)n.get("passwordConfirm").setErrors({matchPassword:!0});else return null}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],decls:58,vars:50,consts:[[1,"modal-content"],["novalidate","",3,"ngSubmit","formGroup"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-user-plus","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-username",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["formControlName","username","type","text","id","form-username","autocomplete","username","autocapitalize","none",1,"form-control","custom-input"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","name","type","text","id","form-name","autocomplete","name",1,"form-control","custom-input"],["for","form-pass",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","password","type","password","autocomplete","new-password","id","form-pass",1,"form-control","custom-input",3,"ngClass"],["for","form-pass-confirm",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","passwordConfirm","type","password","autocomplete","new-password","id","form-pass-confirm",1,"form-control","custom-input",3,"ngClass"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],[1,"text-start"],[1,"text-end","grey-text","d-flex","align-items-center"],["formControlName","admin","type","checkbox","id","isAdmin",1,"rendux-input"],["for","isAdmin",1,"rendux-label","ms-3"],[1,"modal-footer","justify-content-between"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"form",1),f("ngSubmit",function(){return l.onSubmit(l.form)}),i(2,"div",2)(3,"h5",3),m(4),a(5,"translate"),t(),i(6,"button",4),a(7,"translate"),f("click",function(){return l.dismissModal()}),t()(),i(8,"div",5)(9,"div",6),p(10,"i",7),t(),i(11,"ul",8)(12,"li",9)(13,"label",10),m(14),a(15,"translate"),t(),i(16,"div",11),p(17,"input",12),a(18,"translate"),t()(),i(19,"li",9)(20,"label",13),m(21),a(22,"translate"),t(),i(23,"div",11),p(24,"input",14),a(25,"translate"),t()(),i(26,"li",9)(27,"label",15),m(28),a(29,"translate"),t(),i(30,"div",11),p(31,"input",16),a(32,"translate"),t()(),i(33,"li",9)(34,"label",17),m(35),a(36,"translate"),t(),i(37,"div",11),p(38,"input",18),a(39,"translate"),t()(),i(40,"li",19)(41,"span",20),m(42),a(43,"translate"),t(),i(44,"div",21),p(45,"input",22),a(46,"translate"),p(47,"label",23),t()()()(),i(48,"div",24)(49,"div",20)(50,"button",25),f("click",function(){return l.dismissModal()}),m(51),a(52,"translate"),t()(),p(53,"div",26),i(54,"div",27)(55,"button",28),m(56),a(57,"translate"),t()()()()()),s&2&&(e(),b("formGroup",l.form),e(3),d(o(5,18,"users.title_add_user")),e(2),u("aria-label",o(7,20,"form.button_close")),e(8),d(o(15,22,"users.label_username")),e(3),u("aria-label",o(18,24,"users.label_username")),e(4),d(o(22,26,"users.label_full_name")),e(3),u("aria-label",o(25,28,"users.label_full_name")),e(4),d(o(29,30,"users.label_password")),e(3),b("ngClass",D(46,ce,l.form.controls.password.dirty&&l.form.controls.password.errors)),u("aria-label",o(32,32,"users.label_password")),e(4),d(o(36,34,"users.label_confirm_password")),e(3),b("ngClass",D(48,ce,l.form.controls.passwordConfirm.dirty&&l.form.controls.passwordConfirm.errors)),u("aria-label",o(39,36,"users.label_confirm_password")),e(4),d(o(43,38,"users.label_admin_user")),e(3),u("aria-label",o(46,40,"users.label_admin_user")),e(6),x(" ",o(52,42,"form.button_close")," "),e(4),b("disabled",!l.form.valid),e(),x(" ",o(57,44,"form.button_save")," "))},dependencies:[A,R,F,q,V,z,G,L,J,j,E],encapsulation:2})}return r})();var fe=r=>({"is-invalid":r});function Be(r,C){if(r&1&&(i(0,"li",9)(1,"label",27),m(2),a(3,"translate"),t(),i(4,"div",11),p(5,"input",28),a(6,"translate"),t()()),r&2){let n=_();e(2),d(o(3,3,"users.label_confirm_password")),e(3),b("ngClass",D(7,fe,n.form.controls.passwordConfirm.dirty&&n.form.controls.passwordConfirm.errors)),u("aria-label",o(6,5,"users.label_confirm_password"))}}var be=(()=>{class r{$activeModal=c(k);$api=c(M);$auth=c(H);$cdr=c(ne);$toastr=c(B);$translate=c(T);initialFormValue={};user;isCurrentUser=!1;form=new N({username:new S("",[g.required]),name:new S("",[g.required]),password:new S(""),passwordConfirm:new S(""),admin:new S(!0)},this.matchPassword);ngOnInit(){this.isCurrentUser=this.$auth.user.username===this.user.username,this.form.patchValue(this.user),this.initialFormValue=this.form.getRawValue(),this.form.valueChanges.subscribe(()=>this.$cdr.detectChanges())}onSubmit({value:n}){this.$api.patch(`/users/${this.user.id}`,n).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.toast_updated_user"),this.$translate.instant("toast.title_success")),this.isCurrentUser&&n.username!==this.$auth.user.username&&this.$auth.logout()},error:s=>{console.error(s),this.$toastr.error(s.error?.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}isFormUnchanged(){return this.form.controls.password.value?!1:JSON.stringify(this.form.getRawValue())===JSON.stringify(this.initialFormValue)}dismissModal(){this.$activeModal.dismiss("Dismiss")}matchPassword(n){let s=n.get("password").value,l=n.get("passwordConfirm").value;if(s!==l)n.get("passwordConfirm").setErrors({matchPassword:!0});else return null}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],inputs:{user:"user"},decls:52,vars:42,consts:[[1,"modal-content"],["novalidate","",3,"ngSubmit","formGroup"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-user-pen","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-username",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["formControlName","username","type","text","id","form-username","autocomplete","off","autocapitalize","none",1,"form-control","custom-input"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","name","type","text","id","form-name","autocomplete","name",1,"form-control","custom-input"],["for","form-pass",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","password","type","password","autocomplete","new-password","id","form-pass",1,"form-control","custom-input",3,"ngClass"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],[1,"text-start"],[1,"text-end","grey-text","d-flex","align-items-center"],["type","checkbox","formControlName","admin","id","isAdmin",1,"rendux-input"],["for","isAdmin",1,"rendux-label","ms-3"],[1,"modal-footer","justify-content-between"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","submit",1,"btn","btn-primary",3,"disabled"],["for","form-pass-confirm",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","passwordConfirm","type","password","autocomplete","new-password","id","form-pass-confirm",1,"form-control","custom-input",3,"ngClass"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"form",1),f("ngSubmit",function(){return l.onSubmit(l.form)}),i(2,"div",2)(3,"h5",3),m(4),a(5,"translate"),t(),i(6,"button",4),a(7,"translate"),f("click",function(){return l.dismissModal()}),t()(),i(8,"div",5)(9,"div",6),p(10,"i",7),t(),i(11,"ul",8)(12,"li",9)(13,"label",10),m(14),a(15,"translate"),t(),i(16,"div",11),p(17,"input",12),a(18,"translate"),t()(),i(19,"li",9)(20,"label",13),m(21),a(22,"translate"),t(),i(23,"div",11),p(24,"input",14),a(25,"translate"),t()(),i(26,"li",9)(27,"label",15),m(28),a(29,"translate"),t(),i(30,"div",11),p(31,"input",16),a(32,"translate"),t()(),w(33,Be,7,9,"li",9),i(34,"li",17)(35,"span",18),m(36),a(37,"translate"),t(),i(38,"div",19),p(39,"input",20),a(40,"translate"),p(41,"label",21),t()()()(),i(42,"div",22)(43,"div",18)(44,"button",23),f("click",function(){return l.dismissModal()}),m(45),a(46,"translate"),t()(),p(47,"div",24),i(48,"div",25)(49,"button",26),m(50),a(51,"translate"),t()()()()()),s&2&&(e(),b("formGroup",l.form),e(3),d(o(5,16,"users.title_edit_user")),e(2),u("aria-label",o(7,18,"form.button_close")),e(8),d(o(15,20,"users.label_username")),e(3),u("aria-label",o(18,22,"users.label_username")),e(4),d(o(22,24,"users.label_full_name")),e(3),u("aria-label",o(25,26,"users.label_full_name")),e(4),d(o(29,28,"users.label_new_password")),e(3),b("ngClass",D(40,fe,l.form.controls.password.dirty&&l.form.controls.password.errors)),u("aria-label",o(32,30,"users.label_new_password")),e(2),h(l.form.controls.password.value?33:-1),e(3),d(o(37,32,"users.label_admin_user")),e(3),u("aria-label",o(40,34,"users.label_admin_user")),e(6),x(" ",o(46,36,"form.button_close")," "),e(4),b("disabled",!l.form.valid||l.isFormUnchanged()),e(),x(" ",o(51,38,"form.button_save")," "))},dependencies:[A,R,F,q,V,z,G,L,J,j,E],encapsulation:2})}return r})();var _e=(()=>{class r{$activeModal=c(k);dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],decls:46,vars:36,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fa","fa-question-circle-o","primary-text",2,"font-size","75px"],[1,"ms-2"],[1,"mb-0"],[1,"mb-2","grey-text"],[1,"modal-footer","justify-content-between"],[1,"text-start"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-end"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"form")(2,"div",1)(3,"h5",2),m(4),a(5,"translate"),t(),i(6,"button",3),a(7,"translate"),f("click",function(){return l.dismissModal()}),t()(),i(8,"div",4)(9,"div",5),p(10,"i",6),t(),i(11,"h5",7),m(12),a(13,"translate"),t(),i(14,"ul",8)(15,"li"),m(16),a(17,"translate"),t(),i(18,"ul",9)(19,"li"),m(20),a(21,"translate"),t(),i(22,"li"),m(23),a(24,"translate"),t(),i(25,"li"),m(26),a(27,"translate"),a(28,"translate"),t(),i(29,"li"),m(30),a(31,"translate"),t(),i(32,"li"),m(33),a(34,"translate"),t()(),i(35,"li"),m(36),a(37,"translate"),t()(),p(38,"app-support-banner"),t(),i(39,"div",10),p(40,"div",11),i(41,"div",12)(42,"button",13),f("click",function(){return l.dismissModal()}),m(43),a(44,"translate"),t()(),p(45,"div",14),t()()()),s&2&&(e(4),d(o(5,12,"support.title")),e(2),u("aria-label",o(7,14,"form.button_close")),e(6),d(o(13,16,"users.title_users")),e(4),d(o(17,18,"users.support.acc_1")),e(4),d(o(21,20,"menu.label_status")),e(3),d(o(24,22,"menu.label_plugins")),e(3),ee("",o(27,24,"menu.label_accessories")," (",o(28,26,"users.support.control"),")"),e(4),d(o(31,28,"menu.linux.label_logs")),e(3),d(o(34,30,"support.title")),e(3),d(o(37,32,"users.support.acc_2")),e(7),x(" ",o(44,34,"form.button_close")," "))},dependencies:[le,E],encapsulation:2})}return r})();var Me=(r,C)=>({"fa-user-secret":r,"fa-user":C});function Ie(r,C){if(r&1){let n=I();i(0,"button",23),f("click",function(){$(n);let l=_(2).$implicit,v=_();return U(v.disable2fa(l))}),m(1),a(2,"translate"),t()}if(r&2){let n=_(2).$implicit,s=_();b("disabled",n.username!==s.username),e(),x(" ",o(2,2,"users.setup_2fa_disable")," ")}}function De(r,C){if(r&1){let n=I();i(0,"button",24),f("click",function(){$(n);let l=_(2).$implicit,v=_();return U(v.setup2fa(l))}),m(1),a(2,"translate"),t()}if(r&2){let n=_(2).$implicit,s=_();b("disabled",n.username!==s.username),e(),x(" ",o(2,2,"users.setup_2fa")," ")}}function Fe(r,C){if(r&1&&w(0,Ie,3,4,"button",21)(1,De,3,4,"button",22),r&2){let n=_().$implicit;h(n.otpActive?0:1)}}function Ve(r,C){r&1&&p(0,"div")}function Ne(r,C){if(r&1){let n=I();i(0,"div",9)(1,"div",10)(2,"div",11)(3,"div",12)(4,"span",13)(5,"h4"),m(6),t(),i(7,"h5",14),p(8,"i",15),m(9),t()()(),i(10,"div",16),w(11,Fe,2,1)(12,Ve,1,0,"div"),i(13,"div")(14,"button",17),a(15,"translate"),f("click",function(){let l=$(n).$implicit,v=_();return U(v.openEditUser(l))}),p(16,"i",18),t(),i(17,"button",19),a(18,"translate"),f("click",function(){let l=$(n).$implicit,v=_();return U(v.deleteUser(l.id))}),p(19,"i",20),t()()()()()()}if(r&2){let n=C.$implicit,s=_();e(6),d(n.name),e(2),b("ngClass",te(11,Me,n.admin,!n.admin)),e(),x(" ",n.username," "),e(2),h(n.admin?11:12),e(3),u("aria-label",o(15,7,"form.button_edit")),e(3),b("disabled",s.username===n.username),u("aria-label",o(18,9,"form.button_delete"))}}var zt=(()=>{class r{$api=c(M);$auth=c(H);$modal=c(ae);$route=c(oe);$toastr=c(B);$translate=c(T);homebridgeUsers=[];username=this.$auth.user.username;isAdmin=this.$auth.user.admin;ngOnInit(){this.$route.data.subscribe(n=>{this.homebridgeUsers=n.homebridgeUsers})}reloadUsers(){return this.$api.get("/users").subscribe(n=>{this.homebridgeUsers=n})}openAddNewUser(){this.$modal.open(ue,{size:"lg",backdrop:"static"}).result.finally(()=>{this.reloadUsers()})}openEditUser(n){let s=this.$modal.open(be,{size:"lg",backdrop:"static"});s.componentInstance.user=n,s.result.finally(()=>{this.reloadUsers()})}deleteUser(n){this.$api.delete(`/users/${n}`).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("users.toast_user_deleted"),this.$translate.instant("toast.title_success")),this.reloadUsers()},error:s=>{console.error(s),this.$toastr.error(s.error?.message||this.$translate.instant("users.toast_failed_to_delete_user"),this.$translate.instant("toast.title_error"))}})}setup2fa(n){let s=this.$modal.open(de,{size:"lg",backdrop:"static"});s.componentInstance.user=n,s.result.finally(()=>{this.reloadUsers()})}disable2fa(n){let s=this.$modal.open(me,{size:"lg",backdrop:"static"});s.componentInstance.user=n,s.result.finally(()=>{this.reloadUsers()})}openSupport(){this.$modal.open(_e,{size:"lg",backdrop:"static"})}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["app-users"]],decls:15,vars:9,consts:[[1,"row","mb-3"],[1,"col-6"],[1,"primary-text","m-0"],[1,"col-6","text-end"],[1,"btn","btn-elegant","waves-effect","m-0","me-2",3,"click"],[1,"fas","fa-user-plus"],["type","button",1,"btn","btn-elegant","my-0","me-0",3,"click"],[1,"fa","fa-question-circle-o"],[1,"row"],[1,"col-md-6","mb-4"],[1,"card","card-body"],[1,"d-flex","flex-column"],[1,"d-flex","flex-row","mb-3"],[1,"me-auto","my-0"],[1,"small","text-truncate","grey-text"],[1,"fas",3,"ngClass"],[1,"d-flex","flex-row","justify-content-between"],[1,"btn","btn-elegant","m-0",3,"click"],[1,"fas","fa-user-pen"],[1,"btn","btn-danger","m-0","ms-2",3,"click","disabled"],[1,"fas","fa-trash"],[1,"btn","btn-elegant","m-0",3,"disabled"],[1,"btn","btn-primary","m-0",3,"disabled"],[1,"btn","btn-elegant","m-0",3,"click","disabled"],[1,"btn","btn-primary","m-0",3,"click","disabled"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"div",1)(2,"h3",2),m(3),a(4,"translate"),t()(),i(5,"div",3)(6,"button",4),a(7,"translate"),f("click",function(){return l.openAddNewUser()}),p(8,"i",5),t(),i(9,"button",6),a(10,"translate"),f("click",function(){return l.openSupport()}),p(11,"i",7),t()()(),i(12,"div",8),Y(13,Ne,20,14,"div",9,X),t()),s&2&&(e(3),d(o(4,3,"users.title_users")),e(3),u("aria-label",o(7,5,"users.button_add_user")),e(3),u("aria-label",o(10,7,"support.title")),e(4),Z(l.homebridgeUsers))},dependencies:[j,E],encapsulation:2})}return r})();export{zt as UsersComponent};
@@ -1 +0,0 @@
1
- import{b as n}from"./chunk-Z2RK3DTY.js";import{d as u}from"./chunk-72ATQTM5.js";import{b as m}from"./chunk-OROL2MAP.js";import{k as h}from"./chunk-FGRA3MLA.js";import{a as c,d as f}from"./chunk-3GLEK5PO.js";import{fa as i,h as o,ka as r,w as s}from"./chunk-VT4775CA.js";var p=(()=>{class t{cache=null;CACHE_DURATION_MS=6e4;getToken(){let a=Date.now();if(this.cache&&a-this.cache.timestamp<this.CACHE_DURATION_MS)return this.cache.token;let e=window.localStorage.getItem(f.jwt.tokenKey);return this.cache={token:e,timestamp:a},e}invalidateCache(){this.cache=null}static \u0275fac=function(e){return new(e||t)};static \u0275prov=i({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var $=(()=>{class t{$auth=r(n);$tokenCache=r(p);isAuthenticated(){return o(this,null,function*(){if(!this.$tokenCache.getToken())return this.$auth.token=null,this.$auth.user={},this.$tokenCache.invalidateCache(),!1;try{return this.$auth.isLoggedIn()}catch{return this.$auth.logout(),this.$tokenCache.invalidateCache(),!1}})}static \u0275fac=function(e){return new(e||t)};static \u0275prov=i({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var L=(()=>{class t{$auth=r(n);$authHelper=r($);$router=r(u);$settings=r(m);$translate=r(c);$toastr=r(h);canActivate(a,e){return o(this,null,function*(){return this.$settings.settingsLoaded||(yield s(this.$settings.onSettingsLoaded)),this.$settings.formAuth===!1?(yield this.$auth.noauth(),!0):(yield this.$authHelper.isAuthenticated())?this.$auth.user?.admin?!0:(this.$toastr.error(this.$translate.instant("toast.no_auth"),this.$translate.instant("toast.title_error")),yield this.$router.navigate(["/"]),!1):(window.sessionStorage.setItem("target_route",e.url),yield this.$router.navigate(["/login"]),!1)})}static \u0275fac=function(e){return new(e||t)};static \u0275prov=i({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{p as a,$ as b,L as c};
@@ -1,19 +0,0 @@
1
- import{a as xt}from"./chunk-2JOEE6TH.js";import{b as B,e as Ct,f as vt,g as jt,h as $t}from"./chunk-YCD2MWRV.js";import{a as ht,b as bt}from"./chunk-26EI4TMU.js";import{a as wt}from"./chunk-WIM4XI75.js";import{a as Rt}from"./chunk-GCUB4KBA.js";import{m as ft,n as ut,t as D}from"./chunk-AJTGODYF.js";import{B as mt,C as gt,c as dt,e as ct,l as pt}from"./chunk-4HV5VBUX.js";import{b as _t,d as j}from"./chunk-72ATQTM5.js";import{b as yt}from"./chunk-OROL2MAP.js";import{k as R,m as H}from"./chunk-FGRA3MLA.js";import{a as P,b as I}from"./chunk-3GLEK5PO.js";import"./chunk-JQ3FUL2I.js";import{Bc as ot,Cc as st,Dc as rt,Ic as L,Jb as w,Mb as v,Nb as $,Nc as r,Oc as l,Pb as tt,Pc as J,Qb as et,Rb as it,Sb as f,Tb as a,Ub as d,Vb as m,a as G,b as Y,cb as s,cc as k,d as Q,fc as b,g as X,h as C,hb as Z,hc as p,ka as g,md as at,ob as V,qa as u,ra as h,sc as nt,td as lt,uc as _,vc as E,w as S,wc as M}from"./chunk-VT4775CA.js";var Tt=X(jt(),1);var kt=X(Rt(),1);var Et=(o,y)=>({"fa-trash":o,"fa-cog fa-spin":y});function Ot(o,y){o&1&&(a(0,"div",13),m(1,"i",20),d())}function Ut(o,y){if(o&1){let t=k();a(0,"li",9)(1,"span"),_(2),r(3,"date"),m(4,"br"),a(5,"span",21),_(6),r(7,"date"),d()(),a(8,"span",22)(9,"button",25),r(10,"translate"),r(11,"translate"),b("click",function(){let i=u(t).$implicit,n=p(2);return h(n.restore(i.id))}),m(12,"i",26),d(),a(13,"button",27),r(14,"translate"),r(15,"translate"),b("click",function(){let i=u(t).$implicit,n=p(2);return h(n.download(i.id))}),m(16,"i",28),d(),a(17,"button",23),r(18,"translate"),r(19,"translate"),b("click",function(){let i=u(t).$implicit,n=p(2);return h(n.delete(i.id))}),m(20,"i",24),d()()()}if(o&2){let t=y.$implicit,e=p(2);s(2),M(" ",J(3,15,t.timestamp,"mediumDate")),s(4),E(J(7,18,t.timestamp,"shortTime")),s(3),f("disabled",e.clicked||e.deleting)("ngbTooltip",l(10,21,"config.restore.copy_to_editor"))("openDelay",150),w("aria-label",l(11,23,"config.restore.copy_to_editor")),s(4),f("disabled",e.clicked||e.deleting)("ngbTooltip",l(14,25,"form.button_download"))("openDelay",150),w("aria-label",l(15,27,"form.button_download")),s(4),f("disabled",e.clicked||e.deleting)("ngbTooltip",l(18,29,"form.button_delete"))("openDelay",150),w("aria-label",l(19,31,"form.button_delete")),s(3),f("ngClass",L(33,Et,t.id!==e.deleting,t.id===e.deleting))}}function Nt(o,y){if(o&1){let t=k();a(0,"ul",14),et(1,Ut,21,36,"li",9,tt),a(3,"li",9)(4,"span"),_(5),r(6,"translate"),m(7,"br"),a(8,"span",21),_(9),r(10,"translate"),d()(),a(11,"span",22)(12,"button",23),r(13,"translate"),r(14,"translate"),b("click",function(){u(t);let i=p();return h(i.deleteAllBackups())}),m(15,"i",24),d()()()()}if(o&2){let t=p();s(),it(t.backupList),s(4),M(" ",l(6,7,"form.button_delete_all")),s(4),M(" ",l(10,9,"common.labels.no_confirmation")," "),s(3),f("disabled",t.clicked||t.deleting)("ngbTooltip",l(13,11,"form.button_delete_all"))("openDelay",150),w("aria-label",l(14,13,"form.button_delete")),s(3),f("ngClass",L(15,Et,t.deleting!=="all",t.deleting==="all"))}}var St=(()=>{class o{$activeModal=g(ft);$api=g(H);$router=g(j);$toastr=g(R);$translate=g(P);currentConfig;fromSettings=!1;loading=!0;backupList=[];clicked=!1;deleting=null;ngOnInit(){this.getConfigBackups()}getConfigBackups(){return C(this,null,function*(){try{let t=yield S(this.$api.get("/config-editor/backups"));this.loading=!1,this.backupList=t}catch(t){this.loading=!1,console.error(t),this.$toastr.error(t.error?.message||t.message,this.$translate.instant("toast.title_error")),this.dismissModal()}})}restore(t){return this.$activeModal.close(t)}download(t){return C(this,null,function*(){this.clicked=!0;try{let e=yield S(this.$api.get(`/config-editor/backups/${t}`)),i=JSON.stringify(e,null,4),n=new Blob([i],{type:"application/json"}),x=`config-backup-${t}.json`;(0,kt.saveAs)(n,x),this.clicked=!1}catch(e){this.clicked=!1,this.$toastr.error(e.error?.message||e.message,this.$translate.instant("toast.title_error")),console.error(e)}})}downloadCurrentConfig(){let t=`data:text/json;charset=utf-8,${encodeURIComponent(this.currentConfig)}`,e=document.createElement("a");e.setAttribute("href",t),e.setAttribute("download","config.json"),document.body.appendChild(e),e.click(),e.remove()}delete(t){return C(this,null,function*(){this.deleting=t;try{yield S(this.$api.delete(`/config-editor/backups/${t}`)),yield this.getConfigBackups(),this.deleting=null}catch(e){this.deleting=null,this.$toastr.error(e.error?.message||e.message,this.$translate.instant("toast.title_error")),console.error(e)}})}deleteAllBackups(){return C(this,null,function*(){this.deleting="all";try{yield S(this.$api.delete("/config-editor/backups")),this.$toastr.success(this.$translate.instant("config.restore.toast_backups_deleted"),this.$translate.instant("toast.title_success")),this.backupList=[],this.deleting=null}catch(t){this.$toastr.error(t.error?.message||t.message,this.$translate.instant("toast.title_error")),console.error(t),this.deleting=null}})}dismissModal(){this.fromSettings&&this.$router.navigate(["/settings"]),this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=V({type:o,selectors:[["ng-component"]],inputs:{currentConfig:"currentConfig",fromSettings:"fromSettings"},decls:40,vars:31,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click","disabled"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-history","primary-text",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"grey-text"],[1,"btn","btn-primary","m-0","ms-3",3,"click","disabled"],[1,"fas","fa-arrow-right"],[1,"text-center","primary-text"],[1,"list-group","list-group-box","mt-3"],[1,"modal-footer","justify-content-between"],[1,"text-start"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],[1,"text-end"],[1,"fa","fa-cog","fa-spin","mt-3",2,"font-size","75px"],[1,"grey-text","small"],[2,"display","flex","flex-wrap","nowrap"],["placement","bottom","container","modal","triggers","hover",1,"btn","btn-danger","m-0","ms-2",3,"click","disabled","ngbTooltip","openDelay"],[1,"fas",3,"ngClass"],["placement","bottom","container","modal","triggers","hover",1,"btn","btn-primary","m-0","ms-3",3,"click","disabled","ngbTooltip","openDelay"],[1,"fas","fa-history"],["placement","bottom","container","modal","triggers","hover",1,"btn","btn-primary","m-0","ms-2",3,"click","disabled","ngbTooltip","openDelay"],[1,"fas","fa-download"]],template:function(e,i){e&1&&(a(0,"div",0)(1,"div",1)(2,"h5",2),_(3),r(4,"translate"),d(),a(5,"button",3),r(6,"translate"),b("click",function(){return i.dismissModal()}),d()(),a(7,"div",4)(8,"div",5),m(9,"i",6),d(),a(10,"ul",7)(11,"li"),_(12),r(13,"translate"),d(),a(14,"li"),_(15),r(16,"translate"),d()(),a(17,"ul",8)(18,"li",9)(19,"div")(20,"span"),_(21),r(22,"translate"),d(),m(23,"br"),a(24,"small",10),_(25),r(26,"translate"),d()(),a(27,"button",11),r(28,"translate"),b("click",function(){return i.downloadCurrentConfig()}),m(29,"i",12),d()()(),v(30,Ot,2,0,"div",13)(31,Nt,16,18,"ul",14),d(),a(32,"div",15),m(33,"div",16),a(34,"div",17)(35,"button",18),r(36,"translate"),b("click",function(){return i.dismissModal()}),_(37),r(38,"translate"),d()(),m(39,"div",19),d()()),e&2&&(s(3),E(l(4,13,"config.restore.title")),s(2),f("disabled",i.clicked||i.deleting),w("aria-label",l(6,15,"form.button_close")),s(7),E(l(13,17,"config.restore.help_1")),s(3),E(l(16,19,"config.restore.help_2")),s(6),E(l(22,21,"form.button_download")),s(4),E(l(26,23,"config.restore.download")),s(2),f("disabled",i.clicked||i.deleting),w("aria-label",l(28,25,"backup.backup_now")),s(3),$(i.loading?30:i.backupList.length?31:-1),s(5),f("disabled",i.clicked||i.deleting),w("aria-label",l(36,27,"form.button_close")),s(2),M(" ",l(38,29,"form.button_close")," "))},dependencies:[D,at,gt,lt,I],encapsulation:2})}return o})();function Ft(o,y){if(o&1){let t=k();a(0,"button",13),r(1,"translate"),r(2,"translate"),b("click",function(){u(t);let i=p();return h(i.onCancelRestore())}),m(3,"i",14),d()}if(o&2){let t=p();f("disabled",t.saveInProgress)("openDelay",150)("ngbTooltip",l(1,4,"form.button_cancel")),w("aria-label",l(2,6,"form.button_cancel"))}}function qt(o,y){if(o&1){let t=k();a(0,"button",15),r(1,"translate"),r(2,"translate"),b("click",function(){u(t);let i=p();return h(i.onRestore())}),m(3,"i",16),d()}o&2&&(f("openDelay",150)("ngbTooltip",l(1,3,"form.button_restore")),w("aria-label",l(2,5,"form.button_restore")))}function zt(o,y){if(o&1){let t=k();a(0,"button",15),r(1,"translate"),r(2,"translate"),b("click",function(){u(t);let i=p();return h(i.toggleSideBySide())}),m(3,"i",17),d()}if(o&2){let t=p();f("openDelay",150)("ngbTooltip",l(1,7,t.renderSideBySide?"config.restore.view_inline":"config.restore.view_side_by_side")),w("aria-label",l(2,9,t.renderSideBySide?"config.restore.view_inline":"config.restore.view_side_by_side")),s(3),nt("fa-columns",!t.renderSideBySide)("fa-bars",t.renderSideBySide)}}function Lt(o,y){o&1&&m(0,"i",8)}function Jt(o,y){o&1&&m(0,"i",9)}function Wt(o,y){if(o&1){let t=k();a(0,"ngx-monaco-editor",18),b("onInit",function(i){u(t);let n=p();return h(n.onEditorInit(i))})("keydown.control.s",function(i){u(t);let n=p();return i.preventDefault(),h(n.onSave())})("keydown.meta.s",function(i){u(t);let n=p();return i.preventDefault(),h(n.onSave())}),d()}if(o&2){let t=p();f("options",t.editorOptions)("model",t.monacoEditorModel)}}function Kt(o,y){if(o&1){let t=k();a(0,"ngx-monaco-diff-editor",19),b("onInit",function(i){u(t);let n=p();return h(n.onInitDiffEditor(i))})("keydown.control.s",function(i){u(t);let n=p();return i.preventDefault(),h(n.onSave())})("keydown.meta.s",function(i){u(t);let n=p();return i.preventDefault(),h(n.onSave())}),d()}if(o&2){let t=p();f("options",t.editorOptions)("originalModel",t.diffOriginalModel)("modifiedModel",t.diffModifiedModel)}}function Gt(o,y){if(o&1){let t=k();a(0,"textarea",20),rt("ngModelChange",function(i){u(t);let n=p();return st(n.homebridgeConfig,i)||(n.homebridgeConfig=i),h(i)}),_(1," "),d()}if(o&2){let t=p();ot("ngModel",t.homebridgeConfig)}}var Me=(()=>{class o{$api=g(H);$md=g(wt);$modal=g(ut);$monacoEditor=g(xt);$route=g(_t);$renderer=g(Z);$router=g(j);$settings=g(yt);$toastr=g(R);$translate=g(P);editorDecorations=[];lastHeight;visualViewPortEventCallback;latestSavedConfig;childBridgesToRestart=[];hbPendingRestart=!1;homebridgeConfig;originalConfig;saveInProgress;isMobile=!1;monacoEditor;editorOptions;monacoEditorModel;diffOriginalModel;diffModifiedModel;renderSideBySide=!1;constructor(){this.isMobile=this.$md.detect.mobile()}ngOnInit(){this.editorOptions={language:"json",theme:this.$settings.actualLightingMode==="dark"?"vs-dark":"vs-light",renderSideBySide:this.renderSideBySide,renderIndicators:!0,ignoreTrimWhitespace:!1,glyphMargin:!0};let t=document.querySelector(".content");this.$renderer.setStyle(t,"height","100%"),this.visualViewPortEventCallback=()=>this.visualViewPortChanged(),this.lastHeight=window.innerHeight,window.visualViewport&&!this.isMobile&&(window.visualViewport.addEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.disableTouchMove()),this.visualViewPortEventCallback=()=>this.visualViewPortChanged(),this.lastHeight=window.innerHeight,window.visualViewport&&!this.isMobile&&(window.visualViewport.addEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.disableTouchMove()),this.$route.data.subscribe(i=>{this.homebridgeConfig=i.config,this.latestSavedConfig=JSON.parse(i.config),this.diffModifiedModel&&this.updateDiffModels()}),this.monacoEditorModel={value:"{}",language:"json",uri:window.monaco?window.monaco.Uri.parse("a://homebridge/config.json"):void 0},this.diffOriginalModel={code:"",language:"json"},this.diffModifiedModel={code:this.homebridgeConfig||"{}",language:"json"},window.monaco?this.setMonacoEditorModel():this.$monacoEditor.readyEvent.subscribe({next:()=>this.setMonacoEditorModel()});let{action:e}=this.$router.parseUrl(this.$router.url).queryParams;if(e){switch(e){case"restore":{this.onRestore(!0);break}}this.$router.navigate([],{queryParams:{},replaceUrl:!0,queryParamsHandling:""})}}onEditorInit(t){window.editor=t,this.monacoEditor=t,this.monacoEditor.getModel().setValue(this.homebridgeConfig)}onInitDiffEditor(t){this.monacoEditor=t.getModifiedEditor(),this.updateDiffModels(),window.editor=t}updateDiffModels(){if(this.diffOriginalModel&&(this.diffOriginalModel.code=this.originalConfig||""),this.diffModifiedModel&&(this.diffModifiedModel.code=this.homebridgeConfig||"{}"),window.editor&&window.editor.getOriginalEditor){let t=window.editor.getOriginalEditor(),e=window.editor.getModifiedEditor();if(t&&e){let i=t.getModel(),n=e.getModel();i&&i.setValue(this.originalConfig||""),n&&n.setValue(this.homebridgeConfig||"{}")}}}onSave(){return C(this,null,function*(){if(!this.saveInProgress){this.monacoEditor&&(this.editorDecorations=this.monacoEditor.deltaDecorations(this.editorDecorations,[])),this.saveInProgress=!0;try{if(!this.isMobile){yield this.monacoEditor.getAction("editor.action.formatDocument").run();let e=window.monaco.editor.getModelMarkers({owner:"json"});for(let i of e)if(i.message==="Duplicate object key"){this.saveInProgress=!1,this.$toastr.error(this.$translate.instant("config.config_invalid_json"),this.$translate.instant("toast.title_error"));return}this.homebridgeConfig=this.monacoEditor.getModel().getValue()}let t=this.parseConfigFromEditor();this.homebridgeConfig=JSON.stringify(t,null,4),typeof t.bridge!="object"?this.$toastr.error(this.$translate.instant("config.config_bridge_missing"),this.$translate.instant("toast.title_error")):/^(?:[0-9A-F]{2}:){5}[0-9A-F]{2}$/i.test(t.bridge.username)?t.accessories&&!Array.isArray(t.accessories)?this.$toastr.error(this.$translate.instant("config.config_accessory_must_be_array"),this.$translate.instant("toast.title_error")):t.platforms&&!Array.isArray(t.platforms)?this.$toastr.error(this.$translate.instant("config.config_platform_must_be_array"),this.$translate.instant("toast.title_error")):t.platforms&&Array.isArray(t.platforms)&&!this.validateSection(t.platforms,"platform")||t.accessories&&Array.isArray(t.accessories)&&!this.validateSection(t.accessories,"accessory")||t.plugins&&Array.isArray(t.plugins)&&!this.validatePlugins(t.plugins,"plugins")||t.disabledPlugins&&Array.isArray(t.disabledPlugins)&&!this.validatePlugins(t.disabledPlugins,"disabledPlugins")||(yield this.saveConfig(t),this.originalConfig=""):this.$toastr.error(this.$translate.instant("config.config_username_error"),this.$translate.instant("toast.title_error"))}catch(t){console.error(t),this.$toastr.error(this.$translate.instant("config.config_invalid_json"),this.$translate.instant("toast.title_error"))}this.saveInProgress=!1}})}onRestore(t=!1){let e=this.$modal.open(St,{size:"lg",backdrop:"static"});e.componentInstance.currentConfig=this.homebridgeConfig,e.componentInstance.fromSettings=t,e.result.then(i=>{this.originalConfig||(this.originalConfig=this.homebridgeConfig,this.updateDiffModels()),this.$api.get(`/config-editor/backups/${i}`).subscribe({next:n=>{this.$toastr.info(this.$translate.instant("config.restore.confirm"),this.$translate.instant("config.title_backup_loaded")),this.homebridgeConfig=JSON.stringify(n,null,4),this.updateDiffModels(),this.monacoEditor&&window.editor.modifiedEditor&&(this.editorDecorations=this.monacoEditor.deltaDecorations(this.editorDecorations,[]),this.monacoEditor.executeEdits("beautifier",[{identifier:"delete",range:new monaco.Range(1,1,this.monacoEditor.getModel().getLineCount()+10,1),text:"",forceMoveMarkers:!0}]),this.monacoEditor.executeEdits("beautifier",[{identifier:"insert",range:new monaco.Range(1,1,1,1),text:this.homebridgeConfig,forceMoveMarkers:!0}]))},error:n=>{console.error(n),this.$toastr.error(n.error?.message||this.$translate.instant("backup.load_error"),this.$translate.instant("toast.title_error"))}})}).catch(()=>{})}onCancelRestore(){if(window.editor&&window.editor.dispose)try{window.editor.dispose(),window.editor=void 0}catch{}this.homebridgeConfig=this.originalConfig,this.originalConfig="",this.renderSideBySide&&this.toggleSideBySide(),this.updateDiffModels(),this.onRestore()}toggleSideBySide(){this.renderSideBySide=!this.renderSideBySide,this.editorOptions=Y(G({},this.editorOptions),{renderSideBySide:this.renderSideBySide})}ngOnDestroy(){let t=document.querySelector(".content");this.$renderer.removeStyle(t,"height"),window.visualViewport&&(window.visualViewport.removeEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.enableTouchMove());try{if(window.editor&&window.editor.dispose&&(window.editor.dispose(),window.editor=void 0),window.monaco){let e=window.monaco.Uri.parse("file:///original.json"),i=window.monaco.Uri.parse("file:///modified.json"),n=window.monaco.editor.getModel(e);n&&n.dispose();let x=window.monaco.editor.getModel(i);x&&x.dispose()}this.monacoEditor&&this.monacoEditor.dispose()}catch{}}validateSection(t,e){for(let i of t){if(typeof i!="object"||Array.isArray(i))return this.$toastr.error(this.$translate.instant("config.error_blocks_objects",{type:e}),this.$translate.instant("toast.title_error")),this.highlightOffendingArrayItem(i),!1;if(!i[e])return this.$toastr.error(this.$translate.instant("config.error_blocks_type",{type:e}),this.$translate.instant("toast.title_error")),this.highlightOffendingArrayItem(i),!1;if(typeof i[e]!="string")return this.$toastr.error(this.$translate.instant("config.error_string_type",{type:e}),this.$translate.instant("toast.title_error")),this.highlightOffendingArrayItem(i),!1}return!0}validatePlugins(t,e){for(let i of t)if(typeof i!="string")return this.$toastr.error(this.$translate.instant("config.error_string_array",{key:e}),this.$translate.instant("toast.title_error")),!1;return!0}highlightOffendingArrayItem(t){this.monacoEditor&&(t=JSON.stringify(t,null,4).split(`
2
- `).map(e=>` ${e}`).join(`
3
- `),setTimeout(()=>{let e=this.monacoEditor.getModel().findMatches(t);if(e.length){let i=e[0].range,n=new monaco.Range(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn);this.editorDecorations=this.monacoEditor.deltaDecorations(this.editorDecorations,[{range:n,options:{isWholeLine:!0,linesDecorationsClassName:"hb-monaco-editor-line-error"}}])}},200))}setMonacoEditorModel(){if(window.monaco.languages.json.jsonDefaults.diagnosticsOptions.schemas.some(i=>i.uri==="http://homebridge/config.json"))return;let t=monaco.Uri.parse("a://homebridge/config.json"),e=$t(this.$translate);window.monaco.languages.json.jsonDefaults.setDiagnosticsOptions({allowComments:!1,validate:!0,schemas:[{uri:"http://homebridge/config.json",fileMatch:[t.toString()],schema:{type:"object",required:["bridge"],properties:{bridge:{type:"object",required:["name","username","port","pin"],properties:{name:{type:"string",title:this.$translate.instant("settings.name"),description:`The Homebridge instance name.
4
- This should be unique if you are running multiple instances of Homebridge.`,default:"Homebridge"},username:{type:"string",title:this.$translate.instant("accessories.bridge_username"),description:`Homebridge username must be 6 pairs of colon-separated hexadecimal characters (A-F 0-9).
5
- You should change this pin if you need to re-pair your instance with HomeKit.
6
- Example: 0E:89:49:64:91:86.`,default:"0E:89:49:64:91:86",pattern:"^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$"},port:{type:"number",title:this.$translate.instant("settings.network.port_hb"),description:`The port Homebridge listens on.
7
- If running more than one instance of Homebridge on the same server make sure each instance is given a unique port.`,default:51173,minimum:1025,maximum:65534},pin:{type:"string",description:`The Homebridge instance pin.
8
- This is used when pairing Homebridge to HomeKit.
9
- Example: 630-27-655.`,default:"630-27-655",pattern:"^([0-9]{3}-[0-9]{2}-[0-9]{3})$"},manufacturer:{type:"string",title:this.$translate.instant("child_bridge.config.manufacturer"),description:"The bridge manufacturer to be displayed in HomeKit."},firmwareRevision:{type:"string",title:this.$translate.instant("child_bridge.config.firmware"),description:"The bridge firmware version to be displayed in HomeKit."},model:{type:"string",title:this.$translate.instant("child_bridge.config.model"),description:"The bridge model to be displayed in HomeKit."},bind:{title:this.$translate.instant("settings.network.title_network_interfaces"),description:`A string or an array of strings with the name(s) of the network interface(s) Homebridge should bind to.
10
- Requires Homebridge v1.3 or later.`,type:["string","array"],items:{type:"string",description:this.$translate.instant("status.widget.network.network_interface")}}},default:{name:"Homebridge",username:"0E:89:49:64:91:86",port:51173,pin:"6302-7655"}},mdns:{type:"object",properties:{interface:{type:"string",title:this.$translate.instant("status.widget.network.network_interface"),description:`The interface or IP address of the interface you want Homebridge to listen on.
11
- This is useful if your server has multiple interfaces.
12
- Deprecated as of Homebridge v1.3.0 - use bridge.bind instead.`},legacyAdvertiser:{type:"boolean",title:"Legacy mDNS Advertiser",description:"Set to false to use the new mdns library, ciao."}},default:{legacyAdvertiser:!1}},ports:{type:"object",title:"Port Range",description:"The range of ports that should be used for external accessories like cameras and TVs.",required:["start","end"],properties:{start:{type:"number",default:52100,minimum:1025,maximum:65534,title:this.$translate.instant("settings.network.port_start"),description:this.$translate.instant("settings.network.port_start_desc")},end:{type:"number",default:52150,minimum:1025,maximum:65534,title:this.$translate.instant("settings.network.port_end"),description:this.$translate.instant("settings.network.port_end_desc")}},default:{start:52100,end:52150}},platforms:{type:"array",title:"Platforms",description:`Any plugin that exposes a platform should have its config entered in this array.
13
- Separate each plugin config block using a comma.`,items:{type:"object",required:["platform"],anyOf:[{type:"object",required:["platform"],title:this.$translate.instant("plugins.button_settings"),properties:{platform:{type:"string",title:"Platform Name",description:"This is used by Homebridge to identify which plugin this platform belongs to.",not:{enum:["config"]}},name:{type:"string",title:this.$translate.instant("accessories.name"),description:"The name of the platform."},_bridge:e}},{type:"object",properties:{platform:{type:"string",title:"Platform Name",description:`Homebridge UI platform name must be set to "config".
14
- Do not change!`,const:"config"},name:{title:this.$translate.instant("accessories.name"),type:"string",default:"Homebridge UI",minLength:1,description:"The name of the Homebridge instance."},port:{title:this.$translate.instant("settings.network.port_ui"),type:"integer",default:8080,minimum:1025,maximum:65535,description:this.$translate.instant("settings.network.port_ui_desc")},auth:{type:"string",default:"form",title:this.$translate.instant("settings.security.auth"),description:this.$translate.instant("settings.security.auth_desc"),oneOf:[{title:"Require Authentication",enum:["form"]},{title:"None",enum:["none"]}]},theme:{title:this.$translate.instant("settings.display.theme"),description:"The theme used for the UI.",type:"string",default:"orange",oneOf:[{title:this.$translate.instant("settings.display.orange"),enum:["orange"]},{title:this.$translate.instant("settings.display.red"),enum:["red"]},{title:this.$translate.instant("settings.display.pink"),enum:["pink"]},{title:this.$translate.instant("settings.display.purple"),enum:["purple"]},{title:this.$translate.instant("settings.display.deep_purple"),enum:["deep-purple"]},{title:this.$translate.instant("settings.display.indigo"),enum:["indigo"]},{title:this.$translate.instant("settings.display.blue"),enum:["blue"]},{title:this.$translate.instant("settings.display.bluegrey"),enum:["blue-grey"]},{title:this.$translate.instant("settings.display.cyan"),enum:["cyan"]},{title:this.$translate.instant("settings.display.green"),enum:["green"]},{title:this.$translate.instant("settings.display.teal"),enum:["teal"]},{title:this.$translate.instant("settings.display.grey"),enum:["grey"]},{title:this.$translate.instant("settings.display.brown"),enum:["brown"]}]},lightingMode:{title:this.$translate.instant("settings.display.lighting_mode"),description:"The lighting mode used for the UI.",type:"string",default:"auto",oneOf:[{title:this.$translate.instant("accessories.control.auto"),enum:["auto"]},{title:this.$translate.instant("settings.display.light"),enum:["light"]},{title:this.$translate.instant("settings.display.dark"),enum:["dark"]}]},menuMode:{title:this.$translate.instant("settings.display.menu_mode"),description:"Modes for the UI side menu.",type:"string",default:"default",oneOf:[{title:this.$translate.instant("settings.display.menu_default"),enum:["default"]},{title:this.$translate.instant("settings.display.menu_freeze"),enum:["freeze"]}]},temp:{title:this.$translate.instant("settings.linux.temp"),type:"string",description:this.$translate.instant("settings.linux.temp_desc")},tempUnits:{title:this.$translate.instant("settings.display.temp_units"),description:"The units used to display the temperature.",type:"string",default:"c",oneOf:[{title:this.$translate.instant("settings.display.temp_units.c"),enum:["c"]},{title:this.$translate.instant("settings.display.temp_units.f"),enum:["f"]}]},lang:{title:this.$translate.instant("settings.display.lang"),type:"string",default:"auto",description:"The language used for the UI.",oneOf:[{title:this.$translate.instant("form.select.auto"),enum:["auto"]},{title:"Bulgarian (bg)",enum:["bg"]},{title:"Catalan (ca)",enum:["ca"]},{title:"Chinese - Simplified (zh-CN)",enum:["zh-CN"]},{title:"Chinese - Traditional (zh-TW)",enum:["zh-TW"]},{title:"Czech (cs)",enum:["cs"]},{title:"Dutch (nl)",enum:["nl"]},{title:"English (en)",enum:["en"]},{title:"Finnish (fi)",enum:["fi"]},{title:"French (fr)",enum:["fr"]},{title:"German (de)",enum:["de"]},{title:"Hebrew (he)",enum:["he"]},{title:"Hungarian (hu)",enum:["hu"]},{title:"Indonesian (id)",enum:["id"]},{title:"Italian (it)",enum:["it"]},{title:"Japanese (ja)",enum:["ja"]},{title:"Korean (ko)",enum:["ko"]},{title:"Macedonian (mk)",enum:["mk"]},{title:"Norwegian (no)",enum:["no"]},{title:"Polish (pl)",enum:["pl"]},{title:"Portuguese (Brazil)",enum:["pt-BR"]},{title:"Portuguese (Portugal)",enum:["pt"]},{title:"Russian (ru)",enum:["ru"]},{title:"Slovenian (sl)",enum:["sl"]},{title:"Spanish (es)",enum:["es"]},{title:"Swedish (sv)",enum:["sv"]},{title:"Thai (th)",enum:["th"]},{title:"Turkish (tr)",enum:["tr"]},{title:"Ukrainian (uk)",enum:["uk"]}]},wallpaper:{title:this.$translate.instant("settings.display.wallpaper"),description:"The full path to the .jpg file.",type:"string"},homebridgePackagePath:{title:this.$translate.instant("settings.network.hb_package"),type:"string",description:this.$translate.instant("settings.network.hb_package_desc")},host:{type:"string",pattern:"^[^{}/ :\\\\]+(?::\\d+)?$",title:this.$translate.instant("settings.network.host"),description:this.$translate.instant("settings.network.host_desc")},sessionTimeout:{type:"integer",minimum:600,maximum:864e5,title:this.$translate.instant("settings.startup.session"),description:this.$translate.instant("settings.startup.session_desc")},log:{type:"object",title:"Log Settings",description:"The log settings for the Homebridge UI.",properties:{maxSize:{type:"integer",title:this.$translate.instant("settings.terminal.log_max"),description:this.$translate.instant("settings.terminal.log_max_desc"),minimum:-1},truncateSize:{type:"integer",title:this.$translate.instant("settings.terminal.log_truncate"),description:this.$translate.instant("settings.terminal.log_truncate_desc"),minimum:0}}},ssl:{type:"object",title:this.$translate.instant("settings.security.https"),description:this.$translate.instant("settings.security.https_desc"),properties:{key:{type:"string",title:this.$translate.instant("settings.security.key"),description:"The full path to the private key file."},cert:{type:"string",title:this.$translate.instant("settings.security.cert"),description:"The full path to the certificate file."},pfx:{title:this.$translate.instant("settings.security.pfx"),type:"string",description:"The full path to the PKCS#12 certificate file."},passphrase:{title:this.$translate.instant("settings.security.pass"),type:"string",description:"The passphrase for the PKCS#12 certificate file."}}},accessoryControl:{title:"Accessory Control Setup",type:"object",description:"The accessory control settings for the Homebridge UI.",properties:{debug:{title:this.$translate.instant("settings.accessory.debug"),type:"boolean",description:this.$translate.instant("settings.accessory.debug_desc")},instanceBlacklist:{title:this.$translate.instant("settings.security.ui_control"),type:"array",description:this.$translate.instant("settings.security.ui_control_desc"),items:{title:this.$translate.instant("accessories.bridge_username"),type:"string",pattern:"^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$"}}}},linux:{title:"Linux Server Commands",type:"object",description:"The Linux server commands for the Homebridge UI.",properties:{shutdown:{title:this.$translate.instant("settings.linux.shutdown"),type:"string",description:this.$translate.instant("settings.linux.shutdown_desc")},restart:{title:this.$translate.instant("settings.linux.restart"),type:"string",description:this.$translate.instant("settings.linux.restart_desc")}}},proxyHost:{title:this.$translate.instant("settings.network.proxy"),type:"string",pattern:"^[^{}/ :\\\\]+(?::\\d+)?$",description:this.$translate.instant("settings.network.proxy_desc")},scheduledBackupPath:{title:this.$translate.instant("backup.settings_path"),description:"The full path to where the service should save daily scheduled backups archives.",type:"string"},scheduledBackupDisable:{title:"Disable Scheduled Backups",type:"boolean",description:"When enabled, the Homebridge UI will not create daily scheduled backups."},disableServerMetricsMonitoring:{title:"Disable Server Metrics Monitoring",type:"boolean",description:"When enabled, the Homebridge UI will not collect or report CPU or memory stats."},plugins:{title:this.$translate.instant("menu.label_plugins"),type:"object",description:"Settings surrounding plugins used by the Homebridge UI.",properties:{hideUpdatesFor:{type:"array",title:"Hide Plugin Updates For",description:"A list of plugin names for which frontend update notifications will be hidden.",items:{type:"string",title:this.$translate.instant("accessories.plugin"),pattern:"^(?:@[\\w-]+(?:\\.[\\w-]+)*/)?homebridge-[\\w-]+$"}},alwaysShowBetas:{type:"boolean",title:this.$translate.instant("settings.display.show_betas"),description:"When enabled, beta releases will be shown as available for Homebridge, the UI and plugins."}}},terminal:{type:"object",title:"Terminal Settings",description:"The terminal settings for the Homebridge UI.",properties:{persistence:{title:this.$translate.instant("settings.terminal.persistence"),type:"boolean",description:this.$translate.instant("settings.terminal.persistence_help"),default:!1},hideWarning:{title:this.$translate.instant("settings.terminal.warning"),type:"boolean",description:this.$translate.instant("settings.terminal.warning_help"),default:!1},bufferSize:{title:this.$translate.instant("settings.terminal.buffer_size"),type:"integer",description:this.$translate.instant("settings.terminal.buffer_size_help"),default:5e4,minimum:0}}}}}]}},accessories:{type:"array",title:this.$translate.instant("menu.label_accessories"),description:`Any plugin that exposes an accessory should have its config entered in this array.
15
- Separate each plugin config block using a comma.`,items:{type:"object",required:["accessory","name"],title:this.$translate.instant("plugins.button_settings"),properties:{accessory:{type:"string",title:this.$translate.instant("child_bridge.config.accessory"),description:"This is used by Homebridge to identify which plugin this accessory belongs to."},name:{type:"string",title:this.$translate.instant("accessories.name"),description:"The name of the accessory."},_bridge:e}}},plugins:{type:"array",title:this.$translate.instant("menu.label_plugins"),description:`An array of plugins that should be selectively enabled.
16
- Remove this array to enable all plugins.`,items:{type:"string",title:this.$translate.instant("accessories.plugin"),description:`The full plugin npm package name.
17
- Example: homebridge-dummy.`},default:["homebridge-config-ui-x"]},disabledPlugins:{type:"array",description:`An array of plugins that should be disabled.
18
- Requires Homebridge v1.3 or later.`,items:{type:"string",title:this.$translate.instant("accessories.plugin"),description:`The full plugin npm package name.
19
- Example: homebridge-dummy.`},default:[]}}}}]}),this.monacoEditorModel.uri=monaco.Uri.parse("a://homebridge/config.json")}visualViewPortChanged(){this.lastHeight<window.visualViewport.height&&document.activeElement.blur(),window.visualViewport.height<window.innerHeight?(this.$md.enableTouchMove(),this.lastHeight=window.visualViewport.height):window.visualViewport.height===window.innerHeight&&(this.$md.disableTouchMove(),this.lastHeight=window.visualViewport.height)}saveConfig(t){return C(this,null,function*(){try{let e=yield S(this.$api.post("/config-editor",t));this.homebridgeConfig=JSON.stringify(e,null,4),yield this.detectSavesChangesForRestart()}catch(e){console.error(e),this.$toastr.error(this.$translate.instant("config.failed_to_save_config"),this.$translate.instant("toast.title_error"))}})}validateArraysEqual(t,e){if(t.length!==e.length)return!1;let i=[...t].sort(),n=[...e].sort();return i.every((x,O)=>x===n[O])}removePlatformsAndAccessories(t){let x=t,{accessories:e,platforms:i}=x;return Q(x,["accessories","platforms"])}removeEmptyBridges(t){return t.filter(e=>e._bridge&&Object.keys(e._bridge).length>0).map(e=>e._bridge)}validateBridgesEqual(t,e){return t.length!==e.length?!1:t.every(i=>e.some(n=>B(i,n)))}detectSavesChangesForRestart(){return C(this,null,function*(){let t=yield this.determineRestartType();t==="full"?yield this.performFullRestart():t==="child"&&(yield this.performChildBridgeRestart()),this.latestSavedConfig=JSON.parse(this.homebridgeConfig)})}determineRestartType(){return C(this,null,function*(){if(this.hbPendingRestart)return"full";let t=this.latestSavedConfig,e=JSON.stringify(t,null,4),i=JSON.parse(this.homebridgeConfig),n=this.homebridgeConfig;if(e===n&&!this.childBridgesToRestart.length)return this.$toastr.info(this.$translate.instant("config.no_restart"),this.$translate.instant("config.config_saved")),"none";if(!this.validateArraysEqual(Object.keys(t),Object.keys(i))||[...i.platforms||[],...i.accessories||[]].every(c=>!c._bridge||!Object.keys(c._bridge).length))return"full";let O=this.removePlatformsAndAccessories(t),Mt=this.removePlatformsAndAccessories(i);if(!B(O,Mt))return"full";let U=t.platforms||[],N=i.platforms||[],Bt=U.map(c=>c.platform),At=N.map(c=>c.platform);if(!this.validateArraysEqual(Bt,At))return"full";let F=t.accessories||[],q=i.accessories||[],Vt=F.map(c=>c.accessory),Dt=q.map(c=>c.accessory);if(!this.validateArraysEqual(Vt,Dt)||!this.validateBridgesEqual(this.removeEmptyBridges(U),this.removeEmptyBridges(N))||!this.validateBridgesEqual(this.removeEmptyBridges(F),this.removeEmptyBridges(q)))return"full";let W=U.filter(c=>!B(c,N.find(T=>T.platform===c.platform))),Pt=F.filter(c=>!B(c,q.find(T=>T.accessory===c.accessory))),K=[...W,...Pt];if(W.some(c=>c.platform==="config")||K.some(c=>c.platform==="config"?!1:!c._bridge||Object.keys(c._bridge).length===0))return"full";try{let c=yield S(this.$api.get("/status/homebridge/child-bridges"));return K.forEach(T=>{let It=T._bridge.username.toUpperCase(),A=c.find(({username:z})=>z===It);if(A)this.childBridgesToRestart.some(z=>z.username===A.username)||this.childBridgesToRestart.push({name:A.name,username:A.username});else return"full"}),"child"}catch(c){return console.error("Error fetching child bridges:",c),"full"}})}performChildBridgeRestart(){return C(this,null,function*(){let t=this.$modal.open(Ct,{size:"lg",backdrop:"static"});t.componentInstance.bridges=this.childBridgesToRestart;try{yield t.result,this.childBridgesToRestart=[]}catch{}})}performFullRestart(){return C(this,null,function*(){let t=this.$modal.open(vt,{size:"lg",backdrop:"static"});try{yield t.result,this.hbPendingRestart=!1,this.childBridgesToRestart=[]}catch{this.hbPendingRestart=!0}})}parseConfigFromEditor(){try{return JSON.parse(this.homebridgeConfig)}catch{let e=Tt.default.parse(this.homebridgeConfig);return this.homebridgeConfig=JSON.stringify(e,null,4),this.monacoEditor&&this.monacoEditor.getModel().setValue(this.homebridgeConfig),e}}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=V({type:o,selectors:[["ng-component"]],decls:18,vars:19,consts:[[1,"flex-column","d-flex","align-items-stretch","h-100"],[1,"row"],[1,"col-6"],[1,"primary-text","m-0"],[1,"col-6","text-end"],["container","body","placement","bottom","triggers","hover",1,"btn","btn-danger","waves-effect","my-0","me-2",3,"disabled","openDelay","ngbTooltip"],["container","body","placement","bottom","triggers","hover",1,"btn","btn-elegant","waves-effect","my-0","me-2",3,"openDelay","ngbTooltip"],["container","body","placement","bottom","triggers","hover",1,"btn","btn-elegant","waves-effect","my-0","me-0",3,"click","disabled","openDelay","ngbTooltip"],[1,"fas","fa-floppy-disk"],[1,"fas","fa-spinner","fa-pulse"],[1,"flex-grow-1","h-100","w-100","mt-3","mb-0",3,"options","model"],[1,"flex-grow-1","h-100","w-100","mt-3","mb-0",3,"options","originalModel","modifiedModel"],["wrap","off","autocomplete","off","autocorrect","off","autocapitalize","off","spellcheck","false",1,"hb-plain-text-editor","align-self-end","h-100","w-100","my-3",3,"ngModel"],["container","body","placement","bottom","triggers","hover",1,"btn","btn-danger","waves-effect","my-0","me-2",3,"click","disabled","openDelay","ngbTooltip"],[1,"fas","fa-times"],["container","body","placement","bottom","triggers","hover",1,"btn","btn-elegant","waves-effect","my-0","me-2",3,"click","openDelay","ngbTooltip"],[1,"fas","fa-history"],[1,"fas"],[1,"flex-grow-1","h-100","w-100","mt-3","mb-0",3,"onInit","keydown.control.s","keydown.meta.s","options","model"],[1,"flex-grow-1","h-100","w-100","mt-3","mb-0",3,"onInit","keydown.control.s","keydown.meta.s","options","originalModel","modifiedModel"],["wrap","off","autocomplete","off","autocorrect","off","autocapitalize","off","spellcheck","false",1,"hb-plain-text-editor","align-self-end","h-100","w-100","my-3",3,"ngModelChange","ngModel"]],template:function(e,i){e&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"h3",3),_(4),r(5,"translate"),d()(),a(6,"div",4),v(7,Ft,4,8,"button",5),v(8,qt,4,7,"button",6),v(9,zt,4,11,"button",6),a(10,"button",7),r(11,"translate"),r(12,"translate"),b("click",function(){return i.onSave()}),v(13,Lt,1,0,"i",8),v(14,Jt,1,0,"i",9),d()()(),v(15,Wt,1,2,"ngx-monaco-editor",10),v(16,Kt,1,3,"ngx-monaco-diff-editor",11),v(17,Gt,2,1,"textarea",12),d()),e&2&&(s(4),E(l(5,13,"menu.config_json_editor")),s(3),$(i.originalConfig?7:-1),s(),$(i.originalConfig?-1:8),s(),$(!i.isMobile&&i.originalConfig?9:-1),s(),f("disabled",i.saveInProgress)("openDelay",150)("ngbTooltip",l(11,15,"form.button_save")),w("aria-label",l(12,17,"form.button_save")),s(3),$(i.saveInProgress?-1:13),s(),$(i.saveInProgress?14:-1),s(),$(!i.isMobile&&!i.originalConfig?15:-1),s(),$(!i.isMobile&&i.originalConfig?16:-1),s(),$(i.isMobile?17:-1))},dependencies:[D,ht,bt,mt,dt,ct,pt,I],encapsulation:2})}return o})();export{Me as ConfigEditorComponent};
@@ -1 +0,0 @@
1
- import{g as r}from"./chunk-72ATQTM5.js";import"./chunk-JQ3FUL2I.js";import{ga as t,pb as e}from"./chunk-VT4775CA.js";var u=[{path:"",loadComponent:()=>import("./chunk-ULG3QICO.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};