homebridge-config-ui-x 5.4.2-beta.16 → 5.4.2-beta.17
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/package.json +1 -1
- package/public/{chunk-BOEVHF5F.js → chunk-3JVIQH57.js} +1 -1
- package/public/{chunk-C3MIVQCG.js → chunk-3OGGH4IS.js} +1 -1
- package/public/{chunk-64DAPDF5.js → chunk-4KZOLBU6.js} +1 -1
- package/public/{chunk-QXJDN2Q4.js → chunk-54YQ4GYI.js} +4 -4
- package/public/{chunk-M2B6ISLX.js → chunk-64N47XDK.js} +1 -1
- package/public/{chunk-SAJTB4SR.js → chunk-65DLNKYC.js} +1 -1
- package/public/{chunk-TGMGUP4S.js → chunk-7CM2GH4C.js} +1 -1
- package/public/{chunk-EZT3MKU2.js → chunk-A4CHQU3D.js} +1 -1
- package/public/{chunk-GYWHA4UG.js → chunk-B6BTFDRQ.js} +1 -1
- package/public/{chunk-GWXZ52WY.js → chunk-DOEOGSBK.js} +1 -1
- package/public/{chunk-WUPGTEQ4.js → chunk-DOUHWAMX.js} +1 -1
- package/public/{chunk-Y7TNTIU3.js → chunk-DTQOAWZI.js} +1 -1
- package/public/{chunk-EFN7OX2S.js → chunk-ET2JOBBZ.js} +1 -1
- package/public/{chunk-6L4EKOQR.js → chunk-EY7GOTXO.js} +1 -1
- package/public/{chunk-PB2PC33B.js → chunk-F26AIEEZ.js} +1 -1
- package/public/{chunk-UGMDVR5V.js → chunk-FUCI6T5W.js} +1 -1
- package/public/{chunk-3F43PTVJ.js → chunk-GPAKN3YI.js} +1 -1
- package/public/{chunk-MZ3XHPWZ.js → chunk-H6HIJJ3O.js} +1 -1
- package/public/{chunk-3XFUWJGL.js → chunk-HGA3V752.js} +1 -1
- package/public/{chunk-VY4A2U5R.js → chunk-HHEVRKFK.js} +1 -1
- package/public/{chunk-KOXRTPFB.js → chunk-HRWXFYIE.js} +1 -1
- package/public/{chunk-VPCF2YXB.js → chunk-J5NDAVFE.js} +1 -1
- package/public/{chunk-IHAZUOLN.js → chunk-J7XS3MTC.js} +1 -1
- package/public/{chunk-4JYGIYS6.js → chunk-KKLQHHAF.js} +1 -1
- package/public/{chunk-6XYLN2ON.js → chunk-KWOZQQGF.js} +1 -1
- package/public/{chunk-TXP3432G.js → chunk-LOR7R6R7.js} +1 -1
- package/public/{chunk-5B67RG5C.js → chunk-LPYZOQUG.js} +1 -1
- package/public/{chunk-2Z6NQOGB.js → chunk-MJD7XNRM.js} +1 -1
- package/public/{chunk-BME7RDQX.js → chunk-N2ANXJ5U.js} +1 -1
- package/public/{chunk-IOTUAYMI.js → chunk-NWJMSZSM.js} +1 -1
- package/public/{chunk-Y3IHDNS4.js → chunk-OVO5ZJNB.js} +1 -1
- package/public/{chunk-UXALHV57.js → chunk-P7QFFCKC.js} +1 -1
- package/public/{chunk-DTWH4S27.js → chunk-PQ27E4MI.js} +1 -1
- package/public/{chunk-V3FPDJGI.js → chunk-PSQ7ES2C.js} +1 -1
- package/public/{chunk-D4JH4N33.js → chunk-R3DFE6BN.js} +1 -1
- package/public/{chunk-KCNLYISY.js → chunk-T2CIQG5J.js} +1 -1
- package/public/{chunk-NO5LCM63.js → chunk-TFSSVDMB.js} +1 -1
- package/public/{chunk-ZTPRJUZ6.js → chunk-UG7X3SOK.js} +1 -1
- package/public/{chunk-72S6Y4C6.js → chunk-VBTY5CSR.js} +1 -1
- package/public/{chunk-5KYV52LA.js → chunk-VKGJ42VH.js} +1 -1
- package/public/{chunk-QANVBO6M.js → chunk-W2NRMLDB.js} +1 -1
- package/public/{chunk-VNC5PDW7.js → chunk-WK4E23QD.js} +1 -1
- package/public/{chunk-FTPY4VTW.js → chunk-X7M676S6.js} +1 -1
- package/public/{chunk-5YAMEU34.js → chunk-XM2R75VU.js} +1 -1
- package/public/{chunk-KX3XFNU5.js → chunk-XWX4EOTE.js} +1 -1
- package/public/{chunk-OQGXXIW6.js → chunk-YYVGNCER.js} +1 -1
- package/public/{chunk-BYKIXKPO.js → chunk-ZZDKJB6X.js} +1 -1
- package/public/index.html +1 -1
- package/public/{main-NLDH6GYP.js → main-YR7DITXZ.js} +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as u,g as n}from"./chunk-UOLP7IQJ.js";import{k as l,n as d}from"./chunk-
|
|
1
|
+
import{d as u,g as n}from"./chunk-UOLP7IQJ.js";import{k as l,n as d}from"./chunk-3OGGH4IS.js";import{a as f}from"./chunk-G7FA4DP4.js";import"./chunk-6GMXEQVA.js";import{fa as p,ga as i,h as m,ka as o,nb as s,w as c}from"./chunk-H36QJYLQ.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-GPAKN3YI.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 +1 @@
|
|
|
1
|
-
import{m as J}from"./chunk-RYEUSRBX.js";import{B as H,e as O,l as W,s as z,t as q,v as G}from"./chunk-7BRVYYLY.js";import{d as Y}from"./chunk-UOLP7IQJ.js";import{k as X,n as Z}from"./chunk-
|
|
1
|
+
import{m as J}from"./chunk-RYEUSRBX.js";import{B as H,e as O,l as W,s as z,t as q,v as G}from"./chunk-7BRVYYLY.js";import{d as Y}from"./chunk-UOLP7IQJ.js";import{k as X,n as Z}from"./chunk-3OGGH4IS.js";import{a as K,b as Q}from"./chunk-G7FA4DP4.js";import{Ec as N,Fc as P,Hb as A,Ib as _,Jb as u,Jc as m,Kc as p,Lb as k,Mb as E,Nb as $,Ob as C,Pb as o,Qb as a,Rb as w,_b as B,a as T,ab as s,b as R,bc as b,dc as d,h as M,id as j,ka as y,mb as D,qa as f,qc as c,ra as v,rc as g,sc as h,tc as V,w as S,xc as F,yc as U,zc as L}from"./chunk-H36QJYLQ.js";var te=(t,l)=>({"btn-danger":t,"btn-elegant":l}),ie=(t,l,e)=>({"fa-trash":t,"fa-undo":l,"fa-spinner fa-pulse":e});function ne(t,l){t&1&&(o(0,"div",12),w(1,"i",13),a(),o(2,"p",14),c(3),m(4,"translate"),a()),t&2&&(s(3),g(p(4,1,"reset.no_accessories")))}function se(t,l){if(t&1&&(o(0,"option",24),c(1),a()),t&2){let e=l.$implicit;C("value",e._id),s(),V("",e.name," (",e._username,")")}}function oe(t,l){if(t&1){let e=B();o(0,"li",20),c(1),m(2,"translate"),a(),o(3,"li",18)(4,"label",21),c(5),m(6,"translate"),a(),o(7,"div",22)(8,"select",23),L("ngModelChange",function(i){f(e);let r=d(2);return U(r.selectedBridge,i)||(r.selectedBridge=i),v(i)}),b("change",function(i){f(e);let r=d(2);return v(r.onBridgeChange(i.target.value))}),E(9,se,2,3,"option",24,k),a()()()}if(t&2){let e=d(2);s(),g(p(2,3,"form.label.changes_kept")),s(4),g(p(6,5,"reset.accessory_ind.bridge")),s(3),F("ngModel",e.selectedBridge),s(),$(e.pairings)}}function ae(t,l){if(t&1&&(o(0,"li",18)(1,"label",25),c(2),m(3,"translate"),a(),o(4,"div",26),c(5),a()()),t&2){let e=d(2);s(2),g(p(3,2,"reset.accessory_ind.bridge")),s(3),h(" ",e.getCurrentlySelectedBridge()," ")}}function re(t,l){if(t&1){let e=B();o(0,"li",19)(1,"span"),c(2),w(3,"br"),o(4,"small")(5,"span",27),c(6),a()()(),o(7,"button",28),m(8,"translate"),b("click",function(){let i=f(e).$implicit,r=d(2);return v(r.toggleList(i.UUID,i.$cacheFile))}),w(9,"i",29),a()()}if(t&2){let e=l.$implicit,n=d(2);s(2),h(" ",e.displayName),s(4),g(e.UUID),s(),C("disabled",n.clicked)("ngClass",N(8,te,!n.isInList(e.UUID,e.$cacheFile),n.isInList(e.UUID,e.$cacheFile))),A("aria-label",p(8,6,"form.button_delete")),s(2),C("ngClass",P(11,ie,!n.isInList(e.UUID,e.$cacheFile),n.isInList(e.UUID,e.$cacheFile)&&!n.clicked,n.isInList(e.UUID,e.$cacheFile)&&n.clicked))}}function le(t,l){if(t&1&&(o(0,"div",12),w(1,"i",15),a(),o(2,"ul",16)(3,"li"),c(4),m(5,"translate"),a(),o(6,"li"),c(7),m(8,"translate"),a(),o(9,"li"),c(10),m(11,"translate"),a()(),o(12,"ul",17),_(13,oe,11,7),_(14,ae,6,4,"li",18),E(15,re,10,15,"li",19,k),a()),t&2){let e=d();s(4),g(p(5,5,"reset.accessory_ind.list_1")),s(3),g(p(8,7,"reset.accessory_ind.list_2")),s(3),g(p(11,9,"reset.accessory_ind.list_3")),s(3),u(e.pairings.length>1?13:-1),s(),u(e.pairings.length===1?14:-1),s(),$(e.selectedBridgeAccessories)}}function ce(t,l){if(t&1){let e=B();o(0,"button",30),b("click",function(){f(e);let i=d();return v(i.dismissModal())}),c(1),m(2,"translate"),a()}if(t&2){let e=d();C("disabled",e.clicked),s(),h(" ",p(2,2,"form.button_close")," ")}}function de(t,l){if(t&1){let e=B();o(0,"button",31),b("click",function(){f(e);let i=d();return v(i.dismissModal())}),c(1),m(2,"translate"),a()}t&2&&(s(),h(" ",p(2,1,"form.button_close")," "))}function me(t,l){if(t&1&&c(0),t&2){let e=d(3);h(" (",e.toDelete.length,") ")}}function pe(t,l){if(t&1&&(c(0),m(1,"translate"),_(2,me,1,1)),t&2){let e=d(2);h(" ",p(1,2,"form.button_remove")," "),s(2),u(e.toDelete.length>0?2:-1)}}function _e(t,l){t&1&&w(0,"i",33)}function ue(t,l){if(t&1){let e=B();o(0,"button",32),b("click",function(){f(e);let i=d();return v(i.removeAccessories())}),_(1,pe,3,4),_(2,_e,1,0,"i",33),a()}if(t&2){let e=d();C("disabled",!e.toDelete.length||e.clicked),s(),u(e.clicked?-1:1),s(),u(e.clicked?2:-1)}}var ke=(()=>{class t{$activeModal=y(J);$api=y(Z);$router=y(Y);$toastr=y(X);$translate=y(K);selectedBridge="";pairings=[];clicked=!1;selectedBridgeAccessories=[];accessoriesExist=!1;toDelete=[];ngOnInit(){this.loadCachedAccessories()}onBridgeChange(e){this.selectedBridge=e,this.selectedBridgeAccessories=this.pairings.find(n=>n._id===this.selectedBridge)?.accessories}getCurrentlySelectedBridge(){let e=this.pairings.find(n=>n._id===this.selectedBridge);return`${e.name} - ${e._username}`}toggleList(e,n){this.toDelete.some(i=>i.uuid===e&&i.cacheFile===n)?this.toDelete=this.toDelete.filter(i=>i.uuid!==e||i.cacheFile!==n):this.toDelete.push({cacheFile:n,uuid:e})}isInList(e,n){return this.toDelete.some(i=>i.uuid===e&&i.cacheFile===n)}removeAccessories(){return this.clicked=!0,this.$api.delete("/server/cached-accessories",{body:this.toDelete}).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("reset.accessory_ind.done"),this.$translate.instant("toast.title_success")),this.$activeModal.close(),this.$router.navigate(["/restart"],{queryParams:{restarting:!0}})},error:e=>{this.clicked=!1,console.error(e),this.$toastr.error(this.$translate.instant("reset.accessory_ind.fail"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadCachedAccessories(){return M(this,null,function*(){try{let[e,n]=yield Promise.all([S(this.$api.get("/server/cached-accessories")),S(this.$api.get("/server/pairings"))]),i=new Map(n.map(r=>[r._id,R(T({},r),{accessories:[]})]));e.sort((r,x)=>r.displayName.localeCompare(x.displayName)).forEach(r=>{let x=n.find(ee=>ee._main),I=r.$cacheFile?.split(".")?.[1]||x._id;(!this.selectedBridge||this.selectedBridge===I)&&(i.has(I)||i.set(I,{_id:I,_username:I.match(/.{1,2}/g).join(":"),name:this.$translate.instant("reset.accessory_ind.unknown"),accessories:[]}),i.get(I).accessories.push(r))}),this.pairings=Array.from(i.values()).filter(r=>r.accessories.length>0).sort((r,x)=>r._main&&!x._main?-1:!r._main&&x._main?1:r.name.localeCompare(x.name)),this.selectedBridge=this.selectedBridge||this.pairings[0]?._id,this.selectedBridge&&(this.accessoriesExist=!0,this.selectedBridgeAccessories=this.pairings[0].accessories)}catch(e){console.error(e),this.$toastr.error(this.$translate.instant("reset.error_message"),this.$translate.instant("toast.title_error")),this.$activeModal.close()}})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=D({type:t,selectors:[["ng-component"]],inputs:{selectedBridge:"selectedBridge"},decls:17,vars:12,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click","disabled"],[1,"modal-body"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"disabled"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"disabled"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-circle-check","primary-text",2,"font-size","75px"],[1,"mb-0","text-center"],[1,"fas","fa-fw","fa-network-wired","primary-text",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"list-group-item","text-center","grey-text","small"],["for","bridgeSelect",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["id","bridgeSelect",1,"custom-select",3,"ngModelChange","change","ngModel"],[3,"value"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50","grey-text","font-monospace"],[1,"font-monospace","grey-text"],[1,"btn","btn-danger","m-0","ms-3",3,"click","disabled","ngClass"],[1,"fas","fa-fw",3,"ngClass"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"click","disabled"],[1,"fas","fa-fw","fa-spinner","fa-pulse"]],template:function(n,i){n&1&&(o(0,"div",0)(1,"div",1)(2,"h5",2),c(3),m(4,"translate"),a(),o(5,"button",3),m(6,"translate"),b("click",function(){return i.dismissModal()}),a()(),o(7,"div",4),_(8,ne,5,3),_(9,le,17,11),a(),o(10,"div",5)(11,"div",6),_(12,ce,3,4,"button",7),a(),o(13,"div",8),_(14,de,3,3,"button",9),a(),o(15,"div",10),_(16,ue,3,3,"button",11),a()()()),n&2&&(s(3),g(p(4,8,"reset.accessory_ind.title")),s(2),C("disabled",i.clicked),A("aria-label",p(6,10,"form.button_close")),s(3),u(i.accessoriesExist?-1:8),s(),u(i.accessoriesExist?9:-1),s(3),u(i.accessoriesExist?12:-1),s(2),u(i.accessoriesExist?-1:14),s(2),u(i.accessoriesExist?16:-1))},dependencies:[j,H,q,G,z,O,W,Q],encapsulation:2})}return t})();export{ke as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as _,b as D}from"./chunk-
|
|
1
|
+
import{a as _,b as D}from"./chunk-DOUHWAMX.js";import{m as c,n as S}from"./chunk-3OGGH4IS.js";import{e as x}from"./chunk-6GMXEQVA.js";import{C as v,fa as h,g as O,ga as E,h as a,ia as y,ja as l,ka as f,nb as I,r as p,va as j,w as d,x as T,z as w}from"./chunk-H36QJYLQ.js";var g=new y("JWT_OPTIONS"),m=(()=>{class r{constructor(e=null){this.tokenGetter=e&&e.tokenGetter||function(){}}urlBase64Decode(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:{t+="==";break}case 3:{t+="=";break}default:throw new Error("Illegal base64url string!")}return this.b64DecodeUnicode(t)}b64decode(e){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o="";if(e=String(e).replace(/=+$/,""),e.length%4===1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(let i=0,s,n,b=0;n=e.charAt(b++);~n&&(s=i%4?s*64+n:n,i++%4)?o+=String.fromCharCode(255&s>>(-2*i&6)):0)n=t.indexOf(n);return o}b64DecodeUnicode(e){return decodeURIComponent(Array.prototype.map.call(this.b64decode(e),t=>"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)).join(""))}decodeToken(e=this.tokenGetter()){return e instanceof Promise?e.then(t=>this._decodeToken(t)):this._decodeToken(e)}_decodeToken(e){if(!e||e==="")return null;let t=e.split(".");if(t.length!==3)throw new Error("The inspected token doesn't appear to be a JWT. Check to make sure it has three parts and see https://jwt.io for more.");let o=this.urlBase64Decode(t[1]);if(!o)throw new Error("Cannot decode the token.");return JSON.parse(o)}getTokenExpirationDate(e=this.tokenGetter()){return e instanceof Promise?e.then(t=>this._getTokenExpirationDate(t)):this._getTokenExpirationDate(e)}_getTokenExpirationDate(e){let t;if(t=this.decodeToken(e),!t||!t.hasOwnProperty("exp"))return null;let o=new Date(0);return o.setUTCSeconds(t.exp),o}isTokenExpired(e=this.tokenGetter(),t){return e instanceof Promise?e.then(o=>this._isTokenExpired(o,t)):this._isTokenExpired(e,t)}_isTokenExpired(e,t){if(!e||e==="")return!0;let o=this.getTokenExpirationDate(e);return t=t||0,o===null?!1:!(o.valueOf()>new Date().valueOf()+t*1e3)}getAuthScheme(e,t){return typeof e=="function"?e(t):e}}return r.\u0275fac=function(e){return new(e||r)(l(g))},r.\u0275prov=h({token:r,factory:r.\u0275fac}),r})(),$=r=>r instanceof Promise?v(()=>r):p(r),R=(()=>{class r{constructor(e,t,o){this.jwtHelper=t,this.document=o,this.standardPorts=["80","443"],this.tokenGetter=e.tokenGetter,this.headerName=e.headerName||"Authorization",this.authScheme=e.authScheme||e.authScheme===""?e.authScheme:"Bearer ",this.allowedDomains=e.allowedDomains||[],this.disallowedRoutes=e.disallowedRoutes||[],this.throwNoTokenError=e.throwNoTokenError||!1,this.skipWhenExpired=e.skipWhenExpired}isAllowedDomain(e){let t=new URL(e.url,this.document.location.origin);if(t.host===this.document.location.host)return!0;let o=`${t.hostname}${t.port&&!this.standardPorts.includes(t.port)?":"+t.port:""}`;return this.allowedDomains.findIndex(i=>typeof i=="string"?i===o:i instanceof RegExp?i.test(o):!1)>-1}isDisallowedRoute(e){let t=new URL(e.url,this.document.location.origin);return this.disallowedRoutes.findIndex(o=>{if(typeof o=="string"){let i=new URL(o,this.document.location.origin);return i.hostname===t.hostname&&i.pathname===t.pathname}return o instanceof RegExp?o.test(e.url):!1})>-1}handleInterception(e,t,o){let i=this.jwtHelper.getAuthScheme(this.authScheme,t);if(!e&&this.throwNoTokenError)throw new Error("Could not get token from tokenGetter function.");let s=p(!1);return this.skipWhenExpired&&(s=e?$(this.jwtHelper.isTokenExpired(e)):p(!0)),e?s.pipe(T(n=>n&&this.skipWhenExpired?t.clone():t.clone({setHeaders:{[this.headerName]:`${i}${e}`}})),w(n=>o.handle(n))):o.handle(t)}intercept(e,t){if(!this.isAllowedDomain(e)||this.isDisallowedRoute(e))return t.handle(e);let o=this.tokenGetter(e);return $(o).pipe(w(i=>this.handleInterception(i,e,t)))}}return r.\u0275fac=function(e){return new(e||r)(l(g),l(m),l(j))},r.\u0275prov=h({token:r,factory:r.\u0275fac}),r})(),F=(()=>{class r{constructor(e){if(e)throw new Error("JwtModule is already loaded. It should only be imported in your application's main module.")}static forRoot(e){return{ngModule:r,providers:[{provide:x,useClass:R,multi:!0},e.jwtOptionsProvider||{provide:g,useValue:e.config},m]}}}return r.\u0275fac=function(e){return new(e||r)(l(r,12))},r.\u0275mod=I({type:r}),r.\u0275inj=E({}),r})();var k=O(_(),1);var q=(()=>{class r{$api=f(S);$jwtHelper=f(m);$settings=f(D);token;user={};logoutTimer;constructor(){this.loadToken()}login(e){return a(this,null,function*(){let t=yield d(this.$api.post("/auth/login",e));if(!this.validateToken(t.access_token))throw new Error("Invalid username or password.");window.localStorage.setItem(c.jwt.tokenKey,t.access_token),yield this.$settings.getAppSettings()})}noauth(){return a(this,null,function*(){let e=yield d(this.$api.post("/auth/noauth",{}));if(this.validateToken(e.access_token))window.localStorage.setItem(c.jwt.tokenKey,e.access_token),yield this.$settings.getAppSettings();else throw new Error("Invalid username or password.")})}logout(){this.user=null,this.token=null,window.localStorage.removeItem(c.jwt.tokenKey),window.location.reload()}loadToken(){return a(this,null,function*(){this.$settings.settingsLoaded||(yield d(this.$settings.onSettingsLoaded));let e=window.localStorage.getItem(c.jwt.tokenKey);e&&this.validateToken(e)})}checkToken(){return a(this,null,function*(){try{return yield d(this.$api.get("/auth/check"))}catch(e){e.status===401&&(console.error("Current token is not valid"),this.logout())}})}isLoggedIn(){return this.$settings.env.instanceId!==this.user.instanceId?(console.error("Token does not match instance"),!1):this.user&&this.token&&!this.$jwtHelper.isTokenExpired(this.token,this.$settings.serverTimeOffset)}validateToken(e){try{return this.$jwtHelper.isTokenExpired(e,this.$settings.serverTimeOffset)&&this.logout(),this.user=this.$jwtHelper.decodeToken(e),this.token=e,this.setLogoutTimer(),!0}catch{return window.localStorage.removeItem(c.jwt.tokenKey),this.token=null,!1}}setLogoutTimer(){if(clearTimeout(this.logoutTimer),!this.$jwtHelper.isTokenExpired(this.token,this.$settings.serverTimeOffset)){let t=(0,k.default)(this.$jwtHelper.getTokenExpirationDate(this.token)).diff((0,k.default)().add(this.$settings.serverTimeOffset,"s"),"millisecond");t<=2147483647&&(this.logoutTimer=setTimeout(()=>a(this,null,function*(){this.$settings.formAuth===!1?(yield this.noauth(),window.location.reload()):this.logout()}),t))}}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac})}return r})();export{F as a,q as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as n}from"./chunk-UOLP7IQJ.js";import{b as s}from"./chunk-
|
|
1
|
+
import{d as n}from"./chunk-UOLP7IQJ.js";import{b as s}from"./chunk-DOUHWAMX.js";import{fa as o,h as r,ka as e,w as i}from"./chunk-H36QJYLQ.js";var l=(()=>{class t{$router=e(n);$settings=e(s);canActivate(){return r(this,null,function*(){return this.$settings.settingsLoaded||(yield i(this.$settings.onSettingsLoaded)),this.$settings.env.setupWizardComplete===!1||this.$router.navigate(["/"]),!0})}static \u0275fac=function(a){return new(a||t)};static \u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{l as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
1
|
+
import{a as n}from"./chunk-MJD7XNRM.js";import{g as i}from"./chunk-UOLP7IQJ.js";import"./chunk-DOUHWAMX.js";import"./chunk-3OGGH4IS.js";import"./chunk-G7FA4DP4.js";import"./chunk-6GMXEQVA.js";import{ga as o,nb as r}from"./chunk-H36QJYLQ.js";var a=[{path:"",loadComponent:()=>import("./chunk-HRWXFYIE.js").then(t=>t.SetupWizardComponent)}],u=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=r({type:t});static \u0275inj=o({imports:[i.forChild(a),i]})}return t})();var l=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=r({type:t});static \u0275inj=o({providers:[n],imports:[u]})}return t})();export{l as SetupWizardModule};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Gv}from"./chunk-BYKIXKPO.js";import{a as xm,c as Vv,d as Kv,e as un,f as qs,g as _U}from"./chunk-GWXZ52WY.js";import{a as Mv}from"./chunk-BSUFNH7A.js";import{a as qv}from"./chunk-77JZBWAC.js";import{a as Lv}from"./chunk-UGMDVR5V.js";import{a as Uv,b as Fv,c as Ov}from"./chunk-AE7VAWOU.js";import{a as Pa}from"./chunk-V2P2FPJ7.js";import{a as $v}from"./chunk-BU65ZOCD.js";import{a as cd,b as gd}from"./chunk-YATJTZML.js";import{a as dd,b as ud}from"./chunk-ZHPB347D.js";import{a as Rv}from"./chunk-7OTNPUAL.js";import{a as sd,b as od,c as rd,d as nd,e as ad,f as ld,g as dn,m as zt,n as ei,o as jv,p as Nv,q as Dv,r as Bv,s as Ev,t as Ko}from"./chunk-RYEUSRBX.js";import{A as Av,B as Cs,C as Ta,a as Hv,b as Fo,c as kr,e as ci,f as Sv,h as Cv,i as xv,j as Iv,k as Tv,l as cs,m as Pv,o as zv,p as Oo,s as cn,t as qo,u as Cm,v as Vo}from"./chunk-7BRVYYLY.js";import{a as Lo}from"./chunk-VY4A2U5R.js";import{d as Os}from"./chunk-UOLP7IQJ.js";import{b as jt}from"./chunk-WUPGTEQ4.js";import{k as mt,m as $o,n as ot}from"./chunk-C3MIVQCG.js";import{a as gt,b as At}from"./chunk-G7FA4DP4.js";import{d as kv}from"./chunk-6GMXEQVA.js";import{$ as Ca,$a as pv,Ac as bv,Bc as yv,Ca as Bo,Cc as ut,D as cv,Da as mv,Dc as Ss,Ec as wr,Fa as nn,Fc as as,Gc as ln,Hb as me,Ib as U,Jb as F,Jc as N,Kc as M,Lb as wi,Lc as Et,M as on,Mb as ki,Nb as Hi,Ob as I,Pb as y,Qb as b,Rb as E,Sb as Zc,Sc as Si,Tb as Qc,Tc as re,Ub as Xc,Uc as Ro,Vb as xa,Wb as Ia,Wc as vv,Xa as qe,Y as wm,_b as ae,a as ye,ab as p,b as nt,bc as Q,c as ov,cc as ed,dc as C,e as w,ea as dv,fa as Gi,fb as Yc,g as at,ga as rn,gb as uo,h as _e,hc as km,ia as uv,ib as br,ic as Hm,id as ls,ja as gv,jc as Sm,jd as Uo,k as rv,ka as q,kc as Eo,kd as li,lc as Mo,mb as we,mc as fv,n as Li,nb as an,nc as Hs,o as vm,ob as yr,oc as Fs,pb as _v,pc as fe,q as nv,qa as J,qc as A,ra as Z,rc as le,rd as id,sb as Ie,sc as ie,tc as vr,ub as hv,uc as td,v as av,vb as Jc,w as Re,x as lv,xc as lt,yc as ct,yd as wv,za as Wc,zc as dt}from"./chunk-H36QJYLQ.js";var tw=w(Ks=>{"use strict";Object.defineProperty(Ks,"__esModule",{value:!0});Ks.formatNames=Ks.fastFormats=Ks.fullFormats=void 0;function Vs(e,i){return{validate:e,compare:i}}Ks.fullFormats={date:Vs(Zv,zm),time:Vs(Tm(!0),Am),"date-time":Vs(Wv(!0),Xv),"iso-time":Vs(Tm(),Qv),"iso-date-time":Vs(Wv(),ew),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:wU,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:TU,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:kU,int32:{type:"number",validate:CU},int64:{type:"number",validate:xU},float:{type:"number",validate:Jv},double:{type:"number",validate:Jv},password:!0,binary:!0};Ks.fastFormats=nt(ye({},Ks.fullFormats),{date:Vs(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,zm),time:Vs(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Am),"date-time":Vs(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Xv),"iso-time":Vs(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Qv),"iso-date-time":Vs(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,ew),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i});Ks.formatNames=Object.keys(Ks.fullFormats);function hU(e){return e%4===0&&(e%100!==0||e%400===0)}var fU=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,bU=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Zv(e){let i=fU.exec(e);if(!i)return!1;let t=+i[1],s=+i[2],o=+i[3];return s>=1&&s<=12&&o>=1&&o<=(s===2&&hU(t)?29:bU[s])}function zm(e,i){if(e&&i)return e>i?1:e<i?-1:0}var Im=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Tm(e){return function(t){let s=Im.exec(t);if(!s)return!1;let o=+s[1],n=+s[2],l=+s[3],c=s[4],u=s[5]==="-"?-1:1,m=+(s[6]||0),_=+(s[7]||0);if(m>23||_>59||e&&!c)return!1;if(o<=23&&n<=59&&l<60)return!0;let f=n-_*u,S=o-m*u-(f<0?1:0);return(S===23||S===-1)&&(f===59||f===-1)&&l<61}}function Am(e,i){if(!(e&&i))return;let t=new Date("2020-01-01T"+e).valueOf(),s=new Date("2020-01-01T"+i).valueOf();if(t&&s)return t-s}function Qv(e,i){if(!(e&&i))return;let t=Im.exec(e),s=Im.exec(i);if(t&&s)return e=t[1]+t[2]+t[3],i=s[1]+s[2]+s[3],e>i?1:e<i?-1:0}var Pm=/t|\s/i;function Wv(e){let i=Tm(e);return function(s){let o=s.split(Pm);return o.length===2&&Zv(o[0])&&i(o[1])}}function Xv(e,i){if(!(e&&i))return;let t=new Date(e).valueOf(),s=new Date(i).valueOf();if(t&&s)return t-s}function ew(e,i){if(!(e&&i))return;let[t,s]=e.split(Pm),[o,n]=i.split(Pm),l=zm(t,o);if(l!==void 0)return l||Am(s,n)}var yU=/\/|:/,vU=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function wU(e){return yU.test(e)&&vU.test(e)}var Yv=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function kU(e){return Yv.lastIndex=0,Yv.test(e)}var HU=-(2**31),SU=2**31-1;function CU(e){return Number.isInteger(e)&&e<=SU&&e>=HU}function xU(e){return Number.isInteger(e)}function Jv(){return!0}var IU=/[^\\]\\Z/;function TU(e){if(IU.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var ja=w(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.regexpCode=Xe.getEsmExportName=Xe.getProperty=Xe.safeStringify=Xe.stringify=Xe.strConcat=Xe.addCodeArg=Xe.str=Xe._=Xe.nil=Xe._Code=Xe.Name=Xe.IDENTIFIER=Xe._CodeOrName=void 0;var za=class{};Xe._CodeOrName=za;Xe.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Hr=class extends za{constructor(i){if(super(),!Xe.IDENTIFIER.test(i))throw new Error("CodeGen: name must be a valid identifier");this.str=i}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};Xe.Name=Hr;var ds=class extends za{constructor(i){super(),this._items=typeof i=="string"?[i]:i}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let i=this._items[0];return i===""||i==='""'}get str(){var i;return(i=this._str)!==null&&i!==void 0?i:this._str=this._items.reduce((t,s)=>`${t}${s}`,"")}get names(){var i;return(i=this._names)!==null&&i!==void 0?i:this._names=this._items.reduce((t,s)=>(s instanceof Hr&&(t[s.str]=(t[s.str]||0)+1),t),{})}};Xe._Code=ds;Xe.nil=new ds("");function iw(e,...i){let t=[e[0]],s=0;for(;s<i.length;)Nm(t,i[s]),t.push(e[++s]);return new ds(t)}Xe._=iw;var jm=new ds("+");function sw(e,...i){let t=[Aa(e[0])],s=0;for(;s<i.length;)t.push(jm),Nm(t,i[s]),t.push(jm,Aa(e[++s]));return PU(t),new ds(t)}Xe.str=sw;function Nm(e,i){i instanceof ds?e.push(...i._items):i instanceof Hr?e.push(i):e.push(jU(i))}Xe.addCodeArg=Nm;function PU(e){let i=1;for(;i<e.length-1;){if(e[i]===jm){let t=zU(e[i-1],e[i+1]);if(t!==void 0){e.splice(i-1,3,t);continue}e[i++]="+"}i++}}function zU(e,i){if(i==='""')return e;if(e==='""')return i;if(typeof e=="string")return i instanceof Hr||e[e.length-1]!=='"'?void 0:typeof i!="string"?`${e.slice(0,-1)}${i}"`:i[0]==='"'?e.slice(0,-1)+i.slice(1):void 0;if(typeof i=="string"&&i[0]==='"'&&!(e instanceof Hr))return`"${e}${i.slice(1)}`}function AU(e,i){return i.emptyStr()?e:e.emptyStr()?i:sw`${e}${i}`}Xe.strConcat=AU;function jU(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Aa(Array.isArray(e)?e.join(","):e)}function NU(e){return new ds(Aa(e))}Xe.stringify=NU;function Aa(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Xe.safeStringify=Aa;function DU(e){return typeof e=="string"&&Xe.IDENTIFIER.test(e)?new ds(`.${e}`):iw`[${e}]`}Xe.getProperty=DU;function BU(e){if(typeof e=="string"&&Xe.IDENTIFIER.test(e))return new ds(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}Xe.getEsmExportName=BU;function EU(e){return new ds(e.toString())}Xe.regexpCode=EU});var Em=w(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});Ni.ValueScope=Ni.ValueScopeName=Ni.Scope=Ni.varKinds=Ni.UsedValueState=void 0;var ji=ja(),Dm=class extends Error{constructor(i){super(`CodeGen: "code" for ${i} not defined`),this.value=i.value}},md=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(md||(Ni.UsedValueState=md={}));Ni.varKinds={const:new ji.Name("const"),let:new ji.Name("let"),var:new ji.Name("var")};var pd=class{constructor({prefixes:i,parent:t}={}){this._names={},this._prefixes=i,this._parent=t}toName(i){return i instanceof ji.Name?i:this.name(i)}name(i){return new ji.Name(this._newName(i))}_newName(i){let t=this._names[i]||this._nameGroup(i);return`${i}${t.index++}`}_nameGroup(i){var t,s;if(!((s=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||s===void 0)&&s.has(i)||this._prefixes&&!this._prefixes.has(i))throw new Error(`CodeGen: prefix "${i}" is not allowed in this scope`);return this._names[i]={prefix:i,index:0}}};Ni.Scope=pd;var _d=class extends ji.Name{constructor(i,t){super(t),this.prefix=i}setValue(i,{property:t,itemIndex:s}){this.value=i,this.scopePath=(0,ji._)`.${new ji.Name(t)}[${s}]`}};Ni.ValueScopeName=_d;var MU=(0,ji._)`\n`,Bm=class extends pd{constructor(i){super(i),this._values={},this._scope=i.scope,this.opts=nt(ye({},i),{_n:i.lines?MU:ji.nil})}get(){return this._scope}name(i){return new _d(i,this._newName(i))}value(i,t){var s;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let o=this.toName(i),{prefix:n}=o,l=(s=t.key)!==null&&s!==void 0?s:t.ref,c=this._values[n];if(c){let _=c.get(l);if(_)return _}else c=this._values[n]=new Map;c.set(l,o);let u=this._scope[n]||(this._scope[n]=[]),m=u.length;return u[m]=t.ref,o.setValue(t,{property:n,itemIndex:m}),o}getValue(i,t){let s=this._values[i];if(s)return s.get(t)}scopeRefs(i,t=this._values){return this._reduceValues(t,s=>{if(s.scopePath===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return(0,ji._)`${i}${s.scopePath}`})}scopeCode(i=this._values,t,s){return this._reduceValues(i,o=>{if(o.value===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return o.value.code},t,s)}_reduceValues(i,t,s={},o){let n=ji.nil;for(let l in i){let c=i[l];if(!c)continue;let u=s[l]=s[l]||new Map;c.forEach(m=>{if(u.has(m))return;u.set(m,md.Started);let _=t(m);if(_){let f=this.opts.es5?Ni.varKinds.var:Ni.varKinds.const;n=(0,ji._)`${n}${f} ${m} = ${_};${this.opts._n}`}else if(_=o?.(m))n=(0,ji._)`${n}${_}${this.opts._n}`;else throw new Dm(m);u.set(m,md.Completed)})}return n}};Ni.ValueScope=Bm});var ke=w(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.or=Oe.and=Oe.not=Oe.CodeGen=Oe.operators=Oe.varKinds=Oe.ValueScopeName=Oe.ValueScope=Oe.Scope=Oe.Name=Oe.regexpCode=Oe.stringify=Oe.getProperty=Oe.nil=Oe.strConcat=Oe.str=Oe._=void 0;var Je=ja(),xs=Em(),Go=ja();Object.defineProperty(Oe,"_",{enumerable:!0,get:function(){return Go._}});Object.defineProperty(Oe,"str",{enumerable:!0,get:function(){return Go.str}});Object.defineProperty(Oe,"strConcat",{enumerable:!0,get:function(){return Go.strConcat}});Object.defineProperty(Oe,"nil",{enumerable:!0,get:function(){return Go.nil}});Object.defineProperty(Oe,"getProperty",{enumerable:!0,get:function(){return Go.getProperty}});Object.defineProperty(Oe,"stringify",{enumerable:!0,get:function(){return Go.stringify}});Object.defineProperty(Oe,"regexpCode",{enumerable:!0,get:function(){return Go.regexpCode}});Object.defineProperty(Oe,"Name",{enumerable:!0,get:function(){return Go.Name}});var vd=Em();Object.defineProperty(Oe,"Scope",{enumerable:!0,get:function(){return vd.Scope}});Object.defineProperty(Oe,"ValueScope",{enumerable:!0,get:function(){return vd.ValueScope}});Object.defineProperty(Oe,"ValueScopeName",{enumerable:!0,get:function(){return vd.ValueScopeName}});Object.defineProperty(Oe,"varKinds",{enumerable:!0,get:function(){return vd.varKinds}});Oe.operators={GT:new Je._Code(">"),GTE:new Je._Code(">="),LT:new Je._Code("<"),LTE:new Je._Code("<="),EQ:new Je._Code("==="),NEQ:new Je._Code("!=="),NOT:new Je._Code("!"),OR:new Je._Code("||"),AND:new Je._Code("&&"),ADD:new Je._Code("+")};var go=class{optimizeNodes(){return this}optimizeNames(i,t){return this}},Mm=class extends go{constructor(i,t,s){super(),this.varKind=i,this.name=t,this.rhs=s}render({es5:i,_n:t}){let s=i?xs.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${o};`+t}optimizeNames(i,t){if(i[this.name.str])return this.rhs&&(this.rhs=gn(this.rhs,i,t)),this}get names(){return this.rhs instanceof Je._CodeOrName?this.rhs.names:{}}},fd=class extends go{constructor(i,t,s){super(),this.lhs=i,this.rhs=t,this.sideEffects=s}render({_n:i}){return`${this.lhs} = ${this.rhs};`+i}optimizeNames(i,t){if(!(this.lhs instanceof Je.Name&&!i[this.lhs.str]&&!this.sideEffects))return this.rhs=gn(this.rhs,i,t),this}get names(){let i=this.lhs instanceof Je.Name?{}:ye({},this.lhs.names);return yd(i,this.rhs)}},Rm=class extends fd{constructor(i,t,s,o){super(i,s,o),this.op=t}render({_n:i}){return`${this.lhs} ${this.op}= ${this.rhs};`+i}},Um=class extends go{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`${this.label}:`+i}},Fm=class extends go{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`break${this.label?` ${this.label}`:""};`+i}},Om=class extends go{constructor(i){super(),this.error=i}render({_n:i}){return`throw ${this.error};`+i}get names(){return this.error.names}},qm=class extends go{constructor(i){super(),this.code=i}render({_n:i}){return`${this.code};`+i}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(i,t){return this.code=gn(this.code,i,t),this}get names(){return this.code instanceof Je._CodeOrName?this.code.names:{}}},Na=class extends go{constructor(i=[]){super(),this.nodes=i}render(i){return this.nodes.reduce((t,s)=>t+s.render(i),"")}optimizeNodes(){let{nodes:i}=this,t=i.length;for(;t--;){let s=i[t].optimizeNodes();Array.isArray(s)?i.splice(t,1,...s):s?i[t]=s:i.splice(t,1)}return i.length>0?this:void 0}optimizeNames(i,t){let{nodes:s}=this,o=s.length;for(;o--;){let n=s[o];n.optimizeNames(i,t)||(RU(i,n.names),s.splice(o,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((i,t)=>Sr(i,t.names),{})}},mo=class extends Na{render(i){return"{"+i._n+super.render(i)+"}"+i._n}},Vm=class extends Na{},Km=(()=>{class e extends mo{}return e.kind="else",e})(),hd=(()=>{class e extends mo{constructor(t,s){super(s),this.condition=t}render(t){let s=`if(${this.condition})`+super.render(t);return this.else&&(s+="else "+this.else.render(t)),s}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let s=this.else;if(s){let o=s.optimizeNodes();s=this.else=Array.isArray(o)?new Km(o):o}if(s)return t===!1?s instanceof e?s:s.nodes:this.nodes.length?this:new e(lw(t),s instanceof e?[s]:s.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,s){var o;if(this.else=(o=this.else)===null||o===void 0?void 0:o.optimizeNames(t,s),!!(super.optimizeNames(t,s)||this.else))return this.condition=gn(this.condition,t,s),this}get names(){let t=super.names;return yd(t,this.condition),this.else&&Sr(t,this.else.names),t}}return e.kind="if",e})(),wd=(()=>{class e extends mo{}return e.kind="for",e})(),$m=class extends wd{constructor(i){super(),this.iteration=i}render(i){return`for(${this.iteration})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iteration=gn(this.iteration,i,t),this}get names(){return Sr(super.names,this.iteration.names)}},Lm=class extends wd{constructor(i,t,s,o){super(),this.varKind=i,this.name=t,this.from=s,this.to=o}render(i){let t=i.es5?xs.varKinds.var:this.varKind,{name:s,from:o,to:n}=this;return`for(${t} ${s}=${o}; ${s}<${n}; ${s}++)`+super.render(i)}get names(){let i=yd(super.names,this.from);return yd(i,this.to)}},bd=class extends wd{constructor(i,t,s,o){super(),this.loop=i,this.varKind=t,this.name=s,this.iterable=o}render(i){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iterable=gn(this.iterable,i,t),this}get names(){return Sr(super.names,this.iterable.names)}},ow=(()=>{class e extends mo{constructor(t,s,o){super(),this.name=t,this.args=s,this.async=o}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),rw=(()=>{class e extends Na{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Gm=class extends mo{render(i){let t="try"+super.render(i);return this.catch&&(t+=this.catch.render(i)),this.finally&&(t+=this.finally.render(i)),t}optimizeNodes(){var i,t;return super.optimizeNodes(),(i=this.catch)===null||i===void 0||i.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(i,t){var s,o;return super.optimizeNames(i,t),(s=this.catch)===null||s===void 0||s.optimizeNames(i,t),(o=this.finally)===null||o===void 0||o.optimizeNames(i,t),this}get names(){let i=super.names;return this.catch&&Sr(i,this.catch.names),this.finally&&Sr(i,this.finally.names),i}},nw=(()=>{class e extends mo{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),aw=(()=>{class e extends mo{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),Wm=class{constructor(i,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=nt(ye({},t),{_n:t.lines?`
|
|
1
|
+
import{a as Gv}from"./chunk-ZZDKJB6X.js";import{a as xm,c as Vv,d as Kv,e as un,f as qs,g as _U}from"./chunk-DOEOGSBK.js";import{a as Mv}from"./chunk-BSUFNH7A.js";import{a as qv}from"./chunk-77JZBWAC.js";import{a as Lv}from"./chunk-FUCI6T5W.js";import{a as Uv,b as Fv,c as Ov}from"./chunk-AE7VAWOU.js";import{a as Pa}from"./chunk-V2P2FPJ7.js";import{a as $v}from"./chunk-BU65ZOCD.js";import{a as cd,b as gd}from"./chunk-YATJTZML.js";import{a as dd,b as ud}from"./chunk-ZHPB347D.js";import{a as Rv}from"./chunk-7OTNPUAL.js";import{a as sd,b as od,c as rd,d as nd,e as ad,f as ld,g as dn,m as zt,n as ei,o as jv,p as Nv,q as Dv,r as Bv,s as Ev,t as Ko}from"./chunk-RYEUSRBX.js";import{A as Av,B as Cs,C as Ta,a as Hv,b as Fo,c as kr,e as ci,f as Sv,h as Cv,i as xv,j as Iv,k as Tv,l as cs,m as Pv,o as zv,p as Oo,s as cn,t as qo,u as Cm,v as Vo}from"./chunk-7BRVYYLY.js";import{a as Lo}from"./chunk-HHEVRKFK.js";import{d as Os}from"./chunk-UOLP7IQJ.js";import{b as jt}from"./chunk-DOUHWAMX.js";import{k as mt,m as $o,n as ot}from"./chunk-3OGGH4IS.js";import{a as gt,b as At}from"./chunk-G7FA4DP4.js";import{d as kv}from"./chunk-6GMXEQVA.js";import{$ as Ca,$a as pv,Ac as bv,Bc as yv,Ca as Bo,Cc as ut,D as cv,Da as mv,Dc as Ss,Ec as wr,Fa as nn,Fc as as,Gc as ln,Hb as me,Ib as U,Jb as F,Jc as N,Kc as M,Lb as wi,Lc as Et,M as on,Mb as ki,Nb as Hi,Ob as I,Pb as y,Qb as b,Rb as E,Sb as Zc,Sc as Si,Tb as Qc,Tc as re,Ub as Xc,Uc as Ro,Vb as xa,Wb as Ia,Wc as vv,Xa as qe,Y as wm,_b as ae,a as ye,ab as p,b as nt,bc as Q,c as ov,cc as ed,dc as C,e as w,ea as dv,fa as Gi,fb as Yc,g as at,ga as rn,gb as uo,h as _e,hc as km,ia as uv,ib as br,ic as Hm,id as ls,ja as gv,jc as Sm,jd as Uo,k as rv,ka as q,kc as Eo,kd as li,lc as Mo,mb as we,mc as fv,n as Li,nb as an,nc as Hs,o as vm,ob as yr,oc as Fs,pb as _v,pc as fe,q as nv,qa as J,qc as A,ra as Z,rc as le,rd as id,sb as Ie,sc as ie,tc as vr,ub as hv,uc as td,v as av,vb as Jc,w as Re,x as lv,xc as lt,yc as ct,yd as wv,za as Wc,zc as dt}from"./chunk-H36QJYLQ.js";var tw=w(Ks=>{"use strict";Object.defineProperty(Ks,"__esModule",{value:!0});Ks.formatNames=Ks.fastFormats=Ks.fullFormats=void 0;function Vs(e,i){return{validate:e,compare:i}}Ks.fullFormats={date:Vs(Zv,zm),time:Vs(Tm(!0),Am),"date-time":Vs(Wv(!0),Xv),"iso-time":Vs(Tm(),Qv),"iso-date-time":Vs(Wv(),ew),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:wU,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:TU,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:kU,int32:{type:"number",validate:CU},int64:{type:"number",validate:xU},float:{type:"number",validate:Jv},double:{type:"number",validate:Jv},password:!0,binary:!0};Ks.fastFormats=nt(ye({},Ks.fullFormats),{date:Vs(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,zm),time:Vs(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Am),"date-time":Vs(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Xv),"iso-time":Vs(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Qv),"iso-date-time":Vs(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,ew),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i});Ks.formatNames=Object.keys(Ks.fullFormats);function hU(e){return e%4===0&&(e%100!==0||e%400===0)}var fU=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,bU=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Zv(e){let i=fU.exec(e);if(!i)return!1;let t=+i[1],s=+i[2],o=+i[3];return s>=1&&s<=12&&o>=1&&o<=(s===2&&hU(t)?29:bU[s])}function zm(e,i){if(e&&i)return e>i?1:e<i?-1:0}var Im=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Tm(e){return function(t){let s=Im.exec(t);if(!s)return!1;let o=+s[1],n=+s[2],l=+s[3],c=s[4],u=s[5]==="-"?-1:1,m=+(s[6]||0),_=+(s[7]||0);if(m>23||_>59||e&&!c)return!1;if(o<=23&&n<=59&&l<60)return!0;let f=n-_*u,S=o-m*u-(f<0?1:0);return(S===23||S===-1)&&(f===59||f===-1)&&l<61}}function Am(e,i){if(!(e&&i))return;let t=new Date("2020-01-01T"+e).valueOf(),s=new Date("2020-01-01T"+i).valueOf();if(t&&s)return t-s}function Qv(e,i){if(!(e&&i))return;let t=Im.exec(e),s=Im.exec(i);if(t&&s)return e=t[1]+t[2]+t[3],i=s[1]+s[2]+s[3],e>i?1:e<i?-1:0}var Pm=/t|\s/i;function Wv(e){let i=Tm(e);return function(s){let o=s.split(Pm);return o.length===2&&Zv(o[0])&&i(o[1])}}function Xv(e,i){if(!(e&&i))return;let t=new Date(e).valueOf(),s=new Date(i).valueOf();if(t&&s)return t-s}function ew(e,i){if(!(e&&i))return;let[t,s]=e.split(Pm),[o,n]=i.split(Pm),l=zm(t,o);if(l!==void 0)return l||Am(s,n)}var yU=/\/|:/,vU=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function wU(e){return yU.test(e)&&vU.test(e)}var Yv=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function kU(e){return Yv.lastIndex=0,Yv.test(e)}var HU=-(2**31),SU=2**31-1;function CU(e){return Number.isInteger(e)&&e<=SU&&e>=HU}function xU(e){return Number.isInteger(e)}function Jv(){return!0}var IU=/[^\\]\\Z/;function TU(e){if(IU.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var ja=w(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.regexpCode=Xe.getEsmExportName=Xe.getProperty=Xe.safeStringify=Xe.stringify=Xe.strConcat=Xe.addCodeArg=Xe.str=Xe._=Xe.nil=Xe._Code=Xe.Name=Xe.IDENTIFIER=Xe._CodeOrName=void 0;var za=class{};Xe._CodeOrName=za;Xe.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Hr=class extends za{constructor(i){if(super(),!Xe.IDENTIFIER.test(i))throw new Error("CodeGen: name must be a valid identifier");this.str=i}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};Xe.Name=Hr;var ds=class extends za{constructor(i){super(),this._items=typeof i=="string"?[i]:i}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let i=this._items[0];return i===""||i==='""'}get str(){var i;return(i=this._str)!==null&&i!==void 0?i:this._str=this._items.reduce((t,s)=>`${t}${s}`,"")}get names(){var i;return(i=this._names)!==null&&i!==void 0?i:this._names=this._items.reduce((t,s)=>(s instanceof Hr&&(t[s.str]=(t[s.str]||0)+1),t),{})}};Xe._Code=ds;Xe.nil=new ds("");function iw(e,...i){let t=[e[0]],s=0;for(;s<i.length;)Nm(t,i[s]),t.push(e[++s]);return new ds(t)}Xe._=iw;var jm=new ds("+");function sw(e,...i){let t=[Aa(e[0])],s=0;for(;s<i.length;)t.push(jm),Nm(t,i[s]),t.push(jm,Aa(e[++s]));return PU(t),new ds(t)}Xe.str=sw;function Nm(e,i){i instanceof ds?e.push(...i._items):i instanceof Hr?e.push(i):e.push(jU(i))}Xe.addCodeArg=Nm;function PU(e){let i=1;for(;i<e.length-1;){if(e[i]===jm){let t=zU(e[i-1],e[i+1]);if(t!==void 0){e.splice(i-1,3,t);continue}e[i++]="+"}i++}}function zU(e,i){if(i==='""')return e;if(e==='""')return i;if(typeof e=="string")return i instanceof Hr||e[e.length-1]!=='"'?void 0:typeof i!="string"?`${e.slice(0,-1)}${i}"`:i[0]==='"'?e.slice(0,-1)+i.slice(1):void 0;if(typeof i=="string"&&i[0]==='"'&&!(e instanceof Hr))return`"${e}${i.slice(1)}`}function AU(e,i){return i.emptyStr()?e:e.emptyStr()?i:sw`${e}${i}`}Xe.strConcat=AU;function jU(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Aa(Array.isArray(e)?e.join(","):e)}function NU(e){return new ds(Aa(e))}Xe.stringify=NU;function Aa(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Xe.safeStringify=Aa;function DU(e){return typeof e=="string"&&Xe.IDENTIFIER.test(e)?new ds(`.${e}`):iw`[${e}]`}Xe.getProperty=DU;function BU(e){if(typeof e=="string"&&Xe.IDENTIFIER.test(e))return new ds(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}Xe.getEsmExportName=BU;function EU(e){return new ds(e.toString())}Xe.regexpCode=EU});var Em=w(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});Ni.ValueScope=Ni.ValueScopeName=Ni.Scope=Ni.varKinds=Ni.UsedValueState=void 0;var ji=ja(),Dm=class extends Error{constructor(i){super(`CodeGen: "code" for ${i} not defined`),this.value=i.value}},md=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(md||(Ni.UsedValueState=md={}));Ni.varKinds={const:new ji.Name("const"),let:new ji.Name("let"),var:new ji.Name("var")};var pd=class{constructor({prefixes:i,parent:t}={}){this._names={},this._prefixes=i,this._parent=t}toName(i){return i instanceof ji.Name?i:this.name(i)}name(i){return new ji.Name(this._newName(i))}_newName(i){let t=this._names[i]||this._nameGroup(i);return`${i}${t.index++}`}_nameGroup(i){var t,s;if(!((s=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||s===void 0)&&s.has(i)||this._prefixes&&!this._prefixes.has(i))throw new Error(`CodeGen: prefix "${i}" is not allowed in this scope`);return this._names[i]={prefix:i,index:0}}};Ni.Scope=pd;var _d=class extends ji.Name{constructor(i,t){super(t),this.prefix=i}setValue(i,{property:t,itemIndex:s}){this.value=i,this.scopePath=(0,ji._)`.${new ji.Name(t)}[${s}]`}};Ni.ValueScopeName=_d;var MU=(0,ji._)`\n`,Bm=class extends pd{constructor(i){super(i),this._values={},this._scope=i.scope,this.opts=nt(ye({},i),{_n:i.lines?MU:ji.nil})}get(){return this._scope}name(i){return new _d(i,this._newName(i))}value(i,t){var s;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let o=this.toName(i),{prefix:n}=o,l=(s=t.key)!==null&&s!==void 0?s:t.ref,c=this._values[n];if(c){let _=c.get(l);if(_)return _}else c=this._values[n]=new Map;c.set(l,o);let u=this._scope[n]||(this._scope[n]=[]),m=u.length;return u[m]=t.ref,o.setValue(t,{property:n,itemIndex:m}),o}getValue(i,t){let s=this._values[i];if(s)return s.get(t)}scopeRefs(i,t=this._values){return this._reduceValues(t,s=>{if(s.scopePath===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return(0,ji._)`${i}${s.scopePath}`})}scopeCode(i=this._values,t,s){return this._reduceValues(i,o=>{if(o.value===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return o.value.code},t,s)}_reduceValues(i,t,s={},o){let n=ji.nil;for(let l in i){let c=i[l];if(!c)continue;let u=s[l]=s[l]||new Map;c.forEach(m=>{if(u.has(m))return;u.set(m,md.Started);let _=t(m);if(_){let f=this.opts.es5?Ni.varKinds.var:Ni.varKinds.const;n=(0,ji._)`${n}${f} ${m} = ${_};${this.opts._n}`}else if(_=o?.(m))n=(0,ji._)`${n}${_}${this.opts._n}`;else throw new Dm(m);u.set(m,md.Completed)})}return n}};Ni.ValueScope=Bm});var ke=w(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.or=Oe.and=Oe.not=Oe.CodeGen=Oe.operators=Oe.varKinds=Oe.ValueScopeName=Oe.ValueScope=Oe.Scope=Oe.Name=Oe.regexpCode=Oe.stringify=Oe.getProperty=Oe.nil=Oe.strConcat=Oe.str=Oe._=void 0;var Je=ja(),xs=Em(),Go=ja();Object.defineProperty(Oe,"_",{enumerable:!0,get:function(){return Go._}});Object.defineProperty(Oe,"str",{enumerable:!0,get:function(){return Go.str}});Object.defineProperty(Oe,"strConcat",{enumerable:!0,get:function(){return Go.strConcat}});Object.defineProperty(Oe,"nil",{enumerable:!0,get:function(){return Go.nil}});Object.defineProperty(Oe,"getProperty",{enumerable:!0,get:function(){return Go.getProperty}});Object.defineProperty(Oe,"stringify",{enumerable:!0,get:function(){return Go.stringify}});Object.defineProperty(Oe,"regexpCode",{enumerable:!0,get:function(){return Go.regexpCode}});Object.defineProperty(Oe,"Name",{enumerable:!0,get:function(){return Go.Name}});var vd=Em();Object.defineProperty(Oe,"Scope",{enumerable:!0,get:function(){return vd.Scope}});Object.defineProperty(Oe,"ValueScope",{enumerable:!0,get:function(){return vd.ValueScope}});Object.defineProperty(Oe,"ValueScopeName",{enumerable:!0,get:function(){return vd.ValueScopeName}});Object.defineProperty(Oe,"varKinds",{enumerable:!0,get:function(){return vd.varKinds}});Oe.operators={GT:new Je._Code(">"),GTE:new Je._Code(">="),LT:new Je._Code("<"),LTE:new Je._Code("<="),EQ:new Je._Code("==="),NEQ:new Je._Code("!=="),NOT:new Je._Code("!"),OR:new Je._Code("||"),AND:new Je._Code("&&"),ADD:new Je._Code("+")};var go=class{optimizeNodes(){return this}optimizeNames(i,t){return this}},Mm=class extends go{constructor(i,t,s){super(),this.varKind=i,this.name=t,this.rhs=s}render({es5:i,_n:t}){let s=i?xs.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${o};`+t}optimizeNames(i,t){if(i[this.name.str])return this.rhs&&(this.rhs=gn(this.rhs,i,t)),this}get names(){return this.rhs instanceof Je._CodeOrName?this.rhs.names:{}}},fd=class extends go{constructor(i,t,s){super(),this.lhs=i,this.rhs=t,this.sideEffects=s}render({_n:i}){return`${this.lhs} = ${this.rhs};`+i}optimizeNames(i,t){if(!(this.lhs instanceof Je.Name&&!i[this.lhs.str]&&!this.sideEffects))return this.rhs=gn(this.rhs,i,t),this}get names(){let i=this.lhs instanceof Je.Name?{}:ye({},this.lhs.names);return yd(i,this.rhs)}},Rm=class extends fd{constructor(i,t,s,o){super(i,s,o),this.op=t}render({_n:i}){return`${this.lhs} ${this.op}= ${this.rhs};`+i}},Um=class extends go{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`${this.label}:`+i}},Fm=class extends go{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`break${this.label?` ${this.label}`:""};`+i}},Om=class extends go{constructor(i){super(),this.error=i}render({_n:i}){return`throw ${this.error};`+i}get names(){return this.error.names}},qm=class extends go{constructor(i){super(),this.code=i}render({_n:i}){return`${this.code};`+i}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(i,t){return this.code=gn(this.code,i,t),this}get names(){return this.code instanceof Je._CodeOrName?this.code.names:{}}},Na=class extends go{constructor(i=[]){super(),this.nodes=i}render(i){return this.nodes.reduce((t,s)=>t+s.render(i),"")}optimizeNodes(){let{nodes:i}=this,t=i.length;for(;t--;){let s=i[t].optimizeNodes();Array.isArray(s)?i.splice(t,1,...s):s?i[t]=s:i.splice(t,1)}return i.length>0?this:void 0}optimizeNames(i,t){let{nodes:s}=this,o=s.length;for(;o--;){let n=s[o];n.optimizeNames(i,t)||(RU(i,n.names),s.splice(o,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((i,t)=>Sr(i,t.names),{})}},mo=class extends Na{render(i){return"{"+i._n+super.render(i)+"}"+i._n}},Vm=class extends Na{},Km=(()=>{class e extends mo{}return e.kind="else",e})(),hd=(()=>{class e extends mo{constructor(t,s){super(s),this.condition=t}render(t){let s=`if(${this.condition})`+super.render(t);return this.else&&(s+="else "+this.else.render(t)),s}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let s=this.else;if(s){let o=s.optimizeNodes();s=this.else=Array.isArray(o)?new Km(o):o}if(s)return t===!1?s instanceof e?s:s.nodes:this.nodes.length?this:new e(lw(t),s instanceof e?[s]:s.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,s){var o;if(this.else=(o=this.else)===null||o===void 0?void 0:o.optimizeNames(t,s),!!(super.optimizeNames(t,s)||this.else))return this.condition=gn(this.condition,t,s),this}get names(){let t=super.names;return yd(t,this.condition),this.else&&Sr(t,this.else.names),t}}return e.kind="if",e})(),wd=(()=>{class e extends mo{}return e.kind="for",e})(),$m=class extends wd{constructor(i){super(),this.iteration=i}render(i){return`for(${this.iteration})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iteration=gn(this.iteration,i,t),this}get names(){return Sr(super.names,this.iteration.names)}},Lm=class extends wd{constructor(i,t,s,o){super(),this.varKind=i,this.name=t,this.from=s,this.to=o}render(i){let t=i.es5?xs.varKinds.var:this.varKind,{name:s,from:o,to:n}=this;return`for(${t} ${s}=${o}; ${s}<${n}; ${s}++)`+super.render(i)}get names(){let i=yd(super.names,this.from);return yd(i,this.to)}},bd=class extends wd{constructor(i,t,s,o){super(),this.loop=i,this.varKind=t,this.name=s,this.iterable=o}render(i){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iterable=gn(this.iterable,i,t),this}get names(){return Sr(super.names,this.iterable.names)}},ow=(()=>{class e extends mo{constructor(t,s,o){super(),this.name=t,this.args=s,this.async=o}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),rw=(()=>{class e extends Na{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Gm=class extends mo{render(i){let t="try"+super.render(i);return this.catch&&(t+=this.catch.render(i)),this.finally&&(t+=this.finally.render(i)),t}optimizeNodes(){var i,t;return super.optimizeNodes(),(i=this.catch)===null||i===void 0||i.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(i,t){var s,o;return super.optimizeNames(i,t),(s=this.catch)===null||s===void 0||s.optimizeNames(i,t),(o=this.finally)===null||o===void 0||o.optimizeNames(i,t),this}get names(){let i=super.names;return this.catch&&Sr(i,this.catch.names),this.finally&&Sr(i,this.finally.names),i}},nw=(()=>{class e extends mo{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),aw=(()=>{class e extends mo{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),Wm=class{constructor(i,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=nt(ye({},t),{_n:t.lines?`
|
|
2
2
|
`:""}),this._extScope=i,this._scope=new xs.Scope({parent:i}),this._nodes=[new Vm]}toString(){return this._root.render(this.opts)}name(i){return this._scope.name(i)}scopeName(i){return this._extScope.name(i)}scopeValue(i,t){let s=this._extScope.value(i,t);return(this._values[s.prefix]||(this._values[s.prefix]=new Set)).add(s),s}getScopeValue(i,t){return this._extScope.getValue(i,t)}scopeRefs(i){return this._extScope.scopeRefs(i,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(i,t,s,o){let n=this._scope.toName(t);return s!==void 0&&o&&(this._constants[n.str]=s),this._leafNode(new Mm(i,n,s)),n}const(i,t,s){return this._def(xs.varKinds.const,i,t,s)}let(i,t,s){return this._def(xs.varKinds.let,i,t,s)}var(i,t,s){return this._def(xs.varKinds.var,i,t,s)}assign(i,t,s){return this._leafNode(new fd(i,t,s))}add(i,t){return this._leafNode(new Rm(i,Oe.operators.ADD,t))}code(i){return typeof i=="function"?i():i!==Je.nil&&this._leafNode(new qm(i)),this}object(...i){let t=["{"];for(let[s,o]of i)t.length>1&&t.push(","),t.push(s),(s!==o||this.opts.es5)&&(t.push(":"),(0,Je.addCodeArg)(t,o));return t.push("}"),new Je._Code(t)}if(i,t,s){if(this._blockNode(new hd(i)),t&&s)this.code(t).else().code(s).endIf();else if(t)this.code(t).endIf();else if(s)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(i){return this._elseNode(new hd(i))}else(){return this._elseNode(new Km)}endIf(){return this._endBlockNode(hd,Km)}_for(i,t){return this._blockNode(i),t&&this.code(t).endFor(),this}for(i,t){return this._for(new $m(i),t)}forRange(i,t,s,o,n=this.opts.es5?xs.varKinds.var:xs.varKinds.let){let l=this._scope.toName(i);return this._for(new Lm(n,l,t,s),()=>o(l))}forOf(i,t,s,o=xs.varKinds.const){let n=this._scope.toName(i);if(this.opts.es5){let l=t instanceof Je.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,Je._)`${l}.length`,c=>{this.var(n,(0,Je._)`${l}[${c}]`),s(n)})}return this._for(new bd("of",o,n,t),()=>s(n))}forIn(i,t,s,o=this.opts.es5?xs.varKinds.var:xs.varKinds.const){if(this.opts.ownProperties)return this.forOf(i,(0,Je._)`Object.keys(${t})`,s);let n=this._scope.toName(i);return this._for(new bd("in",o,n,t),()=>s(n))}endFor(){return this._endBlockNode(wd)}label(i){return this._leafNode(new Um(i))}break(i){return this._leafNode(new Fm(i))}return(i){let t=new rw;if(this._blockNode(t),this.code(i),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(rw)}try(i,t,s){if(!t&&!s)throw new Error('CodeGen: "try" without "catch" and "finally"');let o=new Gm;if(this._blockNode(o),this.code(i),t){let n=this.name("e");this._currNode=o.catch=new nw(n),t(n)}return s&&(this._currNode=o.finally=new aw,this.code(s)),this._endBlockNode(nw,aw)}throw(i){return this._leafNode(new Om(i))}block(i,t){return this._blockStarts.push(this._nodes.length),i&&this.code(i).endBlock(t),this}endBlock(i){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let s=this._nodes.length-t;if(s<0||i!==void 0&&s!==i)throw new Error(`CodeGen: wrong number of nodes: ${s} vs ${i} expected`);return this._nodes.length=t,this}func(i,t=Je.nil,s,o){return this._blockNode(new ow(i,t,s)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(ow)}optimize(i=1){for(;i-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(i){return this._currNode.nodes.push(i),this}_blockNode(i){this._currNode.nodes.push(i),this._nodes.push(i)}_endBlockNode(i,t){let s=this._currNode;if(s instanceof i||t&&s instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${i.kind}/${t.kind}`:i.kind}"`)}_elseNode(i){let t=this._currNode;if(!(t instanceof hd))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=i,this}get _root(){return this._nodes[0]}get _currNode(){let i=this._nodes;return i[i.length-1]}set _currNode(i){let t=this._nodes;t[t.length-1]=i}};Oe.CodeGen=Wm;function Sr(e,i){for(let t in i)e[t]=(e[t]||0)+(i[t]||0);return e}function yd(e,i){return i instanceof Je._CodeOrName?Sr(e,i.names):e}function gn(e,i,t){if(e instanceof Je.Name)return s(e);if(!o(e))return e;return new Je._Code(e._items.reduce((n,l)=>(l instanceof Je.Name&&(l=s(l)),l instanceof Je._Code?n.push(...l._items):n.push(l),n),[]));function s(n){let l=t[n.str];return l===void 0||i[n.str]!==1?n:(delete i[n.str],l)}function o(n){return n instanceof Je._Code&&n._items.some(l=>l instanceof Je.Name&&i[l.str]===1&&t[l.str]!==void 0)}}function RU(e,i){for(let t in i)e[t]=(e[t]||0)-(i[t]||0)}function lw(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,Je._)`!${Ym(e)}`}Oe.not=lw;var UU=cw(Oe.operators.AND);function FU(...e){return e.reduce(UU)}Oe.and=FU;var OU=cw(Oe.operators.OR);function qU(...e){return e.reduce(OU)}Oe.or=qU;function cw(e){return(i,t)=>i===Je.nil?t:t===Je.nil?i:(0,Je._)`${Ym(i)} ${e} ${Ym(t)}`}function Ym(e){return e instanceof Je.Name?e:(0,Je._)`(${e})`}});var $e=w(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.checkStrictMode=Ve.getErrorPath=Ve.Type=Ve.useFunc=Ve.setEvaluated=Ve.evaluatedPropsToName=Ve.mergeEvaluated=Ve.eachItem=Ve.unescapeJsonPointer=Ve.escapeJsonPointer=Ve.escapeFragment=Ve.unescapeFragment=Ve.schemaRefOrVal=Ve.schemaHasRulesButRef=Ve.schemaHasRules=Ve.checkUnknownRules=Ve.alwaysValidSchema=Ve.toHash=void 0;var ft=ke(),VU=ja();function KU(e){let i={};for(let t of e)i[t]=!0;return i}Ve.toHash=KU;function $U(e,i){return typeof i=="boolean"?i:Object.keys(i).length===0?!0:(gw(e,i),!mw(i,e.self.RULES.all))}Ve.alwaysValidSchema=$U;function gw(e,i=e.schema){let{opts:t,self:s}=e;if(!t.strictSchema||typeof i=="boolean")return;let o=s.RULES.keywords;for(let n in i)o[n]||hw(e,`unknown keyword: "${n}"`)}Ve.checkUnknownRules=gw;function mw(e,i){if(typeof e=="boolean")return!e;for(let t in e)if(i[t])return!0;return!1}Ve.schemaHasRules=mw;function LU(e,i){if(typeof e=="boolean")return!e;for(let t in e)if(t!=="$ref"&&i.all[t])return!0;return!1}Ve.schemaHasRulesButRef=LU;function GU({topSchemaRef:e,schemaPath:i},t,s,o){if(!o){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,ft._)`${t}`}return(0,ft._)`${e}${i}${(0,ft.getProperty)(s)}`}Ve.schemaRefOrVal=GU;function WU(e){return pw(decodeURIComponent(e))}Ve.unescapeFragment=WU;function YU(e){return encodeURIComponent(Zm(e))}Ve.escapeFragment=YU;function Zm(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}Ve.escapeJsonPointer=Zm;function pw(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}Ve.unescapeJsonPointer=pw;function JU(e,i){if(Array.isArray(e))for(let t of e)i(t);else i(e)}Ve.eachItem=JU;function dw({mergeNames:e,mergeToName:i,mergeValues:t,resultToName:s}){return(o,n,l,c)=>{let u=l===void 0?n:l instanceof ft.Name?(n instanceof ft.Name?e(o,n,l):i(o,n,l),l):n instanceof ft.Name?(i(o,l,n),n):t(n,l);return c===ft.Name&&!(u instanceof ft.Name)?s(o,u):u}}Ve.mergeEvaluated={props:dw({mergeNames:(e,i,t)=>e.if((0,ft._)`${t} !== true && ${i} !== undefined`,()=>{e.if((0,ft._)`${i} === true`,()=>e.assign(t,!0),()=>e.assign(t,(0,ft._)`${t} || {}`).code((0,ft._)`Object.assign(${t}, ${i})`))}),mergeToName:(e,i,t)=>e.if((0,ft._)`${t} !== true`,()=>{i===!0?e.assign(t,!0):(e.assign(t,(0,ft._)`${t} || {}`),Qm(e,t,i))}),mergeValues:(e,i)=>e===!0?!0:ye(ye({},e),i),resultToName:_w}),items:dw({mergeNames:(e,i,t)=>e.if((0,ft._)`${t} !== true && ${i} !== undefined`,()=>e.assign(t,(0,ft._)`${i} === true ? true : ${t} > ${i} ? ${t} : ${i}`)),mergeToName:(e,i,t)=>e.if((0,ft._)`${t} !== true`,()=>e.assign(t,i===!0?!0:(0,ft._)`${t} > ${i} ? ${t} : ${i}`)),mergeValues:(e,i)=>e===!0?!0:Math.max(e,i),resultToName:(e,i)=>e.var("items",i)})};function _w(e,i){if(i===!0)return e.var("props",!0);let t=e.var("props",(0,ft._)`{}`);return i!==void 0&&Qm(e,t,i),t}Ve.evaluatedPropsToName=_w;function Qm(e,i,t){Object.keys(t).forEach(s=>e.assign((0,ft._)`${i}${(0,ft.getProperty)(s)}`,!0))}Ve.setEvaluated=Qm;var uw={};function ZU(e,i){return e.scopeValue("func",{ref:i,code:uw[i.code]||(uw[i.code]=new VU._Code(i.code))})}Ve.useFunc=ZU;var Jm=function(e){return e[e.Num=0]="Num",e[e.Str=1]="Str",e}(Jm||(Ve.Type=Jm={}));function QU(e,i,t){if(e instanceof ft.Name){let s=i===Jm.Num;return t?s?(0,ft._)`"[" + ${e} + "]"`:(0,ft._)`"['" + ${e} + "']"`:s?(0,ft._)`"/" + ${e}`:(0,ft._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,ft.getProperty)(e).toString():"/"+Zm(e)}Ve.getErrorPath=QU;function hw(e,i,t=e.opts.strictSchema){if(t){if(i=`strict mode: ${i}`,t===!0)throw new Error(i);e.self.logger.warn(i)}}Ve.checkStrictMode=hw});var us=w(Xm=>{"use strict";Object.defineProperty(Xm,"__esModule",{value:!0});var di=ke(),XU={data:new di.Name("data"),valCxt:new di.Name("valCxt"),instancePath:new di.Name("instancePath"),parentData:new di.Name("parentData"),parentDataProperty:new di.Name("parentDataProperty"),rootData:new di.Name("rootData"),dynamicAnchors:new di.Name("dynamicAnchors"),vErrors:new di.Name("vErrors"),errors:new di.Name("errors"),this:new di.Name("this"),self:new di.Name("self"),scope:new di.Name("scope"),json:new di.Name("json"),jsonPos:new di.Name("jsonPos"),jsonLen:new di.Name("jsonLen"),jsonPart:new di.Name("jsonPart")};Xm.default=XU});var Da=w(ui=>{"use strict";Object.defineProperty(ui,"__esModule",{value:!0});ui.extendErrors=ui.resetErrorsCount=ui.reportExtraError=ui.reportError=ui.keyword$DataError=ui.keywordError=void 0;var Qe=ke(),kd=$e(),Ci=us();ui.keywordError={message:({keyword:e})=>(0,Qe.str)`must pass "${e}" keyword validation`};ui.keyword$DataError={message:({keyword:e,schemaType:i})=>i?(0,Qe.str)`"${e}" keyword must be ${i} ($data)`:(0,Qe.str)`"${e}" keyword is invalid ($data)`};function eF(e,i=ui.keywordError,t,s){let{it:o}=e,{gen:n,compositeRule:l,allErrors:c}=o,u=yw(e,i,t);s??(l||c)?fw(n,u):bw(o,(0,Qe._)`[${u}]`)}ui.reportError=eF;function tF(e,i=ui.keywordError,t){let{it:s}=e,{gen:o,compositeRule:n,allErrors:l}=s,c=yw(e,i,t);fw(o,c),n||l||bw(s,Ci.default.vErrors)}ui.reportExtraError=tF;function iF(e,i){e.assign(Ci.default.errors,i),e.if((0,Qe._)`${Ci.default.vErrors} !== null`,()=>e.if(i,()=>e.assign((0,Qe._)`${Ci.default.vErrors}.length`,i),()=>e.assign(Ci.default.vErrors,null)))}ui.resetErrorsCount=iF;function sF({gen:e,keyword:i,schemaValue:t,data:s,errsCount:o,it:n}){if(o===void 0)throw new Error("ajv implementation error");let l=e.name("err");e.forRange("i",o,Ci.default.errors,c=>{e.const(l,(0,Qe._)`${Ci.default.vErrors}[${c}]`),e.if((0,Qe._)`${l}.instancePath === undefined`,()=>e.assign((0,Qe._)`${l}.instancePath`,(0,Qe.strConcat)(Ci.default.instancePath,n.errorPath))),e.assign((0,Qe._)`${l}.schemaPath`,(0,Qe.str)`${n.errSchemaPath}/${i}`),n.opts.verbose&&(e.assign((0,Qe._)`${l}.schema`,t),e.assign((0,Qe._)`${l}.data`,s))})}ui.extendErrors=sF;function fw(e,i){let t=e.const("err",i);e.if((0,Qe._)`${Ci.default.vErrors} === null`,()=>e.assign(Ci.default.vErrors,(0,Qe._)`[${t}]`),(0,Qe._)`${Ci.default.vErrors}.push(${t})`),e.code((0,Qe._)`${Ci.default.errors}++`)}function bw(e,i){let{gen:t,validateName:s,schemaEnv:o}=e;o.$async?t.throw((0,Qe._)`new ${e.ValidationError}(${i})`):(t.assign((0,Qe._)`${s}.errors`,i),t.return(!1))}var Cr={keyword:new Qe.Name("keyword"),schemaPath:new Qe.Name("schemaPath"),params:new Qe.Name("params"),propertyName:new Qe.Name("propertyName"),message:new Qe.Name("message"),schema:new Qe.Name("schema"),parentSchema:new Qe.Name("parentSchema")};function yw(e,i,t){let{createErrors:s}=e.it;return s===!1?(0,Qe._)`{}`:oF(e,i,t)}function oF(e,i,t={}){let{gen:s,it:o}=e,n=[rF(o,t),nF(e,t)];return aF(e,i,n),s.object(...n)}function rF({errorPath:e},{instancePath:i}){let t=i?(0,Qe.str)`${e}${(0,kd.getErrorPath)(i,kd.Type.Str)}`:e;return[Ci.default.instancePath,(0,Qe.strConcat)(Ci.default.instancePath,t)]}function nF({keyword:e,it:{errSchemaPath:i}},{schemaPath:t,parentSchema:s}){let o=s?i:(0,Qe.str)`${i}/${e}`;return t&&(o=(0,Qe.str)`${o}${(0,kd.getErrorPath)(t,kd.Type.Str)}`),[Cr.schemaPath,o]}function aF(e,{params:i,message:t},s){let{keyword:o,data:n,schemaValue:l,it:c}=e,{opts:u,propertyName:m,topSchemaRef:_,schemaPath:f}=c;s.push([Cr.keyword,o],[Cr.params,typeof i=="function"?i(e):i||(0,Qe._)`{}`]),u.messages&&s.push([Cr.message,typeof t=="function"?t(e):t]),u.verbose&&s.push([Cr.schema,l],[Cr.parentSchema,(0,Qe._)`${_}${f}`],[Ci.default.data,n]),m&&s.push([Cr.propertyName,m])}});var ww=w(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.boolOrEmptySchema=mn.topBoolOrEmptySchema=void 0;var lF=Da(),cF=ke(),dF=us(),uF={message:"boolean schema is false"};function gF(e){let{gen:i,schema:t,validateName:s}=e;t===!1?vw(e,!1):typeof t=="object"&&t.$async===!0?i.return(dF.default.data):(i.assign((0,cF._)`${s}.errors`,null),i.return(!0))}mn.topBoolOrEmptySchema=gF;function mF(e,i){let{gen:t,schema:s}=e;s===!1?(t.var(i,!1),vw(e)):t.var(i,!0)}mn.boolOrEmptySchema=mF;function vw(e,i){let{gen:t,data:s}=e,o={gen:t,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,lF.reportError)(o,uF,void 0,i)}});var ep=w(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.getRules=pn.isJSONType=void 0;var pF=["string","number","integer","boolean","null","object","array"],_F=new Set(pF);function hF(e){return typeof e=="string"&&_F.has(e)}pn.isJSONType=hF;function fF(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:nt(ye({},e),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}pn.getRules=fF});var tp=w(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});Wo.shouldUseRule=Wo.shouldUseGroup=Wo.schemaHasRulesForType=void 0;function bF({schema:e,self:i},t){let s=i.RULES.types[t];return s&&s!==!0&&kw(e,s)}Wo.schemaHasRulesForType=bF;function kw(e,i){return i.rules.some(t=>Hw(e,t))}Wo.shouldUseGroup=kw;function Hw(e,i){var t;return e[i.keyword]!==void 0||((t=i.definition.implements)===null||t===void 0?void 0:t.some(s=>e[s]!==void 0))}Wo.shouldUseRule=Hw});var Ba=w(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.reportTypeError=gi.checkDataTypes=gi.checkDataType=gi.coerceAndCheckDataType=gi.getJSONTypes=gi.getSchemaTypes=gi.DataType=void 0;var yF=ep(),vF=tp(),wF=Da(),Ee=ke(),Sw=$e(),_n=function(e){return e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong",e}(_n||(gi.DataType=_n={}));function kF(e){let i=Cw(e.type);if(i.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!i.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&i.push("null")}return i}gi.getSchemaTypes=kF;function Cw(e){let i=Array.isArray(e)?e:e?[e]:[];if(i.every(yF.isJSONType))return i;throw new Error("type must be JSONType or JSONType[]: "+i.join(","))}gi.getJSONTypes=Cw;function HF(e,i){let{gen:t,data:s,opts:o}=e,n=SF(i,o.coerceTypes),l=i.length>0&&!(n.length===0&&i.length===1&&(0,vF.schemaHasRulesForType)(e,i[0]));if(l){let c=sp(i,s,o.strictNumbers,_n.Wrong);t.if(c,()=>{n.length?CF(e,i,n):op(e)})}return l}gi.coerceAndCheckDataType=HF;var xw=new Set(["string","number","integer","boolean","null"]);function SF(e,i){return i?e.filter(t=>xw.has(t)||i==="array"&&t==="array"):[]}function CF(e,i,t){let{gen:s,data:o,opts:n}=e,l=s.let("dataType",(0,Ee._)`typeof ${o}`),c=s.let("coerced",(0,Ee._)`undefined`);n.coerceTypes==="array"&&s.if((0,Ee._)`${l} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>s.assign(o,(0,Ee._)`${o}[0]`).assign(l,(0,Ee._)`typeof ${o}`).if(sp(i,o,n.strictNumbers),()=>s.assign(c,o))),s.if((0,Ee._)`${c} !== undefined`);for(let m of t)(xw.has(m)||m==="array"&&n.coerceTypes==="array")&&u(m);s.else(),op(e),s.endIf(),s.if((0,Ee._)`${c} !== undefined`,()=>{s.assign(o,c),xF(e,c)});function u(m){switch(m){case"string":s.elseIf((0,Ee._)`${l} == "number" || ${l} == "boolean"`).assign(c,(0,Ee._)`"" + ${o}`).elseIf((0,Ee._)`${o} === null`).assign(c,(0,Ee._)`""`);return;case"number":s.elseIf((0,Ee._)`${l} == "boolean" || ${o} === null
|
|
3
3
|
|| (${l} == "string" && ${o} && ${o} == +${o})`).assign(c,(0,Ee._)`+${o}`);return;case"integer":s.elseIf((0,Ee._)`${l} === "boolean" || ${o} === null
|
|
4
4
|
|| (${l} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(c,(0,Ee._)`+${o}`);return;case"boolean":s.elseIf((0,Ee._)`${o} === "false" || ${o} === 0 || ${o} === null`).assign(c,!1).elseIf((0,Ee._)`${o} === "true" || ${o} === 1`).assign(c,!0);return;case"null":s.elseIf((0,Ee._)`${o} === "" || ${o} === 0 || ${o} === false`),s.assign(c,null);return;case"array":s.elseIf((0,Ee._)`${l} === "string" || ${l} === "number"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
1
|
+
import{a as s}from"./chunk-R3DFE6BN.js";import"./chunk-UG7X3SOK.js";import"./chunk-LOR7R6R7.js";import"./chunk-ZHPB347D.js";import"./chunk-RYEUSRBX.js";import"./chunk-7BRVYYLY.js";import"./chunk-HHEVRKFK.js";import"./chunk-LPYZOQUG.js";import{g as i}from"./chunk-UOLP7IQJ.js";import"./chunk-DOUHWAMX.js";import"./chunk-3OGGH4IS.js";import"./chunk-G7FA4DP4.js";import"./chunk-6GMXEQVA.js";import{ga as e,nb as t}from"./chunk-H36QJYLQ.js";var u=[{path:"",loadComponent:()=>import("./chunk-F26AIEEZ.js").then(o=>o.AccessoriesComponent)}],c=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=t({type:o});static \u0275inj=e({imports:[i.forChild(u),i]})}return o})();var l=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=t({type:o});static \u0275inj=e({imports:[s,c]})}return o})();export{l as AccessoriesModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
1
|
+
import{a as l}from"./chunk-WK4E23QD.js";import{a as m}from"./chunk-7OTNPUAL.js";import{n as s}from"./chunk-RYEUSRBX.js";import{b as o}from"./chunk-DOUHWAMX.js";import{a as i}from"./chunk-G7FA4DP4.js";import{fa as r,ka as n}from"./chunk-H36QJYLQ.js";var I=(()=>{class e{$terminal=n(l);$settings=n(o);$modal=n(s);$translate=n(i);handleBeforeUnload(t){if(!this.$settings.env.terminal?.persistence&&!this.$settings.env.terminal?.hideWarning&&this.$terminal.hasActiveSession()&&this.$terminal.hasUserTypedInSession()){let a=this.$translate.instant("platform.terminal.terminate_unload");return t.preventDefault(),t.returnValue=a,a}}canDeactivate(){if(this.$settings.env.terminal?.persistence||this.$settings.env.terminal?.hideWarning||!this.$terminal.hasActiveSession()||!this.$terminal.hasUserTypedInSession())return!0;let t=this.$modal.open(m,{size:"lg",backdrop:"static"});return t.componentInstance.title=this.$translate.instant("platform.terminal.terminate_title"),t.componentInstance.message=this.$translate.instant("platform.terminal.terminate_message_1"),t.componentInstance.message2=this.$translate.instant("platform.terminal.terminate_message_2"),t.componentInstance.message3=this.$translate.instant("common.phrases.are_you_sure"),t.componentInstance.confirmButtonLabel=this.$translate.instant("form.button_continue"),t.componentInstance.confirmButtonClass="btn-primary",t.componentInstance.faIconClass="fas fa-exclamation-triangle text-warning",t.result.then(()=>!0).catch(()=>!1)}static \u0275fac=function(a){return new(a||e)};static \u0275prov=r({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{I as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
1
|
+
import{a as n}from"./chunk-H6HIJJ3O.js";import"./chunk-NWJMSZSM.js";import"./chunk-ZZDKJB6X.js";import"./chunk-DOEOGSBK.js";import"./chunk-BSUFNH7A.js";import"./chunk-77JZBWAC.js";import"./chunk-FUCI6T5W.js";import"./chunk-AE7VAWOU.js";import"./chunk-V2P2FPJ7.js";import"./chunk-BU65ZOCD.js";import"./chunk-YATJTZML.js";import"./chunk-ZHPB347D.js";import"./chunk-7OTNPUAL.js";import"./chunk-RYEUSRBX.js";import"./chunk-7BRVYYLY.js";import"./chunk-HHEVRKFK.js";import"./chunk-LPYZOQUG.js";import{g as r}from"./chunk-UOLP7IQJ.js";import"./chunk-DOUHWAMX.js";import"./chunk-3OGGH4IS.js";import"./chunk-G7FA4DP4.js";import"./chunk-6GMXEQVA.js";import{ga as t,nb as i}from"./chunk-H36QJYLQ.js";var l=[{path:"",loadComponent:()=>import("./chunk-YYVGNCER.js").then(o=>o.PluginsComponent)}],u=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=i({type:o});static \u0275inj=t({imports:[r.forChild(l),r]})}return o})();var f=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=i({type:o});static \u0275inj=t({imports:[n,u]})}return o})();export{f as PluginsModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as r}from"./chunk-UOLP7IQJ.js";import"./chunk-6GMXEQVA.js";import{ga as t,nb as e}from"./chunk-H36QJYLQ.js";var u=[{path:"",loadComponent:()=>import("./chunk-
|
|
1
|
+
import{g as r}from"./chunk-UOLP7IQJ.js";import"./chunk-6GMXEQVA.js";import{ga as t,nb as e}from"./chunk-H36QJYLQ.js";var u=[{path:"",loadComponent:()=>import("./chunk-B6BTFDRQ.js").then(o=>o.LogsComponent)}],n=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[r.forChild(u),r]})}return o})();var p=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[n]})}return o})();export{p as LogsModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as t}from"./chunk-
|
|
1
|
+
import{c as t}from"./chunk-UG7X3SOK.js";import{b as i}from"./chunk-ZHPB347D.js";import{ga as o,nb as r}from"./chunk-H36QJYLQ.js";var f=(()=>{class e{static \u0275fac=function(s){return new(s||e)};static \u0275mod=r({type:e});static \u0275inj=o({providers:[t],imports:[i]})}return e})();export{f as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as b}from"./chunk-
|
|
1
|
+
import{a as b}from"./chunk-HHEVRKFK.js";import"./chunk-LPYZOQUG.js";import{d as k}from"./chunk-UOLP7IQJ.js";import{b as S}from"./chunk-DOUHWAMX.js";import{k as T,n as w}from"./chunk-3OGGH4IS.js";import{a as C,b as $}from"./chunk-G7FA4DP4.js";import"./chunk-6GMXEQVA.js";import{$b as E,Dc as g,Ib as d,Jb as f,Jc as m,Kc as c,Lc as y,Sb as r,Tb as i,Ub as l,Xa as x,ab as n,dc as h,ka as o,mb as _,qc as a,rc as s}from"./chunk-H36QJYLQ.js";var I=t=>({command:t});function D(t,u){if(t&1&&(r(0,"div",7),a(1),i()),t&2){let e=h();n(),s(e.error)}}function R(t,u){t&1&&(r(0,"p",9),a(1),m(2,"translate"),i(),r(3,"div",10)(4,"div",11),l(5,"i",12),i()()),t&2&&(n(),s(c(2,1,"restart.please_wait_while_server_restarts")))}function B(t,u){if(t&1&&(r(0,"div",8)(1,"p"),a(2),m(3,"translate"),i(),l(4,"p",13),m(5,"translate"),i()),t&2){let e=h();n(2),s(c(3,2,"platform.docker.server_long_time")),n(2),E("innerHTML",y(5,4,"platform.docker.run_with_restart",g(7,I,e.command)),x)}}var U=(()=>{class t{$api=o(w);$router=o(k);$settings=o(S);$toastr=o(T);$translate=o(C);$ws=o(b);checkTimeout;checkDelay;io;resp={};timeout=!1;error=!1;command='<span class="font-monospace">--restart=always</span>';ngOnInit(){this.io=this.$ws.connectToNamespace("status"),this.io.connected.subscribe(()=>{this.io.socket.emit("monitor-server-status"),this.$settings.getAppSettings().catch(()=>{})}),this.$api.put("/platform-tools/docker/restart-container",{}).subscribe({next:e=>{this.resp=e,this.checkIfServerUp()},error:e=>{this.error=this.$translate.instant("restart.toast_server_restart_error"),console.error(e),this.$toastr.error(this.$translate.instant("restart.toast_server_restart_error"),this.$translate.instant("toast.title_error"))}})}ngOnDestroy(){this.io.end(),clearTimeout(this.checkDelay),clearTimeout(this.checkTimeout)}checkIfServerUp(){this.checkDelay=setTimeout(()=>{this.io.socket.on("homebridge-status",e=>{(e.status==="up"||e.status==="pending")&&(this.$toastr.success(this.$translate.instant("platform.docker.container_restarted"),this.$translate.instant("toast.title_success")),this.$router.navigate(["/"]))})},1e4),this.checkTimeout=setTimeout(()=>{this.$toastr.warning(this.$translate.instant("restart.toast_server_restart_timeout"),this.$translate.instant("toast.title_warning"),{timeOut:1e4}),this.timeout=!0},6e4)}static \u0275fac=function(p){return new(p||t)};static \u0275cmp=_({type:t,selectors:[["ng-component"]],decls:14,vars:8,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fab","fa-fw","fa-docker",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"alert","alert-error","my-4"],[1,"alert","alert-warning","my-4"],[1,"grey-text"],[1,"justify-content-center","my-4"],[1,"restart-progress-box","primary-text"],[1,"fas","fa-fw","fa-spinner","fa-spin"],[1,"grey-text","mb-0",3,"innerHTML"]],template:function(p,v){p&1&&(r(0,"div",0)(1,"h3",1),a(2),m(3,"translate"),i()(),r(4,"div",2)(5,"div",3),l(6,"i",4),i(),r(7,"div",5)(8,"h4",6),a(9),m(10,"translate"),i(),d(11,D,2,1,"div",7)(12,R,6,3),d(13,B,6,9,"div",8),i()()),p&2&&(n(2),s(c(3,4,"menu.restart.title")),n(7),s(c(10,6,"platform.docker.title_restarting")),n(2),f(v.error?11:12),n(2),f(v.timeout?13:-1))},dependencies:[$],styles:[".restart-progress-box[_ngcontent-%COMP%]{font-size:22px;font-weight:300;margin-top:15px}"]})}return t})();export{U as ContainerRestartComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as H}from"./chunk-R7Y5ACQC.js";import{a as X}from"./chunk-NJOBXAPT.js";import{a as Z}from"./chunk-YATJTZML.js";import"./chunk-ZHPB347D.js";import{a as R}from"./chunk-7OTNPUAL.js";import{n as E}from"./chunk-RYEUSRBX.js";import"./chunk-7BRVYYLY.js";import{a as j}from"./chunk-VY4A2U5R.js";import{b as A}from"./chunk-5B67RG5C.js";import{a as W,c as q,d as V,e as N,f as D}from"./chunk-UOLP7IQJ.js";import{b as T}from"./chunk-WUPGTEQ4.js";import{m as $}from"./chunk-C3MIVQCG.js";import{a as L,b as U}from"./chunk-G7FA4DP4.js";import"./chunk-6GMXEQVA.js";import{Cc as h,Dc as M,Hb as m,Ib as x,Jb as y,Jc as d,Kc as s,Ob as c,Pb as n,Qb as a,Rb as p,_b as S,ab as o,bc as _,dc as C,fb as F,g as Y,h as I,id as O,ka as u,mb as P,qa as b,qc as f,ra as w,rc as v,w as z,yd as K}from"./chunk-H36QJYLQ.js";var Q=Y(Z(),1);function G(){var i;return typeof window<"u"&&(window?.matchMedia("(display-mode: standalone)").matches||((i=window.navigator)===null||i===void 0?void 0:i.standalone)||document.referrer.startsWith("android-app://")||window?.Windows||/trident.+(msapphost|webview)\//i.test(navigator.userAgent)||document.referrer.startsWith("app-info://platform/microsoft-store"))}var B=()=>["/"],te=i=>({"hamburger-icon-cross":i}),ne=i=>({expanded:i}),ie=()=>({exact:!0}),oe=()=>["/plugins"],re=()=>["/accessories"],ae=()=>["/logs"],de=()=>["/support"],se=()=>["/platform-tools/terminal"],le=()=>["/config"],pe=()=>["/settings"],ce=()=>["/power-options"];function me(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",20),d(2,"translate"),d(3,"translate"),_("click",function(){b(e);let t=C();return w(t.openUnderVoltageModal())})("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(4,"div",12),p(5,"i",21),a(),n(6,"div",14),f(7),d(8,"translate"),a()()()}i&2&&(o(),m("aria-label",s(2,2,"rpi.throttled.undervoltage_title")+" - "+s(3,4,"rpi.throttled.undervoltage_description")),o(6),v(s(8,6,"rpi.throttled.undervoltage_title")))}function ue(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",22),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",h(8,se))("routerLinkActive","active"),m("aria-label",s(2,4,"menu.linux.label_terminal")),o(5),v(s(7,6,"menu.linux.label_terminal")))}function _e(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",23),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",h(8,le))("routerLinkActive","active"),m("aria-label",s(2,4,"menu.config_json_editor")),o(5),v(s(7,6,"menu.config_json_editor")))}function fe(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",24),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",h(8,pe))("routerLinkActive","active"),m("aria-label",s(2,4,"menu.label_settings")),o(5),v(s(7,6,"menu.label_settings")))}function ge(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",25),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",h(8,ce))("routerLinkActive","active"),m("aria-label",s(2,4,"menu.restart.title")),o(5),v(s(7,6,"menu.restart.title")))}function ve(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",20),d(2,"translate"),_("click",function(){b(e);let t=C();return w(t.reloadPage())})("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",26),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),m("aria-label",s(2,2,"menu.reload")),o(5),v(s(7,4,"menu.reload")))}function he(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",20),d(2,"translate"),_("click",function(){b(e);let t=C();return w(t.logout())})("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",27),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),m("aria-label",s(2,2,"menu.tooltip_logout")),o(5),v(s(7,4,"menu.tooltip_logout")))}var J=(()=>{class i{$auth=u(A);$settings=u(T);$modal=u(E);$notification=u(X);$renderer=u(F);$router=u(V);$translate=u(L);isExpanded=!1;formAuth=this.$settings.formAuth;isAdmin=this.$auth.user.admin;enableTerminalAccess=this.$settings.env.enableTerminalAccess;rPiCurrentlyUnderVoltage=!1;rPiWasUnderVoltage=!1;isMobile=!1;freezeMenu=!1;isPwa=G();constructor(){this.isMobile=window.innerWidth<768;let e;window.addEventListener("resize",()=>{clearTimeout(e),e=setTimeout(()=>{this.updateListeners()},500)}),this.$router.events.subscribe(l=>{l instanceof W&&(this.closeSidebar(),this.freezeMenu=!0,setTimeout(()=>{this.freezeMenu=!1},750))})}ngOnInit(){this.$notification.raspberryPiThrottled.subscribe(r=>{r["Under Voltage"]&&(this.rPiCurrentlyUnderVoltage=!0),r["Under-voltage has occurred"]&&(this.rPiWasUnderVoltage=!0)}),this.$notification.formAuthEnabled.subscribe(r=>{this.formAuth=r});let e=document.querySelector(".sidebar"),l=document.querySelector(".m-header"),t=document.querySelector(".content");this.isMobile?document.addEventListener("touchstart",r=>{if(t.contains(r.target)&&this.isExpanded){r.preventDefault(),this.toggleSidebar();return}!e.contains(r.target)&&!l.contains(r.target)&&this.isExpanded&&(r.preventDefault(),this.closeSidebar())},{passive:!1}):(this.updateListeners(),l.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),l.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}),document.addEventListener("click",r=>{e.contains(r.target)&&r.clientX>60&&this.closeSidebar()},{passive:!1})),this.updateContentStyles()}toggleSidebar(){this.freezeMenu||(this.isExpanded=!this.isExpanded,this.updateContentStyles())}openUnderVoltageModal(){let e=this.$modal.open(H,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("rpi.throttled.undervoltage_title"),e.componentInstance.message=this.$translate.instant(this.rPiCurrentlyUnderVoltage?"rpi.throttled.currently_message":"rpi.throttled.previously_message"),e.componentInstance.ctaButtonLabel=this.$translate.instant("form.button_more_info"),e.componentInstance.faIconClass="fas fa-fw fa-bolt yellow-text",e.componentInstance.ctaButtonLink="https://pimylifeup.com/raspberry-pi-low-voltage-warning"}handleKeydown(e){if(e.key==="Enter"){let l=e.target;["menuitem","button"].includes(l.getAttribute("role"))&&l.click()}}reloadPage(){window.location.reload()}ngOnDestroy(){document.removeEventListener("touchstart",()=>{}),document.removeEventListener("click",()=>{})}logout(){this.$auth.logout()}openSidebar(){this.freezeMenu||(this.isExpanded=!0,this.updateContentStyles())}closeSidebar(){this.freezeMenu||(this.isExpanded=!1,this.updateContentStyles())}updateContentStyles(){let e=document.querySelector(".content");this.isExpanded?(this.$renderer.setStyle(e,"opacity","20%"),this.$renderer.setStyle(e,"pointer-events","none"),this.$renderer.setStyle(e,"overflow","hidden")):(this.$renderer.removeStyle(e,"opacity"),this.$renderer.removeStyle(e,"pointer-events"),this.$renderer.removeStyle(e,"overflow"))}updateListeners(){this.isMobile=window.innerWidth<768;let e=document.querySelector(".sidebar");e.removeAllListeners(),(this.isMobile||!this.isMobile&&this.$settings.menuMode!=="freeze")&&(e.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),e.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}))}static \u0275fac=function(l){return new(l||i)};static \u0275cmp=P({type:i,selectors:[["app-sidebar"]],inputs:{isExpanded:"isExpanded"},decls:68,vars:75,consts:[["tabindex","0","role","button",1,"m-header","text-end",3,"click","keydown"],[1,"me-2","d-block","d-lg-none",2,"font-size","0.9rem","color","#dddddd"],[3,"routerLink"],["ngSrc","../../../../assets/homebridge-logo.svg","alt","HB Logo","height","35","width","35",2,"height","35px","width","35px"],[1,"hb-logo-text-mobile"],[1,"hamburger-icon",3,"ngClass"],["role","navigation","id","sidebar",1,"sidebar",3,"ngClass"],["tabindex","0","role","button",1,"header",3,"click","keydown"],[1,"hb-logo-text"],[1,"link-wrapper"],[1,"link"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive","routerLinkActiveOptions"],[1,"icon"],[1,"fa","fa-fw","fa-house"],[1,"title"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive"],[1,"fa","fa-fw","fa-plug"],[1,"fa","fa-fw","fa-lightbulb"],[1,"fa","fa-fw","fa-wave-square"],[1,"fa","fa-fw","fa-question-circle-o"],["role","menuitem","tabindex","0",1,"link-row",3,"click","keydown"],[1,"fas","fa-fw","fa-bolt","fa-beat","yellow-text",2,"--fa-beat-scale","1.5"],[1,"fa","fa-fw","fa-terminal"],[1,"fa","fa-fw","fa-code"],[1,"fa","fa-fw","fa-cog"],[1,"fa","fa-fw","fa-power-off"],[1,"fa","fa-fw","fa-refresh"],[1,"fa","fa-fw","fa-right-from-bracket"]],template:function(l,t){l&1&&(n(0,"div",0),d(1,"translate"),_("click",function(){return t.toggleSidebar()})("keydown",function(g){return t.handleKeydown(g)}),p(2,"span",1),n(3,"a",2),d(4,"translate"),p(5,"img",3),n(6,"div",4),f(7,"Homebridge"),a()(),n(8,"div",5),p(9,"span")(10,"span")(11,"span")(12,"span"),a()(),n(13,"div",6)(14,"div",7),_("click",function(){return t.toggleSidebar()})("keydown",function(g){return t.handleKeydown(g)}),n(15,"a",2),d(16,"translate"),p(17,"img",3),n(18,"div",8),f(19,"Homebridge"),a()()(),n(20,"div",9)(21,"div",10)(22,"div",11),d(23,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(24,"div",12),p(25,"i",13),a(),n(26,"div",14),f(27),d(28,"translate"),a()()(),x(29,me,9,8,"div",10),n(30,"div",10)(31,"div",15),d(32,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(33,"div",12),p(34,"i",16),a(),n(35,"div",14),f(36),d(37,"translate"),a()()(),n(38,"div",10)(39,"div",15),d(40,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(41,"div",12),p(42,"i",17),a(),n(43,"div",14),f(44),d(45,"translate"),a()()(),n(46,"div",10)(47,"div",15),d(48,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(49,"div",12),p(50,"i",18),a(),n(51,"div",14),f(52),d(53,"translate"),a()()(),x(54,ue,8,9,"div",10),x(55,_e,8,9,"div",10),x(56,fe,8,9,"div",10),n(57,"div",10)(58,"div",15),d(59,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(60,"div",12),p(61,"i",19),a(),n(62,"div",14),f(63),d(64,"translate"),a()()(),x(65,ge,8,9,"div",10),x(66,ve,8,6,"div",10),x(67,he,8,6,"div",10),a()()),l&2&&(m("aria-expanded",t.isExpanded?"true":"false")("aria-controls","sidebar")("aria-label",s(1,37,"menu.sidebar.aria_menu")),o(3),c("routerLink",h(63,B)),m("aria-label",s(4,39,"menu.label_status")),o(5),c("ngClass",M(64,te,t.isExpanded)),o(5),c("ngClass",M(66,ne,t.isExpanded)),o(2),c("routerLink",h(68,B)),m("aria-label",s(16,41,"menu.label_status")),o(7),c("routerLink",h(69,B))("routerLinkActive","active")("routerLinkActiveOptions",h(70,ie)),m("aria-label",s(23,43,"menu.label_status")),o(5),v(s(28,45,"menu.label_status")),o(2),y(t.rPiWasUnderVoltage||t.rPiCurrentlyUnderVoltage?29:-1),o(2),c("routerLink",h(71,oe))("routerLinkActive","active"),m("aria-label",s(32,47,"menu.label_plugins")),o(5),v(s(37,49,"menu.label_plugins")),o(3),c("routerLink",h(72,re))("routerLinkActive","active"),m("aria-label",s(40,51,"menu.label_accessories")),o(5),v(s(45,53,"menu.label_accessories")),o(3),c("routerLink",h(73,ae))("routerLinkActive","active"),m("aria-label",s(48,55,"menu.linux.label_logs")),o(5),v(s(53,57,"menu.linux.label_logs")),o(2),y(t.enableTerminalAccess&&t.isAdmin?54:-1),o(),y(t.isAdmin?55:-1),o(),y(t.isAdmin?56:-1),o(2),c("routerLink",h(74,de))("routerLinkActive","active"),m("aria-label",s(59,59,"support.title")),o(5),v(s(64,61,"support.title")),o(2),y(t.isAdmin?65:-1),o(),y(t.isPwa?66:-1),o(),y(t.formAuth?67:-1))},dependencies:[N,K,O,D,U],styles:[".m-header[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:65px;z-index:510;display:flex;align-items:center;padding-left:3px;padding-right:3px}.m-header[_ngcontent-%COMP%]:hover{cursor:pointer}@media (min-width: 768px){.m-header[_ngcontent-%COMP%]{display:none}}.sidebar[_ngcontent-%COMP%]{position:fixed;left:0;top:0;height:100vh;transition:.3s;width:60px;z-index:500}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;padding:15px 10px 15px 11px;font-size:.85rem}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]:hover{cursor:pointer}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{overflow-y:auto;max-height:calc(100vh - 80px)!important}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%]{display:flex;align-items:center;padding:15px 10px;cursor:pointer;transition:.2s;font-size:17px}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{flex:0 0 38px;display:flex;align-items:center;justify-content:center}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1;transition:.3s;max-width:0;overflow:hidden;white-space:nowrap}@media (max-width: 767px){.sidebar[_ngcontent-%COMP%]{width:0}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:none}}.sidebar.expanded[_ngcontent-%COMP%]{width:210px}@media (max-width: 767px){.sidebar.expanded[_ngcontent-%COMP%]{width:210px}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:block}}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{max-width:150px;padding-left:10px}.hamburger-icon[_ngcontent-%COMP%]{margin:-7px 0 0 25px}@media (min-width: 768px){.hb-logo-text[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px}.sidebar.expanded[_ngcontent-%COMP%] .hb-logo-text[_ngcontent-%COMP%]{opacity:1;left:55px;transition:.3s}.sidebar[_ngcontent-%COMP%]:not(.expanded) .hb-logo-text[_ngcontent-%COMP%]{opacity:0;left:40px;transition:.3s}.hb-logo-text-mobile[_ngcontent-%COMP%], .hamburger-icon[_ngcontent-%COMP%]{display:none!important}}@media (max-width: 767px){.hb-logo-text[_ngcontent-%COMP%]{display:none!important}.hb-logo-text-mobile[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px;opacity:1;left:55px}.hamburger-icon[_ngcontent-%COMP%]{position:absolute;right:10px;top:28px;width:30px;transform:rotate(0);transition:.5s ease-in-out;cursor:pointer}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;position:absolute;height:2px;width:100%;background-color:#fff;border-radius:9px;opacity:1;left:0;transform:rotate(0);transition:.25s ease-in-out}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:0}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2), .hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){top:10px}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:20px}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:10px;width:0;left:50%}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2){transform:rotate(45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){transform:rotate(-45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:10px;width:0;left:50%}}"]})}return i})();var be=i=>({sidebarExpanded:i}),He=(()=>{class i{$auth=u(A);$modal=u(E);$router=u(V);$settings=u(T);$translate=u(L);$ws=u(j);io;sidebarExpanded=!1;ngOnInit(){this.io=this.$ws.connectToNamespace("app"),this.io.socket.on("reconnect",()=>{this.$auth.checkToken()}),this.compareServerUiVersion()}compareServerUiVersion(){return I(this,null,function*(){if(this.$settings.settingsLoaded||(yield z(this.$settings.onSettingsLoaded)),this.$router.url!=="/restart"&&(0,Q.lt)(this.$settings.uiVersion,$.serverTarget)){console.log(`Server restart required. UI Version: ${$.serverTarget} - Server Version: ${this.$settings.uiVersion} `);let e=this.$modal.open(R,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("platform.version.service_restart_required"),e.componentInstance.message=this.$translate.instant("platform.version.restart_required",{serverVersion:this.$settings.uiVersion,uiVersion:$.serverTarget}),e.componentInstance.confirmButtonLabel=this.$translate.instant("menu.tooltip_restart"),e.componentInstance.faIconClass="fas fa-power-off orange-text",e.result.then(()=>this.$router.navigate(["/restart"])).catch(()=>{})}})}static \u0275fac=function(l){return new(l||i)};static \u0275cmp=P({type:i,selectors:[["app-layout"]],decls:3,vars:4,consts:[[3,"isExpanded"],[1,"content","px-3","p-md-4",3,"ngClass"]],template:function(l,t){l&1&&(p(0,"app-sidebar",0),n(1,"div",1),p(2,"router-outlet"),a()),l&2&&(c("isExpanded",t.sidebarExpanded),o(),c("ngClass",M(2,be,t.sidebarExpanded)))},dependencies:[J,O,q],styles:[".content[_ngcontent-%COMP%]{margin-left:60px;transition:.3s;height:100%}@media (max-width: 767px){.content[_ngcontent-%COMP%]{margin-left:0;padding-top:85px!important}}@media (min-width: 768px){.content[_ngcontent-%COMP%]{height:100%}}a[_ngcontent-%COMP%]:hover{text-decoration:none!important}"]})}return i})();export{He as LayoutComponent};
|
|
1
|
+
import{a as H}from"./chunk-R7Y5ACQC.js";import{a as X}from"./chunk-NJOBXAPT.js";import{a as Z}from"./chunk-YATJTZML.js";import"./chunk-ZHPB347D.js";import{a as R}from"./chunk-7OTNPUAL.js";import{n as E}from"./chunk-RYEUSRBX.js";import"./chunk-7BRVYYLY.js";import{a as j}from"./chunk-HHEVRKFK.js";import{b as A}from"./chunk-LPYZOQUG.js";import{a as W,c as q,d as V,e as N,f as D}from"./chunk-UOLP7IQJ.js";import{b as T}from"./chunk-DOUHWAMX.js";import{m as $}from"./chunk-3OGGH4IS.js";import{a as L,b as U}from"./chunk-G7FA4DP4.js";import"./chunk-6GMXEQVA.js";import{Cc as h,Dc as M,Hb as m,Ib as x,Jb as y,Jc as d,Kc as s,Ob as c,Pb as n,Qb as a,Rb as p,_b as S,ab as o,bc as _,dc as C,fb as F,g as Y,h as I,id as O,ka as u,mb as P,qa as b,qc as f,ra as w,rc as v,w as z,yd as K}from"./chunk-H36QJYLQ.js";var Q=Y(Z(),1);function G(){var i;return typeof window<"u"&&(window?.matchMedia("(display-mode: standalone)").matches||((i=window.navigator)===null||i===void 0?void 0:i.standalone)||document.referrer.startsWith("android-app://")||window?.Windows||/trident.+(msapphost|webview)\//i.test(navigator.userAgent)||document.referrer.startsWith("app-info://platform/microsoft-store"))}var B=()=>["/"],te=i=>({"hamburger-icon-cross":i}),ne=i=>({expanded:i}),ie=()=>({exact:!0}),oe=()=>["/plugins"],re=()=>["/accessories"],ae=()=>["/logs"],de=()=>["/support"],se=()=>["/platform-tools/terminal"],le=()=>["/config"],pe=()=>["/settings"],ce=()=>["/power-options"];function me(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",20),d(2,"translate"),d(3,"translate"),_("click",function(){b(e);let t=C();return w(t.openUnderVoltageModal())})("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(4,"div",12),p(5,"i",21),a(),n(6,"div",14),f(7),d(8,"translate"),a()()()}i&2&&(o(),m("aria-label",s(2,2,"rpi.throttled.undervoltage_title")+" - "+s(3,4,"rpi.throttled.undervoltage_description")),o(6),v(s(8,6,"rpi.throttled.undervoltage_title")))}function ue(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",22),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",h(8,se))("routerLinkActive","active"),m("aria-label",s(2,4,"menu.linux.label_terminal")),o(5),v(s(7,6,"menu.linux.label_terminal")))}function _e(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",23),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",h(8,le))("routerLinkActive","active"),m("aria-label",s(2,4,"menu.config_json_editor")),o(5),v(s(7,6,"menu.config_json_editor")))}function fe(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",24),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",h(8,pe))("routerLinkActive","active"),m("aria-label",s(2,4,"menu.label_settings")),o(5),v(s(7,6,"menu.label_settings")))}function ge(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",15),d(2,"translate"),_("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",25),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),c("routerLink",h(8,ce))("routerLinkActive","active"),m("aria-label",s(2,4,"menu.restart.title")),o(5),v(s(7,6,"menu.restart.title")))}function ve(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",20),d(2,"translate"),_("click",function(){b(e);let t=C();return w(t.reloadPage())})("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",26),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),m("aria-label",s(2,2,"menu.reload")),o(5),v(s(7,4,"menu.reload")))}function he(i,k){if(i&1){let e=S();n(0,"div",10)(1,"div",20),d(2,"translate"),_("click",function(){b(e);let t=C();return w(t.logout())})("keydown",function(t){b(e);let r=C();return w(r.handleKeydown(t))}),n(3,"div",12),p(4,"i",27),a(),n(5,"div",14),f(6),d(7,"translate"),a()()()}i&2&&(o(),m("aria-label",s(2,2,"menu.tooltip_logout")),o(5),v(s(7,4,"menu.tooltip_logout")))}var J=(()=>{class i{$auth=u(A);$settings=u(T);$modal=u(E);$notification=u(X);$renderer=u(F);$router=u(V);$translate=u(L);isExpanded=!1;formAuth=this.$settings.formAuth;isAdmin=this.$auth.user.admin;enableTerminalAccess=this.$settings.env.enableTerminalAccess;rPiCurrentlyUnderVoltage=!1;rPiWasUnderVoltage=!1;isMobile=!1;freezeMenu=!1;isPwa=G();constructor(){this.isMobile=window.innerWidth<768;let e;window.addEventListener("resize",()=>{clearTimeout(e),e=setTimeout(()=>{this.updateListeners()},500)}),this.$router.events.subscribe(l=>{l instanceof W&&(this.closeSidebar(),this.freezeMenu=!0,setTimeout(()=>{this.freezeMenu=!1},750))})}ngOnInit(){this.$notification.raspberryPiThrottled.subscribe(r=>{r["Under Voltage"]&&(this.rPiCurrentlyUnderVoltage=!0),r["Under-voltage has occurred"]&&(this.rPiWasUnderVoltage=!0)}),this.$notification.formAuthEnabled.subscribe(r=>{this.formAuth=r});let e=document.querySelector(".sidebar"),l=document.querySelector(".m-header"),t=document.querySelector(".content");this.isMobile?document.addEventListener("touchstart",r=>{if(t.contains(r.target)&&this.isExpanded){r.preventDefault(),this.toggleSidebar();return}!e.contains(r.target)&&!l.contains(r.target)&&this.isExpanded&&(r.preventDefault(),this.closeSidebar())},{passive:!1}):(this.updateListeners(),l.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),l.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}),document.addEventListener("click",r=>{e.contains(r.target)&&r.clientX>60&&this.closeSidebar()},{passive:!1})),this.updateContentStyles()}toggleSidebar(){this.freezeMenu||(this.isExpanded=!this.isExpanded,this.updateContentStyles())}openUnderVoltageModal(){let e=this.$modal.open(H,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("rpi.throttled.undervoltage_title"),e.componentInstance.message=this.$translate.instant(this.rPiCurrentlyUnderVoltage?"rpi.throttled.currently_message":"rpi.throttled.previously_message"),e.componentInstance.ctaButtonLabel=this.$translate.instant("form.button_more_info"),e.componentInstance.faIconClass="fas fa-fw fa-bolt yellow-text",e.componentInstance.ctaButtonLink="https://pimylifeup.com/raspberry-pi-low-voltage-warning"}handleKeydown(e){if(e.key==="Enter"){let l=e.target;["menuitem","button"].includes(l.getAttribute("role"))&&l.click()}}reloadPage(){window.location.reload()}ngOnDestroy(){document.removeEventListener("touchstart",()=>{}),document.removeEventListener("click",()=>{})}logout(){this.$auth.logout()}openSidebar(){this.freezeMenu||(this.isExpanded=!0,this.updateContentStyles())}closeSidebar(){this.freezeMenu||(this.isExpanded=!1,this.updateContentStyles())}updateContentStyles(){let e=document.querySelector(".content");this.isExpanded?(this.$renderer.setStyle(e,"opacity","20%"),this.$renderer.setStyle(e,"pointer-events","none"),this.$renderer.setStyle(e,"overflow","hidden")):(this.$renderer.removeStyle(e,"opacity"),this.$renderer.removeStyle(e,"pointer-events"),this.$renderer.removeStyle(e,"overflow"))}updateListeners(){this.isMobile=window.innerWidth<768;let e=document.querySelector(".sidebar");e.removeAllListeners(),(this.isMobile||!this.isMobile&&this.$settings.menuMode!=="freeze")&&(e.addEventListener("mouseenter",()=>this.openSidebar(),{passive:!1}),e.addEventListener("mouseleave",()=>this.closeSidebar(),{passive:!1}))}static \u0275fac=function(l){return new(l||i)};static \u0275cmp=P({type:i,selectors:[["app-sidebar"]],inputs:{isExpanded:"isExpanded"},decls:68,vars:75,consts:[["tabindex","0","role","button",1,"m-header","text-end",3,"click","keydown"],[1,"me-2","d-block","d-lg-none",2,"font-size","0.9rem","color","#dddddd"],[3,"routerLink"],["ngSrc","../../../../assets/homebridge-logo.svg","alt","HB Logo","height","35","width","35",2,"height","35px","width","35px"],[1,"hb-logo-text-mobile"],[1,"hamburger-icon",3,"ngClass"],["role","navigation","id","sidebar",1,"sidebar",3,"ngClass"],["tabindex","0","role","button",1,"header",3,"click","keydown"],[1,"hb-logo-text"],[1,"link-wrapper"],[1,"link"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive","routerLinkActiveOptions"],[1,"icon"],[1,"fa","fa-fw","fa-house"],[1,"title"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive"],[1,"fa","fa-fw","fa-plug"],[1,"fa","fa-fw","fa-lightbulb"],[1,"fa","fa-fw","fa-wave-square"],[1,"fa","fa-fw","fa-question-circle-o"],["role","menuitem","tabindex","0",1,"link-row",3,"click","keydown"],[1,"fas","fa-fw","fa-bolt","fa-beat","yellow-text",2,"--fa-beat-scale","1.5"],[1,"fa","fa-fw","fa-terminal"],[1,"fa","fa-fw","fa-code"],[1,"fa","fa-fw","fa-cog"],[1,"fa","fa-fw","fa-power-off"],[1,"fa","fa-fw","fa-refresh"],[1,"fa","fa-fw","fa-right-from-bracket"]],template:function(l,t){l&1&&(n(0,"div",0),d(1,"translate"),_("click",function(){return t.toggleSidebar()})("keydown",function(g){return t.handleKeydown(g)}),p(2,"span",1),n(3,"a",2),d(4,"translate"),p(5,"img",3),n(6,"div",4),f(7,"Homebridge"),a()(),n(8,"div",5),p(9,"span")(10,"span")(11,"span")(12,"span"),a()(),n(13,"div",6)(14,"div",7),_("click",function(){return t.toggleSidebar()})("keydown",function(g){return t.handleKeydown(g)}),n(15,"a",2),d(16,"translate"),p(17,"img",3),n(18,"div",8),f(19,"Homebridge"),a()()(),n(20,"div",9)(21,"div",10)(22,"div",11),d(23,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(24,"div",12),p(25,"i",13),a(),n(26,"div",14),f(27),d(28,"translate"),a()()(),x(29,me,9,8,"div",10),n(30,"div",10)(31,"div",15),d(32,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(33,"div",12),p(34,"i",16),a(),n(35,"div",14),f(36),d(37,"translate"),a()()(),n(38,"div",10)(39,"div",15),d(40,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(41,"div",12),p(42,"i",17),a(),n(43,"div",14),f(44),d(45,"translate"),a()()(),n(46,"div",10)(47,"div",15),d(48,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(49,"div",12),p(50,"i",18),a(),n(51,"div",14),f(52),d(53,"translate"),a()()(),x(54,ue,8,9,"div",10),x(55,_e,8,9,"div",10),x(56,fe,8,9,"div",10),n(57,"div",10)(58,"div",15),d(59,"translate"),_("keydown",function(g){return t.handleKeydown(g)}),n(60,"div",12),p(61,"i",19),a(),n(62,"div",14),f(63),d(64,"translate"),a()()(),x(65,ge,8,9,"div",10),x(66,ve,8,6,"div",10),x(67,he,8,6,"div",10),a()()),l&2&&(m("aria-expanded",t.isExpanded?"true":"false")("aria-controls","sidebar")("aria-label",s(1,37,"menu.sidebar.aria_menu")),o(3),c("routerLink",h(63,B)),m("aria-label",s(4,39,"menu.label_status")),o(5),c("ngClass",M(64,te,t.isExpanded)),o(5),c("ngClass",M(66,ne,t.isExpanded)),o(2),c("routerLink",h(68,B)),m("aria-label",s(16,41,"menu.label_status")),o(7),c("routerLink",h(69,B))("routerLinkActive","active")("routerLinkActiveOptions",h(70,ie)),m("aria-label",s(23,43,"menu.label_status")),o(5),v(s(28,45,"menu.label_status")),o(2),y(t.rPiWasUnderVoltage||t.rPiCurrentlyUnderVoltage?29:-1),o(2),c("routerLink",h(71,oe))("routerLinkActive","active"),m("aria-label",s(32,47,"menu.label_plugins")),o(5),v(s(37,49,"menu.label_plugins")),o(3),c("routerLink",h(72,re))("routerLinkActive","active"),m("aria-label",s(40,51,"menu.label_accessories")),o(5),v(s(45,53,"menu.label_accessories")),o(3),c("routerLink",h(73,ae))("routerLinkActive","active"),m("aria-label",s(48,55,"menu.linux.label_logs")),o(5),v(s(53,57,"menu.linux.label_logs")),o(2),y(t.enableTerminalAccess&&t.isAdmin?54:-1),o(),y(t.isAdmin?55:-1),o(),y(t.isAdmin?56:-1),o(2),c("routerLink",h(74,de))("routerLinkActive","active"),m("aria-label",s(59,59,"support.title")),o(5),v(s(64,61,"support.title")),o(2),y(t.isAdmin?65:-1),o(),y(t.isPwa?66:-1),o(),y(t.formAuth?67:-1))},dependencies:[N,K,O,D,U],styles:[".m-header[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:65px;z-index:510;display:flex;align-items:center;padding-left:3px;padding-right:3px}.m-header[_ngcontent-%COMP%]:hover{cursor:pointer}@media (min-width: 768px){.m-header[_ngcontent-%COMP%]{display:none}}.sidebar[_ngcontent-%COMP%]{position:fixed;left:0;top:0;height:100vh;transition:.3s;width:60px;z-index:500}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;padding:15px 10px 15px 11px;font-size:.85rem}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]:hover{cursor:pointer}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{overflow-y:auto;max-height:calc(100vh - 80px)!important}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%]{display:flex;align-items:center;padding:15px 10px;cursor:pointer;transition:.2s;font-size:17px}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{flex:0 0 38px;display:flex;align-items:center;justify-content:center}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1;transition:.3s;max-width:0;overflow:hidden;white-space:nowrap}@media (max-width: 767px){.sidebar[_ngcontent-%COMP%]{width:0}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:none}}.sidebar.expanded[_ngcontent-%COMP%]{width:210px}@media (max-width: 767px){.sidebar.expanded[_ngcontent-%COMP%]{width:210px}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:block}}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{max-width:150px;padding-left:10px}.hamburger-icon[_ngcontent-%COMP%]{margin:-7px 0 0 25px}@media (min-width: 768px){.hb-logo-text[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px}.sidebar.expanded[_ngcontent-%COMP%] .hb-logo-text[_ngcontent-%COMP%]{opacity:1;left:55px;transition:.3s}.sidebar[_ngcontent-%COMP%]:not(.expanded) .hb-logo-text[_ngcontent-%COMP%]{opacity:0;left:40px;transition:.3s}.hb-logo-text-mobile[_ngcontent-%COMP%], .hamburger-icon[_ngcontent-%COMP%]{display:none!important}}@media (max-width: 767px){.hb-logo-text[_ngcontent-%COMP%]{display:none!important}.hb-logo-text-mobile[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px;opacity:1;left:55px}.hamburger-icon[_ngcontent-%COMP%]{position:absolute;right:10px;top:28px;width:30px;transform:rotate(0);transition:.5s ease-in-out;cursor:pointer}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;position:absolute;height:2px;width:100%;background-color:#fff;border-radius:9px;opacity:1;left:0;transform:rotate(0);transition:.25s ease-in-out}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:0}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2), .hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){top:10px}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:20px}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:10px;width:0;left:50%}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2){transform:rotate(45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){transform:rotate(-45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:10px;width:0;left:50%}}"]})}return i})();var be=i=>({sidebarExpanded:i}),He=(()=>{class i{$auth=u(A);$modal=u(E);$router=u(V);$settings=u(T);$translate=u(L);$ws=u(j);io;sidebarExpanded=!1;ngOnInit(){this.io=this.$ws.connectToNamespace("app"),this.io.socket.on("reconnect",()=>{this.$auth.checkToken()}),this.compareServerUiVersion()}compareServerUiVersion(){return I(this,null,function*(){if(this.$settings.settingsLoaded||(yield z(this.$settings.onSettingsLoaded)),this.$router.url!=="/restart"&&(0,Q.lt)(this.$settings.uiVersion,$.serverTarget)){console.log(`Server restart required. UI Version: ${$.serverTarget} - Server Version: ${this.$settings.uiVersion} `);let e=this.$modal.open(R,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("platform.version.service_restart_required"),e.componentInstance.message=this.$translate.instant("platform.version.restart_required",{serverVersion:this.$settings.uiVersion,uiVersion:$.serverTarget}),e.componentInstance.confirmButtonLabel=this.$translate.instant("menu.tooltip_restart"),e.componentInstance.faIconClass="fas fa-power-off orange-text",e.result.then(()=>this.$router.navigate(["/restart"])).catch(()=>{})}})}static \u0275fac=function(l){return new(l||i)};static \u0275cmp=P({type:i,selectors:[["app-layout"]],decls:3,vars:4,consts:[[3,"isExpanded"],[1,"content","px-3","p-md-4",3,"ngClass"]],template:function(l,t){l&1&&(p(0,"app-sidebar",0),n(1,"div",1),p(2,"router-outlet"),a()),l&2&&(c("isExpanded",t.sidebarExpanded),o(),c("ngClass",M(2,be,t.sidebarExpanded)))},dependencies:[J,O,q],styles:[".content[_ngcontent-%COMP%]{margin-left:60px;transition:.3s;height:100%}@media (max-width: 767px){.content[_ngcontent-%COMP%]{margin-left:0;padding-top:85px!important}}@media (min-width: 768px){.content[_ngcontent-%COMP%]{height:100%}}a[_ngcontent-%COMP%]:hover{text-decoration:none!important}"]})}return i})();export{He as LayoutComponent};
|