homebridge-config-ui-x 5.0.0 → 5.0.1-beta.1
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 +7 -0
- package/dist/modules/child-bridges/child-bridges.service.d.ts +1 -5
- package/dist/modules/child-bridges/child-bridges.service.js +2 -8
- package/dist/modules/child-bridges/child-bridges.service.js.map +1 -1
- package/package.json +3 -3
- package/public/{chunk-FO44GZVZ.js → chunk-2E7ZORGV.js} +1 -1
- package/public/{chunk-S42WFQ2L.js → chunk-3K4AKQIG.js} +1 -1
- package/public/{chunk-TSAWRS7P.js → chunk-3WACEBJM.js} +1 -1
- package/public/{chunk-MWGI7ZLY.js → chunk-4G62IPBL.js} +1 -1
- package/public/chunk-4NAUGWMH.js +1 -0
- package/public/{chunk-CY3O5ACI.js → chunk-52ICMLXG.js} +1 -1
- package/public/{chunk-4NQG4OIB.js → chunk-5ELTAW44.js} +1 -1
- package/public/{chunk-56R3JRVX.js → chunk-5QJD4F5J.js} +1 -1
- package/public/chunk-5VP77P7I.js +1 -0
- package/public/{chunk-HU7QTSUZ.js → chunk-6FHUI6EC.js} +1 -1
- package/public/{chunk-2RH7XRJB.js → chunk-6HNZZKA3.js} +1 -1
- package/public/{chunk-OLDRUBZS.js → chunk-6HXGDQKN.js} +1 -1
- package/public/{chunk-XFFCMC6L.js → chunk-736V2KJB.js} +2 -2
- package/public/{chunk-HFVA7EOG.js → chunk-7BGQ3WIH.js} +1 -1
- package/public/{chunk-GPZM245P.js → chunk-A3GG65TX.js} +1 -1
- package/public/{chunk-ZR6LFO7Q.js → chunk-B55QOQVD.js} +1 -1
- package/public/{chunk-2V6GVJIK.js → chunk-CNNTXFBF.js} +1 -1
- package/public/{chunk-52HWZQJT.js → chunk-CSB4ROBA.js} +1 -1
- package/public/{chunk-YZN5MPV3.js → chunk-ETFLC24E.js} +1 -1
- package/public/chunk-FPLWS5WP.js +1 -0
- package/public/{chunk-KOHQYRVP.js → chunk-FZM6AHK2.js} +1 -1
- package/public/chunk-HBOWJDR5.js +2 -0
- package/public/{chunk-U4GBERFR.js → chunk-HIAE32S7.js} +1 -1
- package/public/{chunk-EP7NNPU2.js → chunk-IHSOZF6N.js} +1 -1
- package/public/{chunk-65A2CLMB.js → chunk-IV4ZCEWF.js} +1 -1
- package/public/{chunk-WDFAWIMZ.js → chunk-JHPEPG44.js} +1 -1
- package/public/{chunk-7RQP64IZ.js → chunk-JN7YT2VS.js} +1 -1
- package/public/{chunk-4J2HTHMW.js → chunk-KM7BRFHX.js} +1 -1
- package/public/{chunk-ESCMWFTR.js → chunk-LWKJJ5PU.js} +1 -1
- package/public/{chunk-OYH4UIAH.js → chunk-NCZ7M3AB.js} +1 -1
- package/public/{chunk-KDVPFRHN.js → chunk-PQR6HK2C.js} +1 -1
- package/public/{chunk-UJNEXGXC.js → chunk-PRMVT3SQ.js} +1 -1
- package/public/{chunk-YYDFCQK6.js → chunk-PT72GTGE.js} +1 -1
- package/public/{chunk-G4DWZG7U.js → chunk-RFGGDHFG.js} +1 -1
- package/public/{chunk-D5MSFLIQ.js → chunk-RRA3IHCM.js} +1 -1
- package/public/{chunk-UB4DU2JC.js → chunk-S2ZVRZCY.js} +1 -1
- package/public/{chunk-H5PKL3FP.js → chunk-SR7XEHET.js} +1 -1
- package/public/{chunk-6LPAR6QB.js → chunk-TOLEK5UA.js} +1 -1
- package/public/{chunk-EGPBTPS6.js → chunk-TZFHB7AU.js} +1 -1
- package/public/{chunk-QUD3RGWL.js → chunk-UD6SW2QN.js} +1 -1
- package/public/{chunk-W542IB6H.js → chunk-UJNY5BYT.js} +1 -1
- package/public/{chunk-NEZ6TZYE.js → chunk-UVNR77PB.js} +1 -1
- package/public/{chunk-QTTC6A7P.js → chunk-UXUU25EW.js} +1 -1
- package/public/{chunk-CEVLFYVV.js → chunk-VLNYF5AS.js} +1 -1
- package/public/{chunk-WF776GWR.js → chunk-WNQA5E2O.js} +1 -1
- package/public/{chunk-FWNSHSUQ.js → chunk-XJ2MUFCV.js} +1 -1
- package/public/{chunk-CR7NFTHI.js → chunk-YHQ4H2LV.js} +1 -1
- package/public/{chunk-J7Q5BUJW.js → chunk-YJWU65EW.js} +1 -1
- package/public/{chunk-W4PQWIYG.js → chunk-ZCSPADUX.js} +1 -1
- package/public/{chunk-GEIS2BWE.js → chunk-ZJ3JJYIN.js} +1 -1
- package/public/index.html +1 -1
- package/public/main-7VIDFQBH.js +1 -0
- package/public/chunk-DVQU3KHF.js +0 -1
- package/public/chunk-H2VHR6F4.js +0 -1
- package/public/chunk-Q4CZ7LVK.js +0 -2
- package/public/chunk-XIYHNDRN.js +0 -1
- package/public/main-I6NBG3JJ.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as ft,n as gt}from"./chunk-HBOWJDR5.js";import{Gb as M,Hb as E,Ob as l,Pb as h,Qb as p,Rb as F,Vb as Y,Wa as ht,Wb as K,Xa as q,_b as Q,a as u,ab as r,ac as mt,b as T,bc as j,db as dt,dc as c,e as xt,ga as C,gb as y,ha as lt,ja as ct,ka as w,kd as J,la as _,ma as ut,mb as G,n as g,nb as pt,nc as A,pc as m,qc as f,ra as V,sa as z,sb as S,sc as b,ua as N,va as Z,vb as U,za as O}from"./chunk-ULJPS3WS.js";var Tt=xt((De,Ut)=>{Ut.exports={name:"homebridge-config-ui-x",displayName:"Homebridge UI",version:"5.0.1-beta.1",description:"A web based management, configuration and control platform for Homebridge.",author:"oznu <dev@oz.nu>",license:"MIT",funding:[{type:"github",url:"https://github.com/sponsors/oznu"},{type:"paypal",url:"https://paypal.me/oznu"}],repository:{type:"git",url:"git+https://github.com/homebridge/homebridge-config-ui-x.git"},bugs:{url:"https://github.com/homebridge/homebridge-config-ui-x/issues"},keywords:["homebridge-plugin","ui","gui","web","homebridge","homebridge-config-ui-x","ui-x","config-ui-x","homebridge-x","homebridge server","homebridge ui","homebridge-ui","homebridge gui","homebridge-gui","web interface","config ui","management","config editor","linux","macOS","osx","windows","raspberry pi","accessory control","smart home","hb-service"],main:"./dist/index.js",bin:{"homebridge-config-ui-x":"dist/bin/standalone.js","hb-service":"dist/bin/hb-service.js"},engines:{node:"^20 || ^22 || ^24",homebridge:"^1.8.0 || ^2.0.0-beta.0"},scripts:{build:"npm run build:server && npm run build:ui","build:server":"rimraf dist && tsc -p tsconfig.build.json","build:ui":"npm run build --prefix ui",check:"npm run check:server && npm run check:ui","check:server":"npm install && npm outdated","check:ui":"npm install --prefix ui && npm outdated --prefix ui","lang-sync":"ts-node scripts/lang-sync.ts",lint:"eslint . --max-warnings=0","lint:fix":"npm run lint -- --fix",prepublishOnly:"npm i --package-lock-only && npm run lint && npm run build",start:"ts-node -r tsconfig-paths/register src/main.ts",test:"vitest run","test-coverage":"npm run test -- --coverage","upgrade-install":"./scripts/upgrade-install.sh",watch:'concurrently "npm run watch:ui" "npm run watch:server"',"watch:server":"nodemon","watch:ui":"npm run start --prefix ui"},dependencies:{"@fastify/helmet":"13.0.1","@fastify/multipart":"9.0.3","@fastify/static":"8.2.0","@homebridge/hap-client":"3.1.0","@homebridge/node-pty-prebuilt-multiarch":"0.13.1","@nestjs/axios":"4.0.0","@nestjs/common":"11.1.3","@nestjs/core":"11.1.3","@nestjs/jwt":"11.0.0","@nestjs/passport":"11.0.5","@nestjs/platform-fastify":"11.1.3","@nestjs/platform-socket.io":"11.1.3","@nestjs/swagger":"11.2.0","@nestjs/websockets":"11.1.3",axios:"1.10.0","bash-color":"0.0.4","class-transformer":"0.5.1","class-validator":"0.14.2",commander:"14.0.0",dayjs:"1.11.13",fastify:"5.4.0","fs-extra":"11.3.0",jsonwebtoken:"9.0.2",lodash:"4.17.21","node-cache":"5.1.2","node-schedule":"2.1.1",ora:"8.2.0",otplib:"12.0.1","p-limit":"6.2.0",passport:"0.7.0","passport-jwt":"4.0.1","reflect-metadata":"0.2.2",rxjs:"7.8.2",semver:"7.7.2",systeminformation:"5.27.7",tail:"2.2.6",tar:"7.4.3","tcp-port-used":"1.0.2",unzipper:"0.12.3"},devDependencies:{"@antfu/eslint-config":"^4.16.2","@nestjs/testing":"^11.1.3","@prettier/plugin-xml":"^3.4.2","@types/fs-extra":"^11.0.4","@types/lodash":"^4.17.20","@types/node":"^24.0.13","@types/node-schedule":"^2.1.8","@types/passport-jwt":"^4.0.1","@types/semver":"^7.7.0","@types/tail":"^2.2.3","@types/tcp-port-used":"^1.0.4","@types/unzipper":"^0.10.11","@vitest/coverage-v8":"^3.2.4",concurrently:"^9.2.0","eslint-plugin-format":"^1.0.1","form-data":"^4.0.3",nodemon:"^3.1.10",rimraf:"^6.0.1","ts-loader":"^9.5.2","ts-node":"^10.9.2","tsconfig-paths":"^4.2.0",typescript:"^5.8.3","unplugin-swc":"^1.5.5",vitest:"^3.2.4"},overrides:{"@nestjs/platform-fastify":{fastify:"5.4.0"}},maintainers:[{email:"bwp91@icloud.com",name:"bwp91"},{email:"dev@oz.nu",name:"oznu"},{email:"northern.man1@gmail.com",name:"northernman"},{email:"mail@anderl-bauer.de",name:"supereg"},{email:"khaos.tian@gmail.com",name:"khaost"},{email:"erik.baauw@xs4all.nl",name:"ebaauw"},{email:"donavan.becker@icloud.com",name:"donavanbecker"},{email:"dustin.greif@gmail.com",name:"dustin.greif"},{email:"nfarina@gmail.com",name:"nfarina"}],scarfSettings:{enabled:!1}}});var v=function(i){return i[i.State=0]="State",i[i.Transition=1]="Transition",i[i.Sequence=2]="Sequence",i[i.Group=3]="Group",i[i.Animate=4]="Animate",i[i.Keyframes=5]="Keyframes",i[i.Style=6]="Style",i[i.Trigger=7]="Trigger",i[i.Reference=8]="Reference",i[i.AnimateChild=9]="AnimateChild",i[i.AnimateRef=10]="AnimateRef",i[i.Query=11]="Query",i[i.Stagger=12]="Stagger",i}(v||{}),It="*";function tt(i,s){return{type:v.Trigger,name:i,definitions:s,options:{}}}function P(i,s=null){return{type:v.Animate,styles:s,timings:i}}function Yt(i,s=null){return{type:v.Sequence,steps:i,options:s}}function R(i){return{type:v.Style,styles:i,offset:null}}function H(i,s,t){return{type:v.State,name:i,styles:s,options:t}}function B(i,s,t=null){return{type:v.Transition,expr:i,animation:s,options:t}}var W=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;constructor(s=0,t=0){this.totalTime=s+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(s=>s()),this._onDoneFns=[])}onStart(s){this._originalOnStartFns.push(s),this._onStartFns.push(s)}onDone(s){this._originalOnDoneFns.push(s),this._onDoneFns.push(s)}onDestroy(s){this._onDestroyFns.push(s)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(s=>s()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(s=>s()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(s){this._position=this.totalTime?s*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(s){let t=s=="start"?this._onStartFns:this._onDoneFns;t.forEach(e=>e()),t.length=0}},X=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(s){this.players=s;let t=0,e=0,n=0,o=this.players.length;o==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(a=>{a.onDone(()=>{++t==o&&this._onFinish()}),a.onDestroy(()=>{++e==o&&this._onDestroy()}),a.onStart(()=>{++n==o&&this._onStart()})}),this.totalTime=this.players.reduce((a,d)=>Math.max(a,d.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(s=>s()),this._onDoneFns=[])}init(){this.players.forEach(s=>s.init())}onStart(s){this._onStartFns.push(s)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(s=>s()),this._onStartFns=[])}onDone(s){this._onDoneFns.push(s)}onDestroy(s){this._onDestroyFns.push(s)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(s=>s.play())}pause(){this.players.forEach(s=>s.pause())}restart(){this.players.forEach(s=>s.restart())}finish(){this._onFinish(),this.players.forEach(s=>s.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(s=>s.destroy()),this._onDestroyFns.forEach(s=>s()),this._onDestroyFns=[])}reset(){this.players.forEach(s=>s.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(s){let t=s*this.totalTime;this.players.forEach(e=>{let n=e.totalTime?Math.min(1,t/e.totalTime):1;e.setPosition(n)})}getPosition(){let s=this.players.reduce((t,e)=>t===null||e.totalTime>t.totalTime?e:t,null);return s!=null?s.getPosition():0}beforeDestroy(){this.players.forEach(s=>{s.beforeDestroy&&s.beforeDestroy()})}triggerCallback(s){let t=s=="start"?this._onStartFns:this._onDoneFns;t.forEach(e=>e()),t.length=0}},Ot="!";var _t=["toast-component",""];function Et(i,s){if(i&1){let t=Q();h(0,"button",5),j("click",function(){V(t);let n=c();return z(n.remove())}),h(1,"span",6),f(2,"\xD7"),p()()}}function Ft(i,s){if(i&1&&(Y(0),f(1),K()),i&2){let t=c(2);r(),b("[",t.duplicatesCount+1,"]")}}function jt(i,s){if(i&1&&(h(0,"div"),f(1),S(2,Ft,2,1,"ng-container",4),p()),i&2){let t=c();m(t.options.titleClass),E("aria-label",t.title),r(),b(" ",t.title," "),r(),l("ngIf",t.duplicatesCount)}}function At(i,s){if(i&1&&F(0,"div",7),i&2){let t=c();m(t.options.messageClass),l("innerHTML",t.message,q)}}function Rt(i,s){if(i&1&&(h(0,"div",8),f(1),p()),i&2){let t=c();m(t.options.messageClass),E("aria-label",t.message),r(),b(" ",t.message," ")}}function Ht(i,s){if(i&1&&(h(0,"div"),F(1,"div",9),p()),i&2){let t=c();r(),A("width",t.width()+"%")}}function kt(i,s){if(i&1){let t=Q();h(0,"button",5),j("click",function(){V(t);let n=c();return z(n.remove())}),h(1,"span",6),f(2,"\xD7"),p()()}}function Nt(i,s){if(i&1&&(Y(0),f(1),K()),i&2){let t=c(2);r(),b("[",t.duplicatesCount+1,"]")}}function Mt(i,s){if(i&1&&(h(0,"div"),f(1),S(2,Nt,2,1,"ng-container",4),p()),i&2){let t=c();m(t.options.titleClass),E("aria-label",t.title),r(),b(" ",t.title," "),r(),l("ngIf",t.duplicatesCount)}}function Pt(i,s){if(i&1&&F(0,"div",7),i&2){let t=c();m(t.options.messageClass),l("innerHTML",t.message,q)}}function Bt(i,s){if(i&1&&(h(0,"div",8),f(1),p()),i&2){let t=c();m(t.options.messageClass),E("aria-label",t.message),r(),b(" ",t.message," ")}}function $t(i,s){if(i&1&&(h(0,"div"),F(1,"div",9),p()),i&2){let t=c();r(),A("width",t.width()+"%")}}var et=class{_attachedHost;component;viewContainerRef;injector;constructor(s,t){this.component=s,this.injector=t}attach(s,t){return this._attachedHost=s,s.attach(this,t)}detach(){let s=this._attachedHost;if(s)return this._attachedHost=void 0,s.detach()}get isAttached(){return this._attachedHost!=null}setAttachedHost(s){this._attachedHost=s}},it=class{_attachedPortal;_disposeFn;attach(s,t){return this._attachedPortal=s,this.attachComponentPortal(s,t)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(s){this._disposeFn=s}},st=class{_overlayRef;componentInstance;duplicatesCount=0;_afterClosed=new g;_activate=new g;_manualClose=new g;_resetTimeout=new g;_countDuplicate=new g;constructor(s){this._overlayRef=s}manualClose(){this._manualClose.next(),this._manualClose.complete()}manualClosed(){return this._manualClose.asObservable()}timeoutReset(){return this._resetTimeout.asObservable()}countDuplicate(){return this._countDuplicate.asObservable()}close(){this._overlayRef.detach(),this._afterClosed.next(),this._manualClose.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete(),this._resetTimeout.complete(),this._countDuplicate.complete()}afterClosed(){return this._afterClosed.asObservable()}isInactive(){return this._activate.isStopped}activate(){this._activate.next(),this._activate.complete()}afterActivate(){return this._activate.asObservable()}onDuplicate(s,t){s&&this._resetTimeout.next(),t&&this._countDuplicate.next(++this.duplicatesCount)}},D=class{toastId;config;message;title;toastType;toastRef;_onTap=new g;_onAction=new g;constructor(s,t,e,n,o,a){this.toastId=s,this.config=t,this.message=e,this.title=n,this.toastType=o,this.toastRef=a,this.toastRef.afterClosed().subscribe(()=>{this._onAction.complete(),this._onTap.complete()})}triggerTap(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()}onTap(){return this._onTap.asObservable()}triggerAction(s){this._onAction.next(s)}onAction(){return this._onAction.asObservable()}},vt={maxOpened:0,autoDismiss:!1,newestOnTop:!0,preventDuplicates:!1,countDuplicates:!1,resetTimeoutOnDuplicate:!1,includeTitleDuplicates:!1,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},closeButton:!1,disableTimeOut:!1,timeOut:5e3,extendedTimeOut:1e3,enableHtml:!1,progressBar:!1,toastClass:"ngx-toastr",positionClass:"toast-top-right",titleClass:"toast-title",messageClass:"toast-message",easing:"ease-in",easeTime:300,tapToDismiss:!0,onActivateTick:!1,progressAnimation:"decreasing"},yt=new ct("ToastConfig"),nt=class extends it{_hostDomElement;_componentFactoryResolver;_appRef;constructor(s,t,e){super(),this._hostDomElement=s,this._componentFactoryResolver=t,this._appRef=e}attachComponentPortal(s,t){let e=this._componentFactoryResolver.resolveComponentFactory(s.component),n;return n=e.create(s.injector),this._appRef.attachView(n.hostView),this.setDisposeFn(()=>{this._appRef.detachView(n.hostView),n.destroy()}),t?this._hostDomElement.insertBefore(this._getComponentRootNode(n),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(n)),n}_getComponentRootNode(s){return s.hostView.rootNodes[0]}},Lt=(()=>{class i{_document=_(Z);_containerElement;ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let t=this._document.createElement("div");t.classList.add("overlay-container"),t.setAttribute("aria-live","polite"),this._document.body.appendChild(t),this._containerElement=t}static \u0275fac=function(e){return new(e||i)};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),ot=class{_portalHost;constructor(s){this._portalHost=s}attach(s,t=!0){return this._portalHost.attach(s,t)}detach(){return this._portalHost.detach()}},Vt=(()=>{class i{_overlayContainer=_(Lt);_componentFactoryResolver=_(dt);_appRef=_(M);_document=_(Z);_paneElements=new Map;create(t,e){return this._createOverlayRef(this.getPaneElement(t,e))}getPaneElement(t="",e){return this._paneElements.get(e)||this._paneElements.set(e,{}),this._paneElements.get(e)[t]||(this._paneElements.get(e)[t]=this._createPaneElement(t,e)),this._paneElements.get(e)[t]}_createPaneElement(t,e){let n=this._document.createElement("div");return n.id="toast-container",n.classList.add(t),n.classList.add("toast-container"),e?e.getContainerElement().appendChild(n):this._overlayContainer.getContainerElement().appendChild(n),n}_createPortalHost(t){return new nt(t,this._componentFactoryResolver,this._appRef)}_createOverlayRef(t){return new ot(this._createPortalHost(t))}static \u0275fac=function(e){return new(e||i)};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),bt=(()=>{class i{overlay;_injector;sanitizer;ngZone;toastrConfig;currentlyActive=0;toasts=[];overlayContainer;previousToastMessage;index=0;constructor(t,e,n,o,a){this.overlay=e,this._injector=n,this.sanitizer=o,this.ngZone=a,this.toastrConfig=u(u({},t.default),t.config),t.config.iconClasses&&(this.toastrConfig.iconClasses=u(u({},t.default.iconClasses),t.config.iconClasses))}show(t,e,n={},o=""){return this._preBuildNotification(o,t,e,this.applyConfig(n))}success(t,e,n={}){let o=this.toastrConfig.iconClasses.success||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}error(t,e,n={}){let o=this.toastrConfig.iconClasses.error||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}info(t,e,n={}){let o=this.toastrConfig.iconClasses.info||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}warning(t,e,n={}){let o=this.toastrConfig.iconClasses.warning||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}clear(t){for(let e of this.toasts)if(t!==void 0){if(e.toastId===t){e.toastRef.manualClose();return}}else e.toastRef.manualClose()}remove(t){let e=this._findToast(t);if(!e||(e.activeToast.toastRef.close(),this.toasts.splice(e.index,1),this.currentlyActive=this.currentlyActive-1,!this.toastrConfig.maxOpened||!this.toasts.length))return!1;if(this.currentlyActive<this.toastrConfig.maxOpened&&this.toasts[this.currentlyActive]){let n=this.toasts[this.currentlyActive].toastRef;n.isInactive()||(this.currentlyActive=this.currentlyActive+1,n.activate())}return!0}findDuplicate(t="",e="",n,o){let{includeTitleDuplicates:a}=this.toastrConfig;for(let d of this.toasts){let k=a&&d.title===t;if((!a||k)&&d.message===e)return d.toastRef.onDuplicate(n,o),d}return null}applyConfig(t={}){return u(u({},this.toastrConfig),t)}_findToast(t){for(let e=0;e<this.toasts.length;e++)if(this.toasts[e].toastId===t)return{index:e,activeToast:this.toasts[e]};return null}_preBuildNotification(t,e,n,o){return o.onActivateTick?this.ngZone.run(()=>this._buildNotification(t,e,n,o)):this._buildNotification(t,e,n,o)}_buildNotification(t,e,n,o){if(!o.toastComponent)throw new Error("toastComponent required");let a=this.findDuplicate(n,e,this.toastrConfig.resetTimeoutOnDuplicate&&o.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&n||e)&&this.toastrConfig.preventDuplicates&&a!==null)return a;this.previousToastMessage=e;let d=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(d=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));let k=this.overlay.create(o.positionClass,this.overlayContainer);this.index=this.index+1;let rt=e;e&&o.enableHtml&&(rt=this.sanitizer.sanitize(ht.HTML,e));let I=new st(k),$=new D(this.index,o,rt,n,t,I),Ct=[{provide:D,useValue:$}],wt=N.create({providers:Ct,parent:this._injector}),Dt=new et(o.toastComponent,wt),at=k.attach(Dt,o.newestOnTop);I.componentInstance=at.instance;let L={toastId:this.index,title:n||"",message:e||"",toastRef:I,onShown:I.afterActivate(),onHidden:I.afterClosed(),onTap:$.onTap(),onAction:$.onAction(),portal:at};return d||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{L.toastRef.activate()})),this.toasts.push(L),L}static \u0275fac=function(e){return new(e||i)(w(yt),w(Vt),w(N),w(gt),w(U))};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),zt=(()=>{class i{toastrService;toastPackage;ngZone;message;title;options;duplicatesCount;originalTimeout;width=O(-1);toastClasses="";state;get _state(){return this.state()}get displayStyle(){if(this.state().value==="inactive")return"none"}timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,e,n){this.toastrService=t,this.toastPackage=e,this.ngZone=n,this.message=e.message,this.title=e.title,this.options=e.config,this.originalTimeout=e.config.timeOut,this.toastClasses=`${e.toastType} ${e.config.toastClass}`,this.sub=e.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=e.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=e.toastRef.countDuplicate().subscribe(o=>{this.duplicatesCount=o}),this.state=O({value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.update(t=>T(u({},t),{value:"active"})),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.outsideTimeout(()=>this.remove(),this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let t=new Date().getTime(),e=this.hideTime-t;this.width.set(e/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(n=>100-n),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.update(t=>T(u({},t),{value:"active"})),this.outsideTimeout(()=>this.remove(),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10)}remove(){this.state().value!=="removed"&&(clearTimeout(this.timeout),this.state.update(t=>T(u({},t),{value:"removed"})),this.outsideTimeout(()=>this.toastrService.remove(this.toastPackage.toastId),+this.toastPackage.config.easeTime))}tapToast(){this.state().value!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state().value!=="removed"&&this.options.disableTimeOut!=="extendedTimeOut"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state().value==="removed"||(this.outsideTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}outsideTimeout(t,e){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(t),e)):this.timeout=setTimeout(()=>t(),e)}outsideInterval(t,e){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(t),e)):this.intervalId=setInterval(()=>t(),e)}runInsideAngular(t){this.ngZone?this.ngZone.run(()=>t()):t()}static \u0275fac=function(e){return new(e||i)(y(bt),y(D),y(U))};static \u0275cmp=G({type:i,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(e,n){e&1&&j("click",function(){return n.tapToast()})("mouseenter",function(){return n.stickAround()})("mouseleave",function(){return n.delayedHideToast()}),e&2&&(mt("@flyInOut",n._state),m(n.toastClasses),A("display",n.displayStyle))},attrs:_t,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(e,n){e&1&&S(0,Et,3,0,"button",0)(1,jt,3,5,"div",1)(2,At,1,3,"div",2)(3,Rt,2,4,"div",3)(4,Ht,2,2,"div",4),e&2&&(l("ngIf",n.options.closeButton),r(),l("ngIf",n.title),r(),l("ngIf",n.message&&n.options.enableHtml),r(),l("ngIf",n.message&&!n.options.enableHtml),r(),l("ngIf",n.options.progressBar))},dependencies:[J],encapsulation:2,data:{animation:[tt("flyInOut",[H("inactive",R({opacity:0})),H("active",R({opacity:1})),H("removed",R({opacity:0})),B("inactive => active",P("{{ easeTime }}ms {{ easing }}")),B("active => removed",P("{{ easeTime }}ms {{ easing }}"))])]},changeDetection:0})}return i})(),Zt=T(u({},vt),{toastComponent:zt}),qt=(i={})=>ut([{provide:yt,useValue:{default:Zt,config:i}}]),be=(()=>{class i{static forRoot(t={}){return{ngModule:i,providers:[qt(t)]}}static \u0275fac=function(e){return new(e||i)};static \u0275mod=pt({type:i});static \u0275inj=lt({})}return i})();var Gt=(()=>{class i{toastrService;toastPackage;appRef;message;title;options;duplicatesCount;originalTimeout;width=O(-1);toastClasses="";get displayStyle(){return this.state()==="inactive"?"none":null}state=O("inactive");timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,e,n){this.toastrService=t,this.toastPackage=e,this.appRef=n,this.message=e.message,this.title=e.title,this.options=e.config,this.originalTimeout=e.config.timeOut,this.toastClasses=`${e.toastType} ${e.config.toastClass}`,this.sub=e.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=e.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=e.toastRef.countDuplicate().subscribe(o=>{this.duplicatesCount=o})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.set("active"),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.timeout=setTimeout(()=>{this.remove()},this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))),this.options.onActivateTick&&this.appRef.tick()}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let t=new Date().getTime(),e=this.hideTime-t;this.width.set(e/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(n=>100-n),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.set("active"),this.options.timeOut=this.originalTimeout,this.timeout=setTimeout(()=>this.remove(),this.originalTimeout),this.hideTime=new Date().getTime()+(this.originalTimeout||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))}remove(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.state.set("removed"),this.timeout=setTimeout(()=>this.toastrService.remove(this.toastPackage.toastId)))}tapToast(){this.state()!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state()==="removed"||(this.timeout=setTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10)))}static \u0275fac=function(e){return new(e||i)(y(bt),y(D),y(M))};static \u0275cmp=G({type:i,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(e,n){e&1&&j("click",function(){return n.tapToast()})("mouseenter",function(){return n.stickAround()})("mouseleave",function(){return n.delayedHideToast()}),e&2&&(m(n.toastClasses),A("display",n.displayStyle))},attrs:_t,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(e,n){e&1&&S(0,kt,3,0,"button",0)(1,Mt,3,5,"div",1)(2,Pt,1,3,"div",2)(3,Bt,2,4,"div",3)(4,$t,2,2,"div",4),e&2&&(l("ngIf",n.options.closeButton),r(),l("ngIf",n.title),r(),l("ngIf",n.message&&n.options.enableHtml),r(),l("ngIf",n.message&&!n.options.enableHtml),r(),l("ngIf",n.options.progressBar))},dependencies:[J],encapsulation:2,changeDetection:0})}return i})(),Te=T(u({},vt),{toastComponent:Gt});var x={serverTarget:Tt().version,production:!0,socket:"",api:{base:"/api",socket:`${window.location.protocol==="http:"?"ws://":"wss://"}${window.location.host}`,origin:window.location.origin},jwt:{tokenKey:"access_token",allowedDomains:[document.location.host],disallowedRoutes:[`${window.location.protocol}//${document.location.host}/api/auth/login`]},apiHttpOptions:{},owm:{appid:"fec67b55f7f74deaa28df89ba6a60821"}};var Fe=(()=>{class i{$http=_(ft);get(t,e){return this.$http.get(`${x.api.base}${t}`,e)}post(t,e,n){return this.$http.post(`${x.api.base}${t}`,e,n)}put(t,e,n){return this.$http.put(`${x.api.base}${t}`,e,n)}patch(t,e,n){return this.$http.patch(`${x.api.base}${t}`,e,n)}delete(t,e){return this.$http.delete(`${x.api.base}${t}`,e)}static \u0275fac=function(e){return new(e||i)};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();export{v as a,It as b,tt as c,P as d,Yt as e,R as f,B as g,W as h,X as i,Ot as j,bt as k,be as l,x as m,Fe as n};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ne}from"./chunk-CXP6VKNZ.js";import{a as oe,b as le}from"./chunk-WDFAWIMZ.js";import{a as X,b as Z}from"./chunk-HUAADM2I.js";import{a as ie}from"./chunk-THGDS273.js";import{m as Y,n as G,t as Q}from"./chunk-C3HWKB2Q.js";import{c as J,e as K,l as U,z as W}from"./chunk-WFYBML4S.js";import{b as ee}from"./chunk-GEIS2BWE.js";import{b as te}from"./chunk-W4PQWIYG.js";import{k as D,n as I}from"./chunk-DVQU3KHF.js";import{a as S,b as A}from"./chunk-R3563DDE.js";import"./chunk-Q4CZ7LVK.js";import{Hb as b,Hc as r,Ib as d,Ic as s,Jb as c,Jc as q,Lb as P,Mb as B,Nb as L,Ob as v,Pb as y,Qb as w,Rb as x,Sb as m,Tb as u,Ub as V,_b as _,ab as n,bc as E,cc as k,dc as a,fb as R,g as se,h as j,la as h,mb as M,pd as z,qc as C,ra as f,rc as $,sa as g,sc as T,w as H,xc as O,yc as N,zc as F}from"./chunk-ULJPS3WS.js";var ae=se(le(),1);function ce(o,p){o&1&&(m(0,"div",5),V(1,"i",12),u())}function me(o,p){if(o&1){let e=_();m(0,"li",17),C(1),r(2,"date"),m(3,"button",18),r(4,"translate"),k("click",function(){let t=f(e).$implicit,l=a(3);return g(l.restore(t.id))}),V(5,"i",19),u()()}if(o&2){let e=p.$implicit;n(),T(" ",q(2,2,e.timestamp,"medium")," "),n(2),b("aria-label",s(4,5,"config.restore.copy_to_editor"))}}function pe(o,p){if(o&1&&(m(0,"ul",15),B(1,me,6,7,"li",17,P),u()),o&2){let e=a(2);n(),L(e.backupList)}}function fe(o,p){o&1&&(m(0,"p",16),C(1),r(2,"translate"),u()),o&2&&(n(),$(s(2,1,"config.restore.no_backups")))}function ge(o,p){if(o&1&&(m(0,"div",13),V(1,"i",14),u(),m(2,"p",13),C(3),r(4,"translate"),u(),d(5,pe,3,0,"ul",15),d(6,fe,3,3,"p",16)),o&2){let e=a();n(3),$(s(4,3,"config.restore.title_restore_homebridge_backup")),n(2),c(e.backupList&&e.backupList.length?5:-1),n(),c(!e.backupList||!e.backupList.length?6:-1)}}function ue(o,p){if(o&1){let e=_();m(0,"button",20),r(1,"translate"),k("click",function(){f(e);let t=a();return g(t.dismissModal())}),C(2),r(3,"translate"),u()}o&2&&(b("aria-label",s(1,2,"form.button_close")),n(2),T(" ",s(3,4,"form.button_close")," "))}function he(o,p){if(o&1){let e=_();m(0,"button",20),r(1,"translate"),k("click",function(){f(e);let t=a();return g(t.dismissModal())}),C(2),r(3,"translate"),u()}o&2&&(b("aria-label",s(1,2,"form.button_close")),n(2),T(" ",s(3,4,"form.button_close")," "))}function _e(o,p){if(o&1){let e=_();m(0,"button",21),r(1,"translate"),k("click",function(){f(e);let t=a();return g(t.deleteAllBackups())}),C(2),r(3,"translate"),u()}o&2&&(b("aria-label",s(1,2,"form.button_remove")),n(2),T(" ",s(3,4,"form.button_remove")," "))}var re=(()=>{class o{$activeModal=h(Y);$api=h(I);$toastr=h(D);$translate=h(S);loading=!0;backupList=[];ngOnInit(){this.$api.get("/config-editor/backups").subscribe({next:e=>{this.loading=!1,this.backupList=e},error:e=>{this.loading=!1,console.error(e),this.$toastr.error(e.error.message||e.message,this.$translate.instant("toast.title_error"))}})}restore(e){return this.$activeModal.close(e)}deleteAllBackups(){return this.$api.delete("/config-editor/backups").subscribe({next:()=>{this.$activeModal.dismiss(),this.$toastr.success(this.$translate.instant("config.restore.toast_backups_deleted"),this.$translate.instant("toast.title_success"))},error:e=>{console.error(e),this.$toastr.error(e.error.message||e.message,this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=M({type:o,selectors:[["ng-component"]],decls:17,vars:11,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","primary-text"],[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",1,"btn","btn-danger","me-auto"],[1,"fa","fa-fw","fa-cog","fa-spin",2,"font-size","75px"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-history","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box"],[1,"text-center","mb-0"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"btn","btn-primary","m-0","ms-3",3,"click"],[1,"fas","fa-fw","fa-arrow-right"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],["type","button",1,"btn","btn-danger","me-auto",3,"click"]],template:function(i,t){i&1&&(m(0,"div",0)(1,"div",1)(2,"h5",2),C(3),r(4,"translate"),u(),m(5,"button",3),r(6,"translate"),k("click",function(){return t.dismissModal()}),u()(),m(7,"div",4),d(8,ce,2,0,"div",5),d(9,ge,7,5),u(),m(10,"div",6)(11,"div",7),d(12,ue,4,6,"button",8),u(),m(13,"div",9),d(14,he,4,6,"button",8),u(),m(15,"div",10),d(16,_e,4,6,"button",11),u()()()),i&2&&(n(3),$(s(4,7,"form.button_restore")),n(2),b("aria-label",s(6,9,"form.button_close")),n(3),c(t.loading?8:-1),n(),c(t.loading?-1:9),n(3),c(!t.loading&&t.backupList.length?12:-1),n(2),c(t.loading||!t.loading&&!t.backupList.length?14:-1),n(2),c(!t.loading&&t.backupList.length?16:-1))},dependencies:[z,A],encapsulation:2})}return o})();function be(o,p){if(o&1){let e=_();y(0,"button",13),r(1,"translate"),r(2,"translate"),E("click",function(){f(e);let t=a();return g(t.onExportConfig())}),x(3,"i",14),w()}o&2&&(v("ngbTooltip",s(1,2,"form.button_download")),b("aria-label",s(2,4,"form.button_download")))}function Ce(o,p){if(o&1){let e=_();y(0,"button",15),r(1,"translate"),r(2,"translate"),E("click",function(){f(e);let t=a();return g(t.onCancelRestore())}),x(3,"i",16),w()}if(o&2){let e=a();v("disabled",e.saveInProgress)("ngbTooltip",s(1,3,"form.button_cancel")),b("aria-label",s(2,5,"form.button_cancel"))}}function ye(o,p){if(o&1){let e=_();y(0,"button",13),r(1,"translate"),r(2,"translate"),E("click",function(){f(e);let t=a();return g(t.onRestore())}),x(3,"i",17),w()}o&2&&(v("ngbTooltip",s(1,2,"form.button_restore")),b("aria-label",s(2,4,"form.button_restore")))}function we(o,p){o&1&&x(0,"i",8)}function ve(o,p){o&1&&x(0,"i",9)}function Ee(o,p){if(o&1){let e=_();y(0,"ngx-monaco-editor",18),E("onInit",function(t){f(e);let l=a();return g(l.onEditorInit(t))})("keydown.control.s",function(t){f(e);let l=a();return t.preventDefault(),g(l.onSave())})("keydown.meta.s",function(t){f(e);let l=a();return t.preventDefault(),g(l.onSave())}),w()}if(o&2){let e=a();v("options",e.editorOptions)("model",e.monacoEditorModel)}}function xe(o,p){if(o&1){let e=_();y(0,"ngx-monaco-diff-editor",19),E("onInit",function(t){f(e);let l=a();return g(l.onInitDiffEditor(t))})("keydown.control.s",function(t){f(e);let l=a();return t.preventDefault(),g(l.onSave())})("keydown.meta.s",function(t){f(e);let l=a();return t.preventDefault(),g(l.onSave())}),w()}if(o&2){let e=a();v("options",e.editorOptions)("originalModel",e.monacoEditorModel)("modifiedModel",e.monacoEditorModel)}}function ke(o,p){if(o&1){let e=_();y(0,"textarea",20),F("ngModelChange",function(t){f(e);let l=a();return N(l.homebridgeConfig,t)||(l.homebridgeConfig=t),g(t)}),C(1," "),w()}if(o&2){let e=a();O("ngModel",e.homebridgeConfig)}}var Ge=(()=>{class o{$api=h(I);$md=h(ie);$modal=h(G);$monacoEditor=h(ne);$route=h(ee);$renderer=h(R);$settings=h(te);$toastr=h(D);$translate=h(S);editorDecorations=[];lastHeight;visualViewPortEventCallback;homebridgeConfig;originalConfig;saveInProgress;isMobile=!1;monacoEditor;editorOptions;monacoEditorModel;constructor(){this.isMobile=this.$md.detect.mobile()}ngOnInit(){this.editorOptions={language:"json",theme:this.$settings.actualLightingMode==="dark"?"vs-dark":"vs-light",automaticLayout:!0};let e=document.querySelector(".content");this.$renderer.setStyle(e,"height","100%"),this.visualViewPortEventCallback=()=>this.visualViewPortChanged(),this.lastHeight=window.innerHeight,window.visualViewport&&!this.isMobile&&(window.visualViewport.addEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.disableTouchMove()),this.visualViewPortEventCallback=()=>this.visualViewPortChanged(),this.lastHeight=window.innerHeight,window.visualViewport&&!this.isMobile&&(window.visualViewport.addEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.disableTouchMove()),this.$route.data.subscribe(i=>{this.homebridgeConfig=i.config}),this.monacoEditorModel={value:"{}",language:"json",uri:window.monaco?window.monaco.Uri.parse("a://homebridge/config.json"):void 0},window.monaco?this.setMonacoEditorModel():this.$monacoEditor.readyEvent.subscribe({next:()=>{this.setMonacoEditorModel()}})}onEditorInit(e){window.editor=e,this.monacoEditor=e,this.monacoEditor.getModel().setValue(this.homebridgeConfig)}onInitDiffEditor(e){this.monacoEditor=e.modifiedEditor,e.getModel().original.setValue(this.originalConfig),e.getModel().modified.setValue(this.homebridgeConfig),window.editor=e}onSave(){return j(this,null,function*(){if(!this.saveInProgress){this.monacoEditor&&(this.editorDecorations=this.monacoEditor.deltaDecorations(this.editorDecorations,[])),this.saveInProgress=!0;try{if(!this.isMobile){yield this.monacoEditor.getAction("editor.action.formatDocument").run();let i=window.monaco.editor.getModelMarkers({owner:"json"});for(let t of i)if(t.message==="Duplicate object key"){this.saveInProgress=!1,this.$toastr.error(this.$translate.instant("config.config_invalid_json"),this.$translate.instant("toast.title_error"));return}this.homebridgeConfig=this.monacoEditor.getModel().getValue()}let e=this.parseConfigFromEditor();this.homebridgeConfig=JSON.stringify(e,null,4),typeof e.bridge!="object"?this.$toastr.error(this.$translate.instant("config.config_bridge_missing"),this.$translate.instant("toast.title_error")):/^(?:[0-9A-F]{2}:){5}[0-9A-F]{2}$/i.test(e.bridge.username)?e.accessories&&!Array.isArray(e.accessories)?this.$toastr.error(this.$translate.instant("config.config_accessory_must_be_array"),this.$translate.instant("toast.title_error")):e.platforms&&!Array.isArray(e.platforms)?this.$toastr.error(this.$translate.instant("config.config_platform_must_be_array"),this.$translate.instant("toast.title_error")):e.platforms&&Array.isArray(e.platforms)&&!this.validateSection(e.platforms,"platform")||e.accessories&&Array.isArray(e.accessories)&&!this.validateSection(e.accessories,"accessory")||e.plugins&&Array.isArray(e.plugins)&&!this.validatePlugins(e.plugins,"plugins")||e.disabledPlugins&&Array.isArray(e.disabledPlugins)&&!this.validatePlugins(e.disabledPlugins,"disabledPlugins")||(yield this.saveConfig(e),this.originalConfig=""):this.$toastr.error(this.$translate.instant("config.config_username_error"),this.$translate.instant("toast.title_error"))}catch(e){console.error(e),this.$toastr.error(this.$translate.instant("config.config_invalid_json"),this.$translate.instant("toast.title_error"))}this.saveInProgress=!1}})}onRestore(){this.$modal.open(re,{size:"lg",backdrop:"static"}).result.then(e=>{this.originalConfig||(this.originalConfig=this.homebridgeConfig),this.$api.get(`/config-editor/backups/${e}`).subscribe({next:i=>{this.$toastr.info(this.$translate.instant("config.restore.confirm"),this.$translate.instant("config.title_backup_loaded")),this.homebridgeConfig=JSON.stringify(i,null,4),this.monacoEditor&&window.editor.modifiedEditor&&(this.editorDecorations=this.monacoEditor.deltaDecorations(this.editorDecorations,[]),this.monacoEditor.executeEdits("beautifier",[{identifier:"delete",range:new monaco.Range(1,1,this.monacoEditor.getModel().getLineCount()+10,1),text:"",forceMoveMarkers:!0}]),this.monacoEditor.executeEdits("beautifier",[{identifier:"insert",range:new monaco.Range(1,1,1,1),text:this.homebridgeConfig,forceMoveMarkers:!0}]))},error:i=>{console.error(i),this.$toastr.error(i.error.message||this.$translate.instant("backup.load_error"),this.$translate.instant("toast.title_error"))}})}).catch(()=>{})}onExportConfig(){let e=`data:text/json;charset=utf-8,${encodeURIComponent(this.homebridgeConfig)}`,i=document.createElement("a");i.setAttribute("href",e),i.setAttribute("download","config.json"),document.body.appendChild(i),i.click(),i.remove()}onCancelRestore(){this.homebridgeConfig=this.originalConfig,this.originalConfig=""}ngOnDestroy(){let e=document.querySelector(".content");this.$renderer.removeStyle(e,"height"),window.visualViewport&&(window.visualViewport.removeEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.enableTouchMove()),this.monacoEditor&&this.monacoEditor.dispose()}validateSection(e,i){for(let t of e){if(typeof t!="object"||Array.isArray(t))return this.$toastr.error(this.$translate.instant("config.error_blocks_objects",{type:i}),this.$translate.instant("toast.title_error")),this.highlightOffendingArrayItem(t),!1;if(!t[i])return this.$toastr.error(this.$translate.instant("config.error_blocks_type",{type:i}),this.$translate.instant("toast.title_error")),this.highlightOffendingArrayItem(t),!1;if(typeof t[i]!="string")return this.$toastr.error(this.$translate.instant("config.error_string_type",{type:i}),this.$translate.instant("toast.title_error")),this.highlightOffendingArrayItem(t),!1}return!0}validatePlugins(e,i){for(let t of e)if(typeof t!="string")return this.$toastr.error(this.$translate.instant("config.error_string_array",{key:i}),this.$translate.instant("toast.title_error")),!1;return!0}highlightOffendingArrayItem(e){this.monacoEditor&&(e=JSON.stringify(e,null,4).split(`
|
|
1
|
+
import{a as ne}from"./chunk-CXP6VKNZ.js";import{a as oe,b as le}from"./chunk-JHPEPG44.js";import{a as X,b as Z}from"./chunk-HUAADM2I.js";import{a as ie}from"./chunk-THGDS273.js";import{m as Y,n as G,t as Q}from"./chunk-C3HWKB2Q.js";import{c as J,e as K,l as U,z as W}from"./chunk-WFYBML4S.js";import{b as ee}from"./chunk-ZJ3JJYIN.js";import{b as te}from"./chunk-ZCSPADUX.js";import{k as D,n as I}from"./chunk-FPLWS5WP.js";import{a as S,b as A}from"./chunk-R3563DDE.js";import"./chunk-HBOWJDR5.js";import{Hb as b,Hc as r,Ib as d,Ic as s,Jb as c,Jc as q,Lb as P,Mb as B,Nb as L,Ob as v,Pb as y,Qb as w,Rb as x,Sb as m,Tb as u,Ub as V,_b as _,ab as n,bc as E,cc as k,dc as a,fb as R,g as se,h as j,la as h,mb as M,pd as z,qc as C,ra as f,rc as $,sa as g,sc as T,w as H,xc as O,yc as N,zc as F}from"./chunk-ULJPS3WS.js";var ae=se(le(),1);function ce(o,p){o&1&&(m(0,"div",5),V(1,"i",12),u())}function me(o,p){if(o&1){let e=_();m(0,"li",17),C(1),r(2,"date"),m(3,"button",18),r(4,"translate"),k("click",function(){let t=f(e).$implicit,l=a(3);return g(l.restore(t.id))}),V(5,"i",19),u()()}if(o&2){let e=p.$implicit;n(),T(" ",q(2,2,e.timestamp,"medium")," "),n(2),b("aria-label",s(4,5,"config.restore.copy_to_editor"))}}function pe(o,p){if(o&1&&(m(0,"ul",15),B(1,me,6,7,"li",17,P),u()),o&2){let e=a(2);n(),L(e.backupList)}}function fe(o,p){o&1&&(m(0,"p",16),C(1),r(2,"translate"),u()),o&2&&(n(),$(s(2,1,"config.restore.no_backups")))}function ge(o,p){if(o&1&&(m(0,"div",13),V(1,"i",14),u(),m(2,"p",13),C(3),r(4,"translate"),u(),d(5,pe,3,0,"ul",15),d(6,fe,3,3,"p",16)),o&2){let e=a();n(3),$(s(4,3,"config.restore.title_restore_homebridge_backup")),n(2),c(e.backupList&&e.backupList.length?5:-1),n(),c(!e.backupList||!e.backupList.length?6:-1)}}function ue(o,p){if(o&1){let e=_();m(0,"button",20),r(1,"translate"),k("click",function(){f(e);let t=a();return g(t.dismissModal())}),C(2),r(3,"translate"),u()}o&2&&(b("aria-label",s(1,2,"form.button_close")),n(2),T(" ",s(3,4,"form.button_close")," "))}function he(o,p){if(o&1){let e=_();m(0,"button",20),r(1,"translate"),k("click",function(){f(e);let t=a();return g(t.dismissModal())}),C(2),r(3,"translate"),u()}o&2&&(b("aria-label",s(1,2,"form.button_close")),n(2),T(" ",s(3,4,"form.button_close")," "))}function _e(o,p){if(o&1){let e=_();m(0,"button",21),r(1,"translate"),k("click",function(){f(e);let t=a();return g(t.deleteAllBackups())}),C(2),r(3,"translate"),u()}o&2&&(b("aria-label",s(1,2,"form.button_remove")),n(2),T(" ",s(3,4,"form.button_remove")," "))}var re=(()=>{class o{$activeModal=h(Y);$api=h(I);$toastr=h(D);$translate=h(S);loading=!0;backupList=[];ngOnInit(){this.$api.get("/config-editor/backups").subscribe({next:e=>{this.loading=!1,this.backupList=e},error:e=>{this.loading=!1,console.error(e),this.$toastr.error(e.error.message||e.message,this.$translate.instant("toast.title_error"))}})}restore(e){return this.$activeModal.close(e)}deleteAllBackups(){return this.$api.delete("/config-editor/backups").subscribe({next:()=>{this.$activeModal.dismiss(),this.$toastr.success(this.$translate.instant("config.restore.toast_backups_deleted"),this.$translate.instant("toast.title_success"))},error:e=>{console.error(e),this.$toastr.error(e.error.message||e.message,this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=M({type:o,selectors:[["ng-component"]],decls:17,vars:11,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","primary-text"],[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",1,"btn","btn-danger","me-auto"],[1,"fa","fa-fw","fa-cog","fa-spin",2,"font-size","75px"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-history","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box"],[1,"text-center","mb-0"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"btn","btn-primary","m-0","ms-3",3,"click"],[1,"fas","fa-fw","fa-arrow-right"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],["type","button",1,"btn","btn-danger","me-auto",3,"click"]],template:function(i,t){i&1&&(m(0,"div",0)(1,"div",1)(2,"h5",2),C(3),r(4,"translate"),u(),m(5,"button",3),r(6,"translate"),k("click",function(){return t.dismissModal()}),u()(),m(7,"div",4),d(8,ce,2,0,"div",5),d(9,ge,7,5),u(),m(10,"div",6)(11,"div",7),d(12,ue,4,6,"button",8),u(),m(13,"div",9),d(14,he,4,6,"button",8),u(),m(15,"div",10),d(16,_e,4,6,"button",11),u()()()),i&2&&(n(3),$(s(4,7,"form.button_restore")),n(2),b("aria-label",s(6,9,"form.button_close")),n(3),c(t.loading?8:-1),n(),c(t.loading?-1:9),n(3),c(!t.loading&&t.backupList.length?12:-1),n(2),c(t.loading||!t.loading&&!t.backupList.length?14:-1),n(2),c(!t.loading&&t.backupList.length?16:-1))},dependencies:[z,A],encapsulation:2})}return o})();function be(o,p){if(o&1){let e=_();y(0,"button",13),r(1,"translate"),r(2,"translate"),E("click",function(){f(e);let t=a();return g(t.onExportConfig())}),x(3,"i",14),w()}o&2&&(v("ngbTooltip",s(1,2,"form.button_download")),b("aria-label",s(2,4,"form.button_download")))}function Ce(o,p){if(o&1){let e=_();y(0,"button",15),r(1,"translate"),r(2,"translate"),E("click",function(){f(e);let t=a();return g(t.onCancelRestore())}),x(3,"i",16),w()}if(o&2){let e=a();v("disabled",e.saveInProgress)("ngbTooltip",s(1,3,"form.button_cancel")),b("aria-label",s(2,5,"form.button_cancel"))}}function ye(o,p){if(o&1){let e=_();y(0,"button",13),r(1,"translate"),r(2,"translate"),E("click",function(){f(e);let t=a();return g(t.onRestore())}),x(3,"i",17),w()}o&2&&(v("ngbTooltip",s(1,2,"form.button_restore")),b("aria-label",s(2,4,"form.button_restore")))}function we(o,p){o&1&&x(0,"i",8)}function ve(o,p){o&1&&x(0,"i",9)}function Ee(o,p){if(o&1){let e=_();y(0,"ngx-monaco-editor",18),E("onInit",function(t){f(e);let l=a();return g(l.onEditorInit(t))})("keydown.control.s",function(t){f(e);let l=a();return t.preventDefault(),g(l.onSave())})("keydown.meta.s",function(t){f(e);let l=a();return t.preventDefault(),g(l.onSave())}),w()}if(o&2){let e=a();v("options",e.editorOptions)("model",e.monacoEditorModel)}}function xe(o,p){if(o&1){let e=_();y(0,"ngx-monaco-diff-editor",19),E("onInit",function(t){f(e);let l=a();return g(l.onInitDiffEditor(t))})("keydown.control.s",function(t){f(e);let l=a();return t.preventDefault(),g(l.onSave())})("keydown.meta.s",function(t){f(e);let l=a();return t.preventDefault(),g(l.onSave())}),w()}if(o&2){let e=a();v("options",e.editorOptions)("originalModel",e.monacoEditorModel)("modifiedModel",e.monacoEditorModel)}}function ke(o,p){if(o&1){let e=_();y(0,"textarea",20),F("ngModelChange",function(t){f(e);let l=a();return N(l.homebridgeConfig,t)||(l.homebridgeConfig=t),g(t)}),C(1," "),w()}if(o&2){let e=a();O("ngModel",e.homebridgeConfig)}}var Ge=(()=>{class o{$api=h(I);$md=h(ie);$modal=h(G);$monacoEditor=h(ne);$route=h(ee);$renderer=h(R);$settings=h(te);$toastr=h(D);$translate=h(S);editorDecorations=[];lastHeight;visualViewPortEventCallback;homebridgeConfig;originalConfig;saveInProgress;isMobile=!1;monacoEditor;editorOptions;monacoEditorModel;constructor(){this.isMobile=this.$md.detect.mobile()}ngOnInit(){this.editorOptions={language:"json",theme:this.$settings.actualLightingMode==="dark"?"vs-dark":"vs-light",automaticLayout:!0};let e=document.querySelector(".content");this.$renderer.setStyle(e,"height","100%"),this.visualViewPortEventCallback=()=>this.visualViewPortChanged(),this.lastHeight=window.innerHeight,window.visualViewport&&!this.isMobile&&(window.visualViewport.addEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.disableTouchMove()),this.visualViewPortEventCallback=()=>this.visualViewPortChanged(),this.lastHeight=window.innerHeight,window.visualViewport&&!this.isMobile&&(window.visualViewport.addEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.disableTouchMove()),this.$route.data.subscribe(i=>{this.homebridgeConfig=i.config}),this.monacoEditorModel={value:"{}",language:"json",uri:window.monaco?window.monaco.Uri.parse("a://homebridge/config.json"):void 0},window.monaco?this.setMonacoEditorModel():this.$monacoEditor.readyEvent.subscribe({next:()=>{this.setMonacoEditorModel()}})}onEditorInit(e){window.editor=e,this.monacoEditor=e,this.monacoEditor.getModel().setValue(this.homebridgeConfig)}onInitDiffEditor(e){this.monacoEditor=e.modifiedEditor,e.getModel().original.setValue(this.originalConfig),e.getModel().modified.setValue(this.homebridgeConfig),window.editor=e}onSave(){return j(this,null,function*(){if(!this.saveInProgress){this.monacoEditor&&(this.editorDecorations=this.monacoEditor.deltaDecorations(this.editorDecorations,[])),this.saveInProgress=!0;try{if(!this.isMobile){yield this.monacoEditor.getAction("editor.action.formatDocument").run();let i=window.monaco.editor.getModelMarkers({owner:"json"});for(let t of i)if(t.message==="Duplicate object key"){this.saveInProgress=!1,this.$toastr.error(this.$translate.instant("config.config_invalid_json"),this.$translate.instant("toast.title_error"));return}this.homebridgeConfig=this.monacoEditor.getModel().getValue()}let e=this.parseConfigFromEditor();this.homebridgeConfig=JSON.stringify(e,null,4),typeof e.bridge!="object"?this.$toastr.error(this.$translate.instant("config.config_bridge_missing"),this.$translate.instant("toast.title_error")):/^(?:[0-9A-F]{2}:){5}[0-9A-F]{2}$/i.test(e.bridge.username)?e.accessories&&!Array.isArray(e.accessories)?this.$toastr.error(this.$translate.instant("config.config_accessory_must_be_array"),this.$translate.instant("toast.title_error")):e.platforms&&!Array.isArray(e.platforms)?this.$toastr.error(this.$translate.instant("config.config_platform_must_be_array"),this.$translate.instant("toast.title_error")):e.platforms&&Array.isArray(e.platforms)&&!this.validateSection(e.platforms,"platform")||e.accessories&&Array.isArray(e.accessories)&&!this.validateSection(e.accessories,"accessory")||e.plugins&&Array.isArray(e.plugins)&&!this.validatePlugins(e.plugins,"plugins")||e.disabledPlugins&&Array.isArray(e.disabledPlugins)&&!this.validatePlugins(e.disabledPlugins,"disabledPlugins")||(yield this.saveConfig(e),this.originalConfig=""):this.$toastr.error(this.$translate.instant("config.config_username_error"),this.$translate.instant("toast.title_error"))}catch(e){console.error(e),this.$toastr.error(this.$translate.instant("config.config_invalid_json"),this.$translate.instant("toast.title_error"))}this.saveInProgress=!1}})}onRestore(){this.$modal.open(re,{size:"lg",backdrop:"static"}).result.then(e=>{this.originalConfig||(this.originalConfig=this.homebridgeConfig),this.$api.get(`/config-editor/backups/${e}`).subscribe({next:i=>{this.$toastr.info(this.$translate.instant("config.restore.confirm"),this.$translate.instant("config.title_backup_loaded")),this.homebridgeConfig=JSON.stringify(i,null,4),this.monacoEditor&&window.editor.modifiedEditor&&(this.editorDecorations=this.monacoEditor.deltaDecorations(this.editorDecorations,[]),this.monacoEditor.executeEdits("beautifier",[{identifier:"delete",range:new monaco.Range(1,1,this.monacoEditor.getModel().getLineCount()+10,1),text:"",forceMoveMarkers:!0}]),this.monacoEditor.executeEdits("beautifier",[{identifier:"insert",range:new monaco.Range(1,1,1,1),text:this.homebridgeConfig,forceMoveMarkers:!0}]))},error:i=>{console.error(i),this.$toastr.error(i.error.message||this.$translate.instant("backup.load_error"),this.$translate.instant("toast.title_error"))}})}).catch(()=>{})}onExportConfig(){let e=`data:text/json;charset=utf-8,${encodeURIComponent(this.homebridgeConfig)}`,i=document.createElement("a");i.setAttribute("href",e),i.setAttribute("download","config.json"),document.body.appendChild(i),i.click(),i.remove()}onCancelRestore(){this.homebridgeConfig=this.originalConfig,this.originalConfig=""}ngOnDestroy(){let e=document.querySelector(".content");this.$renderer.removeStyle(e,"height"),window.visualViewport&&(window.visualViewport.removeEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.enableTouchMove()),this.monacoEditor&&this.monacoEditor.dispose()}validateSection(e,i){for(let t of e){if(typeof t!="object"||Array.isArray(t))return this.$toastr.error(this.$translate.instant("config.error_blocks_objects",{type:i}),this.$translate.instant("toast.title_error")),this.highlightOffendingArrayItem(t),!1;if(!t[i])return this.$toastr.error(this.$translate.instant("config.error_blocks_type",{type:i}),this.$translate.instant("toast.title_error")),this.highlightOffendingArrayItem(t),!1;if(typeof t[i]!="string")return this.$toastr.error(this.$translate.instant("config.error_string_type",{type:i}),this.$translate.instant("toast.title_error")),this.highlightOffendingArrayItem(t),!1}return!0}validatePlugins(e,i){for(let t of e)if(typeof t!="string")return this.$toastr.error(this.$translate.instant("config.error_string_array",{key:i}),this.$translate.instant("toast.title_error")),!1;return!0}highlightOffendingArrayItem(e){this.monacoEditor&&(e=JSON.stringify(e,null,4).split(`
|
|
2
2
|
`).map(i=>` ${i}`).join(`
|
|
3
3
|
`),setTimeout(()=>{let i=this.monacoEditor.getModel().findMatches(e);if(i.length){let t=i[0].range,l=new monaco.Range(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn);this.editorDecorations=this.monacoEditor.deltaDecorations(this.editorDecorations,[{range:l,options:{isWholeLine:!0,linesDecorationsClassName:"hb-monaco-editor-line-error"}}])}},200))}setMonacoEditorModel(){if(window.monaco.languages.json.jsonDefaults.diagnosticsOptions.schemas.some(i=>i.uri==="http://homebridge/config.json"))return;let e=monaco.Uri.parse("a://homebridge/config.json");window.monaco.languages.json.jsonDefaults.setDiagnosticsOptions({allowComments:!1,validate:!0,schemas:[{uri:"http://homebridge/config.json",fileMatch:[e.toString()],schema:{type:"object",required:["bridge"],properties:{bridge:{type:"object",required:["name","username","port","pin"],properties:{name:{type:"string",description:`The Homebridge instance name.
|
|
4
4
|
This should be unique if you are running multiple instances of Homebridge.`,default:"Homebridge"},username:{type:"string",description:`Homebridge username must be 6 pairs of colon-separated hexadecimal characters (A-F 0-9).
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{$ as Je,$c as ft,Ab as oe,Ba as qe,Bb as se,Cb as Oe,Ga as Qe,H as $e,Ha as be,Ia as et,Ja as J,L as Xe,La as _e,Ma as De,Na as L,Oa as U,Pa as tt,Qa as nt,Ra as rt,S as Ge,Sa as ot,Ta as st,Ua as it,Va as at,Vc as ut,Wa as k,Wc as ht,_c as j,a as x,ad as pt,bb as Y,da as v,ea as O,eb as ct,ga as g,h as Ee,ha as ne,ja as w,k as Te,ka as h,la as M,ma as Re,nb as re,oa as Ye,pa as Ze,qa as We,r as we,rd as mt,sd as ie,tb as dt,td as ae,va as R,vb as S,vd as yt,wa as Ke,x as G,xa as Me,zb as lt}from"./chunk-ULJPS3WS.js";var B=class{},z=class{},_=class r{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(t){t?typeof t=="string"?this.lazyInit=()=>{this.headers=new Map,t.split(`
|
|
2
|
+
`).forEach(e=>{let n=e.indexOf(":");if(n>0){let o=e.slice(0,n),s=e.slice(n+1).trim();this.addHeaderEntry(o,s)}})}:typeof Headers<"u"&&t instanceof Headers?(this.headers=new Map,t.forEach((e,n)=>{this.addHeaderEntry(n,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(t).forEach(([e,n])=>{this.setHeaderEntries(e,n)})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();let e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof r?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){let e=new r;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof r?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){let e=t.name.toLowerCase();switch(t.op){case"a":case"s":let n=t.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(t.name,e);let o=(t.op==="a"?this.headers.get(e):void 0)||[];o.push(...n),this.headers.set(e,o);break;case"d":let s=t.value;if(!s)this.headers.delete(e),this.normalizedNames.delete(e);else{let i=this.headers.get(e);if(!i)return;i=i.filter(c=>s.indexOf(c)===-1),i.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,i)}break}}addHeaderEntry(t,e){let n=t.toLowerCase();this.maybeSetNormalizedName(t,n),this.headers.has(n)?this.headers.get(n).push(e):this.headers.set(n,[e])}setHeaderEntries(t,e){let n=(Array.isArray(e)?e:[e]).map(s=>s.toString()),o=t.toLowerCase();this.headers.set(o,n),this.maybeSetNormalizedName(t,o)}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}};var le=class{encodeKey(t){return gt(t)}encodeValue(t){return gt(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}};function Ht(r,t){let e=new Map;return r.length>0&&r.replace(/^\?/,"").split("&").forEach(o=>{let s=o.indexOf("="),[i,c]=s==-1?[t.decodeKey(o),""]:[t.decodeKey(o.slice(0,s)),t.decodeValue(o.slice(s+1))],a=e.get(i)||[];a.push(c),e.set(i,a)}),e}var Vt=/%(\d[a-f0-9])/gi,$t={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function gt(r){return encodeURIComponent(r).replace(Vt,(t,e)=>$t[e]??t)}function ce(r){return`${r}`}var A=class r{map;encoder;updates=null;cloneFrom=null;constructor(t={}){if(this.encoder=t.encoder||new le,t.fromString){if(t.fromObject)throw new v(2805,!1);this.map=Ht(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{let n=t.fromObject[e],o=Array.isArray(n)?n.map(ce):[ce(n)];this.map.set(e,o)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();let e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}appendAll(t){let e=[];return Object.keys(t).forEach(n=>{let o=t[n];Array.isArray(o)?o.forEach(s=>{e.push({param:n,value:s,op:"a"})}):e.push({param:n,value:o,op:"a"})}),this.clone(e)}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{let e=this.encoder.encodeKey(t);return this.map.get(t).map(n=>e+"="+this.encoder.encodeValue(n)).join("&")}).filter(t=>t!=="").join("&")}clone(t){let e=new r({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(t),e}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":let e=(t.op==="a"?this.map.get(t.param):void 0)||[];e.push(ce(t.value)),this.map.set(t.param,e);break;case"d":if(t.value!==void 0){let n=this.map.get(t.param)||[],o=n.indexOf(ce(t.value));o!==-1&&n.splice(o,1),n.length>0?this.map.set(t.param,n):this.map.delete(t.param)}else{this.map.delete(t.param);break}}}),this.cloneFrom=this.updates=null)}};var ue=class{map=new Map;set(t,e){return this.map.set(t,e),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}};function Xt(r){switch(r){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function vt(r){return typeof ArrayBuffer<"u"&&r instanceof ArrayBuffer}function Et(r){return typeof Blob<"u"&&r instanceof Blob}function Tt(r){return typeof FormData<"u"&&r instanceof FormData}function Gt(r){return typeof URLSearchParams<"u"&&r instanceof URLSearchParams}var Z="Content-Type",he="Accept",Ce="X-Request-URL",Rt="text/plain",Mt="application/json",bt=`${Mt}, ${Rt}, */*`,F=class r{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(t,e,n,o){this.url=e,this.method=t.toUpperCase();let s;if(Xt(this.method)||o?(this.body=n!==void 0?n:null,s=o):s=n,s){if(this.reportProgress=!!s.reportProgress,this.withCredentials=!!s.withCredentials,this.keepalive=!!s.keepalive,s.responseType&&(this.responseType=s.responseType),s.headers&&(this.headers=s.headers),s.context&&(this.context=s.context),s.params&&(this.params=s.params),s.priority&&(this.priority=s.priority),s.cache&&(this.cache=s.cache),s.credentials&&(this.credentials=s.credentials),typeof s.timeout=="number"){if(s.timeout<1||!Number.isInteger(s.timeout))throw new Error("");this.timeout=s.timeout}s.mode&&(this.mode=s.mode),s.redirect&&(this.redirect=s.redirect),this.transferCache=s.transferCache}if(this.headers??=new _,this.context??=new ue,!this.params)this.params=new A,this.urlWithParams=e;else{let i=this.params.toString();if(i.length===0)this.urlWithParams=e;else{let c=e.indexOf("?"),a=c===-1?"?":c<e.length-1?"&":"";this.urlWithParams=e+a+i}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||vt(this.body)||Et(this.body)||Tt(this.body)||Gt(this.body)?this.body:this.body instanceof A?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||Tt(this.body)?null:Et(this.body)?this.body.type||null:vt(this.body)?null:typeof this.body=="string"?Rt:this.body instanceof A?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?Mt:null}clone(t={}){let e=t.method||this.method,n=t.url||this.url,o=t.responseType||this.responseType,s=t.keepalive??this.keepalive,i=t.priority||this.priority,c=t.cache||this.cache,a=t.mode||this.mode,d=t.redirect||this.redirect,l=t.credentials||this.credentials,y=t.transferCache??this.transferCache,E=t.timeout??this.timeout,m=t.body!==void 0?t.body:this.body,P=t.withCredentials??this.withCredentials,N=t.reportProgress??this.reportProgress,u=t.headers||this.headers,f=t.params||this.params,T=t.context??this.context;return t.setHeaders!==void 0&&(u=Object.keys(t.setHeaders).reduce((D,p)=>D.set(p,t.setHeaders[p]),u)),t.setParams&&(f=Object.keys(t.setParams).reduce((D,p)=>D.set(p,t.setParams[p]),f)),new r(e,n,m,{params:f,headers:u,context:T,reportProgress:N,responseType:o,withCredentials:P,transferCache:y,keepalive:s,cache:c,priority:i,timeout:E,mode:a,redirect:d,credentials:l})}},I=function(r){return r[r.Sent=0]="Sent",r[r.UploadProgress=1]="UploadProgress",r[r.ResponseHeader=2]="ResponseHeader",r[r.DownloadProgress=3]="DownloadProgress",r[r.Response=4]="Response",r[r.User=5]="User",r}(I||{}),H=class{headers;status;statusText;url;ok;type;constructor(t,e=200,n="OK"){this.headers=t.headers||new _,this.status=t.status!==void 0?t.status:e,this.statusText=t.statusText||n,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}},W=class r extends H{constructor(t={}){super(t)}type=I.ResponseHeader;clone(t={}){return new r({headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},V=class r extends H{body;constructor(t={}){super(t),this.body=t.body!==void 0?t.body:null}type=I.Response;clone(t={}){return new r({body:t.body!==void 0?t.body:this.body,headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},b=class extends H{name="HttpErrorResponse";message;error;ok=!1;constructor(t){super(t,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${t.url||"(unknown url)"}`:this.message=`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}},_t=200,Jt=204;function Se(r,t){return{body:t,headers:r.headers,context:r.context,observe:r.observe,params:r.params,reportProgress:r.reportProgress,responseType:r.responseType,withCredentials:r.withCredentials,transferCache:r.transferCache,keepalive:r.keepalive,priority:r.priority,cache:r.cache,mode:r.mode,redirect:r.redirect}}var Dt=(()=>{class r{handler;constructor(e){this.handler=e}request(e,n,o={}){let s;if(e instanceof F)s=e;else{let a;o.headers instanceof _?a=o.headers:a=new _(o.headers);let d;o.params&&(o.params instanceof A?d=o.params:d=new A({fromObject:o.params})),s=new F(e,n,o.body!==void 0?o.body:null,{headers:a,context:o.context,params:d,reportProgress:o.reportProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials,transferCache:o.transferCache,keepalive:o.keepalive,priority:o.priority,cache:o.cache,mode:o.mode,redirect:o.redirect,credentials:o.credentials})}let i=we(s).pipe(Xe(a=>this.handler.handle(a)));if(e instanceof F||o.observe==="events")return i;let c=i.pipe($e(a=>a instanceof V));switch(o.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return c.pipe(G(a=>{if(a.body!==null&&!(a.body instanceof ArrayBuffer))throw new v(2806,!1);return a.body}));case"blob":return c.pipe(G(a=>{if(a.body!==null&&!(a.body instanceof Blob))throw new v(2807,!1);return a.body}));case"text":return c.pipe(G(a=>{if(a.body!==null&&typeof a.body!="string")throw new v(2808,!1);return a.body}));case"json":default:return c.pipe(G(a=>a.body))}case"response":return c;default:throw new v(2809,!1)}}delete(e,n={}){return this.request("DELETE",e,n)}get(e,n={}){return this.request("GET",e,n)}head(e,n={}){return this.request("HEAD",e,n)}jsonp(e,n){return this.request("JSONP",e,{params:new A().append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,n={}){return this.request("OPTIONS",e,n)}patch(e,n,o={}){return this.request("PATCH",e,Se(o,n))}post(e,n,o={}){return this.request("POST",e,Se(o,n))}put(e,n,o={}){return this.request("PUT",e,Se(o,n))}static \u0275fac=function(n){return new(n||r)(h(B))};static \u0275prov=g({token:r,factory:r.\u0275fac})}return r})(),Yt=/^\)\]\}',?\n/;function wt(r){if(r.url)return r.url;let t=Ce.toLocaleLowerCase();return r.headers.get(t)}var Ot=new w(""),de=(()=>{class r{fetchImpl=M(Ae,{optional:!0})?.fetch??((...e)=>globalThis.fetch(...e));ngZone=M(S);destroyRef=M(Ke);destroyed=!1;constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0})}handle(e){return new Te(n=>{let o=new AbortController;this.doRequest(e,o.signal,n).then(Ie,i=>n.error(new b({error:i})));let s;return e.timeout&&(s=this.ngZone.runOutsideAngular(()=>setTimeout(()=>{o.signal.aborted||o.abort(new DOMException("signal timed out","TimeoutError"))},e.timeout))),()=>{s!==void 0&&clearTimeout(s),o.abort()}})}doRequest(e,n,o){return Ee(this,null,function*(){let s=this.createRequestInit(e),i;try{let m=this.ngZone.runOutsideAngular(()=>this.fetchImpl(e.urlWithParams,x({signal:n},s)));Zt(m),o.next({type:I.Sent}),i=yield m}catch(m){o.error(new b({error:m,status:m.status??0,statusText:m.statusText,url:e.urlWithParams,headers:m.headers}));return}let c=new _(i.headers),a=i.statusText,d=wt(i)??e.urlWithParams,l=i.status,y=null;if(e.reportProgress&&o.next(new W({headers:c,status:l,statusText:a,url:d})),i.body){let m=i.headers.get("content-length"),P=[],N=i.body.getReader(),u=0,f,T,D=typeof Zone<"u"&&Zone.current,p=!1;if(yield this.ngZone.runOutsideAngular(()=>Ee(this,null,function*(){for(;;){if(this.destroyed){yield N.cancel(),p=!0;break}let{done:C,value:X}=yield N.read();if(C)break;if(P.push(X),u+=X.length,e.reportProgress){T=e.responseType==="text"?(T??"")+(f??=new TextDecoder).decode(X,{stream:!0}):void 0;let Ve=()=>o.next({type:I.DownloadProgress,total:m?+m:void 0,loaded:u,partialText:T});D?D.run(Ve):Ve()}}})),p){o.complete();return}let $=this.concatChunks(P,u);try{let C=i.headers.get(Z)??"";y=this.parseBody(e,$,C)}catch(C){o.error(new b({error:C,headers:new _(i.headers),status:i.status,statusText:i.statusText,url:wt(i)??e.urlWithParams}));return}}l===0&&(l=y?_t:0),l>=200&&l<300?(o.next(new V({body:y,headers:c,status:l,statusText:a,url:d})),o.complete()):o.error(new b({error:y,headers:c,status:l,statusText:a,url:d}))})}parseBody(e,n,o){switch(e.responseType){case"json":let s=new TextDecoder().decode(n).replace(Yt,"");return s===""?null:JSON.parse(s);case"text":return new TextDecoder().decode(n);case"blob":return new Blob([n],{type:o});case"arraybuffer":return n.buffer}}createRequestInit(e){let n={},o;if(o=e.credentials,e.withCredentials&&(o="include"),e.headers.forEach((s,i)=>n[s]=i.join(",")),e.headers.has(he)||(n[he]=bt),!e.headers.has(Z)){let s=e.detectContentTypeHeader();s!==null&&(n[Z]=s)}return{body:e.serializeBody(),method:e.method,headers:n,credentials:o,keepalive:e.keepalive,cache:e.cache,priority:e.priority,mode:e.mode,redirect:e.redirect}}concatChunks(e,n){let o=new Uint8Array(n),s=0;for(let i of e)o.set(i,s),s+=i.length;return o}static \u0275fac=function(n){return new(n||r)};static \u0275prov=g({token:r,factory:r.\u0275fac})}return r})(),Ae=class{};function Ie(){}function Zt(r){r.then(Ie,Ie)}function Wt(r,t){return t(r)}function Kt(r,t,e){return(n,o)=>We(e,()=>t(n,s=>r(s,o)))}var qt=new w(""),ke=new w(""),St=new w(""),At=new w("",{providedIn:"root",factory:()=>!0});var fe=(()=>{class r extends B{backend;injector;chain=null;pendingTasks=M(qe);contributeToStability=M(At);constructor(e,n){super(),this.backend=e,this.injector=n}handle(e){if(this.chain===null){let n=Array.from(new Set([...this.injector.get(ke),...this.injector.get(St,[])]));this.chain=n.reduceRight((o,s)=>Kt(o,s,this.injector),Wt)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(e,o=>this.backend.handle(o)).pipe(Ge(n))}else return this.chain(e,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||r)(h(z),h(Ze))};static \u0275prov=g({token:r,factory:r.\u0275fac})}return r})();var Qt=/^\)\]\}',?\n/,en=RegExp(`^${Ce}:`,"m");function tn(r){return"responseURL"in r&&r.responseURL?r.responseURL:en.test(r.getAllResponseHeaders())?r.getResponseHeader(Ce):null}var Pe=(()=>{class r{xhrFactory;constructor(e){this.xhrFactory=e}handle(e){if(e.method==="JSONP")throw new v(-2800,!1);let n=this.xhrFactory;return we(null).pipe(Je(()=>new Te(s=>{let i=n.build();if(i.open(e.method,e.urlWithParams),e.withCredentials&&(i.withCredentials=!0),e.headers.forEach((u,f)=>i.setRequestHeader(u,f.join(","))),e.headers.has(he)||i.setRequestHeader(he,bt),!e.headers.has(Z)){let u=e.detectContentTypeHeader();u!==null&&i.setRequestHeader(Z,u)}if(e.timeout&&(i.timeout=e.timeout),e.responseType){let u=e.responseType.toLowerCase();i.responseType=u!=="json"?u:"text"}let c=e.serializeBody(),a=null,d=()=>{if(a!==null)return a;let u=i.statusText||"OK",f=new _(i.getAllResponseHeaders()),T=tn(i)||e.url;return a=new W({headers:f,status:i.status,statusText:u,url:T}),a},l=()=>{let{headers:u,status:f,statusText:T,url:D}=d(),p=null;f!==Jt&&(p=typeof i.response>"u"?i.responseText:i.response),f===0&&(f=p?_t:0);let $=f>=200&&f<300;if(e.responseType==="json"&&typeof p=="string"){let C=p;p=p.replace(Qt,"");try{p=p!==""?JSON.parse(p):null}catch(X){p=C,$&&($=!1,p={error:X,text:p})}}$?(s.next(new V({body:p,headers:u,status:f,statusText:T,url:D||void 0})),s.complete()):s.error(new b({error:p,headers:u,status:f,statusText:T,url:D||void 0}))},y=u=>{let{url:f}=d(),T=new b({error:u,status:i.status||0,statusText:i.statusText||"Unknown Error",url:f||void 0});s.error(T)},E=y;e.timeout&&(E=u=>{let{url:f}=d(),T=new b({error:new DOMException("Request timed out","TimeoutError"),status:i.status||0,statusText:i.statusText||"Request timeout",url:f||void 0});s.error(T)});let m=!1,P=u=>{m||(s.next(d()),m=!0);let f={type:I.DownloadProgress,loaded:u.loaded};u.lengthComputable&&(f.total=u.total),e.responseType==="text"&&i.responseText&&(f.partialText=i.responseText),s.next(f)},N=u=>{let f={type:I.UploadProgress,loaded:u.loaded};u.lengthComputable&&(f.total=u.total),s.next(f)};return i.addEventListener("load",l),i.addEventListener("error",y),i.addEventListener("timeout",E),i.addEventListener("abort",y),e.reportProgress&&(i.addEventListener("progress",P),c!==null&&i.upload&&i.upload.addEventListener("progress",N)),i.send(c),s.next({type:I.Sent}),()=>{i.removeEventListener("error",y),i.removeEventListener("abort",y),i.removeEventListener("load",l),i.removeEventListener("timeout",E),e.reportProgress&&(i.removeEventListener("progress",P),c!==null&&i.upload&&i.upload.removeEventListener("progress",N)),i.readyState!==i.DONE&&i.abort()}})))}static \u0275fac=function(n){return new(n||r)(h(ae))};static \u0275prov=g({token:r,factory:r.\u0275fac})}return r})(),It=new w(""),nn="XSRF-TOKEN",rn=new w("",{providedIn:"root",factory:()=>nn}),on="X-XSRF-TOKEN",sn=new w("",{providedIn:"root",factory:()=>on}),K=class{},an=(()=>{class r{doc;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(e,n){this.doc=e,this.cookieName=n}getToken(){let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=ie(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(n){return new(n||r)(h(R),h(rn))};static \u0275prov=g({token:r,factory:r.\u0275fac})}return r})();function cn(r,t){let e=r.url.toLowerCase();if(!M(It)||r.method==="GET"||r.method==="HEAD"||e.startsWith("http://")||e.startsWith("https://"))return t(r);let n=M(K).getToken(),o=M(sn);return n!=null&&!r.headers.has(o)&&(r=r.clone({headers:r.headers.set(o,n)})),t(r)}var pe=function(r){return r[r.Interceptors=0]="Interceptors",r[r.LegacyInterceptors=1]="LegacyInterceptors",r[r.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",r[r.NoXsrfProtection=3]="NoXsrfProtection",r[r.JsonpSupport=4]="JsonpSupport",r[r.RequestsMadeViaParent=5]="RequestsMadeViaParent",r[r.Fetch=6]="Fetch",r}(pe||{});function Pt(r,t){return{\u0275kind:r,\u0275providers:t}}function dn(...r){let t=[Dt,Pe,fe,{provide:B,useExisting:fe},{provide:z,useFactory:()=>M(Ot,{optional:!0})??M(Pe)},{provide:ke,useValue:cn,multi:!0},{provide:It,useValue:!0},{provide:K,useClass:an}];for(let e of r)t.push(...e.\u0275providers);return Re(t)}function ln(r){return Pt(pe.Interceptors,r.map(t=>({provide:ke,useValue:t,multi:!0})))}function un(){return Pt(pe.Fetch,[de,{provide:Ot,useExisting:de},{provide:z,useExisting:de}])}var ye=new w(""),Fe=(()=>{class r{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,n){this._zone=n,e.forEach(o=>{o.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,n,o,s){return this._findPluginFor(n).addEventListener(e,n,o,s)}getZone(){return this._zone}_findPluginFor(e){let n=this._eventNameToPlugin.get(e);if(n)return n;if(n=this._plugins.find(s=>s.supports(e)),!n)throw new v(5101,!1);return this._eventNameToPlugin.set(e,n),n}static \u0275fac=function(n){return new(n||r)(h(ye),h(S))};static \u0275prov=g({token:r,factory:r.\u0275fac})}return r})(),q=class{_doc;constructor(t){this._doc=t}manager},xe="ng-app-id";function Nt(r){for(let t of r)t.remove()}function Ct(r,t){let e=t.createElement("style");return e.textContent=r,e}function hn(r,t,e,n){let o=r.head?.querySelectorAll(`style[${xe}="${t}"],link[${xe}="${t}"]`);if(o)for(let s of o)s.removeAttribute(xe),s instanceof HTMLLinkElement?n.set(s.href.slice(s.href.lastIndexOf("/")+1),{usage:0,elements:[s]}):s.textContent&&e.set(s.textContent,{usage:0,elements:[s]})}function Ue(r,t){let e=t.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",r),e}var Be=(()=>{class r{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,n,o,s={}){this.doc=e,this.appId=n,this.nonce=o,hn(e,n,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,n){for(let o of e)this.addUsage(o,this.inline,Ct);n?.forEach(o=>this.addUsage(o,this.external,Ue))}removeStyles(e,n){for(let o of e)this.removeUsage(o,this.inline);n?.forEach(o=>this.removeUsage(o,this.external))}addUsage(e,n,o){let s=n.get(e);s?s.usage++:n.set(e,{usage:1,elements:[...this.hosts].map(i=>this.addElement(i,o(e,this.doc)))})}removeUsage(e,n){let o=n.get(e);o&&(o.usage--,o.usage<=0&&(Nt(o.elements),n.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])Nt(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[n,{elements:o}]of this.inline)o.push(this.addElement(e,Ct(n,this.doc)));for(let[n,{elements:o}]of this.external)o.push(this.addElement(e,Ue(n,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,n){return this.nonce&&n.setAttribute("nonce",this.nonce),e.appendChild(n)}static \u0275fac=function(n){return new(n||r)(h(R),h(be),h(_e,8),h(J))};static \u0275prov=g({token:r,factory:r.\u0275fac})}return r})(),Le={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},ze=/%COMP%/g;var xt="%COMP%",fn=`_nghost-${xt}`,pn=`_ngcontent-${xt}`,mn=!0,yn=new w("",{providedIn:"root",factory:()=>mn});function gn(r){return pn.replace(ze,r)}function vn(r){return fn.replace(ze,r)}function Lt(r,t){return t.map(e=>e.replace(ze,r))}var He=(()=>{class r{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(e,n,o,s,i,c,a,d=null,l=null){this.eventManager=e,this.sharedStylesHost=n,this.appId=o,this.removeStylesOnCompDestroy=s,this.doc=i,this.platformId=c,this.ngZone=a,this.nonce=d,this.tracingService=l,this.platformIsServer=!1,this.defaultRenderer=new Q(e,i,a,this.platformIsServer,this.tracingService)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;let o=this.getOrCreateRenderer(e,n);return o instanceof me?o.applyToHost(e):o instanceof ee&&o.applyStyles(),o}getOrCreateRenderer(e,n){let o=this.rendererByCompId,s=o.get(n.id);if(!s){let i=this.doc,c=this.ngZone,a=this.eventManager,d=this.sharedStylesHost,l=this.removeStylesOnCompDestroy,y=this.platformIsServer,E=this.tracingService;switch(n.encapsulation){case De.Emulated:s=new me(a,d,n,this.appId,l,i,c,y,E);break;case De.ShadowDom:return new je(a,d,e,n,i,c,this.nonce,y,E);default:s=new ee(a,d,n,l,i,c,y,E);break}o.set(n.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(n){return new(n||r)(h(Fe),h(Be),h(be),h(yn),h(R),h(J),h(S),h(_e),h(dt,8))};static \u0275prov=g({token:r,factory:r.\u0275fac})}return r})(),Q=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(t,e,n,o,s){this.eventManager=t,this.doc=e,this.ngZone=n,this.platformIsServer=o,this.tracingService=s}destroy(){}destroyNode=null;createElement(t,e){return e?this.doc.createElementNS(Le[e]||e,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,e){(kt(t)?t.content:t).appendChild(e)}insertBefore(t,e,n){t&&(kt(t)?t.content:t).insertBefore(e,n)}removeChild(t,e){e.remove()}selectRootElement(t,e){let n=typeof t=="string"?this.doc.querySelector(t):t;if(!n)throw new v(-5104,!1);return e||(n.textContent=""),n}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,n,o){if(o){e=o+":"+e;let s=Le[o];s?t.setAttributeNS(s,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){let o=Le[n];o?t.removeAttributeNS(o,e):t.removeAttribute(`${n}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,n,o){o&(Y.DashCase|Y.Important)?t.style.setProperty(e,n,o&Y.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&Y.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,n){t!=null&&(t[e]=n)}setValue(t,e){t.nodeValue=e}listen(t,e,n,o){if(typeof t=="string"&&(t=j().getGlobalEventTarget(this.doc,t),!t))throw new v(5102,!1);let s=this.decoratePreventDefault(n);return this.tracingService?.wrapEventListener&&(s=this.tracingService.wrapEventListener(t,e,s)),this.eventManager.addEventListener(t,e,s,o)}decoratePreventDefault(t){return e=>{if(e==="__ngUnwrap__")return t;t(e)===!1&&e.preventDefault()}}};function kt(r){return r.tagName==="TEMPLATE"&&r.content!==void 0}var je=class extends Q{sharedStylesHost;hostEl;shadowRoot;constructor(t,e,n,o,s,i,c,a,d){super(t,s,i,a,d),this.sharedStylesHost=e,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let l=o.styles;l=Lt(o.id,l);for(let E of l){let m=document.createElement("style");c&&m.setAttribute("nonce",c),m.textContent=E,this.shadowRoot.appendChild(m)}let y=o.getExternalStyles?.();if(y)for(let E of y){let m=Ue(E,s);c&&m.setAttribute("nonce",c),this.shadowRoot.appendChild(m)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,n){return super.insertBefore(this.nodeOrShadowRoot(t),e,n)}removeChild(t,e){return super.removeChild(null,e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},ee=class extends Q{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(t,e,n,o,s,i,c,a,d){super(t,s,i,c,a),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=o;let l=n.styles;this.styles=d?Lt(d,l):l,this.styleUrls=n.getExternalStyles?.(d)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},me=class extends ee{contentAttr;hostAttr;constructor(t,e,n,o,s,i,c,a,d){let l=o+"-"+n.id;super(t,e,n,s,i,c,a,d,l),this.contentAttr=gn(l),this.hostAttr=vn(l)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,e){let n=super.createElement(t,e);return super.setAttribute(n,this.contentAttr,""),n}};var ge=class r extends pt{supportsDOMEvents=!0;static makeCurrent(){ft(new r)}onAndCancel(t,e,n,o){return t.addEventListener(e,n,o),()=>{t.removeEventListener(e,n,o)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){t.remove()}createElement(t,e){return e=e||this.getDefaultDocument(),e.createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return e==="window"?window:e==="document"?t:e==="body"?t.body:null}getBaseHref(t){let e=En();return e==null?null:Tn(e)}resetBaseElement(){te=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return ie(document.cookie,t)}},te=null;function En(){return te=te||document.head.querySelector("base"),te?te.getAttribute("href"):null}function Tn(r){return new URL(r,document.baseURI).pathname}var ve=class{addToWindow(t){O.getAngularTestability=(n,o=!0)=>{let s=t.findTestabilityInTree(n,o);if(s==null)throw new v(5103,!1);return s},O.getAllAngularTestabilities=()=>t.getAllTestabilities(),O.getAllAngularRootElements=()=>t.getAllRootElements();let e=n=>{let o=O.getAllAngularTestabilities(),s=o.length,i=function(){s--,s==0&&n()};o.forEach(c=>{c.whenStable(i)})};O.frameworkStabilizers||(O.frameworkStabilizers=[]),O.frameworkStabilizers.push(e)}findTestabilityInTree(t,e,n){if(e==null)return null;let o=t.getTestability(e);return o??(n?j().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},wn=(()=>{class r{build(){return new XMLHttpRequest}static \u0275fac=function(n){return new(n||r)};static \u0275prov=g({token:r,factory:r.\u0275fac})}return r})(),jt=(()=>{class r extends q{constructor(e){super(e)}supports(e){return!0}addEventListener(e,n,o,s){return e.addEventListener(n,o,s),()=>this.removeEventListener(e,n,o,s)}removeEventListener(e,n,o,s){return e.removeEventListener(n,o,s)}static \u0275fac=function(n){return new(n||r)(h(R))};static \u0275prov=g({token:r,factory:r.\u0275fac})}return r})(),Ut=["alt","control","meta","shift"],Rn={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Mn={alt:r=>r.altKey,control:r=>r.ctrlKey,meta:r=>r.metaKey,shift:r=>r.shiftKey},Ft=(()=>{class r extends q{constructor(e){super(e)}supports(e){return r.parseEventName(e)!=null}addEventListener(e,n,o,s){let i=r.parseEventName(n),c=r.eventCallback(i.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>j().onAndCancel(e,i.domEventName,c,s))}static parseEventName(e){let n=e.toLowerCase().split("."),o=n.shift();if(n.length===0||!(o==="keydown"||o==="keyup"))return null;let s=r._normalizeKey(n.pop()),i="",c=n.indexOf("code");if(c>-1&&(n.splice(c,1),i="code."),Ut.forEach(d=>{let l=n.indexOf(d);l>-1&&(n.splice(l,1),i+=d+".")}),i+=s,n.length!=0||s.length===0)return null;let a={};return a.domEventName=o,a.fullKey=i,a}static matchEventFullKeyCode(e,n){let o=Rn[e.key]||e.key,s="";return n.indexOf("code.")>-1&&(o=e.code,s="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),Ut.forEach(i=>{if(i!==o){let c=Mn[i];c(e)&&(s+=i+".")}}),s+=o,s===n)}static eventCallback(e,n,o){return s=>{r.matchEventFullKeyCode(s,e)&&o.runGuarded(()=>n(s))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(n){return new(n||r)(h(R))};static \u0275prov=g({token:r,factory:r.\u0275fac})}return r})();function bn(r,t){return ht(x({rootComponent:r},_n(t)))}function _n(r){return{appProviders:[...Bt,...r?.providers??[]],platformProviders:An}}function Dn(){ge.makeCurrent()}function On(){return new Me}function Sn(){return Qe(document),document}var An=[{provide:J,useValue:yt},{provide:et,useValue:Dn,multi:!0},{provide:R,useFactory:Sn}];var In=[{provide:oe,useClass:ve},{provide:lt,useClass:se,deps:[S,Oe,oe]},{provide:se,useClass:se,deps:[S,Oe,oe]}],Bt=[{provide:Ye,useValue:"root"},{provide:Me,useFactory:On},{provide:ye,useClass:jt,multi:!0,deps:[R]},{provide:ye,useClass:Ft,multi:!0,deps:[R]},He,Be,Fe,{provide:ct,useExisting:He},{provide:ae,useClass:wn},[]],Pn=(()=>{class r{constructor(){}static \u0275fac=function(n){return new(n||r)};static \u0275mod=re({type:r});static \u0275inj=ne({providers:[...Bt,...In],imports:[mt,ut]})}return r})();var Yr=(()=>{class r{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(n){return new(n||r)(h(R))};static \u0275prov=g({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var Cn=(()=>{class r{static \u0275fac=function(n){return new(n||r)};static \u0275prov=g({token:r,factory:function(n){let o=null;return n?o=new(n||r):o=h(kn),o},providedIn:"root"})}return r})(),kn=(()=>{class r extends Cn{_doc;constructor(e){super(),this._doc=e}sanitize(e,n){if(n==null)return null;switch(e){case k.NONE:return n;case k.HTML:return U(n,"HTML")?L(n):at(this._doc,String(n)).toString();case k.STYLE:return U(n,"Style")?L(n):n;case k.SCRIPT:if(U(n,"Script"))return L(n);throw new v(5200,!1);case k.URL:return U(n,"URL")?L(n):it(String(n));case k.RESOURCE_URL:if(U(n,"ResourceURL"))return L(n);throw new v(5201,!1);default:throw new v(5202,!1)}}bypassSecurityTrustHtml(e){return tt(e)}bypassSecurityTrustStyle(e){return nt(e)}bypassSecurityTrustScript(e){return rt(e)}bypassSecurityTrustUrl(e){return ot(e)}bypassSecurityTrustResourceUrl(e){return st(e)}static \u0275fac=function(n){return new(n||r)(h(R))};static \u0275prov=g({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{z as a,A as b,I as c,V as d,Dt as e,qt as f,dn as g,ln as h,un as i,He as j,bn as k,Pn as l,Yr as m,Cn as n};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as w}from"./chunk-
|
|
1
|
+
import{a as w}from"./chunk-VLNYF5AS.js";import"./chunk-3K4AKQIG.js";import{d as $}from"./chunk-ZJ3JJYIN.js";import{b as S}from"./chunk-ZCSPADUX.js";import{k as E,n as y}from"./chunk-FPLWS5WP.js";import{a as g,b as _}from"./chunk-R3563DDE.js";import"./chunk-HBOWJDR5.js";import{Hc as m,Ib as c,Ic as l,Jb as d,Sb as r,Tb as i,Ub as f,ab as n,dc as v,la as o,mb as h,qc as a,rc as s}from"./chunk-ULJPS3WS.js";function T(t,u){if(t&1&&(r(0,"div",7),a(1),i()),t&2){let e=v();n(),s(e.error)}}function C(t,u){t&1&&(r(0,"p",9),a(1),m(2,"translate"),i(),r(3,"div",10)(4,"div",11),f(5,"i",12),i()()),t&2&&(n(),s(l(2,1,"restart.please_wait_while_server_restarts")))}function k(t,u){t&1&&(r(0,"div",8),a(1),m(2,"translate"),i()),t&2&&(n(),s(l(2,1,"platform.linux.long_time")))}var z=(()=>{class t{$api=o(y);$router=o($);$settings=o(S);$toastr=o(E);$translate=o(g);$ws=o(w);checkTimeout;checkDelay;io;resp={};timeout=!1;error=!1;ngOnInit(){this.io=this.$ws.connectToNamespace("status"),this.io.connected.subscribe(()=>{this.io.socket.emit("monitor-server-status"),this.$settings.getAppSettings().catch(()=>{})}),this.$api.put("/platform-tools/linux/restart-host",{}).subscribe({next:e=>{this.resp=e,this.checkIfServerUp()},error:e=>{console.error(e),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"))}})}ngOnDestroy(){this.io.end(),clearTimeout(this.checkDelay),clearTimeout(this.checkTimeout)}checkIfServerUp(){this.checkDelay=setTimeout(()=>{this.io.socket.on("homebridge-status",e=>{(e.status==="up"||e.status==="pending")&&(this.$toastr.success(this.$translate.instant("platform.linux.server_restarted"),this.$translate.instant("toast.title_success")),this.$router.navigate(["/"]))})},3e4),this.checkTimeout=setTimeout(()=>{this.$toastr.warning(this.$translate.instant("platform.linux.server_taking_long_time"),this.$translate.instant("toast.title_warning"),{timeOut:1e4}),this.timeout=!0},12e4)}static \u0275fac=function(p){return new(p||t)};static \u0275cmp=h({type:t,selectors:[["ng-component"]],decls:14,vars:8,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fas","fa-fw","fa-power-off",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"alert","alert-error","my-4"],[1,"alert","alert-warning","my-4"],[1,"grey-text"],[1,"justify-content-center","my-4"],[1,"restart-progress-box","primary-text"],[1,"fas","fa-fw","fa-spinner","fa-spin"]],template:function(p,x){p&1&&(r(0,"div",0)(1,"h3",1),a(2),m(3,"translate"),i()(),r(4,"div",2)(5,"div",3),f(6,"i",4),i(),r(7,"div",5)(8,"h4",6),a(9),m(10,"translate"),i(),c(11,T,2,1,"div",7)(12,C,6,3),c(13,k,3,3,"div",8),i()()),p&2&&(n(2),s(l(3,4,"menu.restart.title")),n(7),s(l(10,6,"platform.linux.restarting_server")),n(2),d(x.error?11:12),n(2),d(x.timeout?13:-1))},dependencies:[_],styles:[".restart-progress-box[_ngcontent-%COMP%]{font-size:22px;font-weight:300;margin-top:15px}"]})}return t})();export{z as RestartLinuxComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as le}from"./chunk-QIOCGI3G.js";import{g as W,m as j,n as oe}from"./chunk-C3HWKB2Q.js";import{A as P,b as re,c as V,d as x,e as N,f as O,g as A,j as w,m as Q,o as H,p as J,q as K,x as ae,z as G}from"./chunk-WFYBML4S.js";import{b as X}from"./chunk-S42WFQ2L.js";import{b as se}from"./chunk-GEIS2BWE.js";import{a as ve}from"./chunk-W4PQWIYG.js";import{k,n as B}from"./chunk-DVQU3KHF.js";import{a as $,b as U}from"./chunk-R3563DDE.js";import"./chunk-Q4CZ7LVK.js";import{$b as L,Dc as F,Hb as u,Hc as o,Ib as h,Ic as s,Jb as g,Jc as ne,Lb as ee,Mb as te,Nb as ie,Ob as f,Pb as r,Qb as n,Rb as c,Sb as S,Tb as D,Ub as q,_b as I,ab as e,bc as _,cc as z,dc as v,g as _e,id as R,la as p,mb as y,qc as m,ra as T,rc as d,sa as M,sc as C}from"./chunk-ULJPS3WS.js";function xe(i,E){i&1&&(r(0,"ngb-alert",13)(1,"p",20),m(2),o(3,"translate"),n()()),i&2&&(f("dismissible",!1),e(2),d(s(3,2,"login.invalid_password")))}var me=(()=>{class i{$activeModal=p(j);$api=p(B);$toastr=p(k);$translate=p($);invalidCredentials=!1;formGroup=new A({password:new w("",[x.required])});disable2fa(){this.invalidCredentials=!1,this.$api.post("/users/otp/deactivate",this.formGroup.value).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.setup_2fa_disable_success"),this.$translate.instant("toast.title_success"))},error:()=>{this.formGroup.setValue({password:""}),this.invalidCredentials=!0}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=y({type:i,selectors:[["ng-component"]],decls:34,vars:27,consts:[[1,"modal-content",2,"min-height","300px"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-key","primary-text",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["type","password","autocomplete","current-password",1,"form-control","custom-input",3,"formControl","placeholder"],["type","error",1,"mt-3","mb-0",3,"dismissible"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"click","disabled"],[1,"mb-0"]],template:function(a,l){a&1&&(r(0,"div",0)(1,"div",1)(2,"h5",2),m(3),o(4,"translate"),n(),r(5,"button",3),o(6,"translate"),_("click",function(){return l.dismissModal()}),n()(),r(7,"div",4)(8,"div",5),c(9,"i",6),n(),r(10,"ul",7)(11,"li"),m(12),o(13,"translate"),n()(),r(14,"ul",8)(15,"li",9)(16,"label",10),m(17),o(18,"translate"),n(),r(19,"div",11),c(20,"input",12),o(21,"translate"),n()()(),h(22,xe,4,4,"ngb-alert",13),n(),r(23,"div",14)(24,"div",15)(25,"button",16),o(26,"translate"),_("click",function(){return l.dismissModal()}),m(27),o(28,"translate"),n()(),c(29,"div",17),r(30,"div",18)(31,"button",19),_("click",function(){return l.disable2fa()}),m(32),o(33,"translate"),n()()()()),a&2&&(e(3),d(s(4,11,"users.setup_2fa_disable")),e(2),u("aria-label",s(6,13,"form.button_close")),e(7),d(s(13,15,"users.setup_2fa_disable_current_password")),e(5),d(s(18,17,"users.label_password")),e(3),f("formControl",l.formGroup.controls.password)("placeholder",s(21,19,"users.label_password")),e(2),g(l.invalidCredentials&&!l.formGroup.controls.password.value?22:-1),e(3),u("aria-label",s(26,21,"form.button_close")),e(2),C(" ",s(28,23,"form.button_close")," "),e(4),f("disabled",l.formGroup.invalid),e(),C(" ",s(33,25,"form.button_disable")," "))},dependencies:[G,V,N,P,H,W,U],encapsulation:2})}return i})();var de=_e(ve(),1);var we=i=>({timeDiffError:i});function Ce(i,E){i&1&&(r(0,"li"),m(1),o(2,"translate"),n()),i&2&&(e(),d(s(2,1,"users.setup_2fa_scan_qr_code")))}function he(i,E){if(i&1&&(r(0,"ngb-alert",8)(1,"p",16),m(2),o(3,"translate"),n(),r(4,"p",17),m(5),o(6,"translate"),n()()),i&2){let t=v();f("dismissible",!1),e(2),d(s(3,3,"users.setup_2fa_cannot_setup_2fa")),e(3),d(ne(6,5,"users.setup_2fa_server_time_out",F(8,we,t.timeDiffError)))}}function ge(i,E){if(i&1&&(r(0,"ul",9)(1,"li",18)(2,"div",19),c(3,"app-qrcode",20),n()(),r(4,"li",21)(5,"label",22),m(6),o(7,"translate"),n(),r(8,"div",23),c(9,"input",24),n()()()),i&2){let t=v();e(3),f("data",t.otpString),e(3),d(s(7,3,"users.setup_2fa_enter_code")),e(3),f("formControl",t.formGroup.controls.code)}}function Ee(i,E){if(i&1){let t=I();r(0,"button",25),o(1,"translate"),_("click",function(){T(t);let l=v();return M(l.dismissModal())}),m(2),o(3,"translate"),n()}i&2&&(u("aria-label",s(1,2,"form.button_close")),e(2),C(" ",s(3,4,"form.button_close")," "))}function ye(i,E){if(i&1){let t=I();r(0,"button",25),o(1,"translate"),_("click",function(){T(t);let l=v();return M(l.dismissModal())}),m(2),o(3,"translate"),n()}i&2&&(u("aria-label",s(1,2,"form.button_close")),e(2),C(" ",s(3,4,"form.button_close")," "))}function Se(i,E){if(i&1){let t=I();r(0,"button",26),_("click",function(){T(t);let l=v();return M(l.enable2fa())}),m(1),o(2,"translate"),n()}if(i&2){let t=v();f("disabled",t.formGroup.invalid),e(),C(" ",s(2,2,"form.button_enable")," ")}}var pe=(()=>{class i{$activeModal=p(j);$api=p(B);$toastr=p(k);$translate=p($);user;timeDiffError=null;otpString;formGroup=new A({code:new w("",[x.required,x.minLength(6),x.maxLength(6)])});ngOnInit(){this.$api.post("/users/otp/setup",{}).subscribe({next:t=>{this.checkTimeDiff(t.timestamp),this.timeDiffError||(this.otpString=t.otpauth)},error:t=>{this.$activeModal.dismiss(),console.error(t),this.$toastr.error(this.$translate.instant("users.setup_2fa_enable_error"),this.$translate.instant("toast.title_error"))}})}enable2fa(){this.$api.post("/users/otp/activate",this.formGroup.value).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("users.setup_2fa_enabled_success"),this.$translate.instant("toast.title_success")),this.$activeModal.close()},error:t=>{console.error(t),this.$toastr.error(this.$translate.instant("users.setup_2fa_activate_error"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}checkTimeDiff(t){let a=(0,de.default)(t).diff(new Date,"millisecond");a<-5e3||a>5e3?this.timeDiffError=a:this.timeDiffError=null}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=y({type:i,selectors:[["ng-component"]],inputs:{user:"user"},decls:24,vars:15,consts:[[1,"modal-content","setup2fa"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-key","primary-text",2,"font-size","75px"],[1,"mb-3"],["type","error",1,"mb-0",3,"dismissible"],[1,"list-group","list-group-box","mb-0"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"disabled"],[1,"fw-bold","mb-1"],[1,"mb-0"],[1,"list-group-item","text-center"],[1,"text-center","w-100","d-flex","justify-content-center"],[1,"mx-auto",2,"width","175px","height","175px",3,"data"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["type","text","placeholder","eg. 123456","autocomplete","one-time-code","autocapitalize","none","inputmode","numeric","pattern","[0-9]*",1,"form-control","custom-input",3,"formControl"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"]],template:function(a,l){a&1&&(r(0,"div",0)(1,"div",1)(2,"h5",2),m(3),o(4,"translate"),n(),r(5,"button",3),o(6,"translate"),_("click",function(){return l.dismissModal()}),n()(),r(7,"div",4)(8,"div",5),c(9,"i",6),n(),r(10,"ul",7)(11,"li"),m(12),o(13,"translate"),n(),h(14,Ce,3,3,"li"),n(),h(15,he,7,10,"ngb-alert",8),h(16,ge,10,5,"ul",9),n(),r(17,"div",10)(18,"div",11),h(19,Ee,4,6,"button",12),n(),r(20,"div",13),h(21,ye,4,6,"button",12),n(),r(22,"div",14),h(23,Se,3,4,"button",15),n()()()),a&2&&(e(3),d(s(4,9,"users.setup_2fa")),e(2),u("aria-label",s(6,11,"form.button_close")),e(7),d(s(13,13,"users.setup_2fa_warning")),e(2),g(l.timeDiffError?-1:14),e(),g(l.timeDiffError?15:-1),e(),g(l.timeDiffError?-1:16),e(3),g(l.timeDiffError?-1:19),e(2),g(l.timeDiffError?21:-1),e(2),g(l.timeDiffError?-1:23))},dependencies:[W,le,G,V,N,ae,P,H,U],encapsulation:2})}return i})();var ce=i=>({"is-invalid":i}),ue=(()=>{class i{$activeModal=p(j);$api=p(B);$toastr=p(k);$translate=p($);form=new A({username:new w("",[x.required]),name:new w("",[x.required]),password:new w("",[x.compose([x.required,x.minLength(4)])]),passwordConfirm:new w("",[x.required]),admin:new w(!0)},this.matchPassword);onSubmit({value:t}){this.$api.post("/users",t).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.toast_added_new_user"),this.$translate.instant("toast.title_success"))},error:a=>{this.$toastr.error(a.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}matchPassword(t){let a=t.get("password").value,l=t.get("passwordConfirm").value;if(a!==l)t.get("passwordConfirm").setErrors({matchPassword:!0});else return null}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=y({type:i,selectors:[["ng-component"]],decls:58,vars:50,consts:[[1,"modal-content"],["novalidate","",3,"ngSubmit","formGroup"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-user-plus","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-username",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["formControlName","username","type","text","id","form-username","autocomplete","username","autocapitalize","none",1,"form-control","custom-input"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","name","type","text","id","form-name","autocomplete","name",1,"form-control","custom-input"],["for","form-pass",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","password","type","password","autocomplete","new-password","id","form-pass",1,"form-control","custom-input",3,"ngClass"],["for","form-pass-confirm",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","passwordConfirm","type","password","autocomplete","new-password","id","form-pass-confirm",1,"form-control","custom-input",3,"ngClass"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],[1,"text-start"],[1,"text-end","grey-text","d-flex","align-items-center"],["type","checkbox","id","isAdmin",1,"rendux-input"],["for","isAdmin",1,"rendux-label","ms-3"],[1,"modal-footer","justify-content-between"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(a,l){a&1&&(r(0,"div",0)(1,"form",1),_("ngSubmit",function(){return l.onSubmit(l.form)}),r(2,"div",2)(3,"h5",3),m(4),o(5,"translate"),n(),r(6,"button",4),o(7,"translate"),_("click",function(){return l.dismissModal()}),n()(),r(8,"div",5)(9,"div",6),c(10,"i",7),n(),r(11,"ul",8)(12,"li",9)(13,"label",10),m(14),o(15,"translate"),n(),r(16,"div",11),c(17,"input",12),o(18,"translate"),n()(),r(19,"li",9)(20,"label",13),m(21),o(22,"translate"),n(),r(23,"div",11),c(24,"input",14),o(25,"translate"),n()(),r(26,"li",9)(27,"label",15),m(28),o(29,"translate"),n(),r(30,"div",11),c(31,"input",16),o(32,"translate"),n()(),r(33,"li",9)(34,"label",17),m(35),o(36,"translate"),n(),r(37,"div",11),c(38,"input",18),o(39,"translate"),n()(),r(40,"li",19)(41,"span",20),m(42),o(43,"translate"),n(),r(44,"div",21),c(45,"input",22),o(46,"translate"),c(47,"label",23),n()()()(),r(48,"div",24)(49,"div",20)(50,"button",25),_("click",function(){return l.dismissModal()}),m(51),o(52,"translate"),n()(),c(53,"div",26),r(54,"div",27)(55,"button",28),m(56),o(57,"translate"),n()()()()()),a&2&&(e(),f("formGroup",l.form),e(3),d(s(5,18,"users.title_add_user")),e(2),u("aria-label",s(7,20,"form.button_close")),e(8),d(s(15,22,"users.label_username")),e(3),u("aria-label",s(18,24,"users.label_username")),e(4),d(s(22,26,"users.label_full_name")),e(3),u("aria-label",s(25,28,"users.label_full_name")),e(4),d(s(29,30,"users.label_password")),e(3),f("ngClass",F(46,ce,l.form.controls.password.dirty&&l.form.controls.password.errors)),u("aria-label",s(32,32,"users.label_password")),e(4),d(s(36,34,"users.label_confirm_password")),e(3),f("ngClass",F(48,ce,l.form.controls.passwordConfirm.dirty&&l.form.controls.passwordConfirm.errors)),u("aria-label",s(39,36,"users.label_confirm_password")),e(4),d(s(43,38,"users.label_admin_user")),e(3),u("aria-label",s(46,40,"users.label_admin_user")),e(6),C(" ",s(52,42,"form.button_close")," "),e(4),f("disabled",!l.form.valid),e(),C(" ",s(57,44,"form.button_save")," "))},dependencies:[G,Q,V,N,O,P,J,K,R,U],encapsulation:2})}return i})();var fe=i=>({"is-invalid":i});function $e(i,E){if(i&1&&(r(0,"li",9)(1,"label",27),m(2),o(3,"translate"),n(),r(4,"div",11),c(5,"input",28),o(6,"translate"),n()()),i&2){let t=v();e(2),d(s(3,3,"users.label_confirm_password")),e(3),f("ngClass",F(7,fe,t.form.controls.passwordConfirm.dirty&&t.form.controls.passwordConfirm.errors)),u("aria-label",s(6,5,"users.label_confirm_password"))}}var be=(()=>{class i{$activeModal=p(j);$api=p(B);$auth=p(X);$toastr=p(k);$translate=p($);user;isCurrentUser=!1;form=new A({username:new w("",[x.required]),name:new w("",[x.required]),password:new w(""),passwordConfirm:new w(""),admin:new w(!0)},this.matchPassword);ngOnInit(){this.isCurrentUser=this.$auth.user.username===this.user.username,this.form.patchValue(this.user)}onSubmit({value:t}){this.$api.patch(`/users/${this.user.id}`,t).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.toast_updated_user"),this.$translate.instant("toast.title_success")),this.isCurrentUser&&t.username!==this.$auth.user.username&&this.$auth.logout()},error:a=>{console.error(a),this.$toastr.error(a.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}matchPassword(t){let a=t.get("password").value,l=t.get("passwordConfirm").value;if(a!==l)t.get("passwordConfirm").setErrors({matchPassword:!0});else return null}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=y({type:i,selectors:[["ng-component"]],inputs:{user:"user"},decls:52,vars:42,consts:[[1,"modal-content"],["novalidate","",3,"ngSubmit","formGroup"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-user-pen","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-username",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["formControlName","username","type","text","id","form-username","autocomplete","off","autocapitalize","none",1,"form-control","custom-input"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","name","type","text","id","form-name","autocomplete","name",1,"form-control","custom-input"],["for","form-pass",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","password","type","password","autocomplete","new-password","id","form-pass",1,"form-control","custom-input",3,"ngClass"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],[1,"text-start"],[1,"text-end","grey-text","d-flex","align-items-center"],["type","checkbox","formControlName","admin","id","isAdmin",1,"rendux-input"],["for","isAdmin",1,"rendux-label","ms-3"],[1,"modal-footer","justify-content-between"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","submit",1,"btn","btn-primary",3,"disabled"],["for","form-pass-confirm",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","passwordConfirm","type","password","autocomplete","new-password","id","form-pass-confirm",1,"form-control","custom-input",3,"ngClass"]],template:function(a,l){a&1&&(r(0,"div",0)(1,"form",1),_("ngSubmit",function(){return l.onSubmit(l.form)}),r(2,"div",2)(3,"h5",3),m(4),o(5,"translate"),n(),r(6,"button",4),o(7,"translate"),_("click",function(){return l.dismissModal()}),n()(),r(8,"div",5)(9,"div",6),c(10,"i",7),n(),r(11,"ul",8)(12,"li",9)(13,"label",10),m(14),o(15,"translate"),n(),r(16,"div",11),c(17,"input",12),o(18,"translate"),n()(),r(19,"li",9)(20,"label",13),m(21),o(22,"translate"),n(),r(23,"div",11),c(24,"input",14),o(25,"translate"),n()(),r(26,"li",9)(27,"label",15),m(28),o(29,"translate"),n(),r(30,"div",11),c(31,"input",16),o(32,"translate"),n()(),h(33,$e,7,9,"li",9),r(34,"li",17)(35,"span",18),m(36),o(37,"translate"),n(),r(38,"div",19),c(39,"input",20),o(40,"translate"),c(41,"label",21),n()()()(),r(42,"div",22)(43,"div",18)(44,"button",23),_("click",function(){return l.dismissModal()}),m(45),o(46,"translate"),n()(),c(47,"div",24),r(48,"div",25)(49,"button",26),m(50),o(51,"translate"),n()()()()()),a&2&&(e(),f("formGroup",l.form),e(3),d(s(5,16,"users.title_edit_user")),e(2),u("aria-label",s(7,18,"form.button_close")),e(8),d(s(15,20,"users.label_username")),e(3),u("aria-label",s(18,22,"users.label_username")),e(4),d(s(22,24,"users.label_full_name")),e(3),u("aria-label",s(25,26,"users.label_full_name")),e(4),d(s(29,28,"users.label_new_password")),e(3),f("ngClass",F(40,fe,l.form.controls.password.dirty&&l.form.controls.password.errors)),u("aria-label",s(32,30,"users.label_new_password")),e(2),g(l.form.controls.password.value?33:-1),e(3),d(s(37,32,"users.label_admin_user")),e(3),u("aria-label",s(40,34,"users.label_admin_user")),e(6),C(" ",s(46,36,"form.button_close")," "),e(4),f("disabled",!l.form.valid),e(),C(" ",s(51,38,"form.button_save")," "))},dependencies:[G,Q,V,re,N,O,P,J,K,R,U],encapsulation:2})}return i})();function Ue(i,E){if(i&1){let t=I();S(0,"button",21),z("click",function(){T(t);let l=v().$implicit,b=v();return M(b.setup2fa(l))}),m(1),o(2,"translate"),D()}i&2&&(e(),d(s(2,1,"users.setup_2fa")))}function ke(i,E){if(i&1){let t=I();S(0,"button",17),z("click",function(){T(t);let l=v().$implicit,b=v();return M(b.disable2fa(l))}),m(1),o(2,"translate"),D()}i&2&&(e(),C(" ",s(2,1,"users.setup_2fa_disable")," "))}function Be(i,E){if(i&1){let t=I();S(0,"div",7)(1,"div",8)(2,"div",9)(3,"div",10)(4,"span",11),q(5,"h4",12)(6,"h5",13),D()(),S(7,"div",14),h(8,Ue,3,3,"button",15),h(9,ke,3,3,"button",16),S(10,"div")(11,"button",17),o(12,"translate"),z("click",function(){let l=T(t).$implicit,b=v();return M(b.openEditUser(l))}),q(13,"i",18),D(),S(14,"button",19),o(15,"translate"),z("click",function(){let l=T(t).$implicit,b=v();return M(b.deleteUser(l.id))}),q(16,"i",20),D()()()()()()}if(i&2){let t=E.$implicit,a=v();e(5),L("innerText",t.name),e(),L("innerText",t.username),e(2),g(a.username===t.username&&!t.otpActive?8:-1),e(),g(a.username===t.username&&t.otpActive?9:-1),e(2),u("aria-label",s(12,7,"form.button_edit")),e(3),L("disabled",a.username===t.username),u("aria-label",s(15,9,"form.button_delete"))}}var $t=(()=>{class i{$api=p(B);$auth=p(X);$modal=p(oe);$route=p(se);$toastr=p(k);$translate=p($);homebridgeUsers;username=this.$auth.user.username;ngOnInit(){this.$route.data.subscribe(t=>{this.homebridgeUsers=t.homebridgeUsers})}reloadUsers(){return this.$api.get("/users").subscribe(t=>{this.homebridgeUsers=t})}openAddNewUser(){this.$modal.open(ue,{size:"lg",backdrop:"static"}).result.finally(()=>{this.reloadUsers()})}openEditUser(t){let a=this.$modal.open(be,{size:"lg",backdrop:"static"});a.componentInstance.user=t,a.result.finally(()=>{this.reloadUsers()})}deleteUser(t){this.$api.delete(`/users/${t}`).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("users.toast_user_deleted"),this.$translate.instant("toast.title_success")),this.reloadUsers()},error:a=>{console.error(a),this.$toastr.error(a.error.message||this.$translate.instant("users.toast_failed_to_delete_user"),this.$translate.instant("toast.title_error"))}})}setup2fa(t){let a=this.$modal.open(pe,{size:"lg",backdrop:"static"});a.componentInstance.user=t,a.result.finally(()=>{this.reloadUsers()})}disable2fa(t){let a=this.$modal.open(me,{size:"lg",backdrop:"static"});a.componentInstance.user=t,a.result.finally(()=>{this.reloadUsers()})}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=y({type:i,selectors:[["app-users"]],decls:12,vars:6,consts:[[1,"row","mb-3"],[1,"col-9"],[1,"primary-text","m-0"],[1,"col-3","text-end"],[1,"btn","btn-elegant","waves-effect","m-0",3,"click"],[1,"fas","fa-fw","fa-user-plus"],[1,"row"],[1,"col-md-6","mb-4"],[1,"card","card-body"],[1,"d-flex","flex-column"],[1,"d-flex","flex-row","mb-3"],[1,"me-auto","my-0"],[3,"innerText"],[1,"small","text-truncate","primary-text",3,"innerText"],[1,"d-flex","flex-row","justify-content-between"],[1,"btn","btn-primary","m-0"],[1,"btn","btn-elegant","m-0"],[1,"btn","btn-elegant","m-0",3,"click"],[1,"fas","fa-fw","fa-user-pen"],[1,"btn","btn-danger","m-0","ms-2",3,"click","disabled"],[1,"fas","fa-fw","fa-trash"],[1,"btn","btn-primary","m-0",3,"click"]],template:function(a,l){a&1&&(S(0,"div",0)(1,"div",1)(2,"h3",2),m(3),o(4,"translate"),D()(),S(5,"div",3)(6,"button",4),o(7,"translate"),z("click",function(){return l.openAddNewUser()}),q(8,"i",5),D()()(),S(9,"div",6),te(10,Be,17,11,"div",7,ee),D()),a&2&&(e(3),d(s(4,2,"users.title_users")),e(3),u("aria-label",s(7,4,"users.button_add_user")),e(4),ie(l.homebridgeUsers))},dependencies:[U],encapsulation:2})}return i})();export{$t as UsersComponent};
|
|
1
|
+
import{a as le}from"./chunk-QIOCGI3G.js";import{g as W,m as j,n as oe}from"./chunk-C3HWKB2Q.js";import{A as P,b as re,c as V,d as x,e as N,f as O,g as A,j as w,m as Q,o as H,p as J,q as K,x as ae,z as G}from"./chunk-WFYBML4S.js";import{b as X}from"./chunk-3K4AKQIG.js";import{b as se}from"./chunk-ZJ3JJYIN.js";import{a as ve}from"./chunk-ZCSPADUX.js";import{k,n as B}from"./chunk-FPLWS5WP.js";import{a as $,b as U}from"./chunk-R3563DDE.js";import"./chunk-HBOWJDR5.js";import{$b as L,Dc as F,Hb as u,Hc as o,Ib as h,Ic as s,Jb as g,Jc as ne,Lb as ee,Mb as te,Nb as ie,Ob as f,Pb as r,Qb as n,Rb as c,Sb as S,Tb as D,Ub as q,_b as I,ab as e,bc as _,cc as z,dc as v,g as _e,id as R,la as p,mb as y,qc as m,ra as T,rc as d,sa as M,sc as C}from"./chunk-ULJPS3WS.js";function xe(i,E){i&1&&(r(0,"ngb-alert",13)(1,"p",20),m(2),o(3,"translate"),n()()),i&2&&(f("dismissible",!1),e(2),d(s(3,2,"login.invalid_password")))}var me=(()=>{class i{$activeModal=p(j);$api=p(B);$toastr=p(k);$translate=p($);invalidCredentials=!1;formGroup=new A({password:new w("",[x.required])});disable2fa(){this.invalidCredentials=!1,this.$api.post("/users/otp/deactivate",this.formGroup.value).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.setup_2fa_disable_success"),this.$translate.instant("toast.title_success"))},error:()=>{this.formGroup.setValue({password:""}),this.invalidCredentials=!0}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=y({type:i,selectors:[["ng-component"]],decls:34,vars:27,consts:[[1,"modal-content",2,"min-height","300px"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-key","primary-text",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["type","password","autocomplete","current-password",1,"form-control","custom-input",3,"formControl","placeholder"],["type","error",1,"mt-3","mb-0",3,"dismissible"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"click","disabled"],[1,"mb-0"]],template:function(a,l){a&1&&(r(0,"div",0)(1,"div",1)(2,"h5",2),m(3),o(4,"translate"),n(),r(5,"button",3),o(6,"translate"),_("click",function(){return l.dismissModal()}),n()(),r(7,"div",4)(8,"div",5),c(9,"i",6),n(),r(10,"ul",7)(11,"li"),m(12),o(13,"translate"),n()(),r(14,"ul",8)(15,"li",9)(16,"label",10),m(17),o(18,"translate"),n(),r(19,"div",11),c(20,"input",12),o(21,"translate"),n()()(),h(22,xe,4,4,"ngb-alert",13),n(),r(23,"div",14)(24,"div",15)(25,"button",16),o(26,"translate"),_("click",function(){return l.dismissModal()}),m(27),o(28,"translate"),n()(),c(29,"div",17),r(30,"div",18)(31,"button",19),_("click",function(){return l.disable2fa()}),m(32),o(33,"translate"),n()()()()),a&2&&(e(3),d(s(4,11,"users.setup_2fa_disable")),e(2),u("aria-label",s(6,13,"form.button_close")),e(7),d(s(13,15,"users.setup_2fa_disable_current_password")),e(5),d(s(18,17,"users.label_password")),e(3),f("formControl",l.formGroup.controls.password)("placeholder",s(21,19,"users.label_password")),e(2),g(l.invalidCredentials&&!l.formGroup.controls.password.value?22:-1),e(3),u("aria-label",s(26,21,"form.button_close")),e(2),C(" ",s(28,23,"form.button_close")," "),e(4),f("disabled",l.formGroup.invalid),e(),C(" ",s(33,25,"form.button_disable")," "))},dependencies:[G,V,N,P,H,W,U],encapsulation:2})}return i})();var de=_e(ve(),1);var we=i=>({timeDiffError:i});function Ce(i,E){i&1&&(r(0,"li"),m(1),o(2,"translate"),n()),i&2&&(e(),d(s(2,1,"users.setup_2fa_scan_qr_code")))}function he(i,E){if(i&1&&(r(0,"ngb-alert",8)(1,"p",16),m(2),o(3,"translate"),n(),r(4,"p",17),m(5),o(6,"translate"),n()()),i&2){let t=v();f("dismissible",!1),e(2),d(s(3,3,"users.setup_2fa_cannot_setup_2fa")),e(3),d(ne(6,5,"users.setup_2fa_server_time_out",F(8,we,t.timeDiffError)))}}function ge(i,E){if(i&1&&(r(0,"ul",9)(1,"li",18)(2,"div",19),c(3,"app-qrcode",20),n()(),r(4,"li",21)(5,"label",22),m(6),o(7,"translate"),n(),r(8,"div",23),c(9,"input",24),n()()()),i&2){let t=v();e(3),f("data",t.otpString),e(3),d(s(7,3,"users.setup_2fa_enter_code")),e(3),f("formControl",t.formGroup.controls.code)}}function Ee(i,E){if(i&1){let t=I();r(0,"button",25),o(1,"translate"),_("click",function(){T(t);let l=v();return M(l.dismissModal())}),m(2),o(3,"translate"),n()}i&2&&(u("aria-label",s(1,2,"form.button_close")),e(2),C(" ",s(3,4,"form.button_close")," "))}function ye(i,E){if(i&1){let t=I();r(0,"button",25),o(1,"translate"),_("click",function(){T(t);let l=v();return M(l.dismissModal())}),m(2),o(3,"translate"),n()}i&2&&(u("aria-label",s(1,2,"form.button_close")),e(2),C(" ",s(3,4,"form.button_close")," "))}function Se(i,E){if(i&1){let t=I();r(0,"button",26),_("click",function(){T(t);let l=v();return M(l.enable2fa())}),m(1),o(2,"translate"),n()}if(i&2){let t=v();f("disabled",t.formGroup.invalid),e(),C(" ",s(2,2,"form.button_enable")," ")}}var pe=(()=>{class i{$activeModal=p(j);$api=p(B);$toastr=p(k);$translate=p($);user;timeDiffError=null;otpString;formGroup=new A({code:new w("",[x.required,x.minLength(6),x.maxLength(6)])});ngOnInit(){this.$api.post("/users/otp/setup",{}).subscribe({next:t=>{this.checkTimeDiff(t.timestamp),this.timeDiffError||(this.otpString=t.otpauth)},error:t=>{this.$activeModal.dismiss(),console.error(t),this.$toastr.error(this.$translate.instant("users.setup_2fa_enable_error"),this.$translate.instant("toast.title_error"))}})}enable2fa(){this.$api.post("/users/otp/activate",this.formGroup.value).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("users.setup_2fa_enabled_success"),this.$translate.instant("toast.title_success")),this.$activeModal.close()},error:t=>{console.error(t),this.$toastr.error(this.$translate.instant("users.setup_2fa_activate_error"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}checkTimeDiff(t){let a=(0,de.default)(t).diff(new Date,"millisecond");a<-5e3||a>5e3?this.timeDiffError=a:this.timeDiffError=null}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=y({type:i,selectors:[["ng-component"]],inputs:{user:"user"},decls:24,vars:15,consts:[[1,"modal-content","setup2fa"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-key","primary-text",2,"font-size","75px"],[1,"mb-3"],["type","error",1,"mb-0",3,"dismissible"],[1,"list-group","list-group-box","mb-0"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"disabled"],[1,"fw-bold","mb-1"],[1,"mb-0"],[1,"list-group-item","text-center"],[1,"text-center","w-100","d-flex","justify-content-center"],[1,"mx-auto",2,"width","175px","height","175px",3,"data"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["type","text","placeholder","eg. 123456","autocomplete","one-time-code","autocapitalize","none","inputmode","numeric","pattern","[0-9]*",1,"form-control","custom-input",3,"formControl"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"]],template:function(a,l){a&1&&(r(0,"div",0)(1,"div",1)(2,"h5",2),m(3),o(4,"translate"),n(),r(5,"button",3),o(6,"translate"),_("click",function(){return l.dismissModal()}),n()(),r(7,"div",4)(8,"div",5),c(9,"i",6),n(),r(10,"ul",7)(11,"li"),m(12),o(13,"translate"),n(),h(14,Ce,3,3,"li"),n(),h(15,he,7,10,"ngb-alert",8),h(16,ge,10,5,"ul",9),n(),r(17,"div",10)(18,"div",11),h(19,Ee,4,6,"button",12),n(),r(20,"div",13),h(21,ye,4,6,"button",12),n(),r(22,"div",14),h(23,Se,3,4,"button",15),n()()()),a&2&&(e(3),d(s(4,9,"users.setup_2fa")),e(2),u("aria-label",s(6,11,"form.button_close")),e(7),d(s(13,13,"users.setup_2fa_warning")),e(2),g(l.timeDiffError?-1:14),e(),g(l.timeDiffError?15:-1),e(),g(l.timeDiffError?-1:16),e(3),g(l.timeDiffError?-1:19),e(2),g(l.timeDiffError?21:-1),e(2),g(l.timeDiffError?-1:23))},dependencies:[W,le,G,V,N,ae,P,H,U],encapsulation:2})}return i})();var ce=i=>({"is-invalid":i}),ue=(()=>{class i{$activeModal=p(j);$api=p(B);$toastr=p(k);$translate=p($);form=new A({username:new w("",[x.required]),name:new w("",[x.required]),password:new w("",[x.compose([x.required,x.minLength(4)])]),passwordConfirm:new w("",[x.required]),admin:new w(!0)},this.matchPassword);onSubmit({value:t}){this.$api.post("/users",t).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.toast_added_new_user"),this.$translate.instant("toast.title_success"))},error:a=>{this.$toastr.error(a.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}matchPassword(t){let a=t.get("password").value,l=t.get("passwordConfirm").value;if(a!==l)t.get("passwordConfirm").setErrors({matchPassword:!0});else return null}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=y({type:i,selectors:[["ng-component"]],decls:58,vars:50,consts:[[1,"modal-content"],["novalidate","",3,"ngSubmit","formGroup"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-user-plus","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-username",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["formControlName","username","type","text","id","form-username","autocomplete","username","autocapitalize","none",1,"form-control","custom-input"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","name","type","text","id","form-name","autocomplete","name",1,"form-control","custom-input"],["for","form-pass",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","password","type","password","autocomplete","new-password","id","form-pass",1,"form-control","custom-input",3,"ngClass"],["for","form-pass-confirm",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","passwordConfirm","type","password","autocomplete","new-password","id","form-pass-confirm",1,"form-control","custom-input",3,"ngClass"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],[1,"text-start"],[1,"text-end","grey-text","d-flex","align-items-center"],["type","checkbox","id","isAdmin",1,"rendux-input"],["for","isAdmin",1,"rendux-label","ms-3"],[1,"modal-footer","justify-content-between"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(a,l){a&1&&(r(0,"div",0)(1,"form",1),_("ngSubmit",function(){return l.onSubmit(l.form)}),r(2,"div",2)(3,"h5",3),m(4),o(5,"translate"),n(),r(6,"button",4),o(7,"translate"),_("click",function(){return l.dismissModal()}),n()(),r(8,"div",5)(9,"div",6),c(10,"i",7),n(),r(11,"ul",8)(12,"li",9)(13,"label",10),m(14),o(15,"translate"),n(),r(16,"div",11),c(17,"input",12),o(18,"translate"),n()(),r(19,"li",9)(20,"label",13),m(21),o(22,"translate"),n(),r(23,"div",11),c(24,"input",14),o(25,"translate"),n()(),r(26,"li",9)(27,"label",15),m(28),o(29,"translate"),n(),r(30,"div",11),c(31,"input",16),o(32,"translate"),n()(),r(33,"li",9)(34,"label",17),m(35),o(36,"translate"),n(),r(37,"div",11),c(38,"input",18),o(39,"translate"),n()(),r(40,"li",19)(41,"span",20),m(42),o(43,"translate"),n(),r(44,"div",21),c(45,"input",22),o(46,"translate"),c(47,"label",23),n()()()(),r(48,"div",24)(49,"div",20)(50,"button",25),_("click",function(){return l.dismissModal()}),m(51),o(52,"translate"),n()(),c(53,"div",26),r(54,"div",27)(55,"button",28),m(56),o(57,"translate"),n()()()()()),a&2&&(e(),f("formGroup",l.form),e(3),d(s(5,18,"users.title_add_user")),e(2),u("aria-label",s(7,20,"form.button_close")),e(8),d(s(15,22,"users.label_username")),e(3),u("aria-label",s(18,24,"users.label_username")),e(4),d(s(22,26,"users.label_full_name")),e(3),u("aria-label",s(25,28,"users.label_full_name")),e(4),d(s(29,30,"users.label_password")),e(3),f("ngClass",F(46,ce,l.form.controls.password.dirty&&l.form.controls.password.errors)),u("aria-label",s(32,32,"users.label_password")),e(4),d(s(36,34,"users.label_confirm_password")),e(3),f("ngClass",F(48,ce,l.form.controls.passwordConfirm.dirty&&l.form.controls.passwordConfirm.errors)),u("aria-label",s(39,36,"users.label_confirm_password")),e(4),d(s(43,38,"users.label_admin_user")),e(3),u("aria-label",s(46,40,"users.label_admin_user")),e(6),C(" ",s(52,42,"form.button_close")," "),e(4),f("disabled",!l.form.valid),e(),C(" ",s(57,44,"form.button_save")," "))},dependencies:[G,Q,V,N,O,P,J,K,R,U],encapsulation:2})}return i})();var fe=i=>({"is-invalid":i});function $e(i,E){if(i&1&&(r(0,"li",9)(1,"label",27),m(2),o(3,"translate"),n(),r(4,"div",11),c(5,"input",28),o(6,"translate"),n()()),i&2){let t=v();e(2),d(s(3,3,"users.label_confirm_password")),e(3),f("ngClass",F(7,fe,t.form.controls.passwordConfirm.dirty&&t.form.controls.passwordConfirm.errors)),u("aria-label",s(6,5,"users.label_confirm_password"))}}var be=(()=>{class i{$activeModal=p(j);$api=p(B);$auth=p(X);$toastr=p(k);$translate=p($);user;isCurrentUser=!1;form=new A({username:new w("",[x.required]),name:new w("",[x.required]),password:new w(""),passwordConfirm:new w(""),admin:new w(!0)},this.matchPassword);ngOnInit(){this.isCurrentUser=this.$auth.user.username===this.user.username,this.form.patchValue(this.user)}onSubmit({value:t}){this.$api.patch(`/users/${this.user.id}`,t).subscribe({next:()=>{this.$activeModal.close(),this.$toastr.success(this.$translate.instant("users.toast_updated_user"),this.$translate.instant("toast.title_success")),this.isCurrentUser&&t.username!==this.$auth.user.username&&this.$auth.logout()},error:a=>{console.error(a),this.$toastr.error(a.error.message||this.$translate.instant("users.toast_failed_to_add_user"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}matchPassword(t){let a=t.get("password").value,l=t.get("passwordConfirm").value;if(a!==l)t.get("passwordConfirm").setErrors({matchPassword:!0});else return null}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=y({type:i,selectors:[["ng-component"]],inputs:{user:"user"},decls:52,vars:42,consts:[[1,"modal-content"],["novalidate","",3,"ngSubmit","formGroup"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-user-pen","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-username",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["formControlName","username","type","text","id","form-username","autocomplete","off","autocapitalize","none",1,"form-control","custom-input"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","name","type","text","id","form-name","autocomplete","name",1,"form-control","custom-input"],["for","form-pass",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","password","type","password","autocomplete","new-password","id","form-pass",1,"form-control","custom-input",3,"ngClass"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],[1,"text-start"],[1,"text-end","grey-text","d-flex","align-items-center"],["type","checkbox","formControlName","admin","id","isAdmin",1,"rendux-input"],["for","isAdmin",1,"rendux-label","ms-3"],[1,"modal-footer","justify-content-between"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","submit",1,"btn","btn-primary",3,"disabled"],["for","form-pass-confirm",1,"mb-2","mb-md-0","w-100","w-md-50"],["formControlName","passwordConfirm","type","password","autocomplete","new-password","id","form-pass-confirm",1,"form-control","custom-input",3,"ngClass"]],template:function(a,l){a&1&&(r(0,"div",0)(1,"form",1),_("ngSubmit",function(){return l.onSubmit(l.form)}),r(2,"div",2)(3,"h5",3),m(4),o(5,"translate"),n(),r(6,"button",4),o(7,"translate"),_("click",function(){return l.dismissModal()}),n()(),r(8,"div",5)(9,"div",6),c(10,"i",7),n(),r(11,"ul",8)(12,"li",9)(13,"label",10),m(14),o(15,"translate"),n(),r(16,"div",11),c(17,"input",12),o(18,"translate"),n()(),r(19,"li",9)(20,"label",13),m(21),o(22,"translate"),n(),r(23,"div",11),c(24,"input",14),o(25,"translate"),n()(),r(26,"li",9)(27,"label",15),m(28),o(29,"translate"),n(),r(30,"div",11),c(31,"input",16),o(32,"translate"),n()(),h(33,$e,7,9,"li",9),r(34,"li",17)(35,"span",18),m(36),o(37,"translate"),n(),r(38,"div",19),c(39,"input",20),o(40,"translate"),c(41,"label",21),n()()()(),r(42,"div",22)(43,"div",18)(44,"button",23),_("click",function(){return l.dismissModal()}),m(45),o(46,"translate"),n()(),c(47,"div",24),r(48,"div",25)(49,"button",26),m(50),o(51,"translate"),n()()()()()),a&2&&(e(),f("formGroup",l.form),e(3),d(s(5,16,"users.title_edit_user")),e(2),u("aria-label",s(7,18,"form.button_close")),e(8),d(s(15,20,"users.label_username")),e(3),u("aria-label",s(18,22,"users.label_username")),e(4),d(s(22,24,"users.label_full_name")),e(3),u("aria-label",s(25,26,"users.label_full_name")),e(4),d(s(29,28,"users.label_new_password")),e(3),f("ngClass",F(40,fe,l.form.controls.password.dirty&&l.form.controls.password.errors)),u("aria-label",s(32,30,"users.label_new_password")),e(2),g(l.form.controls.password.value?33:-1),e(3),d(s(37,32,"users.label_admin_user")),e(3),u("aria-label",s(40,34,"users.label_admin_user")),e(6),C(" ",s(46,36,"form.button_close")," "),e(4),f("disabled",!l.form.valid),e(),C(" ",s(51,38,"form.button_save")," "))},dependencies:[G,Q,V,re,N,O,P,J,K,R,U],encapsulation:2})}return i})();function Ue(i,E){if(i&1){let t=I();S(0,"button",21),z("click",function(){T(t);let l=v().$implicit,b=v();return M(b.setup2fa(l))}),m(1),o(2,"translate"),D()}i&2&&(e(),d(s(2,1,"users.setup_2fa")))}function ke(i,E){if(i&1){let t=I();S(0,"button",17),z("click",function(){T(t);let l=v().$implicit,b=v();return M(b.disable2fa(l))}),m(1),o(2,"translate"),D()}i&2&&(e(),C(" ",s(2,1,"users.setup_2fa_disable")," "))}function Be(i,E){if(i&1){let t=I();S(0,"div",7)(1,"div",8)(2,"div",9)(3,"div",10)(4,"span",11),q(5,"h4",12)(6,"h5",13),D()(),S(7,"div",14),h(8,Ue,3,3,"button",15),h(9,ke,3,3,"button",16),S(10,"div")(11,"button",17),o(12,"translate"),z("click",function(){let l=T(t).$implicit,b=v();return M(b.openEditUser(l))}),q(13,"i",18),D(),S(14,"button",19),o(15,"translate"),z("click",function(){let l=T(t).$implicit,b=v();return M(b.deleteUser(l.id))}),q(16,"i",20),D()()()()()()}if(i&2){let t=E.$implicit,a=v();e(5),L("innerText",t.name),e(),L("innerText",t.username),e(2),g(a.username===t.username&&!t.otpActive?8:-1),e(),g(a.username===t.username&&t.otpActive?9:-1),e(2),u("aria-label",s(12,7,"form.button_edit")),e(3),L("disabled",a.username===t.username),u("aria-label",s(15,9,"form.button_delete"))}}var $t=(()=>{class i{$api=p(B);$auth=p(X);$modal=p(oe);$route=p(se);$toastr=p(k);$translate=p($);homebridgeUsers;username=this.$auth.user.username;ngOnInit(){this.$route.data.subscribe(t=>{this.homebridgeUsers=t.homebridgeUsers})}reloadUsers(){return this.$api.get("/users").subscribe(t=>{this.homebridgeUsers=t})}openAddNewUser(){this.$modal.open(ue,{size:"lg",backdrop:"static"}).result.finally(()=>{this.reloadUsers()})}openEditUser(t){let a=this.$modal.open(be,{size:"lg",backdrop:"static"});a.componentInstance.user=t,a.result.finally(()=>{this.reloadUsers()})}deleteUser(t){this.$api.delete(`/users/${t}`).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("users.toast_user_deleted"),this.$translate.instant("toast.title_success")),this.reloadUsers()},error:a=>{console.error(a),this.$toastr.error(a.error.message||this.$translate.instant("users.toast_failed_to_delete_user"),this.$translate.instant("toast.title_error"))}})}setup2fa(t){let a=this.$modal.open(pe,{size:"lg",backdrop:"static"});a.componentInstance.user=t,a.result.finally(()=>{this.reloadUsers()})}disable2fa(t){let a=this.$modal.open(me,{size:"lg",backdrop:"static"});a.componentInstance.user=t,a.result.finally(()=>{this.reloadUsers()})}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=y({type:i,selectors:[["app-users"]],decls:12,vars:6,consts:[[1,"row","mb-3"],[1,"col-9"],[1,"primary-text","m-0"],[1,"col-3","text-end"],[1,"btn","btn-elegant","waves-effect","m-0",3,"click"],[1,"fas","fa-fw","fa-user-plus"],[1,"row"],[1,"col-md-6","mb-4"],[1,"card","card-body"],[1,"d-flex","flex-column"],[1,"d-flex","flex-row","mb-3"],[1,"me-auto","my-0"],[3,"innerText"],[1,"small","text-truncate","primary-text",3,"innerText"],[1,"d-flex","flex-row","justify-content-between"],[1,"btn","btn-primary","m-0"],[1,"btn","btn-elegant","m-0"],[1,"btn","btn-elegant","m-0",3,"click"],[1,"fas","fa-fw","fa-user-pen"],[1,"btn","btn-danger","m-0","ms-2",3,"click","disabled"],[1,"fas","fa-fw","fa-trash"],[1,"btn","btn-primary","m-0",3,"click"]],template:function(a,l){a&1&&(S(0,"div",0)(1,"div",1)(2,"h3",2),m(3),o(4,"translate"),D()(),S(5,"div",3)(6,"button",4),o(7,"translate"),z("click",function(){return l.openAddNewUser()}),q(8,"i",5),D()()(),S(9,"div",6),te(10,Be,17,11,"div",7,ee),D()),a&2&&(e(3),d(s(4,2,"users.title_users")),e(3),u("aria-label",s(7,4,"users.button_add_user")),e(4),ie(l.homebridgeUsers))},dependencies:[U],encapsulation:2})}return i})();export{$t as UsersComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as u,g as n}from"./chunk-
|
|
1
|
+
import{d as u,g as n}from"./chunk-ZJ3JJYIN.js";import{k as l,n as d}from"./chunk-FPLWS5WP.js";import{a as f}from"./chunk-R3563DDE.js";import"./chunk-HBOWJDR5.js";import{ga as p,h as m,ha as i,la as o,nb as s,w as c}from"./chunk-ULJPS3WS.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-IHSOZF6N.js").then(r=>r.UsersComponent),resolve:{homebridgeUsers:a}}],v=(()=>{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:[v]})}return r})();export{T as UsersModule};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{m as Mu}from"./chunk-C3HWKB2Q.js";import{d as Hu}from"./chunk-GEIS2BWE.js";import{b as Tu}from"./chunk-R3563DDE.js";import{Hb as vu,Hc as G,Ic as U,Sb as q,Tb as Q,Ub as hu,ab as k,cc as Cu,e as x0,la as pu,mb as Lu,qc as ru,rc as gu,sc as bu}from"./chunk-ULJPS3WS.js";var S0=x0((yu,wu)=>{(function(w,y){typeof yu=="object"&&typeof wu<"u"?wu.exports=y():typeof define=="function"&&define.amd?define(y):w.JSON5=y()})(yu,function(){"use strict";function w(u,D){return D={exports:{}},u(D,D.exports),D.exports}var y=w(function(u){var D=u.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=D)}),x=w(function(u){var D=u.exports={version:"2.6.5"};typeof __e=="number"&&(__e=D)}),W=x.version,S=function(u){return typeof u=="object"?u!==null:typeof u=="function"},X=function(u){if(!S(u))throw TypeError(u+" is not an object!");return u},xu=function(u){try{return!!u()}catch{return!0}},Au=!xu(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7}),ou=y.document,Ru=S(ou)&&S(ou.createElement),$u=function(u){return Ru?ou.createElement(u):{}},zu=!Au&&!xu(function(){return Object.defineProperty($u("div"),"a",{get:function(){return 7}}).a!=7}),Ju=function(u,D){if(!S(u))return u;var t,r;if(D&&typeof(t=u.toString)=="function"&&!S(r=t.call(u))||typeof(t=u.valueOf)=="function"&&!S(r=t.call(u))||!D&&typeof(t=u.toString)=="function"&&!S(r=t.call(u)))return r;throw TypeError("Can't convert object to primitive value")},ku=Object.defineProperty,qu=Au?Object.defineProperty:function(D,t,r){if(X(D),t=Ju(t,!0),X(r),zu)try{return ku(D,t,r)}catch{}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(D[t]=r.value),D},Gu={f:qu},Uu=function(u,D){return{enumerable:!(u&1),configurable:!(u&2),writable:!(u&4),value:D}},Y=Au?function(u,D,t){return Gu.f(u,D,Uu(1,t))}:function(u,D,t){return u[D]=t,u},Zu={}.hasOwnProperty,Su=function(u,D){return Zu.call(u,D)},Ku=0,Qu=Math.random(),Wu=function(u){return"Symbol(".concat(u===void 0?"":u,")_",(++Ku+Qu).toString(36))},Xu=!1,Yu=w(function(u){var D="__core-js_shared__",t=y[D]||(y[D]={});(u.exports=function(r,n){return t[r]||(t[r]=n!==void 0?n:{})})("versions",[]).push({version:x.version,mode:Xu?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})}),Eu=Yu("native-function-to-string",Function.toString),u0=w(function(u){var D=Wu("src"),t="toString",r=(""+Eu).split(t);x.inspectSource=function(n){return Eu.call(n)},(u.exports=function(n,C,o,g){var B=typeof o=="function";B&&(Su(o,"name")||Y(o,"name",C)),n[C]!==o&&(B&&(Su(o,D)||Y(o,D,n[C]?""+n[C]:r.join(String(C)))),n===y?n[C]=o:g?n[C]?n[C]=o:Y(n,C,o):(delete n[C],Y(n,C,o)))})(Function.prototype,t,function(){return typeof this=="function"&&this[D]||Eu.call(this)})}),D0=function(u){if(typeof u!="function")throw TypeError(u+" is not a function!");return u},_u=function(u,D,t){if(D0(u),D===void 0)return u;switch(t){case 1:return function(r){return u.call(D,r)};case 2:return function(r,n){return u.call(D,r,n)};case 3:return function(r,n,C){return u.call(D,r,n,C)}}return function(){return u.apply(D,arguments)}},cu="prototype",v=function(u,D,t){var r=u&v.F,n=u&v.G,C=u&v.S,o=u&v.P,g=u&v.B,B=n?y:C?y[D]||(y[D]={}):(y[D]||{})[cu],$=n?x:x[D]||(x[D]={}),Z=$[cu]||($[cu]={}),P,I,b,K;n&&(t=D);for(P in t)I=!r&&B&&B[P]!==void 0,b=(I?B:t)[P],K=g&&I?_u(b,y):o&&typeof b=="function"?_u(Function.call,b):b,B&&u0(B,P,b,u&v.U),$[P]!=b&&Y($,P,K),o&&Z[P]!=b&&(Z[P]=b)};y.core=x,v.F=1,v.G=2,v.S=4,v.P=8,v.B=16,v.W=32,v.U=64,v.R=128;var uu=v,e0=Math.ceil,r0=Math.floor,Pu=function(u){return isNaN(u=+u)?0:(u>0?r0:e0)(u)},t0=function(u){if(u==null)throw TypeError("Can't call method on "+u);return u},n0=function(u){return function(D,t){var r=String(t0(D)),n=Pu(t),C=r.length,o,g;return n<0||n>=C?u?"":void 0:(o=r.charCodeAt(n),o<55296||o>56319||n+1===C||(g=r.charCodeAt(n+1))<56320||g>57343?u?r.charAt(n):o:u?r.slice(n,n+2):(o-55296<<10)+(g-56320)+65536)}},i0=n0(!1);uu(uu.P,"String",{codePointAt:function(D){return i0(this,D)}});var _0=x.String.codePointAt,a0=Math.max,F0=Math.min,C0=function(u,D){return u=Pu(u),u<0?a0(u+D,0):F0(u,D)},Nu=String.fromCharCode,Iu=String.fromCodePoint;uu(uu.S+uu.F*(!!Iu&&Iu.length!=1),"String",{fromCodePoint:function(D){for(var t=arguments,r=[],n=arguments.length,C=0,o;n>C;){if(o=+t[C++],C0(o,1114111)!==o)throw RangeError(o+" is not a valid code point");r.push(o<65536?Nu(o):Nu(((o-=65536)>>10)+55296,o%1024+56320))}return r.join("")}});var P0=x.String.fromCodePoint,A0=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,o0=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,E0=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,fu={Space_Separator:A0,ID_Start:o0,ID_Continue:E0},s={isSpaceSeparator:function(D){return typeof D=="string"&&fu.Space_Separator.test(D)},isIdStartChar:function(D){return typeof D=="string"&&(D>="a"&&D<="z"||D>="A"&&D<="Z"||D==="$"||D==="_"||fu.ID_Start.test(D))},isIdContinueChar:function(D){return typeof D=="string"&&(D>="a"&&D<="z"||D>="A"&&D<="Z"||D>="0"&&D<="9"||D==="$"||D==="_"||D==="\u200C"||D==="\u200D"||fu.ID_Continue.test(D))},isDigit:function(D){return typeof D=="string"&&/[0-9]/.test(D)},isHexDigit:function(D){return typeof D=="string"&&/[0-9A-Fa-f]/.test(D)}},su,h,j,tu,M,_,l,Bu,Du,c0=function(D,t){su=String(D),h="start",j=[],tu=0,M=1,_=0,l=void 0,Bu=void 0,Du=void 0;do l=f0(),l0[h]();while(l.type!=="eof");return typeof t=="function"?lu({"":Du},"",t):Du};function lu(u,D,t){var r=u[D];if(r!=null&&typeof r=="object")if(Array.isArray(r))for(var n=0;n<r.length;n++){var C=String(n),o=lu(r,C,t);o===void 0?delete r[C]:Object.defineProperty(r,C,{value:o,writable:!0,enumerable:!0,configurable:!0})}else for(var g in r){var B=lu(r,g,t);B===void 0?delete r[g]:Object.defineProperty(r,g,{value:B,writable:!0,enumerable:!0,configurable:!0})}return t.call(u,D,r)}var F,i,eu,O,A;function f0(){for(F="default",i="",eu=!1,O=1;;){A=V();var u=ju[F]();if(u)return u}}function V(){if(su[tu])return String.fromCodePoint(su.codePointAt(tu))}function e(){var u=V();return u===`
|
|
1
|
+
import{m as Mu}from"./chunk-C3HWKB2Q.js";import{d as Hu}from"./chunk-ZJ3JJYIN.js";import{b as Tu}from"./chunk-R3563DDE.js";import{Hb as vu,Hc as G,Ic as U,Sb as q,Tb as Q,Ub as hu,ab as k,cc as Cu,e as x0,la as pu,mb as Lu,qc as ru,rc as gu,sc as bu}from"./chunk-ULJPS3WS.js";var S0=x0((yu,wu)=>{(function(w,y){typeof yu=="object"&&typeof wu<"u"?wu.exports=y():typeof define=="function"&&define.amd?define(y):w.JSON5=y()})(yu,function(){"use strict";function w(u,D){return D={exports:{}},u(D,D.exports),D.exports}var y=w(function(u){var D=u.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=D)}),x=w(function(u){var D=u.exports={version:"2.6.5"};typeof __e=="number"&&(__e=D)}),W=x.version,S=function(u){return typeof u=="object"?u!==null:typeof u=="function"},X=function(u){if(!S(u))throw TypeError(u+" is not an object!");return u},xu=function(u){try{return!!u()}catch{return!0}},Au=!xu(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7}),ou=y.document,Ru=S(ou)&&S(ou.createElement),$u=function(u){return Ru?ou.createElement(u):{}},zu=!Au&&!xu(function(){return Object.defineProperty($u("div"),"a",{get:function(){return 7}}).a!=7}),Ju=function(u,D){if(!S(u))return u;var t,r;if(D&&typeof(t=u.toString)=="function"&&!S(r=t.call(u))||typeof(t=u.valueOf)=="function"&&!S(r=t.call(u))||!D&&typeof(t=u.toString)=="function"&&!S(r=t.call(u)))return r;throw TypeError("Can't convert object to primitive value")},ku=Object.defineProperty,qu=Au?Object.defineProperty:function(D,t,r){if(X(D),t=Ju(t,!0),X(r),zu)try{return ku(D,t,r)}catch{}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(D[t]=r.value),D},Gu={f:qu},Uu=function(u,D){return{enumerable:!(u&1),configurable:!(u&2),writable:!(u&4),value:D}},Y=Au?function(u,D,t){return Gu.f(u,D,Uu(1,t))}:function(u,D,t){return u[D]=t,u},Zu={}.hasOwnProperty,Su=function(u,D){return Zu.call(u,D)},Ku=0,Qu=Math.random(),Wu=function(u){return"Symbol(".concat(u===void 0?"":u,")_",(++Ku+Qu).toString(36))},Xu=!1,Yu=w(function(u){var D="__core-js_shared__",t=y[D]||(y[D]={});(u.exports=function(r,n){return t[r]||(t[r]=n!==void 0?n:{})})("versions",[]).push({version:x.version,mode:Xu?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})}),Eu=Yu("native-function-to-string",Function.toString),u0=w(function(u){var D=Wu("src"),t="toString",r=(""+Eu).split(t);x.inspectSource=function(n){return Eu.call(n)},(u.exports=function(n,C,o,g){var B=typeof o=="function";B&&(Su(o,"name")||Y(o,"name",C)),n[C]!==o&&(B&&(Su(o,D)||Y(o,D,n[C]?""+n[C]:r.join(String(C)))),n===y?n[C]=o:g?n[C]?n[C]=o:Y(n,C,o):(delete n[C],Y(n,C,o)))})(Function.prototype,t,function(){return typeof this=="function"&&this[D]||Eu.call(this)})}),D0=function(u){if(typeof u!="function")throw TypeError(u+" is not a function!");return u},_u=function(u,D,t){if(D0(u),D===void 0)return u;switch(t){case 1:return function(r){return u.call(D,r)};case 2:return function(r,n){return u.call(D,r,n)};case 3:return function(r,n,C){return u.call(D,r,n,C)}}return function(){return u.apply(D,arguments)}},cu="prototype",v=function(u,D,t){var r=u&v.F,n=u&v.G,C=u&v.S,o=u&v.P,g=u&v.B,B=n?y:C?y[D]||(y[D]={}):(y[D]||{})[cu],$=n?x:x[D]||(x[D]={}),Z=$[cu]||($[cu]={}),P,I,b,K;n&&(t=D);for(P in t)I=!r&&B&&B[P]!==void 0,b=(I?B:t)[P],K=g&&I?_u(b,y):o&&typeof b=="function"?_u(Function.call,b):b,B&&u0(B,P,b,u&v.U),$[P]!=b&&Y($,P,K),o&&Z[P]!=b&&(Z[P]=b)};y.core=x,v.F=1,v.G=2,v.S=4,v.P=8,v.B=16,v.W=32,v.U=64,v.R=128;var uu=v,e0=Math.ceil,r0=Math.floor,Pu=function(u){return isNaN(u=+u)?0:(u>0?r0:e0)(u)},t0=function(u){if(u==null)throw TypeError("Can't call method on "+u);return u},n0=function(u){return function(D,t){var r=String(t0(D)),n=Pu(t),C=r.length,o,g;return n<0||n>=C?u?"":void 0:(o=r.charCodeAt(n),o<55296||o>56319||n+1===C||(g=r.charCodeAt(n+1))<56320||g>57343?u?r.charAt(n):o:u?r.slice(n,n+2):(o-55296<<10)+(g-56320)+65536)}},i0=n0(!1);uu(uu.P,"String",{codePointAt:function(D){return i0(this,D)}});var _0=x.String.codePointAt,a0=Math.max,F0=Math.min,C0=function(u,D){return u=Pu(u),u<0?a0(u+D,0):F0(u,D)},Nu=String.fromCharCode,Iu=String.fromCodePoint;uu(uu.S+uu.F*(!!Iu&&Iu.length!=1),"String",{fromCodePoint:function(D){for(var t=arguments,r=[],n=arguments.length,C=0,o;n>C;){if(o=+t[C++],C0(o,1114111)!==o)throw RangeError(o+" is not a valid code point");r.push(o<65536?Nu(o):Nu(((o-=65536)>>10)+55296,o%1024+56320))}return r.join("")}});var P0=x.String.fromCodePoint,A0=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,o0=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,E0=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,fu={Space_Separator:A0,ID_Start:o0,ID_Continue:E0},s={isSpaceSeparator:function(D){return typeof D=="string"&&fu.Space_Separator.test(D)},isIdStartChar:function(D){return typeof D=="string"&&(D>="a"&&D<="z"||D>="A"&&D<="Z"||D==="$"||D==="_"||fu.ID_Start.test(D))},isIdContinueChar:function(D){return typeof D=="string"&&(D>="a"&&D<="z"||D>="A"&&D<="Z"||D>="0"&&D<="9"||D==="$"||D==="_"||D==="\u200C"||D==="\u200D"||fu.ID_Continue.test(D))},isDigit:function(D){return typeof D=="string"&&/[0-9]/.test(D)},isHexDigit:function(D){return typeof D=="string"&&/[0-9A-Fa-f]/.test(D)}},su,h,j,tu,M,_,l,Bu,Du,c0=function(D,t){su=String(D),h="start",j=[],tu=0,M=1,_=0,l=void 0,Bu=void 0,Du=void 0;do l=f0(),l0[h]();while(l.type!=="eof");return typeof t=="function"?lu({"":Du},"",t):Du};function lu(u,D,t){var r=u[D];if(r!=null&&typeof r=="object")if(Array.isArray(r))for(var n=0;n<r.length;n++){var C=String(n),o=lu(r,C,t);o===void 0?delete r[C]:Object.defineProperty(r,C,{value:o,writable:!0,enumerable:!0,configurable:!0})}else for(var g in r){var B=lu(r,g,t);B===void 0?delete r[g]:Object.defineProperty(r,g,{value:B,writable:!0,enumerable:!0,configurable:!0})}return t.call(u,D,r)}var F,i,eu,O,A;function f0(){for(F="default",i="",eu=!1,O=1;;){A=V();var u=ju[F]();if(u)return u}}function V(){if(su[tu])return String.fromCodePoint(su.codePointAt(tu))}function e(){var u=V();return u===`
|
|
2
2
|
`?(M++,_=0):u?_+=u.length:_++,u&&(tu+=u.length),u}var ju={default:function(){switch(A){case" ":case"\v":case"\f":case" ":case"\xA0":case"\uFEFF":case`
|
|
3
3
|
`:case"\r":case"\u2028":case"\u2029":e();return;case"/":e(),F="comment";return;case void 0:return e(),c("eof")}if(s.isSpaceSeparator(A)){e();return}return ju[h]()},comment:function(){switch(A){case"*":e(),F="multiLineComment";return;case"/":e(),F="singleLineComment";return}throw f(e())},multiLineComment:function(){switch(A){case"*":e(),F="multiLineCommentAsterisk";return;case void 0:throw f(e())}e()},multiLineCommentAsterisk:function(){switch(A){case"*":e();return;case"/":e(),F="default";return;case void 0:throw f(e())}e(),F="multiLineComment"},singleLineComment:function(){switch(A){case`
|
|
4
4
|
`:case"\r":case"\u2028":case"\u2029":e(),F="default";return;case void 0:return e(),c("eof")}e()},value:function(){switch(A){case"{":case"[":return c("punctuator",e());case"n":return e(),H("ull"),c("null",null);case"t":return e(),H("rue"),c("boolean",!0);case"f":return e(),H("alse"),c("boolean",!1);case"-":case"+":e()==="-"&&(O=-1),F="sign";return;case".":i=e(),F="decimalPointLeading";return;case"0":i=e(),F="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":i=e(),F="decimalInteger";return;case"I":return e(),H("nfinity"),c("numeric",1/0);case"N":return e(),H("aN"),c("numeric",NaN);case'"':case"'":eu=e()==='"',i="",F="string";return}throw f(e())},identifierNameStartEscape:function(){if(A!=="u")throw f(e());e();var D=du();switch(D){case"$":case"_":break;default:if(!s.isIdStartChar(D))throw Ou();break}i+=D,F="identifierName"},identifierName:function(){switch(A){case"$":case"_":case"\u200C":case"\u200D":i+=e();return;case"\\":e(),F="identifierNameEscape";return}if(s.isIdContinueChar(A)){i+=e();return}return c("identifier",i)},identifierNameEscape:function(){if(A!=="u")throw f(e());e();var D=du();switch(D){case"$":case"_":case"\u200C":case"\u200D":break;default:if(!s.isIdContinueChar(D))throw Ou();break}i+=D,F="identifierName"},sign:function(){switch(A){case".":i=e(),F="decimalPointLeading";return;case"0":i=e(),F="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":i=e(),F="decimalInteger";return;case"I":return e(),H("nfinity"),c("numeric",O*(1/0));case"N":return e(),H("aN"),c("numeric",NaN)}throw f(e())},zero:function(){switch(A){case".":i+=e(),F="decimalPoint";return;case"e":case"E":i+=e(),F="decimalExponent";return;case"x":case"X":i+=e(),F="hexadecimal";return}return c("numeric",O*0)},decimalInteger:function(){switch(A){case".":i+=e(),F="decimalPoint";return;case"e":case"E":i+=e(),F="decimalExponent";return}if(s.isDigit(A)){i+=e();return}return c("numeric",O*Number(i))},decimalPointLeading:function(){if(s.isDigit(A)){i+=e(),F="decimalFraction";return}throw f(e())},decimalPoint:function(){switch(A){case"e":case"E":i+=e(),F="decimalExponent";return}if(s.isDigit(A)){i+=e(),F="decimalFraction";return}return c("numeric",O*Number(i))},decimalFraction:function(){switch(A){case"e":case"E":i+=e(),F="decimalExponent";return}if(s.isDigit(A)){i+=e();return}return c("numeric",O*Number(i))},decimalExponent:function(){switch(A){case"+":case"-":i+=e(),F="decimalExponentSign";return}if(s.isDigit(A)){i+=e(),F="decimalExponentInteger";return}throw f(e())},decimalExponentSign:function(){if(s.isDigit(A)){i+=e(),F="decimalExponentInteger";return}throw f(e())},decimalExponentInteger:function(){if(s.isDigit(A)){i+=e();return}return c("numeric",O*Number(i))},hexadecimal:function(){if(s.isHexDigit(A)){i+=e(),F="hexadecimalInteger";return}throw f(e())},hexadecimalInteger:function(){if(s.isHexDigit(A)){i+=e();return}return c("numeric",O*Number(i))},string:function(){switch(A){case"\\":e(),i+=s0();return;case'"':if(eu)return e(),c("string",i);i+=e();return;case"'":if(!eu)return e(),c("string",i);i+=e();return;case`
|