@mherod/get-cookie 4.0.3 → 4.1.0

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 (59) 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-3FVH4L25.js +2 -0
  6. package/dist/chunk-3FVH4L25.js.map +1 -0
  7. package/dist/chunk-7XZ7PCDJ.js +2 -0
  8. package/dist/chunk-7XZ7PCDJ.js.map +1 -0
  9. package/dist/chunk-DVWQBWUF.js +4 -0
  10. package/dist/chunk-DVWQBWUF.js.map +1 -0
  11. package/dist/{chunk-VMBA4NVU.js → chunk-I6AYGFSQ.js} +2 -2
  12. package/dist/chunk-U27I5BLR.js +2 -0
  13. package/dist/chunk-U27I5BLR.js.map +1 -0
  14. package/dist/chunk-YOZOS2YM.js +2 -0
  15. package/dist/chunk-YOZOS2YM.js.map +1 -0
  16. package/dist/cli.cjs +3 -4
  17. package/dist/cli.cjs.map +1 -1
  18. package/dist/getChromeCookie-2ROVM47V.js +2 -0
  19. package/dist/getChromeCookie-2ROVM47V.js.map +1 -0
  20. package/dist/{getChromePassword-GTIXL733.js → getChromePassword-O452VQWI.js} +2 -2
  21. package/dist/getCookie-CRE6M3GI.js +2 -0
  22. package/dist/getFirefoxCookie-5P74VDC7.js +2 -0
  23. package/dist/getFirefoxCookie-5P74VDC7.js.map +1 -0
  24. package/dist/getGroupedRenderedCookies-DFEJTTC6.js +2 -0
  25. package/dist/getGroupedRenderedCookies-DFEJTTC6.js.map +1 -0
  26. package/dist/getMergedRenderedCookies-W5GSSHQQ.js +2 -0
  27. package/dist/getMergedRenderedCookies-W5GSSHQQ.js.map +1 -0
  28. package/dist/index.cjs +3 -3
  29. package/dist/index.cjs.map +1 -1
  30. package/dist/index.d.cts +164 -152
  31. package/dist/index.d.ts +164 -152
  32. package/dist/index.js +1 -1
  33. package/dist/index.js.map +1 -1
  34. package/eslint.config.js +2 -1
  35. package/package.json +23 -22
  36. package/typedoc.json +3 -8
  37. package/dist/chunk-5FUMK7M3.js +0 -4
  38. package/dist/chunk-5FUMK7M3.js.map +0 -1
  39. package/dist/chunk-5ZT2G45S.js +0 -2
  40. package/dist/chunk-5ZT2G45S.js.map +0 -1
  41. package/dist/chunk-FR2MKDHT.js +0 -2
  42. package/dist/chunk-FR2MKDHT.js.map +0 -1
  43. package/dist/chunk-HMKSQBDC.js +0 -2
  44. package/dist/chunk-HMKSQBDC.js.map +0 -1
  45. package/dist/chunk-W3JALMAX.js +0 -2
  46. package/dist/chunk-W3JALMAX.js.map +0 -1
  47. package/dist/getChromeCookie-4ZWACG6M.js +0 -2
  48. package/dist/getChromeCookie-4ZWACG6M.js.map +0 -1
  49. package/dist/getCookie-43FKMQEZ.js +0 -2
  50. package/dist/getFirefoxCookie-OJYYZFZP.js +0 -2
  51. package/dist/getFirefoxCookie-OJYYZFZP.js.map +0 -1
  52. package/dist/getGroupedRenderedCookies-P5VZXZUC.js +0 -2
  53. package/dist/getGroupedRenderedCookies-P5VZXZUC.js.map +0 -1
  54. package/dist/getMergedRenderedCookies-C6TXK2I4.js +0 -2
  55. package/dist/getMergedRenderedCookies-C6TXK2I4.js.map +0 -1
  56. package/tsup.config.ts +0 -27
  57. /package/dist/{chunk-VMBA4NVU.js.map → chunk-I6AYGFSQ.js.map} +0 -0
  58. /package/dist/{getChromePassword-GTIXL733.js.map → getChromePassword-O452VQWI.js.map} +0 -0
  59. /package/dist/{getCookie-43FKMQEZ.js.map → getCookie-CRE6M3GI.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(`
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)});
2
+ "use strict";var op=Object.create;var Zi=Object.defineProperty;var np=Object.getOwnPropertyDescriptor;var ap=Object.getOwnPropertyNames;var fp=Object.getPrototypeOf,lp=Object.prototype.hasOwnProperty;var Fn=r=>{throw TypeError(r)};var hp=(r,t,e)=>t in r?Zi(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var u=(r,t)=>()=>(r&&(t=r(r=0)),t);var Dn=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),up=(r,t)=>{for(var e in t)Zi(r,e,{get:t[e],enumerable:!0})},cp=(r,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of ap(t))!lp.call(r,s)&&s!==e&&Zi(r,s,{get:()=>t[s],enumerable:!(i=np(t,s))||i.enumerable});return r};var ze=(r,t,e)=>(e=r!=null?op(fp(r)):{},cp(t||!r||!r.__esModule?Zi(e,"default",{value:r,enumerable:!0}):e,r));var d=(r,t,e)=>hp(r,typeof t!="symbol"?t+"":t,e),vo=(r,t,e)=>t.has(r)||Fn("Cannot "+e);var n=(r,t,e)=>(vo(r,t,"read from private field"),e?e.call(r):t.get(r)),b=(r,t,e)=>t.has(r)?Fn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(r):t.set(r,e),c=(r,t,e,i)=>(vo(r,t,"write to private field"),i?i.call(r,e):t.set(r,e),e),y=(r,t,e)=>(vo(r,t,"access private method"),e);var Yi=(r,t,e,i)=>({set _(s){c(r,t,s,e)},get _(){return n(r,t,i)}});var In,dp,R,vt=u(()=>{"use strict";In=require("consola"),dp=(0,In.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}),R=dp});function Nn(r,t,e){let s=`${t?"\u2705":"\u274C"} ${r} ${t?"succeeded":"failed"}`;t?R.success(s,e):R.error(s,e)}function z(r,t,e){let i={...e!=null?e:{},error:t instanceof Error?{name:t.name,message:t.message,stack:t.stack}:t};R.error(r,i)}function qt(r,t,e){R.withTag(r).debug(t,e)}function Ji(r){return R.withTag(r)}function Xi(r,t,e){R.withTag(r).warn(t,e)}var ee=u(()=>{"use strict";vt();vt()});var mp,ts,Eo=u(()=>{"use strict";mp=typeof global=="object"&&global&&global.Object===Object&&global,ts=mp});var gp,yp,U,Pt=u(()=>{"use strict";Eo();gp=typeof self=="object"&&self&&self.Object===Object&&self,yp=ts||gp||Function("return this")(),U=yp});var xp,Ct,qr=u(()=>{"use strict";Pt();xp=U.Symbol,Ct=xp});function Sp(r){var t=wp.call(r,Kr),e=r[Kr];try{r[Kr]=void 0;var i=!0}catch(o){}var s=bp.call(r);return i&&(t?r[Kr]=e:delete r[Kr]),s}var Bn,wp,bp,Kr,jn,Wn=u(()=>{"use strict";qr();Bn=Object.prototype,wp=Bn.hasOwnProperty,bp=Bn.toString,Kr=Ct?Ct.toStringTag:void 0;jn=Sp});function Ep(r){return Cp.call(r)}var vp,Cp,zn,Un=u(()=>{"use strict";vp=Object.prototype,Cp=vp.toString;zn=Ep});function kp(r){return r==null?r===void 0?Ap:Op:Gn&&Gn in Object(r)?jn(r):zn(r)}var Op,Ap,Gn,dt,Ue=u(()=>{"use strict";qr();Wn();Un();Op="[object Null]",Ap="[object Undefined]",Gn=Ct?Ct.toStringTag:void 0;dt=kp});function Tp(r){return r!=null&&typeof r=="object"}var nt,de=u(()=>{"use strict";nt=Tp});function Rp(r){return typeof r=="symbol"||nt(r)&&dt(r)==_p}var _p,ar,es=u(()=>{"use strict";Ue();de();_p="[object Symbol]";ar=Rp});function Pp(r,t){for(var e=-1,i=r==null?0:r.length,s=Array(i);++e<i;)s[e]=t(r[e],e,r);return s}var $n,Hn=u(()=>{"use strict";$n=Pp});var Fp,B,Ft=u(()=>{"use strict";Fp=Array.isArray,B=Fp});function Qn(r){if(typeof r=="string")return r;if(B(r))return $n(r,Qn)+"";if(ar(r))return Kn?Kn.call(r):"";var t=r+"";return t=="0"&&1/r==-Dp?"-0":t}var Dp,qn,Kn,Vn,Zn=u(()=>{"use strict";qr();Hn();Ft();es();Dp=1/0,qn=Ct?Ct.prototype:void 0,Kn=qn?qn.toString:void 0;Vn=Qn});function Lp(r){var t=typeof r;return r!=null&&(t=="object"||t=="function")}var rt,re=u(()=>{"use strict";rt=Lp});function Mp(r){return r}var fr,rs=u(()=>{"use strict";fr=Mp});function Wp(r){if(!rt(r))return!1;var t=dt(r);return t==Np||t==Bp||t==Ip||t==jp}var Ip,Np,Bp,jp,lr,is=u(()=>{"use strict";Ue();re();Ip="[object AsyncFunction]",Np="[object Function]",Bp="[object GeneratorFunction]",jp="[object Proxy]";lr=Wp});var zp,ss,Yn=u(()=>{"use strict";Pt();zp=U["__core-js_shared__"],ss=zp});function Up(r){return!!Jn&&Jn in r}var Jn,Xn,ta=u(()=>{"use strict";Yn();Jn=function(){var r=/[^.]+$/.exec(ss&&ss.keys&&ss.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();Xn=Up});function Hp(r){if(r!=null){try{return $p.call(r)}catch(t){}try{return r+""}catch(t){}}return""}var Gp,$p,ie,Oo=u(()=>{"use strict";Gp=Function.prototype,$p=Gp.toString;ie=Hp});function Xp(r){if(!rt(r)||Xn(r))return!1;var t=lr(r)?Jp:Kp;return t.test(ie(r))}var qp,Kp,Qp,Vp,Zp,Yp,Jp,ea,ra=u(()=>{"use strict";is();ta();re();Oo();qp=/[\\^$.*+?()[\]{}|]/g,Kp=/^\[object .+?Constructor\]$/,Qp=Function.prototype,Vp=Object.prototype,Zp=Qp.toString,Yp=Vp.hasOwnProperty,Jp=RegExp("^"+Zp.call(Yp).replace(qp,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");ea=Xp});function td(r,t){return r==null?void 0:r[t]}var ia,sa=u(()=>{"use strict";ia=td});function ed(r,t){var e=ia(r,t);return ea(e)?e:void 0}var pt,me=u(()=>{"use strict";ra();sa();pt=ed});var rd,os,oa=u(()=>{"use strict";me();Pt();rd=pt(U,"WeakMap"),os=rd});var na,id,aa,fa=u(()=>{"use strict";re();na=Object.create,id=function(){function r(){}return function(t){if(!rt(t))return{};if(na)return na(t);r.prototype=t;var e=new r;return r.prototype=void 0,e}}(),aa=id});function sd(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 la,ha=u(()=>{"use strict";la=sd});function od(r,t){var e=-1,i=r.length;for(t||(t=Array(i));++e<i;)t[e]=r[e];return t}var ua,ca=u(()=>{"use strict";ua=od});function ld(r){var t=0,e=0;return function(){var i=fd(),s=ad-(i-e);if(e=i,s>0){if(++t>=nd)return arguments[0]}else t=0;return r.apply(void 0,arguments)}}var nd,ad,fd,pa,da=u(()=>{"use strict";nd=800,ad=16,fd=Date.now;pa=ld});function hd(r){return function(){return r}}var ma,ga=u(()=>{"use strict";ma=hd});var ud,hr,Ao=u(()=>{"use strict";me();ud=function(){try{var r=pt(Object,"defineProperty");return r({},"",{}),r}catch(t){}}(),hr=ud});var cd,ya,xa=u(()=>{"use strict";ga();Ao();rs();cd=hr?function(r,t){return hr(r,"toString",{configurable:!0,enumerable:!1,value:ma(t),writable:!0})}:fr,ya=cd});var pd,wa,ba=u(()=>{"use strict";xa();da();pd=pa(ya),wa=pd});function gd(r,t){var e=typeof r;return t=t==null?dd:t,!!t&&(e=="number"||e!="symbol"&&md.test(r))&&r>-1&&r%1==0&&r<t}var dd,md,ur,ns=u(()=>{"use strict";dd=9007199254740991,md=/^(?:0|[1-9]\d*)$/;ur=gd});function yd(r,t,e){t=="__proto__"&&hr?hr(r,t,{configurable:!0,enumerable:!0,value:e,writable:!0}):r[t]=e}var ge,Qr=u(()=>{"use strict";Ao();ge=yd});function xd(r,t){return r===t||r!==r&&t!==t}var Kt,cr=u(()=>{"use strict";Kt=xd});function Sd(r,t,e){var i=r[t];(!(bd.call(r,t)&&Kt(i,e))||e===void 0&&!(t in r))&&ge(r,t,e)}var wd,bd,Sa,va=u(()=>{"use strict";Qr();cr();wd=Object.prototype,bd=wd.hasOwnProperty;Sa=Sd});function vd(r,t,e,i){var s=!e;e||(e={});for(var o=-1,a=t.length;++o<a;){var l=t[o],f=i?i(e[l],r[l],l,e,r):void 0;f===void 0&&(f=r[l]),s?ge(e,l,f):Sa(e,l,f)}return e}var Ca,Ea=u(()=>{"use strict";va();Qr();Ca=vd});function Cd(r,t,e){return t=Oa(t===void 0?r.length-1:t,0),function(){for(var i=arguments,s=-1,o=Oa(i.length-t,0),a=Array(o);++s<o;)a[s]=i[t+s];s=-1;for(var l=Array(t+1);++s<t;)l[s]=i[s];return l[t]=e(a),la(r,this,l)}}var Oa,Aa,ka=u(()=>{"use strict";ha();Oa=Math.max;Aa=Cd});function Ed(r,t){return wa(Aa(r,t,fr),r+"")}var Ta,_a=u(()=>{"use strict";rs();ka();ba();Ta=Ed});function Ad(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=Od}var Od,pr,as=u(()=>{"use strict";Od=9007199254740991;pr=Ad});function kd(r){return r!=null&&pr(r.length)&&!lr(r)}var Qt,dr=u(()=>{"use strict";is();as();Qt=kd});function Td(r,t,e){if(!rt(e))return!1;var i=typeof t;return(i=="number"?Qt(e)&&ur(t,e.length):i=="string"&&t in e)?Kt(e[t],r):!1}var Ra,Pa=u(()=>{"use strict";cr();dr();ns();re();Ra=Td});function _d(r){return Ta(function(t,e){var i=-1,s=e.length,o=s>1?e[s-1]:void 0,a=s>2?e[2]:void 0;for(o=r.length>3&&typeof o=="function"?(s--,o):void 0,a&&Ra(e[0],e[1],a)&&(o=s<3?void 0:o,s=1),t=Object(t);++i<s;){var l=e[i];l&&r(t,l,i,o)}return t})}var Fa,Da=u(()=>{"use strict";_a();Pa();Fa=_d});function Pd(r){var t=r&&r.constructor,e=typeof t=="function"&&t.prototype||Rd;return r===e}var Rd,mr,fs=u(()=>{"use strict";Rd=Object.prototype;mr=Pd});function Fd(r,t){for(var e=-1,i=Array(r);++e<r;)i[e]=t(e);return i}var La,Ma=u(()=>{"use strict";La=Fd});function Ld(r){return nt(r)&&dt(r)==Dd}var Dd,ko,Ia=u(()=>{"use strict";Ue();de();Dd="[object Arguments]";ko=Ld});var Na,Md,Id,Nd,Ge,ls=u(()=>{"use strict";Ia();de();Na=Object.prototype,Md=Na.hasOwnProperty,Id=Na.propertyIsEnumerable,Nd=ko(function(){return arguments}())?ko:function(r){return nt(r)&&Md.call(r,"callee")&&!Id.call(r,"callee")},Ge=Nd});function Bd(){return!1}var Ba,ja=u(()=>{"use strict";Ba=Bd});var Ua,Wa,jd,za,Wd,zd,$e,hs=u(()=>{"use strict";Pt();ja();Ua=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Wa=Ua&&typeof module=="object"&&module&&!module.nodeType&&module,jd=Wa&&Wa.exports===Ua,za=jd?U.Buffer:void 0,Wd=za?za.isBuffer:void 0,zd=Wd||Ba,$e=zd});function cm(r){return nt(r)&&pr(r.length)&&!!L[dt(r)]}var Ud,Gd,$d,Hd,qd,Kd,Qd,Vd,Zd,Yd,Jd,Xd,tm,em,rm,im,sm,om,nm,am,fm,lm,hm,um,L,Ga,$a=u(()=>{"use strict";Ue();as();de();Ud="[object Arguments]",Gd="[object Array]",$d="[object Boolean]",Hd="[object Date]",qd="[object Error]",Kd="[object Function]",Qd="[object Map]",Vd="[object Number]",Zd="[object Object]",Yd="[object RegExp]",Jd="[object Set]",Xd="[object String]",tm="[object WeakMap]",em="[object ArrayBuffer]",rm="[object DataView]",im="[object Float32Array]",sm="[object Float64Array]",om="[object Int8Array]",nm="[object Int16Array]",am="[object Int32Array]",fm="[object Uint8Array]",lm="[object Uint8ClampedArray]",hm="[object Uint16Array]",um="[object Uint32Array]",L={};L[im]=L[sm]=L[om]=L[nm]=L[am]=L[fm]=L[lm]=L[hm]=L[um]=!0;L[Ud]=L[Gd]=L[em]=L[$d]=L[rm]=L[Hd]=L[qd]=L[Kd]=L[Qd]=L[Vd]=L[Zd]=L[Yd]=L[Jd]=L[Xd]=L[tm]=!1;Ga=cm});function pm(r){return function(t){return r(t)}}var Ha,qa=u(()=>{"use strict";Ha=pm});var Ka,Vr,dm,To,mm,_o,Qa=u(()=>{"use strict";Eo();Ka=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Vr=Ka&&typeof module=="object"&&module&&!module.nodeType&&module,dm=Vr&&Vr.exports===Ka,To=dm&&ts.process,mm=function(){try{var r=Vr&&Vr.require&&Vr.require("util").types;return r||To&&To.binding&&To.binding("util")}catch(t){}}(),_o=mm});var Va,gm,gr,us=u(()=>{"use strict";$a();qa();Qa();Va=_o&&_o.isTypedArray,gm=Va?Ha(Va):Ga,gr=gm});function wm(r,t){var e=B(r),i=!e&&Ge(r),s=!e&&!i&&$e(r),o=!e&&!i&&!s&&gr(r),a=e||i||s||o,l=a?La(r.length,String):[],f=l.length;for(var h in r)(t||xm.call(r,h))&&!(a&&(h=="length"||s&&(h=="offset"||h=="parent")||o&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||ur(h,f)))&&l.push(h);return l}var ym,xm,cs,Ro=u(()=>{"use strict";Ma();ls();Ft();hs();ns();us();ym=Object.prototype,xm=ym.hasOwnProperty;cs=wm});function bm(r,t){return function(e){return r(t(e))}}var ps,Po=u(()=>{"use strict";ps=bm});var Sm,Za,Ya=u(()=>{"use strict";Po();Sm=ps(Object.keys,Object),Za=Sm});function Em(r){if(!mr(r))return Za(r);var t=[];for(var e in Object(r))Cm.call(r,e)&&e!="constructor"&&t.push(e);return t}var vm,Cm,Ja,Xa=u(()=>{"use strict";fs();Ya();vm=Object.prototype,Cm=vm.hasOwnProperty;Ja=Em});function Om(r){return Qt(r)?cs(r):Ja(r)}var yr,ds=u(()=>{"use strict";Ro();Xa();dr();yr=Om});function Am(r){var t=[];if(r!=null)for(var e in Object(r))t.push(e);return t}var tf,ef=u(()=>{"use strict";tf=Am});function _m(r){if(!rt(r))return tf(r);var t=mr(r),e=[];for(var i in r)i=="constructor"&&(t||!Tm.call(r,i))||e.push(i);return e}var km,Tm,rf,sf=u(()=>{"use strict";re();fs();ef();km=Object.prototype,Tm=km.hasOwnProperty;rf=_m});function Rm(r){return Qt(r)?cs(r,!0):rf(r)}var ms,Fo=u(()=>{"use strict";Ro();sf();dr();ms=Rm});function Dm(r,t){if(B(r))return!1;var e=typeof r;return e=="number"||e=="symbol"||e=="boolean"||r==null||ar(r)?!0:Fm.test(r)||!Pm.test(r)||t!=null&&r in Object(t)}var Pm,Fm,xr,gs=u(()=>{"use strict";Ft();es();Pm=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Fm=/^\w*$/;xr=Dm});var Lm,se,Zr=u(()=>{"use strict";me();Lm=pt(Object,"create"),se=Lm});function Mm(){this.__data__=se?se(null):{},this.size=0}var of,nf=u(()=>{"use strict";Zr();of=Mm});function Im(r){var t=this.has(r)&&delete this.__data__[r];return this.size-=t?1:0,t}var af,ff=u(()=>{"use strict";af=Im});function Wm(r){var t=this.__data__;if(se){var e=t[r];return e===Nm?void 0:e}return jm.call(t,r)?t[r]:void 0}var Nm,Bm,jm,lf,hf=u(()=>{"use strict";Zr();Nm="__lodash_hash_undefined__",Bm=Object.prototype,jm=Bm.hasOwnProperty;lf=Wm});function Gm(r){var t=this.__data__;return se?t[r]!==void 0:Um.call(t,r)}var zm,Um,uf,cf=u(()=>{"use strict";Zr();zm=Object.prototype,Um=zm.hasOwnProperty;uf=Gm});function Hm(r,t){var e=this.__data__;return this.size+=this.has(r)?0:1,e[r]=se&&t===void 0?$m:t,this}var $m,pf,df=u(()=>{"use strict";Zr();$m="__lodash_hash_undefined__";pf=Hm});function wr(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var i=r[t];this.set(i[0],i[1])}}var Do,mf=u(()=>{"use strict";nf();ff();hf();cf();df();wr.prototype.clear=of;wr.prototype.delete=af;wr.prototype.get=lf;wr.prototype.has=uf;wr.prototype.set=pf;Do=wr});function qm(){this.__data__=[],this.size=0}var gf,yf=u(()=>{"use strict";gf=qm});function Km(r,t){for(var e=r.length;e--;)if(Kt(r[e][0],t))return e;return-1}var ye,Yr=u(()=>{"use strict";cr();ye=Km});function Zm(r){var t=this.__data__,e=ye(t,r);if(e<0)return!1;var i=t.length-1;return e==i?t.pop():Vm.call(t,e,1),--this.size,!0}var Qm,Vm,xf,wf=u(()=>{"use strict";Yr();Qm=Array.prototype,Vm=Qm.splice;xf=Zm});function Ym(r){var t=this.__data__,e=ye(t,r);return e<0?void 0:t[e][1]}var bf,Sf=u(()=>{"use strict";Yr();bf=Ym});function Jm(r){return ye(this.__data__,r)>-1}var vf,Cf=u(()=>{"use strict";Yr();vf=Jm});function Xm(r,t){var e=this.__data__,i=ye(e,r);return i<0?(++this.size,e.push([r,t])):e[i][1]=t,this}var Ef,Of=u(()=>{"use strict";Yr();Ef=Xm});function br(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var i=r[t];this.set(i[0],i[1])}}var xe,Jr=u(()=>{"use strict";yf();wf();Sf();Cf();Of();br.prototype.clear=gf;br.prototype.delete=xf;br.prototype.get=bf;br.prototype.has=vf;br.prototype.set=Ef;xe=br});var tg,we,ys=u(()=>{"use strict";me();Pt();tg=pt(U,"Map"),we=tg});function eg(){this.size=0,this.__data__={hash:new Do,map:new(we||xe),string:new Do}}var Af,kf=u(()=>{"use strict";mf();Jr();ys();Af=eg});function rg(r){var t=typeof r;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?r!=="__proto__":r===null}var Tf,_f=u(()=>{"use strict";Tf=rg});function ig(r,t){var e=r.__data__;return Tf(t)?e[typeof t=="string"?"string":"hash"]:e.map}var be,Xr=u(()=>{"use strict";_f();be=ig});function sg(r){var t=be(this,r).delete(r);return this.size-=t?1:0,t}var Rf,Pf=u(()=>{"use strict";Xr();Rf=sg});function og(r){return be(this,r).get(r)}var Ff,Df=u(()=>{"use strict";Xr();Ff=og});function ng(r){return be(this,r).has(r)}var Lf,Mf=u(()=>{"use strict";Xr();Lf=ng});function ag(r,t){var e=be(this,r),i=e.size;return e.set(r,t),this.size+=e.size==i?0:1,this}var If,Nf=u(()=>{"use strict";Xr();If=ag});function Sr(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var i=r[t];this.set(i[0],i[1])}}var He,xs=u(()=>{"use strict";kf();Pf();Df();Mf();Nf();Sr.prototype.clear=Af;Sr.prototype.delete=Rf;Sr.prototype.get=Ff;Sr.prototype.has=Lf;Sr.prototype.set=If;He=Sr});function Lo(r,t){if(typeof r!="function"||t!=null&&typeof t!="function")throw new TypeError(fg);var e=function(){var i=arguments,s=t?t.apply(this,i):i[0],o=e.cache;if(o.has(s))return o.get(s);var a=r.apply(this,i);return e.cache=o.set(s,a)||o,a};return e.cache=new(Lo.Cache||He),e}var fg,Et,Mo=u(()=>{"use strict";xs();fg="Expected a function";Lo.Cache=He;Et=Lo});function hg(r){var t=Et(r,function(i){return e.size===lg&&e.clear(),i}),e=t.cache;return t}var lg,Bf,jf=u(()=>{"use strict";Mo();lg=500;Bf=hg});var ug,cg,pg,Wf,zf=u(()=>{"use strict";jf();ug=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,cg=/\\(\\)?/g,pg=Bf(function(r){var t=[];return r.charCodeAt(0)===46&&t.push(""),r.replace(ug,function(e,i,s,o){t.push(s?o.replace(cg,"$1"):i||e)}),t}),Wf=pg});function dg(r){return r==null?"":Vn(r)}var Uf,Gf=u(()=>{"use strict";Zn();Uf=dg});function mg(r,t){return B(r)?r:xr(r,t)?[r]:Wf(Uf(r))}var ws,Io=u(()=>{"use strict";Ft();gs();zf();Gf();ws=mg});function yg(r){if(typeof r=="string"||ar(r))return r;var t=r+"";return t=="0"&&1/r==-gg?"-0":t}var gg,Se,ti=u(()=>{"use strict";es();gg=1/0;Se=yg});function xg(r,t){t=ws(t,r);for(var e=0,i=t.length;r!=null&&e<i;)r=r[Se(t[e++])];return e&&e==i?r:void 0}var bs,No=u(()=>{"use strict";Io();ti();bs=xg});function wg(r,t,e){var i=r==null?void 0:bs(r,t);return i===void 0?e:i}var $f,Hf=u(()=>{"use strict";No();$f=wg});function bg(r,t){for(var e=-1,i=t.length,s=r.length;++e<i;)r[s+e]=t[e];return r}var qf,Kf=u(()=>{"use strict";qf=bg});var Sg,Ss,Bo=u(()=>{"use strict";Po();Sg=ps(Object.getPrototypeOf,Object),Ss=Sg});function kg(r){if(!nt(r)||dt(r)!=vg)return!1;var t=Ss(r);if(t===null)return!0;var e=Og.call(t,"constructor")&&t.constructor;return typeof e=="function"&&e instanceof e&&Qf.call(e)==Ag}var vg,Cg,Eg,Qf,Og,Ag,Vf,Zf=u(()=>{"use strict";Ue();Bo();de();vg="[object Object]",Cg=Function.prototype,Eg=Object.prototype,Qf=Cg.toString,Og=Eg.hasOwnProperty,Ag=Qf.call(Object);Vf=kg});function Tg(){this.__data__=new xe,this.size=0}var Yf,Jf=u(()=>{"use strict";Jr();Yf=Tg});function _g(r){var t=this.__data__,e=t.delete(r);return this.size=t.size,e}var Xf,tl=u(()=>{"use strict";Xf=_g});function Rg(r){return this.__data__.get(r)}var el,rl=u(()=>{"use strict";el=Rg});function Pg(r){return this.__data__.has(r)}var il,sl=u(()=>{"use strict";il=Pg});function Dg(r,t){var e=this.__data__;if(e instanceof xe){var i=e.__data__;if(!we||i.length<Fg-1)return i.push([r,t]),this.size=++e.size,this;e=this.__data__=new He(i)}return e.set(r,t),this.size=e.size,this}var Fg,ol,nl=u(()=>{"use strict";Jr();ys();xs();Fg=200;ol=Dg});function vr(r){var t=this.__data__=new xe(r);this.size=t.size}var ve,vs=u(()=>{"use strict";Jr();Jf();tl();rl();sl();nl();vr.prototype.clear=Yf;vr.prototype.delete=Xf;vr.prototype.get=el;vr.prototype.has=il;vr.prototype.set=ol;ve=vr});function Mg(r,t){if(t)return r.slice();var e=r.length,i=ll?ll(e):new r.constructor(e);return r.copy(i),i}var hl,al,Lg,fl,ll,ul,cl=u(()=>{"use strict";Pt();hl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,al=hl&&typeof module=="object"&&module&&!module.nodeType&&module,Lg=al&&al.exports===hl,fl=Lg?U.Buffer:void 0,ll=fl?fl.allocUnsafe:void 0;ul=Mg});function Ig(r,t){for(var e=-1,i=r==null?0:r.length,s=0,o=[];++e<i;){var a=r[e];t(a,e,r)&&(o[s++]=a)}return o}var pl,dl=u(()=>{"use strict";pl=Ig});function Ng(){return[]}var ml,gl=u(()=>{"use strict";ml=Ng});var Bg,jg,yl,Wg,xl,wl=u(()=>{"use strict";dl();gl();Bg=Object.prototype,jg=Bg.propertyIsEnumerable,yl=Object.getOwnPropertySymbols,Wg=yl?function(r){return r==null?[]:(r=Object(r),pl(yl(r),function(t){return jg.call(r,t)}))}:ml,xl=Wg});function zg(r,t,e){var i=t(r);return B(r)?i:qf(i,e(r))}var bl,Sl=u(()=>{"use strict";Kf();Ft();bl=zg});function Ug(r){return bl(r,yr,xl)}var jo,vl=u(()=>{"use strict";Sl();wl();ds();jo=Ug});var Gg,Cs,Cl=u(()=>{"use strict";me();Pt();Gg=pt(U,"DataView"),Cs=Gg});var $g,Es,El=u(()=>{"use strict";me();Pt();$g=pt(U,"Promise"),Es=$g});var Hg,Os,Ol=u(()=>{"use strict";me();Pt();Hg=pt(U,"Set"),Os=Hg});var Al,qg,kl,Tl,_l,Rl,Kg,Qg,Vg,Zg,Yg,qe,Wo,Pl=u(()=>{"use strict";Cl();ys();El();Ol();oa();Ue();Oo();Al="[object Map]",qg="[object Object]",kl="[object Promise]",Tl="[object Set]",_l="[object WeakMap]",Rl="[object DataView]",Kg=ie(Cs),Qg=ie(we),Vg=ie(Es),Zg=ie(Os),Yg=ie(os),qe=dt;(Cs&&qe(new Cs(new ArrayBuffer(1)))!=Rl||we&&qe(new we)!=Al||Es&&qe(Es.resolve())!=kl||Os&&qe(new Os)!=Tl||os&&qe(new os)!=_l)&&(qe=function(r){var t=dt(r),e=t==qg?r.constructor:void 0,i=e?ie(e):"";if(i)switch(i){case Kg:return Rl;case Qg:return Al;case Vg:return kl;case Zg:return Tl;case Yg:return _l}return t});Wo=qe});var Jg,Cr,zo=u(()=>{"use strict";Pt();Jg=U.Uint8Array,Cr=Jg});function Xg(r){var t=new r.constructor(r.byteLength);return new Cr(t).set(new Cr(r)),t}var Fl,Dl=u(()=>{"use strict";zo();Fl=Xg});function ty(r,t){var e=t?Fl(r.buffer):r.buffer;return new r.constructor(e,r.byteOffset,r.length)}var Ll,Ml=u(()=>{"use strict";Dl();Ll=ty});function ey(r){return typeof r.constructor=="function"&&!mr(r)?aa(Ss(r)):{}}var Il,Nl=u(()=>{"use strict";fa();Bo();fs();Il=ey});function iy(r){return this.__data__.set(r,ry),this}var ry,Bl,jl=u(()=>{"use strict";ry="__lodash_hash_undefined__";Bl=iy});function sy(r){return this.__data__.has(r)}var Wl,zl=u(()=>{"use strict";Wl=sy});function As(r){var t=-1,e=r==null?0:r.length;for(this.__data__=new He;++t<e;)this.add(r[t])}var Ul,Gl=u(()=>{"use strict";xs();jl();zl();As.prototype.add=As.prototype.push=Bl;As.prototype.has=Wl;Ul=As});function oy(r,t){for(var e=-1,i=r==null?0:r.length;++e<i;)if(t(r[e],e,r))return!0;return!1}var $l,Hl=u(()=>{"use strict";$l=oy});function ny(r,t){return r.has(t)}var ql,Kl=u(()=>{"use strict";ql=ny});function ly(r,t,e,i,s,o){var a=e&ay,l=r.length,f=t.length;if(l!=f&&!(a&&f>l))return!1;var h=o.get(r),p=o.get(t);if(h&&p)return h==t&&p==r;var m=-1,g=!0,S=e&fy?new Ul:void 0;for(o.set(r,t),o.set(t,r);++m<l;){var C=r[m],x=t[m];if(i)var E=a?i(x,C,m,t,r,o):i(C,x,m,r,t,o);if(E!==void 0){if(E)continue;g=!1;break}if(S){if(!$l(t,function(w,O){if(!ql(S,O)&&(C===w||s(C,w,e,i,o)))return S.push(O)})){g=!1;break}}else if(!(C===x||s(C,x,e,i,o))){g=!1;break}}return o.delete(r),o.delete(t),g}var ay,fy,ks,Uo=u(()=>{"use strict";Gl();Hl();Kl();ay=1,fy=2;ks=ly});function hy(r){var t=-1,e=Array(r.size);return r.forEach(function(i,s){e[++t]=[s,i]}),e}var Ql,Vl=u(()=>{"use strict";Ql=hy});function uy(r){var t=-1,e=Array(r.size);return r.forEach(function(i){e[++t]=i}),e}var Zl,Yl=u(()=>{"use strict";Zl=uy});function Oy(r,t,e,i,s,o,a){switch(e){case Ey:if(r.byteLength!=t.byteLength||r.byteOffset!=t.byteOffset)return!1;r=r.buffer,t=t.buffer;case Cy:return!(r.byteLength!=t.byteLength||!o(new Cr(r),new Cr(t)));case dy:case my:case xy:return Kt(+r,+t);case gy:return r.name==t.name&&r.message==t.message;case wy:case Sy:return r==t+"";case yy:var l=Ql;case by:var f=i&cy;if(l||(l=Zl),r.size!=t.size&&!f)return!1;var h=a.get(r);if(h)return h==t;i|=py,a.set(r,t);var p=ks(l(r),l(t),i,s,o,a);return a.delete(r),p;case vy:if(Go)return Go.call(r)==Go.call(t)}return!1}var cy,py,dy,my,gy,yy,xy,wy,by,Sy,vy,Cy,Ey,Jl,Go,Xl,th=u(()=>{"use strict";qr();zo();cr();Uo();Vl();Yl();cy=1,py=2,dy="[object Boolean]",my="[object Date]",gy="[object Error]",yy="[object Map]",xy="[object Number]",wy="[object RegExp]",by="[object Set]",Sy="[object String]",vy="[object Symbol]",Cy="[object ArrayBuffer]",Ey="[object DataView]",Jl=Ct?Ct.prototype:void 0,Go=Jl?Jl.valueOf:void 0;Xl=Oy});function _y(r,t,e,i,s,o){var a=e&Ay,l=jo(r),f=l.length,h=jo(t),p=h.length;if(f!=p&&!a)return!1;for(var m=f;m--;){var g=l[m];if(!(a?g in t:Ty.call(t,g)))return!1}var S=o.get(r),C=o.get(t);if(S&&C)return S==t&&C==r;var x=!0;o.set(r,t),o.set(t,r);for(var E=a;++m<f;){g=l[m];var w=r[g],O=t[g];if(i)var k=a?i(O,w,g,t,r,o):i(w,O,g,r,t,o);if(!(k===void 0?w===O||s(w,O,e,i,o):k)){x=!1;break}E||(E=g=="constructor")}if(x&&!E){var T=r.constructor,D=t.constructor;T!=D&&"constructor"in r&&"constructor"in t&&!(typeof T=="function"&&T instanceof T&&typeof D=="function"&&D instanceof D)&&(x=!1)}return o.delete(r),o.delete(t),x}var Ay,ky,Ty,eh,rh=u(()=>{"use strict";vl();Ay=1,ky=Object.prototype,Ty=ky.hasOwnProperty;eh=_y});function Fy(r,t,e,i,s,o){var a=B(r),l=B(t),f=a?sh:Wo(r),h=l?sh:Wo(t);f=f==ih?Ts:f,h=h==ih?Ts:h;var p=f==Ts,m=h==Ts,g=f==h;if(g&&$e(r)){if(!$e(t))return!1;a=!0,p=!1}if(g&&!p)return o||(o=new ve),a||gr(r)?ks(r,t,e,i,s,o):Xl(r,t,f,e,i,s,o);if(!(e&Ry)){var S=p&&oh.call(r,"__wrapped__"),C=m&&oh.call(t,"__wrapped__");if(S||C){var x=S?r.value():r,E=C?t.value():t;return o||(o=new ve),s(x,E,e,i,o)}}return g?(o||(o=new ve),eh(r,t,e,i,s,o)):!1}var Ry,ih,sh,Ts,Py,oh,nh,ah=u(()=>{"use strict";vs();Uo();th();rh();Pl();Ft();hs();us();Ry=1,ih="[object Arguments]",sh="[object Array]",Ts="[object Object]",Py=Object.prototype,oh=Py.hasOwnProperty;nh=Fy});function fh(r,t,e,i,s){return r===t?!0:r==null||t==null||!nt(r)&&!nt(t)?r!==r&&t!==t:nh(r,t,e,i,fh,s)}var _s,$o=u(()=>{"use strict";ah();de();_s=fh});function My(r,t,e,i){var s=e.length,o=s,a=!i;if(r==null)return!o;for(r=Object(r);s--;){var l=e[s];if(a&&l[2]?l[1]!==r[l[0]]:!(l[0]in r))return!1}for(;++s<o;){l=e[s];var f=l[0],h=r[f],p=l[1];if(a&&l[2]){if(h===void 0&&!(f in r))return!1}else{var m=new ve;if(i)var g=i(h,p,f,r,t,m);if(!(g===void 0?_s(p,h,Dy|Ly,i,m):g))return!1}}return!0}var Dy,Ly,lh,hh=u(()=>{"use strict";vs();$o();Dy=1,Ly=2;lh=My});function Iy(r){return r===r&&!rt(r)}var Rs,Ho=u(()=>{"use strict";re();Rs=Iy});function Ny(r){for(var t=yr(r),e=t.length;e--;){var i=t[e],s=r[i];t[e]=[i,s,Rs(s)]}return t}var uh,ch=u(()=>{"use strict";Ho();ds();uh=Ny});function By(r,t){return function(e){return e==null?!1:e[r]===t&&(t!==void 0||r in Object(e))}}var Ps,qo=u(()=>{"use strict";Ps=By});function jy(r){var t=uh(r);return t.length==1&&t[0][2]?Ps(t[0][0],t[0][1]):function(e){return e===r||lh(e,r,t)}}var ph,dh=u(()=>{"use strict";hh();ch();qo();ph=jy});function Wy(r,t){return r!=null&&t in Object(r)}var mh,gh=u(()=>{"use strict";mh=Wy});function zy(r,t,e){t=ws(t,r);for(var i=-1,s=t.length,o=!1;++i<s;){var a=Se(t[i]);if(!(o=r!=null&&e(r,a)))break;r=r[a]}return o||++i!=s?o:(s=r==null?0:r.length,!!s&&pr(s)&&ur(a,s)&&(B(r)||Ge(r)))}var yh,xh=u(()=>{"use strict";Io();ls();Ft();ns();as();ti();yh=zy});function Uy(r,t){return r!=null&&yh(r,t,mh)}var wh,bh=u(()=>{"use strict";gh();xh();wh=Uy});function Hy(r,t){return xr(r)&&Rs(t)?Ps(Se(r),t):function(e){var i=$f(e,r);return i===void 0&&i===t?wh(e,r):_s(t,i,Gy|$y)}}var Gy,$y,Sh,vh=u(()=>{"use strict";$o();Hf();bh();gs();Ho();qo();ti();Gy=1,$y=2;Sh=Hy});function qy(r){return function(t){return t==null?void 0:t[r]}}var Ch,Eh=u(()=>{"use strict";Ch=qy});function Ky(r){return function(t){return bs(t,r)}}var Oh,Ah=u(()=>{"use strict";No();Oh=Ky});function Qy(r){return xr(r)?Ch(Se(r)):Oh(r)}var kh,Th=u(()=>{"use strict";Eh();Ah();gs();ti();kh=Qy});function Vy(r){return typeof r=="function"?r:r==null?fr:typeof r=="object"?B(r)?Sh(r[0],r[1]):ph(r):kh(r)}var _h,Rh=u(()=>{"use strict";dh();vh();rs();Ft();Th();_h=Vy});function Zy(r,t,e,i){for(var s=-1,o=r==null?0:r.length;++s<o;){var a=r[s];t(i,a,e(a),r)}return i}var Ph,Fh=u(()=>{"use strict";Ph=Zy});function Yy(r){return function(t,e,i){for(var s=-1,o=Object(t),a=i(t),l=a.length;l--;){var f=a[r?l:++s];if(e(o[f],f,o)===!1)break}return t}}var Dh,Lh=u(()=>{"use strict";Dh=Yy});var Jy,Fs,Ko=u(()=>{"use strict";Lh();Jy=Dh(),Fs=Jy});function Xy(r,t){return r&&Fs(r,t,yr)}var Mh,Ih=u(()=>{"use strict";Ko();ds();Mh=Xy});function tx(r,t){return function(e,i){if(e==null)return e;if(!Qt(e))return r(e,i);for(var s=e.length,o=t?s:-1,a=Object(e);(t?o--:++o<s)&&i(a[o],o,a)!==!1;);return e}}var Nh,Bh=u(()=>{"use strict";dr();Nh=tx});var ex,jh,Wh=u(()=>{"use strict";Ih();Bh();ex=Nh(Mh),jh=ex});function rx(r,t,e,i){return jh(r,function(s,o,a){t(i,s,e(s),a)}),i}var zh,Uh=u(()=>{"use strict";Wh();zh=rx});function ix(r,t){return function(e,i){var s=B(e)?Ph:zh,o=t?t():{};return s(e,r,_h(i,2),o)}}var Gh,$h=u(()=>{"use strict";Fh();Uh();Rh();Ft();Gh=ix});function sx(r,t,e){(e!==void 0&&!Kt(r[t],e)||e===void 0&&!(t in r))&&ge(r,t,e)}var ei,Qo=u(()=>{"use strict";Qr();cr();ei=sx});function ox(r){return nt(r)&&Qt(r)}var Hh,qh=u(()=>{"use strict";dr();de();Hh=ox});function nx(r,t){if(!(t==="constructor"&&typeof r[t]=="function")&&t!="__proto__")return r[t]}var ri,Vo=u(()=>{"use strict";ri=nx});function ax(r){return Ca(r,ms(r))}var Kh,Qh=u(()=>{"use strict";Ea();Fo();Kh=ax});function fx(r,t,e,i,s,o,a){var l=ri(r,e),f=ri(t,e),h=a.get(f);if(h){ei(r,e,h);return}var p=o?o(l,f,e+"",r,t,a):void 0,m=p===void 0;if(m){var g=B(f),S=!g&&$e(f),C=!g&&!S&&gr(f);p=f,g||S||C?B(l)?p=l:Hh(l)?p=ua(l):S?(m=!1,p=ul(f,!0)):C?(m=!1,p=Ll(f,!0)):p=[]:Vf(f)||Ge(f)?(p=l,Ge(l)?p=Kh(l):(!rt(l)||lr(l))&&(p=Il(f))):m=!1}m&&(a.set(f,p),s(p,f,i,o,a),a.delete(f)),ei(r,e,p)}var Vh,Zh=u(()=>{"use strict";Qo();cl();Ml();ca();Nl();ls();Ft();qh();hs();is();re();Zf();us();Vo();Qh();Vh=fx});function Yh(r,t,e,i,s){r!==t&&Fs(t,function(o,a){if(s||(s=new ve),rt(o))Vh(r,t,a,e,Yh,i,s);else{var l=i?i(ri(r,a),o,a+"",r,t,s):void 0;l===void 0&&(l=o),ei(r,a,l)}},ms)}var Jh,Xh=u(()=>{"use strict";vs();Qo();Ko();Zh();re();Fo();Vo();Jh=Yh});var lx,hx,ux,ii,tu=u(()=>{"use strict";Qr();$h();lx=Object.prototype,hx=lx.hasOwnProperty,ux=Gh(function(r,t,e){hx.call(r,e)?r[e].push(t):ge(r,e,[t])}),ii=ux});var cx,Zo,eu=u(()=>{"use strict";Xh();Da();cx=Fa(function(r,t,e){Jh(r,t,e)}),Zo=cx});var Ce=u(()=>{"use strict";tu();Mo();eu();});var pu=Dn((mk,cu)=>{"use strict";cu.exports=hu;function hu(r,t,e){r instanceof RegExp&&(r=lu(r,e)),t instanceof RegExp&&(t=lu(t,e));var i=uu(r,t,e);return i&&{start:i[0],end:i[1],pre:e.slice(0,i[0]),body:e.slice(i[0]+r.length,i[1]),post:e.slice(i[1]+t.length)}}function lu(r,t){var e=t.match(r);return e?e[0]:null}hu.range=uu;function uu(r,t,e){var i,s,o,a,l,f=e.indexOf(r),h=e.indexOf(t,f+1),p=f;if(f>=0&&h>0){if(r===t)return[f,h];for(i=[],o=e.length;p>=0&&!l;)p==f?(i.push(p),f=e.indexOf(r,p+1)):i.length==1?l=[i.pop(),h]:(s=i.pop(),s<o&&(o=s,a=h),h=e.indexOf(t,p+1)),p=f<h&&f>=0?f:h;i.length&&(l=[o,a])}return l}});var Su=Dn((gk,bu)=>{"use strict";var du=pu();bu.exports=Sx;var mu="\0SLASH"+Math.random()+"\0",gu="\0OPEN"+Math.random()+"\0",Jo="\0CLOSE"+Math.random()+"\0",yu="\0COMMA"+Math.random()+"\0",xu="\0PERIOD"+Math.random()+"\0";function Yo(r){return parseInt(r,10)==r?parseInt(r,10):r.charCodeAt(0)}function wx(r){return r.split("\\\\").join(mu).split("\\{").join(gu).split("\\}").join(Jo).split("\\,").join(yu).split("\\.").join(xu)}function bx(r){return r.split(mu).join("\\").split(gu).join("{").split(Jo).join("}").split(yu).join(",").split(xu).join(".")}function wu(r){if(!r)return[""];var t=[],e=du("{","}",r);if(!e)return r.split(",");var i=e.pre,s=e.body,o=e.post,a=i.split(",");a[a.length-1]+="{"+s+"}";var l=wu(o);return o.length&&(a[a.length-1]+=l.shift(),a.push.apply(a,l)),t.push.apply(t,a),t}function Sx(r){return r?(r.substr(0,2)==="{}"&&(r="\\{\\}"+r.substr(2)),si(wx(r),!0).map(bx)):[]}function vx(r){return"{"+r+"}"}function Cx(r){return/^-?0\d/.test(r)}function Ex(r,t){return r<=t}function Ox(r,t){return r>=t}function si(r,t){var e=[],i=du("{","}",r);if(!i)return[r];var s=i.pre,o=i.post.length?si(i.post,!1):[""];if(/\$$/.test(i.pre))for(var a=0;a<o.length;a++){var l=s+"{"+i.body+"}"+o[a];e.push(l)}else{var f=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),h=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),p=f||h,m=i.body.indexOf(",")>=0;if(!p&&!m)return i.post.match(/,.*\}/)?(r=i.pre+"{"+i.body+Jo+i.post,si(r)):[r];var g;if(p)g=i.body.split(/\.\./);else if(g=wu(i.body),g.length===1&&(g=si(g[0],!1).map(vx),g.length===1))return o.map(function(Vi){return i.pre+g[0]+Vi});var S;if(p){var C=Yo(g[0]),x=Yo(g[1]),E=Math.max(g[0].length,g[1].length),w=g.length==3?Math.abs(Yo(g[2])):1,O=Ex,k=x<C;k&&(w*=-1,O=Ox);var T=g.some(Cx);S=[];for(var D=C;O(D,x);D+=w){var W;if(h)W=String.fromCharCode(D),W==="\\"&&(W="");else if(W=String(D),T){var _t=E-W.length;if(_t>0){var We=new Array(_t+1).join("0");D<0?W="-"+We+W.slice(1):W=We+W}}S.push(W)}}else{S=[];for(var Rt=0;Rt<g.length;Rt++)S.push.apply(S,si(g[Rt],!1))}for(var Rt=0;Rt<S.length;Rt++)for(var a=0;a<o.length;a++){var l=s+S[Rt]+o[a];(!t||p||l)&&e.push(l)}}return e}});function Nw(r,t){if(r instanceof je)throw z("Command execution failed",r,{command:r.command,originalError:r.originalError}),r;if(r instanceof Error){let i=new je(r.message,t,r);throw z("Failed to execute command",r,{command:t,stack:r.stack}),i}let e=new je("Unknown error occurred during command execution",t);throw z("Failed to execute command",null,{error:r,command:t}),e}async function Uc(r,t={}){if(!r||typeof r!="string")throw new je("Command must be a non-empty string",r);let e={encoding:"utf8",maxBuffer:5*1024*1024,timeout:3e4};try{let{stdout:i,stderr:s}=await Iw(r,{...e,...t}),o=i.trim();if(!o)throw s?new je(`Command failed with stderr: ${s}`,r):new je("Command returned empty result",r);return o}catch(i){Nw(i,r)}}var Wc,zc,Iw,je,Gc=u(()=>{"use strict";Wc=require("child_process"),zc=require("util");ee();Iw=(0,zc.promisify)(Wc.exec),je=class extends Error{constructor(e,i,s){super(e);this.command=i;this.originalError=s;this.name="CommandExecutionError"}}});var $c={};up($c,{getChromePassword:()=>jw});var Bw,jw,Hc=u(()=>{"use strict";Ce();Gc();Bw=async()=>Uc('security find-generic-password -w -s "Chrome Safe Storage"'),jw=Et(Bw)});function pp(r){let t=r.split("."),e=[];e.push({name:"%",domain:r});for(let i=1;i<t.length-1;i++){let s=t.slice(i).join(".");e.push({name:"%",domain:s})}return e}function Co(r){if(!r.includes("://"))try{return Co(`https://${r}`)}catch(t){return[{name:"%",domain:r}]}try{let t=new URL(r);return pp(t.hostname)}catch(t){return[{name:"%",domain:r}]}}var Ln=ze(require("minimist"),1);function Mn(r){let t=(0,Ln.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,...i}=t;return{values:i,positionals:e}}vt();ee();var nu=require("fs"),Ms=require("path"),au=ze(require("fast-glob"),1);ee();var su=require("path");Ce();var ru={};Zo(ru,process.env);var Ds=ru.HOME;if(typeof Ds!="string"||Ds.length===0)throw new Error("HOME environment variable is not set or empty");var iu,Er=(0,su.join)((iu=Ds)!=null?iu:"","Library","Application Support","Google","Chrome");var ou=ze(require("better-sqlite3"),1);Ce();ee();var px=Et(r=>{try{return Promise.resolve(new ou.default(r,{readonly:!0}))}catch(t){throw z("Database open failed",t,{file:r}),t}});function dx(r){try{return r.close(),Promise.resolve()}catch(t){return z("Database close failed",t),Promise.reject(t instanceof Error?t:new Error("Failed to close database: Unknown error"))}}async function Ls({file:r,sql:t,params:e,rowFilter:i,rowTransform:s}){let o;try{o=await px(r);let l=o.prepare(t).all(e),f=i?l.filter(i):l;return s?f.map(s):f}catch(a){throw z("Database query failed",a,{file:r,sql:t}),a}finally{o&&await dx(o)}}function mx(r){if(typeof r!="string")return!1;let t=r.trim();return t.length===0?!1:(0,nu.existsSync)(t)}async function gx(){let r=[(0,Ms.join)(Er,"Default/Cookies"),(0,Ms.join)(Er,"Profile */Cookies"),(0,Ms.join)(Er,"Profile Default/Cookies")],t=[];for(let e of r){let i=await(0,au.default)(e);t.push(...i)}return qt("ChromeCookies","Found cookie files",{count:t.length,files:t}),t}function yx(r,t){let e=r==="%",i=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 ?",s=e?[`%${t}%`]:[r,`%${t}%`];return{sql:i,params:s}}async function xx(r,t,e){try{let{sql:i,params:s}=yx(t,e);qt("ChromeCookies","Executing query",{sql:i,params:s});let o=await Ls({file:r,sql:i,params:s,rowTransform:a=>({name:a.name,domain:a.host_key,value:a.encrypted_value,expiry:a.expires_utc})});return Nn("QueryCookies",!0,{file:r,count:o.length}),o}catch(i){return z("Failed to read cookie file",i,{file:r}),[]}}async function fu({name:r,domain:t,file:e}){let i=typeof e=="string"&&e.length>0?[e]:await gx();if(i.length===0)return qt("ChromeCookies","No cookie files found"),[];let s=[];for(let o of i){if(!mx(o)){qt("ChromeCookies","Cookie file missing or invalid",{file:o});continue}let a=await xx(o,r,t);s.push(...a)}return qt("ChromeCookies","Query complete",{totalCookies:s.length}),s}var Pu=ze(Su(),1);var oi=r=>{if(typeof r!="string")throw new TypeError("invalid pattern");if(r.length>65536)throw new TypeError("pattern is too long")};var Ax={"[: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]},ni=r=>r.replace(/[[\]\\-]/g,"\\$&"),kx=r=>r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),vu=r=>r.join(""),Cu=(r,t)=>{let e=t;if(r.charAt(e)!=="[")throw new Error("not in a brace expression");let i=[],s=[],o=e+1,a=!1,l=!1,f=!1,h=!1,p=e,m="";t:for(;o<r.length;){let x=r.charAt(o);if((x==="!"||x==="^")&&o===e+1){h=!0,o++;continue}if(x==="]"&&a&&!f){p=o+1;break}if(a=!0,x==="\\"&&!f){f=!0,o++;continue}if(x==="["&&!f){for(let[E,[w,O,k]]of Object.entries(Ax))if(r.startsWith(E,o)){if(m)return["$.",!1,r.length-e,!0];o+=E.length,k?s.push(w):i.push(w),l=l||O;continue t}}if(f=!1,m){x>m?i.push(ni(m)+"-"+ni(x)):x===m&&i.push(ni(x)),m="",o++;continue}if(r.startsWith("-]",o+1)){i.push(ni(x+"-")),o+=2;continue}if(r.startsWith("-",o+1)){m=x,o+=2;continue}i.push(ni(x)),o++}if(p<o)return["",!1,0,!1];if(!i.length&&!s.length)return["$.",!1,r.length-e,!0];if(s.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!h){let x=i[0].length===2?i[0].slice(-1):i[0];return[kx(x),!1,p-e,!1]}let g="["+(h?"^":"")+vu(i)+"]",S="["+(h?"":"^")+vu(s)+"]";return[i.length&&s.length?"("+g+"|"+S+")":i.length?g:S,l,p-e,!0]};var Dt=(r,{windowsPathsNoEscape:t=!1}={})=>t?r.replace(/\[([^\/\\])\]/g,"$1"):r.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var Tx=new Set(["!","?","+","*","@"]),Eu=r=>Tx.has(r),_x="(?!(?:^|/)\\.\\.?(?:$|/))",Is="(?!\\.)",Rx=new Set(["[","."]),Px=new Set(["..","."]),Fx=new Set("().*{}+?[]^$\\!"),Dx=r=>r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),tn="[^/]",Ou=tn+"*?",Au=tn+"+?",H,Q,oe,N,G,Ee,Ke,Oe,Vt,Qe,ai,Ve,ku,Ae,Ns,Xo,Tu,at=class at{constructor(t,e,i={}){b(this,Ve);d(this,"type");b(this,H);b(this,Q);b(this,oe,!1);b(this,N,[]);b(this,G);b(this,Ee);b(this,Ke);b(this,Oe,!1);b(this,Vt);b(this,Qe);b(this,ai,!1);this.type=t,t&&c(this,Q,!0),c(this,G,e),c(this,H,n(this,G)?n(n(this,G),H):this),c(this,Vt,n(this,H)===this?i:n(n(this,H),Vt)),c(this,Ke,n(this,H)===this?[]:n(n(this,H),Ke)),t==="!"&&!n(n(this,H),Oe)&&n(this,Ke).push(this),c(this,Ee,n(this,G)?n(n(this,G),N).length:0)}get hasMagic(){if(n(this,Q)!==void 0)return n(this,Q);for(let t of n(this,N))if(typeof t!="string"&&(t.type||t.hasMagic))return c(this,Q,!0);return n(this,Q)}toString(){return n(this,Qe)!==void 0?n(this,Qe):this.type?c(this,Qe,this.type+"("+n(this,N).map(t=>String(t)).join("|")+")"):c(this,Qe,n(this,N).map(t=>String(t)).join(""))}push(...t){for(let e of t)if(e!==""){if(typeof e!="string"&&!(e instanceof at&&n(e,G)===this))throw new Error("invalid part: "+e);n(this,N).push(e)}}toJSON(){var e;let t=this.type===null?n(this,N).slice().map(i=>typeof i=="string"?i:i.toJSON()):[this.type,...n(this,N).map(i=>i.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===n(this,H)||n(n(this,H),Oe)&&((e=n(this,G))==null?void 0:e.type)==="!")&&t.push({}),t}isStart(){var e;if(n(this,H)===this)return!0;if(!((e=n(this,G))!=null&&e.isStart()))return!1;if(n(this,Ee)===0)return!0;let t=n(this,G);for(let i=0;i<n(this,Ee);i++){let s=n(t,N)[i];if(!(s instanceof at&&s.type==="!"))return!1}return!0}isEnd(){var e,i,s;if(n(this,H)===this||((e=n(this,G))==null?void 0:e.type)==="!")return!0;if(!((i=n(this,G))!=null&&i.isEnd()))return!1;if(!this.type)return(s=n(this,G))==null?void 0:s.isEnd();let t=n(this,G)?n(n(this,G),N).length:0;return n(this,Ee)===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let e=new at(this.type,t);for(let i of n(this,N))e.copyIn(i);return e}static fromGlob(t,e={}){var s;let i=new at(null,void 0,e);return y(s=at,Ae,Ns).call(s,t,i,0,e),i}toMMPattern(){if(this!==n(this,H))return n(this,H).toMMPattern();let t=this.toString(),[e,i,s,o]=this.toRegExpSource();if(!(s||n(this,Q)||n(this,Vt).nocase&&!n(this,Vt).nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return i;let l=(n(this,Vt).nocase?"i":"")+(o?"u":"");return Object.assign(new RegExp(`^${e}$`,l),{_src:e,_glob:t})}get options(){return n(this,Vt)}toRegExpSource(t){var f;let e=t!=null?t:!!n(this,Vt).dot;if(n(this,H)===this&&y(this,Ve,ku).call(this),!this.type){let h=this.isStart()&&this.isEnd(),p=n(this,N).map(C=>{var k;let[x,E,w,O]=typeof C=="string"?y(k=at,Ae,Tu).call(k,C,n(this,Q),h):C.toRegExpSource(t);return c(this,Q,n(this,Q)||w),c(this,oe,n(this,oe)||O),x}).join(""),m="";if(this.isStart()&&typeof n(this,N)[0]=="string"&&!(n(this,N).length===1&&Px.has(n(this,N)[0]))){let x=Rx,E=e&&x.has(p.charAt(0))||p.startsWith("\\.")&&x.has(p.charAt(2))||p.startsWith("\\.\\.")&&x.has(p.charAt(4)),w=!e&&!t&&x.has(p.charAt(0));m=E?_x:w?Is:""}let g="";return this.isEnd()&&n(n(this,H),Oe)&&((f=n(this,G))==null?void 0:f.type)==="!"&&(g="(?:$|\\/)"),[m+p+g,Dt(p),c(this,Q,!!n(this,Q)),n(this,oe)]}let i=this.type==="*"||this.type==="+",s=this.type==="!"?"(?:(?!(?:":"(?:",o=y(this,Ve,Xo).call(this,e);if(this.isStart()&&this.isEnd()&&!o&&this.type!=="!"){let h=this.toString();return c(this,N,[h]),this.type=null,c(this,Q,void 0),[h,Dt(this.toString()),!1,!1]}let a=!i||t||e||!Is?"":y(this,Ve,Xo).call(this,!0);a===o&&(a=""),a&&(o=`(?:${o})(?:${a})*?`);let l="";if(this.type==="!"&&n(this,ai))l=(this.isStart()&&!e?Is:"")+Au;else{let h=this.type==="!"?"))"+(this.isStart()&&!e&&!t?Is:"")+Ou+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;l=s+o+h}return[l,Dt(o),c(this,Q,!!n(this,Q)),n(this,oe)]}};H=new WeakMap,Q=new WeakMap,oe=new WeakMap,N=new WeakMap,G=new WeakMap,Ee=new WeakMap,Ke=new WeakMap,Oe=new WeakMap,Vt=new WeakMap,Qe=new WeakMap,ai=new WeakMap,Ve=new WeakSet,ku=function(){if(this!==n(this,H))throw new Error("should only call on root");if(n(this,Oe))return this;this.toString(),c(this,Oe,!0);let t;for(;t=n(this,Ke).pop();){if(t.type!=="!")continue;let e=t,i=n(e,G);for(;i;){for(let s=n(e,Ee)+1;!i.type&&s<n(i,N).length;s++)for(let o of n(t,N)){if(typeof o=="string")throw new Error("string part in extglob AST??");o.copyIn(n(i,N)[s])}e=i,i=n(e,G)}}return this},Ae=new WeakSet,Ns=function(t,e,i,s){var S,C;let o=!1,a=!1,l=-1,f=!1;if(e.type===null){let x=i,E="";for(;x<t.length;){let w=t.charAt(x++);if(o||w==="\\"){o=!o,E+=w;continue}if(a){x===l+1?(w==="^"||w==="!")&&(f=!0):w==="]"&&!(x===l+2&&f)&&(a=!1),E+=w;continue}else if(w==="["){a=!0,l=x,f=!1,E+=w;continue}if(!s.noext&&Eu(w)&&t.charAt(x)==="("){e.push(E),E="";let O=new at(w,e);x=y(S=at,Ae,Ns).call(S,t,O,x,s),e.push(O);continue}E+=w}return e.push(E),x}let h=i+1,p=new at(null,e),m=[],g="";for(;h<t.length;){let x=t.charAt(h++);if(o||x==="\\"){o=!o,g+=x;continue}if(a){h===l+1?(x==="^"||x==="!")&&(f=!0):x==="]"&&!(h===l+2&&f)&&(a=!1),g+=x;continue}else if(x==="["){a=!0,l=h,f=!1,g+=x;continue}if(Eu(x)&&t.charAt(h)==="("){p.push(g),g="";let E=new at(x,p);p.push(E),h=y(C=at,Ae,Ns).call(C,t,E,h,s);continue}if(x==="|"){p.push(g),g="",m.push(p),p=new at(null,e);continue}if(x===")")return g===""&&n(e,N).length===0&&c(e,ai,!0),p.push(g),g="",e.push(...m,p),h;g+=x}return e.type=null,c(e,Q,void 0),c(e,N,[t.substring(i-1)]),h},Xo=function(t){return n(this,N).map(e=>{if(typeof e=="string")throw new Error("string type in extglob ast??");let[i,s,o,a]=e.toRegExpSource(t);return c(this,oe,n(this,oe)||a),i}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join("|")},Tu=function(t,e,i=!1){let s=!1,o="",a=!1;for(let l=0;l<t.length;l++){let f=t.charAt(l);if(s){s=!1,o+=(Fx.has(f)?"\\":"")+f;continue}if(f==="\\"){l===t.length-1?o+="\\\\":s=!0;continue}if(f==="["){let[h,p,m,g]=Cu(t,l);if(m){o+=h,a=a||p,l+=m-1,e=e||g;continue}}if(f==="*"){i&&t==="*"?o+=Au:o+=Ou,e=!0;continue}if(f==="?"){o+=tn,e=!0;continue}o+=Dx(f)}return[o,Dt(t),!!e,a]},b(at,Ae);var Or=at;var Ar=(r,{windowsPathsNoEscape:t=!1}={})=>t?r.replace(/[?*()[\]]/g,"[$&]"):r.replace(/[?*()[\]\\]/g,"\\$&");var ft=(r,t,e={})=>(oi(t),!e.nocomment&&t.charAt(0)==="#"?!1:new mt(t,e).match(r)),Lx=/^\*+([^+@!?\*\[\(]*)$/,Mx=r=>t=>!t.startsWith(".")&&t.endsWith(r),Ix=r=>t=>t.endsWith(r),Nx=r=>(r=r.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(r)),Bx=r=>(r=r.toLowerCase(),t=>t.toLowerCase().endsWith(r)),jx=/^\*+\.\*+$/,Wx=r=>!r.startsWith(".")&&r.includes("."),zx=r=>r!=="."&&r!==".."&&r.includes("."),Ux=/^\.\*+$/,Gx=r=>r!=="."&&r!==".."&&r.startsWith("."),$x=/^\*+$/,Hx=r=>r.length!==0&&!r.startsWith("."),qx=r=>r.length!==0&&r!=="."&&r!=="..",Kx=/^\?+([^+@!?\*\[\(]*)?$/,Qx=([r,t=""])=>{let e=Fu([r]);return t?(t=t.toLowerCase(),i=>e(i)&&i.toLowerCase().endsWith(t)):e},Vx=([r,t=""])=>{let e=Du([r]);return t?(t=t.toLowerCase(),i=>e(i)&&i.toLowerCase().endsWith(t)):e},Zx=([r,t=""])=>{let e=Du([r]);return t?i=>e(i)&&i.endsWith(t):e},Yx=([r,t=""])=>{let e=Fu([r]);return t?i=>e(i)&&i.endsWith(t):e},Fu=([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!==".."},Lu=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",_u={win32:{sep:"\\"},posix:{sep:"/"}},Jx=Lu==="win32"?_u.win32.sep:_u.posix.sep;ft.sep=Jx;var et=Symbol("globstar **");ft.GLOBSTAR=et;var Xx="[^/]",tw=Xx+"*?",ew="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",rw="(?:(?!(?:\\/|^)\\.).)*?",iw=(r,t={})=>e=>ft(e,r,t);ft.filter=iw;var Ot=(r,t={})=>Object.assign({},r,t),sw=r=>{if(!r||typeof r!="object"||!Object.keys(r).length)return ft;let t=ft;return Object.assign((i,s,o={})=>t(i,s,Ot(r,o)),{Minimatch:class extends t.Minimatch{constructor(s,o={}){super(s,Ot(r,o))}static defaults(s){return t.defaults(Ot(r,s)).Minimatch}},AST:class extends t.AST{constructor(s,o,a={}){super(s,o,Ot(r,a))}static fromGlob(s,o={}){return t.AST.fromGlob(s,Ot(r,o))}},unescape:(i,s={})=>t.unescape(i,Ot(r,s)),escape:(i,s={})=>t.escape(i,Ot(r,s)),filter:(i,s={})=>t.filter(i,Ot(r,s)),defaults:i=>t.defaults(Ot(r,i)),makeRe:(i,s={})=>t.makeRe(i,Ot(r,s)),braceExpand:(i,s={})=>t.braceExpand(i,Ot(r,s)),match:(i,s,o={})=>t.match(i,s,Ot(r,o)),sep:t.sep,GLOBSTAR:et})};ft.defaults=sw;var Mu=(r,t={})=>(oi(r),t.nobrace||!/\{(?:(?!\{).)*\}/.test(r)?[r]:(0,Pu.default)(r));ft.braceExpand=Mu;var ow=(r,t={})=>new mt(r,t).makeRe();ft.makeRe=ow;var nw=(r,t,e={})=>{let i=new mt(t,e);return r=r.filter(s=>i.match(s)),i.options.nonull&&!r.length&&r.push(t),r};ft.match=nw;var Ru=/[?*]|[+@!]\(.*?\)|\[|\]/,aw=r=>r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),mt=class{constructor(t,e={}){d(this,"options");d(this,"set");d(this,"pattern");d(this,"windowsPathsNoEscape");d(this,"nonegate");d(this,"negate");d(this,"comment");d(this,"empty");d(this,"preserveMultipleSlashes");d(this,"partial");d(this,"globSet");d(this,"globParts");d(this,"nocase");d(this,"isWindows");d(this,"platform");d(this,"windowsNoMagicRoot");d(this,"regexp");oi(t),e=e||{},this.options=e,this.pattern=t,this.platform=e.platform||Lu,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=(...o)=>console.error(...o)),this.debug(this.pattern,this.globSet);let i=this.globSet.map(o=>this.slashSplit(o));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let s=this.globParts.map((o,a,l)=>{if(this.isWindows&&this.windowsNoMagicRoot){let f=o[0]===""&&o[1]===""&&(o[2]==="?"||!Ru.test(o[2]))&&!Ru.test(o[3]),h=/^[a-z]:/i.test(o[0]);if(f)return[...o.slice(0,4),...o.slice(4).map(p=>this.parse(p))];if(h)return[o[0],...o.slice(1).map(p=>this.parse(p))]}return o.map(f=>this.parse(f))});if(this.debug(this.pattern,s),this.set=s.filter(o=>o.indexOf(!1)===-1),this.isWindows)for(let o=0;o<this.set.length;o++){let a=this.set[o];a[0]===""&&a[1]===""&&this.globParts[o][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let i=0;i<t.length;i++)for(let s=0;s<t[i].length;s++)t[i][s]==="**"&&(t[i][s]="*");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 i=-1;for(;(i=e.indexOf("**",i+1))!==-1;){let s=i;for(;e[s+1]==="**";)s++;s!==i&&e.splice(i,s-i)}return e})}levelOneOptimize(t){return t.map(e=>(e=e.reduce((i,s)=>{let o=i[i.length-1];return s==="**"&&o==="**"?i:s===".."&&o&&o!==".."&&o!=="."&&o!=="**"?(i.pop(),i):(i.push(s),i)},[]),e.length===0?[""]:e))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let s=1;s<t.length-1;s++){let o=t[s];s===1&&o===""&&t[0]===""||(o==="."||o==="")&&(e=!0,t.splice(s,1),s--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(e=!0,t.pop())}let i=0;for(;(i=t.indexOf("..",i+1))!==-1;){let s=t[i-1];s&&s!=="."&&s!==".."&&s!=="**"&&(e=!0,t.splice(i-1,2),i-=2)}}while(e);return t.length===0?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let i of t){let s=-1;for(;(s=i.indexOf("**",s+1))!==-1;){let a=s;for(;i[a+1]==="**";)a++;a>s&&i.splice(s+1,a-s);let l=i[s+1],f=i[s+2],h=i[s+3];if(l!==".."||!f||f==="."||f===".."||!h||h==="."||h==="..")continue;e=!0,i.splice(s,1);let p=i.slice(0);p[s]="**",t.push(p),s--}if(!this.preserveMultipleSlashes){for(let a=1;a<i.length-1;a++){let l=i[a];a===1&&l===""&&i[0]===""||(l==="."||l==="")&&(e=!0,i.splice(a,1),a--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(e=!0,i.pop())}let o=0;for(;(o=i.indexOf("..",o+1))!==-1;){let a=i[o-1];if(a&&a!=="."&&a!==".."&&a!=="**"){e=!0;let f=o===1&&i[o+1]==="**"?["."]:[];i.splice(o-1,2,...f),i.length===0&&i.push(""),o-=2}}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let i=e+1;i<t.length;i++){let s=this.partsMatch(t[e],t[i],!this.preserveMultipleSlashes);if(s){t[e]=[],t[i]=s;break}}return t.filter(e=>e.length)}partsMatch(t,e,i=!1){let s=0,o=0,a=[],l="";for(;s<t.length&&o<e.length;)if(t[s]===e[o])a.push(l==="b"?e[o]:t[s]),s++,o++;else if(i&&t[s]==="**"&&e[o]===t[s+1])a.push(t[s]),s++;else if(i&&e[o]==="**"&&t[s]===e[o+1])a.push(e[o]),o++;else if(t[s]==="*"&&e[o]&&(this.options.dot||!e[o].startsWith("."))&&e[o]!=="**"){if(l==="b")return!1;l="a",a.push(t[s]),s++,o++}else if(e[o]==="*"&&t[s]&&(this.options.dot||!t[s].startsWith("."))&&t[s]!=="**"){if(l==="a")return!1;l="b",a.push(e[o]),s++,o++}else return!1;return t.length===e.length&&a}parseNegate(){if(this.nonegate)return;let t=this.pattern,e=!1,i=0;for(let s=0;s<t.length&&t.charAt(s)==="!";s++)e=!e,i++;i&&(this.pattern=t.slice(i)),this.negate=e}matchOne(t,e,i=!1){let s=this.options;if(this.isWindows){let x=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),E=!x&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),w=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),O=!w&&e[0]===""&&e[1]===""&&e[2]==="?"&&typeof e[3]=="string"&&/^[a-z]:$/i.test(e[3]),k=E?3:x?0:void 0,T=O?3:w?0:void 0;if(typeof k=="number"&&typeof T=="number"){let[D,W]=[t[k],e[T]];D.toLowerCase()===W.toLowerCase()&&(e[T]=D,T>k?e=e.slice(T):k>T&&(t=t.slice(k)))}}let{optimizationLevel:o=1}=this.options;o>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var a=0,l=0,f=t.length,h=e.length;a<f&&l<h;a++,l++){this.debug("matchOne loop");var p=e[l],m=t[a];if(this.debug(e,p,m),p===!1)return!1;if(p===et){this.debug("GLOBSTAR",[e,p,m]);var g=a,S=l+1;if(S===h){for(this.debug("** at the end");a<f;a++)if(t[a]==="."||t[a]===".."||!s.dot&&t[a].charAt(0)===".")return!1;return!0}for(;g<f;){var C=t[g];if(this.debug(`
3
+ globstar while`,t,g,e,S,C),this.matchOne(t.slice(g),e.slice(S),i))return this.debug("globstar found match!",g,f,C),!0;if(C==="."||C===".."||!s.dot&&C.charAt(0)==="."){this.debug("dot detected!",t,g,e,S);break}this.debug("globstar swallow a segment, and continue"),g++}return!!(i&&(this.debug(`
4
+ >>> no match, partial?`,t,g,e,S),g===f))}let x;if(typeof p=="string"?(x=m===p,this.debug("string match",p,m,x)):(x=p.test(m),this.debug("pattern match",p,m,x)),!x)return!1}if(a===f&&l===h)return!0;if(a===f)return i;if(l===h)return a===f-1&&t[a]==="";throw new Error("wtf?")}braceExpand(){return Mu(this.pattern,this.options)}parse(t){oi(t);let e=this.options;if(t==="**")return et;if(t==="")return"";let i,s=null;(i=t.match($x))?s=e.dot?qx:Hx:(i=t.match(Lx))?s=(e.nocase?e.dot?Bx:Nx:e.dot?Ix:Mx)(i[1]):(i=t.match(Kx))?s=(e.nocase?e.dot?Vx:Qx:e.dot?Zx:Yx)(i):(i=t.match(jx))?s=e.dot?zx:Wx:(i=t.match(Ux))&&(s=Gx);let o=Or.fromGlob(t,this.options).toMMPattern();return s&&typeof o=="object"&&Reflect.defineProperty(o,"test",{value:s}),o}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,i=e.noglobstar?tw:e.dot?ew:rw,s=new Set(e.nocase?["i"]:[]),o=t.map(f=>{let h=f.map(p=>{if(p instanceof RegExp)for(let m of p.flags.split(""))s.add(m);return typeof p=="string"?aw(p):p===et?et:p._src});return h.forEach((p,m)=>{let g=h[m+1],S=h[m-1];p!==et||S===et||(S===void 0?g!==void 0&&g!==et?h[m+1]="(?:\\/|"+i+"\\/)?"+g:h[m]=i:g===void 0?h[m-1]=S+"(?:\\/|"+i+")?":g!==et&&(h[m-1]=S+"(?:\\/|\\/"+i+"\\/)"+g,h[m+1]=et))}),h.filter(p=>p!==et).join("/")}).join("|"),[a,l]=t.length>1?["(?:",")"]:["",""];o="^"+a+o+l+"$",this.negate&&(o="^(?!"+o+").+$");try{this.regexp=new RegExp(o,[...s].join(""))}catch(f){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 i=this.options;this.isWindows&&(t=t.split("\\").join("/"));let s=this.slashSplit(t);this.debug(this.pattern,"split",s);let o=this.set;this.debug(this.pattern,"set",o);let a=s[s.length-1];if(!a)for(let l=s.length-2;!a&&l>=0;l--)a=s[l];for(let l=0;l<o.length;l++){let f=o[l],h=s;if(i.matchBase&&f.length===1&&(h=[a]),this.matchOne(h,f,e))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(t){return ft.defaults(t).Minimatch}};ft.AST=Or;ft.Minimatch=mt;ft.escape=Ar;ft.unescape=Dt;var Fc=require("url");var kr=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Wu=new Set,en=typeof process=="object"&&process?process:{},zu=(r,t,e,i)=>{typeof en.emitWarning=="function"?en.emitWarning(r,t,e,i):console.error(`[${e}] ${t}: ${r}`)},Ws=globalThis.AbortController,Iu=globalThis.AbortSignal,Nu;if(typeof Ws=="undefined"){Iu=class{constructor(){d(this,"onabort");d(this,"_onabort",[]);d(this,"reason");d(this,"aborted",!1)}addEventListener(i,s){this._onabort.push(s)}},Ws=class{constructor(){d(this,"signal",new Iu);t()}abort(i){var s,o;if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let a of this.signal._onabort)a(i);(o=(s=this.signal).onabort)==null||o.call(s,i)}}};let r=((Nu=en.env)==null?void 0:Nu.LRU_CACHE_IGNORE_AC_WARNING)!=="1",t=()=>{r&&(r=!1,zu("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var fw=r=>!Wu.has(r),Bk=Symbol("type"),ke=r=>r&&r===Math.floor(r)&&r>0&&isFinite(r),Uu=r=>ke(r)?r<=Math.pow(2,8)?Uint8Array:r<=Math.pow(2,16)?Uint16Array:r<=Math.pow(2,32)?Uint32Array:r<=Number.MAX_SAFE_INTEGER?Tr:null:null,Tr=class extends Array{constructor(t){super(t),this.fill(0)}},_r,Ze=class Ze{constructor(t,e){d(this,"heap");d(this,"length");if(!n(Ze,_r))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}static create(t){let e=Uu(t);if(!e)return[];c(Ze,_r,!0);let i=new Ze(t,e);return c(Ze,_r,!1),i}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}};_r=new WeakMap,b(Ze,_r,!1);var rn=Ze,Bu,ju,Lt,gt,Mt,It,Rr,Pr,q,Nt,$,I,P,lt,yt,it,V,Bt,Z,jt,Wt,xt,zt,Pe,ht,v,sn,Ye,ne,hi,wt,Gu,Je,Fr,ui,Te,_e,on,Bs,js,M,nn,fi,Re,an,fn=class fn{constructor(t){b(this,v);b(this,Lt);b(this,gt);b(this,Mt);b(this,It);b(this,Rr);b(this,Pr);d(this,"ttl");d(this,"ttlResolution");d(this,"ttlAutopurge");d(this,"updateAgeOnGet");d(this,"updateAgeOnHas");d(this,"allowStale");d(this,"noDisposeOnSet");d(this,"noUpdateTTL");d(this,"maxEntrySize");d(this,"sizeCalculation");d(this,"noDeleteOnFetchRejection");d(this,"noDeleteOnStaleGet");d(this,"allowStaleOnFetchAbort");d(this,"allowStaleOnFetchRejection");d(this,"ignoreFetchAbort");b(this,q);b(this,Nt);b(this,$);b(this,I);b(this,P);b(this,lt);b(this,yt);b(this,it);b(this,V);b(this,Bt);b(this,Z);b(this,jt);b(this,Wt);b(this,xt);b(this,zt);b(this,Pe);b(this,ht);b(this,Ye,()=>{});b(this,ne,()=>{});b(this,hi,()=>{});b(this,wt,()=>!1);b(this,Je,t=>{});b(this,Fr,(t,e,i)=>{});b(this,ui,(t,e,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});d(this,Bu,"LRUCache");let{max:e=0,ttl:i,ttlResolution:s=1,ttlAutopurge:o,updateAgeOnGet:a,updateAgeOnHas:l,allowStale:f,dispose:h,disposeAfter:p,noDisposeOnSet:m,noUpdateTTL:g,maxSize:S=0,maxEntrySize:C=0,sizeCalculation:x,fetchMethod:E,memoMethod:w,noDeleteOnFetchRejection:O,noDeleteOnStaleGet:k,allowStaleOnFetchRejection:T,allowStaleOnFetchAbort:D,ignoreFetchAbort:W}=t;if(e!==0&&!ke(e))throw new TypeError("max option must be a nonnegative integer");let _t=e?Uu(e):Array;if(!_t)throw new Error("invalid max value: "+e);if(c(this,Lt,e),c(this,gt,S),this.maxEntrySize=C||n(this,gt),this.sizeCalculation=x,this.sizeCalculation){if(!n(this,gt)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(w!==void 0&&typeof w!="function")throw new TypeError("memoMethod must be a function if defined");if(c(this,Pr,w),E!==void 0&&typeof E!="function")throw new TypeError("fetchMethod must be a function if specified");if(c(this,Rr,E),c(this,Pe,!!E),c(this,$,new Map),c(this,I,new Array(e).fill(void 0)),c(this,P,new Array(e).fill(void 0)),c(this,lt,new _t(e)),c(this,yt,new _t(e)),c(this,it,0),c(this,V,0),c(this,Bt,rn.create(e)),c(this,q,0),c(this,Nt,0),typeof h=="function"&&c(this,Mt,h),typeof p=="function"?(c(this,It,p),c(this,Z,[])):(c(this,It,void 0),c(this,Z,void 0)),c(this,zt,!!n(this,Mt)),c(this,ht,!!n(this,It)),this.noDisposeOnSet=!!m,this.noUpdateTTL=!!g,this.noDeleteOnFetchRejection=!!O,this.allowStaleOnFetchRejection=!!T,this.allowStaleOnFetchAbort=!!D,this.ignoreFetchAbort=!!W,this.maxEntrySize!==0){if(n(this,gt)!==0&&!ke(n(this,gt)))throw new TypeError("maxSize must be a positive integer if specified");if(!ke(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");y(this,v,Gu).call(this)}if(this.allowStale=!!f,this.noDeleteOnStaleGet=!!k,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!l,this.ttlResolution=ke(s)||s===0?s:1,this.ttlAutopurge=!!o,this.ttl=i||0,this.ttl){if(!ke(this.ttl))throw new TypeError("ttl must be a positive integer if specified");y(this,v,sn).call(this)}if(n(this,Lt)===0&&this.ttl===0&&n(this,gt)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!n(this,Lt)&&!n(this,gt)){let We="LRU_CACHE_UNBOUNDED";fw(We)&&(Wu.add(We),zu("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",We,fn))}}static unsafeExposeInternals(t){return{starts:n(t,Wt),ttls:n(t,xt),sizes:n(t,jt),keyMap:n(t,$),keyList:n(t,I),valList:n(t,P),next:n(t,lt),prev:n(t,yt),get head(){return n(t,it)},get tail(){return n(t,V)},free:n(t,Bt),isBackgroundFetch:e=>{var i;return y(i=t,v,M).call(i,e)},backgroundFetch:(e,i,s,o)=>{var a;return y(a=t,v,js).call(a,e,i,s,o)},moveToTail:e=>{var i;return y(i=t,v,fi).call(i,e)},indexes:e=>{var i;return y(i=t,v,Te).call(i,e)},rindexes:e=>{var i;return y(i=t,v,_e).call(i,e)},isStale:e=>{var i;return n(i=t,wt).call(i,e)}}}get max(){return n(this,Lt)}get maxSize(){return n(this,gt)}get calculatedSize(){return n(this,Nt)}get size(){return n(this,q)}get fetchMethod(){return n(this,Rr)}get memoMethod(){return n(this,Pr)}get dispose(){return n(this,Mt)}get disposeAfter(){return n(this,It)}getRemainingTTL(t){return n(this,$).has(t)?1/0:0}*entries(){for(let t of y(this,v,Te).call(this))n(this,P)[t]!==void 0&&n(this,I)[t]!==void 0&&!y(this,v,M).call(this,n(this,P)[t])&&(yield[n(this,I)[t],n(this,P)[t]])}*rentries(){for(let t of y(this,v,_e).call(this))n(this,P)[t]!==void 0&&n(this,I)[t]!==void 0&&!y(this,v,M).call(this,n(this,P)[t])&&(yield[n(this,I)[t],n(this,P)[t]])}*keys(){for(let t of y(this,v,Te).call(this)){let e=n(this,I)[t];e!==void 0&&!y(this,v,M).call(this,n(this,P)[t])&&(yield e)}}*rkeys(){for(let t of y(this,v,_e).call(this)){let e=n(this,I)[t];e!==void 0&&!y(this,v,M).call(this,n(this,P)[t])&&(yield e)}}*values(){for(let t of y(this,v,Te).call(this))n(this,P)[t]!==void 0&&!y(this,v,M).call(this,n(this,P)[t])&&(yield n(this,P)[t])}*rvalues(){for(let t of y(this,v,_e).call(this))n(this,P)[t]!==void 0&&!y(this,v,M).call(this,n(this,P)[t])&&(yield n(this,P)[t])}[(ju=Symbol.iterator,Bu=Symbol.toStringTag,ju)](){return this.entries()}find(t,e={}){for(let i of y(this,v,Te).call(this)){let s=n(this,P)[i],o=y(this,v,M).call(this,s)?s.__staleWhileFetching:s;if(o!==void 0&&t(o,n(this,I)[i],this))return this.get(n(this,I)[i],e)}}forEach(t,e=this){for(let i of y(this,v,Te).call(this)){let s=n(this,P)[i],o=y(this,v,M).call(this,s)?s.__staleWhileFetching:s;o!==void 0&&t.call(e,o,n(this,I)[i],this)}}rforEach(t,e=this){for(let i of y(this,v,_e).call(this)){let s=n(this,P)[i],o=y(this,v,M).call(this,s)?s.__staleWhileFetching:s;o!==void 0&&t.call(e,o,n(this,I)[i],this)}}purgeStale(){let t=!1;for(let e of y(this,v,_e).call(this,{allowStale:!0}))n(this,wt).call(this,e)&&(y(this,v,Re).call(this,n(this,I)[e],"expire"),t=!0);return t}info(t){let e=n(this,$).get(t);if(e===void 0)return;let i=n(this,P)[e],s=y(this,v,M).call(this,i)?i.__staleWhileFetching:i;if(s===void 0)return;let o={value:s};if(n(this,xt)&&n(this,Wt)){let a=n(this,xt)[e],l=n(this,Wt)[e];if(a&&l){let f=a-(kr.now()-l);o.ttl=f,o.start=Date.now()}}return n(this,jt)&&(o.size=n(this,jt)[e]),o}dump(){let t=[];for(let e of y(this,v,Te).call(this,{allowStale:!0})){let i=n(this,I)[e],s=n(this,P)[e],o=y(this,v,M).call(this,s)?s.__staleWhileFetching:s;if(o===void 0||i===void 0)continue;let a={value:o};if(n(this,xt)&&n(this,Wt)){a.ttl=n(this,xt)[e];let l=kr.now()-n(this,Wt)[e];a.start=Math.floor(Date.now()-l)}n(this,jt)&&(a.size=n(this,jt)[e]),t.unshift([i,a])}return t}load(t){this.clear();for(let[e,i]of t){if(i.start){let s=Date.now()-i.start;i.start=kr.now()-s}this.set(e,i.value,i)}}set(t,e,i={}){var g,S,C,x,E;if(e===void 0)return this.delete(t),this;let{ttl:s=this.ttl,start:o,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:l=this.sizeCalculation,status:f}=i,{noUpdateTTL:h=this.noUpdateTTL}=i,p=n(this,ui).call(this,t,e,i.size||0,l);if(this.maxEntrySize&&p>this.maxEntrySize)return f&&(f.set="miss",f.maxEntrySizeExceeded=!0),y(this,v,Re).call(this,t,"set"),this;let m=n(this,q)===0?void 0:n(this,$).get(t);if(m===void 0)m=n(this,q)===0?n(this,V):n(this,Bt).length!==0?n(this,Bt).pop():n(this,q)===n(this,Lt)?y(this,v,Bs).call(this,!1):n(this,q),n(this,I)[m]=t,n(this,P)[m]=e,n(this,$).set(t,m),n(this,lt)[n(this,V)]=m,n(this,yt)[m]=n(this,V),c(this,V,m),Yi(this,q)._++,n(this,Fr).call(this,m,p,f),f&&(f.set="add"),h=!1;else{y(this,v,fi).call(this,m);let w=n(this,P)[m];if(e!==w){if(n(this,Pe)&&y(this,v,M).call(this,w)){w.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:O}=w;O!==void 0&&!a&&(n(this,zt)&&((g=n(this,Mt))==null||g.call(this,O,t,"set")),n(this,ht)&&((S=n(this,Z))==null||S.push([O,t,"set"])))}else a||(n(this,zt)&&((C=n(this,Mt))==null||C.call(this,w,t,"set")),n(this,ht)&&((x=n(this,Z))==null||x.push([w,t,"set"])));if(n(this,Je).call(this,m),n(this,Fr).call(this,m,p,f),n(this,P)[m]=e,f){f.set="replace";let O=w&&y(this,v,M).call(this,w)?w.__staleWhileFetching:w;O!==void 0&&(f.oldValue=O)}}else f&&(f.set="update")}if(s!==0&&!n(this,xt)&&y(this,v,sn).call(this),n(this,xt)&&(h||n(this,hi).call(this,m,s,o),f&&n(this,ne).call(this,f,m)),!a&&n(this,ht)&&n(this,Z)){let w=n(this,Z),O;for(;O=w==null?void 0:w.shift();)(E=n(this,It))==null||E.call(this,...O)}return this}pop(){var t;try{for(;n(this,q);){let e=n(this,P)[n(this,it)];if(y(this,v,Bs).call(this,!0),y(this,v,M).call(this,e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(n(this,ht)&&n(this,Z)){let e=n(this,Z),i;for(;i=e==null?void 0:e.shift();)(t=n(this,It))==null||t.call(this,...i)}}}has(t,e={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=e,o=n(this,$).get(t);if(o!==void 0){let a=n(this,P)[o];if(y(this,v,M).call(this,a)&&a.__staleWhileFetching===void 0)return!1;if(n(this,wt).call(this,o))s&&(s.has="stale",n(this,ne).call(this,s,o));else return i&&n(this,Ye).call(this,o),s&&(s.has="hit",n(this,ne).call(this,s,o)),!0}else s&&(s.has="miss");return!1}peek(t,e={}){let{allowStale:i=this.allowStale}=e,s=n(this,$).get(t);if(s===void 0||!i&&n(this,wt).call(this,s))return;let o=n(this,P)[s];return y(this,v,M).call(this,o)?o.__staleWhileFetching:o}async fetch(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:l=this.noDisposeOnSet,size:f=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:p=this.noUpdateTTL,noDeleteOnFetchRejection:m=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:g=this.allowStaleOnFetchRejection,ignoreFetchAbort:S=this.ignoreFetchAbort,allowStaleOnFetchAbort:C=this.allowStaleOnFetchAbort,context:x,forceRefresh:E=!1,status:w,signal:O}=e;if(!n(this,Pe))return w&&(w.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:o,status:w});let k={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:o,ttl:a,noDisposeOnSet:l,size:f,sizeCalculation:h,noUpdateTTL:p,noDeleteOnFetchRejection:m,allowStaleOnFetchRejection:g,allowStaleOnFetchAbort:C,ignoreFetchAbort:S,status:w,signal:O},T=n(this,$).get(t);if(T===void 0){w&&(w.fetch="miss");let D=y(this,v,js).call(this,t,T,k,x);return D.__returned=D}else{let D=n(this,P)[T];if(y(this,v,M).call(this,D)){let Vi=i&&D.__staleWhileFetching!==void 0;return w&&(w.fetch="inflight",Vi&&(w.returnedStale=!0)),Vi?D.__staleWhileFetching:D.__returned=D}let W=n(this,wt).call(this,T);if(!E&&!W)return w&&(w.fetch="hit"),y(this,v,fi).call(this,T),s&&n(this,Ye).call(this,T),w&&n(this,ne).call(this,w,T),D;let _t=y(this,v,js).call(this,t,T,k,x),Rt=_t.__staleWhileFetching!==void 0&&i;return w&&(w.fetch=W?"stale":"refresh",Rt&&W&&(w.returnedStale=!0)),Rt?_t.__staleWhileFetching:_t.__returned=_t}}async forceFetch(t,e={}){let i=await this.fetch(t,e);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(t,e={}){let i=n(this,Pr);if(!i)throw new Error("no memoMethod provided to constructor");let{context:s,forceRefresh:o,...a}=e,l=this.get(t,a);if(!o&&l!==void 0)return l;let f=i(t,l,{options:a,context:s});return this.set(t,f,a),f}get(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,status:a}=e,l=n(this,$).get(t);if(l!==void 0){let f=n(this,P)[l],h=y(this,v,M).call(this,f);return a&&n(this,ne).call(this,a,l),n(this,wt).call(this,l)?(a&&(a.get="stale"),h?(a&&i&&f.__staleWhileFetching!==void 0&&(a.returnedStale=!0),i?f.__staleWhileFetching:void 0):(o||y(this,v,Re).call(this,t,"expire"),a&&i&&(a.returnedStale=!0),i?f:void 0)):(a&&(a.get="hit"),h?f.__staleWhileFetching:(y(this,v,fi).call(this,l),s&&n(this,Ye).call(this,l),f))}else a&&(a.get="miss")}delete(t){return y(this,v,Re).call(this,t,"delete")}clear(){return y(this,v,an).call(this,"delete")}};Lt=new WeakMap,gt=new WeakMap,Mt=new WeakMap,It=new WeakMap,Rr=new WeakMap,Pr=new WeakMap,q=new WeakMap,Nt=new WeakMap,$=new WeakMap,I=new WeakMap,P=new WeakMap,lt=new WeakMap,yt=new WeakMap,it=new WeakMap,V=new WeakMap,Bt=new WeakMap,Z=new WeakMap,jt=new WeakMap,Wt=new WeakMap,xt=new WeakMap,zt=new WeakMap,Pe=new WeakMap,ht=new WeakMap,v=new WeakSet,sn=function(){let t=new Tr(n(this,Lt)),e=new Tr(n(this,Lt));c(this,xt,t),c(this,Wt,e),c(this,hi,(o,a,l=kr.now())=>{if(e[o]=a!==0?l:0,t[o]=a,a!==0&&this.ttlAutopurge){let f=setTimeout(()=>{n(this,wt).call(this,o)&&y(this,v,Re).call(this,n(this,I)[o],"expire")},a+1);f.unref&&f.unref()}}),c(this,Ye,o=>{e[o]=t[o]!==0?kr.now():0}),c(this,ne,(o,a)=>{if(t[a]){let l=t[a],f=e[a];if(!l||!f)return;o.ttl=l,o.start=f,o.now=i||s();let h=o.now-f;o.remainingTTL=l-h}});let i=0,s=()=>{let o=kr.now();if(this.ttlResolution>0){i=o;let a=setTimeout(()=>i=0,this.ttlResolution);a.unref&&a.unref()}return o};this.getRemainingTTL=o=>{let a=n(this,$).get(o);if(a===void 0)return 0;let l=t[a],f=e[a];if(!l||!f)return 1/0;let h=(i||s())-f;return l-h},c(this,wt,o=>{let a=e[o],l=t[o];return!!l&&!!a&&(i||s())-a>l})},Ye=new WeakMap,ne=new WeakMap,hi=new WeakMap,wt=new WeakMap,Gu=function(){let t=new Tr(n(this,Lt));c(this,Nt,0),c(this,jt,t),c(this,Je,e=>{c(this,Nt,n(this,Nt)-t[e]),t[e]=0}),c(this,ui,(e,i,s,o)=>{if(y(this,v,M).call(this,i))return 0;if(!ke(s))if(o){if(typeof o!="function")throw new TypeError("sizeCalculation must be a function");if(s=o(i,e),!ke(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s}),c(this,Fr,(e,i,s)=>{if(t[e]=i,n(this,gt)){let o=n(this,gt)-t[e];for(;n(this,Nt)>o;)y(this,v,Bs).call(this,!0)}c(this,Nt,n(this,Nt)+t[e]),s&&(s.entrySize=i,s.totalCalculatedSize=n(this,Nt))})},Je=new WeakMap,Fr=new WeakMap,ui=new WeakMap,Te=function*({allowStale:t=this.allowStale}={}){if(n(this,q))for(let e=n(this,V);!(!y(this,v,on).call(this,e)||((t||!n(this,wt).call(this,e))&&(yield e),e===n(this,it)));)e=n(this,yt)[e]},_e=function*({allowStale:t=this.allowStale}={}){if(n(this,q))for(let e=n(this,it);!(!y(this,v,on).call(this,e)||((t||!n(this,wt).call(this,e))&&(yield e),e===n(this,V)));)e=n(this,lt)[e]},on=function(t){return t!==void 0&&n(this,$).get(n(this,I)[t])===t},Bs=function(t){var o,a;let e=n(this,it),i=n(this,I)[e],s=n(this,P)[e];return n(this,Pe)&&y(this,v,M).call(this,s)?s.__abortController.abort(new Error("evicted")):(n(this,zt)||n(this,ht))&&(n(this,zt)&&((o=n(this,Mt))==null||o.call(this,s,i,"evict")),n(this,ht)&&((a=n(this,Z))==null||a.push([s,i,"evict"]))),n(this,Je).call(this,e),t&&(n(this,I)[e]=void 0,n(this,P)[e]=void 0,n(this,Bt).push(e)),n(this,q)===1?(c(this,it,c(this,V,0)),n(this,Bt).length=0):c(this,it,n(this,lt)[e]),n(this,$).delete(i),Yi(this,q)._--,e},js=function(t,e,i,s){let o=e===void 0?void 0:n(this,P)[e];if(y(this,v,M).call(this,o))return o;let a=new Ws,{signal:l}=i;l==null||l.addEventListener("abort",()=>a.abort(l.reason),{signal:a.signal});let f={signal:a.signal,options:i,context:s},h=(x,E=!1)=>{let{aborted:w}=a.signal,O=i.ignoreFetchAbort&&x!==void 0;if(i.status&&(w&&!E?(i.status.fetchAborted=!0,i.status.fetchError=a.signal.reason,O&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),w&&!O&&!E)return m(a.signal.reason);let k=S;return n(this,P)[e]===S&&(x===void 0?k.__staleWhileFetching?n(this,P)[e]=k.__staleWhileFetching:y(this,v,Re).call(this,t,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(t,x,f.options))),x},p=x=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=x),m(x)),m=x=>{let{aborted:E}=a.signal,w=E&&i.allowStaleOnFetchAbort,O=w||i.allowStaleOnFetchRejection,k=O||i.noDeleteOnFetchRejection,T=S;if(n(this,P)[e]===S&&(!k||T.__staleWhileFetching===void 0?y(this,v,Re).call(this,t,"fetch"):w||(n(this,P)[e]=T.__staleWhileFetching)),O)return i.status&&T.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),T.__staleWhileFetching;if(T.__returned===T)throw x},g=(x,E)=>{var O;let w=(O=n(this,Rr))==null?void 0:O.call(this,t,o,f);w&&w instanceof Promise&&w.then(k=>x(k===void 0?void 0:k),E),a.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(x(void 0),i.allowStaleOnFetchAbort&&(x=k=>h(k,!0)))})};i.status&&(i.status.fetchDispatched=!0);let S=new Promise(g).then(h,p),C=Object.assign(S,{__abortController:a,__staleWhileFetching:o,__returned:void 0});return e===void 0?(this.set(t,C,{...f.options,status:void 0}),e=n(this,$).get(t)):n(this,P)[e]=C,C},M=function(t){if(!n(this,Pe))return!1;let e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof Ws},nn=function(t,e){n(this,yt)[e]=t,n(this,lt)[t]=e},fi=function(t){t!==n(this,V)&&(t===n(this,it)?c(this,it,n(this,lt)[t]):y(this,v,nn).call(this,n(this,yt)[t],n(this,lt)[t]),y(this,v,nn).call(this,n(this,V),t),c(this,V,t))},Re=function(t,e){var s,o,a,l;let i=!1;if(n(this,q)!==0){let f=n(this,$).get(t);if(f!==void 0)if(i=!0,n(this,q)===1)y(this,v,an).call(this,e);else{n(this,Je).call(this,f);let h=n(this,P)[f];if(y(this,v,M).call(this,h)?h.__abortController.abort(new Error("deleted")):(n(this,zt)||n(this,ht))&&(n(this,zt)&&((s=n(this,Mt))==null||s.call(this,h,t,e)),n(this,ht)&&((o=n(this,Z))==null||o.push([h,t,e]))),n(this,$).delete(t),n(this,I)[f]=void 0,n(this,P)[f]=void 0,f===n(this,V))c(this,V,n(this,yt)[f]);else if(f===n(this,it))c(this,it,n(this,lt)[f]);else{let p=n(this,yt)[f];n(this,lt)[p]=n(this,lt)[f];let m=n(this,lt)[f];n(this,yt)[m]=n(this,yt)[f]}Yi(this,q)._--,n(this,Bt).push(f)}}if(n(this,ht)&&((a=n(this,Z))!=null&&a.length)){let f=n(this,Z),h;for(;h=f==null?void 0:f.shift();)(l=n(this,It))==null||l.call(this,...h)}return i},an=function(t){var e,i,s;for(let o of y(this,v,_e).call(this,{allowStale:!0})){let a=n(this,P)[o];if(y(this,v,M).call(this,a))a.__abortController.abort(new Error("deleted"));else{let l=n(this,I)[o];n(this,zt)&&((e=n(this,Mt))==null||e.call(this,a,l,t)),n(this,ht)&&((i=n(this,Z))==null||i.push([a,l,t]))}}if(n(this,$).clear(),n(this,P).fill(void 0),n(this,I).fill(void 0),n(this,xt)&&n(this,Wt)&&(n(this,xt).fill(0),n(this,Wt).fill(0)),n(this,jt)&&n(this,jt).fill(0),c(this,it,0),c(this,V,0),n(this,Bt).length=0,c(this,Nt,0),c(this,q,0),n(this,ht)&&n(this,Z)){let o=n(this,Z),a;for(;a=o==null?void 0:o.shift();)(s=n(this,It))==null||s.call(this,...a)}};var li=fn;var jr=require("path"),xc=require("url"),te=require("fs"),xw=ze(require("fs"),1),Me=require("fs/promises");var Ks=require("events"),mn=ze(require("stream"),1),pc=require("string_decoder");var $u=typeof process=="object"&&process?process:{stdout:null,stderr:null},lw=r=>!!r&&typeof r=="object"&&(r instanceof De||r instanceof mn.default||hw(r)||uw(r)),hw=r=>!!r&&typeof r=="object"&&r instanceof Ks.EventEmitter&&typeof r.pipe=="function"&&r.pipe!==mn.default.Writable.prototype.pipe,uw=r=>!!r&&typeof r=="object"&&r instanceof Ks.EventEmitter&&typeof r.write=="function"&&typeof r.end=="function",ae=Symbol("EOF"),fe=Symbol("maybeEmitEnd"),Fe=Symbol("emittedEnd"),zs=Symbol("emittingEnd"),ci=Symbol("emittedError"),Us=Symbol("closed"),Hu=Symbol("read"),Gs=Symbol("flush"),qu=Symbol("flushChunk"),Ut=Symbol("encoding"),Dr=Symbol("decoder"),Y=Symbol("flowing"),pi=Symbol("paused"),Lr=Symbol("resume"),J=Symbol("buffer"),ut=Symbol("pipes"),X=Symbol("bufferLength"),ln=Symbol("bufferPush"),$s=Symbol("bufferShift"),st=Symbol("objectMode"),j=Symbol("destroyed"),hn=Symbol("error"),un=Symbol("emitData"),Ku=Symbol("emitEnd"),cn=Symbol("emitEnd2"),Zt=Symbol("async"),pn=Symbol("abort"),Hs=Symbol("aborted"),di=Symbol("signal"),Xe=Symbol("dataListeners"),bt=Symbol("discarded"),mi=r=>Promise.resolve().then(r),cw=r=>r(),pw=r=>r==="end"||r==="finish"||r==="prefinish",dw=r=>r instanceof ArrayBuffer||!!r&&typeof r=="object"&&r.constructor&&r.constructor.name==="ArrayBuffer"&&r.byteLength>=0,mw=r=>!Buffer.isBuffer(r)&&ArrayBuffer.isView(r),qs=class{constructor(t,e,i){d(this,"src");d(this,"dest");d(this,"opts");d(this,"ondrain");this.src=t,this.dest=e,this.opts=i,this.ondrain=()=>t[Lr](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},dn=class extends qs{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,e,i){super(t,e,i),this.proxyErrors=s=>e.emit("error",s),t.on("error",this.proxyErrors)}},gw=r=>!!r.objectMode,yw=r=>!r.objectMode&&!!r.encoding&&r.encoding!=="buffer",Qu,Vu,Zu,Yu,Ju,Xu,tc,ec,rc,ic,sc,oc,nc,ac,fc,lc,hc,uc,cc,De=class extends Ks.EventEmitter{constructor(...e){let i=e[0]||{};super();d(this,cc,!1);d(this,uc,!1);d(this,hc,[]);d(this,lc,[]);d(this,fc);d(this,ac);d(this,nc);d(this,oc);d(this,sc,!1);d(this,ic,!1);d(this,rc,!1);d(this,ec,!1);d(this,tc,null);d(this,Xu,0);d(this,Ju,!1);d(this,Yu);d(this,Zu,!1);d(this,Vu,0);d(this,Qu,!1);d(this,"writable",!0);d(this,"readable",!0);if(i.objectMode&&typeof i.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");gw(i)?(this[st]=!0,this[Ut]=null):yw(i)?(this[Ut]=i.encoding,this[st]=!1):(this[st]=!1,this[Ut]=null),this[Zt]=!!i.async,this[Dr]=this[Ut]?new pc.StringDecoder(this[Ut]):null,i&&i.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[J]}),i&&i.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[ut]});let{signal:s}=i;s&&(this[di]=s,s.aborted?this[pn]():s.addEventListener("abort",()=>this[pn]()))}get bufferLength(){return this[X]}get encoding(){return this[Ut]}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[st]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[Zt]}set async(e){this[Zt]=this[Zt]||!!e}[(cc=Y,uc=pi,hc=ut,lc=J,fc=st,ac=Ut,nc=Zt,oc=Dr,sc=ae,ic=Fe,rc=zs,ec=Us,tc=ci,Xu=X,Ju=j,Yu=di,Zu=Hs,Vu=Xe,Qu=bt,pn)](){var e,i;this[Hs]=!0,this.emit("abort",(e=this[di])==null?void 0:e.reason),this.destroy((i=this[di])==null?void 0:i.reason)}get aborted(){return this[Hs]}set aborted(e){}write(e,i,s){var a;if(this[Hs])return!1;if(this[ae])throw new Error("write after end");if(this[j])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof i=="function"&&(s=i,i="utf8"),i||(i="utf8");let o=this[Zt]?mi:cw;if(!this[st]&&!Buffer.isBuffer(e)){if(mw(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(dw(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[st]?(this[Y]&&this[X]!==0&&this[Gs](!0),this[Y]?this.emit("data",e):this[ln](e),this[X]!==0&&this.emit("readable"),s&&o(s),this[Y]):e.length?(typeof e=="string"&&!(i===this[Ut]&&!((a=this[Dr])!=null&&a.lastNeed))&&(e=Buffer.from(e,i)),Buffer.isBuffer(e)&&this[Ut]&&(e=this[Dr].write(e)),this[Y]&&this[X]!==0&&this[Gs](!0),this[Y]?this.emit("data",e):this[ln](e),this[X]!==0&&this.emit("readable"),s&&o(s),this[Y]):(this[X]!==0&&this.emit("readable"),s&&o(s),this[Y])}read(e){if(this[j])return null;if(this[bt]=!1,this[X]===0||e===0||e&&e>this[X])return this[fe](),null;this[st]&&(e=null),this[J].length>1&&!this[st]&&(this[J]=[this[Ut]?this[J].join(""):Buffer.concat(this[J],this[X])]);let i=this[Hu](e||null,this[J][0]);return this[fe](),i}[Hu](e,i){if(this[st])this[$s]();else{let s=i;e===s.length||e===null?this[$s]():typeof s=="string"?(this[J][0]=s.slice(e),i=s.slice(0,e),this[X]-=e):(this[J][0]=s.subarray(e),i=s.subarray(0,e),this[X]-=e)}return this.emit("data",i),!this[J].length&&!this[ae]&&this.emit("drain"),i}end(e,i,s){return typeof e=="function"&&(s=e,e=void 0),typeof i=="function"&&(s=i,i="utf8"),e!==void 0&&this.write(e,i),s&&this.once("end",s),this[ae]=!0,this.writable=!1,(this[Y]||!this[pi])&&this[fe](),this}[Lr](){this[j]||(!this[Xe]&&!this[ut].length&&(this[bt]=!0),this[pi]=!1,this[Y]=!0,this.emit("resume"),this[J].length?this[Gs]():this[ae]?this[fe]():this.emit("drain"))}resume(){return this[Lr]()}pause(){this[Y]=!1,this[pi]=!0,this[bt]=!1}get destroyed(){return this[j]}get flowing(){return this[Y]}get paused(){return this[pi]}[ln](e){this[st]?this[X]+=1:this[X]+=e.length,this[J].push(e)}[$s](){return this[st]?this[X]-=1:this[X]-=this[J][0].length,this[J].shift()}[Gs](e=!1){do;while(this[qu](this[$s]())&&this[J].length);!e&&!this[J].length&&!this[ae]&&this.emit("drain")}[qu](e){return this.emit("data",e),this[Y]}pipe(e,i){if(this[j])return e;this[bt]=!1;let s=this[Fe];return i=i||{},e===$u.stdout||e===$u.stderr?i.end=!1:i.end=i.end!==!1,i.proxyErrors=!!i.proxyErrors,s?i.end&&e.end():(this[ut].push(i.proxyErrors?new dn(this,e,i):new qs(this,e,i)),this[Zt]?mi(()=>this[Lr]()):this[Lr]()),e}unpipe(e){let i=this[ut].find(s=>s.dest===e);i&&(this[ut].length===1?(this[Y]&&this[Xe]===0&&(this[Y]=!1),this[ut]=[]):this[ut].splice(this[ut].indexOf(i),1),i.unpipe())}addListener(e,i){return this.on(e,i)}on(e,i){let s=super.on(e,i);if(e==="data")this[bt]=!1,this[Xe]++,!this[ut].length&&!this[Y]&&this[Lr]();else if(e==="readable"&&this[X]!==0)super.emit("readable");else if(pw(e)&&this[Fe])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[ci]){let o=i;this[Zt]?mi(()=>o.call(this,this[ci])):o.call(this,this[ci])}return s}removeListener(e,i){return this.off(e,i)}off(e,i){let s=super.off(e,i);return e==="data"&&(this[Xe]=this.listeners("data").length,this[Xe]===0&&!this[bt]&&!this[ut].length&&(this[Y]=!1)),s}removeAllListeners(e){let i=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[Xe]=0,!this[bt]&&!this[ut].length&&(this[Y]=!1)),i}get emittedEnd(){return this[Fe]}[fe](){!this[zs]&&!this[Fe]&&!this[j]&&this[J].length===0&&this[ae]&&(this[zs]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Us]&&this.emit("close"),this[zs]=!1)}emit(e,...i){let s=i[0];if(e!=="error"&&e!=="close"&&e!==j&&this[j])return!1;if(e==="data")return!this[st]&&!s?!1:this[Zt]?(mi(()=>this[un](s)),!0):this[un](s);if(e==="end")return this[Ku]();if(e==="close"){if(this[Us]=!0,!this[Fe]&&!this[j])return!1;let a=super.emit("close");return this.removeAllListeners("close"),a}else if(e==="error"){this[ci]=s,super.emit(hn,s);let a=!this[di]||this.listeners("error").length?super.emit("error",s):!1;return this[fe](),a}else if(e==="resume"){let a=super.emit("resume");return this[fe](),a}else if(e==="finish"||e==="prefinish"){let a=super.emit(e);return this.removeAllListeners(e),a}let o=super.emit(e,...i);return this[fe](),o}[un](e){for(let s of this[ut])s.dest.write(e)===!1&&this.pause();let i=this[bt]?!1:super.emit("data",e);return this[fe](),i}[Ku](){return this[Fe]?!1:(this[Fe]=!0,this.readable=!1,this[Zt]?(mi(()=>this[cn]()),!0):this[cn]())}[cn](){if(this[Dr]){let i=this[Dr].end();if(i){for(let s of this[ut])s.dest.write(i);this[bt]||super.emit("data",i)}}for(let i of this[ut])i.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[st]||(e.dataLength=0);let i=this.promise();return this.on("data",s=>{e.push(s),this[st]||(e.dataLength+=s.length)}),await i,e}async concat(){if(this[st])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Ut]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,i)=>{this.on(j,()=>i(new Error("stream destroyed"))),this.on("error",s=>i(s)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[bt]=!1;let e=!1,i=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return i();let o=this.read();if(o!==null)return Promise.resolve({done:!1,value:o});if(this[ae])return i();let a,l,f=g=>{this.off("data",h),this.off("end",p),this.off(j,m),i(),l(g)},h=g=>{this.off("error",f),this.off("end",p),this.off(j,m),this.pause(),a({value:g,done:!!this[ae]})},p=()=>{this.off("error",f),this.off("data",h),this.off(j,m),i(),a({done:!0,value:void 0})},m=()=>f(new Error("stream destroyed"));return new Promise((g,S)=>{l=S,a=g,this.once(j,m),this.once("error",f),this.once("end",p),this.once("data",h)})},throw:i,return:i,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[bt]=!1;let e=!1,i=()=>(this.pause(),this.off(hn,i),this.off(j,i),this.off("end",i),e=!0,{done:!0,value:void 0}),s=()=>{if(e)return i();let o=this.read();return o===null?i():{done:!1,value:o}};return this.once("end",i),this.once(hn,i),this.once(j,i),{next:s,throw:i,return:i,[Symbol.iterator](){return this}}}destroy(e){if(this[j])return e?this.emit("error",e):this.emit(j),this;this[j]=!0,this[bt]=!0,this[J].length=0,this[X]=0;let i=this;return typeof i.close=="function"&&!this[Us]&&i.close(),e?this.emit("error",e):this.emit(j),this}static get isStream(){return lw}};var ww=te.realpathSync.native,yi={lstatSync:te.lstatSync,readdir:te.readdir,readdirSync:te.readdirSync,readlinkSync:te.readlinkSync,realpathSync:ww,promises:{lstat:Me.lstat,readdir:Me.readdir,readlink:Me.readlink,realpath:Me.realpath}},wc=r=>!r||r===yi||r===xw?yi:{...yi,...r,promises:{...yi.promises,...r.promises||{}}},bc=/^\\\\\?\\([a-z]:)\\?$/i,bw=r=>r.replace(/\//g,"\\").replace(bc,"$1\\"),Sw=/[\\\/]/,kt=0,Sc=1,vc=2,Yt=4,Cc=6,Ec=8,tr=10,Oc=12,At=15,gi=~At,gn=16,dc=32,xi=64,Gt=128,Qs=256,Zs=512,mc=xi|Gt|Zs,vw=1023,yn=r=>r.isFile()?Ec:r.isDirectory()?Yt:r.isSymbolicLink()?tr:r.isCharacterDevice()?vc:r.isBlockDevice()?Cc:r.isSocket()?Oc:r.isFIFO()?Sc:kt,gc=new Map,wi=r=>{let t=gc.get(r);if(t)return t;let e=r.normalize("NFKD");return gc.set(r,e),e},yc=new Map,Vs=r=>{let t=yc.get(r);if(t)return t;let e=wi(r.toLowerCase());return yc.set(r,e),e},to=class extends li{constructor(){super({max:256})}},xn=class extends li{constructor(t=16*1024){super({maxSize:t,sizeCalculation:e=>e.length+1})}},Ac=Symbol("PathScurry setAsCwd"),ct,Ci,Ei,Oi,Ai,ki,Ti,_i,Ri,Pi,Fi,Di,Li,Mi,Ii,Ni,Bi,ji,Wi,Le,er,Jt,le,he,ue,_,rr,ce,Xt,A,wn,Ys,bi,bn,Sn,Si,Js,vn,Cn,Xs,kc,Tc,_c,En,Mr,Ir,Rc,ir,ot=class{constructor(t,e=kt,i,s,o,a,l){b(this,A);d(this,"name");d(this,"root");d(this,"roots");d(this,"parent");d(this,"nocase");d(this,"isCWD",!1);b(this,ct);b(this,Ci);b(this,Ei);b(this,Oi);b(this,Ai);b(this,ki);b(this,Ti);b(this,_i);b(this,Ri);b(this,Pi);b(this,Fi);b(this,Di);b(this,Li);b(this,Mi);b(this,Ii);b(this,Ni);b(this,Bi);b(this,ji);b(this,Wi);b(this,Le);b(this,er);b(this,Jt);b(this,le);b(this,he);b(this,ue);b(this,_);b(this,rr);b(this,ce);b(this,Xt);b(this,Mr,[]);b(this,Ir,!1);b(this,ir);this.name=t,c(this,Le,o?Vs(t):wi(t)),c(this,_,e&vw),this.nocase=o,this.roots=s,this.root=i||this,c(this,rr,a),c(this,Jt,l.fullpath),c(this,he,l.relative),c(this,ue,l.relativePosix),this.parent=l.parent,this.parent?c(this,ct,n(this.parent,ct)):c(this,ct,wc(l.fs))}get dev(){return n(this,Ci)}get mode(){return n(this,Ei)}get nlink(){return n(this,Oi)}get uid(){return n(this,Ai)}get gid(){return n(this,ki)}get rdev(){return n(this,Ti)}get blksize(){return n(this,_i)}get ino(){return n(this,Ri)}get size(){return n(this,Pi)}get blocks(){return n(this,Fi)}get atimeMs(){return n(this,Di)}get mtimeMs(){return n(this,Li)}get ctimeMs(){return n(this,Mi)}get birthtimeMs(){return n(this,Ii)}get atime(){return n(this,Ni)}get mtime(){return n(this,Bi)}get ctime(){return n(this,ji)}get birthtime(){return n(this,Wi)}get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}depth(){return n(this,er)!==void 0?n(this,er):this.parent?c(this,er,this.parent.depth()+1):c(this,er,0)}childrenCache(){return n(this,rr)}resolve(t){var a;if(!t)return this;let e=this.getRootString(t),s=t.substring(e.length).split(this.splitSep);return e?y(a=this.getRoot(e),A,wn).call(a,s):y(this,A,wn).call(this,s)}children(){let t=n(this,rr).get(this);if(t)return t;let e=Object.assign([],{provisional:0});return n(this,rr).set(this,e),c(this,_,n(this,_)&~gn),e}child(t,e){if(t===""||t===".")return this;if(t==="..")return this.parent||this;let i=this.children(),s=this.nocase?Vs(t):wi(t);for(let f of i)if(n(f,Le)===s)return f;let o=this.parent?this.sep:"",a=n(this,Jt)?n(this,Jt)+o+t:void 0,l=this.newChild(t,kt,{...e,parent:this,fullpath:a});return this.canReaddir()||c(l,_,n(l,_)|Gt),i.push(l),l}relative(){if(this.isCWD)return"";if(n(this,he)!==void 0)return n(this,he);let t=this.name,e=this.parent;if(!e)return c(this,he,this.name);let i=e.relative();return i+(!i||!e.parent?"":this.sep)+t}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(n(this,ue)!==void 0)return n(this,ue);let t=this.name,e=this.parent;if(!e)return c(this,ue,this.fullpathPosix());let i=e.relativePosix();return i+(!i||!e.parent?"":"/")+t}fullpath(){if(n(this,Jt)!==void 0)return n(this,Jt);let t=this.name,e=this.parent;if(!e)return c(this,Jt,this.name);let s=e.fullpath()+(e.parent?this.sep:"")+t;return c(this,Jt,s)}fullpathPosix(){if(n(this,le)!==void 0)return n(this,le);if(this.sep==="/")return c(this,le,this.fullpath());if(!this.parent){let s=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(s)?c(this,le,`//?/${s}`):c(this,le,s)}let t=this.parent,e=t.fullpathPosix(),i=e+(!e||!t.parent?"":"/")+this.name;return c(this,le,i)}isUnknown(){return(n(this,_)&At)===kt}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(n(this,_)&At)===Ec}isDirectory(){return(n(this,_)&At)===Yt}isCharacterDevice(){return(n(this,_)&At)===vc}isBlockDevice(){return(n(this,_)&At)===Cc}isFIFO(){return(n(this,_)&At)===Sc}isSocket(){return(n(this,_)&At)===Oc}isSymbolicLink(){return(n(this,_)&tr)===tr}lstatCached(){return n(this,_)&dc?this:void 0}readlinkCached(){return n(this,ce)}realpathCached(){return n(this,Xt)}readdirCached(){let t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(n(this,ce))return!0;if(!this.parent)return!1;let t=n(this,_)&At;return!(t!==kt&&t!==tr||n(this,_)&Qs||n(this,_)&Gt)}calledReaddir(){return!!(n(this,_)&gn)}isENOENT(){return!!(n(this,_)&Gt)}isNamed(t){return this.nocase?n(this,Le)===Vs(t):n(this,Le)===wi(t)}async readlink(){var e;let t=n(this,ce);if(t)return t;if(this.canReadlink()&&this.parent)try{let i=await n(this,ct).promises.readlink(this.fullpath()),s=(e=await this.parent.realpath())==null?void 0:e.resolve(i);if(s)return c(this,ce,s)}catch(i){y(this,A,Cn).call(this,i.code);return}}readlinkSync(){var e;let t=n(this,ce);if(t)return t;if(this.canReadlink()&&this.parent)try{let i=n(this,ct).readlinkSync(this.fullpath()),s=(e=this.parent.realpathSync())==null?void 0:e.resolve(i);if(s)return c(this,ce,s)}catch(i){y(this,A,Cn).call(this,i.code);return}}async lstat(){if(!(n(this,_)&Gt))try{return y(this,A,En).call(this,await n(this,ct).promises.lstat(this.fullpath())),this}catch(t){y(this,A,vn).call(this,t.code)}}lstatSync(){if(!(n(this,_)&Gt))try{return y(this,A,En).call(this,n(this,ct).lstatSync(this.fullpath())),this}catch(t){y(this,A,vn).call(this,t.code)}}readdirCB(t,e=!1){if(!this.canReaddir()){e?t(null,[]):queueMicrotask(()=>t(null,[]));return}let i=this.children();if(this.calledReaddir()){let o=i.slice(0,i.provisional);e?t(null,o):queueMicrotask(()=>t(null,o));return}if(n(this,Mr).push(t),n(this,Ir))return;c(this,Ir,!0);let s=this.fullpath();n(this,ct).readdir(s,{withFileTypes:!0},(o,a)=>{if(o)y(this,A,Js).call(this,o.code),i.provisional=0;else{for(let l of a)y(this,A,Xs).call(this,l,i);y(this,A,Ys).call(this,i)}y(this,A,Rc).call(this,i.slice(0,i.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(n(this,ir))await n(this,ir);else{let i=()=>{};c(this,ir,new Promise(s=>i=s));try{for(let s of await n(this,ct).promises.readdir(e,{withFileTypes:!0}))y(this,A,Xs).call(this,s,t);y(this,A,Ys).call(this,t)}catch(s){y(this,A,Js).call(this,s.code),t.provisional=0}c(this,ir,void 0),i()}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 i of n(this,ct).readdirSync(e,{withFileTypes:!0}))y(this,A,Xs).call(this,i,t);y(this,A,Ys).call(this,t)}catch(i){y(this,A,Js).call(this,i.code),t.provisional=0}return t.slice(0,t.provisional)}canReaddir(){if(n(this,_)&mc)return!1;let t=At&n(this,_);return t===kt||t===Yt||t===tr}shouldWalk(t,e){return(n(this,_)&Yt)===Yt&&!(n(this,_)&mc)&&!t.has(this)&&(!e||e(this))}async realpath(){if(n(this,Xt))return n(this,Xt);if(!((Zs|Qs|Gt)&n(this,_)))try{let t=await n(this,ct).promises.realpath(this.fullpath());return c(this,Xt,this.resolve(t))}catch(t){y(this,A,Sn).call(this)}}realpathSync(){if(n(this,Xt))return n(this,Xt);if(!((Zs|Qs|Gt)&n(this,_)))try{let t=n(this,ct).realpathSync(this.fullpath());return c(this,Xt,this.resolve(t))}catch(t){y(this,A,Sn).call(this)}}[Ac](t){if(t===this)return;t.isCWD=!1,this.isCWD=!0;let e=new Set([]),i=[],s=this;for(;s&&s.parent;)e.add(s),c(s,he,i.join(this.sep)),c(s,ue,i.join("/")),s=s.parent,i.push("..");for(s=t;s&&s.parent&&!e.has(s);)c(s,he,void 0),c(s,ue,void 0),s=s.parent}};ct=new WeakMap,Ci=new WeakMap,Ei=new WeakMap,Oi=new WeakMap,Ai=new WeakMap,ki=new WeakMap,Ti=new WeakMap,_i=new WeakMap,Ri=new WeakMap,Pi=new WeakMap,Fi=new WeakMap,Di=new WeakMap,Li=new WeakMap,Mi=new WeakMap,Ii=new WeakMap,Ni=new WeakMap,Bi=new WeakMap,ji=new WeakMap,Wi=new WeakMap,Le=new WeakMap,er=new WeakMap,Jt=new WeakMap,le=new WeakMap,he=new WeakMap,ue=new WeakMap,_=new WeakMap,rr=new WeakMap,ce=new WeakMap,Xt=new WeakMap,A=new WeakSet,wn=function(t){let e=this;for(let i of t)e=e.child(i);return e},Ys=function(t){var e;c(this,_,n(this,_)|gn);for(let i=t.provisional;i<t.length;i++){let s=t[i];s&&y(e=s,A,bi).call(e)}},bi=function(){n(this,_)&Gt||(c(this,_,(n(this,_)|Gt)&gi),y(this,A,bn).call(this))},bn=function(){var e;let t=this.children();t.provisional=0;for(let i of t)y(e=i,A,bi).call(e)},Sn=function(){c(this,_,n(this,_)|Zs),y(this,A,Si).call(this)},Si=function(){if(n(this,_)&xi)return;let t=n(this,_);(t&At)===Yt&&(t&=gi),c(this,_,t|xi),y(this,A,bn).call(this)},Js=function(t=""){t==="ENOTDIR"||t==="EPERM"?y(this,A,Si).call(this):t==="ENOENT"?y(this,A,bi).call(this):this.children().provisional=0},vn=function(t=""){var e;if(t==="ENOTDIR"){let i=this.parent;y(e=i,A,Si).call(e)}else t==="ENOENT"&&y(this,A,bi).call(this)},Cn=function(t=""){var i;let e=n(this,_);e|=Qs,t==="ENOENT"&&(e|=Gt),(t==="EINVAL"||t==="UNKNOWN")&&(e&=gi),c(this,_,e),t==="ENOTDIR"&&this.parent&&y(i=this.parent,A,Si).call(i)},Xs=function(t,e){return y(this,A,Tc).call(this,t,e)||y(this,A,kc).call(this,t,e)},kc=function(t,e){let i=yn(t),s=this.newChild(t.name,i,{parent:this}),o=n(s,_)&At;return o!==Yt&&o!==tr&&o!==kt&&c(s,_,n(s,_)|xi),e.unshift(s),e.provisional++,s},Tc=function(t,e){for(let i=e.provisional;i<e.length;i++){let s=e[i];if((this.nocase?Vs(t.name):wi(t.name))===n(s,Le))return y(this,A,_c).call(this,t,s,i,e)}},_c=function(t,e,i,s){let o=e.name;return c(e,_,n(e,_)&gi|yn(t)),o!==t.name&&(e.name=t.name),i!==s.provisional&&(i===s.length-1?s.pop():s.splice(i,1),s.unshift(e)),s.provisional++,e},En=function(t){let{atime:e,atimeMs:i,birthtime:s,birthtimeMs:o,blksize:a,blocks:l,ctime:f,ctimeMs:h,dev:p,gid:m,ino:g,mode:S,mtime:C,mtimeMs:x,nlink:E,rdev:w,size:O,uid:k}=t;c(this,Ni,e),c(this,Di,i),c(this,Wi,s),c(this,Ii,o),c(this,_i,a),c(this,Fi,l),c(this,ji,f),c(this,Mi,h),c(this,Ci,p),c(this,ki,m),c(this,Ri,g),c(this,Ei,S),c(this,Bi,C),c(this,Li,x),c(this,Oi,E),c(this,Ti,w),c(this,Pi,O),c(this,Ai,k);let T=yn(t);c(this,_,n(this,_)&gi|T|dc),T!==kt&&T!==Yt&&T!==tr&&c(this,_,n(this,_)|xi)},Mr=new WeakMap,Ir=new WeakMap,Rc=function(t){c(this,Ir,!1);let e=n(this,Mr).slice();n(this,Mr).length=0,e.forEach(i=>i(null,t))},ir=new WeakMap;var eo=class r extends ot{constructor(e,i=kt,s,o,a,l,f){super(e,i,s,o,a,l,f);d(this,"sep","\\");d(this,"splitSep",Sw)}newChild(e,i=kt,s={}){return new r(e,i,this.root,this.roots,this.nocase,this.childrenCache(),s)}getRootString(e){return jr.win32.parse(e).root}getRoot(e){if(e=bw(e.toUpperCase()),e===this.root.name)return this.root;for(let[i,s]of Object.entries(this.roots))if(this.sameRoot(e,i))return this.roots[e]=s;return this.roots[e]=new Wr(e,this).root}sameRoot(e,i=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(bc,"$1\\"),e===i}},ro=class r extends ot{constructor(e,i=kt,s,o,a,l,f){super(e,i,s,o,a,l,f);d(this,"splitSep","/");d(this,"sep","/")}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,i=kt,s={}){return new r(e,i,this.root,this.roots,this.nocase,this.childrenCache(),s)}},Nr,Br,zi,Ui,io=class{constructor(t=process.cwd(),e,i,{nocase:s,childrenCacheSize:o=16*1024,fs:a=yi}={}){d(this,"root");d(this,"rootPath");d(this,"roots");d(this,"cwd");b(this,Nr);b(this,Br);b(this,zi);d(this,"nocase");b(this,Ui);c(this,Ui,wc(a)),(t instanceof URL||t.startsWith("file://"))&&(t=(0,xc.fileURLToPath)(t));let l=e.resolve(t);this.roots=Object.create(null),this.rootPath=this.parseRootPath(l),c(this,Nr,new to),c(this,Br,new to),c(this,zi,new xn(o));let f=l.substring(this.rootPath.length).split(i);if(f.length===1&&!f[0]&&f.pop(),s===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=s,this.root=this.newRoot(n(this,Ui)),this.roots[this.rootPath]=this.root;let h=this.root,p=f.length-1,m=e.sep,g=this.rootPath,S=!1;for(let C of f){let x=p--;h=h.child(C,{relative:new Array(x).fill("..").join(m),relativePosix:new Array(x).fill("..").join("/"),fullpath:g+=(S?"":m)+C}),S=!0}this.cwd=h}depth(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.depth()}childrenCache(){return n(this,zi)}resolve(...t){let e="";for(let o=t.length-1;o>=0;o--){let a=t[o];if(!(!a||a===".")&&(e=e?`${a}/${e}`:a,this.isAbsolute(a)))break}let i=n(this,Nr).get(e);if(i!==void 0)return i;let s=this.cwd.resolve(e).fullpath();return n(this,Nr).set(e,s),s}resolvePosix(...t){let e="";for(let o=t.length-1;o>=0;o--){let a=t[o];if(!(!a||a===".")&&(e=e?`${a}/${e}`:a,this.isAbsolute(a)))break}let i=n(this,Br).get(e);if(i!==void 0)return i;let s=this.cwd.resolve(e).fullpathPosix();return n(this,Br).set(e,s),s}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 ot||(e=t,t=this.cwd);let{withFileTypes:i}=e;if(t.canReaddir()){let s=await t.readdir();return i?s:s.map(o=>o.name)}else return[]}readdirSync(t=this.cwd,e={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof ot||(e=t,t=this.cwd);let{withFileTypes:i=!0}=e;return t.canReaddir()?i?t.readdirSync():t.readdirSync().map(s=>s.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 ot||(e=t.withFileTypes,t=this.cwd);let i=await t.readlink();return e?i:i==null?void 0:i.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof ot||(e=t.withFileTypes,t=this.cwd);let i=t.readlinkSync();return e?i:i==null?void 0:i.fullpath()}async realpath(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof ot||(e=t.withFileTypes,t=this.cwd);let i=await t.realpath();return e?i:i==null?void 0:i.fullpath()}realpathSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof ot||(e=t.withFileTypes,t=this.cwd);let i=t.realpathSync();return e?i:i==null?void 0:i.fullpath()}async walk(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof ot||(e=t,t=this.cwd);let{withFileTypes:i=!0,follow:s=!1,filter:o,walkFilter:a}=e,l=[];(!o||o(t))&&l.push(i?t:t.fullpath());let f=new Set,h=(m,g)=>{f.add(m),m.readdirCB((S,C)=>{if(S)return g(S);let x=C.length;if(!x)return g();let E=()=>{--x===0&&g()};for(let w of C)(!o||o(w))&&l.push(i?w:w.fullpath()),s&&w.isSymbolicLink()?w.realpath().then(O=>O!=null&&O.isUnknown()?O.lstat():O).then(O=>O!=null&&O.shouldWalk(f,a)?h(O,E):E()):w.shouldWalk(f,a)?h(w,E):E()},!0)},p=t;return new Promise((m,g)=>{h(p,S=>{if(S)return g(S);m(l)})})}walkSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof ot||(e=t,t=this.cwd);let{withFileTypes:i=!0,follow:s=!1,filter:o,walkFilter:a}=e,l=[];(!o||o(t))&&l.push(i?t:t.fullpath());let f=new Set([t]);for(let h of f){let p=h.readdirSync();for(let m of p){(!o||o(m))&&l.push(i?m:m.fullpath());let g=m;if(m.isSymbolicLink()){if(!(s&&(g=m.realpathSync())))continue;g.isUnknown()&&g.lstatSync()}g.shouldWalk(f,a)&&f.add(g)}}return l}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,e={}){return typeof t=="string"?t=this.cwd.resolve(t):t instanceof ot||(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 ot||(e=t,t=this.cwd);let{withFileTypes:i=!0,follow:s=!1,filter:o,walkFilter:a}=e;(!o||o(t))&&(yield i?t:t.fullpath());let l=new Set([t]);for(let f of l){let h=f.readdirSync();for(let p of h){(!o||o(p))&&(yield i?p:p.fullpath());let m=p;if(p.isSymbolicLink()){if(!(s&&(m=p.realpathSync())))continue;m.isUnknown()&&m.lstatSync()}m.shouldWalk(l,a)&&l.add(m)}}}stream(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof ot||(e=t,t=this.cwd);let{withFileTypes:i=!0,follow:s=!1,filter:o,walkFilter:a}=e,l=new De({objectMode:!0});(!o||o(t))&&l.write(i?t:t.fullpath());let f=new Set,h=[t],p=0,m=()=>{let g=!1;for(;!g;){let S=h.shift();if(!S){p===0&&l.end();return}p++,f.add(S);let C=(E,w,O=!1)=>{if(E)return l.emit("error",E);if(s&&!O){let k=[];for(let T of w)T.isSymbolicLink()&&k.push(T.realpath().then(D=>D!=null&&D.isUnknown()?D.lstat():D));if(k.length){Promise.all(k).then(()=>C(null,w,!0));return}}for(let k of w)k&&(!o||o(k))&&(l.write(i?k:k.fullpath())||(g=!0));p--;for(let k of w){let T=k.realpathCached()||k;T.shouldWalk(f,a)&&h.push(T)}g&&!l.flowing?l.once("drain",m):x||m()},x=!0;S.readdirCB(C,!0),x=!1}};return m(),l}streamSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof ot||(e=t,t=this.cwd);let{withFileTypes:i=!0,follow:s=!1,filter:o,walkFilter:a}=e,l=new De({objectMode:!0}),f=new Set;(!o||o(t))&&l.write(i?t:t.fullpath());let h=[t],p=0,m=()=>{let g=!1;for(;!g;){let S=h.shift();if(!S){p===0&&l.end();return}p++,f.add(S);let C=S.readdirSync();for(let x of C)(!o||o(x))&&(l.write(i?x:x.fullpath())||(g=!0));p--;for(let x of C){let E=x;if(x.isSymbolicLink()){if(!(s&&(E=x.realpathSync())))continue;E.isUnknown()&&E.lstatSync()}E.shouldWalk(f,a)&&h.push(E)}}g&&!l.flowing&&l.once("drain",m)};return m(),l}chdir(t=this.cwd){let e=this.cwd;this.cwd=typeof t=="string"?this.cwd.resolve(t):t,this.cwd[Ac](e)}};Nr=new WeakMap,Br=new WeakMap,zi=new WeakMap,Ui=new WeakMap;var Wr=class extends io{constructor(e=process.cwd(),i={}){let{nocase:s=!0}=i;super(e,jr.win32,"\\",{...i,nocase:s});d(this,"sep","\\");this.nocase=s;for(let o=this.cwd;o;o=o.parent)o.nocase=this.nocase}parseRootPath(e){return jr.win32.parse(e).root.toUpperCase()}newRoot(e){return new eo(this.rootPath,Yt,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},zr=class extends io{constructor(e=process.cwd(),i={}){let{nocase:s=!1}=i;super(e,jr.posix,"/",{...i,nocase:s});d(this,"sep","/");this.nocase=s}parseRootPath(e){return"/"}newRoot(e){return new ro(this.rootPath,Yt,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},vi=class extends zr{constructor(t=process.cwd(),e={}){let{nocase:i=!0}=e;super(t,{...e,nocase:i})}},Hk=process.platform==="win32"?eo:ro,Pc=process.platform==="win32"?Wr:process.platform==="darwin"?vi:zr;var Cw=r=>r.length>=1,Ew=r=>r.length>=1,K,St,tt,sr,$t,Gi,Ie,Ne,Be,Ur,On=class On{constructor(t,e,i,s){b(this,K);b(this,St);b(this,tt);d(this,"length");b(this,sr);b(this,$t);b(this,Gi);b(this,Ie);b(this,Ne);b(this,Be);b(this,Ur,!0);if(!Cw(t))throw new TypeError("empty pattern list");if(!Ew(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,i<0||i>=this.length)throw new TypeError("index out of range");if(c(this,K,t),c(this,St,e),c(this,tt,i),c(this,sr,s),n(this,tt)===0){if(this.isUNC()){let[o,a,l,f,...h]=n(this,K),[p,m,g,S,...C]=n(this,St);h[0]===""&&(h.shift(),C.shift());let x=[o,a,l,f,""].join("/"),E=[p,m,g,S,""].join("/");c(this,K,[x,...h]),c(this,St,[E,...C]),this.length=n(this,K).length}else if(this.isDrive()||this.isAbsolute()){let[o,...a]=n(this,K),[l,...f]=n(this,St);a[0]===""&&(a.shift(),f.shift());let h=o+"/",p=l+"/";c(this,K,[h,...a]),c(this,St,[p,...f]),this.length=n(this,K).length}}}pattern(){return n(this,K)[n(this,tt)]}isString(){return typeof n(this,K)[n(this,tt)]=="string"}isGlobstar(){return n(this,K)[n(this,tt)]===et}isRegExp(){return n(this,K)[n(this,tt)]instanceof RegExp}globString(){return c(this,Gi,n(this,Gi)||(n(this,tt)===0?this.isAbsolute()?n(this,St)[0]+n(this,St).slice(1).join("/"):n(this,St).join("/"):n(this,St).slice(n(this,tt)).join("/")))}hasMore(){return this.length>n(this,tt)+1}rest(){return n(this,$t)!==void 0?n(this,$t):this.hasMore()?(c(this,$t,new On(n(this,K),n(this,St),n(this,tt)+1,n(this,sr))),c(n(this,$t),Be,n(this,Be)),c(n(this,$t),Ne,n(this,Ne)),c(n(this,$t),Ie,n(this,Ie)),n(this,$t)):c(this,$t,null)}isUNC(){let t=n(this,K);return n(this,Ne)!==void 0?n(this,Ne):c(this,Ne,n(this,sr)==="win32"&&n(this,tt)===0&&t[0]===""&&t[1]===""&&typeof t[2]=="string"&&!!t[2]&&typeof t[3]=="string"&&!!t[3])}isDrive(){let t=n(this,K);return n(this,Ie)!==void 0?n(this,Ie):c(this,Ie,n(this,sr)==="win32"&&n(this,tt)===0&&this.length>1&&typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]))}isAbsolute(){let t=n(this,K);return n(this,Be)!==void 0?n(this,Be):c(this,Be,t[0]===""&&t.length>1||this.isDrive()||this.isUNC())}root(){let t=n(this,K)[0];return typeof t=="string"&&this.isAbsolute()&&n(this,tt)===0?t:""}checkFollowGlobstar(){return!(n(this,tt)===0||!this.isGlobstar()||!n(this,Ur))}markFollowGlobstar(){return n(this,tt)===0||!this.isGlobstar()||!n(this,Ur)?!1:(c(this,Ur,!1),!0)}};K=new WeakMap,St=new WeakMap,tt=new WeakMap,sr=new WeakMap,$t=new WeakMap,Gi=new WeakMap,Ie=new WeakMap,Ne=new WeakMap,Be=new WeakMap,Ur=new WeakMap;var Gr=On;var Ow=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",$r=class{constructor(t,{nobrace:e,nocase:i,noext:s,noglobstar:o,platform:a=Ow}){d(this,"relative");d(this,"relativeChildren");d(this,"absolute");d(this,"absoluteChildren");d(this,"platform");d(this,"mmopts");this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=a,this.mmopts={dot:!0,nobrace:e,nocase:i,noext:s,noglobstar:o,optimizationLevel:2,platform:a,nocomment:!0,nonegate:!0};for(let l of t)this.add(l)}add(t){let e=new mt(t,this.mmopts);for(let i=0;i<e.set.length;i++){let s=e.set[i],o=e.globParts[i];if(!s||!o)throw new Error("invalid pattern object");for(;s[0]==="."&&o[0]===".";)s.shift(),o.shift();let a=new Gr(s,o,0,this.platform),l=new mt(a.globString(),this.mmopts),f=o[o.length-1]==="**",h=a.isAbsolute();h?this.absolute.push(l):this.relative.push(l),f&&(h?this.absoluteChildren.push(l):this.relativeChildren.push(l))}}ignored(t){let e=t.fullpath(),i=`${e}/`,s=t.relative()||".",o=`${s}/`;for(let a of this.relative)if(a.match(s)||a.match(o))return!0;for(let a of this.absolute)if(a.match(e)||a.match(i))return!0;return!1}childrenIgnored(t){let e=t.fullpath()+"/",i=(t.relative()||".")+"/";for(let s of this.relativeChildren)if(s.match(i))return!0;for(let s of this.absoluteChildren)if(s.match(e))return!0;return!1}};var An=class r{constructor(t=new Map){d(this,"store");this.store=t}copy(){return new r(new Map(this.store))}hasWalked(t,e){var i;return(i=this.store.get(t.fullpath()))==null?void 0:i.has(e.globString())}storeWalked(t,e){let i=t.fullpath(),s=this.store.get(i);s?s.add(e.globString()):this.store.set(i,new Set([e.globString()]))}},kn=class{constructor(){d(this,"store",new Map)}add(t,e,i){let s=(e?2:0)|(i?1:0),o=this.store.get(t);this.store.set(t,o===void 0?s:s&o)}entries(){return[...this.store.entries()].map(([t,e])=>[t,!!(e&2),!!(e&1)])}},Tn=class{constructor(){d(this,"store",new Map)}add(t,e){if(!t.canReaddir())return;let i=this.store.get(t);i?i.find(s=>s.globString()===e.globString())||i.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())}},$i=class r{constructor(t,e){d(this,"hasWalkedCache");d(this,"matches",new kn);d(this,"subwalks",new Tn);d(this,"patterns");d(this,"follow");d(this,"dot");d(this,"opts");this.opts=t,this.follow=!!t.follow,this.dot=!!t.dot,this.hasWalkedCache=e?e.copy():new An}processPatterns(t,e){this.patterns=e;let i=e.map(s=>[t,s]);for(let[s,o]of i){this.hasWalkedCache.storeWalked(s,o);let a=o.root(),l=o.isAbsolute()&&this.opts.absolute!==!1;if(a){s=s.resolve(a==="/"&&this.opts.root!==void 0?this.opts.root:a);let m=o.rest();if(m)o=m;else{this.matches.add(s,!0,!1);continue}}if(s.isENOENT())continue;let f,h,p=!1;for(;typeof(f=o.pattern())=="string"&&(h=o.rest());)s=s.resolve(f),o=h,p=!0;if(f=o.pattern(),h=o.rest(),p){if(this.hasWalkedCache.hasWalked(s,o))continue;this.hasWalkedCache.storeWalked(s,o)}if(typeof f=="string"){let m=f===".."||f===""||f===".";this.matches.add(s.resolve(f),l,m);continue}else if(f===et){(!s.isSymbolicLink()||this.follow||o.checkFollowGlobstar())&&this.subwalks.add(s,o);let m=h==null?void 0:h.pattern(),g=h==null?void 0:h.rest();if(!h||(m===""||m===".")&&!g)this.matches.add(s,l,m===""||m===".");else if(m===".."){let S=s.parent||s;g?this.hasWalkedCache.hasWalked(S,g)||this.subwalks.add(S,g):this.matches.add(S,l,!0)}}else f instanceof RegExp&&this.subwalks.add(s,o)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new r(this.opts,this.hasWalkedCache)}filterEntries(t,e){let i=this.subwalks.get(t),s=this.child();for(let o of e)for(let a of i){let l=a.isAbsolute(),f=a.pattern(),h=a.rest();f===et?s.testGlobstar(o,a,h,l):f instanceof RegExp?s.testRegExp(o,f,h,l):s.testString(o,f,h,l)}return s}testGlobstar(t,e,i,s){if((this.dot||!t.name.startsWith("."))&&(e.hasMore()||this.matches.add(t,s,!1),t.canReaddir()&&(this.follow||!t.isSymbolicLink()?this.subwalks.add(t,e):t.isSymbolicLink()&&(i&&e.checkFollowGlobstar()?this.subwalks.add(t,i):e.markFollowGlobstar()&&this.subwalks.add(t,e)))),i){let o=i.pattern();if(typeof o=="string"&&o!==".."&&o!==""&&o!==".")this.testString(t,o,i.rest(),s);else if(o===".."){let a=t.parent||t;this.subwalks.add(a,i)}else o instanceof RegExp&&this.testRegExp(t,o,i.rest(),s)}}testRegExp(t,e,i,s){e.test(t.name)&&(i?this.subwalks.add(t,i):this.matches.add(t,s,!1))}testString(t,e,i,s){t.isNamed(e)&&(i?this.subwalks.add(t,i):this.matches.add(t,s,!1))}};var Aw=(r,t)=>typeof r=="string"?new $r([r],t):Array.isArray(r)?new $r(r,t):r,Hr,pe,nr,Tt,or,_n,so=class{constructor(t,e,i){b(this,Tt);d(this,"path");d(this,"patterns");d(this,"opts");d(this,"seen",new Set);d(this,"paused",!1);d(this,"aborted",!1);b(this,Hr,[]);b(this,pe);b(this,nr);d(this,"signal");d(this,"maxDepth");d(this,"includeChildMatches");var s;if(this.patterns=t,this.path=e,this.opts=i,c(this,nr,!i.posix&&i.platform==="win32"?"\\":"/"),this.includeChildMatches=i.includeChildMatches!==!1,(i.ignore||!this.includeChildMatches)&&(c(this,pe,Aw((s=i.ignore)!=null?s:[],i)),!this.includeChildMatches&&typeof n(this,pe).add!="function")){let o="cannot ignore child matches, ignore lacks add() method.";throw new Error(o)}this.maxDepth=i.maxDepth||1/0,i.signal&&(this.signal=i.signal,this.signal.addEventListener("abort",()=>{n(this,Hr).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=n(this,Hr).shift());)t()}onResume(t){var e;(e=this.signal)!=null&&e.aborted||(this.paused?n(this,Hr).push(t):t())}async matchCheck(t,e){if(e&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=t.realpathCached()||await t.realpath(),!i)return;t=i}let o=t.isUnknown()||this.opts.stat?await t.lstat():t;if(this.opts.follow&&this.opts.nodir&&(o!=null&&o.isSymbolicLink())){let a=await o.realpath();a&&(a.isUnknown()||this.opts.stat)&&await a.lstat()}return this.matchCheckTest(o,e)}matchCheckTest(t,e){var i;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()||!((i=t.realpathCached())!=null&&i.isDirectory()))&&!y(this,Tt,or).call(this,t)?t:void 0}matchCheckSync(t,e){if(e&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=t.realpathCached()||t.realpathSync(),!i)return;t=i}let o=t.isUnknown()||this.opts.stat?t.lstatSync():t;if(this.opts.follow&&this.opts.nodir&&(o!=null&&o.isSymbolicLink())){let a=o.realpathSync();a&&(a!=null&&a.isUnknown()||this.opts.stat)&&a.lstatSync()}return this.matchCheckTest(o,e)}matchFinish(t,e){var o;if(y(this,Tt,or).call(this,t))return;if(!this.includeChildMatches&&((o=n(this,pe))!=null&&o.add)){let a=`${t.relativePosix()}/**`;n(this,pe).add(a)}let i=this.opts.absolute===void 0?e:this.opts.absolute;this.seen.add(t);let s=this.opts.mark&&t.isDirectory()?n(this,nr):"";if(this.opts.withFileTypes)this.matchEmit(t);else if(i){let a=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(a+s)}else{let a=this.opts.posix?t.relativePosix():t.relative(),l=this.opts.dotRelative&&!a.startsWith(".."+n(this,nr))?"."+n(this,nr):"";this.matchEmit(a?l+a+s:"."+s)}}async match(t,e,i){let s=await this.matchCheck(t,i);s&&this.matchFinish(s,e)}matchSync(t,e,i){let s=this.matchCheckSync(t,i);s&&this.matchFinish(s,e)}walkCB(t,e,i){var s;(s=this.signal)!=null&&s.aborted&&i(),this.walkCB2(t,e,new $i(this.opts),i)}walkCB2(t,e,i,s){var l;if(y(this,Tt,_n).call(this,t))return s();if((l=this.signal)!=null&&l.aborted&&s(),this.paused){this.onResume(()=>this.walkCB2(t,e,i,s));return}i.processPatterns(t,e);let o=1,a=()=>{--o===0&&s()};for(let[f,h,p]of i.matches.entries())y(this,Tt,or).call(this,f)||(o++,this.match(f,h,p).then(()=>a()));for(let f of i.subwalkTargets()){if(this.maxDepth!==1/0&&f.depth()>=this.maxDepth)continue;o++;let h=f.readdirCached();f.calledReaddir()?this.walkCB3(f,h,i,a):f.readdirCB((p,m)=>this.walkCB3(f,m,i,a),!0)}a()}walkCB3(t,e,i,s){i=i.filterEntries(t,e);let o=1,a=()=>{--o===0&&s()};for(let[l,f,h]of i.matches.entries())y(this,Tt,or).call(this,l)||(o++,this.match(l,f,h).then(()=>a()));for(let[l,f]of i.subwalks.entries())o++,this.walkCB2(l,f,i.child(),a);a()}walkCBSync(t,e,i){var s;(s=this.signal)!=null&&s.aborted&&i(),this.walkCB2Sync(t,e,new $i(this.opts),i)}walkCB2Sync(t,e,i,s){var l;if(y(this,Tt,_n).call(this,t))return s();if((l=this.signal)!=null&&l.aborted&&s(),this.paused){this.onResume(()=>this.walkCB2Sync(t,e,i,s));return}i.processPatterns(t,e);let o=1,a=()=>{--o===0&&s()};for(let[f,h,p]of i.matches.entries())y(this,Tt,or).call(this,f)||this.matchSync(f,h,p);for(let f of i.subwalkTargets()){if(this.maxDepth!==1/0&&f.depth()>=this.maxDepth)continue;o++;let h=f.readdirSync();this.walkCB3Sync(f,h,i,a)}a()}walkCB3Sync(t,e,i,s){i=i.filterEntries(t,e);let o=1,a=()=>{--o===0&&s()};for(let[l,f,h]of i.matches.entries())y(this,Tt,or).call(this,l)||this.matchSync(l,f,h);for(let[l,f]of i.subwalks.entries())o++,this.walkCB2Sync(l,f,i.child(),a);a()}};Hr=new WeakMap,pe=new WeakMap,nr=new WeakMap,Tt=new WeakSet,or=function(t){var e,i;return this.seen.has(t)||!!((i=(e=n(this,pe))==null?void 0:e.ignored)!=null&&i.call(e,t))},_n=function(t){var e,i;return!!((i=(e=n(this,pe))==null?void 0:e.childrenIgnored)!=null&&i.call(e,t))};var Hi=class extends so{constructor(e,i,s){super(e,i,s);d(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((i,s)=>{this.walkCB(this.path,this.patterns,()=>{var o;(o=this.signal)!=null&&o.aborted?s(this.signal.reason):i(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 i;if((i=this.signal)!=null&&i.aborted)throw this.signal.reason}),this.matches}},qi=class extends so{constructor(e,i,s){super(e,i,s);d(this,"results");this.results=new De({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 kw=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Ht=class{constructor(t,e){d(this,"absolute");d(this,"cwd");d(this,"root");d(this,"dot");d(this,"dotRelative");d(this,"follow");d(this,"ignore");d(this,"magicalBraces");d(this,"mark");d(this,"matchBase");d(this,"maxDepth");d(this,"nobrace");d(this,"nocase");d(this,"nodir");d(this,"noext");d(this,"noglobstar");d(this,"pattern");d(this,"platform");d(this,"realpath");d(this,"scurry");d(this,"stat");d(this,"signal");d(this,"windowsPathsNoEscape");d(this,"withFileTypes");d(this,"includeChildMatches");d(this,"opts");d(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,Fc.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(f=>f.replace(/\\/g,"/"))),this.matchBase){if(e.noglobstar)throw new TypeError("base matching requires globstar");t=t.map(f=>f.includes("/")?f:`./**/${f}`)}if(this.pattern=t,this.platform=e.platform||kw,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 f=e.platform==="win32"?Wr:e.platform==="darwin"?vi:e.platform?zr:Pc;this.scurry=new f(this.cwd,{nocase:e.nocase,fs:e.fs})}this.nocase=this.scurry.nocase;let i=this.platform==="darwin"||this.platform==="win32",s={...e,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:i,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},o=this.pattern.map(f=>new mt(f,s)),[a,l]=o.reduce((f,h)=>(f[0].push(...h.set),f[1].push(...h.globParts),f),[[],[]]);this.patterns=a.map((f,h)=>{let p=l[h];if(!p)throw new Error("invalid pattern object");return new Gr(f,p,0,this.platform)})}async walk(){return[...await new Hi(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 Hi(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 qi(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 qi(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 Rn=(r,t={})=>{Array.isArray(r)||(r=[r]);for(let e of r)if(new mt(e,t).hasMagic())return!0;return!1};function oo(r,t={}){return new Ht(r,t).streamSync()}function Mc(r,t={}){return new Ht(r,t).stream()}function Ic(r,t={}){return new Ht(r,t).walkSync()}async function Dc(r,t={}){return new Ht(r,t).walk()}function no(r,t={}){return new Ht(r,t).iterateSync()}function Nc(r,t={}){return new Ht(r,t).iterate()}var Tw=oo,_w=Object.assign(Mc,{sync:oo}),Rw=no,Pw=Object.assign(Nc,{sync:no}),Ki=Object.assign(Ic,{stream:oo,iterate:no}),Lc=Object.assign(Dc,{glob:Dc,globSync:Ic,sync:Ki,globStream:Mc,stream:_w,globStreamSync:oo,streamSync:Tw,globIterate:Nc,iterate:Pw,globIterateSync:no,iterateSync:Rw,Glob:Ht,hasMagic:Rn,escape:Ar,unescape:Dt});Lc.glob=Lc;vt();var Fw=R.withTag("listChromeProfiles");function Bc(){let r=Ki("./**/Cookies",{cwd:Er,absolute:!0});return Fw.debug("Found cookie files:",r),r}var ao=require("crypto");Ce();var Dw=Et(r=>r.length>=3&&r[0]===118&&r[1]===49&&r[2]===48?r.slice(3):r,r=>r.toString("hex")),Lw=Et(r=>{let t=r[r.length-1];return t&&t<=16?r.slice(0,-t):r},r=>r.toString("hex"));function Mw(r){var e;let t=[/.*?0t(.+)$/,/.*?1e`(.+)$/,/.*?[`'](.+)$/,/[^\x20-\x7E]*([\x20-\x7E].+)$/];for(let i of t){let s=r.match(i),o=(e=s==null?void 0:s[1])!=null?e:"";if(o.length>0)return o}return r}async function jc(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,i)=>{(0,ao.pbkdf2)(t,"saltysalt",1003,16,"sha1",(s,o)=>{try{if(s){i(new Error("Failed to derive key: "+s.message));return}let a=Dw(r);if(a.length%16!==0){i(new Error("Encrypted data length is not a multiple of 16"));return}let l=Buffer.alloc(16," "),f=(0,ao.createDecipheriv)("aes-128-cbc",o,l);f.setAutoPadding(!1);let h=f.update(a);try{f.final()}catch(m){i(new Error("Failed to finalize decryption: "+m.message));return}h=Lw(h);let p=h.toString("utf8");e(Mw(p))}catch(a){i(new Error("Decryption failed: "+a.message))}})})}Ce();ee();var qc=Et(async()=>{if(process.platform!=="darwin")throw z("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(()=>(Hc(),$c)),t=await r();return qt("ChromePassword","Retrieved password successfully",{platform:"macOS"}),t}catch(r){throw z("Chrome password retrieval failed",r,{platform:"macOS"}),r}});function Ww(r){return typeof r!="number"||r<=0?"Infinity":new Date(r)}function Kc(r,t,e,i,s,o){return{domain:r,name:t,value:e,expiry:Ww(i),meta:{file:s,browser:"Chrome",decrypted:o}}}var fo=class{constructor(){this.logger=Ji("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=Bc();if(i.length===0)return this.logger.warn("No Chrome cookie files found"),[];let s=await qc();return(await Promise.all(i.map(a=>this.processFile(a,t,e,s)))).flat()}catch(i){return i instanceof Error?z("Failed to query cookies",i,{name:t,domain:e}):z("Failed to query cookies",new Error(String(i)),{name:t,domain:e}),[]}}async processFile(t,e,i,s){try{let o=await fu({name:e,domain:i,file:t}),a={file:t,password:s};return(await Promise.allSettled(o.map(f=>this.processCookie(f,a)))).map(f=>f.status==="fulfilled"?f.value:null).filter(f=>f!==null)}catch(o){return o instanceof Error?this.logger.error("Failed to process cookie file",{error:o,file:t}):this.logger.error("Failed to process cookie file",{error:String(o),file:t}),[]}}async processCookie(t,e){try{let i=Buffer.isBuffer(t.value)?t.value:Buffer.from(String(t.value)),s=await jc(i,e.password);return Kc(t.domain,t.name,s,t.expiry,e.file,!0)}catch(i){return i instanceof Error?this.logger.warn("Failed to decrypt cookie",{error:i}):this.logger.warn("Failed to decrypt cookie",{error:String(i)}),Kc(t.domain,t.name,t.value.toString("utf-8"),t.expiry,e.file,!1)}}};async function Qc(r,t,e=[]){return r.length===0?e:(await Promise.all(r.map(async s=>{try{return await t(s)}catch(o){return e}}))).flat()}ee();var lo=class{constructor(t){this.strategies=t;this.logger=Ji("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 Qc(this.strategies,async i=>{try{return await i.queryCookies(t,e)}catch(s){return this.handleStrategyError(s,i),[]}},[])}catch(i){return i instanceof Error?this.logger.error("Failed to query cookies",{error:i}):this.logger.error("Failed to query cookies with unknown error",{error:String(i)}),[]}}};var Pn=require("path");ee();function zw(){let r=[],t=process.env.HOME;if(typeof t!="string"||t.length===0)return Xi("FirefoxCookieQuery","HOME environment variable not set"),r;let e=[(0,Pn.join)(t,"Library/Application Support/Firefox/Profiles/*/cookies.sqlite"),(0,Pn.join)(t,".mozilla/firefox/*/cookies.sqlite")];for(let i of e){let s=Ki(i);r.push(...s)}return qt("FirefoxCookieQuery","Found Firefox cookie files",{files:r}),r}var ho=class{constructor(){this.browserName="Firefox"}async queryCookies(t,e){let i=zw(),s=[];for(let o of i)try{let a=await Ls({file:o,sql:"SELECT name, value, host as domain, expiry FROM moz_cookies WHERE name = ? AND host LIKE ?",params:[t,`%${e}%`],rowTransform:l=>({name:l.name,value:l.value,domain:l.domain,expiry:l.expiry>0?new Date(l.expiry*1e3):"Infinity",meta:{file:o,browser:"Firefox",decrypted:!1}})});s.push(...a)}catch(a){a instanceof Error?Xi("FirefoxCookieQuery",`Error reading Firefox cookie file ${o}`,{error:a.message}):Xi("FirefoxCookieQuery",`Error reading Firefox cookie file ${o}`)}return s}};var rp=require("path");ee();var tp=require("fs");var Vc=ze(require("destr"),1),F=require("zod"),uo=F.z.string().trim().min(1,"Domain cannot be empty").refine(r=>/^\.?[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(r),"Invalid domain format"),co=F.z.string().trim().min(1,"Cookie name cannot be empty").refine(r=>/^[\x21\x23-\x27\x2A\x2B\x2D-\x2E\x30-\x39\x41-\x5A\x5E-\x7E]+$/.test(r),"Invalid cookie name format - must contain only valid characters (letters, numbers, and certain symbols)"),Zc=F.z.string().trim().min(1,"Path cannot be empty").refine(r=>r.startsWith("/"),"Path must start with /").refine(r=>/^\/[!#$%&'()*+,\-./:=@\w]*$/.test(r),"Invalid path format - must contain only valid URL path characters").default("/"),Yc=F.z.string().trim().transform(r=>(0,Vc.default)(r)).pipe(F.z.any()),Jc=F.z.object({name:co,value:Yc,domain:uo,path:Zc,expiry:F.z.number().int(),creation:F.z.number().int(),flags:F.z.number().optional(),version:F.z.number().int().optional(),port:F.z.number().int().optional(),comment:F.z.string().optional(),commentURL:F.z.string().optional()}),XT=F.z.object({name:co,domain:uo}).strict(),Uw=F.z.object({file:F.z.string().trim().min(1,"File path cannot be empty").optional(),browser:F.z.string().trim().optional(),decrypted:F.z.boolean().optional(),secure:F.z.boolean().optional(),httpOnly:F.z.boolean().optional(),path:Zc.optional()}).catchall(F.z.unknown()).strict(),Gw=F.z.object({domain:uo,name:co,value:Yc,expiry:F.z.union([F.z.literal("Infinity"),F.z.date(),F.z.number().int().positive("Expiry must be a positive number")]).optional(),meta:Uw.optional()}).strict(),t_=F.z.object({expiry:F.z.number().int().optional(),domain:uo,name:co,value:F.z.union([F.z.string(),F.z.instanceof(Buffer)])}).strict(),e_=F.z.object({format:F.z.enum(["merged","grouped"]).optional(),separator:F.z.string().optional(),showFilePaths:F.z.boolean().optional()}).strict(),$w=F.z.enum(["Chrome","Firefox","Safari","internal","unknown"]),r_=F.z.object({browserName:$w,queryCookies:F.z.function().args(F.z.string(),F.z.string()).returns(F.z.promise(F.z.array(Gw)))}).strict();var Hw="cook",qw=510912288576766e3,Xc=978307200;function Kw(r,t){let e=t;for(;e<r.length&&r[e]!==0;)e++;return[r.toString("utf8",t,e),e+1]}function Qw(r,t){let e=r.readUInt32LE(t),i=r.readUInt32LE(t+4),s=r.readUInt32LE(t+8),o=r.readUInt32LE(t+12),a=r.readUInt32LE(t+16),l=r.readUInt32LE(t+20),f=r.readUInt32LE(t+24),h=r.readUInt32LE(t+28),p=r.readUInt32LE(t+32),m=r.readUInt32LE(t+36),g=r.readDoubleLE(t+40)+Xc,S=r.readDoubleLE(t+48)+Xc,C=t+56,x;o&&(x=r.readUInt16LE(C),C+=2);let E=[{field:"url",offset:a},{field:"name",offset:l},{field:"path",offset:f},{field:"value",offset:h},{field:"comment",offset:p},{field:"commentURL",offset:m}].sort((k,T)=>k.offset-T.offset),w={};for(let{field:k,offset:T}of E)if(T>0){let[D,W]=Kw(r,t+T);w[k]=D,C=Math.max(C,W)}return[Jc.parse({name:w.name,value:w.value,domain:w.url.startsWith(".")?w.url.slice(1):w.url,path:w.path||"/",expiry:Math.floor(g),creation:Math.floor(S),flags:s,version:i,port:x,comment:w.comment,commentURL:w.commentURL}),e]}function Vw(r,t,e){let i=t+5,s=r.readUInt32BE(i),o=t+s,a=[],l=t+e;for(;o<l-8;)try{let[f,h]=Qw(r,o);a.push(f),o+=h}catch(f){console.warn(`Error decoding cookie at offset ${o}:`,f);break}return a}function ep(r){let t=(0,tp.readFileSync)(r);if(t.toString("utf8",0,4)!==Hw)throw new Error("Invalid cookie file format: wrong magic header");let i=t.readUInt32BE(4),s=[];for(let f=0;f<i;f++)s.push(t.readUInt32BE(8+f*4));let o=8+i*4,a=[];for(let f=0;f<i;f++)try{let h=Vw(t,o,s[f]);a.push(...h),o+=s[f]}catch(h){console.warn(`Error decoding page ${f}:`,h),o+=s[f]}return Number(t.readBigUInt64BE(t.length-8))!==qw&&console.warn("Invalid cookie file format: wrong footer"),a}var po=class{constructor(){this.browserName="Safari"}getHomeDir(){let t=process.env.HOME;return typeof t!="string"||t.trim().length===0?(z("SafariCookieQueryStrategy","HOME environment variable not set"),""):t}getCookieDbPath(t){return(0,rp.join)(t,"Library","Containers","com.apple.Safari","Data","Library","Cookies","Cookies.binarycookies")}decodeCookies(t,e,i){try{return ep(t).filter(o=>o.name===e&&o.domain.includes(i)).map(o=>({domain:o.domain,name:o.name,value:Buffer.isBuffer(o.value)?o.value.toString():String(o.value),expiry:typeof o.expiry=="number"&&o.expiry>0?new Date(o.expiry*1e3):"Infinity",meta:{file:t,browser:"Safari",decrypted:!1}}))}catch(s){return s instanceof Error?z("SafariCookieQueryStrategy",`Error decoding ${t}`,{error:s,name:e,domain:i}):z("SafariCookieQueryStrategy",`Error decoding ${t}`,{error:"Unknown error",name:e,domain:i}),[]}}async queryCookies(t,e){let i=this.getHomeDir();if(typeof i!="string"||i.length===0)return Promise.resolve([]);let s=this.getCookieDbPath(i);return Promise.resolve(this.decodeCookies(s,t,e))}};function Zw(r){return r.expiry===void 0?r:typeof r.expiry=="number"?{...r,expiry:new Date(r.expiry*1e3)}:r}async function ip(r,t={}){var a;let e=(a=t.strategy)!=null?a:new lo([new fo,new ho,new po]),i=async l=>(await e.queryCookies(l.name,l.domain)).map(Zw),s=Array.isArray(r)?await Promise.all(r.map(i)):await i(r),o=Array.isArray(s)?s.flat():s;if(t.removeExpired===!0){let l=Date.now();o=o.filter(f=>f.expiry==="Infinity"||f.expiry instanceof Date&&f.expiry.getTime()>l)}return typeof t.limit=="number"&&t.limit>0&&(o=o.slice(0,t.limit)),o}vt();vt();var Qi=class{canHandle(t){return!0}handle(t){let e=new Set(t.map(i=>i.value));for(let i of e)R.log(i)}};vt();var mo=class{canHandle(t){return t.dump===!0||t.d===!0}handle(t){R.log(t)}};Ce();vt();var go=class{canHandle(t){return t["dump-grouped"]===!0||t.D===!0}handle(t){let e=ii(t,i=>{var s,o;return(o=(s=i.meta)==null?void 0:s.file)!=null?o:"unknown"});R.log(JSON.stringify(e,null,2))}};Ce();function yo(r,t={}){let{format:e="merged",showFilePaths:i=!0,separator:s="; "}=t;if(r.length===0)return e==="merged"?"":[];if(e==="merged")return r.map(a=>a.value).join(s);let o=ii(r,a=>{var l,f;return(f=(l=a.meta)==null?void 0:l.file)!=null?f:"unknown"});return Object.entries(o).map(([a,l])=>{let f=l.map(h=>h.value).join(s);return i?`${a}: ${f}`:f})}vt();var xo=class{canHandle(t){return t["render-grouped"]===!0||t.R===!0}handle(t){R.log(yo(t,{format:"grouped"}))}};vt();var wo=class{canHandle(t){return t.output==="json"}handle(t){R.log(JSON.stringify(t,null,2))}};vt();var bo=class{canHandle(t){return t.render===!0||t["render-merged"]===!0||t.r===!0}handle(t){R.log(yo(t,{format:"merged"}))}};var So=class{constructor(){this.handlers=[new mo,new go,new bo,new xo,new wo,new Qi]}getHandler(t){var e;return(e=this.handlers.find(i=>i.canHandle(t)))!=null?e:new Qi}};async function sp(r,t,e,i,s,o){try{let a=await ip(r,{limit:s,removeExpired:o});if(a.length===0){R.error("No results");return}new So().getHandler(i).handle(a)}catch(a){a instanceof Error?R.error(a.message):R.error("An unknown error occurred")}}function Yw(){R.log("Usage: get-cookie [name] [domain] [options]"),R.log("Options:"),R.log(" -h, --help: Show this help message"),R.log(" -v, --verbose: Enable verbose output"),R.log(" -d, --dump: Dump all results"),R.log(" -D, --dump-grouped: Dump all results, grouped by profile"),R.log(" -r, --render: Render all results"),R.log(" -u, --url: URL to extract cookie specs from"),R.log(" -n, --name: Cookie name pattern"),R.log(" -d, --domain: Cookie domain pattern"),R.log(" --output: Output format (e.g., json)")}function Jw(r,t){return{name:r||"%",domain:t||"%"}}function Xw(r,t){let e=r.url;if(typeof e=="string"){let o=Co(e);return Array.isArray(o)?o:(R.error("Invalid cookie specs from URL"),[])}let i=r.name||t[0]||"%",s=r.domain||t[1]||"%";return[Jw(i,s)]}async function tb(r,t){let e=Xw(r,t);r.verbose===!0&&R.log("cookieSpecs",e);try{await sp(e,["chrome","firefox","safari"],["default"],{...r})}catch(i){i instanceof Error?R.error("Error querying cookies:",i.message):R.error("An unknown error occurred while querying cookies")}}async function eb(){let r=process.argv.slice(2),{values:t,positionals:e}=Mn(r);if(t.help===!0){Yw();return}await tb(t,e)}eb().catch(r=>{r instanceof Error?R.error("Fatal error:",r.message):R.error("An unknown fatal error occurred"),process.exit(1)});
6
5
  /*! Bundled license information:
7
6
 
8
7
  lodash-es/lodash.js: