@mherod/get-cookie 4.0.3 → 4.0.4

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 (50) hide show
  1. package/.husky/commit-msg +0 -0
  2. package/.husky/pre-commit +0 -0
  3. package/.husky/pre-push +0 -0
  4. package/.idea/prettier.xml +2 -1
  5. package/dist/chunk-A6MIB6FP.js +2 -0
  6. package/dist/chunk-A6MIB6FP.js.map +1 -0
  7. package/dist/chunk-CFMK2YSL.js +2 -0
  8. package/dist/chunk-CFMK2YSL.js.map +1 -0
  9. package/dist/chunk-IRERRCUF.js +2 -0
  10. package/dist/chunk-IRERRCUF.js.map +1 -0
  11. package/dist/chunk-UPNW543B.js +2 -0
  12. package/dist/chunk-UPNW543B.js.map +1 -0
  13. package/dist/cli.cjs +2 -3
  14. package/dist/cli.cjs.map +1 -1
  15. package/dist/{getChromeCookie-4ZWACG6M.js → getChromeCookie-CL3SRRWX.js} +2 -2
  16. package/dist/getChromeCookie-CL3SRRWX.js.map +1 -0
  17. package/dist/getCookie-WV5KDZN7.js +2 -0
  18. package/dist/getFirefoxCookie-BXQ2GXAW.js +2 -0
  19. package/dist/getFirefoxCookie-BXQ2GXAW.js.map +1 -0
  20. package/dist/getGroupedRenderedCookies-FNJ6FQVQ.js +2 -0
  21. package/dist/getGroupedRenderedCookies-FNJ6FQVQ.js.map +1 -0
  22. package/dist/getMergedRenderedCookies-PNC2LHSD.js +2 -0
  23. package/dist/getMergedRenderedCookies-PNC2LHSD.js.map +1 -0
  24. package/dist/index.cjs +3 -3
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.d.cts +164 -152
  27. package/dist/index.d.ts +164 -152
  28. package/dist/index.js +1 -1
  29. package/dist/index.js.map +1 -1
  30. package/eslint.config.js +2 -1
  31. package/package.json +23 -19
  32. package/typedoc.json +3 -8
  33. package/dist/chunk-5ZT2G45S.js +0 -2
  34. package/dist/chunk-5ZT2G45S.js.map +0 -1
  35. package/dist/chunk-FR2MKDHT.js +0 -2
  36. package/dist/chunk-FR2MKDHT.js.map +0 -1
  37. package/dist/chunk-HMKSQBDC.js +0 -2
  38. package/dist/chunk-HMKSQBDC.js.map +0 -1
  39. package/dist/chunk-W3JALMAX.js +0 -2
  40. package/dist/chunk-W3JALMAX.js.map +0 -1
  41. package/dist/getChromeCookie-4ZWACG6M.js.map +0 -1
  42. package/dist/getCookie-43FKMQEZ.js +0 -2
  43. package/dist/getFirefoxCookie-OJYYZFZP.js +0 -2
  44. package/dist/getFirefoxCookie-OJYYZFZP.js.map +0 -1
  45. package/dist/getGroupedRenderedCookies-P5VZXZUC.js +0 -2
  46. package/dist/getGroupedRenderedCookies-P5VZXZUC.js.map +0 -1
  47. package/dist/getMergedRenderedCookies-C6TXK2I4.js +0 -2
  48. package/dist/getMergedRenderedCookies-C6TXK2I4.js.map +0 -1
  49. package/tsup.config.ts +0 -27
  50. /package/dist/{getCookie-43FKMQEZ.js.map → getCookie-WV5KDZN7.js.map} +0 -0
package/dist/cli.cjs CHANGED
@@ -1,8 +1,7 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var jp=Object.create;var ro=Object.defineProperty;var Wp=Object.getOwnPropertyDescriptor;var $p=Object.getOwnPropertyNames;var Up=Object.getPrototypeOf,Gp=Object.prototype.hasOwnProperty;var Cs=r=>{throw TypeError(r)};var qp=(r,t,e)=>t in r?ro(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var p=(r,t)=>()=>(r&&(t=r(r=0)),t);var Es=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),zp=(r,t)=>{for(var e in t)ro(r,e,{get:t[e],enumerable:!0})},Hp=(r,t,e,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of $p(t))!Gp.call(r,i)&&i!==e&&ro(r,i,{get:()=>t[i],enumerable:!(o=Wp(t,i))||o.enumerable});return r};var ke=(r,t,e)=>(e=r!=null?jp(Up(r)):{},Hp(t||!r||!r.__esModule?ro(e,"default",{value:r,enumerable:!0}):e,r));var c=(r,t,e)=>qp(r,typeof t!="symbol"?t+"":t,e),yi=(r,t,e)=>t.has(r)||Cs("Cannot "+e);var a=(r,t,e)=>(yi(r,t,"read from private field"),e?e.call(r):t.get(r)),w=(r,t,e)=>t.has(r)?Cs("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(r):t.set(r,e),g=(r,t,e,o)=>(yi(r,t,"write to private field"),o?o.call(r,e):t.set(r,e),e),S=(r,t,e)=>(yi(r,t,"access private method"),e);var As,Kp,O,ae=p(()=>{"use strict";As=require("consola"),Kp=(0,As.createConsola)({fancy:!0,formatOptions:{showLogLevel:!1,colors:!0,date:!1,compact:!0,columns:typeof process.stdout.columns=="number"?process.stdout.columns:80},level:typeof process.env.LOG_LEVEL=="string"&&process.env.LOG_LEVEL==="debug"?5:2}),O=Kp});var Qp,oo,wi=p(()=>{"use strict";Qp=typeof global=="object"&&global&&global.Object===Object&&global,oo=Qp});var Jp,Vp,I,ht=p(()=>{"use strict";wi();Jp=typeof self=="object"&&self&&self.Object===Object&&self,Vp=oo||Jp||Function("return this")(),I=Vp});var Yp,nt,sr=p(()=>{"use strict";ht();Yp=I.Symbol,nt=Yp});function th(r){var t=Zp.call(r,nr),e=r[nr];try{r[nr]=void 0;var o=!0}catch(s){}var i=Xp.call(r);return o&&(t?r[nr]=e:delete r[nr]),i}var Ps,Zp,Xp,nr,Rs,_s=p(()=>{"use strict";sr();Ps=Object.prototype,Zp=Ps.hasOwnProperty,Xp=Ps.toString,nr=nt?nt.toStringTag:void 0;Rs=th});function oh(r){return rh.call(r)}var eh,rh,Ds,Ms=p(()=>{"use strict";eh=Object.prototype,rh=eh.toString;Ds=oh});function nh(r){return r==null?r===void 0?sh:ih:Is&&Is in Object(r)?Rs(r):Ds(r)}var ih,sh,Is,et,fe=p(()=>{"use strict";sr();_s();Ms();ih="[object Null]",sh="[object Undefined]",Is=nt?nt.toStringTag:void 0;et=nh});function ah(r){return r!=null&&typeof r=="object"}var J,jt=p(()=>{"use strict";J=ah});function lh(r){return typeof r=="symbol"||J(r)&&et(r)==fh}var fh,Oe,io=p(()=>{"use strict";fe();jt();fh="[object Symbol]";Oe=lh});function uh(r,t){for(var e=-1,o=r==null?0:r.length,i=Array(o);++e<o;)i[e]=t(r[e],e,r);return i}var Ls,Ns=p(()=>{"use strict";Ls=uh});var ph,D,ct=p(()=>{"use strict";ph=Array.isArray,D=ph});function js(r){if(typeof r=="string")return r;if(D(r))return Ls(r,js)+"";if(Oe(r))return Bs?Bs.call(r):"";var t=r+"";return t=="0"&&1/r==-hh?"-0":t}var hh,Fs,Bs,Ws,$s=p(()=>{"use strict";sr();Ns();ct();io();hh=1/0,Fs=nt?nt.prototype:void 0,Bs=Fs?Fs.toString:void 0;Ws=js});function ch(r){var t=typeof r;return r!=null&&(t=="object"||t=="function")}var H,At=p(()=>{"use strict";H=ch});function mh(r){return r}var Te,so=p(()=>{"use strict";Te=mh});function wh(r){if(!H(r))return!1;var t=et(r);return t==gh||t==xh||t==dh||t==yh}var dh,gh,xh,yh,Ae,no=p(()=>{"use strict";fe();At();dh="[object AsyncFunction]",gh="[object Function]",xh="[object GeneratorFunction]",yh="[object Proxy]";Ae=wh});var bh,ao,Us=p(()=>{"use strict";ht();bh=I["__core-js_shared__"],ao=bh});function Sh(r){return!!Gs&&Gs in r}var Gs,qs,zs=p(()=>{"use strict";Us();Gs=function(){var r=/[^.]+$/.exec(ao&&ao.keys&&ao.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();qs=Sh});function Eh(r){if(r!=null){try{return Ch.call(r)}catch(t){}try{return r+""}catch(t){}}return""}var vh,Ch,Pt,bi=p(()=>{"use strict";vh=Function.prototype,Ch=vh.toString;Pt=Eh});function Dh(r){if(!H(r)||qs(r))return!1;var t=Ae(r)?_h:Oh;return t.test(Pt(r))}var kh,Oh,Th,Ah,Ph,Rh,_h,Hs,Ks=p(()=>{"use strict";no();zs();At();bi();kh=/[\\^$.*+?()[\]{}|]/g,Oh=/^\[object .+?Constructor\]$/,Th=Function.prototype,Ah=Object.prototype,Ph=Th.toString,Rh=Ah.hasOwnProperty,_h=RegExp("^"+Ph.call(Rh).replace(kh,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");Hs=Dh});function Mh(r,t){return r==null?void 0:r[t]}var Qs,Js=p(()=>{"use strict";Qs=Mh});function Ih(r,t){var e=Qs(r,t);return Hs(e)?e:void 0}var tt,Wt=p(()=>{"use strict";Ks();Js();tt=Ih});var Lh,fo,Vs=p(()=>{"use strict";Wt();ht();Lh=tt(I,"WeakMap"),fo=Lh});var Ys,Nh,Zs,Xs=p(()=>{"use strict";At();Ys=Object.create,Nh=function(){function r(){}return function(t){if(!H(t))return{};if(Ys)return Ys(t);r.prototype=t;var e=new r;return r.prototype=void 0,e}}(),Zs=Nh});function Fh(r,t,e){switch(e.length){case 0:return r.call(t);case 1:return r.call(t,e[0]);case 2:return r.call(t,e[0],e[1]);case 3:return r.call(t,e[0],e[1],e[2])}return r.apply(t,e)}var tn,en=p(()=>{"use strict";tn=Fh});function Bh(r,t){var e=-1,o=r.length;for(t||(t=Array(o));++e<o;)t[e]=r[e];return t}var rn,on=p(()=>{"use strict";rn=Bh});function Uh(r){var t=0,e=0;return function(){var o=$h(),i=Wh-(o-e);if(e=o,i>0){if(++t>=jh)return arguments[0]}else t=0;return r.apply(void 0,arguments)}}var jh,Wh,$h,sn,nn=p(()=>{"use strict";jh=800,Wh=16,$h=Date.now;sn=Uh});function Gh(r){return function(){return r}}var an,fn=p(()=>{"use strict";an=Gh});var qh,Pe,Si=p(()=>{"use strict";Wt();qh=function(){try{var r=tt(Object,"defineProperty");return r({},"",{}),r}catch(t){}}(),Pe=qh});var zh,ln,un=p(()=>{"use strict";fn();Si();so();zh=Pe?function(r,t){return Pe(r,"toString",{configurable:!0,enumerable:!1,value:an(t),writable:!0})}:Te,ln=zh});var Hh,pn,hn=p(()=>{"use strict";un();nn();Hh=sn(ln),pn=Hh});function Jh(r,t){var e=typeof r;return t=t==null?Kh:t,!!t&&(e=="number"||e!="symbol"&&Qh.test(r))&&r>-1&&r%1==0&&r<t}var Kh,Qh,Re,lo=p(()=>{"use strict";Kh=9007199254740991,Qh=/^(?:0|[1-9]\d*)$/;Re=Jh});function Vh(r,t,e){t=="__proto__"&&Pe?Pe(r,t,{configurable:!0,enumerable:!0,value:e,writable:!0}):r[t]=e}var $t,ar=p(()=>{"use strict";Si();$t=Vh});function Yh(r,t){return r===t||r!==r&&t!==t}var wt,_e=p(()=>{"use strict";wt=Yh});function tc(r,t,e){var o=r[t];(!(Xh.call(r,t)&&wt(o,e))||e===void 0&&!(t in r))&&$t(r,t,e)}var Zh,Xh,cn,mn=p(()=>{"use strict";ar();_e();Zh=Object.prototype,Xh=Zh.hasOwnProperty;cn=tc});function ec(r,t,e,o){var i=!e;e||(e={});for(var s=-1,n=t.length;++s<n;){var f=t[s],l=o?o(e[f],r[f],f,e,r):void 0;l===void 0&&(l=r[f]),i?$t(e,f,l):cn(e,f,l)}return e}var dn,gn=p(()=>{"use strict";mn();ar();dn=ec});function rc(r,t,e){return t=xn(t===void 0?r.length-1:t,0),function(){for(var o=arguments,i=-1,s=xn(o.length-t,0),n=Array(s);++i<s;)n[i]=o[t+i];i=-1;for(var f=Array(t+1);++i<t;)f[i]=o[i];return f[t]=e(n),tn(r,this,f)}}var xn,yn,wn=p(()=>{"use strict";en();xn=Math.max;yn=rc});function oc(r,t){return pn(yn(r,t,Te),r+"")}var bn,Sn=p(()=>{"use strict";so();wn();hn();bn=oc});function sc(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=ic}var ic,De,uo=p(()=>{"use strict";ic=9007199254740991;De=sc});function nc(r){return r!=null&&De(r.length)&&!Ae(r)}var bt,Me=p(()=>{"use strict";no();uo();bt=nc});function ac(r,t,e){if(!H(e))return!1;var o=typeof t;return(o=="number"?bt(e)&&Re(t,e.length):o=="string"&&t in e)?wt(e[t],r):!1}var vn,Cn=p(()=>{"use strict";_e();Me();lo();At();vn=ac});function fc(r){return bn(function(t,e){var o=-1,i=e.length,s=i>1?e[i-1]:void 0,n=i>2?e[2]:void 0;for(s=r.length>3&&typeof s=="function"?(i--,s):void 0,n&&vn(e[0],e[1],n)&&(s=i<3?void 0:s,i=1),t=Object(t);++o<i;){var f=e[o];f&&r(t,f,o,s)}return t})}var En,kn=p(()=>{"use strict";Sn();Cn();En=fc});function uc(r){var t=r&&r.constructor,e=typeof t=="function"&&t.prototype||lc;return r===e}var lc,Ie,po=p(()=>{"use strict";lc=Object.prototype;Ie=uc});function pc(r,t){for(var e=-1,o=Array(r);++e<r;)o[e]=t(e);return o}var On,Tn=p(()=>{"use strict";On=pc});function cc(r){return J(r)&&et(r)==hc}var hc,vi,An=p(()=>{"use strict";fe();jt();hc="[object Arguments]";vi=cc});var Pn,mc,dc,gc,le,ho=p(()=>{"use strict";An();jt();Pn=Object.prototype,mc=Pn.hasOwnProperty,dc=Pn.propertyIsEnumerable,gc=vi(function(){return arguments}())?vi:function(r){return J(r)&&mc.call(r,"callee")&&!dc.call(r,"callee")},le=gc});function xc(){return!1}var Rn,_n=p(()=>{"use strict";Rn=xc});var In,Dn,yc,Mn,wc,bc,ue,co=p(()=>{"use strict";ht();_n();In=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Dn=In&&typeof module=="object"&&module&&!module.nodeType&&module,yc=Dn&&Dn.exports===In,Mn=yc?I.Buffer:void 0,wc=Mn?Mn.isBuffer:void 0,bc=wc||Rn,ue=bc});function zc(r){return J(r)&&De(r.length)&&!!P[et(r)]}var Sc,vc,Cc,Ec,kc,Oc,Tc,Ac,Pc,Rc,_c,Dc,Mc,Ic,Lc,Nc,Fc,Bc,jc,Wc,$c,Uc,Gc,qc,P,Ln,Nn=p(()=>{"use strict";fe();uo();jt();Sc="[object Arguments]",vc="[object Array]",Cc="[object Boolean]",Ec="[object Date]",kc="[object Error]",Oc="[object Function]",Tc="[object Map]",Ac="[object Number]",Pc="[object Object]",Rc="[object RegExp]",_c="[object Set]",Dc="[object String]",Mc="[object WeakMap]",Ic="[object ArrayBuffer]",Lc="[object DataView]",Nc="[object Float32Array]",Fc="[object Float64Array]",Bc="[object Int8Array]",jc="[object Int16Array]",Wc="[object Int32Array]",$c="[object Uint8Array]",Uc="[object Uint8ClampedArray]",Gc="[object Uint16Array]",qc="[object Uint32Array]",P={};P[Nc]=P[Fc]=P[Bc]=P[jc]=P[Wc]=P[$c]=P[Uc]=P[Gc]=P[qc]=!0;P[Sc]=P[vc]=P[Ic]=P[Cc]=P[Lc]=P[Ec]=P[kc]=P[Oc]=P[Tc]=P[Ac]=P[Pc]=P[Rc]=P[_c]=P[Dc]=P[Mc]=!1;Ln=zc});function Hc(r){return function(t){return r(t)}}var Fn,Bn=p(()=>{"use strict";Fn=Hc});var jn,fr,Kc,Ci,Qc,Ei,Wn=p(()=>{"use strict";wi();jn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,fr=jn&&typeof module=="object"&&module&&!module.nodeType&&module,Kc=fr&&fr.exports===jn,Ci=Kc&&oo.process,Qc=function(){try{var r=fr&&fr.require&&fr.require("util").types;return r||Ci&&Ci.binding&&Ci.binding("util")}catch(t){}}(),Ei=Qc});var $n,Jc,Le,mo=p(()=>{"use strict";Nn();Bn();Wn();$n=Ei&&Ei.isTypedArray,Jc=$n?Fn($n):Ln,Le=Jc});function Zc(r,t){var e=D(r),o=!e&&le(r),i=!e&&!o&&ue(r),s=!e&&!o&&!i&&Le(r),n=e||o||i||s,f=n?On(r.length,String):[],l=f.length;for(var u in r)(t||Yc.call(r,u))&&!(n&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Re(u,l)))&&f.push(u);return f}var Vc,Yc,go,ki=p(()=>{"use strict";Tn();ho();ct();co();lo();mo();Vc=Object.prototype,Yc=Vc.hasOwnProperty;go=Zc});function Xc(r,t){return function(e){return r(t(e))}}var xo,Oi=p(()=>{"use strict";xo=Xc});var tm,Un,Gn=p(()=>{"use strict";Oi();tm=xo(Object.keys,Object),Un=tm});function om(r){if(!Ie(r))return Un(r);var t=[];for(var e in Object(r))rm.call(r,e)&&e!="constructor"&&t.push(e);return t}var em,rm,qn,zn=p(()=>{"use strict";po();Gn();em=Object.prototype,rm=em.hasOwnProperty;qn=om});function im(r){return bt(r)?go(r):qn(r)}var Ne,yo=p(()=>{"use strict";ki();zn();Me();Ne=im});function sm(r){var t=[];if(r!=null)for(var e in Object(r))t.push(e);return t}var Hn,Kn=p(()=>{"use strict";Hn=sm});function fm(r){if(!H(r))return Hn(r);var t=Ie(r),e=[];for(var o in r)o=="constructor"&&(t||!am.call(r,o))||e.push(o);return e}var nm,am,Qn,Jn=p(()=>{"use strict";At();po();Kn();nm=Object.prototype,am=nm.hasOwnProperty;Qn=fm});function lm(r){return bt(r)?go(r,!0):Qn(r)}var wo,Ti=p(()=>{"use strict";ki();Jn();Me();wo=lm});function hm(r,t){if(D(r))return!1;var e=typeof r;return e=="number"||e=="symbol"||e=="boolean"||r==null||Oe(r)?!0:pm.test(r)||!um.test(r)||t!=null&&r in Object(t)}var um,pm,Fe,bo=p(()=>{"use strict";ct();io();um=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,pm=/^\w*$/;Fe=hm});var cm,Rt,lr=p(()=>{"use strict";Wt();cm=tt(Object,"create"),Rt=cm});function mm(){this.__data__=Rt?Rt(null):{},this.size=0}var Vn,Yn=p(()=>{"use strict";lr();Vn=mm});function dm(r){var t=this.has(r)&&delete this.__data__[r];return this.size-=t?1:0,t}var Zn,Xn=p(()=>{"use strict";Zn=dm});function wm(r){var t=this.__data__;if(Rt){var e=t[r];return e===gm?void 0:e}return ym.call(t,r)?t[r]:void 0}var gm,xm,ym,ta,ea=p(()=>{"use strict";lr();gm="__lodash_hash_undefined__",xm=Object.prototype,ym=xm.hasOwnProperty;ta=wm});function vm(r){var t=this.__data__;return Rt?t[r]!==void 0:Sm.call(t,r)}var bm,Sm,ra,oa=p(()=>{"use strict";lr();bm=Object.prototype,Sm=bm.hasOwnProperty;ra=vm});function Em(r,t){var e=this.__data__;return this.size+=this.has(r)?0:1,e[r]=Rt&&t===void 0?Cm:t,this}var Cm,ia,sa=p(()=>{"use strict";lr();Cm="__lodash_hash_undefined__";ia=Em});function Be(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var o=r[t];this.set(o[0],o[1])}}var Ai,na=p(()=>{"use strict";Yn();Xn();ea();oa();sa();Be.prototype.clear=Vn;Be.prototype.delete=Zn;Be.prototype.get=ta;Be.prototype.has=ra;Be.prototype.set=ia;Ai=Be});function km(){this.__data__=[],this.size=0}var aa,fa=p(()=>{"use strict";aa=km});function Om(r,t){for(var e=r.length;e--;)if(wt(r[e][0],t))return e;return-1}var Ut,ur=p(()=>{"use strict";_e();Ut=Om});function Pm(r){var t=this.__data__,e=Ut(t,r);if(e<0)return!1;var o=t.length-1;return e==o?t.pop():Am.call(t,e,1),--this.size,!0}var Tm,Am,la,ua=p(()=>{"use strict";ur();Tm=Array.prototype,Am=Tm.splice;la=Pm});function Rm(r){var t=this.__data__,e=Ut(t,r);return e<0?void 0:t[e][1]}var pa,ha=p(()=>{"use strict";ur();pa=Rm});function _m(r){return Ut(this.__data__,r)>-1}var ca,ma=p(()=>{"use strict";ur();ca=_m});function Dm(r,t){var e=this.__data__,o=Ut(e,r);return o<0?(++this.size,e.push([r,t])):e[o][1]=t,this}var da,ga=p(()=>{"use strict";ur();da=Dm});function je(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var o=r[t];this.set(o[0],o[1])}}var Gt,pr=p(()=>{"use strict";fa();ua();ha();ma();ga();je.prototype.clear=aa;je.prototype.delete=la;je.prototype.get=pa;je.prototype.has=ca;je.prototype.set=da;Gt=je});var Mm,qt,So=p(()=>{"use strict";Wt();ht();Mm=tt(I,"Map"),qt=Mm});function Im(){this.size=0,this.__data__={hash:new Ai,map:new(qt||Gt),string:new Ai}}var xa,ya=p(()=>{"use strict";na();pr();So();xa=Im});function Lm(r){var t=typeof r;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?r!=="__proto__":r===null}var wa,ba=p(()=>{"use strict";wa=Lm});function Nm(r,t){var e=r.__data__;return wa(t)?e[typeof t=="string"?"string":"hash"]:e.map}var zt,hr=p(()=>{"use strict";ba();zt=Nm});function Fm(r){var t=zt(this,r).delete(r);return this.size-=t?1:0,t}var Sa,va=p(()=>{"use strict";hr();Sa=Fm});function Bm(r){return zt(this,r).get(r)}var Ca,Ea=p(()=>{"use strict";hr();Ca=Bm});function jm(r){return zt(this,r).has(r)}var ka,Oa=p(()=>{"use strict";hr();ka=jm});function Wm(r,t){var e=zt(this,r),o=e.size;return e.set(r,t),this.size+=e.size==o?0:1,this}var Ta,Aa=p(()=>{"use strict";hr();Ta=Wm});function We(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var o=r[t];this.set(o[0],o[1])}}var pe,vo=p(()=>{"use strict";ya();va();Ea();Oa();Aa();We.prototype.clear=xa;We.prototype.delete=Sa;We.prototype.get=Ca;We.prototype.has=ka;We.prototype.set=Ta;pe=We});function Pi(r,t){if(typeof r!="function"||t!=null&&typeof t!="function")throw new TypeError($m);var e=function(){var o=arguments,i=t?t.apply(this,o):o[0],s=e.cache;if(s.has(i))return s.get(i);var n=r.apply(this,o);return e.cache=s.set(i,n)||s,n};return e.cache=new(Pi.Cache||pe),e}var $m,at,Ri=p(()=>{"use strict";vo();$m="Expected a function";Pi.Cache=pe;at=Pi});function Gm(r){var t=at(r,function(o){return e.size===Um&&e.clear(),o}),e=t.cache;return t}var Um,Pa,Ra=p(()=>{"use strict";Ri();Um=500;Pa=Gm});var qm,zm,Hm,_a,Da=p(()=>{"use strict";Ra();qm=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zm=/\\(\\)?/g,Hm=Pa(function(r){var t=[];return r.charCodeAt(0)===46&&t.push(""),r.replace(qm,function(e,o,i,s){t.push(i?s.replace(zm,"$1"):o||e)}),t}),_a=Hm});function Km(r){return r==null?"":Ws(r)}var Ma,Ia=p(()=>{"use strict";$s();Ma=Km});function Qm(r,t){return D(r)?r:Fe(r,t)?[r]:_a(Ma(r))}var Co,_i=p(()=>{"use strict";ct();bo();Da();Ia();Co=Qm});function Vm(r){if(typeof r=="string"||Oe(r))return r;var t=r+"";return t=="0"&&1/r==-Jm?"-0":t}var Jm,Ht,cr=p(()=>{"use strict";io();Jm=1/0;Ht=Vm});function Ym(r,t){t=Co(t,r);for(var e=0,o=t.length;r!=null&&e<o;)r=r[Ht(t[e++])];return e&&e==o?r:void 0}var Eo,Di=p(()=>{"use strict";_i();cr();Eo=Ym});function Zm(r,t,e){var o=r==null?void 0:Eo(r,t);return o===void 0?e:o}var La,Na=p(()=>{"use strict";Di();La=Zm});function Xm(r,t){for(var e=-1,o=t.length,i=r.length;++e<o;)r[i+e]=t[e];return r}var Fa,Ba=p(()=>{"use strict";Fa=Xm});var td,ko,Mi=p(()=>{"use strict";Oi();td=xo(Object.getPrototypeOf,Object),ko=td});function nd(r){if(!J(r)||et(r)!=ed)return!1;var t=ko(r);if(t===null)return!0;var e=id.call(t,"constructor")&&t.constructor;return typeof e=="function"&&e instanceof e&&ja.call(e)==sd}var ed,rd,od,ja,id,sd,Wa,$a=p(()=>{"use strict";fe();Mi();jt();ed="[object Object]",rd=Function.prototype,od=Object.prototype,ja=rd.toString,id=od.hasOwnProperty,sd=ja.call(Object);Wa=nd});function ad(){this.__data__=new Gt,this.size=0}var Ua,Ga=p(()=>{"use strict";pr();Ua=ad});function fd(r){var t=this.__data__,e=t.delete(r);return this.size=t.size,e}var qa,za=p(()=>{"use strict";qa=fd});function ld(r){return this.__data__.get(r)}var Ha,Ka=p(()=>{"use strict";Ha=ld});function ud(r){return this.__data__.has(r)}var Qa,Ja=p(()=>{"use strict";Qa=ud});function hd(r,t){var e=this.__data__;if(e instanceof Gt){var o=e.__data__;if(!qt||o.length<pd-1)return o.push([r,t]),this.size=++e.size,this;e=this.__data__=new pe(o)}return e.set(r,t),this.size=e.size,this}var pd,Va,Ya=p(()=>{"use strict";pr();So();vo();pd=200;Va=hd});function $e(r){var t=this.__data__=new Gt(r);this.size=t.size}var Kt,Oo=p(()=>{"use strict";pr();Ga();za();Ka();Ja();Ya();$e.prototype.clear=Ua;$e.prototype.delete=qa;$e.prototype.get=Ha;$e.prototype.has=Qa;$e.prototype.set=Va;Kt=$e});function md(r,t){if(t)return r.slice();var e=r.length,o=tf?tf(e):new r.constructor(e);return r.copy(o),o}var ef,Za,cd,Xa,tf,rf,of=p(()=>{"use strict";ht();ef=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Za=ef&&typeof module=="object"&&module&&!module.nodeType&&module,cd=Za&&Za.exports===ef,Xa=cd?I.Buffer:void 0,tf=Xa?Xa.allocUnsafe:void 0;rf=md});function dd(r,t){for(var e=-1,o=r==null?0:r.length,i=0,s=[];++e<o;){var n=r[e];t(n,e,r)&&(s[i++]=n)}return s}var sf,nf=p(()=>{"use strict";sf=dd});function gd(){return[]}var af,ff=p(()=>{"use strict";af=gd});var xd,yd,lf,wd,uf,pf=p(()=>{"use strict";nf();ff();xd=Object.prototype,yd=xd.propertyIsEnumerable,lf=Object.getOwnPropertySymbols,wd=lf?function(r){return r==null?[]:(r=Object(r),sf(lf(r),function(t){return yd.call(r,t)}))}:af,uf=wd});function bd(r,t,e){var o=t(r);return D(r)?o:Fa(o,e(r))}var hf,cf=p(()=>{"use strict";Ba();ct();hf=bd});function Sd(r){return hf(r,Ne,uf)}var Ii,mf=p(()=>{"use strict";cf();pf();yo();Ii=Sd});var vd,To,df=p(()=>{"use strict";Wt();ht();vd=tt(I,"DataView"),To=vd});var Cd,Ao,gf=p(()=>{"use strict";Wt();ht();Cd=tt(I,"Promise"),Ao=Cd});var Ed,Po,xf=p(()=>{"use strict";Wt();ht();Ed=tt(I,"Set"),Po=Ed});var yf,kd,wf,bf,Sf,vf,Od,Td,Ad,Pd,Rd,he,Li,Cf=p(()=>{"use strict";df();So();gf();xf();Vs();fe();bi();yf="[object Map]",kd="[object Object]",wf="[object Promise]",bf="[object Set]",Sf="[object WeakMap]",vf="[object DataView]",Od=Pt(To),Td=Pt(qt),Ad=Pt(Ao),Pd=Pt(Po),Rd=Pt(fo),he=et;(To&&he(new To(new ArrayBuffer(1)))!=vf||qt&&he(new qt)!=yf||Ao&&he(Ao.resolve())!=wf||Po&&he(new Po)!=bf||fo&&he(new fo)!=Sf)&&(he=function(r){var t=et(r),e=t==kd?r.constructor:void 0,o=e?Pt(e):"";if(o)switch(o){case Od:return vf;case Td:return yf;case Ad:return wf;case Pd:return bf;case Rd:return Sf}return t});Li=he});var _d,Ue,Ni=p(()=>{"use strict";ht();_d=I.Uint8Array,Ue=_d});function Dd(r){var t=new r.constructor(r.byteLength);return new Ue(t).set(new Ue(r)),t}var Ef,kf=p(()=>{"use strict";Ni();Ef=Dd});function Md(r,t){var e=t?Ef(r.buffer):r.buffer;return new r.constructor(e,r.byteOffset,r.length)}var Of,Tf=p(()=>{"use strict";kf();Of=Md});function Id(r){return typeof r.constructor=="function"&&!Ie(r)?Zs(ko(r)):{}}var Af,Pf=p(()=>{"use strict";Xs();Mi();po();Af=Id});function Nd(r){return this.__data__.set(r,Ld),this}var Ld,Rf,_f=p(()=>{"use strict";Ld="__lodash_hash_undefined__";Rf=Nd});function Fd(r){return this.__data__.has(r)}var Df,Mf=p(()=>{"use strict";Df=Fd});function Ro(r){var t=-1,e=r==null?0:r.length;for(this.__data__=new pe;++t<e;)this.add(r[t])}var If,Lf=p(()=>{"use strict";vo();_f();Mf();Ro.prototype.add=Ro.prototype.push=Rf;Ro.prototype.has=Df;If=Ro});function Bd(r,t){for(var e=-1,o=r==null?0:r.length;++e<o;)if(t(r[e],e,r))return!0;return!1}var Nf,Ff=p(()=>{"use strict";Nf=Bd});function jd(r,t){return r.has(t)}var Bf,jf=p(()=>{"use strict";Bf=jd});function Ud(r,t,e,o,i,s){var n=e&Wd,f=r.length,l=t.length;if(f!=l&&!(n&&l>f))return!1;var u=s.get(r),h=s.get(t);if(u&&h)return u==t&&h==r;var d=-1,m=!0,y=e&$d?new If:void 0;for(s.set(r,t),s.set(t,r);++d<f;){var b=r[d],x=t[d];if(o)var C=n?o(x,b,d,t,r,s):o(b,x,d,r,t,s);if(C!==void 0){if(C)continue;m=!1;break}if(y){if(!Nf(t,function(E,T){if(!Bf(y,T)&&(b===E||i(b,E,e,o,s)))return y.push(T)})){m=!1;break}}else if(!(b===x||i(b,x,e,o,s))){m=!1;break}}return s.delete(r),s.delete(t),m}var Wd,$d,_o,Fi=p(()=>{"use strict";Lf();Ff();jf();Wd=1,$d=2;_o=Ud});function Gd(r){var t=-1,e=Array(r.size);return r.forEach(function(o,i){e[++t]=[i,o]}),e}var Wf,$f=p(()=>{"use strict";Wf=Gd});function qd(r){var t=-1,e=Array(r.size);return r.forEach(function(o){e[++t]=o}),e}var Uf,Gf=p(()=>{"use strict";Uf=qd});function ig(r,t,e,o,i,s,n){switch(e){case og:if(r.byteLength!=t.byteLength||r.byteOffset!=t.byteOffset)return!1;r=r.buffer,t=t.buffer;case rg:return!(r.byteLength!=t.byteLength||!s(new Ue(r),new Ue(t)));case Kd:case Qd:case Yd:return wt(+r,+t);case Jd:return r.name==t.name&&r.message==t.message;case Zd:case tg:return r==t+"";case Vd:var f=Wf;case Xd:var l=o&zd;if(f||(f=Uf),r.size!=t.size&&!l)return!1;var u=n.get(r);if(u)return u==t;o|=Hd,n.set(r,t);var h=_o(f(r),f(t),o,i,s,n);return n.delete(r),h;case eg:if(Bi)return Bi.call(r)==Bi.call(t)}return!1}var zd,Hd,Kd,Qd,Jd,Vd,Yd,Zd,Xd,tg,eg,rg,og,qf,Bi,zf,Hf=p(()=>{"use strict";sr();Ni();_e();Fi();$f();Gf();zd=1,Hd=2,Kd="[object Boolean]",Qd="[object Date]",Jd="[object Error]",Vd="[object Map]",Yd="[object Number]",Zd="[object RegExp]",Xd="[object Set]",tg="[object String]",eg="[object Symbol]",rg="[object ArrayBuffer]",og="[object DataView]",qf=nt?nt.prototype:void 0,Bi=qf?qf.valueOf:void 0;zf=ig});function fg(r,t,e,o,i,s){var n=e&sg,f=Ii(r),l=f.length,u=Ii(t),h=u.length;if(l!=h&&!n)return!1;for(var d=l;d--;){var m=f[d];if(!(n?m in t:ag.call(t,m)))return!1}var y=s.get(r),b=s.get(t);if(y&&b)return y==t&&b==r;var x=!0;s.set(r,t),s.set(t,r);for(var C=n;++d<l;){m=f[d];var E=r[m],T=t[m];if(o)var A=n?o(T,E,m,t,r,s):o(E,T,m,r,t,s);if(!(A===void 0?E===T||i(E,T,e,o,s):A)){x=!1;break}C||(C=m=="constructor")}if(x&&!C){var R=r.constructor,N=t.constructor;R!=N&&"constructor"in r&&"constructor"in t&&!(typeof R=="function"&&R instanceof R&&typeof N=="function"&&N instanceof N)&&(x=!1)}return s.delete(r),s.delete(t),x}var sg,ng,ag,Kf,Qf=p(()=>{"use strict";mf();sg=1,ng=Object.prototype,ag=ng.hasOwnProperty;Kf=fg});function pg(r,t,e,o,i,s){var n=D(r),f=D(t),l=n?Vf:Li(r),u=f?Vf:Li(t);l=l==Jf?Do:l,u=u==Jf?Do:u;var h=l==Do,d=u==Do,m=l==u;if(m&&ue(r)){if(!ue(t))return!1;n=!0,h=!1}if(m&&!h)return s||(s=new Kt),n||Le(r)?_o(r,t,e,o,i,s):zf(r,t,l,e,o,i,s);if(!(e&lg)){var y=h&&Yf.call(r,"__wrapped__"),b=d&&Yf.call(t,"__wrapped__");if(y||b){var x=y?r.value():r,C=b?t.value():t;return s||(s=new Kt),i(x,C,e,o,s)}}return m?(s||(s=new Kt),Kf(r,t,e,o,i,s)):!1}var lg,Jf,Vf,Do,ug,Yf,Zf,Xf=p(()=>{"use strict";Oo();Fi();Hf();Qf();Cf();ct();co();mo();lg=1,Jf="[object Arguments]",Vf="[object Array]",Do="[object Object]",ug=Object.prototype,Yf=ug.hasOwnProperty;Zf=pg});function tl(r,t,e,o,i){return r===t?!0:r==null||t==null||!J(r)&&!J(t)?r!==r&&t!==t:Zf(r,t,e,o,tl,i)}var Mo,ji=p(()=>{"use strict";Xf();jt();Mo=tl});function mg(r,t,e,o){var i=e.length,s=i,n=!o;if(r==null)return!s;for(r=Object(r);i--;){var f=e[i];if(n&&f[2]?f[1]!==r[f[0]]:!(f[0]in r))return!1}for(;++i<s;){f=e[i];var l=f[0],u=r[l],h=f[1];if(n&&f[2]){if(u===void 0&&!(l in r))return!1}else{var d=new Kt;if(o)var m=o(u,h,l,r,t,d);if(!(m===void 0?Mo(h,u,hg|cg,o,d):m))return!1}}return!0}var hg,cg,el,rl=p(()=>{"use strict";Oo();ji();hg=1,cg=2;el=mg});function dg(r){return r===r&&!H(r)}var Io,Wi=p(()=>{"use strict";At();Io=dg});function gg(r){for(var t=Ne(r),e=t.length;e--;){var o=t[e],i=r[o];t[e]=[o,i,Io(i)]}return t}var ol,il=p(()=>{"use strict";Wi();yo();ol=gg});function xg(r,t){return function(e){return e==null?!1:e[r]===t&&(t!==void 0||r in Object(e))}}var Lo,$i=p(()=>{"use strict";Lo=xg});function yg(r){var t=ol(r);return t.length==1&&t[0][2]?Lo(t[0][0],t[0][1]):function(e){return e===r||el(e,r,t)}}var sl,nl=p(()=>{"use strict";rl();il();$i();sl=yg});function wg(r,t){return r!=null&&t in Object(r)}var al,fl=p(()=>{"use strict";al=wg});function bg(r,t,e){t=Co(t,r);for(var o=-1,i=t.length,s=!1;++o<i;){var n=Ht(t[o]);if(!(s=r!=null&&e(r,n)))break;r=r[n]}return s||++o!=i?s:(i=r==null?0:r.length,!!i&&De(i)&&Re(n,i)&&(D(r)||le(r)))}var ll,ul=p(()=>{"use strict";_i();ho();ct();lo();uo();cr();ll=bg});function Sg(r,t){return r!=null&&ll(r,t,al)}var pl,hl=p(()=>{"use strict";fl();ul();pl=Sg});function Eg(r,t){return Fe(r)&&Io(t)?Lo(Ht(r),t):function(e){var o=La(e,r);return o===void 0&&o===t?pl(e,r):Mo(t,o,vg|Cg)}}var vg,Cg,cl,ml=p(()=>{"use strict";ji();Na();hl();bo();Wi();$i();cr();vg=1,Cg=2;cl=Eg});function kg(r){return function(t){return t==null?void 0:t[r]}}var dl,gl=p(()=>{"use strict";dl=kg});function Og(r){return function(t){return Eo(t,r)}}var xl,yl=p(()=>{"use strict";Di();xl=Og});function Tg(r){return Fe(r)?dl(Ht(r)):xl(r)}var wl,bl=p(()=>{"use strict";gl();yl();bo();cr();wl=Tg});function Ag(r){return typeof r=="function"?r:r==null?Te:typeof r=="object"?D(r)?cl(r[0],r[1]):sl(r):wl(r)}var Sl,vl=p(()=>{"use strict";nl();ml();so();ct();bl();Sl=Ag});function Pg(r,t,e,o){for(var i=-1,s=r==null?0:r.length;++i<s;){var n=r[i];t(o,n,e(n),r)}return o}var Cl,El=p(()=>{"use strict";Cl=Pg});function Rg(r){return function(t,e,o){for(var i=-1,s=Object(t),n=o(t),f=n.length;f--;){var l=n[r?f:++i];if(e(s[l],l,s)===!1)break}return t}}var kl,Ol=p(()=>{"use strict";kl=Rg});var _g,No,Ui=p(()=>{"use strict";Ol();_g=kl(),No=_g});function Dg(r,t){return r&&No(r,t,Ne)}var Tl,Al=p(()=>{"use strict";Ui();yo();Tl=Dg});function Mg(r,t){return function(e,o){if(e==null)return e;if(!bt(e))return r(e,o);for(var i=e.length,s=t?i:-1,n=Object(e);(t?s--:++s<i)&&o(n[s],s,n)!==!1;);return e}}var Pl,Rl=p(()=>{"use strict";Me();Pl=Mg});var Ig,_l,Dl=p(()=>{"use strict";Al();Rl();Ig=Pl(Tl),_l=Ig});function Lg(r,t,e,o){return _l(r,function(i,s,n){t(o,i,e(i),n)}),o}var Ml,Il=p(()=>{"use strict";Dl();Ml=Lg});function Ng(r,t){return function(e,o){var i=D(e)?Cl:Ml,s=t?t():{};return i(e,r,Sl(o,2),s)}}var Ll,Nl=p(()=>{"use strict";El();Il();vl();ct();Ll=Ng});function Fg(r,t,e){(e!==void 0&&!wt(r[t],e)||e===void 0&&!(t in r))&&$t(r,t,e)}var mr,Gi=p(()=>{"use strict";ar();_e();mr=Fg});function Bg(r){return J(r)&&bt(r)}var Fl,Bl=p(()=>{"use strict";Me();jt();Fl=Bg});function jg(r,t){if(!(t==="constructor"&&typeof r[t]=="function")&&t!="__proto__")return r[t]}var dr,qi=p(()=>{"use strict";dr=jg});function Wg(r){return dn(r,wo(r))}var jl,Wl=p(()=>{"use strict";gn();Ti();jl=Wg});function $g(r,t,e,o,i,s,n){var f=dr(r,e),l=dr(t,e),u=n.get(l);if(u){mr(r,e,u);return}var h=s?s(f,l,e+"",r,t,n):void 0,d=h===void 0;if(d){var m=D(l),y=!m&&ue(l),b=!m&&!y&&Le(l);h=l,m||y||b?D(f)?h=f:Fl(f)?h=rn(f):y?(d=!1,h=rf(l,!0)):b?(d=!1,h=Of(l,!0)):h=[]:Wa(l)||le(l)?(h=f,le(f)?h=jl(f):(!H(f)||Ae(f))&&(h=Af(l))):d=!1}d&&(n.set(l,h),i(h,l,o,s,n),n.delete(l)),mr(r,e,h)}var $l,Ul=p(()=>{"use strict";Gi();of();Tf();on();Pf();ho();ct();Bl();co();no();At();$a();mo();qi();Wl();$l=$g});function Gl(r,t,e,o,i){r!==t&&No(t,function(s,n){if(i||(i=new Kt),H(s))$l(r,t,n,e,Gl,o,i);else{var f=o?o(dr(r,n),s,n+"",r,t,i):void 0;f===void 0&&(f=s),mr(r,n,f)}},wo)}var ql,zl=p(()=>{"use strict";Oo();Gi();Ui();Ul();At();Ti();qi();ql=Gl});var Ug,Gg,qg,Fo,Hl=p(()=>{"use strict";ar();Nl();Ug=Object.prototype,Gg=Ug.hasOwnProperty,qg=Ll(function(r,t,e){Gg.call(r,e)?r[e].push(t):$t(r,e,[t])}),Fo=qg});var zg,zi,Kl=p(()=>{"use strict";zl();kn();zg=En(function(r,t,e){ql(r,t,e)}),zi=zg});var ce=p(()=>{"use strict";Hl();Ri();Kl();});function jo(r,t,e){let i=`${t?"\u2705":"\u274C"} ${r} ${t?"succeeded":"failed"}`;t?O.success(i,e):O.error(i,e)}function F(r,t,e){let o={...e!=null?e:{},error:t instanceof Error?{name:t.name,message:t.message,stack:t.stack}:t};O.error(r,o)}function St(r,t,e){O.withTag(r).debug(t,e)}function Ql(r){return O.withTag(r)}function Wo(r,t,e){O.withTag(r).warn(t,e)}var Qt=p(()=>{"use strict";ae();ae()});var nu=Es((tO,su)=>{"use strict";su.exports=ou;function ou(r,t,e){r instanceof RegExp&&(r=ru(r,e)),t instanceof RegExp&&(t=ru(t,e));var o=iu(r,t,e);return o&&{start:o[0],end:o[1],pre:e.slice(0,o[0]),body:e.slice(o[0]+r.length,o[1]),post:e.slice(o[1]+t.length)}}function ru(r,t){var e=t.match(r);return e?e[0]:null}ou.range=iu;function iu(r,t,e){var o,i,s,n,f,l=e.indexOf(r),u=e.indexOf(t,l+1),h=l;if(l>=0&&u>0){if(r===t)return[l,u];for(o=[],s=e.length;h>=0&&!f;)h==l?(o.push(h),l=e.indexOf(r,h+1)):o.length==1?f=[o.pop(),u]:(i=o.pop(),i<s&&(s=i,n=u),u=e.indexOf(t,h+1)),h=l<u&&l>=0?l:u;o.length&&(f=[s,n])}return f}});var mu=Es((eO,cu)=>{"use strict";var au=nu();cu.exports=tx;var fu="\0SLASH"+Math.random()+"\0",lu="\0OPEN"+Math.random()+"\0",Ki="\0CLOSE"+Math.random()+"\0",uu="\0COMMA"+Math.random()+"\0",pu="\0PERIOD"+Math.random()+"\0";function Hi(r){return parseInt(r,10)==r?parseInt(r,10):r.charCodeAt(0)}function Zg(r){return r.split("\\\\").join(fu).split("\\{").join(lu).split("\\}").join(Ki).split("\\,").join(uu).split("\\.").join(pu)}function Xg(r){return r.split(fu).join("\\").split(lu).join("{").split(Ki).join("}").split(uu).join(",").split(pu).join(".")}function hu(r){if(!r)return[""];var t=[],e=au("{","}",r);if(!e)return r.split(",");var o=e.pre,i=e.body,s=e.post,n=o.split(",");n[n.length-1]+="{"+i+"}";var f=hu(s);return s.length&&(n[n.length-1]+=f.shift(),n.push.apply(n,f)),t.push.apply(t,n),t}function tx(r){return r?(r.substr(0,2)==="{}"&&(r="\\{\\}"+r.substr(2)),gr(Zg(r),!0).map(Xg)):[]}function ex(r){return"{"+r+"}"}function rx(r){return/^-?0\d/.test(r)}function ox(r,t){return r<=t}function ix(r,t){return r>=t}function gr(r,t){var e=[],o=au("{","}",r);if(!o)return[r];var i=o.pre,s=o.post.length?gr(o.post,!1):[""];if(/\$$/.test(o.pre))for(var n=0;n<s.length;n++){var f=i+"{"+o.body+"}"+s[n];e.push(f)}else{var l=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),h=l||u,d=o.body.indexOf(",")>=0;if(!h&&!d)return o.post.match(/,.*\}/)?(r=o.pre+"{"+o.body+Ki+o.post,gr(r)):[r];var m;if(h)m=o.body.split(/\.\./);else if(m=hu(o.body),m.length===1&&(m=gr(m[0],!1).map(ex),m.length===1))return s.map(function(Bp){return o.pre+m[0]+Bp});var y;if(h){var b=Hi(m[0]),x=Hi(m[1]),C=Math.max(m[0].length,m[1].length),E=m.length==3?Math.abs(Hi(m[2])):1,T=ox,A=x<b;A&&(E*=-1,T=ix);var R=m.some(rx);y=[];for(var N=b;T(N,x);N+=E){var st;if(u)st=String.fromCharCode(N),st==="\\"&&(st="");else if(st=String(N),R){var Ss=C-st.length;if(Ss>0){var vs=new Array(Ss+1).join("0");N<0?st="-"+vs+st.slice(1):st=vs+st}}y.push(st)}}else{y=[];for(var ne=0;ne<m.length;ne++)y.push.apply(y,gr(m[ne],!1))}for(var ne=0;ne<y.length;ne++)for(var n=0;n<s.length;n++){var f=i+y[ne]+s[n];(!t||h||f)&&e.push(f)}}return e}});function dy(r,t){if(r instanceof se)throw F("Command execution failed",r,{command:r.command,originalError:r.originalError}),r;if(r instanceof Error){let o=new se(r.message,t,r);throw F("Failed to execute command",r,{command:t,stack:r.stack}),o}let e=new se("Unknown error occurred during command execution",t);throw F("Failed to execute command",null,{error:r,command:t}),e}async function Tp(r,t={}){if(!r||typeof r!="string")throw new se("Command must be a non-empty string",r);let e={encoding:"utf8",maxBuffer:5*1024*1024,timeout:3e4};try{let{stdout:o,stderr:i}=await my(r,{...e,...t}),s=o.trim();if(!s)throw i?new se(`Command failed with stderr: ${i}`,r):new se("Command returned empty result",r);return s}catch(o){dy(o,r)}}var kp,Op,my,se,Ap=p(()=>{"use strict";kp=require("child_process"),Op=require("util");Qt();my=(0,Op.promisify)(kp.exec),se=class extends Error{constructor(e,o,i){super(e);this.command=o;this.originalError=i;this.name="CommandExecutionError"}}});var Pp={};zp(Pp,{getChromePassword:()=>xy});var gy,xy,Rp=p(()=>{"use strict";ce();Ap();gy=async()=>Tp('security find-generic-password -w -s "Chrome Safe Storage"'),xy=at(gy)});function ks(r){if(!r)return[];try{let t=[],o=new URL(r).hostname,i=o.split(".");t.push({name:"%",domain:o});for(let s=1;s<i.length-1;s++)t.push({name:"%",domain:`%.${i.slice(s).join(".")}`}),t.push({name:"%",domain:i.slice(s).join(".")});return t}catch(t){throw t instanceof TypeError?new Error("Invalid URL"):t}}var Os=ke(require("minimist"),1);function Ts(r){let t=(0,Os.default)(r,{string:["browser","profile","url","domain","name","output"],boolean:["help","version","verbose","dump","dump-grouped","render","render-grouped"],alias:{b:"browser",p:"profile",u:"url",d:"domain",n:"name",h:"help",v:"version",D:"dump-grouped",r:"render",R:"render-grouped"}}),{_:e,...o}=t;return{values:o,positionals:e}}ae();ce();async function Bo(r,t,e=[]){return r.length===0?e:(await Promise.all(r.map(async i=>{try{return await t(i)}catch(s){return e}}))).flat()}ae();Qt();var Xl=require("fs"),Go=require("path"),tu=ke(require("fast-glob"),1);Qt();var Yl=require("path");ce();var Jl={};zi(Jl,process.env);var $o=Jl.HOME;if(typeof $o!="string"||$o.length===0)throw new Error("HOME environment variable is not set or empty");var Vl,Ge=(0,Yl.join)((Vl=$o)!=null?Vl:"","Library","Application Support","Google","Chrome");var Zl=ke(require("better-sqlite3"),1);ce();Qt();var Hg=at(r=>{try{return Promise.resolve(new Zl.default(r,{readonly:!0}))}catch(t){throw F("Database open failed",t,{file:r}),t}});function Kg(r){try{return r.close(),Promise.resolve()}catch(t){return F("Database close failed",t),Promise.reject(t instanceof Error?t:new Error("Failed to close database: Unknown error"))}}async function Uo({file:r,sql:t,params:e,rowFilter:o,rowTransform:i}){let s;try{s=await Hg(r);let f=s.prepare(t).all(e),l=o?f.filter(o):f;return i?l.map(i):l}catch(n){throw F("Database query failed",n,{file:r,sql:t}),n}finally{s&&await Kg(s)}}function Qg(r){if(typeof r!="string")return!1;let t=r.trim();return t.length===0?!1:(0,Xl.existsSync)(t)}async function Jg(){let r=[(0,Go.join)(Ge,"Default/Cookies"),(0,Go.join)(Ge,"Profile */Cookies"),(0,Go.join)(Ge,"Profile Default/Cookies")],t=[];for(let e of r){let o=await(0,tu.default)(e);t.push(...o)}return St("ChromeCookies","Found cookie files",{count:t.length,files:t}),t}function Vg(r,t){let e=r==="%",o=e?"SELECT name, encrypted_value, host_key, expires_utc FROM cookies WHERE host_key LIKE ?":"SELECT name, encrypted_value, host_key, expires_utc FROM cookies WHERE name = ? AND host_key LIKE ?",i=e?[`%${t}%`]:[r,`%${t}%`];return{sql:o,params:i}}async function Yg(r,t,e){try{let{sql:o,params:i}=Vg(t,e);St("ChromeCookies","Executing query",{sql:o,params:i});let s=await Uo({file:r,sql:o,params:i,rowTransform:n=>({name:n.name,domain:n.host_key,value:n.encrypted_value,expiry:n.expires_utc})});return jo("QueryCookies",!0,{file:r,count:s.length}),s}catch(o){return F("Failed to read cookie file",o,{file:r}),[]}}async function eu({name:r,domain:t,file:e}){let o=typeof e=="string"&&e.length>0?[e]:await Jg();if(o.length===0)return St("ChromeCookies","No cookie files found"),[];let i=[];for(let s of o){if(!Qg(s)){St("ChromeCookies","Cookie file missing or invalid",{file:s});continue}let n=await Yg(s,r,t);i.push(...n)}return St("ChromeCookies","Query complete",{totalCookies:i.length}),i}var Eu=ke(mu(),1);var xr=r=>{if(typeof r!="string")throw new TypeError("invalid pattern");if(r.length>65536)throw new TypeError("pattern is too long")};var sx={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},yr=r=>r.replace(/[[\]\\-]/g,"\\$&"),nx=r=>r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),du=r=>r.join(""),gu=(r,t)=>{let e=t;if(r.charAt(e)!=="[")throw new Error("not in a brace expression");let o=[],i=[],s=e+1,n=!1,f=!1,l=!1,u=!1,h=e,d="";t:for(;s<r.length;){let x=r.charAt(s);if((x==="!"||x==="^")&&s===e+1){u=!0,s++;continue}if(x==="]"&&n&&!l){h=s+1;break}if(n=!0,x==="\\"&&!l){l=!0,s++;continue}if(x==="["&&!l){for(let[C,[E,T,A]]of Object.entries(sx))if(r.startsWith(C,s)){if(d)return["$.",!1,r.length-e,!0];s+=C.length,A?i.push(E):o.push(E),f=f||T;continue t}}if(l=!1,d){x>d?o.push(yr(d)+"-"+yr(x)):x===d&&o.push(yr(x)),d="",s++;continue}if(r.startsWith("-]",s+1)){o.push(yr(x+"-")),s+=2;continue}if(r.startsWith("-",s+1)){d=x,s+=2;continue}o.push(yr(x)),s++}if(h<s)return["",!1,0,!1];if(!o.length&&!i.length)return["$.",!1,r.length-e,!0];if(i.length===0&&o.length===1&&/^\\?.$/.test(o[0])&&!u){let x=o[0].length===2?o[0].slice(-1):o[0];return[nx(x),!1,h-e,!1]}let m="["+(u?"^":"")+du(o)+"]",y="["+(u?"":"^")+du(i)+"]";return[o.length&&i.length?"("+m+"|"+y+")":o.length?m:y,f,h-e,!0]};var mt=(r,{windowsPathsNoEscape:t=!1}={})=>t?r.replace(/\[([^\/\\])\]/g,"$1"):r.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var ax=new Set(["!","?","+","*","@"]),xu=r=>ax.has(r),fx="(?!(?:^|/)\\.\\.?(?:$|/))",qo="(?!\\.)",lx=new Set(["[","."]),ux=new Set(["..","."]),px=new Set("().*{}+?[]^$\\!"),hx=r=>r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Ji="[^/]",yu=Ji+"*?",wu=Ji+"+?",B,W,_t,_,L,Jt,me,Vt,vt,de,wr,ge,bu,Yt,zo,Qi,Su,V=class V{constructor(t,e,o={}){w(this,ge);c(this,"type");w(this,B);w(this,W);w(this,_t,!1);w(this,_,[]);w(this,L);w(this,Jt);w(this,me);w(this,Vt,!1);w(this,vt);w(this,de);w(this,wr,!1);this.type=t,t&&g(this,W,!0),g(this,L,e),g(this,B,a(this,L)?a(a(this,L),B):this),g(this,vt,a(this,B)===this?o:a(a(this,B),vt)),g(this,me,a(this,B)===this?[]:a(a(this,B),me)),t==="!"&&!a(a(this,B),Vt)&&a(this,me).push(this),g(this,Jt,a(this,L)?a(a(this,L),_).length:0)}get hasMagic(){if(a(this,W)!==void 0)return a(this,W);for(let t of a(this,_))if(typeof t!="string"&&(t.type||t.hasMagic))return g(this,W,!0);return a(this,W)}toString(){return a(this,de)!==void 0?a(this,de):this.type?g(this,de,this.type+"("+a(this,_).map(t=>String(t)).join("|")+")"):g(this,de,a(this,_).map(t=>String(t)).join(""))}push(...t){for(let e of t)if(e!==""){if(typeof e!="string"&&!(e instanceof V&&a(e,L)===this))throw new Error("invalid part: "+e);a(this,_).push(e)}}toJSON(){var e;let t=this.type===null?a(this,_).slice().map(o=>typeof o=="string"?o:o.toJSON()):[this.type,...a(this,_).map(o=>o.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===a(this,B)||a(a(this,B),Vt)&&((e=a(this,L))==null?void 0:e.type)==="!")&&t.push({}),t}isStart(){var e;if(a(this,B)===this)return!0;if(!((e=a(this,L))!=null&&e.isStart()))return!1;if(a(this,Jt)===0)return!0;let t=a(this,L);for(let o=0;o<a(this,Jt);o++){let i=a(t,_)[o];if(!(i instanceof V&&i.type==="!"))return!1}return!0}isEnd(){var e,o,i;if(a(this,B)===this||((e=a(this,L))==null?void 0:e.type)==="!")return!0;if(!((o=a(this,L))!=null&&o.isEnd()))return!1;if(!this.type)return(i=a(this,L))==null?void 0:i.isEnd();let t=a(this,L)?a(a(this,L),_).length:0;return a(this,Jt)===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let e=new V(this.type,t);for(let o of a(this,_))e.copyIn(o);return e}static fromGlob(t,e={}){var i;let o=new V(null,void 0,e);return S(i=V,Yt,zo).call(i,t,o,0,e),o}toMMPattern(){if(this!==a(this,B))return a(this,B).toMMPattern();let t=this.toString(),[e,o,i,s]=this.toRegExpSource();if(!(i||a(this,W)||a(this,vt).nocase&&!a(this,vt).nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return o;let f=(a(this,vt).nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${e}$`,f),{_src:e,_glob:t})}get options(){return a(this,vt)}toRegExpSource(t){var l;let e=t!=null?t:!!a(this,vt).dot;if(a(this,B)===this&&S(this,ge,bu).call(this),!this.type){let u=this.isStart()&&this.isEnd(),h=a(this,_).map(b=>{var A;let[x,C,E,T]=typeof b=="string"?S(A=V,Yt,Su).call(A,b,a(this,W),u):b.toRegExpSource(t);return g(this,W,a(this,W)||E),g(this,_t,a(this,_t)||T),x}).join(""),d="";if(this.isStart()&&typeof a(this,_)[0]=="string"&&!(a(this,_).length===1&&ux.has(a(this,_)[0]))){let x=lx,C=e&&x.has(h.charAt(0))||h.startsWith("\\.")&&x.has(h.charAt(2))||h.startsWith("\\.\\.")&&x.has(h.charAt(4)),E=!e&&!t&&x.has(h.charAt(0));d=C?fx:E?qo:""}let m="";return this.isEnd()&&a(a(this,B),Vt)&&((l=a(this,L))==null?void 0:l.type)==="!"&&(m="(?:$|\\/)"),[d+h+m,mt(h),g(this,W,!!a(this,W)),a(this,_t)]}let o=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",s=S(this,ge,Qi).call(this,e);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let u=this.toString();return g(this,_,[u]),this.type=null,g(this,W,void 0),[u,mt(this.toString()),!1,!1]}let n=!o||t||e||!qo?"":S(this,ge,Qi).call(this,!0);n===s&&(n=""),n&&(s=`(?:${s})(?:${n})*?`);let f="";if(this.type==="!"&&a(this,wr))f=(this.isStart()&&!e?qo:"")+wu;else{let u=this.type==="!"?"))"+(this.isStart()&&!e&&!t?qo:"")+yu+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&n?")":this.type==="*"&&n?")?":`)${this.type}`;f=i+s+u}return[f,mt(s),g(this,W,!!a(this,W)),a(this,_t)]}};B=new WeakMap,W=new WeakMap,_t=new WeakMap,_=new WeakMap,L=new WeakMap,Jt=new WeakMap,me=new WeakMap,Vt=new WeakMap,vt=new WeakMap,de=new WeakMap,wr=new WeakMap,ge=new WeakSet,bu=function(){if(this!==a(this,B))throw new Error("should only call on root");if(a(this,Vt))return this;this.toString(),g(this,Vt,!0);let t;for(;t=a(this,me).pop();){if(t.type!=="!")continue;let e=t,o=a(e,L);for(;o;){for(let i=a(e,Jt)+1;!o.type&&i<a(o,_).length;i++)for(let s of a(t,_)){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(a(o,_)[i])}e=o,o=a(e,L)}}return this},Yt=new WeakSet,zo=function(t,e,o,i){var y,b;let s=!1,n=!1,f=-1,l=!1;if(e.type===null){let x=o,C="";for(;x<t.length;){let E=t.charAt(x++);if(s||E==="\\"){s=!s,C+=E;continue}if(n){x===f+1?(E==="^"||E==="!")&&(l=!0):E==="]"&&!(x===f+2&&l)&&(n=!1),C+=E;continue}else if(E==="["){n=!0,f=x,l=!1,C+=E;continue}if(!i.noext&&xu(E)&&t.charAt(x)==="("){e.push(C),C="";let T=new V(E,e);x=S(y=V,Yt,zo).call(y,t,T,x,i),e.push(T);continue}C+=E}return e.push(C),x}let u=o+1,h=new V(null,e),d=[],m="";for(;u<t.length;){let x=t.charAt(u++);if(s||x==="\\"){s=!s,m+=x;continue}if(n){u===f+1?(x==="^"||x==="!")&&(l=!0):x==="]"&&!(u===f+2&&l)&&(n=!1),m+=x;continue}else if(x==="["){n=!0,f=u,l=!1,m+=x;continue}if(xu(x)&&t.charAt(u)==="("){h.push(m),m="";let C=new V(x,h);h.push(C),u=S(b=V,Yt,zo).call(b,t,C,u,i);continue}if(x==="|"){h.push(m),m="",d.push(h),h=new V(null,e);continue}if(x===")")return m===""&&a(e,_).length===0&&g(e,wr,!0),h.push(m),m="",e.push(...d,h),u;m+=x}return e.type=null,g(e,W,void 0),g(e,_,[t.substring(o-1)]),u},Qi=function(t){return a(this,_).map(e=>{if(typeof e=="string")throw new Error("string type in extglob ast??");let[o,i,s,n]=e.toRegExpSource(t);return g(this,_t,a(this,_t)||n),o}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join("|")},Su=function(t,e,o=!1){let i=!1,s="",n=!1;for(let f=0;f<t.length;f++){let l=t.charAt(f);if(i){i=!1,s+=(px.has(l)?"\\":"")+l;continue}if(l==="\\"){f===t.length-1?s+="\\\\":i=!0;continue}if(l==="["){let[u,h,d,m]=gu(t,f);if(d){s+=u,n=n||h,f+=d-1,e=e||m;continue}}if(l==="*"){o&&t==="*"?s+=wu:s+=yu,e=!0;continue}if(l==="?"){s+=Ji,e=!0;continue}s+=hx(l)}return[s,mt(t),!!e,n]},w(V,Yt);var qe=V;var ze=(r,{windowsPathsNoEscape:t=!1}={})=>t?r.replace(/[?*()[\]]/g,"[$&]"):r.replace(/[?*()[\]\\]/g,"\\$&");var Y=(r,t,e={})=>(xr(t),!e.nocomment&&t.charAt(0)==="#"?!1:new rt(t,e).match(r)),cx=/^\*+([^+@!?\*\[\(]*)$/,mx=r=>t=>!t.startsWith(".")&&t.endsWith(r),dx=r=>t=>t.endsWith(r),gx=r=>(r=r.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(r)),xx=r=>(r=r.toLowerCase(),t=>t.toLowerCase().endsWith(r)),yx=/^\*+\.\*+$/,wx=r=>!r.startsWith(".")&&r.includes("."),bx=r=>r!=="."&&r!==".."&&r.includes("."),Sx=/^\.\*+$/,vx=r=>r!=="."&&r!==".."&&r.startsWith("."),Cx=/^\*+$/,Ex=r=>r.length!==0&&!r.startsWith("."),kx=r=>r.length!==0&&r!=="."&&r!=="..",Ox=/^\?+([^+@!?\*\[\(]*)?$/,Tx=([r,t=""])=>{let e=ku([r]);return t?(t=t.toLowerCase(),o=>e(o)&&o.toLowerCase().endsWith(t)):e},Ax=([r,t=""])=>{let e=Ou([r]);return t?(t=t.toLowerCase(),o=>e(o)&&o.toLowerCase().endsWith(t)):e},Px=([r,t=""])=>{let e=Ou([r]);return t?o=>e(o)&&o.endsWith(t):e},Rx=([r,t=""])=>{let e=ku([r]);return t?o=>e(o)&&o.endsWith(t):e},ku=([r])=>{let t=r.length;return e=>e.length===t&&!e.startsWith(".")},Ou=([r])=>{let t=r.length;return e=>e.length===t&&e!=="."&&e!==".."},Tu=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",vu={win32:{sep:"\\"},posix:{sep:"/"}},_x=Tu==="win32"?vu.win32.sep:vu.posix.sep;Y.sep=_x;var z=Symbol("globstar **");Y.GLOBSTAR=z;var Dx="[^/]",Mx=Dx+"*?",Ix="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Lx="(?:(?!(?:\\/|^)\\.).)*?",Nx=(r,t={})=>e=>Y(e,r,t);Y.filter=Nx;var ft=(r,t={})=>Object.assign({},r,t),Fx=r=>{if(!r||typeof r!="object"||!Object.keys(r).length)return Y;let t=Y;return Object.assign((o,i,s={})=>t(o,i,ft(r,s)),{Minimatch:class extends t.Minimatch{constructor(i,s={}){super(i,ft(r,s))}static defaults(i){return t.defaults(ft(r,i)).Minimatch}},AST:class extends t.AST{constructor(i,s,n={}){super(i,s,ft(r,n))}static fromGlob(i,s={}){return t.AST.fromGlob(i,ft(r,s))}},unescape:(o,i={})=>t.unescape(o,ft(r,i)),escape:(o,i={})=>t.escape(o,ft(r,i)),filter:(o,i={})=>t.filter(o,ft(r,i)),defaults:o=>t.defaults(ft(r,o)),makeRe:(o,i={})=>t.makeRe(o,ft(r,i)),braceExpand:(o,i={})=>t.braceExpand(o,ft(r,i)),match:(o,i,s={})=>t.match(o,i,ft(r,s)),sep:t.sep,GLOBSTAR:z})};Y.defaults=Fx;var Au=(r,t={})=>(xr(r),t.nobrace||!/\{(?:(?!\{).)*\}/.test(r)?[r]:(0,Eu.default)(r));Y.braceExpand=Au;var Bx=(r,t={})=>new rt(r,t).makeRe();Y.makeRe=Bx;var jx=(r,t,e={})=>{let o=new rt(t,e);return r=r.filter(i=>o.match(i)),o.options.nonull&&!r.length&&r.push(t),r};Y.match=jx;var Cu=/[?*]|[+@!]\(.*?\)|\[|\]/,Wx=r=>r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),rt=class{constructor(t,e={}){c(this,"options");c(this,"set");c(this,"pattern");c(this,"windowsPathsNoEscape");c(this,"nonegate");c(this,"negate");c(this,"comment");c(this,"empty");c(this,"preserveMultipleSlashes");c(this,"partial");c(this,"globSet");c(this,"globParts");c(this,"nocase");c(this,"isWindows");c(this,"platform");c(this,"windowsNoMagicRoot");c(this,"regexp");xr(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||Tu,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=e.windowsNoMagicRoot!==void 0?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let e of t)if(typeof e!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let o=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(o),this.debug(this.pattern,this.globParts);let i=this.globParts.map((s,n,f)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=s[0]===""&&s[1]===""&&(s[2]==="?"||!Cu.test(s[2]))&&!Cu.test(s[3]),u=/^[a-z]:/i.test(s[0]);if(l)return[...s.slice(0,4),...s.slice(4).map(h=>this.parse(h))];if(u)return[s[0],...s.slice(1).map(h=>this.parse(h))]}return s.map(l=>this.parse(l))});if(this.debug(this.pattern,i),this.set=i.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s<this.set.length;s++){let n=this.set[s];n[0]===""&&n[1]===""&&this.globParts[s][2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3])&&(n[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let o=0;o<t.length;o++)for(let i=0;i<t[o].length;i++)t[o][i]==="**"&&(t[o][i]="*");let{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):e>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(e=>{let o=-1;for(;(o=e.indexOf("**",o+1))!==-1;){let i=o;for(;e[i+1]==="**";)i++;i!==o&&e.splice(o,i-o)}return e})}levelOneOptimize(t){return t.map(e=>(e=e.reduce((o,i)=>{let s=o[o.length-1];return i==="**"&&s==="**"?o:i===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(o.pop(),o):(o.push(i),o)},[]),e.length===0?[""]:e))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let i=1;i<t.length-1;i++){let s=t[i];i===1&&s===""&&t[0]===""||(s==="."||s==="")&&(e=!0,t.splice(i,1),i--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(e=!0,t.pop())}let o=0;for(;(o=t.indexOf("..",o+1))!==-1;){let i=t[o-1];i&&i!=="."&&i!==".."&&i!=="**"&&(e=!0,t.splice(o-1,2),o-=2)}}while(e);return t.length===0?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let o of t){let i=-1;for(;(i=o.indexOf("**",i+1))!==-1;){let n=i;for(;o[n+1]==="**";)n++;n>i&&o.splice(i+1,n-i);let f=o[i+1],l=o[i+2],u=o[i+3];if(f!==".."||!l||l==="."||l===".."||!u||u==="."||u==="..")continue;e=!0,o.splice(i,1);let h=o.slice(0);h[i]="**",t.push(h),i--}if(!this.preserveMultipleSlashes){for(let n=1;n<o.length-1;n++){let f=o[n];n===1&&f===""&&o[0]===""||(f==="."||f==="")&&(e=!0,o.splice(n,1),n--)}o[0]==="."&&o.length===2&&(o[1]==="."||o[1]==="")&&(e=!0,o.pop())}let s=0;for(;(s=o.indexOf("..",s+1))!==-1;){let n=o[s-1];if(n&&n!=="."&&n!==".."&&n!=="**"){e=!0;let l=s===1&&o[s+1]==="**"?["."]:[];o.splice(s-1,2,...l),o.length===0&&o.push(""),s-=2}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let o=e+1;o<t.length;o++){let i=this.partsMatch(t[e],t[o],!this.preserveMultipleSlashes);if(i){t[e]=[],t[o]=i;break}}return t.filter(e=>e.length)}partsMatch(t,e,o=!1){let i=0,s=0,n=[],f="";for(;i<t.length&&s<e.length;)if(t[i]===e[s])n.push(f==="b"?e[s]:t[i]),i++,s++;else if(o&&t[i]==="**"&&e[s]===t[i+1])n.push(t[i]),i++;else if(o&&e[s]==="**"&&t[i]===e[s+1])n.push(e[s]),s++;else if(t[i]==="*"&&e[s]&&(this.options.dot||!e[s].startsWith("."))&&e[s]!=="**"){if(f==="b")return!1;f="a",n.push(t[i]),i++,s++}else if(e[s]==="*"&&t[i]&&(this.options.dot||!t[i].startsWith("."))&&t[i]!=="**"){if(f==="a")return!1;f="b",n.push(e[s]),i++,s++}else return!1;return t.length===e.length&&n}parseNegate(){if(this.nonegate)return;let t=this.pattern,e=!1,o=0;for(let i=0;i<t.length&&t.charAt(i)==="!";i++)e=!e,o++;o&&(this.pattern=t.slice(o)),this.negate=e}matchOne(t,e,o=!1){let i=this.options;if(this.isWindows){let x=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),C=!x&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),E=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),T=!E&&e[0]===""&&e[1]===""&&e[2]==="?"&&typeof e[3]=="string"&&/^[a-z]:$/i.test(e[3]),A=C?3:x?0:void 0,R=T?3:E?0:void 0;if(typeof A=="number"&&typeof R=="number"){let[N,st]=[t[A],e[R]];N.toLowerCase()===st.toLowerCase()&&(e[R]=N,R>A?e=e.slice(R):A>R&&(t=t.slice(A)))}}let{optimizationLevel:s=1}=this.options;s>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var n=0,f=0,l=t.length,u=e.length;n<l&&f<u;n++,f++){this.debug("matchOne loop");var h=e[f],d=t[n];if(this.debug(e,h,d),h===!1)return!1;if(h===z){this.debug("GLOBSTAR",[e,h,d]);var m=n,y=f+1;if(y===u){for(this.debug("** at the end");n<l;n++)if(t[n]==="."||t[n]===".."||!i.dot&&t[n].charAt(0)===".")return!1;return!0}for(;m<l;){var b=t[m];if(this.debug(`
2
+ "use strict";var zp=Object.create;var io=Object.defineProperty;var Kp=Object.getOwnPropertyDescriptor;var Qp=Object.getOwnPropertyNames;var Vp=Object.getPrototypeOf,Jp=Object.prototype.hasOwnProperty;var _s=r=>{throw TypeError(r)};var Yp=(r,t,e)=>t in r?io(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var p=(r,t)=>()=>(r&&(t=r(r=0)),t);var Rs=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),Zp=(r,t)=>{for(var e in t)io(r,e,{get:t[e],enumerable:!0})},Xp=(r,t,e,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Qp(t))!Jp.call(r,i)&&i!==e&&io(r,i,{get:()=>t[i],enumerable:!(o=Kp(t,i))||o.enumerable});return r};var ke=(r,t,e)=>(e=r!=null?zp(Vp(r)):{},Xp(t||!r||!r.__esModule?io(e,"default",{value:r,enumerable:!0}):e,r));var c=(r,t,e)=>Yp(r,typeof t!="symbol"?t+"":t,e),ki=(r,t,e)=>t.has(r)||_s("Cannot "+e);var a=(r,t,e)=>(ki(r,t,"read from private field"),e?e.call(r):t.get(r)),w=(r,t,e)=>t.has(r)?_s("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(r):t.set(r,e),g=(r,t,e,o)=>(ki(r,t,"write to private field"),o?o.call(r,e):t.set(r,e),e),S=(r,t,e)=>(ki(r,t,"access private method"),e);var Is,eh,O,nt=p(()=>{"use strict";Is=require("consola"),eh=(0,Is.createConsola)({fancy:!0,formatOptions:{showLogLevel:!1,colors:!0,date:!1,compact:!0,columns:typeof process.stdout.columns=="number"?process.stdout.columns:80},level:typeof process.env.LOG_LEVEL=="string"&&process.env.LOG_LEVEL==="debug"?5:2}),O=eh});function Ls(r,t,e){let i=`${t?"\u2705":"\u274C"} ${r} ${t?"succeeded":"failed"}`;t?O.success(i,e):O.error(i,e)}function I(r,t,e){let o={...e!=null?e:{},error:t instanceof Error?{name:t.name,message:t.message,stack:t.stack}:t};O.error(r,o)}function bt(r,t,e){O.withTag(r).debug(t,e)}function so(r){return O.withTag(r)}function no(r,t,e){O.withTag(r).warn(t,e)}var Pt=p(()=>{"use strict";nt();nt()});var rh,ao,Ti=p(()=>{"use strict";rh=typeof global=="object"&&global&&global.Object===Object&&global,ao=rh});var oh,ih,L,ct=p(()=>{"use strict";Ti();oh=typeof self=="object"&&self&&self.Object===Object&&self,ih=ao||oh||Function("return this")(),L=ih});var sh,at,sr=p(()=>{"use strict";ct();sh=L.Symbol,at=sh});function fh(r){var t=nh.call(r,nr),e=r[nr];try{r[nr]=void 0;var o=!0}catch(s){}var i=ah.call(r);return o&&(t?r[nr]=e:delete r[nr]),i}var Fs,nh,ah,nr,Ns,Bs=p(()=>{"use strict";sr();Fs=Object.prototype,nh=Fs.hasOwnProperty,ah=Fs.toString,nr=at?at.toStringTag:void 0;Ns=fh});function ph(r){return uh.call(r)}var lh,uh,js,Ws=p(()=>{"use strict";lh=Object.prototype,uh=lh.toString;js=ph});function mh(r){return r==null?r===void 0?ch:hh:Us&&Us in Object(r)?Ns(r):js(r)}var hh,ch,Us,et,le=p(()=>{"use strict";sr();Bs();Ws();hh="[object Null]",ch="[object Undefined]",Us=at?at.toStringTag:void 0;et=mh});function dh(r){return r!=null&&typeof r=="object"}var V,Ut=p(()=>{"use strict";V=dh});function xh(r){return typeof r=="symbol"||V(r)&&et(r)==gh}var gh,Oe,fo=p(()=>{"use strict";le();Ut();gh="[object Symbol]";Oe=xh});function yh(r,t){for(var e=-1,o=r==null?0:r.length,i=Array(o);++e<o;)i[e]=t(r[e],e,r);return i}var $s,Gs=p(()=>{"use strict";$s=yh});var wh,D,mt=p(()=>{"use strict";wh=Array.isArray,D=wh});function zs(r){if(typeof r=="string")return r;if(D(r))return $s(r,zs)+"";if(Oe(r))return qs?qs.call(r):"";var t=r+"";return t=="0"&&1/r==-bh?"-0":t}var bh,Hs,qs,Ks,Qs=p(()=>{"use strict";sr();Gs();mt();fo();bh=1/0,Hs=at?at.prototype:void 0,qs=Hs?Hs.toString:void 0;Ks=zs});function Sh(r){var t=typeof r;return r!=null&&(t=="object"||t=="function")}var z,_t=p(()=>{"use strict";z=Sh});function vh(r){return r}var Te,lo=p(()=>{"use strict";Te=vh});function Th(r){if(!z(r))return!1;var t=et(r);return t==Eh||t==kh||t==Ch||t==Oh}var Ch,Eh,kh,Oh,Ae,uo=p(()=>{"use strict";le();_t();Ch="[object AsyncFunction]",Eh="[object Function]",kh="[object GeneratorFunction]",Oh="[object Proxy]";Ae=Th});var Ah,po,Vs=p(()=>{"use strict";ct();Ah=L["__core-js_shared__"],po=Ah});function Ph(r){return!!Js&&Js in r}var Js,Ys,Zs=p(()=>{"use strict";Vs();Js=function(){var r=/[^.]+$/.exec(po&&po.keys&&po.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();Ys=Ph});function Dh(r){if(r!=null){try{return Rh.call(r)}catch(t){}try{return r+""}catch(t){}}return""}var _h,Rh,Rt,Ai=p(()=>{"use strict";_h=Function.prototype,Rh=_h.toString;Rt=Dh});function Wh(r){if(!z(r)||Ys(r))return!1;var t=Ae(r)?jh:Ih;return t.test(Rt(r))}var Mh,Ih,Lh,Fh,Nh,Bh,jh,Xs,tn=p(()=>{"use strict";uo();Zs();_t();Ai();Mh=/[\\^$.*+?()[\]{}|]/g,Ih=/^\[object .+?Constructor\]$/,Lh=Function.prototype,Fh=Object.prototype,Nh=Lh.toString,Bh=Fh.hasOwnProperty,jh=RegExp("^"+Nh.call(Bh).replace(Mh,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");Xs=Wh});function Uh(r,t){return r==null?void 0:r[t]}var en,rn=p(()=>{"use strict";en=Uh});function $h(r,t){var e=en(r,t);return Xs(e)?e:void 0}var tt,$t=p(()=>{"use strict";tn();rn();tt=$h});var Gh,ho,on=p(()=>{"use strict";$t();ct();Gh=tt(L,"WeakMap"),ho=Gh});var sn,Hh,nn,an=p(()=>{"use strict";_t();sn=Object.create,Hh=function(){function r(){}return function(t){if(!z(t))return{};if(sn)return sn(t);r.prototype=t;var e=new r;return r.prototype=void 0,e}}(),nn=Hh});function qh(r,t,e){switch(e.length){case 0:return r.call(t);case 1:return r.call(t,e[0]);case 2:return r.call(t,e[0],e[1]);case 3:return r.call(t,e[0],e[1],e[2])}return r.apply(t,e)}var fn,ln=p(()=>{"use strict";fn=qh});function zh(r,t){var e=-1,o=r.length;for(t||(t=Array(o));++e<o;)t[e]=r[e];return t}var un,pn=p(()=>{"use strict";un=zh});function Jh(r){var t=0,e=0;return function(){var o=Vh(),i=Qh-(o-e);if(e=o,i>0){if(++t>=Kh)return arguments[0]}else t=0;return r.apply(void 0,arguments)}}var Kh,Qh,Vh,hn,cn=p(()=>{"use strict";Kh=800,Qh=16,Vh=Date.now;hn=Jh});function Yh(r){return function(){return r}}var mn,dn=p(()=>{"use strict";mn=Yh});var Zh,Pe,Pi=p(()=>{"use strict";$t();Zh=function(){try{var r=tt(Object,"defineProperty");return r({},"",{}),r}catch(t){}}(),Pe=Zh});var Xh,gn,xn=p(()=>{"use strict";dn();Pi();lo();Xh=Pe?function(r,t){return Pe(r,"toString",{configurable:!0,enumerable:!1,value:mn(t),writable:!0})}:Te,gn=Xh});var tc,yn,wn=p(()=>{"use strict";xn();cn();tc=hn(gn),yn=tc});function oc(r,t){var e=typeof r;return t=t==null?ec:t,!!t&&(e=="number"||e!="symbol"&&rc.test(r))&&r>-1&&r%1==0&&r<t}var ec,rc,_e,co=p(()=>{"use strict";ec=9007199254740991,rc=/^(?:0|[1-9]\d*)$/;_e=oc});function ic(r,t,e){t=="__proto__"&&Pe?Pe(r,t,{configurable:!0,enumerable:!0,value:e,writable:!0}):r[t]=e}var Gt,ar=p(()=>{"use strict";Pi();Gt=ic});function sc(r,t){return r===t||r!==r&&t!==t}var St,Re=p(()=>{"use strict";St=sc});function fc(r,t,e){var o=r[t];(!(ac.call(r,t)&&St(o,e))||e===void 0&&!(t in r))&&Gt(r,t,e)}var nc,ac,bn,Sn=p(()=>{"use strict";ar();Re();nc=Object.prototype,ac=nc.hasOwnProperty;bn=fc});function lc(r,t,e,o){var i=!e;e||(e={});for(var s=-1,n=t.length;++s<n;){var f=t[s],l=o?o(e[f],r[f],f,e,r):void 0;l===void 0&&(l=r[f]),i?Gt(e,f,l):bn(e,f,l)}return e}var vn,Cn=p(()=>{"use strict";Sn();ar();vn=lc});function uc(r,t,e){return t=En(t===void 0?r.length-1:t,0),function(){for(var o=arguments,i=-1,s=En(o.length-t,0),n=Array(s);++i<s;)n[i]=o[t+i];i=-1;for(var f=Array(t+1);++i<t;)f[i]=o[i];return f[t]=e(n),fn(r,this,f)}}var En,kn,On=p(()=>{"use strict";ln();En=Math.max;kn=uc});function pc(r,t){return yn(kn(r,t,Te),r+"")}var Tn,An=p(()=>{"use strict";lo();On();wn();Tn=pc});function cc(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=hc}var hc,De,mo=p(()=>{"use strict";hc=9007199254740991;De=cc});function mc(r){return r!=null&&De(r.length)&&!Ae(r)}var vt,Me=p(()=>{"use strict";uo();mo();vt=mc});function dc(r,t,e){if(!z(e))return!1;var o=typeof t;return(o=="number"?vt(e)&&_e(t,e.length):o=="string"&&t in e)?St(e[t],r):!1}var Pn,_n=p(()=>{"use strict";Re();Me();co();_t();Pn=dc});function gc(r){return Tn(function(t,e){var o=-1,i=e.length,s=i>1?e[i-1]:void 0,n=i>2?e[2]:void 0;for(s=r.length>3&&typeof s=="function"?(i--,s):void 0,n&&Pn(e[0],e[1],n)&&(s=i<3?void 0:s,i=1),t=Object(t);++o<i;){var f=e[o];f&&r(t,f,o,s)}return t})}var Rn,Dn=p(()=>{"use strict";An();_n();Rn=gc});function yc(r){var t=r&&r.constructor,e=typeof t=="function"&&t.prototype||xc;return r===e}var xc,Ie,go=p(()=>{"use strict";xc=Object.prototype;Ie=yc});function wc(r,t){for(var e=-1,o=Array(r);++e<r;)o[e]=t(e);return o}var Mn,In=p(()=>{"use strict";Mn=wc});function Sc(r){return V(r)&&et(r)==bc}var bc,_i,Ln=p(()=>{"use strict";le();Ut();bc="[object Arguments]";_i=Sc});var Fn,vc,Cc,Ec,ue,xo=p(()=>{"use strict";Ln();Ut();Fn=Object.prototype,vc=Fn.hasOwnProperty,Cc=Fn.propertyIsEnumerable,Ec=_i(function(){return arguments}())?_i:function(r){return V(r)&&vc.call(r,"callee")&&!Cc.call(r,"callee")},ue=Ec});function kc(){return!1}var Nn,Bn=p(()=>{"use strict";Nn=kc});var Un,jn,Oc,Wn,Tc,Ac,pe,yo=p(()=>{"use strict";ct();Bn();Un=typeof exports=="object"&&exports&&!exports.nodeType&&exports,jn=Un&&typeof module=="object"&&module&&!module.nodeType&&module,Oc=jn&&jn.exports===Un,Wn=Oc?L.Buffer:void 0,Tc=Wn?Wn.isBuffer:void 0,Ac=Tc||Nn,pe=Ac});function Xc(r){return V(r)&&De(r.length)&&!!P[et(r)]}var Pc,_c,Rc,Dc,Mc,Ic,Lc,Fc,Nc,Bc,jc,Wc,Uc,$c,Gc,Hc,qc,zc,Kc,Qc,Vc,Jc,Yc,Zc,P,$n,Gn=p(()=>{"use strict";le();mo();Ut();Pc="[object Arguments]",_c="[object Array]",Rc="[object Boolean]",Dc="[object Date]",Mc="[object Error]",Ic="[object Function]",Lc="[object Map]",Fc="[object Number]",Nc="[object Object]",Bc="[object RegExp]",jc="[object Set]",Wc="[object String]",Uc="[object WeakMap]",$c="[object ArrayBuffer]",Gc="[object DataView]",Hc="[object Float32Array]",qc="[object Float64Array]",zc="[object Int8Array]",Kc="[object Int16Array]",Qc="[object Int32Array]",Vc="[object Uint8Array]",Jc="[object Uint8ClampedArray]",Yc="[object Uint16Array]",Zc="[object Uint32Array]",P={};P[Hc]=P[qc]=P[zc]=P[Kc]=P[Qc]=P[Vc]=P[Jc]=P[Yc]=P[Zc]=!0;P[Pc]=P[_c]=P[$c]=P[Rc]=P[Gc]=P[Dc]=P[Mc]=P[Ic]=P[Lc]=P[Fc]=P[Nc]=P[Bc]=P[jc]=P[Wc]=P[Uc]=!1;$n=Xc});function tm(r){return function(t){return r(t)}}var Hn,qn=p(()=>{"use strict";Hn=tm});var zn,fr,em,Ri,rm,Di,Kn=p(()=>{"use strict";Ti();zn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,fr=zn&&typeof module=="object"&&module&&!module.nodeType&&module,em=fr&&fr.exports===zn,Ri=em&&ao.process,rm=function(){try{var r=fr&&fr.require&&fr.require("util").types;return r||Ri&&Ri.binding&&Ri.binding("util")}catch(t){}}(),Di=rm});var Qn,om,Le,wo=p(()=>{"use strict";Gn();qn();Kn();Qn=Di&&Di.isTypedArray,om=Qn?Hn(Qn):$n,Le=om});function nm(r,t){var e=D(r),o=!e&&ue(r),i=!e&&!o&&pe(r),s=!e&&!o&&!i&&Le(r),n=e||o||i||s,f=n?Mn(r.length,String):[],l=f.length;for(var u in r)(t||sm.call(r,u))&&!(n&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||_e(u,l)))&&f.push(u);return f}var im,sm,bo,Mi=p(()=>{"use strict";In();xo();mt();yo();co();wo();im=Object.prototype,sm=im.hasOwnProperty;bo=nm});function am(r,t){return function(e){return r(t(e))}}var So,Ii=p(()=>{"use strict";So=am});var fm,Vn,Jn=p(()=>{"use strict";Ii();fm=So(Object.keys,Object),Vn=fm});function pm(r){if(!Ie(r))return Vn(r);var t=[];for(var e in Object(r))um.call(r,e)&&e!="constructor"&&t.push(e);return t}var lm,um,Yn,Zn=p(()=>{"use strict";go();Jn();lm=Object.prototype,um=lm.hasOwnProperty;Yn=pm});function hm(r){return vt(r)?bo(r):Yn(r)}var Fe,vo=p(()=>{"use strict";Mi();Zn();Me();Fe=hm});function cm(r){var t=[];if(r!=null)for(var e in Object(r))t.push(e);return t}var Xn,ta=p(()=>{"use strict";Xn=cm});function gm(r){if(!z(r))return Xn(r);var t=Ie(r),e=[];for(var o in r)o=="constructor"&&(t||!dm.call(r,o))||e.push(o);return e}var mm,dm,ea,ra=p(()=>{"use strict";_t();go();ta();mm=Object.prototype,dm=mm.hasOwnProperty;ea=gm});function xm(r){return vt(r)?bo(r,!0):ea(r)}var Co,Li=p(()=>{"use strict";Mi();ra();Me();Co=xm});function bm(r,t){if(D(r))return!1;var e=typeof r;return e=="number"||e=="symbol"||e=="boolean"||r==null||Oe(r)?!0:wm.test(r)||!ym.test(r)||t!=null&&r in Object(t)}var ym,wm,Ne,Eo=p(()=>{"use strict";mt();fo();ym=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wm=/^\w*$/;Ne=bm});var Sm,Dt,lr=p(()=>{"use strict";$t();Sm=tt(Object,"create"),Dt=Sm});function vm(){this.__data__=Dt?Dt(null):{},this.size=0}var oa,ia=p(()=>{"use strict";lr();oa=vm});function Cm(r){var t=this.has(r)&&delete this.__data__[r];return this.size-=t?1:0,t}var sa,na=p(()=>{"use strict";sa=Cm});function Tm(r){var t=this.__data__;if(Dt){var e=t[r];return e===Em?void 0:e}return Om.call(t,r)?t[r]:void 0}var Em,km,Om,aa,fa=p(()=>{"use strict";lr();Em="__lodash_hash_undefined__",km=Object.prototype,Om=km.hasOwnProperty;aa=Tm});function _m(r){var t=this.__data__;return Dt?t[r]!==void 0:Pm.call(t,r)}var Am,Pm,la,ua=p(()=>{"use strict";lr();Am=Object.prototype,Pm=Am.hasOwnProperty;la=_m});function Dm(r,t){var e=this.__data__;return this.size+=this.has(r)?0:1,e[r]=Dt&&t===void 0?Rm:t,this}var Rm,pa,ha=p(()=>{"use strict";lr();Rm="__lodash_hash_undefined__";pa=Dm});function Be(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var o=r[t];this.set(o[0],o[1])}}var Fi,ca=p(()=>{"use strict";ia();na();fa();ua();ha();Be.prototype.clear=oa;Be.prototype.delete=sa;Be.prototype.get=aa;Be.prototype.has=la;Be.prototype.set=pa;Fi=Be});function Mm(){this.__data__=[],this.size=0}var ma,da=p(()=>{"use strict";ma=Mm});function Im(r,t){for(var e=r.length;e--;)if(St(r[e][0],t))return e;return-1}var Ht,ur=p(()=>{"use strict";Re();Ht=Im});function Nm(r){var t=this.__data__,e=Ht(t,r);if(e<0)return!1;var o=t.length-1;return e==o?t.pop():Fm.call(t,e,1),--this.size,!0}var Lm,Fm,ga,xa=p(()=>{"use strict";ur();Lm=Array.prototype,Fm=Lm.splice;ga=Nm});function Bm(r){var t=this.__data__,e=Ht(t,r);return e<0?void 0:t[e][1]}var ya,wa=p(()=>{"use strict";ur();ya=Bm});function jm(r){return Ht(this.__data__,r)>-1}var ba,Sa=p(()=>{"use strict";ur();ba=jm});function Wm(r,t){var e=this.__data__,o=Ht(e,r);return o<0?(++this.size,e.push([r,t])):e[o][1]=t,this}var va,Ca=p(()=>{"use strict";ur();va=Wm});function je(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var o=r[t];this.set(o[0],o[1])}}var qt,pr=p(()=>{"use strict";da();xa();wa();Sa();Ca();je.prototype.clear=ma;je.prototype.delete=ga;je.prototype.get=ya;je.prototype.has=ba;je.prototype.set=va;qt=je});var Um,zt,ko=p(()=>{"use strict";$t();ct();Um=tt(L,"Map"),zt=Um});function $m(){this.size=0,this.__data__={hash:new Fi,map:new(zt||qt),string:new Fi}}var Ea,ka=p(()=>{"use strict";ca();pr();ko();Ea=$m});function Gm(r){var t=typeof r;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?r!=="__proto__":r===null}var Oa,Ta=p(()=>{"use strict";Oa=Gm});function Hm(r,t){var e=r.__data__;return Oa(t)?e[typeof t=="string"?"string":"hash"]:e.map}var Kt,hr=p(()=>{"use strict";Ta();Kt=Hm});function qm(r){var t=Kt(this,r).delete(r);return this.size-=t?1:0,t}var Aa,Pa=p(()=>{"use strict";hr();Aa=qm});function zm(r){return Kt(this,r).get(r)}var _a,Ra=p(()=>{"use strict";hr();_a=zm});function Km(r){return Kt(this,r).has(r)}var Da,Ma=p(()=>{"use strict";hr();Da=Km});function Qm(r,t){var e=Kt(this,r),o=e.size;return e.set(r,t),this.size+=e.size==o?0:1,this}var Ia,La=p(()=>{"use strict";hr();Ia=Qm});function We(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var o=r[t];this.set(o[0],o[1])}}var he,Oo=p(()=>{"use strict";ka();Pa();Ra();Ma();La();We.prototype.clear=Ea;We.prototype.delete=Aa;We.prototype.get=_a;We.prototype.has=Da;We.prototype.set=Ia;he=We});function Ni(r,t){if(typeof r!="function"||t!=null&&typeof t!="function")throw new TypeError(Vm);var e=function(){var o=arguments,i=t?t.apply(this,o):o[0],s=e.cache;if(s.has(i))return s.get(i);var n=r.apply(this,o);return e.cache=s.set(i,n)||s,n};return e.cache=new(Ni.Cache||he),e}var Vm,ft,Bi=p(()=>{"use strict";Oo();Vm="Expected a function";Ni.Cache=he;ft=Ni});function Ym(r){var t=ft(r,function(o){return e.size===Jm&&e.clear(),o}),e=t.cache;return t}var Jm,Fa,Na=p(()=>{"use strict";Bi();Jm=500;Fa=Ym});var Zm,Xm,td,Ba,ja=p(()=>{"use strict";Na();Zm=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Xm=/\\(\\)?/g,td=Fa(function(r){var t=[];return r.charCodeAt(0)===46&&t.push(""),r.replace(Zm,function(e,o,i,s){t.push(i?s.replace(Xm,"$1"):o||e)}),t}),Ba=td});function ed(r){return r==null?"":Ks(r)}var Wa,Ua=p(()=>{"use strict";Qs();Wa=ed});function rd(r,t){return D(r)?r:Ne(r,t)?[r]:Ba(Wa(r))}var To,ji=p(()=>{"use strict";mt();Eo();ja();Ua();To=rd});function id(r){if(typeof r=="string"||Oe(r))return r;var t=r+"";return t=="0"&&1/r==-od?"-0":t}var od,Qt,cr=p(()=>{"use strict";fo();od=1/0;Qt=id});function sd(r,t){t=To(t,r);for(var e=0,o=t.length;r!=null&&e<o;)r=r[Qt(t[e++])];return e&&e==o?r:void 0}var Ao,Wi=p(()=>{"use strict";ji();cr();Ao=sd});function nd(r,t,e){var o=r==null?void 0:Ao(r,t);return o===void 0?e:o}var $a,Ga=p(()=>{"use strict";Wi();$a=nd});function ad(r,t){for(var e=-1,o=t.length,i=r.length;++e<o;)r[i+e]=t[e];return r}var Ha,qa=p(()=>{"use strict";Ha=ad});var fd,Po,Ui=p(()=>{"use strict";Ii();fd=So(Object.getPrototypeOf,Object),Po=fd});function md(r){if(!V(r)||et(r)!=ld)return!1;var t=Po(r);if(t===null)return!0;var e=hd.call(t,"constructor")&&t.constructor;return typeof e=="function"&&e instanceof e&&za.call(e)==cd}var ld,ud,pd,za,hd,cd,Ka,Qa=p(()=>{"use strict";le();Ui();Ut();ld="[object Object]",ud=Function.prototype,pd=Object.prototype,za=ud.toString,hd=pd.hasOwnProperty,cd=za.call(Object);Ka=md});function dd(){this.__data__=new qt,this.size=0}var Va,Ja=p(()=>{"use strict";pr();Va=dd});function gd(r){var t=this.__data__,e=t.delete(r);return this.size=t.size,e}var Ya,Za=p(()=>{"use strict";Ya=gd});function xd(r){return this.__data__.get(r)}var Xa,tf=p(()=>{"use strict";Xa=xd});function yd(r){return this.__data__.has(r)}var ef,rf=p(()=>{"use strict";ef=yd});function bd(r,t){var e=this.__data__;if(e instanceof qt){var o=e.__data__;if(!zt||o.length<wd-1)return o.push([r,t]),this.size=++e.size,this;e=this.__data__=new he(o)}return e.set(r,t),this.size=e.size,this}var wd,of,sf=p(()=>{"use strict";pr();ko();Oo();wd=200;of=bd});function Ue(r){var t=this.__data__=new qt(r);this.size=t.size}var Vt,_o=p(()=>{"use strict";pr();Ja();Za();tf();rf();sf();Ue.prototype.clear=Va;Ue.prototype.delete=Ya;Ue.prototype.get=Xa;Ue.prototype.has=ef;Ue.prototype.set=of;Vt=Ue});function vd(r,t){if(t)return r.slice();var e=r.length,o=ff?ff(e):new r.constructor(e);return r.copy(o),o}var lf,nf,Sd,af,ff,uf,pf=p(()=>{"use strict";ct();lf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,nf=lf&&typeof module=="object"&&module&&!module.nodeType&&module,Sd=nf&&nf.exports===lf,af=Sd?L.Buffer:void 0,ff=af?af.allocUnsafe:void 0;uf=vd});function Cd(r,t){for(var e=-1,o=r==null?0:r.length,i=0,s=[];++e<o;){var n=r[e];t(n,e,r)&&(s[i++]=n)}return s}var hf,cf=p(()=>{"use strict";hf=Cd});function Ed(){return[]}var mf,df=p(()=>{"use strict";mf=Ed});var kd,Od,gf,Td,xf,yf=p(()=>{"use strict";cf();df();kd=Object.prototype,Od=kd.propertyIsEnumerable,gf=Object.getOwnPropertySymbols,Td=gf?function(r){return r==null?[]:(r=Object(r),hf(gf(r),function(t){return Od.call(r,t)}))}:mf,xf=Td});function Ad(r,t,e){var o=t(r);return D(r)?o:Ha(o,e(r))}var wf,bf=p(()=>{"use strict";qa();mt();wf=Ad});function Pd(r){return wf(r,Fe,xf)}var $i,Sf=p(()=>{"use strict";bf();yf();vo();$i=Pd});var _d,Ro,vf=p(()=>{"use strict";$t();ct();_d=tt(L,"DataView"),Ro=_d});var Rd,Do,Cf=p(()=>{"use strict";$t();ct();Rd=tt(L,"Promise"),Do=Rd});var Dd,Mo,Ef=p(()=>{"use strict";$t();ct();Dd=tt(L,"Set"),Mo=Dd});var kf,Md,Of,Tf,Af,Pf,Id,Ld,Fd,Nd,Bd,ce,Gi,_f=p(()=>{"use strict";vf();ko();Cf();Ef();on();le();Ai();kf="[object Map]",Md="[object Object]",Of="[object Promise]",Tf="[object Set]",Af="[object WeakMap]",Pf="[object DataView]",Id=Rt(Ro),Ld=Rt(zt),Fd=Rt(Do),Nd=Rt(Mo),Bd=Rt(ho),ce=et;(Ro&&ce(new Ro(new ArrayBuffer(1)))!=Pf||zt&&ce(new zt)!=kf||Do&&ce(Do.resolve())!=Of||Mo&&ce(new Mo)!=Tf||ho&&ce(new ho)!=Af)&&(ce=function(r){var t=et(r),e=t==Md?r.constructor:void 0,o=e?Rt(e):"";if(o)switch(o){case Id:return Pf;case Ld:return kf;case Fd:return Of;case Nd:return Tf;case Bd:return Af}return t});Gi=ce});var jd,$e,Hi=p(()=>{"use strict";ct();jd=L.Uint8Array,$e=jd});function Wd(r){var t=new r.constructor(r.byteLength);return new $e(t).set(new $e(r)),t}var Rf,Df=p(()=>{"use strict";Hi();Rf=Wd});function Ud(r,t){var e=t?Rf(r.buffer):r.buffer;return new r.constructor(e,r.byteOffset,r.length)}var Mf,If=p(()=>{"use strict";Df();Mf=Ud});function $d(r){return typeof r.constructor=="function"&&!Ie(r)?nn(Po(r)):{}}var Lf,Ff=p(()=>{"use strict";an();Ui();go();Lf=$d});function Hd(r){return this.__data__.set(r,Gd),this}var Gd,Nf,Bf=p(()=>{"use strict";Gd="__lodash_hash_undefined__";Nf=Hd});function qd(r){return this.__data__.has(r)}var jf,Wf=p(()=>{"use strict";jf=qd});function Io(r){var t=-1,e=r==null?0:r.length;for(this.__data__=new he;++t<e;)this.add(r[t])}var Uf,$f=p(()=>{"use strict";Oo();Bf();Wf();Io.prototype.add=Io.prototype.push=Nf;Io.prototype.has=jf;Uf=Io});function zd(r,t){for(var e=-1,o=r==null?0:r.length;++e<o;)if(t(r[e],e,r))return!0;return!1}var Gf,Hf=p(()=>{"use strict";Gf=zd});function Kd(r,t){return r.has(t)}var qf,zf=p(()=>{"use strict";qf=Kd});function Jd(r,t,e,o,i,s){var n=e&Qd,f=r.length,l=t.length;if(f!=l&&!(n&&l>f))return!1;var u=s.get(r),h=s.get(t);if(u&&h)return u==t&&h==r;var d=-1,m=!0,y=e&Vd?new Uf:void 0;for(s.set(r,t),s.set(t,r);++d<f;){var b=r[d],x=t[d];if(o)var C=n?o(x,b,d,t,r,s):o(b,x,d,r,t,s);if(C!==void 0){if(C)continue;m=!1;break}if(y){if(!Gf(t,function(E,T){if(!qf(y,T)&&(b===E||i(b,E,e,o,s)))return y.push(T)})){m=!1;break}}else if(!(b===x||i(b,x,e,o,s))){m=!1;break}}return s.delete(r),s.delete(t),m}var Qd,Vd,Lo,qi=p(()=>{"use strict";$f();Hf();zf();Qd=1,Vd=2;Lo=Jd});function Yd(r){var t=-1,e=Array(r.size);return r.forEach(function(o,i){e[++t]=[i,o]}),e}var Kf,Qf=p(()=>{"use strict";Kf=Yd});function Zd(r){var t=-1,e=Array(r.size);return r.forEach(function(o){e[++t]=o}),e}var Vf,Jf=p(()=>{"use strict";Vf=Zd});function hg(r,t,e,o,i,s,n){switch(e){case pg:if(r.byteLength!=t.byteLength||r.byteOffset!=t.byteOffset)return!1;r=r.buffer,t=t.buffer;case ug:return!(r.byteLength!=t.byteLength||!s(new $e(r),new $e(t)));case eg:case rg:case sg:return St(+r,+t);case og:return r.name==t.name&&r.message==t.message;case ng:case fg:return r==t+"";case ig:var f=Kf;case ag:var l=o&Xd;if(f||(f=Vf),r.size!=t.size&&!l)return!1;var u=n.get(r);if(u)return u==t;o|=tg,n.set(r,t);var h=Lo(f(r),f(t),o,i,s,n);return n.delete(r),h;case lg:if(zi)return zi.call(r)==zi.call(t)}return!1}var Xd,tg,eg,rg,og,ig,sg,ng,ag,fg,lg,ug,pg,Yf,zi,Zf,Xf=p(()=>{"use strict";sr();Hi();Re();qi();Qf();Jf();Xd=1,tg=2,eg="[object Boolean]",rg="[object Date]",og="[object Error]",ig="[object Map]",sg="[object Number]",ng="[object RegExp]",ag="[object Set]",fg="[object String]",lg="[object Symbol]",ug="[object ArrayBuffer]",pg="[object DataView]",Yf=at?at.prototype:void 0,zi=Yf?Yf.valueOf:void 0;Zf=hg});function gg(r,t,e,o,i,s){var n=e&cg,f=$i(r),l=f.length,u=$i(t),h=u.length;if(l!=h&&!n)return!1;for(var d=l;d--;){var m=f[d];if(!(n?m in t:dg.call(t,m)))return!1}var y=s.get(r),b=s.get(t);if(y&&b)return y==t&&b==r;var x=!0;s.set(r,t),s.set(t,r);for(var C=n;++d<l;){m=f[d];var E=r[m],T=t[m];if(o)var A=n?o(T,E,m,t,r,s):o(E,T,m,r,t,s);if(!(A===void 0?E===T||i(E,T,e,o,s):A)){x=!1;break}C||(C=m=="constructor")}if(x&&!C){var _=r.constructor,N=t.constructor;_!=N&&"constructor"in r&&"constructor"in t&&!(typeof _=="function"&&_ instanceof _&&typeof N=="function"&&N instanceof N)&&(x=!1)}return s.delete(r),s.delete(t),x}var cg,mg,dg,tl,el=p(()=>{"use strict";Sf();cg=1,mg=Object.prototype,dg=mg.hasOwnProperty;tl=gg});function wg(r,t,e,o,i,s){var n=D(r),f=D(t),l=n?ol:Gi(r),u=f?ol:Gi(t);l=l==rl?Fo:l,u=u==rl?Fo:u;var h=l==Fo,d=u==Fo,m=l==u;if(m&&pe(r)){if(!pe(t))return!1;n=!0,h=!1}if(m&&!h)return s||(s=new Vt),n||Le(r)?Lo(r,t,e,o,i,s):Zf(r,t,l,e,o,i,s);if(!(e&xg)){var y=h&&il.call(r,"__wrapped__"),b=d&&il.call(t,"__wrapped__");if(y||b){var x=y?r.value():r,C=b?t.value():t;return s||(s=new Vt),i(x,C,e,o,s)}}return m?(s||(s=new Vt),tl(r,t,e,o,i,s)):!1}var xg,rl,ol,Fo,yg,il,sl,nl=p(()=>{"use strict";_o();qi();Xf();el();_f();mt();yo();wo();xg=1,rl="[object Arguments]",ol="[object Array]",Fo="[object Object]",yg=Object.prototype,il=yg.hasOwnProperty;sl=wg});function al(r,t,e,o,i){return r===t?!0:r==null||t==null||!V(r)&&!V(t)?r!==r&&t!==t:sl(r,t,e,o,al,i)}var No,Ki=p(()=>{"use strict";nl();Ut();No=al});function vg(r,t,e,o){var i=e.length,s=i,n=!o;if(r==null)return!s;for(r=Object(r);i--;){var f=e[i];if(n&&f[2]?f[1]!==r[f[0]]:!(f[0]in r))return!1}for(;++i<s;){f=e[i];var l=f[0],u=r[l],h=f[1];if(n&&f[2]){if(u===void 0&&!(l in r))return!1}else{var d=new Vt;if(o)var m=o(u,h,l,r,t,d);if(!(m===void 0?No(h,u,bg|Sg,o,d):m))return!1}}return!0}var bg,Sg,fl,ll=p(()=>{"use strict";_o();Ki();bg=1,Sg=2;fl=vg});function Cg(r){return r===r&&!z(r)}var Bo,Qi=p(()=>{"use strict";_t();Bo=Cg});function Eg(r){for(var t=Fe(r),e=t.length;e--;){var o=t[e],i=r[o];t[e]=[o,i,Bo(i)]}return t}var ul,pl=p(()=>{"use strict";Qi();vo();ul=Eg});function kg(r,t){return function(e){return e==null?!1:e[r]===t&&(t!==void 0||r in Object(e))}}var jo,Vi=p(()=>{"use strict";jo=kg});function Og(r){var t=ul(r);return t.length==1&&t[0][2]?jo(t[0][0],t[0][1]):function(e){return e===r||fl(e,r,t)}}var hl,cl=p(()=>{"use strict";ll();pl();Vi();hl=Og});function Tg(r,t){return r!=null&&t in Object(r)}var ml,dl=p(()=>{"use strict";ml=Tg});function Ag(r,t,e){t=To(t,r);for(var o=-1,i=t.length,s=!1;++o<i;){var n=Qt(t[o]);if(!(s=r!=null&&e(r,n)))break;r=r[n]}return s||++o!=i?s:(i=r==null?0:r.length,!!i&&De(i)&&_e(n,i)&&(D(r)||ue(r)))}var gl,xl=p(()=>{"use strict";ji();xo();mt();co();mo();cr();gl=Ag});function Pg(r,t){return r!=null&&gl(r,t,ml)}var yl,wl=p(()=>{"use strict";dl();xl();yl=Pg});function Dg(r,t){return Ne(r)&&Bo(t)?jo(Qt(r),t):function(e){var o=$a(e,r);return o===void 0&&o===t?yl(e,r):No(t,o,_g|Rg)}}var _g,Rg,bl,Sl=p(()=>{"use strict";Ki();Ga();wl();Eo();Qi();Vi();cr();_g=1,Rg=2;bl=Dg});function Mg(r){return function(t){return t==null?void 0:t[r]}}var vl,Cl=p(()=>{"use strict";vl=Mg});function Ig(r){return function(t){return Ao(t,r)}}var El,kl=p(()=>{"use strict";Wi();El=Ig});function Lg(r){return Ne(r)?vl(Qt(r)):El(r)}var Ol,Tl=p(()=>{"use strict";Cl();kl();Eo();cr();Ol=Lg});function Fg(r){return typeof r=="function"?r:r==null?Te:typeof r=="object"?D(r)?bl(r[0],r[1]):hl(r):Ol(r)}var Al,Pl=p(()=>{"use strict";cl();Sl();lo();mt();Tl();Al=Fg});function Ng(r,t,e,o){for(var i=-1,s=r==null?0:r.length;++i<s;){var n=r[i];t(o,n,e(n),r)}return o}var _l,Rl=p(()=>{"use strict";_l=Ng});function Bg(r){return function(t,e,o){for(var i=-1,s=Object(t),n=o(t),f=n.length;f--;){var l=n[r?f:++i];if(e(s[l],l,s)===!1)break}return t}}var Dl,Ml=p(()=>{"use strict";Dl=Bg});var jg,Wo,Ji=p(()=>{"use strict";Ml();jg=Dl(),Wo=jg});function Wg(r,t){return r&&Wo(r,t,Fe)}var Il,Ll=p(()=>{"use strict";Ji();vo();Il=Wg});function Ug(r,t){return function(e,o){if(e==null)return e;if(!vt(e))return r(e,o);for(var i=e.length,s=t?i:-1,n=Object(e);(t?s--:++s<i)&&o(n[s],s,n)!==!1;);return e}}var Fl,Nl=p(()=>{"use strict";Me();Fl=Ug});var $g,Bl,jl=p(()=>{"use strict";Ll();Nl();$g=Fl(Il),Bl=$g});function Gg(r,t,e,o){return Bl(r,function(i,s,n){t(o,i,e(i),n)}),o}var Wl,Ul=p(()=>{"use strict";jl();Wl=Gg});function Hg(r,t){return function(e,o){var i=D(e)?_l:Wl,s=t?t():{};return i(e,r,Al(o,2),s)}}var $l,Gl=p(()=>{"use strict";Rl();Ul();Pl();mt();$l=Hg});function qg(r,t,e){(e!==void 0&&!St(r[t],e)||e===void 0&&!(t in r))&&Gt(r,t,e)}var mr,Yi=p(()=>{"use strict";ar();Re();mr=qg});function zg(r){return V(r)&&vt(r)}var Hl,ql=p(()=>{"use strict";Me();Ut();Hl=zg});function Kg(r,t){if(!(t==="constructor"&&typeof r[t]=="function")&&t!="__proto__")return r[t]}var dr,Zi=p(()=>{"use strict";dr=Kg});function Qg(r){return vn(r,Co(r))}var zl,Kl=p(()=>{"use strict";Cn();Li();zl=Qg});function Vg(r,t,e,o,i,s,n){var f=dr(r,e),l=dr(t,e),u=n.get(l);if(u){mr(r,e,u);return}var h=s?s(f,l,e+"",r,t,n):void 0,d=h===void 0;if(d){var m=D(l),y=!m&&pe(l),b=!m&&!y&&Le(l);h=l,m||y||b?D(f)?h=f:Hl(f)?h=un(f):y?(d=!1,h=uf(l,!0)):b?(d=!1,h=Mf(l,!0)):h=[]:Ka(l)||ue(l)?(h=f,ue(f)?h=zl(f):(!z(f)||Ae(f))&&(h=Lf(l))):d=!1}d&&(n.set(l,h),i(h,l,o,s,n),n.delete(l)),mr(r,e,h)}var Ql,Vl=p(()=>{"use strict";Yi();pf();If();pn();Ff();xo();mt();ql();yo();uo();_t();Qa();wo();Zi();Kl();Ql=Vg});function Jl(r,t,e,o,i){r!==t&&Wo(t,function(s,n){if(i||(i=new Vt),z(s))Ql(r,t,n,e,Jl,o,i);else{var f=o?o(dr(r,n),s,n+"",r,t,i):void 0;f===void 0&&(f=s),mr(r,n,f)}},Co)}var Yl,Zl=p(()=>{"use strict";_o();Yi();Ji();Vl();_t();Li();Zi();Yl=Jl});var Jg,Yg,Zg,gr,Xl=p(()=>{"use strict";ar();Gl();Jg=Object.prototype,Yg=Jg.hasOwnProperty,Zg=$l(function(r,t,e){Yg.call(r,e)?r[e].push(t):Gt(r,e,[t])}),gr=Zg});var Xg,Xi,tu=p(()=>{"use strict";Zl();Dn();Xg=Rn(function(r,t,e){Yl(r,t,e)}),Xi=Xg});var Jt=p(()=>{"use strict";Xl();Bi();tu();});var hu=Rs((Jk,pu)=>{"use strict";pu.exports=lu;function lu(r,t,e){r instanceof RegExp&&(r=fu(r,e)),t instanceof RegExp&&(t=fu(t,e));var o=uu(r,t,e);return o&&{start:o[0],end:o[1],pre:e.slice(0,o[0]),body:e.slice(o[0]+r.length,o[1]),post:e.slice(o[1]+t.length)}}function fu(r,t){var e=t.match(r);return e?e[0]:null}lu.range=uu;function uu(r,t,e){var o,i,s,n,f,l=e.indexOf(r),u=e.indexOf(t,l+1),h=l;if(l>=0&&u>0){if(r===t)return[l,u];for(o=[],s=e.length;h>=0&&!f;)h==l?(o.push(h),l=e.indexOf(r,h+1)):o.length==1?f=[o.pop(),u]:(i=o.pop(),i<s&&(s=i,n=u),u=e.indexOf(t,h+1)),h=l<u&&l>=0?l:u;o.length&&(f=[s,n])}return f}});var bu=Rs((Yk,wu)=>{"use strict";var cu=hu();wu.exports=fx;var mu="\0SLASH"+Math.random()+"\0",du="\0OPEN"+Math.random()+"\0",es="\0CLOSE"+Math.random()+"\0",gu="\0COMMA"+Math.random()+"\0",xu="\0PERIOD"+Math.random()+"\0";function ts(r){return parseInt(r,10)==r?parseInt(r,10):r.charCodeAt(0)}function nx(r){return r.split("\\\\").join(mu).split("\\{").join(du).split("\\}").join(es).split("\\,").join(gu).split("\\.").join(xu)}function ax(r){return r.split(mu).join("\\").split(du).join("{").split(es).join("}").split(gu).join(",").split(xu).join(".")}function yu(r){if(!r)return[""];var t=[],e=cu("{","}",r);if(!e)return r.split(",");var o=e.pre,i=e.body,s=e.post,n=o.split(",");n[n.length-1]+="{"+i+"}";var f=yu(s);return s.length&&(n[n.length-1]+=f.shift(),n.push.apply(n,f)),t.push.apply(t,n),t}function fx(r){return r?(r.substr(0,2)==="{}"&&(r="\\{\\}"+r.substr(2)),xr(nx(r),!0).map(ax)):[]}function lx(r){return"{"+r+"}"}function ux(r){return/^-?0\d/.test(r)}function px(r,t){return r<=t}function hx(r,t){return r>=t}function xr(r,t){var e=[],o=cu("{","}",r);if(!o)return[r];var i=o.pre,s=o.post.length?xr(o.post,!1):[""];if(/\$$/.test(o.pre))for(var n=0;n<s.length;n++){var f=i+"{"+o.body+"}"+s[n];e.push(f)}else{var l=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),h=l||u,d=o.body.indexOf(",")>=0;if(!h&&!d)return o.post.match(/,.*\}/)?(r=o.pre+"{"+o.body+es+o.post,xr(r)):[r];var m;if(h)m=o.body.split(/\.\./);else if(m=yu(o.body),m.length===1&&(m=xr(m[0],!1).map(lx),m.length===1))return s.map(function(qp){return o.pre+m[0]+qp});var y;if(h){var b=ts(m[0]),x=ts(m[1]),C=Math.max(m[0].length,m[1].length),E=m.length==3?Math.abs(ts(m[2])):1,T=px,A=x<b;A&&(E*=-1,T=hx);var _=m.some(ux);y=[];for(var N=b;T(N,x);N+=E){var st;if(u)st=String.fromCharCode(N),st==="\\"&&(st="");else if(st=String(N),_){var As=C-st.length;if(As>0){var Ps=new Array(As+1).join("0");N<0?st="-"+Ps+st.slice(1):st=Ps+st}}y.push(st)}}else{y=[];for(var fe=0;fe<m.length;fe++)y.push.apply(y,xr(m[fe],!1))}for(var fe=0;fe<y.length;fe++)for(var n=0;n<s.length;n++){var f=i+y[fe]+s[n];(!t||h||f)&&e.push(f)}}return e}});function Cy(r,t){if(r instanceof ae)throw I("Command execution failed",r,{command:r.command,originalError:r.originalError}),r;if(r instanceof Error){let o=new ae(r.message,t,r);throw I("Failed to execute command",r,{command:t,stack:r.stack}),o}let e=new ae("Unknown error occurred during command execution",t);throw I("Failed to execute command",null,{error:r,command:t}),e}async function Mp(r,t={}){if(!r||typeof r!="string")throw new ae("Command must be a non-empty string",r);let e={encoding:"utf8",maxBuffer:5*1024*1024,timeout:3e4};try{let{stdout:o,stderr:i}=await vy(r,{...e,...t}),s=o.trim();if(!s)throw i?new ae(`Command failed with stderr: ${i}`,r):new ae("Command returned empty result",r);return s}catch(o){Cy(o,r)}}var Rp,Dp,vy,ae,Ip=p(()=>{"use strict";Rp=require("child_process"),Dp=require("util");Pt();vy=(0,Dp.promisify)(Rp.exec),ae=class extends Error{constructor(e,o,i){super(e);this.command=o;this.originalError=i;this.name="CommandExecutionError"}}});var Lp={};Zp(Lp,{getChromePassword:()=>ky});var Ey,ky,Fp=p(()=>{"use strict";Jt();Ip();Ey=async()=>Mp('security find-generic-password -w -s "Chrome Safe Storage"'),ky=ft(Ey)});function th(r){let t=r.split("."),e=[];e.push({name:"%",domain:r});for(let o=1;o<t.length-1;o++){let i=t.slice(o).join(".");e.push({name:"%",domain:i})}return e}function Oi(r){if(!r.includes("://"))try{return Oi(`https://${r}`)}catch(t){return[{name:"%",domain:r}]}try{let t=new URL(r);return th(t.hostname)}catch(t){return[{name:"%",domain:r}]}}var Ds=ke(require("minimist"),1);function Ms(r){let t=(0,Ds.default)(r,{string:["browser","profile","url","domain","name","output"],boolean:["help","version","verbose","dump","dump-grouped","render","render-grouped"],alias:{b:"browser",p:"profile",u:"url",d:"domain",n:"name",h:"help",v:"version",D:"dump-grouped",r:"render",R:"render-grouped"}}),{_:e,...o}=t;return{values:o,positionals:e}}nt();Pt();var su=require("fs"),Go=require("path"),nu=ke(require("fast-glob"),1);Pt();var ou=require("path");Jt();var eu={};Xi(eu,process.env);var Uo=eu.HOME;if(typeof Uo!="string"||Uo.length===0)throw new Error("HOME environment variable is not set or empty");var ru,Ge=(0,ou.join)((ru=Uo)!=null?ru:"","Library","Application Support","Google","Chrome");var iu=ke(require("better-sqlite3"),1);Jt();Pt();var tx=ft(r=>{try{return Promise.resolve(new iu.default(r,{readonly:!0}))}catch(t){throw I("Database open failed",t,{file:r}),t}});function ex(r){try{return r.close(),Promise.resolve()}catch(t){return I("Database close failed",t),Promise.reject(t instanceof Error?t:new Error("Failed to close database: Unknown error"))}}async function $o({file:r,sql:t,params:e,rowFilter:o,rowTransform:i}){let s;try{s=await tx(r);let f=s.prepare(t).all(e),l=o?f.filter(o):f;return i?l.map(i):l}catch(n){throw I("Database query failed",n,{file:r,sql:t}),n}finally{s&&await ex(s)}}function rx(r){if(typeof r!="string")return!1;let t=r.trim();return t.length===0?!1:(0,su.existsSync)(t)}async function ox(){let r=[(0,Go.join)(Ge,"Default/Cookies"),(0,Go.join)(Ge,"Profile */Cookies"),(0,Go.join)(Ge,"Profile Default/Cookies")],t=[];for(let e of r){let o=await(0,nu.default)(e);t.push(...o)}return bt("ChromeCookies","Found cookie files",{count:t.length,files:t}),t}function ix(r,t){let e=r==="%",o=e?"SELECT name, encrypted_value, host_key, expires_utc FROM cookies WHERE host_key LIKE ?":"SELECT name, encrypted_value, host_key, expires_utc FROM cookies WHERE name = ? AND host_key LIKE ?",i=e?[`%${t}%`]:[r,`%${t}%`];return{sql:o,params:i}}async function sx(r,t,e){try{let{sql:o,params:i}=ix(t,e);bt("ChromeCookies","Executing query",{sql:o,params:i});let s=await $o({file:r,sql:o,params:i,rowTransform:n=>({name:n.name,domain:n.host_key,value:n.encrypted_value,expiry:n.expires_utc})});return Ls("QueryCookies",!0,{file:r,count:s.length}),s}catch(o){return I("Failed to read cookie file",o,{file:r}),[]}}async function au({name:r,domain:t,file:e}){let o=typeof e=="string"&&e.length>0?[e]:await ox();if(o.length===0)return bt("ChromeCookies","No cookie files found"),[];let i=[];for(let s of o){if(!rx(s)){bt("ChromeCookies","Cookie file missing or invalid",{file:s});continue}let n=await sx(s,r,t);i.push(...n)}return bt("ChromeCookies","Query complete",{totalCookies:i.length}),i}var _u=ke(bu(),1);var yr=r=>{if(typeof r!="string")throw new TypeError("invalid pattern");if(r.length>65536)throw new TypeError("pattern is too long")};var cx={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},wr=r=>r.replace(/[[\]\\-]/g,"\\$&"),mx=r=>r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Su=r=>r.join(""),vu=(r,t)=>{let e=t;if(r.charAt(e)!=="[")throw new Error("not in a brace expression");let o=[],i=[],s=e+1,n=!1,f=!1,l=!1,u=!1,h=e,d="";t:for(;s<r.length;){let x=r.charAt(s);if((x==="!"||x==="^")&&s===e+1){u=!0,s++;continue}if(x==="]"&&n&&!l){h=s+1;break}if(n=!0,x==="\\"&&!l){l=!0,s++;continue}if(x==="["&&!l){for(let[C,[E,T,A]]of Object.entries(cx))if(r.startsWith(C,s)){if(d)return["$.",!1,r.length-e,!0];s+=C.length,A?i.push(E):o.push(E),f=f||T;continue t}}if(l=!1,d){x>d?o.push(wr(d)+"-"+wr(x)):x===d&&o.push(wr(x)),d="",s++;continue}if(r.startsWith("-]",s+1)){o.push(wr(x+"-")),s+=2;continue}if(r.startsWith("-",s+1)){d=x,s+=2;continue}o.push(wr(x)),s++}if(h<s)return["",!1,0,!1];if(!o.length&&!i.length)return["$.",!1,r.length-e,!0];if(i.length===0&&o.length===1&&/^\\?.$/.test(o[0])&&!u){let x=o[0].length===2?o[0].slice(-1):o[0];return[mx(x),!1,h-e,!1]}let m="["+(u?"^":"")+Su(o)+"]",y="["+(u?"":"^")+Su(i)+"]";return[o.length&&i.length?"("+m+"|"+y+")":o.length?m:y,f,h-e,!0]};var dt=(r,{windowsPathsNoEscape:t=!1}={})=>t?r.replace(/\[([^\/\\])\]/g,"$1"):r.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var dx=new Set(["!","?","+","*","@"]),Cu=r=>dx.has(r),gx="(?!(?:^|/)\\.\\.?(?:$|/))",Ho="(?!\\.)",xx=new Set(["[","."]),yx=new Set(["..","."]),wx=new Set("().*{}+?[]^$\\!"),bx=r=>r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),os="[^/]",Eu=os+"*?",ku=os+"+?",B,W,Mt,R,F,Yt,me,Zt,Ct,de,br,ge,Ou,Xt,qo,rs,Tu,J=class J{constructor(t,e,o={}){w(this,ge);c(this,"type");w(this,B);w(this,W);w(this,Mt,!1);w(this,R,[]);w(this,F);w(this,Yt);w(this,me);w(this,Zt,!1);w(this,Ct);w(this,de);w(this,br,!1);this.type=t,t&&g(this,W,!0),g(this,F,e),g(this,B,a(this,F)?a(a(this,F),B):this),g(this,Ct,a(this,B)===this?o:a(a(this,B),Ct)),g(this,me,a(this,B)===this?[]:a(a(this,B),me)),t==="!"&&!a(a(this,B),Zt)&&a(this,me).push(this),g(this,Yt,a(this,F)?a(a(this,F),R).length:0)}get hasMagic(){if(a(this,W)!==void 0)return a(this,W);for(let t of a(this,R))if(typeof t!="string"&&(t.type||t.hasMagic))return g(this,W,!0);return a(this,W)}toString(){return a(this,de)!==void 0?a(this,de):this.type?g(this,de,this.type+"("+a(this,R).map(t=>String(t)).join("|")+")"):g(this,de,a(this,R).map(t=>String(t)).join(""))}push(...t){for(let e of t)if(e!==""){if(typeof e!="string"&&!(e instanceof J&&a(e,F)===this))throw new Error("invalid part: "+e);a(this,R).push(e)}}toJSON(){var e;let t=this.type===null?a(this,R).slice().map(o=>typeof o=="string"?o:o.toJSON()):[this.type,...a(this,R).map(o=>o.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===a(this,B)||a(a(this,B),Zt)&&((e=a(this,F))==null?void 0:e.type)==="!")&&t.push({}),t}isStart(){var e;if(a(this,B)===this)return!0;if(!((e=a(this,F))!=null&&e.isStart()))return!1;if(a(this,Yt)===0)return!0;let t=a(this,F);for(let o=0;o<a(this,Yt);o++){let i=a(t,R)[o];if(!(i instanceof J&&i.type==="!"))return!1}return!0}isEnd(){var e,o,i;if(a(this,B)===this||((e=a(this,F))==null?void 0:e.type)==="!")return!0;if(!((o=a(this,F))!=null&&o.isEnd()))return!1;if(!this.type)return(i=a(this,F))==null?void 0:i.isEnd();let t=a(this,F)?a(a(this,F),R).length:0;return a(this,Yt)===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let e=new J(this.type,t);for(let o of a(this,R))e.copyIn(o);return e}static fromGlob(t,e={}){var i;let o=new J(null,void 0,e);return S(i=J,Xt,qo).call(i,t,o,0,e),o}toMMPattern(){if(this!==a(this,B))return a(this,B).toMMPattern();let t=this.toString(),[e,o,i,s]=this.toRegExpSource();if(!(i||a(this,W)||a(this,Ct).nocase&&!a(this,Ct).nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return o;let f=(a(this,Ct).nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${e}$`,f),{_src:e,_glob:t})}get options(){return a(this,Ct)}toRegExpSource(t){var l;let e=t!=null?t:!!a(this,Ct).dot;if(a(this,B)===this&&S(this,ge,Ou).call(this),!this.type){let u=this.isStart()&&this.isEnd(),h=a(this,R).map(b=>{var A;let[x,C,E,T]=typeof b=="string"?S(A=J,Xt,Tu).call(A,b,a(this,W),u):b.toRegExpSource(t);return g(this,W,a(this,W)||E),g(this,Mt,a(this,Mt)||T),x}).join(""),d="";if(this.isStart()&&typeof a(this,R)[0]=="string"&&!(a(this,R).length===1&&yx.has(a(this,R)[0]))){let x=xx,C=e&&x.has(h.charAt(0))||h.startsWith("\\.")&&x.has(h.charAt(2))||h.startsWith("\\.\\.")&&x.has(h.charAt(4)),E=!e&&!t&&x.has(h.charAt(0));d=C?gx:E?Ho:""}let m="";return this.isEnd()&&a(a(this,B),Zt)&&((l=a(this,F))==null?void 0:l.type)==="!"&&(m="(?:$|\\/)"),[d+h+m,dt(h),g(this,W,!!a(this,W)),a(this,Mt)]}let o=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",s=S(this,ge,rs).call(this,e);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let u=this.toString();return g(this,R,[u]),this.type=null,g(this,W,void 0),[u,dt(this.toString()),!1,!1]}let n=!o||t||e||!Ho?"":S(this,ge,rs).call(this,!0);n===s&&(n=""),n&&(s=`(?:${s})(?:${n})*?`);let f="";if(this.type==="!"&&a(this,br))f=(this.isStart()&&!e?Ho:"")+ku;else{let u=this.type==="!"?"))"+(this.isStart()&&!e&&!t?Ho:"")+Eu+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&n?")":this.type==="*"&&n?")?":`)${this.type}`;f=i+s+u}return[f,dt(s),g(this,W,!!a(this,W)),a(this,Mt)]}};B=new WeakMap,W=new WeakMap,Mt=new WeakMap,R=new WeakMap,F=new WeakMap,Yt=new WeakMap,me=new WeakMap,Zt=new WeakMap,Ct=new WeakMap,de=new WeakMap,br=new WeakMap,ge=new WeakSet,Ou=function(){if(this!==a(this,B))throw new Error("should only call on root");if(a(this,Zt))return this;this.toString(),g(this,Zt,!0);let t;for(;t=a(this,me).pop();){if(t.type!=="!")continue;let e=t,o=a(e,F);for(;o;){for(let i=a(e,Yt)+1;!o.type&&i<a(o,R).length;i++)for(let s of a(t,R)){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(a(o,R)[i])}e=o,o=a(e,F)}}return this},Xt=new WeakSet,qo=function(t,e,o,i){var y,b;let s=!1,n=!1,f=-1,l=!1;if(e.type===null){let x=o,C="";for(;x<t.length;){let E=t.charAt(x++);if(s||E==="\\"){s=!s,C+=E;continue}if(n){x===f+1?(E==="^"||E==="!")&&(l=!0):E==="]"&&!(x===f+2&&l)&&(n=!1),C+=E;continue}else if(E==="["){n=!0,f=x,l=!1,C+=E;continue}if(!i.noext&&Cu(E)&&t.charAt(x)==="("){e.push(C),C="";let T=new J(E,e);x=S(y=J,Xt,qo).call(y,t,T,x,i),e.push(T);continue}C+=E}return e.push(C),x}let u=o+1,h=new J(null,e),d=[],m="";for(;u<t.length;){let x=t.charAt(u++);if(s||x==="\\"){s=!s,m+=x;continue}if(n){u===f+1?(x==="^"||x==="!")&&(l=!0):x==="]"&&!(u===f+2&&l)&&(n=!1),m+=x;continue}else if(x==="["){n=!0,f=u,l=!1,m+=x;continue}if(Cu(x)&&t.charAt(u)==="("){h.push(m),m="";let C=new J(x,h);h.push(C),u=S(b=J,Xt,qo).call(b,t,C,u,i);continue}if(x==="|"){h.push(m),m="",d.push(h),h=new J(null,e);continue}if(x===")")return m===""&&a(e,R).length===0&&g(e,br,!0),h.push(m),m="",e.push(...d,h),u;m+=x}return e.type=null,g(e,W,void 0),g(e,R,[t.substring(o-1)]),u},rs=function(t){return a(this,R).map(e=>{if(typeof e=="string")throw new Error("string type in extglob ast??");let[o,i,s,n]=e.toRegExpSource(t);return g(this,Mt,a(this,Mt)||n),o}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join("|")},Tu=function(t,e,o=!1){let i=!1,s="",n=!1;for(let f=0;f<t.length;f++){let l=t.charAt(f);if(i){i=!1,s+=(wx.has(l)?"\\":"")+l;continue}if(l==="\\"){f===t.length-1?s+="\\\\":i=!0;continue}if(l==="["){let[u,h,d,m]=vu(t,f);if(d){s+=u,n=n||h,f+=d-1,e=e||m;continue}}if(l==="*"){o&&t==="*"?s+=ku:s+=Eu,e=!0;continue}if(l==="?"){s+=os,e=!0;continue}s+=bx(l)}return[s,dt(t),!!e,n]},w(J,Xt);var He=J;var qe=(r,{windowsPathsNoEscape:t=!1}={})=>t?r.replace(/[?*()[\]]/g,"[$&]"):r.replace(/[?*()[\]\\]/g,"\\$&");var Y=(r,t,e={})=>(yr(t),!e.nocomment&&t.charAt(0)==="#"?!1:new rt(t,e).match(r)),Sx=/^\*+([^+@!?\*\[\(]*)$/,vx=r=>t=>!t.startsWith(".")&&t.endsWith(r),Cx=r=>t=>t.endsWith(r),Ex=r=>(r=r.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(r)),kx=r=>(r=r.toLowerCase(),t=>t.toLowerCase().endsWith(r)),Ox=/^\*+\.\*+$/,Tx=r=>!r.startsWith(".")&&r.includes("."),Ax=r=>r!=="."&&r!==".."&&r.includes("."),Px=/^\.\*+$/,_x=r=>r!=="."&&r!==".."&&r.startsWith("."),Rx=/^\*+$/,Dx=r=>r.length!==0&&!r.startsWith("."),Mx=r=>r.length!==0&&r!=="."&&r!=="..",Ix=/^\?+([^+@!?\*\[\(]*)?$/,Lx=([r,t=""])=>{let e=Ru([r]);return t?(t=t.toLowerCase(),o=>e(o)&&o.toLowerCase().endsWith(t)):e},Fx=([r,t=""])=>{let e=Du([r]);return t?(t=t.toLowerCase(),o=>e(o)&&o.toLowerCase().endsWith(t)):e},Nx=([r,t=""])=>{let e=Du([r]);return t?o=>e(o)&&o.endsWith(t):e},Bx=([r,t=""])=>{let e=Ru([r]);return t?o=>e(o)&&o.endsWith(t):e},Ru=([r])=>{let t=r.length;return e=>e.length===t&&!e.startsWith(".")},Du=([r])=>{let t=r.length;return e=>e.length===t&&e!=="."&&e!==".."},Mu=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Au={win32:{sep:"\\"},posix:{sep:"/"}},jx=Mu==="win32"?Au.win32.sep:Au.posix.sep;Y.sep=jx;var q=Symbol("globstar **");Y.GLOBSTAR=q;var Wx="[^/]",Ux=Wx+"*?",$x="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Gx="(?:(?!(?:\\/|^)\\.).)*?",Hx=(r,t={})=>e=>Y(e,r,t);Y.filter=Hx;var lt=(r,t={})=>Object.assign({},r,t),qx=r=>{if(!r||typeof r!="object"||!Object.keys(r).length)return Y;let t=Y;return Object.assign((o,i,s={})=>t(o,i,lt(r,s)),{Minimatch:class extends t.Minimatch{constructor(i,s={}){super(i,lt(r,s))}static defaults(i){return t.defaults(lt(r,i)).Minimatch}},AST:class extends t.AST{constructor(i,s,n={}){super(i,s,lt(r,n))}static fromGlob(i,s={}){return t.AST.fromGlob(i,lt(r,s))}},unescape:(o,i={})=>t.unescape(o,lt(r,i)),escape:(o,i={})=>t.escape(o,lt(r,i)),filter:(o,i={})=>t.filter(o,lt(r,i)),defaults:o=>t.defaults(lt(r,o)),makeRe:(o,i={})=>t.makeRe(o,lt(r,i)),braceExpand:(o,i={})=>t.braceExpand(o,lt(r,i)),match:(o,i,s={})=>t.match(o,i,lt(r,s)),sep:t.sep,GLOBSTAR:q})};Y.defaults=qx;var Iu=(r,t={})=>(yr(r),t.nobrace||!/\{(?:(?!\{).)*\}/.test(r)?[r]:(0,_u.default)(r));Y.braceExpand=Iu;var zx=(r,t={})=>new rt(r,t).makeRe();Y.makeRe=zx;var Kx=(r,t,e={})=>{let o=new rt(t,e);return r=r.filter(i=>o.match(i)),o.options.nonull&&!r.length&&r.push(t),r};Y.match=Kx;var Pu=/[?*]|[+@!]\(.*?\)|\[|\]/,Qx=r=>r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),rt=class{constructor(t,e={}){c(this,"options");c(this,"set");c(this,"pattern");c(this,"windowsPathsNoEscape");c(this,"nonegate");c(this,"negate");c(this,"comment");c(this,"empty");c(this,"preserveMultipleSlashes");c(this,"partial");c(this,"globSet");c(this,"globParts");c(this,"nocase");c(this,"isWindows");c(this,"platform");c(this,"windowsNoMagicRoot");c(this,"regexp");yr(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||Mu,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=e.windowsNoMagicRoot!==void 0?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let e of t)if(typeof e!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let o=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(o),this.debug(this.pattern,this.globParts);let i=this.globParts.map((s,n,f)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=s[0]===""&&s[1]===""&&(s[2]==="?"||!Pu.test(s[2]))&&!Pu.test(s[3]),u=/^[a-z]:/i.test(s[0]);if(l)return[...s.slice(0,4),...s.slice(4).map(h=>this.parse(h))];if(u)return[s[0],...s.slice(1).map(h=>this.parse(h))]}return s.map(l=>this.parse(l))});if(this.debug(this.pattern,i),this.set=i.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s<this.set.length;s++){let n=this.set[s];n[0]===""&&n[1]===""&&this.globParts[s][2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3])&&(n[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let o=0;o<t.length;o++)for(let i=0;i<t[o].length;i++)t[o][i]==="**"&&(t[o][i]="*");let{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):e>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(e=>{let o=-1;for(;(o=e.indexOf("**",o+1))!==-1;){let i=o;for(;e[i+1]==="**";)i++;i!==o&&e.splice(o,i-o)}return e})}levelOneOptimize(t){return t.map(e=>(e=e.reduce((o,i)=>{let s=o[o.length-1];return i==="**"&&s==="**"?o:i===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(o.pop(),o):(o.push(i),o)},[]),e.length===0?[""]:e))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let i=1;i<t.length-1;i++){let s=t[i];i===1&&s===""&&t[0]===""||(s==="."||s==="")&&(e=!0,t.splice(i,1),i--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(e=!0,t.pop())}let o=0;for(;(o=t.indexOf("..",o+1))!==-1;){let i=t[o-1];i&&i!=="."&&i!==".."&&i!=="**"&&(e=!0,t.splice(o-1,2),o-=2)}}while(e);return t.length===0?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let o of t){let i=-1;for(;(i=o.indexOf("**",i+1))!==-1;){let n=i;for(;o[n+1]==="**";)n++;n>i&&o.splice(i+1,n-i);let f=o[i+1],l=o[i+2],u=o[i+3];if(f!==".."||!l||l==="."||l===".."||!u||u==="."||u==="..")continue;e=!0,o.splice(i,1);let h=o.slice(0);h[i]="**",t.push(h),i--}if(!this.preserveMultipleSlashes){for(let n=1;n<o.length-1;n++){let f=o[n];n===1&&f===""&&o[0]===""||(f==="."||f==="")&&(e=!0,o.splice(n,1),n--)}o[0]==="."&&o.length===2&&(o[1]==="."||o[1]==="")&&(e=!0,o.pop())}let s=0;for(;(s=o.indexOf("..",s+1))!==-1;){let n=o[s-1];if(n&&n!=="."&&n!==".."&&n!=="**"){e=!0;let l=s===1&&o[s+1]==="**"?["."]:[];o.splice(s-1,2,...l),o.length===0&&o.push(""),s-=2}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let o=e+1;o<t.length;o++){let i=this.partsMatch(t[e],t[o],!this.preserveMultipleSlashes);if(i){t[e]=[],t[o]=i;break}}return t.filter(e=>e.length)}partsMatch(t,e,o=!1){let i=0,s=0,n=[],f="";for(;i<t.length&&s<e.length;)if(t[i]===e[s])n.push(f==="b"?e[s]:t[i]),i++,s++;else if(o&&t[i]==="**"&&e[s]===t[i+1])n.push(t[i]),i++;else if(o&&e[s]==="**"&&t[i]===e[s+1])n.push(e[s]),s++;else if(t[i]==="*"&&e[s]&&(this.options.dot||!e[s].startsWith("."))&&e[s]!=="**"){if(f==="b")return!1;f="a",n.push(t[i]),i++,s++}else if(e[s]==="*"&&t[i]&&(this.options.dot||!t[i].startsWith("."))&&t[i]!=="**"){if(f==="a")return!1;f="b",n.push(e[s]),i++,s++}else return!1;return t.length===e.length&&n}parseNegate(){if(this.nonegate)return;let t=this.pattern,e=!1,o=0;for(let i=0;i<t.length&&t.charAt(i)==="!";i++)e=!e,o++;o&&(this.pattern=t.slice(o)),this.negate=e}matchOne(t,e,o=!1){let i=this.options;if(this.isWindows){let x=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),C=!x&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),E=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),T=!E&&e[0]===""&&e[1]===""&&e[2]==="?"&&typeof e[3]=="string"&&/^[a-z]:$/i.test(e[3]),A=C?3:x?0:void 0,_=T?3:E?0:void 0;if(typeof A=="number"&&typeof _=="number"){let[N,st]=[t[A],e[_]];N.toLowerCase()===st.toLowerCase()&&(e[_]=N,_>A?e=e.slice(_):A>_&&(t=t.slice(A)))}}let{optimizationLevel:s=1}=this.options;s>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var n=0,f=0,l=t.length,u=e.length;n<l&&f<u;n++,f++){this.debug("matchOne loop");var h=e[f],d=t[n];if(this.debug(e,h,d),h===!1)return!1;if(h===q){this.debug("GLOBSTAR",[e,h,d]);var m=n,y=f+1;if(y===u){for(this.debug("** at the end");n<l;n++)if(t[n]==="."||t[n]===".."||!i.dot&&t[n].charAt(0)===".")return!1;return!0}for(;m<l;){var b=t[m];if(this.debug(`
3
3
  globstar while`,t,m,e,y,b),this.matchOne(t.slice(m),e.slice(y),o))return this.debug("globstar found match!",m,l,b),!0;if(b==="."||b===".."||!i.dot&&b.charAt(0)==="."){this.debug("dot detected!",t,m,e,y);break}this.debug("globstar swallow a segment, and continue"),m++}return!!(o&&(this.debug(`
4
- >>> no match, partial?`,t,m,e,y),m===l))}let x;if(typeof h=="string"?(x=d===h,this.debug("string match",h,d,x)):(x=h.test(d),this.debug("pattern match",h,d,x)),!x)return!1}if(n===l&&f===u)return!0;if(n===l)return o;if(f===u)return n===l-1&&t[n]==="";throw new Error("wtf?")}braceExpand(){return Au(this.pattern,this.options)}parse(t){xr(t);let e=this.options;if(t==="**")return z;if(t==="")return"";let o,i=null;(o=t.match(Cx))?i=e.dot?kx:Ex:(o=t.match(cx))?i=(e.nocase?e.dot?xx:gx:e.dot?dx:mx)(o[1]):(o=t.match(Ox))?i=(e.nocase?e.dot?Ax:Tx:e.dot?Px:Rx)(o):(o=t.match(yx))?i=e.dot?bx:wx:(o=t.match(Sx))&&(i=vx);let s=qe.fromGlob(t,this.options).toMMPattern();return i&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:i}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let e=this.options,o=e.noglobstar?Mx:e.dot?Ix:Lx,i=new Set(e.nocase?["i"]:[]),s=t.map(l=>{let u=l.map(h=>{if(h instanceof RegExp)for(let d of h.flags.split(""))i.add(d);return typeof h=="string"?Wx(h):h===z?z:h._src});return u.forEach((h,d)=>{let m=u[d+1],y=u[d-1];h!==z||y===z||(y===void 0?m!==void 0&&m!==z?u[d+1]="(?:\\/|"+o+"\\/)?"+m:u[d]=o:m===void 0?u[d-1]=y+"(?:\\/|"+o+")?":m!==z&&(u[d-1]=y+"(?:\\/|\\/"+o+"\\/)"+m,u[d+1]=z))}),u.filter(h=>h!==z).join("/")}).join("|"),[n,f]=t.length>1?["(?:",")"]:["",""];s="^"+n+s+f+"$",this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...i].join(""))}catch(l){this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&e)return!0;let o=this.options;this.isWindows&&(t=t.split("\\").join("/"));let i=this.slashSplit(t);this.debug(this.pattern,"split",i);let s=this.set;this.debug(this.pattern,"set",s);let n=i[i.length-1];if(!n)for(let f=i.length-2;!n&&f>=0;f--)n=i[f];for(let f=0;f<s.length;f++){let l=s[f],u=i;if(o.matchBase&&l.length===1&&(u=[n]),this.matchOne(u,l,e))return o.flipNegate?!0:!this.negate}return o.flipNegate?!1:this.negate}static defaults(t){return Y.defaults(t).Minimatch}};Y.AST=qe;Y.Minimatch=rt;Y.escape=ze;Y.unescape=mt;var xp=require("url");var hs=require("lru-cache"),Ze=require("path"),op=require("url"),Tt=require("fs"),Vx=ke(require("fs"),1),ee=require("fs/promises");var Zo=require("events"),rs=ke(require("stream"),1),Zu=require("string_decoder");var Pu=typeof process=="object"&&process?process:{stdout:null,stderr:null},$x=r=>!!r&&typeof r=="object"&&(r instanceof Xt||r instanceof rs.default||Ux(r)||Gx(r)),Ux=r=>!!r&&typeof r=="object"&&r instanceof Zo.EventEmitter&&typeof r.pipe=="function"&&r.pipe!==rs.default.Writable.prototype.pipe,Gx=r=>!!r&&typeof r=="object"&&r instanceof Zo.EventEmitter&&typeof r.write=="function"&&typeof r.end=="function",Dt=Symbol("EOF"),Mt=Symbol("maybeEmitEnd"),Zt=Symbol("emittedEnd"),Ho=Symbol("emittingEnd"),br=Symbol("emittedError"),Ko=Symbol("closed"),Ru=Symbol("read"),Qo=Symbol("flush"),_u=Symbol("flushChunk"),dt=Symbol("encoding"),He=Symbol("decoder"),$=Symbol("flowing"),Sr=Symbol("paused"),Ke=Symbol("resume"),U=Symbol("buffer"),Z=Symbol("pipes"),G=Symbol("bufferLength"),Vi=Symbol("bufferPush"),Jo=Symbol("bufferShift"),K=Symbol("objectMode"),M=Symbol("destroyed"),Yi=Symbol("error"),Zi=Symbol("emitData"),Du=Symbol("emitEnd"),Xi=Symbol("emitEnd2"),Ct=Symbol("async"),ts=Symbol("abort"),Vo=Symbol("aborted"),vr=Symbol("signal"),xe=Symbol("dataListeners"),ot=Symbol("discarded"),Cr=r=>Promise.resolve().then(r),qx=r=>r(),zx=r=>r==="end"||r==="finish"||r==="prefinish",Hx=r=>r instanceof ArrayBuffer||!!r&&typeof r=="object"&&r.constructor&&r.constructor.name==="ArrayBuffer"&&r.byteLength>=0,Kx=r=>!Buffer.isBuffer(r)&&ArrayBuffer.isView(r),Yo=class{constructor(t,e,o){c(this,"src");c(this,"dest");c(this,"opts");c(this,"ondrain");this.src=t,this.dest=e,this.opts=o,this.ondrain=()=>t[Ke](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},es=class extends Yo{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,e,o){super(t,e,o),this.proxyErrors=i=>e.emit("error",i),t.on("error",this.proxyErrors)}},Qx=r=>!!r.objectMode,Jx=r=>!r.objectMode&&!!r.encoding&&r.encoding!=="buffer",Mu,Iu,Lu,Nu,Fu,Bu,ju,Wu,$u,Uu,Gu,qu,zu,Hu,Ku,Qu,Ju,Vu,Yu,Xt=class extends Zo.EventEmitter{constructor(...e){let o=e[0]||{};super();c(this,Yu,!1);c(this,Vu,!1);c(this,Ju,[]);c(this,Qu,[]);c(this,Ku);c(this,Hu);c(this,zu);c(this,qu);c(this,Gu,!1);c(this,Uu,!1);c(this,$u,!1);c(this,Wu,!1);c(this,ju,null);c(this,Bu,0);c(this,Fu,!1);c(this,Nu);c(this,Lu,!1);c(this,Iu,0);c(this,Mu,!1);c(this,"writable",!0);c(this,"readable",!0);if(o.objectMode&&typeof o.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");Qx(o)?(this[K]=!0,this[dt]=null):Jx(o)?(this[dt]=o.encoding,this[K]=!1):(this[K]=!1,this[dt]=null),this[Ct]=!!o.async,this[He]=this[dt]?new Zu.StringDecoder(this[dt]):null,o&&o.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[U]}),o&&o.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[Z]});let{signal:i}=o;i&&(this[vr]=i,i.aborted?this[ts]():i.addEventListener("abort",()=>this[ts]()))}get bufferLength(){return this[G]}get encoding(){return this[dt]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[K]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[Ct]}set async(e){this[Ct]=this[Ct]||!!e}[(Yu=$,Vu=Sr,Ju=Z,Qu=U,Ku=K,Hu=dt,zu=Ct,qu=He,Gu=Dt,Uu=Zt,$u=Ho,Wu=Ko,ju=br,Bu=G,Fu=M,Nu=vr,Lu=Vo,Iu=xe,Mu=ot,ts)](){var e,o;this[Vo]=!0,this.emit("abort",(e=this[vr])==null?void 0:e.reason),this.destroy((o=this[vr])==null?void 0:o.reason)}get aborted(){return this[Vo]}set aborted(e){}write(e,o,i){var n;if(this[Vo])return!1;if(this[Dt])throw new Error("write after end");if(this[M])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof o=="function"&&(i=o,o="utf8"),o||(o="utf8");let s=this[Ct]?Cr:qx;if(!this[K]&&!Buffer.isBuffer(e)){if(Kx(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(Hx(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[K]?(this[$]&&this[G]!==0&&this[Qo](!0),this[$]?this.emit("data",e):this[Vi](e),this[G]!==0&&this.emit("readable"),i&&s(i),this[$]):e.length?(typeof e=="string"&&!(o===this[dt]&&!((n=this[He])!=null&&n.lastNeed))&&(e=Buffer.from(e,o)),Buffer.isBuffer(e)&&this[dt]&&(e=this[He].write(e)),this[$]&&this[G]!==0&&this[Qo](!0),this[$]?this.emit("data",e):this[Vi](e),this[G]!==0&&this.emit("readable"),i&&s(i),this[$]):(this[G]!==0&&this.emit("readable"),i&&s(i),this[$])}read(e){if(this[M])return null;if(this[ot]=!1,this[G]===0||e===0||e&&e>this[G])return this[Mt](),null;this[K]&&(e=null),this[U].length>1&&!this[K]&&(this[U]=[this[dt]?this[U].join(""):Buffer.concat(this[U],this[G])]);let o=this[Ru](e||null,this[U][0]);return this[Mt](),o}[Ru](e,o){if(this[K])this[Jo]();else{let i=o;e===i.length||e===null?this[Jo]():typeof i=="string"?(this[U][0]=i.slice(e),o=i.slice(0,e),this[G]-=e):(this[U][0]=i.subarray(e),o=i.subarray(0,e),this[G]-=e)}return this.emit("data",o),!this[U].length&&!this[Dt]&&this.emit("drain"),o}end(e,o,i){return typeof e=="function"&&(i=e,e=void 0),typeof o=="function"&&(i=o,o="utf8"),e!==void 0&&this.write(e,o),i&&this.once("end",i),this[Dt]=!0,this.writable=!1,(this[$]||!this[Sr])&&this[Mt](),this}[Ke](){this[M]||(!this[xe]&&!this[Z].length&&(this[ot]=!0),this[Sr]=!1,this[$]=!0,this.emit("resume"),this[U].length?this[Qo]():this[Dt]?this[Mt]():this.emit("drain"))}resume(){return this[Ke]()}pause(){this[$]=!1,this[Sr]=!0,this[ot]=!1}get destroyed(){return this[M]}get flowing(){return this[$]}get paused(){return this[Sr]}[Vi](e){this[K]?this[G]+=1:this[G]+=e.length,this[U].push(e)}[Jo](){return this[K]?this[G]-=1:this[G]-=this[U][0].length,this[U].shift()}[Qo](e=!1){do;while(this[_u](this[Jo]())&&this[U].length);!e&&!this[U].length&&!this[Dt]&&this.emit("drain")}[_u](e){return this.emit("data",e),this[$]}pipe(e,o){if(this[M])return e;this[ot]=!1;let i=this[Zt];return o=o||{},e===Pu.stdout||e===Pu.stderr?o.end=!1:o.end=o.end!==!1,o.proxyErrors=!!o.proxyErrors,i?o.end&&e.end():(this[Z].push(o.proxyErrors?new es(this,e,o):new Yo(this,e,o)),this[Ct]?Cr(()=>this[Ke]()):this[Ke]()),e}unpipe(e){let o=this[Z].find(i=>i.dest===e);o&&(this[Z].length===1?(this[$]&&this[xe]===0&&(this[$]=!1),this[Z]=[]):this[Z].splice(this[Z].indexOf(o),1),o.unpipe())}addListener(e,o){return this.on(e,o)}on(e,o){let i=super.on(e,o);if(e==="data")this[ot]=!1,this[xe]++,!this[Z].length&&!this[$]&&this[Ke]();else if(e==="readable"&&this[G]!==0)super.emit("readable");else if(zx(e)&&this[Zt])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[br]){let s=o;this[Ct]?Cr(()=>s.call(this,this[br])):s.call(this,this[br])}return i}removeListener(e,o){return this.off(e,o)}off(e,o){let i=super.off(e,o);return e==="data"&&(this[xe]=this.listeners("data").length,this[xe]===0&&!this[ot]&&!this[Z].length&&(this[$]=!1)),i}removeAllListeners(e){let o=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[xe]=0,!this[ot]&&!this[Z].length&&(this[$]=!1)),o}get emittedEnd(){return this[Zt]}[Mt](){!this[Ho]&&!this[Zt]&&!this[M]&&this[U].length===0&&this[Dt]&&(this[Ho]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Ko]&&this.emit("close"),this[Ho]=!1)}emit(e,...o){let i=o[0];if(e!=="error"&&e!=="close"&&e!==M&&this[M])return!1;if(e==="data")return!this[K]&&!i?!1:this[Ct]?(Cr(()=>this[Zi](i)),!0):this[Zi](i);if(e==="end")return this[Du]();if(e==="close"){if(this[Ko]=!0,!this[Zt]&&!this[M])return!1;let n=super.emit("close");return this.removeAllListeners("close"),n}else if(e==="error"){this[br]=i,super.emit(Yi,i);let n=!this[vr]||this.listeners("error").length?super.emit("error",i):!1;return this[Mt](),n}else if(e==="resume"){let n=super.emit("resume");return this[Mt](),n}else if(e==="finish"||e==="prefinish"){let n=super.emit(e);return this.removeAllListeners(e),n}let s=super.emit(e,...o);return this[Mt](),s}[Zi](e){for(let i of this[Z])i.dest.write(e)===!1&&this.pause();let o=this[ot]?!1:super.emit("data",e);return this[Mt](),o}[Du](){return this[Zt]?!1:(this[Zt]=!0,this.readable=!1,this[Ct]?(Cr(()=>this[Xi]()),!0):this[Xi]())}[Xi](){if(this[He]){let o=this[He].end();if(o){for(let i of this[Z])i.dest.write(o);this[ot]||super.emit("data",o)}}for(let o of this[Z])o.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[K]||(e.dataLength=0);let o=this.promise();return this.on("data",i=>{e.push(i),this[K]||(e.dataLength+=i.length)}),await o,e}async concat(){if(this[K])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[dt]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,o)=>{this.on(M,()=>o(new Error("stream destroyed"))),this.on("error",i=>o(i)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[ot]=!1;let e=!1,o=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return o();let s=this.read();if(s!==null)return Promise.resolve({done:!1,value:s});if(this[Dt])return o();let n,f,l=m=>{this.off("data",u),this.off("end",h),this.off(M,d),o(),f(m)},u=m=>{this.off("error",l),this.off("end",h),this.off(M,d),this.pause(),n({value:m,done:!!this[Dt]})},h=()=>{this.off("error",l),this.off("data",u),this.off(M,d),o(),n({done:!0,value:void 0})},d=()=>l(new Error("stream destroyed"));return new Promise((m,y)=>{f=y,n=m,this.once(M,d),this.once("error",l),this.once("end",h),this.once("data",u)})},throw:o,return:o,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[ot]=!1;let e=!1,o=()=>(this.pause(),this.off(Yi,o),this.off(M,o),this.off("end",o),e=!0,{done:!0,value:void 0}),i=()=>{if(e)return o();let s=this.read();return s===null?o():{done:!1,value:s}};return this.once("end",o),this.once(Yi,o),this.once(M,o),{next:i,throw:o,return:o,[Symbol.iterator](){return this}}}destroy(e){if(this[M])return e?this.emit("error",e):this.emit(M),this;this[M]=!0,this[ot]=!0,this[U].length=0,this[G]=0;let o=this;return typeof o.close=="function"&&!this[Ko]&&o.close(),e?this.emit("error",e):this.emit(M),this}static get isStream(){return $x}};var Yx=Tt.realpathSync.native,kr={lstatSync:Tt.lstatSync,readdir:Tt.readdir,readdirSync:Tt.readdirSync,readlinkSync:Tt.readlinkSync,realpathSync:Yx,promises:{lstat:ee.lstat,readdir:ee.readdir,readlink:ee.readlink,realpath:ee.realpath}},ip=r=>!r||r===kr||r===Vx?kr:{...kr,...r,promises:{...kr.promises,...r.promises||{}}},sp=/^\\\\\?\\([a-z]:)\\?$/i,Zx=r=>r.replace(/\//g,"\\").replace(sp,"$1\\"),Xx=/[\\\/]/,ut=0,np=1,ap=2,Et=4,fp=6,lp=8,ye=10,up=12,lt=15,Er=~lt,os=16,Xu=32,Or=64,gt=128,Xo=256,ei=512,tp=Or|gt|ei,ty=1023,is=r=>r.isFile()?lp:r.isDirectory()?Et:r.isSymbolicLink()?ye:r.isCharacterDevice()?ap:r.isBlockDevice()?fp:r.isSocket()?up:r.isFIFO()?np:ut,ep=new Map,Tr=r=>{let t=ep.get(r);if(t)return t;let e=r.normalize("NFKD");return ep.set(r,e),e},rp=new Map,ti=r=>{let t=rp.get(r);if(t)return t;let e=Tr(r.toLowerCase());return rp.set(r,e),e},si=class extends hs.LRUCache{constructor(){super({max:256})}},ss=class extends hs.LRUCache{constructor(t=16*1024){super({maxSize:t,sizeCalculation:e=>e.length+1})}},pp=Symbol("PathScurry setAsCwd"),X,_r,Dr,Mr,Ir,Lr,Nr,Fr,Br,jr,Wr,$r,Ur,Gr,qr,zr,Hr,Kr,Qr,te,we,kt,It,Lt,Nt,k,be,Ft,Ot,v,ns,ri,Ar,as,fs,Pr,oi,ls,us,ii,hp,cp,mp,ps,Qe,Je,dp,Se,Q=class{constructor(t,e=ut,o,i,s,n,f){w(this,v);c(this,"name");c(this,"root");c(this,"roots");c(this,"parent");c(this,"nocase");c(this,"isCWD",!1);w(this,X);w(this,_r);w(this,Dr);w(this,Mr);w(this,Ir);w(this,Lr);w(this,Nr);w(this,Fr);w(this,Br);w(this,jr);w(this,Wr);w(this,$r);w(this,Ur);w(this,Gr);w(this,qr);w(this,zr);w(this,Hr);w(this,Kr);w(this,Qr);w(this,te);w(this,we);w(this,kt);w(this,It);w(this,Lt);w(this,Nt);w(this,k);w(this,be);w(this,Ft);w(this,Ot);w(this,Qe,[]);w(this,Je,!1);w(this,Se);this.name=t,g(this,te,s?ti(t):Tr(t)),g(this,k,e&ty),this.nocase=s,this.roots=i,this.root=o||this,g(this,be,n),g(this,kt,f.fullpath),g(this,Lt,f.relative),g(this,Nt,f.relativePosix),this.parent=f.parent,this.parent?g(this,X,a(this.parent,X)):g(this,X,ip(f.fs))}get dev(){return a(this,_r)}get mode(){return a(this,Dr)}get nlink(){return a(this,Mr)}get uid(){return a(this,Ir)}get gid(){return a(this,Lr)}get rdev(){return a(this,Nr)}get blksize(){return a(this,Fr)}get ino(){return a(this,Br)}get size(){return a(this,jr)}get blocks(){return a(this,Wr)}get atimeMs(){return a(this,$r)}get mtimeMs(){return a(this,Ur)}get ctimeMs(){return a(this,Gr)}get birthtimeMs(){return a(this,qr)}get atime(){return a(this,zr)}get mtime(){return a(this,Hr)}get ctime(){return a(this,Kr)}get birthtime(){return a(this,Qr)}get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}depth(){return a(this,we)!==void 0?a(this,we):this.parent?g(this,we,this.parent.depth()+1):g(this,we,0)}childrenCache(){return a(this,be)}resolve(t){var n;if(!t)return this;let e=this.getRootString(t),i=t.substring(e.length).split(this.splitSep);return e?S(n=this.getRoot(e),v,ns).call(n,i):S(this,v,ns).call(this,i)}children(){let t=a(this,be).get(this);if(t)return t;let e=Object.assign([],{provisional:0});return a(this,be).set(this,e),g(this,k,a(this,k)&~os),e}child(t,e){if(t===""||t===".")return this;if(t==="..")return this.parent||this;let o=this.children(),i=this.nocase?ti(t):Tr(t);for(let l of o)if(a(l,te)===i)return l;let s=this.parent?this.sep:"",n=a(this,kt)?a(this,kt)+s+t:void 0,f=this.newChild(t,ut,{...e,parent:this,fullpath:n});return this.canReaddir()||g(f,k,a(f,k)|gt),o.push(f),f}relative(){if(this.isCWD)return"";if(a(this,Lt)!==void 0)return a(this,Lt);let t=this.name,e=this.parent;if(!e)return g(this,Lt,this.name);let o=e.relative();return o+(!o||!e.parent?"":this.sep)+t}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(a(this,Nt)!==void 0)return a(this,Nt);let t=this.name,e=this.parent;if(!e)return g(this,Nt,this.fullpathPosix());let o=e.relativePosix();return o+(!o||!e.parent?"":"/")+t}fullpath(){if(a(this,kt)!==void 0)return a(this,kt);let t=this.name,e=this.parent;if(!e)return g(this,kt,this.name);let i=e.fullpath()+(e.parent?this.sep:"")+t;return g(this,kt,i)}fullpathPosix(){if(a(this,It)!==void 0)return a(this,It);if(this.sep==="/")return g(this,It,this.fullpath());if(!this.parent){let i=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(i)?g(this,It,`//?/${i}`):g(this,It,i)}let t=this.parent,e=t.fullpathPosix(),o=e+(!e||!t.parent?"":"/")+this.name;return g(this,It,o)}isUnknown(){return(a(this,k)&lt)===ut}isType(t){return this[`is${t}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(a(this,k)&lt)===lp}isDirectory(){return(a(this,k)&lt)===Et}isCharacterDevice(){return(a(this,k)&lt)===ap}isBlockDevice(){return(a(this,k)&lt)===fp}isFIFO(){return(a(this,k)&lt)===np}isSocket(){return(a(this,k)&lt)===up}isSymbolicLink(){return(a(this,k)&ye)===ye}lstatCached(){return a(this,k)&Xu?this:void 0}readlinkCached(){return a(this,Ft)}realpathCached(){return a(this,Ot)}readdirCached(){let t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(a(this,Ft))return!0;if(!this.parent)return!1;let t=a(this,k)&lt;return!(t!==ut&&t!==ye||a(this,k)&Xo||a(this,k)&gt)}calledReaddir(){return!!(a(this,k)&os)}isENOENT(){return!!(a(this,k)&gt)}isNamed(t){return this.nocase?a(this,te)===ti(t):a(this,te)===Tr(t)}async readlink(){var e;let t=a(this,Ft);if(t)return t;if(this.canReadlink()&&this.parent)try{let o=await a(this,X).promises.readlink(this.fullpath()),i=(e=await this.parent.realpath())==null?void 0:e.resolve(o);if(i)return g(this,Ft,i)}catch(o){S(this,v,us).call(this,o.code);return}}readlinkSync(){var e;let t=a(this,Ft);if(t)return t;if(this.canReadlink()&&this.parent)try{let o=a(this,X).readlinkSync(this.fullpath()),i=(e=this.parent.realpathSync())==null?void 0:e.resolve(o);if(i)return g(this,Ft,i)}catch(o){S(this,v,us).call(this,o.code);return}}async lstat(){if(!(a(this,k)&gt))try{return S(this,v,ps).call(this,await a(this,X).promises.lstat(this.fullpath())),this}catch(t){S(this,v,ls).call(this,t.code)}}lstatSync(){if(!(a(this,k)&gt))try{return S(this,v,ps).call(this,a(this,X).lstatSync(this.fullpath())),this}catch(t){S(this,v,ls).call(this,t.code)}}readdirCB(t,e=!1){if(!this.canReaddir()){e?t(null,[]):queueMicrotask(()=>t(null,[]));return}let o=this.children();if(this.calledReaddir()){let s=o.slice(0,o.provisional);e?t(null,s):queueMicrotask(()=>t(null,s));return}if(a(this,Qe).push(t),a(this,Je))return;g(this,Je,!0);let i=this.fullpath();a(this,X).readdir(i,{withFileTypes:!0},(s,n)=>{if(s)S(this,v,oi).call(this,s.code),o.provisional=0;else{for(let f of n)S(this,v,ii).call(this,f,o);S(this,v,ri).call(this,o)}S(this,v,dp).call(this,o.slice(0,o.provisional))})}async readdir(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();if(a(this,Se))await a(this,Se);else{let o=()=>{};g(this,Se,new Promise(i=>o=i));try{for(let i of await a(this,X).promises.readdir(e,{withFileTypes:!0}))S(this,v,ii).call(this,i,t);S(this,v,ri).call(this,t)}catch(i){S(this,v,oi).call(this,i.code),t.provisional=0}g(this,Se,void 0),o()}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();try{for(let o of a(this,X).readdirSync(e,{withFileTypes:!0}))S(this,v,ii).call(this,o,t);S(this,v,ri).call(this,t)}catch(o){S(this,v,oi).call(this,o.code),t.provisional=0}return t.slice(0,t.provisional)}canReaddir(){if(a(this,k)&tp)return!1;let t=lt&a(this,k);return t===ut||t===Et||t===ye}shouldWalk(t,e){return(a(this,k)&Et)===Et&&!(a(this,k)&tp)&&!t.has(this)&&(!e||e(this))}async realpath(){if(a(this,Ot))return a(this,Ot);if(!((ei|Xo|gt)&a(this,k)))try{let t=await a(this,X).promises.realpath(this.fullpath());return g(this,Ot,this.resolve(t))}catch(t){S(this,v,fs).call(this)}}realpathSync(){if(a(this,Ot))return a(this,Ot);if(!((ei|Xo|gt)&a(this,k)))try{let t=a(this,X).realpathSync(this.fullpath());return g(this,Ot,this.resolve(t))}catch(t){S(this,v,fs).call(this)}}[pp](t){if(t===this)return;t.isCWD=!1,this.isCWD=!0;let e=new Set([]),o=[],i=this;for(;i&&i.parent;)e.add(i),g(i,Lt,o.join(this.sep)),g(i,Nt,o.join("/")),i=i.parent,o.push("..");for(i=t;i&&i.parent&&!e.has(i);)g(i,Lt,void 0),g(i,Nt,void 0),i=i.parent}};X=new WeakMap,_r=new WeakMap,Dr=new WeakMap,Mr=new WeakMap,Ir=new WeakMap,Lr=new WeakMap,Nr=new WeakMap,Fr=new WeakMap,Br=new WeakMap,jr=new WeakMap,Wr=new WeakMap,$r=new WeakMap,Ur=new WeakMap,Gr=new WeakMap,qr=new WeakMap,zr=new WeakMap,Hr=new WeakMap,Kr=new WeakMap,Qr=new WeakMap,te=new WeakMap,we=new WeakMap,kt=new WeakMap,It=new WeakMap,Lt=new WeakMap,Nt=new WeakMap,k=new WeakMap,be=new WeakMap,Ft=new WeakMap,Ot=new WeakMap,v=new WeakSet,ns=function(t){let e=this;for(let o of t)e=e.child(o);return e},ri=function(t){var e;g(this,k,a(this,k)|os);for(let o=t.provisional;o<t.length;o++){let i=t[o];i&&S(e=i,v,Ar).call(e)}},Ar=function(){a(this,k)&gt||(g(this,k,(a(this,k)|gt)&Er),S(this,v,as).call(this))},as=function(){var e;let t=this.children();t.provisional=0;for(let o of t)S(e=o,v,Ar).call(e)},fs=function(){g(this,k,a(this,k)|ei),S(this,v,Pr).call(this)},Pr=function(){if(a(this,k)&Or)return;let t=a(this,k);(t&lt)===Et&&(t&=Er),g(this,k,t|Or),S(this,v,as).call(this)},oi=function(t=""){t==="ENOTDIR"||t==="EPERM"?S(this,v,Pr).call(this):t==="ENOENT"?S(this,v,Ar).call(this):this.children().provisional=0},ls=function(t=""){var e;if(t==="ENOTDIR"){let o=this.parent;S(e=o,v,Pr).call(e)}else t==="ENOENT"&&S(this,v,Ar).call(this)},us=function(t=""){var o;let e=a(this,k);e|=Xo,t==="ENOENT"&&(e|=gt),(t==="EINVAL"||t==="UNKNOWN")&&(e&=Er),g(this,k,e),t==="ENOTDIR"&&this.parent&&S(o=this.parent,v,Pr).call(o)},ii=function(t,e){return S(this,v,cp).call(this,t,e)||S(this,v,hp).call(this,t,e)},hp=function(t,e){let o=is(t),i=this.newChild(t.name,o,{parent:this}),s=a(i,k)&lt;return s!==Et&&s!==ye&&s!==ut&&g(i,k,a(i,k)|Or),e.unshift(i),e.provisional++,i},cp=function(t,e){for(let o=e.provisional;o<e.length;o++){let i=e[o];if((this.nocase?ti(t.name):Tr(t.name))===a(i,te))return S(this,v,mp).call(this,t,i,o,e)}},mp=function(t,e,o,i){let s=e.name;return g(e,k,a(e,k)&Er|is(t)),s!==t.name&&(e.name=t.name),o!==i.provisional&&(o===i.length-1?i.pop():i.splice(o,1),i.unshift(e)),i.provisional++,e},ps=function(t){let{atime:e,atimeMs:o,birthtime:i,birthtimeMs:s,blksize:n,blocks:f,ctime:l,ctimeMs:u,dev:h,gid:d,ino:m,mode:y,mtime:b,mtimeMs:x,nlink:C,rdev:E,size:T,uid:A}=t;g(this,zr,e),g(this,$r,o),g(this,Qr,i),g(this,qr,s),g(this,Fr,n),g(this,Wr,f),g(this,Kr,l),g(this,Gr,u),g(this,_r,h),g(this,Lr,d),g(this,Br,m),g(this,Dr,y),g(this,Hr,b),g(this,Ur,x),g(this,Mr,C),g(this,Nr,E),g(this,jr,T),g(this,Ir,A);let R=is(t);g(this,k,a(this,k)&Er|R|Xu),R!==ut&&R!==Et&&R!==ye&&g(this,k,a(this,k)|Or)},Qe=new WeakMap,Je=new WeakMap,dp=function(t){g(this,Je,!1);let e=a(this,Qe).slice();a(this,Qe).length=0,e.forEach(o=>o(null,t))},Se=new WeakMap;var ni=class r extends Q{constructor(e,o=ut,i,s,n,f,l){super(e,o,i,s,n,f,l);c(this,"sep","\\");c(this,"splitSep",Xx)}newChild(e,o=ut,i={}){return new r(e,o,this.root,this.roots,this.nocase,this.childrenCache(),i)}getRootString(e){return Ze.win32.parse(e).root}getRoot(e){if(e=Zx(e.toUpperCase()),e===this.root.name)return this.root;for(let[o,i]of Object.entries(this.roots))if(this.sameRoot(e,o))return this.roots[e]=i;return this.roots[e]=new Xe(e,this).root}sameRoot(e,o=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(sp,"$1\\"),e===o}},ai=class r extends Q{constructor(e,o=ut,i,s,n,f,l){super(e,o,i,s,n,f,l);c(this,"splitSep","/");c(this,"sep","/")}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,o=ut,i={}){return new r(e,o,this.root,this.roots,this.nocase,this.childrenCache(),i)}},Ve,Ye,Jr,Vr,fi=class{constructor(t=process.cwd(),e,o,{nocase:i,childrenCacheSize:s=16*1024,fs:n=kr}={}){c(this,"root");c(this,"rootPath");c(this,"roots");c(this,"cwd");w(this,Ve);w(this,Ye);w(this,Jr);c(this,"nocase");w(this,Vr);g(this,Vr,ip(n)),(t instanceof URL||t.startsWith("file://"))&&(t=(0,op.fileURLToPath)(t));let f=e.resolve(t);this.roots=Object.create(null),this.rootPath=this.parseRootPath(f),g(this,Ve,new si),g(this,Ye,new si),g(this,Jr,new ss(s));let l=f.substring(this.rootPath.length).split(o);if(l.length===1&&!l[0]&&l.pop(),i===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(a(this,Vr)),this.roots[this.rootPath]=this.root;let u=this.root,h=l.length-1,d=e.sep,m=this.rootPath,y=!1;for(let b of l){let x=h--;u=u.child(b,{relative:new Array(x).fill("..").join(d),relativePosix:new Array(x).fill("..").join("/"),fullpath:m+=(y?"":d)+b}),y=!0}this.cwd=u}depth(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.depth()}childrenCache(){return a(this,Jr)}resolve(...t){let e="";for(let s=t.length-1;s>=0;s--){let n=t[s];if(!(!n||n===".")&&(e=e?`${n}/${e}`:n,this.isAbsolute(n)))break}let o=a(this,Ve).get(e);if(o!==void 0)return o;let i=this.cwd.resolve(e).fullpath();return a(this,Ve).set(e,i),i}resolvePosix(...t){let e="";for(let s=t.length-1;s>=0;s--){let n=t[s];if(!(!n||n===".")&&(e=e?`${n}/${e}`:n,this.isAbsolute(n)))break}let o=a(this,Ye).get(e);if(o!==void 0)return o;let i=this.cwd.resolve(e).fullpathPosix();return a(this,Ye).set(e,i),i}relative(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relative()}relativePosix(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relativePosix()}basename(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.name}dirname(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),(t.parent||t).fullpath()}async readdir(t=this.cwd,e={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t,t=this.cwd);let{withFileTypes:o}=e;if(t.canReaddir()){let i=await t.readdir();return o?i:i.map(s=>s.name)}else return[]}readdirSync(t=this.cwd,e={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t,t=this.cwd);let{withFileTypes:o=!0}=e;return t.canReaddir()?o?t.readdirSync():t.readdirSync().map(i=>i.name):[]}async lstat(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstat()}lstatSync(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t.withFileTypes,t=this.cwd);let o=await t.readlink();return e?o:o==null?void 0:o.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t.withFileTypes,t=this.cwd);let o=t.readlinkSync();return e?o:o==null?void 0:o.fullpath()}async realpath(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t.withFileTypes,t=this.cwd);let o=await t.realpath();return e?o:o==null?void 0:o.fullpath()}realpathSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t.withFileTypes,t=this.cwd);let o=t.realpathSync();return e?o:o==null?void 0:o.fullpath()}async walk(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t,t=this.cwd);let{withFileTypes:o=!0,follow:i=!1,filter:s,walkFilter:n}=e,f=[];(!s||s(t))&&f.push(o?t:t.fullpath());let l=new Set,u=(d,m)=>{l.add(d),d.readdirCB((y,b)=>{if(y)return m(y);let x=b.length;if(!x)return m();let C=()=>{--x===0&&m()};for(let E of b)(!s||s(E))&&f.push(o?E:E.fullpath()),i&&E.isSymbolicLink()?E.realpath().then(T=>T!=null&&T.isUnknown()?T.lstat():T).then(T=>T!=null&&T.shouldWalk(l,n)?u(T,C):C()):E.shouldWalk(l,n)?u(E,C):C()},!0)},h=t;return new Promise((d,m)=>{u(h,y=>{if(y)return m(y);d(f)})})}walkSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t,t=this.cwd);let{withFileTypes:o=!0,follow:i=!1,filter:s,walkFilter:n}=e,f=[];(!s||s(t))&&f.push(o?t:t.fullpath());let l=new Set([t]);for(let u of l){let h=u.readdirSync();for(let d of h){(!s||s(d))&&f.push(o?d:d.fullpath());let m=d;if(d.isSymbolicLink()){if(!(i&&(m=d.realpathSync())))continue;m.isUnknown()&&m.lstatSync()}m.shouldWalk(l,n)&&l.add(m)}}return f}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,e={}){return typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t,t=this.cwd),this.stream(t,e)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t,t=this.cwd);let{withFileTypes:o=!0,follow:i=!1,filter:s,walkFilter:n}=e;(!s||s(t))&&(yield o?t:t.fullpath());let f=new Set([t]);for(let l of f){let u=l.readdirSync();for(let h of u){(!s||s(h))&&(yield o?h:h.fullpath());let d=h;if(h.isSymbolicLink()){if(!(i&&(d=h.realpathSync())))continue;d.isUnknown()&&d.lstatSync()}d.shouldWalk(f,n)&&f.add(d)}}}stream(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t,t=this.cwd);let{withFileTypes:o=!0,follow:i=!1,filter:s,walkFilter:n}=e,f=new Xt({objectMode:!0});(!s||s(t))&&f.write(o?t:t.fullpath());let l=new Set,u=[t],h=0,d=()=>{let m=!1;for(;!m;){let y=u.shift();if(!y){h===0&&f.end();return}h++,l.add(y);let b=(C,E,T=!1)=>{if(C)return f.emit("error",C);if(i&&!T){let A=[];for(let R of E)R.isSymbolicLink()&&A.push(R.realpath().then(N=>N!=null&&N.isUnknown()?N.lstat():N));if(A.length){Promise.all(A).then(()=>b(null,E,!0));return}}for(let A of E)A&&(!s||s(A))&&(f.write(o?A:A.fullpath())||(m=!0));h--;for(let A of E){let R=A.realpathCached()||A;R.shouldWalk(l,n)&&u.push(R)}m&&!f.flowing?f.once("drain",d):x||d()},x=!0;y.readdirCB(b,!0),x=!1}};return d(),f}streamSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t,t=this.cwd);let{withFileTypes:o=!0,follow:i=!1,filter:s,walkFilter:n}=e,f=new Xt({objectMode:!0}),l=new Set;(!s||s(t))&&f.write(o?t:t.fullpath());let u=[t],h=0,d=()=>{let m=!1;for(;!m;){let y=u.shift();if(!y){h===0&&f.end();return}h++,l.add(y);let b=y.readdirSync();for(let x of b)(!s||s(x))&&(f.write(o?x:x.fullpath())||(m=!0));h--;for(let x of b){let C=x;if(x.isSymbolicLink()){if(!(i&&(C=x.realpathSync())))continue;C.isUnknown()&&C.lstatSync()}C.shouldWalk(l,n)&&u.push(C)}}m&&!f.flowing&&f.once("drain",d)};return d(),f}chdir(t=this.cwd){let e=this.cwd;this.cwd=typeof t=="string"?this.cwd.resolve(t):t,this.cwd[pp](e)}};Ve=new WeakMap,Ye=new WeakMap,Jr=new WeakMap,Vr=new WeakMap;var Xe=class extends fi{constructor(e=process.cwd(),o={}){let{nocase:i=!0}=o;super(e,Ze.win32,"\\",{...o,nocase:i});c(this,"sep","\\");this.nocase=i;for(let s=this.cwd;s;s=s.parent)s.nocase=this.nocase}parseRootPath(e){return Ze.win32.parse(e).root.toUpperCase()}newRoot(e){return new ni(this.rootPath,Et,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},tr=class extends fi{constructor(e=process.cwd(),o={}){let{nocase:i=!1}=o;super(e,Ze.posix,"/",{...o,nocase:i});c(this,"sep","/");this.nocase=i}parseRootPath(e){return"/"}newRoot(e){return new ai(this.rootPath,Et,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},Rr=class extends tr{constructor(t=process.cwd(),e={}){let{nocase:o=!0}=e;super(t,{...e,nocase:o})}},EO=process.platform==="win32"?ni:ai,gp=process.platform==="win32"?Xe:process.platform==="darwin"?Rr:tr;var ey=r=>r.length>=1,ry=r=>r.length>=1,j,it,q,ve,xt,Yr,re,oe,ie,er,cs=class cs{constructor(t,e,o,i){w(this,j);w(this,it);w(this,q);c(this,"length");w(this,ve);w(this,xt);w(this,Yr);w(this,re);w(this,oe);w(this,ie);w(this,er,!0);if(!ey(t))throw new TypeError("empty pattern list");if(!ry(e))throw new TypeError("empty glob list");if(e.length!==t.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=t.length,o<0||o>=this.length)throw new TypeError("index out of range");if(g(this,j,t),g(this,it,e),g(this,q,o),g(this,ve,i),a(this,q)===0){if(this.isUNC()){let[s,n,f,l,...u]=a(this,j),[h,d,m,y,...b]=a(this,it);u[0]===""&&(u.shift(),b.shift());let x=[s,n,f,l,""].join("/"),C=[h,d,m,y,""].join("/");g(this,j,[x,...u]),g(this,it,[C,...b]),this.length=a(this,j).length}else if(this.isDrive()||this.isAbsolute()){let[s,...n]=a(this,j),[f,...l]=a(this,it);n[0]===""&&(n.shift(),l.shift());let u=s+"/",h=f+"/";g(this,j,[u,...n]),g(this,it,[h,...l]),this.length=a(this,j).length}}}pattern(){return a(this,j)[a(this,q)]}isString(){return typeof a(this,j)[a(this,q)]=="string"}isGlobstar(){return a(this,j)[a(this,q)]===z}isRegExp(){return a(this,j)[a(this,q)]instanceof RegExp}globString(){return g(this,Yr,a(this,Yr)||(a(this,q)===0?this.isAbsolute()?a(this,it)[0]+a(this,it).slice(1).join("/"):a(this,it).join("/"):a(this,it).slice(a(this,q)).join("/")))}hasMore(){return this.length>a(this,q)+1}rest(){return a(this,xt)!==void 0?a(this,xt):this.hasMore()?(g(this,xt,new cs(a(this,j),a(this,it),a(this,q)+1,a(this,ve))),g(a(this,xt),ie,a(this,ie)),g(a(this,xt),oe,a(this,oe)),g(a(this,xt),re,a(this,re)),a(this,xt)):g(this,xt,null)}isUNC(){let t=a(this,j);return a(this,oe)!==void 0?a(this,oe):g(this,oe,a(this,ve)==="win32"&&a(this,q)===0&&t[0]===""&&t[1]===""&&typeof t[2]=="string"&&!!t[2]&&typeof t[3]=="string"&&!!t[3])}isDrive(){let t=a(this,j);return a(this,re)!==void 0?a(this,re):g(this,re,a(this,ve)==="win32"&&a(this,q)===0&&this.length>1&&typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]))}isAbsolute(){let t=a(this,j);return a(this,ie)!==void 0?a(this,ie):g(this,ie,t[0]===""&&t.length>1||this.isDrive()||this.isUNC())}root(){let t=a(this,j)[0];return typeof t=="string"&&this.isAbsolute()&&a(this,q)===0?t:""}checkFollowGlobstar(){return!(a(this,q)===0||!this.isGlobstar()||!a(this,er))}markFollowGlobstar(){return a(this,q)===0||!this.isGlobstar()||!a(this,er)?!1:(g(this,er,!1),!0)}};j=new WeakMap,it=new WeakMap,q=new WeakMap,ve=new WeakMap,xt=new WeakMap,Yr=new WeakMap,re=new WeakMap,oe=new WeakMap,ie=new WeakMap,er=new WeakMap;var rr=cs;var oy=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",or=class{constructor(t,{nobrace:e,nocase:o,noext:i,noglobstar:s,platform:n=oy}){c(this,"relative");c(this,"relativeChildren");c(this,"absolute");c(this,"absoluteChildren");c(this,"platform");c(this,"mmopts");this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=n,this.mmopts={dot:!0,nobrace:e,nocase:o,noext:i,noglobstar:s,optimizationLevel:2,platform:n,nocomment:!0,nonegate:!0};for(let f of t)this.add(f)}add(t){let e=new rt(t,this.mmopts);for(let o=0;o<e.set.length;o++){let i=e.set[o],s=e.globParts[o];if(!i||!s)throw new Error("invalid pattern object");for(;i[0]==="."&&s[0]===".";)i.shift(),s.shift();let n=new rr(i,s,0,this.platform),f=new rt(n.globString(),this.mmopts),l=s[s.length-1]==="**",u=n.isAbsolute();u?this.absolute.push(f):this.relative.push(f),l&&(u?this.absoluteChildren.push(f):this.relativeChildren.push(f))}}ignored(t){let e=t.fullpath(),o=`${e}/`,i=t.relative()||".",s=`${i}/`;for(let n of this.relative)if(n.match(i)||n.match(s))return!0;for(let n of this.absolute)if(n.match(e)||n.match(o))return!0;return!1}childrenIgnored(t){let e=t.fullpath()+"/",o=(t.relative()||".")+"/";for(let i of this.relativeChildren)if(i.match(o))return!0;for(let i of this.absoluteChildren)if(i.match(e))return!0;return!1}};var ms=class r{constructor(t=new Map){c(this,"store");this.store=t}copy(){return new r(new Map(this.store))}hasWalked(t,e){var o;return(o=this.store.get(t.fullpath()))==null?void 0:o.has(e.globString())}storeWalked(t,e){let o=t.fullpath(),i=this.store.get(o);i?i.add(e.globString()):this.store.set(o,new Set([e.globString()]))}},ds=class{constructor(){c(this,"store",new Map)}add(t,e,o){let i=(e?2:0)|(o?1:0),s=this.store.get(t);this.store.set(t,s===void 0?i:i&s)}entries(){return[...this.store.entries()].map(([t,e])=>[t,!!(e&2),!!(e&1)])}},gs=class{constructor(){c(this,"store",new Map)}add(t,e){if(!t.canReaddir())return;let o=this.store.get(t);o?o.find(i=>i.globString()===e.globString())||o.push(e):this.store.set(t,[e])}get(t){let e=this.store.get(t);if(!e)throw new Error("attempting to walk unknown path");return e}entries(){return this.keys().map(t=>[t,this.store.get(t)])}keys(){return[...this.store.keys()].filter(t=>t.canReaddir())}},Zr=class r{constructor(t,e){c(this,"hasWalkedCache");c(this,"matches",new ds);c(this,"subwalks",new gs);c(this,"patterns");c(this,"follow");c(this,"dot");c(this,"opts");this.opts=t,this.follow=!!t.follow,this.dot=!!t.dot,this.hasWalkedCache=e?e.copy():new ms}processPatterns(t,e){this.patterns=e;let o=e.map(i=>[t,i]);for(let[i,s]of o){this.hasWalkedCache.storeWalked(i,s);let n=s.root(),f=s.isAbsolute()&&this.opts.absolute!==!1;if(n){i=i.resolve(n==="/"&&this.opts.root!==void 0?this.opts.root:n);let d=s.rest();if(d)s=d;else{this.matches.add(i,!0,!1);continue}}if(i.isENOENT())continue;let l,u,h=!1;for(;typeof(l=s.pattern())=="string"&&(u=s.rest());)i=i.resolve(l),s=u,h=!0;if(l=s.pattern(),u=s.rest(),h){if(this.hasWalkedCache.hasWalked(i,s))continue;this.hasWalkedCache.storeWalked(i,s)}if(typeof l=="string"){let d=l===".."||l===""||l===".";this.matches.add(i.resolve(l),f,d);continue}else if(l===z){(!i.isSymbolicLink()||this.follow||s.checkFollowGlobstar())&&this.subwalks.add(i,s);let d=u==null?void 0:u.pattern(),m=u==null?void 0:u.rest();if(!u||(d===""||d===".")&&!m)this.matches.add(i,f,d===""||d===".");else if(d===".."){let y=i.parent||i;m?this.hasWalkedCache.hasWalked(y,m)||this.subwalks.add(y,m):this.matches.add(y,f,!0)}}else l instanceof RegExp&&this.subwalks.add(i,s)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new r(this.opts,this.hasWalkedCache)}filterEntries(t,e){let o=this.subwalks.get(t),i=this.child();for(let s of e)for(let n of o){let f=n.isAbsolute(),l=n.pattern(),u=n.rest();l===z?i.testGlobstar(s,n,u,f):l instanceof RegExp?i.testRegExp(s,l,u,f):i.testString(s,l,u,f)}return i}testGlobstar(t,e,o,i){if((this.dot||!t.name.startsWith("."))&&(e.hasMore()||this.matches.add(t,i,!1),t.canReaddir()&&(this.follow||!t.isSymbolicLink()?this.subwalks.add(t,e):t.isSymbolicLink()&&(o&&e.checkFollowGlobstar()?this.subwalks.add(t,o):e.markFollowGlobstar()&&this.subwalks.add(t,e)))),o){let s=o.pattern();if(typeof s=="string"&&s!==".."&&s!==""&&s!==".")this.testString(t,s,o.rest(),i);else if(s===".."){let n=t.parent||t;this.subwalks.add(n,o)}else s instanceof RegExp&&this.testRegExp(t,s,o.rest(),i)}}testRegExp(t,e,o,i){e.test(t.name)&&(o?this.subwalks.add(t,o):this.matches.add(t,i,!1))}testString(t,e,o,i){t.isNamed(e)&&(o?this.subwalks.add(t,o):this.matches.add(t,i,!1))}};var iy=(r,t)=>typeof r=="string"?new or([r],t):Array.isArray(r)?new or(r,t):r,ir,Bt,Ee,pt,Ce,xs,li=class{constructor(t,e,o){w(this,pt);c(this,"path");c(this,"patterns");c(this,"opts");c(this,"seen",new Set);c(this,"paused",!1);c(this,"aborted",!1);w(this,ir,[]);w(this,Bt);w(this,Ee);c(this,"signal");c(this,"maxDepth");c(this,"includeChildMatches");var i;if(this.patterns=t,this.path=e,this.opts=o,g(this,Ee,!o.posix&&o.platform==="win32"?"\\":"/"),this.includeChildMatches=o.includeChildMatches!==!1,(o.ignore||!this.includeChildMatches)&&(g(this,Bt,iy((i=o.ignore)!=null?i:[],o)),!this.includeChildMatches&&typeof a(this,Bt).add!="function")){let s="cannot ignore child matches, ignore lacks add() method.";throw new Error(s)}this.maxDepth=o.maxDepth||1/0,o.signal&&(this.signal=o.signal,this.signal.addEventListener("abort",()=>{a(this,ir).length=0}))}pause(){this.paused=!0}resume(){var e;if((e=this.signal)!=null&&e.aborted)return;this.paused=!1;let t;for(;!this.paused&&(t=a(this,ir).shift());)t()}onResume(t){var e;(e=this.signal)!=null&&e.aborted||(this.paused?a(this,ir).push(t):t())}async matchCheck(t,e){if(e&&this.opts.nodir)return;let o;if(this.opts.realpath){if(o=t.realpathCached()||await t.realpath(),!o)return;t=o}let s=t.isUnknown()||this.opts.stat?await t.lstat():t;if(this.opts.follow&&this.opts.nodir&&(s!=null&&s.isSymbolicLink())){let n=await s.realpath();n&&(n.isUnknown()||this.opts.stat)&&await n.lstat()}return this.matchCheckTest(s,e)}matchCheckTest(t,e){var o;return t&&(this.maxDepth===1/0||t.depth()<=this.maxDepth)&&(!e||t.canReaddir())&&(!this.opts.nodir||!t.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!t.isSymbolicLink()||!((o=t.realpathCached())!=null&&o.isDirectory()))&&!S(this,pt,Ce).call(this,t)?t:void 0}matchCheckSync(t,e){if(e&&this.opts.nodir)return;let o;if(this.opts.realpath){if(o=t.realpathCached()||t.realpathSync(),!o)return;t=o}let s=t.isUnknown()||this.opts.stat?t.lstatSync():t;if(this.opts.follow&&this.opts.nodir&&(s!=null&&s.isSymbolicLink())){let n=s.realpathSync();n&&(n!=null&&n.isUnknown()||this.opts.stat)&&n.lstatSync()}return this.matchCheckTest(s,e)}matchFinish(t,e){var s;if(S(this,pt,Ce).call(this,t))return;if(!this.includeChildMatches&&((s=a(this,Bt))!=null&&s.add)){let n=`${t.relativePosix()}/**`;a(this,Bt).add(n)}let o=this.opts.absolute===void 0?e:this.opts.absolute;this.seen.add(t);let i=this.opts.mark&&t.isDirectory()?a(this,Ee):"";if(this.opts.withFileTypes)this.matchEmit(t);else if(o){let n=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(n+i)}else{let n=this.opts.posix?t.relativePosix():t.relative(),f=this.opts.dotRelative&&!n.startsWith(".."+a(this,Ee))?"."+a(this,Ee):"";this.matchEmit(n?f+n+i:"."+i)}}async match(t,e,o){let i=await this.matchCheck(t,o);i&&this.matchFinish(i,e)}matchSync(t,e,o){let i=this.matchCheckSync(t,o);i&&this.matchFinish(i,e)}walkCB(t,e,o){var i;(i=this.signal)!=null&&i.aborted&&o(),this.walkCB2(t,e,new Zr(this.opts),o)}walkCB2(t,e,o,i){var f;if(S(this,pt,xs).call(this,t))return i();if((f=this.signal)!=null&&f.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2(t,e,o,i));return}o.processPatterns(t,e);let s=1,n=()=>{--s===0&&i()};for(let[l,u,h]of o.matches.entries())S(this,pt,Ce).call(this,l)||(s++,this.match(l,u,h).then(()=>n()));for(let l of o.subwalkTargets()){if(this.maxDepth!==1/0&&l.depth()>=this.maxDepth)continue;s++;let u=l.readdirCached();l.calledReaddir()?this.walkCB3(l,u,o,n):l.readdirCB((h,d)=>this.walkCB3(l,d,o,n),!0)}n()}walkCB3(t,e,o,i){o=o.filterEntries(t,e);let s=1,n=()=>{--s===0&&i()};for(let[f,l,u]of o.matches.entries())S(this,pt,Ce).call(this,f)||(s++,this.match(f,l,u).then(()=>n()));for(let[f,l]of o.subwalks.entries())s++,this.walkCB2(f,l,o.child(),n);n()}walkCBSync(t,e,o){var i;(i=this.signal)!=null&&i.aborted&&o(),this.walkCB2Sync(t,e,new Zr(this.opts),o)}walkCB2Sync(t,e,o,i){var f;if(S(this,pt,xs).call(this,t))return i();if((f=this.signal)!=null&&f.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2Sync(t,e,o,i));return}o.processPatterns(t,e);let s=1,n=()=>{--s===0&&i()};for(let[l,u,h]of o.matches.entries())S(this,pt,Ce).call(this,l)||this.matchSync(l,u,h);for(let l of o.subwalkTargets()){if(this.maxDepth!==1/0&&l.depth()>=this.maxDepth)continue;s++;let u=l.readdirSync();this.walkCB3Sync(l,u,o,n)}n()}walkCB3Sync(t,e,o,i){o=o.filterEntries(t,e);let s=1,n=()=>{--s===0&&i()};for(let[f,l,u]of o.matches.entries())S(this,pt,Ce).call(this,f)||this.matchSync(f,l,u);for(let[f,l]of o.subwalks.entries())s++,this.walkCB2Sync(f,l,o.child(),n);n()}};ir=new WeakMap,Bt=new WeakMap,Ee=new WeakMap,pt=new WeakSet,Ce=function(t){var e,o;return this.seen.has(t)||!!((o=(e=a(this,Bt))==null?void 0:e.ignored)!=null&&o.call(e,t))},xs=function(t){var e,o;return!!((o=(e=a(this,Bt))==null?void 0:e.childrenIgnored)!=null&&o.call(e,t))};var Xr=class extends li{constructor(e,o,i){super(e,o,i);c(this,"matches",new Set)}matchEmit(e){this.matches.add(e)}async walk(){var e;if((e=this.signal)!=null&&e.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((o,i)=>{this.walkCB(this.path,this.patterns,()=>{var s;(s=this.signal)!=null&&s.aborted?i(this.signal.reason):o(this.matches)})}),this.matches}walkSync(){var e;if((e=this.signal)!=null&&e.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{var o;if((o=this.signal)!=null&&o.aborted)throw this.signal.reason}),this.matches}},to=class extends li{constructor(e,o,i){super(e,o,i);c(this,"results");this.results=new Xt({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};var sy=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",yt=class{constructor(t,e){c(this,"absolute");c(this,"cwd");c(this,"root");c(this,"dot");c(this,"dotRelative");c(this,"follow");c(this,"ignore");c(this,"magicalBraces");c(this,"mark");c(this,"matchBase");c(this,"maxDepth");c(this,"nobrace");c(this,"nocase");c(this,"nodir");c(this,"noext");c(this,"noglobstar");c(this,"pattern");c(this,"platform");c(this,"realpath");c(this,"scurry");c(this,"stat");c(this,"signal");c(this,"windowsPathsNoEscape");c(this,"withFileTypes");c(this,"includeChildMatches");c(this,"opts");c(this,"patterns");if(!e)throw new TypeError("glob options required");if(this.withFileTypes=!!e.withFileTypes,this.signal=e.signal,this.follow=!!e.follow,this.dot=!!e.dot,this.dotRelative=!!e.dotRelative,this.nodir=!!e.nodir,this.mark=!!e.mark,e.cwd?(e.cwd instanceof URL||e.cwd.startsWith("file://"))&&(e.cwd=(0,xp.fileURLToPath)(e.cwd)):this.cwd="",this.cwd=e.cwd||"",this.root=e.root,this.magicalBraces=!!e.magicalBraces,this.nobrace=!!e.nobrace,this.noext=!!e.noext,this.realpath=!!e.realpath,this.absolute=e.absolute,this.includeChildMatches=e.includeChildMatches!==!1,this.noglobstar=!!e.noglobstar,this.matchBase=!!e.matchBase,this.maxDepth=typeof e.maxDepth=="number"?e.maxDepth:1/0,this.stat=!!e.stat,this.ignore=e.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof t=="string"&&(t=[t]),this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(t=t.map(l=>l.replace(/\\/g,"/"))),this.matchBase){if(e.noglobstar)throw new TypeError("base matching requires globstar");t=t.map(l=>l.includes("/")?l:`./**/${l}`)}if(this.pattern=t,this.platform=e.platform||sy,this.opts={...e,platform:this.platform},e.scurry){if(this.scurry=e.scurry,e.nocase!==void 0&&e.nocase!==e.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let l=e.platform==="win32"?Xe:e.platform==="darwin"?Rr:e.platform?tr:gp;this.scurry=new l(this.cwd,{nocase:e.nocase,fs:e.fs})}this.nocase=this.scurry.nocase;let o=this.platform==="darwin"||this.platform==="win32",i={...e,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:o,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},s=this.pattern.map(l=>new rt(l,i)),[n,f]=s.reduce((l,u)=>(l[0].push(...u.set),l[1].push(...u.globParts),l),[[],[]]);this.patterns=n.map((l,u)=>{let h=f[u];if(!h)throw new Error("invalid pattern object");return new rr(l,h,0,this.platform)})}async walk(){return[...await new Xr(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new Xr(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new to(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new to(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};var ys=(r,t={})=>{Array.isArray(r)||(r=[r]);for(let e of r)if(new rt(e,t).hasMagic())return!0;return!1};function ui(r,t={}){return new yt(r,t).streamSync()}function bp(r,t={}){return new yt(r,t).stream()}function Sp(r,t={}){return new yt(r,t).walkSync()}async function yp(r,t={}){return new yt(r,t).walk()}function pi(r,t={}){return new yt(r,t).iterateSync()}function vp(r,t={}){return new yt(r,t).iterate()}var ny=ui,ay=Object.assign(bp,{sync:ui}),fy=pi,ly=Object.assign(vp,{sync:pi}),eo=Object.assign(Sp,{stream:ui,iterate:pi}),wp=Object.assign(yp,{glob:yp,globSync:Sp,sync:eo,globStream:bp,stream:ay,globStreamSync:ui,streamSync:ny,globIterate:vp,iterate:ly,globIterateSync:pi,iterateSync:fy,Glob:yt,hasMagic:ys,escape:ze,unescape:mt});wp.glob=wp;ae();var uy=O.withTag("listChromeProfiles");function Cp(){let r=eo("./**/Cookies",{cwd:Ge,absolute:!0});return uy.debug("Found cookie files:",r),r}var hi=require("crypto");ce();var py=at(r=>r.length>=3&&r[0]===118&&r[1]===49&&r[2]===48?r.slice(3):r,r=>r.toString("hex")),hy=at(r=>{let t=r[r.length-1];return t&&t<=16?r.slice(0,-t):r},r=>r.toString("hex"));function cy(r){var e;let t=[/.*?0t(.+)$/,/.*?1e`(.+)$/,/.*?[`'](.+)$/,/[^\x20-\x7E]*([\x20-\x7E].+)$/];for(let o of t){let i=r.match(o),s=(e=i==null?void 0:i[1])!=null?e:"";if(s.length>0)return s}return r}async function Ep(r,t){if(typeof t!="string")throw new Error("password must be a string");if(!Buffer.isBuffer(r))throw new Error("encryptedData must be a Buffer");return new Promise((e,o)=>{(0,hi.pbkdf2)(t,"saltysalt",1003,16,"sha1",(i,s)=>{try{if(i){o(new Error("Failed to derive key: "+i.message));return}let n=py(r);if(n.length%16!==0){o(new Error("Encrypted data length is not a multiple of 16"));return}let f=Buffer.alloc(16," "),l=(0,hi.createDecipheriv)("aes-128-cbc",s,f);l.setAutoPadding(!1);let u=l.update(n);try{l.final()}catch(d){o(new Error("Failed to finalize decryption: "+d.message));return}u=hy(u);let h=u.toString("utf8");e(cy(h))}catch(n){o(new Error("Decryption failed: "+n.message))}})})}ce();Qt();var _p=at(async()=>{if(process.platform!=="darwin")throw F("Chrome password retrieval failed",new Error("This only works on macOS"),{platform:process.platform}),new Error("This only works on macOS");try{let{getChromePassword:r}=await Promise.resolve().then(()=>(Rp(),Pp)),t=await r();return St("ChromePassword","Retrieved password successfully",{platform:"macOS"}),t}catch(r){throw F("Chrome password retrieval failed",r,{platform:"macOS"}),r}});function yy(r){return typeof r!="number"||r<=0?"Infinity":new Date(r)}function Dp(r,t,e,o,i,s){return{domain:r,name:t,value:e,expiry:yy(o),meta:{file:i,browser:"Chrome",decrypted:s}}}var ci=class{constructor(){this.logger=Ql("ChromeCookieQueryStrategy");this.browserName="Chrome"}async queryCookies(t,e){try{if(this.logger.info("Querying cookies",{name:t,domain:e}),process.platform!=="darwin")return this.logger.warn("Platform not supported",{platform:process.platform}),[];let i=Cp().map(f=>f),s=await _p(),n=await Bo(i,f=>this.processFile(f,t,e,s),[]);return jo("Cookie query",!0,{count:n.length}),n}catch(o){return F("Failed to query cookies",o,{name:t,domain:e}),[]}}async processFile(t,e,o,i){try{let s=await eu({name:e,domain:o,file:t}),n={file:t,password:i};return(await Promise.allSettled(s.map(l=>this.processCookie(l,n)))).map(l=>l.status==="fulfilled"?l.value:null).filter(l=>l!==null)}catch(s){return this.logger.error("Failed to process cookie file",{error:s,file:t}),[]}}async processCookie(t,e){try{let o=Buffer.isBuffer(t.value)?t.value:Buffer.from(String(t.value)),i=await Ep(o,e.password);return Dp(t.domain,t.name,i,t.expiry,e.file,!0)}catch(o){return this.logger.warn("Failed to decrypt cookie",{error:o}),Dp(t.domain,t.name,t.value.toString("utf-8"),t.expiry,e.file,!1)}}};var ws=require("path");Qt();function wy(){let r=[],t=process.env.HOME;if(typeof t!="string"||t.length===0)return Wo("FirefoxCookieQuery","HOME environment variable not set"),r;let e=[(0,ws.join)(t,"Library/Application Support/Firefox/Profiles/*/cookies.sqlite"),(0,ws.join)(t,".mozilla/firefox/*/cookies.sqlite")];for(let o of e){let i=eo(o);r.push(...i)}return St("FirefoxCookieQuery","Found Firefox cookie files",{files:r}),r}var mi=class{constructor(){this.browserName="Firefox"}async queryCookies(t,e){let o=wy(),i=[];for(let s of o)try{let n=await Uo({file:s,sql:"SELECT name, value, host as domain, expiry FROM moz_cookies WHERE name = ? AND host LIKE ?",params:[t,`%${e}%`],rowTransform:f=>({name:f.name,value:f.value,domain:f.domain,expiry:f.expiry>0?new Date(f.expiry*1e3):"Infinity",meta:{file:s,browser:"Firefox",decrypted:!1}})});i.push(...n)}catch(n){n instanceof Error?Wo("FirefoxCookieQuery",`Error reading Firefox cookie file ${s}`,{error:n.message}):Wo("FirefoxCookieQuery",`Error reading Firefox cookie file ${s}`)}return i}};var Lp=require("path");Qt();var Mp=require("fs");var by=1706047360;function di(r,t){let e=t;for(;e<r.length&&r[e]!==0;)e++;return[r.toString("utf8",t,e),e+1]}function Sy(r,t){let e=r.readUInt32LE(t),o=t+43,s=r.readUInt32LE(o)-by,n=t+56,[f,l]=di(r,n);n=l;let[u,h]=di(r,n);n=h;let[d,m]=di(r,n);n=m;let[y,b]=di(r,n);return[{name:u,value:y,domain:f.startsWith(".")?f.slice(1):f,path:d||"/",expiry:s,creation:s},e]}function vy(r,t,e){let o=t+5,i=r.readUInt32BE(o),s=t+i,n=[],f=t+e;for(;s<f-8;)try{let[l,u]=Sy(r,s);n.push(l),s+=u}catch(l){console.warn(`Error decoding cookie at offset ${s}:`,l);break}return n}function Ip(r){let t=(0,Mp.readFileSync)(r),e=t.readUInt32BE(4),o=[];for(let n=0;n<e;n++)o.push(t.readUInt32BE(8+n*4));let i=8+e*4,s=[];for(let n=0;n<e;n++)try{let f=vy(t,i,o[n]);s.push(...f),i+=o[n]}catch(f){console.warn(`Error decoding page ${n}:`,f),i+=o[n]}return s}var gi=class{constructor(){this.browserName="Safari"}getHomeDir(){let t=process.env.HOME;return typeof t!="string"||t.trim()===""?(F("SafariCookieQueryStrategy","HOME environment variable is not set"),null):t}getCookieDbPath(t){return(0,Lp.join)(t,"Library","Containers","com.apple.Safari","Data","Library","Cookies","Cookies.binarycookies")}decodeCookies(t,e,o){try{return Ip(t).filter(s=>s.name===e&&s.domain.includes(o)).map(s=>({domain:s.domain,name:s.name,value:s.value.toString(),expiry:typeof s.expiry=="number"&&s.expiry>0?new Date(s.expiry*1e3):"Infinity",meta:{file:t,browser:"Safari",decrypted:!1}}))}catch(i){return i instanceof Error?F("SafariCookieQueryStrategy",`Error decoding ${t}`,{error:i,name:e,domain:o}):F("SafariCookieQueryStrategy",`Error decoding ${t}`,{error:"Unknown error",name:e,domain:o}),[]}}async queryCookies(t,e){let o=this.getHomeDir();if(typeof o!="string"||o.length===0)return Promise.resolve([]);let i=this.getCookieDbPath(o);return Promise.resolve(this.decodeCookies(i,t,e))}};var xi=class{constructor(){this.browserName="all";this.strategies=[ci,mi,gi]}async queryCookies(t,e){return O.info(`Querying cookies for name: ${t}, domain: ${e}`),Bo(this.strategies,async o=>{try{return await new o().queryCookies(t,e)}catch(i){return i instanceof Error?O.error(`Error querying ${o.name}: ${i.message}`):O.error(`Error querying ${o.name}: Unknown error`),[]}})}};function Cy(r){return r.expiry==="Infinity"?{...r,expiry:"Infinity"}:typeof r.expiry=="number"?{...r,expiry:new Date(r.expiry*1e3)}:r}async function Np(r,t={}){var n;let e=(n=t.strategy)!=null?n:new xi,o=async f=>(await e.queryCookies(f.name,f.domain)).map(Cy),i=Array.isArray(r)?await Promise.all(r.map(o)):await o(r),s=Array.isArray(i)?i.flat():i;if(t.removeExpired===!0){let f=Date.now();s=s.filter(l=>l.expiry==="Infinity"||l.expiry instanceof Date&&l.expiry.getTime()>f)}return typeof t.limit=="number"&&t.limit>0&&(s=s.slice(0,t.limit)),s}function bs(r,t=!1){if(r.length===0)return"No cookies found.";let e=[];e.push(`Found ${r.length} cookie${r.length===1?"":"s"}:`);for(let o of r)if(e.push(`- ${o.name}=${o.value}`),t){if(e.push(` Domain: ${o.domain}`),o.expiry!==void 0){let i=typeof o.expiry=="number"||o.expiry==="Infinity"?o.expiry:o.expiry.toISOString();e.push(` Expires: ${i}`)}o.meta&&e.push(` Metadata: ${JSON.stringify(o.meta,null,2)}`)}return e.join(`
5
- `)}ae();function Ey(r){O.log(r)}function ky(r){let t=Fo(r,e=>{var o,i;return(i=(o=e.meta)==null?void 0:o.file)!=null?i:"unknown"});O.log(JSON.stringify(t,null,2))}function Oy(r){O.log(bs(r))}function Ty(r){let t=Fo(r,e=>{var o,i;return(i=(o=e.meta)==null?void 0:o.file)!=null?i:"unknown"});for(let[e,o]of Object.entries(t))O.log(`${e}: ${bs(o)}`)}function Ay(r){O.log(JSON.stringify(r,null,2))}function Py(r){let t=new Set(r.map(e=>e.value));for(let e of t)O.log(e)}function Ry(r){return r.dump===!0||r.d===!0}function _y(r){return r["dump-grouped"]===!0||r.D===!0}function Dy(r){return r.render===!0||r["render-merged"]===!0||r.r===!0}function My(r){return r["render-grouped"]===!0||r.R===!0}function Iy(r,t){if(Ry(t)){Ey(r);return}if(_y(t)){ky(r);return}if(Dy(t)){Oy(r);return}if(My(t)){Ty(r);return}if(t.output==="json"){Ay(r);return}Py(r)}async function Fp(r,t,e,o,i,s){try{let n=await Np(r,{limit:i,removeExpired:s});if(n.length===0){O.error("No results");return}Iy(n,o)}catch(n){n instanceof Error?O.error(n.message):O.error("An unknown error occurred")}}function Ly(){O.log("Usage: get-cookie [name] [domain] [options]"),O.log("Options:"),O.log(" -h, --help: Show this help message"),O.log(" -v, --verbose: Enable verbose output"),O.log(" -d, --dump: Dump all results"),O.log(" -D, --dump-grouped: Dump all results, grouped by profile"),O.log(" -r, --render: Render all results"),O.log(" -u, --url: URL to extract cookie specs from"),O.log(" -n, --name: Cookie name pattern"),O.log(" -d, --domain: Cookie domain pattern"),O.log(" --output: Output format (e.g., json)")}function Ny(r,t){return{name:r||"%",domain:t||"%"}}function Fy(r,t){let e=r.url;if(typeof e=="string")return ks(e);let o=r.name||t[0]||"%",i=r.domain||t[1]||"%";return[Ny(o,i)]}async function By(r,t){let e=Fy(r,t);r.verbose===!0&&O.log("cookieSpecs",e);try{await Fp(e,["chrome","firefox","safari"],["default"],{...r})}catch(o){o instanceof Error?O.error("Error querying cookies:",o.message):O.error("An unknown error occurred while querying cookies")}}async function jy(){let r=process.argv.slice(2),{values:t,positionals:e}=Ts(r);if(t.help===!0){Ly();return}await By(t,e)}jy().catch(r=>{r instanceof Error?O.error("Fatal error:",r.message):O.error("An unknown fatal error occurred"),process.exit(1)});
4
+ >>> no match, partial?`,t,m,e,y),m===l))}let x;if(typeof h=="string"?(x=d===h,this.debug("string match",h,d,x)):(x=h.test(d),this.debug("pattern match",h,d,x)),!x)return!1}if(n===l&&f===u)return!0;if(n===l)return o;if(f===u)return n===l-1&&t[n]==="";throw new Error("wtf?")}braceExpand(){return Iu(this.pattern,this.options)}parse(t){yr(t);let e=this.options;if(t==="**")return q;if(t==="")return"";let o,i=null;(o=t.match(Rx))?i=e.dot?Mx:Dx:(o=t.match(Sx))?i=(e.nocase?e.dot?kx:Ex:e.dot?Cx:vx)(o[1]):(o=t.match(Ix))?i=(e.nocase?e.dot?Fx:Lx:e.dot?Nx:Bx)(o):(o=t.match(Ox))?i=e.dot?Ax:Tx:(o=t.match(Px))&&(i=_x);let s=He.fromGlob(t,this.options).toMMPattern();return i&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:i}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let e=this.options,o=e.noglobstar?Ux:e.dot?$x:Gx,i=new Set(e.nocase?["i"]:[]),s=t.map(l=>{let u=l.map(h=>{if(h instanceof RegExp)for(let d of h.flags.split(""))i.add(d);return typeof h=="string"?Qx(h):h===q?q:h._src});return u.forEach((h,d)=>{let m=u[d+1],y=u[d-1];h!==q||y===q||(y===void 0?m!==void 0&&m!==q?u[d+1]="(?:\\/|"+o+"\\/)?"+m:u[d]=o:m===void 0?u[d-1]=y+"(?:\\/|"+o+")?":m!==q&&(u[d-1]=y+"(?:\\/|\\/"+o+"\\/)"+m,u[d+1]=q))}),u.filter(h=>h!==q).join("/")}).join("|"),[n,f]=t.length>1?["(?:",")"]:["",""];s="^"+n+s+f+"$",this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...i].join(""))}catch(l){this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&e)return!0;let o=this.options;this.isWindows&&(t=t.split("\\").join("/"));let i=this.slashSplit(t);this.debug(this.pattern,"split",i);let s=this.set;this.debug(this.pattern,"set",s);let n=i[i.length-1];if(!n)for(let f=i.length-2;!n&&f>=0;f--)n=i[f];for(let f=0;f<s.length;f++){let l=s[f],u=i;if(o.matchBase&&l.length===1&&(u=[n]),this.matchOne(u,l,e))return o.flipNegate?!0:!this.negate}return o.flipNegate?!1:this.negate}static defaults(t){return Y.defaults(t).Minimatch}};Y.AST=He;Y.Minimatch=rt;Y.escape=qe;Y.unescape=dt;var Cp=require("url");var bs=require("lru-cache"),Ze=require("path"),lp=require("url"),At=require("fs"),iy=ke(require("fs"),1),oe=require("fs/promises");var Zo=require("events"),us=ke(require("stream"),1),ip=require("string_decoder");var Lu=typeof process=="object"&&process?process:{stdout:null,stderr:null},Vx=r=>!!r&&typeof r=="object"&&(r instanceof ee||r instanceof us.default||Jx(r)||Yx(r)),Jx=r=>!!r&&typeof r=="object"&&r instanceof Zo.EventEmitter&&typeof r.pipe=="function"&&r.pipe!==us.default.Writable.prototype.pipe,Yx=r=>!!r&&typeof r=="object"&&r instanceof Zo.EventEmitter&&typeof r.write=="function"&&typeof r.end=="function",It=Symbol("EOF"),Lt=Symbol("maybeEmitEnd"),te=Symbol("emittedEnd"),zo=Symbol("emittingEnd"),Sr=Symbol("emittedError"),Ko=Symbol("closed"),Fu=Symbol("read"),Qo=Symbol("flush"),Nu=Symbol("flushChunk"),gt=Symbol("encoding"),ze=Symbol("decoder"),U=Symbol("flowing"),vr=Symbol("paused"),Ke=Symbol("resume"),$=Symbol("buffer"),Z=Symbol("pipes"),G=Symbol("bufferLength"),is=Symbol("bufferPush"),Vo=Symbol("bufferShift"),K=Symbol("objectMode"),M=Symbol("destroyed"),ss=Symbol("error"),ns=Symbol("emitData"),Bu=Symbol("emitEnd"),as=Symbol("emitEnd2"),Et=Symbol("async"),fs=Symbol("abort"),Jo=Symbol("aborted"),Cr=Symbol("signal"),xe=Symbol("dataListeners"),ot=Symbol("discarded"),Er=r=>Promise.resolve().then(r),Zx=r=>r(),Xx=r=>r==="end"||r==="finish"||r==="prefinish",ty=r=>r instanceof ArrayBuffer||!!r&&typeof r=="object"&&r.constructor&&r.constructor.name==="ArrayBuffer"&&r.byteLength>=0,ey=r=>!Buffer.isBuffer(r)&&ArrayBuffer.isView(r),Yo=class{constructor(t,e,o){c(this,"src");c(this,"dest");c(this,"opts");c(this,"ondrain");this.src=t,this.dest=e,this.opts=o,this.ondrain=()=>t[Ke](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},ls=class extends Yo{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,e,o){super(t,e,o),this.proxyErrors=i=>e.emit("error",i),t.on("error",this.proxyErrors)}},ry=r=>!!r.objectMode,oy=r=>!r.objectMode&&!!r.encoding&&r.encoding!=="buffer",ju,Wu,Uu,$u,Gu,Hu,qu,zu,Ku,Qu,Vu,Ju,Yu,Zu,Xu,tp,ep,rp,op,ee=class extends Zo.EventEmitter{constructor(...e){let o=e[0]||{};super();c(this,op,!1);c(this,rp,!1);c(this,ep,[]);c(this,tp,[]);c(this,Xu);c(this,Zu);c(this,Yu);c(this,Ju);c(this,Vu,!1);c(this,Qu,!1);c(this,Ku,!1);c(this,zu,!1);c(this,qu,null);c(this,Hu,0);c(this,Gu,!1);c(this,$u);c(this,Uu,!1);c(this,Wu,0);c(this,ju,!1);c(this,"writable",!0);c(this,"readable",!0);if(o.objectMode&&typeof o.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");ry(o)?(this[K]=!0,this[gt]=null):oy(o)?(this[gt]=o.encoding,this[K]=!1):(this[K]=!1,this[gt]=null),this[Et]=!!o.async,this[ze]=this[gt]?new ip.StringDecoder(this[gt]):null,o&&o.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[$]}),o&&o.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[Z]});let{signal:i}=o;i&&(this[Cr]=i,i.aborted?this[fs]():i.addEventListener("abort",()=>this[fs]()))}get bufferLength(){return this[G]}get encoding(){return this[gt]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[K]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[Et]}set async(e){this[Et]=this[Et]||!!e}[(op=U,rp=vr,ep=Z,tp=$,Xu=K,Zu=gt,Yu=Et,Ju=ze,Vu=It,Qu=te,Ku=zo,zu=Ko,qu=Sr,Hu=G,Gu=M,$u=Cr,Uu=Jo,Wu=xe,ju=ot,fs)](){var e,o;this[Jo]=!0,this.emit("abort",(e=this[Cr])==null?void 0:e.reason),this.destroy((o=this[Cr])==null?void 0:o.reason)}get aborted(){return this[Jo]}set aborted(e){}write(e,o,i){var n;if(this[Jo])return!1;if(this[It])throw new Error("write after end");if(this[M])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof o=="function"&&(i=o,o="utf8"),o||(o="utf8");let s=this[Et]?Er:Zx;if(!this[K]&&!Buffer.isBuffer(e)){if(ey(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(ty(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[K]?(this[U]&&this[G]!==0&&this[Qo](!0),this[U]?this.emit("data",e):this[is](e),this[G]!==0&&this.emit("readable"),i&&s(i),this[U]):e.length?(typeof e=="string"&&!(o===this[gt]&&!((n=this[ze])!=null&&n.lastNeed))&&(e=Buffer.from(e,o)),Buffer.isBuffer(e)&&this[gt]&&(e=this[ze].write(e)),this[U]&&this[G]!==0&&this[Qo](!0),this[U]?this.emit("data",e):this[is](e),this[G]!==0&&this.emit("readable"),i&&s(i),this[U]):(this[G]!==0&&this.emit("readable"),i&&s(i),this[U])}read(e){if(this[M])return null;if(this[ot]=!1,this[G]===0||e===0||e&&e>this[G])return this[Lt](),null;this[K]&&(e=null),this[$].length>1&&!this[K]&&(this[$]=[this[gt]?this[$].join(""):Buffer.concat(this[$],this[G])]);let o=this[Fu](e||null,this[$][0]);return this[Lt](),o}[Fu](e,o){if(this[K])this[Vo]();else{let i=o;e===i.length||e===null?this[Vo]():typeof i=="string"?(this[$][0]=i.slice(e),o=i.slice(0,e),this[G]-=e):(this[$][0]=i.subarray(e),o=i.subarray(0,e),this[G]-=e)}return this.emit("data",o),!this[$].length&&!this[It]&&this.emit("drain"),o}end(e,o,i){return typeof e=="function"&&(i=e,e=void 0),typeof o=="function"&&(i=o,o="utf8"),e!==void 0&&this.write(e,o),i&&this.once("end",i),this[It]=!0,this.writable=!1,(this[U]||!this[vr])&&this[Lt](),this}[Ke](){this[M]||(!this[xe]&&!this[Z].length&&(this[ot]=!0),this[vr]=!1,this[U]=!0,this.emit("resume"),this[$].length?this[Qo]():this[It]?this[Lt]():this.emit("drain"))}resume(){return this[Ke]()}pause(){this[U]=!1,this[vr]=!0,this[ot]=!1}get destroyed(){return this[M]}get flowing(){return this[U]}get paused(){return this[vr]}[is](e){this[K]?this[G]+=1:this[G]+=e.length,this[$].push(e)}[Vo](){return this[K]?this[G]-=1:this[G]-=this[$][0].length,this[$].shift()}[Qo](e=!1){do;while(this[Nu](this[Vo]())&&this[$].length);!e&&!this[$].length&&!this[It]&&this.emit("drain")}[Nu](e){return this.emit("data",e),this[U]}pipe(e,o){if(this[M])return e;this[ot]=!1;let i=this[te];return o=o||{},e===Lu.stdout||e===Lu.stderr?o.end=!1:o.end=o.end!==!1,o.proxyErrors=!!o.proxyErrors,i?o.end&&e.end():(this[Z].push(o.proxyErrors?new ls(this,e,o):new Yo(this,e,o)),this[Et]?Er(()=>this[Ke]()):this[Ke]()),e}unpipe(e){let o=this[Z].find(i=>i.dest===e);o&&(this[Z].length===1?(this[U]&&this[xe]===0&&(this[U]=!1),this[Z]=[]):this[Z].splice(this[Z].indexOf(o),1),o.unpipe())}addListener(e,o){return this.on(e,o)}on(e,o){let i=super.on(e,o);if(e==="data")this[ot]=!1,this[xe]++,!this[Z].length&&!this[U]&&this[Ke]();else if(e==="readable"&&this[G]!==0)super.emit("readable");else if(Xx(e)&&this[te])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[Sr]){let s=o;this[Et]?Er(()=>s.call(this,this[Sr])):s.call(this,this[Sr])}return i}removeListener(e,o){return this.off(e,o)}off(e,o){let i=super.off(e,o);return e==="data"&&(this[xe]=this.listeners("data").length,this[xe]===0&&!this[ot]&&!this[Z].length&&(this[U]=!1)),i}removeAllListeners(e){let o=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[xe]=0,!this[ot]&&!this[Z].length&&(this[U]=!1)),o}get emittedEnd(){return this[te]}[Lt](){!this[zo]&&!this[te]&&!this[M]&&this[$].length===0&&this[It]&&(this[zo]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Ko]&&this.emit("close"),this[zo]=!1)}emit(e,...o){let i=o[0];if(e!=="error"&&e!=="close"&&e!==M&&this[M])return!1;if(e==="data")return!this[K]&&!i?!1:this[Et]?(Er(()=>this[ns](i)),!0):this[ns](i);if(e==="end")return this[Bu]();if(e==="close"){if(this[Ko]=!0,!this[te]&&!this[M])return!1;let n=super.emit("close");return this.removeAllListeners("close"),n}else if(e==="error"){this[Sr]=i,super.emit(ss,i);let n=!this[Cr]||this.listeners("error").length?super.emit("error",i):!1;return this[Lt](),n}else if(e==="resume"){let n=super.emit("resume");return this[Lt](),n}else if(e==="finish"||e==="prefinish"){let n=super.emit(e);return this.removeAllListeners(e),n}let s=super.emit(e,...o);return this[Lt](),s}[ns](e){for(let i of this[Z])i.dest.write(e)===!1&&this.pause();let o=this[ot]?!1:super.emit("data",e);return this[Lt](),o}[Bu](){return this[te]?!1:(this[te]=!0,this.readable=!1,this[Et]?(Er(()=>this[as]()),!0):this[as]())}[as](){if(this[ze]){let o=this[ze].end();if(o){for(let i of this[Z])i.dest.write(o);this[ot]||super.emit("data",o)}}for(let o of this[Z])o.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[K]||(e.dataLength=0);let o=this.promise();return this.on("data",i=>{e.push(i),this[K]||(e.dataLength+=i.length)}),await o,e}async concat(){if(this[K])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[gt]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,o)=>{this.on(M,()=>o(new Error("stream destroyed"))),this.on("error",i=>o(i)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[ot]=!1;let e=!1,o=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return o();let s=this.read();if(s!==null)return Promise.resolve({done:!1,value:s});if(this[It])return o();let n,f,l=m=>{this.off("data",u),this.off("end",h),this.off(M,d),o(),f(m)},u=m=>{this.off("error",l),this.off("end",h),this.off(M,d),this.pause(),n({value:m,done:!!this[It]})},h=()=>{this.off("error",l),this.off("data",u),this.off(M,d),o(),n({done:!0,value:void 0})},d=()=>l(new Error("stream destroyed"));return new Promise((m,y)=>{f=y,n=m,this.once(M,d),this.once("error",l),this.once("end",h),this.once("data",u)})},throw:o,return:o,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[ot]=!1;let e=!1,o=()=>(this.pause(),this.off(ss,o),this.off(M,o),this.off("end",o),e=!0,{done:!0,value:void 0}),i=()=>{if(e)return o();let s=this.read();return s===null?o():{done:!1,value:s}};return this.once("end",o),this.once(ss,o),this.once(M,o),{next:i,throw:o,return:o,[Symbol.iterator](){return this}}}destroy(e){if(this[M])return e?this.emit("error",e):this.emit(M),this;this[M]=!0,this[ot]=!0,this[$].length=0,this[G]=0;let o=this;return typeof o.close=="function"&&!this[Ko]&&o.close(),e?this.emit("error",e):this.emit(M),this}static get isStream(){return Vx}};var sy=At.realpathSync.native,Or={lstatSync:At.lstatSync,readdir:At.readdir,readdirSync:At.readdirSync,readlinkSync:At.readlinkSync,realpathSync:sy,promises:{lstat:oe.lstat,readdir:oe.readdir,readlink:oe.readlink,realpath:oe.realpath}},up=r=>!r||r===Or||r===iy?Or:{...Or,...r,promises:{...Or.promises,...r.promises||{}}},pp=/^\\\\\?\\([a-z]:)\\?$/i,ny=r=>r.replace(/\//g,"\\").replace(pp,"$1\\"),ay=/[\\\/]/,pt=0,hp=1,cp=2,kt=4,mp=6,dp=8,ye=10,gp=12,ut=15,kr=~ut,ps=16,sp=32,Tr=64,xt=128,Xo=256,ei=512,np=Tr|xt|ei,fy=1023,hs=r=>r.isFile()?dp:r.isDirectory()?kt:r.isSymbolicLink()?ye:r.isCharacterDevice()?cp:r.isBlockDevice()?mp:r.isSocket()?gp:r.isFIFO()?hp:pt,ap=new Map,Ar=r=>{let t=ap.get(r);if(t)return t;let e=r.normalize("NFKD");return ap.set(r,e),e},fp=new Map,ti=r=>{let t=fp.get(r);if(t)return t;let e=Ar(r.toLowerCase());return fp.set(r,e),e},si=class extends bs.LRUCache{constructor(){super({max:256})}},cs=class extends bs.LRUCache{constructor(t=16*1024){super({maxSize:t,sizeCalculation:e=>e.length+1})}},xp=Symbol("PathScurry setAsCwd"),X,Dr,Mr,Ir,Lr,Fr,Nr,Br,jr,Wr,Ur,$r,Gr,Hr,qr,zr,Kr,Qr,Vr,re,we,Ot,Ft,Nt,Bt,k,be,jt,Tt,v,ms,ri,Pr,ds,gs,_r,oi,xs,ys,ii,yp,wp,bp,ws,Qe,Ve,Sp,Se,Q=class{constructor(t,e=pt,o,i,s,n,f){w(this,v);c(this,"name");c(this,"root");c(this,"roots");c(this,"parent");c(this,"nocase");c(this,"isCWD",!1);w(this,X);w(this,Dr);w(this,Mr);w(this,Ir);w(this,Lr);w(this,Fr);w(this,Nr);w(this,Br);w(this,jr);w(this,Wr);w(this,Ur);w(this,$r);w(this,Gr);w(this,Hr);w(this,qr);w(this,zr);w(this,Kr);w(this,Qr);w(this,Vr);w(this,re);w(this,we);w(this,Ot);w(this,Ft);w(this,Nt);w(this,Bt);w(this,k);w(this,be);w(this,jt);w(this,Tt);w(this,Qe,[]);w(this,Ve,!1);w(this,Se);this.name=t,g(this,re,s?ti(t):Ar(t)),g(this,k,e&fy),this.nocase=s,this.roots=i,this.root=o||this,g(this,be,n),g(this,Ot,f.fullpath),g(this,Nt,f.relative),g(this,Bt,f.relativePosix),this.parent=f.parent,this.parent?g(this,X,a(this.parent,X)):g(this,X,up(f.fs))}get dev(){return a(this,Dr)}get mode(){return a(this,Mr)}get nlink(){return a(this,Ir)}get uid(){return a(this,Lr)}get gid(){return a(this,Fr)}get rdev(){return a(this,Nr)}get blksize(){return a(this,Br)}get ino(){return a(this,jr)}get size(){return a(this,Wr)}get blocks(){return a(this,Ur)}get atimeMs(){return a(this,$r)}get mtimeMs(){return a(this,Gr)}get ctimeMs(){return a(this,Hr)}get birthtimeMs(){return a(this,qr)}get atime(){return a(this,zr)}get mtime(){return a(this,Kr)}get ctime(){return a(this,Qr)}get birthtime(){return a(this,Vr)}get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}depth(){return a(this,we)!==void 0?a(this,we):this.parent?g(this,we,this.parent.depth()+1):g(this,we,0)}childrenCache(){return a(this,be)}resolve(t){var n;if(!t)return this;let e=this.getRootString(t),i=t.substring(e.length).split(this.splitSep);return e?S(n=this.getRoot(e),v,ms).call(n,i):S(this,v,ms).call(this,i)}children(){let t=a(this,be).get(this);if(t)return t;let e=Object.assign([],{provisional:0});return a(this,be).set(this,e),g(this,k,a(this,k)&~ps),e}child(t,e){if(t===""||t===".")return this;if(t==="..")return this.parent||this;let o=this.children(),i=this.nocase?ti(t):Ar(t);for(let l of o)if(a(l,re)===i)return l;let s=this.parent?this.sep:"",n=a(this,Ot)?a(this,Ot)+s+t:void 0,f=this.newChild(t,pt,{...e,parent:this,fullpath:n});return this.canReaddir()||g(f,k,a(f,k)|xt),o.push(f),f}relative(){if(this.isCWD)return"";if(a(this,Nt)!==void 0)return a(this,Nt);let t=this.name,e=this.parent;if(!e)return g(this,Nt,this.name);let o=e.relative();return o+(!o||!e.parent?"":this.sep)+t}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(a(this,Bt)!==void 0)return a(this,Bt);let t=this.name,e=this.parent;if(!e)return g(this,Bt,this.fullpathPosix());let o=e.relativePosix();return o+(!o||!e.parent?"":"/")+t}fullpath(){if(a(this,Ot)!==void 0)return a(this,Ot);let t=this.name,e=this.parent;if(!e)return g(this,Ot,this.name);let i=e.fullpath()+(e.parent?this.sep:"")+t;return g(this,Ot,i)}fullpathPosix(){if(a(this,Ft)!==void 0)return a(this,Ft);if(this.sep==="/")return g(this,Ft,this.fullpath());if(!this.parent){let i=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(i)?g(this,Ft,`//?/${i}`):g(this,Ft,i)}let t=this.parent,e=t.fullpathPosix(),o=e+(!e||!t.parent?"":"/")+this.name;return g(this,Ft,o)}isUnknown(){return(a(this,k)&ut)===pt}isType(t){return this[`is${t}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(a(this,k)&ut)===dp}isDirectory(){return(a(this,k)&ut)===kt}isCharacterDevice(){return(a(this,k)&ut)===cp}isBlockDevice(){return(a(this,k)&ut)===mp}isFIFO(){return(a(this,k)&ut)===hp}isSocket(){return(a(this,k)&ut)===gp}isSymbolicLink(){return(a(this,k)&ye)===ye}lstatCached(){return a(this,k)&sp?this:void 0}readlinkCached(){return a(this,jt)}realpathCached(){return a(this,Tt)}readdirCached(){let t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(a(this,jt))return!0;if(!this.parent)return!1;let t=a(this,k)&ut;return!(t!==pt&&t!==ye||a(this,k)&Xo||a(this,k)&xt)}calledReaddir(){return!!(a(this,k)&ps)}isENOENT(){return!!(a(this,k)&xt)}isNamed(t){return this.nocase?a(this,re)===ti(t):a(this,re)===Ar(t)}async readlink(){var e;let t=a(this,jt);if(t)return t;if(this.canReadlink()&&this.parent)try{let o=await a(this,X).promises.readlink(this.fullpath()),i=(e=await this.parent.realpath())==null?void 0:e.resolve(o);if(i)return g(this,jt,i)}catch(o){S(this,v,ys).call(this,o.code);return}}readlinkSync(){var e;let t=a(this,jt);if(t)return t;if(this.canReadlink()&&this.parent)try{let o=a(this,X).readlinkSync(this.fullpath()),i=(e=this.parent.realpathSync())==null?void 0:e.resolve(o);if(i)return g(this,jt,i)}catch(o){S(this,v,ys).call(this,o.code);return}}async lstat(){if(!(a(this,k)&xt))try{return S(this,v,ws).call(this,await a(this,X).promises.lstat(this.fullpath())),this}catch(t){S(this,v,xs).call(this,t.code)}}lstatSync(){if(!(a(this,k)&xt))try{return S(this,v,ws).call(this,a(this,X).lstatSync(this.fullpath())),this}catch(t){S(this,v,xs).call(this,t.code)}}readdirCB(t,e=!1){if(!this.canReaddir()){e?t(null,[]):queueMicrotask(()=>t(null,[]));return}let o=this.children();if(this.calledReaddir()){let s=o.slice(0,o.provisional);e?t(null,s):queueMicrotask(()=>t(null,s));return}if(a(this,Qe).push(t),a(this,Ve))return;g(this,Ve,!0);let i=this.fullpath();a(this,X).readdir(i,{withFileTypes:!0},(s,n)=>{if(s)S(this,v,oi).call(this,s.code),o.provisional=0;else{for(let f of n)S(this,v,ii).call(this,f,o);S(this,v,ri).call(this,o)}S(this,v,Sp).call(this,o.slice(0,o.provisional))})}async readdir(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();if(a(this,Se))await a(this,Se);else{let o=()=>{};g(this,Se,new Promise(i=>o=i));try{for(let i of await a(this,X).promises.readdir(e,{withFileTypes:!0}))S(this,v,ii).call(this,i,t);S(this,v,ri).call(this,t)}catch(i){S(this,v,oi).call(this,i.code),t.provisional=0}g(this,Se,void 0),o()}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();try{for(let o of a(this,X).readdirSync(e,{withFileTypes:!0}))S(this,v,ii).call(this,o,t);S(this,v,ri).call(this,t)}catch(o){S(this,v,oi).call(this,o.code),t.provisional=0}return t.slice(0,t.provisional)}canReaddir(){if(a(this,k)&np)return!1;let t=ut&a(this,k);return t===pt||t===kt||t===ye}shouldWalk(t,e){return(a(this,k)&kt)===kt&&!(a(this,k)&np)&&!t.has(this)&&(!e||e(this))}async realpath(){if(a(this,Tt))return a(this,Tt);if(!((ei|Xo|xt)&a(this,k)))try{let t=await a(this,X).promises.realpath(this.fullpath());return g(this,Tt,this.resolve(t))}catch(t){S(this,v,gs).call(this)}}realpathSync(){if(a(this,Tt))return a(this,Tt);if(!((ei|Xo|xt)&a(this,k)))try{let t=a(this,X).realpathSync(this.fullpath());return g(this,Tt,this.resolve(t))}catch(t){S(this,v,gs).call(this)}}[xp](t){if(t===this)return;t.isCWD=!1,this.isCWD=!0;let e=new Set([]),o=[],i=this;for(;i&&i.parent;)e.add(i),g(i,Nt,o.join(this.sep)),g(i,Bt,o.join("/")),i=i.parent,o.push("..");for(i=t;i&&i.parent&&!e.has(i);)g(i,Nt,void 0),g(i,Bt,void 0),i=i.parent}};X=new WeakMap,Dr=new WeakMap,Mr=new WeakMap,Ir=new WeakMap,Lr=new WeakMap,Fr=new WeakMap,Nr=new WeakMap,Br=new WeakMap,jr=new WeakMap,Wr=new WeakMap,Ur=new WeakMap,$r=new WeakMap,Gr=new WeakMap,Hr=new WeakMap,qr=new WeakMap,zr=new WeakMap,Kr=new WeakMap,Qr=new WeakMap,Vr=new WeakMap,re=new WeakMap,we=new WeakMap,Ot=new WeakMap,Ft=new WeakMap,Nt=new WeakMap,Bt=new WeakMap,k=new WeakMap,be=new WeakMap,jt=new WeakMap,Tt=new WeakMap,v=new WeakSet,ms=function(t){let e=this;for(let o of t)e=e.child(o);return e},ri=function(t){var e;g(this,k,a(this,k)|ps);for(let o=t.provisional;o<t.length;o++){let i=t[o];i&&S(e=i,v,Pr).call(e)}},Pr=function(){a(this,k)&xt||(g(this,k,(a(this,k)|xt)&kr),S(this,v,ds).call(this))},ds=function(){var e;let t=this.children();t.provisional=0;for(let o of t)S(e=o,v,Pr).call(e)},gs=function(){g(this,k,a(this,k)|ei),S(this,v,_r).call(this)},_r=function(){if(a(this,k)&Tr)return;let t=a(this,k);(t&ut)===kt&&(t&=kr),g(this,k,t|Tr),S(this,v,ds).call(this)},oi=function(t=""){t==="ENOTDIR"||t==="EPERM"?S(this,v,_r).call(this):t==="ENOENT"?S(this,v,Pr).call(this):this.children().provisional=0},xs=function(t=""){var e;if(t==="ENOTDIR"){let o=this.parent;S(e=o,v,_r).call(e)}else t==="ENOENT"&&S(this,v,Pr).call(this)},ys=function(t=""){var o;let e=a(this,k);e|=Xo,t==="ENOENT"&&(e|=xt),(t==="EINVAL"||t==="UNKNOWN")&&(e&=kr),g(this,k,e),t==="ENOTDIR"&&this.parent&&S(o=this.parent,v,_r).call(o)},ii=function(t,e){return S(this,v,wp).call(this,t,e)||S(this,v,yp).call(this,t,e)},yp=function(t,e){let o=hs(t),i=this.newChild(t.name,o,{parent:this}),s=a(i,k)&ut;return s!==kt&&s!==ye&&s!==pt&&g(i,k,a(i,k)|Tr),e.unshift(i),e.provisional++,i},wp=function(t,e){for(let o=e.provisional;o<e.length;o++){let i=e[o];if((this.nocase?ti(t.name):Ar(t.name))===a(i,re))return S(this,v,bp).call(this,t,i,o,e)}},bp=function(t,e,o,i){let s=e.name;return g(e,k,a(e,k)&kr|hs(t)),s!==t.name&&(e.name=t.name),o!==i.provisional&&(o===i.length-1?i.pop():i.splice(o,1),i.unshift(e)),i.provisional++,e},ws=function(t){let{atime:e,atimeMs:o,birthtime:i,birthtimeMs:s,blksize:n,blocks:f,ctime:l,ctimeMs:u,dev:h,gid:d,ino:m,mode:y,mtime:b,mtimeMs:x,nlink:C,rdev:E,size:T,uid:A}=t;g(this,zr,e),g(this,$r,o),g(this,Vr,i),g(this,qr,s),g(this,Br,n),g(this,Ur,f),g(this,Qr,l),g(this,Hr,u),g(this,Dr,h),g(this,Fr,d),g(this,jr,m),g(this,Mr,y),g(this,Kr,b),g(this,Gr,x),g(this,Ir,C),g(this,Nr,E),g(this,Wr,T),g(this,Lr,A);let _=hs(t);g(this,k,a(this,k)&kr|_|sp),_!==pt&&_!==kt&&_!==ye&&g(this,k,a(this,k)|Tr)},Qe=new WeakMap,Ve=new WeakMap,Sp=function(t){g(this,Ve,!1);let e=a(this,Qe).slice();a(this,Qe).length=0,e.forEach(o=>o(null,t))},Se=new WeakMap;var ni=class r extends Q{constructor(e,o=pt,i,s,n,f,l){super(e,o,i,s,n,f,l);c(this,"sep","\\");c(this,"splitSep",ay)}newChild(e,o=pt,i={}){return new r(e,o,this.root,this.roots,this.nocase,this.childrenCache(),i)}getRootString(e){return Ze.win32.parse(e).root}getRoot(e){if(e=ny(e.toUpperCase()),e===this.root.name)return this.root;for(let[o,i]of Object.entries(this.roots))if(this.sameRoot(e,o))return this.roots[e]=i;return this.roots[e]=new Xe(e,this).root}sameRoot(e,o=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(pp,"$1\\"),e===o}},ai=class r extends Q{constructor(e,o=pt,i,s,n,f,l){super(e,o,i,s,n,f,l);c(this,"splitSep","/");c(this,"sep","/")}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,o=pt,i={}){return new r(e,o,this.root,this.roots,this.nocase,this.childrenCache(),i)}},Je,Ye,Jr,Yr,fi=class{constructor(t=process.cwd(),e,o,{nocase:i,childrenCacheSize:s=16*1024,fs:n=Or}={}){c(this,"root");c(this,"rootPath");c(this,"roots");c(this,"cwd");w(this,Je);w(this,Ye);w(this,Jr);c(this,"nocase");w(this,Yr);g(this,Yr,up(n)),(t instanceof URL||t.startsWith("file://"))&&(t=(0,lp.fileURLToPath)(t));let f=e.resolve(t);this.roots=Object.create(null),this.rootPath=this.parseRootPath(f),g(this,Je,new si),g(this,Ye,new si),g(this,Jr,new cs(s));let l=f.substring(this.rootPath.length).split(o);if(l.length===1&&!l[0]&&l.pop(),i===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(a(this,Yr)),this.roots[this.rootPath]=this.root;let u=this.root,h=l.length-1,d=e.sep,m=this.rootPath,y=!1;for(let b of l){let x=h--;u=u.child(b,{relative:new Array(x).fill("..").join(d),relativePosix:new Array(x).fill("..").join("/"),fullpath:m+=(y?"":d)+b}),y=!0}this.cwd=u}depth(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.depth()}childrenCache(){return a(this,Jr)}resolve(...t){let e="";for(let s=t.length-1;s>=0;s--){let n=t[s];if(!(!n||n===".")&&(e=e?`${n}/${e}`:n,this.isAbsolute(n)))break}let o=a(this,Je).get(e);if(o!==void 0)return o;let i=this.cwd.resolve(e).fullpath();return a(this,Je).set(e,i),i}resolvePosix(...t){let e="";for(let s=t.length-1;s>=0;s--){let n=t[s];if(!(!n||n===".")&&(e=e?`${n}/${e}`:n,this.isAbsolute(n)))break}let o=a(this,Ye).get(e);if(o!==void 0)return o;let i=this.cwd.resolve(e).fullpathPosix();return a(this,Ye).set(e,i),i}relative(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relative()}relativePosix(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relativePosix()}basename(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.name}dirname(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),(t.parent||t).fullpath()}async readdir(t=this.cwd,e={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t,t=this.cwd);let{withFileTypes:o}=e;if(t.canReaddir()){let i=await t.readdir();return o?i:i.map(s=>s.name)}else return[]}readdirSync(t=this.cwd,e={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t,t=this.cwd);let{withFileTypes:o=!0}=e;return t.canReaddir()?o?t.readdirSync():t.readdirSync().map(i=>i.name):[]}async lstat(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstat()}lstatSync(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t.withFileTypes,t=this.cwd);let o=await t.readlink();return e?o:o==null?void 0:o.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t.withFileTypes,t=this.cwd);let o=t.readlinkSync();return e?o:o==null?void 0:o.fullpath()}async realpath(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t.withFileTypes,t=this.cwd);let o=await t.realpath();return e?o:o==null?void 0:o.fullpath()}realpathSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t.withFileTypes,t=this.cwd);let o=t.realpathSync();return e?o:o==null?void 0:o.fullpath()}async walk(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t,t=this.cwd);let{withFileTypes:o=!0,follow:i=!1,filter:s,walkFilter:n}=e,f=[];(!s||s(t))&&f.push(o?t:t.fullpath());let l=new Set,u=(d,m)=>{l.add(d),d.readdirCB((y,b)=>{if(y)return m(y);let x=b.length;if(!x)return m();let C=()=>{--x===0&&m()};for(let E of b)(!s||s(E))&&f.push(o?E:E.fullpath()),i&&E.isSymbolicLink()?E.realpath().then(T=>T!=null&&T.isUnknown()?T.lstat():T).then(T=>T!=null&&T.shouldWalk(l,n)?u(T,C):C()):E.shouldWalk(l,n)?u(E,C):C()},!0)},h=t;return new Promise((d,m)=>{u(h,y=>{if(y)return m(y);d(f)})})}walkSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t,t=this.cwd);let{withFileTypes:o=!0,follow:i=!1,filter:s,walkFilter:n}=e,f=[];(!s||s(t))&&f.push(o?t:t.fullpath());let l=new Set([t]);for(let u of l){let h=u.readdirSync();for(let d of h){(!s||s(d))&&f.push(o?d:d.fullpath());let m=d;if(d.isSymbolicLink()){if(!(i&&(m=d.realpathSync())))continue;m.isUnknown()&&m.lstatSync()}m.shouldWalk(l,n)&&l.add(m)}}return f}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,e={}){return typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t,t=this.cwd),this.stream(t,e)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t,t=this.cwd);let{withFileTypes:o=!0,follow:i=!1,filter:s,walkFilter:n}=e;(!s||s(t))&&(yield o?t:t.fullpath());let f=new Set([t]);for(let l of f){let u=l.readdirSync();for(let h of u){(!s||s(h))&&(yield o?h:h.fullpath());let d=h;if(h.isSymbolicLink()){if(!(i&&(d=h.realpathSync())))continue;d.isUnknown()&&d.lstatSync()}d.shouldWalk(f,n)&&f.add(d)}}}stream(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t,t=this.cwd);let{withFileTypes:o=!0,follow:i=!1,filter:s,walkFilter:n}=e,f=new ee({objectMode:!0});(!s||s(t))&&f.write(o?t:t.fullpath());let l=new Set,u=[t],h=0,d=()=>{let m=!1;for(;!m;){let y=u.shift();if(!y){h===0&&f.end();return}h++,l.add(y);let b=(C,E,T=!1)=>{if(C)return f.emit("error",C);if(i&&!T){let A=[];for(let _ of E)_.isSymbolicLink()&&A.push(_.realpath().then(N=>N!=null&&N.isUnknown()?N.lstat():N));if(A.length){Promise.all(A).then(()=>b(null,E,!0));return}}for(let A of E)A&&(!s||s(A))&&(f.write(o?A:A.fullpath())||(m=!0));h--;for(let A of E){let _=A.realpathCached()||A;_.shouldWalk(l,n)&&u.push(_)}m&&!f.flowing?f.once("drain",d):x||d()},x=!0;y.readdirCB(b,!0),x=!1}};return d(),f}streamSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Q||(e=t,t=this.cwd);let{withFileTypes:o=!0,follow:i=!1,filter:s,walkFilter:n}=e,f=new ee({objectMode:!0}),l=new Set;(!s||s(t))&&f.write(o?t:t.fullpath());let u=[t],h=0,d=()=>{let m=!1;for(;!m;){let y=u.shift();if(!y){h===0&&f.end();return}h++,l.add(y);let b=y.readdirSync();for(let x of b)(!s||s(x))&&(f.write(o?x:x.fullpath())||(m=!0));h--;for(let x of b){let C=x;if(x.isSymbolicLink()){if(!(i&&(C=x.realpathSync())))continue;C.isUnknown()&&C.lstatSync()}C.shouldWalk(l,n)&&u.push(C)}}m&&!f.flowing&&f.once("drain",d)};return d(),f}chdir(t=this.cwd){let e=this.cwd;this.cwd=typeof t=="string"?this.cwd.resolve(t):t,this.cwd[xp](e)}};Je=new WeakMap,Ye=new WeakMap,Jr=new WeakMap,Yr=new WeakMap;var Xe=class extends fi{constructor(e=process.cwd(),o={}){let{nocase:i=!0}=o;super(e,Ze.win32,"\\",{...o,nocase:i});c(this,"sep","\\");this.nocase=i;for(let s=this.cwd;s;s=s.parent)s.nocase=this.nocase}parseRootPath(e){return Ze.win32.parse(e).root.toUpperCase()}newRoot(e){return new ni(this.rootPath,kt,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},tr=class extends fi{constructor(e=process.cwd(),o={}){let{nocase:i=!1}=o;super(e,Ze.posix,"/",{...o,nocase:i});c(this,"sep","/");this.nocase=i}parseRootPath(e){return"/"}newRoot(e){return new ai(this.rootPath,kt,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},Rr=class extends tr{constructor(t=process.cwd(),e={}){let{nocase:o=!0}=e;super(t,{...e,nocase:o})}},bO=process.platform==="win32"?ni:ai,vp=process.platform==="win32"?Xe:process.platform==="darwin"?Rr:tr;var ly=r=>r.length>=1,uy=r=>r.length>=1,j,it,H,ve,yt,Zr,ie,se,ne,er,Ss=class Ss{constructor(t,e,o,i){w(this,j);w(this,it);w(this,H);c(this,"length");w(this,ve);w(this,yt);w(this,Zr);w(this,ie);w(this,se);w(this,ne);w(this,er,!0);if(!ly(t))throw new TypeError("empty pattern list");if(!uy(e))throw new TypeError("empty glob list");if(e.length!==t.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=t.length,o<0||o>=this.length)throw new TypeError("index out of range");if(g(this,j,t),g(this,it,e),g(this,H,o),g(this,ve,i),a(this,H)===0){if(this.isUNC()){let[s,n,f,l,...u]=a(this,j),[h,d,m,y,...b]=a(this,it);u[0]===""&&(u.shift(),b.shift());let x=[s,n,f,l,""].join("/"),C=[h,d,m,y,""].join("/");g(this,j,[x,...u]),g(this,it,[C,...b]),this.length=a(this,j).length}else if(this.isDrive()||this.isAbsolute()){let[s,...n]=a(this,j),[f,...l]=a(this,it);n[0]===""&&(n.shift(),l.shift());let u=s+"/",h=f+"/";g(this,j,[u,...n]),g(this,it,[h,...l]),this.length=a(this,j).length}}}pattern(){return a(this,j)[a(this,H)]}isString(){return typeof a(this,j)[a(this,H)]=="string"}isGlobstar(){return a(this,j)[a(this,H)]===q}isRegExp(){return a(this,j)[a(this,H)]instanceof RegExp}globString(){return g(this,Zr,a(this,Zr)||(a(this,H)===0?this.isAbsolute()?a(this,it)[0]+a(this,it).slice(1).join("/"):a(this,it).join("/"):a(this,it).slice(a(this,H)).join("/")))}hasMore(){return this.length>a(this,H)+1}rest(){return a(this,yt)!==void 0?a(this,yt):this.hasMore()?(g(this,yt,new Ss(a(this,j),a(this,it),a(this,H)+1,a(this,ve))),g(a(this,yt),ne,a(this,ne)),g(a(this,yt),se,a(this,se)),g(a(this,yt),ie,a(this,ie)),a(this,yt)):g(this,yt,null)}isUNC(){let t=a(this,j);return a(this,se)!==void 0?a(this,se):g(this,se,a(this,ve)==="win32"&&a(this,H)===0&&t[0]===""&&t[1]===""&&typeof t[2]=="string"&&!!t[2]&&typeof t[3]=="string"&&!!t[3])}isDrive(){let t=a(this,j);return a(this,ie)!==void 0?a(this,ie):g(this,ie,a(this,ve)==="win32"&&a(this,H)===0&&this.length>1&&typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]))}isAbsolute(){let t=a(this,j);return a(this,ne)!==void 0?a(this,ne):g(this,ne,t[0]===""&&t.length>1||this.isDrive()||this.isUNC())}root(){let t=a(this,j)[0];return typeof t=="string"&&this.isAbsolute()&&a(this,H)===0?t:""}checkFollowGlobstar(){return!(a(this,H)===0||!this.isGlobstar()||!a(this,er))}markFollowGlobstar(){return a(this,H)===0||!this.isGlobstar()||!a(this,er)?!1:(g(this,er,!1),!0)}};j=new WeakMap,it=new WeakMap,H=new WeakMap,ve=new WeakMap,yt=new WeakMap,Zr=new WeakMap,ie=new WeakMap,se=new WeakMap,ne=new WeakMap,er=new WeakMap;var rr=Ss;var py=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",or=class{constructor(t,{nobrace:e,nocase:o,noext:i,noglobstar:s,platform:n=py}){c(this,"relative");c(this,"relativeChildren");c(this,"absolute");c(this,"absoluteChildren");c(this,"platform");c(this,"mmopts");this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=n,this.mmopts={dot:!0,nobrace:e,nocase:o,noext:i,noglobstar:s,optimizationLevel:2,platform:n,nocomment:!0,nonegate:!0};for(let f of t)this.add(f)}add(t){let e=new rt(t,this.mmopts);for(let o=0;o<e.set.length;o++){let i=e.set[o],s=e.globParts[o];if(!i||!s)throw new Error("invalid pattern object");for(;i[0]==="."&&s[0]===".";)i.shift(),s.shift();let n=new rr(i,s,0,this.platform),f=new rt(n.globString(),this.mmopts),l=s[s.length-1]==="**",u=n.isAbsolute();u?this.absolute.push(f):this.relative.push(f),l&&(u?this.absoluteChildren.push(f):this.relativeChildren.push(f))}}ignored(t){let e=t.fullpath(),o=`${e}/`,i=t.relative()||".",s=`${i}/`;for(let n of this.relative)if(n.match(i)||n.match(s))return!0;for(let n of this.absolute)if(n.match(e)||n.match(o))return!0;return!1}childrenIgnored(t){let e=t.fullpath()+"/",o=(t.relative()||".")+"/";for(let i of this.relativeChildren)if(i.match(o))return!0;for(let i of this.absoluteChildren)if(i.match(e))return!0;return!1}};var vs=class r{constructor(t=new Map){c(this,"store");this.store=t}copy(){return new r(new Map(this.store))}hasWalked(t,e){var o;return(o=this.store.get(t.fullpath()))==null?void 0:o.has(e.globString())}storeWalked(t,e){let o=t.fullpath(),i=this.store.get(o);i?i.add(e.globString()):this.store.set(o,new Set([e.globString()]))}},Cs=class{constructor(){c(this,"store",new Map)}add(t,e,o){let i=(e?2:0)|(o?1:0),s=this.store.get(t);this.store.set(t,s===void 0?i:i&s)}entries(){return[...this.store.entries()].map(([t,e])=>[t,!!(e&2),!!(e&1)])}},Es=class{constructor(){c(this,"store",new Map)}add(t,e){if(!t.canReaddir())return;let o=this.store.get(t);o?o.find(i=>i.globString()===e.globString())||o.push(e):this.store.set(t,[e])}get(t){let e=this.store.get(t);if(!e)throw new Error("attempting to walk unknown path");return e}entries(){return this.keys().map(t=>[t,this.store.get(t)])}keys(){return[...this.store.keys()].filter(t=>t.canReaddir())}},Xr=class r{constructor(t,e){c(this,"hasWalkedCache");c(this,"matches",new Cs);c(this,"subwalks",new Es);c(this,"patterns");c(this,"follow");c(this,"dot");c(this,"opts");this.opts=t,this.follow=!!t.follow,this.dot=!!t.dot,this.hasWalkedCache=e?e.copy():new vs}processPatterns(t,e){this.patterns=e;let o=e.map(i=>[t,i]);for(let[i,s]of o){this.hasWalkedCache.storeWalked(i,s);let n=s.root(),f=s.isAbsolute()&&this.opts.absolute!==!1;if(n){i=i.resolve(n==="/"&&this.opts.root!==void 0?this.opts.root:n);let d=s.rest();if(d)s=d;else{this.matches.add(i,!0,!1);continue}}if(i.isENOENT())continue;let l,u,h=!1;for(;typeof(l=s.pattern())=="string"&&(u=s.rest());)i=i.resolve(l),s=u,h=!0;if(l=s.pattern(),u=s.rest(),h){if(this.hasWalkedCache.hasWalked(i,s))continue;this.hasWalkedCache.storeWalked(i,s)}if(typeof l=="string"){let d=l===".."||l===""||l===".";this.matches.add(i.resolve(l),f,d);continue}else if(l===q){(!i.isSymbolicLink()||this.follow||s.checkFollowGlobstar())&&this.subwalks.add(i,s);let d=u==null?void 0:u.pattern(),m=u==null?void 0:u.rest();if(!u||(d===""||d===".")&&!m)this.matches.add(i,f,d===""||d===".");else if(d===".."){let y=i.parent||i;m?this.hasWalkedCache.hasWalked(y,m)||this.subwalks.add(y,m):this.matches.add(y,f,!0)}}else l instanceof RegExp&&this.subwalks.add(i,s)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new r(this.opts,this.hasWalkedCache)}filterEntries(t,e){let o=this.subwalks.get(t),i=this.child();for(let s of e)for(let n of o){let f=n.isAbsolute(),l=n.pattern(),u=n.rest();l===q?i.testGlobstar(s,n,u,f):l instanceof RegExp?i.testRegExp(s,l,u,f):i.testString(s,l,u,f)}return i}testGlobstar(t,e,o,i){if((this.dot||!t.name.startsWith("."))&&(e.hasMore()||this.matches.add(t,i,!1),t.canReaddir()&&(this.follow||!t.isSymbolicLink()?this.subwalks.add(t,e):t.isSymbolicLink()&&(o&&e.checkFollowGlobstar()?this.subwalks.add(t,o):e.markFollowGlobstar()&&this.subwalks.add(t,e)))),o){let s=o.pattern();if(typeof s=="string"&&s!==".."&&s!==""&&s!==".")this.testString(t,s,o.rest(),i);else if(s===".."){let n=t.parent||t;this.subwalks.add(n,o)}else s instanceof RegExp&&this.testRegExp(t,s,o.rest(),i)}}testRegExp(t,e,o,i){e.test(t.name)&&(o?this.subwalks.add(t,o):this.matches.add(t,i,!1))}testString(t,e,o,i){t.isNamed(e)&&(o?this.subwalks.add(t,o):this.matches.add(t,i,!1))}};var hy=(r,t)=>typeof r=="string"?new or([r],t):Array.isArray(r)?new or(r,t):r,ir,Wt,Ee,ht,Ce,ks,li=class{constructor(t,e,o){w(this,ht);c(this,"path");c(this,"patterns");c(this,"opts");c(this,"seen",new Set);c(this,"paused",!1);c(this,"aborted",!1);w(this,ir,[]);w(this,Wt);w(this,Ee);c(this,"signal");c(this,"maxDepth");c(this,"includeChildMatches");var i;if(this.patterns=t,this.path=e,this.opts=o,g(this,Ee,!o.posix&&o.platform==="win32"?"\\":"/"),this.includeChildMatches=o.includeChildMatches!==!1,(o.ignore||!this.includeChildMatches)&&(g(this,Wt,hy((i=o.ignore)!=null?i:[],o)),!this.includeChildMatches&&typeof a(this,Wt).add!="function")){let s="cannot ignore child matches, ignore lacks add() method.";throw new Error(s)}this.maxDepth=o.maxDepth||1/0,o.signal&&(this.signal=o.signal,this.signal.addEventListener("abort",()=>{a(this,ir).length=0}))}pause(){this.paused=!0}resume(){var e;if((e=this.signal)!=null&&e.aborted)return;this.paused=!1;let t;for(;!this.paused&&(t=a(this,ir).shift());)t()}onResume(t){var e;(e=this.signal)!=null&&e.aborted||(this.paused?a(this,ir).push(t):t())}async matchCheck(t,e){if(e&&this.opts.nodir)return;let o;if(this.opts.realpath){if(o=t.realpathCached()||await t.realpath(),!o)return;t=o}let s=t.isUnknown()||this.opts.stat?await t.lstat():t;if(this.opts.follow&&this.opts.nodir&&(s!=null&&s.isSymbolicLink())){let n=await s.realpath();n&&(n.isUnknown()||this.opts.stat)&&await n.lstat()}return this.matchCheckTest(s,e)}matchCheckTest(t,e){var o;return t&&(this.maxDepth===1/0||t.depth()<=this.maxDepth)&&(!e||t.canReaddir())&&(!this.opts.nodir||!t.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!t.isSymbolicLink()||!((o=t.realpathCached())!=null&&o.isDirectory()))&&!S(this,ht,Ce).call(this,t)?t:void 0}matchCheckSync(t,e){if(e&&this.opts.nodir)return;let o;if(this.opts.realpath){if(o=t.realpathCached()||t.realpathSync(),!o)return;t=o}let s=t.isUnknown()||this.opts.stat?t.lstatSync():t;if(this.opts.follow&&this.opts.nodir&&(s!=null&&s.isSymbolicLink())){let n=s.realpathSync();n&&(n!=null&&n.isUnknown()||this.opts.stat)&&n.lstatSync()}return this.matchCheckTest(s,e)}matchFinish(t,e){var s;if(S(this,ht,Ce).call(this,t))return;if(!this.includeChildMatches&&((s=a(this,Wt))!=null&&s.add)){let n=`${t.relativePosix()}/**`;a(this,Wt).add(n)}let o=this.opts.absolute===void 0?e:this.opts.absolute;this.seen.add(t);let i=this.opts.mark&&t.isDirectory()?a(this,Ee):"";if(this.opts.withFileTypes)this.matchEmit(t);else if(o){let n=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(n+i)}else{let n=this.opts.posix?t.relativePosix():t.relative(),f=this.opts.dotRelative&&!n.startsWith(".."+a(this,Ee))?"."+a(this,Ee):"";this.matchEmit(n?f+n+i:"."+i)}}async match(t,e,o){let i=await this.matchCheck(t,o);i&&this.matchFinish(i,e)}matchSync(t,e,o){let i=this.matchCheckSync(t,o);i&&this.matchFinish(i,e)}walkCB(t,e,o){var i;(i=this.signal)!=null&&i.aborted&&o(),this.walkCB2(t,e,new Xr(this.opts),o)}walkCB2(t,e,o,i){var f;if(S(this,ht,ks).call(this,t))return i();if((f=this.signal)!=null&&f.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2(t,e,o,i));return}o.processPatterns(t,e);let s=1,n=()=>{--s===0&&i()};for(let[l,u,h]of o.matches.entries())S(this,ht,Ce).call(this,l)||(s++,this.match(l,u,h).then(()=>n()));for(let l of o.subwalkTargets()){if(this.maxDepth!==1/0&&l.depth()>=this.maxDepth)continue;s++;let u=l.readdirCached();l.calledReaddir()?this.walkCB3(l,u,o,n):l.readdirCB((h,d)=>this.walkCB3(l,d,o,n),!0)}n()}walkCB3(t,e,o,i){o=o.filterEntries(t,e);let s=1,n=()=>{--s===0&&i()};for(let[f,l,u]of o.matches.entries())S(this,ht,Ce).call(this,f)||(s++,this.match(f,l,u).then(()=>n()));for(let[f,l]of o.subwalks.entries())s++,this.walkCB2(f,l,o.child(),n);n()}walkCBSync(t,e,o){var i;(i=this.signal)!=null&&i.aborted&&o(),this.walkCB2Sync(t,e,new Xr(this.opts),o)}walkCB2Sync(t,e,o,i){var f;if(S(this,ht,ks).call(this,t))return i();if((f=this.signal)!=null&&f.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2Sync(t,e,o,i));return}o.processPatterns(t,e);let s=1,n=()=>{--s===0&&i()};for(let[l,u,h]of o.matches.entries())S(this,ht,Ce).call(this,l)||this.matchSync(l,u,h);for(let l of o.subwalkTargets()){if(this.maxDepth!==1/0&&l.depth()>=this.maxDepth)continue;s++;let u=l.readdirSync();this.walkCB3Sync(l,u,o,n)}n()}walkCB3Sync(t,e,o,i){o=o.filterEntries(t,e);let s=1,n=()=>{--s===0&&i()};for(let[f,l,u]of o.matches.entries())S(this,ht,Ce).call(this,f)||this.matchSync(f,l,u);for(let[f,l]of o.subwalks.entries())s++,this.walkCB2Sync(f,l,o.child(),n);n()}};ir=new WeakMap,Wt=new WeakMap,Ee=new WeakMap,ht=new WeakSet,Ce=function(t){var e,o;return this.seen.has(t)||!!((o=(e=a(this,Wt))==null?void 0:e.ignored)!=null&&o.call(e,t))},ks=function(t){var e,o;return!!((o=(e=a(this,Wt))==null?void 0:e.childrenIgnored)!=null&&o.call(e,t))};var to=class extends li{constructor(e,o,i){super(e,o,i);c(this,"matches",new Set)}matchEmit(e){this.matches.add(e)}async walk(){var e;if((e=this.signal)!=null&&e.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((o,i)=>{this.walkCB(this.path,this.patterns,()=>{var s;(s=this.signal)!=null&&s.aborted?i(this.signal.reason):o(this.matches)})}),this.matches}walkSync(){var e;if((e=this.signal)!=null&&e.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{var o;if((o=this.signal)!=null&&o.aborted)throw this.signal.reason}),this.matches}},eo=class extends li{constructor(e,o,i){super(e,o,i);c(this,"results");this.results=new ee({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};var cy=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",wt=class{constructor(t,e){c(this,"absolute");c(this,"cwd");c(this,"root");c(this,"dot");c(this,"dotRelative");c(this,"follow");c(this,"ignore");c(this,"magicalBraces");c(this,"mark");c(this,"matchBase");c(this,"maxDepth");c(this,"nobrace");c(this,"nocase");c(this,"nodir");c(this,"noext");c(this,"noglobstar");c(this,"pattern");c(this,"platform");c(this,"realpath");c(this,"scurry");c(this,"stat");c(this,"signal");c(this,"windowsPathsNoEscape");c(this,"withFileTypes");c(this,"includeChildMatches");c(this,"opts");c(this,"patterns");if(!e)throw new TypeError("glob options required");if(this.withFileTypes=!!e.withFileTypes,this.signal=e.signal,this.follow=!!e.follow,this.dot=!!e.dot,this.dotRelative=!!e.dotRelative,this.nodir=!!e.nodir,this.mark=!!e.mark,e.cwd?(e.cwd instanceof URL||e.cwd.startsWith("file://"))&&(e.cwd=(0,Cp.fileURLToPath)(e.cwd)):this.cwd="",this.cwd=e.cwd||"",this.root=e.root,this.magicalBraces=!!e.magicalBraces,this.nobrace=!!e.nobrace,this.noext=!!e.noext,this.realpath=!!e.realpath,this.absolute=e.absolute,this.includeChildMatches=e.includeChildMatches!==!1,this.noglobstar=!!e.noglobstar,this.matchBase=!!e.matchBase,this.maxDepth=typeof e.maxDepth=="number"?e.maxDepth:1/0,this.stat=!!e.stat,this.ignore=e.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof t=="string"&&(t=[t]),this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(t=t.map(l=>l.replace(/\\/g,"/"))),this.matchBase){if(e.noglobstar)throw new TypeError("base matching requires globstar");t=t.map(l=>l.includes("/")?l:`./**/${l}`)}if(this.pattern=t,this.platform=e.platform||cy,this.opts={...e,platform:this.platform},e.scurry){if(this.scurry=e.scurry,e.nocase!==void 0&&e.nocase!==e.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let l=e.platform==="win32"?Xe:e.platform==="darwin"?Rr:e.platform?tr:vp;this.scurry=new l(this.cwd,{nocase:e.nocase,fs:e.fs})}this.nocase=this.scurry.nocase;let o=this.platform==="darwin"||this.platform==="win32",i={...e,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:o,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},s=this.pattern.map(l=>new rt(l,i)),[n,f]=s.reduce((l,u)=>(l[0].push(...u.set),l[1].push(...u.globParts),l),[[],[]]);this.patterns=n.map((l,u)=>{let h=f[u];if(!h)throw new Error("invalid pattern object");return new rr(l,h,0,this.platform)})}async walk(){return[...await new to(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new to(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new eo(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new eo(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};var Os=(r,t={})=>{Array.isArray(r)||(r=[r]);for(let e of r)if(new rt(e,t).hasMagic())return!0;return!1};function ui(r,t={}){return new wt(r,t).streamSync()}function Op(r,t={}){return new wt(r,t).stream()}function Tp(r,t={}){return new wt(r,t).walkSync()}async function Ep(r,t={}){return new wt(r,t).walk()}function pi(r,t={}){return new wt(r,t).iterateSync()}function Ap(r,t={}){return new wt(r,t).iterate()}var my=ui,dy=Object.assign(Op,{sync:ui}),gy=pi,xy=Object.assign(Ap,{sync:pi}),ro=Object.assign(Tp,{stream:ui,iterate:pi}),kp=Object.assign(Ep,{glob:Ep,globSync:Tp,sync:ro,globStream:Op,stream:dy,globStreamSync:ui,streamSync:my,globIterate:Ap,iterate:xy,globIterateSync:pi,iterateSync:gy,Glob:wt,hasMagic:Os,escape:qe,unescape:dt});kp.glob=kp;nt();var yy=O.withTag("listChromeProfiles");function Pp(){let r=ro("./**/Cookies",{cwd:Ge,absolute:!0});return yy.debug("Found cookie files:",r),r}var hi=require("crypto");Jt();var wy=ft(r=>r.length>=3&&r[0]===118&&r[1]===49&&r[2]===48?r.slice(3):r,r=>r.toString("hex")),by=ft(r=>{let t=r[r.length-1];return t&&t<=16?r.slice(0,-t):r},r=>r.toString("hex"));function Sy(r){var e;let t=[/.*?0t(.+)$/,/.*?1e`(.+)$/,/.*?[`'](.+)$/,/[^\x20-\x7E]*([\x20-\x7E].+)$/];for(let o of t){let i=r.match(o),s=(e=i==null?void 0:i[1])!=null?e:"";if(s.length>0)return s}return r}async function _p(r,t){if(typeof t!="string")throw new Error("password must be a string");if(!Buffer.isBuffer(r))throw new Error("encryptedData must be a Buffer");return new Promise((e,o)=>{(0,hi.pbkdf2)(t,"saltysalt",1003,16,"sha1",(i,s)=>{try{if(i){o(new Error("Failed to derive key: "+i.message));return}let n=wy(r);if(n.length%16!==0){o(new Error("Encrypted data length is not a multiple of 16"));return}let f=Buffer.alloc(16," "),l=(0,hi.createDecipheriv)("aes-128-cbc",s,f);l.setAutoPadding(!1);let u=l.update(n);try{l.final()}catch(d){o(new Error("Failed to finalize decryption: "+d.message));return}u=by(u);let h=u.toString("utf8");e(Sy(h))}catch(n){o(new Error("Decryption failed: "+n.message))}})})}Jt();Pt();var Np=ft(async()=>{if(process.platform!=="darwin")throw I("Chrome password retrieval failed",new Error("This only works on macOS"),{platform:process.platform}),new Error("This only works on macOS");try{let{getChromePassword:r}=await Promise.resolve().then(()=>(Fp(),Lp)),t=await r();return bt("ChromePassword","Retrieved password successfully",{platform:"macOS"}),t}catch(r){throw I("Chrome password retrieval failed",r,{platform:"macOS"}),r}});function Oy(r){return typeof r!="number"||r<=0?"Infinity":new Date(r)}function Bp(r,t,e,o,i,s){return{domain:r,name:t,value:e,expiry:Oy(o),meta:{file:i,browser:"Chrome",decrypted:s}}}var ci=class{constructor(){this.logger=so("ChromeCookieQueryStrategy");this.browserName="Chrome"}async queryCookies(t,e){try{if(this.logger.info("Querying cookies",{name:t,domain:e}),process.platform!=="darwin")return this.logger.warn("Platform not supported",{platform:process.platform}),[];let o=Pp();if(o.length===0)return this.logger.warn("No Chrome cookie files found"),[];let i=await Np();return(await Promise.all(o.map(n=>this.processFile(n,t,e,i)))).flat()}catch(o){return o instanceof Error?I("Failed to query cookies",o,{name:t,domain:e}):I("Failed to query cookies",new Error(String(o)),{name:t,domain:e}),[]}}async processFile(t,e,o,i){try{let s=await au({name:e,domain:o,file:t}),n={file:t,password:i};return(await Promise.allSettled(s.map(l=>this.processCookie(l,n)))).map(l=>l.status==="fulfilled"?l.value:null).filter(l=>l!==null)}catch(s){return s instanceof Error?this.logger.error("Failed to process cookie file",{error:s,file:t}):this.logger.error("Failed to process cookie file",{error:String(s),file:t}),[]}}async processCookie(t,e){try{let o=Buffer.isBuffer(t.value)?t.value:Buffer.from(String(t.value)),i=await _p(o,e.password);return Bp(t.domain,t.name,i,t.expiry,e.file,!0)}catch(o){return o instanceof Error?this.logger.warn("Failed to decrypt cookie",{error:o}):this.logger.warn("Failed to decrypt cookie",{error:String(o)}),Bp(t.domain,t.name,t.value.toString("utf-8"),t.expiry,e.file,!1)}}};async function jp(r,t,e=[]){return r.length===0?e:(await Promise.all(r.map(async i=>{try{return await t(i)}catch(s){return e}}))).flat()}Pt();var mi=class{constructor(t){this.strategies=t;this.logger=so("CompositeCookieQueryStrategy");this.browserName="internal"}handleStrategyError(t,e){t instanceof Error?this.logger.error("Strategy failed",{error:t,strategy:e}):this.logger.error("Strategy failed with unknown error",{error:String(t),strategy:e})}async queryCookies(t,e){try{return this.logger.info("Querying cookies from all strategies",{name:t,domain:e,strategyCount:this.strategies.length}),await jp(this.strategies,async o=>{try{return await o.queryCookies(t,e)}catch(i){return this.handleStrategyError(i,o),[]}},[])}catch(o){return o instanceof Error?this.logger.error("Failed to query cookies",{error:o}):this.logger.error("Failed to query cookies with unknown error",{error:String(o)}),[]}}};var Ts=require("path");Pt();function Ty(){let r=[],t=process.env.HOME;if(typeof t!="string"||t.length===0)return no("FirefoxCookieQuery","HOME environment variable not set"),r;let e=[(0,Ts.join)(t,"Library/Application Support/Firefox/Profiles/*/cookies.sqlite"),(0,Ts.join)(t,".mozilla/firefox/*/cookies.sqlite")];for(let o of e){let i=ro(o);r.push(...i)}return bt("FirefoxCookieQuery","Found Firefox cookie files",{files:r}),r}var di=class{constructor(){this.browserName="Firefox"}async queryCookies(t,e){let o=Ty(),i=[];for(let s of o)try{let n=await $o({file:s,sql:"SELECT name, value, host as domain, expiry FROM moz_cookies WHERE name = ? AND host LIKE ?",params:[t,`%${e}%`],rowTransform:f=>({name:f.name,value:f.value,domain:f.domain,expiry:f.expiry>0?new Date(f.expiry*1e3):"Infinity",meta:{file:s,browser:"Firefox",decrypted:!1}})});i.push(...n)}catch(n){n instanceof Error?no("FirefoxCookieQuery",`Error reading Firefox cookie file ${s}`,{error:n.message}):no("FirefoxCookieQuery",`Error reading Firefox cookie file ${s}`)}return i}};var $p=require("path");Pt();var Wp=require("fs");var Ay=1706047360;function gi(r,t){let e=t;for(;e<r.length&&r[e]!==0;)e++;return[r.toString("utf8",t,e),e+1]}function Py(r,t){let e=r.readUInt32LE(t),o=t+43,s=r.readUInt32LE(o)-Ay,n=t+56,[f,l]=gi(r,n);n=l;let[u,h]=gi(r,n);n=h;let[d,m]=gi(r,n);n=m;let[y,b]=gi(r,n);return[{name:u,value:y,domain:f.startsWith(".")?f.slice(1):f,path:d||"/",expiry:s,creation:s},e]}function _y(r,t,e){let o=t+5,i=r.readUInt32BE(o),s=t+i,n=[],f=t+e;for(;s<f-8;)try{let[l,u]=Py(r,s);n.push(l),s+=u}catch(l){console.warn(`Error decoding cookie at offset ${s}:`,l);break}return n}function Up(r){let t=(0,Wp.readFileSync)(r),e=t.readUInt32BE(4),o=[];for(let n=0;n<e;n++)o.push(t.readUInt32BE(8+n*4));let i=8+e*4,s=[];for(let n=0;n<e;n++)try{let f=_y(t,i,o[n]);s.push(...f),i+=o[n]}catch(f){console.warn(`Error decoding page ${n}:`,f),i+=o[n]}return s}var xi=class{constructor(){this.browserName="Safari"}getHomeDir(){let t=process.env.HOME;return typeof t!="string"||t.trim().length===0?(I("SafariCookieQueryStrategy","HOME environment variable not set"),""):t}getCookieDbPath(t){return(0,$p.join)(t,"Library","Containers","com.apple.Safari","Data","Library","Cookies","Cookies.binarycookies")}decodeCookies(t,e,o){try{return Up(t).filter(s=>s.name===e&&s.domain.includes(o)).map(s=>({domain:s.domain,name:s.name,value:s.value.toString(),expiry:typeof s.expiry=="number"&&s.expiry>0?new Date(s.expiry*1e3):"Infinity",meta:{file:t,browser:"Safari",decrypted:!1}}))}catch(i){return i instanceof Error?I("SafariCookieQueryStrategy",`Error decoding ${t}`,{error:i,name:e,domain:o}):I("SafariCookieQueryStrategy",`Error decoding ${t}`,{error:"Unknown error",name:e,domain:o}),[]}}async queryCookies(t,e){let o=this.getHomeDir();if(typeof o!="string"||o.length===0)return Promise.resolve([]);let i=this.getCookieDbPath(o);return Promise.resolve(this.decodeCookies(i,t,e))}};function Ry(r){return r.expiry===void 0?r:typeof r.expiry=="number"?{...r,expiry:new Date(r.expiry*1e3)}:r}async function Gp(r,t={}){var n;let e=(n=t.strategy)!=null?n:new mi([new ci,new di,new xi]),o=async f=>(await e.queryCookies(f.name,f.domain)).map(Ry),i=Array.isArray(r)?await Promise.all(r.map(o)):await o(r),s=Array.isArray(i)?i.flat():i;if(t.removeExpired===!0){let f=Date.now();s=s.filter(l=>l.expiry==="Infinity"||l.expiry instanceof Date&&l.expiry.getTime()>f)}return typeof t.limit=="number"&&t.limit>0&&(s=s.slice(0,t.limit)),s}nt();nt();var oo=class{canHandle(t){return!0}handle(t){let e=new Set(t.map(o=>o.value));for(let o of e)O.log(o)}};nt();var yi=class{canHandle(t){return t.dump===!0||t.d===!0}handle(t){O.log(t)}};Jt();nt();var wi=class{canHandle(t){return t["dump-grouped"]===!0||t.D===!0}handle(t){let e=gr(t,o=>{var i,s;return(s=(i=o.meta)==null?void 0:i.file)!=null?s:"unknown"});O.log(JSON.stringify(e,null,2))}};Jt();function bi(r,t={}){let{format:e="merged",showFilePaths:o=!0,separator:i="; "}=t;if(r.length===0)return e==="merged"?"":[];if(e==="merged")return r.map(n=>n.value).join(i);let s=gr(r,n=>{var f,l;return(l=(f=n.meta)==null?void 0:f.file)!=null?l:"unknown"});return Object.entries(s).map(([n,f])=>{let l=f.map(u=>u.value).join(i);return o?`${n}: ${l}`:l})}nt();var Si=class{canHandle(t){return t["render-grouped"]===!0||t.R===!0}handle(t){O.log(bi(t,{format:"grouped"}))}};nt();var vi=class{canHandle(t){return t.output==="json"}handle(t){O.log(JSON.stringify(t,null,2))}};nt();var Ci=class{canHandle(t){return t.render===!0||t["render-merged"]===!0||t.r===!0}handle(t){O.log(bi(t,{format:"merged"}))}};var Ei=class{constructor(){this.handlers=[new yi,new wi,new Ci,new Si,new vi,new oo]}getHandler(t){var e;return(e=this.handlers.find(o=>o.canHandle(t)))!=null?e:new oo}};async function Hp(r,t,e,o,i,s){try{let n=await Gp(r,{limit:i,removeExpired:s});if(n.length===0){O.error("No results");return}new Ei().getHandler(o).handle(n)}catch(n){n instanceof Error?O.error(n.message):O.error("An unknown error occurred")}}function Dy(){O.log("Usage: get-cookie [name] [domain] [options]"),O.log("Options:"),O.log(" -h, --help: Show this help message"),O.log(" -v, --verbose: Enable verbose output"),O.log(" -d, --dump: Dump all results"),O.log(" -D, --dump-grouped: Dump all results, grouped by profile"),O.log(" -r, --render: Render all results"),O.log(" -u, --url: URL to extract cookie specs from"),O.log(" -n, --name: Cookie name pattern"),O.log(" -d, --domain: Cookie domain pattern"),O.log(" --output: Output format (e.g., json)")}function My(r,t){return{name:r||"%",domain:t||"%"}}function Iy(r,t){let e=r.url;if(typeof e=="string"){let s=Oi(e);return Array.isArray(s)?s:(O.error("Invalid cookie specs from URL"),[])}let o=r.name||t[0]||"%",i=r.domain||t[1]||"%";return[My(o,i)]}async function Ly(r,t){let e=Iy(r,t);r.verbose===!0&&O.log("cookieSpecs",e);try{await Hp(e,["chrome","firefox","safari"],["default"],{...r})}catch(o){o instanceof Error?O.error("Error querying cookies:",o.message):O.error("An unknown error occurred while querying cookies")}}async function Fy(){let r=process.argv.slice(2),{values:t,positionals:e}=Ms(r);if(t.help===!0){Dy();return}await Ly(t,e)}Fy().catch(r=>{r instanceof Error?O.error("Fatal error:",r.message):O.error("An unknown fatal error occurred"),process.exit(1)});
6
5
  /*! Bundled license information:
7
6
 
8
7
  lodash-es/lodash.js: