homebridge-config-ui-x 5.1.0 → 5.2.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 (73) hide show
  1. package/CHANGELOG.md +22 -3
  2. package/package.json +2 -2
  3. package/public/{chunk-XVOHGK47.js → chunk-2KOR6LRK.js} +1 -1
  4. package/public/{chunk-NFHYMK4G.js → chunk-35FM5BNU.js} +1 -1
  5. package/public/{chunk-JKQXCQ2Z.js → chunk-4ELFIE24.js} +1 -1
  6. package/public/{chunk-4XI5CQKP.js → chunk-5XUXIHBT.js} +1 -1
  7. package/public/{chunk-IBL2QGK7.js → chunk-6JEDJ3MZ.js} +1 -1
  8. package/public/{chunk-J5JT5MX6.js → chunk-7FO4RGTF.js} +1 -1
  9. package/public/{chunk-3QAZWVY3.js → chunk-7UEIHMOI.js} +1 -1
  10. package/public/{chunk-EM3VXCLF.js → chunk-ADNBR4EK.js} +1 -1
  11. package/public/{chunk-PGFVNBPH.js → chunk-AP7BRYIQ.js} +1 -1
  12. package/public/{chunk-CMP7DN6X.js → chunk-B3QDBZSW.js} +1 -1
  13. package/public/{chunk-2MXHSHJW.js → chunk-B7F2YD4Q.js} +1 -1
  14. package/public/{chunk-5KPILP6Z.js → chunk-BF4BAPY7.js} +1 -1
  15. package/public/{chunk-Z2UP3EUO.js → chunk-BLJ3CFZV.js} +1 -1
  16. package/public/{chunk-5VYFMUZI.js → chunk-BRCJFOVZ.js} +1 -1
  17. package/public/{chunk-ZBK325RS.js → chunk-BVXDUT37.js} +1 -1
  18. package/public/{chunk-IYZAN4QG.js → chunk-BYJZ4WBV.js} +1 -1
  19. package/public/{chunk-6GRAO5OI.js → chunk-C2UUY7C4.js} +1 -1
  20. package/public/{chunk-M52PEKJL.js → chunk-CX4ME2ME.js} +1 -1
  21. package/public/{chunk-K274PEUH.js → chunk-DDAEYXAV.js} +1 -1
  22. package/public/{chunk-FFLFHMOD.js → chunk-ERUJZRID.js} +1 -1
  23. package/public/{chunk-MK36QITJ.js → chunk-EXA4HLEA.js} +1 -1
  24. package/public/{chunk-HH4OYX63.js → chunk-FPJPIOST.js} +1 -1
  25. package/public/{chunk-TKKRUAQB.js → chunk-FTA33HXI.js} +1 -1
  26. package/public/{chunk-J46I5YX6.js → chunk-HNJKAZBX.js} +1 -1
  27. package/public/{chunk-PADPFZSE.js → chunk-HYASK3YZ.js} +1 -1
  28. package/public/{chunk-F3LH3JZG.js → chunk-IK3LF6X7.js} +1 -1
  29. package/public/{chunk-GSF3Z3XG.js → chunk-J6BY74Q4.js} +1 -1
  30. package/public/{chunk-LHQI7N3V.js → chunk-JIXMMXPZ.js} +1 -1
  31. package/public/{chunk-VCD26PYR.js → chunk-K2NEWUWG.js} +1 -1
  32. package/public/{chunk-NLGVT4MV.js → chunk-K7QEGT3E.js} +1 -1
  33. package/public/{chunk-VX75HOOB.js → chunk-K7WA5KOE.js} +1 -1
  34. package/public/{chunk-QOBPRLO2.js → chunk-KECVWPQI.js} +1 -1
  35. package/public/{chunk-QNNE7V55.js → chunk-KR4TXJYA.js} +1 -1
  36. package/public/{chunk-PF574E5L.js → chunk-KS7RCH5Z.js} +1 -1
  37. package/public/{chunk-IEANGMUA.js → chunk-NG4XN2SO.js} +1 -1
  38. package/public/{chunk-PSK63HDR.js → chunk-NQDYN4CZ.js} +1 -1
  39. package/public/{chunk-RONKUNPA.js → chunk-O3CSJUU3.js} +1 -1
  40. package/public/{chunk-53HX4CXU.js → chunk-P3TP4J62.js} +1 -1
  41. package/public/{chunk-DHHZNJ4G.js → chunk-PAWQ6VVY.js} +1 -1
  42. package/public/{chunk-AYW72UFQ.js → chunk-PJDX7TKL.js} +1 -1
  43. package/public/{chunk-GVTMDSZC.js → chunk-PO63P7BR.js} +1 -1
  44. package/public/{chunk-IVU5NZ6Q.js → chunk-PSSVCFFV.js} +1 -1
  45. package/public/{chunk-VLK5XU6X.js → chunk-QOU7SWHO.js} +1 -1
  46. package/public/{chunk-G4HMZX6U.js → chunk-QQQOCD2G.js} +1 -1
  47. package/public/{chunk-NSYXJMRL.js → chunk-QRQBCPWO.js} +1 -1
  48. package/public/chunk-RKMGRAC5.js +1 -0
  49. package/public/{chunk-NA3BCE4T.js → chunk-RO5J6JA4.js} +1 -1
  50. package/public/{chunk-7B77N4IT.js → chunk-SXFY7EJ4.js} +1 -1
  51. package/public/{chunk-MBBXPRRX.js → chunk-T7N752IX.js} +1 -1
  52. package/public/{chunk-KLNSM4N6.js → chunk-TMEVA2D3.js} +1 -1
  53. package/public/{chunk-GITBGY3F.js → chunk-TTWTW2NA.js} +1 -1
  54. package/public/{chunk-ZATUJNFV.js → chunk-UNQWAP4O.js} +1 -1
  55. package/public/chunk-V35FUQDD.js +1 -0
  56. package/public/{chunk-OXBT7KSO.js → chunk-V7SOQAC5.js} +1 -1
  57. package/public/{chunk-F2SI3XC2.js → chunk-VFHI5NXQ.js} +1 -1
  58. package/public/{chunk-PLYYXTQR.js → chunk-VQKOAU2J.js} +1 -1
  59. package/public/chunk-VUYNUK27.js +1 -0
  60. package/public/{chunk-I2OX5RXF.js → chunk-WAEIH452.js} +1 -1
  61. package/public/{chunk-7ZQO4P74.js → chunk-WCRRCV3M.js} +1 -1
  62. package/public/{chunk-JECUI6IT.js → chunk-YEQ736I7.js} +1 -1
  63. package/public/{chunk-KXE25QMA.js → chunk-YUEZAPH5.js} +1 -1
  64. package/public/chunk-Z355YUUI.js +1 -0
  65. package/public/{chunk-VTILLTV4.js → chunk-Z6MT43P4.js} +1 -1
  66. package/public/{chunk-TVAJZAL5.js → chunk-ZG3HINDJ.js} +1 -1
  67. package/public/{chunk-6SADNWDM.js → chunk-ZS5KZUZ5.js} +1 -1
  68. package/public/index.html +1 -1
  69. package/public/{main-X7DBVNTD.js → main-WB3CMP7F.js} +1 -1
  70. package/public/chunk-BPRTQCLD.js +0 -1
  71. package/public/chunk-DZVPXNDY.js +0 -1
  72. package/public/chunk-OMLTIUY5.js +0 -1
  73. package/public/chunk-QBIMM2GA.js +0 -1
@@ -1 +1 @@
1
- import{a as se}from"./chunk-HH4OYX63.js";import{a as te,b as ie,c as ne}from"./chunk-IYZAN4QG.js";import{c as re}from"./chunk-VX75HOOB.js";import"./chunk-QOBPRLO2.js";import{a as le}from"./chunk-53HX4CXU.js";import{m as V,n as Z,t as ee}from"./chunk-IVU5NZ6Q.js";import{c as G,e as J,f as K,i as Q,l as U,m as X,z as Y}from"./chunk-VCD26PYR.js";import"./chunk-NA3BCE4T.js";import{b as ae}from"./chunk-PF574E5L.js";import"./chunk-NSYXJMRL.js";import{b as oe}from"./chunk-6GRAO5OI.js";import"./chunk-OMLTIUY5.js";import{b as E}from"./chunk-TVAJZAL5.js";import"./chunk-NLGVT4MV.js";import{Cc as R,Dc as $,Ec as j,Hb as C,Hc as a,Ib as w,Ic as r,Jb as S,Jc as z,Lb as P,Mb as L,Nb as N,Ob as _,Pb as s,Qb as l,Rb as f,Sb as u,Tb as b,Ub as A,Xa as W,_b as D,ab as o,bc as v,cc as H,dc as m,id as q,la as x,mb as M,qc as c,ra as y,rc as p,sa as h,sc as k,xc as T,yc as B,zc as I}from"./chunk-OXBT7KSO.js";var ce=(()=>{class t{$activeModal=x(V);dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=M({type:t,selectors:[["ng-component"]],decls:41,vars:30,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-fw","fa-question-circle-o","primary-text",2,"font-size","75px"],[1,"ms-2"],[1,"mb-0"],[1,"ms-2","mt-2"],[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(i,n){i&1&&(u(0,"div",0)(1,"form")(2,"div",1)(3,"h5",2),c(4),a(5,"translate"),b(),u(6,"button",3),a(7,"translate"),H("click",function(){return n.dismissModal()}),b()(),u(8,"div",4)(9,"div",5),A(10,"i",6),b(),u(11,"h5",7),c(12),a(13,"translate"),b(),u(14,"ul",8)(15,"li"),c(16),a(17,"translate"),b(),u(18,"li"),c(19),a(20,"translate"),b()(),u(21,"h5",9),c(22),a(23,"translate"),b(),u(24,"ul",8)(25,"li"),c(26),a(27,"translate"),b(),u(28,"li"),c(29),a(30,"translate"),b(),u(31,"li"),c(32),a(33,"translate"),b()()(),u(34,"div",10),A(35,"div",11),u(36,"div",12)(37,"button",13),H("click",function(){return n.dismissModal()}),c(38),a(39,"translate"),b()(),A(40,"div",14),b()()()),i&2&&(o(4),p(r(5,10,"support.title")),o(2),C("aria-label",r(7,12,"form.button_close")),o(6),p(r(13,14,"accessories.title_accessories")),o(4),p(r(17,16,"accessories.support.acc_1")),o(3),p(r(20,18,"accessories.support.acc_2")),o(3),p(r(23,20,"accessories.title_rooms")),o(4),p(r(27,22,"accessories.support.rooms_1")),o(3),p(r(30,24,"accessories.support.rooms_2")),o(3),p(r(33,26,"accessories.support.rooms_3")),o(6),k(" ",r(39,28,"form.button_close")," "))},dependencies:[E],encapsulation:2})}return t})();var pe=()=>({standalone:!0}),de=(()=>{class t{$activeModal=x(V);roomName;dismissModal(){this.$activeModal.dismiss("Dismiss")}closeModal(e){this.$activeModal.close(e)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=M({type:t,selectors:[["ng-component"]],inputs:{roomName:"roomName"},decls:28,vars:19,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,"fas","fa-fw","fa-folder-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-name",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["autocomplete","off","type","text","id","form-name","autofocus","",1,"form-control","custom-input",3,"ngModelChange","keyup.enter","ngModel","ngModelOptions"],[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-primary",3,"click","disabled"]],template:function(i,n){i&1&&(s(0,"div",0)(1,"form")(2,"div",1)(3,"h5",2),c(4),a(5,"translate"),l(),s(6,"button",3),a(7,"translate"),v("click",function(){return n.dismissModal()}),l()(),s(8,"div",4)(9,"div",5),f(10,"i",6),l(),s(11,"ul",7)(12,"li",8)(13,"label",9),c(14),a(15,"translate"),l(),s(16,"div",10)(17,"input",11),I("ngModelChange",function(F){return B(n.roomName,F)||(n.roomName=F),F}),v("keyup.enter",function(){return n.closeModal(n.roomName)}),l()()()()(),s(18,"div",12)(19,"div",13)(20,"button",14),v("click",function(){return n.dismissModal()}),c(21),a(22,"translate"),l()(),f(23,"div",15),s(24,"div",16)(25,"button",17),v("click",function(){return n.closeModal(n.roomName)}),c(26),a(27,"translate"),l()()()()()),i&2&&(o(4),p(r(5,8,"accessories.button_add_room")),o(2),C("aria-label",r(7,10,"form.button_close")),o(8),p(r(15,12,"accessories.room_name")),o(3),T("ngModel",n.roomName),_("ngModelOptions",R(18,pe)),o(4),k(" ",r(22,14,"form.button_close")," "),o(4),_("disabled",!n.roomName),o(),k(" ",r(27,16,"form.button_save")," "))},dependencies:[Y,X,G,J,K,U,Q,E],encapsulation:2})}return t})();var me=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275cmp=M({type:t,selectors:[["app-drag-here-placeholder"]],decls:5,vars:3,consts:[[1,"accessory-box"],[1,"fas","fa-fw","fa-arrow-alt-circle-down","accessory-icon"],[1,"accessory-label"]],template:function(i,n){i&1&&(u(0,"div",0),A(1,"i",1),u(2,"div",2),c(3),a(4,"translate"),b()()),i&2&&(o(3),p(r(4,1,"accessories.control.drag_here")))},dependencies:[E],styles:[".accessory-box[_ngcontent-%COMP%]{opacity:.2}"]})}return t})();var ue=(t,g)=>({"fa-eye":t,"fa-eye-slash":g}),_e=t=>({"cursor-move":t}),be=t=>({"justify-content-between":t}),fe=t=>({link:t});function ge(t,g){if(t&1&&(s(0,"div",0)(1,"div",19)(2,"h5",20),c(3),a(4,"translate"),l()()()),t&2){let e=m().$implicit,i=m(2);o(2),_("ngClass",$(4,_e,!i.isMobile)),o(),k(" ",e.name==="Default Room"?r(4,2,"accessories.control.default_room"):e.name," ")}}function ve(t,g){if(t&1&&(s(0,"div",23),f(1,"app-accessory-tile",24),l()),t&2){let e=m().$implicit;o(),_("service",e)}}function xe(t,g){if(t&1&&w(0,ve,2,1,"div",23),t&2){let e=g.$implicit,i=m(4);S(!i.hideHidden||!e.hidden?0:-1)}}function Ce(t,g){if(t&1){let e=D();s(0,"div",21),I("dragulaModelChange",function(n){y(e);let d=m().$implicit;return B(d.services,n)||(d.services=n),h(n)}),L(1,xe,1,1,null,null,P),f(3,"div",22)(4,"div",22)(5,"div",22)(6,"div",22)(7,"div",22)(8,"div",22)(9,"div",22)(10,"div",22)(11,"div",22)(12,"div",22),l()}if(t&2){let e=m().$implicit,i=m(2);_("ngClass",$(3,be,i.isMobile))("dragula","services-bag"),T("dragulaModel",e.services),o(),N(e.services)}}function ye(t,g){if(t&1){let e=D();s(0,"div",25),I("dragulaModelChange",function(n){y(e);let d=m().$implicit;return B(d.services,n)||(d.services=n),h(n)}),f(1,"app-drag-here-placeholder",26),l()}if(t&2){let e=m().$implicit;_("dragula","services-bag"),T("dragulaModel",e.services)}}function he(t,g){if(t&1&&(s(0,"div"),w(1,ge,5,6,"div",0),s(2,"div",16),w(3,Ce,13,5,"div",17),w(4,ye,2,2,"div",18),l()()),t&2){let e=g.$implicit,i=m(2);o(),S(!i.isMobile||e.services.length?1:-1),o(2),S(e.services.length?3:-1),o(),S(!e.services.length&&!i.isMobile?4:-1)}}function Me(t,g){if(t&1){let e=D();s(0,"div",1)(1,"div",2)(2,"h3",3),c(3),a(4,"translate"),l()(),s(5,"div",4)(6,"button",5),a(7,"translate"),v("click",function(){y(e);let n=m();return h(n.openSupport())}),f(8,"i",6),l()(),s(9,"div",7)(10,"button",8),a(11,"translate"),a(12,"translate"),v("click",function(){y(e);let n=m();return h(n.addRoom())}),f(13,"i",9),l(),s(14,"button",8),a(15,"translate"),a(16,"translate"),a(17,"translate"),a(18,"translate"),v("click",function(){y(e);let n=m();return h(n.hideHidden=!n.hideHidden)}),f(19,"i",10),l(),s(20,"div",11)(21,"button",12),a(22,"translate"),a(23,"translate"),v("click",function(){y(e);let n=m();return h(n.toggleLayoutLock())}),f(24,"i",13),l(),s(25,"button",12),a(26,"translate"),a(27,"translate"),v("click",function(){y(e);let n=m();return h(n.toggleLayoutLock())}),f(28,"i",14),l()(),s(29,"button",5),a(30,"translate"),v("click",function(){y(e);let n=m();return h(n.openSupport())}),f(31,"i",6),l()()(),s(32,"div",15),I("dragulaModelChange",function(n){y(e);let d=m();return B(d.$accessories.rooms,n)||(d.$accessories.rooms=n),h(n)}),L(33,he,5,3,"div",null,P),l()}if(t&2){let e=m();o(3),p(r(4,18,"accessories.title_accessories")),o(3),C("aria-label",r(7,20,"support.title")),o(4),_("hidden",e.isMobile)("ngbTooltip",r(11,22,"accessories.button_add_room")),C("aria-label",r(12,24,"accessories.button_add_room")),o(4),_("hidden",e.isMobile)("ngbTooltip",e.hideHidden?r(15,26,"accessories.button_hidden_show"):r(16,28,"accessories.button_hidden_hide")),C("aria-label",e.hideHidden?r(17,30,"accessories.button_hidden_show"):r(18,32,"accessories.button_hidden_hide")),o(5),_("ngClass",j(44,ue,!e.hideHidden,e.hideHidden)),o(2),_("disabled",!e.isMobile)("ngbTooltip",r(22,34,"form.button_unlock")),C("aria-label",r(23,36,"form.button_unlock")),o(4),_("disabled",e.isMobile)("ngbTooltip",r(26,38,"form.button_lock")),C("aria-label",r(27,40,"form.button_lock")),o(4),C("aria-label",r(30,42,"support.title")),o(3),_("dragula","rooms-bag"),T("dragulaModel",e.$accessories.rooms),o(),N(e.$accessories.rooms)}}function Ee(t,g){t&1&&(s(0,"p",33),c(1),a(2,"translate"),l()),t&2&&(o(),p(r(2,1,"accessories.settings_link")))}function we(t,g){if(t&1&&(s(0,"div",0)(1,"div",27)(2,"h3",28),c(3),a(4,"translate"),l()(),s(5,"div",29)(6,"div",30)(7,"h5",31),c(8),a(9,"translate"),l(),f(10,"p",32),a(11,"translate"),w(12,Ee,3,3,"p",33),l()()()),t&2){let e=m();o(3),p(r(4,4,"accessories.title_accessories")),o(5),p(r(9,6,"accessories.control_disabled")),o(2),_("innerHTML",z(11,8,"accessories.message_must_use_insecure_mode",$(11,fe,e.linkInsecure)),W),o(2),S(e.isAdmin?12:-1)}}var it=(()=>{class t{$accessories=x(re);$auth=x(ae);dragulaService=x(te);$modal=x(Z);$settings=x(oe);$md=x(le);orderSubscription;isAdmin=this.$auth.user.admin;enableAccessories=this.$settings.env.enableAccessories;isMobile=!1;hideHidden=!0;linkInsecure='<a href="https://github.com/homebridge/homebridge-config-ui-x/wiki/Enabling-Accessory-Control" target="_blank"><i class="fa fa-fw fa-external-link-alt primary-text"></i></a>';constructor(){let e=this.dragulaService;this.isMobile=this.$md.detect.mobile(),e.createGroup("rooms-bag",{moves:(i,n,d)=>!this.isMobile&&d.classList.contains("drag-handle")}),e.createGroup("services-bag",{moves:i=>!this.isMobile&&!i.classList.contains("no-drag")}),this.orderSubscription=e.drop().subscribe(()=>{setTimeout(()=>{this.$accessories.saveLayout()})}),this.isMobile=!0}ngOnInit(){this.$accessories.start()}addRoom(){this.$modal.open(de,{size:"lg",backdrop:"static"}).result.then(e=>{!e||!e.length||this.$accessories.rooms.find(i=>i.name===e)||(this.$accessories.rooms.push({name:e,services:[]}),this.isMobile&&this.toggleLayoutLock())}).catch(()=>{})}toggleLayoutLock(){this.isMobile=!this.isMobile,this.isMobile?document.querySelectorAll(".services-bag").forEach(i=>{for(let n=0;n<10;n++){let d=document.createElement("div");d.className="accessory-box invisible py-0 my-0",d.style.height="0",i.appendChild(d)}}):document.querySelectorAll(".invisible").forEach(i=>i.remove())}openSupport(){this.$modal.open(ce,{size:"lg",backdrop:"static"})}ngOnDestroy(){this.$accessories.stop(),this.orderSubscription.unsubscribe(),this.dragulaService.destroy("rooms-bag"),this.dragulaService.destroy("services-bag")}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=M({type:t,selectors:[["app-accessories"]],decls:2,vars:1,consts:[[1,"row"],[1,"row","mb-3"],[1,"col-9","col-sm-6"],[1,"primary-text","m-0"],[1,"col-3","col-sm-6","text-end","d-inline-block","d-sm-none"],["type","button",1,"btn","btn-elegant","my-0","me-0",3,"click"],[1,"fa","fa-fw","fa-question-circle-o"],[1,"col-3","col-sm-6","text-end","d-none","d-sm-inline-block"],["type","button","container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","my-0","me-2",3,"click","hidden","ngbTooltip"],[1,"fas","fa-fw","fa-folder-plus"],[1,"fas","fa-fw",3,"ngClass"],["role","group",1,"btn-group","me-2"],["type","button","container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","my-0",3,"click","disabled","ngbTooltip"],[1,"fas","fa-fw","fa-unlock"],[1,"fas","fa-fw","fa-lock"],[3,"dragulaModelChange","dragula","dragulaModel"],[1,"row","mb-4"],[1,"col-md-12","d-flex","flex-wrap","noselect","services-bag",3,"ngClass","dragula","dragulaModel"],[1,"col-md-12","d-flex","flex-wrap","noselect",3,"dragula","dragulaModel"],[1,"col-md-12"],[1,"primary-text","drag-handle","room-title","m-0","mb-1","mb-sm-0",3,"ngClass"],[1,"col-md-12","d-flex","flex-wrap","noselect","services-bag",3,"dragulaModelChange","ngClass","dragula","dragulaModel"],[1,"accessory-box","invisible","py-0","my-0",2,"height","0"],[1,"accessory-item","accessory-tab"],[3,"service"],[1,"col-md-12","d-flex","flex-wrap","noselect",3,"dragulaModelChange","dragula","dragulaModel"],[1,"no-drag"],[1,"col-12"],[1,"primary-text","m-0","mb-3"],[1,"col-12","text-center"],["role","alert",1,"alert","alert-warning","p-4"],[1,"mb-3","mt-0"],[1,"mb-0",3,"innerHTML"],[1,"mt-3","mb-0"]],template:function(i,n){i&1&&w(0,Me,35,47)(1,we,13,13,"div",0),i&2&&S(n.enableAccessories?0:1)},dependencies:[ee,q,ne,ie,se,me,E],styles:[".room-title[_ngcontent-%COMP%]{margin-left:10px}@media (max-width: 575px){.room-title[_ngcontent-%COMP%]{margin-left:7px}}.services-bag[_ngcontent-%COMP%]{min-height:170px}@media (max-width: 575px){.services-bag[_ngcontent-%COMP%]{min-height:initial}}.cursor-move[_ngcontent-%COMP%]{cursor:move}.gu-transit[_ngcontent-%COMP%] .manage-accessory-button[_ngcontent-%COMP%]{display:none}a[_ngcontent-%COMP%]:hover{text-decoration:none!important}"]})}return t})();export{it as AccessoriesComponent};
1
+ import{a as se}from"./chunk-FPJPIOST.js";import{a as te,b as ie,c as ne}from"./chunk-BYJZ4WBV.js";import{c as re}from"./chunk-K7WA5KOE.js";import"./chunk-KECVWPQI.js";import{a as le}from"./chunk-P3TP4J62.js";import{m as V,n as Z,t as ee}from"./chunk-PSSVCFFV.js";import{c as G,e as J,f as K,i as Q,l as U,m as X,z as Y}from"./chunk-K2NEWUWG.js";import"./chunk-RO5J6JA4.js";import{b as ae}from"./chunk-KS7RCH5Z.js";import"./chunk-QRQBCPWO.js";import{b as oe}from"./chunk-C2UUY7C4.js";import"./chunk-Z355YUUI.js";import{b as E}from"./chunk-ZG3HINDJ.js";import"./chunk-K7QEGT3E.js";import{Cc as R,Dc as $,Ec as j,Hb as C,Hc as a,Ib as w,Ic as r,Jb as S,Jc as z,Lb as P,Mb as L,Nb as N,Ob as _,Pb as s,Qb as l,Rb as f,Sb as u,Tb as b,Ub as A,Xa as W,_b as D,ab as o,bc as v,cc as H,dc as m,id as q,la as x,mb as M,qc as c,ra as y,rc as p,sa as h,sc as k,xc as T,yc as B,zc as I}from"./chunk-V7SOQAC5.js";var ce=(()=>{class t{$activeModal=x(V);dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=M({type:t,selectors:[["ng-component"]],decls:41,vars:30,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-fw","fa-question-circle-o","primary-text",2,"font-size","75px"],[1,"ms-2"],[1,"mb-0"],[1,"ms-2","mt-2"],[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(i,n){i&1&&(u(0,"div",0)(1,"form")(2,"div",1)(3,"h5",2),c(4),a(5,"translate"),b(),u(6,"button",3),a(7,"translate"),H("click",function(){return n.dismissModal()}),b()(),u(8,"div",4)(9,"div",5),A(10,"i",6),b(),u(11,"h5",7),c(12),a(13,"translate"),b(),u(14,"ul",8)(15,"li"),c(16),a(17,"translate"),b(),u(18,"li"),c(19),a(20,"translate"),b()(),u(21,"h5",9),c(22),a(23,"translate"),b(),u(24,"ul",8)(25,"li"),c(26),a(27,"translate"),b(),u(28,"li"),c(29),a(30,"translate"),b(),u(31,"li"),c(32),a(33,"translate"),b()()(),u(34,"div",10),A(35,"div",11),u(36,"div",12)(37,"button",13),H("click",function(){return n.dismissModal()}),c(38),a(39,"translate"),b()(),A(40,"div",14),b()()()),i&2&&(o(4),p(r(5,10,"support.title")),o(2),C("aria-label",r(7,12,"form.button_close")),o(6),p(r(13,14,"accessories.title_accessories")),o(4),p(r(17,16,"accessories.support.acc_1")),o(3),p(r(20,18,"accessories.support.acc_2")),o(3),p(r(23,20,"accessories.title_rooms")),o(4),p(r(27,22,"accessories.support.rooms_1")),o(3),p(r(30,24,"accessories.support.rooms_2")),o(3),p(r(33,26,"accessories.support.rooms_3")),o(6),k(" ",r(39,28,"form.button_close")," "))},dependencies:[E],encapsulation:2})}return t})();var pe=()=>({standalone:!0}),de=(()=>{class t{$activeModal=x(V);roomName;dismissModal(){this.$activeModal.dismiss("Dismiss")}closeModal(e){this.$activeModal.close(e)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=M({type:t,selectors:[["ng-component"]],inputs:{roomName:"roomName"},decls:28,vars:19,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,"fas","fa-fw","fa-folder-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-name",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["autocomplete","off","type","text","id","form-name","autofocus","",1,"form-control","custom-input",3,"ngModelChange","keyup.enter","ngModel","ngModelOptions"],[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-primary",3,"click","disabled"]],template:function(i,n){i&1&&(s(0,"div",0)(1,"form")(2,"div",1)(3,"h5",2),c(4),a(5,"translate"),l(),s(6,"button",3),a(7,"translate"),v("click",function(){return n.dismissModal()}),l()(),s(8,"div",4)(9,"div",5),f(10,"i",6),l(),s(11,"ul",7)(12,"li",8)(13,"label",9),c(14),a(15,"translate"),l(),s(16,"div",10)(17,"input",11),I("ngModelChange",function(F){return B(n.roomName,F)||(n.roomName=F),F}),v("keyup.enter",function(){return n.closeModal(n.roomName)}),l()()()()(),s(18,"div",12)(19,"div",13)(20,"button",14),v("click",function(){return n.dismissModal()}),c(21),a(22,"translate"),l()(),f(23,"div",15),s(24,"div",16)(25,"button",17),v("click",function(){return n.closeModal(n.roomName)}),c(26),a(27,"translate"),l()()()()()),i&2&&(o(4),p(r(5,8,"accessories.button_add_room")),o(2),C("aria-label",r(7,10,"form.button_close")),o(8),p(r(15,12,"accessories.room_name")),o(3),T("ngModel",n.roomName),_("ngModelOptions",R(18,pe)),o(4),k(" ",r(22,14,"form.button_close")," "),o(4),_("disabled",!n.roomName),o(),k(" ",r(27,16,"form.button_save")," "))},dependencies:[Y,X,G,J,K,U,Q,E],encapsulation:2})}return t})();var me=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275cmp=M({type:t,selectors:[["app-drag-here-placeholder"]],decls:5,vars:3,consts:[[1,"accessory-box"],[1,"fas","fa-fw","fa-arrow-alt-circle-down","accessory-icon"],[1,"accessory-label"]],template:function(i,n){i&1&&(u(0,"div",0),A(1,"i",1),u(2,"div",2),c(3),a(4,"translate"),b()()),i&2&&(o(3),p(r(4,1,"accessories.control.drag_here")))},dependencies:[E],styles:[".accessory-box[_ngcontent-%COMP%]{opacity:.2}"]})}return t})();var ue=(t,g)=>({"fa-eye":t,"fa-eye-slash":g}),_e=t=>({"cursor-move":t}),be=t=>({"justify-content-between":t}),fe=t=>({link:t});function ge(t,g){if(t&1&&(s(0,"div",0)(1,"div",19)(2,"h5",20),c(3),a(4,"translate"),l()()()),t&2){let e=m().$implicit,i=m(2);o(2),_("ngClass",$(4,_e,!i.isMobile)),o(),k(" ",e.name==="Default Room"?r(4,2,"accessories.control.default_room"):e.name," ")}}function ve(t,g){if(t&1&&(s(0,"div",23),f(1,"app-accessory-tile",24),l()),t&2){let e=m().$implicit;o(),_("service",e)}}function xe(t,g){if(t&1&&w(0,ve,2,1,"div",23),t&2){let e=g.$implicit,i=m(4);S(!i.hideHidden||!e.hidden?0:-1)}}function Ce(t,g){if(t&1){let e=D();s(0,"div",21),I("dragulaModelChange",function(n){y(e);let d=m().$implicit;return B(d.services,n)||(d.services=n),h(n)}),L(1,xe,1,1,null,null,P),f(3,"div",22)(4,"div",22)(5,"div",22)(6,"div",22)(7,"div",22)(8,"div",22)(9,"div",22)(10,"div",22)(11,"div",22)(12,"div",22),l()}if(t&2){let e=m().$implicit,i=m(2);_("ngClass",$(3,be,i.isMobile))("dragula","services-bag"),T("dragulaModel",e.services),o(),N(e.services)}}function ye(t,g){if(t&1){let e=D();s(0,"div",25),I("dragulaModelChange",function(n){y(e);let d=m().$implicit;return B(d.services,n)||(d.services=n),h(n)}),f(1,"app-drag-here-placeholder",26),l()}if(t&2){let e=m().$implicit;_("dragula","services-bag"),T("dragulaModel",e.services)}}function he(t,g){if(t&1&&(s(0,"div"),w(1,ge,5,6,"div",0),s(2,"div",16),w(3,Ce,13,5,"div",17),w(4,ye,2,2,"div",18),l()()),t&2){let e=g.$implicit,i=m(2);o(),S(!i.isMobile||e.services.length?1:-1),o(2),S(e.services.length?3:-1),o(),S(!e.services.length&&!i.isMobile?4:-1)}}function Me(t,g){if(t&1){let e=D();s(0,"div",1)(1,"div",2)(2,"h3",3),c(3),a(4,"translate"),l()(),s(5,"div",4)(6,"button",5),a(7,"translate"),v("click",function(){y(e);let n=m();return h(n.openSupport())}),f(8,"i",6),l()(),s(9,"div",7)(10,"button",8),a(11,"translate"),a(12,"translate"),v("click",function(){y(e);let n=m();return h(n.addRoom())}),f(13,"i",9),l(),s(14,"button",8),a(15,"translate"),a(16,"translate"),a(17,"translate"),a(18,"translate"),v("click",function(){y(e);let n=m();return h(n.hideHidden=!n.hideHidden)}),f(19,"i",10),l(),s(20,"div",11)(21,"button",12),a(22,"translate"),a(23,"translate"),v("click",function(){y(e);let n=m();return h(n.toggleLayoutLock())}),f(24,"i",13),l(),s(25,"button",12),a(26,"translate"),a(27,"translate"),v("click",function(){y(e);let n=m();return h(n.toggleLayoutLock())}),f(28,"i",14),l()(),s(29,"button",5),a(30,"translate"),v("click",function(){y(e);let n=m();return h(n.openSupport())}),f(31,"i",6),l()()(),s(32,"div",15),I("dragulaModelChange",function(n){y(e);let d=m();return B(d.$accessories.rooms,n)||(d.$accessories.rooms=n),h(n)}),L(33,he,5,3,"div",null,P),l()}if(t&2){let e=m();o(3),p(r(4,18,"accessories.title_accessories")),o(3),C("aria-label",r(7,20,"support.title")),o(4),_("hidden",e.isMobile)("ngbTooltip",r(11,22,"accessories.button_add_room")),C("aria-label",r(12,24,"accessories.button_add_room")),o(4),_("hidden",e.isMobile)("ngbTooltip",e.hideHidden?r(15,26,"accessories.button_hidden_show"):r(16,28,"accessories.button_hidden_hide")),C("aria-label",e.hideHidden?r(17,30,"accessories.button_hidden_show"):r(18,32,"accessories.button_hidden_hide")),o(5),_("ngClass",j(44,ue,!e.hideHidden,e.hideHidden)),o(2),_("disabled",!e.isMobile)("ngbTooltip",r(22,34,"form.button_unlock")),C("aria-label",r(23,36,"form.button_unlock")),o(4),_("disabled",e.isMobile)("ngbTooltip",r(26,38,"form.button_lock")),C("aria-label",r(27,40,"form.button_lock")),o(4),C("aria-label",r(30,42,"support.title")),o(3),_("dragula","rooms-bag"),T("dragulaModel",e.$accessories.rooms),o(),N(e.$accessories.rooms)}}function Ee(t,g){t&1&&(s(0,"p",33),c(1),a(2,"translate"),l()),t&2&&(o(),p(r(2,1,"accessories.settings_link")))}function we(t,g){if(t&1&&(s(0,"div",0)(1,"div",27)(2,"h3",28),c(3),a(4,"translate"),l()(),s(5,"div",29)(6,"div",30)(7,"h5",31),c(8),a(9,"translate"),l(),f(10,"p",32),a(11,"translate"),w(12,Ee,3,3,"p",33),l()()()),t&2){let e=m();o(3),p(r(4,4,"accessories.title_accessories")),o(5),p(r(9,6,"accessories.control_disabled")),o(2),_("innerHTML",z(11,8,"accessories.message_must_use_insecure_mode",$(11,fe,e.linkInsecure)),W),o(2),S(e.isAdmin?12:-1)}}var it=(()=>{class t{$accessories=x(re);$auth=x(ae);dragulaService=x(te);$modal=x(Z);$settings=x(oe);$md=x(le);orderSubscription;isAdmin=this.$auth.user.admin;enableAccessories=this.$settings.env.enableAccessories;isMobile=!1;hideHidden=!0;linkInsecure='<a href="https://github.com/homebridge/homebridge-config-ui-x/wiki/Enabling-Accessory-Control" target="_blank"><i class="fa fa-fw fa-external-link-alt primary-text"></i></a>';constructor(){let e=this.dragulaService;this.isMobile=this.$md.detect.mobile(),e.createGroup("rooms-bag",{moves:(i,n,d)=>!this.isMobile&&d.classList.contains("drag-handle")}),e.createGroup("services-bag",{moves:i=>!this.isMobile&&!i.classList.contains("no-drag")}),this.orderSubscription=e.drop().subscribe(()=>{setTimeout(()=>{this.$accessories.saveLayout()})}),this.isMobile=!0}ngOnInit(){this.$accessories.start()}addRoom(){this.$modal.open(de,{size:"lg",backdrop:"static"}).result.then(e=>{!e||!e.length||this.$accessories.rooms.find(i=>i.name===e)||(this.$accessories.rooms.push({name:e,services:[]}),this.isMobile&&this.toggleLayoutLock())}).catch(()=>{})}toggleLayoutLock(){this.isMobile=!this.isMobile,this.isMobile?document.querySelectorAll(".services-bag").forEach(i=>{for(let n=0;n<10;n++){let d=document.createElement("div");d.className="accessory-box invisible py-0 my-0",d.style.height="0",i.appendChild(d)}}):document.querySelectorAll(".invisible").forEach(i=>i.remove())}openSupport(){this.$modal.open(ce,{size:"lg",backdrop:"static"})}ngOnDestroy(){this.$accessories.stop(),this.orderSubscription.unsubscribe(),this.dragulaService.destroy("rooms-bag"),this.dragulaService.destroy("services-bag")}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=M({type:t,selectors:[["app-accessories"]],decls:2,vars:1,consts:[[1,"row"],[1,"row","mb-3"],[1,"col-9","col-sm-6"],[1,"primary-text","m-0"],[1,"col-3","col-sm-6","text-end","d-inline-block","d-sm-none"],["type","button",1,"btn","btn-elegant","my-0","me-0",3,"click"],[1,"fa","fa-fw","fa-question-circle-o"],[1,"col-3","col-sm-6","text-end","d-none","d-sm-inline-block"],["type","button","container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","my-0","me-2",3,"click","hidden","ngbTooltip"],[1,"fas","fa-fw","fa-folder-plus"],[1,"fas","fa-fw",3,"ngClass"],["role","group",1,"btn-group","me-2"],["type","button","container","body","placement","bottom","openDelay","150","triggers","hover",1,"btn","btn-elegant","my-0",3,"click","disabled","ngbTooltip"],[1,"fas","fa-fw","fa-unlock"],[1,"fas","fa-fw","fa-lock"],[3,"dragulaModelChange","dragula","dragulaModel"],[1,"row","mb-4"],[1,"col-md-12","d-flex","flex-wrap","noselect","services-bag",3,"ngClass","dragula","dragulaModel"],[1,"col-md-12","d-flex","flex-wrap","noselect",3,"dragula","dragulaModel"],[1,"col-md-12"],[1,"primary-text","drag-handle","room-title","m-0","mb-1","mb-sm-0",3,"ngClass"],[1,"col-md-12","d-flex","flex-wrap","noselect","services-bag",3,"dragulaModelChange","ngClass","dragula","dragulaModel"],[1,"accessory-box","invisible","py-0","my-0",2,"height","0"],[1,"accessory-item","accessory-tab"],[3,"service"],[1,"col-md-12","d-flex","flex-wrap","noselect",3,"dragulaModelChange","dragula","dragulaModel"],[1,"no-drag"],[1,"col-12"],[1,"primary-text","m-0","mb-3"],[1,"col-12","text-center"],["role","alert",1,"alert","alert-warning","p-4"],[1,"mb-3","mt-0"],[1,"mb-0",3,"innerHTML"],[1,"mt-3","mb-0"]],template:function(i,n){i&1&&w(0,Me,35,47)(1,we,13,13,"div",0),i&2&&S(n.enableAccessories?0:1)},dependencies:[ee,q,ne,ie,se,me,E],styles:[".room-title[_ngcontent-%COMP%]{margin-left:10px}@media (max-width: 575px){.room-title[_ngcontent-%COMP%]{margin-left:7px}}.services-bag[_ngcontent-%COMP%]{min-height:170px}@media (max-width: 575px){.services-bag[_ngcontent-%COMP%]{min-height:initial}}.cursor-move[_ngcontent-%COMP%]{cursor:move}.gu-transit[_ngcontent-%COMP%] .manage-accessory-button[_ngcontent-%COMP%]{display:none}a[_ngcontent-%COMP%]:hover{text-decoration:none!important}"]})}return t})();export{it as AccessoriesComponent};
@@ -1 +1 @@
1
- import{a as le}from"./chunk-EM3VXCLF.js";import{g as W,m as j,n as oe}from"./chunk-IVU5NZ6Q.js";import{A as P,b as re,c as V,d as x,e as N,f as O,g as A,j as w,m as Q,o as H,p as J,q as K,x as ae,z as G}from"./chunk-VCD26PYR.js";import{b as X}from"./chunk-PF574E5L.js";import{b as se}from"./chunk-NSYXJMRL.js";import{a as ve}from"./chunk-6GRAO5OI.js";import{k,n as B}from"./chunk-OMLTIUY5.js";import{a as $,b as U}from"./chunk-TVAJZAL5.js";import"./chunk-NLGVT4MV.js";import{$b as L,Dc as F,Hb as u,Hc as o,Ib as h,Ic as s,Jb as g,Jc as ne,Lb as ee,Mb as te,Nb as ie,Ob as f,Pb as r,Qb as n,Rb as c,Sb as S,Tb as D,Ub as q,_b as I,ab as e,bc as _,cc as z,dc as v,g as _e,id as R,la as p,mb as y,qc as m,ra as T,rc as d,sa as M,sc as C}from"./chunk-OXBT7KSO.js";function xe(i,E){i&1&&(r(0,"ngb-alert",13)(1,"p",20),m(2),o(3,"translate"),n()()),i&2&&(f("dismissible",!1),e(2),d(s(3,2,"login.invalid_password")))}var me=(()=>{class i{$activeModal=p(j);$api=p(B);$toastr=p(k);$translate=p($);invalidCredentials=!1;formGroup=new A({password:new w("",[x.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(a){return new(a||i)};static \u0275cmp=y({type:i,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-fw","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(a,l){a&1&&(r(0,"div",0)(1,"div",1)(2,"h5",2),m(3),o(4,"translate"),n(),r(5,"button",3),o(6,"translate"),_("click",function(){return l.dismissModal()}),n()(),r(7,"div",4)(8,"div",5),c(9,"i",6),n(),r(10,"ul",7)(11,"li"),m(12),o(13,"translate"),n()(),r(14,"ul",8)(15,"li",9)(16,"label",10),m(17),o(18,"translate"),n(),r(19,"div",11),c(20,"input",12),o(21,"translate"),n()()(),h(22,xe,4,4,"ngb-alert",13),n(),r(23,"div",14)(24,"div",15)(25,"button",16),o(26,"translate"),_("click",function(){return l.dismissModal()}),m(27),o(28,"translate"),n()(),c(29,"div",17),r(30,"div",18)(31,"button",19),_("click",function(){return l.disable2fa()}),m(32),o(33,"translate"),n()()()()),a&2&&(e(3),d(s(4,11,"users.setup_2fa_disable")),e(2),u("aria-label",s(6,13,"form.button_close")),e(7),d(s(13,15,"users.setup_2fa_disable_current_password")),e(5),d(s(18,17,"users.label_password")),e(3),f("formControl",l.formGroup.controls.password)("placeholder",s(21,19,"users.label_password")),e(2),g(l.invalidCredentials&&!l.formGroup.controls.password.value?22:-1),e(3),u("aria-label",s(26,21,"form.button_close")),e(2),C(" ",s(28,23,"form.button_close")," "),e(4),f("disabled",l.formGroup.invalid),e(),C(" ",s(33,25,"form.button_disable")," "))},dependencies:[G,V,N,P,H,W,U],encapsulation:2})}return i})();var de=_e(ve(),1);var we=i=>({timeDiffError:i});function Ce(i,E){i&1&&(r(0,"li"),m(1),o(2,"translate"),n()),i&2&&(e(),d(s(2,1,"users.setup_2fa_scan_qr_code")))}function he(i,E){if(i&1&&(r(0,"ngb-alert",8)(1,"p",16),m(2),o(3,"translate"),n(),r(4,"p",17),m(5),o(6,"translate"),n()()),i&2){let t=v();f("dismissible",!1),e(2),d(s(3,3,"users.setup_2fa_cannot_setup_2fa")),e(3),d(ne(6,5,"users.setup_2fa_server_time_out",F(8,we,t.timeDiffError)))}}function ge(i,E){if(i&1&&(r(0,"ul",9)(1,"li",18)(2,"div",19),c(3,"app-qrcode",20),n()(),r(4,"li",21)(5,"label",22),m(6),o(7,"translate"),n(),r(8,"div",23),c(9,"input",24),n()()()),i&2){let t=v();e(3),f("data",t.otpString),e(3),d(s(7,3,"users.setup_2fa_enter_code")),e(3),f("formControl",t.formGroup.controls.code)}}function Ee(i,E){if(i&1){let t=I();r(0,"button",25),o(1,"translate"),_("click",function(){T(t);let l=v();return M(l.dismissModal())}),m(2),o(3,"translate"),n()}i&2&&(u("aria-label",s(1,2,"form.button_close")),e(2),C(" ",s(3,4,"form.button_close")," "))}function ye(i,E){if(i&1){let t=I();r(0,"button",25),o(1,"translate"),_("click",function(){T(t);let l=v();return M(l.dismissModal())}),m(2),o(3,"translate"),n()}i&2&&(u("aria-label",s(1,2,"form.button_close")),e(2),C(" ",s(3,4,"form.button_close")," "))}function Se(i,E){if(i&1){let t=I();r(0,"button",26),_("click",function(){T(t);let l=v();return M(l.enable2fa())}),m(1),o(2,"translate"),n()}if(i&2){let t=v();f("disabled",t.formGroup.invalid),e(),C(" ",s(2,2,"form.button_enable")," ")}}var pe=(()=>{class i{$activeModal=p(j);$api=p(B);$toastr=p(k);$translate=p($);user;timeDiffError=null;otpString;formGroup=new A({code:new w("",[x.required,x.minLength(6),x.maxLength(6)])});ngOnInit(){this.$api.post("/users/otp/setup",{}).subscribe({next:t=>{this.checkTimeDiff(t.timestamp),this.timeDiffError||(this.otpString=t.otpauth)},error:t=>{this.$activeModal.dismiss(),console.error(t),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:t=>{console.error(t),this.$toastr.error(this.$translate.instant("users.setup_2fa_activate_error"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}checkTimeDiff(t){let a=(0,de.default)(t).diff(new Date,"millisecond");a<-5e3||a>5e3?this.timeDiffError=a:this.timeDiffError=null}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=y({type:i,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-fw","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"],[1,"mx-auto",2,"width","175px","height","175px",3,"data"],[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"],["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(a,l){a&1&&(r(0,"div",0)(1,"div",1)(2,"h5",2),m(3),o(4,"translate"),n(),r(5,"button",3),o(6,"translate"),_("click",function(){return l.dismissModal()}),n()(),r(7,"div",4)(8,"div",5),c(9,"i",6),n(),r(10,"ul",7)(11,"li"),m(12),o(13,"translate"),n(),h(14,Ce,3,3,"li"),n(),h(15,he,7,10,"ngb-alert",8),h(16,ge,10,5,"ul",9),n(),r(17,"div",10)(18,"div",11),h(19,Ee,4,6,"button",12),n(),r(20,"div",13),h(21,ye,4,6,"button",12),n(),r(22,"div",14),h(23,Se,3,4,"button",15),n()()()),a&2&&(e(3),d(s(4,9,"users.setup_2fa")),e(2),u("aria-label",s(6,11,"form.button_close")),e(7),d(s(13,13,"users.setup_2fa_warning")),e(2),g(l.timeDiffError?-1:14),e(),g(l.timeDiffError?15:-1),e(),g(l.timeDiffError?-1:16),e(3),g(l.timeDiffError?-1:19),e(2),g(l.timeDiffError?21:-1),e(2),g(l.timeDiffError?-1:23))},dependencies:[W,le,G,V,N,ae,P,H,U],encapsulation:2})}return i})();var ce=i=>({"is-invalid":i}),ue=(()=>{class i{$activeModal=p(j);$api=p(B);$toastr=p(k);$translate=p($);form=new A({username:new w("",[x.required]),name:new w("",[x.required]),password:new w("",[x.compose([x.required,x.minLength(4)])]),passwordConfirm:new w("",[x.required]),admin:new w(!0)},this.matchPassword);onSubmit({value:t}){this.$api.post("/users",t).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.toast_added_new_user"),this.$translate.instant("toast.title_success"))},error:a=>{this.$toastr.error(a.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}matchPassword(t){let a=t.get("password").value,l=t.get("passwordConfirm").value;if(a!==l)t.get("passwordConfirm").setErrors({matchPassword:!0});else return null}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=y({type:i,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-fw","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"],["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(a,l){a&1&&(r(0,"div",0)(1,"form",1),_("ngSubmit",function(){return l.onSubmit(l.form)}),r(2,"div",2)(3,"h5",3),m(4),o(5,"translate"),n(),r(6,"button",4),o(7,"translate"),_("click",function(){return l.dismissModal()}),n()(),r(8,"div",5)(9,"div",6),c(10,"i",7),n(),r(11,"ul",8)(12,"li",9)(13,"label",10),m(14),o(15,"translate"),n(),r(16,"div",11),c(17,"input",12),o(18,"translate"),n()(),r(19,"li",9)(20,"label",13),m(21),o(22,"translate"),n(),r(23,"div",11),c(24,"input",14),o(25,"translate"),n()(),r(26,"li",9)(27,"label",15),m(28),o(29,"translate"),n(),r(30,"div",11),c(31,"input",16),o(32,"translate"),n()(),r(33,"li",9)(34,"label",17),m(35),o(36,"translate"),n(),r(37,"div",11),c(38,"input",18),o(39,"translate"),n()(),r(40,"li",19)(41,"span",20),m(42),o(43,"translate"),n(),r(44,"div",21),c(45,"input",22),o(46,"translate"),c(47,"label",23),n()()()(),r(48,"div",24)(49,"div",20)(50,"button",25),_("click",function(){return l.dismissModal()}),m(51),o(52,"translate"),n()(),c(53,"div",26),r(54,"div",27)(55,"button",28),m(56),o(57,"translate"),n()()()()()),a&2&&(e(),f("formGroup",l.form),e(3),d(s(5,18,"users.title_add_user")),e(2),u("aria-label",s(7,20,"form.button_close")),e(8),d(s(15,22,"users.label_username")),e(3),u("aria-label",s(18,24,"users.label_username")),e(4),d(s(22,26,"users.label_full_name")),e(3),u("aria-label",s(25,28,"users.label_full_name")),e(4),d(s(29,30,"users.label_password")),e(3),f("ngClass",F(46,ce,l.form.controls.password.dirty&&l.form.controls.password.errors)),u("aria-label",s(32,32,"users.label_password")),e(4),d(s(36,34,"users.label_confirm_password")),e(3),f("ngClass",F(48,ce,l.form.controls.passwordConfirm.dirty&&l.form.controls.passwordConfirm.errors)),u("aria-label",s(39,36,"users.label_confirm_password")),e(4),d(s(43,38,"users.label_admin_user")),e(3),u("aria-label",s(46,40,"users.label_admin_user")),e(6),C(" ",s(52,42,"form.button_close")," "),e(4),f("disabled",!l.form.valid),e(),C(" ",s(57,44,"form.button_save")," "))},dependencies:[G,Q,V,N,O,P,J,K,R,U],encapsulation:2})}return i})();var fe=i=>({"is-invalid":i});function $e(i,E){if(i&1&&(r(0,"li",9)(1,"label",27),m(2),o(3,"translate"),n(),r(4,"div",11),c(5,"input",28),o(6,"translate"),n()()),i&2){let t=v();e(2),d(s(3,3,"users.label_confirm_password")),e(3),f("ngClass",F(7,fe,t.form.controls.passwordConfirm.dirty&&t.form.controls.passwordConfirm.errors)),u("aria-label",s(6,5,"users.label_confirm_password"))}}var be=(()=>{class i{$activeModal=p(j);$api=p(B);$auth=p(X);$toastr=p(k);$translate=p($);user;isCurrentUser=!1;form=new A({username:new w("",[x.required]),name:new w("",[x.required]),password:new w(""),passwordConfirm:new w(""),admin:new w(!0)},this.matchPassword);ngOnInit(){this.isCurrentUser=this.$auth.user.username===this.user.username,this.form.patchValue(this.user)}onSubmit({value:t}){this.$api.patch(`/users/${this.user.id}`,t).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.toast_updated_user"),this.$translate.instant("toast.title_success")),this.isCurrentUser&&t.username!==this.$auth.user.username&&this.$auth.logout()},error:a=>{console.error(a),this.$toastr.error(a.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}matchPassword(t){let a=t.get("password").value,l=t.get("passwordConfirm").value;if(a!==l)t.get("passwordConfirm").setErrors({matchPassword:!0});else return null}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=y({type:i,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-fw","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(a,l){a&1&&(r(0,"div",0)(1,"form",1),_("ngSubmit",function(){return l.onSubmit(l.form)}),r(2,"div",2)(3,"h5",3),m(4),o(5,"translate"),n(),r(6,"button",4),o(7,"translate"),_("click",function(){return l.dismissModal()}),n()(),r(8,"div",5)(9,"div",6),c(10,"i",7),n(),r(11,"ul",8)(12,"li",9)(13,"label",10),m(14),o(15,"translate"),n(),r(16,"div",11),c(17,"input",12),o(18,"translate"),n()(),r(19,"li",9)(20,"label",13),m(21),o(22,"translate"),n(),r(23,"div",11),c(24,"input",14),o(25,"translate"),n()(),r(26,"li",9)(27,"label",15),m(28),o(29,"translate"),n(),r(30,"div",11),c(31,"input",16),o(32,"translate"),n()(),h(33,$e,7,9,"li",9),r(34,"li",17)(35,"span",18),m(36),o(37,"translate"),n(),r(38,"div",19),c(39,"input",20),o(40,"translate"),c(41,"label",21),n()()()(),r(42,"div",22)(43,"div",18)(44,"button",23),_("click",function(){return l.dismissModal()}),m(45),o(46,"translate"),n()(),c(47,"div",24),r(48,"div",25)(49,"button",26),m(50),o(51,"translate"),n()()()()()),a&2&&(e(),f("formGroup",l.form),e(3),d(s(5,16,"users.title_edit_user")),e(2),u("aria-label",s(7,18,"form.button_close")),e(8),d(s(15,20,"users.label_username")),e(3),u("aria-label",s(18,22,"users.label_username")),e(4),d(s(22,24,"users.label_full_name")),e(3),u("aria-label",s(25,26,"users.label_full_name")),e(4),d(s(29,28,"users.label_new_password")),e(3),f("ngClass",F(40,fe,l.form.controls.password.dirty&&l.form.controls.password.errors)),u("aria-label",s(32,30,"users.label_new_password")),e(2),g(l.form.controls.password.value?33:-1),e(3),d(s(37,32,"users.label_admin_user")),e(3),u("aria-label",s(40,34,"users.label_admin_user")),e(6),C(" ",s(46,36,"form.button_close")," "),e(4),f("disabled",!l.form.valid),e(),C(" ",s(51,38,"form.button_save")," "))},dependencies:[G,Q,V,re,N,O,P,J,K,R,U],encapsulation:2})}return i})();function Ue(i,E){if(i&1){let t=I();S(0,"button",21),z("click",function(){T(t);let l=v().$implicit,b=v();return M(b.setup2fa(l))}),m(1),o(2,"translate"),D()}i&2&&(e(),d(s(2,1,"users.setup_2fa")))}function ke(i,E){if(i&1){let t=I();S(0,"button",17),z("click",function(){T(t);let l=v().$implicit,b=v();return M(b.disable2fa(l))}),m(1),o(2,"translate"),D()}i&2&&(e(),C(" ",s(2,1,"users.setup_2fa_disable")," "))}function Be(i,E){if(i&1){let t=I();S(0,"div",7)(1,"div",8)(2,"div",9)(3,"div",10)(4,"span",11),q(5,"h4",12)(6,"h5",13),D()(),S(7,"div",14),h(8,Ue,3,3,"button",15),h(9,ke,3,3,"button",16),S(10,"div")(11,"button",17),o(12,"translate"),z("click",function(){let l=T(t).$implicit,b=v();return M(b.openEditUser(l))}),q(13,"i",18),D(),S(14,"button",19),o(15,"translate"),z("click",function(){let l=T(t).$implicit,b=v();return M(b.deleteUser(l.id))}),q(16,"i",20),D()()()()()()}if(i&2){let t=E.$implicit,a=v();e(5),L("innerText",t.name),e(),L("innerText",t.username),e(2),g(a.username===t.username&&!t.otpActive?8:-1),e(),g(a.username===t.username&&t.otpActive?9:-1),e(2),u("aria-label",s(12,7,"form.button_edit")),e(3),L("disabled",a.username===t.username),u("aria-label",s(15,9,"form.button_delete"))}}var $t=(()=>{class i{$api=p(B);$auth=p(X);$modal=p(oe);$route=p(se);$toastr=p(k);$translate=p($);homebridgeUsers;username=this.$auth.user.username;ngOnInit(){this.$route.data.subscribe(t=>{this.homebridgeUsers=t.homebridgeUsers})}reloadUsers(){return this.$api.get("/users").subscribe(t=>{this.homebridgeUsers=t})}openAddNewUser(){this.$modal.open(ue,{size:"lg",backdrop:"static"}).result.finally(()=>{this.reloadUsers()})}openEditUser(t){let a=this.$modal.open(be,{size:"lg",backdrop:"static"});a.componentInstance.user=t,a.result.finally(()=>{this.reloadUsers()})}deleteUser(t){this.$api.delete(`/users/${t}`).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("users.toast_user_deleted"),this.$translate.instant("toast.title_success")),this.reloadUsers()},error:a=>{console.error(a),this.$toastr.error(a.error.message||this.$translate.instant("users.toast_failed_to_delete_user"),this.$translate.instant("toast.title_error"))}})}setup2fa(t){let a=this.$modal.open(pe,{size:"lg",backdrop:"static"});a.componentInstance.user=t,a.result.finally(()=>{this.reloadUsers()})}disable2fa(t){let a=this.$modal.open(me,{size:"lg",backdrop:"static"});a.componentInstance.user=t,a.result.finally(()=>{this.reloadUsers()})}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=y({type:i,selectors:[["app-users"]],decls:12,vars:6,consts:[[1,"row","mb-3"],[1,"col-9"],[1,"primary-text","m-0"],[1,"col-3","text-end"],[1,"btn","btn-elegant","waves-effect","m-0",3,"click"],[1,"fas","fa-fw","fa-user-plus"],[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"],[3,"innerText"],[1,"small","text-truncate","primary-text",3,"innerText"],[1,"d-flex","flex-row","justify-content-between"],[1,"btn","btn-primary","m-0"],[1,"btn","btn-elegant","m-0"],[1,"btn","btn-elegant","m-0",3,"click"],[1,"fas","fa-fw","fa-user-pen"],[1,"btn","btn-danger","m-0","ms-2",3,"click","disabled"],[1,"fas","fa-fw","fa-trash"],[1,"btn","btn-primary","m-0",3,"click"]],template:function(a,l){a&1&&(S(0,"div",0)(1,"div",1)(2,"h3",2),m(3),o(4,"translate"),D()(),S(5,"div",3)(6,"button",4),o(7,"translate"),z("click",function(){return l.openAddNewUser()}),q(8,"i",5),D()()(),S(9,"div",6),te(10,Be,17,11,"div",7,ee),D()),a&2&&(e(3),d(s(4,2,"users.title_users")),e(3),u("aria-label",s(7,4,"users.button_add_user")),e(4),ie(l.homebridgeUsers))},dependencies:[U],encapsulation:2})}return i})();export{$t as UsersComponent};
1
+ import{a as le}from"./chunk-ADNBR4EK.js";import{g as W,m as j,n as oe}from"./chunk-PSSVCFFV.js";import{A as P,b as re,c as V,d as x,e as N,f as O,g as A,j as w,m as Q,o as H,p as J,q as K,x as ae,z as G}from"./chunk-K2NEWUWG.js";import{b as X}from"./chunk-KS7RCH5Z.js";import{b as se}from"./chunk-QRQBCPWO.js";import{a as ve}from"./chunk-C2UUY7C4.js";import{k,n as B}from"./chunk-Z355YUUI.js";import{a as $,b as U}from"./chunk-ZG3HINDJ.js";import"./chunk-K7QEGT3E.js";import{$b as L,Dc as F,Hb as u,Hc as o,Ib as h,Ic as s,Jb as g,Jc as ne,Lb as ee,Mb as te,Nb as ie,Ob as f,Pb as r,Qb as n,Rb as c,Sb as S,Tb as D,Ub as q,_b as I,ab as e,bc as _,cc as z,dc as v,g as _e,id as R,la as p,mb as y,qc as m,ra as T,rc as d,sa as M,sc as C}from"./chunk-V7SOQAC5.js";function xe(i,E){i&1&&(r(0,"ngb-alert",13)(1,"p",20),m(2),o(3,"translate"),n()()),i&2&&(f("dismissible",!1),e(2),d(s(3,2,"login.invalid_password")))}var me=(()=>{class i{$activeModal=p(j);$api=p(B);$toastr=p(k);$translate=p($);invalidCredentials=!1;formGroup=new A({password:new w("",[x.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(a){return new(a||i)};static \u0275cmp=y({type:i,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-fw","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(a,l){a&1&&(r(0,"div",0)(1,"div",1)(2,"h5",2),m(3),o(4,"translate"),n(),r(5,"button",3),o(6,"translate"),_("click",function(){return l.dismissModal()}),n()(),r(7,"div",4)(8,"div",5),c(9,"i",6),n(),r(10,"ul",7)(11,"li"),m(12),o(13,"translate"),n()(),r(14,"ul",8)(15,"li",9)(16,"label",10),m(17),o(18,"translate"),n(),r(19,"div",11),c(20,"input",12),o(21,"translate"),n()()(),h(22,xe,4,4,"ngb-alert",13),n(),r(23,"div",14)(24,"div",15)(25,"button",16),o(26,"translate"),_("click",function(){return l.dismissModal()}),m(27),o(28,"translate"),n()(),c(29,"div",17),r(30,"div",18)(31,"button",19),_("click",function(){return l.disable2fa()}),m(32),o(33,"translate"),n()()()()),a&2&&(e(3),d(s(4,11,"users.setup_2fa_disable")),e(2),u("aria-label",s(6,13,"form.button_close")),e(7),d(s(13,15,"users.setup_2fa_disable_current_password")),e(5),d(s(18,17,"users.label_password")),e(3),f("formControl",l.formGroup.controls.password)("placeholder",s(21,19,"users.label_password")),e(2),g(l.invalidCredentials&&!l.formGroup.controls.password.value?22:-1),e(3),u("aria-label",s(26,21,"form.button_close")),e(2),C(" ",s(28,23,"form.button_close")," "),e(4),f("disabled",l.formGroup.invalid),e(),C(" ",s(33,25,"form.button_disable")," "))},dependencies:[G,V,N,P,H,W,U],encapsulation:2})}return i})();var de=_e(ve(),1);var we=i=>({timeDiffError:i});function Ce(i,E){i&1&&(r(0,"li"),m(1),o(2,"translate"),n()),i&2&&(e(),d(s(2,1,"users.setup_2fa_scan_qr_code")))}function he(i,E){if(i&1&&(r(0,"ngb-alert",8)(1,"p",16),m(2),o(3,"translate"),n(),r(4,"p",17),m(5),o(6,"translate"),n()()),i&2){let t=v();f("dismissible",!1),e(2),d(s(3,3,"users.setup_2fa_cannot_setup_2fa")),e(3),d(ne(6,5,"users.setup_2fa_server_time_out",F(8,we,t.timeDiffError)))}}function ge(i,E){if(i&1&&(r(0,"ul",9)(1,"li",18)(2,"div",19),c(3,"app-qrcode",20),n()(),r(4,"li",21)(5,"label",22),m(6),o(7,"translate"),n(),r(8,"div",23),c(9,"input",24),n()()()),i&2){let t=v();e(3),f("data",t.otpString),e(3),d(s(7,3,"users.setup_2fa_enter_code")),e(3),f("formControl",t.formGroup.controls.code)}}function Ee(i,E){if(i&1){let t=I();r(0,"button",25),o(1,"translate"),_("click",function(){T(t);let l=v();return M(l.dismissModal())}),m(2),o(3,"translate"),n()}i&2&&(u("aria-label",s(1,2,"form.button_close")),e(2),C(" ",s(3,4,"form.button_close")," "))}function ye(i,E){if(i&1){let t=I();r(0,"button",25),o(1,"translate"),_("click",function(){T(t);let l=v();return M(l.dismissModal())}),m(2),o(3,"translate"),n()}i&2&&(u("aria-label",s(1,2,"form.button_close")),e(2),C(" ",s(3,4,"form.button_close")," "))}function Se(i,E){if(i&1){let t=I();r(0,"button",26),_("click",function(){T(t);let l=v();return M(l.enable2fa())}),m(1),o(2,"translate"),n()}if(i&2){let t=v();f("disabled",t.formGroup.invalid),e(),C(" ",s(2,2,"form.button_enable")," ")}}var pe=(()=>{class i{$activeModal=p(j);$api=p(B);$toastr=p(k);$translate=p($);user;timeDiffError=null;otpString;formGroup=new A({code:new w("",[x.required,x.minLength(6),x.maxLength(6)])});ngOnInit(){this.$api.post("/users/otp/setup",{}).subscribe({next:t=>{this.checkTimeDiff(t.timestamp),this.timeDiffError||(this.otpString=t.otpauth)},error:t=>{this.$activeModal.dismiss(),console.error(t),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:t=>{console.error(t),this.$toastr.error(this.$translate.instant("users.setup_2fa_activate_error"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}checkTimeDiff(t){let a=(0,de.default)(t).diff(new Date,"millisecond");a<-5e3||a>5e3?this.timeDiffError=a:this.timeDiffError=null}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=y({type:i,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-fw","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"],[1,"mx-auto",2,"width","175px","height","175px",3,"data"],[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"],["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(a,l){a&1&&(r(0,"div",0)(1,"div",1)(2,"h5",2),m(3),o(4,"translate"),n(),r(5,"button",3),o(6,"translate"),_("click",function(){return l.dismissModal()}),n()(),r(7,"div",4)(8,"div",5),c(9,"i",6),n(),r(10,"ul",7)(11,"li"),m(12),o(13,"translate"),n(),h(14,Ce,3,3,"li"),n(),h(15,he,7,10,"ngb-alert",8),h(16,ge,10,5,"ul",9),n(),r(17,"div",10)(18,"div",11),h(19,Ee,4,6,"button",12),n(),r(20,"div",13),h(21,ye,4,6,"button",12),n(),r(22,"div",14),h(23,Se,3,4,"button",15),n()()()),a&2&&(e(3),d(s(4,9,"users.setup_2fa")),e(2),u("aria-label",s(6,11,"form.button_close")),e(7),d(s(13,13,"users.setup_2fa_warning")),e(2),g(l.timeDiffError?-1:14),e(),g(l.timeDiffError?15:-1),e(),g(l.timeDiffError?-1:16),e(3),g(l.timeDiffError?-1:19),e(2),g(l.timeDiffError?21:-1),e(2),g(l.timeDiffError?-1:23))},dependencies:[W,le,G,V,N,ae,P,H,U],encapsulation:2})}return i})();var ce=i=>({"is-invalid":i}),ue=(()=>{class i{$activeModal=p(j);$api=p(B);$toastr=p(k);$translate=p($);form=new A({username:new w("",[x.required]),name:new w("",[x.required]),password:new w("",[x.compose([x.required,x.minLength(4)])]),passwordConfirm:new w("",[x.required]),admin:new w(!0)},this.matchPassword);onSubmit({value:t}){this.$api.post("/users",t).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.toast_added_new_user"),this.$translate.instant("toast.title_success"))},error:a=>{this.$toastr.error(a.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}matchPassword(t){let a=t.get("password").value,l=t.get("passwordConfirm").value;if(a!==l)t.get("passwordConfirm").setErrors({matchPassword:!0});else return null}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=y({type:i,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-fw","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"],["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(a,l){a&1&&(r(0,"div",0)(1,"form",1),_("ngSubmit",function(){return l.onSubmit(l.form)}),r(2,"div",2)(3,"h5",3),m(4),o(5,"translate"),n(),r(6,"button",4),o(7,"translate"),_("click",function(){return l.dismissModal()}),n()(),r(8,"div",5)(9,"div",6),c(10,"i",7),n(),r(11,"ul",8)(12,"li",9)(13,"label",10),m(14),o(15,"translate"),n(),r(16,"div",11),c(17,"input",12),o(18,"translate"),n()(),r(19,"li",9)(20,"label",13),m(21),o(22,"translate"),n(),r(23,"div",11),c(24,"input",14),o(25,"translate"),n()(),r(26,"li",9)(27,"label",15),m(28),o(29,"translate"),n(),r(30,"div",11),c(31,"input",16),o(32,"translate"),n()(),r(33,"li",9)(34,"label",17),m(35),o(36,"translate"),n(),r(37,"div",11),c(38,"input",18),o(39,"translate"),n()(),r(40,"li",19)(41,"span",20),m(42),o(43,"translate"),n(),r(44,"div",21),c(45,"input",22),o(46,"translate"),c(47,"label",23),n()()()(),r(48,"div",24)(49,"div",20)(50,"button",25),_("click",function(){return l.dismissModal()}),m(51),o(52,"translate"),n()(),c(53,"div",26),r(54,"div",27)(55,"button",28),m(56),o(57,"translate"),n()()()()()),a&2&&(e(),f("formGroup",l.form),e(3),d(s(5,18,"users.title_add_user")),e(2),u("aria-label",s(7,20,"form.button_close")),e(8),d(s(15,22,"users.label_username")),e(3),u("aria-label",s(18,24,"users.label_username")),e(4),d(s(22,26,"users.label_full_name")),e(3),u("aria-label",s(25,28,"users.label_full_name")),e(4),d(s(29,30,"users.label_password")),e(3),f("ngClass",F(46,ce,l.form.controls.password.dirty&&l.form.controls.password.errors)),u("aria-label",s(32,32,"users.label_password")),e(4),d(s(36,34,"users.label_confirm_password")),e(3),f("ngClass",F(48,ce,l.form.controls.passwordConfirm.dirty&&l.form.controls.passwordConfirm.errors)),u("aria-label",s(39,36,"users.label_confirm_password")),e(4),d(s(43,38,"users.label_admin_user")),e(3),u("aria-label",s(46,40,"users.label_admin_user")),e(6),C(" ",s(52,42,"form.button_close")," "),e(4),f("disabled",!l.form.valid),e(),C(" ",s(57,44,"form.button_save")," "))},dependencies:[G,Q,V,N,O,P,J,K,R,U],encapsulation:2})}return i})();var fe=i=>({"is-invalid":i});function $e(i,E){if(i&1&&(r(0,"li",9)(1,"label",27),m(2),o(3,"translate"),n(),r(4,"div",11),c(5,"input",28),o(6,"translate"),n()()),i&2){let t=v();e(2),d(s(3,3,"users.label_confirm_password")),e(3),f("ngClass",F(7,fe,t.form.controls.passwordConfirm.dirty&&t.form.controls.passwordConfirm.errors)),u("aria-label",s(6,5,"users.label_confirm_password"))}}var be=(()=>{class i{$activeModal=p(j);$api=p(B);$auth=p(X);$toastr=p(k);$translate=p($);user;isCurrentUser=!1;form=new A({username:new w("",[x.required]),name:new w("",[x.required]),password:new w(""),passwordConfirm:new w(""),admin:new w(!0)},this.matchPassword);ngOnInit(){this.isCurrentUser=this.$auth.user.username===this.user.username,this.form.patchValue(this.user)}onSubmit({value:t}){this.$api.patch(`/users/${this.user.id}`,t).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.toast_updated_user"),this.$translate.instant("toast.title_success")),this.isCurrentUser&&t.username!==this.$auth.user.username&&this.$auth.logout()},error:a=>{console.error(a),this.$toastr.error(a.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}matchPassword(t){let a=t.get("password").value,l=t.get("passwordConfirm").value;if(a!==l)t.get("passwordConfirm").setErrors({matchPassword:!0});else return null}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=y({type:i,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-fw","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(a,l){a&1&&(r(0,"div",0)(1,"form",1),_("ngSubmit",function(){return l.onSubmit(l.form)}),r(2,"div",2)(3,"h5",3),m(4),o(5,"translate"),n(),r(6,"button",4),o(7,"translate"),_("click",function(){return l.dismissModal()}),n()(),r(8,"div",5)(9,"div",6),c(10,"i",7),n(),r(11,"ul",8)(12,"li",9)(13,"label",10),m(14),o(15,"translate"),n(),r(16,"div",11),c(17,"input",12),o(18,"translate"),n()(),r(19,"li",9)(20,"label",13),m(21),o(22,"translate"),n(),r(23,"div",11),c(24,"input",14),o(25,"translate"),n()(),r(26,"li",9)(27,"label",15),m(28),o(29,"translate"),n(),r(30,"div",11),c(31,"input",16),o(32,"translate"),n()(),h(33,$e,7,9,"li",9),r(34,"li",17)(35,"span",18),m(36),o(37,"translate"),n(),r(38,"div",19),c(39,"input",20),o(40,"translate"),c(41,"label",21),n()()()(),r(42,"div",22)(43,"div",18)(44,"button",23),_("click",function(){return l.dismissModal()}),m(45),o(46,"translate"),n()(),c(47,"div",24),r(48,"div",25)(49,"button",26),m(50),o(51,"translate"),n()()()()()),a&2&&(e(),f("formGroup",l.form),e(3),d(s(5,16,"users.title_edit_user")),e(2),u("aria-label",s(7,18,"form.button_close")),e(8),d(s(15,20,"users.label_username")),e(3),u("aria-label",s(18,22,"users.label_username")),e(4),d(s(22,24,"users.label_full_name")),e(3),u("aria-label",s(25,26,"users.label_full_name")),e(4),d(s(29,28,"users.label_new_password")),e(3),f("ngClass",F(40,fe,l.form.controls.password.dirty&&l.form.controls.password.errors)),u("aria-label",s(32,30,"users.label_new_password")),e(2),g(l.form.controls.password.value?33:-1),e(3),d(s(37,32,"users.label_admin_user")),e(3),u("aria-label",s(40,34,"users.label_admin_user")),e(6),C(" ",s(46,36,"form.button_close")," "),e(4),f("disabled",!l.form.valid),e(),C(" ",s(51,38,"form.button_save")," "))},dependencies:[G,Q,V,re,N,O,P,J,K,R,U],encapsulation:2})}return i})();function Ue(i,E){if(i&1){let t=I();S(0,"button",21),z("click",function(){T(t);let l=v().$implicit,b=v();return M(b.setup2fa(l))}),m(1),o(2,"translate"),D()}i&2&&(e(),d(s(2,1,"users.setup_2fa")))}function ke(i,E){if(i&1){let t=I();S(0,"button",17),z("click",function(){T(t);let l=v().$implicit,b=v();return M(b.disable2fa(l))}),m(1),o(2,"translate"),D()}i&2&&(e(),C(" ",s(2,1,"users.setup_2fa_disable")," "))}function Be(i,E){if(i&1){let t=I();S(0,"div",7)(1,"div",8)(2,"div",9)(3,"div",10)(4,"span",11),q(5,"h4",12)(6,"h5",13),D()(),S(7,"div",14),h(8,Ue,3,3,"button",15),h(9,ke,3,3,"button",16),S(10,"div")(11,"button",17),o(12,"translate"),z("click",function(){let l=T(t).$implicit,b=v();return M(b.openEditUser(l))}),q(13,"i",18),D(),S(14,"button",19),o(15,"translate"),z("click",function(){let l=T(t).$implicit,b=v();return M(b.deleteUser(l.id))}),q(16,"i",20),D()()()()()()}if(i&2){let t=E.$implicit,a=v();e(5),L("innerText",t.name),e(),L("innerText",t.username),e(2),g(a.username===t.username&&!t.otpActive?8:-1),e(),g(a.username===t.username&&t.otpActive?9:-1),e(2),u("aria-label",s(12,7,"form.button_edit")),e(3),L("disabled",a.username===t.username),u("aria-label",s(15,9,"form.button_delete"))}}var $t=(()=>{class i{$api=p(B);$auth=p(X);$modal=p(oe);$route=p(se);$toastr=p(k);$translate=p($);homebridgeUsers;username=this.$auth.user.username;ngOnInit(){this.$route.data.subscribe(t=>{this.homebridgeUsers=t.homebridgeUsers})}reloadUsers(){return this.$api.get("/users").subscribe(t=>{this.homebridgeUsers=t})}openAddNewUser(){this.$modal.open(ue,{size:"lg",backdrop:"static"}).result.finally(()=>{this.reloadUsers()})}openEditUser(t){let a=this.$modal.open(be,{size:"lg",backdrop:"static"});a.componentInstance.user=t,a.result.finally(()=>{this.reloadUsers()})}deleteUser(t){this.$api.delete(`/users/${t}`).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("users.toast_user_deleted"),this.$translate.instant("toast.title_success")),this.reloadUsers()},error:a=>{console.error(a),this.$toastr.error(a.error.message||this.$translate.instant("users.toast_failed_to_delete_user"),this.$translate.instant("toast.title_error"))}})}setup2fa(t){let a=this.$modal.open(pe,{size:"lg",backdrop:"static"});a.componentInstance.user=t,a.result.finally(()=>{this.reloadUsers()})}disable2fa(t){let a=this.$modal.open(me,{size:"lg",backdrop:"static"});a.componentInstance.user=t,a.result.finally(()=>{this.reloadUsers()})}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=y({type:i,selectors:[["app-users"]],decls:12,vars:6,consts:[[1,"row","mb-3"],[1,"col-9"],[1,"primary-text","m-0"],[1,"col-3","text-end"],[1,"btn","btn-elegant","waves-effect","m-0",3,"click"],[1,"fas","fa-fw","fa-user-plus"],[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"],[3,"innerText"],[1,"small","text-truncate","primary-text",3,"innerText"],[1,"d-flex","flex-row","justify-content-between"],[1,"btn","btn-primary","m-0"],[1,"btn","btn-elegant","m-0"],[1,"btn","btn-elegant","m-0",3,"click"],[1,"fas","fa-fw","fa-user-pen"],[1,"btn","btn-danger","m-0","ms-2",3,"click","disabled"],[1,"fas","fa-fw","fa-trash"],[1,"btn","btn-primary","m-0",3,"click"]],template:function(a,l){a&1&&(S(0,"div",0)(1,"div",1)(2,"h3",2),m(3),o(4,"translate"),D()(),S(5,"div",3)(6,"button",4),o(7,"translate"),z("click",function(){return l.openAddNewUser()}),q(8,"i",5),D()()(),S(9,"div",6),te(10,Be,17,11,"div",7,ee),D()),a&2&&(e(3),d(s(4,2,"users.title_users")),e(3),u("aria-label",s(7,4,"users.button_add_user")),e(4),ie(l.homebridgeUsers))},dependencies:[U],encapsulation:2})}return i})();export{$t as UsersComponent};
@@ -0,0 +1 @@
1
+ import{a as s}from"./chunk-PO63P7BR.js";import"./chunk-K7WA5KOE.js";import"./chunk-KECVWPQI.js";import"./chunk-2KOR6LRK.js";import"./chunk-PSSVCFFV.js";import"./chunk-K2NEWUWG.js";import"./chunk-RO5J6JA4.js";import"./chunk-KS7RCH5Z.js";import{g as i}from"./chunk-QRQBCPWO.js";import"./chunk-C2UUY7C4.js";import"./chunk-Z355YUUI.js";import"./chunk-ZG3HINDJ.js";import"./chunk-K7QEGT3E.js";import{ha as e,nb as t}from"./chunk-V7SOQAC5.js";var u=[{path:"",loadComponent:()=>import("./chunk-VFHI5NXQ.js").then(o=>o.AccessoriesComponent)}],c=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=t({type:o});static \u0275inj=e({imports:[i.forChild(u),i]})}return o})();var l=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=t({type:o});static \u0275inj=e({imports:[s,c]})}return o})();export{l as AccessoriesModule};
@@ -1 +1 @@
1
- import{ga as o,n as e}from"./chunk-OXBT7KSO.js";var n=new e,f=(()=>{class t{readyEvent;constructor(){this.readyEvent=n}static \u0275fac=function(r){return new(r||t)};static \u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function d(){n.next(void 0)}export{f as a,d as b};
1
+ import{ga as o,n as e}from"./chunk-V7SOQAC5.js";var n=new e,f=(()=>{class t{readyEvent;constructor(){this.readyEvent=n}static \u0275fac=function(r){return new(r||t)};static \u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function d(){n.next(void 0)}export{f as a,d as b};
@@ -1 +1 @@
1
- import{g as r}from"./chunk-NSYXJMRL.js";import"./chunk-NLGVT4MV.js";import{ha as t,nb as e}from"./chunk-OXBT7KSO.js";var m=[{path:"",loadComponent:()=>import("./chunk-5KPILP6Z.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
+ import{g as r}from"./chunk-QRQBCPWO.js";import"./chunk-K7QEGT3E.js";import{ha as t,nb as e}from"./chunk-V7SOQAC5.js";var m=[{path:"",loadComponent:()=>import("./chunk-BF4BAPY7.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 +1 @@
1
- import{a as h}from"./chunk-VTILLTV4.js";import"./chunk-PSK63HDR.js";import"./chunk-NA3BCE4T.js";import"./chunk-PF574E5L.js";import"./chunk-6GRAO5OI.js";import"./chunk-OMLTIUY5.js";import{b}from"./chunk-TVAJZAL5.js";import"./chunk-NLGVT4MV.js";import{$a as l,Hc as w,Ic as y,Sb as o,Sc as T,Tb as r,Ub as c,ab as s,bc as u,kc as p,la as a,lc as f,mb as d,n as m,qc as v,rc as g}from"./chunk-OXBT7KSO.js";var x=["terminaloutput"],j=(()=>{class t{$terminal=a(h);resizeEvent=new m;termTarget=T("terminaloutput");onWindowResize(){this.resizeEvent.next(void 0)}ngOnInit(){window.document.querySelector("body").classList.add("bg-black"),this.$terminal.startTerminal(this.termTarget(),{},this.resizeEvent),this.$terminal.term.focus()}ngOnDestroy(){window.document.querySelector("body").classList.remove("bg-black"),this.$terminal.destroyTerminal()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=d({type:t,selectors:[["ng-component"]],viewQuery:function(e,n){e&1&&p(n.termTarget,x,5),e&2&&f()},hostBindings:function(e,n){e&1&&u("resize",function(E){return n.onWindowResize(E)},l)},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,n){e&1&&(o(0,"div",1)(1,"div",2)(2,"h3",3),v(3),w(4,"translate"),r()()(),o(5,"div",4),c(6,"div",5,0),r()),e&2&&(s(3),g(y(4,1,"menu.linux.label_terminal")))},dependencies:[b],encapsulation:2})}return t})();export{j as TerminalComponent};
1
+ import{a as h}from"./chunk-Z6MT43P4.js";import"./chunk-NQDYN4CZ.js";import"./chunk-RO5J6JA4.js";import"./chunk-KS7RCH5Z.js";import"./chunk-C2UUY7C4.js";import"./chunk-Z355YUUI.js";import{b}from"./chunk-ZG3HINDJ.js";import"./chunk-K7QEGT3E.js";import{$a as l,Hc as w,Ic as y,Sb as o,Sc as T,Tb as r,Ub as c,ab as s,bc as u,kc as p,la as a,lc as f,mb as d,n as m,qc as v,rc as g}from"./chunk-V7SOQAC5.js";var x=["terminaloutput"],j=(()=>{class t{$terminal=a(h);resizeEvent=new m;termTarget=T("terminaloutput");onWindowResize(){this.resizeEvent.next(void 0)}ngOnInit(){window.document.querySelector("body").classList.add("bg-black"),this.$terminal.startTerminal(this.termTarget(),{},this.resizeEvent),this.$terminal.term.focus()}ngOnDestroy(){window.document.querySelector("body").classList.remove("bg-black"),this.$terminal.destroyTerminal()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=d({type:t,selectors:[["ng-component"]],viewQuery:function(e,n){e&1&&p(n.termTarget,x,5),e&2&&f()},hostBindings:function(e,n){e&1&&u("resize",function(E){return n.onWindowResize(E)},l)},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,n){e&1&&(o(0,"div",1)(1,"div",2)(2,"h3",3),v(3),w(4,"translate"),r()()(),o(5,"div",4),c(6,"div",5,0),r()),e&2&&(s(3),g(y(4,1,"menu.linux.label_terminal")))},dependencies:[b],encapsulation:2})}return t})();export{j as TerminalComponent};
@@ -1 +1 @@
1
- import{g as i}from"./chunk-NSYXJMRL.js";import"./chunk-NLGVT4MV.js";import{ha as t,nb as e}from"./chunk-OXBT7KSO.js";var d=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"docker",loadChildren:()=>import("./chunk-GITBGY3F.js").then(o=>o.DockerModule)},{path:"linux",loadChildren:()=>import("./chunk-RONKUNPA.js").then(o=>o.LinuxModule)},{path:"terminal",loadChildren:()=>import("./chunk-GSF3Z3XG.js").then(o=>o.TerminalModule)}],l=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[i.forChild(d),i]})}return o})();var p=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[l]})}return o})();export{p as PlatformToolsModule};
1
+ import{g as i}from"./chunk-QRQBCPWO.js";import"./chunk-K7QEGT3E.js";import{ha as t,nb as e}from"./chunk-V7SOQAC5.js";var d=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"docker",loadChildren:()=>import("./chunk-TTWTW2NA.js").then(o=>o.DockerModule)},{path:"linux",loadChildren:()=>import("./chunk-O3CSJUU3.js").then(o=>o.LinuxModule)},{path:"terminal",loadChildren:()=>import("./chunk-J6BY74Q4.js").then(o=>o.TerminalModule)}],l=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[i.forChild(d),i]})}return o})();var p=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[l]})}return o})();export{p as PlatformToolsModule};
@@ -0,0 +1 @@
1
+ import{e as ft,n as gt}from"./chunk-K7QEGT3E.js";import{Gb as M,Hb as E,Ob as l,Pb as h,Qb as p,Rb as F,Vb as Y,Wa as ht,Wb as K,Xa as q,_b as Q,a as u,ab as r,ac as mt,b as T,bc as j,db as dt,dc as c,e as It,ga as C,gb as y,ha as lt,ja as ct,ka as w,kd as J,la as _,ma as ut,mb as G,n as g,nb as pt,nc as A,pc as m,qc as f,ra as V,sa as z,sb as S,sc as b,ua as N,va as Z,vb as U,za as O}from"./chunk-V7SOQAC5.js";var Tt=It((De,Ut)=>{Ut.exports={name:"homebridge-config-ui-x",displayName:"Homebridge UI",version:"5.2.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-beta.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.0.3","@fastify/static":"8.2.0","@homebridge/hap-client":"3.1.0","@homebridge/node-pty-prebuilt-multiarch":"0.13.1","@nestjs/axios":"4.0.1","@nestjs/common":"11.1.4","@nestjs/core":"11.1.4","@nestjs/jwt":"11.0.0","@nestjs/passport":"11.0.5","@nestjs/platform-fastify":"11.1.4","@nestjs/platform-socket.io":"11.1.4","@nestjs/swagger":"11.2.0","@nestjs/websockets":"11.1.4",axios:"1.10.0","bash-color":"0.0.4","class-transformer":"0.5.1","class-validator":"0.14.2",commander:"14.0.0",dayjs:"1.11.13",fastify:"5.4.0","fs-extra":"11.3.0",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":"6.2.0",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.7",tail:"2.2.6",tar:"7.4.3","tcp-port-used":"1.0.2",unzipper:"0.12.3"},devDependencies:{"@antfu/eslint-config":"^4.17.0","@nestjs/testing":"^11.1.4","@prettier/plugin-xml":"^3.4.2","@types/fs-extra":"^11.0.4","@types/lodash":"^4.17.20","@types/node":"^24.0.14","@types/node-schedule":"^2.1.8","@types/passport-jwt":"^4.0.1","@types/semver":"^7.7.0","@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.0","eslint-plugin-format":"^1.0.1","form-data":"^4.0.4",nodemon:"^3.1.10",rimraf:"^6.0.1","ts-loader":"^9.5.2","ts-node":"^10.9.2","tsconfig-paths":"^4.2.0",typescript:"^5.8.3","unplugin-swc":"^1.5.5",vitest:"^3.2.4"},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=function(i){return i[i.State=0]="State",i[i.Transition=1]="Transition",i[i.Sequence=2]="Sequence",i[i.Group=3]="Group",i[i.Animate=4]="Animate",i[i.Keyframes=5]="Keyframes",i[i.Style=6]="Style",i[i.Trigger=7]="Trigger",i[i.Reference=8]="Reference",i[i.AnimateChild=9]="AnimateChild",i[i.AnimateRef=10]="AnimateRef",i[i.Query=11]="Query",i[i.Stagger=12]="Stagger",i}(v||{}),xt="*";function tt(i,s){return{type:v.Trigger,name:i,definitions:s,options:{}}}function P(i,s=null){return{type:v.Animate,styles:s,timings:i}}function Yt(i,s=null){return{type:v.Sequence,steps:i,options:s}}function R(i){return{type:v.Style,styles:i,offset:null}}function H(i,s,t){return{type:v.State,name:i,styles:s,options:t}}function B(i,s,t=null){return{type:v.Transition,expr:i,animation:s,options:t}}var W=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;constructor(s=0,t=0){this.totalTime=s+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(s=>s()),this._onDoneFns=[])}onStart(s){this._originalOnStartFns.push(s),this._onStartFns.push(s)}onDone(s){this._originalOnDoneFns.push(s),this._onDoneFns.push(s)}onDestroy(s){this._onDestroyFns.push(s)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(s=>s()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(s=>s()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(s){this._position=this.totalTime?s*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(s){let t=s=="start"?this._onStartFns:this._onDoneFns;t.forEach(e=>e()),t.length=0}},X=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(s){this.players=s;let t=0,e=0,n=0,o=this.players.length;o==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(a=>{a.onDone(()=>{++t==o&&this._onFinish()}),a.onDestroy(()=>{++e==o&&this._onDestroy()}),a.onStart(()=>{++n==o&&this._onStart()})}),this.totalTime=this.players.reduce((a,d)=>Math.max(a,d.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(s=>s()),this._onDoneFns=[])}init(){this.players.forEach(s=>s.init())}onStart(s){this._onStartFns.push(s)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(s=>s()),this._onStartFns=[])}onDone(s){this._onDoneFns.push(s)}onDestroy(s){this._onDestroyFns.push(s)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(s=>s.play())}pause(){this.players.forEach(s=>s.pause())}restart(){this.players.forEach(s=>s.restart())}finish(){this._onFinish(),this.players.forEach(s=>s.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(s=>s.destroy()),this._onDestroyFns.forEach(s=>s()),this._onDestroyFns=[])}reset(){this.players.forEach(s=>s.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(s){let t=s*this.totalTime;this.players.forEach(e=>{let n=e.totalTime?Math.min(1,t/e.totalTime):1;e.setPosition(n)})}getPosition(){let s=this.players.reduce((t,e)=>t===null||e.totalTime>t.totalTime?e:t,null);return s!=null?s.getPosition():0}beforeDestroy(){this.players.forEach(s=>{s.beforeDestroy&&s.beforeDestroy()})}triggerCallback(s){let t=s=="start"?this._onStartFns:this._onDoneFns;t.forEach(e=>e()),t.length=0}},Ot="!";var _t=["toast-component",""];function Et(i,s){if(i&1){let t=Q();h(0,"button",5),j("click",function(){V(t);let n=c();return z(n.remove())}),h(1,"span",6),f(2,"\xD7"),p()()}}function Ft(i,s){if(i&1&&(Y(0),f(1),K()),i&2){let t=c(2);r(),b("[",t.duplicatesCount+1,"]")}}function jt(i,s){if(i&1&&(h(0,"div"),f(1),S(2,Ft,2,1,"ng-container",4),p()),i&2){let t=c();m(t.options.titleClass),E("aria-label",t.title),r(),b(" ",t.title," "),r(),l("ngIf",t.duplicatesCount)}}function At(i,s){if(i&1&&F(0,"div",7),i&2){let t=c();m(t.options.messageClass),l("innerHTML",t.message,q)}}function Rt(i,s){if(i&1&&(h(0,"div",8),f(1),p()),i&2){let t=c();m(t.options.messageClass),E("aria-label",t.message),r(),b(" ",t.message," ")}}function Ht(i,s){if(i&1&&(h(0,"div"),F(1,"div",9),p()),i&2){let t=c();r(),A("width",t.width()+"%")}}function kt(i,s){if(i&1){let t=Q();h(0,"button",5),j("click",function(){V(t);let n=c();return z(n.remove())}),h(1,"span",6),f(2,"\xD7"),p()()}}function Nt(i,s){if(i&1&&(Y(0),f(1),K()),i&2){let t=c(2);r(),b("[",t.duplicatesCount+1,"]")}}function Mt(i,s){if(i&1&&(h(0,"div"),f(1),S(2,Nt,2,1,"ng-container",4),p()),i&2){let t=c();m(t.options.titleClass),E("aria-label",t.title),r(),b(" ",t.title," "),r(),l("ngIf",t.duplicatesCount)}}function Pt(i,s){if(i&1&&F(0,"div",7),i&2){let t=c();m(t.options.messageClass),l("innerHTML",t.message,q)}}function Bt(i,s){if(i&1&&(h(0,"div",8),f(1),p()),i&2){let t=c();m(t.options.messageClass),E("aria-label",t.message),r(),b(" ",t.message," ")}}function $t(i,s){if(i&1&&(h(0,"div"),F(1,"div",9),p()),i&2){let t=c();r(),A("width",t.width()+"%")}}var et=class{_attachedHost;component;viewContainerRef;injector;constructor(s,t){this.component=s,this.injector=t}attach(s,t){return this._attachedHost=s,s.attach(this,t)}detach(){let s=this._attachedHost;if(s)return this._attachedHost=void 0,s.detach()}get isAttached(){return this._attachedHost!=null}setAttachedHost(s){this._attachedHost=s}},it=class{_attachedPortal;_disposeFn;attach(s,t){return this._attachedPortal=s,this.attachComponentPortal(s,t)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(s){this._disposeFn=s}},st=class{_overlayRef;componentInstance;duplicatesCount=0;_afterClosed=new g;_activate=new g;_manualClose=new g;_resetTimeout=new g;_countDuplicate=new g;constructor(s){this._overlayRef=s}manualClose(){this._manualClose.next(),this._manualClose.complete()}manualClosed(){return this._manualClose.asObservable()}timeoutReset(){return this._resetTimeout.asObservable()}countDuplicate(){return this._countDuplicate.asObservable()}close(){this._overlayRef.detach(),this._afterClosed.next(),this._manualClose.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete(),this._resetTimeout.complete(),this._countDuplicate.complete()}afterClosed(){return this._afterClosed.asObservable()}isInactive(){return this._activate.isStopped}activate(){this._activate.next(),this._activate.complete()}afterActivate(){return this._activate.asObservable()}onDuplicate(s,t){s&&this._resetTimeout.next(),t&&this._countDuplicate.next(++this.duplicatesCount)}},D=class{toastId;config;message;title;toastType;toastRef;_onTap=new g;_onAction=new g;constructor(s,t,e,n,o,a){this.toastId=s,this.config=t,this.message=e,this.title=n,this.toastType=o,this.toastRef=a,this.toastRef.afterClosed().subscribe(()=>{this._onAction.complete(),this._onTap.complete()})}triggerTap(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()}onTap(){return this._onTap.asObservable()}triggerAction(s){this._onAction.next(s)}onAction(){return this._onAction.asObservable()}},vt={maxOpened:0,autoDismiss:!1,newestOnTop:!0,preventDuplicates:!1,countDuplicates:!1,resetTimeoutOnDuplicate:!1,includeTitleDuplicates:!1,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},closeButton:!1,disableTimeOut:!1,timeOut:5e3,extendedTimeOut:1e3,enableHtml:!1,progressBar:!1,toastClass:"ngx-toastr",positionClass:"toast-top-right",titleClass:"toast-title",messageClass:"toast-message",easing:"ease-in",easeTime:300,tapToDismiss:!0,onActivateTick:!1,progressAnimation:"decreasing"},yt=new ct("ToastConfig"),nt=class extends it{_hostDomElement;_componentFactoryResolver;_appRef;constructor(s,t,e){super(),this._hostDomElement=s,this._componentFactoryResolver=t,this._appRef=e}attachComponentPortal(s,t){let e=this._componentFactoryResolver.resolveComponentFactory(s.component),n;return n=e.create(s.injector),this._appRef.attachView(n.hostView),this.setDisposeFn(()=>{this._appRef.detachView(n.hostView),n.destroy()}),t?this._hostDomElement.insertBefore(this._getComponentRootNode(n),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(n)),n}_getComponentRootNode(s){return s.hostView.rootNodes[0]}},Lt=(()=>{class i{_document=_(Z);_containerElement;ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let t=this._document.createElement("div");t.classList.add("overlay-container"),t.setAttribute("aria-live","polite"),this._document.body.appendChild(t),this._containerElement=t}static \u0275fac=function(e){return new(e||i)};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),ot=class{_portalHost;constructor(s){this._portalHost=s}attach(s,t=!0){return this._portalHost.attach(s,t)}detach(){return this._portalHost.detach()}},Vt=(()=>{class i{_overlayContainer=_(Lt);_componentFactoryResolver=_(dt);_appRef=_(M);_document=_(Z);_paneElements=new Map;create(t,e){return this._createOverlayRef(this.getPaneElement(t,e))}getPaneElement(t="",e){return this._paneElements.get(e)||this._paneElements.set(e,{}),this._paneElements.get(e)[t]||(this._paneElements.get(e)[t]=this._createPaneElement(t,e)),this._paneElements.get(e)[t]}_createPaneElement(t,e){let n=this._document.createElement("div");return n.id="toast-container",n.classList.add(t),n.classList.add("toast-container"),e?e.getContainerElement().appendChild(n):this._overlayContainer.getContainerElement().appendChild(n),n}_createPortalHost(t){return new nt(t,this._componentFactoryResolver,this._appRef)}_createOverlayRef(t){return new ot(this._createPortalHost(t))}static \u0275fac=function(e){return new(e||i)};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),bt=(()=>{class i{overlay;_injector;sanitizer;ngZone;toastrConfig;currentlyActive=0;toasts=[];overlayContainer;previousToastMessage;index=0;constructor(t,e,n,o,a){this.overlay=e,this._injector=n,this.sanitizer=o,this.ngZone=a,this.toastrConfig=u(u({},t.default),t.config),t.config.iconClasses&&(this.toastrConfig.iconClasses=u(u({},t.default.iconClasses),t.config.iconClasses))}show(t,e,n={},o=""){return this._preBuildNotification(o,t,e,this.applyConfig(n))}success(t,e,n={}){let o=this.toastrConfig.iconClasses.success||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}error(t,e,n={}){let o=this.toastrConfig.iconClasses.error||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}info(t,e,n={}){let o=this.toastrConfig.iconClasses.info||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}warning(t,e,n={}){let o=this.toastrConfig.iconClasses.warning||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}clear(t){for(let e of this.toasts)if(t!==void 0){if(e.toastId===t){e.toastRef.manualClose();return}}else e.toastRef.manualClose()}remove(t){let e=this._findToast(t);if(!e||(e.activeToast.toastRef.close(),this.toasts.splice(e.index,1),this.currentlyActive=this.currentlyActive-1,!this.toastrConfig.maxOpened||!this.toasts.length))return!1;if(this.currentlyActive<this.toastrConfig.maxOpened&&this.toasts[this.currentlyActive]){let n=this.toasts[this.currentlyActive].toastRef;n.isInactive()||(this.currentlyActive=this.currentlyActive+1,n.activate())}return!0}findDuplicate(t="",e="",n,o){let{includeTitleDuplicates:a}=this.toastrConfig;for(let d of this.toasts){let k=a&&d.title===t;if((!a||k)&&d.message===e)return d.toastRef.onDuplicate(n,o),d}return null}applyConfig(t={}){return u(u({},this.toastrConfig),t)}_findToast(t){for(let e=0;e<this.toasts.length;e++)if(this.toasts[e].toastId===t)return{index:e,activeToast:this.toasts[e]};return null}_preBuildNotification(t,e,n,o){return o.onActivateTick?this.ngZone.run(()=>this._buildNotification(t,e,n,o)):this._buildNotification(t,e,n,o)}_buildNotification(t,e,n,o){if(!o.toastComponent)throw new Error("toastComponent required");let a=this.findDuplicate(n,e,this.toastrConfig.resetTimeoutOnDuplicate&&o.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&n||e)&&this.toastrConfig.preventDuplicates&&a!==null)return a;this.previousToastMessage=e;let d=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(d=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));let k=this.overlay.create(o.positionClass,this.overlayContainer);this.index=this.index+1;let rt=e;e&&o.enableHtml&&(rt=this.sanitizer.sanitize(ht.HTML,e));let x=new st(k),$=new D(this.index,o,rt,n,t,x),Ct=[{provide:D,useValue:$}],wt=N.create({providers:Ct,parent:this._injector}),Dt=new et(o.toastComponent,wt),at=k.attach(Dt,o.newestOnTop);x.componentInstance=at.instance;let L={toastId:this.index,title:n||"",message:e||"",toastRef:x,onShown:x.afterActivate(),onHidden:x.afterClosed(),onTap:$.onTap(),onAction:$.onAction(),portal:at};return d||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{L.toastRef.activate()})),this.toasts.push(L),L}static \u0275fac=function(e){return new(e||i)(w(yt),w(Vt),w(N),w(gt),w(U))};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),zt=(()=>{class i{toastrService;toastPackage;ngZone;message;title;options;duplicatesCount;originalTimeout;width=O(-1);toastClasses="";state;get _state(){return this.state()}get displayStyle(){if(this.state().value==="inactive")return"none"}timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,e,n){this.toastrService=t,this.toastPackage=e,this.ngZone=n,this.message=e.message,this.title=e.title,this.options=e.config,this.originalTimeout=e.config.timeOut,this.toastClasses=`${e.toastType} ${e.config.toastClass}`,this.sub=e.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=e.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=e.toastRef.countDuplicate().subscribe(o=>{this.duplicatesCount=o}),this.state=O({value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.update(t=>T(u({},t),{value:"active"})),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.outsideTimeout(()=>this.remove(),this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let t=new Date().getTime(),e=this.hideTime-t;this.width.set(e/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(n=>100-n),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.update(t=>T(u({},t),{value:"active"})),this.outsideTimeout(()=>this.remove(),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10)}remove(){this.state().value!=="removed"&&(clearTimeout(this.timeout),this.state.update(t=>T(u({},t),{value:"removed"})),this.outsideTimeout(()=>this.toastrService.remove(this.toastPackage.toastId),+this.toastPackage.config.easeTime))}tapToast(){this.state().value!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state().value!=="removed"&&this.options.disableTimeOut!=="extendedTimeOut"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state().value==="removed"||(this.outsideTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}outsideTimeout(t,e){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(t),e)):this.timeout=setTimeout(()=>t(),e)}outsideInterval(t,e){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(t),e)):this.intervalId=setInterval(()=>t(),e)}runInsideAngular(t){this.ngZone?this.ngZone.run(()=>t()):t()}static \u0275fac=function(e){return new(e||i)(y(bt),y(D),y(U))};static \u0275cmp=G({type:i,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(e,n){e&1&&j("click",function(){return n.tapToast()})("mouseenter",function(){return n.stickAround()})("mouseleave",function(){return n.delayedHideToast()}),e&2&&(mt("@flyInOut",n._state),m(n.toastClasses),A("display",n.displayStyle))},attrs:_t,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(e,n){e&1&&S(0,Et,3,0,"button",0)(1,jt,3,5,"div",1)(2,At,1,3,"div",2)(3,Rt,2,4,"div",3)(4,Ht,2,2,"div",4),e&2&&(l("ngIf",n.options.closeButton),r(),l("ngIf",n.title),r(),l("ngIf",n.message&&n.options.enableHtml),r(),l("ngIf",n.message&&!n.options.enableHtml),r(),l("ngIf",n.options.progressBar))},dependencies:[J],encapsulation:2,data:{animation:[tt("flyInOut",[H("inactive",R({opacity:0})),H("active",R({opacity:1})),H("removed",R({opacity:0})),B("inactive => active",P("{{ easeTime }}ms {{ easing }}")),B("active => removed",P("{{ easeTime }}ms {{ easing }}"))])]},changeDetection:0})}return i})(),Zt=T(u({},vt),{toastComponent:zt}),qt=(i={})=>ut([{provide:yt,useValue:{default:Zt,config:i}}]),be=(()=>{class i{static forRoot(t={}){return{ngModule:i,providers:[qt(t)]}}static \u0275fac=function(e){return new(e||i)};static \u0275mod=pt({type:i});static \u0275inj=lt({})}return i})();var Gt=(()=>{class i{toastrService;toastPackage;appRef;message;title;options;duplicatesCount;originalTimeout;width=O(-1);toastClasses="";get displayStyle(){return this.state()==="inactive"?"none":null}state=O("inactive");timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,e,n){this.toastrService=t,this.toastPackage=e,this.appRef=n,this.message=e.message,this.title=e.title,this.options=e.config,this.originalTimeout=e.config.timeOut,this.toastClasses=`${e.toastType} ${e.config.toastClass}`,this.sub=e.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=e.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=e.toastRef.countDuplicate().subscribe(o=>{this.duplicatesCount=o})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.set("active"),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.timeout=setTimeout(()=>{this.remove()},this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))),this.options.onActivateTick&&this.appRef.tick()}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let t=new Date().getTime(),e=this.hideTime-t;this.width.set(e/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(n=>100-n),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.set("active"),this.options.timeOut=this.originalTimeout,this.timeout=setTimeout(()=>this.remove(),this.originalTimeout),this.hideTime=new Date().getTime()+(this.originalTimeout||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))}remove(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.state.set("removed"),this.timeout=setTimeout(()=>this.toastrService.remove(this.toastPackage.toastId)))}tapToast(){this.state()!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state()==="removed"||(this.timeout=setTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10)))}static \u0275fac=function(e){return new(e||i)(y(bt),y(D),y(M))};static \u0275cmp=G({type:i,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(e,n){e&1&&j("click",function(){return n.tapToast()})("mouseenter",function(){return n.stickAround()})("mouseleave",function(){return n.delayedHideToast()}),e&2&&(m(n.toastClasses),A("display",n.displayStyle))},attrs:_t,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(e,n){e&1&&S(0,kt,3,0,"button",0)(1,Mt,3,5,"div",1)(2,Pt,1,3,"div",2)(3,Bt,2,4,"div",3)(4,$t,2,2,"div",4),e&2&&(l("ngIf",n.options.closeButton),r(),l("ngIf",n.title),r(),l("ngIf",n.message&&n.options.enableHtml),r(),l("ngIf",n.message&&!n.options.enableHtml),r(),l("ngIf",n.options.progressBar))},dependencies:[J],encapsulation:2,changeDetection:0})}return i})(),Te=T(u({},vt),{toastComponent:Gt});var I={serverTarget:Tt().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"}};var Fe=(()=>{class i{$http=_(ft);get(t,e){return this.$http.get(`${I.api.base}${t}`,e)}post(t,e,n){return this.$http.post(`${I.api.base}${t}`,e,n)}put(t,e,n){return this.$http.put(`${I.api.base}${t}`,e,n)}patch(t,e,n){return this.$http.patch(`${I.api.base}${t}`,e,n)}delete(t,e){return this.$http.delete(`${I.api.base}${t}`,e)}static \u0275fac=function(e){return new(e||i)};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();export{v as a,xt as b,tt as c,P as d,Yt as e,R as f,B as g,W as h,X as i,Ot as j,bt as k,be as l,I as m,Fe as n};
@@ -1,4 +1,4 @@
1
- import{a as p,b as w,c as b}from"./chunk-PSK63HDR.js";import{a as d}from"./chunk-NA3BCE4T.js";import{M as i,g as o,ga as m,la as h,n}from"./chunk-OXBT7KSO.js";var c=o(p(),1),a=o(w(),1),l=o(b(),1);var v=(()=>{class t{$ws=h(d);io;fitAddon;webLinksAddon;resize;elementResize;term;destroyTerminal(){this.io.end(),this.term.dispose(),this.resize.complete(),this.elementResize&&this.elementResize.complete()}startTerminal(r,s={},f){this.elementResize=f,this.io=this.$ws.connectToNamespace("platform-tools/terminal"),this.term=new c.Terminal(s),setTimeout(()=>{this.term.loadAddon(this.fitAddon),this.term.loadAddon(this.webLinksAddon)}),this.fitAddon=new a.FitAddon,this.webLinksAddon=new l.WebLinksAddon,this.resize=new n,this.term.open(r.nativeElement),setTimeout(()=>{this.fitAddon.activate(this.term),this.fitAddon.fit()}),this.io.connected.pipe(i(200)).subscribe(()=>{this.startSession()}),this.io.socket.on("disconnect",()=>{this.term.write(`
1
+ import{a as p,b as w,c as b}from"./chunk-NQDYN4CZ.js";import{a as d}from"./chunk-RO5J6JA4.js";import{M as i,g as o,ga as m,la as h,n}from"./chunk-V7SOQAC5.js";var c=o(p(),1),a=o(w(),1),l=o(b(),1);var v=(()=>{class t{$ws=h(d);io;fitAddon;webLinksAddon;resize;elementResize;term;destroyTerminal(){this.io.end(),this.term.dispose(),this.resize.complete(),this.elementResize&&this.elementResize.complete()}startTerminal(r,s={},f){this.elementResize=f,this.io=this.$ws.connectToNamespace("platform-tools/terminal"),this.term=new c.Terminal(s),setTimeout(()=>{this.term.loadAddon(this.fitAddon),this.term.loadAddon(this.webLinksAddon)}),this.fitAddon=new a.FitAddon,this.webLinksAddon=new l.WebLinksAddon,this.resize=new n,this.term.open(r.nativeElement),setTimeout(()=>{this.fitAddon.activate(this.term),this.fitAddon.fit()}),this.io.connected.pipe(i(200)).subscribe(()=>{this.startSession()}),this.io.socket.on("disconnect",()=>{this.term.write(`
2
2
  \r
3
3
  \rTerminal disconnected. Is the server running?
4
4
  \r
@@ -1 +1 @@
1
- import{$ as M,B as F,C as P,D as q,Da as w,L as J,O as L,Uc as Z,Y as R,a as I,ga as h,gb as N,ha as X,ja as v,ka as o,nb as z,pb as W,r as p,t as f,ub as S,x as V}from"./chunk-OXBT7KSO.js";var c=class{},Q=(()=>{class n extends c{getTranslation(e){return p({})}static \u0275fac=(()=>{let e;return function(s){return(e||(e=w(n)))(s||n)}})();static \u0275prov=h({token:n,factory:n.\u0275fac})}return n})(),b=class{},Y=(()=>{class n{handle(e){return e.key}static \u0275fac=function(t){return new(t||n)};static \u0275prov=h({token:n,factory:n.\u0275fac})}return n})();function j(n,r){if(n===r)return!0;if(n===null||r===null)return!1;if(n!==n&&r!==r)return!0;let e=typeof n,t=typeof r,s,i,a;if(e==t&&e=="object")if(Array.isArray(n)){if(!Array.isArray(r))return!1;if((s=n.length)==r.length){for(i=0;i<s;i++)if(!j(n[i],r[i]))return!1;return!0}}else{if(Array.isArray(r))return!1;a=Object.create(null);for(i in n){if(!j(n[i],r[i]))return!1;a[i]=!0}for(i in r)if(!(i in a)&&typeof r[i]<"u")return!1;return!0}return!1}function u(n){return typeof n<"u"&&n!==null}function D(n){return E(n)&&!H(n)&&n!==null}function E(n){return typeof n=="object"}function H(n){return Array.isArray(n)}function $(n){return typeof n=="string"}function ne(n){return typeof n=="function"}function K(n,r){let e=Object.assign({},n);return E(n)?(E(n)&&E(r)&&Object.keys(r).forEach(t=>{D(r[t])?t in n?e[t]=K(n[t],r[t]):Object.assign(e,{[t]:r[t]}):Object.assign(e,{[t]:r[t]})}),e):K({},r)}function x(n,r){let e=r.split(".");r="";do r+=e.shift(),u(n)&&u(n[r])&&(D(n[r])||H(n[r])||!e.length)?(n=n[r],r=""):e.length?r+=".":n=void 0;while(e.length);return n}function se(n,r,e){let t=r.split("."),s=n;for(let i=0;i<t.length;i++){let a=t[i];i===t.length-1?s[a]=e:((!s[a]||!D(s[a]))&&(s[a]={}),s=s[a])}}var d=class{},k=(()=>{class n extends d{templateMatcher=/{{\s?([^{}\s]*)\s?}}/g;interpolate(e,t){if($(e))return this.interpolateString(e,t);if(ne(e))return this.interpolateFunction(e,t)}interpolateFunction(e,t){return e(t)}interpolateString(e,t){return t?e.replace(this.templateMatcher,(s,i)=>{let a=x(t,i);return u(a)?a:s}):e}static \u0275fac=(()=>{let e;return function(s){return(e||(e=w(n)))(s||n)}})();static \u0275prov=h({token:n,factory:n.\u0275fac})}return n})(),g=class{},ee=(()=>{class n extends g{compile(e,t){return e}compileTranslations(e,t){return e}static \u0275fac=(()=>{let e;return function(s){return(e||(e=w(n)))(s||n)}})();static \u0275prov=h({token:n,factory:n.\u0275fac})}return n})(),m=class{defaultLang;currentLang=this.defaultLang;translations={};langs=[];onTranslationChange=new S;onLangChange=new S;onDefaultLangChange=new S},O=new v("ISOLATE_TRANSLATE_SERVICE"),U=new v("USE_DEFAULT_LANG"),_=new v("DEFAULT_LANGUAGE"),B=new v("USE_EXTEND"),C=n=>f(n)?n:p(n),G=(()=>{class n{store;currentLoader;compiler;parser;missingTranslationHandler;useDefaultLang;extend;loadingTranslations;pending=!1;_translationRequests={};lastUseLanguage=null;get onTranslationChange(){return this.store.onTranslationChange}get onLangChange(){return this.store.onLangChange}get onDefaultLangChange(){return this.store.onDefaultLangChange}get defaultLang(){return this.store.defaultLang}set defaultLang(e){this.store.defaultLang=e}get currentLang(){return this.store.currentLang}set currentLang(e){this.store.currentLang=e}get langs(){return this.store.langs}set langs(e){this.store.langs=e}get translations(){return this.store.translations}set translations(e){this.store.translations=e}constructor(e,t,s,i,a,A=!0,l=!1,T=!1,y){this.store=e,this.currentLoader=t,this.compiler=s,this.parser=i,this.missingTranslationHandler=a,this.useDefaultLang=A,this.extend=T,l&&(this.store=new m),y&&this.setDefaultLang(y)}setDefaultLang(e){if(e===this.defaultLang)return;let t=this.retrieveTranslations(e);typeof t<"u"?(this.defaultLang==null&&(this.defaultLang=e),t.pipe(L(1)).subscribe(()=>{this.changeDefaultLang(e)})):this.changeDefaultLang(e)}getDefaultLang(){return this.defaultLang}use(e){if(this.lastUseLanguage=e,e===this.currentLang)return p(this.translations[e]);this.currentLang||(this.currentLang=e);let t=this.retrieveTranslations(e);return f(t)?(t.pipe(L(1)).subscribe(()=>{this.changeLang(e)}),t):(this.changeLang(e),p(this.translations[e]))}changeLang(e){e===this.lastUseLanguage&&(this.currentLang=e,this.onLangChange.emit({lang:e,translations:this.translations[e]}),this.defaultLang==null&&this.changeDefaultLang(e))}retrieveTranslations(e){if(typeof this.translations[e]>"u"||this.extend)return this._translationRequests[e]=this._translationRequests[e]||this.loadAndCompileTranslations(e),this._translationRequests[e]}getTranslation(e){return this.loadAndCompileTranslations(e)}loadAndCompileTranslations(e){this.pending=!0;let t=this.currentLoader.getTranslation(e).pipe(R(1),L(1));return this.loadingTranslations=t.pipe(V(s=>this.compiler.compileTranslations(s,e)),R(1),L(1)),this.loadingTranslations.subscribe({next:s=>{this.translations[e]=this.extend&&this.translations[e]?I(I({},s),this.translations[e]):s,this.updateLangs(),this.pending=!1},error:s=>{this.pending=!1}}),t}setTranslation(e,t,s=!1){let i=this.compiler.compileTranslations(t,e);(s||this.extend)&&this.translations[e]?this.translations[e]=K(this.translations[e],i):this.translations[e]=i,this.updateLangs(),this.onTranslationChange.emit({lang:e,translations:this.translations[e]})}getLangs(){return this.langs}addLangs(e){let t=e.filter(s=>!this.langs.includes(s));t.length>0&&(this.langs=[...this.langs,...t])}updateLangs(){this.addLangs(Object.keys(this.translations))}getParsedResultForKey(e,t,s){let i;if(e&&(i=this.runInterpolation(x(e,t),s)),i===void 0&&this.defaultLang!=null&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(i=this.runInterpolation(x(this.translations[this.defaultLang],t),s)),i===void 0){let a={key:t,translateService:this};typeof s<"u"&&(a.interpolateParams=s),i=this.missingTranslationHandler.handle(a)}return i!==void 0?i:t}runInterpolation(e,t){if(H(e))return e.map(s=>this.runInterpolation(s,t));if(D(e)){let s={};for(let i in e){let a=this.runInterpolation(e[i],t);a!==void 0&&(s[i]=a)}return s}else return this.parser.interpolate(e,t)}getParsedResult(e,t,s){if(t instanceof Array){let i={},a=!1;for(let l of t)i[l]=this.getParsedResultForKey(e,l,s),a=a||f(i[l]);if(!a)return i;let A=t.map(l=>C(i[l]));return q(A).pipe(V(l=>{let T={};return l.forEach((y,te)=>{T[t[te]]=y}),T}))}return this.getParsedResultForKey(e,t,s)}get(e,t){if(!u(e)||!e.length)throw new Error('Parameter "key" is required and cannot be empty');return this.pending?this.loadingTranslations.pipe(J(s=>C(this.getParsedResult(s,e,t)))):C(this.getParsedResult(this.translations[this.currentLang],e,t))}getStreamOnTranslationChange(e,t){if(!u(e)||!e.length)throw new Error('Parameter "key" is required and cannot be empty');return F(P(()=>this.get(e,t)),this.onTranslationChange.pipe(M(s=>{let i=this.getParsedResult(s.translations,e,t);return C(i)})))}stream(e,t){if(!u(e)||!e.length)throw new Error('Parameter "key" required');return F(P(()=>this.get(e,t)),this.onLangChange.pipe(M(s=>{let i=this.getParsedResult(s.translations,e,t);return C(i)})))}instant(e,t){if(!u(e)||e.length===0)throw new Error('Parameter "key" is required and cannot be empty');let s=this.getParsedResult(this.translations[this.currentLang],e,t);return f(s)?Array.isArray(e)?e.reduce((i,a)=>(i[a]=a,i),{}):e:s}set(e,t,s=this.currentLang){se(this.translations[s],e,$(t)?this.compiler.compile(t,s):this.compiler.compileTranslations(t,s)),this.updateLangs(),this.onTranslationChange.emit({lang:s,translations:this.translations[s]})}changeDefaultLang(e){this.defaultLang=e,this.onDefaultLangChange.emit({lang:e,translations:this.translations[e]})}reloadLang(e){return this.resetLang(e),this.loadAndCompileTranslations(e)}resetLang(e){delete this._translationRequests[e],delete this.translations[e]}getBrowserLang(){if(typeof window>"u"||!window.navigator)return;let e=this.getBrowserCultureLang();return e?e.split(/[-_]/)[0]:void 0}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}static \u0275fac=function(t){return new(t||n)(o(m),o(c),o(g),o(d),o(b),o(U),o(O),o(B),o(_))};static \u0275prov=h({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var ve=(()=>{class n{translate;_ref;value="";lastKey=null;lastParams=[];onTranslationChange;onLangChange;onDefaultLangChange;constructor(e,t){this.translate=e,this._ref=t}updateValue(e,t,s){let i=a=>{this.value=a!==void 0?a:e,this.lastKey=e,this._ref.markForCheck()};if(s){let a=this.translate.getParsedResult(s,e,t);f(a)?a.subscribe(i):i(a)}this.translate.get(e,t).subscribe(i)}transform(e,...t){if(!e||!e.length)return e;if(j(e,this.lastKey)&&j(t,this.lastParams))return this.value;let s;if(u(t[0])&&t.length)if($(t[0])&&t[0].length){let i=t[0].replace(/(')?([a-zA-Z0-9_]+)(')?(\s)?:/g,'"$2":').replace(/:(\s)?(')(.*?)(')/g,':"$3"');try{s=JSON.parse(i)}catch(a){throw new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${t[0]}`)}}else D(t[0])&&(s=t[0]);return this.lastKey=e,this.lastParams=t,this.updateValue(e,s),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(i=>{this.lastKey&&i.lang===this.translate.currentLang&&(this.lastKey=null,this.updateValue(e,s,i.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(i=>{this.lastKey&&(this.lastKey=null,this.updateValue(e,s,i.translations))})),this.onDefaultLangChange||(this.onDefaultLangChange=this.translate.onDefaultLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(e,s))})),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.onDefaultLangChange<"u"&&(this.onDefaultLangChange.unsubscribe(),this.onDefaultLangChange=void 0)}ngOnDestroy(){this._dispose()}static \u0275fac=function(t){return new(t||n)(N(G,16),N(Z,16))};static \u0275pipe=W({name:"translate",type:n,pure:!1});static \u0275prov=h({token:n,factory:n.\u0275fac})}return n})();var Ce=(()=>{class n{static forRoot(e={}){return{ngModule:n,providers:[e.loader||{provide:c,useClass:Q},e.compiler||{provide:g,useClass:ee},e.parser||{provide:d,useClass:k},e.missingTranslationHandler||{provide:b,useClass:Y},m,{provide:O,useValue:e.isolate},{provide:U,useValue:e.useDefaultLang},{provide:B,useValue:e.extend},{provide:_,useValue:e.defaultLanguage},G]}}static forChild(e={}){return{ngModule:n,providers:[e.loader||{provide:c,useClass:Q},e.compiler||{provide:g,useClass:ee},e.parser||{provide:d,useClass:k},e.missingTranslationHandler||{provide:b,useClass:Y},{provide:O,useValue:e.isolate},{provide:U,useValue:e.useDefaultLang},{provide:B,useValue:e.extend},{provide:_,useValue:e.defaultLanguage},G]}}static \u0275fac=function(t){return new(t||n)};static \u0275mod=z({type:n});static \u0275inj=X({})}return n})();export{G as a,ve as b,Ce as c};
1
+ import{$ as M,B as F,C as P,D as q,Da as w,L as J,O as L,Uc as Z,Y as R,a as I,ga as h,gb as N,ha as X,ja as v,ka as o,nb as z,pb as W,r as p,t as f,ub as S,x as V}from"./chunk-V7SOQAC5.js";var c=class{},Q=(()=>{class n extends c{getTranslation(e){return p({})}static \u0275fac=(()=>{let e;return function(s){return(e||(e=w(n)))(s||n)}})();static \u0275prov=h({token:n,factory:n.\u0275fac})}return n})(),b=class{},Y=(()=>{class n{handle(e){return e.key}static \u0275fac=function(t){return new(t||n)};static \u0275prov=h({token:n,factory:n.\u0275fac})}return n})();function j(n,r){if(n===r)return!0;if(n===null||r===null)return!1;if(n!==n&&r!==r)return!0;let e=typeof n,t=typeof r,s,i,a;if(e==t&&e=="object")if(Array.isArray(n)){if(!Array.isArray(r))return!1;if((s=n.length)==r.length){for(i=0;i<s;i++)if(!j(n[i],r[i]))return!1;return!0}}else{if(Array.isArray(r))return!1;a=Object.create(null);for(i in n){if(!j(n[i],r[i]))return!1;a[i]=!0}for(i in r)if(!(i in a)&&typeof r[i]<"u")return!1;return!0}return!1}function u(n){return typeof n<"u"&&n!==null}function D(n){return E(n)&&!H(n)&&n!==null}function E(n){return typeof n=="object"}function H(n){return Array.isArray(n)}function $(n){return typeof n=="string"}function ne(n){return typeof n=="function"}function K(n,r){let e=Object.assign({},n);return E(n)?(E(n)&&E(r)&&Object.keys(r).forEach(t=>{D(r[t])?t in n?e[t]=K(n[t],r[t]):Object.assign(e,{[t]:r[t]}):Object.assign(e,{[t]:r[t]})}),e):K({},r)}function x(n,r){let e=r.split(".");r="";do r+=e.shift(),u(n)&&u(n[r])&&(D(n[r])||H(n[r])||!e.length)?(n=n[r],r=""):e.length?r+=".":n=void 0;while(e.length);return n}function se(n,r,e){let t=r.split("."),s=n;for(let i=0;i<t.length;i++){let a=t[i];i===t.length-1?s[a]=e:((!s[a]||!D(s[a]))&&(s[a]={}),s=s[a])}}var d=class{},k=(()=>{class n extends d{templateMatcher=/{{\s?([^{}\s]*)\s?}}/g;interpolate(e,t){if($(e))return this.interpolateString(e,t);if(ne(e))return this.interpolateFunction(e,t)}interpolateFunction(e,t){return e(t)}interpolateString(e,t){return t?e.replace(this.templateMatcher,(s,i)=>{let a=x(t,i);return u(a)?a:s}):e}static \u0275fac=(()=>{let e;return function(s){return(e||(e=w(n)))(s||n)}})();static \u0275prov=h({token:n,factory:n.\u0275fac})}return n})(),g=class{},ee=(()=>{class n extends g{compile(e,t){return e}compileTranslations(e,t){return e}static \u0275fac=(()=>{let e;return function(s){return(e||(e=w(n)))(s||n)}})();static \u0275prov=h({token:n,factory:n.\u0275fac})}return n})(),m=class{defaultLang;currentLang=this.defaultLang;translations={};langs=[];onTranslationChange=new S;onLangChange=new S;onDefaultLangChange=new S},O=new v("ISOLATE_TRANSLATE_SERVICE"),U=new v("USE_DEFAULT_LANG"),_=new v("DEFAULT_LANGUAGE"),B=new v("USE_EXTEND"),C=n=>f(n)?n:p(n),G=(()=>{class n{store;currentLoader;compiler;parser;missingTranslationHandler;useDefaultLang;extend;loadingTranslations;pending=!1;_translationRequests={};lastUseLanguage=null;get onTranslationChange(){return this.store.onTranslationChange}get onLangChange(){return this.store.onLangChange}get onDefaultLangChange(){return this.store.onDefaultLangChange}get defaultLang(){return this.store.defaultLang}set defaultLang(e){this.store.defaultLang=e}get currentLang(){return this.store.currentLang}set currentLang(e){this.store.currentLang=e}get langs(){return this.store.langs}set langs(e){this.store.langs=e}get translations(){return this.store.translations}set translations(e){this.store.translations=e}constructor(e,t,s,i,a,A=!0,l=!1,T=!1,y){this.store=e,this.currentLoader=t,this.compiler=s,this.parser=i,this.missingTranslationHandler=a,this.useDefaultLang=A,this.extend=T,l&&(this.store=new m),y&&this.setDefaultLang(y)}setDefaultLang(e){if(e===this.defaultLang)return;let t=this.retrieveTranslations(e);typeof t<"u"?(this.defaultLang==null&&(this.defaultLang=e),t.pipe(L(1)).subscribe(()=>{this.changeDefaultLang(e)})):this.changeDefaultLang(e)}getDefaultLang(){return this.defaultLang}use(e){if(this.lastUseLanguage=e,e===this.currentLang)return p(this.translations[e]);this.currentLang||(this.currentLang=e);let t=this.retrieveTranslations(e);return f(t)?(t.pipe(L(1)).subscribe(()=>{this.changeLang(e)}),t):(this.changeLang(e),p(this.translations[e]))}changeLang(e){e===this.lastUseLanguage&&(this.currentLang=e,this.onLangChange.emit({lang:e,translations:this.translations[e]}),this.defaultLang==null&&this.changeDefaultLang(e))}retrieveTranslations(e){if(typeof this.translations[e]>"u"||this.extend)return this._translationRequests[e]=this._translationRequests[e]||this.loadAndCompileTranslations(e),this._translationRequests[e]}getTranslation(e){return this.loadAndCompileTranslations(e)}loadAndCompileTranslations(e){this.pending=!0;let t=this.currentLoader.getTranslation(e).pipe(R(1),L(1));return this.loadingTranslations=t.pipe(V(s=>this.compiler.compileTranslations(s,e)),R(1),L(1)),this.loadingTranslations.subscribe({next:s=>{this.translations[e]=this.extend&&this.translations[e]?I(I({},s),this.translations[e]):s,this.updateLangs(),this.pending=!1},error:s=>{this.pending=!1}}),t}setTranslation(e,t,s=!1){let i=this.compiler.compileTranslations(t,e);(s||this.extend)&&this.translations[e]?this.translations[e]=K(this.translations[e],i):this.translations[e]=i,this.updateLangs(),this.onTranslationChange.emit({lang:e,translations:this.translations[e]})}getLangs(){return this.langs}addLangs(e){let t=e.filter(s=>!this.langs.includes(s));t.length>0&&(this.langs=[...this.langs,...t])}updateLangs(){this.addLangs(Object.keys(this.translations))}getParsedResultForKey(e,t,s){let i;if(e&&(i=this.runInterpolation(x(e,t),s)),i===void 0&&this.defaultLang!=null&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(i=this.runInterpolation(x(this.translations[this.defaultLang],t),s)),i===void 0){let a={key:t,translateService:this};typeof s<"u"&&(a.interpolateParams=s),i=this.missingTranslationHandler.handle(a)}return i!==void 0?i:t}runInterpolation(e,t){if(H(e))return e.map(s=>this.runInterpolation(s,t));if(D(e)){let s={};for(let i in e){let a=this.runInterpolation(e[i],t);a!==void 0&&(s[i]=a)}return s}else return this.parser.interpolate(e,t)}getParsedResult(e,t,s){if(t instanceof Array){let i={},a=!1;for(let l of t)i[l]=this.getParsedResultForKey(e,l,s),a=a||f(i[l]);if(!a)return i;let A=t.map(l=>C(i[l]));return q(A).pipe(V(l=>{let T={};return l.forEach((y,te)=>{T[t[te]]=y}),T}))}return this.getParsedResultForKey(e,t,s)}get(e,t){if(!u(e)||!e.length)throw new Error('Parameter "key" is required and cannot be empty');return this.pending?this.loadingTranslations.pipe(J(s=>C(this.getParsedResult(s,e,t)))):C(this.getParsedResult(this.translations[this.currentLang],e,t))}getStreamOnTranslationChange(e,t){if(!u(e)||!e.length)throw new Error('Parameter "key" is required and cannot be empty');return F(P(()=>this.get(e,t)),this.onTranslationChange.pipe(M(s=>{let i=this.getParsedResult(s.translations,e,t);return C(i)})))}stream(e,t){if(!u(e)||!e.length)throw new Error('Parameter "key" required');return F(P(()=>this.get(e,t)),this.onLangChange.pipe(M(s=>{let i=this.getParsedResult(s.translations,e,t);return C(i)})))}instant(e,t){if(!u(e)||e.length===0)throw new Error('Parameter "key" is required and cannot be empty');let s=this.getParsedResult(this.translations[this.currentLang],e,t);return f(s)?Array.isArray(e)?e.reduce((i,a)=>(i[a]=a,i),{}):e:s}set(e,t,s=this.currentLang){se(this.translations[s],e,$(t)?this.compiler.compile(t,s):this.compiler.compileTranslations(t,s)),this.updateLangs(),this.onTranslationChange.emit({lang:s,translations:this.translations[s]})}changeDefaultLang(e){this.defaultLang=e,this.onDefaultLangChange.emit({lang:e,translations:this.translations[e]})}reloadLang(e){return this.resetLang(e),this.loadAndCompileTranslations(e)}resetLang(e){delete this._translationRequests[e],delete this.translations[e]}getBrowserLang(){if(typeof window>"u"||!window.navigator)return;let e=this.getBrowserCultureLang();return e?e.split(/[-_]/)[0]:void 0}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}static \u0275fac=function(t){return new(t||n)(o(m),o(c),o(g),o(d),o(b),o(U),o(O),o(B),o(_))};static \u0275prov=h({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var ve=(()=>{class n{translate;_ref;value="";lastKey=null;lastParams=[];onTranslationChange;onLangChange;onDefaultLangChange;constructor(e,t){this.translate=e,this._ref=t}updateValue(e,t,s){let i=a=>{this.value=a!==void 0?a:e,this.lastKey=e,this._ref.markForCheck()};if(s){let a=this.translate.getParsedResult(s,e,t);f(a)?a.subscribe(i):i(a)}this.translate.get(e,t).subscribe(i)}transform(e,...t){if(!e||!e.length)return e;if(j(e,this.lastKey)&&j(t,this.lastParams))return this.value;let s;if(u(t[0])&&t.length)if($(t[0])&&t[0].length){let i=t[0].replace(/(')?([a-zA-Z0-9_]+)(')?(\s)?:/g,'"$2":').replace(/:(\s)?(')(.*?)(')/g,':"$3"');try{s=JSON.parse(i)}catch(a){throw new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${t[0]}`)}}else D(t[0])&&(s=t[0]);return this.lastKey=e,this.lastParams=t,this.updateValue(e,s),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(i=>{this.lastKey&&i.lang===this.translate.currentLang&&(this.lastKey=null,this.updateValue(e,s,i.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(i=>{this.lastKey&&(this.lastKey=null,this.updateValue(e,s,i.translations))})),this.onDefaultLangChange||(this.onDefaultLangChange=this.translate.onDefaultLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(e,s))})),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.onDefaultLangChange<"u"&&(this.onDefaultLangChange.unsubscribe(),this.onDefaultLangChange=void 0)}ngOnDestroy(){this._dispose()}static \u0275fac=function(t){return new(t||n)(N(G,16),N(Z,16))};static \u0275pipe=W({name:"translate",type:n,pure:!1});static \u0275prov=h({token:n,factory:n.\u0275fac})}return n})();var Ce=(()=>{class n{static forRoot(e={}){return{ngModule:n,providers:[e.loader||{provide:c,useClass:Q},e.compiler||{provide:g,useClass:ee},e.parser||{provide:d,useClass:k},e.missingTranslationHandler||{provide:b,useClass:Y},m,{provide:O,useValue:e.isolate},{provide:U,useValue:e.useDefaultLang},{provide:B,useValue:e.extend},{provide:_,useValue:e.defaultLanguage},G]}}static forChild(e={}){return{ngModule:n,providers:[e.loader||{provide:c,useClass:Q},e.compiler||{provide:g,useClass:ee},e.parser||{provide:d,useClass:k},e.missingTranslationHandler||{provide:b,useClass:Y},{provide:O,useValue:e.isolate},{provide:U,useValue:e.useDefaultLang},{provide:B,useValue:e.extend},{provide:_,useValue:e.defaultLanguage},G]}}static \u0275fac=function(t){return new(t||n)};static \u0275mod=z({type:n});static \u0275inj=X({})}return n})();export{G as a,ve as b,Ce as c};
@@ -1,4 +1,4 @@
1
- import{a as _i,b as a2}from"./chunk-AYW72UFQ.js";import{a as qf}from"./chunk-K274PEUH.js";import{a as Bf}from"./chunk-53HX4CXU.js";import{a as zf,b as ar}from"./chunk-MK36QITJ.js";import{a as Lf,b as Uf}from"./chunk-PSK63HDR.js";import{a as Rf}from"./chunk-EM3VXCLF.js";import{a as Qa,b as is}from"./chunk-J5JT5MX6.js";import{a as es,b as ts}from"./chunk-XVOHGK47.js";import{a as Vf}from"./chunk-VLK5XU6X.js";import{a as Ka,b as Ga,c as Ja,d as Xa,e as Ya,f as Za,g as rr,m as Oe,n as ot,o as Df,p as Af,q as Nf,r as jf,s as Ff,t as or}from"./chunk-IVU5NZ6Q.js";import{A as lo,a as If,b as Yi,c as ir,e as Et,f as $f,h as Ef,i as Tf,j as Pf,k as Of,l as Zi,m as kf,o as Qi,r as nr,s as On,t as kn,y as Mf,z as oi}from"./chunk-VCD26PYR.js";import{a as tn}from"./chunk-NA3BCE4T.js";import{d as yi}from"./chunk-NSYXJMRL.js";import{b as Le}from"./chunk-6GRAO5OI.js";import{k as Ce,m as en,n as _e}from"./chunk-OMLTIUY5.js";import{a as xe,b as ke}from"./chunk-TVAJZAL5.js";import{e as Sf}from"./chunk-NLGVT4MV.js";import{$a as mf,Ac as vf,Bc as xf,Ca as Wi,Cc as Pe,D as uf,Da as ff,Dc as ri,Ec as Tn,Fa as Qn,Fc as Wt,Gc as tr,Hb as G,Hc as w,Ib as T,Ic as I,Jb as P,Jc as He,Lb as at,M as Yn,Mb as st,Nb as lt,Ob as b,Pb as f,Qb as m,Qc as Ct,Rb as $,Rc as z,Sb as Qe,Sc as Xi,Tb as rt,Ub as gi,Uc as Cf,Vb as yf,Wb as _f,Xa as he,Z as lu,_b as H,a as X,aa as so,ab as d,b as $e,bc as q,cc as Ht,dc as y,e as g,fa as cf,fb as Ua,g as Re,ga as xt,gb as Ti,h as K,ha as Zn,hc as uu,ib as In,ic as cu,id as Kt,ja as df,jc as du,jd as Pn,k as of,ka as pf,kc as Ki,kd as wt,la as E,lc as Gi,mb as Y,mc as bf,n as Ft,nb as er,nc as ni,o as su,ob as $n,oc as Ji,pb as hf,pc as Z,q as af,qc as x,ra as j,rc as R,rd as Wa,sa as F,sb as ue,sc as V,tc as En,ub as gf,uc as Ha,v as sf,vb as za,w as ae,x as lf,xc as Ae,yc as Ne,za as La,zc as je,zd as wf}from"./chunk-OXBT7KSO.js";var po=g(ve=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.regexpCode=ve.getEsmExportName=ve.getProperty=ve.safeStringify=ve.stringify=ve.strConcat=ve.addCodeArg=ve.str=ve._=ve.nil=ve._Code=ve.Name=ve.IDENTIFIER=ve._CodeOrName=void 0;var uo=class{};ve._CodeOrName=uo;ve.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Mn=class extends uo{constructor(i){if(super(),!ve.IDENTIFIER.test(i))throw new Error("CodeGen: name must be a valid identifier");this.str=i}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};ve.Name=Mn;var Gt=class extends uo{constructor(i){super(),this._items=typeof i=="string"?[i]:i}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let i=this._items[0];return i===""||i==='""'}get str(){var i;return(i=this._str)!==null&&i!==void 0?i:this._str=this._items.reduce((t,n)=>`${t}${n}`,"")}get names(){var i;return(i=this._names)!==null&&i!==void 0?i:this._names=this._items.reduce((t,n)=>(n instanceof Mn&&(t[n.str]=(t[n.str]||0)+1),t),{})}};ve._Code=Gt;ve.nil=new Gt("");function Hf(e,...i){let t=[e[0]],n=0;for(;n<i.length;)fu(t,i[n]),t.push(e[++n]);return new Gt(t)}ve._=Hf;var pu=new Gt("+");function Wf(e,...i){let t=[co(e[0])],n=0;for(;n<i.length;)t.push(pu),fu(t,i[n]),t.push(pu,co(e[++n]));return l2(t),new Gt(t)}ve.str=Wf;function fu(e,i){i instanceof Gt?e.push(...i._items):i instanceof Mn?e.push(i):e.push(d2(i))}ve.addCodeArg=fu;function l2(e){let i=1;for(;i<e.length-1;){if(e[i]===pu){let t=u2(e[i-1],e[i+1]);if(t!==void 0){e.splice(i-1,3,t);continue}e[i++]="+"}i++}}function u2(e,i){if(i==='""')return e;if(e==='""')return i;if(typeof e=="string")return i instanceof Mn||e[e.length-1]!=='"'?void 0:typeof i!="string"?`${e.slice(0,-1)}${i}"`:i[0]==='"'?e.slice(0,-1)+i.slice(1):void 0;if(typeof i=="string"&&i[0]==='"'&&!(e instanceof Mn))return`"${e}${i.slice(1)}`}function c2(e,i){return i.emptyStr()?e:e.emptyStr()?i:Wf`${e}${i}`}ve.strConcat=c2;function d2(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:co(Array.isArray(e)?e.join(","):e)}function p2(e){return new Gt(co(e))}ve.stringify=p2;function co(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ve.safeStringify=co;function f2(e){return typeof e=="string"&&ve.IDENTIFIER.test(e)?new Gt(`.${e}`):Hf`[${e}]`}ve.getProperty=f2;function m2(e){if(typeof e=="string"&&ve.IDENTIFIER.test(e))return new Gt(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}ve.getEsmExportName=m2;function h2(e){return new Gt(e.toString())}ve.regexpCode=h2});var gu=g(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.ValueScope=Pt.ValueScopeName=Pt.Scope=Pt.varKinds=Pt.UsedValueState=void 0;var Tt=po(),mu=class extends Error{constructor(i){super(`CodeGen: "code" for ${i} not defined`),this.value=i.value}},ns=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(ns||(Pt.UsedValueState=ns={}));Pt.varKinds={const:new Tt.Name("const"),let:new Tt.Name("let"),var:new Tt.Name("var")};var rs=class{constructor({prefixes:i,parent:t}={}){this._names={},this._prefixes=i,this._parent=t}toName(i){return i instanceof Tt.Name?i:this.name(i)}name(i){return new Tt.Name(this._newName(i))}_newName(i){let t=this._names[i]||this._nameGroup(i);return`${i}${t.index++}`}_nameGroup(i){var t,n;if(!((n=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||n===void 0)&&n.has(i)||this._prefixes&&!this._prefixes.has(i))throw new Error(`CodeGen: prefix "${i}" is not allowed in this scope`);return this._names[i]={prefix:i,index:0}}};Pt.Scope=rs;var os=class extends Tt.Name{constructor(i,t){super(t),this.prefix=i}setValue(i,{property:t,itemIndex:n}){this.value=i,this.scopePath=(0,Tt._)`.${new Tt.Name(t)}[${n}]`}};Pt.ValueScopeName=os;var g2=(0,Tt._)`\n`,hu=class extends rs{constructor(i){super(i),this._values={},this._scope=i.scope,this.opts=$e(X({},i),{_n:i.lines?g2:Tt.nil})}get(){return this._scope}name(i){return new os(i,this._newName(i))}value(i,t){var n;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let r=this.toName(i),{prefix:o}=r,a=(n=t.key)!==null&&n!==void 0?n:t.ref,s=this._values[o];if(s){let c=s.get(a);if(c)return c}else s=this._values[o]=new Map;s.set(a,r);let l=this._scope[o]||(this._scope[o]=[]),u=l.length;return l[u]=t.ref,r.setValue(t,{property:o,itemIndex:u}),r}getValue(i,t){let n=this._values[i];if(n)return n.get(t)}scopeRefs(i,t=this._values){return this._reduceValues(t,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Tt._)`${i}${n.scopePath}`})}scopeCode(i=this._values,t,n){return this._reduceValues(i,r=>{if(r.value===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return r.value.code},t,n)}_reduceValues(i,t,n={},r){let o=Tt.nil;for(let a in i){let s=i[a];if(!s)continue;let l=n[a]=n[a]||new Map;s.forEach(u=>{if(l.has(u))return;l.set(u,ns.Started);let c=t(u);if(c){let p=this.opts.es5?Pt.varKinds.var:Pt.varKinds.const;o=(0,Tt._)`${o}${p} ${u} = ${c};${this.opts._n}`}else if(c=r?.(u))o=(0,Tt._)`${o}${c}${this.opts._n}`;else throw new mu(u);l.set(u,ns.Completed)})}return o}};Pt.ValueScope=hu});var ee=g(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.or=ce.and=ce.not=ce.CodeGen=ce.operators=ce.varKinds=ce.ValueScopeName=ce.ValueScope=ce.Scope=ce.Name=ce.regexpCode=ce.stringify=ce.getProperty=ce.nil=ce.strConcat=ce.str=ce._=void 0;var ge=po(),ai=gu(),nn=po();Object.defineProperty(ce,"_",{enumerable:!0,get:function(){return nn._}});Object.defineProperty(ce,"str",{enumerable:!0,get:function(){return nn.str}});Object.defineProperty(ce,"strConcat",{enumerable:!0,get:function(){return nn.strConcat}});Object.defineProperty(ce,"nil",{enumerable:!0,get:function(){return nn.nil}});Object.defineProperty(ce,"getProperty",{enumerable:!0,get:function(){return nn.getProperty}});Object.defineProperty(ce,"stringify",{enumerable:!0,get:function(){return nn.stringify}});Object.defineProperty(ce,"regexpCode",{enumerable:!0,get:function(){return nn.regexpCode}});Object.defineProperty(ce,"Name",{enumerable:!0,get:function(){return nn.Name}});var cs=gu();Object.defineProperty(ce,"Scope",{enumerable:!0,get:function(){return cs.Scope}});Object.defineProperty(ce,"ValueScope",{enumerable:!0,get:function(){return cs.ValueScope}});Object.defineProperty(ce,"ValueScopeName",{enumerable:!0,get:function(){return cs.ValueScopeName}});Object.defineProperty(ce,"varKinds",{enumerable:!0,get:function(){return cs.varKinds}});ce.operators={GT:new ge._Code(">"),GTE:new ge._Code(">="),LT:new ge._Code("<"),LTE:new ge._Code("<="),EQ:new ge._Code("==="),NEQ:new ge._Code("!=="),NOT:new ge._Code("!"),OR:new ge._Code("||"),AND:new ge._Code("&&"),ADD:new ge._Code("+")};var Pi=class{optimizeNodes(){return this}optimizeNames(i,t){return this}},yu=class extends Pi{constructor(i,t,n){super(),this.varKind=i,this.name=t,this.rhs=n}render({es5:i,_n:t}){let n=i?ai.varKinds.var:this.varKind,r=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${r};`+t}optimizeNames(i,t){if(i[this.name.str])return this.rhs&&(this.rhs=lr(this.rhs,i,t)),this}get names(){return this.rhs instanceof ge._CodeOrName?this.rhs.names:{}}},ss=class extends Pi{constructor(i,t,n){super(),this.lhs=i,this.rhs=t,this.sideEffects=n}render({_n:i}){return`${this.lhs} = ${this.rhs};`+i}optimizeNames(i,t){if(!(this.lhs instanceof ge.Name&&!i[this.lhs.str]&&!this.sideEffects))return this.rhs=lr(this.rhs,i,t),this}get names(){let i=this.lhs instanceof ge.Name?{}:X({},this.lhs.names);return us(i,this.rhs)}},_u=class extends ss{constructor(i,t,n,r){super(i,n,r),this.op=t}render({_n:i}){return`${this.lhs} ${this.op}= ${this.rhs};`+i}},bu=class extends Pi{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`${this.label}:`+i}},vu=class extends Pi{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`break${this.label?` ${this.label}`:""};`+i}},xu=class extends Pi{constructor(i){super(),this.error=i}render({_n:i}){return`throw ${this.error};`+i}get names(){return this.error.names}},Cu=class extends Pi{constructor(i){super(),this.code=i}render({_n:i}){return`${this.code};`+i}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(i,t){return this.code=lr(this.code,i,t),this}get names(){return this.code instanceof ge._CodeOrName?this.code.names:{}}},fo=class extends Pi{constructor(i=[]){super(),this.nodes=i}render(i){return this.nodes.reduce((t,n)=>t+n.render(i),"")}optimizeNodes(){let{nodes:i}=this,t=i.length;for(;t--;){let n=i[t].optimizeNodes();Array.isArray(n)?i.splice(t,1,...n):n?i[t]=n:i.splice(t,1)}return i.length>0?this:void 0}optimizeNames(i,t){let{nodes:n}=this,r=n.length;for(;r--;){let o=n[r];o.optimizeNames(i,t)||(y2(i,o.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((i,t)=>Dn(i,t.names),{})}},Oi=class extends fo{render(i){return"{"+i._n+super.render(i)+"}"+i._n}},wu=class extends fo{},Su=(()=>{class e extends Oi{}return e.kind="else",e})(),as=(()=>{class e extends Oi{constructor(t,n){super(n),this.condition=t}render(t){let n=`if(${this.condition})`+super.render(t);return this.else&&(n+="else "+this.else.render(t)),n}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let n=this.else;if(n){let r=n.optimizeNodes();n=this.else=Array.isArray(r)?new Su(r):r}if(n)return t===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(Yf(t),n instanceof e?[n]:n.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,n){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(t,n),!!(super.optimizeNames(t,n)||this.else))return this.condition=lr(this.condition,t,n),this}get names(){let t=super.names;return us(t,this.condition),this.else&&Dn(t,this.else.names),t}}return e.kind="if",e})(),ds=(()=>{class e extends Oi{}return e.kind="for",e})(),Iu=class extends ds{constructor(i){super(),this.iteration=i}render(i){return`for(${this.iteration})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iteration=lr(this.iteration,i,t),this}get names(){return Dn(super.names,this.iteration.names)}},$u=class extends ds{constructor(i,t,n,r){super(),this.varKind=i,this.name=t,this.from=n,this.to=r}render(i){let t=i.es5?ai.varKinds.var:this.varKind,{name:n,from:r,to:o}=this;return`for(${t} ${n}=${r}; ${n}<${o}; ${n}++)`+super.render(i)}get names(){let i=us(super.names,this.from);return us(i,this.to)}},ls=class extends ds{constructor(i,t,n,r){super(),this.loop=i,this.varKind=t,this.name=n,this.iterable=r}render(i){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iterable=lr(this.iterable,i,t),this}get names(){return Dn(super.names,this.iterable.names)}},Kf=(()=>{class e extends Oi{constructor(t,n,r){super(),this.name=t,this.args=n,this.async=r}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),Gf=(()=>{class e extends fo{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Eu=class extends Oi{render(i){let t="try"+super.render(i);return this.catch&&(t+=this.catch.render(i)),this.finally&&(t+=this.finally.render(i)),t}optimizeNodes(){var i,t;return super.optimizeNodes(),(i=this.catch)===null||i===void 0||i.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(i,t){var n,r;return super.optimizeNames(i,t),(n=this.catch)===null||n===void 0||n.optimizeNames(i,t),(r=this.finally)===null||r===void 0||r.optimizeNames(i,t),this}get names(){let i=super.names;return this.catch&&Dn(i,this.catch.names),this.finally&&Dn(i,this.finally.names),i}},Jf=(()=>{class e extends Oi{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),Xf=(()=>{class e extends Oi{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),Tu=class{constructor(i,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=$e(X({},t),{_n:t.lines?`
1
+ import{a as _i,b as a2}from"./chunk-PJDX7TKL.js";import{a as qf}from"./chunk-DDAEYXAV.js";import{a as Bf}from"./chunk-P3TP4J62.js";import{a as zf,b as ar}from"./chunk-EXA4HLEA.js";import{a as Lf,b as Uf}from"./chunk-NQDYN4CZ.js";import{a as Rf}from"./chunk-ADNBR4EK.js";import{a as Qa,b as is}from"./chunk-7FO4RGTF.js";import{a as es,b as ts}from"./chunk-2KOR6LRK.js";import{a as Vf}from"./chunk-QOU7SWHO.js";import{a as Ka,b as Ga,c as Ja,d as Xa,e as Ya,f as Za,g as rr,m as Oe,n as ot,o as Df,p as Af,q as Nf,r as jf,s as Ff,t as or}from"./chunk-PSSVCFFV.js";import{A as lo,a as If,b as Yi,c as ir,e as Et,f as $f,h as Ef,i as Tf,j as Pf,k as Of,l as Zi,m as kf,o as Qi,r as nr,s as On,t as kn,y as Mf,z as oi}from"./chunk-K2NEWUWG.js";import{a as tn}from"./chunk-RO5J6JA4.js";import{d as yi}from"./chunk-QRQBCPWO.js";import{b as Le}from"./chunk-C2UUY7C4.js";import{k as Ce,m as en,n as _e}from"./chunk-Z355YUUI.js";import{a as xe,b as ke}from"./chunk-ZG3HINDJ.js";import{e as Sf}from"./chunk-K7QEGT3E.js";import{$a as mf,Ac as vf,Bc as xf,Ca as Wi,Cc as Pe,D as uf,Da as ff,Dc as ri,Ec as Tn,Fa as Qn,Fc as Wt,Gc as tr,Hb as G,Hc as w,Ib as T,Ic as I,Jb as P,Jc as He,Lb as at,M as Yn,Mb as st,Nb as lt,Ob as b,Pb as f,Qb as m,Qc as Ct,Rb as $,Rc as z,Sb as Qe,Sc as Xi,Tb as rt,Ub as gi,Uc as Cf,Vb as yf,Wb as _f,Xa as he,Z as lu,_b as H,a as X,aa as so,ab as d,b as $e,bc as q,cc as Ht,dc as y,e as g,fa as cf,fb as Ua,g as Re,ga as xt,gb as Ti,h as K,ha as Zn,hc as uu,ib as In,ic as cu,id as Kt,ja as df,jc as du,jd as Pn,k as of,ka as pf,kc as Ki,kd as wt,la as E,lc as Gi,mb as Y,mc as bf,n as Ft,nb as er,nc as ni,o as su,ob as $n,oc as Ji,pb as hf,pc as Z,q as af,qc as x,ra as j,rc as R,rd as Wa,sa as F,sb as ue,sc as V,tc as En,ub as gf,uc as Ha,v as sf,vb as za,w as ae,x as lf,xc as Ae,yc as Ne,za as La,zc as je,zd as wf}from"./chunk-V7SOQAC5.js";var po=g(ve=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.regexpCode=ve.getEsmExportName=ve.getProperty=ve.safeStringify=ve.stringify=ve.strConcat=ve.addCodeArg=ve.str=ve._=ve.nil=ve._Code=ve.Name=ve.IDENTIFIER=ve._CodeOrName=void 0;var uo=class{};ve._CodeOrName=uo;ve.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Mn=class extends uo{constructor(i){if(super(),!ve.IDENTIFIER.test(i))throw new Error("CodeGen: name must be a valid identifier");this.str=i}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};ve.Name=Mn;var Gt=class extends uo{constructor(i){super(),this._items=typeof i=="string"?[i]:i}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let i=this._items[0];return i===""||i==='""'}get str(){var i;return(i=this._str)!==null&&i!==void 0?i:this._str=this._items.reduce((t,n)=>`${t}${n}`,"")}get names(){var i;return(i=this._names)!==null&&i!==void 0?i:this._names=this._items.reduce((t,n)=>(n instanceof Mn&&(t[n.str]=(t[n.str]||0)+1),t),{})}};ve._Code=Gt;ve.nil=new Gt("");function Hf(e,...i){let t=[e[0]],n=0;for(;n<i.length;)fu(t,i[n]),t.push(e[++n]);return new Gt(t)}ve._=Hf;var pu=new Gt("+");function Wf(e,...i){let t=[co(e[0])],n=0;for(;n<i.length;)t.push(pu),fu(t,i[n]),t.push(pu,co(e[++n]));return l2(t),new Gt(t)}ve.str=Wf;function fu(e,i){i instanceof Gt?e.push(...i._items):i instanceof Mn?e.push(i):e.push(d2(i))}ve.addCodeArg=fu;function l2(e){let i=1;for(;i<e.length-1;){if(e[i]===pu){let t=u2(e[i-1],e[i+1]);if(t!==void 0){e.splice(i-1,3,t);continue}e[i++]="+"}i++}}function u2(e,i){if(i==='""')return e;if(e==='""')return i;if(typeof e=="string")return i instanceof Mn||e[e.length-1]!=='"'?void 0:typeof i!="string"?`${e.slice(0,-1)}${i}"`:i[0]==='"'?e.slice(0,-1)+i.slice(1):void 0;if(typeof i=="string"&&i[0]==='"'&&!(e instanceof Mn))return`"${e}${i.slice(1)}`}function c2(e,i){return i.emptyStr()?e:e.emptyStr()?i:Wf`${e}${i}`}ve.strConcat=c2;function d2(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:co(Array.isArray(e)?e.join(","):e)}function p2(e){return new Gt(co(e))}ve.stringify=p2;function co(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ve.safeStringify=co;function f2(e){return typeof e=="string"&&ve.IDENTIFIER.test(e)?new Gt(`.${e}`):Hf`[${e}]`}ve.getProperty=f2;function m2(e){if(typeof e=="string"&&ve.IDENTIFIER.test(e))return new Gt(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}ve.getEsmExportName=m2;function h2(e){return new Gt(e.toString())}ve.regexpCode=h2});var gu=g(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.ValueScope=Pt.ValueScopeName=Pt.Scope=Pt.varKinds=Pt.UsedValueState=void 0;var Tt=po(),mu=class extends Error{constructor(i){super(`CodeGen: "code" for ${i} not defined`),this.value=i.value}},ns=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(ns||(Pt.UsedValueState=ns={}));Pt.varKinds={const:new Tt.Name("const"),let:new Tt.Name("let"),var:new Tt.Name("var")};var rs=class{constructor({prefixes:i,parent:t}={}){this._names={},this._prefixes=i,this._parent=t}toName(i){return i instanceof Tt.Name?i:this.name(i)}name(i){return new Tt.Name(this._newName(i))}_newName(i){let t=this._names[i]||this._nameGroup(i);return`${i}${t.index++}`}_nameGroup(i){var t,n;if(!((n=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||n===void 0)&&n.has(i)||this._prefixes&&!this._prefixes.has(i))throw new Error(`CodeGen: prefix "${i}" is not allowed in this scope`);return this._names[i]={prefix:i,index:0}}};Pt.Scope=rs;var os=class extends Tt.Name{constructor(i,t){super(t),this.prefix=i}setValue(i,{property:t,itemIndex:n}){this.value=i,this.scopePath=(0,Tt._)`.${new Tt.Name(t)}[${n}]`}};Pt.ValueScopeName=os;var g2=(0,Tt._)`\n`,hu=class extends rs{constructor(i){super(i),this._values={},this._scope=i.scope,this.opts=$e(X({},i),{_n:i.lines?g2:Tt.nil})}get(){return this._scope}name(i){return new os(i,this._newName(i))}value(i,t){var n;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let r=this.toName(i),{prefix:o}=r,a=(n=t.key)!==null&&n!==void 0?n:t.ref,s=this._values[o];if(s){let c=s.get(a);if(c)return c}else s=this._values[o]=new Map;s.set(a,r);let l=this._scope[o]||(this._scope[o]=[]),u=l.length;return l[u]=t.ref,r.setValue(t,{property:o,itemIndex:u}),r}getValue(i,t){let n=this._values[i];if(n)return n.get(t)}scopeRefs(i,t=this._values){return this._reduceValues(t,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Tt._)`${i}${n.scopePath}`})}scopeCode(i=this._values,t,n){return this._reduceValues(i,r=>{if(r.value===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return r.value.code},t,n)}_reduceValues(i,t,n={},r){let o=Tt.nil;for(let a in i){let s=i[a];if(!s)continue;let l=n[a]=n[a]||new Map;s.forEach(u=>{if(l.has(u))return;l.set(u,ns.Started);let c=t(u);if(c){let p=this.opts.es5?Pt.varKinds.var:Pt.varKinds.const;o=(0,Tt._)`${o}${p} ${u} = ${c};${this.opts._n}`}else if(c=r?.(u))o=(0,Tt._)`${o}${c}${this.opts._n}`;else throw new mu(u);l.set(u,ns.Completed)})}return o}};Pt.ValueScope=hu});var ee=g(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.or=ce.and=ce.not=ce.CodeGen=ce.operators=ce.varKinds=ce.ValueScopeName=ce.ValueScope=ce.Scope=ce.Name=ce.regexpCode=ce.stringify=ce.getProperty=ce.nil=ce.strConcat=ce.str=ce._=void 0;var ge=po(),ai=gu(),nn=po();Object.defineProperty(ce,"_",{enumerable:!0,get:function(){return nn._}});Object.defineProperty(ce,"str",{enumerable:!0,get:function(){return nn.str}});Object.defineProperty(ce,"strConcat",{enumerable:!0,get:function(){return nn.strConcat}});Object.defineProperty(ce,"nil",{enumerable:!0,get:function(){return nn.nil}});Object.defineProperty(ce,"getProperty",{enumerable:!0,get:function(){return nn.getProperty}});Object.defineProperty(ce,"stringify",{enumerable:!0,get:function(){return nn.stringify}});Object.defineProperty(ce,"regexpCode",{enumerable:!0,get:function(){return nn.regexpCode}});Object.defineProperty(ce,"Name",{enumerable:!0,get:function(){return nn.Name}});var cs=gu();Object.defineProperty(ce,"Scope",{enumerable:!0,get:function(){return cs.Scope}});Object.defineProperty(ce,"ValueScope",{enumerable:!0,get:function(){return cs.ValueScope}});Object.defineProperty(ce,"ValueScopeName",{enumerable:!0,get:function(){return cs.ValueScopeName}});Object.defineProperty(ce,"varKinds",{enumerable:!0,get:function(){return cs.varKinds}});ce.operators={GT:new ge._Code(">"),GTE:new ge._Code(">="),LT:new ge._Code("<"),LTE:new ge._Code("<="),EQ:new ge._Code("==="),NEQ:new ge._Code("!=="),NOT:new ge._Code("!"),OR:new ge._Code("||"),AND:new ge._Code("&&"),ADD:new ge._Code("+")};var Pi=class{optimizeNodes(){return this}optimizeNames(i,t){return this}},yu=class extends Pi{constructor(i,t,n){super(),this.varKind=i,this.name=t,this.rhs=n}render({es5:i,_n:t}){let n=i?ai.varKinds.var:this.varKind,r=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${r};`+t}optimizeNames(i,t){if(i[this.name.str])return this.rhs&&(this.rhs=lr(this.rhs,i,t)),this}get names(){return this.rhs instanceof ge._CodeOrName?this.rhs.names:{}}},ss=class extends Pi{constructor(i,t,n){super(),this.lhs=i,this.rhs=t,this.sideEffects=n}render({_n:i}){return`${this.lhs} = ${this.rhs};`+i}optimizeNames(i,t){if(!(this.lhs instanceof ge.Name&&!i[this.lhs.str]&&!this.sideEffects))return this.rhs=lr(this.rhs,i,t),this}get names(){let i=this.lhs instanceof ge.Name?{}:X({},this.lhs.names);return us(i,this.rhs)}},_u=class extends ss{constructor(i,t,n,r){super(i,n,r),this.op=t}render({_n:i}){return`${this.lhs} ${this.op}= ${this.rhs};`+i}},bu=class extends Pi{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`${this.label}:`+i}},vu=class extends Pi{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`break${this.label?` ${this.label}`:""};`+i}},xu=class extends Pi{constructor(i){super(),this.error=i}render({_n:i}){return`throw ${this.error};`+i}get names(){return this.error.names}},Cu=class extends Pi{constructor(i){super(),this.code=i}render({_n:i}){return`${this.code};`+i}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(i,t){return this.code=lr(this.code,i,t),this}get names(){return this.code instanceof ge._CodeOrName?this.code.names:{}}},fo=class extends Pi{constructor(i=[]){super(),this.nodes=i}render(i){return this.nodes.reduce((t,n)=>t+n.render(i),"")}optimizeNodes(){let{nodes:i}=this,t=i.length;for(;t--;){let n=i[t].optimizeNodes();Array.isArray(n)?i.splice(t,1,...n):n?i[t]=n:i.splice(t,1)}return i.length>0?this:void 0}optimizeNames(i,t){let{nodes:n}=this,r=n.length;for(;r--;){let o=n[r];o.optimizeNames(i,t)||(y2(i,o.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((i,t)=>Dn(i,t.names),{})}},Oi=class extends fo{render(i){return"{"+i._n+super.render(i)+"}"+i._n}},wu=class extends fo{},Su=(()=>{class e extends Oi{}return e.kind="else",e})(),as=(()=>{class e extends Oi{constructor(t,n){super(n),this.condition=t}render(t){let n=`if(${this.condition})`+super.render(t);return this.else&&(n+="else "+this.else.render(t)),n}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let n=this.else;if(n){let r=n.optimizeNodes();n=this.else=Array.isArray(r)?new Su(r):r}if(n)return t===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(Yf(t),n instanceof e?[n]:n.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,n){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(t,n),!!(super.optimizeNames(t,n)||this.else))return this.condition=lr(this.condition,t,n),this}get names(){let t=super.names;return us(t,this.condition),this.else&&Dn(t,this.else.names),t}}return e.kind="if",e})(),ds=(()=>{class e extends Oi{}return e.kind="for",e})(),Iu=class extends ds{constructor(i){super(),this.iteration=i}render(i){return`for(${this.iteration})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iteration=lr(this.iteration,i,t),this}get names(){return Dn(super.names,this.iteration.names)}},$u=class extends ds{constructor(i,t,n,r){super(),this.varKind=i,this.name=t,this.from=n,this.to=r}render(i){let t=i.es5?ai.varKinds.var:this.varKind,{name:n,from:r,to:o}=this;return`for(${t} ${n}=${r}; ${n}<${o}; ${n}++)`+super.render(i)}get names(){let i=us(super.names,this.from);return us(i,this.to)}},ls=class extends ds{constructor(i,t,n,r){super(),this.loop=i,this.varKind=t,this.name=n,this.iterable=r}render(i){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iterable=lr(this.iterable,i,t),this}get names(){return Dn(super.names,this.iterable.names)}},Kf=(()=>{class e extends Oi{constructor(t,n,r){super(),this.name=t,this.args=n,this.async=r}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),Gf=(()=>{class e extends fo{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Eu=class extends Oi{render(i){let t="try"+super.render(i);return this.catch&&(t+=this.catch.render(i)),this.finally&&(t+=this.finally.render(i)),t}optimizeNodes(){var i,t;return super.optimizeNodes(),(i=this.catch)===null||i===void 0||i.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(i,t){var n,r;return super.optimizeNames(i,t),(n=this.catch)===null||n===void 0||n.optimizeNames(i,t),(r=this.finally)===null||r===void 0||r.optimizeNames(i,t),this}get names(){let i=super.names;return this.catch&&Dn(i,this.catch.names),this.finally&&Dn(i,this.finally.names),i}},Jf=(()=>{class e extends Oi{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),Xf=(()=>{class e extends Oi{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),Tu=class{constructor(i,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=$e(X({},t),{_n:t.lines?`
2
2
  `:""}),this._extScope=i,this._scope=new ai.Scope({parent:i}),this._nodes=[new wu]}toString(){return this._root.render(this.opts)}name(i){return this._scope.name(i)}scopeName(i){return this._extScope.name(i)}scopeValue(i,t){let n=this._extScope.value(i,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(i,t){return this._extScope.getValue(i,t)}scopeRefs(i){return this._extScope.scopeRefs(i,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(i,t,n,r){let o=this._scope.toName(t);return n!==void 0&&r&&(this._constants[o.str]=n),this._leafNode(new yu(i,o,n)),o}const(i,t,n){return this._def(ai.varKinds.const,i,t,n)}let(i,t,n){return this._def(ai.varKinds.let,i,t,n)}var(i,t,n){return this._def(ai.varKinds.var,i,t,n)}assign(i,t,n){return this._leafNode(new ss(i,t,n))}add(i,t){return this._leafNode(new _u(i,ce.operators.ADD,t))}code(i){return typeof i=="function"?i():i!==ge.nil&&this._leafNode(new Cu(i)),this}object(...i){let t=["{"];for(let[n,r]of i)t.length>1&&t.push(","),t.push(n),(n!==r||this.opts.es5)&&(t.push(":"),(0,ge.addCodeArg)(t,r));return t.push("}"),new ge._Code(t)}if(i,t,n){if(this._blockNode(new as(i)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(i){return this._elseNode(new as(i))}else(){return this._elseNode(new Su)}endIf(){return this._endBlockNode(as,Su)}_for(i,t){return this._blockNode(i),t&&this.code(t).endFor(),this}for(i,t){return this._for(new Iu(i),t)}forRange(i,t,n,r,o=this.opts.es5?ai.varKinds.var:ai.varKinds.let){let a=this._scope.toName(i);return this._for(new $u(o,a,t,n),()=>r(a))}forOf(i,t,n,r=ai.varKinds.const){let o=this._scope.toName(i);if(this.opts.es5){let a=t instanceof ge.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,ge._)`${a}.length`,s=>{this.var(o,(0,ge._)`${a}[${s}]`),n(o)})}return this._for(new ls("of",r,o,t),()=>n(o))}forIn(i,t,n,r=this.opts.es5?ai.varKinds.var:ai.varKinds.const){if(this.opts.ownProperties)return this.forOf(i,(0,ge._)`Object.keys(${t})`,n);let o=this._scope.toName(i);return this._for(new ls("in",r,o,t),()=>n(o))}endFor(){return this._endBlockNode(ds)}label(i){return this._leafNode(new bu(i))}break(i){return this._leafNode(new vu(i))}return(i){let t=new Gf;if(this._blockNode(t),this.code(i),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Gf)}try(i,t,n){if(!t&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let r=new Eu;if(this._blockNode(r),this.code(i),t){let o=this.name("e");this._currNode=r.catch=new Jf(o),t(o)}return n&&(this._currNode=r.finally=new Xf,this.code(n)),this._endBlockNode(Jf,Xf)}throw(i){return this._leafNode(new xu(i))}block(i,t){return this._blockStarts.push(this._nodes.length),i&&this.code(i).endBlock(t),this}endBlock(i){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-t;if(n<0||i!==void 0&&n!==i)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${i} expected`);return this._nodes.length=t,this}func(i,t=ge.nil,n,r){return this._blockNode(new Kf(i,t,n)),r&&this.code(r).endFunc(),this}endFunc(){return this._endBlockNode(Kf)}optimize(i=1){for(;i-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(i){return this._currNode.nodes.push(i),this}_blockNode(i){this._currNode.nodes.push(i),this._nodes.push(i)}_endBlockNode(i,t){let n=this._currNode;if(n instanceof i||t&&n instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${i.kind}/${t.kind}`:i.kind}"`)}_elseNode(i){let t=this._currNode;if(!(t instanceof as))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=i,this}get _root(){return this._nodes[0]}get _currNode(){let i=this._nodes;return i[i.length-1]}set _currNode(i){let t=this._nodes;t[t.length-1]=i}};ce.CodeGen=Tu;function Dn(e,i){for(let t in i)e[t]=(e[t]||0)+(i[t]||0);return e}function us(e,i){return i instanceof ge._CodeOrName?Dn(e,i.names):e}function lr(e,i,t){if(e instanceof ge.Name)return n(e);if(!r(e))return e;return new ge._Code(e._items.reduce((o,a)=>(a instanceof ge.Name&&(a=n(a)),a instanceof ge._Code?o.push(...a._items):o.push(a),o),[]));function n(o){let a=t[o.str];return a===void 0||i[o.str]!==1?o:(delete i[o.str],a)}function r(o){return o instanceof ge._Code&&o._items.some(a=>a instanceof ge.Name&&i[a.str]===1&&t[a.str]!==void 0)}}function y2(e,i){for(let t in i)e[t]=(e[t]||0)-(i[t]||0)}function Yf(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,ge._)`!${Pu(e)}`}ce.not=Yf;var _2=Zf(ce.operators.AND);function b2(...e){return e.reduce(_2)}ce.and=b2;var v2=Zf(ce.operators.OR);function x2(...e){return e.reduce(v2)}ce.or=x2;function Zf(e){return(i,t)=>i===ge.nil?t:t===ge.nil?i:(0,ge._)`${Pu(i)} ${e} ${Pu(t)}`}function Pu(e){return e instanceof ge.Name?e:(0,ge._)`(${e})`}});var pe=g(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.checkStrictMode=de.getErrorPath=de.Type=de.useFunc=de.setEvaluated=de.evaluatedPropsToName=de.mergeEvaluated=de.eachItem=de.unescapeJsonPointer=de.escapeJsonPointer=de.escapeFragment=de.unescapeFragment=de.schemaRefOrVal=de.schemaHasRulesButRef=de.schemaHasRules=de.checkUnknownRules=de.alwaysValidSchema=de.toHash=void 0;var Ee=ee(),C2=po();function w2(e){let i={};for(let t of e)i[t]=!0;return i}de.toHash=w2;function S2(e,i){return typeof i=="boolean"?i:Object.keys(i).length===0?!0:(tm(e,i),!im(i,e.self.RULES.all))}de.alwaysValidSchema=S2;function tm(e,i=e.schema){let{opts:t,self:n}=e;if(!t.strictSchema||typeof i=="boolean")return;let r=n.RULES.keywords;for(let o in i)r[o]||om(e,`unknown keyword: "${o}"`)}de.checkUnknownRules=tm;function im(e,i){if(typeof e=="boolean")return!e;for(let t in e)if(i[t])return!0;return!1}de.schemaHasRules=im;function I2(e,i){if(typeof e=="boolean")return!e;for(let t in e)if(t!=="$ref"&&i.all[t])return!0;return!1}de.schemaHasRulesButRef=I2;function $2({topSchemaRef:e,schemaPath:i},t,n,r){if(!r){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,Ee._)`${t}`}return(0,Ee._)`${e}${i}${(0,Ee.getProperty)(n)}`}de.schemaRefOrVal=$2;function E2(e){return nm(decodeURIComponent(e))}de.unescapeFragment=E2;function T2(e){return encodeURIComponent(ku(e))}de.escapeFragment=T2;function ku(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}de.escapeJsonPointer=ku;function nm(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}de.unescapeJsonPointer=nm;function P2(e,i){if(Array.isArray(e))for(let t of e)i(t);else i(e)}de.eachItem=P2;function Qf({mergeNames:e,mergeToName:i,mergeValues:t,resultToName:n}){return(r,o,a,s)=>{let l=a===void 0?o:a instanceof Ee.Name?(o instanceof Ee.Name?e(r,o,a):i(r,o,a),a):o instanceof Ee.Name?(i(r,a,o),o):t(o,a);return s===Ee.Name&&!(l instanceof Ee.Name)?n(r,l):l}}de.mergeEvaluated={props:Qf({mergeNames:(e,i,t)=>e.if((0,Ee._)`${t} !== true && ${i} !== undefined`,()=>{e.if((0,Ee._)`${i} === true`,()=>e.assign(t,!0),()=>e.assign(t,(0,Ee._)`${t} || {}`).code((0,Ee._)`Object.assign(${t}, ${i})`))}),mergeToName:(e,i,t)=>e.if((0,Ee._)`${t} !== true`,()=>{i===!0?e.assign(t,!0):(e.assign(t,(0,Ee._)`${t} || {}`),Mu(e,t,i))}),mergeValues:(e,i)=>e===!0?!0:X(X({},e),i),resultToName:rm}),items:Qf({mergeNames:(e,i,t)=>e.if((0,Ee._)`${t} !== true && ${i} !== undefined`,()=>e.assign(t,(0,Ee._)`${i} === true ? true : ${t} > ${i} ? ${t} : ${i}`)),mergeToName:(e,i,t)=>e.if((0,Ee._)`${t} !== true`,()=>e.assign(t,i===!0?!0:(0,Ee._)`${t} > ${i} ? ${t} : ${i}`)),mergeValues:(e,i)=>e===!0?!0:Math.max(e,i),resultToName:(e,i)=>e.var("items",i)})};function rm(e,i){if(i===!0)return e.var("props",!0);let t=e.var("props",(0,Ee._)`{}`);return i!==void 0&&Mu(e,t,i),t}de.evaluatedPropsToName=rm;function Mu(e,i,t){Object.keys(t).forEach(n=>e.assign((0,Ee._)`${i}${(0,Ee.getProperty)(n)}`,!0))}de.setEvaluated=Mu;var em={};function O2(e,i){return e.scopeValue("func",{ref:i,code:em[i.code]||(em[i.code]=new C2._Code(i.code))})}de.useFunc=O2;var Ou=function(e){return e[e.Num=0]="Num",e[e.Str=1]="Str",e}(Ou||(de.Type=Ou={}));function k2(e,i,t){if(e instanceof Ee.Name){let n=i===Ou.Num;return t?n?(0,Ee._)`"[" + ${e} + "]"`:(0,Ee._)`"['" + ${e} + "']"`:n?(0,Ee._)`"/" + ${e}`:(0,Ee._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,Ee.getProperty)(e).toString():"/"+ku(e)}de.getErrorPath=k2;function om(e,i,t=e.opts.strictSchema){if(t){if(i=`strict mode: ${i}`,t===!0)throw new Error(i);e.self.logger.warn(i)}}de.checkStrictMode=om});var Jt=g(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});var ft=ee(),M2={data:new ft.Name("data"),valCxt:new ft.Name("valCxt"),instancePath:new ft.Name("instancePath"),parentData:new ft.Name("parentData"),parentDataProperty:new ft.Name("parentDataProperty"),rootData:new ft.Name("rootData"),dynamicAnchors:new ft.Name("dynamicAnchors"),vErrors:new ft.Name("vErrors"),errors:new ft.Name("errors"),this:new ft.Name("this"),self:new ft.Name("self"),scope:new ft.Name("scope"),json:new ft.Name("json"),jsonPos:new ft.Name("jsonPos"),jsonLen:new ft.Name("jsonLen"),jsonPart:new ft.Name("jsonPart")};Du.default=M2});var mo=g(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.extendErrors=mt.resetErrorsCount=mt.reportExtraError=mt.reportError=mt.keyword$DataError=mt.keywordError=void 0;var be=ee(),ps=pe(),St=Jt();mt.keywordError={message:({keyword:e})=>(0,be.str)`must pass "${e}" keyword validation`};mt.keyword$DataError={message:({keyword:e,schemaType:i})=>i?(0,be.str)`"${e}" keyword must be ${i} ($data)`:(0,be.str)`"${e}" keyword is invalid ($data)`};function D2(e,i=mt.keywordError,t,n){let{it:r}=e,{gen:o,compositeRule:a,allErrors:s}=r,l=lm(e,i,t);n??(a||s)?am(o,l):sm(r,(0,be._)`[${l}]`)}mt.reportError=D2;function A2(e,i=mt.keywordError,t){let{it:n}=e,{gen:r,compositeRule:o,allErrors:a}=n,s=lm(e,i,t);am(r,s),o||a||sm(n,St.default.vErrors)}mt.reportExtraError=A2;function N2(e,i){e.assign(St.default.errors,i),e.if((0,be._)`${St.default.vErrors} !== null`,()=>e.if(i,()=>e.assign((0,be._)`${St.default.vErrors}.length`,i),()=>e.assign(St.default.vErrors,null)))}mt.resetErrorsCount=N2;function j2({gen:e,keyword:i,schemaValue:t,data:n,errsCount:r,it:o}){if(r===void 0)throw new Error("ajv implementation error");let a=e.name("err");e.forRange("i",r,St.default.errors,s=>{e.const(a,(0,be._)`${St.default.vErrors}[${s}]`),e.if((0,be._)`${a}.instancePath === undefined`,()=>e.assign((0,be._)`${a}.instancePath`,(0,be.strConcat)(St.default.instancePath,o.errorPath))),e.assign((0,be._)`${a}.schemaPath`,(0,be.str)`${o.errSchemaPath}/${i}`),o.opts.verbose&&(e.assign((0,be._)`${a}.schema`,t),e.assign((0,be._)`${a}.data`,n))})}mt.extendErrors=j2;function am(e,i){let t=e.const("err",i);e.if((0,be._)`${St.default.vErrors} === null`,()=>e.assign(St.default.vErrors,(0,be._)`[${t}]`),(0,be._)`${St.default.vErrors}.push(${t})`),e.code((0,be._)`${St.default.errors}++`)}function sm(e,i){let{gen:t,validateName:n,schemaEnv:r}=e;r.$async?t.throw((0,be._)`new ${e.ValidationError}(${i})`):(t.assign((0,be._)`${n}.errors`,i),t.return(!1))}var An={keyword:new be.Name("keyword"),schemaPath:new be.Name("schemaPath"),params:new be.Name("params"),propertyName:new be.Name("propertyName"),message:new be.Name("message"),schema:new be.Name("schema"),parentSchema:new be.Name("parentSchema")};function lm(e,i,t){let{createErrors:n}=e.it;return n===!1?(0,be._)`{}`:F2(e,i,t)}function F2(e,i,t={}){let{gen:n,it:r}=e,o=[q2(r,t),V2(e,t)];return B2(e,i,o),n.object(...o)}function q2({errorPath:e},{instancePath:i}){let t=i?(0,be.str)`${e}${(0,ps.getErrorPath)(i,ps.Type.Str)}`:e;return[St.default.instancePath,(0,be.strConcat)(St.default.instancePath,t)]}function V2({keyword:e,it:{errSchemaPath:i}},{schemaPath:t,parentSchema:n}){let r=n?i:(0,be.str)`${i}/${e}`;return t&&(r=(0,be.str)`${r}${(0,ps.getErrorPath)(t,ps.Type.Str)}`),[An.schemaPath,r]}function B2(e,{params:i,message:t},n){let{keyword:r,data:o,schemaValue:a,it:s}=e,{opts:l,propertyName:u,topSchemaRef:c,schemaPath:p}=s;n.push([An.keyword,r],[An.params,typeof i=="function"?i(e):i||(0,be._)`{}`]),l.messages&&n.push([An.message,typeof t=="function"?t(e):t]),l.verbose&&n.push([An.schema,a],[An.parentSchema,(0,be._)`${c}${p}`],[St.default.data,o]),u&&n.push([An.propertyName,u])}});var cm=g(ur=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});ur.boolOrEmptySchema=ur.topBoolOrEmptySchema=void 0;var R2=mo(),L2=ee(),U2=Jt(),z2={message:"boolean schema is false"};function H2(e){let{gen:i,schema:t,validateName:n}=e;t===!1?um(e,!1):typeof t=="object"&&t.$async===!0?i.return(U2.default.data):(i.assign((0,L2._)`${n}.errors`,null),i.return(!0))}ur.topBoolOrEmptySchema=H2;function W2(e,i){let{gen:t,schema:n}=e;n===!1?(t.var(i,!1),um(e)):t.var(i,!0)}ur.boolOrEmptySchema=W2;function um(e,i){let{gen:t,data:n}=e,r={gen:t,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,R2.reportError)(r,z2,void 0,i)}});var Au=g(cr=>{"use strict";Object.defineProperty(cr,"__esModule",{value:!0});cr.getRules=cr.isJSONType=void 0;var K2=["string","number","integer","boolean","null","object","array"],G2=new Set(K2);function J2(e){return typeof e=="string"&&G2.has(e)}cr.isJSONType=J2;function X2(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:$e(X({},e),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}cr.getRules=X2});var Nu=g(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.shouldUseRule=rn.shouldUseGroup=rn.schemaHasRulesForType=void 0;function Y2({schema:e,self:i},t){let n=i.RULES.types[t];return n&&n!==!0&&dm(e,n)}rn.schemaHasRulesForType=Y2;function dm(e,i){return i.rules.some(t=>pm(e,t))}rn.shouldUseGroup=dm;function pm(e,i){var t;return e[i.keyword]!==void 0||((t=i.definition.implements)===null||t===void 0?void 0:t.some(n=>e[n]!==void 0))}rn.shouldUseRule=pm});var ho=g(ht=>{"use strict";Object.defineProperty(ht,"__esModule",{value:!0});ht.reportTypeError=ht.checkDataTypes=ht.checkDataType=ht.coerceAndCheckDataType=ht.getJSONTypes=ht.getSchemaTypes=ht.DataType=void 0;var Z2=Au(),Q2=Nu(),e$=mo(),se=ee(),fm=pe(),dr=function(e){return e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong",e}(dr||(ht.DataType=dr={}));function t$(e){let i=mm(e.type);if(i.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!i.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&i.push("null")}return i}ht.getSchemaTypes=t$;function mm(e){let i=Array.isArray(e)?e:e?[e]:[];if(i.every(Z2.isJSONType))return i;throw new Error("type must be JSONType or JSONType[]: "+i.join(","))}ht.getJSONTypes=mm;function i$(e,i){let{gen:t,data:n,opts:r}=e,o=n$(i,r.coerceTypes),a=i.length>0&&!(o.length===0&&i.length===1&&(0,Q2.schemaHasRulesForType)(e,i[0]));if(a){let s=Fu(i,n,r.strictNumbers,dr.Wrong);t.if(s,()=>{o.length?r$(e,i,o):qu(e)})}return a}ht.coerceAndCheckDataType=i$;var hm=new Set(["string","number","integer","boolean","null"]);function n$(e,i){return i?e.filter(t=>hm.has(t)||i==="array"&&t==="array"):[]}function r$(e,i,t){let{gen:n,data:r,opts:o}=e,a=n.let("dataType",(0,se._)`typeof ${r}`),s=n.let("coerced",(0,se._)`undefined`);o.coerceTypes==="array"&&n.if((0,se._)`${a} == 'object' && Array.isArray(${r}) && ${r}.length == 1`,()=>n.assign(r,(0,se._)`${r}[0]`).assign(a,(0,se._)`typeof ${r}`).if(Fu(i,r,o.strictNumbers),()=>n.assign(s,r))),n.if((0,se._)`${s} !== undefined`);for(let u of t)(hm.has(u)||u==="array"&&o.coerceTypes==="array")&&l(u);n.else(),qu(e),n.endIf(),n.if((0,se._)`${s} !== undefined`,()=>{n.assign(r,s),o$(e,s)});function l(u){switch(u){case"string":n.elseIf((0,se._)`${a} == "number" || ${a} == "boolean"`).assign(s,(0,se._)`"" + ${r}`).elseIf((0,se._)`${r} === null`).assign(s,(0,se._)`""`);return;case"number":n.elseIf((0,se._)`${a} == "boolean" || ${r} === null
3
3
  || (${a} == "string" && ${r} && ${r} == +${r})`).assign(s,(0,se._)`+${r}`);return;case"integer":n.elseIf((0,se._)`${a} === "boolean" || ${r} === null
4
4
  || (${a} === "string" && ${r} && ${r} == +${r} && !(${r} % 1))`).assign(s,(0,se._)`+${r}`);return;case"boolean":n.elseIf((0,se._)`${r} === "false" || ${r} === 0 || ${r} === null`).assign(s,!1).elseIf((0,se._)`${r} === "true" || ${r} === 1`).assign(s,!0);return;case"null":n.elseIf((0,se._)`${r} === "" || ${r} === 0 || ${r} === false`),n.assign(s,null);return;case"array":n.elseIf((0,se._)`${a} === "string" || ${a} === "number"
package/public/index.html CHANGED
@@ -20,5 +20,5 @@
20
20
 
21
21
  <body>
22
22
  <app-root></app-root>
23
- <link rel="modulepreload" href="chunk-ZATUJNFV.js"><link rel="modulepreload" href="chunk-ZBK325RS.js"><link rel="modulepreload" href="chunk-I2OX5RXF.js"><link rel="modulepreload" href="chunk-GVTMDSZC.js"><link rel="modulepreload" href="chunk-7B77N4IT.js"><link rel="modulepreload" href="chunk-IEANGMUA.js"><link rel="modulepreload" href="chunk-IYZAN4QG.js"><link rel="modulepreload" href="chunk-VX75HOOB.js"><link rel="modulepreload" href="chunk-QOBPRLO2.js"><link rel="modulepreload" href="chunk-6SADNWDM.js"><script src="polyfills-WE4HA5DL.js" type="module" crossorigin="use-credentials"></script><script src="main-X7DBVNTD.js" type="module" crossorigin="use-credentials"></script></body>
23
+ <link rel="modulepreload" href="chunk-UNQWAP4O.js"><link rel="modulepreload" href="chunk-BVXDUT37.js"><link rel="modulepreload" href="chunk-WAEIH452.js"><link rel="modulepreload" href="chunk-PO63P7BR.js"><link rel="modulepreload" href="chunk-SXFY7EJ4.js"><link rel="modulepreload" href="chunk-NG4XN2SO.js"><link rel="modulepreload" href="chunk-BYJZ4WBV.js"><link rel="modulepreload" href="chunk-K7WA5KOE.js"><link rel="modulepreload" href="chunk-KECVWPQI.js"><link rel="modulepreload" href="chunk-ZS5KZUZ5.js"><script src="polyfills-WE4HA5DL.js" type="module" crossorigin="use-credentials"></script><script src="main-WB3CMP7F.js" type="module" crossorigin="use-credentials"></script></body>
24
24
  </html>