homebridge-config-ui-x 5.12.1-alpha.3 → 5.12.1-alpha.4

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 (58) hide show
  1. package/package.json +1 -1
  2. package/public/{chunk-KCRG46YZ.js → chunk-3IKZJDOJ.js} +1 -1
  3. package/public/{chunk-K6DZTGLW.js → chunk-3TSJETVD.js} +1 -1
  4. package/public/{chunk-VUQTJ7DS.js → chunk-4OCEDS3F.js} +1 -1
  5. package/public/{chunk-X7LAVJYW.js → chunk-5KEKGTEE.js} +1 -1
  6. package/public/{chunk-JTUZ5AFR.js → chunk-67QLZ3WO.js} +1 -1
  7. package/public/{chunk-HTPO5VWE.js → chunk-7FJAYQO3.js} +1 -1
  8. package/public/{chunk-VCZ6KBM7.js → chunk-7HMWJ2FC.js} +1 -1
  9. package/public/{chunk-SSC2QCZI.js → chunk-7RV6N3PV.js} +1 -1
  10. package/public/{chunk-GGTSYCDS.js → chunk-C5I3EHA5.js} +1 -1
  11. package/public/{chunk-GYOWF7DE.js → chunk-CCWP7ORM.js} +1 -1
  12. package/public/{chunk-HHZSXHMS.js → chunk-CIVOXLBC.js} +1 -1
  13. package/public/{chunk-B2FEO32G.js → chunk-COHQ3TQG.js} +1 -1
  14. package/public/{chunk-OT6UQ4SL.js → chunk-D7KSZ6BO.js} +1 -1
  15. package/public/{chunk-4NKCRHTC.js → chunk-ECQPCAW5.js} +1 -1
  16. package/public/{chunk-RCHTZ25W.js → chunk-EDUQXYLL.js} +1 -1
  17. package/public/{chunk-U2RX6MKI.js → chunk-EKDAZE35.js} +1 -1
  18. package/public/{chunk-FJO5GYAD.js → chunk-FFLC6SBL.js} +1 -1
  19. package/public/{chunk-HT2MTBEV.js → chunk-H4G6RBOZ.js} +1 -1
  20. package/public/{chunk-XX3G34TE.js → chunk-HS5YTJAU.js} +1 -1
  21. package/public/{chunk-PXOVSZTX.js → chunk-IHMPYUA6.js} +1 -1
  22. package/public/{chunk-QHCWTRM4.js → chunk-INSEV5R4.js} +1 -1
  23. package/public/{chunk-HOYNPDYG.js → chunk-JG3FKGLL.js} +1 -1
  24. package/public/{chunk-A4EMK2AE.js → chunk-LMZ63AQJ.js} +1 -1
  25. package/public/{chunk-5NPURMIV.js → chunk-MEXYUAHP.js} +1 -1
  26. package/public/{chunk-NRHEAXPQ.js → chunk-PVJ37WDV.js} +1 -1
  27. package/public/{chunk-4CIWXXEC.js → chunk-Q337KD4E.js} +1 -1
  28. package/public/{chunk-627P2ZOZ.js → chunk-QB3TYCEU.js} +1 -1
  29. package/public/{chunk-VOEVFWQR.js → chunk-QELRUSS5.js} +1 -1
  30. package/public/{chunk-BH6X22T5.js → chunk-QY3J4VYB.js} +1 -1
  31. package/public/{chunk-HSZKOEQO.js → chunk-RA7ENIQD.js} +1 -1
  32. package/public/{chunk-JB7NDPON.js → chunk-RS5MWJ54.js} +1 -1
  33. package/public/{chunk-GMX3VI46.js → chunk-S6JL3AB5.js} +1 -1
  34. package/public/{chunk-4QCEHYUB.js → chunk-SSDFG26B.js} +1 -1
  35. package/public/{chunk-PBGFVBCB.js → chunk-UKOU5RAG.js} +1 -1
  36. package/public/{chunk-GHPOVWVP.js → chunk-UMGR23VE.js} +1 -1
  37. package/public/{chunk-E4OK73V5.js → chunk-UV6OUU3Q.js} +1 -1
  38. package/public/{chunk-4WVVRGYH.js → chunk-UYEUXCTQ.js} +1 -1
  39. package/public/{chunk-MXQ6SCXD.js → chunk-VKL5J2VI.js} +1 -1
  40. package/public/{chunk-NO4NUEGO.js → chunk-VRPOYH24.js} +1 -1
  41. package/public/{chunk-KME5LDFI.js → chunk-VS4UML36.js} +1 -1
  42. package/public/{chunk-TGOXPZUQ.js → chunk-VVCWRL6D.js} +1 -1
  43. package/public/{chunk-5ILS55YL.js → chunk-VYIMRSSM.js} +1 -1
  44. package/public/{chunk-VYEQDD6F.js → chunk-WHCHCF3N.js} +1 -1
  45. package/public/{chunk-L7PRYH5Q.js → chunk-X75YWSTF.js} +1 -1
  46. package/public/{chunk-5VPFWJMT.js → chunk-XBR4LPNN.js} +1 -1
  47. package/public/{chunk-UTUR2TZC.js → chunk-XSTVLA74.js} +1 -1
  48. package/public/{chunk-NT3C3F2Y.js → chunk-XWCIUHOC.js} +1 -1
  49. package/public/{chunk-4OLETODN.js → chunk-Y2XLZOCN.js} +1 -1
  50. package/public/{chunk-T7I45MK4.js → chunk-YDGFXP6E.js} +1 -1
  51. package/public/{chunk-IYNMO7IP.js → chunk-YPD7X5O4.js} +1 -1
  52. package/public/{chunk-N257IGQY.js → chunk-YXLKWAH5.js} +1 -1
  53. package/public/{chunk-AMA6XMS7.js → chunk-ZAB7QLRT.js} +1 -1
  54. package/public/{chunk-W22PNIOT.js → chunk-ZLQFHY4B.js} +1 -1
  55. package/public/{chunk-JR5ZQFDU.js → chunk-ZOF7GJLP.js} +1 -1
  56. package/public/index.html +2 -2
  57. package/public/{main-R4I2NDVF.js → main-26O3VE4R.js} +1 -1
  58. package/public/{styles-WY6OJCQO.css → styles-WLZAS7RN.css} +1 -1
@@ -1 +1 @@
1
- import{m as J}from"./chunk-YHD44ZXJ.js";import{C as H,e as O,l as W,s as z,t as q,v as G}from"./chunk-LZU5VVW4.js";import{e as Y}from"./chunk-O7FV4MLW.js";import{k as K,l as Q,n as X,q as Z}from"./chunk-JTUZ5AFR.js";import{Ab as a,Bb as b,Kb as B,Nb as h,Pb as d,Rc as j,Sa as s,a as T,ac as c,b as R,bc as g,cc as I,dc as V,fb as D,h as M,hc as F,ic as U,jc as L,oc as N,pa as w,pc as P,rb as A,sb as _,tb as u,tc as m,ua as v,uc as p,va as f,vb as E,wb as k,xb as $,yb as C,z as S,zb as o}from"./chunk-UUXRTS4O.js";var te=(t,l)=>({"btn-danger":t,"btn-elegant":l}),ie=(t,l,e)=>({"fa-trash":t,"fa-undo":l,"fa-circle-notch fa-spin":e});function ne(t,l){t&1&&(o(0,"div",12),b(1,"i",13),a(),o(2,"p",14),c(3),m(4,"translate"),a()),t&2&&(s(3),g(p(4,1,"reset.no_accessories")))}function se(t,l){if(t&1&&(o(0,"option",24),c(1),a()),t&2){let e=l.$implicit;C("value",e._id),s(),V("",e.name," (",e._username,")")}}function oe(t,l){if(t&1){let e=B();o(0,"li",20),c(1),m(2,"translate"),a(),o(3,"li",18)(4,"label",21),c(5),m(6,"translate"),a(),o(7,"div",22)(8,"select",23),L("ngModelChange",function(i){v(e);let r=d(2);return U(r.selectedBridge,i)||(r.selectedBridge=i),f(i)}),h("change",function(i){v(e);let r=d(2);return f(r.onBridgeChange(i.target.value))}),k(9,se,2,3,"option",24,E),a()()()}if(t&2){let e=d(2);s(),g(p(2,3,"form.label.changes_kept")),s(4),g(p(6,5,"reset.accessory_ind.bridge")),s(3),F("ngModel",e.selectedBridge),s(),$(e.pairings)}}function ae(t,l){if(t&1&&(o(0,"li",18)(1,"label",25),c(2),m(3,"translate"),a(),o(4,"div",26),c(5),a()()),t&2){let e=d(2);s(2),g(p(3,2,"reset.accessory_ind.bridge")),s(3),I(" ",e.getCurrentlySelectedBridge()," ")}}function re(t,l){if(t&1){let e=B();o(0,"li",19)(1,"span",27),b(2,"i",28),a(),o(3,"span",29),c(4),b(5,"br"),o(6,"small")(7,"span",30),c(8),a()()(),o(9,"button",31),m(10,"translate"),h("click",function(){let i=v(e).$implicit,r=d(2);return f(r.toggleList(i.UUID,i.$cacheFile))}),b(11,"i",32),a()()}if(t&2){let e=l.$implicit,n=d(2);s(4),I(" ",e.displayName," "),s(4),g(e.UUID),s(),C("disabled",n.clicked)("ngClass",N(8,te,!n.isInList(e.UUID,e.$cacheFile),n.isInList(e.UUID,e.$cacheFile))),A("aria-label",p(10,6,"form.button_delete")),s(2),C("ngClass",P(11,ie,!n.isInList(e.UUID,e.$cacheFile),n.isInList(e.UUID,e.$cacheFile)&&!n.clicked,n.isInList(e.UUID,e.$cacheFile)&&n.clicked))}}function le(t,l){if(t&1&&(o(0,"div",12),b(1,"i",15),a(),o(2,"ul",16)(3,"li"),c(4),m(5,"translate"),a(),o(6,"li"),c(7),m(8,"translate"),a(),o(9,"li"),c(10),m(11,"translate"),a()(),o(12,"ul",17),_(13,oe,11,7),_(14,ae,6,4,"li",18),k(15,re,12,15,"li",19,E),a()),t&2){let e=d();s(4),g(p(5,5,"reset.accessory_ind.list_1")),s(3),g(p(8,7,"reset.accessory_ind.list_2")),s(3),g(p(11,9,"reset.accessory_ind.list_3")),s(3),u(e.pairings.length>1?13:-1),s(),u(e.pairings.length===1?14:-1),s(),$(e.selectedBridgeAccessories)}}function ce(t,l){if(t&1){let e=B();o(0,"button",33),h("click",function(){v(e);let i=d();return f(i.dismissModal())}),c(1),m(2,"translate"),a()}if(t&2){let e=d();C("disabled",e.clicked),s(),I(" ",p(2,2,"form.button_close")," ")}}function de(t,l){if(t&1){let e=B();o(0,"button",34),h("click",function(){v(e);let i=d();return f(i.dismissModal())}),c(1),m(2,"translate"),a()}t&2&&(s(),I(" ",p(2,1,"form.button_close")," "))}function me(t,l){if(t&1&&c(0),t&2){let e=d(3);I(" (",e.toDelete.length,") ")}}function pe(t,l){if(t&1&&(c(0),m(1,"translate"),_(2,me,1,1)),t&2){let e=d(2);I(" ",p(1,2,"form.button_remove")," "),s(2),u(e.toDelete.length>0?2:-1)}}function _e(t,l){t&1&&b(0,"i",36)}function ue(t,l){if(t&1){let e=B();o(0,"button",35),h("click",function(){v(e);let i=d();return f(i.removeAccessories())}),_(1,pe,3,4),_(2,_e,1,0,"i",36),a()}if(t&2){let e=d();C("disabled",!e.toDelete.length||e.clicked),s(),u(e.clicked?-1:1),s(),u(e.clicked?2:-1)}}var Ee=(()=>{class t{$activeModal=w(J);$api=w(Z);$router=w(Y);$toastr=w(X);$translate=w(K);selectedBridge="";pairings=[];clicked=!1;selectedBridgeAccessories=[];accessoriesExist=!1;toDelete=[];ngOnInit(){this.loadCachedAccessories()}onBridgeChange(e){this.selectedBridge=e,this.selectedBridgeAccessories=this.pairings.find(n=>n._id===this.selectedBridge)?.accessories}getCurrentlySelectedBridge(){let e=this.pairings.find(n=>n._id===this.selectedBridge);return`${e.name} - ${e._username}`}toggleList(e,n){this.toDelete.some(i=>i.uuid===e&&i.cacheFile===n)?this.toDelete=this.toDelete.filter(i=>i.uuid!==e||i.cacheFile!==n):this.toDelete.push({cacheFile:n,uuid:e})}isInList(e,n){return this.toDelete.some(i=>i.uuid===e&&i.cacheFile===n)}removeAccessories(){return this.clicked=!0,this.$api.delete("/server/cached-accessories",{body:this.toDelete}).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("reset.accessory_ind.done"),this.$translate.instant("toast.title_success")),this.$activeModal.close(),this.$router.navigate(["/restart"],{queryParams:{restarting:!0}})},error:e=>{this.clicked=!1,console.error(e),this.$toastr.error(this.$translate.instant("reset.accessory_ind.fail"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadCachedAccessories(){return M(this,null,function*(){try{let[e,n]=yield Promise.all([S(this.$api.get("/server/cached-accessories")),S(this.$api.get("/server/pairings"))]),i=new Map(n.map(r=>[r._id,R(T({},r),{accessories:[]})]));e.sort((r,x)=>r.displayName.localeCompare(x.displayName)).forEach(r=>{let x=n.find(ee=>ee._main),y=r.$cacheFile?.split(".")?.[1]||x._id;(!this.selectedBridge||this.selectedBridge===y)&&(i.has(y)||i.set(y,{_id:y,_username:y.match(/.{1,2}/g).join(":"),name:this.$translate.instant("reset.accessory_ind.unknown"),accessories:[]}),i.get(y).accessories.push(r))}),this.pairings=Array.from(i.values()).filter(r=>r.accessories.length>0).sort((r,x)=>r._main&&!x._main?-1:!r._main&&x._main?1:r.name.localeCompare(x.name)),this.selectedBridge=this.selectedBridge||this.pairings[0]?._id,this.selectedBridge&&(this.accessoriesExist=!0,this.selectedBridgeAccessories=this.pairings[0].accessories)}catch(e){console.error(e),this.$toastr.error(this.$translate.instant("reset.error_message"),this.$translate.instant("toast.title_error")),this.$activeModal.close()}})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=D({type:t,selectors:[["ng-component"]],inputs:{selectedBridge:"selectedBridge"},decls:17,vars:12,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click","disabled"],[1,"modal-body"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"disabled"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"disabled"],[1,"text-center","mb-3"],[1,"fas","fa-circle-check","primary-text",2,"font-size","75px"],[1,"mb-0","text-center"],[1,"fas","fa-network-wired","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,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"list-group-item","text-center","grey-text","small"],["for","bridgeSelect",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["id","bridgeSelect",1,"custom-select",3,"ngModelChange","change","ngModel"],[3,"value"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50","grey-text","font-monospace"],[1,"me-3"],[1,"fas","fa-lg","fa-hap"],[1,"flex-grow-1"],[1,"font-monospace","grey-text"],[1,"btn","btn-danger","m-0","ms-3",3,"click","disabled","ngClass"],[1,"fas",3,"ngClass"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"click","disabled"],[1,"fas","fa-circle-notch","fa-spin"]],template:function(n,i){n&1&&(o(0,"div",0)(1,"div",1)(2,"h5",2),c(3),m(4,"translate"),a(),o(5,"button",3),m(6,"translate"),h("click",function(){return i.dismissModal()}),a()(),o(7,"div",4),_(8,ne,5,3),_(9,le,17,11),a(),o(10,"div",5)(11,"div",6),_(12,ce,3,4,"button",7),a(),o(13,"div",8),_(14,de,3,3,"button",9),a(),o(15,"div",10),_(16,ue,3,3,"button",11),a()()()),n&2&&(s(3),g(p(4,8,"reset.accessory_ind.title")),s(2),C("disabled",i.clicked),A("aria-label",p(6,10,"form.button_close")),s(3),u(i.accessoriesExist?-1:8),s(),u(i.accessoriesExist?9:-1),s(3),u(i.accessoriesExist?12:-1),s(2),u(i.accessoriesExist?-1:14),s(2),u(i.accessoriesExist?16:-1))},dependencies:[j,H,q,G,z,O,W,Q],encapsulation:2})}return t})();export{Ee as a};
1
+ import{m as J}from"./chunk-YHD44ZXJ.js";import{C as H,e as O,l as W,s as z,t as q,v as G}from"./chunk-LZU5VVW4.js";import{e as Y}from"./chunk-O7FV4MLW.js";import{k as K,l as Q,n as X,q as Z}from"./chunk-67QLZ3WO.js";import{Ab as a,Bb as b,Kb as B,Nb as h,Pb as d,Rc as j,Sa as s,a as T,ac as c,b as R,bc as g,cc as I,dc as V,fb as D,h as M,hc as F,ic as U,jc as L,oc as N,pa as w,pc as P,rb as A,sb as _,tb as u,tc as m,ua as v,uc as p,va as f,vb as E,wb as k,xb as $,yb as C,z as S,zb as o}from"./chunk-UUXRTS4O.js";var te=(t,l)=>({"btn-danger":t,"btn-elegant":l}),ie=(t,l,e)=>({"fa-trash":t,"fa-undo":l,"fa-circle-notch fa-spin":e});function ne(t,l){t&1&&(o(0,"div",12),b(1,"i",13),a(),o(2,"p",14),c(3),m(4,"translate"),a()),t&2&&(s(3),g(p(4,1,"reset.no_accessories")))}function se(t,l){if(t&1&&(o(0,"option",24),c(1),a()),t&2){let e=l.$implicit;C("value",e._id),s(),V("",e.name," (",e._username,")")}}function oe(t,l){if(t&1){let e=B();o(0,"li",20),c(1),m(2,"translate"),a(),o(3,"li",18)(4,"label",21),c(5),m(6,"translate"),a(),o(7,"div",22)(8,"select",23),L("ngModelChange",function(i){v(e);let r=d(2);return U(r.selectedBridge,i)||(r.selectedBridge=i),f(i)}),h("change",function(i){v(e);let r=d(2);return f(r.onBridgeChange(i.target.value))}),k(9,se,2,3,"option",24,E),a()()()}if(t&2){let e=d(2);s(),g(p(2,3,"form.label.changes_kept")),s(4),g(p(6,5,"reset.accessory_ind.bridge")),s(3),F("ngModel",e.selectedBridge),s(),$(e.pairings)}}function ae(t,l){if(t&1&&(o(0,"li",18)(1,"label",25),c(2),m(3,"translate"),a(),o(4,"div",26),c(5),a()()),t&2){let e=d(2);s(2),g(p(3,2,"reset.accessory_ind.bridge")),s(3),I(" ",e.getCurrentlySelectedBridge()," ")}}function re(t,l){if(t&1){let e=B();o(0,"li",19)(1,"span",27),b(2,"i",28),a(),o(3,"span",29),c(4),b(5,"br"),o(6,"small")(7,"span",30),c(8),a()()(),o(9,"button",31),m(10,"translate"),h("click",function(){let i=v(e).$implicit,r=d(2);return f(r.toggleList(i.UUID,i.$cacheFile))}),b(11,"i",32),a()()}if(t&2){let e=l.$implicit,n=d(2);s(4),I(" ",e.displayName," "),s(4),g(e.UUID),s(),C("disabled",n.clicked)("ngClass",N(8,te,!n.isInList(e.UUID,e.$cacheFile),n.isInList(e.UUID,e.$cacheFile))),A("aria-label",p(10,6,"form.button_delete")),s(2),C("ngClass",P(11,ie,!n.isInList(e.UUID,e.$cacheFile),n.isInList(e.UUID,e.$cacheFile)&&!n.clicked,n.isInList(e.UUID,e.$cacheFile)&&n.clicked))}}function le(t,l){if(t&1&&(o(0,"div",12),b(1,"i",15),a(),o(2,"ul",16)(3,"li"),c(4),m(5,"translate"),a(),o(6,"li"),c(7),m(8,"translate"),a(),o(9,"li"),c(10),m(11,"translate"),a()(),o(12,"ul",17),_(13,oe,11,7),_(14,ae,6,4,"li",18),k(15,re,12,15,"li",19,E),a()),t&2){let e=d();s(4),g(p(5,5,"reset.accessory_ind.list_1")),s(3),g(p(8,7,"reset.accessory_ind.list_2")),s(3),g(p(11,9,"reset.accessory_ind.list_3")),s(3),u(e.pairings.length>1?13:-1),s(),u(e.pairings.length===1?14:-1),s(),$(e.selectedBridgeAccessories)}}function ce(t,l){if(t&1){let e=B();o(0,"button",33),h("click",function(){v(e);let i=d();return f(i.dismissModal())}),c(1),m(2,"translate"),a()}if(t&2){let e=d();C("disabled",e.clicked),s(),I(" ",p(2,2,"form.button_close")," ")}}function de(t,l){if(t&1){let e=B();o(0,"button",34),h("click",function(){v(e);let i=d();return f(i.dismissModal())}),c(1),m(2,"translate"),a()}t&2&&(s(),I(" ",p(2,1,"form.button_close")," "))}function me(t,l){if(t&1&&c(0),t&2){let e=d(3);I(" (",e.toDelete.length,") ")}}function pe(t,l){if(t&1&&(c(0),m(1,"translate"),_(2,me,1,1)),t&2){let e=d(2);I(" ",p(1,2,"form.button_remove")," "),s(2),u(e.toDelete.length>0?2:-1)}}function _e(t,l){t&1&&b(0,"i",36)}function ue(t,l){if(t&1){let e=B();o(0,"button",35),h("click",function(){v(e);let i=d();return f(i.removeAccessories())}),_(1,pe,3,4),_(2,_e,1,0,"i",36),a()}if(t&2){let e=d();C("disabled",!e.toDelete.length||e.clicked),s(),u(e.clicked?-1:1),s(),u(e.clicked?2:-1)}}var Ee=(()=>{class t{$activeModal=w(J);$api=w(Z);$router=w(Y);$toastr=w(X);$translate=w(K);selectedBridge="";pairings=[];clicked=!1;selectedBridgeAccessories=[];accessoriesExist=!1;toDelete=[];ngOnInit(){this.loadCachedAccessories()}onBridgeChange(e){this.selectedBridge=e,this.selectedBridgeAccessories=this.pairings.find(n=>n._id===this.selectedBridge)?.accessories}getCurrentlySelectedBridge(){let e=this.pairings.find(n=>n._id===this.selectedBridge);return`${e.name} - ${e._username}`}toggleList(e,n){this.toDelete.some(i=>i.uuid===e&&i.cacheFile===n)?this.toDelete=this.toDelete.filter(i=>i.uuid!==e||i.cacheFile!==n):this.toDelete.push({cacheFile:n,uuid:e})}isInList(e,n){return this.toDelete.some(i=>i.uuid===e&&i.cacheFile===n)}removeAccessories(){return this.clicked=!0,this.$api.delete("/server/cached-accessories",{body:this.toDelete}).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("reset.accessory_ind.done"),this.$translate.instant("toast.title_success")),this.$activeModal.close(),this.$router.navigate(["/restart"],{queryParams:{restarting:!0}})},error:e=>{this.clicked=!1,console.error(e),this.$toastr.error(this.$translate.instant("reset.accessory_ind.fail"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadCachedAccessories(){return M(this,null,function*(){try{let[e,n]=yield Promise.all([S(this.$api.get("/server/cached-accessories")),S(this.$api.get("/server/pairings"))]),i=new Map(n.map(r=>[r._id,R(T({},r),{accessories:[]})]));e.sort((r,x)=>r.displayName.localeCompare(x.displayName)).forEach(r=>{let x=n.find(ee=>ee._main),y=r.$cacheFile?.split(".")?.[1]||x._id;(!this.selectedBridge||this.selectedBridge===y)&&(i.has(y)||i.set(y,{_id:y,_username:y.match(/.{1,2}/g).join(":"),name:this.$translate.instant("reset.accessory_ind.unknown"),accessories:[]}),i.get(y).accessories.push(r))}),this.pairings=Array.from(i.values()).filter(r=>r.accessories.length>0).sort((r,x)=>r._main&&!x._main?-1:!r._main&&x._main?1:r.name.localeCompare(x.name)),this.selectedBridge=this.selectedBridge||this.pairings[0]?._id,this.selectedBridge&&(this.accessoriesExist=!0,this.selectedBridgeAccessories=this.pairings[0].accessories)}catch(e){console.error(e),this.$toastr.error(this.$translate.instant("reset.error_message"),this.$translate.instant("toast.title_error")),this.$activeModal.close()}})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=D({type:t,selectors:[["ng-component"]],inputs:{selectedBridge:"selectedBridge"},decls:17,vars:12,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click","disabled"],[1,"modal-body"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"disabled"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"disabled"],[1,"text-center","mb-3"],[1,"fas","fa-circle-check","primary-text",2,"font-size","75px"],[1,"mb-0","text-center"],[1,"fas","fa-network-wired","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,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"list-group-item","text-center","grey-text","small"],["for","bridgeSelect",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["id","bridgeSelect",1,"custom-select",3,"ngModelChange","change","ngModel"],[3,"value"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50","grey-text","font-monospace"],[1,"me-3"],[1,"fas","fa-lg","fa-hap"],[1,"flex-grow-1"],[1,"font-monospace","grey-text"],[1,"btn","btn-danger","m-0","ms-3",3,"click","disabled","ngClass"],[1,"fas",3,"ngClass"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"click","disabled"],[1,"fas","fa-circle-notch","fa-spin"]],template:function(n,i){n&1&&(o(0,"div",0)(1,"div",1)(2,"h5",2),c(3),m(4,"translate"),a(),o(5,"button",3),m(6,"translate"),h("click",function(){return i.dismissModal()}),a()(),o(7,"div",4),_(8,ne,5,3),_(9,le,17,11),a(),o(10,"div",5)(11,"div",6),_(12,ce,3,4,"button",7),a(),o(13,"div",8),_(14,de,3,3,"button",9),a(),o(15,"div",10),_(16,ue,3,3,"button",11),a()()()),n&2&&(s(3),g(p(4,8,"reset.accessory_ind.title")),s(2),C("disabled",i.clicked),A("aria-label",p(6,10,"form.button_close")),s(3),u(i.accessoriesExist?-1:8),s(),u(i.accessoriesExist?9:-1),s(3),u(i.accessoriesExist?12:-1),s(2),u(i.accessoriesExist?-1:14),s(2),u(i.accessoriesExist?16:-1))},dependencies:[j,H,q,G,z,O,W,Q],encapsulation:2})}return t})();export{Ee as a};
@@ -1,4 +1,4 @@
1
- import{a as $v}from"./chunk-UTUR2TZC.js";import{a as gp,c as Fv,d as Ov,e as Ys,f as Lv,g as QU,h as pp}from"./chunk-PBGFVBCB.js";import{a as Bv}from"./chunk-JT7SPTVG.js";import{a as Uv}from"./chunk-N6D52WI6.js";import{a as qv}from"./chunk-JR5ZQFDU.js";import{a as Jc,b as Zc,c as Qc}from"./chunk-VCZ6KBM7.js";import{a as da}from"./chunk-MGZVKFCX.js";import{a as Vv}from"./chunk-DDJU52K4.js";import{a as Yc,b as Lo}from"./chunk-KSI5RFA4.js";import{a as Vo,b as qo}from"./chunk-PCFKF3RR.js";import{a as Mv}from"./chunk-K6DZTGLW.js";import{a as qc,b as Lc,c as $c,d as Kc,e as Gc,f as Wc,g as Oo,m as It,n as vi,o as jv,p as Dv,q as Nv,r as Rv,s as Ev,t as xr}from"./chunk-YHD44ZXJ.js";import{B as Av,C as us,D as ca,a as vv,b as kr,c as ro,e as Qt,f as wv,h as kv,i as Hv,j as Sv,k as Cv,l as Wi,m as xv,n as Iv,o as Pv,p as Hr,s as Fo,t as Sr,u as up,v as Cr,w as Tv,x as zv}from"./chunk-LZU5VVW4.js";import{a as Pr}from"./chunk-GHPOVWVP.js";import{e as Is}from"./chunk-O7FV4MLW.js";import{b as Tt}from"./chunk-T7I45MK4.js";import{k as rt,l as Pt,n as ot,p as Ir,q as Xe}from"./chunk-JTUZ5AFR.js";import{$a as Nc,$b as he,$c as fv,A as Ac,Ab as b,Bb as U,Ca as Ss,Cb as oa,Cc as di,Db as na,Dc as ae,Ea as cs,Eb as aa,Ec as wr,Fa as nv,Fb as uv,G as Xy,Gb as gv,Gc as ds,Ha as Cs,Hc as so,Ia as av,Ic as _v,J as ev,Ja as lv,Jc as hv,K as jc,Kb as ie,L as tv,Na as Me,Nb as Q,O as sp,Oa as cv,Ob as Ec,Pb as S,R as _r,Ra as dv,Rc as yi,Sa as m,T as iv,Tb as Bc,Ua as Ni,Ub as Mc,V as rp,Va as Gs,Vb as Uc,Wb as br,Xa as lp,Xb as yr,Yb as Fc,Zb as bi,Zc as Vc,_a as Bo,_b as Ri,a as pe,ab as ra,ac as D,b as Fe,ba as op,bc as re,bd as bv,c as Jy,ca as Dc,cb as xs,cc as oe,da as np,dc as vr,e as v,ea as ls,ec as Oc,fa as sv,fb as ve,fd as yv,g as xt,gb as fr,h as ge,hb as Ws,hc as at,ib as Rc,ic as lt,ja as ap,jc as ct,k as eo,ka as pt,kc as pv,la as hr,lb as cp,lc as Mo,m as to,mc as st,na as Ks,nc as li,oa as rv,oc as la,p as Re,pa as j,pc as ci,q as Tc,qb as dp,qc as Uo,r as ip,rb as me,rc as mv,sa as ov,sb as T,t as Zy,tb as z,tc as R,u as zc,ua as J,uc as O,va as Z,vb as Je,vc as mt,wb as Ze,xb as Qe,y as Qy,ya as sa,yb as N,z as Ae,za as io,zb as y}from"./chunk-UUXRTS4O.js";var Xv=v(Ts=>{"use strict";Object.defineProperty(Ts,"__esModule",{value:!0});Ts.formatNames=Ts.fastFormats=Ts.fullFormats=void 0;function Ps(e,i){return{validate:e,compare:i}}Ts.fullFormats={date:Ps(Yv,fp),time:Ps(_p(!0),bp),"date-time":Ps(Kv(!0),Zv),"iso-time":Ps(_p(),Jv),"iso-date-time":Ps(Kv(),Qv),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:rF,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:uF,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:oF,int32:{type:"number",validate:lF},int64:{type:"number",validate:cF},float:{type:"number",validate:Wv},double:{type:"number",validate:Wv},password:!0,binary:!0};Ts.fastFormats=Fe(pe({},Ts.fullFormats),{date:Ps(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,fp),time:Ps(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,bp),"date-time":Ps(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Zv),"iso-time":Ps(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Jv),"iso-date-time":Ps(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Qv),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i});Ts.formatNames=Object.keys(Ts.fullFormats);function XU(e){return e%4===0&&(e%100!==0||e%400===0)}var eF=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,tF=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Yv(e){let i=eF.exec(e);if(!i)return!1;let t=+i[1],s=+i[2],r=+i[3];return s>=1&&s<=12&&r>=1&&r<=(s===2&&XU(t)?29:tF[s])}function fp(e,i){if(e&&i)return e>i?1:e<i?-1:0}var mp=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function _p(e){return function(t){let s=mp.exec(t);if(!s)return!1;let r=+s[1],o=+s[2],l=+s[3],c=s[4],u=s[5]==="-"?-1:1,p=+(s[6]||0),_=+(s[7]||0);if(p>23||_>59||e&&!c)return!1;if(r<=23&&o<=59&&l<60)return!0;let f=o-_*u,H=r-p*u-(f<0?1:0);return(H===23||H===-1)&&(f===59||f===-1)&&l<61}}function bp(e,i){if(!(e&&i))return;let t=new Date("2020-01-01T"+e).valueOf(),s=new Date("2020-01-01T"+i).valueOf();if(t&&s)return t-s}function Jv(e,i){if(!(e&&i))return;let t=mp.exec(e),s=mp.exec(i);if(t&&s)return e=t[1]+t[2]+t[3],i=s[1]+s[2]+s[3],e>i?1:e<i?-1:0}var hp=/t|\s/i;function Kv(e){let i=_p(e);return function(s){let r=s.split(hp);return r.length===2&&Yv(r[0])&&i(r[1])}}function Zv(e,i){if(!(e&&i))return;let t=new Date(e).valueOf(),s=new Date(i).valueOf();if(t&&s)return t-s}function Qv(e,i){if(!(e&&i))return;let[t,s]=e.split(hp),[r,o]=i.split(hp),l=fp(t,r);if(l!==void 0)return l||bp(s,o)}var iF=/\/|:/,sF=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function rF(e){return iF.test(e)&&sF.test(e)}var Gv=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function oF(e){return Gv.lastIndex=0,Gv.test(e)}var nF=-(2**31),aF=2**31-1;function lF(e){return Number.isInteger(e)&&e<=aF&&e>=nF}function cF(e){return Number.isInteger(e)}function Wv(){return!0}var dF=/[^\\]\\Z/;function uF(e){if(dF.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var pa=v(We=>{"use strict";Object.defineProperty(We,"__esModule",{value:!0});We.regexpCode=We.getEsmExportName=We.getProperty=We.safeStringify=We.stringify=We.strConcat=We.addCodeArg=We.str=We._=We.nil=We._Code=We.Name=We.IDENTIFIER=We._CodeOrName=void 0;var ua=class{};We._CodeOrName=ua;We.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var oo=class extends ua{constructor(i){if(super(),!We.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}}};We.Name=oo;var Yi=class extends ua{constructor(i){super(),this._items=typeof i=="string"?[i]:i}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let i=this._items[0];return i===""||i==='""'}get str(){var i;return(i=this._str)!==null&&i!==void 0?i:this._str=this._items.reduce((t,s)=>`${t}${s}`,"")}get names(){var i;return(i=this._names)!==null&&i!==void 0?i:this._names=this._items.reduce((t,s)=>(s instanceof oo&&(t[s.str]=(t[s.str]||0)+1),t),{})}};We._Code=Yi;We.nil=new Yi("");function ew(e,...i){let t=[e[0]],s=0;for(;s<i.length;)vp(t,i[s]),t.push(e[++s]);return new Yi(t)}We._=ew;var yp=new Yi("+");function tw(e,...i){let t=[ga(e[0])],s=0;for(;s<i.length;)t.push(yp),vp(t,i[s]),t.push(yp,ga(e[++s]));return gF(t),new Yi(t)}We.str=tw;function vp(e,i){i instanceof Yi?e.push(...i._items):i instanceof oo?e.push(i):e.push(_F(i))}We.addCodeArg=vp;function gF(e){let i=1;for(;i<e.length-1;){if(e[i]===yp){let t=pF(e[i-1],e[i+1]);if(t!==void 0){e.splice(i-1,3,t);continue}e[i++]="+"}i++}}function pF(e,i){if(i==='""')return e;if(e==='""')return i;if(typeof e=="string")return i instanceof oo||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 oo))return`"${e}${i.slice(1)}`}function mF(e,i){return i.emptyStr()?e:e.emptyStr()?i:tw`${e}${i}`}We.strConcat=mF;function _F(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:ga(Array.isArray(e)?e.join(","):e)}function hF(e){return new Yi(ga(e))}We.stringify=hF;function ga(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}We.safeStringify=ga;function fF(e){return typeof e=="string"&&We.IDENTIFIER.test(e)?new Yi(`.${e}`):ew`[${e}]`}We.getProperty=fF;function bF(e){if(typeof e=="string"&&We.IDENTIFIER.test(e))return new Yi(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}We.getEsmExportName=bF;function yF(e){return new Yi(e.toString())}We.regexpCode=yF});var Hp=v(ki=>{"use strict";Object.defineProperty(ki,"__esModule",{value:!0});ki.ValueScope=ki.ValueScopeName=ki.Scope=ki.varKinds=ki.UsedValueState=void 0;var wi=pa(),wp=class extends Error{constructor(i){super(`CodeGen: "code" for ${i} not defined`),this.value=i.value}},Xc=(function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e})(Xc||(ki.UsedValueState=Xc={}));ki.varKinds={const:new wi.Name("const"),let:new wi.Name("let"),var:new wi.Name("var")};var ed=class{constructor({prefixes:i,parent:t}={}){this._names={},this._prefixes=i,this._parent=t}toName(i){return i instanceof wi.Name?i:this.name(i)}name(i){return new wi.Name(this._newName(i))}_newName(i){let t=this._names[i]||this._nameGroup(i);return`${i}${t.index++}`}_nameGroup(i){var t,s;if(!((s=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||s===void 0)&&s.has(i)||this._prefixes&&!this._prefixes.has(i))throw new Error(`CodeGen: prefix "${i}" is not allowed in this scope`);return this._names[i]={prefix:i,index:0}}};ki.Scope=ed;var td=class extends wi.Name{constructor(i,t){super(t),this.prefix=i}setValue(i,{property:t,itemIndex:s}){this.value=i,this.scopePath=(0,wi._)`.${new wi.Name(t)}[${s}]`}};ki.ValueScopeName=td;var vF=(0,wi._)`\n`,kp=class extends ed{constructor(i){super(i),this._values={},this._scope=i.scope,this.opts=Fe(pe({},i),{_n:i.lines?vF:wi.nil})}get(){return this._scope}name(i){return new td(i,this._newName(i))}value(i,t){var s;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let r=this.toName(i),{prefix:o}=r,l=(s=t.key)!==null&&s!==void 0?s:t.ref,c=this._values[o];if(c){let _=c.get(l);if(_)return _}else c=this._values[o]=new Map;c.set(l,r);let u=this._scope[o]||(this._scope[o]=[]),p=u.length;return u[p]=t.ref,r.setValue(t,{property:o,itemIndex:p}),r}getValue(i,t){let s=this._values[i];if(s)return s.get(t)}scopeRefs(i,t=this._values){return this._reduceValues(t,s=>{if(s.scopePath===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return(0,wi._)`${i}${s.scopePath}`})}scopeCode(i=this._values,t,s){return this._reduceValues(i,r=>{if(r.value===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return r.value.code},t,s)}_reduceValues(i,t,s={},r){let o=wi.nil;for(let l in i){let c=i[l];if(!c)continue;let u=s[l]=s[l]||new Map;c.forEach(p=>{if(u.has(p))return;u.set(p,Xc.Started);let _=t(p);if(_){let f=this.opts.es5?ki.varKinds.var:ki.varKinds.const;o=(0,wi._)`${o}${f} ${p} = ${_};${this.opts._n}`}else if(_=r?.(p))o=(0,wi._)`${o}${_}${this.opts._n}`;else throw new wp(p);u.set(p,Xc.Completed)})}return o}};ki.ValueScope=kp});var we=v(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.or=Ue.and=Ue.not=Ue.CodeGen=Ue.operators=Ue.varKinds=Ue.ValueScopeName=Ue.ValueScope=Ue.Scope=Ue.Name=Ue.regexpCode=Ue.stringify=Ue.getProperty=Ue.nil=Ue.strConcat=Ue.str=Ue._=void 0;var Ke=pa(),gs=Hp(),Tr=pa();Object.defineProperty(Ue,"_",{enumerable:!0,get:function(){return Tr._}});Object.defineProperty(Ue,"str",{enumerable:!0,get:function(){return Tr.str}});Object.defineProperty(Ue,"strConcat",{enumerable:!0,get:function(){return Tr.strConcat}});Object.defineProperty(Ue,"nil",{enumerable:!0,get:function(){return Tr.nil}});Object.defineProperty(Ue,"getProperty",{enumerable:!0,get:function(){return Tr.getProperty}});Object.defineProperty(Ue,"stringify",{enumerable:!0,get:function(){return Tr.stringify}});Object.defineProperty(Ue,"regexpCode",{enumerable:!0,get:function(){return Tr.regexpCode}});Object.defineProperty(Ue,"Name",{enumerable:!0,get:function(){return Tr.Name}});var nd=Hp();Object.defineProperty(Ue,"Scope",{enumerable:!0,get:function(){return nd.Scope}});Object.defineProperty(Ue,"ValueScope",{enumerable:!0,get:function(){return nd.ValueScope}});Object.defineProperty(Ue,"ValueScopeName",{enumerable:!0,get:function(){return nd.ValueScopeName}});Object.defineProperty(Ue,"varKinds",{enumerable:!0,get:function(){return nd.varKinds}});Ue.operators={GT:new Ke._Code(">"),GTE:new Ke._Code(">="),LT:new Ke._Code("<"),LTE:new Ke._Code("<="),EQ:new Ke._Code("==="),NEQ:new Ke._Code("!=="),NOT:new Ke._Code("!"),OR:new Ke._Code("||"),AND:new Ke._Code("&&"),ADD:new Ke._Code("+")};var Js=class{optimizeNodes(){return this}optimizeNames(i,t){return this}},Sp=class extends Js{constructor(i,t,s){super(),this.varKind=i,this.name=t,this.rhs=s}render({es5:i,_n:t}){let s=i?gs.varKinds.var:this.varKind,r=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${r};`+t}optimizeNames(i,t){if(i[this.name.str])return this.rhs&&(this.rhs=Ko(this.rhs,i,t)),this}get names(){return this.rhs instanceof Ke._CodeOrName?this.rhs.names:{}}},sd=class extends Js{constructor(i,t,s){super(),this.lhs=i,this.rhs=t,this.sideEffects=s}render({_n:i}){return`${this.lhs} = ${this.rhs};`+i}optimizeNames(i,t){if(!(this.lhs instanceof Ke.Name&&!i[this.lhs.str]&&!this.sideEffects))return this.rhs=Ko(this.rhs,i,t),this}get names(){let i=this.lhs instanceof Ke.Name?{}:pe({},this.lhs.names);return od(i,this.rhs)}},Cp=class extends sd{constructor(i,t,s,r){super(i,s,r),this.op=t}render({_n:i}){return`${this.lhs} ${this.op}= ${this.rhs};`+i}},xp=class extends Js{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`${this.label}:`+i}},Ip=class extends Js{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`break${this.label?` ${this.label}`:""};`+i}},Pp=class extends Js{constructor(i){super(),this.error=i}render({_n:i}){return`throw ${this.error};`+i}get names(){return this.error.names}},Tp=class extends Js{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=Ko(this.code,i,t),this}get names(){return this.code instanceof Ke._CodeOrName?this.code.names:{}}},ma=class extends Js{constructor(i=[]){super(),this.nodes=i}render(i){return this.nodes.reduce((t,s)=>t+s.render(i),"")}optimizeNodes(){let{nodes:i}=this,t=i.length;for(;t--;){let s=i[t].optimizeNodes();Array.isArray(s)?i.splice(t,1,...s):s?i[t]=s:i.splice(t,1)}return i.length>0?this:void 0}optimizeNames(i,t){let{nodes:s}=this,r=s.length;for(;r--;){let o=s[r];o.optimizeNames(i,t)||(wF(i,o.names),s.splice(r,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((i,t)=>no(i,t.names),{})}},Zs=class extends ma{render(i){return"{"+i._n+super.render(i)+"}"+i._n}},zp=class extends ma{},Ap=(()=>{class e extends Zs{}return e.kind="else",e})(),id=(()=>{class e extends Zs{constructor(t,s){super(s),this.condition=t}render(t){let s=`if(${this.condition})`+super.render(t);return this.else&&(s+="else "+this.else.render(t)),s}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let s=this.else;if(s){let r=s.optimizeNodes();s=this.else=Array.isArray(r)?new Ap(r):r}if(s)return t===!1?s instanceof e?s:s.nodes:this.nodes.length?this:new e(nw(t),s instanceof e?[s]:s.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,s){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(t,s),!!(super.optimizeNames(t,s)||this.else))return this.condition=Ko(this.condition,t,s),this}get names(){let t=super.names;return od(t,this.condition),this.else&&no(t,this.else.names),t}}return e.kind="if",e})(),ad=(()=>{class e extends Zs{}return e.kind="for",e})(),jp=class extends ad{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=Ko(this.iteration,i,t),this}get names(){return no(super.names,this.iteration.names)}},Dp=class extends ad{constructor(i,t,s,r){super(),this.varKind=i,this.name=t,this.from=s,this.to=r}render(i){let t=i.es5?gs.varKinds.var:this.varKind,{name:s,from:r,to:o}=this;return`for(${t} ${s}=${r}; ${s}<${o}; ${s}++)`+super.render(i)}get names(){let i=od(super.names,this.from);return od(i,this.to)}},rd=class extends ad{constructor(i,t,s,r){super(),this.loop=i,this.varKind=t,this.name=s,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=Ko(this.iterable,i,t),this}get names(){return no(super.names,this.iterable.names)}},iw=(()=>{class e extends Zs{constructor(t,s,r){super(),this.name=t,this.args=s,this.async=r}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),sw=(()=>{class e extends ma{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Np=class extends Zs{render(i){let t="try"+super.render(i);return this.catch&&(t+=this.catch.render(i)),this.finally&&(t+=this.finally.render(i)),t}optimizeNodes(){var i,t;return super.optimizeNodes(),(i=this.catch)===null||i===void 0||i.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(i,t){var s,r;return super.optimizeNames(i,t),(s=this.catch)===null||s===void 0||s.optimizeNames(i,t),(r=this.finally)===null||r===void 0||r.optimizeNames(i,t),this}get names(){let i=super.names;return this.catch&&no(i,this.catch.names),this.finally&&no(i,this.finally.names),i}},rw=(()=>{class e extends Zs{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),ow=(()=>{class e extends Zs{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),Rp=class{constructor(i,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=Fe(pe({},t),{_n:t.lines?`
1
+ import{a as $v}from"./chunk-XSTVLA74.js";import{a as gp,c as Fv,d as Ov,e as Ys,f as Lv,g as QU,h as pp}from"./chunk-UKOU5RAG.js";import{a as Bv}from"./chunk-JT7SPTVG.js";import{a as Uv}from"./chunk-N6D52WI6.js";import{a as qv}from"./chunk-ZOF7GJLP.js";import{a as Jc,b as Zc,c as Qc}from"./chunk-7HMWJ2FC.js";import{a as da}from"./chunk-MGZVKFCX.js";import{a as Vv}from"./chunk-DDJU52K4.js";import{a as Yc,b as Lo}from"./chunk-KSI5RFA4.js";import{a as Vo,b as qo}from"./chunk-PCFKF3RR.js";import{a as Mv}from"./chunk-3TSJETVD.js";import{a as qc,b as Lc,c as $c,d as Kc,e as Gc,f as Wc,g as Oo,m as It,n as vi,o as jv,p as Dv,q as Nv,r as Rv,s as Ev,t as xr}from"./chunk-YHD44ZXJ.js";import{B as Av,C as us,D as ca,a as vv,b as kr,c as ro,e as Qt,f as wv,h as kv,i as Hv,j as Sv,k as Cv,l as Wi,m as xv,n as Iv,o as Pv,p as Hr,s as Fo,t as Sr,u as up,v as Cr,w as Tv,x as zv}from"./chunk-LZU5VVW4.js";import{a as Pr}from"./chunk-UMGR23VE.js";import{e as Is}from"./chunk-O7FV4MLW.js";import{b as Tt}from"./chunk-YDGFXP6E.js";import{k as rt,l as Pt,n as ot,p as Ir,q as Xe}from"./chunk-67QLZ3WO.js";import{$a as Nc,$b as he,$c as fv,A as Ac,Ab as b,Bb as U,Ca as Ss,Cb as oa,Cc as di,Db as na,Dc as ae,Ea as cs,Eb as aa,Ec as wr,Fa as nv,Fb as uv,G as Xy,Gb as gv,Gc as ds,Ha as Cs,Hc as so,Ia as av,Ic as _v,J as ev,Ja as lv,Jc as hv,K as jc,Kb as ie,L as tv,Na as Me,Nb as Q,O as sp,Oa as cv,Ob as Ec,Pb as S,R as _r,Ra as dv,Rc as yi,Sa as m,T as iv,Tb as Bc,Ua as Ni,Ub as Mc,V as rp,Va as Gs,Vb as Uc,Wb as br,Xa as lp,Xb as yr,Yb as Fc,Zb as bi,Zc as Vc,_a as Bo,_b as Ri,a as pe,ab as ra,ac as D,b as Fe,ba as op,bc as re,bd as bv,c as Jy,ca as Dc,cb as xs,cc as oe,da as np,dc as vr,e as v,ea as ls,ec as Oc,fa as sv,fb as ve,fd as yv,g as xt,gb as fr,h as ge,hb as Ws,hc as at,ib as Rc,ic as lt,ja as ap,jc as ct,k as eo,ka as pt,kc as pv,la as hr,lb as cp,lc as Mo,m as to,mc as st,na as Ks,nc as li,oa as rv,oc as la,p as Re,pa as j,pc as ci,q as Tc,qb as dp,qc as Uo,r as ip,rb as me,rc as mv,sa as ov,sb as T,t as Zy,tb as z,tc as R,u as zc,ua as J,uc as O,va as Z,vb as Je,vc as mt,wb as Ze,xb as Qe,y as Qy,ya as sa,yb as N,z as Ae,za as io,zb as y}from"./chunk-UUXRTS4O.js";var Xv=v(Ts=>{"use strict";Object.defineProperty(Ts,"__esModule",{value:!0});Ts.formatNames=Ts.fastFormats=Ts.fullFormats=void 0;function Ps(e,i){return{validate:e,compare:i}}Ts.fullFormats={date:Ps(Yv,fp),time:Ps(_p(!0),bp),"date-time":Ps(Kv(!0),Zv),"iso-time":Ps(_p(),Jv),"iso-date-time":Ps(Kv(),Qv),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:rF,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:uF,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:oF,int32:{type:"number",validate:lF},int64:{type:"number",validate:cF},float:{type:"number",validate:Wv},double:{type:"number",validate:Wv},password:!0,binary:!0};Ts.fastFormats=Fe(pe({},Ts.fullFormats),{date:Ps(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,fp),time:Ps(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,bp),"date-time":Ps(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Zv),"iso-time":Ps(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Jv),"iso-date-time":Ps(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Qv),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i});Ts.formatNames=Object.keys(Ts.fullFormats);function XU(e){return e%4===0&&(e%100!==0||e%400===0)}var eF=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,tF=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Yv(e){let i=eF.exec(e);if(!i)return!1;let t=+i[1],s=+i[2],r=+i[3];return s>=1&&s<=12&&r>=1&&r<=(s===2&&XU(t)?29:tF[s])}function fp(e,i){if(e&&i)return e>i?1:e<i?-1:0}var mp=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function _p(e){return function(t){let s=mp.exec(t);if(!s)return!1;let r=+s[1],o=+s[2],l=+s[3],c=s[4],u=s[5]==="-"?-1:1,p=+(s[6]||0),_=+(s[7]||0);if(p>23||_>59||e&&!c)return!1;if(r<=23&&o<=59&&l<60)return!0;let f=o-_*u,H=r-p*u-(f<0?1:0);return(H===23||H===-1)&&(f===59||f===-1)&&l<61}}function bp(e,i){if(!(e&&i))return;let t=new Date("2020-01-01T"+e).valueOf(),s=new Date("2020-01-01T"+i).valueOf();if(t&&s)return t-s}function Jv(e,i){if(!(e&&i))return;let t=mp.exec(e),s=mp.exec(i);if(t&&s)return e=t[1]+t[2]+t[3],i=s[1]+s[2]+s[3],e>i?1:e<i?-1:0}var hp=/t|\s/i;function Kv(e){let i=_p(e);return function(s){let r=s.split(hp);return r.length===2&&Yv(r[0])&&i(r[1])}}function Zv(e,i){if(!(e&&i))return;let t=new Date(e).valueOf(),s=new Date(i).valueOf();if(t&&s)return t-s}function Qv(e,i){if(!(e&&i))return;let[t,s]=e.split(hp),[r,o]=i.split(hp),l=fp(t,r);if(l!==void 0)return l||bp(s,o)}var iF=/\/|:/,sF=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function rF(e){return iF.test(e)&&sF.test(e)}var Gv=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function oF(e){return Gv.lastIndex=0,Gv.test(e)}var nF=-(2**31),aF=2**31-1;function lF(e){return Number.isInteger(e)&&e<=aF&&e>=nF}function cF(e){return Number.isInteger(e)}function Wv(){return!0}var dF=/[^\\]\\Z/;function uF(e){if(dF.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var pa=v(We=>{"use strict";Object.defineProperty(We,"__esModule",{value:!0});We.regexpCode=We.getEsmExportName=We.getProperty=We.safeStringify=We.stringify=We.strConcat=We.addCodeArg=We.str=We._=We.nil=We._Code=We.Name=We.IDENTIFIER=We._CodeOrName=void 0;var ua=class{};We._CodeOrName=ua;We.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var oo=class extends ua{constructor(i){if(super(),!We.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}}};We.Name=oo;var Yi=class extends ua{constructor(i){super(),this._items=typeof i=="string"?[i]:i}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let i=this._items[0];return i===""||i==='""'}get str(){var i;return(i=this._str)!==null&&i!==void 0?i:this._str=this._items.reduce((t,s)=>`${t}${s}`,"")}get names(){var i;return(i=this._names)!==null&&i!==void 0?i:this._names=this._items.reduce((t,s)=>(s instanceof oo&&(t[s.str]=(t[s.str]||0)+1),t),{})}};We._Code=Yi;We.nil=new Yi("");function ew(e,...i){let t=[e[0]],s=0;for(;s<i.length;)vp(t,i[s]),t.push(e[++s]);return new Yi(t)}We._=ew;var yp=new Yi("+");function tw(e,...i){let t=[ga(e[0])],s=0;for(;s<i.length;)t.push(yp),vp(t,i[s]),t.push(yp,ga(e[++s]));return gF(t),new Yi(t)}We.str=tw;function vp(e,i){i instanceof Yi?e.push(...i._items):i instanceof oo?e.push(i):e.push(_F(i))}We.addCodeArg=vp;function gF(e){let i=1;for(;i<e.length-1;){if(e[i]===yp){let t=pF(e[i-1],e[i+1]);if(t!==void 0){e.splice(i-1,3,t);continue}e[i++]="+"}i++}}function pF(e,i){if(i==='""')return e;if(e==='""')return i;if(typeof e=="string")return i instanceof oo||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 oo))return`"${e}${i.slice(1)}`}function mF(e,i){return i.emptyStr()?e:e.emptyStr()?i:tw`${e}${i}`}We.strConcat=mF;function _F(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:ga(Array.isArray(e)?e.join(","):e)}function hF(e){return new Yi(ga(e))}We.stringify=hF;function ga(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}We.safeStringify=ga;function fF(e){return typeof e=="string"&&We.IDENTIFIER.test(e)?new Yi(`.${e}`):ew`[${e}]`}We.getProperty=fF;function bF(e){if(typeof e=="string"&&We.IDENTIFIER.test(e))return new Yi(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}We.getEsmExportName=bF;function yF(e){return new Yi(e.toString())}We.regexpCode=yF});var Hp=v(ki=>{"use strict";Object.defineProperty(ki,"__esModule",{value:!0});ki.ValueScope=ki.ValueScopeName=ki.Scope=ki.varKinds=ki.UsedValueState=void 0;var wi=pa(),wp=class extends Error{constructor(i){super(`CodeGen: "code" for ${i} not defined`),this.value=i.value}},Xc=(function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e})(Xc||(ki.UsedValueState=Xc={}));ki.varKinds={const:new wi.Name("const"),let:new wi.Name("let"),var:new wi.Name("var")};var ed=class{constructor({prefixes:i,parent:t}={}){this._names={},this._prefixes=i,this._parent=t}toName(i){return i instanceof wi.Name?i:this.name(i)}name(i){return new wi.Name(this._newName(i))}_newName(i){let t=this._names[i]||this._nameGroup(i);return`${i}${t.index++}`}_nameGroup(i){var t,s;if(!((s=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||s===void 0)&&s.has(i)||this._prefixes&&!this._prefixes.has(i))throw new Error(`CodeGen: prefix "${i}" is not allowed in this scope`);return this._names[i]={prefix:i,index:0}}};ki.Scope=ed;var td=class extends wi.Name{constructor(i,t){super(t),this.prefix=i}setValue(i,{property:t,itemIndex:s}){this.value=i,this.scopePath=(0,wi._)`.${new wi.Name(t)}[${s}]`}};ki.ValueScopeName=td;var vF=(0,wi._)`\n`,kp=class extends ed{constructor(i){super(i),this._values={},this._scope=i.scope,this.opts=Fe(pe({},i),{_n:i.lines?vF:wi.nil})}get(){return this._scope}name(i){return new td(i,this._newName(i))}value(i,t){var s;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let r=this.toName(i),{prefix:o}=r,l=(s=t.key)!==null&&s!==void 0?s:t.ref,c=this._values[o];if(c){let _=c.get(l);if(_)return _}else c=this._values[o]=new Map;c.set(l,r);let u=this._scope[o]||(this._scope[o]=[]),p=u.length;return u[p]=t.ref,r.setValue(t,{property:o,itemIndex:p}),r}getValue(i,t){let s=this._values[i];if(s)return s.get(t)}scopeRefs(i,t=this._values){return this._reduceValues(t,s=>{if(s.scopePath===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return(0,wi._)`${i}${s.scopePath}`})}scopeCode(i=this._values,t,s){return this._reduceValues(i,r=>{if(r.value===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return r.value.code},t,s)}_reduceValues(i,t,s={},r){let o=wi.nil;for(let l in i){let c=i[l];if(!c)continue;let u=s[l]=s[l]||new Map;c.forEach(p=>{if(u.has(p))return;u.set(p,Xc.Started);let _=t(p);if(_){let f=this.opts.es5?ki.varKinds.var:ki.varKinds.const;o=(0,wi._)`${o}${f} ${p} = ${_};${this.opts._n}`}else if(_=r?.(p))o=(0,wi._)`${o}${_}${this.opts._n}`;else throw new wp(p);u.set(p,Xc.Completed)})}return o}};ki.ValueScope=kp});var we=v(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.or=Ue.and=Ue.not=Ue.CodeGen=Ue.operators=Ue.varKinds=Ue.ValueScopeName=Ue.ValueScope=Ue.Scope=Ue.Name=Ue.regexpCode=Ue.stringify=Ue.getProperty=Ue.nil=Ue.strConcat=Ue.str=Ue._=void 0;var Ke=pa(),gs=Hp(),Tr=pa();Object.defineProperty(Ue,"_",{enumerable:!0,get:function(){return Tr._}});Object.defineProperty(Ue,"str",{enumerable:!0,get:function(){return Tr.str}});Object.defineProperty(Ue,"strConcat",{enumerable:!0,get:function(){return Tr.strConcat}});Object.defineProperty(Ue,"nil",{enumerable:!0,get:function(){return Tr.nil}});Object.defineProperty(Ue,"getProperty",{enumerable:!0,get:function(){return Tr.getProperty}});Object.defineProperty(Ue,"stringify",{enumerable:!0,get:function(){return Tr.stringify}});Object.defineProperty(Ue,"regexpCode",{enumerable:!0,get:function(){return Tr.regexpCode}});Object.defineProperty(Ue,"Name",{enumerable:!0,get:function(){return Tr.Name}});var nd=Hp();Object.defineProperty(Ue,"Scope",{enumerable:!0,get:function(){return nd.Scope}});Object.defineProperty(Ue,"ValueScope",{enumerable:!0,get:function(){return nd.ValueScope}});Object.defineProperty(Ue,"ValueScopeName",{enumerable:!0,get:function(){return nd.ValueScopeName}});Object.defineProperty(Ue,"varKinds",{enumerable:!0,get:function(){return nd.varKinds}});Ue.operators={GT:new Ke._Code(">"),GTE:new Ke._Code(">="),LT:new Ke._Code("<"),LTE:new Ke._Code("<="),EQ:new Ke._Code("==="),NEQ:new Ke._Code("!=="),NOT:new Ke._Code("!"),OR:new Ke._Code("||"),AND:new Ke._Code("&&"),ADD:new Ke._Code("+")};var Js=class{optimizeNodes(){return this}optimizeNames(i,t){return this}},Sp=class extends Js{constructor(i,t,s){super(),this.varKind=i,this.name=t,this.rhs=s}render({es5:i,_n:t}){let s=i?gs.varKinds.var:this.varKind,r=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${r};`+t}optimizeNames(i,t){if(i[this.name.str])return this.rhs&&(this.rhs=Ko(this.rhs,i,t)),this}get names(){return this.rhs instanceof Ke._CodeOrName?this.rhs.names:{}}},sd=class extends Js{constructor(i,t,s){super(),this.lhs=i,this.rhs=t,this.sideEffects=s}render({_n:i}){return`${this.lhs} = ${this.rhs};`+i}optimizeNames(i,t){if(!(this.lhs instanceof Ke.Name&&!i[this.lhs.str]&&!this.sideEffects))return this.rhs=Ko(this.rhs,i,t),this}get names(){let i=this.lhs instanceof Ke.Name?{}:pe({},this.lhs.names);return od(i,this.rhs)}},Cp=class extends sd{constructor(i,t,s,r){super(i,s,r),this.op=t}render({_n:i}){return`${this.lhs} ${this.op}= ${this.rhs};`+i}},xp=class extends Js{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`${this.label}:`+i}},Ip=class extends Js{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`break${this.label?` ${this.label}`:""};`+i}},Pp=class extends Js{constructor(i){super(),this.error=i}render({_n:i}){return`throw ${this.error};`+i}get names(){return this.error.names}},Tp=class extends Js{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=Ko(this.code,i,t),this}get names(){return this.code instanceof Ke._CodeOrName?this.code.names:{}}},ma=class extends Js{constructor(i=[]){super(),this.nodes=i}render(i){return this.nodes.reduce((t,s)=>t+s.render(i),"")}optimizeNodes(){let{nodes:i}=this,t=i.length;for(;t--;){let s=i[t].optimizeNodes();Array.isArray(s)?i.splice(t,1,...s):s?i[t]=s:i.splice(t,1)}return i.length>0?this:void 0}optimizeNames(i,t){let{nodes:s}=this,r=s.length;for(;r--;){let o=s[r];o.optimizeNames(i,t)||(wF(i,o.names),s.splice(r,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((i,t)=>no(i,t.names),{})}},Zs=class extends ma{render(i){return"{"+i._n+super.render(i)+"}"+i._n}},zp=class extends ma{},Ap=(()=>{class e extends Zs{}return e.kind="else",e})(),id=(()=>{class e extends Zs{constructor(t,s){super(s),this.condition=t}render(t){let s=`if(${this.condition})`+super.render(t);return this.else&&(s+="else "+this.else.render(t)),s}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let s=this.else;if(s){let r=s.optimizeNodes();s=this.else=Array.isArray(r)?new Ap(r):r}if(s)return t===!1?s instanceof e?s:s.nodes:this.nodes.length?this:new e(nw(t),s instanceof e?[s]:s.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,s){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(t,s),!!(super.optimizeNames(t,s)||this.else))return this.condition=Ko(this.condition,t,s),this}get names(){let t=super.names;return od(t,this.condition),this.else&&no(t,this.else.names),t}}return e.kind="if",e})(),ad=(()=>{class e extends Zs{}return e.kind="for",e})(),jp=class extends ad{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=Ko(this.iteration,i,t),this}get names(){return no(super.names,this.iteration.names)}},Dp=class extends ad{constructor(i,t,s,r){super(),this.varKind=i,this.name=t,this.from=s,this.to=r}render(i){let t=i.es5?gs.varKinds.var:this.varKind,{name:s,from:r,to:o}=this;return`for(${t} ${s}=${r}; ${s}<${o}; ${s}++)`+super.render(i)}get names(){let i=od(super.names,this.from);return od(i,this.to)}},rd=class extends ad{constructor(i,t,s,r){super(),this.loop=i,this.varKind=t,this.name=s,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=Ko(this.iterable,i,t),this}get names(){return no(super.names,this.iterable.names)}},iw=(()=>{class e extends Zs{constructor(t,s,r){super(),this.name=t,this.args=s,this.async=r}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),sw=(()=>{class e extends ma{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Np=class extends Zs{render(i){let t="try"+super.render(i);return this.catch&&(t+=this.catch.render(i)),this.finally&&(t+=this.finally.render(i)),t}optimizeNodes(){var i,t;return super.optimizeNodes(),(i=this.catch)===null||i===void 0||i.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(i,t){var s,r;return super.optimizeNames(i,t),(s=this.catch)===null||s===void 0||s.optimizeNames(i,t),(r=this.finally)===null||r===void 0||r.optimizeNames(i,t),this}get names(){let i=super.names;return this.catch&&no(i,this.catch.names),this.finally&&no(i,this.finally.names),i}},rw=(()=>{class e extends Zs{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),ow=(()=>{class e extends Zs{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),Rp=class{constructor(i,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=Fe(pe({},t),{_n:t.lines?`
2
2
  `:""}),this._extScope=i,this._scope=new gs.Scope({parent:i}),this._nodes=[new zp]}toString(){return this._root.render(this.opts)}name(i){return this._scope.name(i)}scopeName(i){return this._extScope.name(i)}scopeValue(i,t){let s=this._extScope.value(i,t);return(this._values[s.prefix]||(this._values[s.prefix]=new Set)).add(s),s}getScopeValue(i,t){return this._extScope.getValue(i,t)}scopeRefs(i){return this._extScope.scopeRefs(i,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(i,t,s,r){let o=this._scope.toName(t);return s!==void 0&&r&&(this._constants[o.str]=s),this._leafNode(new Sp(i,o,s)),o}const(i,t,s){return this._def(gs.varKinds.const,i,t,s)}let(i,t,s){return this._def(gs.varKinds.let,i,t,s)}var(i,t,s){return this._def(gs.varKinds.var,i,t,s)}assign(i,t,s){return this._leafNode(new sd(i,t,s))}add(i,t){return this._leafNode(new Cp(i,Ue.operators.ADD,t))}code(i){return typeof i=="function"?i():i!==Ke.nil&&this._leafNode(new Tp(i)),this}object(...i){let t=["{"];for(let[s,r]of i)t.length>1&&t.push(","),t.push(s),(s!==r||this.opts.es5)&&(t.push(":"),(0,Ke.addCodeArg)(t,r));return t.push("}"),new Ke._Code(t)}if(i,t,s){if(this._blockNode(new id(i)),t&&s)this.code(t).else().code(s).endIf();else if(t)this.code(t).endIf();else if(s)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(i){return this._elseNode(new id(i))}else(){return this._elseNode(new Ap)}endIf(){return this._endBlockNode(id,Ap)}_for(i,t){return this._blockNode(i),t&&this.code(t).endFor(),this}for(i,t){return this._for(new jp(i),t)}forRange(i,t,s,r,o=this.opts.es5?gs.varKinds.var:gs.varKinds.let){let l=this._scope.toName(i);return this._for(new Dp(o,l,t,s),()=>r(l))}forOf(i,t,s,r=gs.varKinds.const){let o=this._scope.toName(i);if(this.opts.es5){let l=t instanceof Ke.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,Ke._)`${l}.length`,c=>{this.var(o,(0,Ke._)`${l}[${c}]`),s(o)})}return this._for(new rd("of",r,o,t),()=>s(o))}forIn(i,t,s,r=this.opts.es5?gs.varKinds.var:gs.varKinds.const){if(this.opts.ownProperties)return this.forOf(i,(0,Ke._)`Object.keys(${t})`,s);let o=this._scope.toName(i);return this._for(new rd("in",r,o,t),()=>s(o))}endFor(){return this._endBlockNode(ad)}label(i){return this._leafNode(new xp(i))}break(i){return this._leafNode(new Ip(i))}return(i){let t=new sw;if(this._blockNode(t),this.code(i),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(sw)}try(i,t,s){if(!t&&!s)throw new Error('CodeGen: "try" without "catch" and "finally"');let r=new Np;if(this._blockNode(r),this.code(i),t){let o=this.name("e");this._currNode=r.catch=new rw(o),t(o)}return s&&(this._currNode=r.finally=new ow,this.code(s)),this._endBlockNode(rw,ow)}throw(i){return this._leafNode(new Pp(i))}block(i,t){return this._blockStarts.push(this._nodes.length),i&&this.code(i).endBlock(t),this}endBlock(i){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let s=this._nodes.length-t;if(s<0||i!==void 0&&s!==i)throw new Error(`CodeGen: wrong number of nodes: ${s} vs ${i} expected`);return this._nodes.length=t,this}func(i,t=Ke.nil,s,r){return this._blockNode(new iw(i,t,s)),r&&this.code(r).endFunc(),this}endFunc(){return this._endBlockNode(iw)}optimize(i=1){for(;i-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(i){return this._currNode.nodes.push(i),this}_blockNode(i){this._currNode.nodes.push(i),this._nodes.push(i)}_endBlockNode(i,t){let s=this._currNode;if(s instanceof i||t&&s instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${i.kind}/${t.kind}`:i.kind}"`)}_elseNode(i){let t=this._currNode;if(!(t instanceof id))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}};Ue.CodeGen=Rp;function no(e,i){for(let t in i)e[t]=(e[t]||0)+(i[t]||0);return e}function od(e,i){return i instanceof Ke._CodeOrName?no(e,i.names):e}function Ko(e,i,t){if(e instanceof Ke.Name)return s(e);if(!r(e))return e;return new Ke._Code(e._items.reduce((o,l)=>(l instanceof Ke.Name&&(l=s(l)),l instanceof Ke._Code?o.push(...l._items):o.push(l),o),[]));function s(o){let l=t[o.str];return l===void 0||i[o.str]!==1?o:(delete i[o.str],l)}function r(o){return o instanceof Ke._Code&&o._items.some(l=>l instanceof Ke.Name&&i[l.str]===1&&t[l.str]!==void 0)}}function wF(e,i){for(let t in i)e[t]=(e[t]||0)-(i[t]||0)}function nw(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,Ke._)`!${Ep(e)}`}Ue.not=nw;var kF=aw(Ue.operators.AND);function HF(...e){return e.reduce(kF)}Ue.and=HF;var SF=aw(Ue.operators.OR);function CF(...e){return e.reduce(SF)}Ue.or=CF;function aw(e){return(i,t)=>i===Ke.nil?t:t===Ke.nil?i:(0,Ke._)`${Ep(i)} ${e} ${Ep(t)}`}function Ep(e){return e instanceof Ke.Name?e:(0,Ke._)`(${e})`}});var qe=v(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.checkStrictMode=Oe.getErrorPath=Oe.Type=Oe.useFunc=Oe.setEvaluated=Oe.evaluatedPropsToName=Oe.mergeEvaluated=Oe.eachItem=Oe.unescapeJsonPointer=Oe.escapeJsonPointer=Oe.escapeFragment=Oe.unescapeFragment=Oe.schemaRefOrVal=Oe.schemaHasRulesButRef=Oe.schemaHasRules=Oe.checkUnknownRules=Oe.alwaysValidSchema=Oe.toHash=void 0;var _t=we(),xF=pa();function IF(e){let i={};for(let t of e)i[t]=!0;return i}Oe.toHash=IF;function PF(e,i){return typeof i=="boolean"?i:Object.keys(i).length===0?!0:(dw(e,i),!uw(i,e.self.RULES.all))}Oe.alwaysValidSchema=PF;function dw(e,i=e.schema){let{opts:t,self:s}=e;if(!t.strictSchema||typeof i=="boolean")return;let r=s.RULES.keywords;for(let o in i)r[o]||mw(e,`unknown keyword: "${o}"`)}Oe.checkUnknownRules=dw;function uw(e,i){if(typeof e=="boolean")return!e;for(let t in e)if(i[t])return!0;return!1}Oe.schemaHasRules=uw;function TF(e,i){if(typeof e=="boolean")return!e;for(let t in e)if(t!=="$ref"&&i.all[t])return!0;return!1}Oe.schemaHasRulesButRef=TF;function zF({topSchemaRef:e,schemaPath:i},t,s,r){if(!r){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,_t._)`${t}`}return(0,_t._)`${e}${i}${(0,_t.getProperty)(s)}`}Oe.schemaRefOrVal=zF;function AF(e){return gw(decodeURIComponent(e))}Oe.unescapeFragment=AF;function jF(e){return encodeURIComponent(Mp(e))}Oe.escapeFragment=jF;function Mp(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}Oe.escapeJsonPointer=Mp;function gw(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}Oe.unescapeJsonPointer=gw;function DF(e,i){if(Array.isArray(e))for(let t of e)i(t);else i(e)}Oe.eachItem=DF;function lw({mergeNames:e,mergeToName:i,mergeValues:t,resultToName:s}){return(r,o,l,c)=>{let u=l===void 0?o:l instanceof _t.Name?(o instanceof _t.Name?e(r,o,l):i(r,o,l),l):o instanceof _t.Name?(i(r,l,o),o):t(o,l);return c===_t.Name&&!(u instanceof _t.Name)?s(r,u):u}}Oe.mergeEvaluated={props:lw({mergeNames:(e,i,t)=>e.if((0,_t._)`${t} !== true && ${i} !== undefined`,()=>{e.if((0,_t._)`${i} === true`,()=>e.assign(t,!0),()=>e.assign(t,(0,_t._)`${t} || {}`).code((0,_t._)`Object.assign(${t}, ${i})`))}),mergeToName:(e,i,t)=>e.if((0,_t._)`${t} !== true`,()=>{i===!0?e.assign(t,!0):(e.assign(t,(0,_t._)`${t} || {}`),Up(e,t,i))}),mergeValues:(e,i)=>e===!0?!0:pe(pe({},e),i),resultToName:pw}),items:lw({mergeNames:(e,i,t)=>e.if((0,_t._)`${t} !== true && ${i} !== undefined`,()=>e.assign(t,(0,_t._)`${i} === true ? true : ${t} > ${i} ? ${t} : ${i}`)),mergeToName:(e,i,t)=>e.if((0,_t._)`${t} !== true`,()=>e.assign(t,i===!0?!0:(0,_t._)`${t} > ${i} ? ${t} : ${i}`)),mergeValues:(e,i)=>e===!0?!0:Math.max(e,i),resultToName:(e,i)=>e.var("items",i)})};function pw(e,i){if(i===!0)return e.var("props",!0);let t=e.var("props",(0,_t._)`{}`);return i!==void 0&&Up(e,t,i),t}Oe.evaluatedPropsToName=pw;function Up(e,i,t){Object.keys(t).forEach(s=>e.assign((0,_t._)`${i}${(0,_t.getProperty)(s)}`,!0))}Oe.setEvaluated=Up;var cw={};function NF(e,i){return e.scopeValue("func",{ref:i,code:cw[i.code]||(cw[i.code]=new xF._Code(i.code))})}Oe.useFunc=NF;var Bp=(function(e){return e[e.Num=0]="Num",e[e.Str=1]="Str",e})(Bp||(Oe.Type=Bp={}));function RF(e,i,t){if(e instanceof _t.Name){let s=i===Bp.Num;return t?s?(0,_t._)`"[" + ${e} + "]"`:(0,_t._)`"['" + ${e} + "']"`:s?(0,_t._)`"/" + ${e}`:(0,_t._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,_t.getProperty)(e).toString():"/"+Mp(e)}Oe.getErrorPath=RF;function mw(e,i,t=e.opts.strictSchema){if(t){if(i=`strict mode: ${i}`,t===!0)throw new Error(i);e.self.logger.warn(i)}}Oe.checkStrictMode=mw});var Ji=v(Fp=>{"use strict";Object.defineProperty(Fp,"__esModule",{value:!0});var Xt=we(),EF={data:new Xt.Name("data"),valCxt:new Xt.Name("valCxt"),instancePath:new Xt.Name("instancePath"),parentData:new Xt.Name("parentData"),parentDataProperty:new Xt.Name("parentDataProperty"),rootData:new Xt.Name("rootData"),dynamicAnchors:new Xt.Name("dynamicAnchors"),vErrors:new Xt.Name("vErrors"),errors:new Xt.Name("errors"),this:new Xt.Name("this"),self:new Xt.Name("self"),scope:new Xt.Name("scope"),json:new Xt.Name("json"),jsonPos:new Xt.Name("jsonPos"),jsonLen:new Xt.Name("jsonLen"),jsonPart:new Xt.Name("jsonPart")};Fp.default=EF});var _a=v(ei=>{"use strict";Object.defineProperty(ei,"__esModule",{value:!0});ei.extendErrors=ei.resetErrorsCount=ei.reportExtraError=ei.reportError=ei.keyword$DataError=ei.keywordError=void 0;var Ge=we(),ld=qe(),ui=Ji();ei.keywordError={message:({keyword:e})=>(0,Ge.str)`must pass "${e}" keyword validation`};ei.keyword$DataError={message:({keyword:e,schemaType:i})=>i?(0,Ge.str)`"${e}" keyword must be ${i} ($data)`:(0,Ge.str)`"${e}" keyword is invalid ($data)`};function BF(e,i=ei.keywordError,t,s){let{it:r}=e,{gen:o,compositeRule:l,allErrors:c}=r,u=fw(e,i,t);s??(l||c)?_w(o,u):hw(r,(0,Ge._)`[${u}]`)}ei.reportError=BF;function MF(e,i=ei.keywordError,t){let{it:s}=e,{gen:r,compositeRule:o,allErrors:l}=s,c=fw(e,i,t);_w(r,c),o||l||hw(s,ui.default.vErrors)}ei.reportExtraError=MF;function UF(e,i){e.assign(ui.default.errors,i),e.if((0,Ge._)`${ui.default.vErrors} !== null`,()=>e.if(i,()=>e.assign((0,Ge._)`${ui.default.vErrors}.length`,i),()=>e.assign(ui.default.vErrors,null)))}ei.resetErrorsCount=UF;function FF({gen:e,keyword:i,schemaValue:t,data:s,errsCount:r,it:o}){if(r===void 0)throw new Error("ajv implementation error");let l=e.name("err");e.forRange("i",r,ui.default.errors,c=>{e.const(l,(0,Ge._)`${ui.default.vErrors}[${c}]`),e.if((0,Ge._)`${l}.instancePath === undefined`,()=>e.assign((0,Ge._)`${l}.instancePath`,(0,Ge.strConcat)(ui.default.instancePath,o.errorPath))),e.assign((0,Ge._)`${l}.schemaPath`,(0,Ge.str)`${o.errSchemaPath}/${i}`),o.opts.verbose&&(e.assign((0,Ge._)`${l}.schema`,t),e.assign((0,Ge._)`${l}.data`,s))})}ei.extendErrors=FF;function _w(e,i){let t=e.const("err",i);e.if((0,Ge._)`${ui.default.vErrors} === null`,()=>e.assign(ui.default.vErrors,(0,Ge._)`[${t}]`),(0,Ge._)`${ui.default.vErrors}.push(${t})`),e.code((0,Ge._)`${ui.default.errors}++`)}function hw(e,i){let{gen:t,validateName:s,schemaEnv:r}=e;r.$async?t.throw((0,Ge._)`new ${e.ValidationError}(${i})`):(t.assign((0,Ge._)`${s}.errors`,i),t.return(!1))}var ao={keyword:new Ge.Name("keyword"),schemaPath:new Ge.Name("schemaPath"),params:new Ge.Name("params"),propertyName:new Ge.Name("propertyName"),message:new Ge.Name("message"),schema:new Ge.Name("schema"),parentSchema:new Ge.Name("parentSchema")};function fw(e,i,t){let{createErrors:s}=e.it;return s===!1?(0,Ge._)`{}`:OF(e,i,t)}function OF(e,i,t={}){let{gen:s,it:r}=e,o=[VF(r,t),qF(e,t)];return LF(e,i,o),s.object(...o)}function VF({errorPath:e},{instancePath:i}){let t=i?(0,Ge.str)`${e}${(0,ld.getErrorPath)(i,ld.Type.Str)}`:e;return[ui.default.instancePath,(0,Ge.strConcat)(ui.default.instancePath,t)]}function qF({keyword:e,it:{errSchemaPath:i}},{schemaPath:t,parentSchema:s}){let r=s?i:(0,Ge.str)`${i}/${e}`;return t&&(r=(0,Ge.str)`${r}${(0,ld.getErrorPath)(t,ld.Type.Str)}`),[ao.schemaPath,r]}function LF(e,{params:i,message:t},s){let{keyword:r,data:o,schemaValue:l,it:c}=e,{opts:u,propertyName:p,topSchemaRef:_,schemaPath:f}=c;s.push([ao.keyword,r],[ao.params,typeof i=="function"?i(e):i||(0,Ge._)`{}`]),u.messages&&s.push([ao.message,typeof t=="function"?t(e):t]),u.verbose&&s.push([ao.schema,l],[ao.parentSchema,(0,Ge._)`${_}${f}`],[ui.default.data,o]),p&&s.push([ao.propertyName,p])}});var yw=v(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.boolOrEmptySchema=Go.topBoolOrEmptySchema=void 0;var $F=_a(),KF=we(),GF=Ji(),WF={message:"boolean schema is false"};function YF(e){let{gen:i,schema:t,validateName:s}=e;t===!1?bw(e,!1):typeof t=="object"&&t.$async===!0?i.return(GF.default.data):(i.assign((0,KF._)`${s}.errors`,null),i.return(!0))}Go.topBoolOrEmptySchema=YF;function JF(e,i){let{gen:t,schema:s}=e;s===!1?(t.var(i,!1),bw(e)):t.var(i,!0)}Go.boolOrEmptySchema=JF;function bw(e,i){let{gen:t,data:s}=e,r={gen:t,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,$F.reportError)(r,WF,void 0,i)}});var Op=v(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});Wo.getRules=Wo.isJSONType=void 0;var ZF=["string","number","integer","boolean","null","object","array"],QF=new Set(ZF);function XF(e){return typeof e=="string"&&QF.has(e)}Wo.isJSONType=XF;function eO(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:Fe(pe({},e),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}Wo.getRules=eO});var Vp=v(zr=>{"use strict";Object.defineProperty(zr,"__esModule",{value:!0});zr.shouldUseRule=zr.shouldUseGroup=zr.schemaHasRulesForType=void 0;function tO({schema:e,self:i},t){let s=i.RULES.types[t];return s&&s!==!0&&vw(e,s)}zr.schemaHasRulesForType=tO;function vw(e,i){return i.rules.some(t=>ww(e,t))}zr.shouldUseGroup=vw;function ww(e,i){var t;return e[i.keyword]!==void 0||((t=i.definition.implements)===null||t===void 0?void 0:t.some(s=>e[s]!==void 0))}zr.shouldUseRule=ww});var ha=v(ti=>{"use strict";Object.defineProperty(ti,"__esModule",{value:!0});ti.reportTypeError=ti.checkDataTypes=ti.checkDataType=ti.coerceAndCheckDataType=ti.getJSONTypes=ti.getSchemaTypes=ti.DataType=void 0;var iO=Op(),sO=Vp(),rO=_a(),De=we(),kw=qe(),Yo=(function(e){return e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong",e})(Yo||(ti.DataType=Yo={}));function oO(e){let i=Hw(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}ti.getSchemaTypes=oO;function Hw(e){let i=Array.isArray(e)?e:e?[e]:[];if(i.every(iO.isJSONType))return i;throw new Error("type must be JSONType or JSONType[]: "+i.join(","))}ti.getJSONTypes=Hw;function nO(e,i){let{gen:t,data:s,opts:r}=e,o=aO(i,r.coerceTypes),l=i.length>0&&!(o.length===0&&i.length===1&&(0,sO.schemaHasRulesForType)(e,i[0]));if(l){let c=Lp(i,s,r.strictNumbers,Yo.Wrong);t.if(c,()=>{o.length?lO(e,i,o):$p(e)})}return l}ti.coerceAndCheckDataType=nO;var Sw=new Set(["string","number","integer","boolean","null"]);function aO(e,i){return i?e.filter(t=>Sw.has(t)||i==="array"&&t==="array"):[]}function lO(e,i,t){let{gen:s,data:r,opts:o}=e,l=s.let("dataType",(0,De._)`typeof ${r}`),c=s.let("coerced",(0,De._)`undefined`);o.coerceTypes==="array"&&s.if((0,De._)`${l} == 'object' && Array.isArray(${r}) && ${r}.length == 1`,()=>s.assign(r,(0,De._)`${r}[0]`).assign(l,(0,De._)`typeof ${r}`).if(Lp(i,r,o.strictNumbers),()=>s.assign(c,r))),s.if((0,De._)`${c} !== undefined`);for(let p of t)(Sw.has(p)||p==="array"&&o.coerceTypes==="array")&&u(p);s.else(),$p(e),s.endIf(),s.if((0,De._)`${c} !== undefined`,()=>{s.assign(r,c),cO(e,c)});function u(p){switch(p){case"string":s.elseIf((0,De._)`${l} == "number" || ${l} == "boolean"`).assign(c,(0,De._)`"" + ${r}`).elseIf((0,De._)`${r} === null`).assign(c,(0,De._)`""`);return;case"number":s.elseIf((0,De._)`${l} == "boolean" || ${r} === null
3
3
  || (${l} == "string" && ${r} && ${r} == +${r})`).assign(c,(0,De._)`+${r}`);return;case"integer":s.elseIf((0,De._)`${l} === "boolean" || ${r} === null
4
4
  || (${l} === "string" && ${r} && ${r} == +${r} && !(${r} % 1))`).assign(c,(0,De._)`+${r}`);return;case"boolean":s.elseIf((0,De._)`${r} === "false" || ${r} === 0 || ${r} === null`).assign(c,!1).elseIf((0,De._)`${r} === "true" || ${r} === 1`).assign(c,!0);return;case"null":s.elseIf((0,De._)`${r} === "" || ${r} === 0 || ${r} === false`),s.assign(c,null);return;case"array":s.elseIf((0,De._)`${l} === "string" || ${l} === "number"
@@ -1 +1 @@
1
- import{a as s}from"./chunk-NRHEAXPQ.js";import"./chunk-VUQTJ7DS.js";import"./chunk-PXOVSZTX.js";import"./chunk-PCFKF3RR.js";import"./chunk-YHD44ZXJ.js";import"./chunk-LZU5VVW4.js";import"./chunk-GHPOVWVP.js";import"./chunk-W22PNIOT.js";import{h as i}from"./chunk-O7FV4MLW.js";import"./chunk-T7I45MK4.js";import"./chunk-JTUZ5AFR.js";import{gb as t,la as e}from"./chunk-UUXRTS4O.js";var u=[{path:"",loadComponent:()=>import("./chunk-N257IGQY.js").then(o=>o.AccessoriesComponent)}],c=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=t({type:o});static \u0275inj=e({imports:[i.forChild(u),i]})}return o})();var l=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=t({type:o});static \u0275inj=e({imports:[s,c]})}return o})();export{l as AccessoriesModule};
1
+ import{a as s}from"./chunk-PVJ37WDV.js";import"./chunk-4OCEDS3F.js";import"./chunk-IHMPYUA6.js";import"./chunk-PCFKF3RR.js";import"./chunk-YHD44ZXJ.js";import"./chunk-LZU5VVW4.js";import"./chunk-UMGR23VE.js";import"./chunk-ZLQFHY4B.js";import{h as i}from"./chunk-O7FV4MLW.js";import"./chunk-YDGFXP6E.js";import"./chunk-67QLZ3WO.js";import{gb as t,la as e}from"./chunk-UUXRTS4O.js";var u=[{path:"",loadComponent:()=>import("./chunk-YXLKWAH5.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{e as n}from"./chunk-O7FV4MLW.js";import{b as s}from"./chunk-T7I45MK4.js";import{h as r,ka as o,pa as e,z as i}from"./chunk-UUXRTS4O.js";var l=(()=>{class t{$router=e(n);$settings=e(s);canActivate(){return r(this,null,function*(){return this.$settings.settingsLoaded||(yield i(this.$settings.onSettingsLoaded)),this.$settings.env.setupWizardComplete===!1||this.$router.navigate(["/"]),!0})}static \u0275fac=function(a){return new(a||t)};static \u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{l as a};
1
+ import{e as n}from"./chunk-O7FV4MLW.js";import{b as s}from"./chunk-YDGFXP6E.js";import{h as r,ka as o,pa as e,z as i}from"./chunk-UUXRTS4O.js";var l=(()=>{class t{$router=e(n);$settings=e(s);canActivate(){return r(this,null,function*(){return this.$settings.settingsLoaded||(yield i(this.$settings.onSettingsLoaded)),this.$settings.env.setupWizardComplete===!1||this.$router.navigate(["/"]),!0})}static \u0275fac=function(a){return new(a||t)};static \u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{l as a};
@@ -1 +1 @@
1
- import{b as H}from"./chunk-KSI5RFA4.js";import{a as L,b as S}from"./chunk-PCFKF3RR.js";import{m as T}from"./chunk-YHD44ZXJ.js";import{l as B}from"./chunk-JTUZ5AFR.js";import{$b as y,Ab as a,Bb as m,Kb as k,Na as f,Nb as b,Oa as O,Pb as d,Sa as o,ac as u,bc as I,cc as M,fb as v,kc as w,pa as h,rb as C,sb as r,tb as l,tc as g,ua as x,uc as _,va as P,yb as p,zb as i}from"./chunk-UUXRTS4O.js";function E(t,c){if(t&1&&m(0,"i",16),t&2){let n=d();y(w("fas ",n.faIconClass," mb-3"))}}function z(t,c){if(t&1&&m(0,"h5",6),t&2){let n=d();p("innerHTML",n.subtitle,f)}}function V(t,c){if(t&1&&m(0,"p",8),t&2){let n=d();p("innerHTML",n.message2,f)}}function D(t,c){if(t&1&&m(0,"markdown",9),t&2){let n=d();p("data",n.markdownMessage2)}}function N(t,c){if(t&1){let n=k();i(0,"button",17),g(1,"translate"),b("click",function(){x(n);let e=d();return P(e.dismissModal())}),u(2),g(3,"translate"),a()}t&2&&(C("aria-label",_(1,2,"form.button_close")),o(2),M(" ",_(3,4,"form.button_close")," "))}function j(t,c){if(t&1){let n=k();i(0,"button",17),g(1,"translate"),b("click",function(){x(n);let e=d();return P(e.dismissModal())}),u(2),g(3,"translate"),a()}t&2&&(C("aria-label",_(1,2,"form.button_close")),o(2),M(" ",_(3,4,"form.button_close")," "))}function A(t,c){if(t&1&&(i(0,"a",15),u(1),m(2,"i",18),a()),t&2){let n=d();p("href",n.ctaButtonLink,O),o(),M(" ",n.ctaButtonLabel," ")}}var X=(()=>{class t{$activeModal=h(T);title;subtitle;message;message2;ctaButtonLabel;ctaButtonLink;faIconClass;markdownMessage2;dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(s){return new(s||t)};static \u0275cmp=v({type:t,selectors:[["ng-component"]],inputs:{title:"title",subtitle:"subtitle",message:"message",message2:"message2",ctaButtonLabel:"ctaButtonLabel",ctaButtonLink:"ctaButtonLink",faIconClass:"faIconClass",markdownMessage2:"markdownMessage2"},decls:19,vars:12,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center"],[2,"font-size","75px",3,"class"],[1,"mb-3",3,"innerHTML"],[1,"mb-0",3,"innerHTML"],[1,"mb-0","mt-3",3,"innerHTML"],[1,"plugin-md",3,"data"],[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"],["target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","text-decoration-none",3,"href"],[2,"font-size","75px"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"fas","fa-external-link-alt"]],template:function(s,e){s&1&&(i(0,"div",0)(1,"div",1)(2,"h5",2),u(3),a(),i(4,"button",3),g(5,"translate"),b("click",function(){return e.dismissModal()}),a()(),i(6,"div",4),r(7,E,1,3,"i",5),r(8,z,1,1,"h5",6),m(9,"p",7),r(10,V,1,1,"p",8),r(11,D,1,1,"markdown",9),a(),i(12,"div",10)(13,"div",11),r(14,N,4,6,"button",12),a(),i(15,"div",13),r(16,j,4,6,"button",12),a(),i(17,"div",14),r(18,A,3,2,"a",15),a()()()),s&2&&(o(3),I(e.title),o(),C("aria-label",_(5,10,"form.button_close")),o(3),l(e.faIconClass?7:-1),o(),l(e.subtitle?8:-1),o(),p("innerHTML",e.message,f),o(),l(e.message2?10:-1),o(),l(e.markdownMessage2?11:-1),o(3),l(e.ctaButtonLink?14:-1),o(2),l(e.ctaButtonLink?-1:16),o(2),l(e.ctaButtonLink?18:-1))},dependencies:[S,L,H,B],styles:["[_nghost-%COMP%] .plugin-md{display:block!important;background-color:#f6f8fa!important;border-radius:6px!important;padding:16px!important;margin:16px auto!important;width:100%!important;max-width:632px!important}[_nghost-%COMP%] .plugin-md table{width:100%;max-width:600px;margin:0 auto!important;border-collapse:collapse;border:1px solid #d0d7de!important;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif!important;font-size:14px!important;color:#24292e!important}[_nghost-%COMP%] .plugin-md th, [_nghost-%COMP%] .plugin-md td{padding:6px 13px!important;border:1px solid #d0d7de!important;text-align:left;color:#24292e!important}[_nghost-%COMP%] .plugin-md th{background-color:#f6f8fa!important;font-weight:600!important;text-align:center!important}[_nghost-%COMP%] .plugin-md td[align=center]{text-align:center!important}[_nghost-%COMP%] .plugin-md tr{color:#24292e!important}[_nghost-%COMP%] .plugin-md tr:nth-child(odd){background-color:#fff!important}[_nghost-%COMP%] .plugin-md tr:nth-child(2n){background-color:#f6f8fa!important}[_nghost-%COMP%] .plugin-md tr:hover{background-color:#f0f2f5!important}[_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%]{background-color:#2b2b2b!important;color:#fff!important}[_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] table[_ngcontent-%COMP%], [_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] tr[_ngcontent-%COMP%], [_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] th[_ngcontent-%COMP%], [_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{color:#fff!important}[_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#3c3c3c!important}[_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(odd){background-color:#323232!important}[_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#2b2b2b!important}[_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background-color:#454545!important}"]})}return t})();export{X as a};
1
+ import{b as H}from"./chunk-KSI5RFA4.js";import{a as L,b as S}from"./chunk-PCFKF3RR.js";import{m as T}from"./chunk-YHD44ZXJ.js";import{l as B}from"./chunk-67QLZ3WO.js";import{$b as y,Ab as a,Bb as m,Kb as k,Na as f,Nb as b,Oa as O,Pb as d,Sa as o,ac as u,bc as I,cc as M,fb as v,kc as w,pa as h,rb as C,sb as r,tb as l,tc as g,ua as x,uc as _,va as P,yb as p,zb as i}from"./chunk-UUXRTS4O.js";function E(t,c){if(t&1&&m(0,"i",16),t&2){let n=d();y(w("fas ",n.faIconClass," mb-3"))}}function z(t,c){if(t&1&&m(0,"h5",6),t&2){let n=d();p("innerHTML",n.subtitle,f)}}function V(t,c){if(t&1&&m(0,"p",8),t&2){let n=d();p("innerHTML",n.message2,f)}}function D(t,c){if(t&1&&m(0,"markdown",9),t&2){let n=d();p("data",n.markdownMessage2)}}function N(t,c){if(t&1){let n=k();i(0,"button",17),g(1,"translate"),b("click",function(){x(n);let e=d();return P(e.dismissModal())}),u(2),g(3,"translate"),a()}t&2&&(C("aria-label",_(1,2,"form.button_close")),o(2),M(" ",_(3,4,"form.button_close")," "))}function j(t,c){if(t&1){let n=k();i(0,"button",17),g(1,"translate"),b("click",function(){x(n);let e=d();return P(e.dismissModal())}),u(2),g(3,"translate"),a()}t&2&&(C("aria-label",_(1,2,"form.button_close")),o(2),M(" ",_(3,4,"form.button_close")," "))}function A(t,c){if(t&1&&(i(0,"a",15),u(1),m(2,"i",18),a()),t&2){let n=d();p("href",n.ctaButtonLink,O),o(),M(" ",n.ctaButtonLabel," ")}}var X=(()=>{class t{$activeModal=h(T);title;subtitle;message;message2;ctaButtonLabel;ctaButtonLink;faIconClass;markdownMessage2;dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(s){return new(s||t)};static \u0275cmp=v({type:t,selectors:[["ng-component"]],inputs:{title:"title",subtitle:"subtitle",message:"message",message2:"message2",ctaButtonLabel:"ctaButtonLabel",ctaButtonLink:"ctaButtonLink",faIconClass:"faIconClass",markdownMessage2:"markdownMessage2"},decls:19,vars:12,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center"],[2,"font-size","75px",3,"class"],[1,"mb-3",3,"innerHTML"],[1,"mb-0",3,"innerHTML"],[1,"mb-0","mt-3",3,"innerHTML"],[1,"plugin-md",3,"data"],[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"],["target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","text-decoration-none",3,"href"],[2,"font-size","75px"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"fas","fa-external-link-alt"]],template:function(s,e){s&1&&(i(0,"div",0)(1,"div",1)(2,"h5",2),u(3),a(),i(4,"button",3),g(5,"translate"),b("click",function(){return e.dismissModal()}),a()(),i(6,"div",4),r(7,E,1,3,"i",5),r(8,z,1,1,"h5",6),m(9,"p",7),r(10,V,1,1,"p",8),r(11,D,1,1,"markdown",9),a(),i(12,"div",10)(13,"div",11),r(14,N,4,6,"button",12),a(),i(15,"div",13),r(16,j,4,6,"button",12),a(),i(17,"div",14),r(18,A,3,2,"a",15),a()()()),s&2&&(o(3),I(e.title),o(),C("aria-label",_(5,10,"form.button_close")),o(3),l(e.faIconClass?7:-1),o(),l(e.subtitle?8:-1),o(),p("innerHTML",e.message,f),o(),l(e.message2?10:-1),o(),l(e.markdownMessage2?11:-1),o(3),l(e.ctaButtonLink?14:-1),o(2),l(e.ctaButtonLink?-1:16),o(2),l(e.ctaButtonLink?18:-1))},dependencies:[S,L,H,B],styles:["[_nghost-%COMP%] .plugin-md{display:block!important;background-color:#f6f8fa!important;border-radius:6px!important;padding:16px!important;margin:16px auto!important;width:100%!important;max-width:632px!important}[_nghost-%COMP%] .plugin-md table{width:100%;max-width:600px;margin:0 auto!important;border-collapse:collapse;border:1px solid #d0d7de!important;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif!important;font-size:14px!important;color:#24292e!important}[_nghost-%COMP%] .plugin-md th, [_nghost-%COMP%] .plugin-md td{padding:6px 13px!important;border:1px solid #d0d7de!important;text-align:left;color:#24292e!important}[_nghost-%COMP%] .plugin-md th{background-color:#f6f8fa!important;font-weight:600!important;text-align:center!important}[_nghost-%COMP%] .plugin-md td[align=center]{text-align:center!important}[_nghost-%COMP%] .plugin-md tr{color:#24292e!important}[_nghost-%COMP%] .plugin-md tr:nth-child(odd){background-color:#fff!important}[_nghost-%COMP%] .plugin-md tr:nth-child(2n){background-color:#f6f8fa!important}[_nghost-%COMP%] .plugin-md tr:hover{background-color:#f0f2f5!important}[_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%]{background-color:#2b2b2b!important;color:#fff!important}[_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] table[_ngcontent-%COMP%], [_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] tr[_ngcontent-%COMP%], [_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] th[_ngcontent-%COMP%], [_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{color:#fff!important}[_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#3c3c3c!important}[_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(odd){background-color:#323232!important}[_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#2b2b2b!important}[_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background-color:#454545!important}"]})}return t})();export{X as a};
@@ -1 +1 @@
1
- import{c as t}from"./chunk-VUQTJ7DS.js";import{b as i}from"./chunk-PCFKF3RR.js";import{gb as r,la as o}from"./chunk-UUXRTS4O.js";var f=(()=>{class e{static \u0275fac=function(s){return new(s||e)};static \u0275mod=r({type:e});static \u0275inj=o({providers:[t],imports:[i]})}return e})();export{f as a};
1
+ import{c as t}from"./chunk-4OCEDS3F.js";import{b as i}from"./chunk-PCFKF3RR.js";import{gb as r,la as o}from"./chunk-UUXRTS4O.js";var f=(()=>{class e{static \u0275fac=function(s){return new(s||e)};static \u0275mod=r({type:e});static \u0275inj=o({providers:[t],imports:[i]})}return e})();export{f as a};
@@ -1,2 +1,2 @@
1
- import{C as Y,D as Z,c as G,d as k,e as j,f as D,g as K,j as $,m as A,q as J,r as Q,y as X}from"./chunk-LZU5VVW4.js";import{a as ae}from"./chunk-GHPOVWVP.js";import{b as oe}from"./chunk-W22PNIOT.js";import{b as re}from"./chunk-T7I45MK4.js";import{k as ee,l as te,n as ie,p as U,q as ne}from"./chunk-JTUZ5AFR.js";import{Ab as r,Bb as u,Kb as I,Na as W,Nb as x,Pb as g,Rc as H,Sa as n,Tc as N,Zb as O,ac as l,bc as _,bd as R,cc as f,fb as V,h as S,mc as L,nc as B,nd as q,oc as E,pa as w,rb as M,sb as z,tb as T,tc as a,ua as C,uc as s,va as b,yb as m,z as h,zb as o}from"./chunk-UUXRTS4O.js";var pe=t=>({background:t}),de=t=>({anim:t}),ce=t=>({"progress-bar-animated":t}),me=()=>["restoring","restarting","restore-complete"],P=(t,d)=>({"is-valid":t,"is-invalid":d});function ue(t,d){if(t&1){let e=I();o(0,"div",5)(1,"h4",6),l(2),a(3,"translate"),r(),u(4,"div",7),a(5,"translate"),o(6,"button",8),x("click",function(){C(e);let i=g();return b(i.onClickGettingStarted())}),l(7),a(8,"translate"),r(),o(9,"a",9),x("click",function(){C(e);let i=g();return b(i.onClickRestoreBackup())}),l(10),a(11,"translate"),r()()}t&2&&(n(2),_(s(3,4,"setup.welcome_to_homebridge")),n(2),m("innerHTML",s(5,6,"setup.intro"),W),n(3),f(" ",s(8,8,"setup.button_get_started")," "),n(3),_(s(11,10,"setup_wizard_restore")))}function ge(t,d){if(t&1){let e=I();o(0,"div",5)(1,"h4",6),l(2),a(3,"translate"),r(),o(4,"div",10),l(5),a(6,"translate"),r(),o(7,"div",11)(8,"form",12),x("ngSubmit",function(){C(e);let i=g();return b(i.createFirstUser())}),o(9,"div",13)(10,"span",14),u(11,"i",15),r(),u(12,"input",16),a(13,"translate"),r(),o(14,"div",13)(15,"span",14),u(16,"i",17),r(),u(17,"input",18),a(18,"translate"),r(),o(19,"div",13)(20,"span",14),u(21,"i",17),r(),u(22,"input",19),a(23,"translate"),r(),o(24,"div",20)(25,"button",21),x("click",function(){C(e);let i=g();return b(i.onClickCancelRestore())}),l(26),a(27,"translate"),r(),o(28,"button",22),l(29),a(30,"translate"),r()()()()()}if(t&2){let e=g();n(2),_(s(3,16,"setup.create_account")),n(3),_(s(6,18,"setup_wizard_create_info")),n(3),m("formGroup",e.createUserForm),n(4),m("readonly",e.loading)("ngClass",E(30,P,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.valid,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.invalid))("placeholder",s(13,20,"users.label_username")),n(5),m("readonly",e.loading)("ngClass",E(33,P,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.valid,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.errors))("placeholder",s(18,22,"users.label_password")),n(5),m("readonly",e.loading)("ngClass",E(36,P,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.valid,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.errors))("placeholder",s(23,24,"users.label_confirm_password")),n(3),m("disabled",e.restoreUploading),n(),f(" ",s(27,26,"form.button_back")," "),n(2),m("disabled",e.createUserForm.invalid||e.loading),n(),f(" ",s(30,28,"form.button_continue")," ")}}function _e(t,d){t&1&&(u(0,"i",25),l(1),a(2,"translate")),t&2&&(n(),f(" ",s(2,1,"backup.label_uploading")," "))}function fe(t,d){t&1&&(l(0),a(1,"translate")),t&2&&f(" ",s(1,1,"form.button_continue")," ")}function he(t,d){if(t&1){let e=I();o(0,"div",5)(1,"h4",6),l(2),a(3,"translate"),r(),o(4,"div",10),l(5),a(6,"translate"),r(),o(7,"input",23),x("change",function(i){C(e);let F=g();return b(F.handleRestoreFileInput(i.target.files))}),r(),o(8,"div",20)(9,"button",21),x("click",function(){C(e);let i=g();return b(i.onClickCancelRestore())}),l(10),a(11,"translate"),r(),o(12,"button",24),x("click",function(){C(e);let i=g();return b(i.onRestoreBackupClick())}),z(13,_e,3,3)(14,fe,2,3),r()()()}if(t&2){let e=g();n(2),_(s(3,6,"setup_wizard_restore")),n(3),_(s(6,8,"backup.restore_help_one")),n(4),m("disabled",e.restoreUploading),n(),f(" ",s(11,10,"form.button_back")," "),n(2),m("disabled",e.restoreUploading||!e.selectedFile),n(),T(e.restoreUploading?13:14)}}function we(t,d){t&1&&(l(0),a(1,"translate")),t&2&&f(" ",s(1,1,"setup_wizard_restoring")," ")}function Ce(t,d){t&1&&(l(0),a(1,"translate")),t&2&&f(" ",s(1,1,"setup_wizard_starting")," ")}function be(t,d){t&1&&(l(0),a(1,"translate")),t&2&&f(" ",s(1,1,"setup_wizard_complete")," ")}function xe(t,d){t&1&&(o(0,"a",27),l(1),a(2,"translate"),r()),t&2&&(n(),_(s(2,1,"form.button_continue")))}function ve(t,d){if(t&1&&(o(0,"div",5)(1,"h4",6),z(2,we,2,3)(3,Ce,2,3)(4,be,2,3),r(),u(5,"div",26),z(6,xe,3,3,"a",27),r()),t&2){let e=g();n(2),T(e.step==="restoring"?2:e.step==="restarting"?3:e.step==="restore-complete"?4:-1),n(4),T(e.step==="restore-complete"?6:-1)}}function ye(t,d){t&1&&(o(0,"div",5)(1,"h4",28),l(2),a(3,"translate"),r(),o(4,"div",10),l(5),a(6,"translate"),r(),o(7,"a",29),l(8),a(9,"translate"),r()()),t&2&&(n(2),_(s(3,3,"setup_wizard_complete_title")),n(3),_(s(6,5,"setup_wizard_completed")),n(3),_(s(9,7,"form.button_continue")))}var He=(()=>{class t{$api=w(ne);$auth=w(oe);$settings=w(re);$title=w(q);$toastr=w(ie);$translate=w(ee);$ws=w(ae);io;step="welcome";backgroundStyle;progress=1;restoreInProgress=!1;restoreStarted=!1;restoreFailed=!1;loading=!1;selectedFile;restoreUploading=!1;createUserForm=new K({username:new $("",[k.required]),password:new $("",[k.compose([k.required,k.minLength(4)])]),passwordConfirm:new $("",[k.required])},this.matchPassword);ngOnInit(){return S(this,null,function*(){this.$title.setTitle(this.$translate.instant("setup_wizard_page_title")),yield this.setBackground()})}onClickGettingStarted(){this.step="create-account",this.progress=50}onClickRestoreBackup(){this.step="restore-backup",this.progress=20}onClickCancelRestore(){this.selectedFile=null,this.step="welcome",this.progress=1}createFirstUser(){return S(this,null,function*(){this.loading=!0,this.progress=75;let e=this.createUserForm.getRawValue();e.name=e.username;try{yield h(this.$api.post("/setup-wizard/create-first-user",e)),this.$settings.env.setupWizardComplete=!0,this.progress=100,this.loading=!1,yield this.$auth.login({username:e.username,password:e.password}),this.step="setup-complete"}catch(p){this.loading=!1,this.progress=50,console.error(p),this.$toastr.error(p.message,this.$translate.instant("toast.title_error"))}})}handleRestoreFileInput(e){e.length?(this.selectedFile=e[0],this.progress=40):(delete this.selectedFile,this.progress=20)}onRestoreBackupClick(){return S(this,null,function*(){this.restoreUploading=!0,this.step="restoring",this.progress=60;try{let e=yield h(this.$api.get("/setup-wizard/get-setup-wizard-token"));window.localStorage.setItem(U.jwt.tokenKey,e.access_token),this.$auth.token=e.access_token,this.progress=65;let p=new FormData;p.append("restoreArchive",this.selectedFile,this.selectedFile.name),yield h(this.$api.post("/backup/restore",p)),this.progress=70,this.io=this.$ws.connectToNamespace("backup");let i=document.getElementById("output");this.io.socket.on("stdout",c=>{c.split(`
1
+ import{C as Y,D as Z,c as G,d as k,e as j,f as D,g as K,j as $,m as A,q as J,r as Q,y as X}from"./chunk-LZU5VVW4.js";import{a as ae}from"./chunk-UMGR23VE.js";import{b as oe}from"./chunk-ZLQFHY4B.js";import{b as re}from"./chunk-YDGFXP6E.js";import{k as ee,l as te,n as ie,p as U,q as ne}from"./chunk-67QLZ3WO.js";import{Ab as r,Bb as u,Kb as I,Na as W,Nb as x,Pb as g,Rc as H,Sa as n,Tc as N,Zb as O,ac as l,bc as _,bd as R,cc as f,fb as V,h as S,mc as L,nc as B,nd as q,oc as E,pa as w,rb as M,sb as z,tb as T,tc as a,ua as C,uc as s,va as b,yb as m,z as h,zb as o}from"./chunk-UUXRTS4O.js";var pe=t=>({background:t}),de=t=>({anim:t}),ce=t=>({"progress-bar-animated":t}),me=()=>["restoring","restarting","restore-complete"],P=(t,d)=>({"is-valid":t,"is-invalid":d});function ue(t,d){if(t&1){let e=I();o(0,"div",5)(1,"h4",6),l(2),a(3,"translate"),r(),u(4,"div",7),a(5,"translate"),o(6,"button",8),x("click",function(){C(e);let i=g();return b(i.onClickGettingStarted())}),l(7),a(8,"translate"),r(),o(9,"a",9),x("click",function(){C(e);let i=g();return b(i.onClickRestoreBackup())}),l(10),a(11,"translate"),r()()}t&2&&(n(2),_(s(3,4,"setup.welcome_to_homebridge")),n(2),m("innerHTML",s(5,6,"setup.intro"),W),n(3),f(" ",s(8,8,"setup.button_get_started")," "),n(3),_(s(11,10,"setup_wizard_restore")))}function ge(t,d){if(t&1){let e=I();o(0,"div",5)(1,"h4",6),l(2),a(3,"translate"),r(),o(4,"div",10),l(5),a(6,"translate"),r(),o(7,"div",11)(8,"form",12),x("ngSubmit",function(){C(e);let i=g();return b(i.createFirstUser())}),o(9,"div",13)(10,"span",14),u(11,"i",15),r(),u(12,"input",16),a(13,"translate"),r(),o(14,"div",13)(15,"span",14),u(16,"i",17),r(),u(17,"input",18),a(18,"translate"),r(),o(19,"div",13)(20,"span",14),u(21,"i",17),r(),u(22,"input",19),a(23,"translate"),r(),o(24,"div",20)(25,"button",21),x("click",function(){C(e);let i=g();return b(i.onClickCancelRestore())}),l(26),a(27,"translate"),r(),o(28,"button",22),l(29),a(30,"translate"),r()()()()()}if(t&2){let e=g();n(2),_(s(3,16,"setup.create_account")),n(3),_(s(6,18,"setup_wizard_create_info")),n(3),m("formGroup",e.createUserForm),n(4),m("readonly",e.loading)("ngClass",E(30,P,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.valid,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.invalid))("placeholder",s(13,20,"users.label_username")),n(5),m("readonly",e.loading)("ngClass",E(33,P,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.valid,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.errors))("placeholder",s(18,22,"users.label_password")),n(5),m("readonly",e.loading)("ngClass",E(36,P,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.valid,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.errors))("placeholder",s(23,24,"users.label_confirm_password")),n(3),m("disabled",e.restoreUploading),n(),f(" ",s(27,26,"form.button_back")," "),n(2),m("disabled",e.createUserForm.invalid||e.loading),n(),f(" ",s(30,28,"form.button_continue")," ")}}function _e(t,d){t&1&&(u(0,"i",25),l(1),a(2,"translate")),t&2&&(n(),f(" ",s(2,1,"backup.label_uploading")," "))}function fe(t,d){t&1&&(l(0),a(1,"translate")),t&2&&f(" ",s(1,1,"form.button_continue")," ")}function he(t,d){if(t&1){let e=I();o(0,"div",5)(1,"h4",6),l(2),a(3,"translate"),r(),o(4,"div",10),l(5),a(6,"translate"),r(),o(7,"input",23),x("change",function(i){C(e);let F=g();return b(F.handleRestoreFileInput(i.target.files))}),r(),o(8,"div",20)(9,"button",21),x("click",function(){C(e);let i=g();return b(i.onClickCancelRestore())}),l(10),a(11,"translate"),r(),o(12,"button",24),x("click",function(){C(e);let i=g();return b(i.onRestoreBackupClick())}),z(13,_e,3,3)(14,fe,2,3),r()()()}if(t&2){let e=g();n(2),_(s(3,6,"setup_wizard_restore")),n(3),_(s(6,8,"backup.restore_help_one")),n(4),m("disabled",e.restoreUploading),n(),f(" ",s(11,10,"form.button_back")," "),n(2),m("disabled",e.restoreUploading||!e.selectedFile),n(),T(e.restoreUploading?13:14)}}function we(t,d){t&1&&(l(0),a(1,"translate")),t&2&&f(" ",s(1,1,"setup_wizard_restoring")," ")}function Ce(t,d){t&1&&(l(0),a(1,"translate")),t&2&&f(" ",s(1,1,"setup_wizard_starting")," ")}function be(t,d){t&1&&(l(0),a(1,"translate")),t&2&&f(" ",s(1,1,"setup_wizard_complete")," ")}function xe(t,d){t&1&&(o(0,"a",27),l(1),a(2,"translate"),r()),t&2&&(n(),_(s(2,1,"form.button_continue")))}function ve(t,d){if(t&1&&(o(0,"div",5)(1,"h4",6),z(2,we,2,3)(3,Ce,2,3)(4,be,2,3),r(),u(5,"div",26),z(6,xe,3,3,"a",27),r()),t&2){let e=g();n(2),T(e.step==="restoring"?2:e.step==="restarting"?3:e.step==="restore-complete"?4:-1),n(4),T(e.step==="restore-complete"?6:-1)}}function ye(t,d){t&1&&(o(0,"div",5)(1,"h4",28),l(2),a(3,"translate"),r(),o(4,"div",10),l(5),a(6,"translate"),r(),o(7,"a",29),l(8),a(9,"translate"),r()()),t&2&&(n(2),_(s(3,3,"setup_wizard_complete_title")),n(3),_(s(6,5,"setup_wizard_completed")),n(3),_(s(9,7,"form.button_continue")))}var He=(()=>{class t{$api=w(ne);$auth=w(oe);$settings=w(re);$title=w(q);$toastr=w(ie);$translate=w(ee);$ws=w(ae);io;step="welcome";backgroundStyle;progress=1;restoreInProgress=!1;restoreStarted=!1;restoreFailed=!1;loading=!1;selectedFile;restoreUploading=!1;createUserForm=new K({username:new $("",[k.required]),password:new $("",[k.compose([k.required,k.minLength(4)])]),passwordConfirm:new $("",[k.required])},this.matchPassword);ngOnInit(){return S(this,null,function*(){this.$title.setTitle(this.$translate.instant("setup_wizard_page_title")),yield this.setBackground()})}onClickGettingStarted(){this.step="create-account",this.progress=50}onClickRestoreBackup(){this.step="restore-backup",this.progress=20}onClickCancelRestore(){this.selectedFile=null,this.step="welcome",this.progress=1}createFirstUser(){return S(this,null,function*(){this.loading=!0,this.progress=75;let e=this.createUserForm.getRawValue();e.name=e.username;try{yield h(this.$api.post("/setup-wizard/create-first-user",e)),this.$settings.env.setupWizardComplete=!0,this.progress=100,this.loading=!1,yield this.$auth.login({username:e.username,password:e.password}),this.step="setup-complete"}catch(p){this.loading=!1,this.progress=50,console.error(p),this.$toastr.error(p.message,this.$translate.instant("toast.title_error"))}})}handleRestoreFileInput(e){e.length?(this.selectedFile=e[0],this.progress=40):(delete this.selectedFile,this.progress=20)}onRestoreBackupClick(){return S(this,null,function*(){this.restoreUploading=!0,this.step="restoring",this.progress=60;try{let e=yield h(this.$api.get("/setup-wizard/get-setup-wizard-token"));window.localStorage.setItem(U.jwt.tokenKey,e.access_token),this.$auth.token=e.access_token,this.progress=65;let p=new FormData;p.append("restoreArchive",this.selectedFile,this.selectedFile.name),yield h(this.$api.post("/backup/restore",p)),this.progress=70,this.io=this.$ws.connectToNamespace("backup");let i=document.getElementById("output");this.io.socket.on("stdout",c=>{c.split(`
2
2
  \r`).forEach(v=>{if(v&&!/^[⠇⠏⠋⠙⠹⠸]+$/.test(v)){let y=document.createElement("div"),le=/\x1B\[(\d{1,2}(;\d{1,2})?)?[mGK]/g;y.innerHTML=v.replace(le,""),v.includes("[0;31m")?y.classList.add("red-text"):v.includes("[0;32m")?y.classList.add("green-text"):v.includes("[0;33m")?y.classList.add("orange-text"):v.includes("[0;36m")&&y.classList.add("cyan-text"),i.appendChild(y),i.scrollTop=i.scrollHeight}})}),this.restoreStarted=!0,this.restoreInProgress=!0,this.progress=75,yield h(this.io.request("do-restore")),this.progress=80,this.restoreInProgress=!1,yield h(this.$api.put("/backup/restart",{})),this.step="restarting",this.progress=85,window.localStorage.removeItem(U.jwt.tokenKey),this.$auth.token=null;let F=document.createElement("div");F.classList.add("orange-text"),F.innerHTML="Starting Homebridge, please wait...",i.appendChild(F),i.scrollTop=i.scrollHeight,yield new Promise(c=>setTimeout(c,3e3)),this.progress=88,yield new Promise(c=>setTimeout(c,3e3)),this.progress=91,yield new Promise(c=>setTimeout(c,3e3)),this.progress=94,yield new Promise(c=>setTimeout(c,3e3)),this.progress=97,yield new Promise(c=>setTimeout(c,3e3)),this.progress=99;let se=setInterval(()=>S(this,null,function*(){try{yield h(this.$api.get("/auth/settings")),clearInterval(se),this.progress=100,this.restoreUploading=!1,this.step="restore-complete"}catch{}}),1e3)}catch(e){console.error(e),this.restoreUploading=!1,this.restoreFailed=!0,this.progress=20,this.step="restore-backup",this.$toastr.error(e.message,this.$translate.instant("toast.title_error"))}finally{this.io&&this.io.end()}})}setBackground(){return S(this,null,function*(){if(this.$settings.settingsLoaded||(yield h(this.$settings.onSettingsLoaded)),this.$settings.env.customWallpaperHash){let e=`${U.api.base}/auth/wallpaper/${this.$settings.env.customWallpaperHash}`;this.backgroundStyle=`url('${e}') center/cover`}})}matchPassword(e){let p=e.get("password").value,i=e.get("passwordConfirm").value;if(p!==i)e.get("passwordConfirm").setErrors({matchPassword:!0});else return null}static \u0275fac=function(p){return new(p||t)};static \u0275cmp=V({type:t,selectors:[["ng-component"]],decls:10,vars:14,consts:[[1,"setup-container","gradient","d-flex","align-items-start","justify-content-center",3,"ngStyle","ngClass"],[1,"w-100","setup-card","d-flex","py-4","flex-column"],["ngSrc","assets/homebridge-color-round.svg","alt","Homebridge Logo","height","100","width","100","priority","true",1,"homebridge-logo","mx-auto","my-3"],[1,"progress","w-100","my-4"],["role","progressbar","aria-valuemin","0","aria-valuemax","100",1,"progress-bar","progress-bar-striped","bg-success",3,"ngClass"],[1,"w-100","d-flex","flex-column","align-items-center","mb-2"],[1,"mb-3","text-center"],[1,"mb-4","small","grey-text","text-center",3,"innerHTML"],["type","button",1,"btn","btn-lg","btn-primary","mb-4",3,"click"],["href","javascript:void(0)",1,"grey-text",3,"click"],[1,"mb-4","small","grey-text","text-center"],[1,"w-100"],["novalidate","",3,"ngSubmit","formGroup"],[1,"input-group","mb-4"],[1,"input-group-text","custom-input"],[1,"fas","fa-user","primary-text","fa-lg"],["formControlName","username","type","text","id","form-username","autocomplete","username","autocapitalize","none","tabindex","1","required","",1,"form-control","custom-input",3,"readonly","ngClass","placeholder"],[1,"fas","fa-lock","primary-text","fa-lg"],["formControlName","password","type","password","id","form-pass","autocomplete","new-password","tabindex","2","required","",1,"form-control","custom-input",3,"readonly","ngClass","placeholder"],["formControlName","passwordConfirm","type","password","id","form-pass-confirm","autocomplete","new-password","tabindex","2","required","",1,"form-control","custom-input",3,"readonly","ngClass","placeholder"],[1,"mt-3","w-100","d-flex","justify-content-between"],["type","button",1,"btn","btn-elegant","ms-0",3,"click","disabled"],["type","submit",1,"btn","btn-primary",3,"disabled"],["type","file","id","restoreFileUpload","accept","application/gzip, .gz",1,"form-control","custom-input","mb-3",3,"change"],["type","button",1,"btn","btn-primary","me-0",3,"click","disabled"],[1,"fas","fa-circle-notch","fa-spin"],["id","output",1,"font-monospace","small","alert","alert-info","w-100","text-start","mt-1","mb-0"],["href","/login",1,"btn","btn-lg","btn-primary","mt-4"],[1,"mb-3"],["href","/",1,"btn","btn-lg","btn-primary"]],template:function(p,i){p&1&&(o(0,"div",0)(1,"div",1),u(2,"img",2),o(3,"div",3),u(4,"div",4),r(),z(5,ue,12,12,"div",5)(6,ge,31,39,"div",5)(7,he,15,12,"div",5)(8,ve,7,2,"div",5)(9,ye,10,9,"div",5),r()()),p&2&&(m("ngStyle",B(7,pe,i.backgroundStyle))("ngClass",B(9,de,!i.backgroundStyle)),n(4),O("width",i.progress+"%"),m("ngClass",B(11,ce,i.loading||i.restoreUploading)),M("aria-valuenow",i.progress),n(),T(i.step==="welcome"?5:i.step==="create-account"?6:i.step==="restore-backup"?7:L(13,me).includes(i.step)?8:i.step==="setup-complete"?9:-1))},dependencies:[H,R,Y,A,G,j,D,X,Z,J,Q,N,te],styles:["body{overflow:scroll!important} body.dark-mode .setup-card{background-color:#2b2b2b;color:#fff}.setup-container[_ngcontent-%COMP%]{z-index:-1;padding-top:2em;padding-bottom:2em;min-height:100%;background-size:300% 300%}.anim[_ngcontent-%COMP%]{-webkit-animation:_ngcontent-%COMP%_gradient 20s ease infinite;-moz-animation:gradient 20s ease infinite;-o-animation:gradient 20s ease infinite;animation:_ngcontent-%COMP%_gradient 20s ease infinite}@keyframes _ngcontent-%COMP%_gradient{0%{background-position:0 50%}50%{background-position:100% 50%}to{background-position:0 50%}}.setup-card[_ngcontent-%COMP%]{max-width:550px;border-radius:1rem;padding-right:25px;padding-left:25px;background-color:#ffffffe6}.setup-card[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus{background-color:inherit!important}@media screen and (max-width: 575px){.setup-card[_ngcontent-%COMP%]{margin-left:1em;margin-right:1em}}.homebridge-logo[_ngcontent-%COMP%]{margin-bottom:10px}.progress[_ngcontent-%COMP%]{background-color:#ddd}#output[_ngcontent-%COMP%]{height:200px;overflow-y:scroll;white-space:pre-wrap}"]})}return t})();export{He as SetupWizardComponent};