homebridge-config-ui-x 5.3.1-beta.10 → 5.3.1-beta.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/CHANGELOG.md +1 -0
  2. package/package.json +1 -1
  3. package/public/{chunk-5KEJKADH.js → chunk-3VERR4Y7.js} +1 -1
  4. package/public/{chunk-4BBCG5I4.js → chunk-4W7LESGG.js} +1 -1
  5. package/public/{chunk-J7KVPPRV.js → chunk-6AP45CLO.js} +1 -1
  6. package/public/{chunk-WXQARLHJ.js → chunk-6BVMQPW4.js} +1 -1
  7. package/public/{chunk-4QIIABJ4.js → chunk-7CEURTBG.js} +1 -1
  8. package/public/{chunk-5NN3P4WI.js → chunk-7I7RQ6QU.js} +1 -1
  9. package/public/{chunk-RKMCLAQL.js → chunk-7NCAKPHZ.js} +1 -1
  10. package/public/{chunk-TGQUMEBP.js → chunk-7VO72V63.js} +1 -1
  11. package/public/{chunk-N5TNAMR6.js → chunk-A2XZHOOB.js} +1 -1
  12. package/public/{chunk-R2NZJIKS.js → chunk-CNFMHULD.js} +1 -1
  13. package/public/{chunk-HEGCEXAZ.js → chunk-CTYMZTHC.js} +1 -1
  14. package/public/{chunk-XZFUALBE.js → chunk-CXPKU37I.js} +1 -1
  15. package/public/{chunk-M6NSVIVL.js → chunk-D5YW5GE5.js} +1 -1
  16. package/public/{chunk-GSM7JSWE.js → chunk-EK7ZWILB.js} +1 -1
  17. package/public/{chunk-7PI3TP7B.js → chunk-FMFDIAYA.js} +1 -1
  18. package/public/{chunk-EWHYPY7G.js → chunk-FTBBQQL5.js} +1 -1
  19. package/public/{chunk-XKIOQX5U.js → chunk-G7VVADKI.js} +1 -1
  20. package/public/{chunk-IPXDPTDP.js → chunk-GICVEXBG.js} +1 -1
  21. package/public/{chunk-UBZCVY4M.js → chunk-GXASQBG6.js} +1 -1
  22. package/public/{chunk-QTNYLY3B.js → chunk-HTW5GBTL.js} +1 -1
  23. package/public/{chunk-7XWDCMGI.js → chunk-IDYZZ33S.js} +1 -1
  24. package/public/{chunk-QJ3EE734.js → chunk-IT3HWSJT.js} +1 -1
  25. package/public/{chunk-6UO5JCSI.js → chunk-JLHJSYHW.js} +1 -1
  26. package/public/{chunk-4XPFV5QM.js → chunk-KVCDR4JO.js} +1 -1
  27. package/public/{chunk-RX5WXXFZ.js → chunk-KYNS537J.js} +1 -1
  28. package/public/{chunk-KKBGGBZH.js → chunk-KYXNDUUV.js} +1 -1
  29. package/public/{chunk-KDSFLQHL.js → chunk-MDFIEZLZ.js} +1 -1
  30. package/public/{chunk-DE3ICEAN.js → chunk-NHKY42YU.js} +1 -1
  31. package/public/{chunk-4L2PTWQU.js → chunk-ONXVUIC2.js} +1 -1
  32. package/public/{chunk-MSWSD4TN.js → chunk-OQF6Q3XN.js} +1 -1
  33. package/public/{chunk-O5DNLKMW.js → chunk-PX3KHEGJ.js} +1 -1
  34. package/public/{chunk-F6N6SZFT.js → chunk-QNJSIPGD.js} +1 -1
  35. package/public/{chunk-NFX3TT7U.js → chunk-QSN5STGC.js} +1 -1
  36. package/public/{chunk-6Y4KT5KE.js → chunk-QTA5AAJD.js} +1 -1
  37. package/public/{chunk-X7T4I2Y7.js → chunk-RNOJBCNQ.js} +1 -1
  38. package/public/{chunk-Z24TYBME.js → chunk-T2TD57NG.js} +1 -1
  39. package/public/{chunk-CXZZHYNQ.js → chunk-TCXY6GQW.js} +1 -1
  40. package/public/{chunk-TGXOFWUT.js → chunk-TMHCO6N4.js} +1 -1
  41. package/public/{chunk-DGY43J2N.js → chunk-TN7CFQCA.js} +1 -1
  42. package/public/{chunk-7U5RB2FK.js → chunk-UU7TCLXJ.js} +1 -1
  43. package/public/{chunk-24QBUK36.js → chunk-UYR55FN2.js} +1 -1
  44. package/public/{chunk-FDSEL4VJ.js → chunk-VBST2Q6D.js} +1 -1
  45. package/public/{chunk-7SCV5TRV.js → chunk-W5NCKMJ2.js} +1 -1
  46. package/public/{chunk-NF6Q6H2U.js → chunk-X6FCWEF7.js} +1 -1
  47. package/public/chunk-X7W4HURN.js +12 -0
  48. package/public/{chunk-NRM6AE5C.js → chunk-XV7X4TNQ.js} +1 -1
  49. package/public/{chunk-6ZUM6263.js → chunk-ZNM6HLVR.js} +1 -1
  50. package/public/index.html +1 -1
  51. package/public/{main-ZUYAJZ4L.js → main-OKOUSXSN.js} +1 -1
  52. package/public/chunk-6CDSEN3W.js +0 -12
  53. /package/public/assets/{hap-icons → accessory-icons}/air-purifier.svg +0 -0
  54. /package/public/assets/{hap-icons → accessory-icons}/air-quality-sensor.svg +0 -0
  55. /package/public/assets/{hap-icons → accessory-icons}/carbon-dioxide-sensor.svg +0 -0
  56. /package/public/assets/{hap-icons → accessory-icons}/carbon-monoxide-sensor.svg +0 -0
  57. /package/public/assets/{hap-icons → accessory-icons}/doorbell.svg +0 -0
  58. /package/public/assets/{hap-icons → accessory-icons}/microphone.svg +0 -0
  59. /package/public/assets/{hap-icons → accessory-icons}/robot-vacuum.svg +0 -0
  60. /package/public/assets/{hap-icons → accessory-icons}/smoke-sensor.svg +0 -0
@@ -1 +1 @@
1
- import{e as ft,n as gt}from"./chunk-RJOGO4M5.js";import{Gb as M,Hb as E,Ob as l,Pb as h,Qb as p,Rb as F,Vb as Y,Wa as ht,Wb as K,Xa as q,_b as Q,a as u,ab as r,ac as mt,b as T,bc as j,db as dt,dc as c,e as It,ga as C,gb as y,ha as lt,ja as ct,ka as w,kd as J,la as _,ma as ut,mb as G,n as g,nb as pt,nc as A,pc as m,qc as f,ra as V,sa as z,sb as S,sc as b,ua as N,va as Z,vb as U,za as O}from"./chunk-WEVBEUAJ.js";var Tt=It((De,Ut)=>{Ut.exports={name:"homebridge-config-ui-x",displayName:"Homebridge UI",version:"5.3.1-beta.10",description:"A web based management, configuration and control platform for Homebridge.",author:"oznu <dev@oz.nu>",license:"MIT",funding:[{type:"github",url:"https://github.com/sponsors/oznu"},{type:"paypal",url:"https://paypal.me/oznu"}],repository:{type:"git",url:"git+https://github.com/homebridge/homebridge-config-ui-x.git"},bugs:{url:"https://github.com/homebridge/homebridge-config-ui-x/issues"},keywords:["homebridge-plugin","ui","gui","web","homebridge","homebridge-config-ui-x","ui-x","config-ui-x","homebridge-x","homebridge server","homebridge ui","homebridge-ui","homebridge gui","homebridge-gui","web interface","config ui","management","config editor","linux","macOS","osx","windows","raspberry pi","accessory control","smart home","hb-service"],main:"./dist/index.js",bin:{"hb-service":"dist/bin/hb-service.js"},engines:{node:"^20.19.0 || ^22.12.0 || ^24.0.0",homebridge:"^1.8.0 || ^2.0.0-beta.0"},scripts:{build:"npm run build:server && npm run build:ui","build:server":"rimraf dist && tsc -p tsconfig.build.json","build:ui":"npm run build --prefix ui",check:"npm run check:server && npm run check:ui","check:server":"npm install && npm outdated","check:ui":"npm install --prefix ui && npm outdated --prefix ui","lang-sync":"ts-node scripts/lang-sync.ts",lint:"eslint . --max-warnings=0","lint:fix":"npm run lint -- --fix",prepublishOnly:"npm i --package-lock-only && npm run lint && npm run build",start:"ts-node -r tsconfig-paths/register src/main.ts",test:"vitest run","test-coverage":"npm run test -- --coverage","upgrade-install":"./scripts/upgrade-install.sh",watch:'concurrently "npm run watch:ui" "npm run watch:server"',"watch:server":"nodemon","watch:ui":"npm run start --prefix ui"},dependencies:{"@fastify/helmet":"13.0.1","@fastify/multipart":"9.0.3","@fastify/static":"8.2.0","@homebridge/hap-client":"3.1.1","@homebridge/node-pty-prebuilt-multiarch":"0.14.1-beta.1","@nestjs/axios":"4.0.1","@nestjs/common":"11.1.5","@nestjs/core":"11.1.5","@nestjs/jwt":"11.0.0","@nestjs/passport":"11.0.5","@nestjs/platform-fastify":"11.1.5","@nestjs/platform-socket.io":"11.1.5","@nestjs/swagger":"11.2.0","@nestjs/websockets":"11.1.5",axios:"1.11.0","bash-color":"0.0.4","class-transformer":"0.5.1","class-validator":"0.14.2",commander:"14.0.0",dayjs:"1.11.13",fastify:"5.4.0","fs-extra":"11.3.0",jsonwebtoken:"9.0.2",lodash:"4.17.21","node-cache":"5.1.2","node-schedule":"2.1.1",ora:"8.2.0",otplib:"12.0.1","p-limit":"6.2.0",passport:"0.7.0","passport-jwt":"4.0.1","reflect-metadata":"0.2.2",rxjs:"7.8.2",semver:"7.7.2",systeminformation:"5.27.7",tail:"2.2.6",tar:"7.4.3","tcp-port-used":"1.0.2",unzipper:"0.12.3"},devDependencies:{"@antfu/eslint-config":"^5.0.0","@nestjs/testing":"^11.1.5","@prettier/plugin-xml":"^3.4.2","@types/fs-extra":"^11.0.4","@types/lodash":"^4.17.20","@types/node":"^24.1.0","@types/node-schedule":"^2.1.8","@types/passport-jwt":"^4.0.1","@types/semver":"^7.7.0","@types/tail":"^2.2.3","@types/tcp-port-used":"^1.0.4","@types/unzipper":"^0.10.11","@vitest/coverage-v8":"^3.2.4",concurrently:"^9.2.0","eslint-plugin-format":"^1.0.1","form-data":"^4.0.4",nodemon:"^3.1.10",rimraf:"^6.0.1","ts-loader":"^9.5.2","ts-node":"^10.9.2","tsconfig-paths":"^4.2.0",typescript:"^5.8.3","unplugin-swc":"^1.5.5",vitest:"^3.2.4"},maintainers:[{email:"bwp91@icloud.com",name:"bwp91"},{email:"dev@oz.nu",name:"oznu"},{email:"northern.man1@gmail.com",name:"northernman"},{email:"mail@anderl-bauer.de",name:"supereg"},{email:"khaos.tian@gmail.com",name:"khaost"},{email:"erik.baauw@xs4all.nl",name:"ebaauw"},{email:"donavan.becker@icloud.com",name:"donavanbecker"},{email:"dustin.greif@gmail.com",name:"dustin.greif"},{email:"nfarina@gmail.com",name:"nfarina"}],scarfSettings:{enabled:!1}}});var v=function(i){return i[i.State=0]="State",i[i.Transition=1]="Transition",i[i.Sequence=2]="Sequence",i[i.Group=3]="Group",i[i.Animate=4]="Animate",i[i.Keyframes=5]="Keyframes",i[i.Style=6]="Style",i[i.Trigger=7]="Trigger",i[i.Reference=8]="Reference",i[i.AnimateChild=9]="AnimateChild",i[i.AnimateRef=10]="AnimateRef",i[i.Query=11]="Query",i[i.Stagger=12]="Stagger",i}(v||{}),xt="*";function tt(i,s){return{type:v.Trigger,name:i,definitions:s,options:{}}}function P(i,s=null){return{type:v.Animate,styles:s,timings:i}}function Yt(i,s=null){return{type:v.Sequence,steps:i,options:s}}function R(i){return{type:v.Style,styles:i,offset:null}}function H(i,s,t){return{type:v.State,name:i,styles:s,options:t}}function B(i,s,t=null){return{type:v.Transition,expr:i,animation:s,options:t}}var W=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;constructor(s=0,t=0){this.totalTime=s+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(s=>s()),this._onDoneFns=[])}onStart(s){this._originalOnStartFns.push(s),this._onStartFns.push(s)}onDone(s){this._originalOnDoneFns.push(s),this._onDoneFns.push(s)}onDestroy(s){this._onDestroyFns.push(s)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(s=>s()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(s=>s()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(s){this._position=this.totalTime?s*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(s){let t=s=="start"?this._onStartFns:this._onDoneFns;t.forEach(e=>e()),t.length=0}},X=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(s){this.players=s;let t=0,e=0,n=0,o=this.players.length;o==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(a=>{a.onDone(()=>{++t==o&&this._onFinish()}),a.onDestroy(()=>{++e==o&&this._onDestroy()}),a.onStart(()=>{++n==o&&this._onStart()})}),this.totalTime=this.players.reduce((a,d)=>Math.max(a,d.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(s=>s()),this._onDoneFns=[])}init(){this.players.forEach(s=>s.init())}onStart(s){this._onStartFns.push(s)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(s=>s()),this._onStartFns=[])}onDone(s){this._onDoneFns.push(s)}onDestroy(s){this._onDestroyFns.push(s)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(s=>s.play())}pause(){this.players.forEach(s=>s.pause())}restart(){this.players.forEach(s=>s.restart())}finish(){this._onFinish(),this.players.forEach(s=>s.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(s=>s.destroy()),this._onDestroyFns.forEach(s=>s()),this._onDestroyFns=[])}reset(){this.players.forEach(s=>s.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(s){let t=s*this.totalTime;this.players.forEach(e=>{let n=e.totalTime?Math.min(1,t/e.totalTime):1;e.setPosition(n)})}getPosition(){let s=this.players.reduce((t,e)=>t===null||e.totalTime>t.totalTime?e:t,null);return s!=null?s.getPosition():0}beforeDestroy(){this.players.forEach(s=>{s.beforeDestroy&&s.beforeDestroy()})}triggerCallback(s){let t=s=="start"?this._onStartFns:this._onDoneFns;t.forEach(e=>e()),t.length=0}},Ot="!";var _t=["toast-component",""];function Et(i,s){if(i&1){let t=Q();h(0,"button",5),j("click",function(){V(t);let n=c();return z(n.remove())}),h(1,"span",6),f(2,"\xD7"),p()()}}function Ft(i,s){if(i&1&&(Y(0),f(1),K()),i&2){let t=c(2);r(),b("[",t.duplicatesCount+1,"]")}}function jt(i,s){if(i&1&&(h(0,"div"),f(1),S(2,Ft,2,1,"ng-container",4),p()),i&2){let t=c();m(t.options.titleClass),E("aria-label",t.title),r(),b(" ",t.title," "),r(),l("ngIf",t.duplicatesCount)}}function At(i,s){if(i&1&&F(0,"div",7),i&2){let t=c();m(t.options.messageClass),l("innerHTML",t.message,q)}}function Rt(i,s){if(i&1&&(h(0,"div",8),f(1),p()),i&2){let t=c();m(t.options.messageClass),E("aria-label",t.message),r(),b(" ",t.message," ")}}function Ht(i,s){if(i&1&&(h(0,"div"),F(1,"div",9),p()),i&2){let t=c();r(),A("width",t.width()+"%")}}function kt(i,s){if(i&1){let t=Q();h(0,"button",5),j("click",function(){V(t);let n=c();return z(n.remove())}),h(1,"span",6),f(2,"\xD7"),p()()}}function Nt(i,s){if(i&1&&(Y(0),f(1),K()),i&2){let t=c(2);r(),b("[",t.duplicatesCount+1,"]")}}function Mt(i,s){if(i&1&&(h(0,"div"),f(1),S(2,Nt,2,1,"ng-container",4),p()),i&2){let t=c();m(t.options.titleClass),E("aria-label",t.title),r(),b(" ",t.title," "),r(),l("ngIf",t.duplicatesCount)}}function Pt(i,s){if(i&1&&F(0,"div",7),i&2){let t=c();m(t.options.messageClass),l("innerHTML",t.message,q)}}function Bt(i,s){if(i&1&&(h(0,"div",8),f(1),p()),i&2){let t=c();m(t.options.messageClass),E("aria-label",t.message),r(),b(" ",t.message," ")}}function $t(i,s){if(i&1&&(h(0,"div"),F(1,"div",9),p()),i&2){let t=c();r(),A("width",t.width()+"%")}}var et=class{_attachedHost;component;viewContainerRef;injector;constructor(s,t){this.component=s,this.injector=t}attach(s,t){return this._attachedHost=s,s.attach(this,t)}detach(){let s=this._attachedHost;if(s)return this._attachedHost=void 0,s.detach()}get isAttached(){return this._attachedHost!=null}setAttachedHost(s){this._attachedHost=s}},it=class{_attachedPortal;_disposeFn;attach(s,t){return this._attachedPortal=s,this.attachComponentPortal(s,t)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(s){this._disposeFn=s}},st=class{_overlayRef;componentInstance;duplicatesCount=0;_afterClosed=new g;_activate=new g;_manualClose=new g;_resetTimeout=new g;_countDuplicate=new g;constructor(s){this._overlayRef=s}manualClose(){this._manualClose.next(),this._manualClose.complete()}manualClosed(){return this._manualClose.asObservable()}timeoutReset(){return this._resetTimeout.asObservable()}countDuplicate(){return this._countDuplicate.asObservable()}close(){this._overlayRef.detach(),this._afterClosed.next(),this._manualClose.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete(),this._resetTimeout.complete(),this._countDuplicate.complete()}afterClosed(){return this._afterClosed.asObservable()}isInactive(){return this._activate.isStopped}activate(){this._activate.next(),this._activate.complete()}afterActivate(){return this._activate.asObservable()}onDuplicate(s,t){s&&this._resetTimeout.next(),t&&this._countDuplicate.next(++this.duplicatesCount)}},D=class{toastId;config;message;title;toastType;toastRef;_onTap=new g;_onAction=new g;constructor(s,t,e,n,o,a){this.toastId=s,this.config=t,this.message=e,this.title=n,this.toastType=o,this.toastRef=a,this.toastRef.afterClosed().subscribe(()=>{this._onAction.complete(),this._onTap.complete()})}triggerTap(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()}onTap(){return this._onTap.asObservable()}triggerAction(s){this._onAction.next(s)}onAction(){return this._onAction.asObservable()}},vt={maxOpened:0,autoDismiss:!1,newestOnTop:!0,preventDuplicates:!1,countDuplicates:!1,resetTimeoutOnDuplicate:!1,includeTitleDuplicates:!1,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},closeButton:!1,disableTimeOut:!1,timeOut:5e3,extendedTimeOut:1e3,enableHtml:!1,progressBar:!1,toastClass:"ngx-toastr",positionClass:"toast-top-right",titleClass:"toast-title",messageClass:"toast-message",easing:"ease-in",easeTime:300,tapToDismiss:!0,onActivateTick:!1,progressAnimation:"decreasing"},yt=new ct("ToastConfig"),nt=class extends it{_hostDomElement;_componentFactoryResolver;_appRef;constructor(s,t,e){super(),this._hostDomElement=s,this._componentFactoryResolver=t,this._appRef=e}attachComponentPortal(s,t){let e=this._componentFactoryResolver.resolveComponentFactory(s.component),n;return n=e.create(s.injector),this._appRef.attachView(n.hostView),this.setDisposeFn(()=>{this._appRef.detachView(n.hostView),n.destroy()}),t?this._hostDomElement.insertBefore(this._getComponentRootNode(n),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(n)),n}_getComponentRootNode(s){return s.hostView.rootNodes[0]}},Lt=(()=>{class i{_document=_(Z);_containerElement;ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let t=this._document.createElement("div");t.classList.add("overlay-container"),t.setAttribute("aria-live","polite"),this._document.body.appendChild(t),this._containerElement=t}static \u0275fac=function(e){return new(e||i)};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),ot=class{_portalHost;constructor(s){this._portalHost=s}attach(s,t=!0){return this._portalHost.attach(s,t)}detach(){return this._portalHost.detach()}},Vt=(()=>{class i{_overlayContainer=_(Lt);_componentFactoryResolver=_(dt);_appRef=_(M);_document=_(Z);_paneElements=new Map;create(t,e){return this._createOverlayRef(this.getPaneElement(t,e))}getPaneElement(t="",e){return this._paneElements.get(e)||this._paneElements.set(e,{}),this._paneElements.get(e)[t]||(this._paneElements.get(e)[t]=this._createPaneElement(t,e)),this._paneElements.get(e)[t]}_createPaneElement(t,e){let n=this._document.createElement("div");return n.id="toast-container",n.classList.add(t),n.classList.add("toast-container"),e?e.getContainerElement().appendChild(n):this._overlayContainer.getContainerElement().appendChild(n),n}_createPortalHost(t){return new nt(t,this._componentFactoryResolver,this._appRef)}_createOverlayRef(t){return new ot(this._createPortalHost(t))}static \u0275fac=function(e){return new(e||i)};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),bt=(()=>{class i{overlay;_injector;sanitizer;ngZone;toastrConfig;currentlyActive=0;toasts=[];overlayContainer;previousToastMessage;index=0;constructor(t,e,n,o,a){this.overlay=e,this._injector=n,this.sanitizer=o,this.ngZone=a,this.toastrConfig=u(u({},t.default),t.config),t.config.iconClasses&&(this.toastrConfig.iconClasses=u(u({},t.default.iconClasses),t.config.iconClasses))}show(t,e,n={},o=""){return this._preBuildNotification(o,t,e,this.applyConfig(n))}success(t,e,n={}){let o=this.toastrConfig.iconClasses.success||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}error(t,e,n={}){let o=this.toastrConfig.iconClasses.error||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}info(t,e,n={}){let o=this.toastrConfig.iconClasses.info||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}warning(t,e,n={}){let o=this.toastrConfig.iconClasses.warning||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}clear(t){for(let e of this.toasts)if(t!==void 0){if(e.toastId===t){e.toastRef.manualClose();return}}else e.toastRef.manualClose()}remove(t){let e=this._findToast(t);if(!e||(e.activeToast.toastRef.close(),this.toasts.splice(e.index,1),this.currentlyActive=this.currentlyActive-1,!this.toastrConfig.maxOpened||!this.toasts.length))return!1;if(this.currentlyActive<this.toastrConfig.maxOpened&&this.toasts[this.currentlyActive]){let n=this.toasts[this.currentlyActive].toastRef;n.isInactive()||(this.currentlyActive=this.currentlyActive+1,n.activate())}return!0}findDuplicate(t="",e="",n,o){let{includeTitleDuplicates:a}=this.toastrConfig;for(let d of this.toasts){let k=a&&d.title===t;if((!a||k)&&d.message===e)return d.toastRef.onDuplicate(n,o),d}return null}applyConfig(t={}){return u(u({},this.toastrConfig),t)}_findToast(t){for(let e=0;e<this.toasts.length;e++)if(this.toasts[e].toastId===t)return{index:e,activeToast:this.toasts[e]};return null}_preBuildNotification(t,e,n,o){return o.onActivateTick?this.ngZone.run(()=>this._buildNotification(t,e,n,o)):this._buildNotification(t,e,n,o)}_buildNotification(t,e,n,o){if(!o.toastComponent)throw new Error("toastComponent required");let a=this.findDuplicate(n,e,this.toastrConfig.resetTimeoutOnDuplicate&&o.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&n||e)&&this.toastrConfig.preventDuplicates&&a!==null)return a;this.previousToastMessage=e;let d=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(d=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));let k=this.overlay.create(o.positionClass,this.overlayContainer);this.index=this.index+1;let rt=e;e&&o.enableHtml&&(rt=this.sanitizer.sanitize(ht.HTML,e));let x=new st(k),$=new D(this.index,o,rt,n,t,x),Ct=[{provide:D,useValue:$}],wt=N.create({providers:Ct,parent:this._injector}),Dt=new et(o.toastComponent,wt),at=k.attach(Dt,o.newestOnTop);x.componentInstance=at.instance;let L={toastId:this.index,title:n||"",message:e||"",toastRef:x,onShown:x.afterActivate(),onHidden:x.afterClosed(),onTap:$.onTap(),onAction:$.onAction(),portal:at};return d||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{L.toastRef.activate()})),this.toasts.push(L),L}static \u0275fac=function(e){return new(e||i)(w(yt),w(Vt),w(N),w(gt),w(U))};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),zt=(()=>{class i{toastrService;toastPackage;ngZone;message;title;options;duplicatesCount;originalTimeout;width=O(-1);toastClasses="";state;get _state(){return this.state()}get displayStyle(){if(this.state().value==="inactive")return"none"}timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,e,n){this.toastrService=t,this.toastPackage=e,this.ngZone=n,this.message=e.message,this.title=e.title,this.options=e.config,this.originalTimeout=e.config.timeOut,this.toastClasses=`${e.toastType} ${e.config.toastClass}`,this.sub=e.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=e.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=e.toastRef.countDuplicate().subscribe(o=>{this.duplicatesCount=o}),this.state=O({value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.update(t=>T(u({},t),{value:"active"})),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.outsideTimeout(()=>this.remove(),this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let t=new Date().getTime(),e=this.hideTime-t;this.width.set(e/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(n=>100-n),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.update(t=>T(u({},t),{value:"active"})),this.outsideTimeout(()=>this.remove(),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10)}remove(){this.state().value!=="removed"&&(clearTimeout(this.timeout),this.state.update(t=>T(u({},t),{value:"removed"})),this.outsideTimeout(()=>this.toastrService.remove(this.toastPackage.toastId),+this.toastPackage.config.easeTime))}tapToast(){this.state().value!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state().value!=="removed"&&this.options.disableTimeOut!=="extendedTimeOut"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state().value==="removed"||(this.outsideTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}outsideTimeout(t,e){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(t),e)):this.timeout=setTimeout(()=>t(),e)}outsideInterval(t,e){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(t),e)):this.intervalId=setInterval(()=>t(),e)}runInsideAngular(t){this.ngZone?this.ngZone.run(()=>t()):t()}static \u0275fac=function(e){return new(e||i)(y(bt),y(D),y(U))};static \u0275cmp=G({type:i,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(e,n){e&1&&j("click",function(){return n.tapToast()})("mouseenter",function(){return n.stickAround()})("mouseleave",function(){return n.delayedHideToast()}),e&2&&(mt("@flyInOut",n._state),m(n.toastClasses),A("display",n.displayStyle))},attrs:_t,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(e,n){e&1&&S(0,Et,3,0,"button",0)(1,jt,3,5,"div",1)(2,At,1,3,"div",2)(3,Rt,2,4,"div",3)(4,Ht,2,2,"div",4),e&2&&(l("ngIf",n.options.closeButton),r(),l("ngIf",n.title),r(),l("ngIf",n.message&&n.options.enableHtml),r(),l("ngIf",n.message&&!n.options.enableHtml),r(),l("ngIf",n.options.progressBar))},dependencies:[J],encapsulation:2,data:{animation:[tt("flyInOut",[H("inactive",R({opacity:0})),H("active",R({opacity:1})),H("removed",R({opacity:0})),B("inactive => active",P("{{ easeTime }}ms {{ easing }}")),B("active => removed",P("{{ easeTime }}ms {{ easing }}"))])]},changeDetection:0})}return i})(),Zt=T(u({},vt),{toastComponent:zt}),qt=(i={})=>ut([{provide:yt,useValue:{default:Zt,config:i}}]),be=(()=>{class i{static forRoot(t={}){return{ngModule:i,providers:[qt(t)]}}static \u0275fac=function(e){return new(e||i)};static \u0275mod=pt({type:i});static \u0275inj=lt({})}return i})();var Gt=(()=>{class i{toastrService;toastPackage;appRef;message;title;options;duplicatesCount;originalTimeout;width=O(-1);toastClasses="";get displayStyle(){return this.state()==="inactive"?"none":null}state=O("inactive");timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,e,n){this.toastrService=t,this.toastPackage=e,this.appRef=n,this.message=e.message,this.title=e.title,this.options=e.config,this.originalTimeout=e.config.timeOut,this.toastClasses=`${e.toastType} ${e.config.toastClass}`,this.sub=e.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=e.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=e.toastRef.countDuplicate().subscribe(o=>{this.duplicatesCount=o})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.set("active"),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.timeout=setTimeout(()=>{this.remove()},this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))),this.options.onActivateTick&&this.appRef.tick()}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let t=new Date().getTime(),e=this.hideTime-t;this.width.set(e/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(n=>100-n),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.set("active"),this.options.timeOut=this.originalTimeout,this.timeout=setTimeout(()=>this.remove(),this.originalTimeout),this.hideTime=new Date().getTime()+(this.originalTimeout||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))}remove(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.state.set("removed"),this.timeout=setTimeout(()=>this.toastrService.remove(this.toastPackage.toastId)))}tapToast(){this.state()!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state()==="removed"||(this.timeout=setTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10)))}static \u0275fac=function(e){return new(e||i)(y(bt),y(D),y(M))};static \u0275cmp=G({type:i,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(e,n){e&1&&j("click",function(){return n.tapToast()})("mouseenter",function(){return n.stickAround()})("mouseleave",function(){return n.delayedHideToast()}),e&2&&(m(n.toastClasses),A("display",n.displayStyle))},attrs:_t,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(e,n){e&1&&S(0,kt,3,0,"button",0)(1,Mt,3,5,"div",1)(2,Pt,1,3,"div",2)(3,Bt,2,4,"div",3)(4,$t,2,2,"div",4),e&2&&(l("ngIf",n.options.closeButton),r(),l("ngIf",n.title),r(),l("ngIf",n.message&&n.options.enableHtml),r(),l("ngIf",n.message&&!n.options.enableHtml),r(),l("ngIf",n.options.progressBar))},dependencies:[J],encapsulation:2,changeDetection:0})}return i})(),Te=T(u({},vt),{toastComponent:Gt});var I={serverTarget:Tt().version,production:!0,socket:"",api:{base:"/api",socket:`${window.location.protocol==="http:"?"ws://":"wss://"}${window.location.host}`,origin:window.location.origin},jwt:{tokenKey:"access_token",allowedDomains:[document.location.host],disallowedRoutes:[`${window.location.protocol}//${document.location.host}/api/auth/login`]},apiHttpOptions:{},owm:{appid:"fec67b55f7f74deaa28df89ba6a60821"}};var Fe=(()=>{class i{$http=_(ft);get(t,e){return this.$http.get(`${I.api.base}${t}`,e)}post(t,e,n){return this.$http.post(`${I.api.base}${t}`,e,n)}put(t,e,n){return this.$http.put(`${I.api.base}${t}`,e,n)}patch(t,e,n){return this.$http.patch(`${I.api.base}${t}`,e,n)}delete(t,e){return this.$http.delete(`${I.api.base}${t}`,e)}static \u0275fac=function(e){return new(e||i)};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();export{v as a,xt as b,tt as c,P as d,Yt as e,R as f,B as g,W as h,X as i,Ot as j,bt as k,be as l,I as m,Fe as n};
1
+ import{e as ft,n as gt}from"./chunk-RJOGO4M5.js";import{Gb as M,Hb as E,Ob as l,Pb as h,Qb as p,Rb as F,Vb as Y,Wa as ht,Wb as K,Xa as q,_b as Q,a as u,ab as r,ac as mt,b as T,bc as j,db as dt,dc as c,e as It,ga as C,gb as y,ha as lt,ja as ct,ka as w,kd as J,la as _,ma as ut,mb as G,n as g,nb as pt,nc as A,pc as m,qc as f,ra as V,sa as z,sb as S,sc as b,ua as N,va as Z,vb as U,za as O}from"./chunk-WEVBEUAJ.js";var Tt=It((De,Ut)=>{Ut.exports={name:"homebridge-config-ui-x",displayName:"Homebridge UI",version:"5.3.1-beta.11",description:"A web based management, configuration and control platform for Homebridge.",author:"oznu <dev@oz.nu>",license:"MIT",funding:[{type:"github",url:"https://github.com/sponsors/oznu"},{type:"paypal",url:"https://paypal.me/oznu"}],repository:{type:"git",url:"git+https://github.com/homebridge/homebridge-config-ui-x.git"},bugs:{url:"https://github.com/homebridge/homebridge-config-ui-x/issues"},keywords:["homebridge-plugin","ui","gui","web","homebridge","homebridge-config-ui-x","ui-x","config-ui-x","homebridge-x","homebridge server","homebridge ui","homebridge-ui","homebridge gui","homebridge-gui","web interface","config ui","management","config editor","linux","macOS","osx","windows","raspberry pi","accessory control","smart home","hb-service"],main:"./dist/index.js",bin:{"hb-service":"dist/bin/hb-service.js"},engines:{node:"^20.19.0 || ^22.12.0 || ^24.0.0",homebridge:"^1.8.0 || ^2.0.0-beta.0"},scripts:{build:"npm run build:server && npm run build:ui","build:server":"rimraf dist && tsc -p tsconfig.build.json","build:ui":"npm run build --prefix ui",check:"npm run check:server && npm run check:ui","check:server":"npm install && npm outdated","check:ui":"npm install --prefix ui && npm outdated --prefix ui","lang-sync":"ts-node scripts/lang-sync.ts",lint:"eslint . --max-warnings=0","lint:fix":"npm run lint -- --fix",prepublishOnly:"npm i --package-lock-only && npm run lint && npm run build",start:"ts-node -r tsconfig-paths/register src/main.ts",test:"vitest run","test-coverage":"npm run test -- --coverage","upgrade-install":"./scripts/upgrade-install.sh",watch:'concurrently "npm run watch:ui" "npm run watch:server"',"watch:server":"nodemon","watch:ui":"npm run start --prefix ui"},dependencies:{"@fastify/helmet":"13.0.1","@fastify/multipart":"9.0.3","@fastify/static":"8.2.0","@homebridge/hap-client":"3.1.1","@homebridge/node-pty-prebuilt-multiarch":"0.14.1-beta.1","@nestjs/axios":"4.0.1","@nestjs/common":"11.1.5","@nestjs/core":"11.1.5","@nestjs/jwt":"11.0.0","@nestjs/passport":"11.0.5","@nestjs/platform-fastify":"11.1.5","@nestjs/platform-socket.io":"11.1.5","@nestjs/swagger":"11.2.0","@nestjs/websockets":"11.1.5",axios:"1.11.0","bash-color":"0.0.4","class-transformer":"0.5.1","class-validator":"0.14.2",commander:"14.0.0",dayjs:"1.11.13",fastify:"5.4.0","fs-extra":"11.3.0",jsonwebtoken:"9.0.2",lodash:"4.17.21","node-cache":"5.1.2","node-schedule":"2.1.1",ora:"8.2.0",otplib:"12.0.1","p-limit":"6.2.0",passport:"0.7.0","passport-jwt":"4.0.1","reflect-metadata":"0.2.2",rxjs:"7.8.2",semver:"7.7.2",systeminformation:"5.27.7",tail:"2.2.6",tar:"7.4.3","tcp-port-used":"1.0.2",unzipper:"0.12.3"},devDependencies:{"@antfu/eslint-config":"^5.0.0","@nestjs/testing":"^11.1.5","@prettier/plugin-xml":"^3.4.2","@types/fs-extra":"^11.0.4","@types/lodash":"^4.17.20","@types/node":"^24.1.0","@types/node-schedule":"^2.1.8","@types/passport-jwt":"^4.0.1","@types/semver":"^7.7.0","@types/tail":"^2.2.3","@types/tcp-port-used":"^1.0.4","@types/unzipper":"^0.10.11","@vitest/coverage-v8":"^3.2.4",concurrently:"^9.2.0","eslint-plugin-format":"^1.0.1","form-data":"^4.0.4",nodemon:"^3.1.10",rimraf:"^6.0.1","ts-loader":"^9.5.2","ts-node":"^10.9.2","tsconfig-paths":"^4.2.0",typescript:"^5.8.3","unplugin-swc":"^1.5.5",vitest:"^3.2.4"},maintainers:[{email:"bwp91@icloud.com",name:"bwp91"},{email:"dev@oz.nu",name:"oznu"},{email:"northern.man1@gmail.com",name:"northernman"},{email:"mail@anderl-bauer.de",name:"supereg"},{email:"khaos.tian@gmail.com",name:"khaost"},{email:"erik.baauw@xs4all.nl",name:"ebaauw"},{email:"donavan.becker@icloud.com",name:"donavanbecker"},{email:"dustin.greif@gmail.com",name:"dustin.greif"},{email:"nfarina@gmail.com",name:"nfarina"}],scarfSettings:{enabled:!1}}});var v=function(i){return i[i.State=0]="State",i[i.Transition=1]="Transition",i[i.Sequence=2]="Sequence",i[i.Group=3]="Group",i[i.Animate=4]="Animate",i[i.Keyframes=5]="Keyframes",i[i.Style=6]="Style",i[i.Trigger=7]="Trigger",i[i.Reference=8]="Reference",i[i.AnimateChild=9]="AnimateChild",i[i.AnimateRef=10]="AnimateRef",i[i.Query=11]="Query",i[i.Stagger=12]="Stagger",i}(v||{}),xt="*";function tt(i,s){return{type:v.Trigger,name:i,definitions:s,options:{}}}function P(i,s=null){return{type:v.Animate,styles:s,timings:i}}function Yt(i,s=null){return{type:v.Sequence,steps:i,options:s}}function R(i){return{type:v.Style,styles:i,offset:null}}function H(i,s,t){return{type:v.State,name:i,styles:s,options:t}}function B(i,s,t=null){return{type:v.Transition,expr:i,animation:s,options:t}}var W=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;constructor(s=0,t=0){this.totalTime=s+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(s=>s()),this._onDoneFns=[])}onStart(s){this._originalOnStartFns.push(s),this._onStartFns.push(s)}onDone(s){this._originalOnDoneFns.push(s),this._onDoneFns.push(s)}onDestroy(s){this._onDestroyFns.push(s)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(s=>s()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(s=>s()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(s){this._position=this.totalTime?s*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(s){let t=s=="start"?this._onStartFns:this._onDoneFns;t.forEach(e=>e()),t.length=0}},X=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(s){this.players=s;let t=0,e=0,n=0,o=this.players.length;o==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(a=>{a.onDone(()=>{++t==o&&this._onFinish()}),a.onDestroy(()=>{++e==o&&this._onDestroy()}),a.onStart(()=>{++n==o&&this._onStart()})}),this.totalTime=this.players.reduce((a,d)=>Math.max(a,d.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(s=>s()),this._onDoneFns=[])}init(){this.players.forEach(s=>s.init())}onStart(s){this._onStartFns.push(s)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(s=>s()),this._onStartFns=[])}onDone(s){this._onDoneFns.push(s)}onDestroy(s){this._onDestroyFns.push(s)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(s=>s.play())}pause(){this.players.forEach(s=>s.pause())}restart(){this.players.forEach(s=>s.restart())}finish(){this._onFinish(),this.players.forEach(s=>s.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(s=>s.destroy()),this._onDestroyFns.forEach(s=>s()),this._onDestroyFns=[])}reset(){this.players.forEach(s=>s.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(s){let t=s*this.totalTime;this.players.forEach(e=>{let n=e.totalTime?Math.min(1,t/e.totalTime):1;e.setPosition(n)})}getPosition(){let s=this.players.reduce((t,e)=>t===null||e.totalTime>t.totalTime?e:t,null);return s!=null?s.getPosition():0}beforeDestroy(){this.players.forEach(s=>{s.beforeDestroy&&s.beforeDestroy()})}triggerCallback(s){let t=s=="start"?this._onStartFns:this._onDoneFns;t.forEach(e=>e()),t.length=0}},Ot="!";var _t=["toast-component",""];function Et(i,s){if(i&1){let t=Q();h(0,"button",5),j("click",function(){V(t);let n=c();return z(n.remove())}),h(1,"span",6),f(2,"\xD7"),p()()}}function Ft(i,s){if(i&1&&(Y(0),f(1),K()),i&2){let t=c(2);r(),b("[",t.duplicatesCount+1,"]")}}function jt(i,s){if(i&1&&(h(0,"div"),f(1),S(2,Ft,2,1,"ng-container",4),p()),i&2){let t=c();m(t.options.titleClass),E("aria-label",t.title),r(),b(" ",t.title," "),r(),l("ngIf",t.duplicatesCount)}}function At(i,s){if(i&1&&F(0,"div",7),i&2){let t=c();m(t.options.messageClass),l("innerHTML",t.message,q)}}function Rt(i,s){if(i&1&&(h(0,"div",8),f(1),p()),i&2){let t=c();m(t.options.messageClass),E("aria-label",t.message),r(),b(" ",t.message," ")}}function Ht(i,s){if(i&1&&(h(0,"div"),F(1,"div",9),p()),i&2){let t=c();r(),A("width",t.width()+"%")}}function kt(i,s){if(i&1){let t=Q();h(0,"button",5),j("click",function(){V(t);let n=c();return z(n.remove())}),h(1,"span",6),f(2,"\xD7"),p()()}}function Nt(i,s){if(i&1&&(Y(0),f(1),K()),i&2){let t=c(2);r(),b("[",t.duplicatesCount+1,"]")}}function Mt(i,s){if(i&1&&(h(0,"div"),f(1),S(2,Nt,2,1,"ng-container",4),p()),i&2){let t=c();m(t.options.titleClass),E("aria-label",t.title),r(),b(" ",t.title," "),r(),l("ngIf",t.duplicatesCount)}}function Pt(i,s){if(i&1&&F(0,"div",7),i&2){let t=c();m(t.options.messageClass),l("innerHTML",t.message,q)}}function Bt(i,s){if(i&1&&(h(0,"div",8),f(1),p()),i&2){let t=c();m(t.options.messageClass),E("aria-label",t.message),r(),b(" ",t.message," ")}}function $t(i,s){if(i&1&&(h(0,"div"),F(1,"div",9),p()),i&2){let t=c();r(),A("width",t.width()+"%")}}var et=class{_attachedHost;component;viewContainerRef;injector;constructor(s,t){this.component=s,this.injector=t}attach(s,t){return this._attachedHost=s,s.attach(this,t)}detach(){let s=this._attachedHost;if(s)return this._attachedHost=void 0,s.detach()}get isAttached(){return this._attachedHost!=null}setAttachedHost(s){this._attachedHost=s}},it=class{_attachedPortal;_disposeFn;attach(s,t){return this._attachedPortal=s,this.attachComponentPortal(s,t)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(s){this._disposeFn=s}},st=class{_overlayRef;componentInstance;duplicatesCount=0;_afterClosed=new g;_activate=new g;_manualClose=new g;_resetTimeout=new g;_countDuplicate=new g;constructor(s){this._overlayRef=s}manualClose(){this._manualClose.next(),this._manualClose.complete()}manualClosed(){return this._manualClose.asObservable()}timeoutReset(){return this._resetTimeout.asObservable()}countDuplicate(){return this._countDuplicate.asObservable()}close(){this._overlayRef.detach(),this._afterClosed.next(),this._manualClose.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete(),this._resetTimeout.complete(),this._countDuplicate.complete()}afterClosed(){return this._afterClosed.asObservable()}isInactive(){return this._activate.isStopped}activate(){this._activate.next(),this._activate.complete()}afterActivate(){return this._activate.asObservable()}onDuplicate(s,t){s&&this._resetTimeout.next(),t&&this._countDuplicate.next(++this.duplicatesCount)}},D=class{toastId;config;message;title;toastType;toastRef;_onTap=new g;_onAction=new g;constructor(s,t,e,n,o,a){this.toastId=s,this.config=t,this.message=e,this.title=n,this.toastType=o,this.toastRef=a,this.toastRef.afterClosed().subscribe(()=>{this._onAction.complete(),this._onTap.complete()})}triggerTap(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()}onTap(){return this._onTap.asObservable()}triggerAction(s){this._onAction.next(s)}onAction(){return this._onAction.asObservable()}},vt={maxOpened:0,autoDismiss:!1,newestOnTop:!0,preventDuplicates:!1,countDuplicates:!1,resetTimeoutOnDuplicate:!1,includeTitleDuplicates:!1,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},closeButton:!1,disableTimeOut:!1,timeOut:5e3,extendedTimeOut:1e3,enableHtml:!1,progressBar:!1,toastClass:"ngx-toastr",positionClass:"toast-top-right",titleClass:"toast-title",messageClass:"toast-message",easing:"ease-in",easeTime:300,tapToDismiss:!0,onActivateTick:!1,progressAnimation:"decreasing"},yt=new ct("ToastConfig"),nt=class extends it{_hostDomElement;_componentFactoryResolver;_appRef;constructor(s,t,e){super(),this._hostDomElement=s,this._componentFactoryResolver=t,this._appRef=e}attachComponentPortal(s,t){let e=this._componentFactoryResolver.resolveComponentFactory(s.component),n;return n=e.create(s.injector),this._appRef.attachView(n.hostView),this.setDisposeFn(()=>{this._appRef.detachView(n.hostView),n.destroy()}),t?this._hostDomElement.insertBefore(this._getComponentRootNode(n),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(n)),n}_getComponentRootNode(s){return s.hostView.rootNodes[0]}},Lt=(()=>{class i{_document=_(Z);_containerElement;ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let t=this._document.createElement("div");t.classList.add("overlay-container"),t.setAttribute("aria-live","polite"),this._document.body.appendChild(t),this._containerElement=t}static \u0275fac=function(e){return new(e||i)};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),ot=class{_portalHost;constructor(s){this._portalHost=s}attach(s,t=!0){return this._portalHost.attach(s,t)}detach(){return this._portalHost.detach()}},Vt=(()=>{class i{_overlayContainer=_(Lt);_componentFactoryResolver=_(dt);_appRef=_(M);_document=_(Z);_paneElements=new Map;create(t,e){return this._createOverlayRef(this.getPaneElement(t,e))}getPaneElement(t="",e){return this._paneElements.get(e)||this._paneElements.set(e,{}),this._paneElements.get(e)[t]||(this._paneElements.get(e)[t]=this._createPaneElement(t,e)),this._paneElements.get(e)[t]}_createPaneElement(t,e){let n=this._document.createElement("div");return n.id="toast-container",n.classList.add(t),n.classList.add("toast-container"),e?e.getContainerElement().appendChild(n):this._overlayContainer.getContainerElement().appendChild(n),n}_createPortalHost(t){return new nt(t,this._componentFactoryResolver,this._appRef)}_createOverlayRef(t){return new ot(this._createPortalHost(t))}static \u0275fac=function(e){return new(e||i)};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),bt=(()=>{class i{overlay;_injector;sanitizer;ngZone;toastrConfig;currentlyActive=0;toasts=[];overlayContainer;previousToastMessage;index=0;constructor(t,e,n,o,a){this.overlay=e,this._injector=n,this.sanitizer=o,this.ngZone=a,this.toastrConfig=u(u({},t.default),t.config),t.config.iconClasses&&(this.toastrConfig.iconClasses=u(u({},t.default.iconClasses),t.config.iconClasses))}show(t,e,n={},o=""){return this._preBuildNotification(o,t,e,this.applyConfig(n))}success(t,e,n={}){let o=this.toastrConfig.iconClasses.success||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}error(t,e,n={}){let o=this.toastrConfig.iconClasses.error||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}info(t,e,n={}){let o=this.toastrConfig.iconClasses.info||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}warning(t,e,n={}){let o=this.toastrConfig.iconClasses.warning||"";return this._preBuildNotification(o,t,e,this.applyConfig(n))}clear(t){for(let e of this.toasts)if(t!==void 0){if(e.toastId===t){e.toastRef.manualClose();return}}else e.toastRef.manualClose()}remove(t){let e=this._findToast(t);if(!e||(e.activeToast.toastRef.close(),this.toasts.splice(e.index,1),this.currentlyActive=this.currentlyActive-1,!this.toastrConfig.maxOpened||!this.toasts.length))return!1;if(this.currentlyActive<this.toastrConfig.maxOpened&&this.toasts[this.currentlyActive]){let n=this.toasts[this.currentlyActive].toastRef;n.isInactive()||(this.currentlyActive=this.currentlyActive+1,n.activate())}return!0}findDuplicate(t="",e="",n,o){let{includeTitleDuplicates:a}=this.toastrConfig;for(let d of this.toasts){let k=a&&d.title===t;if((!a||k)&&d.message===e)return d.toastRef.onDuplicate(n,o),d}return null}applyConfig(t={}){return u(u({},this.toastrConfig),t)}_findToast(t){for(let e=0;e<this.toasts.length;e++)if(this.toasts[e].toastId===t)return{index:e,activeToast:this.toasts[e]};return null}_preBuildNotification(t,e,n,o){return o.onActivateTick?this.ngZone.run(()=>this._buildNotification(t,e,n,o)):this._buildNotification(t,e,n,o)}_buildNotification(t,e,n,o){if(!o.toastComponent)throw new Error("toastComponent required");let a=this.findDuplicate(n,e,this.toastrConfig.resetTimeoutOnDuplicate&&o.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&n||e)&&this.toastrConfig.preventDuplicates&&a!==null)return a;this.previousToastMessage=e;let d=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(d=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));let k=this.overlay.create(o.positionClass,this.overlayContainer);this.index=this.index+1;let rt=e;e&&o.enableHtml&&(rt=this.sanitizer.sanitize(ht.HTML,e));let x=new st(k),$=new D(this.index,o,rt,n,t,x),Ct=[{provide:D,useValue:$}],wt=N.create({providers:Ct,parent:this._injector}),Dt=new et(o.toastComponent,wt),at=k.attach(Dt,o.newestOnTop);x.componentInstance=at.instance;let L={toastId:this.index,title:n||"",message:e||"",toastRef:x,onShown:x.afterActivate(),onHidden:x.afterClosed(),onTap:$.onTap(),onAction:$.onAction(),portal:at};return d||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{L.toastRef.activate()})),this.toasts.push(L),L}static \u0275fac=function(e){return new(e||i)(w(yt),w(Vt),w(N),w(gt),w(U))};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),zt=(()=>{class i{toastrService;toastPackage;ngZone;message;title;options;duplicatesCount;originalTimeout;width=O(-1);toastClasses="";state;get _state(){return this.state()}get displayStyle(){if(this.state().value==="inactive")return"none"}timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,e,n){this.toastrService=t,this.toastPackage=e,this.ngZone=n,this.message=e.message,this.title=e.title,this.options=e.config,this.originalTimeout=e.config.timeOut,this.toastClasses=`${e.toastType} ${e.config.toastClass}`,this.sub=e.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=e.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=e.toastRef.countDuplicate().subscribe(o=>{this.duplicatesCount=o}),this.state=O({value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.update(t=>T(u({},t),{value:"active"})),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.outsideTimeout(()=>this.remove(),this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let t=new Date().getTime(),e=this.hideTime-t;this.width.set(e/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(n=>100-n),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.update(t=>T(u({},t),{value:"active"})),this.outsideTimeout(()=>this.remove(),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10)}remove(){this.state().value!=="removed"&&(clearTimeout(this.timeout),this.state.update(t=>T(u({},t),{value:"removed"})),this.outsideTimeout(()=>this.toastrService.remove(this.toastPackage.toastId),+this.toastPackage.config.easeTime))}tapToast(){this.state().value!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state().value!=="removed"&&this.options.disableTimeOut!=="extendedTimeOut"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state().value==="removed"||(this.outsideTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}outsideTimeout(t,e){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(t),e)):this.timeout=setTimeout(()=>t(),e)}outsideInterval(t,e){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(t),e)):this.intervalId=setInterval(()=>t(),e)}runInsideAngular(t){this.ngZone?this.ngZone.run(()=>t()):t()}static \u0275fac=function(e){return new(e||i)(y(bt),y(D),y(U))};static \u0275cmp=G({type:i,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(e,n){e&1&&j("click",function(){return n.tapToast()})("mouseenter",function(){return n.stickAround()})("mouseleave",function(){return n.delayedHideToast()}),e&2&&(mt("@flyInOut",n._state),m(n.toastClasses),A("display",n.displayStyle))},attrs:_t,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(e,n){e&1&&S(0,Et,3,0,"button",0)(1,jt,3,5,"div",1)(2,At,1,3,"div",2)(3,Rt,2,4,"div",3)(4,Ht,2,2,"div",4),e&2&&(l("ngIf",n.options.closeButton),r(),l("ngIf",n.title),r(),l("ngIf",n.message&&n.options.enableHtml),r(),l("ngIf",n.message&&!n.options.enableHtml),r(),l("ngIf",n.options.progressBar))},dependencies:[J],encapsulation:2,data:{animation:[tt("flyInOut",[H("inactive",R({opacity:0})),H("active",R({opacity:1})),H("removed",R({opacity:0})),B("inactive => active",P("{{ easeTime }}ms {{ easing }}")),B("active => removed",P("{{ easeTime }}ms {{ easing }}"))])]},changeDetection:0})}return i})(),Zt=T(u({},vt),{toastComponent:zt}),qt=(i={})=>ut([{provide:yt,useValue:{default:Zt,config:i}}]),be=(()=>{class i{static forRoot(t={}){return{ngModule:i,providers:[qt(t)]}}static \u0275fac=function(e){return new(e||i)};static \u0275mod=pt({type:i});static \u0275inj=lt({})}return i})();var Gt=(()=>{class i{toastrService;toastPackage;appRef;message;title;options;duplicatesCount;originalTimeout;width=O(-1);toastClasses="";get displayStyle(){return this.state()==="inactive"?"none":null}state=O("inactive");timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,e,n){this.toastrService=t,this.toastPackage=e,this.appRef=n,this.message=e.message,this.title=e.title,this.options=e.config,this.originalTimeout=e.config.timeOut,this.toastClasses=`${e.toastType} ${e.config.toastClass}`,this.sub=e.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=e.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=e.toastRef.countDuplicate().subscribe(o=>{this.duplicatesCount=o})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.set("active"),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.timeout=setTimeout(()=>{this.remove()},this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))),this.options.onActivateTick&&this.appRef.tick()}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let t=new Date().getTime(),e=this.hideTime-t;this.width.set(e/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(n=>100-n),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.set("active"),this.options.timeOut=this.originalTimeout,this.timeout=setTimeout(()=>this.remove(),this.originalTimeout),this.hideTime=new Date().getTime()+(this.originalTimeout||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))}remove(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.state.set("removed"),this.timeout=setTimeout(()=>this.toastrService.remove(this.toastPackage.toastId)))}tapToast(){this.state()!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state()==="removed"||(this.timeout=setTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10)))}static \u0275fac=function(e){return new(e||i)(y(bt),y(D),y(M))};static \u0275cmp=G({type:i,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(e,n){e&1&&j("click",function(){return n.tapToast()})("mouseenter",function(){return n.stickAround()})("mouseleave",function(){return n.delayedHideToast()}),e&2&&(m(n.toastClasses),A("display",n.displayStyle))},attrs:_t,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(e,n){e&1&&S(0,kt,3,0,"button",0)(1,Mt,3,5,"div",1)(2,Pt,1,3,"div",2)(3,Bt,2,4,"div",3)(4,$t,2,2,"div",4),e&2&&(l("ngIf",n.options.closeButton),r(),l("ngIf",n.title),r(),l("ngIf",n.message&&n.options.enableHtml),r(),l("ngIf",n.message&&!n.options.enableHtml),r(),l("ngIf",n.options.progressBar))},dependencies:[J],encapsulation:2,changeDetection:0})}return i})(),Te=T(u({},vt),{toastComponent:Gt});var I={serverTarget:Tt().version,production:!0,socket:"",api:{base:"/api",socket:`${window.location.protocol==="http:"?"ws://":"wss://"}${window.location.host}`,origin:window.location.origin},jwt:{tokenKey:"access_token",allowedDomains:[document.location.host],disallowedRoutes:[`${window.location.protocol}//${document.location.host}/api/auth/login`]},apiHttpOptions:{},owm:{appid:"fec67b55f7f74deaa28df89ba6a60821"}};var Fe=(()=>{class i{$http=_(ft);get(t,e){return this.$http.get(`${I.api.base}${t}`,e)}post(t,e,n){return this.$http.post(`${I.api.base}${t}`,e,n)}put(t,e,n){return this.$http.put(`${I.api.base}${t}`,e,n)}patch(t,e,n){return this.$http.patch(`${I.api.base}${t}`,e,n)}delete(t,e){return this.$http.delete(`${I.api.base}${t}`,e)}static \u0275fac=function(e){return new(e||i)};static \u0275prov=C({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();export{v as a,xt as b,tt as c,P as d,Yt as e,R as f,B as g,W as h,X as i,Ot as j,bt as k,be as l,I as m,Fe as n};
@@ -1,4 +1,4 @@
1
- import{a as W1}from"./chunk-7XWDCMGI.js";import{a as $p,c as L1,d as z1,e as ua,f as Bi,g as jq}from"./chunk-WXQARLHJ.js";import{a as F1}from"./chunk-N7EZXKV6.js";import{a as B1}from"./chunk-AKD24HZC.js";import{a as H1}from"./chunk-KKBGGBZH.js";import{a as V1,b as j1,c as R1}from"./chunk-H337OZRD.js";import{a as $s}from"./chunk-IMT3YYMD.js";import{a as U1}from"./chunk-UKEZ5GGN.js";import{a as lc,b as dc}from"./chunk-RPRM66DV.js";import{a as uc,b as cc}from"./chunk-S7AIVWKK.js";import{a as q1}from"./chunk-Z2JFLSVB.js";import{a as nc,b as ic,c as rc,d as oc,e as ac,f as sc,g as la,m as Et,n as en,o as M1,p as k1,q as A1,r as D1,s as N1,t as jr}from"./chunk-F27XTST6.js";import{A as O1,B as Ii,C as Ss,a as C1,b as qr,c as yo,e as In,f as x1,h as w1,i as I1,j as S1,k as $1,l as wi,m as E1,o as T1,p as Vr,s as sa,t as vo,u as P1,v as bo}from"./chunk-KUNMS7VX.js";import{a as Br}from"./chunk-KDSFLQHL.js";import{d as Ri}from"./chunk-25NXLXGL.js";import{b as Pt}from"./chunk-QTNYLY3B.js";import{k as pt,m as Rr,n as rt}from"./chunk-M6NSVIVL.js";import{a as ft,b as Tt}from"./chunk-CPAHENLQ.js";import{e as b1}from"./chunk-RJOGO4M5.js";import{$a as f1,Ac as g1,Bc as _1,Ca as kr,Cc as dt,D as s1,Da as d1,Dc as xi,Ec as go,Fa as ra,Fc as ai,Gc as aa,Hb as me,Hc as A,Ib as j,Ic as V,Jb as R,Jc as At,Lb as vn,M as na,Mb as bn,Nb as Cn,Ob as E,Pb as y,Qb as v,Qc as xn,Rb as q,Rc as le,Sb as Yu,Sc as Fr,Tb as Xu,Ub as Zu,Uc as y1,Vb as ws,Wb as Is,Xa as Ke,Z as xp,_b as ue,a as ye,aa as xs,ab as m,b as at,bc as Z,cc as Qu,dc as S,e as I,fa as l1,fb as Ku,g as st,ga as Kn,gb as ur,h as pe,ha as ia,hc as wp,ib as po,ic as Ip,id as si,ja as u1,jc as Sp,jd as _o,k as i1,ka as c1,kc as Ar,kd as wn,la as L,lc as Dr,mb as Ce,mc as h1,n as Gn,nb as oa,nc as Ci,o as Cp,ob as mo,oc as Nr,pb as p1,pc as ve,q as r1,qc as M,ra as Y,rc as se,rd as tc,sa as X,sb as Me,sc as ie,tc as ho,ub as m1,uc as ec,v as o1,vb as Ju,w as je,x as a1,xc as lt,yc as ut,za as Gu,zc as ct,zd as v1}from"./chunk-WEVBEUAJ.js";var ev=I(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.formatNames=zi.fastFormats=zi.fullFormats=void 0;function Li(e,n){return{validate:e,compare:n}}zi.fullFormats={date:Li(Y1,Op),time:Li(Tp(!0),Mp),"date-time":Li(G1(!0),Z1),"iso-time":Li(Tp(),X1),"iso-date-time":Li(G1(),Q1),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:Hq,"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:Zq,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:Wq,int32:{type:"number",validate:Jq},int64:{type:"number",validate:Yq},float:{type:"number",validate:J1},double:{type:"number",validate:J1},password:!0,binary:!0};zi.fastFormats=at(ye({},zi.fullFormats),{date:Li(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Op),time:Li(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Mp),"date-time":Li(/^\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,Z1),"iso-time":Li(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,X1),"iso-date-time":Li(/^\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,Q1),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});zi.formatNames=Object.keys(zi.fullFormats);function Rq(e){return e%4===0&&(e%100!==0||e%400===0)}var Bq=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Lq=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Y1(e){let n=Bq.exec(e);if(!n)return!1;let t=+n[1],i=+n[2],r=+n[3];return i>=1&&i<=12&&r>=1&&r<=(i===2&&Rq(t)?29:Lq[i])}function Op(e,n){if(e&&n)return e>n?1:e<n?-1:0}var Ep=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Tp(e){return function(t){let i=Ep.exec(t);if(!i)return!1;let r=+i[1],a=+i[2],l=+i[3],u=i[4],d=i[5]==="-"?-1:1,p=+(i[6]||0),h=+(i[7]||0);if(p>23||h>59||e&&!u)return!1;if(r<=23&&a<=59&&l<60)return!0;let _=a-h*d,C=r-p*d-(_<0?1:0);return(C===23||C===-1)&&(_===59||_===-1)&&l<61}}function Mp(e,n){if(!(e&&n))return;let t=new Date("2020-01-01T"+e).valueOf(),i=new Date("2020-01-01T"+n).valueOf();if(t&&i)return t-i}function X1(e,n){if(!(e&&n))return;let t=Ep.exec(e),i=Ep.exec(n);if(t&&i)return e=t[1]+t[2]+t[3],n=i[1]+i[2]+i[3],e>n?1:e<n?-1:0}var Pp=/t|\s/i;function G1(e){let n=Tp(e);return function(i){let r=i.split(Pp);return r.length===2&&Y1(r[0])&&n(r[1])}}function Z1(e,n){if(!(e&&n))return;let t=new Date(e).valueOf(),i=new Date(n).valueOf();if(t&&i)return t-i}function Q1(e,n){if(!(e&&n))return;let[t,i]=e.split(Pp),[r,a]=n.split(Pp),l=Op(t,r);if(l!==void 0)return l||Mp(i,a)}var zq=/\/|:/,Uq=/^(?:[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 Hq(e){return zq.test(e)&&Uq.test(e)}var K1=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function Wq(e){return K1.lastIndex=0,K1.test(e)}var Gq=-(2**31),Kq=2**31-1;function Jq(e){return Number.isInteger(e)&&e<=Kq&&e>=Gq}function Yq(e){return Number.isInteger(e)}function J1(){return!0}var Xq=/[^\\]\\Z/;function Zq(e){if(Xq.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var Ps=I(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.regexpCode=et.getEsmExportName=et.getProperty=et.safeStringify=et.stringify=et.strConcat=et.addCodeArg=et.str=et._=et.nil=et._Code=et.Name=et.IDENTIFIER=et._CodeOrName=void 0;var Es=class{};et._CodeOrName=Es;et.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Co=class extends Es{constructor(n){if(super(),!et.IDENTIFIER.test(n))throw new Error("CodeGen: name must be a valid identifier");this.str=n}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};et.Name=Co;var li=class extends Es{constructor(n){super(),this._items=typeof n=="string"?[n]:n}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let n=this._items[0];return n===""||n==='""'}get str(){var n;return(n=this._str)!==null&&n!==void 0?n:this._str=this._items.reduce((t,i)=>`${t}${i}`,"")}get names(){var n;return(n=this._names)!==null&&n!==void 0?n:this._names=this._items.reduce((t,i)=>(i instanceof Co&&(t[i.str]=(t[i.str]||0)+1),t),{})}};et._Code=li;et.nil=new li("");function tv(e,...n){let t=[e[0]],i=0;for(;i<n.length;)Ap(t,n[i]),t.push(e[++i]);return new li(t)}et._=tv;var kp=new li("+");function nv(e,...n){let t=[Ts(e[0])],i=0;for(;i<n.length;)t.push(kp),Ap(t,n[i]),t.push(kp,Ts(e[++i]));return Qq(t),new li(t)}et.str=nv;function Ap(e,n){n instanceof li?e.push(...n._items):n instanceof Co?e.push(n):e.push(nV(n))}et.addCodeArg=Ap;function Qq(e){let n=1;for(;n<e.length-1;){if(e[n]===kp){let t=eV(e[n-1],e[n+1]);if(t!==void 0){e.splice(n-1,3,t);continue}e[n++]="+"}n++}}function eV(e,n){if(n==='""')return e;if(e==='""')return n;if(typeof e=="string")return n instanceof Co||e[e.length-1]!=='"'?void 0:typeof n!="string"?`${e.slice(0,-1)}${n}"`:n[0]==='"'?e.slice(0,-1)+n.slice(1):void 0;if(typeof n=="string"&&n[0]==='"'&&!(e instanceof Co))return`"${e}${n.slice(1)}`}function tV(e,n){return n.emptyStr()?e:e.emptyStr()?n:nv`${e}${n}`}et.strConcat=tV;function nV(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Ts(Array.isArray(e)?e.join(","):e)}function iV(e){return new li(Ts(e))}et.stringify=iV;function Ts(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}et.safeStringify=Ts;function rV(e){return typeof e=="string"&&et.IDENTIFIER.test(e)?new li(`.${e}`):tv`[${e}]`}et.getProperty=rV;function oV(e){if(typeof e=="string"&&et.IDENTIFIER.test(e))return new li(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}et.getEsmExportName=oV;function aV(e){return new li(e.toString())}et.regexpCode=aV});var Fp=I(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.ValueScope=Dn.ValueScopeName=Dn.Scope=Dn.varKinds=Dn.UsedValueState=void 0;var An=Ps(),Dp=class extends Error{constructor(n){super(`CodeGen: "code" for ${n} not defined`),this.value=n.value}},fc=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(fc||(Dn.UsedValueState=fc={}));Dn.varKinds={const:new An.Name("const"),let:new An.Name("let"),var:new An.Name("var")};var pc=class{constructor({prefixes:n,parent:t}={}){this._names={},this._prefixes=n,this._parent=t}toName(n){return n instanceof An.Name?n:this.name(n)}name(n){return new An.Name(this._newName(n))}_newName(n){let t=this._names[n]||this._nameGroup(n);return`${n}${t.index++}`}_nameGroup(n){var t,i;if(!((i=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||i===void 0)&&i.has(n)||this._prefixes&&!this._prefixes.has(n))throw new Error(`CodeGen: prefix "${n}" is not allowed in this scope`);return this._names[n]={prefix:n,index:0}}};Dn.Scope=pc;var mc=class extends An.Name{constructor(n,t){super(t),this.prefix=n}setValue(n,{property:t,itemIndex:i}){this.value=n,this.scopePath=(0,An._)`.${new An.Name(t)}[${i}]`}};Dn.ValueScopeName=mc;var sV=(0,An._)`\n`,Np=class extends pc{constructor(n){super(n),this._values={},this._scope=n.scope,this.opts=at(ye({},n),{_n:n.lines?sV:An.nil})}get(){return this._scope}name(n){return new mc(n,this._newName(n))}value(n,t){var i;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let r=this.toName(n),{prefix:a}=r,l=(i=t.key)!==null&&i!==void 0?i:t.ref,u=this._values[a];if(u){let h=u.get(l);if(h)return h}else u=this._values[a]=new Map;u.set(l,r);let d=this._scope[a]||(this._scope[a]=[]),p=d.length;return d[p]=t.ref,r.setValue(t,{property:a,itemIndex:p}),r}getValue(n,t){let i=this._values[n];if(i)return i.get(t)}scopeRefs(n,t=this._values){return this._reduceValues(t,i=>{if(i.scopePath===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return(0,An._)`${n}${i.scopePath}`})}scopeCode(n=this._values,t,i){return this._reduceValues(n,r=>{if(r.value===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return r.value.code},t,i)}_reduceValues(n,t,i={},r){let a=An.nil;for(let l in n){let u=n[l];if(!u)continue;let d=i[l]=i[l]||new Map;u.forEach(p=>{if(d.has(p))return;d.set(p,fc.Started);let h=t(p);if(h){let _=this.opts.es5?Dn.varKinds.var:Dn.varKinds.const;a=(0,An._)`${a}${_} ${p} = ${h};${this.opts._n}`}else if(h=r?.(p))a=(0,An._)`${a}${h}${this.opts._n}`;else throw new Dp(p);d.set(p,fc.Completed)})}return a}};Dn.ValueScope=Np});var xe=I(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.or=Le.and=Le.not=Le.CodeGen=Le.operators=Le.varKinds=Le.ValueScopeName=Le.ValueScope=Le.Scope=Le.Name=Le.regexpCode=Le.stringify=Le.getProperty=Le.nil=Le.strConcat=Le.str=Le._=void 0;var Xe=Ps(),Si=Fp(),Lr=Ps();Object.defineProperty(Le,"_",{enumerable:!0,get:function(){return Lr._}});Object.defineProperty(Le,"str",{enumerable:!0,get:function(){return Lr.str}});Object.defineProperty(Le,"strConcat",{enumerable:!0,get:function(){return Lr.strConcat}});Object.defineProperty(Le,"nil",{enumerable:!0,get:function(){return Lr.nil}});Object.defineProperty(Le,"getProperty",{enumerable:!0,get:function(){return Lr.getProperty}});Object.defineProperty(Le,"stringify",{enumerable:!0,get:function(){return Lr.stringify}});Object.defineProperty(Le,"regexpCode",{enumerable:!0,get:function(){return Lr.regexpCode}});Object.defineProperty(Le,"Name",{enumerable:!0,get:function(){return Lr.Name}});var vc=Fp();Object.defineProperty(Le,"Scope",{enumerable:!0,get:function(){return vc.Scope}});Object.defineProperty(Le,"ValueScope",{enumerable:!0,get:function(){return vc.ValueScope}});Object.defineProperty(Le,"ValueScopeName",{enumerable:!0,get:function(){return vc.ValueScopeName}});Object.defineProperty(Le,"varKinds",{enumerable:!0,get:function(){return vc.varKinds}});Le.operators={GT:new Xe._Code(">"),GTE:new Xe._Code(">="),LT:new Xe._Code("<"),LTE:new Xe._Code("<="),EQ:new Xe._Code("==="),NEQ:new Xe._Code("!=="),NOT:new Xe._Code("!"),OR:new Xe._Code("||"),AND:new Xe._Code("&&"),ADD:new Xe._Code("+")};var cr=class{optimizeNodes(){return this}optimizeNames(n,t){return this}},qp=class extends cr{constructor(n,t,i){super(),this.varKind=n,this.name=t,this.rhs=i}render({es5:n,_n:t}){let i=n?Si.varKinds.var:this.varKind,r=this.rhs===void 0?"":` = ${this.rhs}`;return`${i} ${this.name}${r};`+t}optimizeNames(n,t){if(n[this.name.str])return this.rhs&&(this.rhs=ca(this.rhs,n,t)),this}get names(){return this.rhs instanceof Xe._CodeOrName?this.rhs.names:{}}},gc=class extends cr{constructor(n,t,i){super(),this.lhs=n,this.rhs=t,this.sideEffects=i}render({_n:n}){return`${this.lhs} = ${this.rhs};`+n}optimizeNames(n,t){if(!(this.lhs instanceof Xe.Name&&!n[this.lhs.str]&&!this.sideEffects))return this.rhs=ca(this.rhs,n,t),this}get names(){let n=this.lhs instanceof Xe.Name?{}:ye({},this.lhs.names);return yc(n,this.rhs)}},Vp=class extends gc{constructor(n,t,i,r){super(n,i,r),this.op=t}render({_n:n}){return`${this.lhs} ${this.op}= ${this.rhs};`+n}},jp=class extends cr{constructor(n){super(),this.label=n,this.names={}}render({_n:n}){return`${this.label}:`+n}},Rp=class extends cr{constructor(n){super(),this.label=n,this.names={}}render({_n:n}){return`break${this.label?` ${this.label}`:""};`+n}},Bp=class extends cr{constructor(n){super(),this.error=n}render({_n:n}){return`throw ${this.error};`+n}get names(){return this.error.names}},Lp=class extends cr{constructor(n){super(),this.code=n}render({_n:n}){return`${this.code};`+n}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(n,t){return this.code=ca(this.code,n,t),this}get names(){return this.code instanceof Xe._CodeOrName?this.code.names:{}}},Os=class extends cr{constructor(n=[]){super(),this.nodes=n}render(n){return this.nodes.reduce((t,i)=>t+i.render(n),"")}optimizeNodes(){let{nodes:n}=this,t=n.length;for(;t--;){let i=n[t].optimizeNodes();Array.isArray(i)?n.splice(t,1,...i):i?n[t]=i:n.splice(t,1)}return n.length>0?this:void 0}optimizeNames(n,t){let{nodes:i}=this,r=i.length;for(;r--;){let a=i[r];a.optimizeNames(n,t)||(lV(n,a.names),i.splice(r,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce((n,t)=>xo(n,t.names),{})}},dr=class extends Os{render(n){return"{"+n._n+super.render(n)+"}"+n._n}},zp=class extends Os{},Up=(()=>{class e extends dr{}return e.kind="else",e})(),hc=(()=>{class e extends dr{constructor(t,i){super(i),this.condition=t}render(t){let i=`if(${this.condition})`+super.render(t);return this.else&&(i+="else "+this.else.render(t)),i}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let i=this.else;if(i){let r=i.optimizeNodes();i=this.else=Array.isArray(r)?new Up(r):r}if(i)return t===!1?i instanceof e?i:i.nodes:this.nodes.length?this:new e(sv(t),i instanceof e?[i]:i.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,i){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(t,i),!!(super.optimizeNames(t,i)||this.else))return this.condition=ca(this.condition,t,i),this}get names(){let t=super.names;return yc(t,this.condition),this.else&&xo(t,this.else.names),t}}return e.kind="if",e})(),bc=(()=>{class e extends dr{}return e.kind="for",e})(),Hp=class extends bc{constructor(n){super(),this.iteration=n}render(n){return`for(${this.iteration})`+super.render(n)}optimizeNames(n,t){if(super.optimizeNames(n,t))return this.iteration=ca(this.iteration,n,t),this}get names(){return xo(super.names,this.iteration.names)}},Wp=class extends bc{constructor(n,t,i,r){super(),this.varKind=n,this.name=t,this.from=i,this.to=r}render(n){let t=n.es5?Si.varKinds.var:this.varKind,{name:i,from:r,to:a}=this;return`for(${t} ${i}=${r}; ${i}<${a}; ${i}++)`+super.render(n)}get names(){let n=yc(super.names,this.from);return yc(n,this.to)}},_c=class extends bc{constructor(n,t,i,r){super(),this.loop=n,this.varKind=t,this.name=i,this.iterable=r}render(n){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(n)}optimizeNames(n,t){if(super.optimizeNames(n,t))return this.iterable=ca(this.iterable,n,t),this}get names(){return xo(super.names,this.iterable.names)}},iv=(()=>{class e extends dr{constructor(t,i,r){super(),this.name=t,this.args=i,this.async=r}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),rv=(()=>{class e extends Os{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Gp=class extends dr{render(n){let t="try"+super.render(n);return this.catch&&(t+=this.catch.render(n)),this.finally&&(t+=this.finally.render(n)),t}optimizeNodes(){var n,t;return super.optimizeNodes(),(n=this.catch)===null||n===void 0||n.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(n,t){var i,r;return super.optimizeNames(n,t),(i=this.catch)===null||i===void 0||i.optimizeNames(n,t),(r=this.finally)===null||r===void 0||r.optimizeNames(n,t),this}get names(){let n=super.names;return this.catch&&xo(n,this.catch.names),this.finally&&xo(n,this.finally.names),n}},ov=(()=>{class e extends dr{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),av=(()=>{class e extends dr{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),Kp=class{constructor(n,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=at(ye({},t),{_n:t.lines?`
1
+ import{a as W1}from"./chunk-IDYZZ33S.js";import{a as $p,c as L1,d as z1,e as ua,f as Bi,g as jq}from"./chunk-6BVMQPW4.js";import{a as F1}from"./chunk-N7EZXKV6.js";import{a as B1}from"./chunk-AKD24HZC.js";import{a as H1}from"./chunk-KYXNDUUV.js";import{a as V1,b as j1,c as R1}from"./chunk-H337OZRD.js";import{a as $s}from"./chunk-IMT3YYMD.js";import{a as U1}from"./chunk-UKEZ5GGN.js";import{a as lc,b as dc}from"./chunk-RPRM66DV.js";import{a as uc,b as cc}from"./chunk-S7AIVWKK.js";import{a as q1}from"./chunk-Z2JFLSVB.js";import{a as nc,b as ic,c as rc,d as oc,e as ac,f as sc,g as la,m as Et,n as en,o as M1,p as k1,q as A1,r as D1,s as N1,t as jr}from"./chunk-F27XTST6.js";import{A as O1,B as Ii,C as Ss,a as C1,b as qr,c as yo,e as In,f as x1,h as w1,i as I1,j as S1,k as $1,l as wi,m as E1,o as T1,p as Vr,s as sa,t as vo,u as P1,v as bo}from"./chunk-KUNMS7VX.js";import{a as Br}from"./chunk-MDFIEZLZ.js";import{d as Ri}from"./chunk-25NXLXGL.js";import{b as Pt}from"./chunk-HTW5GBTL.js";import{k as pt,m as Rr,n as rt}from"./chunk-D5YW5GE5.js";import{a as ft,b as Tt}from"./chunk-CPAHENLQ.js";import{e as b1}from"./chunk-RJOGO4M5.js";import{$a as f1,Ac as g1,Bc as _1,Ca as kr,Cc as dt,D as s1,Da as d1,Dc as xi,Ec as go,Fa as ra,Fc as ai,Gc as aa,Hb as me,Hc as A,Ib as j,Ic as V,Jb as R,Jc as At,Lb as vn,M as na,Mb as bn,Nb as Cn,Ob as E,Pb as y,Qb as v,Qc as xn,Rb as q,Rc as le,Sb as Yu,Sc as Fr,Tb as Xu,Ub as Zu,Uc as y1,Vb as ws,Wb as Is,Xa as Ke,Z as xp,_b as ue,a as ye,aa as xs,ab as m,b as at,bc as Z,cc as Qu,dc as S,e as I,fa as l1,fb as Ku,g as st,ga as Kn,gb as ur,h as pe,ha as ia,hc as wp,ib as po,ic as Ip,id as si,ja as u1,jc as Sp,jd as _o,k as i1,ka as c1,kc as Ar,kd as wn,la as L,lc as Dr,mb as Ce,mc as h1,n as Gn,nb as oa,nc as Ci,o as Cp,ob as mo,oc as Nr,pb as p1,pc as ve,q as r1,qc as M,ra as Y,rc as se,rd as tc,sa as X,sb as Me,sc as ie,tc as ho,ub as m1,uc as ec,v as o1,vb as Ju,w as je,x as a1,xc as lt,yc as ut,za as Gu,zc as ct,zd as v1}from"./chunk-WEVBEUAJ.js";var ev=I(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.formatNames=zi.fastFormats=zi.fullFormats=void 0;function Li(e,n){return{validate:e,compare:n}}zi.fullFormats={date:Li(Y1,Op),time:Li(Tp(!0),Mp),"date-time":Li(G1(!0),Z1),"iso-time":Li(Tp(),X1),"iso-date-time":Li(G1(),Q1),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:Hq,"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:Zq,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:Wq,int32:{type:"number",validate:Jq},int64:{type:"number",validate:Yq},float:{type:"number",validate:J1},double:{type:"number",validate:J1},password:!0,binary:!0};zi.fastFormats=at(ye({},zi.fullFormats),{date:Li(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Op),time:Li(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Mp),"date-time":Li(/^\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,Z1),"iso-time":Li(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,X1),"iso-date-time":Li(/^\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,Q1),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});zi.formatNames=Object.keys(zi.fullFormats);function Rq(e){return e%4===0&&(e%100!==0||e%400===0)}var Bq=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Lq=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Y1(e){let n=Bq.exec(e);if(!n)return!1;let t=+n[1],i=+n[2],r=+n[3];return i>=1&&i<=12&&r>=1&&r<=(i===2&&Rq(t)?29:Lq[i])}function Op(e,n){if(e&&n)return e>n?1:e<n?-1:0}var Ep=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Tp(e){return function(t){let i=Ep.exec(t);if(!i)return!1;let r=+i[1],a=+i[2],l=+i[3],u=i[4],d=i[5]==="-"?-1:1,p=+(i[6]||0),h=+(i[7]||0);if(p>23||h>59||e&&!u)return!1;if(r<=23&&a<=59&&l<60)return!0;let _=a-h*d,C=r-p*d-(_<0?1:0);return(C===23||C===-1)&&(_===59||_===-1)&&l<61}}function Mp(e,n){if(!(e&&n))return;let t=new Date("2020-01-01T"+e).valueOf(),i=new Date("2020-01-01T"+n).valueOf();if(t&&i)return t-i}function X1(e,n){if(!(e&&n))return;let t=Ep.exec(e),i=Ep.exec(n);if(t&&i)return e=t[1]+t[2]+t[3],n=i[1]+i[2]+i[3],e>n?1:e<n?-1:0}var Pp=/t|\s/i;function G1(e){let n=Tp(e);return function(i){let r=i.split(Pp);return r.length===2&&Y1(r[0])&&n(r[1])}}function Z1(e,n){if(!(e&&n))return;let t=new Date(e).valueOf(),i=new Date(n).valueOf();if(t&&i)return t-i}function Q1(e,n){if(!(e&&n))return;let[t,i]=e.split(Pp),[r,a]=n.split(Pp),l=Op(t,r);if(l!==void 0)return l||Mp(i,a)}var zq=/\/|:/,Uq=/^(?:[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 Hq(e){return zq.test(e)&&Uq.test(e)}var K1=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function Wq(e){return K1.lastIndex=0,K1.test(e)}var Gq=-(2**31),Kq=2**31-1;function Jq(e){return Number.isInteger(e)&&e<=Kq&&e>=Gq}function Yq(e){return Number.isInteger(e)}function J1(){return!0}var Xq=/[^\\]\\Z/;function Zq(e){if(Xq.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var Ps=I(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.regexpCode=et.getEsmExportName=et.getProperty=et.safeStringify=et.stringify=et.strConcat=et.addCodeArg=et.str=et._=et.nil=et._Code=et.Name=et.IDENTIFIER=et._CodeOrName=void 0;var Es=class{};et._CodeOrName=Es;et.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Co=class extends Es{constructor(n){if(super(),!et.IDENTIFIER.test(n))throw new Error("CodeGen: name must be a valid identifier");this.str=n}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};et.Name=Co;var li=class extends Es{constructor(n){super(),this._items=typeof n=="string"?[n]:n}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let n=this._items[0];return n===""||n==='""'}get str(){var n;return(n=this._str)!==null&&n!==void 0?n:this._str=this._items.reduce((t,i)=>`${t}${i}`,"")}get names(){var n;return(n=this._names)!==null&&n!==void 0?n:this._names=this._items.reduce((t,i)=>(i instanceof Co&&(t[i.str]=(t[i.str]||0)+1),t),{})}};et._Code=li;et.nil=new li("");function tv(e,...n){let t=[e[0]],i=0;for(;i<n.length;)Ap(t,n[i]),t.push(e[++i]);return new li(t)}et._=tv;var kp=new li("+");function nv(e,...n){let t=[Ts(e[0])],i=0;for(;i<n.length;)t.push(kp),Ap(t,n[i]),t.push(kp,Ts(e[++i]));return Qq(t),new li(t)}et.str=nv;function Ap(e,n){n instanceof li?e.push(...n._items):n instanceof Co?e.push(n):e.push(nV(n))}et.addCodeArg=Ap;function Qq(e){let n=1;for(;n<e.length-1;){if(e[n]===kp){let t=eV(e[n-1],e[n+1]);if(t!==void 0){e.splice(n-1,3,t);continue}e[n++]="+"}n++}}function eV(e,n){if(n==='""')return e;if(e==='""')return n;if(typeof e=="string")return n instanceof Co||e[e.length-1]!=='"'?void 0:typeof n!="string"?`${e.slice(0,-1)}${n}"`:n[0]==='"'?e.slice(0,-1)+n.slice(1):void 0;if(typeof n=="string"&&n[0]==='"'&&!(e instanceof Co))return`"${e}${n.slice(1)}`}function tV(e,n){return n.emptyStr()?e:e.emptyStr()?n:nv`${e}${n}`}et.strConcat=tV;function nV(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Ts(Array.isArray(e)?e.join(","):e)}function iV(e){return new li(Ts(e))}et.stringify=iV;function Ts(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}et.safeStringify=Ts;function rV(e){return typeof e=="string"&&et.IDENTIFIER.test(e)?new li(`.${e}`):tv`[${e}]`}et.getProperty=rV;function oV(e){if(typeof e=="string"&&et.IDENTIFIER.test(e))return new li(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}et.getEsmExportName=oV;function aV(e){return new li(e.toString())}et.regexpCode=aV});var Fp=I(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.ValueScope=Dn.ValueScopeName=Dn.Scope=Dn.varKinds=Dn.UsedValueState=void 0;var An=Ps(),Dp=class extends Error{constructor(n){super(`CodeGen: "code" for ${n} not defined`),this.value=n.value}},fc=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(fc||(Dn.UsedValueState=fc={}));Dn.varKinds={const:new An.Name("const"),let:new An.Name("let"),var:new An.Name("var")};var pc=class{constructor({prefixes:n,parent:t}={}){this._names={},this._prefixes=n,this._parent=t}toName(n){return n instanceof An.Name?n:this.name(n)}name(n){return new An.Name(this._newName(n))}_newName(n){let t=this._names[n]||this._nameGroup(n);return`${n}${t.index++}`}_nameGroup(n){var t,i;if(!((i=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||i===void 0)&&i.has(n)||this._prefixes&&!this._prefixes.has(n))throw new Error(`CodeGen: prefix "${n}" is not allowed in this scope`);return this._names[n]={prefix:n,index:0}}};Dn.Scope=pc;var mc=class extends An.Name{constructor(n,t){super(t),this.prefix=n}setValue(n,{property:t,itemIndex:i}){this.value=n,this.scopePath=(0,An._)`.${new An.Name(t)}[${i}]`}};Dn.ValueScopeName=mc;var sV=(0,An._)`\n`,Np=class extends pc{constructor(n){super(n),this._values={},this._scope=n.scope,this.opts=at(ye({},n),{_n:n.lines?sV:An.nil})}get(){return this._scope}name(n){return new mc(n,this._newName(n))}value(n,t){var i;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let r=this.toName(n),{prefix:a}=r,l=(i=t.key)!==null&&i!==void 0?i:t.ref,u=this._values[a];if(u){let h=u.get(l);if(h)return h}else u=this._values[a]=new Map;u.set(l,r);let d=this._scope[a]||(this._scope[a]=[]),p=d.length;return d[p]=t.ref,r.setValue(t,{property:a,itemIndex:p}),r}getValue(n,t){let i=this._values[n];if(i)return i.get(t)}scopeRefs(n,t=this._values){return this._reduceValues(t,i=>{if(i.scopePath===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return(0,An._)`${n}${i.scopePath}`})}scopeCode(n=this._values,t,i){return this._reduceValues(n,r=>{if(r.value===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return r.value.code},t,i)}_reduceValues(n,t,i={},r){let a=An.nil;for(let l in n){let u=n[l];if(!u)continue;let d=i[l]=i[l]||new Map;u.forEach(p=>{if(d.has(p))return;d.set(p,fc.Started);let h=t(p);if(h){let _=this.opts.es5?Dn.varKinds.var:Dn.varKinds.const;a=(0,An._)`${a}${_} ${p} = ${h};${this.opts._n}`}else if(h=r?.(p))a=(0,An._)`${a}${h}${this.opts._n}`;else throw new Dp(p);d.set(p,fc.Completed)})}return a}};Dn.ValueScope=Np});var xe=I(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.or=Le.and=Le.not=Le.CodeGen=Le.operators=Le.varKinds=Le.ValueScopeName=Le.ValueScope=Le.Scope=Le.Name=Le.regexpCode=Le.stringify=Le.getProperty=Le.nil=Le.strConcat=Le.str=Le._=void 0;var Xe=Ps(),Si=Fp(),Lr=Ps();Object.defineProperty(Le,"_",{enumerable:!0,get:function(){return Lr._}});Object.defineProperty(Le,"str",{enumerable:!0,get:function(){return Lr.str}});Object.defineProperty(Le,"strConcat",{enumerable:!0,get:function(){return Lr.strConcat}});Object.defineProperty(Le,"nil",{enumerable:!0,get:function(){return Lr.nil}});Object.defineProperty(Le,"getProperty",{enumerable:!0,get:function(){return Lr.getProperty}});Object.defineProperty(Le,"stringify",{enumerable:!0,get:function(){return Lr.stringify}});Object.defineProperty(Le,"regexpCode",{enumerable:!0,get:function(){return Lr.regexpCode}});Object.defineProperty(Le,"Name",{enumerable:!0,get:function(){return Lr.Name}});var vc=Fp();Object.defineProperty(Le,"Scope",{enumerable:!0,get:function(){return vc.Scope}});Object.defineProperty(Le,"ValueScope",{enumerable:!0,get:function(){return vc.ValueScope}});Object.defineProperty(Le,"ValueScopeName",{enumerable:!0,get:function(){return vc.ValueScopeName}});Object.defineProperty(Le,"varKinds",{enumerable:!0,get:function(){return vc.varKinds}});Le.operators={GT:new Xe._Code(">"),GTE:new Xe._Code(">="),LT:new Xe._Code("<"),LTE:new Xe._Code("<="),EQ:new Xe._Code("==="),NEQ:new Xe._Code("!=="),NOT:new Xe._Code("!"),OR:new Xe._Code("||"),AND:new Xe._Code("&&"),ADD:new Xe._Code("+")};var cr=class{optimizeNodes(){return this}optimizeNames(n,t){return this}},qp=class extends cr{constructor(n,t,i){super(),this.varKind=n,this.name=t,this.rhs=i}render({es5:n,_n:t}){let i=n?Si.varKinds.var:this.varKind,r=this.rhs===void 0?"":` = ${this.rhs}`;return`${i} ${this.name}${r};`+t}optimizeNames(n,t){if(n[this.name.str])return this.rhs&&(this.rhs=ca(this.rhs,n,t)),this}get names(){return this.rhs instanceof Xe._CodeOrName?this.rhs.names:{}}},gc=class extends cr{constructor(n,t,i){super(),this.lhs=n,this.rhs=t,this.sideEffects=i}render({_n:n}){return`${this.lhs} = ${this.rhs};`+n}optimizeNames(n,t){if(!(this.lhs instanceof Xe.Name&&!n[this.lhs.str]&&!this.sideEffects))return this.rhs=ca(this.rhs,n,t),this}get names(){let n=this.lhs instanceof Xe.Name?{}:ye({},this.lhs.names);return yc(n,this.rhs)}},Vp=class extends gc{constructor(n,t,i,r){super(n,i,r),this.op=t}render({_n:n}){return`${this.lhs} ${this.op}= ${this.rhs};`+n}},jp=class extends cr{constructor(n){super(),this.label=n,this.names={}}render({_n:n}){return`${this.label}:`+n}},Rp=class extends cr{constructor(n){super(),this.label=n,this.names={}}render({_n:n}){return`break${this.label?` ${this.label}`:""};`+n}},Bp=class extends cr{constructor(n){super(),this.error=n}render({_n:n}){return`throw ${this.error};`+n}get names(){return this.error.names}},Lp=class extends cr{constructor(n){super(),this.code=n}render({_n:n}){return`${this.code};`+n}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(n,t){return this.code=ca(this.code,n,t),this}get names(){return this.code instanceof Xe._CodeOrName?this.code.names:{}}},Os=class extends cr{constructor(n=[]){super(),this.nodes=n}render(n){return this.nodes.reduce((t,i)=>t+i.render(n),"")}optimizeNodes(){let{nodes:n}=this,t=n.length;for(;t--;){let i=n[t].optimizeNodes();Array.isArray(i)?n.splice(t,1,...i):i?n[t]=i:n.splice(t,1)}return n.length>0?this:void 0}optimizeNames(n,t){let{nodes:i}=this,r=i.length;for(;r--;){let a=i[r];a.optimizeNames(n,t)||(lV(n,a.names),i.splice(r,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce((n,t)=>xo(n,t.names),{})}},dr=class extends Os{render(n){return"{"+n._n+super.render(n)+"}"+n._n}},zp=class extends Os{},Up=(()=>{class e extends dr{}return e.kind="else",e})(),hc=(()=>{class e extends dr{constructor(t,i){super(i),this.condition=t}render(t){let i=`if(${this.condition})`+super.render(t);return this.else&&(i+="else "+this.else.render(t)),i}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let i=this.else;if(i){let r=i.optimizeNodes();i=this.else=Array.isArray(r)?new Up(r):r}if(i)return t===!1?i instanceof e?i:i.nodes:this.nodes.length?this:new e(sv(t),i instanceof e?[i]:i.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,i){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(t,i),!!(super.optimizeNames(t,i)||this.else))return this.condition=ca(this.condition,t,i),this}get names(){let t=super.names;return yc(t,this.condition),this.else&&xo(t,this.else.names),t}}return e.kind="if",e})(),bc=(()=>{class e extends dr{}return e.kind="for",e})(),Hp=class extends bc{constructor(n){super(),this.iteration=n}render(n){return`for(${this.iteration})`+super.render(n)}optimizeNames(n,t){if(super.optimizeNames(n,t))return this.iteration=ca(this.iteration,n,t),this}get names(){return xo(super.names,this.iteration.names)}},Wp=class extends bc{constructor(n,t,i,r){super(),this.varKind=n,this.name=t,this.from=i,this.to=r}render(n){let t=n.es5?Si.varKinds.var:this.varKind,{name:i,from:r,to:a}=this;return`for(${t} ${i}=${r}; ${i}<${a}; ${i}++)`+super.render(n)}get names(){let n=yc(super.names,this.from);return yc(n,this.to)}},_c=class extends bc{constructor(n,t,i,r){super(),this.loop=n,this.varKind=t,this.name=i,this.iterable=r}render(n){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(n)}optimizeNames(n,t){if(super.optimizeNames(n,t))return this.iterable=ca(this.iterable,n,t),this}get names(){return xo(super.names,this.iterable.names)}},iv=(()=>{class e extends dr{constructor(t,i,r){super(),this.name=t,this.args=i,this.async=r}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),rv=(()=>{class e extends Os{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Gp=class extends dr{render(n){let t="try"+super.render(n);return this.catch&&(t+=this.catch.render(n)),this.finally&&(t+=this.finally.render(n)),t}optimizeNodes(){var n,t;return super.optimizeNodes(),(n=this.catch)===null||n===void 0||n.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(n,t){var i,r;return super.optimizeNames(n,t),(i=this.catch)===null||i===void 0||i.optimizeNames(n,t),(r=this.finally)===null||r===void 0||r.optimizeNames(n,t),this}get names(){let n=super.names;return this.catch&&xo(n,this.catch.names),this.finally&&xo(n,this.finally.names),n}},ov=(()=>{class e extends dr{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),av=(()=>{class e extends dr{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),Kp=class{constructor(n,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=at(ye({},t),{_n:t.lines?`
2
2
  `:""}),this._extScope=n,this._scope=new Si.Scope({parent:n}),this._nodes=[new zp]}toString(){return this._root.render(this.opts)}name(n){return this._scope.name(n)}scopeName(n){return this._extScope.name(n)}scopeValue(n,t){let i=this._extScope.value(n,t);return(this._values[i.prefix]||(this._values[i.prefix]=new Set)).add(i),i}getScopeValue(n,t){return this._extScope.getValue(n,t)}scopeRefs(n){return this._extScope.scopeRefs(n,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(n,t,i,r){let a=this._scope.toName(t);return i!==void 0&&r&&(this._constants[a.str]=i),this._leafNode(new qp(n,a,i)),a}const(n,t,i){return this._def(Si.varKinds.const,n,t,i)}let(n,t,i){return this._def(Si.varKinds.let,n,t,i)}var(n,t,i){return this._def(Si.varKinds.var,n,t,i)}assign(n,t,i){return this._leafNode(new gc(n,t,i))}add(n,t){return this._leafNode(new Vp(n,Le.operators.ADD,t))}code(n){return typeof n=="function"?n():n!==Xe.nil&&this._leafNode(new Lp(n)),this}object(...n){let t=["{"];for(let[i,r]of n)t.length>1&&t.push(","),t.push(i),(i!==r||this.opts.es5)&&(t.push(":"),(0,Xe.addCodeArg)(t,r));return t.push("}"),new Xe._Code(t)}if(n,t,i){if(this._blockNode(new hc(n)),t&&i)this.code(t).else().code(i).endIf();else if(t)this.code(t).endIf();else if(i)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(n){return this._elseNode(new hc(n))}else(){return this._elseNode(new Up)}endIf(){return this._endBlockNode(hc,Up)}_for(n,t){return this._blockNode(n),t&&this.code(t).endFor(),this}for(n,t){return this._for(new Hp(n),t)}forRange(n,t,i,r,a=this.opts.es5?Si.varKinds.var:Si.varKinds.let){let l=this._scope.toName(n);return this._for(new Wp(a,l,t,i),()=>r(l))}forOf(n,t,i,r=Si.varKinds.const){let a=this._scope.toName(n);if(this.opts.es5){let l=t instanceof Xe.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,Xe._)`${l}.length`,u=>{this.var(a,(0,Xe._)`${l}[${u}]`),i(a)})}return this._for(new _c("of",r,a,t),()=>i(a))}forIn(n,t,i,r=this.opts.es5?Si.varKinds.var:Si.varKinds.const){if(this.opts.ownProperties)return this.forOf(n,(0,Xe._)`Object.keys(${t})`,i);let a=this._scope.toName(n);return this._for(new _c("in",r,a,t),()=>i(a))}endFor(){return this._endBlockNode(bc)}label(n){return this._leafNode(new jp(n))}break(n){return this._leafNode(new Rp(n))}return(n){let t=new rv;if(this._blockNode(t),this.code(n),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(rv)}try(n,t,i){if(!t&&!i)throw new Error('CodeGen: "try" without "catch" and "finally"');let r=new Gp;if(this._blockNode(r),this.code(n),t){let a=this.name("e");this._currNode=r.catch=new ov(a),t(a)}return i&&(this._currNode=r.finally=new av,this.code(i)),this._endBlockNode(ov,av)}throw(n){return this._leafNode(new Bp(n))}block(n,t){return this._blockStarts.push(this._nodes.length),n&&this.code(n).endBlock(t),this}endBlock(n){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let i=this._nodes.length-t;if(i<0||n!==void 0&&i!==n)throw new Error(`CodeGen: wrong number of nodes: ${i} vs ${n} expected`);return this._nodes.length=t,this}func(n,t=Xe.nil,i,r){return this._blockNode(new iv(n,t,i)),r&&this.code(r).endFunc(),this}endFunc(){return this._endBlockNode(iv)}optimize(n=1){for(;n-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(n){return this._currNode.nodes.push(n),this}_blockNode(n){this._currNode.nodes.push(n),this._nodes.push(n)}_endBlockNode(n,t){let i=this._currNode;if(i instanceof n||t&&i instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${n.kind}/${t.kind}`:n.kind}"`)}_elseNode(n){let t=this._currNode;if(!(t instanceof hc))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=n,this}get _root(){return this._nodes[0]}get _currNode(){let n=this._nodes;return n[n.length-1]}set _currNode(n){let t=this._nodes;t[t.length-1]=n}};Le.CodeGen=Kp;function xo(e,n){for(let t in n)e[t]=(e[t]||0)+(n[t]||0);return e}function yc(e,n){return n instanceof Xe._CodeOrName?xo(e,n.names):e}function ca(e,n,t){if(e instanceof Xe.Name)return i(e);if(!r(e))return e;return new Xe._Code(e._items.reduce((a,l)=>(l instanceof Xe.Name&&(l=i(l)),l instanceof Xe._Code?a.push(...l._items):a.push(l),a),[]));function i(a){let l=t[a.str];return l===void 0||n[a.str]!==1?a:(delete n[a.str],l)}function r(a){return a instanceof Xe._Code&&a._items.some(l=>l instanceof Xe.Name&&n[l.str]===1&&t[l.str]!==void 0)}}function lV(e,n){for(let t in n)e[t]=(e[t]||0)-(n[t]||0)}function sv(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,Xe._)`!${Jp(e)}`}Le.not=sv;var uV=lv(Le.operators.AND);function cV(...e){return e.reduce(uV)}Le.and=cV;var dV=lv(Le.operators.OR);function fV(...e){return e.reduce(dV)}Le.or=fV;function lv(e){return(n,t)=>n===Xe.nil?t:t===Xe.nil?n:(0,Xe._)`${Jp(n)} ${e} ${Jp(t)}`}function Jp(e){return e instanceof Xe.Name?e:(0,Xe._)`(${e})`}});var We=I(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.checkStrictMode=ze.getErrorPath=ze.Type=ze.useFunc=ze.setEvaluated=ze.evaluatedPropsToName=ze.mergeEvaluated=ze.eachItem=ze.unescapeJsonPointer=ze.escapeJsonPointer=ze.escapeFragment=ze.unescapeFragment=ze.schemaRefOrVal=ze.schemaHasRulesButRef=ze.schemaHasRules=ze.checkUnknownRules=ze.alwaysValidSchema=ze.toHash=void 0;var _t=xe(),pV=Ps();function mV(e){let n={};for(let t of e)n[t]=!0;return n}ze.toHash=mV;function hV(e,n){return typeof n=="boolean"?n:Object.keys(n).length===0?!0:(dv(e,n),!fv(n,e.self.RULES.all))}ze.alwaysValidSchema=hV;function dv(e,n=e.schema){let{opts:t,self:i}=e;if(!t.strictSchema||typeof n=="boolean")return;let r=i.RULES.keywords;for(let a in n)r[a]||hv(e,`unknown keyword: "${a}"`)}ze.checkUnknownRules=dv;function fv(e,n){if(typeof e=="boolean")return!e;for(let t in e)if(n[t])return!0;return!1}ze.schemaHasRules=fv;function gV(e,n){if(typeof e=="boolean")return!e;for(let t in e)if(t!=="$ref"&&n.all[t])return!0;return!1}ze.schemaHasRulesButRef=gV;function _V({topSchemaRef:e,schemaPath:n},t,i,r){if(!r){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,_t._)`${t}`}return(0,_t._)`${e}${n}${(0,_t.getProperty)(i)}`}ze.schemaRefOrVal=_V;function yV(e){return pv(decodeURIComponent(e))}ze.unescapeFragment=yV;function vV(e){return encodeURIComponent(Xp(e))}ze.escapeFragment=vV;function Xp(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}ze.escapeJsonPointer=Xp;function pv(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}ze.unescapeJsonPointer=pv;function bV(e,n){if(Array.isArray(e))for(let t of e)n(t);else n(e)}ze.eachItem=bV;function uv({mergeNames:e,mergeToName:n,mergeValues:t,resultToName:i}){return(r,a,l,u)=>{let d=l===void 0?a:l instanceof _t.Name?(a instanceof _t.Name?e(r,a,l):n(r,a,l),l):a instanceof _t.Name?(n(r,l,a),a):t(a,l);return u===_t.Name&&!(d instanceof _t.Name)?i(r,d):d}}ze.mergeEvaluated={props:uv({mergeNames:(e,n,t)=>e.if((0,_t._)`${t} !== true && ${n} !== undefined`,()=>{e.if((0,_t._)`${n} === true`,()=>e.assign(t,!0),()=>e.assign(t,(0,_t._)`${t} || {}`).code((0,_t._)`Object.assign(${t}, ${n})`))}),mergeToName:(e,n,t)=>e.if((0,_t._)`${t} !== true`,()=>{n===!0?e.assign(t,!0):(e.assign(t,(0,_t._)`${t} || {}`),Zp(e,t,n))}),mergeValues:(e,n)=>e===!0?!0:ye(ye({},e),n),resultToName:mv}),items:uv({mergeNames:(e,n,t)=>e.if((0,_t._)`${t} !== true && ${n} !== undefined`,()=>e.assign(t,(0,_t._)`${n} === true ? true : ${t} > ${n} ? ${t} : ${n}`)),mergeToName:(e,n,t)=>e.if((0,_t._)`${t} !== true`,()=>e.assign(t,n===!0?!0:(0,_t._)`${t} > ${n} ? ${t} : ${n}`)),mergeValues:(e,n)=>e===!0?!0:Math.max(e,n),resultToName:(e,n)=>e.var("items",n)})};function mv(e,n){if(n===!0)return e.var("props",!0);let t=e.var("props",(0,_t._)`{}`);return n!==void 0&&Zp(e,t,n),t}ze.evaluatedPropsToName=mv;function Zp(e,n,t){Object.keys(t).forEach(i=>e.assign((0,_t._)`${n}${(0,_t.getProperty)(i)}`,!0))}ze.setEvaluated=Zp;var cv={};function CV(e,n){return e.scopeValue("func",{ref:n,code:cv[n.code]||(cv[n.code]=new pV._Code(n.code))})}ze.useFunc=CV;var Yp=function(e){return e[e.Num=0]="Num",e[e.Str=1]="Str",e}(Yp||(ze.Type=Yp={}));function xV(e,n,t){if(e instanceof _t.Name){let i=n===Yp.Num;return t?i?(0,_t._)`"[" + ${e} + "]"`:(0,_t._)`"['" + ${e} + "']"`:i?(0,_t._)`"/" + ${e}`:(0,_t._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,_t.getProperty)(e).toString():"/"+Xp(e)}ze.getErrorPath=xV;function hv(e,n,t=e.opts.strictSchema){if(t){if(n=`strict mode: ${n}`,t===!0)throw new Error(n);e.self.logger.warn(n)}}ze.checkStrictMode=hv});var ui=I(Qp=>{"use strict";Object.defineProperty(Qp,"__esModule",{value:!0});var un=xe(),wV={data:new un.Name("data"),valCxt:new un.Name("valCxt"),instancePath:new un.Name("instancePath"),parentData:new un.Name("parentData"),parentDataProperty:new un.Name("parentDataProperty"),rootData:new un.Name("rootData"),dynamicAnchors:new un.Name("dynamicAnchors"),vErrors:new un.Name("vErrors"),errors:new un.Name("errors"),this:new un.Name("this"),self:new un.Name("self"),scope:new un.Name("scope"),json:new un.Name("json"),jsonPos:new un.Name("jsonPos"),jsonLen:new un.Name("jsonLen"),jsonPart:new un.Name("jsonPart")};Qp.default=wV});var Ms=I(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.extendErrors=cn.resetErrorsCount=cn.reportExtraError=cn.reportError=cn.keyword$DataError=cn.keywordError=void 0;var Qe=xe(),Cc=We(),Sn=ui();cn.keywordError={message:({keyword:e})=>(0,Qe.str)`must pass "${e}" keyword validation`};cn.keyword$DataError={message:({keyword:e,schemaType:n})=>n?(0,Qe.str)`"${e}" keyword must be ${n} ($data)`:(0,Qe.str)`"${e}" keyword is invalid ($data)`};function IV(e,n=cn.keywordError,t,i){let{it:r}=e,{gen:a,compositeRule:l,allErrors:u}=r,d=yv(e,n,t);i??(l||u)?gv(a,d):_v(r,(0,Qe._)`[${d}]`)}cn.reportError=IV;function SV(e,n=cn.keywordError,t){let{it:i}=e,{gen:r,compositeRule:a,allErrors:l}=i,u=yv(e,n,t);gv(r,u),a||l||_v(i,Sn.default.vErrors)}cn.reportExtraError=SV;function $V(e,n){e.assign(Sn.default.errors,n),e.if((0,Qe._)`${Sn.default.vErrors} !== null`,()=>e.if(n,()=>e.assign((0,Qe._)`${Sn.default.vErrors}.length`,n),()=>e.assign(Sn.default.vErrors,null)))}cn.resetErrorsCount=$V;function EV({gen:e,keyword:n,schemaValue:t,data:i,errsCount:r,it:a}){if(r===void 0)throw new Error("ajv implementation error");let l=e.name("err");e.forRange("i",r,Sn.default.errors,u=>{e.const(l,(0,Qe._)`${Sn.default.vErrors}[${u}]`),e.if((0,Qe._)`${l}.instancePath === undefined`,()=>e.assign((0,Qe._)`${l}.instancePath`,(0,Qe.strConcat)(Sn.default.instancePath,a.errorPath))),e.assign((0,Qe._)`${l}.schemaPath`,(0,Qe.str)`${a.errSchemaPath}/${n}`),a.opts.verbose&&(e.assign((0,Qe._)`${l}.schema`,t),e.assign((0,Qe._)`${l}.data`,i))})}cn.extendErrors=EV;function gv(e,n){let t=e.const("err",n);e.if((0,Qe._)`${Sn.default.vErrors} === null`,()=>e.assign(Sn.default.vErrors,(0,Qe._)`[${t}]`),(0,Qe._)`${Sn.default.vErrors}.push(${t})`),e.code((0,Qe._)`${Sn.default.errors}++`)}function _v(e,n){let{gen:t,validateName:i,schemaEnv:r}=e;r.$async?t.throw((0,Qe._)`new ${e.ValidationError}(${n})`):(t.assign((0,Qe._)`${i}.errors`,n),t.return(!1))}var wo={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 yv(e,n,t){let{createErrors:i}=e.it;return i===!1?(0,Qe._)`{}`:TV(e,n,t)}function TV(e,n,t={}){let{gen:i,it:r}=e,a=[PV(r,t),OV(e,t)];return MV(e,n,a),i.object(...a)}function PV({errorPath:e},{instancePath:n}){let t=n?(0,Qe.str)`${e}${(0,Cc.getErrorPath)(n,Cc.Type.Str)}`:e;return[Sn.default.instancePath,(0,Qe.strConcat)(Sn.default.instancePath,t)]}function OV({keyword:e,it:{errSchemaPath:n}},{schemaPath:t,parentSchema:i}){let r=i?n:(0,Qe.str)`${n}/${e}`;return t&&(r=(0,Qe.str)`${r}${(0,Cc.getErrorPath)(t,Cc.Type.Str)}`),[wo.schemaPath,r]}function MV(e,{params:n,message:t},i){let{keyword:r,data:a,schemaValue:l,it:u}=e,{opts:d,propertyName:p,topSchemaRef:h,schemaPath:_}=u;i.push([wo.keyword,r],[wo.params,typeof n=="function"?n(e):n||(0,Qe._)`{}`]),d.messages&&i.push([wo.message,typeof t=="function"?t(e):t]),d.verbose&&i.push([wo.schema,l],[wo.parentSchema,(0,Qe._)`${h}${_}`],[Sn.default.data,a]),p&&i.push([wo.propertyName,p])}});var bv=I(da=>{"use strict";Object.defineProperty(da,"__esModule",{value:!0});da.boolOrEmptySchema=da.topBoolOrEmptySchema=void 0;var kV=Ms(),AV=xe(),DV=ui(),NV={message:"boolean schema is false"};function FV(e){let{gen:n,schema:t,validateName:i}=e;t===!1?vv(e,!1):typeof t=="object"&&t.$async===!0?n.return(DV.default.data):(n.assign((0,AV._)`${i}.errors`,null),n.return(!0))}da.topBoolOrEmptySchema=FV;function qV(e,n){let{gen:t,schema:i}=e;i===!1?(t.var(n,!1),vv(e)):t.var(n,!0)}da.boolOrEmptySchema=qV;function vv(e,n){let{gen:t,data:i}=e,r={gen:t,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,kV.reportError)(r,NV,void 0,n)}});var em=I(fa=>{"use strict";Object.defineProperty(fa,"__esModule",{value:!0});fa.getRules=fa.isJSONType=void 0;var VV=["string","number","integer","boolean","null","object","array"],jV=new Set(VV);function RV(e){return typeof e=="string"&&jV.has(e)}fa.isJSONType=RV;function BV(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:at(ye({},e),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}fa.getRules=BV});var tm=I(zr=>{"use strict";Object.defineProperty(zr,"__esModule",{value:!0});zr.shouldUseRule=zr.shouldUseGroup=zr.schemaHasRulesForType=void 0;function LV({schema:e,self:n},t){let i=n.RULES.types[t];return i&&i!==!0&&Cv(e,i)}zr.schemaHasRulesForType=LV;function Cv(e,n){return n.rules.some(t=>xv(e,t))}zr.shouldUseGroup=Cv;function xv(e,n){var t;return e[n.keyword]!==void 0||((t=n.definition.implements)===null||t===void 0?void 0:t.some(i=>e[i]!==void 0))}zr.shouldUseRule=xv});var ks=I(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.reportTypeError=dn.checkDataTypes=dn.checkDataType=dn.coerceAndCheckDataType=dn.getJSONTypes=dn.getSchemaTypes=dn.DataType=void 0;var zV=em(),UV=tm(),HV=Ms(),qe=xe(),wv=We(),pa=function(e){return e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong",e}(pa||(dn.DataType=pa={}));function WV(e){let n=Iv(e.type);if(n.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!n.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&n.push("null")}return n}dn.getSchemaTypes=WV;function Iv(e){let n=Array.isArray(e)?e:e?[e]:[];if(n.every(zV.isJSONType))return n;throw new Error("type must be JSONType or JSONType[]: "+n.join(","))}dn.getJSONTypes=Iv;function GV(e,n){let{gen:t,data:i,opts:r}=e,a=KV(n,r.coerceTypes),l=n.length>0&&!(a.length===0&&n.length===1&&(0,UV.schemaHasRulesForType)(e,n[0]));if(l){let u=im(n,i,r.strictNumbers,pa.Wrong);t.if(u,()=>{a.length?JV(e,n,a):rm(e)})}return l}dn.coerceAndCheckDataType=GV;var Sv=new Set(["string","number","integer","boolean","null"]);function KV(e,n){return n?e.filter(t=>Sv.has(t)||n==="array"&&t==="array"):[]}function JV(e,n,t){let{gen:i,data:r,opts:a}=e,l=i.let("dataType",(0,qe._)`typeof ${r}`),u=i.let("coerced",(0,qe._)`undefined`);a.coerceTypes==="array"&&i.if((0,qe._)`${l} == 'object' && Array.isArray(${r}) && ${r}.length == 1`,()=>i.assign(r,(0,qe._)`${r}[0]`).assign(l,(0,qe._)`typeof ${r}`).if(im(n,r,a.strictNumbers),()=>i.assign(u,r))),i.if((0,qe._)`${u} !== undefined`);for(let p of t)(Sv.has(p)||p==="array"&&a.coerceTypes==="array")&&d(p);i.else(),rm(e),i.endIf(),i.if((0,qe._)`${u} !== undefined`,()=>{i.assign(r,u),YV(e,u)});function d(p){switch(p){case"string":i.elseIf((0,qe._)`${l} == "number" || ${l} == "boolean"`).assign(u,(0,qe._)`"" + ${r}`).elseIf((0,qe._)`${r} === null`).assign(u,(0,qe._)`""`);return;case"number":i.elseIf((0,qe._)`${l} == "boolean" || ${r} === null
3
3
  || (${l} == "string" && ${r} && ${r} == +${r})`).assign(u,(0,qe._)`+${r}`);return;case"integer":i.elseIf((0,qe._)`${l} === "boolean" || ${r} === null
4
4
  || (${l} === "string" && ${r} && ${r} == +${r} && !(${r} % 1))`).assign(u,(0,qe._)`+${r}`);return;case"boolean":i.elseIf((0,qe._)`${r} === "false" || ${r} === 0 || ${r} === null`).assign(u,!1).elseIf((0,qe._)`${r} === "true" || ${r} === 1`).assign(u,!0);return;case"null":i.elseIf((0,qe._)`${r} === "" || ${r} === 0 || ${r} === false`),i.assign(u,null);return;case"array":i.elseIf((0,qe._)`${l} === "string" || ${l} === "number"