homebridge-config-ui-x 5.11.3-beta.2 → 5.11.3-beta.3
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.
- package/CHANGELOG.md +1 -0
- package/package.json +1 -1
- package/public/{chunk-QUCEBTIT.js → chunk-22BTN37P.js} +1 -1
- package/public/{chunk-KEXB6TO7.js → chunk-2RC4SPAD.js} +1 -1
- package/public/{chunk-4Y2NWYII.js → chunk-3AS73KCY.js} +1 -1
- package/public/{chunk-ZPBL6WDZ.js → chunk-42IK7XM5.js} +1 -1
- package/public/{chunk-FXBJ5UCX.js → chunk-57FBR5IE.js} +1 -1
- package/public/{chunk-YCBALV2Q.js → chunk-5RADRGSN.js} +1 -1
- package/public/{chunk-X3GZQLT4.js → chunk-6CHQHDTZ.js} +1 -1
- package/public/{chunk-3UG6HSNY.js → chunk-6GBGJ2EL.js} +1 -1
- package/public/{chunk-5GSKDXQP.js → chunk-6XNXZZ5K.js} +1 -1
- package/public/{chunk-B34OVWWD.js → chunk-73TJBNM5.js} +1 -1
- package/public/{chunk-SUJTXS2Y.js → chunk-7NROXTSH.js} +1 -1
- package/public/{chunk-KZZ7LQUE.js → chunk-AYCIMHEU.js} +1 -1
- package/public/{chunk-S6KS23HV.js → chunk-B56MVLLL.js} +1 -1
- package/public/{chunk-O4LAEAXI.js → chunk-BLSOSZIK.js} +1 -1
- package/public/{chunk-GUYGWX4V.js → chunk-C2DUFO2M.js} +5 -5
- package/public/{chunk-OJFU4YV7.js → chunk-COVYK7OD.js} +1 -1
- package/public/{chunk-DQIYULLY.js → chunk-DFBWHKM7.js} +2 -2
- package/public/{chunk-V4HTNCND.js → chunk-DFS53XMC.js} +1 -1
- package/public/chunk-DVMYQE3W.js +1 -0
- package/public/{chunk-PS7STJ24.js → chunk-DZMAPM5W.js} +1 -1
- package/public/{chunk-46HAACYD.js → chunk-EQDMHFAQ.js} +1 -1
- package/public/{chunk-CVIDVTXE.js → chunk-F37NGDY4.js} +1 -1
- package/public/{chunk-CWBXOHGU.js → chunk-HBVMTCYO.js} +1 -1
- package/public/{chunk-QDW2BKN2.js → chunk-HUHCZOMP.js} +1 -1
- package/public/{chunk-VZCK3RQJ.js → chunk-IGUF25VJ.js} +1 -1
- package/public/{chunk-OT5SD7S6.js → chunk-JLJ7FCYU.js} +1 -1
- package/public/chunk-KYCW6DOD.js +1 -0
- package/public/{chunk-GMUYHUED.js → chunk-LXMEPDWR.js} +1 -1
- package/public/{chunk-ZMZEKHY3.js → chunk-MEUHKLFL.js} +1 -1
- package/public/{chunk-PDZJQENG.js → chunk-MFPHI5B4.js} +1 -1
- package/public/{chunk-YS5PUXGZ.js → chunk-N23OKEEV.js} +1 -1
- package/public/{chunk-M5FCDBBX.js → chunk-ND3RS2TV.js} +1 -1
- package/public/{chunk-MKUFHSCG.js → chunk-NJMEVJO2.js} +1 -1
- package/public/{chunk-CIGOZ7AG.js → chunk-NLLCIBIU.js} +1 -1
- package/public/{chunk-XDKUE7QB.js → chunk-O3OLHXQ3.js} +1 -1
- package/public/{chunk-KKFPXIBA.js → chunk-O6MRW75X.js} +1 -1
- package/public/{chunk-BQWPKS24.js → chunk-Q5NAKXA7.js} +1 -1
- package/public/{chunk-DGDHTBKJ.js → chunk-QKY5LBJU.js} +1 -1
- package/public/{chunk-QZPXTEER.js → chunk-QZKY22KL.js} +1 -1
- package/public/{chunk-3LMXTDAH.js → chunk-SCHH42YG.js} +1 -1
- package/public/{chunk-F2TVQCT6.js → chunk-SYSGDJ77.js} +1 -1
- package/public/{chunk-ZR3DASUZ.js → chunk-TJC3UQGF.js} +1 -1
- package/public/{chunk-PRNMCF3F.js → chunk-TZGLHZKZ.js} +1 -1
- package/public/{chunk-EHWGEAPV.js → chunk-UPAFOGG4.js} +1 -1
- package/public/{chunk-RJFIL5PE.js → chunk-USLAB6QF.js} +1 -1
- package/public/{chunk-2W3RVZHX.js → chunk-VSMSETOH.js} +1 -1
- package/public/{chunk-ML76IW2T.js → chunk-W4X5OSYG.js} +1 -1
- package/public/{chunk-4TJC3K3D.js → chunk-WKNVW3KJ.js} +1 -1
- package/public/{chunk-FS7HIQO5.js → chunk-XOGQ5ZRG.js} +1 -1
- package/public/{chunk-HB6IRKNL.js → chunk-XYBWKCJA.js} +1 -1
- package/public/{chunk-X6UGGSRW.js → chunk-YC2AM6Y7.js} +1 -1
- package/public/{chunk-25THOFLN.js → chunk-YPP6M5BH.js} +1 -1
- package/public/{chunk-QCMOQH6H.js → chunk-ZR7W7YZ2.js} +1 -1
- package/public/index.html +1 -1
- package/public/{main-N3NOM6IO.js → main-XTPP2T4N.js} +1 -1
- package/public/chunk-N4M5J3QE.js +0 -1
- package/public/chunk-TS7EQQMV.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -16,6 +16,7 @@ All notable changes to `homebridge-config-ui-x` will be documented in this file.
|
|
|
16
16
|
- add a couple more post-update messages
|
|
17
17
|
- show spinner when backing up before updating hb/ui
|
|
18
18
|
- restore required field indicators in plugin config forms
|
|
19
|
+
- make loading spinners consistent across the ui
|
|
19
20
|
|
|
20
21
|
### Other Changes
|
|
21
22
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "homebridge-config-ui-x",
|
|
3
3
|
"displayName": "Homebridge UI",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "5.11.3-beta.
|
|
5
|
+
"version": "5.11.3-beta.3",
|
|
6
6
|
"description": "A web based management, configuration and control platform for Homebridge.",
|
|
7
7
|
"author": "oznu <dev@oz.nu>",
|
|
8
8
|
"license": "MIT",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as u}from"./chunk-V4JCOKHQ.js";import{k as c,n as p,q as m}from"./chunk-
|
|
1
|
+
import{a as u}from"./chunk-V4JCOKHQ.js";import{k as c,n as p,q as m}from"./chunk-HBVMTCYO.js";import{g as f,h as r,ia as n,na as a,x as s}from"./chunk-ZRDN4L2J.js";var l=f(u(),1);var $=(()=>{class e{$api=a(m);$toastr=a(p);$translate=a(c);downloadBackup(){return r(this,null,function*(){let t=yield s(this.$api.get("/backup/download",{observe:"response",responseType:"blob"})),i=t.headers.get("File-Name")||"homebridge-backup.tar.gz",o=t.body.size;if(o>globalThis.backup.maxBackupSize){let b=this.$translate.instant("backup.backup_exceeds_max_size",{maxBackupSizeText:globalThis.backup.maxBackupSizeText,size:`${(o/1048576).toFixed(1)}MB`});this.$toastr.warning(b,this.$translate.instant("toast.title_warning"))}(0,l.saveAs)(t.body,i)})}static \u0275fac=function(i){return new(i||e)};static \u0275prov=n({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{$ as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as n}from"./chunk-5ZHDYUXA.js";import{b as s}from"./chunk-
|
|
1
|
+
import{e as n}from"./chunk-5ZHDYUXA.js";import{b as s}from"./chunk-HUHCZOMP.js";import{h as r,ia as o,na as e,x as i}from"./chunk-ZRDN4L2J.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{h as i}from"./chunk-5ZHDYUXA.js";import{eb as o,ja as r}from"./chunk-ZRDN4L2J.js";var u=(t,l,n,e)=>t.canDeactivate?t.canDeactivate(e?.url):!0,m=[{path:"",loadComponent:()=>import("./chunk-
|
|
1
|
+
import{h as i}from"./chunk-5ZHDYUXA.js";import{eb as o,ja as r}from"./chunk-ZRDN4L2J.js";var u=(t,l,n,e)=>t.canDeactivate?t.canDeactivate(e?.url):!0,m=[{path:"",loadComponent:()=>import("./chunk-MEUHKLFL.js").then(t=>t.TerminalComponent),canDeactivate:[u]}],a=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=o({type:t});static \u0275inj=r({imports:[i.forChild(m),i]})}return t})();var p=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=o({type:t});static \u0275inj=r({imports:[a]})}return t})();export{p as TerminalModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as pe}from"./chunk-2W3RVZHX.js";import{p as le}from"./chunk-CWBXOHGU.js";import{f as We,ia as fe,k as he,n as X,na as ue}from"./chunk-ZRDN4L2J.js";var d=Object.create(null);d.open="0";d.close="1";d.ping="2";d.pong="3";d.message="4";d.upgrade="5";d.noop="6";var S=Object.create(null);Object.keys(d).forEach(r=>{S[d[r]]=r});var O={type:"error",data:"parser error"};var ye=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",ge=typeof ArrayBuffer=="function",_e=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r&&r.buffer instanceof ArrayBuffer,B=({type:r,data:e},t,s)=>ye&&e instanceof Blob?t?s(e):de(e,s):ge&&(e instanceof ArrayBuffer||_e(e))?t?s(e):de(new Blob([e]),s):s(d[r]+(e||"")),de=(r,e)=>{let t=new FileReader;return t.onload=function(){let s=t.result.split(",")[1];e("b"+(s||""))},t.readAsDataURL(r)};function me(r){return r instanceof Uint8Array?r:r instanceof ArrayBuffer?new Uint8Array(r):new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}var $;function be(r,e){if(ye&&r.data instanceof Blob)return r.data.arrayBuffer().then(me).then(e);if(ge&&(r.data instanceof ArrayBuffer||_e(r.data)))return e(me(r.data));B(r,!1,t=>{$||($=new TextEncoder),e($.encode(t))})}var we="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",N=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let r=0;r<we.length;r++)N[we.charCodeAt(r)]=r;var ke=r=>{let e=r.length*.75,t=r.length,s,i=0,n,o,c,a;r[r.length-1]==="="&&(e--,r[r.length-2]==="="&&e--);let m=new ArrayBuffer(e),p=new Uint8Array(m);for(s=0;s<t;s+=4)n=N[r.charCodeAt(s)],o=N[r.charCodeAt(s+1)],c=N[r.charCodeAt(s+2)],a=N[r.charCodeAt(s+3)],p[i++]=n<<2|o>>4,p[i++]=(o&15)<<4|c>>2,p[i++]=(c&3)<<6|a&63;return m};var Ke=typeof ArrayBuffer=="function",L=(r,e)=>{if(typeof r!="string")return{type:"message",data:Ee(r,e)};let t=r.charAt(0);return t==="b"?{type:"message",data:Ye(r.substring(1),e)}:S[t]?r.length>1?{type:S[t],data:r.substring(1)}:{type:S[t]}:O},Ye=(r,e)=>{if(Ke){let t=ke(r);return Ee(t,e)}else return{base64:!0,data:r}},Ee=(r,e)=>{switch(e){case"blob":return r instanceof Blob?r:new Blob([r]);case"arraybuffer":default:return r instanceof ArrayBuffer?r:r.buffer}};var ve="",xe=(r,e)=>{let t=r.length,s=new Array(t),i=0;r.forEach((n,o)=>{B(n,!1,c=>{s[o]=c,++i===t&&e(s.join(ve))})})},Te=(r,e)=>{let t=r.split(ve),s=[];for(let i=0;i<t.length;i++){let n=L(t[i],e);if(s.push(n),n.type==="error")break}return s};function Ae(){return new TransformStream({transform(r,e){be(r,t=>{let s=t.length,i;if(s<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,s);else if(s<65536){i=new Uint8Array(3);let n=new DataView(i.buffer);n.setUint8(0,126),n.setUint16(1,s)}else{i=new Uint8Array(9);let n=new DataView(i.buffer);n.setUint8(0,127),n.setBigUint64(1,BigInt(s))}r.data&&typeof r.data!="string"&&(i[0]|=128),e.enqueue(i),e.enqueue(t)})}})}var Q;function U(r){return r.reduce((e,t)=>e+t.length,0)}function V(r,e){if(r[0].length===e)return r.shift();let t=new Uint8Array(e),s=0;for(let i=0;i<e;i++)t[i]=r[0][s++],s===r[0].length&&(r.shift(),s=0);return r.length&&s<r[0].length&&(r[0]=r[0].slice(s)),t}function Re(r,e){Q||(Q=new TextDecoder);let t=[],s=0,i=-1,n=!1;return new TransformStream({transform(o,c){for(t.push(o);;){if(s===0){if(U(t)<1)break;let a=V(t,1);n=(a[0]&128)===128,i=a[0]&127,i<126?s=3:i===126?s=1:s=2}else if(s===1){if(U(t)<2)break;let a=V(t,2);i=new DataView(a.buffer,a.byteOffset,a.length).getUint16(0),s=3}else if(s===2){if(U(t)<8)break;let a=V(t,8),m=new DataView(a.buffer,a.byteOffset,a.length),p=m.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(O);break}i=p*Math.pow(2,32)+m.getUint32(4),s=3}else{if(U(t)<i)break;let a=V(t,i);c.enqueue(L(n?a:Q.decode(a),e)),s=0}if(i===0||i>r){c.enqueue(O);break}}}})}var j=4;function f(r){if(r)return Je(r)}function Je(r){for(var e in f.prototype)r[e]=f.prototype[e];return r}f.prototype.on=f.prototype.addEventListener=function(r,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+r]=this._callbacks["$"+r]||[]).push(e),this};f.prototype.once=function(r,e){function t(){this.off(r,t),e.apply(this,arguments)}return t.fn=e,this.on(r,t),this};f.prototype.off=f.prototype.removeListener=f.prototype.removeAllListeners=f.prototype.removeEventListener=function(r,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var t=this._callbacks["$"+r];if(!t)return this;if(arguments.length==1)return delete this._callbacks["$"+r],this;for(var s,i=0;i<t.length;i++)if(s=t[i],s===e||s.fn===e){t.splice(i,1);break}return t.length===0&&delete this._callbacks["$"+r],this};f.prototype.emit=function(r){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),t=this._callbacks["$"+r],s=1;s<arguments.length;s++)e[s-1]=arguments[s];if(t){t=t.slice(0);for(var s=0,i=t.length;s<i;++s)t[s].apply(this,e)}return this};f.prototype.emitReserved=f.prototype.emit;f.prototype.listeners=function(r){return this._callbacks=this._callbacks||{},this._callbacks["$"+r]||[]};f.prototype.hasListeners=function(r){return!!this.listeners(r).length};var y=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,t)=>t(e,0),u=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Ce="arraybuffer";function M(r,...e){return e.reduce((t,s)=>(r.hasOwnProperty(s)&&(t[s]=r[s]),t),{})}var ze=u.setTimeout,Xe=u.clearTimeout;function g(r,e){e.useNativeTimers?(r.setTimeoutFn=ze.bind(u),r.clearTimeoutFn=Xe.bind(u)):(r.setTimeoutFn=u.setTimeout.bind(u),r.clearTimeoutFn=u.clearTimeout.bind(u))}var $e=1.33;function Se(r){return typeof r=="string"?Qe(r):Math.ceil((r.byteLength||r.size)*$e)}function Qe(r){let e=0,t=0;for(let s=0,i=r.length;s<i;s++)e=r.charCodeAt(s),e<128?t+=1:e<2048?t+=2:e<55296||e>=57344?t+=3:(s++,t+=4);return t}function H(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Oe(r){let e="";for(let t in r)r.hasOwnProperty(t)&&(e.length&&(e+="&"),e+=encodeURIComponent(t)+"="+encodeURIComponent(r[t]));return e}function Be(r){let e={},t=r.split("&");for(let s=0,i=t.length;s<i;s++){let n=t[s].split("=");e[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}return e}var W=class extends Error{constructor(e,t,s){super(e),this.description=t,this.context=s,this.type="TransportError"}},_=class extends f{constructor(e){super(),this.writable=!1,g(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,s){return super.emitReserved("error",new W(e,t,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){let t=L(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){let e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){let t=Oe(e);return t.length?"?"+t:""}};var P=class extends _{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";let t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let s=0;this._polling&&(s++,this.once("pollComplete",function(){--s||t()})),this.writable||(s++,this.once("drain",function(){--s||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){let t=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};Te(e,this.socket.binaryType).forEach(t),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){let e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,xe(e,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let e=this.opts.secure?"https":"http",t=this.query||{};return this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=H()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}};var Ne=!1;try{Ne=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var Le=Ne;function je(){}var G=class extends P{constructor(e){if(super(e),typeof location<"u"){let t=location.protocol==="https:",s=location.port;s||(s=t?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||s!==e.port}}doWrite(e,t){let s=this.request({method:"POST",data:e});s.on("success",t),s.on("error",(i,n)=>{this.onError("xhr post error",i,n)})}doPoll(){let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(t,s)=>{this.onError("xhr poll error",t,s)}),this.pollXhr=e}},K=(()=>{class r extends f{constructor(t,s,i){super(),this.createRequest=t,g(this,i),this._opts=i,this._method=i.method||"GET",this._uri=s,this._data=i.data!==void 0?i.data:null,this._create()}_create(){var t;let s=M(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");s.xdomain=!!this._opts.xd;let i=this._xhr=this.createRequest(s);try{i.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){i.setDisableHeaderCheck&&i.setDisableHeaderCheck(!0);for(let n in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(n)&&i.setRequestHeader(n,this._opts.extraHeaders[n])}}catch{}if(this._method==="POST")try{i.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{i.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(i),"withCredentials"in i&&(i.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(i.timeout=this._opts.requestTimeout),i.onreadystatechange=()=>{var n;i.readyState===3&&((n=this._opts.cookieJar)===null||n===void 0||n.parseCookies(i.getResponseHeader("set-cookie"))),i.readyState===4&&(i.status===200||i.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof i.status=="number"?i.status:0)},0))},i.send(this._data)}catch(n){this.setTimeoutFn(()=>{this._onError(n)},0);return}typeof document<"u"&&(this._index=r.requestsCount++,r.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=je,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete r.requests[this._index],this._xhr=null}}_onLoad(){let t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}return r.requestsCount=0,r.requests={},r})();if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Pe);else if(typeof addEventListener=="function"){let r="onpagehide"in u?"pagehide":"unload";addEventListener(r,Pe,!1)}}function Pe(){for(let r in K.requests)K.requests.hasOwnProperty(r)&&K.requests[r].abort()}var Ge=(function(){let r=qe({xdomain:!1});return r&&r.responseType!==null})(),w=class extends G{constructor(e){super(e);let t=e&&e.forceBase64;this.supportsBinary=Ge&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new K(qe,this.uri(),e)}};function qe(r){let e=r.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||Le))return new XMLHttpRequest}catch{}if(!e)try{return new u[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var De=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",ee=class extends _{get name(){return"websocket"}doOpen(){let e=this.uri(),t=this.opts.protocols,s=De?{}:M(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,s)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let s=e[t],i=t===e.length-1;B(s,this.supportsBinary,n=>{try{this.doWrite(s,n)}catch{}i&&y(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=H()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}},Z=u.WebSocket||u.MozWebSocket,k=class extends ee{createSocket(e,t,s){return De?new Z(e,t,s):t?new Z(e,t):new Z(e)}doWrite(e,t){this.ws.send(t)}};var v=class extends _{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{let t=Re(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=e.readable.pipeThrough(t).getReader(),i=Ae();i.readable.pipeTo(e.writable),this._writer=i.writable.getWriter();let n=()=>{s.read().then(({done:c,value:a})=>{c||(this.onPacket(a),n())}).catch(c=>{})};n();let o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let s=e[t],i=t===e.length-1;this._writer.write(s).then(()=>{i&&y(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}};var te={websocket:k,webtransport:v,polling:w};var Ze=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,et=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function x(r){if(r.length>8e3)throw"URI too long";let e=r,t=r.indexOf("["),s=r.indexOf("]");t!=-1&&s!=-1&&(r=r.substring(0,t)+r.substring(t,s).replace(/:/g,";")+r.substring(s,r.length));let i=Ze.exec(r||""),n={},o=14;for(;o--;)n[et[o]]=i[o]||"";return t!=-1&&s!=-1&&(n.source=e,n.host=n.host.substring(1,n.host.length-1).replace(/;/g,":"),n.authority=n.authority.replace("[","").replace("]","").replace(/;/g,":"),n.ipv6uri=!0),n.pathNames=tt(n,n.path),n.queryKey=st(n,n.query),n}function tt(r,e){let t=/\/{2,9}/g,s=e.replace(t,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&s.splice(0,1),e.slice(-1)=="/"&&s.splice(s.length-1,1),s}function st(r,e){let t={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,i,n){i&&(t[i]=n)}),t}var se=typeof addEventListener=="function"&&typeof removeEventListener=="function",Y=[];se&&addEventListener("offline",()=>{Y.forEach(r=>r())},!1);var J=(()=>{class r extends f{constructor(t,s){if(super(),this.binaryType=Ce,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(s=t,t=null),t){let i=x(t);s.hostname=i.host,s.secure=i.protocol==="https"||i.protocol==="wss",s.port=i.port,i.query&&(s.query=i.query)}else s.host&&(s.hostname=x(s.host).host);g(this,s),this.secure=s.secure!=null?s.secure:typeof location<"u"&&location.protocol==="https:",s.hostname&&!s.port&&(s.port=this.secure?"443":"80"),this.hostname=s.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=s.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},s.transports.forEach(i=>{let n=i.prototype.name;this.transports.push(n),this._transportsByName[n]=i}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},s),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Be(this.opts.query)),se&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Y.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){let s=Object.assign({},this.opts.query);s.EIO=j,s.transport=t,this.id&&(s.sid=this.id);let i=Object.assign({},this.opts,{query:s,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](i)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let t=this.opts.rememberUpgrade&&r.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let s=this.createTransport(t);s.open(),this.setTransport(s)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",s=>this._onClose("transport close",s))}onOpen(){this.readyState="open",r.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let s=new Error("server error");s.code=t.data,this._onError(s);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let s=1;for(let i=0;i<this.writeBuffer.length;i++){let n=this.writeBuffer[i].data;if(n&&(s+=Se(n)),i>0&&s>this._maxPayload)return this.writeBuffer.slice(0,i);s+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,y(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,s,i){return this._sendPacket("message",t,s,i),this}send(t,s,i){return this._sendPacket("message",t,s,i),this}_sendPacket(t,s,i,n){if(typeof s=="function"&&(n=s,s=void 0),typeof i=="function"&&(n=i,i=null),this.readyState==="closing"||this.readyState==="closed")return;i=i||{},i.compress=i.compress!==!1;let o={type:t,data:s,options:i};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),n&&this.once("flush",n),this.flush()}close(){let t=()=>{this._onClose("forced close"),this.transport.close()},s=()=>{this.off("upgrade",s),this.off("upgradeError",s),t()},i=()=>{this.once("upgrade",s),this.once("upgradeError",s)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?i():t()}):this.upgrading?i():t()),this}_onError(t){if(r.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,s){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),se&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let i=Y.indexOf(this._offlineEventListener);i!==-1&&Y.splice(i,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,s),this.writeBuffer=[],this._prevBufferLen=0}}}return r.protocol=j,r})(),z=class extends J{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),s=!1;J.priorWebsocketSuccess=!1;let i=()=>{s||(t.send([{type:"ping",data:"probe"}]),t.once("packet",b=>{if(!s)if(b.type==="pong"&&b.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;J.priorWebsocketSuccess=t.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(p(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{let C=new Error("probe error");C.transport=t.name,this.emitReserved("upgradeError",C)}}))};function n(){s||(s=!0,p(),t.close(),t=null)}let o=b=>{let C=new Error("probe error: "+b);C.transport=t.name,n(),this.emitReserved("upgradeError",C)};function c(){o("transport closed")}function a(){o("socket closed")}function m(b){t&&b.name!==t.name&&n()}let p=()=>{t.removeListener("open",i),t.removeListener("error",o),t.removeListener("close",c),this.off("close",a),this.off("upgrading",m)};t.once("open",i),t.once("error",o),t.once("close",c),this.once("close",a),this.once("upgrading",m),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{s||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let t=[];for(let s=0;s<e.length;s++)~this.transports.indexOf(e[s])&&t.push(e[s]);return t}},T=class extends z{constructor(e,t={}){let s=typeof e=="object"?e:t;(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(i=>te[i]).filter(i=>!!i)),super(e,s)}};var ds=T.protocol;function Fe(r,e="",t){let s=r;t=t||typeof location<"u"&&location,r==null&&(r=t.protocol+"//"+t.host),typeof r=="string"&&(r.charAt(0)==="/"&&(r.charAt(1)==="/"?r=t.protocol+r:r=t.host+r),/^(https?|wss?):\/\//.test(r)||(typeof t<"u"?r=t.protocol+"//"+r:r="https://"+r),s=x(r)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";let n=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+n+":"+s.port+e,s.href=s.protocol+"://"+n+(t&&t.port===s.port?"":":"+s.port),s}var ae={};We(ae,{Decoder:()=>oe,Encoder:()=>ne,PacketType:()=>h,protocol:()=>He});var it=typeof ArrayBuffer=="function",nt=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r.buffer instanceof ArrayBuffer,Ie=Object.prototype.toString,ot=typeof Blob=="function"||typeof Blob<"u"&&Ie.call(Blob)==="[object BlobConstructor]",ct=typeof File=="function"||typeof File<"u"&&Ie.call(File)==="[object FileConstructor]";function D(r){return it&&(r instanceof ArrayBuffer||nt(r))||ot&&r instanceof Blob||ct&&r instanceof File}function q(r,e){if(!r||typeof r!="object")return!1;if(Array.isArray(r)){for(let t=0,s=r.length;t<s;t++)if(q(r[t]))return!0;return!1}if(D(r))return!0;if(r.toJSON&&typeof r.toJSON=="function"&&arguments.length===1)return q(r.toJSON(),!0);for(let t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&q(r[t]))return!0;return!1}function Ue(r){let e=[],t=r.data,s=r;return s.data=re(t,e),s.attachments=e.length,{packet:s,buffers:e}}function re(r,e){if(!r)return r;if(D(r)){let t={_placeholder:!0,num:e.length};return e.push(r),t}else if(Array.isArray(r)){let t=new Array(r.length);for(let s=0;s<r.length;s++)t[s]=re(r[s],e);return t}else if(typeof r=="object"&&!(r instanceof Date)){let t={};for(let s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=re(r[s],e));return t}return r}function Ve(r,e){return r.data=ie(r.data,e),delete r.attachments,r}function ie(r,e){if(!r)return r;if(r&&r._placeholder===!0){if(typeof r.num=="number"&&r.num>=0&&r.num<e.length)return e[r.num];throw new Error("illegal attachments")}else if(Array.isArray(r))for(let t=0;t<r.length;t++)r[t]=ie(r[t],e);else if(typeof r=="object")for(let t in r)Object.prototype.hasOwnProperty.call(r,t)&&(r[t]=ie(r[t],e));return r}var at=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],He=5,h=(function(r){return r[r.CONNECT=0]="CONNECT",r[r.DISCONNECT=1]="DISCONNECT",r[r.EVENT=2]="EVENT",r[r.ACK=3]="ACK",r[r.CONNECT_ERROR=4]="CONNECT_ERROR",r[r.BINARY_EVENT=5]="BINARY_EVENT",r[r.BINARY_ACK=6]="BINARY_ACK",r})(h||{}),ne=class{constructor(e){this.replacer=e}encode(e){return(e.type===h.EVENT||e.type===h.ACK)&&q(e)?this.encodeAsBinary({type:e.type===h.EVENT?h.BINARY_EVENT:h.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===h.BINARY_EVENT||e.type===h.BINARY_ACK)&&(t+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(t+=e.nsp+","),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){let t=Ue(e),s=this.encodeAsString(t.packet),i=t.buffers;return i.unshift(s),i}};function Me(r){return Object.prototype.toString.call(r)==="[object Object]"}var oe=class r extends f{constructor(e){super(),this.reviver=e}add(e){let t;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);let s=t.type===h.BINARY_EVENT;s||t.type===h.BINARY_ACK?(t.type=s?h.EVENT:h.ACK,this.reconstructor=new ce(t),t.attachments===0&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if(D(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let t=0,s={type:Number(e.charAt(0))};if(h[s.type]===void 0)throw new Error("unknown packet type "+s.type);if(s.type===h.BINARY_EVENT||s.type===h.BINARY_ACK){let n=t+1;for(;e.charAt(++t)!=="-"&&t!=e.length;);let o=e.substring(n,t);if(o!=Number(o)||e.charAt(t)!=="-")throw new Error("Illegal attachments");s.attachments=Number(o)}if(e.charAt(t+1)==="/"){let n=t+1;for(;++t&&!(e.charAt(t)===","||t===e.length););s.nsp=e.substring(n,t)}else s.nsp="/";let i=e.charAt(t+1);if(i!==""&&Number(i)==i){let n=t+1;for(;++t;){let o=e.charAt(t);if(o==null||Number(o)!=o){--t;break}if(t===e.length)break}s.id=Number(e.substring(n,t+1))}if(e.charAt(++t)){let n=this.tryParse(e.substr(t));if(r.isPayloadValid(s.type,n))s.data=n;else throw new Error("invalid payload")}return s}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case h.CONNECT:return Me(t);case h.DISCONNECT:return t===void 0;case h.CONNECT_ERROR:return typeof t=="string"||Me(t);case h.EVENT:case h.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&at.indexOf(t[0])===-1);case h.ACK:case h.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},ce=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){let t=Ve(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function l(r,e,t){return r.on(e,t),function(){r.off(e,t)}}var ht=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),A=class extends f{constructor(e,t,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[l(e,"open",this.onopen.bind(this)),l(e,"packet",this.onpacket.bind(this)),l(e,"error",this.onerror.bind(this)),l(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){var s,i,n;if(ht.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;let o={type:h.EVENT,data:t};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof t[t.length-1]=="function"){let p=this.ids++,b=t.pop();this._registerAckCallback(p,b),o.id=p}let c=(i=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||i===void 0?void 0:i.writable,a=this.connected&&!(!((n=this.io.engine)===null||n===void 0)&&n._hasPingExpired());return this.flags.volatile&&!c||(a?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(e,t){var s;let i=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(i===void 0){this.acks[e]=t;return}let n=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===e&&this.sendBuffer.splice(c,1);t.call(this,new Error("operation has timed out"))},i),o=(...c)=>{this.io.clearTimeoutFn(n),t.apply(this,c)};o.withError=!0,this.acks[e]=o}emitWithAck(e,...t){return new Promise((s,i)=>{let n=(o,c)=>o?i(o):s(c);n.withError=!0,t.push(n),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]=="function"&&(t=e.pop());let s={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((i,...n)=>s!==this._queue[0]?void 0:(i!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(i)):(this._queue.shift(),t&&t(null,...n)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:h.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(s=>String(s.id)===e)){let s=this.acks[e];delete this.acks[e],s.withError&&s.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case h.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case h.EVENT:case h.BINARY_EVENT:this.onevent(e);break;case h.ACK:case h.BINARY_ACK:this.onack(e);break;case h.DISCONNECT:this.ondisconnect();break;case h.CONNECT_ERROR:this.destroy();let s=new Error(e.data.message);s.data=e.data.data,this.emitReserved("connect_error",s);break}}onevent(e){let t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let t=this._anyListeners.slice();for(let s of t)s.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){let t=this,s=!1;return function(...i){s||(s=!0,t.packet({type:h.ACK,id:e,data:i}))}}onack(e){let t=this.acks[e.id];typeof t=="function"&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:h.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let t=this._anyListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let t=this._anyOutgoingListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let t=this._anyOutgoingListeners.slice();for(let s of t)s.apply(this,e.data)}}};function E(r){r=r||{},this.ms=r.min||100,this.max=r.max||1e4,this.factor=r.factor||2,this.jitter=r.jitter>0&&r.jitter<=1?r.jitter:0,this.attempts=0}E.prototype.duration=function(){var r=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),t=Math.floor(e*this.jitter*r);r=(Math.floor(e*10)&1)==0?r-t:r+t}return Math.min(r,this.max)|0};E.prototype.reset=function(){this.attempts=0};E.prototype.setMin=function(r){this.ms=r};E.prototype.setMax=function(r){this.max=r};E.prototype.setJitter=function(r){this.jitter=r};var R=class extends f{constructor(e,t){var s;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.opts=t,g(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor((s=t.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new E({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState="closed",this.uri=e;let i=t.parser||ae;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)===null||t===void 0||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)===null||t===void 0||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)===null||t===void 0||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new T(this.uri,this.opts);let t=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;let i=l(t,"open",function(){s.onopen(),e&&e()}),n=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),e?e(c):this.maybeReconnectOnOpen()},o=l(t,"error",n);if(this._timeout!==!1){let c=this._timeout,a=this.setTimeoutFn(()=>{i(),n(new Error("timeout")),t.close()},c);this.opts.autoUnref&&a.unref(),this.subs.push(()=>{this.clearTimeoutFn(a)})}return this.subs.push(i),this.subs.push(o),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let e=this.engine;this.subs.push(l(e,"ping",this.onping.bind(this)),l(e,"data",this.ondata.bind(this)),l(e,"error",this.onerror.bind(this)),l(e,"close",this.onclose.bind(this)),l(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){y(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let s=this.nsps[e];return s?this._autoConnect&&!s.active&&s.connect():(s=new A(this,e,t),this.nsps[e]=s),s}_destroy(e){let t=Object.keys(this.nsps);for(let s of t)if(this.nsps[s].active)return;this._close()}_packet(e){let t=this.encoder.encode(e);for(let s=0;s<t.length;s++)this.engine.write(t[s],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var s;this.cleanup(),(s=this.engine)===null||s===void 0||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let t=this.backoff.duration();this._reconnecting=!0;let s=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(i=>{i?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",i)):e.onreconnect()}))},t);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}};var F={};function I(r,e){typeof r=="object"&&(e=r,r=void 0),e=e||{};let t=Fe(r,e.path||"/socket.io"),s=t.source,i=t.id,n=t.path,o=F[i]&&n in F[i].nsps,c=e.forceNew||e["force new connection"]||e.multiplex===!1||o,a;return c?a=new R(s,e):(F[i]||(F[i]=new R(s,e)),a=F[i]),t.query&&!e.query&&(e.query=t.queryKey),a.socket(t.path,e)}Object.assign(I,{Manager:R,Socket:A,io:I,connect:I});var cr=(()=>{class r{$auth=ue(pe);namespaceConnectionCache={};connectToNamespace(t){if(this.namespaceConnectionCache[t]){let s=this.namespaceConnectionCache[t];return s.connected=new X,setTimeout(()=>{s.socket.connected&&s.connected.next(void 0)}),s.socket.on("connect",()=>{s.connected.next(void 0)}),s.end=()=>{s.socket.emit("end"),s.socket.removeAllListeners(),s.connected.complete()},this.namespaceConnectionCache[t]}else{let s=this.establishConnectionToNamespace(t);return s.connected=new X,s.socket.on("connect",()=>{s.connected.next(void 0)}),s.end=()=>{s.socket.emit("end"),s.socket.removeAllListeners(),s.connected.complete()},this.namespaceConnectionCache[t]=s,s}}getExistingNamespace(t){return this.namespaceConnectionCache[t]}establishConnectionToNamespace(t){let s=I(`${le.api.socket}/${t}`,{query:{token:this.$auth.token}});return{socket:s,request:(n,o)=>new he(c=>{s.emit(n,o,a=>{typeof a=="object"&&a.error?c.error(a):c.next(a),c.complete()})})}}static \u0275fac=function(s){return new(s||r)};static \u0275prov=fe({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{cr as a};
|
|
1
|
+
import{b as pe}from"./chunk-VSMSETOH.js";import{p as le}from"./chunk-HBVMTCYO.js";import{f as We,ia as fe,k as he,n as X,na as ue}from"./chunk-ZRDN4L2J.js";var d=Object.create(null);d.open="0";d.close="1";d.ping="2";d.pong="3";d.message="4";d.upgrade="5";d.noop="6";var S=Object.create(null);Object.keys(d).forEach(r=>{S[d[r]]=r});var O={type:"error",data:"parser error"};var ye=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",ge=typeof ArrayBuffer=="function",_e=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r&&r.buffer instanceof ArrayBuffer,B=({type:r,data:e},t,s)=>ye&&e instanceof Blob?t?s(e):de(e,s):ge&&(e instanceof ArrayBuffer||_e(e))?t?s(e):de(new Blob([e]),s):s(d[r]+(e||"")),de=(r,e)=>{let t=new FileReader;return t.onload=function(){let s=t.result.split(",")[1];e("b"+(s||""))},t.readAsDataURL(r)};function me(r){return r instanceof Uint8Array?r:r instanceof ArrayBuffer?new Uint8Array(r):new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}var $;function be(r,e){if(ye&&r.data instanceof Blob)return r.data.arrayBuffer().then(me).then(e);if(ge&&(r.data instanceof ArrayBuffer||_e(r.data)))return e(me(r.data));B(r,!1,t=>{$||($=new TextEncoder),e($.encode(t))})}var we="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",N=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let r=0;r<we.length;r++)N[we.charCodeAt(r)]=r;var ke=r=>{let e=r.length*.75,t=r.length,s,i=0,n,o,c,a;r[r.length-1]==="="&&(e--,r[r.length-2]==="="&&e--);let m=new ArrayBuffer(e),p=new Uint8Array(m);for(s=0;s<t;s+=4)n=N[r.charCodeAt(s)],o=N[r.charCodeAt(s+1)],c=N[r.charCodeAt(s+2)],a=N[r.charCodeAt(s+3)],p[i++]=n<<2|o>>4,p[i++]=(o&15)<<4|c>>2,p[i++]=(c&3)<<6|a&63;return m};var Ke=typeof ArrayBuffer=="function",L=(r,e)=>{if(typeof r!="string")return{type:"message",data:Ee(r,e)};let t=r.charAt(0);return t==="b"?{type:"message",data:Ye(r.substring(1),e)}:S[t]?r.length>1?{type:S[t],data:r.substring(1)}:{type:S[t]}:O},Ye=(r,e)=>{if(Ke){let t=ke(r);return Ee(t,e)}else return{base64:!0,data:r}},Ee=(r,e)=>{switch(e){case"blob":return r instanceof Blob?r:new Blob([r]);case"arraybuffer":default:return r instanceof ArrayBuffer?r:r.buffer}};var ve="",xe=(r,e)=>{let t=r.length,s=new Array(t),i=0;r.forEach((n,o)=>{B(n,!1,c=>{s[o]=c,++i===t&&e(s.join(ve))})})},Te=(r,e)=>{let t=r.split(ve),s=[];for(let i=0;i<t.length;i++){let n=L(t[i],e);if(s.push(n),n.type==="error")break}return s};function Ae(){return new TransformStream({transform(r,e){be(r,t=>{let s=t.length,i;if(s<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,s);else if(s<65536){i=new Uint8Array(3);let n=new DataView(i.buffer);n.setUint8(0,126),n.setUint16(1,s)}else{i=new Uint8Array(9);let n=new DataView(i.buffer);n.setUint8(0,127),n.setBigUint64(1,BigInt(s))}r.data&&typeof r.data!="string"&&(i[0]|=128),e.enqueue(i),e.enqueue(t)})}})}var Q;function U(r){return r.reduce((e,t)=>e+t.length,0)}function V(r,e){if(r[0].length===e)return r.shift();let t=new Uint8Array(e),s=0;for(let i=0;i<e;i++)t[i]=r[0][s++],s===r[0].length&&(r.shift(),s=0);return r.length&&s<r[0].length&&(r[0]=r[0].slice(s)),t}function Re(r,e){Q||(Q=new TextDecoder);let t=[],s=0,i=-1,n=!1;return new TransformStream({transform(o,c){for(t.push(o);;){if(s===0){if(U(t)<1)break;let a=V(t,1);n=(a[0]&128)===128,i=a[0]&127,i<126?s=3:i===126?s=1:s=2}else if(s===1){if(U(t)<2)break;let a=V(t,2);i=new DataView(a.buffer,a.byteOffset,a.length).getUint16(0),s=3}else if(s===2){if(U(t)<8)break;let a=V(t,8),m=new DataView(a.buffer,a.byteOffset,a.length),p=m.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(O);break}i=p*Math.pow(2,32)+m.getUint32(4),s=3}else{if(U(t)<i)break;let a=V(t,i);c.enqueue(L(n?a:Q.decode(a),e)),s=0}if(i===0||i>r){c.enqueue(O);break}}}})}var j=4;function f(r){if(r)return Je(r)}function Je(r){for(var e in f.prototype)r[e]=f.prototype[e];return r}f.prototype.on=f.prototype.addEventListener=function(r,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+r]=this._callbacks["$"+r]||[]).push(e),this};f.prototype.once=function(r,e){function t(){this.off(r,t),e.apply(this,arguments)}return t.fn=e,this.on(r,t),this};f.prototype.off=f.prototype.removeListener=f.prototype.removeAllListeners=f.prototype.removeEventListener=function(r,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var t=this._callbacks["$"+r];if(!t)return this;if(arguments.length==1)return delete this._callbacks["$"+r],this;for(var s,i=0;i<t.length;i++)if(s=t[i],s===e||s.fn===e){t.splice(i,1);break}return t.length===0&&delete this._callbacks["$"+r],this};f.prototype.emit=function(r){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),t=this._callbacks["$"+r],s=1;s<arguments.length;s++)e[s-1]=arguments[s];if(t){t=t.slice(0);for(var s=0,i=t.length;s<i;++s)t[s].apply(this,e)}return this};f.prototype.emitReserved=f.prototype.emit;f.prototype.listeners=function(r){return this._callbacks=this._callbacks||{},this._callbacks["$"+r]||[]};f.prototype.hasListeners=function(r){return!!this.listeners(r).length};var y=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,t)=>t(e,0),u=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Ce="arraybuffer";function M(r,...e){return e.reduce((t,s)=>(r.hasOwnProperty(s)&&(t[s]=r[s]),t),{})}var ze=u.setTimeout,Xe=u.clearTimeout;function g(r,e){e.useNativeTimers?(r.setTimeoutFn=ze.bind(u),r.clearTimeoutFn=Xe.bind(u)):(r.setTimeoutFn=u.setTimeout.bind(u),r.clearTimeoutFn=u.clearTimeout.bind(u))}var $e=1.33;function Se(r){return typeof r=="string"?Qe(r):Math.ceil((r.byteLength||r.size)*$e)}function Qe(r){let e=0,t=0;for(let s=0,i=r.length;s<i;s++)e=r.charCodeAt(s),e<128?t+=1:e<2048?t+=2:e<55296||e>=57344?t+=3:(s++,t+=4);return t}function H(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Oe(r){let e="";for(let t in r)r.hasOwnProperty(t)&&(e.length&&(e+="&"),e+=encodeURIComponent(t)+"="+encodeURIComponent(r[t]));return e}function Be(r){let e={},t=r.split("&");for(let s=0,i=t.length;s<i;s++){let n=t[s].split("=");e[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}return e}var W=class extends Error{constructor(e,t,s){super(e),this.description=t,this.context=s,this.type="TransportError"}},_=class extends f{constructor(e){super(),this.writable=!1,g(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,s){return super.emitReserved("error",new W(e,t,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){let t=L(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){let e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){let t=Oe(e);return t.length?"?"+t:""}};var P=class extends _{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";let t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let s=0;this._polling&&(s++,this.once("pollComplete",function(){--s||t()})),this.writable||(s++,this.once("drain",function(){--s||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){let t=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};Te(e,this.socket.binaryType).forEach(t),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){let e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,xe(e,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let e=this.opts.secure?"https":"http",t=this.query||{};return this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=H()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}};var Ne=!1;try{Ne=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var Le=Ne;function je(){}var G=class extends P{constructor(e){if(super(e),typeof location<"u"){let t=location.protocol==="https:",s=location.port;s||(s=t?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||s!==e.port}}doWrite(e,t){let s=this.request({method:"POST",data:e});s.on("success",t),s.on("error",(i,n)=>{this.onError("xhr post error",i,n)})}doPoll(){let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(t,s)=>{this.onError("xhr poll error",t,s)}),this.pollXhr=e}},K=(()=>{class r extends f{constructor(t,s,i){super(),this.createRequest=t,g(this,i),this._opts=i,this._method=i.method||"GET",this._uri=s,this._data=i.data!==void 0?i.data:null,this._create()}_create(){var t;let s=M(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");s.xdomain=!!this._opts.xd;let i=this._xhr=this.createRequest(s);try{i.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){i.setDisableHeaderCheck&&i.setDisableHeaderCheck(!0);for(let n in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(n)&&i.setRequestHeader(n,this._opts.extraHeaders[n])}}catch{}if(this._method==="POST")try{i.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{i.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(i),"withCredentials"in i&&(i.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(i.timeout=this._opts.requestTimeout),i.onreadystatechange=()=>{var n;i.readyState===3&&((n=this._opts.cookieJar)===null||n===void 0||n.parseCookies(i.getResponseHeader("set-cookie"))),i.readyState===4&&(i.status===200||i.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof i.status=="number"?i.status:0)},0))},i.send(this._data)}catch(n){this.setTimeoutFn(()=>{this._onError(n)},0);return}typeof document<"u"&&(this._index=r.requestsCount++,r.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=je,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete r.requests[this._index],this._xhr=null}}_onLoad(){let t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}return r.requestsCount=0,r.requests={},r})();if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Pe);else if(typeof addEventListener=="function"){let r="onpagehide"in u?"pagehide":"unload";addEventListener(r,Pe,!1)}}function Pe(){for(let r in K.requests)K.requests.hasOwnProperty(r)&&K.requests[r].abort()}var Ge=(function(){let r=qe({xdomain:!1});return r&&r.responseType!==null})(),w=class extends G{constructor(e){super(e);let t=e&&e.forceBase64;this.supportsBinary=Ge&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new K(qe,this.uri(),e)}};function qe(r){let e=r.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||Le))return new XMLHttpRequest}catch{}if(!e)try{return new u[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var De=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",ee=class extends _{get name(){return"websocket"}doOpen(){let e=this.uri(),t=this.opts.protocols,s=De?{}:M(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,s)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let s=e[t],i=t===e.length-1;B(s,this.supportsBinary,n=>{try{this.doWrite(s,n)}catch{}i&&y(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=H()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}},Z=u.WebSocket||u.MozWebSocket,k=class extends ee{createSocket(e,t,s){return De?new Z(e,t,s):t?new Z(e,t):new Z(e)}doWrite(e,t){this.ws.send(t)}};var v=class extends _{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{let t=Re(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=e.readable.pipeThrough(t).getReader(),i=Ae();i.readable.pipeTo(e.writable),this._writer=i.writable.getWriter();let n=()=>{s.read().then(({done:c,value:a})=>{c||(this.onPacket(a),n())}).catch(c=>{})};n();let o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let s=e[t],i=t===e.length-1;this._writer.write(s).then(()=>{i&&y(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}};var te={websocket:k,webtransport:v,polling:w};var Ze=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,et=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function x(r){if(r.length>8e3)throw"URI too long";let e=r,t=r.indexOf("["),s=r.indexOf("]");t!=-1&&s!=-1&&(r=r.substring(0,t)+r.substring(t,s).replace(/:/g,";")+r.substring(s,r.length));let i=Ze.exec(r||""),n={},o=14;for(;o--;)n[et[o]]=i[o]||"";return t!=-1&&s!=-1&&(n.source=e,n.host=n.host.substring(1,n.host.length-1).replace(/;/g,":"),n.authority=n.authority.replace("[","").replace("]","").replace(/;/g,":"),n.ipv6uri=!0),n.pathNames=tt(n,n.path),n.queryKey=st(n,n.query),n}function tt(r,e){let t=/\/{2,9}/g,s=e.replace(t,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&s.splice(0,1),e.slice(-1)=="/"&&s.splice(s.length-1,1),s}function st(r,e){let t={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,i,n){i&&(t[i]=n)}),t}var se=typeof addEventListener=="function"&&typeof removeEventListener=="function",Y=[];se&&addEventListener("offline",()=>{Y.forEach(r=>r())},!1);var J=(()=>{class r extends f{constructor(t,s){if(super(),this.binaryType=Ce,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(s=t,t=null),t){let i=x(t);s.hostname=i.host,s.secure=i.protocol==="https"||i.protocol==="wss",s.port=i.port,i.query&&(s.query=i.query)}else s.host&&(s.hostname=x(s.host).host);g(this,s),this.secure=s.secure!=null?s.secure:typeof location<"u"&&location.protocol==="https:",s.hostname&&!s.port&&(s.port=this.secure?"443":"80"),this.hostname=s.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=s.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},s.transports.forEach(i=>{let n=i.prototype.name;this.transports.push(n),this._transportsByName[n]=i}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},s),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Be(this.opts.query)),se&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Y.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){let s=Object.assign({},this.opts.query);s.EIO=j,s.transport=t,this.id&&(s.sid=this.id);let i=Object.assign({},this.opts,{query:s,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](i)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let t=this.opts.rememberUpgrade&&r.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let s=this.createTransport(t);s.open(),this.setTransport(s)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",s=>this._onClose("transport close",s))}onOpen(){this.readyState="open",r.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let s=new Error("server error");s.code=t.data,this._onError(s);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let s=1;for(let i=0;i<this.writeBuffer.length;i++){let n=this.writeBuffer[i].data;if(n&&(s+=Se(n)),i>0&&s>this._maxPayload)return this.writeBuffer.slice(0,i);s+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,y(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,s,i){return this._sendPacket("message",t,s,i),this}send(t,s,i){return this._sendPacket("message",t,s,i),this}_sendPacket(t,s,i,n){if(typeof s=="function"&&(n=s,s=void 0),typeof i=="function"&&(n=i,i=null),this.readyState==="closing"||this.readyState==="closed")return;i=i||{},i.compress=i.compress!==!1;let o={type:t,data:s,options:i};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),n&&this.once("flush",n),this.flush()}close(){let t=()=>{this._onClose("forced close"),this.transport.close()},s=()=>{this.off("upgrade",s),this.off("upgradeError",s),t()},i=()=>{this.once("upgrade",s),this.once("upgradeError",s)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?i():t()}):this.upgrading?i():t()),this}_onError(t){if(r.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,s){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),se&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let i=Y.indexOf(this._offlineEventListener);i!==-1&&Y.splice(i,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,s),this.writeBuffer=[],this._prevBufferLen=0}}}return r.protocol=j,r})(),z=class extends J{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),s=!1;J.priorWebsocketSuccess=!1;let i=()=>{s||(t.send([{type:"ping",data:"probe"}]),t.once("packet",b=>{if(!s)if(b.type==="pong"&&b.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;J.priorWebsocketSuccess=t.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(p(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{let C=new Error("probe error");C.transport=t.name,this.emitReserved("upgradeError",C)}}))};function n(){s||(s=!0,p(),t.close(),t=null)}let o=b=>{let C=new Error("probe error: "+b);C.transport=t.name,n(),this.emitReserved("upgradeError",C)};function c(){o("transport closed")}function a(){o("socket closed")}function m(b){t&&b.name!==t.name&&n()}let p=()=>{t.removeListener("open",i),t.removeListener("error",o),t.removeListener("close",c),this.off("close",a),this.off("upgrading",m)};t.once("open",i),t.once("error",o),t.once("close",c),this.once("close",a),this.once("upgrading",m),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{s||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let t=[];for(let s=0;s<e.length;s++)~this.transports.indexOf(e[s])&&t.push(e[s]);return t}},T=class extends z{constructor(e,t={}){let s=typeof e=="object"?e:t;(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(i=>te[i]).filter(i=>!!i)),super(e,s)}};var ds=T.protocol;function Fe(r,e="",t){let s=r;t=t||typeof location<"u"&&location,r==null&&(r=t.protocol+"//"+t.host),typeof r=="string"&&(r.charAt(0)==="/"&&(r.charAt(1)==="/"?r=t.protocol+r:r=t.host+r),/^(https?|wss?):\/\//.test(r)||(typeof t<"u"?r=t.protocol+"//"+r:r="https://"+r),s=x(r)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";let n=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+n+":"+s.port+e,s.href=s.protocol+"://"+n+(t&&t.port===s.port?"":":"+s.port),s}var ae={};We(ae,{Decoder:()=>oe,Encoder:()=>ne,PacketType:()=>h,protocol:()=>He});var it=typeof ArrayBuffer=="function",nt=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r.buffer instanceof ArrayBuffer,Ie=Object.prototype.toString,ot=typeof Blob=="function"||typeof Blob<"u"&&Ie.call(Blob)==="[object BlobConstructor]",ct=typeof File=="function"||typeof File<"u"&&Ie.call(File)==="[object FileConstructor]";function D(r){return it&&(r instanceof ArrayBuffer||nt(r))||ot&&r instanceof Blob||ct&&r instanceof File}function q(r,e){if(!r||typeof r!="object")return!1;if(Array.isArray(r)){for(let t=0,s=r.length;t<s;t++)if(q(r[t]))return!0;return!1}if(D(r))return!0;if(r.toJSON&&typeof r.toJSON=="function"&&arguments.length===1)return q(r.toJSON(),!0);for(let t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&q(r[t]))return!0;return!1}function Ue(r){let e=[],t=r.data,s=r;return s.data=re(t,e),s.attachments=e.length,{packet:s,buffers:e}}function re(r,e){if(!r)return r;if(D(r)){let t={_placeholder:!0,num:e.length};return e.push(r),t}else if(Array.isArray(r)){let t=new Array(r.length);for(let s=0;s<r.length;s++)t[s]=re(r[s],e);return t}else if(typeof r=="object"&&!(r instanceof Date)){let t={};for(let s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=re(r[s],e));return t}return r}function Ve(r,e){return r.data=ie(r.data,e),delete r.attachments,r}function ie(r,e){if(!r)return r;if(r&&r._placeholder===!0){if(typeof r.num=="number"&&r.num>=0&&r.num<e.length)return e[r.num];throw new Error("illegal attachments")}else if(Array.isArray(r))for(let t=0;t<r.length;t++)r[t]=ie(r[t],e);else if(typeof r=="object")for(let t in r)Object.prototype.hasOwnProperty.call(r,t)&&(r[t]=ie(r[t],e));return r}var at=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],He=5,h=(function(r){return r[r.CONNECT=0]="CONNECT",r[r.DISCONNECT=1]="DISCONNECT",r[r.EVENT=2]="EVENT",r[r.ACK=3]="ACK",r[r.CONNECT_ERROR=4]="CONNECT_ERROR",r[r.BINARY_EVENT=5]="BINARY_EVENT",r[r.BINARY_ACK=6]="BINARY_ACK",r})(h||{}),ne=class{constructor(e){this.replacer=e}encode(e){return(e.type===h.EVENT||e.type===h.ACK)&&q(e)?this.encodeAsBinary({type:e.type===h.EVENT?h.BINARY_EVENT:h.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===h.BINARY_EVENT||e.type===h.BINARY_ACK)&&(t+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(t+=e.nsp+","),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){let t=Ue(e),s=this.encodeAsString(t.packet),i=t.buffers;return i.unshift(s),i}};function Me(r){return Object.prototype.toString.call(r)==="[object Object]"}var oe=class r extends f{constructor(e){super(),this.reviver=e}add(e){let t;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);let s=t.type===h.BINARY_EVENT;s||t.type===h.BINARY_ACK?(t.type=s?h.EVENT:h.ACK,this.reconstructor=new ce(t),t.attachments===0&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if(D(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let t=0,s={type:Number(e.charAt(0))};if(h[s.type]===void 0)throw new Error("unknown packet type "+s.type);if(s.type===h.BINARY_EVENT||s.type===h.BINARY_ACK){let n=t+1;for(;e.charAt(++t)!=="-"&&t!=e.length;);let o=e.substring(n,t);if(o!=Number(o)||e.charAt(t)!=="-")throw new Error("Illegal attachments");s.attachments=Number(o)}if(e.charAt(t+1)==="/"){let n=t+1;for(;++t&&!(e.charAt(t)===","||t===e.length););s.nsp=e.substring(n,t)}else s.nsp="/";let i=e.charAt(t+1);if(i!==""&&Number(i)==i){let n=t+1;for(;++t;){let o=e.charAt(t);if(o==null||Number(o)!=o){--t;break}if(t===e.length)break}s.id=Number(e.substring(n,t+1))}if(e.charAt(++t)){let n=this.tryParse(e.substr(t));if(r.isPayloadValid(s.type,n))s.data=n;else throw new Error("invalid payload")}return s}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case h.CONNECT:return Me(t);case h.DISCONNECT:return t===void 0;case h.CONNECT_ERROR:return typeof t=="string"||Me(t);case h.EVENT:case h.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&at.indexOf(t[0])===-1);case h.ACK:case h.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},ce=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){let t=Ve(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function l(r,e,t){return r.on(e,t),function(){r.off(e,t)}}var ht=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),A=class extends f{constructor(e,t,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[l(e,"open",this.onopen.bind(this)),l(e,"packet",this.onpacket.bind(this)),l(e,"error",this.onerror.bind(this)),l(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){var s,i,n;if(ht.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;let o={type:h.EVENT,data:t};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof t[t.length-1]=="function"){let p=this.ids++,b=t.pop();this._registerAckCallback(p,b),o.id=p}let c=(i=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||i===void 0?void 0:i.writable,a=this.connected&&!(!((n=this.io.engine)===null||n===void 0)&&n._hasPingExpired());return this.flags.volatile&&!c||(a?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(e,t){var s;let i=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(i===void 0){this.acks[e]=t;return}let n=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===e&&this.sendBuffer.splice(c,1);t.call(this,new Error("operation has timed out"))},i),o=(...c)=>{this.io.clearTimeoutFn(n),t.apply(this,c)};o.withError=!0,this.acks[e]=o}emitWithAck(e,...t){return new Promise((s,i)=>{let n=(o,c)=>o?i(o):s(c);n.withError=!0,t.push(n),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]=="function"&&(t=e.pop());let s={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((i,...n)=>s!==this._queue[0]?void 0:(i!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(i)):(this._queue.shift(),t&&t(null,...n)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:h.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(s=>String(s.id)===e)){let s=this.acks[e];delete this.acks[e],s.withError&&s.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case h.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case h.EVENT:case h.BINARY_EVENT:this.onevent(e);break;case h.ACK:case h.BINARY_ACK:this.onack(e);break;case h.DISCONNECT:this.ondisconnect();break;case h.CONNECT_ERROR:this.destroy();let s=new Error(e.data.message);s.data=e.data.data,this.emitReserved("connect_error",s);break}}onevent(e){let t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let t=this._anyListeners.slice();for(let s of t)s.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){let t=this,s=!1;return function(...i){s||(s=!0,t.packet({type:h.ACK,id:e,data:i}))}}onack(e){let t=this.acks[e.id];typeof t=="function"&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:h.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let t=this._anyListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let t=this._anyOutgoingListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let t=this._anyOutgoingListeners.slice();for(let s of t)s.apply(this,e.data)}}};function E(r){r=r||{},this.ms=r.min||100,this.max=r.max||1e4,this.factor=r.factor||2,this.jitter=r.jitter>0&&r.jitter<=1?r.jitter:0,this.attempts=0}E.prototype.duration=function(){var r=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),t=Math.floor(e*this.jitter*r);r=(Math.floor(e*10)&1)==0?r-t:r+t}return Math.min(r,this.max)|0};E.prototype.reset=function(){this.attempts=0};E.prototype.setMin=function(r){this.ms=r};E.prototype.setMax=function(r){this.max=r};E.prototype.setJitter=function(r){this.jitter=r};var R=class extends f{constructor(e,t){var s;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.opts=t,g(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor((s=t.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new E({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState="closed",this.uri=e;let i=t.parser||ae;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)===null||t===void 0||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)===null||t===void 0||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)===null||t===void 0||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new T(this.uri,this.opts);let t=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;let i=l(t,"open",function(){s.onopen(),e&&e()}),n=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),e?e(c):this.maybeReconnectOnOpen()},o=l(t,"error",n);if(this._timeout!==!1){let c=this._timeout,a=this.setTimeoutFn(()=>{i(),n(new Error("timeout")),t.close()},c);this.opts.autoUnref&&a.unref(),this.subs.push(()=>{this.clearTimeoutFn(a)})}return this.subs.push(i),this.subs.push(o),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let e=this.engine;this.subs.push(l(e,"ping",this.onping.bind(this)),l(e,"data",this.ondata.bind(this)),l(e,"error",this.onerror.bind(this)),l(e,"close",this.onclose.bind(this)),l(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){y(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let s=this.nsps[e];return s?this._autoConnect&&!s.active&&s.connect():(s=new A(this,e,t),this.nsps[e]=s),s}_destroy(e){let t=Object.keys(this.nsps);for(let s of t)if(this.nsps[s].active)return;this._close()}_packet(e){let t=this.encoder.encode(e);for(let s=0;s<t.length;s++)this.engine.write(t[s],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var s;this.cleanup(),(s=this.engine)===null||s===void 0||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let t=this.backoff.duration();this._reconnecting=!0;let s=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(i=>{i?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",i)):e.onreconnect()}))},t);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}};var F={};function I(r,e){typeof r=="object"&&(e=r,r=void 0),e=e||{};let t=Fe(r,e.path||"/socket.io"),s=t.source,i=t.id,n=t.path,o=F[i]&&n in F[i].nsps,c=e.forceNew||e["force new connection"]||e.multiplex===!1||o,a;return c?a=new R(s,e):(F[i]||(F[i]=new R(s,e)),a=F[i]),t.query&&!e.query&&(e.query=t.queryKey),a.socket(t.path,e)}Object.assign(I,{Manager:R,Socket:A,io:I,connect:I});var cr=(()=>{class r{$auth=ue(pe);namespaceConnectionCache={};connectToNamespace(t){if(this.namespaceConnectionCache[t]){let s=this.namespaceConnectionCache[t];return s.connected=new X,setTimeout(()=>{s.socket.connected&&s.connected.next(void 0)}),s.socket.on("connect",()=>{s.connected.next(void 0)}),s.end=()=>{s.socket.emit("end"),s.socket.removeAllListeners(),s.connected.complete()},this.namespaceConnectionCache[t]}else{let s=this.establishConnectionToNamespace(t);return s.connected=new X,s.socket.on("connect",()=>{s.connected.next(void 0)}),s.end=()=>{s.socket.emit("end"),s.socket.removeAllListeners(),s.connected.complete()},this.namespaceConnectionCache[t]=s,s}}getExistingNamespace(t){return this.namespaceConnectionCache[t]}establishConnectionToNamespace(t){let s=I(`${le.api.socket}/${t}`,{query:{token:this.$auth.token}});return{socket:s,request:(n,o)=>new he(c=>{s.emit(n,o,a=>{typeof a=="object"&&a.error?c.error(a):c.next(a),c.complete()})})}}static \u0275fac=function(s){return new(s||r)};static \u0275prov=fe({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{cr as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as g,b,c as z}from"./chunk-SIVN6M76.js";import{a as u}from"./chunk-
|
|
1
|
+
import{a as g,b,c as z}from"./chunk-SIVN6M76.js";import{a as u}from"./chunk-42IK7XM5.js";import{P as l,g as h,ia as f,n as c,na as a}from"./chunk-ZRDN4L2J.js";var d=h(g(),1),p=h(b(),1),w=h(z(),1);var x=(()=>{class r{$ws=a(u);io;fitAddon;webLinksAddon;resize;elementResize;pluginName;searchFilter=null;logBuffer=[];maxBufferSize=1e3;term;startTerminal(e,s={},n,F){this.pluginName=F,this.elementResize=n,this.io=this.$ws.connectToNamespace("log"),this.term=new w.Terminal(s),setTimeout(()=>{this.term.loadAddon(this.fitAddon),this.term.loadAddon(this.webLinksAddon)}),this.fitAddon=new d.FitAddon,this.webLinksAddon=new p.WebLinksAddon,this.resize=new c,this.term.open(e.nativeElement),setTimeout(()=>{this.fitAddon.activate(this.term),this.fitAddon.fit()}),this.io.connected.subscribe(()=>{this.term.reset(),this.logBuffer=[],this.io.socket.emit("tail-log",{cols:this.term.cols,rows:this.term.rows})}),this.io.socket.on("disconnect",()=>{this.term.write(`
|
|
2
2
|
\r
|
|
3
3
|
\rWebsocket failed to connect. Is the server running?
|
|
4
4
|
\r
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as l}from"./chunk-54X33YUH.js";import{l as c}from"./chunk-
|
|
1
|
+
import{g as l}from"./chunk-54X33YUH.js";import{l as c}from"./chunk-HBVMTCYO.js";import{La as i,db as r,mc as s,rc as a,tc as m,wb as o,zb as p}from"./chunk-ZRDN4L2J.js";var f=(e,d)=>({github:e,discord:d}),k=(()=>{class e{linkGithub='<a href="https://github.com/homebridge/homebridge-config-ui-x/issues/new?template=feature-request.yml" target="_blank" rel="noopener noreferrer">GitHub</a>';linkDiscord='<a href="https://discord.gg/kqNCe2D" target="_blank" rel="noopener noreferrer">Discord</a>';static \u0275fac=function(t){return new(t||e)};static \u0275cmp=r({type:e,selectors:[["app-support-banner"]],decls:2,vars:8,consts:[["type","info",1,"mt-3","mb-0","grey-text","small",3,"dismissible","innerHtml"]],template:function(t,n){t&1&&(p(0,"ngb-alert",0),a(1,"translate")),t&2&&o("dismissible",!1)("innerHtml",m(1,2,"common.phrases.support",s(5,f,n.linkGithub,n.linkDiscord)),i)},dependencies:[l,c],encapsulation:2})}return e})();export{k as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as u,h as n}from"./chunk-5ZHDYUXA.js";import{k as f,n as l,q as d}from"./chunk-
|
|
1
|
+
import{e as u,h as n}from"./chunk-5ZHDYUXA.js";import{k as f,n as l,q as d}from"./chunk-HBVMTCYO.js";import{eb as s,h as m,ia as p,ja as i,na as o,x as c}from"./chunk-ZRDN4L2J.js";var a=(()=>{class r{$api=o(d);$router=o(u);$toastr=o(l);$translate=o(f);resolve(){return m(this,null,function*(){try{return yield c(this.$api.get("/users"))}catch(t){console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error")),this.$router.navigate(["/"])}})}static \u0275fac=function(e){return new(e||r)};static \u0275prov=p({token:r,factory:r.\u0275fac})}return r})();var h=[{path:"",loadComponent:()=>import("./chunk-B56MVLLL.js").then(r=>r.UsersComponent),resolve:{homebridgeUsers:a}}],g=(()=>{class r{static \u0275fac=function(e){return new(e||r)};static \u0275mod=s({type:r});static \u0275inj=i({imports:[n.forChild(h),n]})}return r})();var T=(()=>{class r{static \u0275fac=function(e){return new(e||r)};static \u0275mod=s({type:r});static \u0275inj=i({providers:[a],imports:[g]})}return r})();export{T as UsersModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as t}from"./chunk-
|
|
1
|
+
import{c as t}from"./chunk-W4X5OSYG.js";import{b as i}from"./chunk-TGQIPKOK.js";import{eb as r,ja as o}from"./chunk-ZRDN4L2J.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 +1 @@
|
|
|
1
|
-
import{k as v,l as E,n as _,q as h}from"./chunk-
|
|
1
|
+
import{k as v,l as E,n as _,q as h}from"./chunk-HBVMTCYO.js";import{$b as a,Ab as i,Bb as e,Cb as f,Nb as u,Qa as n,_b as o,db as d,na as l,qb as c,rb as x,rc as p,sc as s}from"./chunk-ZRDN4L2J.js";function y(t,w){if(t&1&&(i(0,"div",7),o(1),e()),t&2){let r=u();n(),a(r.error)}}function C(t,w){t&1&&(i(0,"p",8),o(1),p(2,"translate"),e()),t&2&&(n(),a(s(2,1,"platform.linux.server_will_power_down")))}var B=(()=>{class t{$api=l(h);$toastr=l(_);$translate=l(v);error=!1;ngOnInit(){this.$api.put("/platform-tools/linux/shutdown-host",{}).subscribe({error:r=>{console.error(r),this.error=this.$translate.instant("platform.linux.server_restart_error"),this.$toastr.error(this.$translate.instant("platform.linux.server_restart_error"),this.$translate.instant("toast.title_error"))}})}static \u0275fac=function(m){return new(m||t)};static \u0275cmp=d({type:t,selectors:[["ng-component"]],decls:13,vars:7,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fas","fa-power-off",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"alert","alert-error","my-4"],[1,"grey-text"]],template:function(m,S){m&1&&(i(0,"div",0)(1,"h3",1),o(2),p(3,"translate"),e()(),i(4,"div",2)(5,"div",3),f(6,"i",4),e(),i(7,"div",5)(8,"h4",6),o(9),p(10,"translate"),e(),c(11,y,2,1,"div",7)(12,C,3,3,"p",8),e()()),m&2&&(n(2),a(s(3,3,"menu.restart.title")),n(7),a(s(10,5,"platform.linux.shutting_down_server")),n(2),x(S.error?11:12))},dependencies:[E],encapsulation:2})}return t})();export{B as ShutdownLinuxComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as f,h as s}from"./chunk-5ZHDYUXA.js";import{k as l,n as u,q as d}from"./chunk-
|
|
1
|
+
import{e as f,h as s}from"./chunk-5ZHDYUXA.js";import{k as l,n as u,q as d}from"./chunk-HBVMTCYO.js";import{eb as a,h as p,ia as m,ja as i,na as e,x as c}from"./chunk-ZRDN4L2J.js";var n=(()=>{class t{$api=e(d);$router=e(f);$toastr=e(u);$translate=e(l);resolve(){return p(this,null,function*(){try{return yield c(this.$api.get("/platform-tools/docker/startup-script"))}catch(r){console.error(r),this.$toastr.error(r.message,this.$translate.instant("toast.title_error")),this.$router.navigate(["/"])}})}static \u0275fac=function(o){return new(o||t)};static \u0275prov=m({token:t,factory:t.\u0275fac})}return t})();var S=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"startup-script",loadComponent:()=>import("./chunk-7NROXTSH.js").then(t=>t.StartupScriptComponent),resolve:{startupScript:n}},{path:"restart-container",loadComponent:()=>import("./chunk-TZGLHZKZ.js").then(t=>t.ContainerRestartComponent)}],v=(()=>{class t{static \u0275fac=function(o){return new(o||t)};static \u0275mod=a({type:t});static \u0275inj=i({imports:[s.forChild(S),s]})}return t})();var T=(()=>{class t{static \u0275fac=function(o){return new(o||t)};static \u0275mod=a({type:t});static \u0275inj=i({providers:[n],imports:[v]})}return t})();export{T as DockerModule};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as P}from"./chunk-JHD5MRCG.js";import{a as z}from"./chunk-STRTFJ4I.js";import{C as $,c as E,e as y,l as k}from"./chunk-3PGUQRQW.js";import{c as D}from"./chunk-5ZHDYUXA.js";import{b as O}from"./chunk-
|
|
1
|
+
import{a as P}from"./chunk-JHD5MRCG.js";import{a as z}from"./chunk-STRTFJ4I.js";import{C as $,c as E,e as y,l as k}from"./chunk-3PGUQRQW.js";import{c as D}from"./chunk-5ZHDYUXA.js";import{b as O}from"./chunk-HUHCZOMP.js";import{k as T,n as I,q as H}from"./chunk-HBVMTCYO.js";import{Ib as g,Lb as _,Nb as a,Qa as p,_b as v,db as x,fc as b,gc as M,h as S,hc as V,na as r,qb as m,rb as u,sa as l,ta as c,wb as f,x as C,xb as d,yb as s,zb as w}from"./chunk-ZRDN4L2J.js";function A(i,h){i&1&&w(0,"i",6)}function L(i,h){i&1&&w(0,"i",7)}function F(i,h){if(i&1){let t=g();d(0,"ngx-monaco-editor",10),_("onInit",function(e){l(t);let o=a();return c(o.onEditorInit(e))})("keydown.control.s",function(e){l(t);let o=a();return e.preventDefault(),c(o.onSave())})("keydown.meta.s",function(e){l(t);let o=a();return e.preventDefault(),c(o.onSave())}),s()}if(i&2){let t=a();f("options",t.editorOptions)("model",t.monacoEditorModel)}}function W(i,h){if(i&1){let t=g();d(0,"textarea",11),V("ngModelChange",function(e){l(t);let o=a();return M(o.startupScript,e)||(o.startupScript=e),c(e)}),v(1," "),s()}if(i&2){let t=a();b("ngModel",t.startupScript)}}var tt=(()=>{class i{$api=r(H);$md=r(z);$route=r(D);$settings=r(O);$toastr=r(I);$translate=r(T);lastHeight;visualViewPortEventCallback;startupScript;saveInProgress;isMobile=!1;options={printMargin:!1};monacoEditor;editorOptions;monacoEditorModel;constructor(){this.isMobile=this.$md.detect.mobile()}ngOnInit(){this.editorOptions={language:"shell",theme:this.$settings.actualLightingMode==="dark"?"vs-dark":"vs-light"},this.visualViewPortEventCallback=()=>this.visualViewPortChanged(),this.lastHeight=window.innerHeight,window.visualViewport&&!this.isMobile&&(window.visualViewport.addEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.disableTouchMove()),this.$route.data.subscribe(t=>{this.startupScript=t.startupScript.script}),this.monacoEditorModel={value:"",language:"shell"}}onEditorInit(t){this.monacoEditor=t,this.monacoEditor.getModel().setValue(this.startupScript)}onSave(){return S(this,null,function*(){if(!this.saveInProgress){if(this.saveInProgress=!0,this.isMobile||(yield this.monacoEditor.getAction("editor.action.formatDocument").run(),this.startupScript=this.monacoEditor.getModel().getValue()),!["#!/bin/sh","#!/bin/bash"].includes(this.startupScript.split(`
|
|
2
2
|
`)[0].trim())){this.$toastr.error(this.$translate.instant("platform.docker.must_use_hashbang"),this.$translate.instant("toast.title_error")),this.startupScript=`#!/bin/sh
|
|
3
3
|
|
|
4
4
|
${this.startupScript}`,this.isMobile||this.monacoEditor.getModel().setValue(this.startupScript),this.saveInProgress=!1;return}try{yield C(this.$api.put("/platform-tools/docker/startup-script",{script:this.startupScript})),this.$toastr.success(this.$translate.instant("platform.docker.restart_required"),this.$translate.instant("platform.docker.script_saved"))}catch(t){console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error"))}this.saveInProgress=!1}})}ngOnDestroy(){window.visualViewport&&(window.visualViewport.removeEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.enableTouchMove()),this.monacoEditor&&this.monacoEditor.dispose()}visualViewPortChanged(){this.lastHeight<window.visualViewport.height&&document.activeElement.blur(),window.visualViewport.height<window.innerHeight?(this.$md.enableTouchMove(),this.lastHeight=window.visualViewport.height):window.visualViewport.height===window.innerHeight&&(this.$md.disableTouchMove(),this.lastHeight=window.visualViewport.height)}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=x({type:i,selectors:[["ng-component"]],decls:11,vars:4,consts:[[1,"flex-column","d-flex","align-items-stretch","h-100"],[1,"row","mb-3"],[1,"col-6"],[1,"primary-text","m-0","font-monospace"],[1,"col-6","text-end"],[1,"btn","btn-primary","waves-effect","m-0",3,"click","disabled"],[1,"fas","fa-spinner","fa-pulse"],[1,"fas","fa-floppy-disk"],[1,"flex-grow-1","h-100","w-100","my-2",3,"options","model"],["wrap","off","autocomplete","off","autocorrect","off","autocapitalize","off","spellcheck","false",1,"hb-plain-text-editor","align-self-end","h-100","w-100","my-2",3,"ngModel"],[1,"flex-grow-1","h-100","w-100","my-2",3,"onInit","keydown.control.s","keydown.meta.s","options","model"],["wrap","off","autocomplete","off","autocorrect","off","autocapitalize","off","spellcheck","false",1,"hb-plain-text-editor","align-self-end","h-100","w-100","my-2",3,"ngModelChange","ngModel"]],template:function(n,e){n&1&&(d(0,"div",0)(1,"div",1)(2,"div",2)(3,"h3",3),v(4,"startup.sh"),s()(),d(5,"div",4)(6,"button",5),_("click",function(){return e.onSave()}),m(7,A,1,0,"i",6)(8,L,1,0,"i",7),s()()(),m(9,F,1,2,"ngx-monaco-editor",8),m(10,W,2,1,"textarea",9),s()),n&2&&(p(6),f("disabled",e.saveInProgress),p(),u(e.saveInProgress?7:8),p(2),u(e.isMobile?-1:9),p(),u(e.isMobile?10:-1))},dependencies:[P,$,E,y,k],encapsulation:2})}return i})();export{tt as StartupScriptComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
1
|
+
import{a as n}from"./chunk-2RC4SPAD.js";import{h as i}from"./chunk-5ZHDYUXA.js";import"./chunk-HUHCZOMP.js";import"./chunk-HBVMTCYO.js";import{eb as r,ja as o}from"./chunk-ZRDN4L2J.js";var a=[{path:"",loadComponent:()=>import("./chunk-ND3RS2TV.js").then(t=>t.SetupWizardComponent)}],u=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=r({type:t});static \u0275inj=o({imports:[i.forChild(a),i]})}return t})();var l=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=r({type:t});static \u0275inj=o({providers:[n],imports:[u]})}return t})();export{l as SetupWizardModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as me}from"./chunk-YCBALV2Q.js";import{a as le}from"./chunk-TMGK6CPZ.js";import{g as Q,m as k,n as ae}from"./chunk-54X33YUH.js";import{A as re,C as A,D as G,b as q,c as F,d as g,e as V,f as z,g as N,j as S,m as R,p as O,q as L,r as J}from"./chunk-3PGUQRQW.js";import{b as H}from"./chunk-2W3RVZHX.js";import{c as oe}from"./chunk-5ZHDYUXA.js";import{a as Ce,b as se}from"./chunk-QDW2BKN2.js";import{k as T,l as E,n as B,q as M}from"./chunk-CWBXOHGU.js";import{$b as d,Ec as ne,Ib as I,Lb as f,Nb as _,Pc as j,Qa as e,_b as m,ac as x,bc as ee,db as y,g as xe,h as W,lc as D,mc as te,na as c,pb as u,qb as w,rb as h,rc as a,sa as $,sc as o,ta as U,tb as X,tc as ie,ub as Y,vb as Z,wb as b,xb as i,yb as t,zb as p}from"./chunk-ZRDN4L2J.js";function we(r,C){r&1&&(i(0,"ngb-alert",13)(1,"p",20),m(2),a(3,"translate"),t()()),r&2&&(b("dismissible",!1),e(2),d(o(3,2,"login.invalid_password")))}var pe=(()=>{class r{$activeModal=c(k);$api=c(M);$toastr=c(B);$translate=c(T);invalidCredentials=!1;formGroup=new N({password:new S("",[g.required])});disable2fa(){this.invalidCredentials=!1,this.$api.post("/users/otp/deactivate",this.formGroup.value).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.setup_2fa_disable_success"),this.$translate.instant("toast.title_success"))},error:()=>{this.formGroup.setValue({password:""}),this.invalidCredentials=!0}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],decls:34,vars:27,consts:[[1,"modal-content",2,"min-height","300px"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-key","primary-text",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["type","password","autocomplete","current-password",1,"form-control","custom-input",3,"formControl","placeholder"],["type","error",1,"mt-3","mb-0",3,"dismissible"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"click","disabled"],[1,"mb-0"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"div",1)(2,"h5",2),m(3),a(4,"translate"),t(),i(5,"button",3),a(6,"translate"),f("click",function(){return l.dismissModal()}),t()(),i(7,"div",4)(8,"div",5),p(9,"i",6),t(),i(10,"ul",7)(11,"li"),m(12),a(13,"translate"),t()(),i(14,"ul",8)(15,"li",9)(16,"label",10),m(17),a(18,"translate"),t(),i(19,"div",11),p(20,"input",12),a(21,"translate"),t()()(),w(22,we,4,4,"ngb-alert",13),t(),i(23,"div",14)(24,"div",15)(25,"button",16),a(26,"translate"),f("click",function(){return l.dismissModal()}),m(27),a(28,"translate"),t()(),p(29,"div",17),i(30,"div",18)(31,"button",19),f("click",function(){return l.disable2fa()}),m(32),a(33,"translate"),t()()()()),s&2&&(e(3),d(o(4,11,"users.setup_2fa_disable")),e(2),u("aria-label",o(6,13,"form.button_close")),e(7),d(o(13,15,"users.setup_2fa_disable_current_password")),e(5),d(o(18,17,"users.label_password")),e(3),b("formControl",l.formGroup.controls.password)("placeholder",o(21,19,"users.label_password")),e(2),h(l.invalidCredentials&&!l.formGroup.controls.password.value?22:-1),e(3),u("aria-label",o(26,21,"form.button_close")),e(2),x(" ",o(28,23,"form.button_close")," "),e(4),b("disabled",l.formGroup.invalid),e(),x(" ",o(33,25,"form.button_disable")," "))},dependencies:[A,F,V,G,O,Q,E],encapsulation:2})}return r})();var de=xe(Ce(),1);var he=r=>({timeDiffError:r});function ge(r,C){r&1&&(i(0,"li"),m(1),a(2,"translate"),t()),r&2&&(e(),d(o(2,1,"users.setup_2fa_scan_qr_code")))}function Se(r,C){if(r&1&&(i(0,"ngb-alert",8)(1,"p",16),m(2),a(3,"translate"),t(),i(4,"p",17),m(5),a(6,"translate"),t()()),r&2){let n=_();b("dismissible",!1),e(2),d(o(3,3,"users.setup_2fa_cannot_setup_2fa")),e(3),d(ie(6,5,"users.setup_2fa_server_time_out",D(8,he,n.timeDiffError)))}}function ye(r,C){r&1&&p(0,"i",27)}function Ee(r,C){r&1&&p(0,"i",28)}function $e(r,C){if(r&1){let n=I();i(0,"div",21),m(1),a(2,"translate"),p(3,"br"),m(4),i(5,"a",26),f("click",function(){$(n);let l=_(2);return U(l.copySecretToClipboard())}),w(6,ye,1,0,"i",27)(7,Ee,1,0,"i",28),t()()}if(r&2){let n=_(2);e(),x(" ",o(2,3,"users.setup_2fa_scan_qr_manual")),e(3),x(" ",n.otpSecret," "),e(2),h(n.secretCopied?6:7)}}function Ue(r,C){if(r&1&&(i(0,"ul",9)(1,"li",18)(2,"div",19),p(3,"app-qrcode",20),t(),w(4,$e,8,5,"div",21),t(),i(5,"li",22)(6,"label",23),m(7),a(8,"translate"),t(),i(9,"div",24),p(10,"input",25),t()()()),r&2){let n=_();e(3),b("data",n.otpString),e(),h(n.otpSecret?4:-1),e(3),d(o(8,4,"users.setup_2fa_enter_code")),e(3),b("formControl",n.formGroup.controls.code)}}function ke(r,C){if(r&1){let n=I();i(0,"button",29),a(1,"translate"),f("click",function(){$(n);let l=_();return U(l.dismissModal())}),m(2),a(3,"translate"),t()}r&2&&(u("aria-label",o(1,2,"form.button_close")),e(2),x(" ",o(3,4,"form.button_close")," "))}function Te(r,C){if(r&1){let n=I();i(0,"button",29),a(1,"translate"),f("click",function(){$(n);let l=_();return U(l.dismissModal())}),m(2),a(3,"translate"),t()}r&2&&(u("aria-label",o(1,2,"form.button_close")),e(2),x(" ",o(3,4,"form.button_close")," "))}function Be(r,C){if(r&1){let n=I();i(0,"button",30),f("click",function(){$(n);let l=_();return U(l.enable2fa())}),m(1),a(2,"translate"),t()}if(r&2){let n=_();b("disabled",n.formGroup.invalid),e(),x(" ",o(2,2,"form.button_enable")," ")}}var ce=(()=>{class r{$activeModal=c(k);$api=c(M);$toastr=c(B);$translate=c(T);copyTimeout=null;user;timeDiffError=null;otpString;otpSecret;secretCopied=!1;formGroup=new N({code:new S("",[g.required,g.minLength(6),g.maxLength(6)])});ngOnInit(){this.$api.post("/users/otp/setup",{}).subscribe({next:n=>{this.checkTimeDiff(n.timestamp),this.timeDiffError||(this.otpString=n.otpauth,this.otpSecret=new URL(this.otpString).searchParams.get("secret")||"")},error:n=>{this.$activeModal.dismiss(),console.error(n),this.$toastr.error(this.$translate.instant("users.setup_2fa_enable_error"),this.$translate.instant("toast.title_error"))}})}enable2fa(){this.$api.post("/users/otp/activate",this.formGroup.value).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("users.setup_2fa_enabled_success"),this.$translate.instant("toast.title_success")),this.$activeModal.close()},error:n=>{console.error(n),this.$toastr.error(this.$translate.instant("users.setup_2fa_activate_error"),this.$translate.instant("toast.title_error"))}})}copySecretToClipboard(){return W(this,null,function*(){yield navigator.clipboard.writeText(this.otpSecret),this.secretCopied=!0,this.copyTimeout&&clearTimeout(this.copyTimeout),this.copyTimeout=setTimeout(()=>{this.secretCopied=!1},3e3)})}dismissModal(){this.$activeModal.dismiss("Dismiss")}checkTimeDiff(n){let s=(0,de.default)(n).diff(new Date,"millisecond");s<-5e3||s>5e3?this.timeDiffError=s:this.timeDiffError=null}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],inputs:{user:"user"},decls:24,vars:15,consts:[[1,"modal-content","setup2fa"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-key","primary-text",2,"font-size","75px"],[1,"mb-3"],["type","error",1,"mb-0",3,"dismissible"],[1,"list-group","list-group-box","mb-0"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"disabled"],[1,"fw-bold","mb-1"],[1,"mb-0"],[1,"list-group-item","text-center"],[1,"text-center","w-100","d-flex","justify-content-center","my-2"],[1,"mx-auto",2,"width","175px","height","175px",3,"data"],[1,"grey-text","small","mt-0","mb-1"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["type","text","placeholder","eg. 123456","autocomplete","one-time-code","autocapitalize","none","inputmode","numeric","pattern","[0-9]*",1,"form-control","custom-input",3,"formControl"],["href","javascript:void(0)",1,"ms-1","text-primary",3,"click"],[1,"fas","fa-check","green-text"],[1,"fas","fa-copy"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"div",1)(2,"h5",2),m(3),a(4,"translate"),t(),i(5,"button",3),a(6,"translate"),f("click",function(){return l.dismissModal()}),t()(),i(7,"div",4)(8,"div",5),p(9,"i",6),t(),i(10,"ul",7)(11,"li"),m(12),a(13,"translate"),t(),w(14,ge,3,3,"li"),t(),w(15,Se,7,10,"ngb-alert",8),w(16,Ue,11,6,"ul",9),t(),i(17,"div",10)(18,"div",11),w(19,ke,4,6,"button",12),t(),i(20,"div",13),w(21,Te,4,6,"button",12),t(),i(22,"div",14),w(23,Be,3,4,"button",15),t()()()),s&2&&(e(3),d(o(4,9,"users.setup_2fa")),e(2),u("aria-label",o(6,11,"form.button_close")),e(7),d(o(13,13,"users.setup_2fa_warning")),e(2),h(l.timeDiffError?-1:14),e(),h(l.timeDiffError?15:-1),e(),h(l.timeDiffError?-1:16),e(3),h(l.timeDiffError?-1:19),e(2),h(l.timeDiffError?21:-1),e(2),h(l.timeDiffError?-1:23))},dependencies:[Q,le,A,F,V,re,G,O,E],encapsulation:2})}return r})();var ue=r=>({"is-invalid":r}),fe=(()=>{class r{$activeModal=c(k);$api=c(M);$toastr=c(B);$translate=c(T);form=new N({username:new S("",[g.required]),name:new S("",[g.required]),password:new S("",[g.compose([g.required,g.minLength(4)])]),passwordConfirm:new S("",[g.required]),admin:new S(!0)},this.matchPassword);onSubmit({value:n}){this.$api.post("/users",n).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.toast_added_new_user"),this.$translate.instant("toast.title_success"))},error:s=>{this.$toastr.error(s.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}matchPassword(n){let s=n.get("password").value,l=n.get("passwordConfirm").value;if(s!==l)n.get("passwordConfirm").setErrors({matchPassword:!0});else return null}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],decls:58,vars:50,consts:[[1,"modal-content"],["novalidate","",3,"ngSubmit","formGroup"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-user-plus","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-username",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["formControlName","username","type","text","id","form-username","autocomplete","username","autocapitalize","none",1,"form-control","custom-input"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","name","type","text","id","form-name","autocomplete","name",1,"form-control","custom-input"],["for","form-pass",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","password","type","password","autocomplete","new-password","id","form-pass",1,"form-control","custom-input",3,"ngClass"],["for","form-pass-confirm",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","passwordConfirm","type","password","autocomplete","new-password","id","form-pass-confirm",1,"form-control","custom-input",3,"ngClass"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],[1,"text-start"],[1,"text-end","grey-text","d-flex","align-items-center"],["formControlName","admin","type","checkbox","id","isAdmin",1,"rendux-input"],["for","isAdmin",1,"rendux-label","ms-3"],[1,"modal-footer","justify-content-between"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"form",1),f("ngSubmit",function(){return l.onSubmit(l.form)}),i(2,"div",2)(3,"h5",3),m(4),a(5,"translate"),t(),i(6,"button",4),a(7,"translate"),f("click",function(){return l.dismissModal()}),t()(),i(8,"div",5)(9,"div",6),p(10,"i",7),t(),i(11,"ul",8)(12,"li",9)(13,"label",10),m(14),a(15,"translate"),t(),i(16,"div",11),p(17,"input",12),a(18,"translate"),t()(),i(19,"li",9)(20,"label",13),m(21),a(22,"translate"),t(),i(23,"div",11),p(24,"input",14),a(25,"translate"),t()(),i(26,"li",9)(27,"label",15),m(28),a(29,"translate"),t(),i(30,"div",11),p(31,"input",16),a(32,"translate"),t()(),i(33,"li",9)(34,"label",17),m(35),a(36,"translate"),t(),i(37,"div",11),p(38,"input",18),a(39,"translate"),t()(),i(40,"li",19)(41,"span",20),m(42),a(43,"translate"),t(),i(44,"div",21),p(45,"input",22),a(46,"translate"),p(47,"label",23),t()()()(),i(48,"div",24)(49,"div",20)(50,"button",25),f("click",function(){return l.dismissModal()}),m(51),a(52,"translate"),t()(),p(53,"div",26),i(54,"div",27)(55,"button",28),m(56),a(57,"translate"),t()()()()()),s&2&&(e(),b("formGroup",l.form),e(3),d(o(5,18,"users.title_add_user")),e(2),u("aria-label",o(7,20,"form.button_close")),e(8),d(o(15,22,"users.label_username")),e(3),u("aria-label",o(18,24,"users.label_username")),e(4),d(o(22,26,"users.label_full_name")),e(3),u("aria-label",o(25,28,"users.label_full_name")),e(4),d(o(29,30,"users.label_password")),e(3),b("ngClass",D(46,ue,l.form.controls.password.dirty&&l.form.controls.password.errors)),u("aria-label",o(32,32,"users.label_password")),e(4),d(o(36,34,"users.label_confirm_password")),e(3),b("ngClass",D(48,ue,l.form.controls.passwordConfirm.dirty&&l.form.controls.passwordConfirm.errors)),u("aria-label",o(39,36,"users.label_confirm_password")),e(4),d(o(43,38,"users.label_admin_user")),e(3),u("aria-label",o(46,40,"users.label_admin_user")),e(6),x(" ",o(52,42,"form.button_close")," "),e(4),b("disabled",!l.form.valid),e(),x(" ",o(57,44,"form.button_save")," "))},dependencies:[A,R,F,q,V,z,G,L,J,j,E],encapsulation:2})}return r})();var be=r=>({"is-invalid":r});function Me(r,C){if(r&1&&(i(0,"li",9)(1,"label",27),m(2),a(3,"translate"),t(),i(4,"div",11),p(5,"input",28),a(6,"translate"),t()()),r&2){let n=_();e(2),d(o(3,3,"users.label_confirm_password")),e(3),b("ngClass",D(7,be,n.form.controls.passwordConfirm.dirty&&n.form.controls.passwordConfirm.errors)),u("aria-label",o(6,5,"users.label_confirm_password"))}}var _e=(()=>{class r{$activeModal=c(k);$api=c(M);$auth=c(H);$cdr=c(ne);$toastr=c(B);$translate=c(T);initialFormValue={};user;isCurrentUser=!1;form=new N({username:new S("",[g.required]),name:new S("",[g.required]),password:new S(""),passwordConfirm:new S(""),admin:new S(!0)},this.matchPassword);ngOnInit(){this.isCurrentUser=this.$auth.user.username===this.user.username,this.form.patchValue(this.user),this.initialFormValue=this.form.getRawValue(),this.form.valueChanges.subscribe(()=>this.$cdr.detectChanges())}onSubmit({value:n}){this.$api.patch(`/users/${this.user.id}`,n).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.toast_updated_user"),this.$translate.instant("toast.title_success")),this.isCurrentUser&&n.username!==this.$auth.user.username&&this.$auth.logout()},error:s=>{console.error(s),this.$toastr.error(s.error?.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}isFormUnchanged(){return this.form.controls.password.value?!1:JSON.stringify(this.form.getRawValue())===JSON.stringify(this.initialFormValue)}dismissModal(){this.$activeModal.dismiss("Dismiss")}matchPassword(n){let s=n.get("password").value,l=n.get("passwordConfirm").value;if(s!==l)n.get("passwordConfirm").setErrors({matchPassword:!0});else return null}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],inputs:{user:"user"},decls:52,vars:42,consts:[[1,"modal-content"],["novalidate","",3,"ngSubmit","formGroup"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-user-pen","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-username",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["formControlName","username","type","text","id","form-username","autocomplete","off","autocapitalize","none",1,"form-control","custom-input"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","name","type","text","id","form-name","autocomplete","name",1,"form-control","custom-input"],["for","form-pass",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","password","type","password","autocomplete","new-password","id","form-pass",1,"form-control","custom-input",3,"ngClass"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],[1,"text-start"],[1,"text-end","grey-text","d-flex","align-items-center"],["type","checkbox","formControlName","admin","id","isAdmin",1,"rendux-input"],["for","isAdmin",1,"rendux-label","ms-3"],[1,"modal-footer","justify-content-between"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","submit",1,"btn","btn-primary",3,"disabled"],["for","form-pass-confirm",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","passwordConfirm","type","password","autocomplete","new-password","id","form-pass-confirm",1,"form-control","custom-input",3,"ngClass"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"form",1),f("ngSubmit",function(){return l.onSubmit(l.form)}),i(2,"div",2)(3,"h5",3),m(4),a(5,"translate"),t(),i(6,"button",4),a(7,"translate"),f("click",function(){return l.dismissModal()}),t()(),i(8,"div",5)(9,"div",6),p(10,"i",7),t(),i(11,"ul",8)(12,"li",9)(13,"label",10),m(14),a(15,"translate"),t(),i(16,"div",11),p(17,"input",12),a(18,"translate"),t()(),i(19,"li",9)(20,"label",13),m(21),a(22,"translate"),t(),i(23,"div",11),p(24,"input",14),a(25,"translate"),t()(),i(26,"li",9)(27,"label",15),m(28),a(29,"translate"),t(),i(30,"div",11),p(31,"input",16),a(32,"translate"),t()(),w(33,Me,7,9,"li",9),i(34,"li",17)(35,"span",18),m(36),a(37,"translate"),t(),i(38,"div",19),p(39,"input",20),a(40,"translate"),p(41,"label",21),t()()()(),i(42,"div",22)(43,"div",18)(44,"button",23),f("click",function(){return l.dismissModal()}),m(45),a(46,"translate"),t()(),p(47,"div",24),i(48,"div",25)(49,"button",26),m(50),a(51,"translate"),t()()()()()),s&2&&(e(),b("formGroup",l.form),e(3),d(o(5,16,"users.title_edit_user")),e(2),u("aria-label",o(7,18,"form.button_close")),e(8),d(o(15,20,"users.label_username")),e(3),u("aria-label",o(18,22,"users.label_username")),e(4),d(o(22,24,"users.label_full_name")),e(3),u("aria-label",o(25,26,"users.label_full_name")),e(4),d(o(29,28,"users.label_new_password")),e(3),b("ngClass",D(40,be,l.form.controls.password.dirty&&l.form.controls.password.errors)),u("aria-label",o(32,30,"users.label_new_password")),e(2),h(l.form.controls.password.value?33:-1),e(3),d(o(37,32,"users.label_admin_user")),e(3),u("aria-label",o(40,34,"users.label_admin_user")),e(6),x(" ",o(46,36,"form.button_close")," "),e(4),b("disabled",!l.form.valid||l.isFormUnchanged()),e(),x(" ",o(51,38,"form.button_save")," "))},dependencies:[A,R,F,q,V,z,G,L,J,j,E],encapsulation:2})}return r})();var ve=(()=>{class r{$activeModal=c(k);dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],decls:46,vars:36,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fa","fa-question-circle-o","primary-text",2,"font-size","75px"],[1,"ms-2"],[1,"mb-0"],[1,"mb-2","grey-text"],[1,"modal-footer","justify-content-between"],[1,"text-start"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-end"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"form")(2,"div",1)(3,"h5",2),m(4),a(5,"translate"),t(),i(6,"button",3),a(7,"translate"),f("click",function(){return l.dismissModal()}),t()(),i(8,"div",4)(9,"div",5),p(10,"i",6),t(),i(11,"h5",7),m(12),a(13,"translate"),t(),i(14,"ul",8)(15,"li"),m(16),a(17,"translate"),t(),i(18,"ul",9)(19,"li"),m(20),a(21,"translate"),t(),i(22,"li"),m(23),a(24,"translate"),t(),i(25,"li"),m(26),a(27,"translate"),a(28,"translate"),t(),i(29,"li"),m(30),a(31,"translate"),t(),i(32,"li"),m(33),a(34,"translate"),t()(),i(35,"li"),m(36),a(37,"translate"),t()(),p(38,"app-support-banner"),t(),i(39,"div",10),p(40,"div",11),i(41,"div",12)(42,"button",13),f("click",function(){return l.dismissModal()}),m(43),a(44,"translate"),t()(),p(45,"div",14),t()()()),s&2&&(e(4),d(o(5,12,"support.title")),e(2),u("aria-label",o(7,14,"form.button_close")),e(6),d(o(13,16,"users.title_users")),e(4),d(o(17,18,"users.support.acc_1")),e(4),d(o(21,20,"menu.label_status")),e(3),d(o(24,22,"menu.label_plugins")),e(3),ee("",o(27,24,"menu.label_accessories")," (",o(28,26,"users.support.control"),")"),e(4),d(o(31,28,"menu.linux.label_logs")),e(3),d(o(34,30,"support.title")),e(3),d(o(37,32,"users.support.acc_2")),e(7),x(" ",o(44,34,"form.button_close")," "))},dependencies:[me,E],encapsulation:2})}return r})();var Ie=(r,C)=>({"fa-user-secret":r,"fa-user":C});function De(r,C){if(r&1){let n=I();i(0,"button",23),f("click",function(){$(n);let l=_(2).$implicit,v=_();return U(v.disable2fa(l))}),m(1),a(2,"translate"),t()}if(r&2){let n=_(2).$implicit,s=_();b("disabled",n.username!==s.username),e(),x(" ",o(2,2,"users.setup_2fa_disable")," ")}}function Fe(r,C){if(r&1){let n=I();i(0,"button",24),f("click",function(){$(n);let l=_(2).$implicit,v=_();return U(v.setup2fa(l))}),m(1),a(2,"translate"),t()}if(r&2){let n=_(2).$implicit,s=_();b("disabled",n.username!==s.username),e(),x(" ",o(2,2,"users.setup_2fa")," ")}}function Ve(r,C){if(r&1&&w(0,De,3,4,"button",21)(1,Fe,3,4,"button",22),r&2){let n=_().$implicit;h(n.otpActive?0:1)}}function Ne(r,C){r&1&&p(0,"div")}function Ae(r,C){if(r&1){let n=I();i(0,"div",9)(1,"div",10)(2,"div",11)(3,"div",12)(4,"span",13)(5,"h4"),m(6),t(),i(7,"h5",14),p(8,"i",15),m(9),t()()(),i(10,"div",16),w(11,Ve,2,1)(12,Ne,1,0,"div"),i(13,"div")(14,"button",17),a(15,"translate"),f("click",function(){let l=$(n).$implicit,v=_();return U(v.openEditUser(l))}),p(16,"i",18),t(),i(17,"button",19),a(18,"translate"),f("click",function(){let l=$(n).$implicit,v=_();return U(v.deleteUser(l.id))}),p(19,"i",20),t()()()()()()}if(r&2){let n=C.$implicit,s=_();e(6),d(n.name),e(2),b("ngClass",te(11,Ie,n.admin,!n.admin)),e(),x(" ",n.username," "),e(2),h(n.admin?11:12),e(3),u("aria-label",o(15,7,"form.button_edit")),e(3),b("disabled",s.username===n.username),u("aria-label",o(18,9,"form.button_delete"))}}var Ot=(()=>{class r{$api=c(M);$auth=c(H);$modal=c(ae);$route=c(oe);$settings=c(se);$toastr=c(B);$translate=c(T);homebridgeUsers=[];username=this.$auth.user.username;isAdmin=this.$auth.user.admin;ngOnInit(){let n=this.$translate.instant("users.title_users");this.$settings.setPageTitle(n),this.$route.data.subscribe(s=>{this.homebridgeUsers=s.homebridgeUsers})}reloadUsers(){return this.$api.get("/users").subscribe(n=>{this.homebridgeUsers=n})}openAddNewUser(){this.$modal.open(fe,{size:"lg",backdrop:"static"}).result.finally(()=>{this.reloadUsers()})}openEditUser(n){let s=this.$modal.open(_e,{size:"lg",backdrop:"static"});s.componentInstance.user=n,s.result.finally(()=>{this.reloadUsers()})}deleteUser(n){this.$api.delete(`/users/${n}`).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("users.toast_user_deleted"),this.$translate.instant("toast.title_success")),this.reloadUsers()},error:s=>{console.error(s),this.$toastr.error(s.error?.message||this.$translate.instant("users.toast_failed_to_delete_user"),this.$translate.instant("toast.title_error"))}})}setup2fa(n){let s=this.$modal.open(ce,{size:"lg",backdrop:"static"});s.componentInstance.user=n,s.result.finally(()=>{this.reloadUsers()})}disable2fa(n){let s=this.$modal.open(pe,{size:"lg",backdrop:"static"});s.componentInstance.user=n,s.result.finally(()=>{this.reloadUsers()})}openSupport(){this.$modal.open(ve,{size:"lg",backdrop:"static"})}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["app-users"]],decls:15,vars:9,consts:[[1,"row","mb-3"],[1,"col-6"],[1,"primary-text","m-0"],[1,"col-6","text-end"],[1,"btn","btn-elegant","waves-effect","m-0","me-2",3,"click"],[1,"fas","fa-user-plus"],["type","button",1,"btn","btn-elegant","my-0","me-0",3,"click"],[1,"fa","fa-question-circle-o"],[1,"row"],[1,"col-md-6","mb-4"],[1,"card","card-body"],[1,"d-flex","flex-column"],[1,"d-flex","flex-row","mb-3"],[1,"me-auto","my-0"],[1,"small","text-truncate","grey-text"],[1,"fas",3,"ngClass"],[1,"d-flex","flex-row","justify-content-between"],[1,"btn","btn-elegant","m-0",3,"click"],[1,"fas","fa-user-pen"],[1,"btn","btn-danger","m-0","ms-2",3,"click","disabled"],[1,"fas","fa-trash"],[1,"btn","btn-elegant","m-0",3,"disabled"],[1,"btn","btn-primary","m-0",3,"disabled"],[1,"btn","btn-elegant","m-0",3,"click","disabled"],[1,"btn","btn-primary","m-0",3,"click","disabled"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"div",1)(2,"h3",2),m(3),a(4,"translate"),t()(),i(5,"div",3)(6,"button",4),a(7,"translate"),f("click",function(){return l.openAddNewUser()}),p(8,"i",5),t(),i(9,"button",6),a(10,"translate"),f("click",function(){return l.openSupport()}),p(11,"i",7),t()()(),i(12,"div",8),Y(13,Ae,20,14,"div",9,X),t()),s&2&&(e(3),d(o(4,3,"users.title_users")),e(3),u("aria-label",o(7,5,"users.button_add_user")),e(3),u("aria-label",o(10,7,"support.title")),e(4),Z(l.homebridgeUsers))},dependencies:[j,E],encapsulation:2})}return r})();export{Ot as UsersComponent};
|
|
1
|
+
import{a as me}from"./chunk-5RADRGSN.js";import{a as le}from"./chunk-TMGK6CPZ.js";import{g as Q,m as k,n as ae}from"./chunk-54X33YUH.js";import{A as re,C as A,D as G,b as q,c as F,d as g,e as V,f as z,g as N,j as S,m as R,p as O,q as L,r as J}from"./chunk-3PGUQRQW.js";import{b as H}from"./chunk-VSMSETOH.js";import{c as oe}from"./chunk-5ZHDYUXA.js";import{a as Ce,b as se}from"./chunk-HUHCZOMP.js";import{k as T,l as E,n as B,q as M}from"./chunk-HBVMTCYO.js";import{$b as d,Ec as ne,Ib as I,Lb as f,Nb as _,Pc as j,Qa as e,_b as m,ac as x,bc as ee,db as y,g as xe,h as W,lc as D,mc as te,na as c,pb as u,qb as w,rb as h,rc as a,sa as $,sc as o,ta as U,tb as X,tc as ie,ub as Y,vb as Z,wb as b,xb as i,yb as t,zb as p}from"./chunk-ZRDN4L2J.js";function we(r,C){r&1&&(i(0,"ngb-alert",13)(1,"p",20),m(2),a(3,"translate"),t()()),r&2&&(b("dismissible",!1),e(2),d(o(3,2,"login.invalid_password")))}var pe=(()=>{class r{$activeModal=c(k);$api=c(M);$toastr=c(B);$translate=c(T);invalidCredentials=!1;formGroup=new N({password:new S("",[g.required])});disable2fa(){this.invalidCredentials=!1,this.$api.post("/users/otp/deactivate",this.formGroup.value).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.setup_2fa_disable_success"),this.$translate.instant("toast.title_success"))},error:()=>{this.formGroup.setValue({password:""}),this.invalidCredentials=!0}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],decls:34,vars:27,consts:[[1,"modal-content",2,"min-height","300px"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-key","primary-text",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["type","password","autocomplete","current-password",1,"form-control","custom-input",3,"formControl","placeholder"],["type","error",1,"mt-3","mb-0",3,"dismissible"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"click","disabled"],[1,"mb-0"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"div",1)(2,"h5",2),m(3),a(4,"translate"),t(),i(5,"button",3),a(6,"translate"),f("click",function(){return l.dismissModal()}),t()(),i(7,"div",4)(8,"div",5),p(9,"i",6),t(),i(10,"ul",7)(11,"li"),m(12),a(13,"translate"),t()(),i(14,"ul",8)(15,"li",9)(16,"label",10),m(17),a(18,"translate"),t(),i(19,"div",11),p(20,"input",12),a(21,"translate"),t()()(),w(22,we,4,4,"ngb-alert",13),t(),i(23,"div",14)(24,"div",15)(25,"button",16),a(26,"translate"),f("click",function(){return l.dismissModal()}),m(27),a(28,"translate"),t()(),p(29,"div",17),i(30,"div",18)(31,"button",19),f("click",function(){return l.disable2fa()}),m(32),a(33,"translate"),t()()()()),s&2&&(e(3),d(o(4,11,"users.setup_2fa_disable")),e(2),u("aria-label",o(6,13,"form.button_close")),e(7),d(o(13,15,"users.setup_2fa_disable_current_password")),e(5),d(o(18,17,"users.label_password")),e(3),b("formControl",l.formGroup.controls.password)("placeholder",o(21,19,"users.label_password")),e(2),h(l.invalidCredentials&&!l.formGroup.controls.password.value?22:-1),e(3),u("aria-label",o(26,21,"form.button_close")),e(2),x(" ",o(28,23,"form.button_close")," "),e(4),b("disabled",l.formGroup.invalid),e(),x(" ",o(33,25,"form.button_disable")," "))},dependencies:[A,F,V,G,O,Q,E],encapsulation:2})}return r})();var de=xe(Ce(),1);var he=r=>({timeDiffError:r});function ge(r,C){r&1&&(i(0,"li"),m(1),a(2,"translate"),t()),r&2&&(e(),d(o(2,1,"users.setup_2fa_scan_qr_code")))}function Se(r,C){if(r&1&&(i(0,"ngb-alert",8)(1,"p",16),m(2),a(3,"translate"),t(),i(4,"p",17),m(5),a(6,"translate"),t()()),r&2){let n=_();b("dismissible",!1),e(2),d(o(3,3,"users.setup_2fa_cannot_setup_2fa")),e(3),d(ie(6,5,"users.setup_2fa_server_time_out",D(8,he,n.timeDiffError)))}}function ye(r,C){r&1&&p(0,"i",27)}function Ee(r,C){r&1&&p(0,"i",28)}function $e(r,C){if(r&1){let n=I();i(0,"div",21),m(1),a(2,"translate"),p(3,"br"),m(4),i(5,"a",26),f("click",function(){$(n);let l=_(2);return U(l.copySecretToClipboard())}),w(6,ye,1,0,"i",27)(7,Ee,1,0,"i",28),t()()}if(r&2){let n=_(2);e(),x(" ",o(2,3,"users.setup_2fa_scan_qr_manual")),e(3),x(" ",n.otpSecret," "),e(2),h(n.secretCopied?6:7)}}function Ue(r,C){if(r&1&&(i(0,"ul",9)(1,"li",18)(2,"div",19),p(3,"app-qrcode",20),t(),w(4,$e,8,5,"div",21),t(),i(5,"li",22)(6,"label",23),m(7),a(8,"translate"),t(),i(9,"div",24),p(10,"input",25),t()()()),r&2){let n=_();e(3),b("data",n.otpString),e(),h(n.otpSecret?4:-1),e(3),d(o(8,4,"users.setup_2fa_enter_code")),e(3),b("formControl",n.formGroup.controls.code)}}function ke(r,C){if(r&1){let n=I();i(0,"button",29),a(1,"translate"),f("click",function(){$(n);let l=_();return U(l.dismissModal())}),m(2),a(3,"translate"),t()}r&2&&(u("aria-label",o(1,2,"form.button_close")),e(2),x(" ",o(3,4,"form.button_close")," "))}function Te(r,C){if(r&1){let n=I();i(0,"button",29),a(1,"translate"),f("click",function(){$(n);let l=_();return U(l.dismissModal())}),m(2),a(3,"translate"),t()}r&2&&(u("aria-label",o(1,2,"form.button_close")),e(2),x(" ",o(3,4,"form.button_close")," "))}function Be(r,C){if(r&1){let n=I();i(0,"button",30),f("click",function(){$(n);let l=_();return U(l.enable2fa())}),m(1),a(2,"translate"),t()}if(r&2){let n=_();b("disabled",n.formGroup.invalid),e(),x(" ",o(2,2,"form.button_enable")," ")}}var ce=(()=>{class r{$activeModal=c(k);$api=c(M);$toastr=c(B);$translate=c(T);copyTimeout=null;user;timeDiffError=null;otpString;otpSecret;secretCopied=!1;formGroup=new N({code:new S("",[g.required,g.minLength(6),g.maxLength(6)])});ngOnInit(){this.$api.post("/users/otp/setup",{}).subscribe({next:n=>{this.checkTimeDiff(n.timestamp),this.timeDiffError||(this.otpString=n.otpauth,this.otpSecret=new URL(this.otpString).searchParams.get("secret")||"")},error:n=>{this.$activeModal.dismiss(),console.error(n),this.$toastr.error(this.$translate.instant("users.setup_2fa_enable_error"),this.$translate.instant("toast.title_error"))}})}enable2fa(){this.$api.post("/users/otp/activate",this.formGroup.value).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("users.setup_2fa_enabled_success"),this.$translate.instant("toast.title_success")),this.$activeModal.close()},error:n=>{console.error(n),this.$toastr.error(this.$translate.instant("users.setup_2fa_activate_error"),this.$translate.instant("toast.title_error"))}})}copySecretToClipboard(){return W(this,null,function*(){yield navigator.clipboard.writeText(this.otpSecret),this.secretCopied=!0,this.copyTimeout&&clearTimeout(this.copyTimeout),this.copyTimeout=setTimeout(()=>{this.secretCopied=!1},3e3)})}dismissModal(){this.$activeModal.dismiss("Dismiss")}checkTimeDiff(n){let s=(0,de.default)(n).diff(new Date,"millisecond");s<-5e3||s>5e3?this.timeDiffError=s:this.timeDiffError=null}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],inputs:{user:"user"},decls:24,vars:15,consts:[[1,"modal-content","setup2fa"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-key","primary-text",2,"font-size","75px"],[1,"mb-3"],["type","error",1,"mb-0",3,"dismissible"],[1,"list-group","list-group-box","mb-0"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"disabled"],[1,"fw-bold","mb-1"],[1,"mb-0"],[1,"list-group-item","text-center"],[1,"text-center","w-100","d-flex","justify-content-center","my-2"],[1,"mx-auto",2,"width","175px","height","175px",3,"data"],[1,"grey-text","small","mt-0","mb-1"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["type","text","placeholder","eg. 123456","autocomplete","one-time-code","autocapitalize","none","inputmode","numeric","pattern","[0-9]*",1,"form-control","custom-input",3,"formControl"],["href","javascript:void(0)",1,"ms-1","text-primary",3,"click"],[1,"fas","fa-check","green-text"],[1,"fas","fa-copy"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"div",1)(2,"h5",2),m(3),a(4,"translate"),t(),i(5,"button",3),a(6,"translate"),f("click",function(){return l.dismissModal()}),t()(),i(7,"div",4)(8,"div",5),p(9,"i",6),t(),i(10,"ul",7)(11,"li"),m(12),a(13,"translate"),t(),w(14,ge,3,3,"li"),t(),w(15,Se,7,10,"ngb-alert",8),w(16,Ue,11,6,"ul",9),t(),i(17,"div",10)(18,"div",11),w(19,ke,4,6,"button",12),t(),i(20,"div",13),w(21,Te,4,6,"button",12),t(),i(22,"div",14),w(23,Be,3,4,"button",15),t()()()),s&2&&(e(3),d(o(4,9,"users.setup_2fa")),e(2),u("aria-label",o(6,11,"form.button_close")),e(7),d(o(13,13,"users.setup_2fa_warning")),e(2),h(l.timeDiffError?-1:14),e(),h(l.timeDiffError?15:-1),e(),h(l.timeDiffError?-1:16),e(3),h(l.timeDiffError?-1:19),e(2),h(l.timeDiffError?21:-1),e(2),h(l.timeDiffError?-1:23))},dependencies:[Q,le,A,F,V,re,G,O,E],encapsulation:2})}return r})();var ue=r=>({"is-invalid":r}),fe=(()=>{class r{$activeModal=c(k);$api=c(M);$toastr=c(B);$translate=c(T);form=new N({username:new S("",[g.required]),name:new S("",[g.required]),password:new S("",[g.compose([g.required,g.minLength(4)])]),passwordConfirm:new S("",[g.required]),admin:new S(!0)},this.matchPassword);onSubmit({value:n}){this.$api.post("/users",n).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.toast_added_new_user"),this.$translate.instant("toast.title_success"))},error:s=>{this.$toastr.error(s.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}matchPassword(n){let s=n.get("password").value,l=n.get("passwordConfirm").value;if(s!==l)n.get("passwordConfirm").setErrors({matchPassword:!0});else return null}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],decls:58,vars:50,consts:[[1,"modal-content"],["novalidate","",3,"ngSubmit","formGroup"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-user-plus","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-username",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["formControlName","username","type","text","id","form-username","autocomplete","username","autocapitalize","none",1,"form-control","custom-input"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","name","type","text","id","form-name","autocomplete","name",1,"form-control","custom-input"],["for","form-pass",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","password","type","password","autocomplete","new-password","id","form-pass",1,"form-control","custom-input",3,"ngClass"],["for","form-pass-confirm",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","passwordConfirm","type","password","autocomplete","new-password","id","form-pass-confirm",1,"form-control","custom-input",3,"ngClass"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],[1,"text-start"],[1,"text-end","grey-text","d-flex","align-items-center"],["formControlName","admin","type","checkbox","id","isAdmin",1,"rendux-input"],["for","isAdmin",1,"rendux-label","ms-3"],[1,"modal-footer","justify-content-between"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"form",1),f("ngSubmit",function(){return l.onSubmit(l.form)}),i(2,"div",2)(3,"h5",3),m(4),a(5,"translate"),t(),i(6,"button",4),a(7,"translate"),f("click",function(){return l.dismissModal()}),t()(),i(8,"div",5)(9,"div",6),p(10,"i",7),t(),i(11,"ul",8)(12,"li",9)(13,"label",10),m(14),a(15,"translate"),t(),i(16,"div",11),p(17,"input",12),a(18,"translate"),t()(),i(19,"li",9)(20,"label",13),m(21),a(22,"translate"),t(),i(23,"div",11),p(24,"input",14),a(25,"translate"),t()(),i(26,"li",9)(27,"label",15),m(28),a(29,"translate"),t(),i(30,"div",11),p(31,"input",16),a(32,"translate"),t()(),i(33,"li",9)(34,"label",17),m(35),a(36,"translate"),t(),i(37,"div",11),p(38,"input",18),a(39,"translate"),t()(),i(40,"li",19)(41,"span",20),m(42),a(43,"translate"),t(),i(44,"div",21),p(45,"input",22),a(46,"translate"),p(47,"label",23),t()()()(),i(48,"div",24)(49,"div",20)(50,"button",25),f("click",function(){return l.dismissModal()}),m(51),a(52,"translate"),t()(),p(53,"div",26),i(54,"div",27)(55,"button",28),m(56),a(57,"translate"),t()()()()()),s&2&&(e(),b("formGroup",l.form),e(3),d(o(5,18,"users.title_add_user")),e(2),u("aria-label",o(7,20,"form.button_close")),e(8),d(o(15,22,"users.label_username")),e(3),u("aria-label",o(18,24,"users.label_username")),e(4),d(o(22,26,"users.label_full_name")),e(3),u("aria-label",o(25,28,"users.label_full_name")),e(4),d(o(29,30,"users.label_password")),e(3),b("ngClass",D(46,ue,l.form.controls.password.dirty&&l.form.controls.password.errors)),u("aria-label",o(32,32,"users.label_password")),e(4),d(o(36,34,"users.label_confirm_password")),e(3),b("ngClass",D(48,ue,l.form.controls.passwordConfirm.dirty&&l.form.controls.passwordConfirm.errors)),u("aria-label",o(39,36,"users.label_confirm_password")),e(4),d(o(43,38,"users.label_admin_user")),e(3),u("aria-label",o(46,40,"users.label_admin_user")),e(6),x(" ",o(52,42,"form.button_close")," "),e(4),b("disabled",!l.form.valid),e(),x(" ",o(57,44,"form.button_save")," "))},dependencies:[A,R,F,q,V,z,G,L,J,j,E],encapsulation:2})}return r})();var be=r=>({"is-invalid":r});function Me(r,C){if(r&1&&(i(0,"li",9)(1,"label",27),m(2),a(3,"translate"),t(),i(4,"div",11),p(5,"input",28),a(6,"translate"),t()()),r&2){let n=_();e(2),d(o(3,3,"users.label_confirm_password")),e(3),b("ngClass",D(7,be,n.form.controls.passwordConfirm.dirty&&n.form.controls.passwordConfirm.errors)),u("aria-label",o(6,5,"users.label_confirm_password"))}}var _e=(()=>{class r{$activeModal=c(k);$api=c(M);$auth=c(H);$cdr=c(ne);$toastr=c(B);$translate=c(T);initialFormValue={};user;isCurrentUser=!1;form=new N({username:new S("",[g.required]),name:new S("",[g.required]),password:new S(""),passwordConfirm:new S(""),admin:new S(!0)},this.matchPassword);ngOnInit(){this.isCurrentUser=this.$auth.user.username===this.user.username,this.form.patchValue(this.user),this.initialFormValue=this.form.getRawValue(),this.form.valueChanges.subscribe(()=>this.$cdr.detectChanges())}onSubmit({value:n}){this.$api.patch(`/users/${this.user.id}`,n).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.toast_updated_user"),this.$translate.instant("toast.title_success")),this.isCurrentUser&&n.username!==this.$auth.user.username&&this.$auth.logout()},error:s=>{console.error(s),this.$toastr.error(s.error?.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}isFormUnchanged(){return this.form.controls.password.value?!1:JSON.stringify(this.form.getRawValue())===JSON.stringify(this.initialFormValue)}dismissModal(){this.$activeModal.dismiss("Dismiss")}matchPassword(n){let s=n.get("password").value,l=n.get("passwordConfirm").value;if(s!==l)n.get("passwordConfirm").setErrors({matchPassword:!0});else return null}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],inputs:{user:"user"},decls:52,vars:42,consts:[[1,"modal-content"],["novalidate","",3,"ngSubmit","formGroup"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-user-pen","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-username",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["formControlName","username","type","text","id","form-username","autocomplete","off","autocapitalize","none",1,"form-control","custom-input"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","name","type","text","id","form-name","autocomplete","name",1,"form-control","custom-input"],["for","form-pass",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","password","type","password","autocomplete","new-password","id","form-pass",1,"form-control","custom-input",3,"ngClass"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],[1,"text-start"],[1,"text-end","grey-text","d-flex","align-items-center"],["type","checkbox","formControlName","admin","id","isAdmin",1,"rendux-input"],["for","isAdmin",1,"rendux-label","ms-3"],[1,"modal-footer","justify-content-between"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","submit",1,"btn","btn-primary",3,"disabled"],["for","form-pass-confirm",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","passwordConfirm","type","password","autocomplete","new-password","id","form-pass-confirm",1,"form-control","custom-input",3,"ngClass"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"form",1),f("ngSubmit",function(){return l.onSubmit(l.form)}),i(2,"div",2)(3,"h5",3),m(4),a(5,"translate"),t(),i(6,"button",4),a(7,"translate"),f("click",function(){return l.dismissModal()}),t()(),i(8,"div",5)(9,"div",6),p(10,"i",7),t(),i(11,"ul",8)(12,"li",9)(13,"label",10),m(14),a(15,"translate"),t(),i(16,"div",11),p(17,"input",12),a(18,"translate"),t()(),i(19,"li",9)(20,"label",13),m(21),a(22,"translate"),t(),i(23,"div",11),p(24,"input",14),a(25,"translate"),t()(),i(26,"li",9)(27,"label",15),m(28),a(29,"translate"),t(),i(30,"div",11),p(31,"input",16),a(32,"translate"),t()(),w(33,Me,7,9,"li",9),i(34,"li",17)(35,"span",18),m(36),a(37,"translate"),t(),i(38,"div",19),p(39,"input",20),a(40,"translate"),p(41,"label",21),t()()()(),i(42,"div",22)(43,"div",18)(44,"button",23),f("click",function(){return l.dismissModal()}),m(45),a(46,"translate"),t()(),p(47,"div",24),i(48,"div",25)(49,"button",26),m(50),a(51,"translate"),t()()()()()),s&2&&(e(),b("formGroup",l.form),e(3),d(o(5,16,"users.title_edit_user")),e(2),u("aria-label",o(7,18,"form.button_close")),e(8),d(o(15,20,"users.label_username")),e(3),u("aria-label",o(18,22,"users.label_username")),e(4),d(o(22,24,"users.label_full_name")),e(3),u("aria-label",o(25,26,"users.label_full_name")),e(4),d(o(29,28,"users.label_new_password")),e(3),b("ngClass",D(40,be,l.form.controls.password.dirty&&l.form.controls.password.errors)),u("aria-label",o(32,30,"users.label_new_password")),e(2),h(l.form.controls.password.value?33:-1),e(3),d(o(37,32,"users.label_admin_user")),e(3),u("aria-label",o(40,34,"users.label_admin_user")),e(6),x(" ",o(46,36,"form.button_close")," "),e(4),b("disabled",!l.form.valid||l.isFormUnchanged()),e(),x(" ",o(51,38,"form.button_save")," "))},dependencies:[A,R,F,q,V,z,G,L,J,j,E],encapsulation:2})}return r})();var ve=(()=>{class r{$activeModal=c(k);dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["ng-component"]],decls:46,vars:36,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fa","fa-question-circle-o","primary-text",2,"font-size","75px"],[1,"ms-2"],[1,"mb-0"],[1,"mb-2","grey-text"],[1,"modal-footer","justify-content-between"],[1,"text-start"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-end"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"form")(2,"div",1)(3,"h5",2),m(4),a(5,"translate"),t(),i(6,"button",3),a(7,"translate"),f("click",function(){return l.dismissModal()}),t()(),i(8,"div",4)(9,"div",5),p(10,"i",6),t(),i(11,"h5",7),m(12),a(13,"translate"),t(),i(14,"ul",8)(15,"li"),m(16),a(17,"translate"),t(),i(18,"ul",9)(19,"li"),m(20),a(21,"translate"),t(),i(22,"li"),m(23),a(24,"translate"),t(),i(25,"li"),m(26),a(27,"translate"),a(28,"translate"),t(),i(29,"li"),m(30),a(31,"translate"),t(),i(32,"li"),m(33),a(34,"translate"),t()(),i(35,"li"),m(36),a(37,"translate"),t()(),p(38,"app-support-banner"),t(),i(39,"div",10),p(40,"div",11),i(41,"div",12)(42,"button",13),f("click",function(){return l.dismissModal()}),m(43),a(44,"translate"),t()(),p(45,"div",14),t()()()),s&2&&(e(4),d(o(5,12,"support.title")),e(2),u("aria-label",o(7,14,"form.button_close")),e(6),d(o(13,16,"users.title_users")),e(4),d(o(17,18,"users.support.acc_1")),e(4),d(o(21,20,"menu.label_status")),e(3),d(o(24,22,"menu.label_plugins")),e(3),ee("",o(27,24,"menu.label_accessories")," (",o(28,26,"users.support.control"),")"),e(4),d(o(31,28,"menu.linux.label_logs")),e(3),d(o(34,30,"support.title")),e(3),d(o(37,32,"users.support.acc_2")),e(7),x(" ",o(44,34,"form.button_close")," "))},dependencies:[me,E],encapsulation:2})}return r})();var Ie=(r,C)=>({"fa-user-secret":r,"fa-user":C});function De(r,C){if(r&1){let n=I();i(0,"button",23),f("click",function(){$(n);let l=_(2).$implicit,v=_();return U(v.disable2fa(l))}),m(1),a(2,"translate"),t()}if(r&2){let n=_(2).$implicit,s=_();b("disabled",n.username!==s.username),e(),x(" ",o(2,2,"users.setup_2fa_disable")," ")}}function Fe(r,C){if(r&1){let n=I();i(0,"button",24),f("click",function(){$(n);let l=_(2).$implicit,v=_();return U(v.setup2fa(l))}),m(1),a(2,"translate"),t()}if(r&2){let n=_(2).$implicit,s=_();b("disabled",n.username!==s.username),e(),x(" ",o(2,2,"users.setup_2fa")," ")}}function Ve(r,C){if(r&1&&w(0,De,3,4,"button",21)(1,Fe,3,4,"button",22),r&2){let n=_().$implicit;h(n.otpActive?0:1)}}function Ne(r,C){r&1&&p(0,"div")}function Ae(r,C){if(r&1){let n=I();i(0,"div",9)(1,"div",10)(2,"div",11)(3,"div",12)(4,"span",13)(5,"h4"),m(6),t(),i(7,"h5",14),p(8,"i",15),m(9),t()()(),i(10,"div",16),w(11,Ve,2,1)(12,Ne,1,0,"div"),i(13,"div")(14,"button",17),a(15,"translate"),f("click",function(){let l=$(n).$implicit,v=_();return U(v.openEditUser(l))}),p(16,"i",18),t(),i(17,"button",19),a(18,"translate"),f("click",function(){let l=$(n).$implicit,v=_();return U(v.deleteUser(l.id))}),p(19,"i",20),t()()()()()()}if(r&2){let n=C.$implicit,s=_();e(6),d(n.name),e(2),b("ngClass",te(11,Ie,n.admin,!n.admin)),e(),x(" ",n.username," "),e(2),h(n.admin?11:12),e(3),u("aria-label",o(15,7,"form.button_edit")),e(3),b("disabled",s.username===n.username),u("aria-label",o(18,9,"form.button_delete"))}}var Ot=(()=>{class r{$api=c(M);$auth=c(H);$modal=c(ae);$route=c(oe);$settings=c(se);$toastr=c(B);$translate=c(T);homebridgeUsers=[];username=this.$auth.user.username;isAdmin=this.$auth.user.admin;ngOnInit(){let n=this.$translate.instant("users.title_users");this.$settings.setPageTitle(n),this.$route.data.subscribe(s=>{this.homebridgeUsers=s.homebridgeUsers})}reloadUsers(){return this.$api.get("/users").subscribe(n=>{this.homebridgeUsers=n})}openAddNewUser(){this.$modal.open(fe,{size:"lg",backdrop:"static"}).result.finally(()=>{this.reloadUsers()})}openEditUser(n){let s=this.$modal.open(_e,{size:"lg",backdrop:"static"});s.componentInstance.user=n,s.result.finally(()=>{this.reloadUsers()})}deleteUser(n){this.$api.delete(`/users/${n}`).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("users.toast_user_deleted"),this.$translate.instant("toast.title_success")),this.reloadUsers()},error:s=>{console.error(s),this.$toastr.error(s.error?.message||this.$translate.instant("users.toast_failed_to_delete_user"),this.$translate.instant("toast.title_error"))}})}setup2fa(n){let s=this.$modal.open(ce,{size:"lg",backdrop:"static"});s.componentInstance.user=n,s.result.finally(()=>{this.reloadUsers()})}disable2fa(n){let s=this.$modal.open(pe,{size:"lg",backdrop:"static"});s.componentInstance.user=n,s.result.finally(()=>{this.reloadUsers()})}openSupport(){this.$modal.open(ve,{size:"lg",backdrop:"static"})}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=y({type:r,selectors:[["app-users"]],decls:15,vars:9,consts:[[1,"row","mb-3"],[1,"col-6"],[1,"primary-text","m-0"],[1,"col-6","text-end"],[1,"btn","btn-elegant","waves-effect","m-0","me-2",3,"click"],[1,"fas","fa-user-plus"],["type","button",1,"btn","btn-elegant","my-0","me-0",3,"click"],[1,"fa","fa-question-circle-o"],[1,"row"],[1,"col-md-6","mb-4"],[1,"card","card-body"],[1,"d-flex","flex-column"],[1,"d-flex","flex-row","mb-3"],[1,"me-auto","my-0"],[1,"small","text-truncate","grey-text"],[1,"fas",3,"ngClass"],[1,"d-flex","flex-row","justify-content-between"],[1,"btn","btn-elegant","m-0",3,"click"],[1,"fas","fa-user-pen"],[1,"btn","btn-danger","m-0","ms-2",3,"click","disabled"],[1,"fas","fa-trash"],[1,"btn","btn-elegant","m-0",3,"disabled"],[1,"btn","btn-primary","m-0",3,"disabled"],[1,"btn","btn-elegant","m-0",3,"click","disabled"],[1,"btn","btn-primary","m-0",3,"click","disabled"]],template:function(s,l){s&1&&(i(0,"div",0)(1,"div",1)(2,"h3",2),m(3),a(4,"translate"),t()(),i(5,"div",3)(6,"button",4),a(7,"translate"),f("click",function(){return l.openAddNewUser()}),p(8,"i",5),t(),i(9,"button",6),a(10,"translate"),f("click",function(){return l.openSupport()}),p(11,"i",7),t()()(),i(12,"div",8),Y(13,Ae,20,14,"div",9,X),t()),s&2&&(e(3),d(o(4,3,"users.title_users")),e(3),u("aria-label",o(7,5,"users.button_add_user")),e(3),u("aria-label",o(10,7,"support.title")),e(4),Z(l.homebridgeUsers))},dependencies:[j,E],encapsulation:2})}return r})();export{Ot as UsersComponent};
|