openpond 0.2.22 → 0.2.23

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 (38) hide show
  1. package/dist/app-server.js +1 -1
  2. package/dist/chunks/{actions-command-P62RTUD6.js → actions-command-CZD7U6CC.js} +1 -1
  3. package/dist/chunks/{app-layer-6SOR3QBT.js → app-layer-4CK6ZEKN.js} +1 -1
  4. package/dist/chunks/app-server-runtime-5XZWU7JL.js +2 -0
  5. package/dist/chunks/{apps-HFTYJ74Q.js → apps-NIQBGOGH.js} +1 -1
  6. package/dist/chunks/{chunk-TDEMXZ3R.js → chunk-3XUBKIBN.js} +1 -1
  7. package/dist/chunks/{chunk-VNCJGHJC.js → chunk-3YAGJU2X.js} +1 -1
  8. package/dist/chunks/{chunk-ONMUSXZU.js → chunk-CTC5EYSH.js} +1 -1
  9. package/dist/chunks/{chunk-YH35HMNN.js → chunk-CXDS2LSW.js} +1 -1
  10. package/dist/chunks/{chunk-QIQDNEFD.js → chunk-H75VJFMZ.js} +1 -1
  11. package/dist/chunks/{chunk-HPJFRC4R.js → chunk-J3WNPOLS.js} +1 -1
  12. package/dist/chunks/{chunk-VU4NRDKZ.js → chunk-JS6MS2NR.js} +2 -2
  13. package/dist/chunks/{chunk-GKSPJZSF.js → chunk-NS3VMSTX.js} +2 -2
  14. package/dist/chunks/{chunk-MCDTLTSV.js → chunk-Q76GR2JM.js} +1 -1
  15. package/dist/chunks/{chunk-GTV6J3M2.js → chunk-T3VPZRIX.js} +1 -1
  16. package/dist/chunks/{chunk-GGFXBQ3B.js → chunk-V2BBMZ7I.js} +1 -1
  17. package/dist/chunks/{chunk-DQNSR2Q7.js → chunk-WYHHDJEG.js} +16 -16
  18. package/dist/chunks/{chunk-2ESK5DPT.js → chunk-XDVKDELR.js} +1 -1
  19. package/dist/chunks/{cli-J5YD6UAN.js → cli-GWKOPTLS.js} +1 -1
  20. package/dist/chunks/{configuration-command-QIY6A4XZ.js → configuration-command-OAZNWOFX.js} +1 -1
  21. package/dist/chunks/{core-commands-GDEELWSN.js → core-commands-VGUAOSWS.js} +1 -1
  22. package/dist/chunks/{desktop-test-QIW5H3YZ.js → desktop-test-SPTFR43A.js} +1 -1
  23. package/dist/chunks/{extension-T5IOOMNR.js → extension-AZRG5IPK.js} +1 -1
  24. package/dist/chunks/{help-A2NLYYDQ.js → help-6IMGNP7A.js} +1 -1
  25. package/dist/chunks/{opchat-WMMKFVVB.js → opchat-OS7WAVZO.js} +1 -1
  26. package/dist/chunks/{organizations-RVMJ2UXS.js → organizations-QPACFCMH.js} +1 -1
  27. package/dist/chunks/{profile-M5YD4P5E.js → profile-A3YR3WVU.js} +1 -1
  28. package/dist/chunks/{project-agent-6JUCQ4JO.js → project-agent-5H6VCDAY.js} +1 -1
  29. package/dist/chunks/{sandbox-command-KADUJT5Y.js → sandbox-command-RKUHXCZJ.js} +1 -1
  30. package/dist/chunks/{sandbox-template-4SOHDYWY.js → sandbox-template-FK2TGQPK.js} +1 -1
  31. package/dist/chunks/{src-T3RRUIRF.js → src-RZFKQSHW.js} +1 -1
  32. package/dist/chunks/{src-GHTPFT4Q.js → src-UIX7LWM7.js} +1 -1
  33. package/dist/chunks/{teams-bot-B2TEGEXF.js → teams-bot-PASMNRFS.js} +1 -1
  34. package/dist/chunks/{workspaces-66IE4AVY.js → workspaces-YFAAPNVP.js} +1 -1
  35. package/dist/cli.js +1 -1
  36. package/dist/index.js +1 -1
  37. package/package.json +1 -1
  38. package/dist/chunks/app-server-runtime-7POHOWYT.js +0 -2
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
3
- import{a as VA,b as JA,c as GA,d as H,e as KA,f as go,g as z,h as Cu,j as YA}from"./chunk-TDEMXZ3R.js";import{$ as mx,$a as uT,$b as rA,$c as NA,A as j_,Aa as Vx,Ab as CT,Ac as bA,B as H_,Ba as Sc,Bb as ET,Bc as SA,C as O_,Ca as Jx,Cb as MT,Cc as IA,D as N_,Da as Gx,Db as jT,Dc as hh,E as X_,Ea as xs,Eb as DT,Ec as RA,F as Q_,Fa as Ts,Fb as BT,Fc as wh,G as Z_,Ga as Kx,Gb as Ru,Gc as PA,H as ex,Ha as Yx,Hb as $T,Hc as _A,I as tx,Ia as Xx,Ib as LT,Ic as xA,J as nx,Ja as Qx,Jb as NT,Jc as TA,K as rx,Ka as Zx,Kb as FT,Kc as AA,L as ox,La as eT,Lb as UT,Lc as fo,M as ax,Ma as tT,Mb as uh,Mc as Mr,N as lu,Na as uo,Nb as qT,Nc as yh,O as sx,Oa as nT,Ob as zT,Oc as CA,P as uu,Pa as rT,Pb as WT,Pc as EA,Q as ix,Qa as dh,Qb as VT,Qc as Tu,R as cx,Ra as oT,Rb as JT,Rc as Es,S as dx,Sa as Ic,Sb as GT,Sc as MA,T as Is,Ta as aT,Tb as KT,Tc as Au,U as pu,Ua as As,Ub as YT,Uc as jA,V as vc,Va as sT,Vb as XT,Vc as HA,W as oh,Wa as iT,Wb as QT,Wc as OA,X as na,Xa as cT,Xb as ZT,Xc as DA,Y as lx,Ya as dT,Yb as eA,Yc as BA,Z as ux,Za as oe,Zb as tA,Zc as $A,_ as px,_a as lT,_b as nA,_c as LA,a as RS,aa as fx,ab as ku,ac as oA,ad as FA,b as PS,ba as gx,bb as pT,bc as Pu,bd as UA,c as _S,ca as hx,cb as mT,cc as aA,cd as qA,d as xS,da as mu,db as fT,dc as ra,dd as zA,e as TS,ea as fu,eb as gT,ec as _u,f as xl,fa as Rs,fb as hT,fc as sA,fd as WA,g as oI,ga as gu,gb as bu,gc as mo,h as aI,ha as wx,hb as wT,hc as xu,i as sI,ia as yx,ib as po,ic as iA,j as iI,ja as vx,jb as Ae,jc as cA,k as cI,ka as hu,kb as yT,kc as ph,l as Mg,la as kx,lb as pe,lc as mh,m as uI,ma as bx,mb as vT,mc as dA,n as pI,na as Sx,nb as kT,nc as lA,o as mI,oa as Ix,ob as bT,oc as uA,p as fI,pa as wu,pb as ST,pc as pA,q as gI,qa as Rx,qb as IT,qc as fh,r as hI,ra as Px,rb as RT,rc as mA,s as Yo,sa as _x,sb as PT,sc as gh,t as wI,ta as xx,tb as _T,tc as fA,u as yI,ua as Tx,ub as xT,uc as gA,v as Cl,va as bc,vb as TT,vc as hA,w as vI,wa as Ux,wb as AT,wc as wA,x as kI,xa as qx,xb as Cs,xc as yA,y as eq,ya as zx,yb as Bn,yc as vA,z as M_,za as Wx,zb as He,zc as kA}from"./chunk-GKSPJZSF.js";import{A as Ox,C as yu,F as vu,G as ur,H as Dx,I as ah,J as Bx,K as sh,N as $x,O as ih,P as Lx,Q as Nx,R as Fx,S as ch,T as _s,b as lr,d as Ax,e as Cx,h as Ex,m as Ps,n as Mx,p as jx,q as Hx,s as kc}from"./chunk-GTV6J3M2.js";import{a as dt,b as D_,c as B_,f as $_,s as L_,u as lh,v as HT,w as Su,x as Iu,y as OT}from"./chunk-MD7IADMT.js";import{a as C_,b as iu,d as ie,e as ct,f as Ss,g as te,i as E_}from"./chunk-2ESK5DPT.js";import{a as cn,b as F_,c as U_,d as cu,e as du,g as q_,h as z_,i as W_,j as V_,k as J_,l as G_,m as K_,n as Y_}from"./chunk-GGFXBQ3B.js";import{$ as Fl,$a as YR,$b as AP,$c as o_,A as pR,Aa as qg,B as mR,Ba as ze,Bb as mc,Bc as Xl,Bd as ea,C as fR,Ca as zl,Cb as mP,Cd as p_,D as $l,Da as HR,Dc as Zg,Dd as Er,E as gR,Ea as zg,Eb as fP,Ec as JP,Ed as m_,F as Lg,Fb as gP,Fc as GP,Fd as f_,G as hR,Ga as OR,Gb as hP,Gd as g_,H as wR,Hd as co,I as nt,Ia as DR,Ib as hs,Ic as Ql,Id as ks,J as vt,Jb as wP,Jc as KP,Jd as nu,K as Ll,Ka as Wl,Kc as eh,Kd as h_,L as yR,La as BR,Lb as fc,Lc as cr,Ld as w_,M as vR,Mb as Kl,Mc as YP,Md as y_,Na as $R,Nb as yP,Nc as XP,Nd as wc,O as kR,Oa as LR,Ob as Jg,Oc as th,Od as bs,Pa as NR,Pb as vP,Pc as hc,Pd as ru,Q as bR,Qa as FR,Qb as kP,Qc as QP,Qd as v_,R as SR,Ra as UR,Rb as Gg,Rc as Zl,Rd as ou,S as Dn,Sa as qR,Sb as bP,Sc as ZP,Sd as lo,Ta as zR,Tb as SP,Tc as e_,Td as k_,Ua as WR,Ub as IP,Uc as ws,Ud as b_,Va as VR,Vb as RP,Vc as t_,Vd as S_,Wa as io,Wb as PP,Wc as ys,Wd as au,X as IR,Xb as _P,Xc as n_,Xd as I_,Ya as JR,Yb as xP,Yc as r_,Yd as yc,Z as Nl,Za as GR,Zb as Kg,Zc as nh,Zd as R_,_ as Ng,_a as KR,_b as TP,_c as eu,_d as P_,aa as RR,ac as CP,ad as Be,bb as XR,bc as EP,bd as tu,c as ZI,ca as Fg,cb as Vl,cc as Yg,cd as a_,da as PR,db as QR,dc as MP,dd as s_,ea as Nt,eb as ZR,ec as jP,ed as i_,fa as Xo,fb as eP,fc as HP,fd as rh,ga as Qo,gb as tP,gc as OP,gd as c_,ha as Ug,hb as nP,hc as DP,hd as d_,he as su,ia as _R,ib as rP,ic as BP,id as l_,ie as __,ja as xR,jb as oP,jc as $P,je as x_,ka as TR,kb as aP,kc as LP,kd as vs,ke as dr,l as eR,la as AR,lb as sP,lc as NP,ld as u_,le as T_,m as tR,ma as CR,mb as iP,mc as FP,me as ta,n as nR,na as ER,nb as cP,nc as Xg,ne as A_,o as rR,oa as Ul,ob as dP,oc as Zo,p as oR,pb as lP,pc as UP,qa as ql,qb as Wg,qc as qP,rb as Jl,rc as zP,s as aR,sb as uP,t as sR,tb as ir,tc as Yl,u as iR,ub as Cr,uc as WP,v as cR,vb as Vg,w as dR,wb as Gl,wc as VP,x as $g,xa as MR,xb as pP,xc as gc,y as lR,yb as Ft,yc as Qg,z as uR,za as jR,zb as pc}from"./chunk-MCDTLTSV.js";import"./chunk-XEOEKFG6.js";import{$a as rI,Ab as xI,Bb as TI,Ca as On,Da as QS,Dc as ms,E as jS,Ea as Pl,Ec as LI,F as HS,Fa as sn,Fc as NI,G as OS,Gc as Ol,H as kn,Hc as Dl,Ia as ZS,Ic as Bl,Jc as FI,K as DS,Kc as Og,L as Il,La as eI,Lc as UI,M as BS,Mc as qI,Na as Cg,Nc as zI,Oa as je,Oc as WI,Pa as Ko,Pc as so,Qa as Ze,Qc as VI,Rb as AI,Rc as sr,S as $S,Sc as JI,T as LS,Tb as CI,Ua as tI,Ub as EI,Wc as GI,X as NS,Xa as lc,Xc as KI,Ya as nI,Yc as fs,Za as _l,aa as FS,ab as Eg,ac as MI,ba as US,bb as ps,ca as qS,da as zS,dc as jI,e as AS,ea as WS,fa as Rl,fb as Tl,ga as Ag,gd as gs,ha as VS,hb as dI,hd as uc,ia as JS,ic as HI,id as YI,ja as GS,jd as XI,kd as QI,mc as Hg,md as Dg,na as KS,nb as Al,nc as OI,ob as lI,od as Bg,p as CS,pa as us,pb as bI,q as ES,qb as El,qc as DI,r as Kt,rc as jl,s as bl,sa as YS,sc as Hl,tb as jg,tc as BI,ua as XS,ub as SI,v as Ar,vb as II,vc as $I,w as dc,wb as RI,x as Tg,xb as Ml,y as Sl,yb as PI,z as MS,zb as _I}from"./chunk-ONMUSXZU.js";import"./chunk-6MI4KKWF.js";import"./chunk-SDO4FC4Q.js";import"./chunk-IR3YJWPW.js";import{D as ls,E as ic,F as kl,d as vl,m as SS,n as ao,o as Je,p as IS}from"./chunk-HPJFRC4R.js";import"./chunk-J2S7BOZU.js";import{Ca as fS,Fb as Ge,Gb as Gt,Ja as gS,Mb as vS,Na as hS,Oa as wS,S as hl,Va as yl,Vb as kS,Xb as bS,a as an,bb as yS,qa as pS,ra as wl,ta as mS}from"./chunk-DQNSR2Q7.js";import{a as cc}from"./chunk-6FA3GG5B.js";import{$a as Go,Ca as sS,Ea as _g,F as Pg,Fa as xg,Ga as iS,N as Xb,R as ro,T as Qb,Ta as fl,Ua as cS,V as Zb,W as eS,X as tS,Ya as dS,Za as lS,ab as uS,bb as gl,f as il,k as Vo,l as qb,m as sc,n as xr,o as ul,p as zb,pa as oo,q as pl,r as Wb,ra as Jo,s as is,u as Vb,v as Jb,w as Gb,wa as nS,x as Kb,xa as rS,y as Yb,ya as oS,za as aS}from"./chunk-NNLI4OWY.js";import{a as as,b as ss,c as Ig,d as cl,e as it,f as Rg,g as dl,j as Ve,k as Se,l as O,m as Fb,o as Ub,p as ll,q as Et}from"./chunk-HZP5U2AA.js";import{a as Wo,b as _}from"./chunk-ES2ISFJC.js";import{a as $b,c as zo,f as Lb,h as sl,i as Nb,p as cs,q as ml,r as Tr,s as ds}from"./chunk-H7IWJN7L.js";import{a,b as Pe,c as Te,e as ar}from"./chunk-FTQLQJQV.js";var qr=Te((Eme,pj)=>{"use strict";var lj=["nodebuffer","arraybuffer","fragments"],uj=typeof Blob<"u";uj&&lj.push("blob");pj.exports={BINARY_TYPES:lj,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:uj,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:a(()=>{},"NOOP")}});var Gc=Te((jme,Ip)=>{"use strict";var{EMPTY_BUFFER:c6}=qr(),Vw=Buffer[Symbol.species];function d6(e,t){if(e.length===0)return c6;if(e.length===1)return e[0];let n=Buffer.allocUnsafe(t),r=0;for(let o=0;o<e.length;o++){let s=e[o];n.set(s,r),r+=s.length}return r<t?new Vw(n.buffer,n.byteOffset,r):n}a(d6,"concat");function mj(e,t,n,r,o){for(let s=0;s<o;s++)n[r+s]=e[s]^t[s&3]}a(mj,"_mask");function fj(e,t){for(let n=0;n<e.length;n++)e[n]^=t[n&3]}a(fj,"_unmask");function l6(e){return e.length===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.length)}a(l6,"toArrayBuffer");function Jw(e){if(Jw.readOnly=!0,Buffer.isBuffer(e))return e;let t;return e instanceof ArrayBuffer?t=new Vw(e):ArrayBuffer.isView(e)?t=new Vw(e.buffer,e.byteOffset,e.byteLength):(t=Buffer.from(e),Jw.readOnly=!1),t}a(Jw,"toBuffer");Ip.exports={concat:d6,mask:mj,toArrayBuffer:l6,toBuffer:Jw,unmask:fj};if(!process.env.WS_NO_BUFFER_UTIL)try{let e=Pe("bufferutil");Ip.exports.mask=function(t,n,r,o,s){s<48?mj(t,n,r,o,s):e.mask(t,n,r,o,s)},Ip.exports.unmask=function(t,n){t.length<32?fj(t,n):e.unmask(t,n)}}catch{}});var wj=Te((Ome,hj)=>{"use strict";var gj=Symbol("kDone"),Gw=Symbol("kRun"),Kw=class{static{a(this,"Limiter")}constructor(t){this[gj]=()=>{this.pending--,this[Gw]()},this.concurrency=t||1/0,this.jobs=[],this.pending=0}add(t){this.jobs.push(t),this[Gw]()}[Gw](){if(this.pending!==this.concurrency&&this.jobs.length){let t=this.jobs.shift();this.pending++,t(this[gj])}}};hj.exports=Kw});var ci=Te((Bme,bj)=>{"use strict";var Kc=Pe("zlib"),yj=Gc(),u6=wj(),{kStatusCode:vj}=qr(),p6=Buffer[Symbol.species],m6=Buffer.from([0,0,255,255]),Pp=Symbol("permessage-deflate"),zr=Symbol("total-length"),si=Symbol("callback"),Ao=Symbol("buffers"),ii=Symbol("error"),Rp,Yw=class{static{a(this,"PerMessageDeflate")}constructor(t){if(this._options=t||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._maxPayload=this._options.maxPayload|0,this._isServer=!!this._options.isServer,this._deflate=null,this._inflate=null,this.params=null,!Rp){let n=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;Rp=new u6(n)}}static get extensionName(){return"permessage-deflate"}offer(){let t={};return this._options.serverNoContextTakeover&&(t.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(t.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(t.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?t.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(t.client_max_window_bits=!0),t}accept(t){return t=this.normalizeParams(t),this.params=this._isServer?this.acceptAsServer(t):this.acceptAsClient(t),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let t=this._deflate[si];this._deflate.close(),this._deflate=null,t&&t(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(t){let n=this._options,r=t.find(o=>!(n.serverNoContextTakeover===!1&&o.server_no_context_takeover||o.server_max_window_bits&&(n.serverMaxWindowBits===!1||typeof n.serverMaxWindowBits=="number"&&n.serverMaxWindowBits>o.server_max_window_bits)||typeof n.clientMaxWindowBits=="number"&&!o.client_max_window_bits));if(!r)throw new Error("None of the extension offers can be accepted");return n.serverNoContextTakeover&&(r.server_no_context_takeover=!0),n.clientNoContextTakeover&&(r.client_no_context_takeover=!0),typeof n.serverMaxWindowBits=="number"&&(r.server_max_window_bits=n.serverMaxWindowBits),typeof n.clientMaxWindowBits=="number"?r.client_max_window_bits=n.clientMaxWindowBits:(r.client_max_window_bits===!0||n.clientMaxWindowBits===!1)&&delete r.client_max_window_bits,r}acceptAsClient(t){let n=t[0];if(this._options.clientNoContextTakeover===!1&&n.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!n.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(n.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&n.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return n}normalizeParams(t){return t.forEach(n=>{Object.keys(n).forEach(r=>{let o=n[r];if(o.length>1)throw new Error(`Parameter "${r}" must have only a single value`);if(o=o[0],r==="client_max_window_bits"){if(o!==!0){let s=+o;if(!Number.isInteger(s)||s<8||s>15)throw new TypeError(`Invalid value for parameter "${r}": ${o}`);o=s}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${r}": ${o}`)}else if(r==="server_max_window_bits"){let s=+o;if(!Number.isInteger(s)||s<8||s>15)throw new TypeError(`Invalid value for parameter "${r}": ${o}`);o=s}else if(r==="client_no_context_takeover"||r==="server_no_context_takeover"){if(o!==!0)throw new TypeError(`Invalid value for parameter "${r}": ${o}`)}else throw new Error(`Unknown parameter "${r}"`);n[r]=o})}),t}decompress(t,n,r){Rp.add(o=>{this._decompress(t,n,(s,i)=>{o(),r(s,i)})})}compress(t,n,r){Rp.add(o=>{this._compress(t,n,(s,i)=>{o(),r(s,i)})})}_decompress(t,n,r){let o=this._isServer?"client":"server";if(!this._inflate){let s=`${o}_max_window_bits`,i=typeof this.params[s]!="number"?Kc.Z_DEFAULT_WINDOWBITS:this.params[s];this._inflate=Kc.createInflateRaw({...this._options.zlibInflateOptions,windowBits:i}),this._inflate[Pp]=this,this._inflate[zr]=0,this._inflate[Ao]=[],this._inflate.on("error",g6),this._inflate.on("data",kj)}this._inflate[si]=r,this._inflate.write(t),n&&this._inflate.write(m6),this._inflate.flush(()=>{let s=this._inflate[ii];if(s){this._inflate.close(),this._inflate=null,r(s);return}let i=yj.concat(this._inflate[Ao],this._inflate[zr]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[zr]=0,this._inflate[Ao]=[],n&&this.params[`${o}_no_context_takeover`]&&this._inflate.reset()),r(null,i)})}_compress(t,n,r){let o=this._isServer?"server":"client";if(!this._deflate){let s=`${o}_max_window_bits`,i=typeof this.params[s]!="number"?Kc.Z_DEFAULT_WINDOWBITS:this.params[s];this._deflate=Kc.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:i}),this._deflate[zr]=0,this._deflate[Ao]=[],this._deflate.on("data",f6)}this._deflate[si]=r,this._deflate.write(t),this._deflate.flush(Kc.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let s=yj.concat(this._deflate[Ao],this._deflate[zr]);n&&(s=new p6(s.buffer,s.byteOffset,s.length-4)),this._deflate[si]=null,this._deflate[zr]=0,this._deflate[Ao]=[],n&&this.params[`${o}_no_context_takeover`]&&this._deflate.reset(),r(null,s)})}};bj.exports=Yw;function f6(e){this[Ao].push(e),this[zr]+=e.length}a(f6,"deflateOnData");function kj(e){if(this[zr]+=e.length,this[Pp]._maxPayload<1||this[zr]<=this[Pp]._maxPayload){this[Ao].push(e);return}this[ii]=new RangeError("Max payload size exceeded"),this[ii].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[ii][vj]=1009,this.removeListener("data",kj),this.reset()}a(kj,"inflateOnData");function g6(e){if(this[Pp]._inflate=null,this[ii]){this[si](this[ii]);return}e[vj]=1007,this[si](e)}a(g6,"inflateOnError")});var di=Te((Lme,_p)=>{"use strict";var{isUtf8:Sj}=Pe("buffer"),{hasBlob:h6}=qr(),w6=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function y6(e){return e>=1e3&&e<=1014&&e!==1004&&e!==1005&&e!==1006||e>=3e3&&e<=4999}a(y6,"isValidStatusCode");function Xw(e){let t=e.length,n=0;for(;n<t;)if((e[n]&128)===0)n++;else if((e[n]&224)===192){if(n+1===t||(e[n+1]&192)!==128||(e[n]&254)===192)return!1;n+=2}else if((e[n]&240)===224){if(n+2>=t||(e[n+1]&192)!==128||(e[n+2]&192)!==128||e[n]===224&&(e[n+1]&224)===128||e[n]===237&&(e[n+1]&224)===160)return!1;n+=3}else if((e[n]&248)===240){if(n+3>=t||(e[n+1]&192)!==128||(e[n+2]&192)!==128||(e[n+3]&192)!==128||e[n]===240&&(e[n+1]&240)===128||e[n]===244&&e[n+1]>143||e[n]>244)return!1;n+=4}else return!1;return!0}a(Xw,"_isValidUTF8");function v6(e){return h6&&typeof e=="object"&&typeof e.arrayBuffer=="function"&&typeof e.type=="string"&&typeof e.stream=="function"&&(e[Symbol.toStringTag]==="Blob"||e[Symbol.toStringTag]==="File")}a(v6,"isBlob");_p.exports={isBlob:v6,isValidStatusCode:y6,isValidUTF8:Xw,tokenChars:w6};if(Sj)_p.exports.isValidUTF8=function(e){return e.length<24?Xw(e):Sj(e)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let e=Pe("utf-8-validate");_p.exports.isValidUTF8=function(t){return t.length<32?Xw(t):e(t)}}catch{}});var ny=Te((Fme,Aj)=>{"use strict";var{Writable:k6}=Pe("stream"),Ij=ci(),{BINARY_TYPES:b6,EMPTY_BUFFER:Rj,kStatusCode:S6,kWebSocket:I6}=qr(),{concat:Qw,toArrayBuffer:R6,unmask:P6}=Gc(),{isValidStatusCode:_6,isValidUTF8:Pj}=di(),xp=Buffer[Symbol.species],xn=0,_j=1,xj=2,Tj=3,Zw=4,ey=5,Tp=6,ty=class extends k6{static{a(this,"Receiver")}constructor(t={}){super(),this._allowSynchronousEvents=t.allowSynchronousEvents!==void 0?t.allowSynchronousEvents:!0,this._binaryType=t.binaryType||b6[0],this._extensions=t.extensions||{},this._isServer=!!t.isServer,this._maxBufferedChunks=t.maxBufferedChunks|0,this._maxFragments=t.maxFragments|0,this._maxPayload=t.maxPayload|0,this._skipUTF8Validation=!!t.skipUTF8Validation,this[I6]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._numFragments=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=xn}_write(t,n,r){if(this._opcode===8&&this._state==xn)return r();if(this._maxBufferedChunks>0&&this._buffers.length>=this._maxBufferedChunks){r(this.createError(RangeError,"Too many buffered chunks",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS"));return}this._bufferedBytes+=t.length,this._buffers.push(t),this.startLoop(r)}consume(t){if(this._bufferedBytes-=t,t===this._buffers[0].length)return this._buffers.shift();if(t<this._buffers[0].length){let r=this._buffers[0];return this._buffers[0]=new xp(r.buffer,r.byteOffset+t,r.length-t),new xp(r.buffer,r.byteOffset,t)}let n=Buffer.allocUnsafe(t);do{let r=this._buffers[0],o=n.length-t;t>=r.length?n.set(this._buffers.shift(),o):(n.set(new Uint8Array(r.buffer,r.byteOffset,t),o),this._buffers[0]=new xp(r.buffer,r.byteOffset+t,r.length-t)),t-=r.length}while(t>0);return n}startLoop(t){this._loop=!0;do switch(this._state){case xn:this.getInfo(t);break;case _j:this.getPayloadLength16(t);break;case xj:this.getPayloadLength64(t);break;case Tj:this.getMask();break;case Zw:this.getData(t);break;case ey:case Tp:this._loop=!1;return}while(this._loop);this._errored||t()}getInfo(t){if(this._bufferedBytes<2){this._loop=!1;return}let n=this.consume(2);if((n[0]&48)!==0){let o=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");t(o);return}let r=(n[0]&64)===64;if(r&&!this._extensions[Ij.extensionName]){let o=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(o);return}if(this._fin=(n[0]&128)===128,this._opcode=n[0]&15,this._payloadLength=n[1]&127,this._opcode===0){if(r){let o=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(o);return}if(!this._fragmented){let o=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");t(o);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let o=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");t(o);return}this._compressed=r}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let o=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");t(o);return}if(r){let o=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(o);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let o=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");t(o);return}}else{let o=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");t(o);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(n[1]&128)===128,this._isServer){if(!this._masked){let o=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");t(o);return}}else if(this._masked){let o=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");t(o);return}this._payloadLength===126?this._state=_j:this._payloadLength===127?this._state=xj:this.haveLength(t)}getPayloadLength16(t){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(t)}getPayloadLength64(t){if(this._bufferedBytes<8){this._loop=!1;return}let n=this.consume(8),r=n.readUInt32BE(0);if(r>Math.pow(2,21)-1){let o=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");t(o);return}this._payloadLength=r*Math.pow(2,32)+n.readUInt32BE(4),this.haveLength(t)}haveLength(t){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let n=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");t(n);return}this._masked?this._state=Tj:this._state=Zw}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=Zw}getData(t){let n=Rj;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}n=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0&&P6(n,this._mask)}if(this._opcode>7){this.controlMessage(n,t);return}if(this._maxFragments>0&&++this._numFragments>this._maxFragments){let r=this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS");t(r);return}if(this._compressed){this._state=ey,this.decompress(n,t);return}n.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(n)),this.dataMessage(t)}decompress(t,n){this._extensions[Ij.extensionName].decompress(t,this._fin,(o,s)=>{if(o)return n(o);if(s.length){if(this._messageLength+=s.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let i=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");n(i);return}this._fragments.push(s)}this.dataMessage(n),this._state===xn&&this.startLoop(n)})}dataMessage(t){if(!this._fin){this._state=xn;return}let n=this._messageLength,r=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._numFragments=0,this._fragments=[],this._opcode===2){let o;this._binaryType==="nodebuffer"?o=Qw(r,n):this._binaryType==="arraybuffer"?o=R6(Qw(r,n)):this._binaryType==="blob"?o=new Blob(r):o=r,this._allowSynchronousEvents?(this.emit("message",o,!0),this._state=xn):(this._state=Tp,setImmediate(()=>{this.emit("message",o,!0),this._state=xn,this.startLoop(t)}))}else{let o=Qw(r,n);if(!this._skipUTF8Validation&&!Pj(o)){let s=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");t(s);return}this._state===ey||this._allowSynchronousEvents?(this.emit("message",o,!1),this._state=xn):(this._state=Tp,setImmediate(()=>{this.emit("message",o,!1),this._state=xn,this.startLoop(t)}))}}controlMessage(t,n){if(this._opcode===8){if(t.length===0)this._loop=!1,this.emit("conclude",1005,Rj),this.end();else{let r=t.readUInt16BE(0);if(!_6(r)){let s=this.createError(RangeError,`invalid status code ${r}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");n(s);return}let o=new xp(t.buffer,t.byteOffset+2,t.length-2);if(!this._skipUTF8Validation&&!Pj(o)){let s=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");n(s);return}this._loop=!1,this.emit("conclude",r,o),this.end()}this._state=xn;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",t),this._state=xn):(this._state=Tp,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",t),this._state=xn,this.startLoop(n)}))}createError(t,n,r,o,s){this._loop=!1,this._errored=!0;let i=new t(r?`Invalid WebSocket frame: ${n}`:n);return Error.captureStackTrace(i,this.createError),i.code=s,i[S6]=o,i}};Aj.exports=ty});var ay=Te((zme,Mj)=>{"use strict";var{Duplex:qme}=Pe("stream"),{randomFillSync:x6}=Pe("crypto"),{types:{isUint8Array:T6}}=Pe("util"),Cj=ci(),{EMPTY_BUFFER:A6,kWebSocket:C6,NOOP:E6}=qr(),{isBlob:li,isValidStatusCode:M6}=di(),{mask:Ej,toBuffer:fa}=Gc(),Tn=Symbol("kByteLength"),j6=Buffer.alloc(4),Ap=8*1024,ga,ui=Ap,Fn=0,H6=1,O6=2,ry=class e{static{a(this,"Sender")}constructor(t,n,r){this._extensions=n||{},r&&(this._generateMask=r,this._maskBuffer=Buffer.alloc(4)),this._socket=t,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=Fn,this.onerror=E6,this[C6]=void 0}static frame(t,n){let r,o=!1,s=2,i=!1;n.mask&&(r=n.maskBuffer||j6,n.generateMask?n.generateMask(r):(ui===Ap&&(ga===void 0&&(ga=Buffer.alloc(Ap)),x6(ga,0,Ap),ui=0),r[0]=ga[ui++],r[1]=ga[ui++],r[2]=ga[ui++],r[3]=ga[ui++]),i=(r[0]|r[1]|r[2]|r[3])===0,s=6);let c;typeof t=="string"?(!n.mask||i)&&n[Tn]!==void 0?c=n[Tn]:(t=Buffer.from(t),c=t.length):(c=t.length,o=n.mask&&n.readOnly&&!i);let d=c;c>=65536?(s+=8,d=127):c>125&&(s+=2,d=126);let l=Buffer.allocUnsafe(o?c+s:s);return l[0]=n.fin?n.opcode|128:n.opcode,n.rsv1&&(l[0]|=64),l[1]=d,d===126?l.writeUInt16BE(c,2):d===127&&(l[2]=l[3]=0,l.writeUIntBE(c,4,6)),n.mask?(l[1]|=128,l[s-4]=r[0],l[s-3]=r[1],l[s-2]=r[2],l[s-1]=r[3],i?[l,t]:o?(Ej(t,r,l,s,c),[l]):(Ej(t,r,t,0,c),[l,t])):[l,t]}close(t,n,r,o){let s;if(t===void 0)s=A6;else{if(typeof t!="number"||!M6(t))throw new TypeError("First argument must be a valid error code number");if(n===void 0||!n.length)s=Buffer.allocUnsafe(2),s.writeUInt16BE(t,0);else{let c=Buffer.byteLength(n);if(c>123)throw new RangeError("The message must not be greater than 123 bytes");if(s=Buffer.allocUnsafe(2+c),s.writeUInt16BE(t,0),typeof n=="string")s.write(n,2);else if(T6(n))s.set(n,2);else throw new TypeError("Second argument must be a string or a Uint8Array")}}let i={[Tn]:s.length,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==Fn?this.enqueue([this.dispatch,s,!1,i,o]):this.sendFrame(e.frame(s,i),o)}ping(t,n,r){let o,s;if(typeof t=="string"?(o=Buffer.byteLength(t),s=!1):li(t)?(o=t.size,s=!1):(t=fa(t),o=t.length,s=fa.readOnly),o>125)throw new RangeError("The data size must not be greater than 125 bytes");let i={[Tn]:o,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:9,readOnly:s,rsv1:!1};li(t)?this._state!==Fn?this.enqueue([this.getBlobData,t,!1,i,r]):this.getBlobData(t,!1,i,r):this._state!==Fn?this.enqueue([this.dispatch,t,!1,i,r]):this.sendFrame(e.frame(t,i),r)}pong(t,n,r){let o,s;if(typeof t=="string"?(o=Buffer.byteLength(t),s=!1):li(t)?(o=t.size,s=!1):(t=fa(t),o=t.length,s=fa.readOnly),o>125)throw new RangeError("The data size must not be greater than 125 bytes");let i={[Tn]:o,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:10,readOnly:s,rsv1:!1};li(t)?this._state!==Fn?this.enqueue([this.getBlobData,t,!1,i,r]):this.getBlobData(t,!1,i,r):this._state!==Fn?this.enqueue([this.dispatch,t,!1,i,r]):this.sendFrame(e.frame(t,i),r)}send(t,n,r){let o=this._extensions[Cj.extensionName],s=n.binary?2:1,i=n.compress,c,d;typeof t=="string"?(c=Buffer.byteLength(t),d=!1):li(t)?(c=t.size,d=!1):(t=fa(t),c=t.length,d=fa.readOnly),this._firstFragment?(this._firstFragment=!1,i&&o&&o.params[o._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(i=c>=o._threshold),this._compress=i):(i=!1,s=0),n.fin&&(this._firstFragment=!0);let l={[Tn]:c,fin:n.fin,generateMask:this._generateMask,mask:n.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:d,rsv1:i};li(t)?this._state!==Fn?this.enqueue([this.getBlobData,t,this._compress,l,r]):this.getBlobData(t,this._compress,l,r):this._state!==Fn?this.enqueue([this.dispatch,t,this._compress,l,r]):this.dispatch(t,this._compress,l,r)}getBlobData(t,n,r,o){this._bufferedBytes+=r[Tn],this._state=O6,t.arrayBuffer().then(s=>{if(this._socket.destroyed){let c=new Error("The socket was closed while the blob was being read");process.nextTick(oy,this,c,o);return}this._bufferedBytes-=r[Tn];let i=fa(s);n?this.dispatch(i,n,r,o):(this._state=Fn,this.sendFrame(e.frame(i,r),o),this.dequeue())}).catch(s=>{process.nextTick(D6,this,s,o)})}dispatch(t,n,r,o){if(!n){this.sendFrame(e.frame(t,r),o);return}let s=this._extensions[Cj.extensionName];this._bufferedBytes+=r[Tn],this._state=H6,s.compress(t,r.fin,(i,c)=>{if(this._socket.destroyed){let d=new Error("The socket was closed while data was being compressed");oy(this,d,o);return}this._bufferedBytes-=r[Tn],this._state=Fn,r.readOnly=!1,this.sendFrame(e.frame(c,r),o),this.dequeue()})}dequeue(){for(;this._state===Fn&&this._queue.length;){let t=this._queue.shift();this._bufferedBytes-=t[3][Tn],Reflect.apply(t[0],this,t.slice(1))}}enqueue(t){this._bufferedBytes+=t[3][Tn],this._queue.push(t)}sendFrame(t,n){t.length===2?(this._socket.cork(),this._socket.write(t[0]),this._socket.write(t[1],n),this._socket.uncork()):this._socket.write(t[0],n)}};Mj.exports=ry;function oy(e,t,n){typeof n=="function"&&n(t);for(let r=0;r<e._queue.length;r++){let o=e._queue[r],s=o[o.length-1];typeof s=="function"&&s(t)}}a(oy,"callCallbacks");function D6(e,t,n){oy(e,t,n),e.onerror(t)}a(D6,"onError")});var Fj=Te((Vme,Nj)=>{"use strict";var{kForOnEventAttribute:Yc,kListener:sy}=qr(),jj=Symbol("kCode"),Hj=Symbol("kData"),Oj=Symbol("kError"),Dj=Symbol("kMessage"),Bj=Symbol("kReason"),pi=Symbol("kTarget"),$j=Symbol("kType"),Lj=Symbol("kWasClean"),Wr=class{static{a(this,"Event")}constructor(t){this[pi]=null,this[$j]=t}get target(){return this[pi]}get type(){return this[$j]}};Object.defineProperty(Wr.prototype,"target",{enumerable:!0});Object.defineProperty(Wr.prototype,"type",{enumerable:!0});var ha=class extends Wr{static{a(this,"CloseEvent")}constructor(t,n={}){super(t),this[jj]=n.code===void 0?0:n.code,this[Bj]=n.reason===void 0?"":n.reason,this[Lj]=n.wasClean===void 0?!1:n.wasClean}get code(){return this[jj]}get reason(){return this[Bj]}get wasClean(){return this[Lj]}};Object.defineProperty(ha.prototype,"code",{enumerable:!0});Object.defineProperty(ha.prototype,"reason",{enumerable:!0});Object.defineProperty(ha.prototype,"wasClean",{enumerable:!0});var mi=class extends Wr{static{a(this,"ErrorEvent")}constructor(t,n={}){super(t),this[Oj]=n.error===void 0?null:n.error,this[Dj]=n.message===void 0?"":n.message}get error(){return this[Oj]}get message(){return this[Dj]}};Object.defineProperty(mi.prototype,"error",{enumerable:!0});Object.defineProperty(mi.prototype,"message",{enumerable:!0});var Xc=class extends Wr{static{a(this,"MessageEvent")}constructor(t,n={}){super(t),this[Hj]=n.data===void 0?null:n.data}get data(){return this[Hj]}};Object.defineProperty(Xc.prototype,"data",{enumerable:!0});var B6={addEventListener(e,t,n={}){for(let o of this.listeners(e))if(!n[Yc]&&o[sy]===t&&!o[Yc])return;let r;if(e==="message")r=a(function(s,i){let c=new Xc("message",{data:i?s:s.toString()});c[pi]=this,Cp(t,this,c)},"onMessage");else if(e==="close")r=a(function(s,i){let c=new ha("close",{code:s,reason:i.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});c[pi]=this,Cp(t,this,c)},"onClose");else if(e==="error")r=a(function(s){let i=new mi("error",{error:s,message:s.message});i[pi]=this,Cp(t,this,i)},"onError");else if(e==="open")r=a(function(){let s=new Wr("open");s[pi]=this,Cp(t,this,s)},"onOpen");else return;r[Yc]=!!n[Yc],r[sy]=t,n.once?this.once(e,r):this.on(e,r)},removeEventListener(e,t){for(let n of this.listeners(e))if(n[sy]===t&&!n[Yc]){this.removeListener(e,n);break}}};Nj.exports={CloseEvent:ha,ErrorEvent:mi,Event:Wr,EventTarget:B6,MessageEvent:Xc};function Cp(e,t,n){typeof e=="object"&&e.handleEvent?e.handleEvent.call(e,n):e.call(t,n)}a(Cp,"callListener")});var Ep=Te((Gme,Uj)=>{"use strict";var{tokenChars:Qc}=di();function hr(e,t,n){e[t]===void 0?e[t]=[n]:e[t].push(n)}a(hr,"push");function $6(e){let t=Object.create(null),n=Object.create(null),r=!1,o=!1,s=!1,i,c,d=-1,l=-1,u=-1,p=0;for(;p<e.length;p++)if(l=e.charCodeAt(p),i===void 0)if(u===-1&&Qc[l]===1)d===-1&&(d=p);else if(p!==0&&(l===32||l===9))u===-1&&d!==-1&&(u=p);else if(l===59||l===44){if(d===-1)throw new SyntaxError(`Unexpected character at index ${p}`);u===-1&&(u=p);let f=e.slice(d,u);l===44?(hr(t,f,n),n=Object.create(null)):i=f,d=u=-1}else throw new SyntaxError(`Unexpected character at index ${p}`);else if(c===void 0)if(u===-1&&Qc[l]===1)d===-1&&(d=p);else if(l===32||l===9)u===-1&&d!==-1&&(u=p);else if(l===59||l===44){if(d===-1)throw new SyntaxError(`Unexpected character at index ${p}`);u===-1&&(u=p),hr(n,e.slice(d,u),!0),l===44&&(hr(t,i,n),n=Object.create(null),i=void 0),d=u=-1}else if(l===61&&d!==-1&&u===-1)c=e.slice(d,p),d=u=-1;else throw new SyntaxError(`Unexpected character at index ${p}`);else if(o){if(Qc[l]!==1)throw new SyntaxError(`Unexpected character at index ${p}`);d===-1?d=p:r||(r=!0),o=!1}else if(s)if(Qc[l]===1)d===-1&&(d=p);else if(l===34&&d!==-1)s=!1,u=p;else if(l===92)o=!0;else throw new SyntaxError(`Unexpected character at index ${p}`);else if(l===34&&e.charCodeAt(p-1)===61)s=!0;else if(u===-1&&Qc[l]===1)d===-1&&(d=p);else if(d!==-1&&(l===32||l===9))u===-1&&(u=p);else if(l===59||l===44){if(d===-1)throw new SyntaxError(`Unexpected character at index ${p}`);u===-1&&(u=p);let f=e.slice(d,u);r&&(f=f.replace(/\\/g,""),r=!1),hr(n,c,f),l===44&&(hr(t,i,n),n=Object.create(null),i=void 0),c=void 0,d=u=-1}else throw new SyntaxError(`Unexpected character at index ${p}`);if(d===-1||s||l===32||l===9)throw new SyntaxError("Unexpected end of input");u===-1&&(u=p);let m=e.slice(d,u);return i===void 0?hr(t,m,n):(c===void 0?hr(n,m,!0):r?hr(n,c,m.replace(/\\/g,"")):hr(n,c,m),hr(t,i,n)),t}a($6,"parse");function L6(e){return Object.keys(e).map(t=>{let n=e[t];return Array.isArray(n)||(n=[n]),n.map(r=>[t].concat(Object.keys(r).map(o=>{let s=r[o];return Array.isArray(s)||(s=[s]),s.map(i=>i===!0?o:`${o}=${i}`).join("; ")})).join("; ")).join(", ")}).join(", ")}a(L6,"format");Uj.exports={format:L6,parse:$6}});var Op=Te((Qme,eH)=>{"use strict";var N6=Pe("events"),F6=Pe("https"),U6=Pe("http"),Wj=Pe("net"),q6=Pe("tls"),{randomBytes:z6,createHash:W6}=Pe("crypto"),{Duplex:Yme,Readable:Xme}=Pe("stream"),{URL:iy}=Pe("url"),Co=ci(),V6=ny(),J6=ay(),{isBlob:G6}=di(),{BINARY_TYPES:qj,CLOSE_TIMEOUT:K6,EMPTY_BUFFER:Mp,GUID:Y6,kForOnEventAttribute:cy,kListener:X6,kStatusCode:Q6,kWebSocket:mt,NOOP:Vj}=qr(),{EventTarget:{addEventListener:Z6,removeEventListener:e5}}=Fj(),{format:t5,parse:n5}=Ep(),{toBuffer:r5}=Gc(),Jj=Symbol("kAborted"),dy=[8,13],Vr=["CONNECTING","OPEN","CLOSING","CLOSED"],o5=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,We=class e extends N6{static{a(this,"WebSocket")}constructor(t,n,r){super(),this._binaryType=qj[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=Mp,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=e.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,t!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,n===void 0?n=[]:Array.isArray(n)||(typeof n=="object"&&n!==null?(r=n,n=[]):n=[n]),Gj(this,t,n,r)):(this._autoPong=r.autoPong,this._closeTimeout=r.closeTimeout,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(t){qj.includes(t)&&(this._binaryType=t,this._receiver&&(this._receiver._binaryType=t))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(t,n,r){let o=new V6({allowSynchronousEvents:r.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxBufferedChunks:r.maxBufferedChunks,maxFragments:r.maxFragments,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation}),s=new J6(t,this._extensions,r.generateMask);this._receiver=o,this._sender=s,this._socket=t,o[mt]=this,s[mt]=this,t[mt]=this,o.on("conclude",i5),o.on("drain",c5),o.on("error",d5),o.on("message",l5),o.on("ping",u5),o.on("pong",p5),s.onerror=m5,t.setTimeout&&t.setTimeout(0),t.setNoDelay&&t.setNoDelay(),n.length>0&&t.unshift(n),t.on("close",Xj),t.on("data",Hp),t.on("end",Qj),t.on("error",Zj),this._readyState=e.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=e.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[Co.extensionName]&&this._extensions[Co.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=e.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(t,n){if(this.readyState!==e.CLOSED){if(this.readyState===e.CONNECTING){pn(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===e.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=e.CLOSING,this._sender.close(t,n,!this._isServer,r=>{r||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),Yj(this)}}pause(){this.readyState===e.CONNECTING||this.readyState===e.CLOSED||(this._paused=!0,this._socket.pause())}ping(t,n,r){if(this.readyState===e.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"?(r=t,t=n=void 0):typeof n=="function"&&(r=n,n=void 0),typeof t=="number"&&(t=t.toString()),this.readyState!==e.OPEN){ly(this,t,r);return}n===void 0&&(n=!this._isServer),this._sender.ping(t||Mp,n,r)}pong(t,n,r){if(this.readyState===e.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"?(r=t,t=n=void 0):typeof n=="function"&&(r=n,n=void 0),typeof t=="number"&&(t=t.toString()),this.readyState!==e.OPEN){ly(this,t,r);return}n===void 0&&(n=!this._isServer),this._sender.pong(t||Mp,n,r)}resume(){this.readyState===e.CONNECTING||this.readyState===e.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(t,n,r){if(this.readyState===e.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof n=="function"&&(r=n,n={}),typeof t=="number"&&(t=t.toString()),this.readyState!==e.OPEN){ly(this,t,r);return}let o={binary:typeof t!="string",mask:!this._isServer,compress:!0,fin:!0,...n};this._extensions[Co.extensionName]||(o.compress=!1),this._sender.send(t||Mp,o,r)}terminate(){if(this.readyState!==e.CLOSED){if(this.readyState===e.CONNECTING){pn(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=e.CLOSING,this._socket.destroy())}}};Object.defineProperty(We,"CONNECTING",{enumerable:!0,value:Vr.indexOf("CONNECTING")});Object.defineProperty(We.prototype,"CONNECTING",{enumerable:!0,value:Vr.indexOf("CONNECTING")});Object.defineProperty(We,"OPEN",{enumerable:!0,value:Vr.indexOf("OPEN")});Object.defineProperty(We.prototype,"OPEN",{enumerable:!0,value:Vr.indexOf("OPEN")});Object.defineProperty(We,"CLOSING",{enumerable:!0,value:Vr.indexOf("CLOSING")});Object.defineProperty(We.prototype,"CLOSING",{enumerable:!0,value:Vr.indexOf("CLOSING")});Object.defineProperty(We,"CLOSED",{enumerable:!0,value:Vr.indexOf("CLOSED")});Object.defineProperty(We.prototype,"CLOSED",{enumerable:!0,value:Vr.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(e=>{Object.defineProperty(We.prototype,e,{enumerable:!0})});["open","error","close","message"].forEach(e=>{Object.defineProperty(We.prototype,`on${e}`,{enumerable:!0,get(){for(let t of this.listeners(e))if(t[cy])return t[X6];return null},set(t){for(let n of this.listeners(e))if(n[cy]){this.removeListener(e,n);break}typeof t=="function"&&this.addEventListener(e,t,{[cy]:!0})}})});We.prototype.addEventListener=Z6;We.prototype.removeEventListener=e5;eH.exports=We;function Gj(e,t,n,r){let o={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:K6,protocolVersion:dy[1],maxBufferedChunks:262144,maxFragments:16384,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(e._autoPong=o.autoPong,e._closeTimeout=o.closeTimeout,!dy.includes(o.protocolVersion))throw new RangeError(`Unsupported protocol version: ${o.protocolVersion} (supported versions: ${dy.join(", ")})`);let s;if(t instanceof iy)s=t;else try{s=new iy(t)}catch{throw new SyntaxError(`Invalid URL: ${t}`)}s.protocol==="http:"?s.protocol="ws:":s.protocol==="https:"&&(s.protocol="wss:"),e._url=s.href;let i=s.protocol==="wss:",c=s.protocol==="ws+unix:",d;if(s.protocol!=="ws:"&&!i&&!c?d=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:c&&!s.pathname?d="The URL's pathname is empty":s.hash&&(d="The URL contains a fragment identifier"),d){let h=new SyntaxError(d);if(e._redirects===0)throw h;jp(e,h);return}let l=i?443:80,u=z6(16).toString("base64"),p=i?F6.request:U6.request,m=new Set,f;if(o.createConnection=o.createConnection||(i?s5:a5),o.defaultPort=o.defaultPort||l,o.port=s.port||l,o.host=s.hostname.startsWith("[")?s.hostname.slice(1,-1):s.hostname,o.headers={...o.headers,"Sec-WebSocket-Version":o.protocolVersion,"Sec-WebSocket-Key":u,Connection:"Upgrade",Upgrade:"websocket"},o.path=s.pathname+s.search,o.timeout=o.handshakeTimeout,o.perMessageDeflate&&(f=new Co({...o.perMessageDeflate,isServer:!1,maxPayload:o.maxPayload}),o.headers["Sec-WebSocket-Extensions"]=t5({[Co.extensionName]:f.offer()})),n.length){for(let h of n){if(typeof h!="string"||!o5.test(h)||m.has(h))throw new SyntaxError("An invalid or duplicated subprotocol was specified");m.add(h)}o.headers["Sec-WebSocket-Protocol"]=n.join(",")}if(o.origin&&(o.protocolVersion<13?o.headers["Sec-WebSocket-Origin"]=o.origin:o.headers.Origin=o.origin),(s.username||s.password)&&(o.auth=`${s.username}:${s.password}`),c){let h=o.path.split(":");o.socketPath=h[0],o.path=h[1]}let w;if(o.followRedirects){if(e._redirects===0){e._originalIpc=c,e._originalSecure=i,e._originalHostOrSocketPath=c?o.socketPath:s.host;let h=r&&r.headers;if(r={...r,headers:{}},h)for(let[v,g]of Object.entries(h))r.headers[v.toLowerCase()]=g}else if(e.listenerCount("redirect")===0){let h=c?e._originalIpc?o.socketPath===e._originalHostOrSocketPath:!1:e._originalIpc?!1:s.host===e._originalHostOrSocketPath;(!h||e._originalSecure&&!i)&&(delete o.headers.authorization,delete o.headers.cookie,h||delete o.headers.host,o.auth=void 0)}o.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(o.auth).toString("base64")),w=e._req=p(o),e._redirects&&e.emit("redirect",e.url,w)}else w=e._req=p(o);o.timeout&&w.on("timeout",()=>{pn(e,w,"Opening handshake has timed out")}),w.on("error",h=>{w===null||w[Jj]||(w=e._req=null,jp(e,h))}),w.on("response",h=>{let v=h.headers.location,g=h.statusCode;if(v&&o.followRedirects&&g>=300&&g<400){if(++e._redirects>o.maxRedirects){pn(e,w,"Maximum redirects exceeded");return}w.abort();let S;try{S=new iy(v,t)}catch{let k=new SyntaxError(`Invalid URL: ${v}`);jp(e,k);return}Gj(e,S,n,r)}else e.emit("unexpected-response",w,h)||pn(e,w,`Unexpected server response: ${h.statusCode}`)}),w.on("upgrade",(h,v,g)=>{if(e.emit("upgrade",h),e.readyState!==We.CONNECTING)return;w=e._req=null;let S=h.headers.upgrade;if(S===void 0||S.toLowerCase()!=="websocket"){pn(e,v,"Invalid Upgrade header");return}let R=W6("sha1").update(u+Y6).digest("base64");if(h.headers["sec-websocket-accept"]!==R){pn(e,v,"Invalid Sec-WebSocket-Accept header");return}let k=h.headers["sec-websocket-protocol"],y;if(k!==void 0?m.size?m.has(k)||(y="Server sent an invalid subprotocol"):y="Server sent a subprotocol but none was requested":m.size&&(y="Server sent no subprotocol"),y){pn(e,v,y);return}k&&(e._protocol=k);let T=h.headers["sec-websocket-extensions"];if(T!==void 0){if(!f){pn(e,v,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let C;try{C=n5(T)}catch{pn(e,v,"Invalid Sec-WebSocket-Extensions header");return}let b=Object.keys(C);if(b.length!==1||b[0]!==Co.extensionName){pn(e,v,"Server indicated an extension that was not requested");return}try{f.accept(C[Co.extensionName])}catch{pn(e,v,"Invalid Sec-WebSocket-Extensions header");return}e._extensions[Co.extensionName]=f}e.setSocket(v,g,{allowSynchronousEvents:o.allowSynchronousEvents,generateMask:o.generateMask,maxBufferedChunks:o.maxBufferedChunks,maxFragments:o.maxFragments,maxPayload:o.maxPayload,skipUTF8Validation:o.skipUTF8Validation})}),o.finishRequest?o.finishRequest(w,e):w.end()}a(Gj,"initAsClient");function jp(e,t){e._readyState=We.CLOSING,e._errorEmitted=!0,e.emit("error",t),e.emitClose()}a(jp,"emitErrorAndClose");function a5(e){return e.path=e.socketPath,Wj.connect(e)}a(a5,"netConnect");function s5(e){return e.path=void 0,!e.servername&&e.servername!==""&&(e.servername=Wj.isIP(e.host)?"":e.host),q6.connect(e)}a(s5,"tlsConnect");function pn(e,t,n){e._readyState=We.CLOSING;let r=new Error(n);Error.captureStackTrace(r,pn),t.setHeader?(t[Jj]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(jp,e,r)):(t.destroy(r),t.once("error",e.emit.bind(e,"error")),t.once("close",e.emitClose.bind(e)))}a(pn,"abortHandshake");function ly(e,t,n){if(t){let r=G6(t)?t.size:r5(t).length;e._socket?e._sender._bufferedBytes+=r:e._bufferedAmount+=r}if(n){let r=new Error(`WebSocket is not open: readyState ${e.readyState} (${Vr[e.readyState]})`);process.nextTick(n,r)}}a(ly,"sendAfterClose");function i5(e,t){let n=this[mt];n._closeFrameReceived=!0,n._closeMessage=t,n._closeCode=e,n._socket[mt]!==void 0&&(n._socket.removeListener("data",Hp),process.nextTick(Kj,n._socket),e===1005?n.close():n.close(e,t))}a(i5,"receiverOnConclude");function c5(){let e=this[mt];e.isPaused||e._socket.resume()}a(c5,"receiverOnDrain");function d5(e){let t=this[mt];t._socket[mt]!==void 0&&(t._socket.removeListener("data",Hp),process.nextTick(Kj,t._socket),t.close(e[Q6])),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",e))}a(d5,"receiverOnError");function zj(){this[mt].emitClose()}a(zj,"receiverOnFinish");function l5(e,t){this[mt].emit("message",e,t)}a(l5,"receiverOnMessage");function u5(e){let t=this[mt];t._autoPong&&t.pong(e,!this._isServer,Vj),t.emit("ping",e)}a(u5,"receiverOnPing");function p5(e){this[mt].emit("pong",e)}a(p5,"receiverOnPong");function Kj(e){e.resume()}a(Kj,"resume");function m5(e){let t=this[mt];t.readyState!==We.CLOSED&&(t.readyState===We.OPEN&&(t._readyState=We.CLOSING,Yj(t)),this._socket.end(),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",e)))}a(m5,"senderOnError");function Yj(e){e._closeTimer=setTimeout(e._socket.destroy.bind(e._socket),e._closeTimeout)}a(Yj,"setCloseTimer");function Xj(){let e=this[mt];if(this.removeListener("close",Xj),this.removeListener("data",Hp),this.removeListener("end",Qj),e._readyState=We.CLOSING,!this._readableState.endEmitted&&!e._closeFrameReceived&&!e._receiver._writableState.errorEmitted&&this._readableState.length!==0){let t=this.read(this._readableState.length);e._receiver.write(t)}e._receiver.end(),this[mt]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on("error",zj),e._receiver.on("finish",zj))}a(Xj,"socketOnClose");function Hp(e){this[mt]._receiver.write(e)||this.pause()}a(Hp,"socketOnData");function Qj(){let e=this[mt];e._readyState=We.CLOSING,e._receiver.end(),this.end()}a(Qj,"socketOnEnd");function Zj(){let e=this[mt];this.removeListener("error",Zj),this.on("error",Vj),e&&(e._readyState=We.CLOSING,this.destroy())}a(Zj,"socketOnError")});var oH=Te((tfe,rH)=>{"use strict";var efe=Op(),{Duplex:f5}=Pe("stream");function tH(e){e.emit("close")}a(tH,"emitClose");function g5(){!this.destroyed&&this._writableState.finished&&this.destroy()}a(g5,"duplexOnEnd");function nH(e){this.removeListener("error",nH),this.destroy(),this.listenerCount("error")===0&&this.emit("error",e)}a(nH,"duplexOnError");function h5(e,t){let n=!0,r=new f5({...t,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return e.on("message",a(function(s,i){let c=!i&&r._readableState.objectMode?s.toString():s;r.push(c)||e.pause()},"message")),e.once("error",a(function(s){r.destroyed||(n=!1,r.destroy(s))},"error")),e.once("close",a(function(){r.destroyed||r.push(null)},"close")),r._destroy=function(o,s){if(e.readyState===e.CLOSED){s(o),process.nextTick(tH,r);return}let i=!1;e.once("error",a(function(d){i=!0,s(d)},"error")),e.once("close",a(function(){i||s(o),process.nextTick(tH,r)},"close")),n&&e.terminate()},r._final=function(o){if(e.readyState===e.CONNECTING){e.once("open",a(function(){r._final(o)},"open"));return}e._socket!==null&&(e._socket._writableState.finished?(o(),r._readableState.endEmitted&&r.destroy()):(e._socket.once("finish",a(function(){o()},"finish")),e.close()))},r._read=function(){e.isPaused&&e.resume()},r._write=function(o,s,i){if(e.readyState===e.CONNECTING){e.once("open",a(function(){r._write(o,s,i)},"open"));return}e.send(o,i)},r.on("end",g5),r.on("error",nH),r}a(h5,"createWebSocketStream");rH.exports=h5});var uy=Te((rfe,aH)=>{"use strict";var{tokenChars:w5}=di();function y5(e){let t=new Set,n=-1,r=-1,o=0;for(o;o<e.length;o++){let i=e.charCodeAt(o);if(r===-1&&w5[i]===1)n===-1&&(n=o);else if(o!==0&&(i===32||i===9))r===-1&&n!==-1&&(r=o);else if(i===44){if(n===-1)throw new SyntaxError(`Unexpected character at index ${o}`);r===-1&&(r=o);let c=e.slice(n,r);if(t.has(c))throw new SyntaxError(`The "${c}" subprotocol is duplicated`);t.add(c),n=r=-1}else throw new SyntaxError(`Unexpected character at index ${o}`)}if(n===-1||r!==-1)throw new SyntaxError("Unexpected end of input");let s=e.slice(n,o);if(t.has(s))throw new SyntaxError(`The "${s}" subprotocol is duplicated`);return t.add(s),t}a(y5,"parse");aH.exports={parse:y5}});var pH=Te((sfe,uH)=>{"use strict";var v5=Pe("events"),Dp=Pe("http"),{Duplex:afe}=Pe("stream"),{createHash:k5}=Pe("crypto"),sH=Ep(),wa=ci(),b5=uy(),S5=Op(),{CLOSE_TIMEOUT:I5,GUID:R5,kWebSocket:P5}=qr(),_5=/^[+/0-9A-Za-z]{22}==$/,iH=0,cH=1,lH=2,py=class extends v5{static{a(this,"WebSocketServer")}constructor(t,n){if(super(),t={allowSynchronousEvents:!0,autoPong:!0,maxBufferedChunks:256*1024,maxFragments:16*1024,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:I5,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:S5,...t},t.port==null&&!t.server&&!t.noServer||t.port!=null&&(t.server||t.noServer)||t.server&&t.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(t.port!=null?(this._server=Dp.createServer((r,o)=>{let s=Dp.STATUS_CODES[426];o.writeHead(426,{"Content-Length":s.length,"Content-Type":"text/plain"}),o.end(s)}),this._server.listen(t.port,t.host,t.backlog,n)):t.server&&(this._server=t.server),this._server){let r=this.emit.bind(this,"connection");this._removeListeners=x5(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:a((o,s,i)=>{this.handleUpgrade(o,s,i,r)},"upgrade")})}t.perMessageDeflate===!0&&(t.perMessageDeflate={}),t.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=t,this._state=iH}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(t){if(this._state===lH){t&&this.once("close",()=>{t(new Error("The server is not running"))}),process.nextTick(Zc,this);return}if(t&&this.once("close",t),this._state!==cH)if(this._state=cH,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(Zc,this):process.nextTick(Zc,this);else{let n=this._server;this._removeListeners(),this._removeListeners=this._server=null,n.close(()=>{Zc(this)})}}shouldHandle(t){if(this.options.path){let n=t.url.indexOf("?");if((n!==-1?t.url.slice(0,n):t.url)!==this.options.path)return!1}return!0}handleUpgrade(t,n,r,o){n.on("error",dH);let s=t.headers["sec-websocket-key"],i=t.headers.upgrade,c=+t.headers["sec-websocket-version"];if(t.method!=="GET"){ya(this,t,n,405,"Invalid HTTP method");return}if(i===void 0||i.toLowerCase()!=="websocket"){ya(this,t,n,400,"Invalid Upgrade header");return}if(s===void 0||!_5.test(s)){ya(this,t,n,400,"Missing or invalid Sec-WebSocket-Key header");return}if(c!==13&&c!==8){ya(this,t,n,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle(t)){ed(n,400);return}let d=t.headers["sec-websocket-protocol"],l=new Set;if(d!==void 0)try{l=b5.parse(d)}catch{ya(this,t,n,400,"Invalid Sec-WebSocket-Protocol header");return}let u=t.headers["sec-websocket-extensions"],p={};if(this.options.perMessageDeflate&&u!==void 0){let m=new wa({...this.options.perMessageDeflate,isServer:!0,maxPayload:this.options.maxPayload});try{let f=sH.parse(u);f[wa.extensionName]&&(m.accept(f[wa.extensionName]),p[wa.extensionName]=m)}catch{ya(this,t,n,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let m={origin:t.headers[`${c===8?"sec-websocket-origin":"origin"}`],secure:!!(t.socket.authorized||t.socket.encrypted),req:t};if(this.options.verifyClient.length===2){this.options.verifyClient(m,(f,w,h,v)=>{if(!f)return ed(n,w||401,h,v);this.completeUpgrade(p,s,l,t,n,r,o)});return}if(!this.options.verifyClient(m))return ed(n,401)}this.completeUpgrade(p,s,l,t,n,r,o)}completeUpgrade(t,n,r,o,s,i,c){if(!s.readable||!s.writable)return s.destroy();if(s[P5])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>iH)return ed(s,503);let l=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${k5("sha1").update(n+R5).digest("base64")}`],u=new this.options.WebSocket(null,void 0,this.options);if(r.size){let p=this.options.handleProtocols?this.options.handleProtocols(r,o):r.values().next().value;p&&(l.push(`Sec-WebSocket-Protocol: ${p}`),u._protocol=p)}if(t[wa.extensionName]){let p=t[wa.extensionName].params,m=sH.format({[wa.extensionName]:[p]});l.push(`Sec-WebSocket-Extensions: ${m}`),u._extensions=t}this.emit("headers",l,o),s.write(l.concat(`\r
3
+ import{a as VA,b as JA,c as GA,d as H,e as KA,f as go,g as z,h as Cu,j as YA}from"./chunk-3XUBKIBN.js";import{$ as mx,$a as uT,$b as rA,$c as NA,A as j_,Aa as Vx,Ab as CT,Ac as bA,B as H_,Ba as Sc,Bb as ET,Bc as SA,C as O_,Ca as Jx,Cb as MT,Cc as IA,D as N_,Da as Gx,Db as jT,Dc as hh,E as X_,Ea as xs,Eb as DT,Ec as RA,F as Q_,Fa as Ts,Fb as BT,Fc as wh,G as Z_,Ga as Kx,Gb as Ru,Gc as PA,H as ex,Ha as Yx,Hb as $T,Hc as _A,I as tx,Ia as Xx,Ib as LT,Ic as xA,J as nx,Ja as Qx,Jb as NT,Jc as TA,K as rx,Ka as Zx,Kb as FT,Kc as AA,L as ox,La as eT,Lb as UT,Lc as fo,M as ax,Ma as tT,Mb as uh,Mc as Mr,N as lu,Na as uo,Nb as qT,Nc as yh,O as sx,Oa as nT,Ob as zT,Oc as CA,P as uu,Pa as rT,Pb as WT,Pc as EA,Q as ix,Qa as dh,Qb as VT,Qc as Tu,R as cx,Ra as oT,Rb as JT,Rc as Es,S as dx,Sa as Ic,Sb as GT,Sc as MA,T as Is,Ta as aT,Tb as KT,Tc as Au,U as pu,Ua as As,Ub as YT,Uc as jA,V as vc,Va as sT,Vb as XT,Vc as HA,W as oh,Wa as iT,Wb as QT,Wc as OA,X as na,Xa as cT,Xb as ZT,Xc as DA,Y as lx,Ya as dT,Yb as eA,Yc as BA,Z as ux,Za as oe,Zb as tA,Zc as $A,_ as px,_a as lT,_b as nA,_c as LA,a as RS,aa as fx,ab as ku,ac as oA,ad as FA,b as PS,ba as gx,bb as pT,bc as Pu,bd as UA,c as _S,ca as hx,cb as mT,cc as aA,cd as qA,d as xS,da as mu,db as fT,dc as ra,dd as zA,e as TS,ea as fu,eb as gT,ec as _u,f as xl,fa as Rs,fb as hT,fc as sA,fd as WA,g as oI,ga as gu,gb as bu,gc as mo,h as aI,ha as wx,hb as wT,hc as xu,i as sI,ia as yx,ib as po,ic as iA,j as iI,ja as vx,jb as Ae,jc as cA,k as cI,ka as hu,kb as yT,kc as ph,l as Mg,la as kx,lb as pe,lc as mh,m as uI,ma as bx,mb as vT,mc as dA,n as pI,na as Sx,nb as kT,nc as lA,o as mI,oa as Ix,ob as bT,oc as uA,p as fI,pa as wu,pb as ST,pc as pA,q as gI,qa as Rx,qb as IT,qc as fh,r as hI,ra as Px,rb as RT,rc as mA,s as Yo,sa as _x,sb as PT,sc as gh,t as wI,ta as xx,tb as _T,tc as fA,u as yI,ua as Tx,ub as xT,uc as gA,v as Cl,va as bc,vb as TT,vc as hA,w as vI,wa as Ux,wb as AT,wc as wA,x as kI,xa as qx,xb as Cs,xc as yA,y as eq,ya as zx,yb as Bn,yc as vA,z as M_,za as Wx,zb as He,zc as kA}from"./chunk-NS3VMSTX.js";import{A as Ox,C as yu,F as vu,G as ur,H as Dx,I as ah,J as Bx,K as sh,N as $x,O as ih,P as Lx,Q as Nx,R as Fx,S as ch,T as _s,b as lr,d as Ax,e as Cx,h as Ex,m as Ps,n as Mx,p as jx,q as Hx,s as kc}from"./chunk-T3VPZRIX.js";import{a as dt,b as D_,c as B_,f as $_,s as L_,u as lh,v as HT,w as Su,x as Iu,y as OT}from"./chunk-MD7IADMT.js";import{a as C_,b as iu,d as ie,e as ct,f as Ss,g as te,i as E_}from"./chunk-XDVKDELR.js";import{a as cn,b as F_,c as U_,d as cu,e as du,g as q_,h as z_,i as W_,j as V_,k as J_,l as G_,m as K_,n as Y_}from"./chunk-V2BBMZ7I.js";import{$ as Fl,$a as YR,$b as AP,$c as o_,A as pR,Aa as qg,B as mR,Ba as ze,Bb as mc,Bc as Xl,Bd as ea,C as fR,Ca as zl,Cb as mP,Cd as p_,D as $l,Da as HR,Dc as Zg,Dd as Er,E as gR,Ea as zg,Eb as fP,Ec as JP,Ed as m_,F as Lg,Fb as gP,Fc as GP,Fd as f_,G as hR,Ga as OR,Gb as hP,Gd as g_,H as wR,Hd as co,I as nt,Ia as DR,Ib as hs,Ic as Ql,Id as ks,J as vt,Jb as wP,Jc as KP,Jd as nu,K as Ll,Ka as Wl,Kc as eh,Kd as h_,L as yR,La as BR,Lb as fc,Lc as cr,Ld as w_,M as vR,Mb as Kl,Mc as YP,Md as y_,Na as $R,Nb as yP,Nc as XP,Nd as wc,O as kR,Oa as LR,Ob as Jg,Oc as th,Od as bs,Pa as NR,Pb as vP,Pc as hc,Pd as ru,Q as bR,Qa as FR,Qb as kP,Qc as QP,Qd as v_,R as SR,Ra as UR,Rb as Gg,Rc as Zl,Rd as ou,S as Dn,Sa as qR,Sb as bP,Sc as ZP,Sd as lo,Ta as zR,Tb as SP,Tc as e_,Td as k_,Ua as WR,Ub as IP,Uc as ws,Ud as b_,Va as VR,Vb as RP,Vc as t_,Vd as S_,Wa as io,Wb as PP,Wc as ys,Wd as au,X as IR,Xb as _P,Xc as n_,Xd as I_,Ya as JR,Yb as xP,Yc as r_,Yd as yc,Z as Nl,Za as GR,Zb as Kg,Zc as nh,Zd as R_,_ as Ng,_a as KR,_b as TP,_c as eu,_d as P_,aa as RR,ac as CP,ad as Be,bb as XR,bc as EP,bd as tu,c as ZI,ca as Fg,cb as Vl,cc as Yg,cd as a_,da as PR,db as QR,dc as MP,dd as s_,ea as Nt,eb as ZR,ec as jP,ed as i_,fa as Xo,fb as eP,fc as HP,fd as rh,ga as Qo,gb as tP,gc as OP,gd as c_,ha as Ug,hb as nP,hc as DP,hd as d_,he as su,ia as _R,ib as rP,ic as BP,id as l_,ie as __,ja as xR,jb as oP,jc as $P,je as x_,ka as TR,kb as aP,kc as LP,kd as vs,ke as dr,l as eR,la as AR,lb as sP,lc as NP,ld as u_,le as T_,m as tR,ma as CR,mb as iP,mc as FP,me as ta,n as nR,na as ER,nb as cP,nc as Xg,ne as A_,o as rR,oa as Ul,ob as dP,oc as Zo,p as oR,pb as lP,pc as UP,qa as ql,qb as Wg,qc as qP,rb as Jl,rc as zP,s as aR,sb as uP,t as sR,tb as ir,tc as Yl,u as iR,ub as Cr,uc as WP,v as cR,vb as Vg,w as dR,wb as Gl,wc as VP,x as $g,xa as MR,xb as pP,xc as gc,y as lR,yb as Ft,yc as Qg,z as uR,za as jR,zb as pc}from"./chunk-Q76GR2JM.js";import"./chunk-XEOEKFG6.js";import{$a as rI,Ab as xI,Bb as TI,Ca as On,Da as QS,Dc as ms,E as jS,Ea as Pl,Ec as LI,F as HS,Fa as sn,Fc as NI,G as OS,Gc as Ol,H as kn,Hc as Dl,Ia as ZS,Ic as Bl,Jc as FI,K as DS,Kc as Og,L as Il,La as eI,Lc as UI,M as BS,Mc as qI,Na as Cg,Nc as zI,Oa as je,Oc as WI,Pa as Ko,Pc as so,Qa as Ze,Qc as VI,Rb as AI,Rc as sr,S as $S,Sc as JI,T as LS,Tb as CI,Ua as tI,Ub as EI,Wc as GI,X as NS,Xa as lc,Xc as KI,Ya as nI,Yc as fs,Za as _l,aa as FS,ab as Eg,ac as MI,ba as US,bb as ps,ca as qS,da as zS,dc as jI,e as AS,ea as WS,fa as Rl,fb as Tl,ga as Ag,gd as gs,ha as VS,hb as dI,hd as uc,ia as JS,ic as HI,id as YI,ja as GS,jd as XI,kd as QI,mc as Hg,md as Dg,na as KS,nb as Al,nc as OI,ob as lI,od as Bg,p as CS,pa as us,pb as bI,q as ES,qb as El,qc as DI,r as Kt,rc as jl,s as bl,sa as YS,sc as Hl,tb as jg,tc as BI,ua as XS,ub as SI,v as Ar,vb as II,vc as $I,w as dc,wb as RI,x as Tg,xb as Ml,y as Sl,yb as PI,z as MS,zb as _I}from"./chunk-CTC5EYSH.js";import"./chunk-6MI4KKWF.js";import"./chunk-SDO4FC4Q.js";import"./chunk-IR3YJWPW.js";import{D as ls,E as ic,F as kl,d as vl,m as SS,n as ao,o as Je,p as IS}from"./chunk-J3WNPOLS.js";import"./chunk-J2S7BOZU.js";import{Ca as fS,Fb as Ge,Gb as Gt,Ja as gS,Mb as vS,Na as hS,Oa as wS,S as hl,Va as yl,Vb as kS,Xb as bS,a as an,bb as yS,qa as pS,ra as wl,ta as mS}from"./chunk-WYHHDJEG.js";import{a as cc}from"./chunk-6FA3GG5B.js";import{$a as Go,Ca as sS,Ea as _g,F as Pg,Fa as xg,Ga as iS,N as Xb,R as ro,T as Qb,Ta as fl,Ua as cS,V as Zb,W as eS,X as tS,Ya as dS,Za as lS,ab as uS,bb as gl,f as il,k as Vo,l as qb,m as sc,n as xr,o as ul,p as zb,pa as oo,q as pl,r as Wb,ra as Jo,s as is,u as Vb,v as Jb,w as Gb,wa as nS,x as Kb,xa as rS,y as Yb,ya as oS,za as aS}from"./chunk-NNLI4OWY.js";import{a as as,b as ss,c as Ig,d as cl,e as it,f as Rg,g as dl,j as Ve,k as Se,l as O,m as Fb,o as Ub,p as ll,q as Et}from"./chunk-HZP5U2AA.js";import{a as Wo,b as _}from"./chunk-ES2ISFJC.js";import{a as $b,c as zo,f as Lb,h as sl,i as Nb,p as cs,q as ml,r as Tr,s as ds}from"./chunk-H7IWJN7L.js";import{a,b as Pe,c as Te,e as ar}from"./chunk-FTQLQJQV.js";var qr=Te((Eme,pj)=>{"use strict";var lj=["nodebuffer","arraybuffer","fragments"],uj=typeof Blob<"u";uj&&lj.push("blob");pj.exports={BINARY_TYPES:lj,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:uj,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:a(()=>{},"NOOP")}});var Gc=Te((jme,Ip)=>{"use strict";var{EMPTY_BUFFER:c6}=qr(),Vw=Buffer[Symbol.species];function d6(e,t){if(e.length===0)return c6;if(e.length===1)return e[0];let n=Buffer.allocUnsafe(t),r=0;for(let o=0;o<e.length;o++){let s=e[o];n.set(s,r),r+=s.length}return r<t?new Vw(n.buffer,n.byteOffset,r):n}a(d6,"concat");function mj(e,t,n,r,o){for(let s=0;s<o;s++)n[r+s]=e[s]^t[s&3]}a(mj,"_mask");function fj(e,t){for(let n=0;n<e.length;n++)e[n]^=t[n&3]}a(fj,"_unmask");function l6(e){return e.length===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.length)}a(l6,"toArrayBuffer");function Jw(e){if(Jw.readOnly=!0,Buffer.isBuffer(e))return e;let t;return e instanceof ArrayBuffer?t=new Vw(e):ArrayBuffer.isView(e)?t=new Vw(e.buffer,e.byteOffset,e.byteLength):(t=Buffer.from(e),Jw.readOnly=!1),t}a(Jw,"toBuffer");Ip.exports={concat:d6,mask:mj,toArrayBuffer:l6,toBuffer:Jw,unmask:fj};if(!process.env.WS_NO_BUFFER_UTIL)try{let e=Pe("bufferutil");Ip.exports.mask=function(t,n,r,o,s){s<48?mj(t,n,r,o,s):e.mask(t,n,r,o,s)},Ip.exports.unmask=function(t,n){t.length<32?fj(t,n):e.unmask(t,n)}}catch{}});var wj=Te((Ome,hj)=>{"use strict";var gj=Symbol("kDone"),Gw=Symbol("kRun"),Kw=class{static{a(this,"Limiter")}constructor(t){this[gj]=()=>{this.pending--,this[Gw]()},this.concurrency=t||1/0,this.jobs=[],this.pending=0}add(t){this.jobs.push(t),this[Gw]()}[Gw](){if(this.pending!==this.concurrency&&this.jobs.length){let t=this.jobs.shift();this.pending++,t(this[gj])}}};hj.exports=Kw});var ci=Te((Bme,bj)=>{"use strict";var Kc=Pe("zlib"),yj=Gc(),u6=wj(),{kStatusCode:vj}=qr(),p6=Buffer[Symbol.species],m6=Buffer.from([0,0,255,255]),Pp=Symbol("permessage-deflate"),zr=Symbol("total-length"),si=Symbol("callback"),Ao=Symbol("buffers"),ii=Symbol("error"),Rp,Yw=class{static{a(this,"PerMessageDeflate")}constructor(t){if(this._options=t||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._maxPayload=this._options.maxPayload|0,this._isServer=!!this._options.isServer,this._deflate=null,this._inflate=null,this.params=null,!Rp){let n=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;Rp=new u6(n)}}static get extensionName(){return"permessage-deflate"}offer(){let t={};return this._options.serverNoContextTakeover&&(t.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(t.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(t.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?t.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(t.client_max_window_bits=!0),t}accept(t){return t=this.normalizeParams(t),this.params=this._isServer?this.acceptAsServer(t):this.acceptAsClient(t),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let t=this._deflate[si];this._deflate.close(),this._deflate=null,t&&t(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(t){let n=this._options,r=t.find(o=>!(n.serverNoContextTakeover===!1&&o.server_no_context_takeover||o.server_max_window_bits&&(n.serverMaxWindowBits===!1||typeof n.serverMaxWindowBits=="number"&&n.serverMaxWindowBits>o.server_max_window_bits)||typeof n.clientMaxWindowBits=="number"&&!o.client_max_window_bits));if(!r)throw new Error("None of the extension offers can be accepted");return n.serverNoContextTakeover&&(r.server_no_context_takeover=!0),n.clientNoContextTakeover&&(r.client_no_context_takeover=!0),typeof n.serverMaxWindowBits=="number"&&(r.server_max_window_bits=n.serverMaxWindowBits),typeof n.clientMaxWindowBits=="number"?r.client_max_window_bits=n.clientMaxWindowBits:(r.client_max_window_bits===!0||n.clientMaxWindowBits===!1)&&delete r.client_max_window_bits,r}acceptAsClient(t){let n=t[0];if(this._options.clientNoContextTakeover===!1&&n.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!n.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(n.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&n.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return n}normalizeParams(t){return t.forEach(n=>{Object.keys(n).forEach(r=>{let o=n[r];if(o.length>1)throw new Error(`Parameter "${r}" must have only a single value`);if(o=o[0],r==="client_max_window_bits"){if(o!==!0){let s=+o;if(!Number.isInteger(s)||s<8||s>15)throw new TypeError(`Invalid value for parameter "${r}": ${o}`);o=s}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${r}": ${o}`)}else if(r==="server_max_window_bits"){let s=+o;if(!Number.isInteger(s)||s<8||s>15)throw new TypeError(`Invalid value for parameter "${r}": ${o}`);o=s}else if(r==="client_no_context_takeover"||r==="server_no_context_takeover"){if(o!==!0)throw new TypeError(`Invalid value for parameter "${r}": ${o}`)}else throw new Error(`Unknown parameter "${r}"`);n[r]=o})}),t}decompress(t,n,r){Rp.add(o=>{this._decompress(t,n,(s,i)=>{o(),r(s,i)})})}compress(t,n,r){Rp.add(o=>{this._compress(t,n,(s,i)=>{o(),r(s,i)})})}_decompress(t,n,r){let o=this._isServer?"client":"server";if(!this._inflate){let s=`${o}_max_window_bits`,i=typeof this.params[s]!="number"?Kc.Z_DEFAULT_WINDOWBITS:this.params[s];this._inflate=Kc.createInflateRaw({...this._options.zlibInflateOptions,windowBits:i}),this._inflate[Pp]=this,this._inflate[zr]=0,this._inflate[Ao]=[],this._inflate.on("error",g6),this._inflate.on("data",kj)}this._inflate[si]=r,this._inflate.write(t),n&&this._inflate.write(m6),this._inflate.flush(()=>{let s=this._inflate[ii];if(s){this._inflate.close(),this._inflate=null,r(s);return}let i=yj.concat(this._inflate[Ao],this._inflate[zr]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[zr]=0,this._inflate[Ao]=[],n&&this.params[`${o}_no_context_takeover`]&&this._inflate.reset()),r(null,i)})}_compress(t,n,r){let o=this._isServer?"server":"client";if(!this._deflate){let s=`${o}_max_window_bits`,i=typeof this.params[s]!="number"?Kc.Z_DEFAULT_WINDOWBITS:this.params[s];this._deflate=Kc.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:i}),this._deflate[zr]=0,this._deflate[Ao]=[],this._deflate.on("data",f6)}this._deflate[si]=r,this._deflate.write(t),this._deflate.flush(Kc.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let s=yj.concat(this._deflate[Ao],this._deflate[zr]);n&&(s=new p6(s.buffer,s.byteOffset,s.length-4)),this._deflate[si]=null,this._deflate[zr]=0,this._deflate[Ao]=[],n&&this.params[`${o}_no_context_takeover`]&&this._deflate.reset(),r(null,s)})}};bj.exports=Yw;function f6(e){this[Ao].push(e),this[zr]+=e.length}a(f6,"deflateOnData");function kj(e){if(this[zr]+=e.length,this[Pp]._maxPayload<1||this[zr]<=this[Pp]._maxPayload){this[Ao].push(e);return}this[ii]=new RangeError("Max payload size exceeded"),this[ii].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[ii][vj]=1009,this.removeListener("data",kj),this.reset()}a(kj,"inflateOnData");function g6(e){if(this[Pp]._inflate=null,this[ii]){this[si](this[ii]);return}e[vj]=1007,this[si](e)}a(g6,"inflateOnError")});var di=Te((Lme,_p)=>{"use strict";var{isUtf8:Sj}=Pe("buffer"),{hasBlob:h6}=qr(),w6=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function y6(e){return e>=1e3&&e<=1014&&e!==1004&&e!==1005&&e!==1006||e>=3e3&&e<=4999}a(y6,"isValidStatusCode");function Xw(e){let t=e.length,n=0;for(;n<t;)if((e[n]&128)===0)n++;else if((e[n]&224)===192){if(n+1===t||(e[n+1]&192)!==128||(e[n]&254)===192)return!1;n+=2}else if((e[n]&240)===224){if(n+2>=t||(e[n+1]&192)!==128||(e[n+2]&192)!==128||e[n]===224&&(e[n+1]&224)===128||e[n]===237&&(e[n+1]&224)===160)return!1;n+=3}else if((e[n]&248)===240){if(n+3>=t||(e[n+1]&192)!==128||(e[n+2]&192)!==128||(e[n+3]&192)!==128||e[n]===240&&(e[n+1]&240)===128||e[n]===244&&e[n+1]>143||e[n]>244)return!1;n+=4}else return!1;return!0}a(Xw,"_isValidUTF8");function v6(e){return h6&&typeof e=="object"&&typeof e.arrayBuffer=="function"&&typeof e.type=="string"&&typeof e.stream=="function"&&(e[Symbol.toStringTag]==="Blob"||e[Symbol.toStringTag]==="File")}a(v6,"isBlob");_p.exports={isBlob:v6,isValidStatusCode:y6,isValidUTF8:Xw,tokenChars:w6};if(Sj)_p.exports.isValidUTF8=function(e){return e.length<24?Xw(e):Sj(e)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let e=Pe("utf-8-validate");_p.exports.isValidUTF8=function(t){return t.length<32?Xw(t):e(t)}}catch{}});var ny=Te((Fme,Aj)=>{"use strict";var{Writable:k6}=Pe("stream"),Ij=ci(),{BINARY_TYPES:b6,EMPTY_BUFFER:Rj,kStatusCode:S6,kWebSocket:I6}=qr(),{concat:Qw,toArrayBuffer:R6,unmask:P6}=Gc(),{isValidStatusCode:_6,isValidUTF8:Pj}=di(),xp=Buffer[Symbol.species],xn=0,_j=1,xj=2,Tj=3,Zw=4,ey=5,Tp=6,ty=class extends k6{static{a(this,"Receiver")}constructor(t={}){super(),this._allowSynchronousEvents=t.allowSynchronousEvents!==void 0?t.allowSynchronousEvents:!0,this._binaryType=t.binaryType||b6[0],this._extensions=t.extensions||{},this._isServer=!!t.isServer,this._maxBufferedChunks=t.maxBufferedChunks|0,this._maxFragments=t.maxFragments|0,this._maxPayload=t.maxPayload|0,this._skipUTF8Validation=!!t.skipUTF8Validation,this[I6]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._numFragments=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=xn}_write(t,n,r){if(this._opcode===8&&this._state==xn)return r();if(this._maxBufferedChunks>0&&this._buffers.length>=this._maxBufferedChunks){r(this.createError(RangeError,"Too many buffered chunks",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS"));return}this._bufferedBytes+=t.length,this._buffers.push(t),this.startLoop(r)}consume(t){if(this._bufferedBytes-=t,t===this._buffers[0].length)return this._buffers.shift();if(t<this._buffers[0].length){let r=this._buffers[0];return this._buffers[0]=new xp(r.buffer,r.byteOffset+t,r.length-t),new xp(r.buffer,r.byteOffset,t)}let n=Buffer.allocUnsafe(t);do{let r=this._buffers[0],o=n.length-t;t>=r.length?n.set(this._buffers.shift(),o):(n.set(new Uint8Array(r.buffer,r.byteOffset,t),o),this._buffers[0]=new xp(r.buffer,r.byteOffset+t,r.length-t)),t-=r.length}while(t>0);return n}startLoop(t){this._loop=!0;do switch(this._state){case xn:this.getInfo(t);break;case _j:this.getPayloadLength16(t);break;case xj:this.getPayloadLength64(t);break;case Tj:this.getMask();break;case Zw:this.getData(t);break;case ey:case Tp:this._loop=!1;return}while(this._loop);this._errored||t()}getInfo(t){if(this._bufferedBytes<2){this._loop=!1;return}let n=this.consume(2);if((n[0]&48)!==0){let o=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");t(o);return}let r=(n[0]&64)===64;if(r&&!this._extensions[Ij.extensionName]){let o=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(o);return}if(this._fin=(n[0]&128)===128,this._opcode=n[0]&15,this._payloadLength=n[1]&127,this._opcode===0){if(r){let o=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(o);return}if(!this._fragmented){let o=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");t(o);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let o=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");t(o);return}this._compressed=r}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let o=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");t(o);return}if(r){let o=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(o);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let o=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");t(o);return}}else{let o=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");t(o);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(n[1]&128)===128,this._isServer){if(!this._masked){let o=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");t(o);return}}else if(this._masked){let o=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");t(o);return}this._payloadLength===126?this._state=_j:this._payloadLength===127?this._state=xj:this.haveLength(t)}getPayloadLength16(t){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(t)}getPayloadLength64(t){if(this._bufferedBytes<8){this._loop=!1;return}let n=this.consume(8),r=n.readUInt32BE(0);if(r>Math.pow(2,21)-1){let o=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");t(o);return}this._payloadLength=r*Math.pow(2,32)+n.readUInt32BE(4),this.haveLength(t)}haveLength(t){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let n=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");t(n);return}this._masked?this._state=Tj:this._state=Zw}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=Zw}getData(t){let n=Rj;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}n=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0&&P6(n,this._mask)}if(this._opcode>7){this.controlMessage(n,t);return}if(this._maxFragments>0&&++this._numFragments>this._maxFragments){let r=this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS");t(r);return}if(this._compressed){this._state=ey,this.decompress(n,t);return}n.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(n)),this.dataMessage(t)}decompress(t,n){this._extensions[Ij.extensionName].decompress(t,this._fin,(o,s)=>{if(o)return n(o);if(s.length){if(this._messageLength+=s.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let i=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");n(i);return}this._fragments.push(s)}this.dataMessage(n),this._state===xn&&this.startLoop(n)})}dataMessage(t){if(!this._fin){this._state=xn;return}let n=this._messageLength,r=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._numFragments=0,this._fragments=[],this._opcode===2){let o;this._binaryType==="nodebuffer"?o=Qw(r,n):this._binaryType==="arraybuffer"?o=R6(Qw(r,n)):this._binaryType==="blob"?o=new Blob(r):o=r,this._allowSynchronousEvents?(this.emit("message",o,!0),this._state=xn):(this._state=Tp,setImmediate(()=>{this.emit("message",o,!0),this._state=xn,this.startLoop(t)}))}else{let o=Qw(r,n);if(!this._skipUTF8Validation&&!Pj(o)){let s=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");t(s);return}this._state===ey||this._allowSynchronousEvents?(this.emit("message",o,!1),this._state=xn):(this._state=Tp,setImmediate(()=>{this.emit("message",o,!1),this._state=xn,this.startLoop(t)}))}}controlMessage(t,n){if(this._opcode===8){if(t.length===0)this._loop=!1,this.emit("conclude",1005,Rj),this.end();else{let r=t.readUInt16BE(0);if(!_6(r)){let s=this.createError(RangeError,`invalid status code ${r}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");n(s);return}let o=new xp(t.buffer,t.byteOffset+2,t.length-2);if(!this._skipUTF8Validation&&!Pj(o)){let s=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");n(s);return}this._loop=!1,this.emit("conclude",r,o),this.end()}this._state=xn;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",t),this._state=xn):(this._state=Tp,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",t),this._state=xn,this.startLoop(n)}))}createError(t,n,r,o,s){this._loop=!1,this._errored=!0;let i=new t(r?`Invalid WebSocket frame: ${n}`:n);return Error.captureStackTrace(i,this.createError),i.code=s,i[S6]=o,i}};Aj.exports=ty});var ay=Te((zme,Mj)=>{"use strict";var{Duplex:qme}=Pe("stream"),{randomFillSync:x6}=Pe("crypto"),{types:{isUint8Array:T6}}=Pe("util"),Cj=ci(),{EMPTY_BUFFER:A6,kWebSocket:C6,NOOP:E6}=qr(),{isBlob:li,isValidStatusCode:M6}=di(),{mask:Ej,toBuffer:fa}=Gc(),Tn=Symbol("kByteLength"),j6=Buffer.alloc(4),Ap=8*1024,ga,ui=Ap,Fn=0,H6=1,O6=2,ry=class e{static{a(this,"Sender")}constructor(t,n,r){this._extensions=n||{},r&&(this._generateMask=r,this._maskBuffer=Buffer.alloc(4)),this._socket=t,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=Fn,this.onerror=E6,this[C6]=void 0}static frame(t,n){let r,o=!1,s=2,i=!1;n.mask&&(r=n.maskBuffer||j6,n.generateMask?n.generateMask(r):(ui===Ap&&(ga===void 0&&(ga=Buffer.alloc(Ap)),x6(ga,0,Ap),ui=0),r[0]=ga[ui++],r[1]=ga[ui++],r[2]=ga[ui++],r[3]=ga[ui++]),i=(r[0]|r[1]|r[2]|r[3])===0,s=6);let c;typeof t=="string"?(!n.mask||i)&&n[Tn]!==void 0?c=n[Tn]:(t=Buffer.from(t),c=t.length):(c=t.length,o=n.mask&&n.readOnly&&!i);let d=c;c>=65536?(s+=8,d=127):c>125&&(s+=2,d=126);let l=Buffer.allocUnsafe(o?c+s:s);return l[0]=n.fin?n.opcode|128:n.opcode,n.rsv1&&(l[0]|=64),l[1]=d,d===126?l.writeUInt16BE(c,2):d===127&&(l[2]=l[3]=0,l.writeUIntBE(c,4,6)),n.mask?(l[1]|=128,l[s-4]=r[0],l[s-3]=r[1],l[s-2]=r[2],l[s-1]=r[3],i?[l,t]:o?(Ej(t,r,l,s,c),[l]):(Ej(t,r,t,0,c),[l,t])):[l,t]}close(t,n,r,o){let s;if(t===void 0)s=A6;else{if(typeof t!="number"||!M6(t))throw new TypeError("First argument must be a valid error code number");if(n===void 0||!n.length)s=Buffer.allocUnsafe(2),s.writeUInt16BE(t,0);else{let c=Buffer.byteLength(n);if(c>123)throw new RangeError("The message must not be greater than 123 bytes");if(s=Buffer.allocUnsafe(2+c),s.writeUInt16BE(t,0),typeof n=="string")s.write(n,2);else if(T6(n))s.set(n,2);else throw new TypeError("Second argument must be a string or a Uint8Array")}}let i={[Tn]:s.length,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==Fn?this.enqueue([this.dispatch,s,!1,i,o]):this.sendFrame(e.frame(s,i),o)}ping(t,n,r){let o,s;if(typeof t=="string"?(o=Buffer.byteLength(t),s=!1):li(t)?(o=t.size,s=!1):(t=fa(t),o=t.length,s=fa.readOnly),o>125)throw new RangeError("The data size must not be greater than 125 bytes");let i={[Tn]:o,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:9,readOnly:s,rsv1:!1};li(t)?this._state!==Fn?this.enqueue([this.getBlobData,t,!1,i,r]):this.getBlobData(t,!1,i,r):this._state!==Fn?this.enqueue([this.dispatch,t,!1,i,r]):this.sendFrame(e.frame(t,i),r)}pong(t,n,r){let o,s;if(typeof t=="string"?(o=Buffer.byteLength(t),s=!1):li(t)?(o=t.size,s=!1):(t=fa(t),o=t.length,s=fa.readOnly),o>125)throw new RangeError("The data size must not be greater than 125 bytes");let i={[Tn]:o,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:10,readOnly:s,rsv1:!1};li(t)?this._state!==Fn?this.enqueue([this.getBlobData,t,!1,i,r]):this.getBlobData(t,!1,i,r):this._state!==Fn?this.enqueue([this.dispatch,t,!1,i,r]):this.sendFrame(e.frame(t,i),r)}send(t,n,r){let o=this._extensions[Cj.extensionName],s=n.binary?2:1,i=n.compress,c,d;typeof t=="string"?(c=Buffer.byteLength(t),d=!1):li(t)?(c=t.size,d=!1):(t=fa(t),c=t.length,d=fa.readOnly),this._firstFragment?(this._firstFragment=!1,i&&o&&o.params[o._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(i=c>=o._threshold),this._compress=i):(i=!1,s=0),n.fin&&(this._firstFragment=!0);let l={[Tn]:c,fin:n.fin,generateMask:this._generateMask,mask:n.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:d,rsv1:i};li(t)?this._state!==Fn?this.enqueue([this.getBlobData,t,this._compress,l,r]):this.getBlobData(t,this._compress,l,r):this._state!==Fn?this.enqueue([this.dispatch,t,this._compress,l,r]):this.dispatch(t,this._compress,l,r)}getBlobData(t,n,r,o){this._bufferedBytes+=r[Tn],this._state=O6,t.arrayBuffer().then(s=>{if(this._socket.destroyed){let c=new Error("The socket was closed while the blob was being read");process.nextTick(oy,this,c,o);return}this._bufferedBytes-=r[Tn];let i=fa(s);n?this.dispatch(i,n,r,o):(this._state=Fn,this.sendFrame(e.frame(i,r),o),this.dequeue())}).catch(s=>{process.nextTick(D6,this,s,o)})}dispatch(t,n,r,o){if(!n){this.sendFrame(e.frame(t,r),o);return}let s=this._extensions[Cj.extensionName];this._bufferedBytes+=r[Tn],this._state=H6,s.compress(t,r.fin,(i,c)=>{if(this._socket.destroyed){let d=new Error("The socket was closed while data was being compressed");oy(this,d,o);return}this._bufferedBytes-=r[Tn],this._state=Fn,r.readOnly=!1,this.sendFrame(e.frame(c,r),o),this.dequeue()})}dequeue(){for(;this._state===Fn&&this._queue.length;){let t=this._queue.shift();this._bufferedBytes-=t[3][Tn],Reflect.apply(t[0],this,t.slice(1))}}enqueue(t){this._bufferedBytes+=t[3][Tn],this._queue.push(t)}sendFrame(t,n){t.length===2?(this._socket.cork(),this._socket.write(t[0]),this._socket.write(t[1],n),this._socket.uncork()):this._socket.write(t[0],n)}};Mj.exports=ry;function oy(e,t,n){typeof n=="function"&&n(t);for(let r=0;r<e._queue.length;r++){let o=e._queue[r],s=o[o.length-1];typeof s=="function"&&s(t)}}a(oy,"callCallbacks");function D6(e,t,n){oy(e,t,n),e.onerror(t)}a(D6,"onError")});var Fj=Te((Vme,Nj)=>{"use strict";var{kForOnEventAttribute:Yc,kListener:sy}=qr(),jj=Symbol("kCode"),Hj=Symbol("kData"),Oj=Symbol("kError"),Dj=Symbol("kMessage"),Bj=Symbol("kReason"),pi=Symbol("kTarget"),$j=Symbol("kType"),Lj=Symbol("kWasClean"),Wr=class{static{a(this,"Event")}constructor(t){this[pi]=null,this[$j]=t}get target(){return this[pi]}get type(){return this[$j]}};Object.defineProperty(Wr.prototype,"target",{enumerable:!0});Object.defineProperty(Wr.prototype,"type",{enumerable:!0});var ha=class extends Wr{static{a(this,"CloseEvent")}constructor(t,n={}){super(t),this[jj]=n.code===void 0?0:n.code,this[Bj]=n.reason===void 0?"":n.reason,this[Lj]=n.wasClean===void 0?!1:n.wasClean}get code(){return this[jj]}get reason(){return this[Bj]}get wasClean(){return this[Lj]}};Object.defineProperty(ha.prototype,"code",{enumerable:!0});Object.defineProperty(ha.prototype,"reason",{enumerable:!0});Object.defineProperty(ha.prototype,"wasClean",{enumerable:!0});var mi=class extends Wr{static{a(this,"ErrorEvent")}constructor(t,n={}){super(t),this[Oj]=n.error===void 0?null:n.error,this[Dj]=n.message===void 0?"":n.message}get error(){return this[Oj]}get message(){return this[Dj]}};Object.defineProperty(mi.prototype,"error",{enumerable:!0});Object.defineProperty(mi.prototype,"message",{enumerable:!0});var Xc=class extends Wr{static{a(this,"MessageEvent")}constructor(t,n={}){super(t),this[Hj]=n.data===void 0?null:n.data}get data(){return this[Hj]}};Object.defineProperty(Xc.prototype,"data",{enumerable:!0});var B6={addEventListener(e,t,n={}){for(let o of this.listeners(e))if(!n[Yc]&&o[sy]===t&&!o[Yc])return;let r;if(e==="message")r=a(function(s,i){let c=new Xc("message",{data:i?s:s.toString()});c[pi]=this,Cp(t,this,c)},"onMessage");else if(e==="close")r=a(function(s,i){let c=new ha("close",{code:s,reason:i.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});c[pi]=this,Cp(t,this,c)},"onClose");else if(e==="error")r=a(function(s){let i=new mi("error",{error:s,message:s.message});i[pi]=this,Cp(t,this,i)},"onError");else if(e==="open")r=a(function(){let s=new Wr("open");s[pi]=this,Cp(t,this,s)},"onOpen");else return;r[Yc]=!!n[Yc],r[sy]=t,n.once?this.once(e,r):this.on(e,r)},removeEventListener(e,t){for(let n of this.listeners(e))if(n[sy]===t&&!n[Yc]){this.removeListener(e,n);break}}};Nj.exports={CloseEvent:ha,ErrorEvent:mi,Event:Wr,EventTarget:B6,MessageEvent:Xc};function Cp(e,t,n){typeof e=="object"&&e.handleEvent?e.handleEvent.call(e,n):e.call(t,n)}a(Cp,"callListener")});var Ep=Te((Gme,Uj)=>{"use strict";var{tokenChars:Qc}=di();function hr(e,t,n){e[t]===void 0?e[t]=[n]:e[t].push(n)}a(hr,"push");function $6(e){let t=Object.create(null),n=Object.create(null),r=!1,o=!1,s=!1,i,c,d=-1,l=-1,u=-1,p=0;for(;p<e.length;p++)if(l=e.charCodeAt(p),i===void 0)if(u===-1&&Qc[l]===1)d===-1&&(d=p);else if(p!==0&&(l===32||l===9))u===-1&&d!==-1&&(u=p);else if(l===59||l===44){if(d===-1)throw new SyntaxError(`Unexpected character at index ${p}`);u===-1&&(u=p);let f=e.slice(d,u);l===44?(hr(t,f,n),n=Object.create(null)):i=f,d=u=-1}else throw new SyntaxError(`Unexpected character at index ${p}`);else if(c===void 0)if(u===-1&&Qc[l]===1)d===-1&&(d=p);else if(l===32||l===9)u===-1&&d!==-1&&(u=p);else if(l===59||l===44){if(d===-1)throw new SyntaxError(`Unexpected character at index ${p}`);u===-1&&(u=p),hr(n,e.slice(d,u),!0),l===44&&(hr(t,i,n),n=Object.create(null),i=void 0),d=u=-1}else if(l===61&&d!==-1&&u===-1)c=e.slice(d,p),d=u=-1;else throw new SyntaxError(`Unexpected character at index ${p}`);else if(o){if(Qc[l]!==1)throw new SyntaxError(`Unexpected character at index ${p}`);d===-1?d=p:r||(r=!0),o=!1}else if(s)if(Qc[l]===1)d===-1&&(d=p);else if(l===34&&d!==-1)s=!1,u=p;else if(l===92)o=!0;else throw new SyntaxError(`Unexpected character at index ${p}`);else if(l===34&&e.charCodeAt(p-1)===61)s=!0;else if(u===-1&&Qc[l]===1)d===-1&&(d=p);else if(d!==-1&&(l===32||l===9))u===-1&&(u=p);else if(l===59||l===44){if(d===-1)throw new SyntaxError(`Unexpected character at index ${p}`);u===-1&&(u=p);let f=e.slice(d,u);r&&(f=f.replace(/\\/g,""),r=!1),hr(n,c,f),l===44&&(hr(t,i,n),n=Object.create(null),i=void 0),c=void 0,d=u=-1}else throw new SyntaxError(`Unexpected character at index ${p}`);if(d===-1||s||l===32||l===9)throw new SyntaxError("Unexpected end of input");u===-1&&(u=p);let m=e.slice(d,u);return i===void 0?hr(t,m,n):(c===void 0?hr(n,m,!0):r?hr(n,c,m.replace(/\\/g,"")):hr(n,c,m),hr(t,i,n)),t}a($6,"parse");function L6(e){return Object.keys(e).map(t=>{let n=e[t];return Array.isArray(n)||(n=[n]),n.map(r=>[t].concat(Object.keys(r).map(o=>{let s=r[o];return Array.isArray(s)||(s=[s]),s.map(i=>i===!0?o:`${o}=${i}`).join("; ")})).join("; ")).join(", ")}).join(", ")}a(L6,"format");Uj.exports={format:L6,parse:$6}});var Op=Te((Qme,eH)=>{"use strict";var N6=Pe("events"),F6=Pe("https"),U6=Pe("http"),Wj=Pe("net"),q6=Pe("tls"),{randomBytes:z6,createHash:W6}=Pe("crypto"),{Duplex:Yme,Readable:Xme}=Pe("stream"),{URL:iy}=Pe("url"),Co=ci(),V6=ny(),J6=ay(),{isBlob:G6}=di(),{BINARY_TYPES:qj,CLOSE_TIMEOUT:K6,EMPTY_BUFFER:Mp,GUID:Y6,kForOnEventAttribute:cy,kListener:X6,kStatusCode:Q6,kWebSocket:mt,NOOP:Vj}=qr(),{EventTarget:{addEventListener:Z6,removeEventListener:e5}}=Fj(),{format:t5,parse:n5}=Ep(),{toBuffer:r5}=Gc(),Jj=Symbol("kAborted"),dy=[8,13],Vr=["CONNECTING","OPEN","CLOSING","CLOSED"],o5=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,We=class e extends N6{static{a(this,"WebSocket")}constructor(t,n,r){super(),this._binaryType=qj[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=Mp,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=e.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,t!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,n===void 0?n=[]:Array.isArray(n)||(typeof n=="object"&&n!==null?(r=n,n=[]):n=[n]),Gj(this,t,n,r)):(this._autoPong=r.autoPong,this._closeTimeout=r.closeTimeout,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(t){qj.includes(t)&&(this._binaryType=t,this._receiver&&(this._receiver._binaryType=t))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(t,n,r){let o=new V6({allowSynchronousEvents:r.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxBufferedChunks:r.maxBufferedChunks,maxFragments:r.maxFragments,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation}),s=new J6(t,this._extensions,r.generateMask);this._receiver=o,this._sender=s,this._socket=t,o[mt]=this,s[mt]=this,t[mt]=this,o.on("conclude",i5),o.on("drain",c5),o.on("error",d5),o.on("message",l5),o.on("ping",u5),o.on("pong",p5),s.onerror=m5,t.setTimeout&&t.setTimeout(0),t.setNoDelay&&t.setNoDelay(),n.length>0&&t.unshift(n),t.on("close",Xj),t.on("data",Hp),t.on("end",Qj),t.on("error",Zj),this._readyState=e.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=e.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[Co.extensionName]&&this._extensions[Co.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=e.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(t,n){if(this.readyState!==e.CLOSED){if(this.readyState===e.CONNECTING){pn(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===e.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=e.CLOSING,this._sender.close(t,n,!this._isServer,r=>{r||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),Yj(this)}}pause(){this.readyState===e.CONNECTING||this.readyState===e.CLOSED||(this._paused=!0,this._socket.pause())}ping(t,n,r){if(this.readyState===e.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"?(r=t,t=n=void 0):typeof n=="function"&&(r=n,n=void 0),typeof t=="number"&&(t=t.toString()),this.readyState!==e.OPEN){ly(this,t,r);return}n===void 0&&(n=!this._isServer),this._sender.ping(t||Mp,n,r)}pong(t,n,r){if(this.readyState===e.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"?(r=t,t=n=void 0):typeof n=="function"&&(r=n,n=void 0),typeof t=="number"&&(t=t.toString()),this.readyState!==e.OPEN){ly(this,t,r);return}n===void 0&&(n=!this._isServer),this._sender.pong(t||Mp,n,r)}resume(){this.readyState===e.CONNECTING||this.readyState===e.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(t,n,r){if(this.readyState===e.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof n=="function"&&(r=n,n={}),typeof t=="number"&&(t=t.toString()),this.readyState!==e.OPEN){ly(this,t,r);return}let o={binary:typeof t!="string",mask:!this._isServer,compress:!0,fin:!0,...n};this._extensions[Co.extensionName]||(o.compress=!1),this._sender.send(t||Mp,o,r)}terminate(){if(this.readyState!==e.CLOSED){if(this.readyState===e.CONNECTING){pn(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=e.CLOSING,this._socket.destroy())}}};Object.defineProperty(We,"CONNECTING",{enumerable:!0,value:Vr.indexOf("CONNECTING")});Object.defineProperty(We.prototype,"CONNECTING",{enumerable:!0,value:Vr.indexOf("CONNECTING")});Object.defineProperty(We,"OPEN",{enumerable:!0,value:Vr.indexOf("OPEN")});Object.defineProperty(We.prototype,"OPEN",{enumerable:!0,value:Vr.indexOf("OPEN")});Object.defineProperty(We,"CLOSING",{enumerable:!0,value:Vr.indexOf("CLOSING")});Object.defineProperty(We.prototype,"CLOSING",{enumerable:!0,value:Vr.indexOf("CLOSING")});Object.defineProperty(We,"CLOSED",{enumerable:!0,value:Vr.indexOf("CLOSED")});Object.defineProperty(We.prototype,"CLOSED",{enumerable:!0,value:Vr.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(e=>{Object.defineProperty(We.prototype,e,{enumerable:!0})});["open","error","close","message"].forEach(e=>{Object.defineProperty(We.prototype,`on${e}`,{enumerable:!0,get(){for(let t of this.listeners(e))if(t[cy])return t[X6];return null},set(t){for(let n of this.listeners(e))if(n[cy]){this.removeListener(e,n);break}typeof t=="function"&&this.addEventListener(e,t,{[cy]:!0})}})});We.prototype.addEventListener=Z6;We.prototype.removeEventListener=e5;eH.exports=We;function Gj(e,t,n,r){let o={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:K6,protocolVersion:dy[1],maxBufferedChunks:262144,maxFragments:16384,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(e._autoPong=o.autoPong,e._closeTimeout=o.closeTimeout,!dy.includes(o.protocolVersion))throw new RangeError(`Unsupported protocol version: ${o.protocolVersion} (supported versions: ${dy.join(", ")})`);let s;if(t instanceof iy)s=t;else try{s=new iy(t)}catch{throw new SyntaxError(`Invalid URL: ${t}`)}s.protocol==="http:"?s.protocol="ws:":s.protocol==="https:"&&(s.protocol="wss:"),e._url=s.href;let i=s.protocol==="wss:",c=s.protocol==="ws+unix:",d;if(s.protocol!=="ws:"&&!i&&!c?d=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:c&&!s.pathname?d="The URL's pathname is empty":s.hash&&(d="The URL contains a fragment identifier"),d){let h=new SyntaxError(d);if(e._redirects===0)throw h;jp(e,h);return}let l=i?443:80,u=z6(16).toString("base64"),p=i?F6.request:U6.request,m=new Set,f;if(o.createConnection=o.createConnection||(i?s5:a5),o.defaultPort=o.defaultPort||l,o.port=s.port||l,o.host=s.hostname.startsWith("[")?s.hostname.slice(1,-1):s.hostname,o.headers={...o.headers,"Sec-WebSocket-Version":o.protocolVersion,"Sec-WebSocket-Key":u,Connection:"Upgrade",Upgrade:"websocket"},o.path=s.pathname+s.search,o.timeout=o.handshakeTimeout,o.perMessageDeflate&&(f=new Co({...o.perMessageDeflate,isServer:!1,maxPayload:o.maxPayload}),o.headers["Sec-WebSocket-Extensions"]=t5({[Co.extensionName]:f.offer()})),n.length){for(let h of n){if(typeof h!="string"||!o5.test(h)||m.has(h))throw new SyntaxError("An invalid or duplicated subprotocol was specified");m.add(h)}o.headers["Sec-WebSocket-Protocol"]=n.join(",")}if(o.origin&&(o.protocolVersion<13?o.headers["Sec-WebSocket-Origin"]=o.origin:o.headers.Origin=o.origin),(s.username||s.password)&&(o.auth=`${s.username}:${s.password}`),c){let h=o.path.split(":");o.socketPath=h[0],o.path=h[1]}let w;if(o.followRedirects){if(e._redirects===0){e._originalIpc=c,e._originalSecure=i,e._originalHostOrSocketPath=c?o.socketPath:s.host;let h=r&&r.headers;if(r={...r,headers:{}},h)for(let[v,g]of Object.entries(h))r.headers[v.toLowerCase()]=g}else if(e.listenerCount("redirect")===0){let h=c?e._originalIpc?o.socketPath===e._originalHostOrSocketPath:!1:e._originalIpc?!1:s.host===e._originalHostOrSocketPath;(!h||e._originalSecure&&!i)&&(delete o.headers.authorization,delete o.headers.cookie,h||delete o.headers.host,o.auth=void 0)}o.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(o.auth).toString("base64")),w=e._req=p(o),e._redirects&&e.emit("redirect",e.url,w)}else w=e._req=p(o);o.timeout&&w.on("timeout",()=>{pn(e,w,"Opening handshake has timed out")}),w.on("error",h=>{w===null||w[Jj]||(w=e._req=null,jp(e,h))}),w.on("response",h=>{let v=h.headers.location,g=h.statusCode;if(v&&o.followRedirects&&g>=300&&g<400){if(++e._redirects>o.maxRedirects){pn(e,w,"Maximum redirects exceeded");return}w.abort();let S;try{S=new iy(v,t)}catch{let k=new SyntaxError(`Invalid URL: ${v}`);jp(e,k);return}Gj(e,S,n,r)}else e.emit("unexpected-response",w,h)||pn(e,w,`Unexpected server response: ${h.statusCode}`)}),w.on("upgrade",(h,v,g)=>{if(e.emit("upgrade",h),e.readyState!==We.CONNECTING)return;w=e._req=null;let S=h.headers.upgrade;if(S===void 0||S.toLowerCase()!=="websocket"){pn(e,v,"Invalid Upgrade header");return}let R=W6("sha1").update(u+Y6).digest("base64");if(h.headers["sec-websocket-accept"]!==R){pn(e,v,"Invalid Sec-WebSocket-Accept header");return}let k=h.headers["sec-websocket-protocol"],y;if(k!==void 0?m.size?m.has(k)||(y="Server sent an invalid subprotocol"):y="Server sent a subprotocol but none was requested":m.size&&(y="Server sent no subprotocol"),y){pn(e,v,y);return}k&&(e._protocol=k);let T=h.headers["sec-websocket-extensions"];if(T!==void 0){if(!f){pn(e,v,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let C;try{C=n5(T)}catch{pn(e,v,"Invalid Sec-WebSocket-Extensions header");return}let b=Object.keys(C);if(b.length!==1||b[0]!==Co.extensionName){pn(e,v,"Server indicated an extension that was not requested");return}try{f.accept(C[Co.extensionName])}catch{pn(e,v,"Invalid Sec-WebSocket-Extensions header");return}e._extensions[Co.extensionName]=f}e.setSocket(v,g,{allowSynchronousEvents:o.allowSynchronousEvents,generateMask:o.generateMask,maxBufferedChunks:o.maxBufferedChunks,maxFragments:o.maxFragments,maxPayload:o.maxPayload,skipUTF8Validation:o.skipUTF8Validation})}),o.finishRequest?o.finishRequest(w,e):w.end()}a(Gj,"initAsClient");function jp(e,t){e._readyState=We.CLOSING,e._errorEmitted=!0,e.emit("error",t),e.emitClose()}a(jp,"emitErrorAndClose");function a5(e){return e.path=e.socketPath,Wj.connect(e)}a(a5,"netConnect");function s5(e){return e.path=void 0,!e.servername&&e.servername!==""&&(e.servername=Wj.isIP(e.host)?"":e.host),q6.connect(e)}a(s5,"tlsConnect");function pn(e,t,n){e._readyState=We.CLOSING;let r=new Error(n);Error.captureStackTrace(r,pn),t.setHeader?(t[Jj]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(jp,e,r)):(t.destroy(r),t.once("error",e.emit.bind(e,"error")),t.once("close",e.emitClose.bind(e)))}a(pn,"abortHandshake");function ly(e,t,n){if(t){let r=G6(t)?t.size:r5(t).length;e._socket?e._sender._bufferedBytes+=r:e._bufferedAmount+=r}if(n){let r=new Error(`WebSocket is not open: readyState ${e.readyState} (${Vr[e.readyState]})`);process.nextTick(n,r)}}a(ly,"sendAfterClose");function i5(e,t){let n=this[mt];n._closeFrameReceived=!0,n._closeMessage=t,n._closeCode=e,n._socket[mt]!==void 0&&(n._socket.removeListener("data",Hp),process.nextTick(Kj,n._socket),e===1005?n.close():n.close(e,t))}a(i5,"receiverOnConclude");function c5(){let e=this[mt];e.isPaused||e._socket.resume()}a(c5,"receiverOnDrain");function d5(e){let t=this[mt];t._socket[mt]!==void 0&&(t._socket.removeListener("data",Hp),process.nextTick(Kj,t._socket),t.close(e[Q6])),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",e))}a(d5,"receiverOnError");function zj(){this[mt].emitClose()}a(zj,"receiverOnFinish");function l5(e,t){this[mt].emit("message",e,t)}a(l5,"receiverOnMessage");function u5(e){let t=this[mt];t._autoPong&&t.pong(e,!this._isServer,Vj),t.emit("ping",e)}a(u5,"receiverOnPing");function p5(e){this[mt].emit("pong",e)}a(p5,"receiverOnPong");function Kj(e){e.resume()}a(Kj,"resume");function m5(e){let t=this[mt];t.readyState!==We.CLOSED&&(t.readyState===We.OPEN&&(t._readyState=We.CLOSING,Yj(t)),this._socket.end(),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",e)))}a(m5,"senderOnError");function Yj(e){e._closeTimer=setTimeout(e._socket.destroy.bind(e._socket),e._closeTimeout)}a(Yj,"setCloseTimer");function Xj(){let e=this[mt];if(this.removeListener("close",Xj),this.removeListener("data",Hp),this.removeListener("end",Qj),e._readyState=We.CLOSING,!this._readableState.endEmitted&&!e._closeFrameReceived&&!e._receiver._writableState.errorEmitted&&this._readableState.length!==0){let t=this.read(this._readableState.length);e._receiver.write(t)}e._receiver.end(),this[mt]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on("error",zj),e._receiver.on("finish",zj))}a(Xj,"socketOnClose");function Hp(e){this[mt]._receiver.write(e)||this.pause()}a(Hp,"socketOnData");function Qj(){let e=this[mt];e._readyState=We.CLOSING,e._receiver.end(),this.end()}a(Qj,"socketOnEnd");function Zj(){let e=this[mt];this.removeListener("error",Zj),this.on("error",Vj),e&&(e._readyState=We.CLOSING,this.destroy())}a(Zj,"socketOnError")});var oH=Te((tfe,rH)=>{"use strict";var efe=Op(),{Duplex:f5}=Pe("stream");function tH(e){e.emit("close")}a(tH,"emitClose");function g5(){!this.destroyed&&this._writableState.finished&&this.destroy()}a(g5,"duplexOnEnd");function nH(e){this.removeListener("error",nH),this.destroy(),this.listenerCount("error")===0&&this.emit("error",e)}a(nH,"duplexOnError");function h5(e,t){let n=!0,r=new f5({...t,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return e.on("message",a(function(s,i){let c=!i&&r._readableState.objectMode?s.toString():s;r.push(c)||e.pause()},"message")),e.once("error",a(function(s){r.destroyed||(n=!1,r.destroy(s))},"error")),e.once("close",a(function(){r.destroyed||r.push(null)},"close")),r._destroy=function(o,s){if(e.readyState===e.CLOSED){s(o),process.nextTick(tH,r);return}let i=!1;e.once("error",a(function(d){i=!0,s(d)},"error")),e.once("close",a(function(){i||s(o),process.nextTick(tH,r)},"close")),n&&e.terminate()},r._final=function(o){if(e.readyState===e.CONNECTING){e.once("open",a(function(){r._final(o)},"open"));return}e._socket!==null&&(e._socket._writableState.finished?(o(),r._readableState.endEmitted&&r.destroy()):(e._socket.once("finish",a(function(){o()},"finish")),e.close()))},r._read=function(){e.isPaused&&e.resume()},r._write=function(o,s,i){if(e.readyState===e.CONNECTING){e.once("open",a(function(){r._write(o,s,i)},"open"));return}e.send(o,i)},r.on("end",g5),r.on("error",nH),r}a(h5,"createWebSocketStream");rH.exports=h5});var uy=Te((rfe,aH)=>{"use strict";var{tokenChars:w5}=di();function y5(e){let t=new Set,n=-1,r=-1,o=0;for(o;o<e.length;o++){let i=e.charCodeAt(o);if(r===-1&&w5[i]===1)n===-1&&(n=o);else if(o!==0&&(i===32||i===9))r===-1&&n!==-1&&(r=o);else if(i===44){if(n===-1)throw new SyntaxError(`Unexpected character at index ${o}`);r===-1&&(r=o);let c=e.slice(n,r);if(t.has(c))throw new SyntaxError(`The "${c}" subprotocol is duplicated`);t.add(c),n=r=-1}else throw new SyntaxError(`Unexpected character at index ${o}`)}if(n===-1||r!==-1)throw new SyntaxError("Unexpected end of input");let s=e.slice(n,o);if(t.has(s))throw new SyntaxError(`The "${s}" subprotocol is duplicated`);return t.add(s),t}a(y5,"parse");aH.exports={parse:y5}});var pH=Te((sfe,uH)=>{"use strict";var v5=Pe("events"),Dp=Pe("http"),{Duplex:afe}=Pe("stream"),{createHash:k5}=Pe("crypto"),sH=Ep(),wa=ci(),b5=uy(),S5=Op(),{CLOSE_TIMEOUT:I5,GUID:R5,kWebSocket:P5}=qr(),_5=/^[+/0-9A-Za-z]{22}==$/,iH=0,cH=1,lH=2,py=class extends v5{static{a(this,"WebSocketServer")}constructor(t,n){if(super(),t={allowSynchronousEvents:!0,autoPong:!0,maxBufferedChunks:256*1024,maxFragments:16*1024,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:I5,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:S5,...t},t.port==null&&!t.server&&!t.noServer||t.port!=null&&(t.server||t.noServer)||t.server&&t.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(t.port!=null?(this._server=Dp.createServer((r,o)=>{let s=Dp.STATUS_CODES[426];o.writeHead(426,{"Content-Length":s.length,"Content-Type":"text/plain"}),o.end(s)}),this._server.listen(t.port,t.host,t.backlog,n)):t.server&&(this._server=t.server),this._server){let r=this.emit.bind(this,"connection");this._removeListeners=x5(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:a((o,s,i)=>{this.handleUpgrade(o,s,i,r)},"upgrade")})}t.perMessageDeflate===!0&&(t.perMessageDeflate={}),t.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=t,this._state=iH}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(t){if(this._state===lH){t&&this.once("close",()=>{t(new Error("The server is not running"))}),process.nextTick(Zc,this);return}if(t&&this.once("close",t),this._state!==cH)if(this._state=cH,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(Zc,this):process.nextTick(Zc,this);else{let n=this._server;this._removeListeners(),this._removeListeners=this._server=null,n.close(()=>{Zc(this)})}}shouldHandle(t){if(this.options.path){let n=t.url.indexOf("?");if((n!==-1?t.url.slice(0,n):t.url)!==this.options.path)return!1}return!0}handleUpgrade(t,n,r,o){n.on("error",dH);let s=t.headers["sec-websocket-key"],i=t.headers.upgrade,c=+t.headers["sec-websocket-version"];if(t.method!=="GET"){ya(this,t,n,405,"Invalid HTTP method");return}if(i===void 0||i.toLowerCase()!=="websocket"){ya(this,t,n,400,"Invalid Upgrade header");return}if(s===void 0||!_5.test(s)){ya(this,t,n,400,"Missing or invalid Sec-WebSocket-Key header");return}if(c!==13&&c!==8){ya(this,t,n,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle(t)){ed(n,400);return}let d=t.headers["sec-websocket-protocol"],l=new Set;if(d!==void 0)try{l=b5.parse(d)}catch{ya(this,t,n,400,"Invalid Sec-WebSocket-Protocol header");return}let u=t.headers["sec-websocket-extensions"],p={};if(this.options.perMessageDeflate&&u!==void 0){let m=new wa({...this.options.perMessageDeflate,isServer:!0,maxPayload:this.options.maxPayload});try{let f=sH.parse(u);f[wa.extensionName]&&(m.accept(f[wa.extensionName]),p[wa.extensionName]=m)}catch{ya(this,t,n,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let m={origin:t.headers[`${c===8?"sec-websocket-origin":"origin"}`],secure:!!(t.socket.authorized||t.socket.encrypted),req:t};if(this.options.verifyClient.length===2){this.options.verifyClient(m,(f,w,h,v)=>{if(!f)return ed(n,w||401,h,v);this.completeUpgrade(p,s,l,t,n,r,o)});return}if(!this.options.verifyClient(m))return ed(n,401)}this.completeUpgrade(p,s,l,t,n,r,o)}completeUpgrade(t,n,r,o,s,i,c){if(!s.readable||!s.writable)return s.destroy();if(s[P5])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>iH)return ed(s,503);let l=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${k5("sha1").update(n+R5).digest("base64")}`],u=new this.options.WebSocket(null,void 0,this.options);if(r.size){let p=this.options.handleProtocols?this.options.handleProtocols(r,o):r.values().next().value;p&&(l.push(`Sec-WebSocket-Protocol: ${p}`),u._protocol=p)}if(t[wa.extensionName]){let p=t[wa.extensionName].params,m=sH.format({[wa.extensionName]:[p]});l.push(`Sec-WebSocket-Extensions: ${m}`),u._extensions=t}this.emit("headers",l,o),s.write(l.concat(`\r
4
4
  `).join(`\r
5
5
  `)),s.removeListener("error",dH),u.setSocket(s,i,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxBufferedChunks:this.options.maxBufferedChunks,maxFragments:this.options.maxFragments,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(u),u.on("close",()=>{this.clients.delete(u),this._shouldEmitClose&&!this.clients.size&&process.nextTick(Zc,this)})),c(u,o)}};uH.exports=py;function x5(e,t){for(let n of Object.keys(t))e.on(n,t[n]);return a(function(){for(let r of Object.keys(t))e.removeListener(r,t[r])},"removeListeners")}a(x5,"addListeners");function Zc(e){e._state=lH,e.emit("close")}a(Zc,"emitClose");function dH(){this.destroy()}a(dH,"socketOnError");function ed(e,t,n,r){n=n||Dp.STATUS_CODES[t],r={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(n),...r},e.once("finish",e.destroy),e.end(`HTTP/1.1 ${t} ${Dp.STATUS_CODES[t]}\r
6
6
  `+Object.keys(r).map(o=>`${o}: ${r[o]}`).join(`\r
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
3
- import{o as vt,p as St}from"./chunk-GGFXBQ3B.js";import{Fa as yt}from"./chunk-MCDTLTSV.js";import{j as pe,k as ht,m as me}from"./chunk-ONMUSXZU.js";import"./chunk-6MI4KKWF.js";import"./chunk-SDO4FC4Q.js";import"./chunk-IR3YJWPW.js";import"./chunk-J2S7BOZU.js";import"./chunk-DQNSR2Q7.js";import"./chunk-6FA3GG5B.js";import{J as He,K as ee,M as pt,N as mt,Q as ft,T as gt}from"./chunk-NNLI4OWY.js";import"./chunk-HZP5U2AA.js";import"./chunk-ES2ISFJC.js";import{f as dt,h as ct}from"./chunk-H7IWJN7L.js";import{a as i}from"./chunk-FTQLQJQV.js";import{createInterface as oo}from"node:readline/promises";import{stdin as Fe,stdout as k}from"node:process";import{pathToFileURL as io}from"node:url";function ge(){return{text:"",cursor:0,history:[],historyIndex:null}}i(ge,"createComposer");function wt(e,t){let r=e.text.slice(0,e.cursor),n=e.text.slice(e.cursor);return{...e,text:`${r}${t}${n}`,cursor:e.cursor+t.length,historyIndex:null}}i(wt,"insertText");function fe(e,t){return{...e,text:t,cursor:t.length}}i(fe,"replaceComposerText");function Rr(e){let t=e.text.trim();return t?{state:{text:"",cursor:0,history:[...e.history.filter(r=>r!==t),t].slice(-100),historyIndex:null},action:{type:"submit",text:t}}:{state:{...e,text:"",cursor:0,historyIndex:null},action:{type:"none"}}}i(Rr,"submitComposer");function Tt(e,t){if(t==="ctrl+c")return{state:e,action:{type:"cancel-or-exit"}};if(t==="ctrl+d")return{state:e,action:e.text?{type:"none"}:{type:"exit"}};if(t==="ctrl+l")return{state:e,action:{type:"rerender"}};if(t==="enter")return Rr(e);if(t==="alt+enter")return{state:wt(e,`
3
+ import{o as vt,p as St}from"./chunk-V2BBMZ7I.js";import{Fa as yt}from"./chunk-Q76GR2JM.js";import{j as pe,k as ht,m as me}from"./chunk-CTC5EYSH.js";import"./chunk-6MI4KKWF.js";import"./chunk-SDO4FC4Q.js";import"./chunk-IR3YJWPW.js";import"./chunk-J2S7BOZU.js";import"./chunk-WYHHDJEG.js";import"./chunk-6FA3GG5B.js";import{J as He,K as ee,M as pt,N as mt,Q as ft,T as gt}from"./chunk-NNLI4OWY.js";import"./chunk-HZP5U2AA.js";import"./chunk-ES2ISFJC.js";import{f as dt,h as ct}from"./chunk-H7IWJN7L.js";import{a as i}from"./chunk-FTQLQJQV.js";import{createInterface as oo}from"node:readline/promises";import{stdin as Fe,stdout as k}from"node:process";import{pathToFileURL as io}from"node:url";function ge(){return{text:"",cursor:0,history:[],historyIndex:null}}i(ge,"createComposer");function wt(e,t){let r=e.text.slice(0,e.cursor),n=e.text.slice(e.cursor);return{...e,text:`${r}${t}${n}`,cursor:e.cursor+t.length,historyIndex:null}}i(wt,"insertText");function fe(e,t){return{...e,text:t,cursor:t.length}}i(fe,"replaceComposerText");function Rr(e){let t=e.text.trim();return t?{state:{text:"",cursor:0,history:[...e.history.filter(r=>r!==t),t].slice(-100),historyIndex:null},action:{type:"submit",text:t}}:{state:{...e,text:"",cursor:0,historyIndex:null},action:{type:"none"}}}i(Rr,"submitComposer");function Tt(e,t){if(t==="ctrl+c")return{state:e,action:{type:"cancel-or-exit"}};if(t==="ctrl+d")return{state:e,action:e.text?{type:"none"}:{type:"exit"}};if(t==="ctrl+l")return{state:e,action:{type:"rerender"}};if(t==="enter")return Rr(e);if(t==="alt+enter")return{state:wt(e,`
4
4
  `),action:{type:"none"}};if(t==="backspace")return e.cursor<=0?{state:e,action:{type:"none"}}:{state:{...e,text:`${e.text.slice(0,e.cursor-1)}${e.text.slice(e.cursor)}`,cursor:e.cursor-1},action:{type:"none"}};if(t==="delete")return e.cursor>=e.text.length?{state:e,action:{type:"none"}}:{state:{...e,text:`${e.text.slice(0,e.cursor)}${e.text.slice(e.cursor+1)}`},action:{type:"none"}};if(t==="left")return{state:{...e,cursor:Math.max(0,e.cursor-1)},action:{type:"none"}};if(t==="right")return{state:{...e,cursor:Math.min(e.text.length,e.cursor+1)},action:{type:"none"}};if(t==="home"||t==="ctrl+a")return{state:{...e,cursor:0},action:{type:"none"}};if(t==="end"||t==="ctrl+e")return{state:{...e,cursor:e.text.length},action:{type:"none"}};if(t==="ctrl+u")return{state:{...e,text:e.text.slice(e.cursor),cursor:0},action:{type:"none"}};if(t==="ctrl+k")return{state:{...e,text:e.text.slice(0,e.cursor)},action:{type:"none"}};if(t==="up"){if(e.history.length===0)return{state:e,action:{type:"none"}};let r=e.historyIndex===null?e.history.length-1:Math.max(0,e.historyIndex-1);return{state:fe({...e,historyIndex:r},e.history[r]??""),action:{type:"none"}}}if(t==="down"){if(e.historyIndex===null)return{state:e,action:{type:"none"}};let r=e.historyIndex+1;return r>=e.history.length?{state:{...e,text:"",cursor:0,historyIndex:null},action:{type:"none"}}:{state:fe({...e,historyIndex:r},e.history[r]??""),action:{type:"none"}}}return t.length>0?{state:wt(e,t),action:{type:"none"}}:{state:e,action:{type:"none"}}}i(Tt,"handleComposerKey");var bt="A turn is already running. Wait for it to finish before sending another line.";function Mr(){let e=!1;return{isRunning(){return e},tryStartSubmission(){return e?!1:(e=!0,!0)},failSubmission(){e=!1},applyRuntimeEvent(t){t.name==="turn.started"&&(e=!0),(t.name==="turn.completed"||t.name==="turn.failed"||t.name==="turn.interrupted")&&(e=!1)}}}i(Mr,"createTerminalTurnSubmissionGuard");function Pt(){return Mr()}i(Pt,"createLineModeTurnGuard");var he=[{name:"help",usage:"/help",description:"show this help"},{name:"providers",usage:"/providers",description:"list providers"},{name:"provider",usage:"/provider [id]",description:"switch provider",requiresArgument:!0},{name:"model",usage:"/model [id]",description:"list or switch model"},{name:"apps",usage:"/apps",description:"list connectable apps"},{name:"install",usage:"/install <app>",description:"open app details",requiresArgument:!0},{name:"projects",usage:"/projects",description:"list projects"},{name:"project",usage:"/project <id>",description:"switch project",requiresArgument:!0},{name:"permissions",usage:"/permissions [ask|full-access]",description:"show or change command access"},{name:"profile",usage:"/profile [status|diff|catalog|check|push]",description:"show or sync profile"},{name:"agents",usage:"/agents",description:"list agents"},{name:"agent",usage:"/agent <id>",description:"select agent",requiresArgument:!0},{name:"run",usage:"/run <action> [json]",description:"run profile action",requiresArgument:!0},{name:"settings",usage:"/settings",description:"show settings"},{name:"logs",usage:"/logs",description:"show recent events"},{name:"compact",usage:"/compact",description:"compact current session"},{name:"clear",usage:"/clear",description:"clear terminal transcript"},{name:"exit",usage:"/exit",description:"exit"},{name:"hooks",usage:"/hooks",description:"show hook status"},{name:"start",usage:"/start",description:"start a new session"}];function ze(e){if(!e.startsWith("/"))return null;let[t="",...r]=e.slice(1).trim().split(/\s+/),n=t.toLowerCase();if(!n)return null;if(n==="exit"||n==="quit")return{type:"exit"};if(n==="help")return{type:"help"};if(n==="clear")return{type:"clear"};if(n==="agents")return{type:"agents"};if(n==="apps")return{type:"apps"};if(n==="agent")return{type:"agent",id:r.join(" ").trim()};if(n==="install")return{type:"install",id:r.join(" ").trim()};if(n==="projects")return{type:"projects"};if(n==="project")return{type:"project",id:r.join(" ").trim()};if(n==="model")return{type:"model",id:r.join(" ").trim()||null};if(n==="permissions")return{type:"permissions",args:r};if(n==="profile")return{type:"profile",args:r};if(n==="logs")return{type:"logs"};if(n==="providers")return{type:"providers"};if(n==="provider")return{type:"provider",id:r.join(" ").trim()||null};if(n==="compact")return{type:"compact"};if(n==="hooks")return{type:"hooks"};if(n==="start")return{type:"start"};if(n==="run"){let o=r[0]??"",s=r.slice(1).join(" ").trim();return s?{type:"run",action:o,input:JSON.parse(s)}:{type:"run",action:o,input:void 0}}return n==="settings"?{type:"settings",args:r}:{type:"unknown",command:n}}i(ze,"parseSlashCommand");function xt(e){let t=e.trim();if(!t.startsWith("!"))return null;let r=t.slice(1).trim();return r?{command:r}:null}i(xt,"parseDirectCommandPrompt");function Ct(){let e=Math.max(...he.map(t=>t.usage.length));return["Commands:",...he.map(t=>`${t.usage.padEnd(e+2)}${t.description}`)].join(`
5
5
  `)}i(Ct,"helpText");var ye=class{static{i(this,"RawInput")}input;onKey;previousRawMode=!1;dataHandler=null;constructor(t,r){this.input=t,this.onKey=r}start(){this.previousRawMode=this.input.isRaw??!1,this.input.setRawMode(!0),this.input.resume(),this.dataHandler=t=>{for(let r of Or(t))this.onKey(r)},this.input.on("data",this.dataHandler)}stop(){this.dataHandler&&this.input.off("data",this.dataHandler),this.dataHandler=null,this.input.setRawMode(this.previousRawMode),this.input.pause()}};function Or(e){let t=e.toString("utf8"),r=[];for(let n=0;n<t.length;n+=1){let o=t[n],s=t[n+1];if(o==="\x1B"){let a=jr(t,n);r.push(a.key),n=a.end;continue}o===""?r.push("ctrl+c"):o===""?r.push("ctrl+d"):o==="\f"?r.push("ctrl+l"):o===""?r.push("ctrl+a"):o===""?r.push("ctrl+e"):o==="\v"?r.push("ctrl+k"):o===""?r.push("ctrl+u"):o==="\x7F"||o==="\b"?r.push("backspace"):o==="\r"||o===`
6
6
  `?r.push("enter"):(o>=" "||o&&s)&&r.push(o)}return r}i(Or,"decodeKeys");function jr(e,t){let r=e.slice(t);return r.startsWith("\x1B\r")||r.startsWith(`\x1B
@@ -1,3 +1,3 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{p as f}from"./chunk-G2VYRU27.js";import"./chunk-ZVOO7FKM.js";import"./chunk-OGPHXXCD.js";import"./chunk-QIQDNEFD.js";import"./chunk-SS3EG6S2.js";import"./chunk-GLUWATL5.js";import"./chunk-HPJFRC4R.js";import"./chunk-J2S7BOZU.js";import"./chunk-DQNSR2Q7.js";import"./chunk-YH35HMNN.js";import"./chunk-NNLI4OWY.js";import"./chunk-HZP5U2AA.js";import"./chunk-ES2ISFJC.js";import"./chunk-H7IWJN7L.js";import"./chunk-VU4NRDKZ.js";import{a as g,c as a,d}from"./chunk-3M53YXEI.js";import{a as s}from"./chunk-FTQLQJQV.js";function c(){return["usage: teams-bot <overview|bind|rebind|diagnostics|diagnostic-run>"," teams-bot overview --team-id <id>"," teams-bot bind --team-id <id> --token <token> [--project-id <id>] [--agent-id <id>] [--microsoft-connection-id <id>]"," teams-bot rebind <bindingId> --team-id <id> [--project-id <id>] [--agent-id <id>] [--microsoft-connection-id <id>]"," teams-bot diagnostics <bindingId> --team-id <id>"," teams-bot diagnostic-run <bindingId> --team-id <id> --prompt <text> [--attachments-json <json-array>] [--action-input-json <json-object>]"].join(`
2
+ import{p as f}from"./chunk-G2VYRU27.js";import"./chunk-ZVOO7FKM.js";import"./chunk-OGPHXXCD.js";import"./chunk-H75VJFMZ.js";import"./chunk-SS3EG6S2.js";import"./chunk-GLUWATL5.js";import"./chunk-J3WNPOLS.js";import"./chunk-J2S7BOZU.js";import"./chunk-WYHHDJEG.js";import"./chunk-CXDS2LSW.js";import"./chunk-NNLI4OWY.js";import"./chunk-HZP5U2AA.js";import"./chunk-ES2ISFJC.js";import"./chunk-H7IWJN7L.js";import"./chunk-JS6MS2NR.js";import{a as g,c as a,d}from"./chunk-3M53YXEI.js";import{a as s}from"./chunk-FTQLQJQV.js";function c(){return["usage: teams-bot <overview|bind|rebind|diagnostics|diagnostic-run>"," teams-bot overview --team-id <id>"," teams-bot bind --team-id <id> --token <token> [--project-id <id>] [--agent-id <id>] [--microsoft-connection-id <id>]"," teams-bot rebind <bindingId> --team-id <id> [--project-id <id>] [--agent-id <id>] [--microsoft-connection-id <id>]"," teams-bot diagnostics <bindingId> --team-id <id>"," teams-bot diagnostic-run <bindingId> --team-id <id> --prompt <text> [--attachments-json <json-array>] [--action-input-json <json-object>]"].join(`
3
3
  `)}s(c,"usage");function u(n,o){if(!(o in n))return;let t=a(n,o);return!t||t==="null"||t==="none"?null:t}s(u,"nullableOption");function b(n){let o=d(n,"usage: teams-bot rebind <bindingId>"),t=u(n,"sandboxId"),r=u(n,"projectId"),i=u(n,"agentId"),e=u(n,"microsoftConnectionId");return{teamId:o,...t!==void 0?{sandboxId:t}:{},...r!==void 0?{projectId:r}:{},...i!==void 0?{agentId:i}:{},...e!==void 0?{microsoftConnectionId:e}:{}}}s(b,"bindingTargetInput");function l(n){let o=a(n,"attachmentsJson");if(!o)return;let t=g(o,"attachments-json");if(!Array.isArray(t))throw new Error("attachments-json must be a JSON array");for(let r of t)if(!r||typeof r!="object"||Array.isArray(r))throw new Error("attachments-json entries must be JSON objects");return t}s(l,"attachmentsInput");function w(n){let o=a(n,"actionInputJson");if(!o)return;let t=g(o,"action-input-json");if(!t||typeof t!="object"||Array.isArray(t))throw new Error("action-input-json must be a JSON object");return t}s(w,"actionInput");async function j(n,o){let t=o[0]||"overview",r=await f(n);if(t==="overview"){let i=d(n,"usage: teams-bot overview");console.log(JSON.stringify(await r.getMicrosoftTeamsBotOverview({teamId:i}),null,2));return}if(t==="bind"){let i=a(n,"token");if(!i)throw new Error(c());let e=await r.bindMicrosoftTeamsBotConversation({...b(n),token:i});console.log(JSON.stringify(e,null,2));return}if(t==="rebind"){let i=o[1]?.trim();if(!i)throw new Error(c());let e=await r.rebindMicrosoftTeamsBotConversation(i,b(n));console.log(JSON.stringify(e,null,2));return}if(t==="diagnostics"){let i=o[1]?.trim(),e=d(n,"usage: teams-bot diagnostics <bindingId>");if(!i)throw new Error(c());console.log(JSON.stringify(await r.sendMicrosoftTeamsBotDiagnostic({teamId:e,bindingId:i}),null,2));return}if(t==="diagnostic-run"){let i=o[1]?.trim(),e=d(n,"usage: teams-bot diagnostic-run <bindingId>"),m=a(n,"prompt");if(!i||!m)throw new Error(c());console.log(JSON.stringify(await r.sendMicrosoftTeamsBotDiagnosticRun({teamId:e,bindingId:i,prompt:m,attachments:l(n),actionInput:w(n)}),null,2));return}throw new Error(c())}s(j,"runTeamsBotCommand");export{j as runTeamsBotCommand};
@@ -1,2 +1,2 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-GTV6J3M2.js";import"./chunk-2ESK5DPT.js";import"./chunk-FTQLQJQV.js";export{a as MACOS_GIT_MISSING_DEVELOPER_TOOLS_ERROR,C as appWorkspacePaths,B as assertSafeBranchName,d as checkWorkspaceGitAvailability,J as checkoutBranch,K as checkoutBranchAtPath,M as clearWorkspaceDiffCacheForTests,D as cloneWorkspace,H as createAndCheckoutBranch,I as createAndCheckoutBranchAtPath,A as expectedRemoteUrl,t as isGeneratedWorkspacePath,i as isGitRepo,c as isMacOSGitDeveloperToolsMissing,u as isVisibleGitWorkspaceFile,r as isWorkspaceDirectory,E as lastFetchAt,z as listPlainWorkspaceFiles,P as loadGitCommitDiffAtPath,N as loadWorkspaceDiff,O as loadWorkspaceDiffAtPath,Q as loadWorkspaceFile,T as loadWorkspaceFileAtPath,R as loadWorkspaceImageFile,S as loadWorkspaceImageFileAtPath,F as loadWorkspaceState,G as loadWorkspaceStateAtPath,n as localVideoContentType,L as mapWorkspaceDiffEntriesWithConcurrency,s as normalizeWorkspaceFilePath,w as parseBranchStatusLine,x as parseNumstat,v as parseStatusLine,h as pathExists,p as readLocalImageFile,q as readLocalVideoFile,l as readWorkspaceDocumentPreview,k as readWorkspaceFile,o as readWorkspaceImageFile,g as redactRemoteUrl,b as runWorkspaceCommand,f as sourceFromRemote,e as startMacOSCommandLineToolsInstall,j as truncatePatch,y as uniqueSortedPaths,m as workspaceImageContentType};
2
+ import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-T3VPZRIX.js";import"./chunk-XDVKDELR.js";import"./chunk-FTQLQJQV.js";export{a as MACOS_GIT_MISSING_DEVELOPER_TOOLS_ERROR,C as appWorkspacePaths,B as assertSafeBranchName,d as checkWorkspaceGitAvailability,J as checkoutBranch,K as checkoutBranchAtPath,M as clearWorkspaceDiffCacheForTests,D as cloneWorkspace,H as createAndCheckoutBranch,I as createAndCheckoutBranchAtPath,A as expectedRemoteUrl,t as isGeneratedWorkspacePath,i as isGitRepo,c as isMacOSGitDeveloperToolsMissing,u as isVisibleGitWorkspaceFile,r as isWorkspaceDirectory,E as lastFetchAt,z as listPlainWorkspaceFiles,P as loadGitCommitDiffAtPath,N as loadWorkspaceDiff,O as loadWorkspaceDiffAtPath,Q as loadWorkspaceFile,T as loadWorkspaceFileAtPath,R as loadWorkspaceImageFile,S as loadWorkspaceImageFileAtPath,F as loadWorkspaceState,G as loadWorkspaceStateAtPath,n as localVideoContentType,L as mapWorkspaceDiffEntriesWithConcurrency,s as normalizeWorkspaceFilePath,w as parseBranchStatusLine,x as parseNumstat,v as parseStatusLine,h as pathExists,p as readLocalImageFile,q as readLocalVideoFile,l as readWorkspaceDocumentPreview,k as readWorkspaceFile,o as readWorkspaceImageFile,g as redactRemoteUrl,b as runWorkspaceCommand,f as sourceFromRemote,e as startMacOSCommandLineToolsInstall,j as truncatePatch,y as uniqueSortedPaths,m as workspaceImageContentType};
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
3
- import{a as m,b as l}from"./chunks/chunk-ZVOO7FKM.js";import"./chunks/chunk-GLUWATL5.js";import{b as u}from"./chunks/chunk-YH35HMNN.js";import{a as c,j as d}from"./chunks/chunk-VU4NRDKZ.js";import{f as s}from"./chunks/chunk-3M53YXEI.js";import{a as i}from"./chunks/chunk-FTQLQJQV.js";function f(e){return!e.command&&s(e.options.version)?"version":s(e.options.checkUpdate)?"check-update":!e.command&&s(e.options.help)?"help":!e.command&&s(e.options.tui)?"tui":e.command?"command":"ui"}i(f,"resolveCliTopLevelAction");async function v(e=process.argv.slice(2)){if(await C(e))return;let{command:r,options:o,rest:t}=u(e);typeof o.home=="string"&&(process.env.OPENPOND_HOME=(await import("./chunks/dist-UA2RQUA4.js")).resolveOpenPondHome({home:o.home}));let n=f({command:r,options:o});if(n==="version"){console.log(c());return}if(n==="check-update"){await(await import("./chunks/core-commands-GDEELWSN.js")).runCheckUpdate();return}if(n==="help"){(await import("./chunks/help-A2NLYYDQ.js")).printHelp();return}let a=m(o),p=l(o);if(a&&(process.env.OPENPOND_ACCOUNT=a),p&&(process.env.OPENPOND_BASE_URL=p),n==="tui"){await(await import("./chunks/app-layer-6SOR3QBT.js")).runOpenPondTerminalCommand(o,t);return}if(n==="ui"){await(await import("./chunks/app-layer-6SOR3QBT.js")).runOpenPondServerCommand("web",o,t);return}await d({command:r,options:o,rest:t})||((await import("./chunks/help-A2NLYYDQ.js")).printHelp(),process.exit(1))}i(v,"runOpenPondCli");async function C(e){if(e[0]==="__app-server"){process.argv=[process.execPath,"openpond-app-server",...e.slice(1)];let[{createOpenPondAppServer:r},{runOpenPondAppServerCli:o}]=await Promise.all([import("./chunks/app-server-runtime-7POHOWYT.js"),import("./chunks/cli-J5YD6UAN.js")]);return await o(r),!0}if(e[0]==="__server"){process.argv=[process.execPath,"openpond-server",...e.slice(1)];let[{createOpenPondServer:r},{runOpenPondServerCli:o}]=await Promise.all([import("./chunks/src-T3RRUIRF.js"),import("./chunks/cli-J5YD6UAN.js")]),{createOpenPondAppServer:t}=await import("./chunks/app-server-runtime-7POHOWYT.js");return await o({createOpenPondServer:r,createOpenPondAppServer:t}),!0}return e[0]==="__terminal"?(await(await import("./chunks/src-GHTPFT4Q.js")).runOpenPondTerminalCli(e.slice(1)),!0):!1}i(C,"runEmbeddedCompanion");v().catch(e=>{let r=e instanceof Error?e.message:String(e),o=e.issue;if(process.argv.includes("--json")&&!(e instanceof Error&&e.name==="OpenPondChildProcessExitError"))console.log(JSON.stringify({error:o??{code:"CLI_ERROR",message:r}}));else if(o&&typeof o=="object"){let n=o;console.error(`${n.code}: ${n.message}
3
+ import{a as m,b as l}from"./chunks/chunk-ZVOO7FKM.js";import"./chunks/chunk-GLUWATL5.js";import{b as u}from"./chunks/chunk-CXDS2LSW.js";import{a as c,j as d}from"./chunks/chunk-JS6MS2NR.js";import{f as s}from"./chunks/chunk-3M53YXEI.js";import{a as i}from"./chunks/chunk-FTQLQJQV.js";function f(e){return!e.command&&s(e.options.version)?"version":s(e.options.checkUpdate)?"check-update":!e.command&&s(e.options.help)?"help":!e.command&&s(e.options.tui)?"tui":e.command?"command":"ui"}i(f,"resolveCliTopLevelAction");async function v(e=process.argv.slice(2)){if(await C(e))return;let{command:r,options:o,rest:t}=u(e);typeof o.home=="string"&&(process.env.OPENPOND_HOME=(await import("./chunks/dist-UA2RQUA4.js")).resolveOpenPondHome({home:o.home}));let n=f({command:r,options:o});if(n==="version"){console.log(c());return}if(n==="check-update"){await(await import("./chunks/core-commands-VGUAOSWS.js")).runCheckUpdate();return}if(n==="help"){(await import("./chunks/help-6IMGNP7A.js")).printHelp();return}let a=m(o),p=l(o);if(a&&(process.env.OPENPOND_ACCOUNT=a),p&&(process.env.OPENPOND_BASE_URL=p),n==="tui"){await(await import("./chunks/app-layer-4CK6ZEKN.js")).runOpenPondTerminalCommand(o,t);return}if(n==="ui"){await(await import("./chunks/app-layer-4CK6ZEKN.js")).runOpenPondServerCommand("web",o,t);return}await d({command:r,options:o,rest:t})||((await import("./chunks/help-6IMGNP7A.js")).printHelp(),process.exit(1))}i(v,"runOpenPondCli");async function C(e){if(e[0]==="__app-server"){process.argv=[process.execPath,"openpond-app-server",...e.slice(1)];let[{createOpenPondAppServer:r},{runOpenPondAppServerCli:o}]=await Promise.all([import("./chunks/app-server-runtime-5XZWU7JL.js"),import("./chunks/cli-GWKOPTLS.js")]);return await o(r),!0}if(e[0]==="__server"){process.argv=[process.execPath,"openpond-server",...e.slice(1)];let[{createOpenPondServer:r},{runOpenPondServerCli:o}]=await Promise.all([import("./chunks/src-RZFKQSHW.js"),import("./chunks/cli-GWKOPTLS.js")]),{createOpenPondAppServer:t}=await import("./chunks/app-server-runtime-5XZWU7JL.js");return await o({createOpenPondServer:r,createOpenPondAppServer:t}),!0}return e[0]==="__terminal"?(await(await import("./chunks/src-UIX7LWM7.js")).runOpenPondTerminalCli(e.slice(1)),!0):!1}i(C,"runEmbeddedCompanion");v().catch(e=>{let r=e instanceof Error?e.message:String(e),o=e.issue;if(process.argv.includes("--json")&&!(e instanceof Error&&e.name==="OpenPondChildProcessExitError"))console.log(JSON.stringify({error:o??{code:"CLI_ERROR",message:r}}));else if(o&&typeof o=="object"){let n=o;console.error(`${n.code}: ${n.message}
4
4
  ${n.path}
5
5
  ${n.action}`)}else console.error(r);let t=typeof e.exitCode=="number"?e.exitCode:1;process.exit(t)});export{v as runOpenPondCli};
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import"./chunks/chunk-X37KMV27.js";import{a as Er,b as Fr,c as Gr,d as Hr,e as Ir,f as Jr,g as Kr,h as Lr,i as Mr,j as Nr,k as Or,l as Pr}from"./chunks/chunk-Y7ZYJQGZ.js";import{a as kr,b as lr,c as nr}from"./chunks/chunk-22UARBPW.js";import{a as qr,b as sr,c as ur,d as vr,e as wr,f as yr,g as zr,h as Ar,i as Br,j as Cr,k as Dr}from"./chunks/chunk-I5K74TOH.js";import{A as Mo,B as No,C as Oo,D as Po,E as Qo,F as Ro,G as So,H as To,I as Uo,J as Vo,K as Wo,b as ho,c as io,d as jo,e as ko,f as lo,g as no,h as qo,i as so,j as uo,k as vo,l as wo,m as yo,n as zo,o as Ao,p as Bo,q as Co,r as Do,s as Eo,t as Fo,u as Go,v as Ho,w as Io,x as Jo,y as Ko,z as Lo}from"./chunks/chunk-DWROB2J6.js";import"./chunks/chunk-73KFNV3D.js";import"./chunks/chunk-OGPHXXCD.js";import"./chunks/chunk-QIQDNEFD.js";import{$,A as D,B as E,C as F,D as G,E as H,F as I,G as J,H as K,I as L,J as M,K as N,L as O,M as P,N as Q,O as R,P as S,Q as T,U,V,W,X,Y,Z,_,a as o,aa as oo,b as p,ba as ro,c as t,ca as eo,d as x,da as fo,e as a,ea as mo,f as b,fa as po,g as c,ga as to,h as d,ha as xo,i as g,ia as go,j as h,k as i,l as j,n as k,o as l,p as n,q,r as s,s as u,t as v,u as w,v as y,w as z,x as A,y as B,z as C}from"./chunks/chunk-SS3EG6S2.js";import{a as r,b as e,c as f,d as m}from"./chunks/chunk-GLUWATL5.js";import"./chunks/chunk-HPJFRC4R.js";import{f as ao,g as bo,h as co}from"./chunks/chunk-J2S7BOZU.js";import"./chunks/chunk-DQNSR2Q7.js";import"./chunks/chunk-3A7HZJNE.js";import{a as Xo,b as Yo,c as Zo,d as _o,e as $o,f as or,g as rr,h as er,i as fr,j as mr,k as pr,l as tr,m as xr,n as ar,o as br,p as cr,q as dr,r as gr,s as hr,t as ir,u as jr}from"./chunks/chunk-EAPFMACH.js";import"./chunks/chunk-6FA3GG5B.js";import"./chunks/chunk-NNLI4OWY.js";import"./chunks/chunk-HZP5U2AA.js";import"./chunks/chunk-ES2ISFJC.js";import"./chunks/chunk-H7IWJN7L.js";import"./chunks/chunk-FTQLQJQV.js";export{fo as DEFAULT_CACHE_TTL_MS,yo as DEFAULT_LOCAL_PROFILE,e as DEFAULT_OPENPOND_API_BASE_URL,m as DEFAULT_OPENPOND_CHAT_API_BASE_URL,f as DEFAULT_OPENPOND_OPCHAT_API_BASE_URL,r as DEFAULT_OPENPOND_WEB_BASE_URL,zo as DEFAULT_PROFILE_AGENT,Zo as OPENPOND_MANIFEST_FILE_NAME,ho as OpenPondProfileSetupRequiredError,bo as OpenPondSandboxClient,wo as PROFILE_MANIFEST,vo as PROFILE_REPO_MANIFEST,go as SANDBOX_RUNTIME_PROFILE_IDS,_o as SANDBOX_TEMPLATE_BUILD_PLAN_FILE_NAME,$o as SANDBOX_TEMPLATE_BUILD_PLAN_KIND,Yo as SANDBOX_TEMPLATE_PREVIEW_PORT_MAX,Xo as SANDBOX_TEMPLATE_PREVIEW_PORT_MIN,or as SandboxTemplateManifestSchema,rr as SandboxTemplateValidationDiagnosticSchema,o as apiFetch,jo as assertOpenPondProfileActionReady,io as buildOpenPondProfileSetupGate,Q as checkOpenPondApiHealth,lo as collectProfileSourceUploadEntries,Uo as commitActiveProfileChanges,p as commitFiles,Nr as computeAtr,Lr as computeBollinger,Ir as computeEma,Hr as computeEmaSeries,Kr as computeMaCross,Jr as computeMacd,Mr as computePriceChange,Er as computeRsi,Gr as computeSma,Fr as computeSmaSeries,Or as consumeAgentCreateStream,lr as consumeStream,M as createAgentFromPrompt,Pr as createClient,k as createHeadlessApps,i as createLocalProject,co as createOpenPondSandboxClient,j as createRepo,Co as defaultLocalProfileRepoPath,tr as defineSandboxTemplate,H as deleteOrArchiveSchedule,t as deployApp,q as deployLatestTemplate,Do as emptyProfileState,V as executeHostedTool,T as executeUserTool,v as fetchToolManifest,ko as formatOpenPondProfileSetupRequirement,pr as formatSandboxTemplateDiagnostics,nr as formatStreamItem,u as getAppEnvironment,L as getAppExecutionTimeline,O as getAppRuntimeSummary,mo as getCachedApps,to as getCachedTools,W as getConfigPath,g as getDeploymentDetail,b as getDeploymentLogs,c as getDeploymentStatus,d as getLatestDeploymentForApp,vr as getOpChatModel,zr as getOpChatProvider,P as getOpenPondAccount,B as getOpenToolRecipe,C as getOpenToolRules,K as getScheduleExecutionLog,l as getTemplateStatus,N as getUserPerformance,qo as hostedPublishStatusFromPayload,uo as hostedRunStatusFromRunSummary,so as hostedRunSummaryFromPayload,no as hostedSourceCheckStatusFromPayload,Eo as initLocalProfileRepo,Io as installAgentPackageIntoActiveProfile,y as listAppSchedules,h as listApps,_ as listConfiguredProfiles,J as listDeploymentScheduleExecutionLogs,wr as listHostedModels,Ar as listHostedProviders,ur as listOpChatModels,yr as listOpChatProviders,z as listOpenToolRecipes,I as listScheduleExecutionLogs,n as listTemplateBranches,w as listUserTools,Z as loadConfig,Y as loadGlobalConfig,Fo as loadLocalProfileRepo,Lo as loadOpenPondProfileLibrary,Jo as loadOpenPondProfileState,Mo as loadOpenPondProfileStateForRef,Po as loadOpenPondProfileStateFromSource,Bo as mergeActiveLocalProfileConfig,Ao as mergeProfileRepoManifestEntry,kr as normalizeDataFrames,ao as normalizeSandboxApiUrl,Ko as openPondProfileRef,mr as parseSandboxTemplateYaml,S as postAgentDigest,Wo as prepareAgentSdkRuntimePackage,x as promotePreviewToProduction,Go as registerLocalProfileRepo,Oo as removeOpenPondProfile,Ho as renameActiveProfileAgent,Qo as requireActiveLocalProfile,sr as resolveHostedChatApiBaseUrl,qr as resolveOpChatApiBaseUrl,U as resolveWorkerBaseUrl,So as runAgentSdkProjectCommand,R as runAssistantMode,Dr as runOpChatSmoke,To as runProfileCheck,Ro as runProfileSdkCommand,G as runScheduleNow,gr as sandboxTemplateBuildMetadata,hr as sandboxTemplateBuildPlan,ar as sandboxTemplateDurableVolume,dr as sandboxTemplateExecutableEntries,cr as sandboxTemplateFileInput,jr as sandboxTemplateJsonSchema,br as sandboxTemplatePreviewPort,xr as sandboxTemplateResources,ir as sandboxTemplateScaffoldFiles,ro as saveConfig,eo as saveGlobalConfig,oo as saveProfileApiKey,Vo as saveProfilePushStatus,A as searchOpenToolRecipes,No as selectOpenPondProfile,Br as sendHostedChatTurn,$ as setActiveProfile,po as setCachedApps,xo as setCachedTools,a as startAppLifecycle,D as startAppSchedules,E as stopAppSchedules,F as stopCurrentAppSchedules,Cr as streamHostedChatTurn,s as updateAppEnvironment,X as updateGlobalConfig,fr as validateSandboxTemplateManifest,er as validateSandboxTemplateYaml};
2
+ import"./chunks/chunk-X37KMV27.js";import{a as Er,b as Fr,c as Gr,d as Hr,e as Ir,f as Jr,g as Kr,h as Lr,i as Mr,j as Nr,k as Or,l as Pr}from"./chunks/chunk-Y7ZYJQGZ.js";import{a as kr,b as lr,c as nr}from"./chunks/chunk-22UARBPW.js";import{a as qr,b as sr,c as ur,d as vr,e as wr,f as yr,g as zr,h as Ar,i as Br,j as Cr,k as Dr}from"./chunks/chunk-I5K74TOH.js";import{A as Mo,B as No,C as Oo,D as Po,E as Qo,F as Ro,G as So,H as To,I as Uo,J as Vo,K as Wo,b as ho,c as io,d as jo,e as ko,f as lo,g as no,h as qo,i as so,j as uo,k as vo,l as wo,m as yo,n as zo,o as Ao,p as Bo,q as Co,r as Do,s as Eo,t as Fo,u as Go,v as Ho,w as Io,x as Jo,y as Ko,z as Lo}from"./chunks/chunk-DWROB2J6.js";import"./chunks/chunk-73KFNV3D.js";import"./chunks/chunk-OGPHXXCD.js";import"./chunks/chunk-H75VJFMZ.js";import{$,A as D,B as E,C as F,D as G,E as H,F as I,G as J,H as K,I as L,J as M,K as N,L as O,M as P,N as Q,O as R,P as S,Q as T,U,V,W,X,Y,Z,_,a as o,aa as oo,b as p,ba as ro,c as t,ca as eo,d as x,da as fo,e as a,ea as mo,f as b,fa as po,g as c,ga as to,h as d,ha as xo,i as g,ia as go,j as h,k as i,l as j,n as k,o as l,p as n,q,r as s,s as u,t as v,u as w,v as y,w as z,x as A,y as B,z as C}from"./chunks/chunk-SS3EG6S2.js";import{a as r,b as e,c as f,d as m}from"./chunks/chunk-GLUWATL5.js";import"./chunks/chunk-J3WNPOLS.js";import{f as ao,g as bo,h as co}from"./chunks/chunk-J2S7BOZU.js";import"./chunks/chunk-WYHHDJEG.js";import"./chunks/chunk-3A7HZJNE.js";import{a as Xo,b as Yo,c as Zo,d as _o,e as $o,f as or,g as rr,h as er,i as fr,j as mr,k as pr,l as tr,m as xr,n as ar,o as br,p as cr,q as dr,r as gr,s as hr,t as ir,u as jr}from"./chunks/chunk-EAPFMACH.js";import"./chunks/chunk-6FA3GG5B.js";import"./chunks/chunk-NNLI4OWY.js";import"./chunks/chunk-HZP5U2AA.js";import"./chunks/chunk-ES2ISFJC.js";import"./chunks/chunk-H7IWJN7L.js";import"./chunks/chunk-FTQLQJQV.js";export{fo as DEFAULT_CACHE_TTL_MS,yo as DEFAULT_LOCAL_PROFILE,e as DEFAULT_OPENPOND_API_BASE_URL,m as DEFAULT_OPENPOND_CHAT_API_BASE_URL,f as DEFAULT_OPENPOND_OPCHAT_API_BASE_URL,r as DEFAULT_OPENPOND_WEB_BASE_URL,zo as DEFAULT_PROFILE_AGENT,Zo as OPENPOND_MANIFEST_FILE_NAME,ho as OpenPondProfileSetupRequiredError,bo as OpenPondSandboxClient,wo as PROFILE_MANIFEST,vo as PROFILE_REPO_MANIFEST,go as SANDBOX_RUNTIME_PROFILE_IDS,_o as SANDBOX_TEMPLATE_BUILD_PLAN_FILE_NAME,$o as SANDBOX_TEMPLATE_BUILD_PLAN_KIND,Yo as SANDBOX_TEMPLATE_PREVIEW_PORT_MAX,Xo as SANDBOX_TEMPLATE_PREVIEW_PORT_MIN,or as SandboxTemplateManifestSchema,rr as SandboxTemplateValidationDiagnosticSchema,o as apiFetch,jo as assertOpenPondProfileActionReady,io as buildOpenPondProfileSetupGate,Q as checkOpenPondApiHealth,lo as collectProfileSourceUploadEntries,Uo as commitActiveProfileChanges,p as commitFiles,Nr as computeAtr,Lr as computeBollinger,Ir as computeEma,Hr as computeEmaSeries,Kr as computeMaCross,Jr as computeMacd,Mr as computePriceChange,Er as computeRsi,Gr as computeSma,Fr as computeSmaSeries,Or as consumeAgentCreateStream,lr as consumeStream,M as createAgentFromPrompt,Pr as createClient,k as createHeadlessApps,i as createLocalProject,co as createOpenPondSandboxClient,j as createRepo,Co as defaultLocalProfileRepoPath,tr as defineSandboxTemplate,H as deleteOrArchiveSchedule,t as deployApp,q as deployLatestTemplate,Do as emptyProfileState,V as executeHostedTool,T as executeUserTool,v as fetchToolManifest,ko as formatOpenPondProfileSetupRequirement,pr as formatSandboxTemplateDiagnostics,nr as formatStreamItem,u as getAppEnvironment,L as getAppExecutionTimeline,O as getAppRuntimeSummary,mo as getCachedApps,to as getCachedTools,W as getConfigPath,g as getDeploymentDetail,b as getDeploymentLogs,c as getDeploymentStatus,d as getLatestDeploymentForApp,vr as getOpChatModel,zr as getOpChatProvider,P as getOpenPondAccount,B as getOpenToolRecipe,C as getOpenToolRules,K as getScheduleExecutionLog,l as getTemplateStatus,N as getUserPerformance,qo as hostedPublishStatusFromPayload,uo as hostedRunStatusFromRunSummary,so as hostedRunSummaryFromPayload,no as hostedSourceCheckStatusFromPayload,Eo as initLocalProfileRepo,Io as installAgentPackageIntoActiveProfile,y as listAppSchedules,h as listApps,_ as listConfiguredProfiles,J as listDeploymentScheduleExecutionLogs,wr as listHostedModels,Ar as listHostedProviders,ur as listOpChatModels,yr as listOpChatProviders,z as listOpenToolRecipes,I as listScheduleExecutionLogs,n as listTemplateBranches,w as listUserTools,Z as loadConfig,Y as loadGlobalConfig,Fo as loadLocalProfileRepo,Lo as loadOpenPondProfileLibrary,Jo as loadOpenPondProfileState,Mo as loadOpenPondProfileStateForRef,Po as loadOpenPondProfileStateFromSource,Bo as mergeActiveLocalProfileConfig,Ao as mergeProfileRepoManifestEntry,kr as normalizeDataFrames,ao as normalizeSandboxApiUrl,Ko as openPondProfileRef,mr as parseSandboxTemplateYaml,S as postAgentDigest,Wo as prepareAgentSdkRuntimePackage,x as promotePreviewToProduction,Go as registerLocalProfileRepo,Oo as removeOpenPondProfile,Ho as renameActiveProfileAgent,Qo as requireActiveLocalProfile,sr as resolveHostedChatApiBaseUrl,qr as resolveOpChatApiBaseUrl,U as resolveWorkerBaseUrl,So as runAgentSdkProjectCommand,R as runAssistantMode,Dr as runOpChatSmoke,To as runProfileCheck,Ro as runProfileSdkCommand,G as runScheduleNow,gr as sandboxTemplateBuildMetadata,hr as sandboxTemplateBuildPlan,ar as sandboxTemplateDurableVolume,dr as sandboxTemplateExecutableEntries,cr as sandboxTemplateFileInput,jr as sandboxTemplateJsonSchema,br as sandboxTemplatePreviewPort,xr as sandboxTemplateResources,ir as sandboxTemplateScaffoldFiles,ro as saveConfig,eo as saveGlobalConfig,oo as saveProfileApiKey,Vo as saveProfilePushStatus,A as searchOpenToolRecipes,No as selectOpenPondProfile,Br as sendHostedChatTurn,$ as setActiveProfile,po as setCachedApps,xo as setCachedTools,a as startAppLifecycle,D as startAppSchedules,E as stopAppSchedules,F as stopCurrentAppSchedules,Cr as streamHostedChatTurn,s as updateAppEnvironment,X as updateGlobalConfig,fr as validateSandboxTemplateManifest,er as validateSandboxTemplateYaml};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openpond",
3
- "version": "0.2.22",
3
+ "version": "0.2.23",
4
4
  "openpondReleaseVersioned": true,
5
5
  "license": "MIT",
6
6
  "description": "OpenPond CLI and local harness",
@@ -1,2 +0,0 @@
1
- import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{ed as c,fd as d}from"./chunk-GKSPJZSF.js";import"./chunk-GTV6J3M2.js";import{j as a,t as b}from"./chunk-MD7IADMT.js";import"./chunk-2ESK5DPT.js";import"./chunk-GGFXBQ3B.js";import"./chunk-MCDTLTSV.js";import"./chunk-XEOEKFG6.js";import"./chunk-ONMUSXZU.js";import"./chunk-6MI4KKWF.js";import"./chunk-SDO4FC4Q.js";import"./chunk-IR3YJWPW.js";import"./chunk-HPJFRC4R.js";import"./chunk-J2S7BOZU.js";import"./chunk-DQNSR2Q7.js";import"./chunk-6FA3GG5B.js";import"./chunk-NNLI4OWY.js";import"./chunk-HZP5U2AA.js";import"./chunk-ES2ISFJC.js";import"./chunk-H7IWJN7L.js";import"./chunk-FTQLQJQV.js";export{a as AGENT_PROTOCOL_VERSION,c as APP_SERVER_COMPOSITION,d as createOpenPondAppServer,b as runAppServerJsonl};