@stlite/desktop 0.92.1 → 0.93.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 (72) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +17 -0
  3. package/bin/dump_artifacts.js +3 -3
  4. package/build/assets/{ErrorOutline.esm-B7r5abii-8TGLClC0.js → ErrorOutline.esm-7dB9RqDz-BlHant9M.js} +1 -1
  5. package/build/assets/{FileDownload.esm-CYy3w3Vv-BwlEuFJu.js → FileDownload.esm-GWMXlTU--nCHLLVVG.js} +1 -1
  6. package/build/assets/{FileHelper-8inOMdj8-8VXLhO12.js → FileHelper-Cma-1EXD-BHg6ViEo.js} +1 -1
  7. package/build/assets/{FormClearHelper-DcUb9gFm-uvoV81fq.js → FormClearHelper-7XVCWEDh-CHeSF048.js} +1 -1
  8. package/build/assets/{Hooks-BLb3umpI-BjA4i06_.js → Hooks-BLb3umpI-DELjvxVH.js} +1 -1
  9. package/build/assets/{InputInstructions-CWrzjlV--n3Hf1PP9.js → InputInstructions-BVDJIGMt-C7cosSXk.js} +1 -1
  10. package/build/assets/{Particles-DtETFR7S-2aUDxKFJ.js → Particles-g7RgLbWv-DjAdgaht.js} +1 -1
  11. package/build/assets/{ProgressBar-Q8F-JGwo-LczZQzat.js → ProgressBar-Di9e5f4y-D4tmR6iS.js} +1 -1
  12. package/build/assets/{Toolbar-Dj6ALImb-BVamUnHI.js → Toolbar-BPTl0_g8-DgJSJ3GD.js} +1 -1
  13. package/build/assets/{base-input-GLmTpqXt-CImyaDRq.js → base-input-ChvJQUff-BpwD4YlX.js} +1 -1
  14. package/build/assets/{checkbox-CEGFZTJa-C72AFGdh.js → checkbox-4WgCYqx1-Bgkcmn0F.js} +1 -1
  15. package/build/assets/{createSuper-DBoQFSgk-BYJ7jbld.js → createSuper-dKmkwP0m-DxhpQ4SI.js} +1 -1
  16. package/build/assets/{data-grid-overlay-editor-KB2z8mJP-C62BT9jT.js → data-grid-overlay-editor-IoEmbFO9-CBCubcQ1.js} +1 -1
  17. package/build/assets/{downloader-DcCTL3Wz-DCpITTU1.js → downloader-DcCTL3Wz-3ZFKL_NQ.js} +1 -1
  18. package/build/assets/{es6--XPcqeHG-DhJ5N6cn.js → es6--XPcqeHG-r3GRWny2.js} +2 -2
  19. package/build/assets/{iframeResizer.contentWindow-B8PMRo_J-DvNzNbbR.js → iframeResizer.contentWindow-fVUnxJjZ-DtdoD2Oh.js} +1 -1
  20. package/build/assets/{index-CRwtTJoc-DxkxT91b.js → index-8B5BiglZ-DvZZ_HIe.js} +5 -5
  21. package/build/assets/{index-DGEZt8XB-BPwUD6x9.js → index-AJUjtcR2-Db1saaJD.js} +1 -1
  22. package/build/assets/{index-CmxogrTC-CmhUjGHI.js → index-BLhXykcy-2Rx1rqrE.js} +1 -1
  23. package/build/assets/{index-DpJLAqiz-BkX4MLEb.js → index-BMwC0KGj-BtsmDkp_.js} +1 -1
  24. package/build/assets/{index-BEhJ1GQx-Bd2m54CP.js → index-BkFrTmMq-A28f28cz.js} +1 -1
  25. package/build/assets/{index-hQQyMr9F-eQNYPxka.js → index-Bm-Z6YEI-DCou195f.js} +1 -1
  26. package/build/assets/{index-DQkZMKcP-qmoywAyX.js → index-BqZLpS9v-B3Caq8Gw.js} +1 -1
  27. package/build/assets/{index-MLOYywLc-D7-SprmM.js → index-BqjVvYwm-D3YtGOj9.js} +1 -1
  28. package/build/assets/{index-Bn_Q7wro-BclOBnF3.js → index-BsXatFUH-Dt_dN6HK.js} +1 -1
  29. package/build/assets/{index-BlHNutXS-Bf1cUsIS.js → index-C-iz7Ope-j2Jou3c7.js} +1 -1
  30. package/build/assets/{index-C5n_E3xJ-C9GlH5Bh.js → index-C4pwXyLd-CSMg93MD.js} +1 -1
  31. package/build/assets/{index-BOT4J8P2-nhENc6Pb.js → index-CECyqIrl-D2yv4RoH.js} +1 -1
  32. package/build/assets/{index-BIyIgwS4.js → index-CI5Lukhr.js} +4 -4
  33. package/build/assets/{index-B4C0HP4d-BkRIYQ6B.js → index-CQIHksOR-Bnp4a981.js} +1 -1
  34. package/build/assets/{index-BcOX_8Yb-BQhvH4hh.js → index-C_KUQlWP-B51Pxs_l.js} +1 -1
  35. package/build/assets/{index-BeQFPWOx-B1_VBork.js → index-CceKGChf-GDzkl9eM.js} +1 -1
  36. package/build/assets/{index-C43v7-zt-XSOlpSRO.js → index-CdsL7CI5-DlOa3Fof.js} +1 -1
  37. package/build/assets/{index-DXzYmrGv-DMgQyWr1.js → index-CmMya3Pz-CihX18ph.js} +1 -1
  38. package/build/assets/{index-CKhpdqU4-B-ULAgQ3.js → index-CuLrbTLp-C50eNwoW.js} +1 -1
  39. package/build/assets/{index-gFid1htU-BDjIBtvA.js → index-Cw0ECNa7-BB6dE3b3.js} +1 -1
  40. package/build/assets/{index-C9MF7a8p-1U1wjf1z.js → index-DD51aFbc-gN5mz9FN.js} +1 -1
  41. package/build/assets/{index-BUQFjfFe-DhpyxZBa.js → index-DEu3PxaD-CXRBV7Mf.js} +1 -1
  42. package/build/assets/{index-nCXiKSAh-DSiervQu.js → index-DOE9zKwT-5mur2MVZ.js} +1 -1
  43. package/build/assets/{index-Dws1I0Ds-DN2TZwAq.js → index-DQpSdbfe-5SdJiHTD.js} +1 -1
  44. package/build/assets/{index-CVVkGp8U-OXoobo4A.js → index-DTykN4zG-Bxhd8idt.js} +1 -1
  45. package/build/assets/{index-EY_iYK3N-Bp22waFF.js → index-DV29szBC-B2CEbIRH.js} +1 -1
  46. package/build/assets/{index-BvmneqQT-C6pM51YE.js → index-DfRa51wX-Mc7dF5x1.js} +1 -1
  47. package/build/assets/{index-C9t9keZs-Cj8jGlNq.js → index-DgYLMrUQ-tRG-LD_v.js} +1 -1
  48. package/build/assets/{index-E8OLJqjb-DnzI_NxU.js → index-Di5puO_--CqiV0ywo.js} +1 -1
  49. package/build/assets/{index-oX5euHW0-C-SIRbDl.js → index-Dj7MXPcv-nT5EfVwd.js} +1 -1
  50. package/build/assets/{index-Bqaw3D2g-DJFA3vu1.js → index-DlV4h_p4-DqwBbw5_.js} +1 -1
  51. package/build/assets/{index-h6RjFy4Y-C5de9ASo.js → index-DnGo_A7H-BE-NsOfW.js} +1 -1
  52. package/build/assets/{index-DIlmdxHH-DZzaykGG.js → index-HR_X9srR-BAYtFzZt.js} +1 -1
  53. package/build/assets/{index-B8DruXv7-BsVgHQy8.js → index-TBJNdPHu-DT-qyCZS.js} +1 -1
  54. package/build/assets/{index-CCBxT-Px-B32Uy-Qk.js → index-ZYgJQ_x8-1_8zzrU9.js} +1 -1
  55. package/build/assets/{index-kEUlOODQ-D3h_Flo2.js → index-hTcF3gtQ-DxQnuRL_.js} +1 -1
  56. package/build/assets/{index-BIgXGMHt-JW2hwTbx.js → index-vcKHNpuC-BSd57fPp.js} +1 -1
  57. package/build/assets/{inherits-BwU0tCO4-DkeIG_qH.js → inherits-Pmi26wgm-BX3RGE7G.js} +1 -1
  58. package/build/assets/{input-DMrd22sk-UYShFfZu.js → input-BXGQ9mRm-CIPmPBGI.js} +1 -1
  59. package/build/assets/{memory-B3L1Fctl-WytsaLFU.js → memory-B3L1Fctl-CHwR207P.js} +1 -1
  60. package/build/assets/{number-overlay-editor-CdbzA3D_-BCwwbhhn.js → number-overlay-editor-C_tZpFZY-CxWzCIFN.js} +1 -1
  61. package/build/assets/{sandbox-ChAzL-i--CpDb1da2.js → sandbox-ChAzL-i--wpcA3s4s.js} +1 -1
  62. package/build/assets/{slicedToArray-CQ1aOJ-Q-fFO-C-TS.js → slicedToArray-BwzokRlj-E5mBrutT.js} +1 -1
  63. package/build/assets/{timepicker-DZap2iV8-CkcqVZT5.js → timepicker-Buj3NwSV-DhVe9hFS.js} +1 -1
  64. package/build/assets/{uniqueId-Dmqdy5md-DdrLw8YB.js → uniqueId-Ct03yls4--ZtLtucJ.js} +1 -1
  65. package/build/assets/{useBasicWidgetState-DH5OpqC3-H5wMmJFo.js → useBasicWidgetState-KOlq_goV-CB6E7iWN.js} +1 -1
  66. package/build/assets/{useTextInputAutoExpand-B5nEdsJC-DTKFLxU2.js → useTextInputAutoExpand-DWOWjQ4t-BoiRRHH6.js} +1 -1
  67. package/build/assets/{useUpdateUiValue-CzJ3I42c-D42S2lbA.js → useUpdateUiValue-DoEkLcX2--ATHLwKP.js} +1 -1
  68. package/build/assets/{withFullScreenWrapper-CsmVH3u1-BwamaUTy.js → withFullScreenWrapper-B2V0S41O-DCzGUvSO.js} +1 -1
  69. package/build/electron/main.js +2 -2
  70. package/build/index.html +1 -1
  71. package/package.json +3 -3
  72. package/wheels/streamlit-1.50.0-cp313-none-any.whl +0 -0
@@ -27,13 +27,13 @@ ${T}`,b.pop(),`[${C}]`}let R=Object.keys(d),x=R.length;if(x===0)return"{}";if(o<
27
27
  ${S}`,I="",q="",z=Math.min(x,a);Ms(d)&&(I+=Rl(d,k,a),R=R.slice(d.length),z-=d.length,q=k),n&&(R=Ts(R,s)),b.push(d);for(let C=0;C<z;C++){let V=R[C],re=c(V,d[V],b,v,S);re!==void 0&&(I+=`${q}${ct(V)}: ${re}`,q=k)}if(x>a){let C=x-a;I+=`${q}"...": "${qt(C)} not stringified"`,q=k}return q!==""&&(I=`
28
28
  ${S}${I}
29
29
  ${T}`),b.pop(),`{${I}}`}case"number":return isFinite(d)?String(d):e?e(d):"null";case"boolean":return d===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(d);default:return e?e(d):void 0}}function f(m,d,b){switch(typeof d){case"string":return ct(d);case"object":{if(d===null)return"null";if(typeof d.toJSON=="function"){if(d=d.toJSON(m),typeof d!="object")return f(m,d,b);if(d===null)return"null"}if(b.indexOf(d)!==-1)return r;let v="",S=d.length!==void 0;if(S&&Array.isArray(d)){if(d.length===0)return"[]";if(o<b.length+1)return'"[Array]"';b.push(d);let I=Math.min(d.length,a),q=0;for(;q<I-1;q++){let C=f(String(q),d[q],b);v+=C!==void 0?C:"null",v+=","}let z=f(String(q),d[q],b);if(v+=z!==void 0?z:"null",d.length-1>a){let C=d.length-a-1;v+=`,"... ${qt(C)} not stringified"`}return b.pop(),`[${v}]`}let T=Object.keys(d),R=T.length;if(R===0)return"{}";if(o<b.length+1)return'"[Object]"';let x="",k=Math.min(R,a);S&&Ms(d)&&(v+=Rl(d,",",a),T=T.slice(d.length),k-=d.length,x=","),n&&(T=Ts(T,s)),b.push(d);for(let I=0;I<k;I++){let q=T[I],z=f(q,d[q],b);z!==void 0&&(v+=`${x}${ct(q)}:${z}`,x=",")}if(R>a){let I=R-a;v+=`${x}"...":"${qt(I)} not stringified"`}return b.pop(),`{${v}}`}case"number":return isFinite(d)?String(d):e?e(d):"null";case"boolean":return d===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(d);default:return e?e(d):void 0}}function p(m,d,b){if(arguments.length>1){let v="";if(typeof b=="number"?v=" ".repeat(Math.min(b,10)):typeof b=="string"&&(v=b.slice(0,10)),d!=null){if(typeof d=="function")return l("",{"":m},[],d,v,"");if(Array.isArray(d))return u("",m,[],jp(d),v,"")}if(v.length!==0)return c("",m,[],v,"")}return f("",m,[])}return p}});var ks=_((BS,Ml)=>{"use strict";var Ip=xe(),{MESSAGE:$p}=te(),Wp=Pr();function Bp(t,e){return typeof e=="bigint"?e.toString():e}Ml.exports=Ip((t,e)=>{let r=Wp.configure(e);return t[$p]=r(t,e.replacer||Bp,e.space),t})});var Al=_((US,Ol)=>{"use strict";var Up=xe();Ol.exports=Up((t,e)=>e.message?(t.message=`[${e.label}] ${t.message}`,t):(t.label=e.label,t))});var Pl=_((zS,kl)=>{"use strict";var zp=xe(),{MESSAGE:Hp}=te(),Gp=Pr();kl.exports=zp(t=>{let e={};return t.message&&(e["@message"]=t.message,delete t.message),t.timestamp&&(e["@timestamp"]=t.timestamp,delete t.timestamp),e["@fields"]=t,t[Hp]=Gp(e),t})});var Cl=_((HS,Dl)=>{"use strict";var Vp=xe();function Yp(t,e,r){let i=e.reduce((s,o)=>(s[o]=t[o],delete t[o],s),{}),n=Object.keys(t).reduce((s,o)=>(s[o]=t[o],delete t[o],s),{});return Object.assign(t,i,{[r]:n}),t}function Kp(t,e,r){return t[r]=e.reduce((i,n)=>(i[n]=t[n],delete t[n],i),{}),t}Dl.exports=Vp((t,e={})=>{let r="metadata";e.key&&(r=e.key);let i=[];return!e.fillExcept&&!e.fillWith&&(i.push("level"),i.push("message")),e.fillExcept&&(i=e.fillExcept),i.length>0?Yp(t,i,r):e.fillWith?Kp(t,e.fillWith,r):t})});var Ll=_((GS,ql)=>{var er=1e3,tr=er*60,rr=tr*60,Nt=rr*24,Jp=Nt*7,Zp=Nt*365.25;ql.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return Qp(t);if(r==="number"&&isFinite(t))return e.long?eg(t):Xp(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Qp(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),i=(e[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return r*Zp;case"weeks":case"week":case"w":return r*Jp;case"days":case"day":case"d":return r*Nt;case"hours":case"hour":case"hrs":case"hr":case"h":return r*rr;case"minutes":case"minute":case"mins":case"min":case"m":return r*tr;case"seconds":case"second":case"secs":case"sec":case"s":return r*er;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Xp(t){var e=Math.abs(t);return e>=Nt?Math.round(t/Nt)+"d":e>=rr?Math.round(t/rr)+"h":e>=tr?Math.round(t/tr)+"m":e>=er?Math.round(t/er)+"s":t+"ms"}function eg(t){var e=Math.abs(t);return e>=Nt?ji(t,e,Nt,"day"):e>=rr?ji(t,e,rr,"hour"):e>=tr?ji(t,e,tr,"minute"):e>=er?ji(t,e,er,"second"):t+" ms"}function ji(t,e,r,i){var n=e>=r*1.5;return Math.round(t/r)+" "+i+(n?"s":"")}});var jl=_((Dr,Nl)=>{"use strict";var tg=xe(),rg=Ll();Nl.exports=tg(t=>{let e=+new Date;return Dr.diff=e-(Dr.prevTime||e),Dr.prevTime=e,t.ms=`+${rg(Dr.diff)}`,t})});var $l=_((VS,Il)=>{"use strict";var ig=L("util").inspect,ng=xe(),{LEVEL:sg,MESSAGE:Fl,SPLAT:og}=te();Il.exports=ng((t,e={})=>{let r=Object.assign({},t);return delete r[sg],delete r[Fl],delete r[og],t[Fl]=ig(r,!1,e.depth||null,e.colorize),t})});var Wl=_((YS,Ii)=>{"use strict";var{MESSAGE:ag}=te(),Fi=class{constructor(e){this.template=e}transform(e){return e[ag]=this.template(e),e}};Ii.exports=t=>new Fi(t);Ii.exports.Printf=Ii.exports.Format=Fi});var zl=_((KS,Ul)=>{"use strict";var lg=xe(),{MESSAGE:Bl}=te(),ug=Pr();Ul.exports=lg(t=>{let e=ug(Object.assign({},t,{level:void 0,message:void 0,splat:void 0})),r=t.padding&&t.padding[t.level]||"";return e!=="{}"?t[Bl]=`${t.level}:${r} ${t.message} ${e}`:t[Bl]=`${t.level}:${r} ${t.message}`,t})});var Vl=_((JS,Gl)=>{"use strict";var fg=L("util"),{SPLAT:Hl}=te(),cg=/%[scdjifoO%]/g,hg=/%%/g,Ps=class{constructor(e){this.options=e}_splat(e,r){let i=e.message,n=e[Hl]||e.splat||[],s=i.match(hg),o=s&&s.length||0,l=r.length-o-n.length,u=l<0?n.splice(l,-1*l):[],c=u.length;if(c)for(let f=0;f<c;f++)Object.assign(e,u[f]);return e.message=fg.format(i,...n),e}transform(e){let r=e.message,i=e[Hl]||e.splat;if(!i||!i.length)return e;let n=r&&r.match&&r.match(cg);if(!n&&(i||i.length)){let s=i.length>1?i.splice(0):i,o=s.length;if(o)for(let a=0;a<o;a++)Object.assign(e,s[a]);return e}return n?this._splat(e,n):e}};Gl.exports=t=>new Ps(t)});var Kl=_(($i,Yl)=>{(function(t,e){typeof $i=="object"&&typeof Yl<"u"?e($i):typeof define=="function"&&define.amd?define(["exports"],e):e(t.fecha={})})($i,(function(t){"use strict";var e=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,r="\\d\\d?",i="\\d\\d",n="\\d{3}",s="\\d{4}",o="[^\\s]+",a=/\[([^]*?)\]/gm;function l(E,A){for(var H=[],ye=0,P=E.length;ye<P;ye++)H.push(E[ye].substr(0,A));return H}var u=function(E){return function(A,H){var ye=H[E].map(function(ke){return ke.toLowerCase()}),P=ye.indexOf(A.toLowerCase());return P>-1?P:null}};function c(E){for(var A=[],H=1;H<arguments.length;H++)A[H-1]=arguments[H];for(var ye=0,P=A;ye<P.length;ye++){var ke=P[ye];for(var Fe in ke)E[Fe]=ke[Fe]}return E}var f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],p=["January","February","March","April","May","June","July","August","September","October","November","December"],m=l(p,3),d=l(f,3),b={dayNamesShort:d,dayNames:f,monthNamesShort:m,monthNames:p,amPm:["am","pm"],DoFn:function(E){return E+["th","st","nd","rd"][E%10>3?0:(E-E%10!==10?1:0)*E%10]}},v=c({},b),S=function(E){return v=c(v,E)},T=function(E){return E.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},R=function(E,A){for(A===void 0&&(A=2),E=String(E);E.length<A;)E="0"+E;return E},x={D:function(E){return String(E.getDate())},DD:function(E){return R(E.getDate())},Do:function(E,A){return A.DoFn(E.getDate())},d:function(E){return String(E.getDay())},dd:function(E){return R(E.getDay())},ddd:function(E,A){return A.dayNamesShort[E.getDay()]},dddd:function(E,A){return A.dayNames[E.getDay()]},M:function(E){return String(E.getMonth()+1)},MM:function(E){return R(E.getMonth()+1)},MMM:function(E,A){return A.monthNamesShort[E.getMonth()]},MMMM:function(E,A){return A.monthNames[E.getMonth()]},YY:function(E){return R(String(E.getFullYear()),4).substr(2)},YYYY:function(E){return R(E.getFullYear(),4)},h:function(E){return String(E.getHours()%12||12)},hh:function(E){return R(E.getHours()%12||12)},H:function(E){return String(E.getHours())},HH:function(E){return R(E.getHours())},m:function(E){return String(E.getMinutes())},mm:function(E){return R(E.getMinutes())},s:function(E){return String(E.getSeconds())},ss:function(E){return R(E.getSeconds())},S:function(E){return String(Math.round(E.getMilliseconds()/100))},SS:function(E){return R(Math.round(E.getMilliseconds()/10),2)},SSS:function(E){return R(E.getMilliseconds(),3)},a:function(E,A){return E.getHours()<12?A.amPm[0]:A.amPm[1]},A:function(E,A){return E.getHours()<12?A.amPm[0].toUpperCase():A.amPm[1].toUpperCase()},ZZ:function(E){var A=E.getTimezoneOffset();return(A>0?"-":"+")+R(Math.floor(Math.abs(A)/60)*100+Math.abs(A)%60,4)},Z:function(E){var A=E.getTimezoneOffset();return(A>0?"-":"+")+R(Math.floor(Math.abs(A)/60),2)+":"+R(Math.abs(A)%60,2)}},k=function(E){return+E-1},I=[null,r],q=[null,o],z=["isPm",o,function(E,A){var H=E.toLowerCase();return H===A.amPm[0]?0:H===A.amPm[1]?1:null}],C=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(E){var A=(E+"").match(/([+-]|\d\d)/gi);if(A){var H=+A[1]*60+parseInt(A[2],10);return A[0]==="+"?H:-H}return 0}],V={D:["day",r],DD:["day",i],Do:["day",r+o,function(E){return parseInt(E,10)}],M:["month",r,k],MM:["month",i,k],YY:["year",i,function(E){var A=new Date,H=+(""+A.getFullYear()).substr(0,2);return+(""+(+E>68?H-1:H)+E)}],h:["hour",r,void 0,"isPm"],hh:["hour",i,void 0,"isPm"],H:["hour",r],HH:["hour",i],m:["minute",r],mm:["minute",i],s:["second",r],ss:["second",i],YYYY:["year",s],S:["millisecond","\\d",function(E){return+E*100}],SS:["millisecond",i,function(E){return+E*10}],SSS:["millisecond",n],d:I,dd:I,ddd:q,dddd:q,MMM:["month",o,u("monthNamesShort")],MMMM:["month",o,u("monthNames")],a:z,A:z,ZZ:C,Z:C},re={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},ie=function(E){return c(re,E)},_e=function(E,A,H){if(A===void 0&&(A=re.default),H===void 0&&(H={}),typeof E=="number"&&(E=new Date(E)),Object.prototype.toString.call(E)!=="[object Date]"||isNaN(E.getTime()))throw new Error("Invalid Date pass to format");A=re[A]||A;var ye=[];A=A.replace(a,function(ke,Fe){return ye.push(Fe),"@@@"});var P=c(c({},v),H);return A=A.replace(e,function(ke){return x[ke](E,P)}),A.replace(/@@@/g,function(){return ye.shift()})};function ve(E,A,H){if(H===void 0&&(H={}),typeof A!="string")throw new Error("Invalid format in fecha parse");if(A=re[A]||A,E.length>1e3)return null;var ye=new Date,P={year:ye.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},ke=[],Fe=[],Ot=A.replace(a,function(Pt,ft){return Fe.push(T(ft)),"@@@"}),Zt={},lt={};Ot=T(Ot).replace(e,function(Pt){var ft=V[Pt],Or=ft[0],Ti=ft[1],Mi=ft[3];if(Zt[Or])throw new Error("Invalid format. "+Or+" specified twice in format");return Zt[Or]=!0,Mi&&(lt[Mi]=!0),ke.push(ft),"("+Ti+")"}),Object.keys(lt).forEach(function(Pt){if(!Zt[Pt])throw new Error("Invalid format. "+Pt+" is required in specified format")}),Ot=Ot.replace(/@@@/g,function(){return Fe.shift()});var At=E.match(new RegExp(Ot,"i"));if(!At)return null;for(var cs=c(c({},v),H),Me=1;Me<At.length;Me++){var Ei=ke[Me-1],Ri=Ei[0],xi=Ei[2],ut=xi?xi(At[Me],cs):+At[Me];if(ut==null)return null;P[Ri]=ut}P.isPm===1&&P.hour!=null&&+P.hour!=12?P.hour=+P.hour+12:P.isPm===0&&+P.hour==12&&(P.hour=0);var Qt;if(P.timezoneOffset==null){Qt=new Date(P.year,P.month,P.day,P.hour,P.minute,P.second,P.millisecond);for(var kt=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],Me=0,Mr=kt.length;Me<Mr;Me++)if(Zt[kt[Me][0]]&&P[kt[Me][0]]!==Qt[kt[Me][1]]())return null}else if(Qt=new Date(Date.UTC(P.year,P.month,P.day,P.hour,P.minute-P.timezoneOffset,P.second,P.millisecond)),P.month>11||P.month<0||P.day>31||P.day<1||P.hour>23||P.hour<0||P.minute>59||P.minute<0||P.second>59||P.second<0)return null;return Qt}var at={format:_e,parse:ve,defaultI18n:b,setGlobalDateI18n:S,setGlobalDateMasks:ie};t.assign=c,t.default=at,t.format=_e,t.parse=ve,t.defaultI18n=b,t.setGlobalDateI18n=S,t.setGlobalDateMasks=ie,Object.defineProperty(t,"__esModule",{value:!0})}))});var Zl=_((ZS,Jl)=>{"use strict";var dg=Kl(),pg=xe();Jl.exports=pg((t,e={})=>(e.format&&(t.timestamp=typeof e.format=="function"?e.format():dg.format(new Date,e.format)),t.timestamp||(t.timestamp=new Date().toISOString()),e.alias&&(t[e.alias]=t.timestamp),t))});var Xl=_((QS,Ql)=>{"use strict";var Ds=ps(),gg=xe(),{MESSAGE:Cs}=te();Ql.exports=gg((t,e)=>(e.level!==!1&&(t.level=Ds.strip(t.level)),e.message!==!1&&(t.message=Ds.strip(String(t.message))),e.raw!==!1&&t[Cs]&&(t[Cs]=Ds.strip(String(t[Cs]))),t))});var Ls=_(qs=>{"use strict";var mg=qs.format=xe();qs.levels=pl();function de(t,e){Object.defineProperty(mg,t,{get(){return e()},configurable:!0})}de("align",function(){return ml()});de("errors",function(){return wl()});de("cli",function(){return vl()});de("combine",function(){return El()});de("colorize",function(){return Ci()});de("json",function(){return ks()});de("label",function(){return Al()});de("logstash",function(){return Pl()});de("metadata",function(){return Cl()});de("ms",function(){return jl()});de("padLevels",function(){return Es()});de("prettyPrint",function(){return $l()});de("printf",function(){return Wl()});de("simple",function(){return zl()});de("splat",function(){return Vl()});de("timestamp",function(){return Zl()});de("uncolorize",function(){return Xl()})});var Ns=_(Wi=>{"use strict";var{format:eu}=L("util");Wi.warn={deprecated(t){return()=>{throw new Error(eu("{ %s } was removed in winston@3.0.0.",t))}},useFormat(t){return()=>{throw new Error([eu("{ %s } was removed in winston@3.0.0.",t),"Use a custom winston.format = winston.format(function) instead."].join(`
30
- `))}},forFunctions(t,e,r){r.forEach(i=>{t[i]=Wi.warn[e](i)})},forProperties(t,e,r){r.forEach(i=>{let n=Wi.warn[e](i);Object.defineProperty(t,i,{get:n,set:n})})}}});var tu=_((tE,yg)=>{yg.exports={name:"winston",description:"A logger for just about everything.",version:"3.18.3",author:"Charlie Robbins <charlie.robbins@gmail.com>",maintainers:["David Hyde <dabh@alumni.stanford.edu>"],repository:{type:"git",url:"https://github.com/winstonjs/winston.git"},keywords:["winston","logger","logging","logs","sysadmin","bunyan","pino","loglevel","tools","json","stream"],dependencies:{"@dabh/diagnostics":"^2.0.8","@colors/colors":"^1.6.0",async:"^3.2.3","is-stream":"^2.0.0",logform:"^2.7.0","one-time":"^1.0.0","readable-stream":"^3.4.0","safe-stable-stringify":"^2.3.1","stack-trace":"0.0.x","triple-beam":"^1.3.0","winston-transport":"^4.9.0"},devDependencies:{"@babel/cli":"^7.23.9","@babel/core":"^7.24.0","@babel/preset-env":"^7.24.0","@dabh/eslint-config-populist":"^4.4.0","@types/node":"^20.11.24","abstract-winston-transport":"^0.5.1",assume:"^2.2.0","cross-spawn-async":"^2.2.5",eslint:"^8.57.0",hock:"^1.4.1",mocha:"^10.3.0",nyc:"^17.1.0",rimraf:"5.0.1",split2:"^4.1.0","std-mocks":"^2.0.0",through2:"^4.0.2","winston-compat":"^0.1.5"},main:"./lib/winston.js",browser:"./dist/winston",types:"./index.d.ts",scripts:{lint:"eslint lib/*.js lib/winston/*.js lib/winston/**/*.js --resolve-plugins-relative-to ./node_modules/@dabh/eslint-config-populist",test:"rimraf test/fixtures/logs/* && mocha","test:coverage":"nyc npm run test:unit","test:unit":"mocha test/unit","test:integration":"mocha test/integration",build:"rimraf dist && babel lib -d dist",prepublishOnly:"npm run build"},engines:{node:">= 12.0.0"},license:"MIT"}});var js=_((rE,ru)=>{ru.exports=L("util").deprecate});var Fs=_((iE,iu)=>{iu.exports=L("stream")});var $s=_((nE,su)=>{"use strict";function bg(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(Is,this,t)):process.nextTick(Is,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(Bi,r):(r._writableState.errorEmitted=!0,process.nextTick(nu,r,s)):process.nextTick(nu,r,s):e?(process.nextTick(Bi,r),e(s)):process.nextTick(Bi,r)}),this)}function nu(t,e){Is(t,e),Bi(t)}function Bi(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function wg(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Is(t,e){t.emit("error",e)}function _g(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}su.exports={destroy:bg,undestroy:wg,errorOrDestroy:_g}});var ir=_((sE,lu)=>{"use strict";var au={};function De(t,e,r){r||(r=Error);function i(s,o,a){return typeof e=="string"?e:e(s,o,a)}class n extends r{constructor(o,a,l){super(i(o,a,l))}}n.prototype.name=r.name,n.prototype.code=t,au[t]=n}function ou(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(i=>String(i)),r>2?`one of ${e} ${t.slice(0,r-1).join(", ")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return`of ${e} ${String(t)}`}function vg(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function Sg(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function Eg(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}De("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);De("ERR_INVALID_ARG_TYPE",function(t,e,r){let i;typeof e=="string"&&vg(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if(Sg(t," argument"))n=`The ${t} ${i} ${ou(e,"type")}`;else{let s=Eg(t,".")?"property":"argument";n=`The "${t}" ${s} ${i} ${ou(e,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);De("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");De("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});De("ERR_STREAM_PREMATURE_CLOSE","Premature close");De("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});De("ERR_MULTIPLE_CALLBACK","Callback called multiple times");De("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");De("ERR_STREAM_WRITE_AFTER_END","write after end");De("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);De("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);De("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");lu.exports.codes=au});var Ws=_((oE,uu)=>{"use strict";var Rg=ir().codes.ERR_INVALID_OPT_VALUE;function xg(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Tg(t,e,r,i){var n=xg(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new Rg(s,n)}return Math.floor(n)}return t.objectMode?16:16*1024}uu.exports={getHighWaterMark:Tg}});var fu=_((aE,Bs)=>{typeof Object.create=="function"?Bs.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Bs.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}}});var tt=_((lE,zs)=>{try{if(Us=L("util"),typeof Us.inherits!="function")throw"";zs.exports=Us.inherits}catch{zs.exports=fu()}var Us});var mu=_((uE,gu)=>{"use strict";function cu(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function hu(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?cu(Object(r),!0).forEach(function(i){Mg(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):cu(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Mg(t,e,r){return e=pu(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Og(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function du(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,pu(i.key),i)}}function Ag(t,e,r){return e&&du(t.prototype,e),r&&du(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function pu(t){var e=kg(t,"string");return typeof e=="symbol"?e:String(e)}function kg(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Pg=L("buffer"),Ui=Pg.Buffer,Dg=L("util"),Hs=Dg.inspect,Cg=Hs&&Hs.custom||"inspect";function qg(t,e,r){Ui.prototype.copy.call(t,e,r)}gu.exports=(function(){function t(){Og(this,t),this.head=null,this.tail=null,this.length=0}return Ag(t,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return Ui.alloc(0);for(var i=Ui.allocUnsafe(r>>>0),n=this.head,s=0;n;)qg(n.data,i,s),s+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,n=1,s=i.data;for(r-=s.length;i=i.next;){var o=i.data,a=r>o.length?o.length:r;if(a===o.length?s+=o:s+=o.slice(0,r),r-=a,r===0){a===o.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(a));break}++n}return this.length-=n,s}},{key:"_getBuffer",value:function(r){var i=Ui.allocUnsafe(r),n=this.head,s=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var o=n.data,a=r>o.length?o.length:r;if(o.copy(i,i.length-r,0,a),r-=a,r===0){a===o.length?(++s,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(a));break}++s}return this.length-=s,i}},{key:Cg,value:function(r,i){return Hs(this,hu(hu({},i),{},{depth:0,customInspect:!1}))}}]),t})()});var wu=_((Gs,bu)=>{var zi=L("buffer"),Ge=zi.Buffer;function yu(t,e){for(var r in t)e[r]=t[r]}Ge.from&&Ge.alloc&&Ge.allocUnsafe&&Ge.allocUnsafeSlow?bu.exports=zi:(yu(zi,Gs),Gs.Buffer=jt);function jt(t,e,r){return Ge(t,e,r)}jt.prototype=Object.create(Ge.prototype);yu(Ge,jt);jt.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Ge(t,e,r)};jt.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=Ge(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};jt.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Ge(t)};jt.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return zi.SlowBuffer(t)}});var qr=_(vu=>{"use strict";var Ys=wu().Buffer,_u=Ys.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Lg(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function Ng(t){var e=Lg(t);if(typeof e!="string"&&(Ys.isEncoding===_u||!_u(t)))throw new Error("Unknown encoding: "+t);return e||t}vu.StringDecoder=Cr;function Cr(t){this.encoding=Ng(t);var e;switch(this.encoding){case"utf16le":this.text=Bg,this.end=Ug,e=4;break;case"utf8":this.fillLast=Ig,e=4;break;case"base64":this.text=zg,this.end=Hg,e=3;break;default:this.write=Gg,this.end=Vg;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Ys.allocUnsafe(e)}Cr.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};Cr.prototype.end=Wg;Cr.prototype.text=$g;Cr.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function Vs(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function jg(t,e,r){var i=e.length-1;if(i<r)return 0;var n=Vs(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=Vs(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=Vs(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function Fg(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function Ig(t){var e=this.lastTotal-this.lastNeed,r=Fg(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function $g(t,e){var r=jg(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function Wg(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function Bg(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function Ug(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function zg(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function Hg(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function Gg(t){return t.toString(this.encoding)}function Vg(t){return t&&t.length?this.write(t):""}});var xu=_((cE,Ru)=>{"use strict";var Su=ir().codes.ERR_STREAM_PREMATURE_CLOSE;function Yg(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];t.apply(this,i)}}}function Kg(){}function Jg(t){return t.setHeader&&typeof t.abort=="function"}function Eu(t,e,r){if(typeof e=="function")return Eu(t,null,e);e||(e={}),r=Yg(r||Kg);var i=e.readable||e.readable!==!1&&t.readable,n=e.writable||e.writable!==!1&&t.writable,s=function(){t.writable||a()},o=t._writableState&&t._writableState.finished,a=function(){n=!1,o=!0,i||r.call(t)},l=t._readableState&&t._readableState.endEmitted,u=function(){i=!1,l=!0,n||r.call(t)},c=function(d){r.call(t,d)},f=function(){var d;if(i&&!l)return(!t._readableState||!t._readableState.ended)&&(d=new Su),r.call(t,d);if(n&&!o)return(!t._writableState||!t._writableState.ended)&&(d=new Su),r.call(t,d)},p=function(){t.req.on("finish",a)};return Jg(t)?(t.on("complete",a),t.on("abort",f),t.req?p():t.on("request",p)):n&&!t._writableState&&(t.on("end",s),t.on("close",s)),t.on("end",u),t.on("finish",a),e.error!==!1&&t.on("error",c),t.on("close",f),function(){t.removeListener("complete",a),t.removeListener("abort",f),t.removeListener("request",p),t.req&&t.req.removeListener("finish",a),t.removeListener("end",s),t.removeListener("close",s),t.removeListener("finish",a),t.removeListener("end",u),t.removeListener("error",c),t.removeListener("close",f)}}Ru.exports=Eu});var Mu=_((hE,Tu)=>{"use strict";var Hi;function ht(t,e,r){return e=Zg(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Zg(t){var e=Qg(t,"string");return typeof e=="symbol"?e:String(e)}function Qg(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Xg=xu(),dt=Symbol("lastResolve"),Ft=Symbol("lastReject"),Lr=Symbol("error"),Gi=Symbol("ended"),It=Symbol("lastPromise"),Ks=Symbol("handlePromise"),$t=Symbol("stream");function pt(t,e){return{value:t,done:e}}function em(t){var e=t[dt];if(e!==null){var r=t[$t].read();r!==null&&(t[It]=null,t[dt]=null,t[Ft]=null,e(pt(r,!1)))}}function tm(t){process.nextTick(em,t)}function rm(t,e){return function(r,i){t.then(function(){if(e[Gi]){r(pt(void 0,!0));return}e[Ks](r,i)},i)}}var im=Object.getPrototypeOf(function(){}),nm=Object.setPrototypeOf((Hi={get stream(){return this[$t]},next:function(){var e=this,r=this[Lr];if(r!==null)return Promise.reject(r);if(this[Gi])return Promise.resolve(pt(void 0,!0));if(this[$t].destroyed)return new Promise(function(o,a){process.nextTick(function(){e[Lr]?a(e[Lr]):o(pt(void 0,!0))})});var i=this[It],n;if(i)n=new Promise(rm(i,this));else{var s=this[$t].read();if(s!==null)return Promise.resolve(pt(s,!1));n=new Promise(this[Ks])}return this[It]=n,n}},ht(Hi,Symbol.asyncIterator,function(){return this}),ht(Hi,"return",function(){var e=this;return new Promise(function(r,i){e[$t].destroy(null,function(n){if(n){i(n);return}r(pt(void 0,!0))})})}),Hi),im),sm=function(e){var r,i=Object.create(nm,(r={},ht(r,$t,{value:e,writable:!0}),ht(r,dt,{value:null,writable:!0}),ht(r,Ft,{value:null,writable:!0}),ht(r,Lr,{value:null,writable:!0}),ht(r,Gi,{value:e._readableState.endEmitted,writable:!0}),ht(r,Ks,{value:function(s,o){var a=i[$t].read();a?(i[It]=null,i[dt]=null,i[Ft]=null,s(pt(a,!1))):(i[dt]=s,i[Ft]=o)},writable:!0}),r));return i[It]=null,Xg(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[Ft];s!==null&&(i[It]=null,i[dt]=null,i[Ft]=null,s(n)),i[Lr]=n;return}var o=i[dt];o!==null&&(i[It]=null,i[dt]=null,i[Ft]=null,o(pt(void 0,!0))),i[Gi]=!0}),e.on("readable",tm.bind(null,i)),i};Tu.exports=sm});var Pu=_((dE,ku)=>{"use strict";function Ou(t,e,r,i,n,s,o){try{var a=t[s](o),l=a.value}catch(u){r(u);return}a.done?e(l):Promise.resolve(l).then(i,n)}function om(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function o(l){Ou(s,i,n,o,a,"next",l)}function a(l){Ou(s,i,n,o,a,"throw",l)}o(void 0)})}}function Au(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function am(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Au(Object(r),!0).forEach(function(i){lm(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Au(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function lm(t,e,r){return e=um(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function um(t){var e=fm(t,"string");return typeof e=="symbol"?e:String(e)}function fm(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var cm=ir().codes.ERR_INVALID_ARG_TYPE;function hm(t,e,r){var i;if(e&&typeof e.next=="function")i=e;else if(e&&e[Symbol.asyncIterator])i=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])i=e[Symbol.iterator]();else throw new cm("iterable",["Iterable"],e);var n=new t(am({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,o())};function o(){return a.apply(this,arguments)}function a(){return a=om(function*(){try{var l=yield i.next(),u=l.value,c=l.done;c?n.push(null):n.push(yield u)?o():s=!1}catch(f){n.destroy(f)}}),a.apply(this,arguments)}return n}ku.exports=hm});var Bu=_((gE,Wu)=>{"use strict";Wu.exports=B;var nr;B.ReadableState=Lu;var pE=L("events").EventEmitter,qu=function(e,r){return e.listeners(r).length},jr=Fs(),Vi=L("buffer").Buffer,dm=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function pm(t){return Vi.from(t)}function gm(t){return Vi.isBuffer(t)||t instanceof dm}var Js=L("util"),N;Js&&Js.debuglog?N=Js.debuglog("stream"):N=function(){};var mm=mu(),io=$s(),ym=Ws(),bm=ym.getHighWaterMark,Yi=ir().codes,wm=Yi.ERR_INVALID_ARG_TYPE,_m=Yi.ERR_STREAM_PUSH_AFTER_EOF,vm=Yi.ERR_METHOD_NOT_IMPLEMENTED,Sm=Yi.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,sr,Zs,Qs;tt()(B,jr);var Nr=io.errorOrDestroy,Xs=["error","close","destroy","pause","resume"];function Em(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function Lu(t,e,r){nr=nr||Fr(),t=t||{},typeof r!="boolean"&&(r=e instanceof nr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=bm(this,t,"readableHighWaterMark",r),this.buffer=new mm,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(sr||(sr=qr().StringDecoder),this.decoder=new sr(t.encoding),this.encoding=t.encoding)}function B(t){if(nr=nr||Fr(),!(this instanceof B))return new B(t);var e=this instanceof nr;this._readableState=new Lu(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),jr.call(this)}Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});B.prototype.destroy=io.destroy;B.prototype._undestroy=io.undestroy;B.prototype._destroy=function(t,e){e(t)};B.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=Vi.from(t,e),e=""),i=!0),Nu(this,t,e,!1,i)};B.prototype.unshift=function(t){return Nu(this,t,null,!0,!1)};function Nu(t,e,r,i,n){N("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,Tm(t,s);else{var o;if(n||(o=Rm(s,e)),o)Nr(t,o);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==Vi.prototype&&(e=pm(e)),i)s.endEmitted?Nr(t,new Sm):eo(t,s,e,!0);else if(s.ended)Nr(t,new _m);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?eo(t,s,e,!1):ro(t,s)):eo(t,s,e,!1)}else i||(s.reading=!1,ro(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function eo(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Ki(t)),ro(t,e)}function Rm(t,e){var r;return!gm(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new wm("chunk",["string","Buffer","Uint8Array"],e)),r}B.prototype.isPaused=function(){return this._readableState.flowing===!1};B.prototype.setEncoding=function(t){sr||(sr=qr().StringDecoder);var e=new sr(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var Du=1073741824;function xm(t){return t>=Du?t=Du:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function Cu(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=xm(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}B.prototype.read=function(t){N("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return N("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?to(this):Ki(this),null;if(t=Cu(t,e),t===0&&e.ended)return e.length===0&&to(this),null;var i=e.needReadable;N("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,N("length less than watermark",i)),e.ended||e.reading?(i=!1,N("reading or ended",i)):i&&(N("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=Cu(r,e)));var n;return t>0?n=Iu(t,e):n=null,n===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&to(this)),n!==null&&this.emit("data",n),n};function Tm(t,e){if(N("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?Ki(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,ju(t)))}}function Ki(t){var e=t._readableState;N("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(N("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(ju,t))}function ju(t){var e=t._readableState;N("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,no(t)}function ro(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(Mm,t,e))}function Mm(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(N("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}B.prototype._read=function(t){Nr(this,new vm("_read()"))};B.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,N("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=n?a:b;i.endEmitted?process.nextTick(s):r.once("end",s),t.on("unpipe",o);function o(v,S){N("onunpipe"),v===r&&S&&S.hasUnpiped===!1&&(S.hasUnpiped=!0,c())}function a(){N("onend"),t.end()}var l=Om(r);t.on("drain",l);var u=!1;function c(){N("cleanup"),t.removeListener("close",m),t.removeListener("finish",d),t.removeListener("drain",l),t.removeListener("error",p),t.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",b),r.removeListener("data",f),u=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&l()}r.on("data",f);function f(v){N("ondata");var S=t.write(v);N("dest.write",S),S===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&$u(i.pipes,t)!==-1)&&!u&&(N("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function p(v){N("onerror",v),b(),t.removeListener("error",p),qu(t,"error")===0&&Nr(t,v)}Em(t,"error",p);function m(){t.removeListener("finish",d),b()}t.once("close",m);function d(){N("onfinish"),t.removeListener("close",m),b()}t.once("finish",d);function b(){N("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(N("pipe resume"),r.resume()),t};function Om(t){return function(){var r=t._readableState;N("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&qu(t,"data")&&(r.flowing=!0,no(t))}}B.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=$u(e.pipes,t);return o===-1?this:(e.pipes.splice(o,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};B.prototype.on=function(t,e){var r=jr.prototype.on.call(this,t,e),i=this._readableState;return t==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):t==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,N("on readable",i.length,i.reading),i.length?Ki(this):i.reading||process.nextTick(Am,this)),r};B.prototype.addListener=B.prototype.on;B.prototype.removeListener=function(t,e){var r=jr.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(Fu,this),r};B.prototype.removeAllListeners=function(t){var e=jr.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(Fu,this),e};function Fu(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function Am(t){N("readable nexttick read 0"),t.read(0)}B.prototype.resume=function(){var t=this._readableState;return t.flowing||(N("resume"),t.flowing=!t.readableListening,km(this,t)),t.paused=!1,this};function km(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(Pm,t,e))}function Pm(t,e){N("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),no(t),e.flowing&&!e.reading&&t.read(0)}B.prototype.pause=function(){return N("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(N("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function no(t){var e=t._readableState;for(N("flow",e.flowing);e.flowing&&t.read()!==null;);}B.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(N("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&e.push(o)}e.push(null)}),t.on("data",function(o){if(N("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var a=e.push(o);a||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=(function(a){return function(){return t[a].apply(t,arguments)}})(n));for(var s=0;s<Xs.length;s++)t.on(Xs[s],this.emit.bind(this,Xs[s]));return this._read=function(o){N("wrapped _read",o),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&(B.prototype[Symbol.asyncIterator]=function(){return Zs===void 0&&(Zs=Mu()),Zs(this)});Object.defineProperty(B.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(B.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(B.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});B._fromList=Iu;Object.defineProperty(B.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Iu(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function to(t){var e=t._readableState;N("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(Dm,e,t))}function Dm(t,e){if(N("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(B.from=function(t,e){return Qs===void 0&&(Qs=Pu()),Qs(B,t,e)});function $u(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var Fr=_((mE,zu)=>{"use strict";var Cm=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};zu.exports=Ve;var Uu=Bu(),oo=ao();tt()(Ve,Uu);for(so=Cm(oo.prototype),Ji=0;Ji<so.length;Ji++)Zi=so[Ji],Ve.prototype[Zi]||(Ve.prototype[Zi]=oo.prototype[Zi]);var so,Zi,Ji;function Ve(t){if(!(this instanceof Ve))return new Ve(t);Uu.call(this,t),oo.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",qm)))}Object.defineProperty(Ve.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Ve.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Ve.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function qm(){this._writableState.ended||process.nextTick(Lm,this)}function Lm(t){t.end()}Object.defineProperty(Ve.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var ao=_((yE,Ju)=>{"use strict";Ju.exports=Y;function Gu(t){var e=this;this.next=null,this.entry=null,this.finish=function(){ly(e,t)}}var or;Y.WritableState=$r;var Nm={deprecate:js()},Vu=Fs(),Xi=L("buffer").Buffer,jm=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Fm(t){return Xi.from(t)}function Im(t){return Xi.isBuffer(t)||t instanceof jm}var uo=$s(),$m=Ws(),Wm=$m.getHighWaterMark,gt=ir().codes,Bm=gt.ERR_INVALID_ARG_TYPE,Um=gt.ERR_METHOD_NOT_IMPLEMENTED,zm=gt.ERR_MULTIPLE_CALLBACK,Hm=gt.ERR_STREAM_CANNOT_PIPE,Gm=gt.ERR_STREAM_DESTROYED,Vm=gt.ERR_STREAM_NULL_VALUES,Ym=gt.ERR_STREAM_WRITE_AFTER_END,Km=gt.ERR_UNKNOWN_ENCODING,ar=uo.errorOrDestroy;tt()(Y,Vu);function Jm(){}function $r(t,e,r){or=or||Fr(),t=t||{},typeof r!="boolean"&&(r=e instanceof or),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=Wm(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=t.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){iy(e,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Gu(this)}$r.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty($r.prototype,"buffer",{get:Nm.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Qi;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Qi=Function.prototype[Symbol.hasInstance],Object.defineProperty(Y,Symbol.hasInstance,{value:function(e){return Qi.call(this,e)?!0:this!==Y?!1:e&&e._writableState instanceof $r}})):Qi=function(e){return e instanceof this};function Y(t){or=or||Fr();var e=this instanceof or;if(!e&&!Qi.call(Y,this))return new Y(t);this._writableState=new $r(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),Vu.call(this)}Y.prototype.pipe=function(){ar(this,new Hm)};function Zm(t,e){var r=new Ym;ar(t,r),process.nextTick(e,r)}function Qm(t,e,r,i){var n;return r===null?n=new Vm:typeof r!="string"&&!e.objectMode&&(n=new Bm("chunk",["string","Buffer"],r)),n?(ar(t,n),process.nextTick(i,n),!1):!0}Y.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&Im(t);return s&&!Xi.isBuffer(t)&&(t=Fm(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=Jm),i.ending?Zm(this,r):(s||Qm(this,i,t,r))&&(i.pendingcb++,n=ey(this,i,s,t,e,r)),n};Y.prototype.cork=function(){this._writableState.corked++};Y.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&Yu(this,t))};Y.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new Km(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(Y.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Xm(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=Xi.from(e,r)),e}Object.defineProperty(Y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function ey(t,e,r,i,n,s){if(!r){var o=Xm(e,i,n);i!==o&&(r=!0,n="buffer",i=o)}var a=e.objectMode?1:i.length;e.length+=a;var l=e.length<e.highWaterMark;if(l||(e.needDrain=!0),e.writing||e.corked){var u=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},u?u.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else lo(t,e,!1,a,i,n,s);return l}function lo(t,e,r,i,n,s,o){e.writelen=i,e.writecb=o,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new Gm("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function ty(t,e,r,i,n){--e.pendingcb,r?(process.nextTick(n,i),process.nextTick(Ir,t,e),t._writableState.errorEmitted=!0,ar(t,i)):(n(i),t._writableState.errorEmitted=!0,ar(t,i),Ir(t,e))}function ry(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function iy(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new zm;if(ry(r),e)ty(t,r,i,e,n);else{var s=Ku(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Yu(t,r),i?process.nextTick(Hu,t,r,s,n):Hu(t,r,s,n)}}function Hu(t,e,r,i){r||ny(t,e),e.pendingcb--,i(),Ir(t,e)}function ny(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function Yu(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var o=0,a=!0;r;)n[o]=r,r.isBuf||(a=!1),r=r.next,o+=1;n.allBuffers=a,lo(t,e,!0,e.length,n,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new Gu(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,c=r.callback,f=e.objectMode?1:l.length;if(lo(t,e,!1,f,l,u,c),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}Y.prototype._write=function(t,e,r){r(new Um("_write()"))};Y.prototype._writev=null;Y.prototype.end=function(t,e,r){var i=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||ay(this,i,r),this};Object.defineProperty(Y.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Ku(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function sy(t,e){t._final(function(r){e.pendingcb--,r&&ar(t,r),e.prefinished=!0,t.emit("prefinish"),Ir(t,e)})}function oy(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(sy,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Ir(t,e){var r=Ku(e);if(r&&(oy(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}function ay(t,e,r){e.ending=!0,Ir(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function ly(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty(Y.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});Y.prototype.destroy=uo.destroy;Y.prototype._undestroy=uo.undestroy;Y.prototype._destroy=function(t,e){e(t)}});var fo=_((bE,Xu)=>{"use strict";var uy=L("util"),Zu=ao(),{LEVEL:Qu}=te(),Wr=Xu.exports=function(e={}){Zu.call(this,{objectMode:!0,highWaterMark:e.highWaterMark}),this.format=e.format,this.level=e.level,this.handleExceptions=e.handleExceptions,this.handleRejections=e.handleRejections,this.silent=e.silent,e.log&&(this.log=e.log),e.logv&&(this.logv=e.logv),e.close&&(this.close=e.close),this.once("pipe",r=>{this.levels=r.levels,this.parent=r}),this.once("unpipe",r=>{r===this.parent&&(this.parent=null,this.close&&this.close())})};uy.inherits(Wr,Zu);Wr.prototype._write=function(e,r,i){if(this.silent||e.exception===!0&&!this.handleExceptions)return i(null);let n=this.level||this.parent&&this.parent.level;if(!n||this.levels[n]>=this.levels[e[Qu]]){if(e&&!this.format)return this.log(e,i);let s,o;try{o=this.format.transform(Object.assign({},e),this.format.options)}catch(a){s=a}if(s||!o){if(i(),s)throw s;return}return this.log(o,i)}return this._writableState.sync=!1,i(null)};Wr.prototype._writev=function(e,r){if(this.logv){let i=e.filter(this._accept,this);return i.length?this.logv(i,r):r(null)}for(let i=0;i<e.length;i++){if(!this._accept(e[i]))continue;if(e[i].chunk&&!this.format){this.log(e[i].chunk,e[i].callback);continue}let n,s;try{s=this.format.transform(Object.assign({},e[i].chunk),this.format.options)}catch(o){n=o}if(n||!s){if(e[i].callback(),n)throw r(null),n}else this.log(s,e[i].callback)}return r(null)};Wr.prototype._accept=function(e){let r=e.chunk;if(this.silent)return!1;let i=this.level||this.parent&&this.parent.level;return!!((r.exception===!0||!i||this.levels[i]>=this.levels[r[Qu]])&&(this.handleExceptions||r.exception!==!0))};Wr.prototype._nop=function(){}});var ho=_((wE,tf)=>{"use strict";var fy=L("util"),{LEVEL:co}=te(),ef=fo(),Br=tf.exports=function(e={}){if(ef.call(this,e),!e.transport||typeof e.transport.log!="function")throw new Error("Invalid transport, must be an object with a log method.");this.transport=e.transport,this.level=this.level||e.transport.level,this.handleExceptions=this.handleExceptions||e.transport.handleExceptions,this._deprecated();function r(i){this.emit("error",i,this.transport)}this.transport.__winstonError||(this.transport.__winstonError=r.bind(this),this.transport.on("error",this.transport.__winstonError))};fy.inherits(Br,ef);Br.prototype._write=function(e,r,i){if(this.silent||e.exception===!0&&!this.handleExceptions)return i(null);(!this.level||this.levels[this.level]>=this.levels[e[co]])&&this.transport.log(e[co],e.message,e,this._nop),i(null)};Br.prototype._writev=function(e,r){for(let i=0;i<e.length;i++)this._accept(e[i])&&(this.transport.log(e[i].chunk[co],e[i].chunk.message,e[i].chunk,this._nop),e[i].callback());return r(null)};Br.prototype._deprecated=function(){console.error([`${this.transport.name} is a legacy winston transport. Consider upgrading: `,"- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join(`
31
- `))};Br.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)}});var lr=_((_E,po)=>{"use strict";po.exports=fo();po.exports.LegacyTransportStream=ho()});var sf=_((SE,nf)=>{"use strict";var cy=L("os"),{LEVEL:rf,MESSAGE:ur}=te(),hy=lr();nf.exports=class extends hy{constructor(e={}){super(e),this.name=e.name||"console",this.stderrLevels=this._stringArrayToSet(e.stderrLevels),this.consoleWarnLevels=this._stringArrayToSet(e.consoleWarnLevels),this.eol=typeof e.eol=="string"?e.eol:cy.EOL,this.forceConsole=e.forceConsole||!1,this._consoleLog=console.log.bind(console),this._consoleWarn=console.warn.bind(console),this._consoleError=console.error.bind(console),this.setMaxListeners(30)}log(e,r){if(setImmediate(()=>this.emit("logged",e)),this.stderrLevels[e[rf]]){console._stderr&&!this.forceConsole?console._stderr.write(`${e[ur]}${this.eol}`):this._consoleError(e[ur]),r&&r();return}else if(this.consoleWarnLevels[e[rf]]){console._stderr&&!this.forceConsole?console._stderr.write(`${e[ur]}${this.eol}`):this._consoleWarn(e[ur]),r&&r();return}console._stdout&&!this.forceConsole?console._stdout.write(`${e[ur]}${this.eol}`):this._consoleLog(e[ur]),r&&r()}_stringArrayToSet(e,r){if(!e)return{};if(r=r||"Cannot make set from type other than Array of string elements",!Array.isArray(e))throw new Error(r);return e.reduce((i,n)=>{if(typeof n!="string")throw new Error(r);return i[n]=!0,i},{})}}});var tn=_((en,of)=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.default=dy;function dy(t){return t&&typeof t.length=="number"&&t.length>=0&&t.length%1===0}of.exports=en.default});var lf=_((rn,af)=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.default=function(t){return function(...e){var r=e.pop();return t.call(this,e,r)}};af.exports=rn.default});var cf=_(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.fallback=uf;mt.wrap=ff;var py=mt.hasQueueMicrotask=typeof queueMicrotask=="function"&&queueMicrotask,gy=mt.hasSetImmediate=typeof setImmediate=="function"&&setImmediate,my=mt.hasNextTick=typeof process=="object"&&typeof process.nextTick=="function";function uf(t){setTimeout(t,0)}function ff(t){return(e,...r)=>t(()=>e(...r))}var Ur;py?Ur=queueMicrotask:gy?Ur=setImmediate:my?Ur=process.nextTick:Ur=uf;mt.default=ff(Ur)});var mf=_((nn,gf)=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.default=Sy;var yy=lf(),by=pf(yy),wy=cf(),_y=pf(wy),vy=Wt();function pf(t){return t&&t.__esModule?t:{default:t}}function Sy(t){return(0,vy.isAsync)(t)?function(...e){let r=e.pop(),i=t.apply(this,e);return hf(i,r)}:(0,by.default)(function(e,r){var i;try{i=t.apply(this,e)}catch(n){return r(n)}if(i&&typeof i.then=="function")return hf(i,r);r(null,i)})}function hf(t,e){return t.then(r=>{df(e,null,r)},r=>{df(e,r&&(r instanceof Error||r.message)?r:new Error(r))})}function df(t,e,r){try{t(e,r)}catch(i){(0,_y.default)(n=>{throw n},i)}}gf.exports=nn.default});var Wt=_(rt=>{"use strict";Object.defineProperty(rt,"__esModule",{value:!0});rt.isAsyncIterable=rt.isAsyncGenerator=rt.isAsync=void 0;var Ey=mf(),Ry=xy(Ey);function xy(t){return t&&t.__esModule?t:{default:t}}function yf(t){return t[Symbol.toStringTag]==="AsyncFunction"}function Ty(t){return t[Symbol.toStringTag]==="AsyncGenerator"}function My(t){return typeof t[Symbol.asyncIterator]=="function"}function Oy(t){if(typeof t!="function")throw new Error("expected a function");return yf(t)?(0,Ry.default)(t):t}rt.default=Oy;rt.isAsync=yf;rt.isAsyncGenerator=Ty;rt.isAsyncIterable=My});var fr=_((sn,bf)=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.default=Ay;function Ay(t,e){if(e||(e=t.length),!e)throw new Error("arity is undefined");function r(...i){return typeof i[e-1]=="function"?t.apply(this,i):new Promise((n,s)=>{i[e-1]=(o,...a)=>{if(o)return s(o);n(a.length>1?a:a[0])},t.apply(this,i)})}return r}bf.exports=sn.default});var _f=_((on,wf)=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});var ky=tn(),Py=go(ky),Dy=Wt(),Cy=go(Dy),qy=fr(),Ly=go(qy);function go(t){return t&&t.__esModule?t:{default:t}}on.default=(0,Ly.default)((t,e,r)=>{var i=(0,Py.default)(e)?[]:{};t(e,(n,s,o)=>{(0,Cy.default)(n)((a,...l)=>{l.length<2&&([l]=l),i[s]=l,o(a)})},n=>r(n,i))},3);wf.exports=on.default});var mo=_((an,vf)=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.default=Ny;function Ny(t){function e(...r){if(t!==null){var i=t;t=null,i.apply(this,r)}}return Object.assign(e,t),e}vf.exports=an.default});var Ef=_((ln,Sf)=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.default=function(t){return t[Symbol.iterator]&&t[Symbol.iterator]()};Sf.exports=ln.default});var Tf=_((un,xf)=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.default=zy;var jy=tn(),Fy=Rf(jy),Iy=Ef(),$y=Rf(Iy);function Rf(t){return t&&t.__esModule?t:{default:t}}function Wy(t){var e=-1,r=t.length;return function(){return++e<r?{value:t[e],key:e}:null}}function By(t){var e=-1;return function(){var i=t.next();return i.done?null:(e++,{value:i.value,key:e})}}function Uy(t){var e=t?Object.keys(t):[],r=-1,i=e.length;return function n(){var s=e[++r];return s==="__proto__"?n():r<i?{value:t[s],key:s}:null}}function zy(t){if((0,Fy.default)(t))return Wy(t);var e=(0,$y.default)(t);return e?By(e):Uy(t)}xf.exports=un.default});var yo=_((fn,Mf)=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.default=Hy;function Hy(t){return function(...e){if(t===null)throw new Error("Callback was already called.");var r=t;t=null,r.apply(this,e)}}Mf.exports=fn.default});var hn=_((cn,Of)=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});var Gy={};cn.default=Gy;Of.exports=cn.default});var kf=_((dn,Af)=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.default=Jy;var Vy=hn(),Yy=Ky(Vy);function Ky(t){return t&&t.__esModule?t:{default:t}}function Jy(t,e,r,i){let n=!1,s=!1,o=!1,a=0,l=0;function u(){a>=e||o||n||(o=!0,t.next().then(({value:p,done:m})=>{if(!(s||n)){if(o=!1,m){n=!0,a<=0&&i(null);return}a++,r(p,l,c),l++,u()}}).catch(f))}function c(p,m){if(a-=1,!s){if(p)return f(p);if(p===!1){n=!0,s=!0;return}if(m===Yy.default||n&&a<=0)return n=!0,i(null);u()}}function f(p){s||(o=!1,n=!0,i(p))}u()}Af.exports=dn.default});var qf=_((pn,Cf)=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});var Zy=mo(),Qy=zr(Zy),Xy=Tf(),eb=zr(Xy),tb=yo(),rb=zr(tb),Pf=Wt(),ib=kf(),Df=zr(ib),nb=hn(),sb=zr(nb);function zr(t){return t&&t.__esModule?t:{default:t}}pn.default=t=>(e,r,i)=>{if(i=(0,Qy.default)(i),t<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!e)return i(null);if((0,Pf.isAsyncGenerator)(e))return(0,Df.default)(e,t,r,i);if((0,Pf.isAsyncIterable)(e))return(0,Df.default)(e[Symbol.asyncIterator](),t,r,i);var n=(0,eb.default)(e),s=!1,o=!1,a=0,l=!1;function u(f,p){if(!o)if(a-=1,f)s=!0,i(f);else if(f===!1)s=!0,o=!0;else{if(p===sb.default||s&&a<=0)return s=!0,i(null);l||c()}}function c(){for(l=!0;a<t&&!s;){var f=n();if(f===null){s=!0,a<=0&&i(null);return}a+=1,r(f.value,f.key,(0,rb.default)(u))}l=!1}c()};Cf.exports=pn.default});var wo=_((gn,Lf)=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});var ob=qf(),ab=bo(ob),lb=Wt(),ub=bo(lb),fb=fr(),cb=bo(fb);function bo(t){return t&&t.__esModule?t:{default:t}}function hb(t,e,r,i){return(0,ab.default)(e)(t,(0,ub.default)(r),i)}gn.default=(0,cb.default)(hb,4);Lf.exports=gn.default});var Ff=_((mn,jf)=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});var db=wo(),pb=Nf(db),gb=fr(),mb=Nf(gb);function Nf(t){return t&&t.__esModule?t:{default:t}}function yb(t,e,r){return(0,pb.default)(t,1,e,r)}mn.default=(0,mb.default)(yb,3);jf.exports=mn.default});var Wf=_((yn,$f)=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.default=Sb;var bb=_f(),wb=If(bb),_b=Ff(),vb=If(_b);function If(t){return t&&t.__esModule?t:{default:t}}function Sb(t,e){return(0,wb.default)(vb.default,t,e)}$f.exports=yn.default});var _o=_((xE,Bf)=>{Bf.exports=L("stream")});var Yf=_((TE,Vf)=>{"use strict";function Uf(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function zf(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Uf(Object(r),!0).forEach(function(i){Eb(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Uf(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Eb(t,e,r){return e=Gf(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Rb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Hf(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Gf(i.key),i)}}function xb(t,e,r){return e&&Hf(t.prototype,e),r&&Hf(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Gf(t){var e=Tb(t,"string");return typeof e=="symbol"?e:String(e)}function Tb(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Mb=L("buffer"),bn=Mb.Buffer,Ob=L("util"),vo=Ob.inspect,Ab=vo&&vo.custom||"inspect";function kb(t,e,r){bn.prototype.copy.call(t,e,r)}Vf.exports=(function(){function t(){Rb(this,t),this.head=null,this.tail=null,this.length=0}return xb(t,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return bn.alloc(0);for(var i=bn.allocUnsafe(r>>>0),n=this.head,s=0;n;)kb(n.data,i,s),s+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,n=1,s=i.data;for(r-=s.length;i=i.next;){var o=i.data,a=r>o.length?o.length:r;if(a===o.length?s+=o:s+=o.slice(0,r),r-=a,r===0){a===o.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(a));break}++n}return this.length-=n,s}},{key:"_getBuffer",value:function(r){var i=bn.allocUnsafe(r),n=this.head,s=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var o=n.data,a=r>o.length?o.length:r;if(o.copy(i,i.length-r,0,a),r-=a,r===0){a===o.length?(++s,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(a));break}++s}return this.length-=s,i}},{key:Ab,value:function(r,i){return vo(this,zf(zf({},i),{},{depth:0,customInspect:!1}))}}]),t})()});var Eo=_((ME,Jf)=>{"use strict";function Pb(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(So,this,t)):process.nextTick(So,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(wn,r):(r._writableState.errorEmitted=!0,process.nextTick(Kf,r,s)):process.nextTick(Kf,r,s):e?(process.nextTick(wn,r),e(s)):process.nextTick(wn,r)}),this)}function Kf(t,e){So(t,e),wn(t)}function wn(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function Db(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function So(t,e){t.emit("error",e)}function Cb(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}Jf.exports={destroy:Pb,undestroy:Db,errorOrDestroy:Cb}});var yt=_((OE,Xf)=>{"use strict";var Qf={};function Ce(t,e,r){r||(r=Error);function i(s,o,a){return typeof e=="string"?e:e(s,o,a)}class n extends r{constructor(o,a,l){super(i(o,a,l))}}n.prototype.name=r.name,n.prototype.code=t,Qf[t]=n}function Zf(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(i=>String(i)),r>2?`one of ${e} ${t.slice(0,r-1).join(", ")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return`of ${e} ${String(t)}`}function qb(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function Lb(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function Nb(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}Ce("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);Ce("ERR_INVALID_ARG_TYPE",function(t,e,r){let i;typeof e=="string"&&qb(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if(Lb(t," argument"))n=`The ${t} ${i} ${Zf(e,"type")}`;else{let s=Nb(t,".")?"property":"argument";n=`The "${t}" ${s} ${i} ${Zf(e,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);Ce("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Ce("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});Ce("ERR_STREAM_PREMATURE_CLOSE","Premature close");Ce("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});Ce("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Ce("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Ce("ERR_STREAM_WRITE_AFTER_END","write after end");Ce("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Ce("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);Ce("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Xf.exports.codes=Qf});var Ro=_((AE,ec)=>{"use strict";var jb=yt().codes.ERR_INVALID_OPT_VALUE;function Fb(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Ib(t,e,r,i){var n=Fb(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new jb(s,n)}return Math.floor(n)}return t.objectMode?16:16*1024}ec.exports={getHighWaterMark:Ib}});var Mo=_((kE,oc)=>{"use strict";oc.exports=K;function rc(t){var e=this;this.next=null,this.entry=null,this.finish=function(){h0(e,t)}}var cr;K.WritableState=Gr;var $b={deprecate:js()},ic=_o(),vn=L("buffer").Buffer,Wb=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Bb(t){return vn.from(t)}function Ub(t){return vn.isBuffer(t)||t instanceof Wb}var To=Eo(),zb=Ro(),Hb=zb.getHighWaterMark,bt=yt().codes,Gb=bt.ERR_INVALID_ARG_TYPE,Vb=bt.ERR_METHOD_NOT_IMPLEMENTED,Yb=bt.ERR_MULTIPLE_CALLBACK,Kb=bt.ERR_STREAM_CANNOT_PIPE,Jb=bt.ERR_STREAM_DESTROYED,Zb=bt.ERR_STREAM_NULL_VALUES,Qb=bt.ERR_STREAM_WRITE_AFTER_END,Xb=bt.ERR_UNKNOWN_ENCODING,hr=To.errorOrDestroy;tt()(K,ic);function e0(){}function Gr(t,e,r){cr=cr||Bt(),t=t||{},typeof r!="boolean"&&(r=e instanceof cr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=Hb(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=t.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){a0(e,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new rc(this)}Gr.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(Gr.prototype,"buffer",{get:$b.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var _n;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(_n=Function.prototype[Symbol.hasInstance],Object.defineProperty(K,Symbol.hasInstance,{value:function(e){return _n.call(this,e)?!0:this!==K?!1:e&&e._writableState instanceof Gr}})):_n=function(e){return e instanceof this};function K(t){cr=cr||Bt();var e=this instanceof cr;if(!e&&!_n.call(K,this))return new K(t);this._writableState=new Gr(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),ic.call(this)}K.prototype.pipe=function(){hr(this,new Kb)};function t0(t,e){var r=new Qb;hr(t,r),process.nextTick(e,r)}function r0(t,e,r,i){var n;return r===null?n=new Zb:typeof r!="string"&&!e.objectMode&&(n=new Gb("chunk",["string","Buffer"],r)),n?(hr(t,n),process.nextTick(i,n),!1):!0}K.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&Ub(t);return s&&!vn.isBuffer(t)&&(t=Bb(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=e0),i.ending?t0(this,r):(s||r0(this,i,t,r))&&(i.pendingcb++,n=n0(this,i,s,t,e,r)),n};K.prototype.cork=function(){this._writableState.corked++};K.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&nc(this,t))};K.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new Xb(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(K.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function i0(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=vn.from(e,r)),e}Object.defineProperty(K.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function n0(t,e,r,i,n,s){if(!r){var o=i0(e,i,n);i!==o&&(r=!0,n="buffer",i=o)}var a=e.objectMode?1:i.length;e.length+=a;var l=e.length<e.highWaterMark;if(l||(e.needDrain=!0),e.writing||e.corked){var u=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},u?u.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else xo(t,e,!1,a,i,n,s);return l}function xo(t,e,r,i,n,s,o){e.writelen=i,e.writecb=o,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new Jb("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function s0(t,e,r,i,n){--e.pendingcb,r?(process.nextTick(n,i),process.nextTick(Hr,t,e),t._writableState.errorEmitted=!0,hr(t,i)):(n(i),t._writableState.errorEmitted=!0,hr(t,i),Hr(t,e))}function o0(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function a0(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new Yb;if(o0(r),e)s0(t,r,i,e,n);else{var s=sc(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&nc(t,r),i?process.nextTick(tc,t,r,s,n):tc(t,r,s,n)}}function tc(t,e,r,i){r||l0(t,e),e.pendingcb--,i(),Hr(t,e)}function l0(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function nc(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var o=0,a=!0;r;)n[o]=r,r.isBuf||(a=!1),r=r.next,o+=1;n.allBuffers=a,xo(t,e,!0,e.length,n,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new rc(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,c=r.callback,f=e.objectMode?1:l.length;if(xo(t,e,!1,f,l,u,c),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}K.prototype._write=function(t,e,r){r(new Vb("_write()"))};K.prototype._writev=null;K.prototype.end=function(t,e,r){var i=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||c0(this,i,r),this};Object.defineProperty(K.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function sc(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function u0(t,e){t._final(function(r){e.pendingcb--,r&&hr(t,r),e.prefinished=!0,t.emit("prefinish"),Hr(t,e)})}function f0(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(u0,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Hr(t,e){var r=sc(e);if(r&&(f0(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}function c0(t,e,r){e.ending=!0,Hr(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function h0(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty(K.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});K.prototype.destroy=To.destroy;K.prototype._undestroy=To.undestroy;K.prototype._destroy=function(t,e){e(t)}});var Bt=_((PE,lc)=>{"use strict";var d0=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};lc.exports=Ye;var ac=ko(),Ao=Mo();tt()(Ye,ac);for(Oo=d0(Ao.prototype),Sn=0;Sn<Oo.length;Sn++)En=Oo[Sn],Ye.prototype[En]||(Ye.prototype[En]=Ao.prototype[En]);var Oo,En,Sn;function Ye(t){if(!(this instanceof Ye))return new Ye(t);ac.call(this,t),Ao.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",p0)))}Object.defineProperty(Ye.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Ye.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Ye.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function p0(){this._writableState.ended||process.nextTick(g0,this)}function g0(t){t.end()}Object.defineProperty(Ye.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var Rn=_((DE,cc)=>{"use strict";var uc=yt().codes.ERR_STREAM_PREMATURE_CLOSE;function m0(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];t.apply(this,i)}}}function y0(){}function b0(t){return t.setHeader&&typeof t.abort=="function"}function fc(t,e,r){if(typeof e=="function")return fc(t,null,e);e||(e={}),r=m0(r||y0);var i=e.readable||e.readable!==!1&&t.readable,n=e.writable||e.writable!==!1&&t.writable,s=function(){t.writable||a()},o=t._writableState&&t._writableState.finished,a=function(){n=!1,o=!0,i||r.call(t)},l=t._readableState&&t._readableState.endEmitted,u=function(){i=!1,l=!0,n||r.call(t)},c=function(d){r.call(t,d)},f=function(){var d;if(i&&!l)return(!t._readableState||!t._readableState.ended)&&(d=new uc),r.call(t,d);if(n&&!o)return(!t._writableState||!t._writableState.ended)&&(d=new uc),r.call(t,d)},p=function(){t.req.on("finish",a)};return b0(t)?(t.on("complete",a),t.on("abort",f),t.req?p():t.on("request",p)):n&&!t._writableState&&(t.on("end",s),t.on("close",s)),t.on("end",u),t.on("finish",a),e.error!==!1&&t.on("error",c),t.on("close",f),function(){t.removeListener("complete",a),t.removeListener("abort",f),t.removeListener("request",p),t.req&&t.req.removeListener("finish",a),t.removeListener("end",s),t.removeListener("close",s),t.removeListener("finish",a),t.removeListener("end",u),t.removeListener("error",c),t.removeListener("close",f)}}cc.exports=fc});var dc=_((CE,hc)=>{"use strict";var xn;function wt(t,e,r){return e=w0(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function w0(t){var e=_0(t,"string");return typeof e=="symbol"?e:String(e)}function _0(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var v0=Rn(),_t=Symbol("lastResolve"),Ut=Symbol("lastReject"),Vr=Symbol("error"),Tn=Symbol("ended"),zt=Symbol("lastPromise"),Po=Symbol("handlePromise"),Ht=Symbol("stream");function vt(t,e){return{value:t,done:e}}function S0(t){var e=t[_t];if(e!==null){var r=t[Ht].read();r!==null&&(t[zt]=null,t[_t]=null,t[Ut]=null,e(vt(r,!1)))}}function E0(t){process.nextTick(S0,t)}function R0(t,e){return function(r,i){t.then(function(){if(e[Tn]){r(vt(void 0,!0));return}e[Po](r,i)},i)}}var x0=Object.getPrototypeOf(function(){}),T0=Object.setPrototypeOf((xn={get stream(){return this[Ht]},next:function(){var e=this,r=this[Vr];if(r!==null)return Promise.reject(r);if(this[Tn])return Promise.resolve(vt(void 0,!0));if(this[Ht].destroyed)return new Promise(function(o,a){process.nextTick(function(){e[Vr]?a(e[Vr]):o(vt(void 0,!0))})});var i=this[zt],n;if(i)n=new Promise(R0(i,this));else{var s=this[Ht].read();if(s!==null)return Promise.resolve(vt(s,!1));n=new Promise(this[Po])}return this[zt]=n,n}},wt(xn,Symbol.asyncIterator,function(){return this}),wt(xn,"return",function(){var e=this;return new Promise(function(r,i){e[Ht].destroy(null,function(n){if(n){i(n);return}r(vt(void 0,!0))})})}),xn),x0),M0=function(e){var r,i=Object.create(T0,(r={},wt(r,Ht,{value:e,writable:!0}),wt(r,_t,{value:null,writable:!0}),wt(r,Ut,{value:null,writable:!0}),wt(r,Vr,{value:null,writable:!0}),wt(r,Tn,{value:e._readableState.endEmitted,writable:!0}),wt(r,Po,{value:function(s,o){var a=i[Ht].read();a?(i[zt]=null,i[_t]=null,i[Ut]=null,s(vt(a,!1))):(i[_t]=s,i[Ut]=o)},writable:!0}),r));return i[zt]=null,v0(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[Ut];s!==null&&(i[zt]=null,i[_t]=null,i[Ut]=null,s(n)),i[Vr]=n;return}var o=i[_t];o!==null&&(i[zt]=null,i[_t]=null,i[Ut]=null,o(vt(void 0,!0))),i[Tn]=!0}),e.on("readable",E0.bind(null,i)),i};hc.exports=M0});var yc=_((qE,mc)=>{"use strict";function pc(t,e,r,i,n,s,o){try{var a=t[s](o),l=a.value}catch(u){r(u);return}a.done?e(l):Promise.resolve(l).then(i,n)}function O0(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function o(l){pc(s,i,n,o,a,"next",l)}function a(l){pc(s,i,n,o,a,"throw",l)}o(void 0)})}}function gc(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function A0(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?gc(Object(r),!0).forEach(function(i){k0(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):gc(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function k0(t,e,r){return e=P0(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function P0(t){var e=D0(t,"string");return typeof e=="symbol"?e:String(e)}function D0(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var C0=yt().codes.ERR_INVALID_ARG_TYPE;function q0(t,e,r){var i;if(e&&typeof e.next=="function")i=e;else if(e&&e[Symbol.asyncIterator])i=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])i=e[Symbol.iterator]();else throw new C0("iterable",["Iterable"],e);var n=new t(A0({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,o())};function o(){return a.apply(this,arguments)}function a(){return a=O0(function*(){try{var l=yield i.next(),u=l.value,c=l.done;c?n.push(null):n.push(yield u)?o():s=!1}catch(f){n.destroy(f)}}),a.apply(this,arguments)}return n}mc.exports=q0});var ko=_((NE,Mc)=>{"use strict";Mc.exports=U;var dr;U.ReadableState=vc;var LE=L("events").EventEmitter,_c=function(e,r){return e.listeners(r).length},Kr=_o(),Mn=L("buffer").Buffer,L0=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function N0(t){return Mn.from(t)}function j0(t){return Mn.isBuffer(t)||t instanceof L0}var Do=L("util"),j;Do&&Do.debuglog?j=Do.debuglog("stream"):j=function(){};var F0=Yf(),Io=Eo(),I0=Ro(),$0=I0.getHighWaterMark,On=yt().codes,W0=On.ERR_INVALID_ARG_TYPE,B0=On.ERR_STREAM_PUSH_AFTER_EOF,U0=On.ERR_METHOD_NOT_IMPLEMENTED,z0=On.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,pr,Co,qo;tt()(U,Kr);var Yr=Io.errorOrDestroy,Lo=["error","close","destroy","pause","resume"];function H0(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function vc(t,e,r){dr=dr||Bt(),t=t||{},typeof r!="boolean"&&(r=e instanceof dr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=$0(this,t,"readableHighWaterMark",r),this.buffer=new F0,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(pr||(pr=qr().StringDecoder),this.decoder=new pr(t.encoding),this.encoding=t.encoding)}function U(t){if(dr=dr||Bt(),!(this instanceof U))return new U(t);var e=this instanceof dr;this._readableState=new vc(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),Kr.call(this)}Object.defineProperty(U.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});U.prototype.destroy=Io.destroy;U.prototype._undestroy=Io.undestroy;U.prototype._destroy=function(t,e){e(t)};U.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=Mn.from(t,e),e=""),i=!0),Sc(this,t,e,!1,i)};U.prototype.unshift=function(t){return Sc(this,t,null,!0,!1)};function Sc(t,e,r,i,n){j("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,Y0(t,s);else{var o;if(n||(o=G0(s,e)),o)Yr(t,o);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==Mn.prototype&&(e=N0(e)),i)s.endEmitted?Yr(t,new z0):No(t,s,e,!0);else if(s.ended)Yr(t,new B0);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?No(t,s,e,!1):Fo(t,s)):No(t,s,e,!1)}else i||(s.reading=!1,Fo(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function No(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&An(t)),Fo(t,e)}function G0(t,e){var r;return!j0(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new W0("chunk",["string","Buffer","Uint8Array"],e)),r}U.prototype.isPaused=function(){return this._readableState.flowing===!1};U.prototype.setEncoding=function(t){pr||(pr=qr().StringDecoder);var e=new pr(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var bc=1073741824;function V0(t){return t>=bc?t=bc:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function wc(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=V0(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}U.prototype.read=function(t){j("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return j("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?jo(this):An(this),null;if(t=wc(t,e),t===0&&e.ended)return e.length===0&&jo(this),null;var i=e.needReadable;j("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,j("length less than watermark",i)),e.ended||e.reading?(i=!1,j("reading or ended",i)):i&&(j("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=wc(r,e)));var n;return t>0?n=xc(t,e):n=null,n===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&jo(this)),n!==null&&this.emit("data",n),n};function Y0(t,e){if(j("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?An(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,Ec(t)))}}function An(t){var e=t._readableState;j("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(j("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(Ec,t))}function Ec(t){var e=t._readableState;j("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,$o(t)}function Fo(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(K0,t,e))}function K0(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(j("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}U.prototype._read=function(t){Yr(this,new U0("_read()"))};U.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,j("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=n?a:b;i.endEmitted?process.nextTick(s):r.once("end",s),t.on("unpipe",o);function o(v,S){j("onunpipe"),v===r&&S&&S.hasUnpiped===!1&&(S.hasUnpiped=!0,c())}function a(){j("onend"),t.end()}var l=J0(r);t.on("drain",l);var u=!1;function c(){j("cleanup"),t.removeListener("close",m),t.removeListener("finish",d),t.removeListener("drain",l),t.removeListener("error",p),t.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",b),r.removeListener("data",f),u=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&l()}r.on("data",f);function f(v){j("ondata");var S=t.write(v);j("dest.write",S),S===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&Tc(i.pipes,t)!==-1)&&!u&&(j("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function p(v){j("onerror",v),b(),t.removeListener("error",p),_c(t,"error")===0&&Yr(t,v)}H0(t,"error",p);function m(){t.removeListener("finish",d),b()}t.once("close",m);function d(){j("onfinish"),t.removeListener("close",m),b()}t.once("finish",d);function b(){j("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(j("pipe resume"),r.resume()),t};function J0(t){return function(){var r=t._readableState;j("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&_c(t,"data")&&(r.flowing=!0,$o(t))}}U.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=Tc(e.pipes,t);return o===-1?this:(e.pipes.splice(o,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};U.prototype.on=function(t,e){var r=Kr.prototype.on.call(this,t,e),i=this._readableState;return t==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):t==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,j("on readable",i.length,i.reading),i.length?An(this):i.reading||process.nextTick(Z0,this)),r};U.prototype.addListener=U.prototype.on;U.prototype.removeListener=function(t,e){var r=Kr.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(Rc,this),r};U.prototype.removeAllListeners=function(t){var e=Kr.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(Rc,this),e};function Rc(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function Z0(t){j("readable nexttick read 0"),t.read(0)}U.prototype.resume=function(){var t=this._readableState;return t.flowing||(j("resume"),t.flowing=!t.readableListening,Q0(this,t)),t.paused=!1,this};function Q0(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(X0,t,e))}function X0(t,e){j("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),$o(t),e.flowing&&!e.reading&&t.read(0)}U.prototype.pause=function(){return j("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(j("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function $o(t){var e=t._readableState;for(j("flow",e.flowing);e.flowing&&t.read()!==null;);}U.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(j("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&e.push(o)}e.push(null)}),t.on("data",function(o){if(j("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var a=e.push(o);a||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=(function(a){return function(){return t[a].apply(t,arguments)}})(n));for(var s=0;s<Lo.length;s++)t.on(Lo[s],this.emit.bind(this,Lo[s]));return this._read=function(o){j("wrapped _read",o),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&(U.prototype[Symbol.asyncIterator]=function(){return Co===void 0&&(Co=dc()),Co(this)});Object.defineProperty(U.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(U.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(U.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});U._fromList=xc;Object.defineProperty(U.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function xc(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function jo(t){var e=t._readableState;j("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(ew,e,t))}function ew(t,e){if(j("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(U.from=function(t,e){return qo===void 0&&(qo=yc()),qo(U,t,e)});function Tc(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var Wo=_((jE,Ac)=>{"use strict";Ac.exports=it;var kn=yt().codes,tw=kn.ERR_METHOD_NOT_IMPLEMENTED,rw=kn.ERR_MULTIPLE_CALLBACK,iw=kn.ERR_TRANSFORM_ALREADY_TRANSFORMING,nw=kn.ERR_TRANSFORM_WITH_LENGTH_0,Pn=Bt();tt()(it,Pn);function sw(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new rw);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function it(t){if(!(this instanceof it))return new it(t);Pn.call(this,t),this._transformState={afterTransform:sw.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",ow)}function ow(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){Oc(t,e,r)}):Oc(this,null,null)}it.prototype.push=function(t,e){return this._transformState.needTransform=!1,Pn.prototype.push.call(this,t,e)};it.prototype._transform=function(t,e,r){r(new tw("_transform()"))};it.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};it.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};it.prototype._destroy=function(t,e){Pn.prototype._destroy.call(this,t,function(r){e(r)})};function Oc(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new nw;if(t._transformState.transforming)throw new iw;return t.push(null)}});var Dc=_((FE,Pc)=>{"use strict";Pc.exports=Jr;var kc=Wo();tt()(Jr,kc);function Jr(t){if(!(this instanceof Jr))return new Jr(t);kc.call(this,t)}Jr.prototype._transform=function(t,e,r){r(null,t)}});var jc=_((IE,Nc)=>{"use strict";var Bo;function aw(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var Lc=yt().codes,lw=Lc.ERR_MISSING_ARGS,uw=Lc.ERR_STREAM_DESTROYED;function Cc(t){if(t)throw t}function fw(t){return t.setHeader&&typeof t.abort=="function"}function cw(t,e,r,i){i=aw(i);var n=!1;t.on("close",function(){n=!0}),Bo===void 0&&(Bo=Rn()),Bo(t,{readable:e,writable:r},function(o){if(o)return i(o);n=!0,i()});var s=!1;return function(o){if(!n&&!s){if(s=!0,fw(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();i(o||new uw("pipe"))}}}function qc(t){t()}function hw(t,e){return t.pipe(e)}function dw(t){return!t.length||typeof t[t.length-1]!="function"?Cc:t.pop()}function pw(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=dw(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new lw("streams");var n,s=e.map(function(o,a){var l=a<e.length-1,u=a>0;return cw(o,l,u,function(c){n||(n=c),c&&s.forEach(qc),!l&&(s.forEach(qc),i(n))})});return e.reduce(hw)}Nc.exports=pw});var Gt=_((qe,Qr)=>{var Zr=L("stream");process.env.READABLE_STREAM==="disable"&&Zr?(Qr.exports=Zr.Readable,Object.assign(Qr.exports,Zr),Qr.exports.Stream=Zr):(qe=Qr.exports=ko(),qe.Stream=Zr||qe,qe.Readable=qe,qe.Writable=Mo(),qe.Duplex=Bt(),qe.Transform=Wo(),qe.PassThrough=Dc(),qe.finished=Rn(),qe.pipeline=jc())});var Ko=_(($E,Ic)=>{var gr=[],Xr=[],Uo=function(){};function Ho(t){return~gr.indexOf(t)?!1:(gr.push(t),!0)}function Go(t){Uo=t}function gw(t){for(var e=[],r=0;r<gr.length;r++){if(gr[r].async){e.push(gr[r]);continue}if(gr[r](t))return!0}return e.length?new Promise(function(n){Promise.all(e.map(function(o){return o(t)})).then(function(o){n(o.some(Boolean))})}):!1}function Vo(t){return~Xr.indexOf(t)?!1:(Xr.push(t),!0)}function zo(){Uo.apply(Uo,arguments)}function Fc(t){for(var e=0;e<Xr.length;e++)t=Xr[e].apply(Xr[e],arguments);return t}function Yo(t,e){var r=Object.prototype.hasOwnProperty;for(var i in e)r.call(e,i)&&(t[i]=e[i]);return t}function mw(t){return t.enabled=!1,t.modify=Vo,t.set=Go,t.use=Ho,Yo(function(){return!1},t)}function yw(t){function e(){var r=Array.prototype.slice.call(arguments,0);return zo.call(zo,t,Fc(r,t)),!0}return t.enabled=!0,t.modify=Vo,t.set=Go,t.use=Ho,Yo(e,t)}Ic.exports=function(e){return e.introduce=Yo,e.enabled=gw,e.process=Fc,e.modify=Vo,e.write=zo,e.nope=mw,e.yep=yw,e.set=Go,e.use=Ho,e}});var Wc=_((WE,$c)=>{var bw=Ko(),ww=bw(function t(e,r){return r=r||{},r.namespace=e,r.prod=!0,r.dev=!1,r.force||t.force?t.yep(r):t.nope(r)});$c.exports=ww});var Vc=_((BE,Gc)=>{"use strict";var Ke={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Uc=Object.create(null);for(let t in Ke)Object.hasOwn(Ke,t)&&(Uc[Ke[t]]=t);var ae={to:{},get:{}};ae.get=function(t){let e=t.slice(0,3).toLowerCase(),r,i;switch(e){case"hsl":{r=ae.get.hsl(t),i="hsl";break}case"hwb":{r=ae.get.hwb(t),i="hwb";break}default:{r=ae.get.rgb(t),i="rgb";break}}return r?{model:i,value:r}:null};ae.get.rgb=function(t){if(!t)return null;let e=/^#([a-f\d]{3,4})$/i,r=/^#([a-f\d]{6})([a-f\d]{2})?$/i,i=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,n=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,s=/^(\w+)$/,o=[0,0,0,1],a,l,u;if(a=t.match(r)){for(u=a[2],a=a[1],l=0;l<3;l++){let c=l*2;o[l]=Number.parseInt(a.slice(c,c+2),16)}u&&(o[3]=Number.parseInt(u,16)/255)}else if(a=t.match(e)){for(a=a[1],u=a[3],l=0;l<3;l++)o[l]=Number.parseInt(a[l]+a[l],16);u&&(o[3]=Number.parseInt(u+u,16)/255)}else if(a=t.match(i)){for(l=0;l<3;l++)o[l]=Number.parseInt(a[l+1],10);a[4]&&(o[3]=a[5]?Number.parseFloat(a[4])*.01:Number.parseFloat(a[4]))}else if(a=t.match(n)){for(l=0;l<3;l++)o[l]=Math.round(Number.parseFloat(a[l+1])*2.55);a[4]&&(o[3]=a[5]?Number.parseFloat(a[4])*.01:Number.parseFloat(a[4]))}else return(a=t.match(s))?a[1]==="transparent"?[0,0,0,0]:Object.hasOwn(Ke,a[1])?(o=Ke[a[1]],o[3]=1,o):null:null;for(l=0;l<3;l++)o[l]=St(o[l],0,255);return o[3]=St(o[3],0,1),o};ae.get.hsl=function(t){if(!t)return null;let e=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=t.match(e);if(r){let i=Number.parseFloat(r[4]),n=(Number.parseFloat(r[1])%360+360)%360,s=St(Number.parseFloat(r[2]),0,100),o=St(Number.parseFloat(r[3]),0,100),a=St(Number.isNaN(i)?1:i,0,1);return[n,s,o,a]}return null};ae.get.hwb=function(t){if(!t)return null;let e=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=t.match(e);if(r){let i=Number.parseFloat(r[4]),n=(Number.parseFloat(r[1])%360+360)%360,s=St(Number.parseFloat(r[2]),0,100),o=St(Number.parseFloat(r[3]),0,100),a=St(Number.isNaN(i)?1:i,0,1);return[n,s,o,a]}return null};ae.to.hex=function(...t){return"#"+Dn(t[0])+Dn(t[1])+Dn(t[2])+(t[3]<1?Dn(Math.round(t[3]*255)):"")};ae.to.rgb=function(...t){return t.length<4||t[3]===1?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"};ae.to.rgb.percent=function(...t){let e=Math.round(t[0]/255*100),r=Math.round(t[1]/255*100),i=Math.round(t[2]/255*100);return t.length<4||t[3]===1?"rgb("+e+"%, "+r+"%, "+i+"%)":"rgba("+e+"%, "+r+"%, "+i+"%, "+t[3]+")"};ae.to.hsl=function(...t){return t.length<4||t[3]===1?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};ae.to.hwb=function(...t){let e="";return t.length>=4&&t[3]!==1&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"};ae.to.keyword=function(...t){return Uc[t.slice(0,3)]};function St(t,e,r){return Math.min(Math.max(e,t),r)}function Dn(t){let e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}var zc={};for(let t of Object.keys(Ke))zc[Ke[t]]=t;var M={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},nt=(6/29)**3;function mr(t){let e=t>.0031308?1.055*t**.4166666666666667-.055:t*12.92;return Math.min(Math.max(0,e),1)}function yr(t){return t>.04045?((t+.055)/1.055)**2.4:t/12.92}for(let t of Object.keys(M)){if(!("channels"in M[t]))throw new Error("missing channels property: "+t);if(!("labels"in M[t]))throw new Error("missing channel labels property: "+t);if(M[t].labels.length!==M[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:r}=M[t];delete M[t].channels,delete M[t].labels,Object.defineProperty(M[t],"channels",{value:e}),Object.defineProperty(M[t],"labels",{value:r})}M.rgb.hsl=function(t){let e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.min(e,r,i),s=Math.max(e,r,i),o=s-n,a,l;switch(s){case n:{a=0;break}case e:{a=(r-i)/o;break}case r:{a=2+(i-e)/o;break}case i:{a=4+(e-r)/o;break}}a=Math.min(a*60,360),a<0&&(a+=360);let u=(n+s)/2;return s===n?l=0:u<=.5?l=o/(s+n):l=o/(2-s-n),[a,l*100,u*100]};M.rgb.hsv=function(t){let e,r,i,n,s,o=t[0]/255,a=t[1]/255,l=t[2]/255,u=Math.max(o,a,l),c=u-Math.min(o,a,l),f=function(p){return(u-p)/6/c+1/2};if(c===0)n=0,s=0;else{switch(s=c/u,e=f(o),r=f(a),i=f(l),u){case o:{n=i-r;break}case a:{n=1/3+e-i;break}case l:{n=2/3+r-e;break}}n<0?n+=1:n>1&&(n-=1)}return[n*360,s*100,u*100]};M.rgb.hwb=function(t){let e=t[0],r=t[1],i=t[2],n=M.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(r,i));return i=1-1/255*Math.max(e,Math.max(r,i)),[n,s*100,i*100]};M.rgb.oklab=function(t){let e=yr(t[0]/255),r=yr(t[1]/255),i=yr(t[2]/255),n=Math.cbrt(.4122214708*e+.5363325363*r+.0514459929*i),s=Math.cbrt(.2119034982*e+.6806995451*r+.1073969566*i),o=Math.cbrt(.0883024619*e+.2817188376*r+.6299787005*i),a=.2104542553*n+.793617785*s-.0040720468*o,l=1.9779984951*n-2.428592205*s+.4505937099*o,u=.0259040371*n+.7827717662*s-.808675766*o;return[a*100,l*100,u*100]};M.rgb.cmyk=function(t){let e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.min(1-e,1-r,1-i),s=(1-e-n)/(1-n)||0,o=(1-r-n)/(1-n)||0,a=(1-i-n)/(1-n)||0;return[s*100,o*100,a*100,n*100]};function _w(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}M.rgb.keyword=function(t){let e=zc[t];if(e)return e;let r=Number.POSITIVE_INFINITY,i;for(let n of Object.keys(Ke)){let s=Ke[n],o=_w(t,s);o<r&&(r=o,i=n)}return i};M.keyword.rgb=function(t){return Ke[t]};M.rgb.xyz=function(t){let e=yr(t[0]/255),r=yr(t[1]/255),i=yr(t[2]/255),n=e*.4124564+r*.3575761+i*.1804375,s=e*.2126729+r*.7151522+i*.072175,o=e*.0193339+r*.119192+i*.9503041;return[n*100,s*100,o*100]};M.rgb.lab=function(t){let e=M.rgb.xyz(t),r=e[0],i=e[1],n=e[2];r/=95.047,i/=100,n/=108.883,r=r>nt?r**(1/3):7.787*r+16/116,i=i>nt?i**(1/3):7.787*i+16/116,n=n>nt?n**(1/3):7.787*n+16/116;let s=116*i-16,o=500*(r-i),a=200*(i-n);return[s,o,a]};M.hsl.rgb=function(t){let e=t[0]/360,r=t[1]/100,i=t[2]/100,n,s;if(r===0)return s=i*255,[s,s,s];let o=i<.5?i*(1+r):i+r-i*r,a=2*i-o,l=[0,0,0];for(let u=0;u<3;u++)n=e+1/3*-(u-1),n<0&&n++,n>1&&n--,6*n<1?s=a+(o-a)*6*n:2*n<1?s=o:3*n<2?s=a+(o-a)*(2/3-n)*6:s=a,l[u]=s*255;return l};M.hsl.hsv=function(t){let e=t[0],r=t[1]/100,i=t[2]/100,n=r,s=Math.max(i,.01);i*=2,r*=i<=1?i:2-i,n*=s<=1?s:2-s;let o=(i+r)/2,a=i===0?2*n/(s+n):2*r/(i+r);return[e,a*100,o*100]};M.hsv.rgb=function(t){let e=t[0]/60,r=t[1]/100,i=t[2]/100,n=Math.floor(e)%6,s=e-Math.floor(e),o=255*i*(1-r),a=255*i*(1-r*s),l=255*i*(1-r*(1-s));switch(i*=255,n){case 0:return[i,l,o];case 1:return[a,i,o];case 2:return[o,i,l];case 3:return[o,a,i];case 4:return[l,o,i];case 5:return[i,o,a]}};M.hsv.hsl=function(t){let e=t[0],r=t[1]/100,i=t[2]/100,n=Math.max(i,.01),s,o;o=(2-r)*i;let a=(2-r)*n;return s=r*n,s/=a<=1?a:2-a,s=s||0,o/=2,[e,s*100,o*100]};M.hwb.rgb=function(t){let e=t[0]/360,r=t[1]/100,i=t[2]/100,n=r+i,s;n>1&&(r/=n,i/=n);let o=Math.floor(6*e),a=1-i;s=6*e-o,(o&1)!==0&&(s=1-s);let l=r+s*(a-r),u,c,f;switch(o){default:case 6:case 0:{u=a,c=l,f=r;break}case 1:{u=l,c=a,f=r;break}case 2:{u=r,c=a,f=l;break}case 3:{u=r,c=l,f=a;break}case 4:{u=l,c=r,f=a;break}case 5:{u=a,c=r,f=l;break}}return[u*255,c*255,f*255]};M.cmyk.rgb=function(t){let e=t[0]/100,r=t[1]/100,i=t[2]/100,n=t[3]/100,s=1-Math.min(1,e*(1-n)+n),o=1-Math.min(1,r*(1-n)+n),a=1-Math.min(1,i*(1-n)+n);return[s*255,o*255,a*255]};M.xyz.rgb=function(t){let e=t[0]/100,r=t[1]/100,i=t[2]/100,n,s,o;return n=e*3.2404542+r*-1.5371385+i*-.4985314,s=e*-.969266+r*1.8760108+i*.041556,o=e*.0556434+r*-.2040259+i*1.0572252,n=mr(n),s=mr(s),o=mr(o),[n*255,s*255,o*255]};M.xyz.lab=function(t){let e=t[0],r=t[1],i=t[2];e/=95.047,r/=100,i/=108.883,e=e>nt?e**(1/3):7.787*e+16/116,r=r>nt?r**(1/3):7.787*r+16/116,i=i>nt?i**(1/3):7.787*i+16/116;let n=116*r-16,s=500*(e-r),o=200*(r-i);return[n,s,o]};M.xyz.oklab=function(t){let e=t[0]/100,r=t[1]/100,i=t[2]/100,n=Math.cbrt(.8189330101*e+.3618667424*r-.1288597137*i),s=Math.cbrt(.0329845436*e+.9293118715*r+.0361456387*i),o=Math.cbrt(.0482003018*e+.2643662691*r+.633851707*i),a=.2104542553*n+.793617785*s-.0040720468*o,l=1.9779984951*n-2.428592205*s+.4505937099*o,u=.0259040371*n+.7827717662*s-.808675766*o;return[a*100,l*100,u*100]};M.oklab.oklch=function(t){return M.lab.lch(t)};M.oklab.xyz=function(t){let e=t[0]/100,r=t[1]/100,i=t[2]/100,n=(.999999998*e+.396337792*r+.215803758*i)**3,s=(1.000000008*e-.105561342*r-.063854175*i)**3,o=(1.000000055*e-.089484182*r-1.291485538*i)**3,a=1.227013851*n-.55779998*s+.281256149*o,l=-.040580178*n+1.11225687*s-.071676679*o,u=-.076381285*n-.421481978*s+1.58616322*o;return[a*100,l*100,u*100]};M.oklab.rgb=function(t){let e=t[0]/100,r=t[1]/100,i=t[2]/100,n=(e+.3963377774*r+.2158037573*i)**3,s=(e-.1055613458*r-.0638541728*i)**3,o=(e-.0894841775*r-1.291485548*i)**3,a=mr(4.0767416621*n-3.3077115913*s+.2309699292*o),l=mr(-1.2684380046*n+2.6097574011*s-.3413193965*o),u=mr(-.0041960863*n-.7034186147*s+1.707614701*o);return[a*255,l*255,u*255]};M.oklch.oklab=function(t){return M.lch.lab(t)};M.lab.xyz=function(t){let e=t[0],r=t[1],i=t[2],n,s,o;s=(e+16)/116,n=r/500+s,o=s-i/200;let a=s**3,l=n**3,u=o**3;return s=a>nt?a:(s-16/116)/7.787,n=l>nt?l:(n-16/116)/7.787,o=u>nt?u:(o-16/116)/7.787,n*=95.047,s*=100,o*=108.883,[n,s,o]};M.lab.lch=function(t){let e=t[0],r=t[1],i=t[2],n;n=Math.atan2(i,r)*360/2/Math.PI,n<0&&(n+=360);let o=Math.sqrt(r*r+i*i);return[e,o,n]};M.lch.lab=function(t){let e=t[0],r=t[1],n=t[2]/360*2*Math.PI,s=r*Math.cos(n),o=r*Math.sin(n);return[e,s,o]};M.rgb.ansi16=function(t,e=null){let[r,i,n]=t,s=e===null?M.rgb.hsv(t)[2]:e;if(s=Math.round(s/50),s===0)return 30;let o=30+(Math.round(n/255)<<2|Math.round(i/255)<<1|Math.round(r/255));return s===2&&(o+=60),o};M.hsv.ansi16=function(t){return M.rgb.ansi16(M.hsv.rgb(t),t[2])};M.rgb.ansi256=function(t){let e=t[0],r=t[1],i=t[2];return e>>4===r>>4&&r>>4===i>>4?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5)};M.ansi16.rgb=function(t){t=t[0];let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let r=(Math.trunc(t>50)+1)*.5,i=(e&1)*r*255,n=(e>>1&1)*r*255,s=(e>>2&1)*r*255;return[i,n,s]};M.ansi256.rgb=function(t){if(t=t[0],t>=232){let s=(t-232)*10+8;return[s,s,s]}t-=16;let e,r=Math.floor(t/36)/5*255,i=Math.floor((e=t%36)/6)/5*255,n=e%6/5*255;return[r,i,n]};M.rgb.hex=function(t){let r=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".slice(r.length)+r};M.hex.rgb=function(t){let e=t.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!e)return[0,0,0];let r=e[0];e[0].length===3&&(r=[...r].map(a=>a+a).join(""));let i=Number.parseInt(r,16),n=i>>16&255,s=i>>8&255,o=i&255;return[n,s,o]};M.rgb.hcg=function(t){let e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.max(Math.max(e,r),i),s=Math.min(Math.min(e,r),i),o=n-s,a,l=o<1?s/(1-o):0;return o<=0?a=0:n===e?a=(r-i)/o%6:n===r?a=2+(i-e)/o:a=4+(e-r)/o,a/=6,a%=1,[a*360,o*100,l*100]};M.hsl.hcg=function(t){let e=t[1]/100,r=t[2]/100,i=r<.5?2*e*r:2*e*(1-r),n=0;return i<1&&(n=(r-.5*i)/(1-i)),[t[0],i*100,n*100]};M.hsv.hcg=function(t){let e=t[1]/100,r=t[2]/100,i=e*r,n=0;return i<1&&(n=(r-i)/(1-i)),[t[0],i*100,n*100]};M.hcg.rgb=function(t){let e=t[0]/360,r=t[1]/100,i=t[2]/100;if(r===0)return[i*255,i*255,i*255];let n=[0,0,0],s=e%1*6,o=s%1,a=1-o,l=0;switch(Math.floor(s)){case 0:{n[0]=1,n[1]=o,n[2]=0;break}case 1:{n[0]=a,n[1]=1,n[2]=0;break}case 2:{n[0]=0,n[1]=1,n[2]=o;break}case 3:{n[0]=0,n[1]=a,n[2]=1;break}case 4:{n[0]=o,n[1]=0,n[2]=1;break}default:n[0]=1,n[1]=0,n[2]=a}return l=(1-r)*i,[(r*n[0]+l)*255,(r*n[1]+l)*255,(r*n[2]+l)*255]};M.hcg.hsv=function(t){let e=t[1]/100,r=t[2]/100,i=e+r*(1-e),n=0;return i>0&&(n=e/i),[t[0],n*100,i*100]};M.hcg.hsl=function(t){let e=t[1]/100,i=t[2]/100*(1-e)+.5*e,n=0;return i>0&&i<.5?n=e/(2*i):i>=.5&&i<1&&(n=e/(2*(1-i))),[t[0],n*100,i*100]};M.hcg.hwb=function(t){let e=t[1]/100,r=t[2]/100,i=e+r*(1-e);return[t[0],(i-e)*100,(1-i)*100]};M.hwb.hcg=function(t){let e=t[1]/100,i=1-t[2]/100,n=i-e,s=0;return n<1&&(s=(i-n)/(1-n)),[t[0],n*100,s*100]};M.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};M.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};M.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};M.gray.hsl=function(t){return[0,0,t[0]]};M.gray.hsv=M.gray.hsl;M.gray.hwb=function(t){return[0,100,t[0]]};M.gray.cmyk=function(t){return[0,0,0,t[0]]};M.gray.lab=function(t){return[t[0],0,0]};M.gray.hex=function(t){let e=Math.round(t[0]/100*255)&255,i=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".slice(i.length)+i};M.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]};function vw(){let t={},e=Object.keys(M);for(let{length:r}=e,i=0;i<r;i++)t[e[i]]={distance:-1,parent:null};return t}function Sw(t){let e=vw(),r=[t];for(e[t].distance=0;r.length>0;){let i=r.pop(),n=Object.keys(M[i]);for(let{length:s}=n,o=0;o<s;o++){let a=n[o],l=e[a];l.distance===-1&&(l.distance=e[i].distance+1,l.parent=i,r.unshift(a))}}return e}function Ew(t,e){return function(r){return e(t(r))}}function Rw(t,e){let r=[e[t].parent,t],i=M[e[t].parent][t],n=e[t].parent;for(;e[n].parent;)r.unshift(e[n].parent),i=Ew(M[e[n].parent][n],i),n=e[n].parent;return i.conversion=r,i}function xw(t){let e=Sw(t),r={},i=Object.keys(e);for(let{length:n}=i,s=0;s<n;s++){let o=i[s];e[o].parent!==null&&(r[o]=Rw(o,e))}return r}var le={},Tw=Object.keys(M);function Mw(t){let e=function(...r){let i=r[0];return i==null?i:(i.length>1&&(r=i),t(r))};return"conversion"in t&&(e.conversion=t.conversion),e}function Ow(t){let e=function(...r){let i=r[0];if(i==null)return i;i.length>1&&(r=i);let n=t(r);if(typeof n=="object")for(let{length:s}=n,o=0;o<s;o++)n[o]=Math.round(n[o]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}for(let t of Tw){le[t]={},Object.defineProperty(le[t],"channels",{value:M[t].channels}),Object.defineProperty(le[t],"labels",{value:M[t].labels});let e=xw(t),r=Object.keys(e);for(let i of r){let n=e[i];le[t][i]=Ow(n),le[t][i].raw=Mw(n)}}var Hc=["keyword","gray","hex"],Jo={};for(let t of Object.keys(le))Jo[[...le[t].labels].sort().join("")]=t;var Zo={};function oe(t,e){if(!(this instanceof oe))return new oe(t,e);if(e&&e in Hc&&(e=null),e&&!(e in le))throw new Error("Unknown model: "+e);let r,i;if(t==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof oe)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if(typeof t=="string"){let n=ae.get(t);if(n===null)throw new Error("Unable to parse color from string: "+t);this.model=n.model,i=le[this.model].channels,this.color=n.value.slice(0,i),this.valpha=typeof n.value[i]=="number"?n.value[i]:1}else if(t.length>0){this.model=e||"rgb",i=le[this.model].channels;let n=Array.prototype.slice.call(t,0,i);this.color=Qo(n,i),this.valpha=typeof t[i]=="number"?t[i]:1}else if(typeof t=="number")this.model="rgb",this.color=[t>>16&255,t>>8&255,t&255],this.valpha=1;else{this.valpha=1;let n=Object.keys(t);"alpha"in t&&(n.splice(n.indexOf("alpha"),1),this.valpha=typeof t.alpha=="number"?t.alpha:0);let s=n.sort().join("");if(!(s in Jo))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=Jo[s];let{labels:o}=le[this.model],a=[];for(r=0;r<o.length;r++)a.push(t[o[r]]);this.color=Qo(a)}if(Zo[this.model])for(i=le[this.model].channels,r=0;r<i;r++){let n=Zo[this.model][r];n&&(this.color[r]=n(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}oe.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let e=this.model in ae.to?this:this.rgb();e=e.round(typeof t=="number"?t:1);let r=e.valpha===1?e.color:[...e.color,this.valpha];return ae.to[e.model](...r)},percentString(t){let e=this.rgb().round(typeof t=="number"?t:1),r=e.valpha===1?e.color:[...e.color,this.valpha];return ae.to.rgb.percent(...r)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let t={},{channels:e}=le[this.model],{labels:r}=le[this.model];for(let i=0;i<e;i++)t[r[i]]=this.color[i];return this.valpha!==1&&(t.alpha=this.valpha),t},unitArray(){let t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,this.valpha!==1&&t.push(this.valpha),t},unitObject(){let t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,this.valpha!==1&&(t.alpha=this.valpha),t},round(t){return t=Math.max(t||0,0),new oe([...this.color.map(kw(t)),this.valpha],this.model)},alpha(t){return t!==void 0?new oe([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},red:J("rgb",0,se(255)),green:J("rgb",1,se(255)),blue:J("rgb",2,se(255)),hue:J(["hsl","hsv","hsl","hwb","hcg"],0,t=>(t%360+360)%360),saturationl:J("hsl",1,se(100)),lightness:J("hsl",2,se(100)),saturationv:J("hsv",1,se(100)),value:J("hsv",2,se(100)),chroma:J("hcg",1,se(100)),gray:J("hcg",2,se(100)),white:J("hwb",1,se(100)),wblack:J("hwb",2,se(100)),cyan:J("cmyk",0,se(100)),magenta:J("cmyk",1,se(100)),yellow:J("cmyk",2,se(100)),black:J("cmyk",3,se(100)),x:J("xyz",0,se(95.047)),y:J("xyz",1,se(100)),z:J("xyz",2,se(108.833)),l:J("lab",0,se(100)),a:J("lab",1),b:J("lab",2),keyword(t){return t!==void 0?new oe(t):le[this.model].keyword(this.color)},hex(t){return t!==void 0?new oe(t):ae.to.hex(...this.rgb().round().color)},hexa(t){if(t!==void 0)return new oe(t);let e=this.rgb().round().color,r=Math.round(this.valpha*255).toString(16).toUpperCase();return r.length===1&&(r="0"+r),ae.to.hex(...e)+r},rgbNumber(){let t=this.rgb().color;return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255},luminosity(){let t=this.rgb().color,e=[];for(let[r,i]of t.entries()){let n=i/255;e[r]=n<=.04045?n/12.92:((n+.055)/1.055)**2.4}return .2126*e[0]+.7152*e[1]+.0722*e[2]},contrast(t){let e=this.luminosity(),r=t.luminosity();return e>r?(e+.05)/(r+.05):(r+.05)/(e+.05)},level(t){let e=this.contrast(t);return e>=7?"AAA":e>=4.5?"AA":""},isDark(){let t=this.rgb().color;return(t[0]*2126+t[1]*7152+t[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let t=this.rgb();for(let e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten(t){let e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){let e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate(t){let e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate(t){let e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten(t){let e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken(t){let e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale(){let t=this.rgb().color,e=t[0]*.3+t[1]*.59+t[2]*.11;return oe.rgb(e,e,e)},fade(t){return this.alpha(this.valpha-this.valpha*t)},opaquer(t){return this.alpha(this.valpha+this.valpha*t)},rotate(t){let e=this.hsl(),r=e.color[0];return r=(r+t)%360,r=r<0?360+r:r,e.color[0]=r,e},mix(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);let r=t.rgb(),i=this.rgb(),n=e===void 0?.5:e,s=2*n-1,o=r.alpha()-i.alpha(),a=((s*o===-1?s:(s+o)/(1+s*o))+1)/2,l=1-a;return oe.rgb(a*r.red()+l*i.red(),a*r.green()+l*i.green(),a*r.blue()+l*i.blue(),r.alpha()*n+i.alpha()*(1-n))}};for(let t of Object.keys(le)){if(Hc.includes(t))continue;let{channels:e}=le[t];oe.prototype[t]=function(...r){return this.model===t?new oe(this):r.length>0?new oe(r,t):new oe([...Pw(le[this.model][t].raw(this.color)),this.valpha],t)},oe[t]=function(...r){let i=r[0];return typeof i=="number"&&(i=Qo(r,e)),new oe(i,t)}}function Aw(t,e){return Number(t.toFixed(e))}function kw(t){return function(e){return Aw(e,t)}}function J(t,e,r){t=Array.isArray(t)?t:[t];for(let i of t)(Zo[i]||=[])[e]=r;return t=t[0],function(i){let n;return i!==void 0?(r&&(i=r(i)),n=this[t](),n.color[e]=i,n):(n=this[t]().color[e],r&&(n=r(n)),n)}}function se(t){return function(e){return Math.max(0,Math.min(t,e))}}function Pw(t){return Array.isArray(t)?t:[t]}function Qo(t,e){for(let r=0;r<e;r++)typeof t[r]!="number"&&(t[r]=0);return t}function Dw(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Cw=function(e){for(var r=0,i=0;r<e.length;i=e.charCodeAt(r++)+((i<<5)-i));var n=Math.floor(Math.abs(Math.sin(i)*1e4%1*16777216)).toString(16);return"#"+Array(6-n.length+1).join("0")+n},Bc=Dw(Cw);function qw(t,e){let r=t.split(e||":"),i=Bc(r[0]);if(!r.length)return i;for(let n=0,s=r.length-1;n<s;n++)i=oe(i).mix(oe(Bc(r[n+1]))).saturate(1).hex();return i}Gc.exports=qw});var Kc=_((UE,Yc)=>{"use strict";function $e(t,e){if(e)return new $e(t).style(e);if(!(this instanceof $e))return new $e(t);this.text=t}$e.prototype.prefix="\x1B[";$e.prototype.suffix="m";$e.prototype.hex=function(e){e=e[0]==="#"?e.substring(1):e,e.length===3&&(e=e.split(""),e[5]=e[2],e[4]=e[2],e[3]=e[1],e[2]=e[1],e[1]=e[0],e=e.join(""));var r=e.substring(0,2),i=e.substring(2,4),n=e.substring(4,6);return[parseInt(r,16),parseInt(i,16),parseInt(n,16)]};$e.prototype.rgb=function(e,r,i){var n=e/255*5,s=r/255*5,o=i/255*5;return this.ansi(n,s,o)};$e.prototype.ansi=function(e,r,i){var n=Math.round(e),s=Math.round(r),o=Math.round(i);return 16+n*36+s*6+o};$e.prototype.reset=function(){return this.prefix+"39;49"+this.suffix};$e.prototype.style=function(e){return this.prefix+"38;5;"+this.rgb.apply(this,this.hex(e))+this.suffix+this.text+this.reset()};Yc.exports=$e});var Zc=_((zE,Jc)=>{var Lw=Vc(),Nw=Kc();Jc.exports=function(e,r){var i=r.namespace,n=r.colors!==!1?Nw(i+":",Lw(i)):i+":";return e[0]=n+" "+e[0],e}});var Xc=_((HE,Qc)=>{"use strict";Qc.exports=function(e,r){if(!r)return!1;for(var i=r.split(/[\s,]+/),n=0;n<i.length;n++){if(r=i[n].replace("*",".*?"),r.charAt(0)==="-"){if(new RegExp("^"+r.substr(1)+"$").test(e))return!1;continue}if(new RegExp("^"+r+"$").test(e))return!0}return!1}});var th=_((GE,eh)=>{var jw=Xc();eh.exports=function(e){return function(i){try{return jw(i,e())}catch{}return!1}}});var ih=_((VE,rh)=>{var Fw=th();rh.exports=Fw(function(){return process.env.DEBUG||process.env.DIAGNOSTICS})});var sh=_((YE,nh)=>{nh.exports=function(t,e){try{Function.prototype.apply.call(console.log,console,e)}catch{}}});var ah=_((KE,oh)=>{var Iw=Ko(),$w=L("tty").isatty(1),Cn=Iw(function t(e,r){return r=r||{},r.colors="colors"in r?r.colors:$w,r.namespace=e,r.prod=!1,r.dev=!0,!t.enabled(e)&&!(r.force||t.force)?t.nope(r):t.yep(r)});Cn.modify(Zc());Cn.use(ih());Cn.set(sh());oh.exports=Cn});var ei=_((JE,Xo)=>{process.env.NODE_ENV==="production"?Xo.exports=Wc():Xo.exports=ah()});var uh=_((ZE,lh)=>{"use strict";var ea=L("fs"),{StringDecoder:Ww}=L("string_decoder"),{Stream:Bw}=Gt();function Uw(){}lh.exports=(t,e)=>{let r=Buffer.alloc(65536),i=new Ww("utf8"),n=new Bw,s="",o=0,a=0;return t.start===-1&&delete t.start,n.readable=!0,n.destroy=()=>{n.destroyed=!0,n.emit("end"),n.emit("close")},ea.open(t.file,"a+","0644",(l,u)=>{if(l){e?e(l):n.emit("error",l),n.destroy();return}(function c(){if(n.destroyed){ea.close(u,Uw);return}return ea.read(u,r,0,r.length,o,(f,p)=>{if(f){e?e(f):n.emit("error",f),n.destroy();return}if(!p)return s&&((t.start==null||a>t.start)&&(e?e(null,s):n.emit("line",s)),a++,s=""),setTimeout(c,1e3);let m=i.write(r.slice(0,p));e||n.emit("data",m),m=(s+m).split(/\n+/);let d=m.length-1,b=0;for(;b<d;b++)(t.start==null||a>t.start)&&(e?e(null,m[b]):n.emit("line",m[b])),a++;return s=m[d],o+=p,c()})})()}),e?n.destroy:n}});var dh=_((XE,hh)=>{"use strict";var Te=L("fs"),ue=L("path"),fh=Wf(),zw=L("zlib"),{MESSAGE:Hw}=te(),{Stream:Gw,PassThrough:ch}=Gt(),Vw=lr(),We=ei()("winston:file"),Yw=L("os"),Kw=uh();hh.exports=class extends Vw{constructor(e={}){super(e),this.name=e.name||"file";function r(i,...n){n.slice(1).forEach(s=>{if(e[s])throw new Error(`Cannot set ${s} and ${i} together`)})}if(this._stream=new ch,this._stream.setMaxListeners(30),this._onError=this._onError.bind(this),e.filename||e.dirname)r("filename or dirname","stream"),this._basename=this.filename=e.filename?ue.basename(e.filename):"winston.log",this.dirname=e.dirname||ue.dirname(e.filename),this.options=e.options||{flags:"a"};else if(e.stream)console.warn("options.stream will be removed in winston@4. Use winston.transports.Stream"),r("stream","filename","maxsize"),this._dest=this._stream.pipe(this._setupStream(e.stream)),this.dirname=ue.dirname(this._dest.path);else throw new Error("Cannot log to file without filename or stream.");this.maxsize=e.maxsize||null,this.rotationFormat=e.rotationFormat||!1,this.zippedArchive=e.zippedArchive||!1,this.maxFiles=e.maxFiles||null,this.eol=typeof e.eol=="string"?e.eol:Yw.EOL,this.tailable=e.tailable||!1,this.lazy=e.lazy||!1,this._size=0,this._pendingSize=0,this._created=0,this._drain=!1,this._opening=!1,this._ending=!1,this._fileExist=!1,this.dirname&&this._createLogDirIfNotExist(this.dirname),this.lazy||this.open()}finishIfEnding(){this._ending&&(this._opening?this.once("open",()=>{this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())}):(this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())))}log(e,r=()=>{}){if(this.silent)return r(),!0;if(this._drain){this._stream.once("drain",()=>{this._drain=!1,this.log(e,r)});return}if(this._rotate){this._stream.once("rotate",()=>{this._rotate=!1,this.log(e,r)});return}if(this.lazy){if(!this._fileExist){this._opening||this.open(),this.once("open",()=>{this._fileExist=!0,this.log(e,r)});return}if(this._needsNewFile(this._pendingSize)){this._dest.once("close",()=>{this._opening||this.open(),this.once("open",()=>{this.log(e,r)})});return}}let i=`${e[Hw]}${this.eol}`,n=Buffer.byteLength(i);function s(){if(this._size+=n,this._pendingSize-=n,We("logged %s %s",this._size,i),this.emit("logged",e),!this._rotate&&!this._opening&&this._needsNewFile()){if(this.lazy){this._endStream(()=>{this.emit("fileclosed")});return}this._rotate=!0,this._endStream(()=>this._rotateFile())}}this._pendingSize+=n,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize)&&(this.rotatedWhileOpening=!0);let o=this._stream.write(i,s.bind(this));return o?r():(this._drain=!0,this._stream.once("drain",()=>{this._drain=!1,r()})),We("written",o,this._drain),this.finishIfEnding(),o}query(e,r){typeof e=="function"&&(r=e,e={}),e=f(e);let i=ue.join(this.dirname,this.filename),n="",s=[],o=0,a=Te.createReadStream(i,{encoding:"utf8"});a.on("error",p=>{if(a.readable&&a.destroy(),!!r)return p.code!=="ENOENT"?r(p):r(null,s)}),a.on("data",p=>{p=(n+p).split(/\n+/);let m=p.length-1,d=0;for(;d<m;d++)(!e.start||o>=e.start)&&l(p[d]),o++;n=p[m]}),a.on("close",()=>{n&&l(n,!0),e.order==="desc"&&(s=s.reverse()),r&&r(null,s)});function l(p,m){try{let d=JSON.parse(p);c(d)&&u(d)}catch(d){m||a.emit("error",d)}}function u(p){if(e.rows&&s.length>=e.rows&&e.order!=="desc"){a.readable&&a.destroy();return}e.fields&&(p=e.fields.reduce((m,d)=>(m[d]=p[d],m),{})),e.order==="desc"&&s.length>=e.rows&&s.shift(),s.push(p)}function c(p){if(!p||typeof p!="object")return;let m=new Date(p.timestamp);if(!(e.from&&m<e.from||e.until&&m>e.until||e.level&&e.level!==p.level))return!0}function f(p){return p=p||{},p.rows=p.rows||p.limit||10,p.start=p.start||0,p.until=p.until||new Date,typeof p.until!="object"&&(p.until=new Date(p.until)),p.from=p.from||p.until-1440*60*1e3,typeof p.from!="object"&&(p.from=new Date(p.from)),p.order=p.order||"desc",p}}stream(e={}){let r=ue.join(this.dirname,this.filename),i=new Gw,n={file:r,start:e.start};return i.destroy=Kw(n,(s,o)=>{if(s)return i.emit("error",s);try{i.emit("data",o),o=JSON.parse(o),i.emit("log",o)}catch(a){i.emit("error",a)}}),i}open(){this.filename&&(this._opening||(this._opening=!0,this.stat((e,r)=>{if(e)return this.emit("error",e);We("stat done: %s { size: %s }",this.filename,r),this._size=r,this._dest=this._createStream(this._stream),this._opening=!1,this.once("open",()=>{this._stream.emit("rotate")||(this._rotate=!1)})})))}stat(e){let r=this._getFile(),i=ue.join(this.dirname,r);Te.stat(i,(n,s)=>{if(n&&n.code==="ENOENT")return We("ENOENT\xA0ok",i),this.filename=r,e(null,0);if(n)return We(`err ${n.code} ${i}`),e(n);if(!s||this._needsNewFile(s.size))return this._incFile(()=>this.stat(e));this.filename=r,e(null,s.size)})}close(e){this._stream&&this._stream.end(()=>{e&&e(),this.emit("flush"),this.emit("closed")})}_needsNewFile(e){return e=e||this._size,this.maxsize&&e>=this.maxsize}_onError(e){this.emit("error",e)}_setupStream(e){return e.on("error",this._onError),e}_cleanupStream(e){return e.removeListener("error",this._onError),e.destroy(),e}_rotateFile(){this._incFile(()=>this.open())}_endStream(e=()=>{}){this._dest?(this._stream.unpipe(this._dest),this._dest.end(()=>{this._cleanupStream(this._dest),e()})):e()}_createStream(e){let r=ue.join(this.dirname,this.filename);We("create stream start",r,this.options);let i=Te.createWriteStream(r,this.options).on("error",n=>We(n)).on("close",()=>We("close",i.path,i.bytesWritten)).on("open",()=>{We("file open ok",r),this.emit("open",r),e.pipe(i),this.rotatedWhileOpening&&(this._stream=new ch,this._stream.setMaxListeners(30),this._rotateFile(),this.rotatedWhileOpening=!1,this._cleanupStream(i),e.end())});return We("create stream ok",r),i}_incFile(e){We("_incFile",this.filename);let r=ue.extname(this._basename),i=ue.basename(this._basename,r),n=[];this.zippedArchive&&n.push(function(s){let o=this._created>0&&!this.tailable?this._created:"";this._compressFile(ue.join(this.dirname,`${i}${o}${r}`),ue.join(this.dirname,`${i}${o}${r}.gz`),s)}.bind(this)),n.push(function(s){this.tailable?this._checkMaxFilesTailable(r,i,s):(this._created+=1,this._checkMaxFilesIncrementing(r,i,s))}.bind(this)),fh(n,e)}_getFile(){let e=ue.extname(this._basename),r=ue.basename(this._basename,e),i=this.rotationFormat?this.rotationFormat():this._created;return!this.tailable&&this._created?`${r}${i}${e}`:`${r}${e}`}_checkMaxFilesIncrementing(e,r,i){if(!this.maxFiles||this._created<this.maxFiles)return setImmediate(i);let n=this._created-this.maxFiles,s=n!==0?n:"",o=this.zippedArchive?".gz":"",a=`${r}${s}${e}${o}`,l=ue.join(this.dirname,a);Te.unlink(l,i)}_checkMaxFilesTailable(e,r,i){let n=[];if(!this.maxFiles)return;let s=this.zippedArchive?".gz":"";for(let o=this.maxFiles-1;o>1;o--)n.push(function(a,l){let u=`${r}${a-1}${e}${s}`,c=ue.join(this.dirname,u);Te.exists(c,f=>{if(!f)return l(null);u=`${r}${a}${e}${s}`,Te.rename(c,ue.join(this.dirname,u),l)})}.bind(this,o));fh(n,()=>{Te.rename(ue.join(this.dirname,`${r}${e}${s}`),ue.join(this.dirname,`${r}1${e}${s}`),i)})}_compressFile(e,r,i){Te.access(e,Te.F_OK,n=>{if(n)return i();var s=zw.createGzip(),o=Te.createReadStream(e),a=Te.createWriteStream(r);a.on("finish",()=>{Te.unlink(e,i)}),o.pipe(s).pipe(a)})}_createLogDirIfNotExist(e){Te.existsSync(e)||Te.mkdirSync(e,{recursive:!0})}}});var gh=_((t2,ph)=>{"use strict";var Jw=L("http"),Zw=L("https"),{Stream:Qw}=Gt(),Xw=lr(),{configure:e_}=Pr();ph.exports=class extends Xw{constructor(e={}){super(e),this.options=e,this.name=e.name||"http",this.ssl=!!e.ssl,this.host=e.host||"localhost",this.port=e.port,this.auth=e.auth,this.path=e.path||"",this.maximumDepth=e.maximumDepth,this.agent=e.agent,this.headers=e.headers||{},this.headers["content-type"]="application/json",this.batch=e.batch||!1,this.batchInterval=e.batchInterval||5e3,this.batchCount=e.batchCount||10,this.batchOptions=[],this.batchTimeoutID=-1,this.batchCallback={},this.port||(this.port=this.ssl?443:80)}log(e,r){this._request(e,null,null,(i,n)=>{n&&n.statusCode!==200&&(i=new Error(`Invalid HTTP Status Code: ${n.statusCode}`)),i?this.emit("warn",i):this.emit("logged",e)}),r&&setImmediate(r)}query(e,r){typeof e=="function"&&(r=e,e={}),e={method:"query",params:this.normalizeQuery(e)};let i=e.params.auth||null;delete e.params.auth;let n=e.params.path||null;delete e.params.path,this._request(e,i,n,(s,o,a)=>{if(o&&o.statusCode!==200&&(s=new Error(`Invalid HTTP Status Code: ${o.statusCode}`)),s)return r(s);if(typeof a=="string")try{a=JSON.parse(a)}catch(l){return r(l)}r(null,a)})}stream(e={}){let r=new Qw;e={method:"stream",params:e};let i=e.params.path||null;delete e.params.path;let n=e.params.auth||null;delete e.params.auth;let s="",o=this._request(e,n,i);return r.destroy=()=>o.destroy(),o.on("data",a=>{a=(s+a).split(/\n+/);let l=a.length-1,u=0;for(;u<l;u++)try{r.emit("log",JSON.parse(a[u]))}catch(c){r.emit("error",c)}s=a[l]}),o.on("error",a=>r.emit("error",a)),r}_request(e,r,i,n){e=e||{},r=r||this.auth,i=i||this.path||"",this.batch?this._doBatch(e,n,r,i):this._doRequest(e,n,r,i)}_doBatch(e,r,i,n){if(this.batchOptions.push(e),this.batchOptions.length===1){let s=this;this.batchCallback=r,this.batchTimeoutID=setTimeout(function(){s.batchTimeoutID=-1,s._doBatchRequest(s.batchCallback,i,n)},this.batchInterval)}this.batchOptions.length===this.batchCount&&this._doBatchRequest(this.batchCallback,i,n)}_doBatchRequest(e,r,i){this.batchTimeoutID>0&&(clearTimeout(this.batchTimeoutID),this.batchTimeoutID=-1);let n=this.batchOptions.slice();this.batchOptions=[],this._doRequest(n,e,r,i)}_doRequest(e,r,i,n){let s=Object.assign({},this.headers);i&&i.bearer&&(s.Authorization=`Bearer ${i.bearer}`);let o=(this.ssl?Zw:Jw).request({...this.options,method:"POST",host:this.host,port:this.port,path:`/${n.replace(/^\//,"")}`,headers:s,auth:i&&i.username&&i.password?`${i.username}:${i.password}`:"",agent:this.agent});o.on("error",r),o.on("response",l=>l.on("end",()=>r(null,l)).resume());let a=e_({...this.maximumDepth&&{maximumDepth:this.maximumDepth}});o.end(Buffer.from(a(e,this.options.replacer),"utf8"))}}});var ta=_((r2,mh)=>{"use strict";var Je=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";Je.writable=t=>Je(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";Je.readable=t=>Je(t)&&t.readable!==!1&&typeof t._read=="function"&&typeof t._readableState=="object";Je.duplex=t=>Je.writable(t)&&Je.readable(t);Je.transform=t=>Je.duplex(t)&&typeof t._transform=="function";mh.exports=Je});var bh=_((n2,yh)=>{"use strict";var t_=ta(),{MESSAGE:r_}=te(),i_=L("os"),n_=lr();yh.exports=class extends n_{constructor(e={}){if(super(e),!e.stream||!t_(e.stream))throw new Error("options.stream is required.");this._stream=e.stream,this._stream.setMaxListeners(1/0),this.isObjectMode=e.stream._writableState.objectMode,this.eol=typeof e.eol=="string"?e.eol:i_.EOL}log(e,r){if(setImmediate(()=>this.emit("logged",e)),this.isObjectMode){this._stream.write(e),r&&r();return}this._stream.write(`${e[r_]}${this.eol}`),r&&r()}}});var wh=_(ti=>{"use strict";Object.defineProperty(ti,"Console",{configurable:!0,enumerable:!0,get(){return sf()}});Object.defineProperty(ti,"File",{configurable:!0,enumerable:!0,get(){return dh()}});Object.defineProperty(ti,"Http",{configurable:!0,enumerable:!0,get(){return gh()}});Object.defineProperty(ti,"Stream",{configurable:!0,enumerable:!0,get(){return bh()}})});var Ln=_(ri=>{"use strict";var qn=Ls(),{configs:ra}=te();ri.cli=qn.levels(ra.cli);ri.npm=qn.levels(ra.npm);ri.syslog=qn.levels(ra.syslog);ri.addColors=qn.levels});var vh=_((Nn,_h)=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});var s_=tn(),o_=Vt(s_),a_=hn(),l_=Vt(a_),u_=wo(),f_=Vt(u_),c_=mo(),h_=Vt(c_),d_=yo(),p_=Vt(d_),g_=Wt(),m_=Vt(g_),y_=fr(),b_=Vt(y_);function Vt(t){return t&&t.__esModule?t:{default:t}}function w_(t,e,r){r=(0,h_.default)(r);var i=0,n=0,{length:s}=t,o=!1;s===0&&r(null);function a(l,u){l===!1&&(o=!0),o!==!0&&(l?r(l):(++n===s||u===l_.default)&&r(null))}for(;i<s;i++)e(t[i],i,(0,p_.default)(a))}function __(t,e,r){return(0,f_.default)(t,1/0,e,r)}function v_(t,e,r){var i=(0,o_.default)(t)?w_:__;return i(t,(0,m_.default)(e),r)}Nn.default=(0,b_.default)(v_,3);_h.exports=Nn.default});var Eh=_((jn,Sh)=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.default=S_;function S_(t){return(e,r,i)=>t(e,i)}Sh.exports=jn.default});var $n=_((In,Rh)=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});var E_=vh(),R_=Fn(E_),x_=Eh(),T_=Fn(x_),M_=Wt(),O_=Fn(M_),A_=fr(),k_=Fn(A_);function Fn(t){return t&&t.__esModule?t:{default:t}}function P_(t,e,r){return(0,R_.default)(t,(0,T_.default)((0,O_.default)(e)),r)}In.default=(0,k_.default)(P_,3);Rh.exports=In.default});var Th=_((a2,xh)=>{"use strict";var D_=Object.prototype.toString;xh.exports=function(e){if(typeof e.displayName=="string"&&e.constructor.name)return e.displayName;if(typeof e.name=="string"&&e.name)return e.name;if(typeof e=="object"&&e.constructor&&typeof e.constructor.name=="string")return e.constructor.name;var r=e.toString(),i=D_.call(e).slice(8,-1);return i==="Function"?r=r.substring(r.indexOf("(")+1,r.indexOf(")")):r=i,r||"anonymous"}});var ia=_((l2,Mh)=>{"use strict";var C_=Th();Mh.exports=function(e){var r=0,i;function n(){return r||(r=1,i=e.apply(this,arguments),e=null),i}return n.displayName=C_(e),n}});var na=_(ni=>{ni.get=function(t){var e=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var r={},i=Error.prepareStackTrace;Error.prepareStackTrace=function(s,o){return o},Error.captureStackTrace(r,t||ni.get);var n=r.stack;return Error.prepareStackTrace=i,Error.stackTraceLimit=e,n};ni.parse=function(t){if(!t.stack)return[];var e=this,r=t.stack.split(`
30
+ `))}},forFunctions(t,e,r){r.forEach(i=>{t[i]=Wi.warn[e](i)})},forProperties(t,e,r){r.forEach(i=>{let n=Wi.warn[e](i);Object.defineProperty(t,i,{get:n,set:n})})}}});var tu=_((tE,yg)=>{yg.exports={name:"winston",description:"A logger for just about everything.",version:"3.18.3",author:"Charlie Robbins <charlie.robbins@gmail.com>",maintainers:["David Hyde <dabh@alumni.stanford.edu>"],repository:{type:"git",url:"https://github.com/winstonjs/winston.git"},keywords:["winston","logger","logging","logs","sysadmin","bunyan","pino","loglevel","tools","json","stream"],dependencies:{"@dabh/diagnostics":"^2.0.8","@colors/colors":"^1.6.0",async:"^3.2.3","is-stream":"^2.0.0",logform:"^2.7.0","one-time":"^1.0.0","readable-stream":"^3.4.0","safe-stable-stringify":"^2.3.1","stack-trace":"0.0.x","triple-beam":"^1.3.0","winston-transport":"^4.9.0"},devDependencies:{"@babel/cli":"^7.23.9","@babel/core":"^7.24.0","@babel/preset-env":"^7.24.0","@dabh/eslint-config-populist":"^4.4.0","@types/node":"^20.11.24","abstract-winston-transport":"^0.5.1",assume:"^2.2.0","cross-spawn-async":"^2.2.5",eslint:"^8.57.0",hock:"^1.4.1",mocha:"^10.3.0",nyc:"^17.1.0",rimraf:"5.0.1",split2:"^4.1.0","std-mocks":"^2.0.0",through2:"^4.0.2","winston-compat":"^0.1.5"},main:"./lib/winston.js",browser:"./dist/winston",types:"./index.d.ts",scripts:{lint:"eslint lib/*.js lib/winston/*.js lib/winston/**/*.js --resolve-plugins-relative-to ./node_modules/@dabh/eslint-config-populist",test:"rimraf test/fixtures/logs/* && mocha","test:coverage":"nyc npm run test:unit","test:unit":"mocha test/unit","test:integration":"mocha test/integration",build:"rimraf dist && babel lib -d dist",prepublishOnly:"npm run build"},engines:{node:">= 12.0.0"},license:"MIT"}});var js=_((rE,ru)=>{ru.exports=L("util").deprecate});var Fs=_((iE,iu)=>{iu.exports=L("stream")});var $s=_((nE,su)=>{"use strict";function bg(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(Is,this,t)):process.nextTick(Is,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(Bi,r):(r._writableState.errorEmitted=!0,process.nextTick(nu,r,s)):process.nextTick(nu,r,s):e?(process.nextTick(Bi,r),e(s)):process.nextTick(Bi,r)}),this)}function nu(t,e){Is(t,e),Bi(t)}function Bi(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function wg(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Is(t,e){t.emit("error",e)}function _g(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}su.exports={destroy:bg,undestroy:wg,errorOrDestroy:_g}});var ir=_((sE,lu)=>{"use strict";var au={};function De(t,e,r){r||(r=Error);function i(s,o,a){return typeof e=="string"?e:e(s,o,a)}class n extends r{constructor(o,a,l){super(i(o,a,l))}}n.prototype.name=r.name,n.prototype.code=t,au[t]=n}function ou(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(i=>String(i)),r>2?`one of ${e} ${t.slice(0,r-1).join(", ")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return`of ${e} ${String(t)}`}function vg(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function Sg(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function Eg(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}De("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);De("ERR_INVALID_ARG_TYPE",function(t,e,r){let i;typeof e=="string"&&vg(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if(Sg(t," argument"))n=`The ${t} ${i} ${ou(e,"type")}`;else{let s=Eg(t,".")?"property":"argument";n=`The "${t}" ${s} ${i} ${ou(e,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);De("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");De("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});De("ERR_STREAM_PREMATURE_CLOSE","Premature close");De("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});De("ERR_MULTIPLE_CALLBACK","Callback called multiple times");De("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");De("ERR_STREAM_WRITE_AFTER_END","write after end");De("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);De("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);De("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");lu.exports.codes=au});var Ws=_((oE,uu)=>{"use strict";var Rg=ir().codes.ERR_INVALID_OPT_VALUE;function xg(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Tg(t,e,r,i){var n=xg(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new Rg(s,n)}return Math.floor(n)}return t.objectMode?16:16*1024}uu.exports={getHighWaterMark:Tg}});var fu=_((aE,Bs)=>{typeof Object.create=="function"?Bs.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Bs.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}}});var tt=_((lE,zs)=>{try{if(Us=L("util"),typeof Us.inherits!="function")throw"";zs.exports=Us.inherits}catch{zs.exports=fu()}var Us});var mu=_((uE,gu)=>{"use strict";function cu(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function hu(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?cu(Object(r),!0).forEach(function(i){Mg(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):cu(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Mg(t,e,r){return e=pu(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Og(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function du(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,pu(i.key),i)}}function Ag(t,e,r){return e&&du(t.prototype,e),r&&du(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function pu(t){var e=kg(t,"string");return typeof e=="symbol"?e:String(e)}function kg(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Pg=L("buffer"),Ui=Pg.Buffer,Dg=L("util"),Hs=Dg.inspect,Cg=Hs&&Hs.custom||"inspect";function qg(t,e,r){Ui.prototype.copy.call(t,e,r)}gu.exports=(function(){function t(){Og(this,t),this.head=null,this.tail=null,this.length=0}return Ag(t,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return Ui.alloc(0);for(var i=Ui.allocUnsafe(r>>>0),n=this.head,s=0;n;)qg(n.data,i,s),s+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,n=1,s=i.data;for(r-=s.length;i=i.next;){var o=i.data,a=r>o.length?o.length:r;if(a===o.length?s+=o:s+=o.slice(0,r),r-=a,r===0){a===o.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(a));break}++n}return this.length-=n,s}},{key:"_getBuffer",value:function(r){var i=Ui.allocUnsafe(r),n=this.head,s=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var o=n.data,a=r>o.length?o.length:r;if(o.copy(i,i.length-r,0,a),r-=a,r===0){a===o.length?(++s,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(a));break}++s}return this.length-=s,i}},{key:Cg,value:function(r,i){return Hs(this,hu(hu({},i),{},{depth:0,customInspect:!1}))}}]),t})()});var wu=_((Gs,bu)=>{var zi=L("buffer"),Ge=zi.Buffer;function yu(t,e){for(var r in t)e[r]=t[r]}Ge.from&&Ge.alloc&&Ge.allocUnsafe&&Ge.allocUnsafeSlow?bu.exports=zi:(yu(zi,Gs),Gs.Buffer=jt);function jt(t,e,r){return Ge(t,e,r)}jt.prototype=Object.create(Ge.prototype);yu(Ge,jt);jt.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Ge(t,e,r)};jt.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=Ge(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};jt.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Ge(t)};jt.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return zi.SlowBuffer(t)}});var qr=_(vu=>{"use strict";var Ys=wu().Buffer,_u=Ys.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Lg(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function Ng(t){var e=Lg(t);if(typeof e!="string"&&(Ys.isEncoding===_u||!_u(t)))throw new Error("Unknown encoding: "+t);return e||t}vu.StringDecoder=Cr;function Cr(t){this.encoding=Ng(t);var e;switch(this.encoding){case"utf16le":this.text=Bg,this.end=Ug,e=4;break;case"utf8":this.fillLast=Ig,e=4;break;case"base64":this.text=zg,this.end=Hg,e=3;break;default:this.write=Gg,this.end=Vg;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Ys.allocUnsafe(e)}Cr.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};Cr.prototype.end=Wg;Cr.prototype.text=$g;Cr.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function Vs(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function jg(t,e,r){var i=e.length-1;if(i<r)return 0;var n=Vs(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=Vs(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=Vs(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function Fg(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function Ig(t){var e=this.lastTotal-this.lastNeed,r=Fg(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function $g(t,e){var r=jg(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function Wg(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function Bg(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function Ug(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function zg(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function Hg(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function Gg(t){return t.toString(this.encoding)}function Vg(t){return t&&t.length?this.write(t):""}});var xu=_((cE,Ru)=>{"use strict";var Su=ir().codes.ERR_STREAM_PREMATURE_CLOSE;function Yg(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];t.apply(this,i)}}}function Kg(){}function Jg(t){return t.setHeader&&typeof t.abort=="function"}function Eu(t,e,r){if(typeof e=="function")return Eu(t,null,e);e||(e={}),r=Yg(r||Kg);var i=e.readable||e.readable!==!1&&t.readable,n=e.writable||e.writable!==!1&&t.writable,s=function(){t.writable||a()},o=t._writableState&&t._writableState.finished,a=function(){n=!1,o=!0,i||r.call(t)},l=t._readableState&&t._readableState.endEmitted,u=function(){i=!1,l=!0,n||r.call(t)},c=function(d){r.call(t,d)},f=function(){var d;if(i&&!l)return(!t._readableState||!t._readableState.ended)&&(d=new Su),r.call(t,d);if(n&&!o)return(!t._writableState||!t._writableState.ended)&&(d=new Su),r.call(t,d)},p=function(){t.req.on("finish",a)};return Jg(t)?(t.on("complete",a),t.on("abort",f),t.req?p():t.on("request",p)):n&&!t._writableState&&(t.on("end",s),t.on("close",s)),t.on("end",u),t.on("finish",a),e.error!==!1&&t.on("error",c),t.on("close",f),function(){t.removeListener("complete",a),t.removeListener("abort",f),t.removeListener("request",p),t.req&&t.req.removeListener("finish",a),t.removeListener("end",s),t.removeListener("close",s),t.removeListener("finish",a),t.removeListener("end",u),t.removeListener("error",c),t.removeListener("close",f)}}Ru.exports=Eu});var Mu=_((hE,Tu)=>{"use strict";var Hi;function ht(t,e,r){return e=Zg(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Zg(t){var e=Qg(t,"string");return typeof e=="symbol"?e:String(e)}function Qg(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Xg=xu(),dt=Symbol("lastResolve"),Ft=Symbol("lastReject"),Lr=Symbol("error"),Gi=Symbol("ended"),It=Symbol("lastPromise"),Ks=Symbol("handlePromise"),$t=Symbol("stream");function pt(t,e){return{value:t,done:e}}function em(t){var e=t[dt];if(e!==null){var r=t[$t].read();r!==null&&(t[It]=null,t[dt]=null,t[Ft]=null,e(pt(r,!1)))}}function tm(t){process.nextTick(em,t)}function rm(t,e){return function(r,i){t.then(function(){if(e[Gi]){r(pt(void 0,!0));return}e[Ks](r,i)},i)}}var im=Object.getPrototypeOf(function(){}),nm=Object.setPrototypeOf((Hi={get stream(){return this[$t]},next:function(){var e=this,r=this[Lr];if(r!==null)return Promise.reject(r);if(this[Gi])return Promise.resolve(pt(void 0,!0));if(this[$t].destroyed)return new Promise(function(o,a){process.nextTick(function(){e[Lr]?a(e[Lr]):o(pt(void 0,!0))})});var i=this[It],n;if(i)n=new Promise(rm(i,this));else{var s=this[$t].read();if(s!==null)return Promise.resolve(pt(s,!1));n=new Promise(this[Ks])}return this[It]=n,n}},ht(Hi,Symbol.asyncIterator,function(){return this}),ht(Hi,"return",function(){var e=this;return new Promise(function(r,i){e[$t].destroy(null,function(n){if(n){i(n);return}r(pt(void 0,!0))})})}),Hi),im),sm=function(e){var r,i=Object.create(nm,(r={},ht(r,$t,{value:e,writable:!0}),ht(r,dt,{value:null,writable:!0}),ht(r,Ft,{value:null,writable:!0}),ht(r,Lr,{value:null,writable:!0}),ht(r,Gi,{value:e._readableState.endEmitted,writable:!0}),ht(r,Ks,{value:function(s,o){var a=i[$t].read();a?(i[It]=null,i[dt]=null,i[Ft]=null,s(pt(a,!1))):(i[dt]=s,i[Ft]=o)},writable:!0}),r));return i[It]=null,Xg(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[Ft];s!==null&&(i[It]=null,i[dt]=null,i[Ft]=null,s(n)),i[Lr]=n;return}var o=i[dt];o!==null&&(i[It]=null,i[dt]=null,i[Ft]=null,o(pt(void 0,!0))),i[Gi]=!0}),e.on("readable",tm.bind(null,i)),i};Tu.exports=sm});var Pu=_((dE,ku)=>{"use strict";function Ou(t,e,r,i,n,s,o){try{var a=t[s](o),l=a.value}catch(u){r(u);return}a.done?e(l):Promise.resolve(l).then(i,n)}function om(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function o(l){Ou(s,i,n,o,a,"next",l)}function a(l){Ou(s,i,n,o,a,"throw",l)}o(void 0)})}}function Au(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function am(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Au(Object(r),!0).forEach(function(i){lm(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Au(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function lm(t,e,r){return e=um(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function um(t){var e=fm(t,"string");return typeof e=="symbol"?e:String(e)}function fm(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var cm=ir().codes.ERR_INVALID_ARG_TYPE;function hm(t,e,r){var i;if(e&&typeof e.next=="function")i=e;else if(e&&e[Symbol.asyncIterator])i=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])i=e[Symbol.iterator]();else throw new cm("iterable",["Iterable"],e);var n=new t(am({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,o())};function o(){return a.apply(this,arguments)}function a(){return a=om(function*(){try{var l=yield i.next(),u=l.value,c=l.done;c?n.push(null):n.push(yield u)?o():s=!1}catch(f){n.destroy(f)}}),a.apply(this,arguments)}return n}ku.exports=hm});var Bu=_((gE,Wu)=>{"use strict";Wu.exports=B;var nr;B.ReadableState=Lu;var pE=L("events").EventEmitter,qu=function(e,r){return e.listeners(r).length},jr=Fs(),Vi=L("buffer").Buffer,dm=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function pm(t){return Vi.from(t)}function gm(t){return Vi.isBuffer(t)||t instanceof dm}var Js=L("util"),N;Js&&Js.debuglog?N=Js.debuglog("stream"):N=function(){};var mm=mu(),io=$s(),ym=Ws(),bm=ym.getHighWaterMark,Yi=ir().codes,wm=Yi.ERR_INVALID_ARG_TYPE,_m=Yi.ERR_STREAM_PUSH_AFTER_EOF,vm=Yi.ERR_METHOD_NOT_IMPLEMENTED,Sm=Yi.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,sr,Zs,Qs;tt()(B,jr);var Nr=io.errorOrDestroy,Xs=["error","close","destroy","pause","resume"];function Em(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function Lu(t,e,r){nr=nr||Fr(),t=t||{},typeof r!="boolean"&&(r=e instanceof nr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=bm(this,t,"readableHighWaterMark",r),this.buffer=new mm,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(sr||(sr=qr().StringDecoder),this.decoder=new sr(t.encoding),this.encoding=t.encoding)}function B(t){if(nr=nr||Fr(),!(this instanceof B))return new B(t);var e=this instanceof nr;this._readableState=new Lu(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),jr.call(this)}Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});B.prototype.destroy=io.destroy;B.prototype._undestroy=io.undestroy;B.prototype._destroy=function(t,e){e(t)};B.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=Vi.from(t,e),e=""),i=!0),Nu(this,t,e,!1,i)};B.prototype.unshift=function(t){return Nu(this,t,null,!0,!1)};function Nu(t,e,r,i,n){N("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,Tm(t,s);else{var o;if(n||(o=Rm(s,e)),o)Nr(t,o);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==Vi.prototype&&(e=pm(e)),i)s.endEmitted?Nr(t,new Sm):eo(t,s,e,!0);else if(s.ended)Nr(t,new _m);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?eo(t,s,e,!1):ro(t,s)):eo(t,s,e,!1)}else i||(s.reading=!1,ro(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function eo(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Ki(t)),ro(t,e)}function Rm(t,e){var r;return!gm(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new wm("chunk",["string","Buffer","Uint8Array"],e)),r}B.prototype.isPaused=function(){return this._readableState.flowing===!1};B.prototype.setEncoding=function(t){sr||(sr=qr().StringDecoder);var e=new sr(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var Du=1073741824;function xm(t){return t>=Du?t=Du:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function Cu(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=xm(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}B.prototype.read=function(t){N("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return N("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?to(this):Ki(this),null;if(t=Cu(t,e),t===0&&e.ended)return e.length===0&&to(this),null;var i=e.needReadable;N("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,N("length less than watermark",i)),e.ended||e.reading?(i=!1,N("reading or ended",i)):i&&(N("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=Cu(r,e)));var n;return t>0?n=Iu(t,e):n=null,n===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&to(this)),n!==null&&this.emit("data",n),n};function Tm(t,e){if(N("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?Ki(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,ju(t)))}}function Ki(t){var e=t._readableState;N("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(N("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(ju,t))}function ju(t){var e=t._readableState;N("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,no(t)}function ro(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(Mm,t,e))}function Mm(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(N("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}B.prototype._read=function(t){Nr(this,new vm("_read()"))};B.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,N("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=n?a:b;i.endEmitted?process.nextTick(s):r.once("end",s),t.on("unpipe",o);function o(v,S){N("onunpipe"),v===r&&S&&S.hasUnpiped===!1&&(S.hasUnpiped=!0,c())}function a(){N("onend"),t.end()}var l=Om(r);t.on("drain",l);var u=!1;function c(){N("cleanup"),t.removeListener("close",m),t.removeListener("finish",d),t.removeListener("drain",l),t.removeListener("error",p),t.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",b),r.removeListener("data",f),u=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&l()}r.on("data",f);function f(v){N("ondata");var S=t.write(v);N("dest.write",S),S===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&$u(i.pipes,t)!==-1)&&!u&&(N("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function p(v){N("onerror",v),b(),t.removeListener("error",p),qu(t,"error")===0&&Nr(t,v)}Em(t,"error",p);function m(){t.removeListener("finish",d),b()}t.once("close",m);function d(){N("onfinish"),t.removeListener("close",m),b()}t.once("finish",d);function b(){N("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(N("pipe resume"),r.resume()),t};function Om(t){return function(){var r=t._readableState;N("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&qu(t,"data")&&(r.flowing=!0,no(t))}}B.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=$u(e.pipes,t);return o===-1?this:(e.pipes.splice(o,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};B.prototype.on=function(t,e){var r=jr.prototype.on.call(this,t,e),i=this._readableState;return t==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):t==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,N("on readable",i.length,i.reading),i.length?Ki(this):i.reading||process.nextTick(Am,this)),r};B.prototype.addListener=B.prototype.on;B.prototype.removeListener=function(t,e){var r=jr.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(Fu,this),r};B.prototype.removeAllListeners=function(t){var e=jr.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(Fu,this),e};function Fu(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function Am(t){N("readable nexttick read 0"),t.read(0)}B.prototype.resume=function(){var t=this._readableState;return t.flowing||(N("resume"),t.flowing=!t.readableListening,km(this,t)),t.paused=!1,this};function km(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(Pm,t,e))}function Pm(t,e){N("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),no(t),e.flowing&&!e.reading&&t.read(0)}B.prototype.pause=function(){return N("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(N("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function no(t){var e=t._readableState;for(N("flow",e.flowing);e.flowing&&t.read()!==null;);}B.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(N("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&e.push(o)}e.push(null)}),t.on("data",function(o){if(N("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var a=e.push(o);a||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=(function(a){return function(){return t[a].apply(t,arguments)}})(n));for(var s=0;s<Xs.length;s++)t.on(Xs[s],this.emit.bind(this,Xs[s]));return this._read=function(o){N("wrapped _read",o),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&(B.prototype[Symbol.asyncIterator]=function(){return Zs===void 0&&(Zs=Mu()),Zs(this)});Object.defineProperty(B.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(B.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(B.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});B._fromList=Iu;Object.defineProperty(B.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Iu(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function to(t){var e=t._readableState;N("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(Dm,e,t))}function Dm(t,e){if(N("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(B.from=function(t,e){return Qs===void 0&&(Qs=Pu()),Qs(B,t,e)});function $u(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var Fr=_((mE,zu)=>{"use strict";var Cm=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};zu.exports=Ve;var Uu=Bu(),oo=ao();tt()(Ve,Uu);for(so=Cm(oo.prototype),Ji=0;Ji<so.length;Ji++)Zi=so[Ji],Ve.prototype[Zi]||(Ve.prototype[Zi]=oo.prototype[Zi]);var so,Zi,Ji;function Ve(t){if(!(this instanceof Ve))return new Ve(t);Uu.call(this,t),oo.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",qm)))}Object.defineProperty(Ve.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Ve.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Ve.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function qm(){this._writableState.ended||process.nextTick(Lm,this)}function Lm(t){t.end()}Object.defineProperty(Ve.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var ao=_((yE,Ju)=>{"use strict";Ju.exports=K;function Gu(t){var e=this;this.next=null,this.entry=null,this.finish=function(){ly(e,t)}}var or;K.WritableState=$r;var Nm={deprecate:js()},Vu=Fs(),Xi=L("buffer").Buffer,jm=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Fm(t){return Xi.from(t)}function Im(t){return Xi.isBuffer(t)||t instanceof jm}var uo=$s(),$m=Ws(),Wm=$m.getHighWaterMark,gt=ir().codes,Bm=gt.ERR_INVALID_ARG_TYPE,Um=gt.ERR_METHOD_NOT_IMPLEMENTED,zm=gt.ERR_MULTIPLE_CALLBACK,Hm=gt.ERR_STREAM_CANNOT_PIPE,Gm=gt.ERR_STREAM_DESTROYED,Vm=gt.ERR_STREAM_NULL_VALUES,Ym=gt.ERR_STREAM_WRITE_AFTER_END,Km=gt.ERR_UNKNOWN_ENCODING,ar=uo.errorOrDestroy;tt()(K,Vu);function Jm(){}function $r(t,e,r){or=or||Fr(),t=t||{},typeof r!="boolean"&&(r=e instanceof or),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=Wm(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=t.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){iy(e,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Gu(this)}$r.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty($r.prototype,"buffer",{get:Nm.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Qi;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Qi=Function.prototype[Symbol.hasInstance],Object.defineProperty(K,Symbol.hasInstance,{value:function(e){return Qi.call(this,e)?!0:this!==K?!1:e&&e._writableState instanceof $r}})):Qi=function(e){return e instanceof this};function K(t){or=or||Fr();var e=this instanceof or;if(!e&&!Qi.call(K,this))return new K(t);this._writableState=new $r(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),Vu.call(this)}K.prototype.pipe=function(){ar(this,new Hm)};function Zm(t,e){var r=new Ym;ar(t,r),process.nextTick(e,r)}function Qm(t,e,r,i){var n;return r===null?n=new Vm:typeof r!="string"&&!e.objectMode&&(n=new Bm("chunk",["string","Buffer"],r)),n?(ar(t,n),process.nextTick(i,n),!1):!0}K.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&Im(t);return s&&!Xi.isBuffer(t)&&(t=Fm(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=Jm),i.ending?Zm(this,r):(s||Qm(this,i,t,r))&&(i.pendingcb++,n=ey(this,i,s,t,e,r)),n};K.prototype.cork=function(){this._writableState.corked++};K.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&Yu(this,t))};K.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new Km(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(K.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Xm(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=Xi.from(e,r)),e}Object.defineProperty(K.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function ey(t,e,r,i,n,s){if(!r){var o=Xm(e,i,n);i!==o&&(r=!0,n="buffer",i=o)}var a=e.objectMode?1:i.length;e.length+=a;var l=e.length<e.highWaterMark;if(l||(e.needDrain=!0),e.writing||e.corked){var u=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},u?u.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else lo(t,e,!1,a,i,n,s);return l}function lo(t,e,r,i,n,s,o){e.writelen=i,e.writecb=o,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new Gm("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function ty(t,e,r,i,n){--e.pendingcb,r?(process.nextTick(n,i),process.nextTick(Ir,t,e),t._writableState.errorEmitted=!0,ar(t,i)):(n(i),t._writableState.errorEmitted=!0,ar(t,i),Ir(t,e))}function ry(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function iy(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new zm;if(ry(r),e)ty(t,r,i,e,n);else{var s=Ku(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Yu(t,r),i?process.nextTick(Hu,t,r,s,n):Hu(t,r,s,n)}}function Hu(t,e,r,i){r||ny(t,e),e.pendingcb--,i(),Ir(t,e)}function ny(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function Yu(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var o=0,a=!0;r;)n[o]=r,r.isBuf||(a=!1),r=r.next,o+=1;n.allBuffers=a,lo(t,e,!0,e.length,n,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new Gu(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,c=r.callback,f=e.objectMode?1:l.length;if(lo(t,e,!1,f,l,u,c),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}K.prototype._write=function(t,e,r){r(new Um("_write()"))};K.prototype._writev=null;K.prototype.end=function(t,e,r){var i=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||ay(this,i,r),this};Object.defineProperty(K.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Ku(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function sy(t,e){t._final(function(r){e.pendingcb--,r&&ar(t,r),e.prefinished=!0,t.emit("prefinish"),Ir(t,e)})}function oy(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(sy,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Ir(t,e){var r=Ku(e);if(r&&(oy(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}function ay(t,e,r){e.ending=!0,Ir(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function ly(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty(K.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});K.prototype.destroy=uo.destroy;K.prototype._undestroy=uo.undestroy;K.prototype._destroy=function(t,e){e(t)}});var fo=_((bE,Xu)=>{"use strict";var uy=L("util"),Zu=ao(),{LEVEL:Qu}=te(),Wr=Xu.exports=function(e={}){Zu.call(this,{objectMode:!0,highWaterMark:e.highWaterMark}),this.format=e.format,this.level=e.level,this.handleExceptions=e.handleExceptions,this.handleRejections=e.handleRejections,this.silent=e.silent,e.log&&(this.log=e.log),e.logv&&(this.logv=e.logv),e.close&&(this.close=e.close),this.once("pipe",r=>{this.levels=r.levels,this.parent=r}),this.once("unpipe",r=>{r===this.parent&&(this.parent=null,this.close&&this.close())})};uy.inherits(Wr,Zu);Wr.prototype._write=function(e,r,i){if(this.silent||e.exception===!0&&!this.handleExceptions)return i(null);let n=this.level||this.parent&&this.parent.level;if(!n||this.levels[n]>=this.levels[e[Qu]]){if(e&&!this.format)return this.log(e,i);let s,o;try{o=this.format.transform(Object.assign({},e),this.format.options)}catch(a){s=a}if(s||!o){if(i(),s)throw s;return}return this.log(o,i)}return this._writableState.sync=!1,i(null)};Wr.prototype._writev=function(e,r){if(this.logv){let i=e.filter(this._accept,this);return i.length?this.logv(i,r):r(null)}for(let i=0;i<e.length;i++){if(!this._accept(e[i]))continue;if(e[i].chunk&&!this.format){this.log(e[i].chunk,e[i].callback);continue}let n,s;try{s=this.format.transform(Object.assign({},e[i].chunk),this.format.options)}catch(o){n=o}if(n||!s){if(e[i].callback(),n)throw r(null),n}else this.log(s,e[i].callback)}return r(null)};Wr.prototype._accept=function(e){let r=e.chunk;if(this.silent)return!1;let i=this.level||this.parent&&this.parent.level;return!!((r.exception===!0||!i||this.levels[i]>=this.levels[r[Qu]])&&(this.handleExceptions||r.exception!==!0))};Wr.prototype._nop=function(){}});var ho=_((wE,tf)=>{"use strict";var fy=L("util"),{LEVEL:co}=te(),ef=fo(),Br=tf.exports=function(e={}){if(ef.call(this,e),!e.transport||typeof e.transport.log!="function")throw new Error("Invalid transport, must be an object with a log method.");this.transport=e.transport,this.level=this.level||e.transport.level,this.handleExceptions=this.handleExceptions||e.transport.handleExceptions,this._deprecated();function r(i){this.emit("error",i,this.transport)}this.transport.__winstonError||(this.transport.__winstonError=r.bind(this),this.transport.on("error",this.transport.__winstonError))};fy.inherits(Br,ef);Br.prototype._write=function(e,r,i){if(this.silent||e.exception===!0&&!this.handleExceptions)return i(null);(!this.level||this.levels[this.level]>=this.levels[e[co]])&&this.transport.log(e[co],e.message,e,this._nop),i(null)};Br.prototype._writev=function(e,r){for(let i=0;i<e.length;i++)this._accept(e[i])&&(this.transport.log(e[i].chunk[co],e[i].chunk.message,e[i].chunk,this._nop),e[i].callback());return r(null)};Br.prototype._deprecated=function(){console.error([`${this.transport.name} is a legacy winston transport. Consider upgrading: `,"- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join(`
31
+ `))};Br.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)}});var lr=_((_E,po)=>{"use strict";po.exports=fo();po.exports.LegacyTransportStream=ho()});var sf=_((SE,nf)=>{"use strict";var cy=L("os"),{LEVEL:rf,MESSAGE:ur}=te(),hy=lr();nf.exports=class extends hy{constructor(e={}){super(e),this.name=e.name||"console",this.stderrLevels=this._stringArrayToSet(e.stderrLevels),this.consoleWarnLevels=this._stringArrayToSet(e.consoleWarnLevels),this.eol=typeof e.eol=="string"?e.eol:cy.EOL,this.forceConsole=e.forceConsole||!1,this._consoleLog=console.log.bind(console),this._consoleWarn=console.warn.bind(console),this._consoleError=console.error.bind(console),this.setMaxListeners(30)}log(e,r){if(setImmediate(()=>this.emit("logged",e)),this.stderrLevels[e[rf]]){console._stderr&&!this.forceConsole?console._stderr.write(`${e[ur]}${this.eol}`):this._consoleError(e[ur]),r&&r();return}else if(this.consoleWarnLevels[e[rf]]){console._stderr&&!this.forceConsole?console._stderr.write(`${e[ur]}${this.eol}`):this._consoleWarn(e[ur]),r&&r();return}console._stdout&&!this.forceConsole?console._stdout.write(`${e[ur]}${this.eol}`):this._consoleLog(e[ur]),r&&r()}_stringArrayToSet(e,r){if(!e)return{};if(r=r||"Cannot make set from type other than Array of string elements",!Array.isArray(e))throw new Error(r);return e.reduce((i,n)=>{if(typeof n!="string")throw new Error(r);return i[n]=!0,i},{})}}});var tn=_((en,of)=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.default=dy;function dy(t){return t&&typeof t.length=="number"&&t.length>=0&&t.length%1===0}of.exports=en.default});var lf=_((rn,af)=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.default=function(t){return function(...e){var r=e.pop();return t.call(this,e,r)}};af.exports=rn.default});var cf=_(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.fallback=uf;mt.wrap=ff;var py=mt.hasQueueMicrotask=typeof queueMicrotask=="function"&&queueMicrotask,gy=mt.hasSetImmediate=typeof setImmediate=="function"&&setImmediate,my=mt.hasNextTick=typeof process=="object"&&typeof process.nextTick=="function";function uf(t){setTimeout(t,0)}function ff(t){return(e,...r)=>t(()=>e(...r))}var Ur;py?Ur=queueMicrotask:gy?Ur=setImmediate:my?Ur=process.nextTick:Ur=uf;mt.default=ff(Ur)});var mf=_((nn,gf)=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.default=Sy;var yy=lf(),by=pf(yy),wy=cf(),_y=pf(wy),vy=Wt();function pf(t){return t&&t.__esModule?t:{default:t}}function Sy(t){return(0,vy.isAsync)(t)?function(...e){let r=e.pop(),i=t.apply(this,e);return hf(i,r)}:(0,by.default)(function(e,r){var i;try{i=t.apply(this,e)}catch(n){return r(n)}if(i&&typeof i.then=="function")return hf(i,r);r(null,i)})}function hf(t,e){return t.then(r=>{df(e,null,r)},r=>{df(e,r&&(r instanceof Error||r.message)?r:new Error(r))})}function df(t,e,r){try{t(e,r)}catch(i){(0,_y.default)(n=>{throw n},i)}}gf.exports=nn.default});var Wt=_(rt=>{"use strict";Object.defineProperty(rt,"__esModule",{value:!0});rt.isAsyncIterable=rt.isAsyncGenerator=rt.isAsync=void 0;var Ey=mf(),Ry=xy(Ey);function xy(t){return t&&t.__esModule?t:{default:t}}function yf(t){return t[Symbol.toStringTag]==="AsyncFunction"}function Ty(t){return t[Symbol.toStringTag]==="AsyncGenerator"}function My(t){return typeof t[Symbol.asyncIterator]=="function"}function Oy(t){if(typeof t!="function")throw new Error("expected a function");return yf(t)?(0,Ry.default)(t):t}rt.default=Oy;rt.isAsync=yf;rt.isAsyncGenerator=Ty;rt.isAsyncIterable=My});var fr=_((sn,bf)=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.default=Ay;function Ay(t,e){if(e||(e=t.length),!e)throw new Error("arity is undefined");function r(...i){return typeof i[e-1]=="function"?t.apply(this,i):new Promise((n,s)=>{i[e-1]=(o,...a)=>{if(o)return s(o);n(a.length>1?a:a[0])},t.apply(this,i)})}return r}bf.exports=sn.default});var _f=_((on,wf)=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});var ky=tn(),Py=go(ky),Dy=Wt(),Cy=go(Dy),qy=fr(),Ly=go(qy);function go(t){return t&&t.__esModule?t:{default:t}}on.default=(0,Ly.default)((t,e,r)=>{var i=(0,Py.default)(e)?[]:{};t(e,(n,s,o)=>{(0,Cy.default)(n)((a,...l)=>{l.length<2&&([l]=l),i[s]=l,o(a)})},n=>r(n,i))},3);wf.exports=on.default});var mo=_((an,vf)=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.default=Ny;function Ny(t){function e(...r){if(t!==null){var i=t;t=null,i.apply(this,r)}}return Object.assign(e,t),e}vf.exports=an.default});var Ef=_((ln,Sf)=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.default=function(t){return t[Symbol.iterator]&&t[Symbol.iterator]()};Sf.exports=ln.default});var Tf=_((un,xf)=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.default=zy;var jy=tn(),Fy=Rf(jy),Iy=Ef(),$y=Rf(Iy);function Rf(t){return t&&t.__esModule?t:{default:t}}function Wy(t){var e=-1,r=t.length;return function(){return++e<r?{value:t[e],key:e}:null}}function By(t){var e=-1;return function(){var i=t.next();return i.done?null:(e++,{value:i.value,key:e})}}function Uy(t){var e=t?Object.keys(t):[],r=-1,i=e.length;return function n(){var s=e[++r];return s==="__proto__"?n():r<i?{value:t[s],key:s}:null}}function zy(t){if((0,Fy.default)(t))return Wy(t);var e=(0,$y.default)(t);return e?By(e):Uy(t)}xf.exports=un.default});var yo=_((fn,Mf)=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.default=Hy;function Hy(t){return function(...e){if(t===null)throw new Error("Callback was already called.");var r=t;t=null,r.apply(this,e)}}Mf.exports=fn.default});var hn=_((cn,Of)=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});var Gy={};cn.default=Gy;Of.exports=cn.default});var kf=_((dn,Af)=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.default=Jy;var Vy=hn(),Yy=Ky(Vy);function Ky(t){return t&&t.__esModule?t:{default:t}}function Jy(t,e,r,i){let n=!1,s=!1,o=!1,a=0,l=0;function u(){a>=e||o||n||(o=!0,t.next().then(({value:p,done:m})=>{if(!(s||n)){if(o=!1,m){n=!0,a<=0&&i(null);return}a++,r(p,l,c),l++,u()}}).catch(f))}function c(p,m){if(a-=1,!s){if(p)return f(p);if(p===!1){n=!0,s=!0;return}if(m===Yy.default||n&&a<=0)return n=!0,i(null);u()}}function f(p){s||(o=!1,n=!0,i(p))}u()}Af.exports=dn.default});var qf=_((pn,Cf)=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});var Zy=mo(),Qy=zr(Zy),Xy=Tf(),eb=zr(Xy),tb=yo(),rb=zr(tb),Pf=Wt(),ib=kf(),Df=zr(ib),nb=hn(),sb=zr(nb);function zr(t){return t&&t.__esModule?t:{default:t}}pn.default=t=>(e,r,i)=>{if(i=(0,Qy.default)(i),t<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!e)return i(null);if((0,Pf.isAsyncGenerator)(e))return(0,Df.default)(e,t,r,i);if((0,Pf.isAsyncIterable)(e))return(0,Df.default)(e[Symbol.asyncIterator](),t,r,i);var n=(0,eb.default)(e),s=!1,o=!1,a=0,l=!1;function u(f,p){if(!o)if(a-=1,f)s=!0,i(f);else if(f===!1)s=!0,o=!0;else{if(p===sb.default||s&&a<=0)return s=!0,i(null);l||c()}}function c(){for(l=!0;a<t&&!s;){var f=n();if(f===null){s=!0,a<=0&&i(null);return}a+=1,r(f.value,f.key,(0,rb.default)(u))}l=!1}c()};Cf.exports=pn.default});var wo=_((gn,Lf)=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});var ob=qf(),ab=bo(ob),lb=Wt(),ub=bo(lb),fb=fr(),cb=bo(fb);function bo(t){return t&&t.__esModule?t:{default:t}}function hb(t,e,r,i){return(0,ab.default)(e)(t,(0,ub.default)(r),i)}gn.default=(0,cb.default)(hb,4);Lf.exports=gn.default});var Ff=_((mn,jf)=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});var db=wo(),pb=Nf(db),gb=fr(),mb=Nf(gb);function Nf(t){return t&&t.__esModule?t:{default:t}}function yb(t,e,r){return(0,pb.default)(t,1,e,r)}mn.default=(0,mb.default)(yb,3);jf.exports=mn.default});var Wf=_((yn,$f)=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.default=Sb;var bb=_f(),wb=If(bb),_b=Ff(),vb=If(_b);function If(t){return t&&t.__esModule?t:{default:t}}function Sb(t,e){return(0,wb.default)(vb.default,t,e)}$f.exports=yn.default});var _o=_((xE,Bf)=>{Bf.exports=L("stream")});var Yf=_((TE,Vf)=>{"use strict";function Uf(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function zf(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Uf(Object(r),!0).forEach(function(i){Eb(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Uf(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Eb(t,e,r){return e=Gf(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Rb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Hf(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Gf(i.key),i)}}function xb(t,e,r){return e&&Hf(t.prototype,e),r&&Hf(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Gf(t){var e=Tb(t,"string");return typeof e=="symbol"?e:String(e)}function Tb(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Mb=L("buffer"),bn=Mb.Buffer,Ob=L("util"),vo=Ob.inspect,Ab=vo&&vo.custom||"inspect";function kb(t,e,r){bn.prototype.copy.call(t,e,r)}Vf.exports=(function(){function t(){Rb(this,t),this.head=null,this.tail=null,this.length=0}return xb(t,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return bn.alloc(0);for(var i=bn.allocUnsafe(r>>>0),n=this.head,s=0;n;)kb(n.data,i,s),s+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,n=1,s=i.data;for(r-=s.length;i=i.next;){var o=i.data,a=r>o.length?o.length:r;if(a===o.length?s+=o:s+=o.slice(0,r),r-=a,r===0){a===o.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(a));break}++n}return this.length-=n,s}},{key:"_getBuffer",value:function(r){var i=bn.allocUnsafe(r),n=this.head,s=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var o=n.data,a=r>o.length?o.length:r;if(o.copy(i,i.length-r,0,a),r-=a,r===0){a===o.length?(++s,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(a));break}++s}return this.length-=s,i}},{key:Ab,value:function(r,i){return vo(this,zf(zf({},i),{},{depth:0,customInspect:!1}))}}]),t})()});var Eo=_((ME,Jf)=>{"use strict";function Pb(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(So,this,t)):process.nextTick(So,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(wn,r):(r._writableState.errorEmitted=!0,process.nextTick(Kf,r,s)):process.nextTick(Kf,r,s):e?(process.nextTick(wn,r),e(s)):process.nextTick(wn,r)}),this)}function Kf(t,e){So(t,e),wn(t)}function wn(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function Db(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function So(t,e){t.emit("error",e)}function Cb(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}Jf.exports={destroy:Pb,undestroy:Db,errorOrDestroy:Cb}});var yt=_((OE,Xf)=>{"use strict";var Qf={};function Ce(t,e,r){r||(r=Error);function i(s,o,a){return typeof e=="string"?e:e(s,o,a)}class n extends r{constructor(o,a,l){super(i(o,a,l))}}n.prototype.name=r.name,n.prototype.code=t,Qf[t]=n}function Zf(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(i=>String(i)),r>2?`one of ${e} ${t.slice(0,r-1).join(", ")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return`of ${e} ${String(t)}`}function qb(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function Lb(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function Nb(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}Ce("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);Ce("ERR_INVALID_ARG_TYPE",function(t,e,r){let i;typeof e=="string"&&qb(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if(Lb(t," argument"))n=`The ${t} ${i} ${Zf(e,"type")}`;else{let s=Nb(t,".")?"property":"argument";n=`The "${t}" ${s} ${i} ${Zf(e,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);Ce("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Ce("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});Ce("ERR_STREAM_PREMATURE_CLOSE","Premature close");Ce("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});Ce("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Ce("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Ce("ERR_STREAM_WRITE_AFTER_END","write after end");Ce("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Ce("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);Ce("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Xf.exports.codes=Qf});var Ro=_((AE,ec)=>{"use strict";var jb=yt().codes.ERR_INVALID_OPT_VALUE;function Fb(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Ib(t,e,r,i){var n=Fb(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new jb(s,n)}return Math.floor(n)}return t.objectMode?16:16*1024}ec.exports={getHighWaterMark:Ib}});var Mo=_((kE,oc)=>{"use strict";oc.exports=J;function rc(t){var e=this;this.next=null,this.entry=null,this.finish=function(){h0(e,t)}}var cr;J.WritableState=Gr;var $b={deprecate:js()},ic=_o(),vn=L("buffer").Buffer,Wb=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Bb(t){return vn.from(t)}function Ub(t){return vn.isBuffer(t)||t instanceof Wb}var To=Eo(),zb=Ro(),Hb=zb.getHighWaterMark,bt=yt().codes,Gb=bt.ERR_INVALID_ARG_TYPE,Vb=bt.ERR_METHOD_NOT_IMPLEMENTED,Yb=bt.ERR_MULTIPLE_CALLBACK,Kb=bt.ERR_STREAM_CANNOT_PIPE,Jb=bt.ERR_STREAM_DESTROYED,Zb=bt.ERR_STREAM_NULL_VALUES,Qb=bt.ERR_STREAM_WRITE_AFTER_END,Xb=bt.ERR_UNKNOWN_ENCODING,hr=To.errorOrDestroy;tt()(J,ic);function e0(){}function Gr(t,e,r){cr=cr||Bt(),t=t||{},typeof r!="boolean"&&(r=e instanceof cr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=Hb(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=t.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){a0(e,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new rc(this)}Gr.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(Gr.prototype,"buffer",{get:$b.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var _n;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(_n=Function.prototype[Symbol.hasInstance],Object.defineProperty(J,Symbol.hasInstance,{value:function(e){return _n.call(this,e)?!0:this!==J?!1:e&&e._writableState instanceof Gr}})):_n=function(e){return e instanceof this};function J(t){cr=cr||Bt();var e=this instanceof cr;if(!e&&!_n.call(J,this))return new J(t);this._writableState=new Gr(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),ic.call(this)}J.prototype.pipe=function(){hr(this,new Kb)};function t0(t,e){var r=new Qb;hr(t,r),process.nextTick(e,r)}function r0(t,e,r,i){var n;return r===null?n=new Zb:typeof r!="string"&&!e.objectMode&&(n=new Gb("chunk",["string","Buffer"],r)),n?(hr(t,n),process.nextTick(i,n),!1):!0}J.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&Ub(t);return s&&!vn.isBuffer(t)&&(t=Bb(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=e0),i.ending?t0(this,r):(s||r0(this,i,t,r))&&(i.pendingcb++,n=n0(this,i,s,t,e,r)),n};J.prototype.cork=function(){this._writableState.corked++};J.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&nc(this,t))};J.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new Xb(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(J.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function i0(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=vn.from(e,r)),e}Object.defineProperty(J.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function n0(t,e,r,i,n,s){if(!r){var o=i0(e,i,n);i!==o&&(r=!0,n="buffer",i=o)}var a=e.objectMode?1:i.length;e.length+=a;var l=e.length<e.highWaterMark;if(l||(e.needDrain=!0),e.writing||e.corked){var u=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},u?u.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else xo(t,e,!1,a,i,n,s);return l}function xo(t,e,r,i,n,s,o){e.writelen=i,e.writecb=o,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new Jb("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function s0(t,e,r,i,n){--e.pendingcb,r?(process.nextTick(n,i),process.nextTick(Hr,t,e),t._writableState.errorEmitted=!0,hr(t,i)):(n(i),t._writableState.errorEmitted=!0,hr(t,i),Hr(t,e))}function o0(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function a0(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new Yb;if(o0(r),e)s0(t,r,i,e,n);else{var s=sc(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&nc(t,r),i?process.nextTick(tc,t,r,s,n):tc(t,r,s,n)}}function tc(t,e,r,i){r||l0(t,e),e.pendingcb--,i(),Hr(t,e)}function l0(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function nc(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var o=0,a=!0;r;)n[o]=r,r.isBuf||(a=!1),r=r.next,o+=1;n.allBuffers=a,xo(t,e,!0,e.length,n,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new rc(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,c=r.callback,f=e.objectMode?1:l.length;if(xo(t,e,!1,f,l,u,c),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}J.prototype._write=function(t,e,r){r(new Vb("_write()"))};J.prototype._writev=null;J.prototype.end=function(t,e,r){var i=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||c0(this,i,r),this};Object.defineProperty(J.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function sc(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function u0(t,e){t._final(function(r){e.pendingcb--,r&&hr(t,r),e.prefinished=!0,t.emit("prefinish"),Hr(t,e)})}function f0(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(u0,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Hr(t,e){var r=sc(e);if(r&&(f0(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}function c0(t,e,r){e.ending=!0,Hr(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function h0(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty(J.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});J.prototype.destroy=To.destroy;J.prototype._undestroy=To.undestroy;J.prototype._destroy=function(t,e){e(t)}});var Bt=_((PE,lc)=>{"use strict";var d0=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};lc.exports=Ye;var ac=ko(),Ao=Mo();tt()(Ye,ac);for(Oo=d0(Ao.prototype),Sn=0;Sn<Oo.length;Sn++)En=Oo[Sn],Ye.prototype[En]||(Ye.prototype[En]=Ao.prototype[En]);var Oo,En,Sn;function Ye(t){if(!(this instanceof Ye))return new Ye(t);ac.call(this,t),Ao.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",p0)))}Object.defineProperty(Ye.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Ye.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Ye.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function p0(){this._writableState.ended||process.nextTick(g0,this)}function g0(t){t.end()}Object.defineProperty(Ye.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var Rn=_((DE,cc)=>{"use strict";var uc=yt().codes.ERR_STREAM_PREMATURE_CLOSE;function m0(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];t.apply(this,i)}}}function y0(){}function b0(t){return t.setHeader&&typeof t.abort=="function"}function fc(t,e,r){if(typeof e=="function")return fc(t,null,e);e||(e={}),r=m0(r||y0);var i=e.readable||e.readable!==!1&&t.readable,n=e.writable||e.writable!==!1&&t.writable,s=function(){t.writable||a()},o=t._writableState&&t._writableState.finished,a=function(){n=!1,o=!0,i||r.call(t)},l=t._readableState&&t._readableState.endEmitted,u=function(){i=!1,l=!0,n||r.call(t)},c=function(d){r.call(t,d)},f=function(){var d;if(i&&!l)return(!t._readableState||!t._readableState.ended)&&(d=new uc),r.call(t,d);if(n&&!o)return(!t._writableState||!t._writableState.ended)&&(d=new uc),r.call(t,d)},p=function(){t.req.on("finish",a)};return b0(t)?(t.on("complete",a),t.on("abort",f),t.req?p():t.on("request",p)):n&&!t._writableState&&(t.on("end",s),t.on("close",s)),t.on("end",u),t.on("finish",a),e.error!==!1&&t.on("error",c),t.on("close",f),function(){t.removeListener("complete",a),t.removeListener("abort",f),t.removeListener("request",p),t.req&&t.req.removeListener("finish",a),t.removeListener("end",s),t.removeListener("close",s),t.removeListener("finish",a),t.removeListener("end",u),t.removeListener("error",c),t.removeListener("close",f)}}cc.exports=fc});var dc=_((CE,hc)=>{"use strict";var xn;function wt(t,e,r){return e=w0(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function w0(t){var e=_0(t,"string");return typeof e=="symbol"?e:String(e)}function _0(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var v0=Rn(),_t=Symbol("lastResolve"),Ut=Symbol("lastReject"),Vr=Symbol("error"),Tn=Symbol("ended"),zt=Symbol("lastPromise"),Po=Symbol("handlePromise"),Ht=Symbol("stream");function vt(t,e){return{value:t,done:e}}function S0(t){var e=t[_t];if(e!==null){var r=t[Ht].read();r!==null&&(t[zt]=null,t[_t]=null,t[Ut]=null,e(vt(r,!1)))}}function E0(t){process.nextTick(S0,t)}function R0(t,e){return function(r,i){t.then(function(){if(e[Tn]){r(vt(void 0,!0));return}e[Po](r,i)},i)}}var x0=Object.getPrototypeOf(function(){}),T0=Object.setPrototypeOf((xn={get stream(){return this[Ht]},next:function(){var e=this,r=this[Vr];if(r!==null)return Promise.reject(r);if(this[Tn])return Promise.resolve(vt(void 0,!0));if(this[Ht].destroyed)return new Promise(function(o,a){process.nextTick(function(){e[Vr]?a(e[Vr]):o(vt(void 0,!0))})});var i=this[zt],n;if(i)n=new Promise(R0(i,this));else{var s=this[Ht].read();if(s!==null)return Promise.resolve(vt(s,!1));n=new Promise(this[Po])}return this[zt]=n,n}},wt(xn,Symbol.asyncIterator,function(){return this}),wt(xn,"return",function(){var e=this;return new Promise(function(r,i){e[Ht].destroy(null,function(n){if(n){i(n);return}r(vt(void 0,!0))})})}),xn),x0),M0=function(e){var r,i=Object.create(T0,(r={},wt(r,Ht,{value:e,writable:!0}),wt(r,_t,{value:null,writable:!0}),wt(r,Ut,{value:null,writable:!0}),wt(r,Vr,{value:null,writable:!0}),wt(r,Tn,{value:e._readableState.endEmitted,writable:!0}),wt(r,Po,{value:function(s,o){var a=i[Ht].read();a?(i[zt]=null,i[_t]=null,i[Ut]=null,s(vt(a,!1))):(i[_t]=s,i[Ut]=o)},writable:!0}),r));return i[zt]=null,v0(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[Ut];s!==null&&(i[zt]=null,i[_t]=null,i[Ut]=null,s(n)),i[Vr]=n;return}var o=i[_t];o!==null&&(i[zt]=null,i[_t]=null,i[Ut]=null,o(vt(void 0,!0))),i[Tn]=!0}),e.on("readable",E0.bind(null,i)),i};hc.exports=M0});var yc=_((qE,mc)=>{"use strict";function pc(t,e,r,i,n,s,o){try{var a=t[s](o),l=a.value}catch(u){r(u);return}a.done?e(l):Promise.resolve(l).then(i,n)}function O0(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function o(l){pc(s,i,n,o,a,"next",l)}function a(l){pc(s,i,n,o,a,"throw",l)}o(void 0)})}}function gc(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function A0(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?gc(Object(r),!0).forEach(function(i){k0(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):gc(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function k0(t,e,r){return e=P0(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function P0(t){var e=D0(t,"string");return typeof e=="symbol"?e:String(e)}function D0(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var C0=yt().codes.ERR_INVALID_ARG_TYPE;function q0(t,e,r){var i;if(e&&typeof e.next=="function")i=e;else if(e&&e[Symbol.asyncIterator])i=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])i=e[Symbol.iterator]();else throw new C0("iterable",["Iterable"],e);var n=new t(A0({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,o())};function o(){return a.apply(this,arguments)}function a(){return a=O0(function*(){try{var l=yield i.next(),u=l.value,c=l.done;c?n.push(null):n.push(yield u)?o():s=!1}catch(f){n.destroy(f)}}),a.apply(this,arguments)}return n}mc.exports=q0});var ko=_((NE,Mc)=>{"use strict";Mc.exports=U;var dr;U.ReadableState=vc;var LE=L("events").EventEmitter,_c=function(e,r){return e.listeners(r).length},Kr=_o(),Mn=L("buffer").Buffer,L0=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function N0(t){return Mn.from(t)}function j0(t){return Mn.isBuffer(t)||t instanceof L0}var Do=L("util"),j;Do&&Do.debuglog?j=Do.debuglog("stream"):j=function(){};var F0=Yf(),Io=Eo(),I0=Ro(),$0=I0.getHighWaterMark,On=yt().codes,W0=On.ERR_INVALID_ARG_TYPE,B0=On.ERR_STREAM_PUSH_AFTER_EOF,U0=On.ERR_METHOD_NOT_IMPLEMENTED,z0=On.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,pr,Co,qo;tt()(U,Kr);var Yr=Io.errorOrDestroy,Lo=["error","close","destroy","pause","resume"];function H0(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function vc(t,e,r){dr=dr||Bt(),t=t||{},typeof r!="boolean"&&(r=e instanceof dr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=$0(this,t,"readableHighWaterMark",r),this.buffer=new F0,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(pr||(pr=qr().StringDecoder),this.decoder=new pr(t.encoding),this.encoding=t.encoding)}function U(t){if(dr=dr||Bt(),!(this instanceof U))return new U(t);var e=this instanceof dr;this._readableState=new vc(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),Kr.call(this)}Object.defineProperty(U.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});U.prototype.destroy=Io.destroy;U.prototype._undestroy=Io.undestroy;U.prototype._destroy=function(t,e){e(t)};U.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=Mn.from(t,e),e=""),i=!0),Sc(this,t,e,!1,i)};U.prototype.unshift=function(t){return Sc(this,t,null,!0,!1)};function Sc(t,e,r,i,n){j("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,Y0(t,s);else{var o;if(n||(o=G0(s,e)),o)Yr(t,o);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==Mn.prototype&&(e=N0(e)),i)s.endEmitted?Yr(t,new z0):No(t,s,e,!0);else if(s.ended)Yr(t,new B0);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?No(t,s,e,!1):Fo(t,s)):No(t,s,e,!1)}else i||(s.reading=!1,Fo(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function No(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&An(t)),Fo(t,e)}function G0(t,e){var r;return!j0(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new W0("chunk",["string","Buffer","Uint8Array"],e)),r}U.prototype.isPaused=function(){return this._readableState.flowing===!1};U.prototype.setEncoding=function(t){pr||(pr=qr().StringDecoder);var e=new pr(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var bc=1073741824;function V0(t){return t>=bc?t=bc:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function wc(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=V0(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}U.prototype.read=function(t){j("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return j("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?jo(this):An(this),null;if(t=wc(t,e),t===0&&e.ended)return e.length===0&&jo(this),null;var i=e.needReadable;j("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,j("length less than watermark",i)),e.ended||e.reading?(i=!1,j("reading or ended",i)):i&&(j("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=wc(r,e)));var n;return t>0?n=xc(t,e):n=null,n===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&jo(this)),n!==null&&this.emit("data",n),n};function Y0(t,e){if(j("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?An(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,Ec(t)))}}function An(t){var e=t._readableState;j("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(j("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(Ec,t))}function Ec(t){var e=t._readableState;j("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,$o(t)}function Fo(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(K0,t,e))}function K0(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(j("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}U.prototype._read=function(t){Yr(this,new U0("_read()"))};U.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,j("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=n?a:b;i.endEmitted?process.nextTick(s):r.once("end",s),t.on("unpipe",o);function o(v,S){j("onunpipe"),v===r&&S&&S.hasUnpiped===!1&&(S.hasUnpiped=!0,c())}function a(){j("onend"),t.end()}var l=J0(r);t.on("drain",l);var u=!1;function c(){j("cleanup"),t.removeListener("close",m),t.removeListener("finish",d),t.removeListener("drain",l),t.removeListener("error",p),t.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",b),r.removeListener("data",f),u=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&l()}r.on("data",f);function f(v){j("ondata");var S=t.write(v);j("dest.write",S),S===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&Tc(i.pipes,t)!==-1)&&!u&&(j("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function p(v){j("onerror",v),b(),t.removeListener("error",p),_c(t,"error")===0&&Yr(t,v)}H0(t,"error",p);function m(){t.removeListener("finish",d),b()}t.once("close",m);function d(){j("onfinish"),t.removeListener("close",m),b()}t.once("finish",d);function b(){j("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(j("pipe resume"),r.resume()),t};function J0(t){return function(){var r=t._readableState;j("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&_c(t,"data")&&(r.flowing=!0,$o(t))}}U.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=Tc(e.pipes,t);return o===-1?this:(e.pipes.splice(o,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};U.prototype.on=function(t,e){var r=Kr.prototype.on.call(this,t,e),i=this._readableState;return t==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):t==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,j("on readable",i.length,i.reading),i.length?An(this):i.reading||process.nextTick(Z0,this)),r};U.prototype.addListener=U.prototype.on;U.prototype.removeListener=function(t,e){var r=Kr.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(Rc,this),r};U.prototype.removeAllListeners=function(t){var e=Kr.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(Rc,this),e};function Rc(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function Z0(t){j("readable nexttick read 0"),t.read(0)}U.prototype.resume=function(){var t=this._readableState;return t.flowing||(j("resume"),t.flowing=!t.readableListening,Q0(this,t)),t.paused=!1,this};function Q0(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(X0,t,e))}function X0(t,e){j("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),$o(t),e.flowing&&!e.reading&&t.read(0)}U.prototype.pause=function(){return j("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(j("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function $o(t){var e=t._readableState;for(j("flow",e.flowing);e.flowing&&t.read()!==null;);}U.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(j("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&e.push(o)}e.push(null)}),t.on("data",function(o){if(j("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var a=e.push(o);a||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=(function(a){return function(){return t[a].apply(t,arguments)}})(n));for(var s=0;s<Lo.length;s++)t.on(Lo[s],this.emit.bind(this,Lo[s]));return this._read=function(o){j("wrapped _read",o),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&(U.prototype[Symbol.asyncIterator]=function(){return Co===void 0&&(Co=dc()),Co(this)});Object.defineProperty(U.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(U.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(U.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});U._fromList=xc;Object.defineProperty(U.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function xc(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function jo(t){var e=t._readableState;j("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(ew,e,t))}function ew(t,e){if(j("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(U.from=function(t,e){return qo===void 0&&(qo=yc()),qo(U,t,e)});function Tc(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var Wo=_((jE,Ac)=>{"use strict";Ac.exports=it;var kn=yt().codes,tw=kn.ERR_METHOD_NOT_IMPLEMENTED,rw=kn.ERR_MULTIPLE_CALLBACK,iw=kn.ERR_TRANSFORM_ALREADY_TRANSFORMING,nw=kn.ERR_TRANSFORM_WITH_LENGTH_0,Pn=Bt();tt()(it,Pn);function sw(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new rw);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function it(t){if(!(this instanceof it))return new it(t);Pn.call(this,t),this._transformState={afterTransform:sw.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",ow)}function ow(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){Oc(t,e,r)}):Oc(this,null,null)}it.prototype.push=function(t,e){return this._transformState.needTransform=!1,Pn.prototype.push.call(this,t,e)};it.prototype._transform=function(t,e,r){r(new tw("_transform()"))};it.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};it.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};it.prototype._destroy=function(t,e){Pn.prototype._destroy.call(this,t,function(r){e(r)})};function Oc(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new nw;if(t._transformState.transforming)throw new iw;return t.push(null)}});var Dc=_((FE,Pc)=>{"use strict";Pc.exports=Jr;var kc=Wo();tt()(Jr,kc);function Jr(t){if(!(this instanceof Jr))return new Jr(t);kc.call(this,t)}Jr.prototype._transform=function(t,e,r){r(null,t)}});var jc=_((IE,Nc)=>{"use strict";var Bo;function aw(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var Lc=yt().codes,lw=Lc.ERR_MISSING_ARGS,uw=Lc.ERR_STREAM_DESTROYED;function Cc(t){if(t)throw t}function fw(t){return t.setHeader&&typeof t.abort=="function"}function cw(t,e,r,i){i=aw(i);var n=!1;t.on("close",function(){n=!0}),Bo===void 0&&(Bo=Rn()),Bo(t,{readable:e,writable:r},function(o){if(o)return i(o);n=!0,i()});var s=!1;return function(o){if(!n&&!s){if(s=!0,fw(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();i(o||new uw("pipe"))}}}function qc(t){t()}function hw(t,e){return t.pipe(e)}function dw(t){return!t.length||typeof t[t.length-1]!="function"?Cc:t.pop()}function pw(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=dw(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new lw("streams");var n,s=e.map(function(o,a){var l=a<e.length-1,u=a>0;return cw(o,l,u,function(c){n||(n=c),c&&s.forEach(qc),!l&&(s.forEach(qc),i(n))})});return e.reduce(hw)}Nc.exports=pw});var Gt=_((qe,Qr)=>{var Zr=L("stream");process.env.READABLE_STREAM==="disable"&&Zr?(Qr.exports=Zr.Readable,Object.assign(Qr.exports,Zr),Qr.exports.Stream=Zr):(qe=Qr.exports=ko(),qe.Stream=Zr||qe,qe.Readable=qe,qe.Writable=Mo(),qe.Duplex=Bt(),qe.Transform=Wo(),qe.PassThrough=Dc(),qe.finished=Rn(),qe.pipeline=jc())});var Ko=_(($E,Ic)=>{var gr=[],Xr=[],Uo=function(){};function Ho(t){return~gr.indexOf(t)?!1:(gr.push(t),!0)}function Go(t){Uo=t}function gw(t){for(var e=[],r=0;r<gr.length;r++){if(gr[r].async){e.push(gr[r]);continue}if(gr[r](t))return!0}return e.length?new Promise(function(n){Promise.all(e.map(function(o){return o(t)})).then(function(o){n(o.some(Boolean))})}):!1}function Vo(t){return~Xr.indexOf(t)?!1:(Xr.push(t),!0)}function zo(){Uo.apply(Uo,arguments)}function Fc(t){for(var e=0;e<Xr.length;e++)t=Xr[e].apply(Xr[e],arguments);return t}function Yo(t,e){var r=Object.prototype.hasOwnProperty;for(var i in e)r.call(e,i)&&(t[i]=e[i]);return t}function mw(t){return t.enabled=!1,t.modify=Vo,t.set=Go,t.use=Ho,Yo(function(){return!1},t)}function yw(t){function e(){var r=Array.prototype.slice.call(arguments,0);return zo.call(zo,t,Fc(r,t)),!0}return t.enabled=!0,t.modify=Vo,t.set=Go,t.use=Ho,Yo(e,t)}Ic.exports=function(e){return e.introduce=Yo,e.enabled=gw,e.process=Fc,e.modify=Vo,e.write=zo,e.nope=mw,e.yep=yw,e.set=Go,e.use=Ho,e}});var Wc=_((WE,$c)=>{var bw=Ko(),ww=bw(function t(e,r){return r=r||{},r.namespace=e,r.prod=!0,r.dev=!1,r.force||t.force?t.yep(r):t.nope(r)});$c.exports=ww});var Vc=_((BE,Gc)=>{"use strict";var Ke={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Uc=Object.create(null);for(let t in Ke)Object.hasOwn(Ke,t)&&(Uc[Ke[t]]=t);var ae={to:{},get:{}};ae.get=function(t){let e=t.slice(0,3).toLowerCase(),r,i;switch(e){case"hsl":{r=ae.get.hsl(t),i="hsl";break}case"hwb":{r=ae.get.hwb(t),i="hwb";break}default:{r=ae.get.rgb(t),i="rgb";break}}return r?{model:i,value:r}:null};ae.get.rgb=function(t){if(!t)return null;let e=/^#([a-f\d]{3,4})$/i,r=/^#([a-f\d]{6})([a-f\d]{2})?$/i,i=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,n=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,s=/^(\w+)$/,o=[0,0,0,1],a,l,u;if(a=t.match(r)){for(u=a[2],a=a[1],l=0;l<3;l++){let c=l*2;o[l]=Number.parseInt(a.slice(c,c+2),16)}u&&(o[3]=Number.parseInt(u,16)/255)}else if(a=t.match(e)){for(a=a[1],u=a[3],l=0;l<3;l++)o[l]=Number.parseInt(a[l]+a[l],16);u&&(o[3]=Number.parseInt(u+u,16)/255)}else if(a=t.match(i)){for(l=0;l<3;l++)o[l]=Number.parseInt(a[l+1],10);a[4]&&(o[3]=a[5]?Number.parseFloat(a[4])*.01:Number.parseFloat(a[4]))}else if(a=t.match(n)){for(l=0;l<3;l++)o[l]=Math.round(Number.parseFloat(a[l+1])*2.55);a[4]&&(o[3]=a[5]?Number.parseFloat(a[4])*.01:Number.parseFloat(a[4]))}else return(a=t.match(s))?a[1]==="transparent"?[0,0,0,0]:Object.hasOwn(Ke,a[1])?(o=Ke[a[1]],o[3]=1,o):null:null;for(l=0;l<3;l++)o[l]=St(o[l],0,255);return o[3]=St(o[3],0,1),o};ae.get.hsl=function(t){if(!t)return null;let e=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=t.match(e);if(r){let i=Number.parseFloat(r[4]),n=(Number.parseFloat(r[1])%360+360)%360,s=St(Number.parseFloat(r[2]),0,100),o=St(Number.parseFloat(r[3]),0,100),a=St(Number.isNaN(i)?1:i,0,1);return[n,s,o,a]}return null};ae.get.hwb=function(t){if(!t)return null;let e=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=t.match(e);if(r){let i=Number.parseFloat(r[4]),n=(Number.parseFloat(r[1])%360+360)%360,s=St(Number.parseFloat(r[2]),0,100),o=St(Number.parseFloat(r[3]),0,100),a=St(Number.isNaN(i)?1:i,0,1);return[n,s,o,a]}return null};ae.to.hex=function(...t){return"#"+Dn(t[0])+Dn(t[1])+Dn(t[2])+(t[3]<1?Dn(Math.round(t[3]*255)):"")};ae.to.rgb=function(...t){return t.length<4||t[3]===1?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"};ae.to.rgb.percent=function(...t){let e=Math.round(t[0]/255*100),r=Math.round(t[1]/255*100),i=Math.round(t[2]/255*100);return t.length<4||t[3]===1?"rgb("+e+"%, "+r+"%, "+i+"%)":"rgba("+e+"%, "+r+"%, "+i+"%, "+t[3]+")"};ae.to.hsl=function(...t){return t.length<4||t[3]===1?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};ae.to.hwb=function(...t){let e="";return t.length>=4&&t[3]!==1&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"};ae.to.keyword=function(...t){return Uc[t.slice(0,3)]};function St(t,e,r){return Math.min(Math.max(e,t),r)}function Dn(t){let e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}var zc={};for(let t of Object.keys(Ke))zc[Ke[t]]=t;var M={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},nt=(6/29)**3;function mr(t){let e=t>.0031308?1.055*t**.4166666666666667-.055:t*12.92;return Math.min(Math.max(0,e),1)}function yr(t){return t>.04045?((t+.055)/1.055)**2.4:t/12.92}for(let t of Object.keys(M)){if(!("channels"in M[t]))throw new Error("missing channels property: "+t);if(!("labels"in M[t]))throw new Error("missing channel labels property: "+t);if(M[t].labels.length!==M[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:r}=M[t];delete M[t].channels,delete M[t].labels,Object.defineProperty(M[t],"channels",{value:e}),Object.defineProperty(M[t],"labels",{value:r})}M.rgb.hsl=function(t){let e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.min(e,r,i),s=Math.max(e,r,i),o=s-n,a,l;switch(s){case n:{a=0;break}case e:{a=(r-i)/o;break}case r:{a=2+(i-e)/o;break}case i:{a=4+(e-r)/o;break}}a=Math.min(a*60,360),a<0&&(a+=360);let u=(n+s)/2;return s===n?l=0:u<=.5?l=o/(s+n):l=o/(2-s-n),[a,l*100,u*100]};M.rgb.hsv=function(t){let e,r,i,n,s,o=t[0]/255,a=t[1]/255,l=t[2]/255,u=Math.max(o,a,l),c=u-Math.min(o,a,l),f=function(p){return(u-p)/6/c+1/2};if(c===0)n=0,s=0;else{switch(s=c/u,e=f(o),r=f(a),i=f(l),u){case o:{n=i-r;break}case a:{n=1/3+e-i;break}case l:{n=2/3+r-e;break}}n<0?n+=1:n>1&&(n-=1)}return[n*360,s*100,u*100]};M.rgb.hwb=function(t){let e=t[0],r=t[1],i=t[2],n=M.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(r,i));return i=1-1/255*Math.max(e,Math.max(r,i)),[n,s*100,i*100]};M.rgb.oklab=function(t){let e=yr(t[0]/255),r=yr(t[1]/255),i=yr(t[2]/255),n=Math.cbrt(.4122214708*e+.5363325363*r+.0514459929*i),s=Math.cbrt(.2119034982*e+.6806995451*r+.1073969566*i),o=Math.cbrt(.0883024619*e+.2817188376*r+.6299787005*i),a=.2104542553*n+.793617785*s-.0040720468*o,l=1.9779984951*n-2.428592205*s+.4505937099*o,u=.0259040371*n+.7827717662*s-.808675766*o;return[a*100,l*100,u*100]};M.rgb.cmyk=function(t){let e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.min(1-e,1-r,1-i),s=(1-e-n)/(1-n)||0,o=(1-r-n)/(1-n)||0,a=(1-i-n)/(1-n)||0;return[s*100,o*100,a*100,n*100]};function _w(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}M.rgb.keyword=function(t){let e=zc[t];if(e)return e;let r=Number.POSITIVE_INFINITY,i;for(let n of Object.keys(Ke)){let s=Ke[n],o=_w(t,s);o<r&&(r=o,i=n)}return i};M.keyword.rgb=function(t){return Ke[t]};M.rgb.xyz=function(t){let e=yr(t[0]/255),r=yr(t[1]/255),i=yr(t[2]/255),n=e*.4124564+r*.3575761+i*.1804375,s=e*.2126729+r*.7151522+i*.072175,o=e*.0193339+r*.119192+i*.9503041;return[n*100,s*100,o*100]};M.rgb.lab=function(t){let e=M.rgb.xyz(t),r=e[0],i=e[1],n=e[2];r/=95.047,i/=100,n/=108.883,r=r>nt?r**(1/3):7.787*r+16/116,i=i>nt?i**(1/3):7.787*i+16/116,n=n>nt?n**(1/3):7.787*n+16/116;let s=116*i-16,o=500*(r-i),a=200*(i-n);return[s,o,a]};M.hsl.rgb=function(t){let e=t[0]/360,r=t[1]/100,i=t[2]/100,n,s;if(r===0)return s=i*255,[s,s,s];let o=i<.5?i*(1+r):i+r-i*r,a=2*i-o,l=[0,0,0];for(let u=0;u<3;u++)n=e+1/3*-(u-1),n<0&&n++,n>1&&n--,6*n<1?s=a+(o-a)*6*n:2*n<1?s=o:3*n<2?s=a+(o-a)*(2/3-n)*6:s=a,l[u]=s*255;return l};M.hsl.hsv=function(t){let e=t[0],r=t[1]/100,i=t[2]/100,n=r,s=Math.max(i,.01);i*=2,r*=i<=1?i:2-i,n*=s<=1?s:2-s;let o=(i+r)/2,a=i===0?2*n/(s+n):2*r/(i+r);return[e,a*100,o*100]};M.hsv.rgb=function(t){let e=t[0]/60,r=t[1]/100,i=t[2]/100,n=Math.floor(e)%6,s=e-Math.floor(e),o=255*i*(1-r),a=255*i*(1-r*s),l=255*i*(1-r*(1-s));switch(i*=255,n){case 0:return[i,l,o];case 1:return[a,i,o];case 2:return[o,i,l];case 3:return[o,a,i];case 4:return[l,o,i];case 5:return[i,o,a]}};M.hsv.hsl=function(t){let e=t[0],r=t[1]/100,i=t[2]/100,n=Math.max(i,.01),s,o;o=(2-r)*i;let a=(2-r)*n;return s=r*n,s/=a<=1?a:2-a,s=s||0,o/=2,[e,s*100,o*100]};M.hwb.rgb=function(t){let e=t[0]/360,r=t[1]/100,i=t[2]/100,n=r+i,s;n>1&&(r/=n,i/=n);let o=Math.floor(6*e),a=1-i;s=6*e-o,(o&1)!==0&&(s=1-s);let l=r+s*(a-r),u,c,f;switch(o){default:case 6:case 0:{u=a,c=l,f=r;break}case 1:{u=l,c=a,f=r;break}case 2:{u=r,c=a,f=l;break}case 3:{u=r,c=l,f=a;break}case 4:{u=l,c=r,f=a;break}case 5:{u=a,c=r,f=l;break}}return[u*255,c*255,f*255]};M.cmyk.rgb=function(t){let e=t[0]/100,r=t[1]/100,i=t[2]/100,n=t[3]/100,s=1-Math.min(1,e*(1-n)+n),o=1-Math.min(1,r*(1-n)+n),a=1-Math.min(1,i*(1-n)+n);return[s*255,o*255,a*255]};M.xyz.rgb=function(t){let e=t[0]/100,r=t[1]/100,i=t[2]/100,n,s,o;return n=e*3.2404542+r*-1.5371385+i*-.4985314,s=e*-.969266+r*1.8760108+i*.041556,o=e*.0556434+r*-.2040259+i*1.0572252,n=mr(n),s=mr(s),o=mr(o),[n*255,s*255,o*255]};M.xyz.lab=function(t){let e=t[0],r=t[1],i=t[2];e/=95.047,r/=100,i/=108.883,e=e>nt?e**(1/3):7.787*e+16/116,r=r>nt?r**(1/3):7.787*r+16/116,i=i>nt?i**(1/3):7.787*i+16/116;let n=116*r-16,s=500*(e-r),o=200*(r-i);return[n,s,o]};M.xyz.oklab=function(t){let e=t[0]/100,r=t[1]/100,i=t[2]/100,n=Math.cbrt(.8189330101*e+.3618667424*r-.1288597137*i),s=Math.cbrt(.0329845436*e+.9293118715*r+.0361456387*i),o=Math.cbrt(.0482003018*e+.2643662691*r+.633851707*i),a=.2104542553*n+.793617785*s-.0040720468*o,l=1.9779984951*n-2.428592205*s+.4505937099*o,u=.0259040371*n+.7827717662*s-.808675766*o;return[a*100,l*100,u*100]};M.oklab.oklch=function(t){return M.lab.lch(t)};M.oklab.xyz=function(t){let e=t[0]/100,r=t[1]/100,i=t[2]/100,n=(.999999998*e+.396337792*r+.215803758*i)**3,s=(1.000000008*e-.105561342*r-.063854175*i)**3,o=(1.000000055*e-.089484182*r-1.291485538*i)**3,a=1.227013851*n-.55779998*s+.281256149*o,l=-.040580178*n+1.11225687*s-.071676679*o,u=-.076381285*n-.421481978*s+1.58616322*o;return[a*100,l*100,u*100]};M.oklab.rgb=function(t){let e=t[0]/100,r=t[1]/100,i=t[2]/100,n=(e+.3963377774*r+.2158037573*i)**3,s=(e-.1055613458*r-.0638541728*i)**3,o=(e-.0894841775*r-1.291485548*i)**3,a=mr(4.0767416621*n-3.3077115913*s+.2309699292*o),l=mr(-1.2684380046*n+2.6097574011*s-.3413193965*o),u=mr(-.0041960863*n-.7034186147*s+1.707614701*o);return[a*255,l*255,u*255]};M.oklch.oklab=function(t){return M.lch.lab(t)};M.lab.xyz=function(t){let e=t[0],r=t[1],i=t[2],n,s,o;s=(e+16)/116,n=r/500+s,o=s-i/200;let a=s**3,l=n**3,u=o**3;return s=a>nt?a:(s-16/116)/7.787,n=l>nt?l:(n-16/116)/7.787,o=u>nt?u:(o-16/116)/7.787,n*=95.047,s*=100,o*=108.883,[n,s,o]};M.lab.lch=function(t){let e=t[0],r=t[1],i=t[2],n;n=Math.atan2(i,r)*360/2/Math.PI,n<0&&(n+=360);let o=Math.sqrt(r*r+i*i);return[e,o,n]};M.lch.lab=function(t){let e=t[0],r=t[1],n=t[2]/360*2*Math.PI,s=r*Math.cos(n),o=r*Math.sin(n);return[e,s,o]};M.rgb.ansi16=function(t,e=null){let[r,i,n]=t,s=e===null?M.rgb.hsv(t)[2]:e;if(s=Math.round(s/50),s===0)return 30;let o=30+(Math.round(n/255)<<2|Math.round(i/255)<<1|Math.round(r/255));return s===2&&(o+=60),o};M.hsv.ansi16=function(t){return M.rgb.ansi16(M.hsv.rgb(t),t[2])};M.rgb.ansi256=function(t){let e=t[0],r=t[1],i=t[2];return e>>4===r>>4&&r>>4===i>>4?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5)};M.ansi16.rgb=function(t){t=t[0];let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let r=(Math.trunc(t>50)+1)*.5,i=(e&1)*r*255,n=(e>>1&1)*r*255,s=(e>>2&1)*r*255;return[i,n,s]};M.ansi256.rgb=function(t){if(t=t[0],t>=232){let s=(t-232)*10+8;return[s,s,s]}t-=16;let e,r=Math.floor(t/36)/5*255,i=Math.floor((e=t%36)/6)/5*255,n=e%6/5*255;return[r,i,n]};M.rgb.hex=function(t){let r=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".slice(r.length)+r};M.hex.rgb=function(t){let e=t.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!e)return[0,0,0];let r=e[0];e[0].length===3&&(r=[...r].map(a=>a+a).join(""));let i=Number.parseInt(r,16),n=i>>16&255,s=i>>8&255,o=i&255;return[n,s,o]};M.rgb.hcg=function(t){let e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.max(Math.max(e,r),i),s=Math.min(Math.min(e,r),i),o=n-s,a,l=o<1?s/(1-o):0;return o<=0?a=0:n===e?a=(r-i)/o%6:n===r?a=2+(i-e)/o:a=4+(e-r)/o,a/=6,a%=1,[a*360,o*100,l*100]};M.hsl.hcg=function(t){let e=t[1]/100,r=t[2]/100,i=r<.5?2*e*r:2*e*(1-r),n=0;return i<1&&(n=(r-.5*i)/(1-i)),[t[0],i*100,n*100]};M.hsv.hcg=function(t){let e=t[1]/100,r=t[2]/100,i=e*r,n=0;return i<1&&(n=(r-i)/(1-i)),[t[0],i*100,n*100]};M.hcg.rgb=function(t){let e=t[0]/360,r=t[1]/100,i=t[2]/100;if(r===0)return[i*255,i*255,i*255];let n=[0,0,0],s=e%1*6,o=s%1,a=1-o,l=0;switch(Math.floor(s)){case 0:{n[0]=1,n[1]=o,n[2]=0;break}case 1:{n[0]=a,n[1]=1,n[2]=0;break}case 2:{n[0]=0,n[1]=1,n[2]=o;break}case 3:{n[0]=0,n[1]=a,n[2]=1;break}case 4:{n[0]=o,n[1]=0,n[2]=1;break}default:n[0]=1,n[1]=0,n[2]=a}return l=(1-r)*i,[(r*n[0]+l)*255,(r*n[1]+l)*255,(r*n[2]+l)*255]};M.hcg.hsv=function(t){let e=t[1]/100,r=t[2]/100,i=e+r*(1-e),n=0;return i>0&&(n=e/i),[t[0],n*100,i*100]};M.hcg.hsl=function(t){let e=t[1]/100,i=t[2]/100*(1-e)+.5*e,n=0;return i>0&&i<.5?n=e/(2*i):i>=.5&&i<1&&(n=e/(2*(1-i))),[t[0],n*100,i*100]};M.hcg.hwb=function(t){let e=t[1]/100,r=t[2]/100,i=e+r*(1-e);return[t[0],(i-e)*100,(1-i)*100]};M.hwb.hcg=function(t){let e=t[1]/100,i=1-t[2]/100,n=i-e,s=0;return n<1&&(s=(i-n)/(1-n)),[t[0],n*100,s*100]};M.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};M.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};M.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};M.gray.hsl=function(t){return[0,0,t[0]]};M.gray.hsv=M.gray.hsl;M.gray.hwb=function(t){return[0,100,t[0]]};M.gray.cmyk=function(t){return[0,0,0,t[0]]};M.gray.lab=function(t){return[t[0],0,0]};M.gray.hex=function(t){let e=Math.round(t[0]/100*255)&255,i=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".slice(i.length)+i};M.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]};function vw(){let t={},e=Object.keys(M);for(let{length:r}=e,i=0;i<r;i++)t[e[i]]={distance:-1,parent:null};return t}function Sw(t){let e=vw(),r=[t];for(e[t].distance=0;r.length>0;){let i=r.pop(),n=Object.keys(M[i]);for(let{length:s}=n,o=0;o<s;o++){let a=n[o],l=e[a];l.distance===-1&&(l.distance=e[i].distance+1,l.parent=i,r.unshift(a))}}return e}function Ew(t,e){return function(r){return e(t(r))}}function Rw(t,e){let r=[e[t].parent,t],i=M[e[t].parent][t],n=e[t].parent;for(;e[n].parent;)r.unshift(e[n].parent),i=Ew(M[e[n].parent][n],i),n=e[n].parent;return i.conversion=r,i}function xw(t){let e=Sw(t),r={},i=Object.keys(e);for(let{length:n}=i,s=0;s<n;s++){let o=i[s];e[o].parent!==null&&(r[o]=Rw(o,e))}return r}var le={},Tw=Object.keys(M);function Mw(t){let e=function(...r){let i=r[0];return i==null?i:(i.length>1&&(r=i),t(r))};return"conversion"in t&&(e.conversion=t.conversion),e}function Ow(t){let e=function(...r){let i=r[0];if(i==null)return i;i.length>1&&(r=i);let n=t(r);if(typeof n=="object")for(let{length:s}=n,o=0;o<s;o++)n[o]=Math.round(n[o]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}for(let t of Tw){le[t]={},Object.defineProperty(le[t],"channels",{value:M[t].channels}),Object.defineProperty(le[t],"labels",{value:M[t].labels});let e=xw(t),r=Object.keys(e);for(let i of r){let n=e[i];le[t][i]=Ow(n),le[t][i].raw=Mw(n)}}var Hc=["keyword","gray","hex"],Jo={};for(let t of Object.keys(le))Jo[[...le[t].labels].sort().join("")]=t;var Zo={};function oe(t,e){if(!(this instanceof oe))return new oe(t,e);if(e&&e in Hc&&(e=null),e&&!(e in le))throw new Error("Unknown model: "+e);let r,i;if(t==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof oe)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if(typeof t=="string"){let n=ae.get(t);if(n===null)throw new Error("Unable to parse color from string: "+t);this.model=n.model,i=le[this.model].channels,this.color=n.value.slice(0,i),this.valpha=typeof n.value[i]=="number"?n.value[i]:1}else if(t.length>0){this.model=e||"rgb",i=le[this.model].channels;let n=Array.prototype.slice.call(t,0,i);this.color=Qo(n,i),this.valpha=typeof t[i]=="number"?t[i]:1}else if(typeof t=="number")this.model="rgb",this.color=[t>>16&255,t>>8&255,t&255],this.valpha=1;else{this.valpha=1;let n=Object.keys(t);"alpha"in t&&(n.splice(n.indexOf("alpha"),1),this.valpha=typeof t.alpha=="number"?t.alpha:0);let s=n.sort().join("");if(!(s in Jo))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=Jo[s];let{labels:o}=le[this.model],a=[];for(r=0;r<o.length;r++)a.push(t[o[r]]);this.color=Qo(a)}if(Zo[this.model])for(i=le[this.model].channels,r=0;r<i;r++){let n=Zo[this.model][r];n&&(this.color[r]=n(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}oe.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let e=this.model in ae.to?this:this.rgb();e=e.round(typeof t=="number"?t:1);let r=e.valpha===1?e.color:[...e.color,this.valpha];return ae.to[e.model](...r)},percentString(t){let e=this.rgb().round(typeof t=="number"?t:1),r=e.valpha===1?e.color:[...e.color,this.valpha];return ae.to.rgb.percent(...r)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let t={},{channels:e}=le[this.model],{labels:r}=le[this.model];for(let i=0;i<e;i++)t[r[i]]=this.color[i];return this.valpha!==1&&(t.alpha=this.valpha),t},unitArray(){let t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,this.valpha!==1&&t.push(this.valpha),t},unitObject(){let t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,this.valpha!==1&&(t.alpha=this.valpha),t},round(t){return t=Math.max(t||0,0),new oe([...this.color.map(kw(t)),this.valpha],this.model)},alpha(t){return t!==void 0?new oe([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},red:Z("rgb",0,se(255)),green:Z("rgb",1,se(255)),blue:Z("rgb",2,se(255)),hue:Z(["hsl","hsv","hsl","hwb","hcg"],0,t=>(t%360+360)%360),saturationl:Z("hsl",1,se(100)),lightness:Z("hsl",2,se(100)),saturationv:Z("hsv",1,se(100)),value:Z("hsv",2,se(100)),chroma:Z("hcg",1,se(100)),gray:Z("hcg",2,se(100)),white:Z("hwb",1,se(100)),wblack:Z("hwb",2,se(100)),cyan:Z("cmyk",0,se(100)),magenta:Z("cmyk",1,se(100)),yellow:Z("cmyk",2,se(100)),black:Z("cmyk",3,se(100)),x:Z("xyz",0,se(95.047)),y:Z("xyz",1,se(100)),z:Z("xyz",2,se(108.833)),l:Z("lab",0,se(100)),a:Z("lab",1),b:Z("lab",2),keyword(t){return t!==void 0?new oe(t):le[this.model].keyword(this.color)},hex(t){return t!==void 0?new oe(t):ae.to.hex(...this.rgb().round().color)},hexa(t){if(t!==void 0)return new oe(t);let e=this.rgb().round().color,r=Math.round(this.valpha*255).toString(16).toUpperCase();return r.length===1&&(r="0"+r),ae.to.hex(...e)+r},rgbNumber(){let t=this.rgb().color;return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255},luminosity(){let t=this.rgb().color,e=[];for(let[r,i]of t.entries()){let n=i/255;e[r]=n<=.04045?n/12.92:((n+.055)/1.055)**2.4}return .2126*e[0]+.7152*e[1]+.0722*e[2]},contrast(t){let e=this.luminosity(),r=t.luminosity();return e>r?(e+.05)/(r+.05):(r+.05)/(e+.05)},level(t){let e=this.contrast(t);return e>=7?"AAA":e>=4.5?"AA":""},isDark(){let t=this.rgb().color;return(t[0]*2126+t[1]*7152+t[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let t=this.rgb();for(let e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten(t){let e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){let e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate(t){let e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate(t){let e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten(t){let e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken(t){let e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale(){let t=this.rgb().color,e=t[0]*.3+t[1]*.59+t[2]*.11;return oe.rgb(e,e,e)},fade(t){return this.alpha(this.valpha-this.valpha*t)},opaquer(t){return this.alpha(this.valpha+this.valpha*t)},rotate(t){let e=this.hsl(),r=e.color[0];return r=(r+t)%360,r=r<0?360+r:r,e.color[0]=r,e},mix(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);let r=t.rgb(),i=this.rgb(),n=e===void 0?.5:e,s=2*n-1,o=r.alpha()-i.alpha(),a=((s*o===-1?s:(s+o)/(1+s*o))+1)/2,l=1-a;return oe.rgb(a*r.red()+l*i.red(),a*r.green()+l*i.green(),a*r.blue()+l*i.blue(),r.alpha()*n+i.alpha()*(1-n))}};for(let t of Object.keys(le)){if(Hc.includes(t))continue;let{channels:e}=le[t];oe.prototype[t]=function(...r){return this.model===t?new oe(this):r.length>0?new oe(r,t):new oe([...Pw(le[this.model][t].raw(this.color)),this.valpha],t)},oe[t]=function(...r){let i=r[0];return typeof i=="number"&&(i=Qo(r,e)),new oe(i,t)}}function Aw(t,e){return Number(t.toFixed(e))}function kw(t){return function(e){return Aw(e,t)}}function Z(t,e,r){t=Array.isArray(t)?t:[t];for(let i of t)(Zo[i]||=[])[e]=r;return t=t[0],function(i){let n;return i!==void 0?(r&&(i=r(i)),n=this[t](),n.color[e]=i,n):(n=this[t]().color[e],r&&(n=r(n)),n)}}function se(t){return function(e){return Math.max(0,Math.min(t,e))}}function Pw(t){return Array.isArray(t)?t:[t]}function Qo(t,e){for(let r=0;r<e;r++)typeof t[r]!="number"&&(t[r]=0);return t}function Dw(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Cw=function(e){for(var r=0,i=0;r<e.length;i=e.charCodeAt(r++)+((i<<5)-i));var n=Math.floor(Math.abs(Math.sin(i)*1e4%1*16777216)).toString(16);return"#"+Array(6-n.length+1).join("0")+n},Bc=Dw(Cw);function qw(t,e){let r=t.split(e||":"),i=Bc(r[0]);if(!r.length)return i;for(let n=0,s=r.length-1;n<s;n++)i=oe(i).mix(oe(Bc(r[n+1]))).saturate(1).hex();return i}Gc.exports=qw});var Kc=_((UE,Yc)=>{"use strict";function $e(t,e){if(e)return new $e(t).style(e);if(!(this instanceof $e))return new $e(t);this.text=t}$e.prototype.prefix="\x1B[";$e.prototype.suffix="m";$e.prototype.hex=function(e){e=e[0]==="#"?e.substring(1):e,e.length===3&&(e=e.split(""),e[5]=e[2],e[4]=e[2],e[3]=e[1],e[2]=e[1],e[1]=e[0],e=e.join(""));var r=e.substring(0,2),i=e.substring(2,4),n=e.substring(4,6);return[parseInt(r,16),parseInt(i,16),parseInt(n,16)]};$e.prototype.rgb=function(e,r,i){var n=e/255*5,s=r/255*5,o=i/255*5;return this.ansi(n,s,o)};$e.prototype.ansi=function(e,r,i){var n=Math.round(e),s=Math.round(r),o=Math.round(i);return 16+n*36+s*6+o};$e.prototype.reset=function(){return this.prefix+"39;49"+this.suffix};$e.prototype.style=function(e){return this.prefix+"38;5;"+this.rgb.apply(this,this.hex(e))+this.suffix+this.text+this.reset()};Yc.exports=$e});var Zc=_((zE,Jc)=>{var Lw=Vc(),Nw=Kc();Jc.exports=function(e,r){var i=r.namespace,n=r.colors!==!1?Nw(i+":",Lw(i)):i+":";return e[0]=n+" "+e[0],e}});var Xc=_((HE,Qc)=>{"use strict";Qc.exports=function(e,r){if(!r)return!1;for(var i=r.split(/[\s,]+/),n=0;n<i.length;n++){if(r=i[n].replace("*",".*?"),r.charAt(0)==="-"){if(new RegExp("^"+r.substr(1)+"$").test(e))return!1;continue}if(new RegExp("^"+r+"$").test(e))return!0}return!1}});var th=_((GE,eh)=>{var jw=Xc();eh.exports=function(e){return function(i){try{return jw(i,e())}catch{}return!1}}});var ih=_((VE,rh)=>{var Fw=th();rh.exports=Fw(function(){return process.env.DEBUG||process.env.DIAGNOSTICS})});var sh=_((YE,nh)=>{nh.exports=function(t,e){try{Function.prototype.apply.call(console.log,console,e)}catch{}}});var ah=_((KE,oh)=>{var Iw=Ko(),$w=L("tty").isatty(1),Cn=Iw(function t(e,r){return r=r||{},r.colors="colors"in r?r.colors:$w,r.namespace=e,r.prod=!1,r.dev=!0,!t.enabled(e)&&!(r.force||t.force)?t.nope(r):t.yep(r)});Cn.modify(Zc());Cn.use(ih());Cn.set(sh());oh.exports=Cn});var ei=_((JE,Xo)=>{process.env.NODE_ENV==="production"?Xo.exports=Wc():Xo.exports=ah()});var uh=_((ZE,lh)=>{"use strict";var ea=L("fs"),{StringDecoder:Ww}=L("string_decoder"),{Stream:Bw}=Gt();function Uw(){}lh.exports=(t,e)=>{let r=Buffer.alloc(65536),i=new Ww("utf8"),n=new Bw,s="",o=0,a=0;return t.start===-1&&delete t.start,n.readable=!0,n.destroy=()=>{n.destroyed=!0,n.emit("end"),n.emit("close")},ea.open(t.file,"a+","0644",(l,u)=>{if(l){e?e(l):n.emit("error",l),n.destroy();return}(function c(){if(n.destroyed){ea.close(u,Uw);return}return ea.read(u,r,0,r.length,o,(f,p)=>{if(f){e?e(f):n.emit("error",f),n.destroy();return}if(!p)return s&&((t.start==null||a>t.start)&&(e?e(null,s):n.emit("line",s)),a++,s=""),setTimeout(c,1e3);let m=i.write(r.slice(0,p));e||n.emit("data",m),m=(s+m).split(/\n+/);let d=m.length-1,b=0;for(;b<d;b++)(t.start==null||a>t.start)&&(e?e(null,m[b]):n.emit("line",m[b])),a++;return s=m[d],o+=p,c()})})()}),e?n.destroy:n}});var dh=_((XE,hh)=>{"use strict";var Te=L("fs"),ue=L("path"),fh=Wf(),zw=L("zlib"),{MESSAGE:Hw}=te(),{Stream:Gw,PassThrough:ch}=Gt(),Vw=lr(),We=ei()("winston:file"),Yw=L("os"),Kw=uh();hh.exports=class extends Vw{constructor(e={}){super(e),this.name=e.name||"file";function r(i,...n){n.slice(1).forEach(s=>{if(e[s])throw new Error(`Cannot set ${s} and ${i} together`)})}if(this._stream=new ch,this._stream.setMaxListeners(30),this._onError=this._onError.bind(this),e.filename||e.dirname)r("filename or dirname","stream"),this._basename=this.filename=e.filename?ue.basename(e.filename):"winston.log",this.dirname=e.dirname||ue.dirname(e.filename),this.options=e.options||{flags:"a"};else if(e.stream)console.warn("options.stream will be removed in winston@4. Use winston.transports.Stream"),r("stream","filename","maxsize"),this._dest=this._stream.pipe(this._setupStream(e.stream)),this.dirname=ue.dirname(this._dest.path);else throw new Error("Cannot log to file without filename or stream.");this.maxsize=e.maxsize||null,this.rotationFormat=e.rotationFormat||!1,this.zippedArchive=e.zippedArchive||!1,this.maxFiles=e.maxFiles||null,this.eol=typeof e.eol=="string"?e.eol:Yw.EOL,this.tailable=e.tailable||!1,this.lazy=e.lazy||!1,this._size=0,this._pendingSize=0,this._created=0,this._drain=!1,this._opening=!1,this._ending=!1,this._fileExist=!1,this.dirname&&this._createLogDirIfNotExist(this.dirname),this.lazy||this.open()}finishIfEnding(){this._ending&&(this._opening?this.once("open",()=>{this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())}):(this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())))}log(e,r=()=>{}){if(this.silent)return r(),!0;if(this._drain){this._stream.once("drain",()=>{this._drain=!1,this.log(e,r)});return}if(this._rotate){this._stream.once("rotate",()=>{this._rotate=!1,this.log(e,r)});return}if(this.lazy){if(!this._fileExist){this._opening||this.open(),this.once("open",()=>{this._fileExist=!0,this.log(e,r)});return}if(this._needsNewFile(this._pendingSize)){this._dest.once("close",()=>{this._opening||this.open(),this.once("open",()=>{this.log(e,r)})});return}}let i=`${e[Hw]}${this.eol}`,n=Buffer.byteLength(i);function s(){if(this._size+=n,this._pendingSize-=n,We("logged %s %s",this._size,i),this.emit("logged",e),!this._rotate&&!this._opening&&this._needsNewFile()){if(this.lazy){this._endStream(()=>{this.emit("fileclosed")});return}this._rotate=!0,this._endStream(()=>this._rotateFile())}}this._pendingSize+=n,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize)&&(this.rotatedWhileOpening=!0);let o=this._stream.write(i,s.bind(this));return o?r():(this._drain=!0,this._stream.once("drain",()=>{this._drain=!1,r()})),We("written",o,this._drain),this.finishIfEnding(),o}query(e,r){typeof e=="function"&&(r=e,e={}),e=f(e);let i=ue.join(this.dirname,this.filename),n="",s=[],o=0,a=Te.createReadStream(i,{encoding:"utf8"});a.on("error",p=>{if(a.readable&&a.destroy(),!!r)return p.code!=="ENOENT"?r(p):r(null,s)}),a.on("data",p=>{p=(n+p).split(/\n+/);let m=p.length-1,d=0;for(;d<m;d++)(!e.start||o>=e.start)&&l(p[d]),o++;n=p[m]}),a.on("close",()=>{n&&l(n,!0),e.order==="desc"&&(s=s.reverse()),r&&r(null,s)});function l(p,m){try{let d=JSON.parse(p);c(d)&&u(d)}catch(d){m||a.emit("error",d)}}function u(p){if(e.rows&&s.length>=e.rows&&e.order!=="desc"){a.readable&&a.destroy();return}e.fields&&(p=e.fields.reduce((m,d)=>(m[d]=p[d],m),{})),e.order==="desc"&&s.length>=e.rows&&s.shift(),s.push(p)}function c(p){if(!p||typeof p!="object")return;let m=new Date(p.timestamp);if(!(e.from&&m<e.from||e.until&&m>e.until||e.level&&e.level!==p.level))return!0}function f(p){return p=p||{},p.rows=p.rows||p.limit||10,p.start=p.start||0,p.until=p.until||new Date,typeof p.until!="object"&&(p.until=new Date(p.until)),p.from=p.from||p.until-1440*60*1e3,typeof p.from!="object"&&(p.from=new Date(p.from)),p.order=p.order||"desc",p}}stream(e={}){let r=ue.join(this.dirname,this.filename),i=new Gw,n={file:r,start:e.start};return i.destroy=Kw(n,(s,o)=>{if(s)return i.emit("error",s);try{i.emit("data",o),o=JSON.parse(o),i.emit("log",o)}catch(a){i.emit("error",a)}}),i}open(){this.filename&&(this._opening||(this._opening=!0,this.stat((e,r)=>{if(e)return this.emit("error",e);We("stat done: %s { size: %s }",this.filename,r),this._size=r,this._dest=this._createStream(this._stream),this._opening=!1,this.once("open",()=>{this._stream.emit("rotate")||(this._rotate=!1)})})))}stat(e){let r=this._getFile(),i=ue.join(this.dirname,r);Te.stat(i,(n,s)=>{if(n&&n.code==="ENOENT")return We("ENOENT\xA0ok",i),this.filename=r,e(null,0);if(n)return We(`err ${n.code} ${i}`),e(n);if(!s||this._needsNewFile(s.size))return this._incFile(()=>this.stat(e));this.filename=r,e(null,s.size)})}close(e){this._stream&&this._stream.end(()=>{e&&e(),this.emit("flush"),this.emit("closed")})}_needsNewFile(e){return e=e||this._size,this.maxsize&&e>=this.maxsize}_onError(e){this.emit("error",e)}_setupStream(e){return e.on("error",this._onError),e}_cleanupStream(e){return e.removeListener("error",this._onError),e.destroy(),e}_rotateFile(){this._incFile(()=>this.open())}_endStream(e=()=>{}){this._dest?(this._stream.unpipe(this._dest),this._dest.end(()=>{this._cleanupStream(this._dest),e()})):e()}_createStream(e){let r=ue.join(this.dirname,this.filename);We("create stream start",r,this.options);let i=Te.createWriteStream(r,this.options).on("error",n=>We(n)).on("close",()=>We("close",i.path,i.bytesWritten)).on("open",()=>{We("file open ok",r),this.emit("open",r),e.pipe(i),this.rotatedWhileOpening&&(this._stream=new ch,this._stream.setMaxListeners(30),this._rotateFile(),this.rotatedWhileOpening=!1,this._cleanupStream(i),e.end())});return We("create stream ok",r),i}_incFile(e){We("_incFile",this.filename);let r=ue.extname(this._basename),i=ue.basename(this._basename,r),n=[];this.zippedArchive&&n.push(function(s){let o=this._created>0&&!this.tailable?this._created:"";this._compressFile(ue.join(this.dirname,`${i}${o}${r}`),ue.join(this.dirname,`${i}${o}${r}.gz`),s)}.bind(this)),n.push(function(s){this.tailable?this._checkMaxFilesTailable(r,i,s):(this._created+=1,this._checkMaxFilesIncrementing(r,i,s))}.bind(this)),fh(n,e)}_getFile(){let e=ue.extname(this._basename),r=ue.basename(this._basename,e),i=this.rotationFormat?this.rotationFormat():this._created;return!this.tailable&&this._created?`${r}${i}${e}`:`${r}${e}`}_checkMaxFilesIncrementing(e,r,i){if(!this.maxFiles||this._created<this.maxFiles)return setImmediate(i);let n=this._created-this.maxFiles,s=n!==0?n:"",o=this.zippedArchive?".gz":"",a=`${r}${s}${e}${o}`,l=ue.join(this.dirname,a);Te.unlink(l,i)}_checkMaxFilesTailable(e,r,i){let n=[];if(!this.maxFiles)return;let s=this.zippedArchive?".gz":"";for(let o=this.maxFiles-1;o>1;o--)n.push(function(a,l){let u=`${r}${a-1}${e}${s}`,c=ue.join(this.dirname,u);Te.exists(c,f=>{if(!f)return l(null);u=`${r}${a}${e}${s}`,Te.rename(c,ue.join(this.dirname,u),l)})}.bind(this,o));fh(n,()=>{Te.rename(ue.join(this.dirname,`${r}${e}${s}`),ue.join(this.dirname,`${r}1${e}${s}`),i)})}_compressFile(e,r,i){Te.access(e,Te.F_OK,n=>{if(n)return i();var s=zw.createGzip(),o=Te.createReadStream(e),a=Te.createWriteStream(r);a.on("finish",()=>{Te.unlink(e,i)}),o.pipe(s).pipe(a)})}_createLogDirIfNotExist(e){Te.existsSync(e)||Te.mkdirSync(e,{recursive:!0})}}});var gh=_((t2,ph)=>{"use strict";var Jw=L("http"),Zw=L("https"),{Stream:Qw}=Gt(),Xw=lr(),{configure:e_}=Pr();ph.exports=class extends Xw{constructor(e={}){super(e),this.options=e,this.name=e.name||"http",this.ssl=!!e.ssl,this.host=e.host||"localhost",this.port=e.port,this.auth=e.auth,this.path=e.path||"",this.maximumDepth=e.maximumDepth,this.agent=e.agent,this.headers=e.headers||{},this.headers["content-type"]="application/json",this.batch=e.batch||!1,this.batchInterval=e.batchInterval||5e3,this.batchCount=e.batchCount||10,this.batchOptions=[],this.batchTimeoutID=-1,this.batchCallback={},this.port||(this.port=this.ssl?443:80)}log(e,r){this._request(e,null,null,(i,n)=>{n&&n.statusCode!==200&&(i=new Error(`Invalid HTTP Status Code: ${n.statusCode}`)),i?this.emit("warn",i):this.emit("logged",e)}),r&&setImmediate(r)}query(e,r){typeof e=="function"&&(r=e,e={}),e={method:"query",params:this.normalizeQuery(e)};let i=e.params.auth||null;delete e.params.auth;let n=e.params.path||null;delete e.params.path,this._request(e,i,n,(s,o,a)=>{if(o&&o.statusCode!==200&&(s=new Error(`Invalid HTTP Status Code: ${o.statusCode}`)),s)return r(s);if(typeof a=="string")try{a=JSON.parse(a)}catch(l){return r(l)}r(null,a)})}stream(e={}){let r=new Qw;e={method:"stream",params:e};let i=e.params.path||null;delete e.params.path;let n=e.params.auth||null;delete e.params.auth;let s="",o=this._request(e,n,i);return r.destroy=()=>o.destroy(),o.on("data",a=>{a=(s+a).split(/\n+/);let l=a.length-1,u=0;for(;u<l;u++)try{r.emit("log",JSON.parse(a[u]))}catch(c){r.emit("error",c)}s=a[l]}),o.on("error",a=>r.emit("error",a)),r}_request(e,r,i,n){e=e||{},r=r||this.auth,i=i||this.path||"",this.batch?this._doBatch(e,n,r,i):this._doRequest(e,n,r,i)}_doBatch(e,r,i,n){if(this.batchOptions.push(e),this.batchOptions.length===1){let s=this;this.batchCallback=r,this.batchTimeoutID=setTimeout(function(){s.batchTimeoutID=-1,s._doBatchRequest(s.batchCallback,i,n)},this.batchInterval)}this.batchOptions.length===this.batchCount&&this._doBatchRequest(this.batchCallback,i,n)}_doBatchRequest(e,r,i){this.batchTimeoutID>0&&(clearTimeout(this.batchTimeoutID),this.batchTimeoutID=-1);let n=this.batchOptions.slice();this.batchOptions=[],this._doRequest(n,e,r,i)}_doRequest(e,r,i,n){let s=Object.assign({},this.headers);i&&i.bearer&&(s.Authorization=`Bearer ${i.bearer}`);let o=(this.ssl?Zw:Jw).request({...this.options,method:"POST",host:this.host,port:this.port,path:`/${n.replace(/^\//,"")}`,headers:s,auth:i&&i.username&&i.password?`${i.username}:${i.password}`:"",agent:this.agent});o.on("error",r),o.on("response",l=>l.on("end",()=>r(null,l)).resume());let a=e_({...this.maximumDepth&&{maximumDepth:this.maximumDepth}});o.end(Buffer.from(a(e,this.options.replacer),"utf8"))}}});var ta=_((r2,mh)=>{"use strict";var Je=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";Je.writable=t=>Je(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";Je.readable=t=>Je(t)&&t.readable!==!1&&typeof t._read=="function"&&typeof t._readableState=="object";Je.duplex=t=>Je.writable(t)&&Je.readable(t);Je.transform=t=>Je.duplex(t)&&typeof t._transform=="function";mh.exports=Je});var bh=_((n2,yh)=>{"use strict";var t_=ta(),{MESSAGE:r_}=te(),i_=L("os"),n_=lr();yh.exports=class extends n_{constructor(e={}){if(super(e),!e.stream||!t_(e.stream))throw new Error("options.stream is required.");this._stream=e.stream,this._stream.setMaxListeners(1/0),this.isObjectMode=e.stream._writableState.objectMode,this.eol=typeof e.eol=="string"?e.eol:i_.EOL}log(e,r){if(setImmediate(()=>this.emit("logged",e)),this.isObjectMode){this._stream.write(e),r&&r();return}this._stream.write(`${e[r_]}${this.eol}`),r&&r()}}});var wh=_(ti=>{"use strict";Object.defineProperty(ti,"Console",{configurable:!0,enumerable:!0,get(){return sf()}});Object.defineProperty(ti,"File",{configurable:!0,enumerable:!0,get(){return dh()}});Object.defineProperty(ti,"Http",{configurable:!0,enumerable:!0,get(){return gh()}});Object.defineProperty(ti,"Stream",{configurable:!0,enumerable:!0,get(){return bh()}})});var Ln=_(ri=>{"use strict";var qn=Ls(),{configs:ra}=te();ri.cli=qn.levels(ra.cli);ri.npm=qn.levels(ra.npm);ri.syslog=qn.levels(ra.syslog);ri.addColors=qn.levels});var vh=_((Nn,_h)=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});var s_=tn(),o_=Vt(s_),a_=hn(),l_=Vt(a_),u_=wo(),f_=Vt(u_),c_=mo(),h_=Vt(c_),d_=yo(),p_=Vt(d_),g_=Wt(),m_=Vt(g_),y_=fr(),b_=Vt(y_);function Vt(t){return t&&t.__esModule?t:{default:t}}function w_(t,e,r){r=(0,h_.default)(r);var i=0,n=0,{length:s}=t,o=!1;s===0&&r(null);function a(l,u){l===!1&&(o=!0),o!==!0&&(l?r(l):(++n===s||u===l_.default)&&r(null))}for(;i<s;i++)e(t[i],i,(0,p_.default)(a))}function __(t,e,r){return(0,f_.default)(t,1/0,e,r)}function v_(t,e,r){var i=(0,o_.default)(t)?w_:__;return i(t,(0,m_.default)(e),r)}Nn.default=(0,b_.default)(v_,3);_h.exports=Nn.default});var Eh=_((jn,Sh)=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.default=S_;function S_(t){return(e,r,i)=>t(e,i)}Sh.exports=jn.default});var $n=_((In,Rh)=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});var E_=vh(),R_=Fn(E_),x_=Eh(),T_=Fn(x_),M_=Wt(),O_=Fn(M_),A_=fr(),k_=Fn(A_);function Fn(t){return t&&t.__esModule?t:{default:t}}function P_(t,e,r){return(0,R_.default)(t,(0,T_.default)((0,O_.default)(e)),r)}In.default=(0,k_.default)(P_,3);Rh.exports=In.default});var Th=_((a2,xh)=>{"use strict";var D_=Object.prototype.toString;xh.exports=function(e){if(typeof e.displayName=="string"&&e.constructor.name)return e.displayName;if(typeof e.name=="string"&&e.name)return e.name;if(typeof e=="object"&&e.constructor&&typeof e.constructor.name=="string")return e.constructor.name;var r=e.toString(),i=D_.call(e).slice(8,-1);return i==="Function"?r=r.substring(r.indexOf("(")+1,r.indexOf(")")):r=i,r||"anonymous"}});var ia=_((l2,Mh)=>{"use strict";var C_=Th();Mh.exports=function(e){var r=0,i;function n(){return r||(r=1,i=e.apply(this,arguments),e=null),i}return n.displayName=C_(e),n}});var na=_(ni=>{ni.get=function(t){var e=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var r={},i=Error.prepareStackTrace;Error.prepareStackTrace=function(s,o){return o},Error.captureStackTrace(r,t||ni.get);var n=r.stack;return Error.prepareStackTrace=i,Error.stackTraceLimit=e,n};ni.parse=function(t){if(!t.stack)return[];var e=this,r=t.stack.split(`
32
32
  `).slice(1);return r.map(function(i){if(i.match(/^\s*[-]{4,}$/))return e._createParsedCallSite({fileName:i,lineNumber:null,functionName:null,typeName:null,methodName:null,columnNumber:null,native:null});var n=i.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);if(n){var s=null,o=null,a=null,l=null,u=null,c=n[5]==="native";if(n[1]){a=n[1];var f=a.lastIndexOf(".");if(a[f-1]=="."&&f--,f>0){s=a.substr(0,f),o=a.substr(f+1);var p=s.indexOf(".Module");p>0&&(a=a.substr(p+1),s=s.substr(0,p))}l=null}o&&(l=s,u=o),o==="<anonymous>"&&(u=null,a=null);var m={fileName:n[2]||null,lineNumber:parseInt(n[3],10)||null,functionName:a,typeName:l,methodName:u,columnNumber:parseInt(n[4],10)||null,native:c};return e._createParsedCallSite(m)}}).filter(function(i){return!!i})};function ii(t){for(var e in t)this[e]=t[e]}var q_=["this","typeName","functionName","methodName","fileName","lineNumber","columnNumber","function","evalOrigin"],L_=["topLevel","eval","native","constructor"];q_.forEach(function(t){ii.prototype[t]=null,ii.prototype["get"+t[0].toUpperCase()+t.substr(1)]=function(){return this[t]}});L_.forEach(function(t){ii.prototype[t]=!1,ii.prototype["is"+t[0].toUpperCase()+t.substr(1)]=function(){return this[t]}});ni._createParsedCallSite=function(t){return new ii(t)}});var Ah=_((c2,Oh)=>{"use strict";var{Writable:N_}=Gt();Oh.exports=class extends N_{constructor(e){if(super({objectMode:!0}),!e)throw new Error("ExceptionStream requires a TransportStream instance.");this.handleExceptions=!0,this.transport=e}_write(e,r,i){return e.exception?this.transport.log(e,i):(i(),!0)}}});var oa=_((d2,Dh)=>{"use strict";var kh=L("os"),j_=$n(),sa=ei()("winston:exception"),F_=ia(),Ph=na(),I_=Ah();Dh.exports=class{constructor(e){if(!e)throw new Error("Logger is required to handle exceptions");this.logger=e,this.handlers=new Map}handle(...e){e.forEach(r=>{if(Array.isArray(r))return r.forEach(i=>this._addHandler(i));this._addHandler(r)}),this.catcher||(this.catcher=this._uncaughtException.bind(this),process.on("uncaughtException",this.catcher))}unhandle(){this.catcher&&(process.removeListener("uncaughtException",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach(e=>this.logger.unpipe(e)))}getAllInfo(e){let r=null;return e&&(r=typeof e=="string"?e:e.message),{error:e,level:"error",message:[`uncaughtException: ${r||"(no error message)"}`,e&&e.stack||" No stack trace"].join(`
33
33
  `),stack:e&&e.stack,exception:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:kh.loadavg(),uptime:kh.uptime()}}getTrace(e){return(e?Ph.parse(e):Ph.get()).map(i=>({column:i.getColumnNumber(),file:i.getFileName(),function:i.getFunctionName(),line:i.getLineNumber(),method:i.getMethodName(),native:i.isNative()}))}_addHandler(e){if(!this.handlers.has(e)){e.handleExceptions=!0;let r=new I_(e);this.handlers.set(e,r),this.logger.pipe(r)}}_uncaughtException(e){let r=this.getAllInfo(e),i=this._getExceptionHandlers(),n=typeof this.logger.exitOnError=="function"?this.logger.exitOnError(e):this.logger.exitOnError,s;!i.length&&n&&(console.warn("winston: exitOnError cannot be true with no exception handlers."),console.warn("winston: not exiting process."),n=!1);function o(){sa("doExit",n),sa("process._exiting",process._exiting),n&&!process._exiting&&(s&&clearTimeout(s),process.exit(1))}if(!i||i.length===0)return process.nextTick(o);j_(i,(a,l)=>{let u=F_(l),c=a.transport||a;function f(p){return()=>{sa(p),u()}}c._ending=!0,c.once("finish",f("finished")),c.once("error",f("error"))},()=>n&&o()),this.logger.log(r),n&&(s=setTimeout(o,3e3))}_getExceptionHandlers(){return this.logger.transports.filter(e=>(e.transport||e).handleExceptions)}}});var qh=_((g2,Ch)=>{"use strict";var{Writable:$_}=Gt();Ch.exports=class extends $_{constructor(e){if(super({objectMode:!0}),!e)throw new Error("RejectionStream requires a TransportStream instance.");this.handleRejections=!0,this.transport=e}_write(e,r,i){return e.rejection?this.transport.log(e,i):(i(),!0)}}});var la=_((y2,jh)=>{"use strict";var Lh=L("os"),W_=$n(),aa=ei()("winston:rejection"),B_=ia(),Nh=na(),U_=qh();jh.exports=class{constructor(e){if(!e)throw new Error("Logger is required to handle rejections");this.logger=e,this.handlers=new Map}handle(...e){e.forEach(r=>{if(Array.isArray(r))return r.forEach(i=>this._addHandler(i));this._addHandler(r)}),this.catcher||(this.catcher=this._unhandledRejection.bind(this),process.on("unhandledRejection",this.catcher))}unhandle(){this.catcher&&(process.removeListener("unhandledRejection",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach(e=>this.logger.unpipe(e)))}getAllInfo(e){let r=null;return e&&(r=typeof e=="string"?e:e.message),{error:e,level:"error",message:[`unhandledRejection: ${r||"(no error message)"}`,e&&e.stack||" No stack trace"].join(`
34
34
  `),stack:e&&e.stack,rejection:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:Lh.loadavg(),uptime:Lh.uptime()}}getTrace(e){return(e?Nh.parse(e):Nh.get()).map(i=>({column:i.getColumnNumber(),file:i.getFileName(),function:i.getFunctionName(),line:i.getLineNumber(),method:i.getMethodName(),native:i.isNative()}))}_addHandler(e){if(!this.handlers.has(e)){e.handleRejections=!0;let r=new U_(e);this.handlers.set(e,r),this.logger.pipe(r)}}_unhandledRejection(e){let r=this.getAllInfo(e),i=this._getRejectionHandlers(),n=typeof this.logger.exitOnError=="function"?this.logger.exitOnError(e):this.logger.exitOnError,s;!i.length&&n&&(console.warn("winston: exitOnError cannot be true with no rejection handlers."),console.warn("winston: not exiting process."),n=!1);function o(){aa("doExit",n),aa("process._exiting",process._exiting),n&&!process._exiting&&(s&&clearTimeout(s),process.exit(1))}if(!i||i.length===0)return process.nextTick(o);W_(i,(a,l)=>{let u=B_(l),c=a.transport||a;function f(p){return()=>{aa(p),u()}}c._ending=!0,c.once("finish",f("finished")),c.once("error",f("error"))},()=>n&&o()),this.logger.log(r),n&&(s=setTimeout(o,3e3))}_getRejectionHandlers(){return this.logger.transports.filter(e=>(e.transport||e).handleRejections)}}});var Ih=_((b2,Fh)=>{"use strict";var ua=class{constructor(e){let r=Wn();if(typeof e!="object"||Array.isArray(e)||!(e instanceof r))throw new Error("Logger is required for profiling");this.logger=e,this.start=Date.now()}done(...e){typeof e[e.length-1]=="function"&&(console.warn("Callback function no longer supported as of winston@3.0.0"),e.pop());let r=typeof e[e.length-1]=="object"?e.pop():{};return r.level=r.level||"info",r.durationMs=Date.now()-this.start,this.logger.write(r)}};Fh.exports=ua});var Wn=_((w2,Uh)=>{"use strict";var{Stream:z_,Transform:H_}=Gt(),$h=$n(),{LEVEL:Ze,SPLAT:Wh}=te(),Bh=ta(),G_=oa(),V_=la(),Y_=ho(),K_=Ih(),{warn:J_}=Ns(),Z_=Ln(),Q_=/%[scdjifoO%]/g,Bn=class extends H_{constructor(e){super({objectMode:!0}),this.configure(e)}child(e){let r=this;return Object.create(r,{write:{value:function(i){let n=Object.assign({},e,i);i instanceof Error&&(n.stack=i.stack,n.message=i.message),r.write(n)}}})}configure({silent:e,format:r,defaultMeta:i,levels:n,level:s="info",exitOnError:o=!0,transports:a,colors:l,emitErrs:u,formatters:c,padLevels:f,rewriters:p,stripColors:m,exceptionHandlers:d,rejectionHandlers:b}={}){if(this.transports.length&&this.clear(),this.silent=e,this.format=r||this.format||ks()(),this.defaultMeta=i||null,this.levels=n||this.levels||Z_.npm.levels,this.level=s,this.exceptions&&this.exceptions.unhandle(),this.rejections&&this.rejections.unhandle(),this.exceptions=new G_(this),this.rejections=new V_(this),this.profilers={},this.exitOnError=o,a&&(a=Array.isArray(a)?a:[a],a.forEach(v=>this.add(v))),l||u||c||f||p||m)throw new Error(["{ colors, emitErrs, formatters, padLevels, rewriters, stripColors } were removed in winston@3.0.0.","Use a custom winston.format(function) instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
35
35
  `));d&&this.exceptions.handle(d),b&&this.rejections.handle(b)}getHighestLogLevel(){let e=si(this.levels,this.level);return!this.transports||this.transports.length===0?e:this.transports.reduce((r,i)=>{let n=si(this.levels,i.level);return n!==null&&n>r?n:r},e)}isLevelEnabled(e){let r=si(this.levels,e);if(r===null)return!1;let i=si(this.levels,this.level);return i===null?!1:!this.transports||this.transports.length===0?i>=r:this.transports.findIndex(s=>{let o=si(this.levels,s.level);return o===null&&(o=i),o>=r})!==-1}log(e,r,...i){if(arguments.length===1)return e[Ze]=e.level,this._addDefaultMeta(e),this.write(e),this;if(arguments.length===2)return r&&typeof r=="object"?(r[Ze]=r.level=e,this._addDefaultMeta(r),this.write(r),this):(r={[Ze]:e,level:e,message:r},this._addDefaultMeta(r),this.write(r),this);let[n]=i;if(typeof n=="object"&&n!==null&&!(r&&r.match&&r.match(Q_))){let o=Object.assign({},this.defaultMeta,n,{[Ze]:e,[Wh]:i,level:e,message:r});return n.message&&(o.message=`${o.message} ${n.message}`),n.stack&&(o.stack=n.stack),n.cause&&(o.cause=n.cause),this.write(o),this}return this.write(Object.assign({},this.defaultMeta,{[Ze]:e,[Wh]:i,level:e,message:r})),this}_transform(e,r,i){if(this.silent)return i();e[Ze]||(e[Ze]=e.level),!this.levels[e[Ze]]&&this.levels[e[Ze]]!==0&&console.error("[winston] Unknown logger level: %s",e[Ze]),this._readableState.pipes||console.error("[winston] Attempt to write logs with no transports, which can increase memory usage: %j",e);try{this.push(this.format.transform(e,this.format.options))}finally{this._writableState.sync=!1,i()}}_final(e){let r=this.transports.slice();$h(r,(i,n)=>{if(!i||i.finished)return setImmediate(n);i.once("finish",n),i.end()},e)}add(e){let r=!Bh(e)||e.log.length>2?new Y_({transport:e}):e;if(!r._writableState||!r._writableState.objectMode)throw new Error("Transports must WritableStreams in objectMode. Set { objectMode: true }.");return this._onEvent("error",r),this._onEvent("warn",r),this.pipe(r),e.handleExceptions&&this.exceptions.handle(),e.handleRejections&&this.rejections.handle(),this}remove(e){if(!e)return this;let r=e;return(!Bh(e)||e.log.length>2)&&(r=this.transports.filter(i=>i.transport===e)[0]),r&&this.unpipe(r),this}clear(){return this.unpipe(),this}close(){return this.exceptions.unhandle(),this.rejections.unhandle(),this.clear(),this.emit("close"),this}setLevels(){J_.deprecated("setLevels")}query(e,r){typeof e=="function"&&(r=e,e={}),e=e||{};let i={},n=Object.assign({},e.query||{});function s(a,l){e.query&&typeof a.formatQuery=="function"&&(e.query=a.formatQuery(n)),a.query(e,(u,c)=>{if(u)return l(u);typeof a.formatResults=="function"&&(c=a.formatResults(c,e.format)),l(null,c)})}function o(a,l){s(a,(u,c)=>{l&&(c=u||c,c&&(i[a.name]=c),l()),l=null})}$h(this.transports.filter(a=>!!a.query),o,()=>r(null,i))}stream(e={}){let r=new z_,i=[];return r._streams=i,r.destroy=()=>{let n=i.length;for(;n--;)i[n].destroy()},this.transports.filter(n=>!!n.stream).forEach(n=>{let s=n.stream(e);s&&(i.push(s),s.on("log",o=>{o.transport=o.transport||[],o.transport.push(n.name),r.emit("log",o)}),s.on("error",o=>{o.transport=o.transport||[],o.transport.push(n.name),r.emit("error",o)}))}),r}startTimer(){return new K_(this)}profile(e,...r){let i=Date.now();if(this.profilers[e]){let n=this.profilers[e];delete this.profilers[e],typeof r[r.length-2]=="function"&&(console.warn("Callback function no longer supported as of winston@3.0.0"),r.pop());let s=typeof r[r.length-1]=="object"?r.pop():{};return s.level=s.level||"info",s.durationMs=i-n,s.message=s.message||e,this.write(s)}return this.profilers[e]=i,this}handleExceptions(...e){console.warn("Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()"),this.exceptions.handle(...e)}unhandleExceptions(...e){console.warn("Deprecated: .unhandleExceptions() will be removed in winston@4. Use .exceptions.unhandle()"),this.exceptions.unhandle(...e)}cli(){throw new Error(["Logger.cli() was removed in winston@3.0.0","Use a custom winston.formats.cli() instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
36
- `))}_onEvent(e,r){function i(n){e==="error"&&!this.transports.includes(r)&&this.add(r),this.emit(e,n,r)}r["__winston"+e]||(r["__winston"+e]=i.bind(this),r.on(e,r["__winston"+e]))}_addDefaultMeta(e){this.defaultMeta&&Object.assign(e,this.defaultMeta)}};function si(t,e){let r=t[e];return!r&&r!==0?null:r}Object.defineProperty(Bn.prototype,"transports",{configurable:!1,enumerable:!0,get(){let{pipes:t}=this._readableState;return Array.isArray(t)?t:[t].filter(Boolean)}});Uh.exports=Bn});var fa=_((_2,zh)=>{"use strict";var{LEVEL:X_}=te(),ev=Ln(),tv=Wn(),rv=ei()("winston:create-logger");function iv(t){return"is"+t.charAt(0).toUpperCase()+t.slice(1)+"Enabled"}zh.exports=function(t={}){t.levels=t.levels||ev.npm.levels;class e extends tv{constructor(n){super(n)}}let r=new e(t);return Object.keys(t.levels).forEach(function(i){if(rv('Define prototype method for "%s"',i),i==="log"){console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.');return}e.prototype[i]=function(...n){let s=this||r;if(n.length===1){let[o]=n,a=o&&o.message&&o||{message:o};return a.level=a[X_]=i,s._addDefaultMeta(a),s.write(a),this||r}return n.length===0?(s.log(i,""),s):s.log(i,...n)},e.prototype[iv(i)]=function(){return(this||r).isLevelEnabled(i)}}),r}});var Gh=_((S2,Hh)=>{"use strict";var nv=fa();Hh.exports=class{constructor(e={}){this.loggers=new Map,this.options=e}add(e,r){if(!this.loggers.has(e)){r=Object.assign({},r||this.options);let i=r.transports||this.options.transports;i?r.transports=Array.isArray(i)?i.slice():[i]:r.transports=[];let n=nv(r);n.on("close",()=>this._delete(e)),this.loggers.set(e,n)}return this.loggers.get(e)}get(e,r){return this.add(e,r)}has(e){return!!this.loggers.has(e)}close(e){if(e)return this._removeLogger(e);this.loggers.forEach((r,i)=>this._removeLogger(i))}_removeLogger(e){if(!this.loggers.has(e))return;this.loggers.get(e).close(),this._delete(e)}_delete(e){this.loggers.delete(e)}}});var Yh=_(G=>{"use strict";var Vh=Ls(),{warn:oi}=Ns();G.version=tu().version;G.transports=wh();G.config=Ln();G.addColors=Vh.levels;G.format=Vh.format;G.createLogger=fa();G.Logger=Wn();G.ExceptionHandler=oa();G.RejectionHandler=la();G.Container=Gh();G.Transport=lr();G.loggers=new G.Container;var Qe=G.createLogger();Object.keys(G.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach(t=>G[t]=(...e)=>Qe[t](...e));Object.defineProperty(G,"level",{get(){return Qe.level},set(t){Qe.level=t}});Object.defineProperty(G,"exceptions",{get(){return Qe.exceptions}});Object.defineProperty(G,"rejections",{get(){return Qe.rejections}});["exitOnError"].forEach(t=>{Object.defineProperty(G,t,{get(){return Qe[t]},set(e){Qe[t]=e}})});Object.defineProperty(G,"default",{get(){return{exceptionHandlers:Qe.exceptionHandlers,rejectionHandlers:Qe.rejectionHandlers,transports:Qe.transports}}});oi.deprecated(G,"setLevels");oi.forFunctions(G,"useFormat",["cli"]);oi.forProperties(G,"useFormat",["padLevels","stripColors"]);oi.forFunctions(G,"deprecated",["addRewriter","addFilter","clone","extend"]);oi.forProperties(G,"deprecated",["emitErrs","levelLength"])});var Hn=_((zn,Jh)=>{(function(t,e){typeof zn=="object"&&typeof Jh<"u"?e(zn):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.Superstruct={}))})(zn,(function(t){"use strict";class e extends TypeError{constructor(g,y){let w,{message:O,explanation:D,...W}=g,{path:Z}=g,Q=Z.length===0?O:`At path: ${Z.join(".")} -- ${O}`;super(D??Q),D!=null&&(this.cause=Q),Object.assign(this,W),this.name=this.constructor.name,this.failures=()=>w??(w=[g,...y()])}}function r(h){return i(h)&&typeof h[Symbol.iterator]=="function"}function i(h){return typeof h=="object"&&h!=null}function n(h){return i(h)&&!Array.isArray(h)}function s(h){if(Object.prototype.toString.call(h)!=="[object Object]")return!1;let g=Object.getPrototypeOf(h);return g===null||g===Object.prototype}function o(h){return typeof h=="symbol"?h.toString():typeof h=="string"?JSON.stringify(h):`${h}`}function a(h){let{done:g,value:y}=h.next();return g?void 0:y}function l(h,g,y,w){if(h===!0)return;h===!1?h={}:typeof h=="string"&&(h={message:h});let{path:O,branch:D}=g,{type:W}=y,{refinement:Z,message:Q=`Expected a value of type \`${W}\`${Z?` with refinement \`${Z}\``:""}, but received: \`${o(w)}\``}=h;return{value:w,type:W,refinement:Z,key:O[O.length-1],path:O,branch:D,...h,message:Q}}function*u(h,g,y,w){r(h)||(h=[h]);for(let O of h){let D=l(O,g,y,w);D&&(yield D)}}function*c(h,g,y={}){let{path:w=[],branch:O=[h],coerce:D=!1,mask:W=!1}=y,Z={path:w,branch:O,mask:W};D&&(h=g.coercer(h,Z));let Q="valid";for(let ne of g.validator(h,Z))ne.explanation=y.message,Q="not_valid",yield[ne,void 0];for(let[ne,Pe,rp]of g.entries(h,Z)){let ip=c(Pe,rp,{path:ne===void 0?w:[...w,ne],branch:ne===void 0?O:[...O,Pe],coerce:D,mask:W,message:y.message});for(let Oi of ip)Oi[0]?(Q=Oi[0].refinement!=null?"not_refined":"not_valid",yield[Oi[0],void 0]):D&&(Pe=Oi[1],ne===void 0?h=Pe:h instanceof Map?h.set(ne,Pe):h instanceof Set?h.add(Pe):i(h)&&(Pe!==void 0||ne in h)&&(h[ne]=Pe))}if(Q!=="not_valid")for(let ne of g.refiner(h,Z))ne.explanation=y.message,Q="not_refined",yield[ne,void 0];Q==="valid"&&(yield[void 0,h])}class f{constructor(g){let{type:y,schema:w,validator:O,refiner:D,coercer:W=Q=>Q,entries:Z=function*(){}}=g;this.type=y,this.schema=w,this.entries=Z,this.coercer=W,O?this.validator=(Q,ne)=>{let Pe=O(Q,ne);return u(Pe,ne,this,Q)}:this.validator=()=>[],D?this.refiner=(Q,ne)=>{let Pe=D(Q,ne);return u(Pe,ne,this,Q)}:this.refiner=()=>[]}assert(g,y){return p(g,this,y)}create(g,y){return m(g,this,y)}is(g){return b(g,this)}mask(g,y){return d(g,this,y)}validate(g,y={}){return v(g,this,y)}}function p(h,g,y){let w=v(h,g,{message:y});if(w[0])throw w[0]}function m(h,g,y){let w=v(h,g,{coerce:!0,message:y});if(w[0])throw w[0];return w[1]}function d(h,g,y){let w=v(h,g,{coerce:!0,mask:!0,message:y});if(w[0])throw w[0];return w[1]}function b(h,g){return!v(h,g)[0]}function v(h,g,y={}){let w=c(h,g,y),O=a(w);return O[0]?[new e(O[0],function*(){for(let W of w)W[0]&&(yield W[0])}),void 0]:[void 0,O[1]]}function S(...h){let g=h[0].type==="type",y=h.map(O=>O.schema),w=Object.assign({},...y);return g?ut(w):lt(w)}function T(h,g){return new f({type:h,schema:null,validator:g})}function R(h,g){return new f({...h,refiner:(y,w)=>y===void 0||h.refiner(y,w),validator(y,w){return y===void 0?!0:(g(y,w),h.validator(y,w))}})}function x(h){return new f({type:"dynamic",schema:null,*entries(g,y){yield*h(g,y).entries(g,y)},validator(g,y){return h(g,y).validator(g,y)},coercer(g,y){return h(g,y).coercer(g,y)},refiner(g,y){return h(g,y).refiner(g,y)}})}function k(h){let g;return new f({type:"lazy",schema:null,*entries(y,w){g??(g=h()),yield*g.entries(y,w)},validator(y,w){return g??(g=h()),g.validator(y,w)},coercer(y,w){return g??(g=h()),g.coercer(y,w)},refiner(y,w){return g??(g=h()),g.refiner(y,w)}})}function I(h,g){let{schema:y}=h,w={...y};for(let O of g)delete w[O];switch(h.type){case"type":return ut(w);default:return lt(w)}}function q(h){let g=h instanceof f,y=g?{...h.schema}:{...h};for(let w in y)y[w]=At(y[w]);return g&&h.type==="type"?ut(y):lt(y)}function z(h,g){let{schema:y}=h,w={};for(let O of g)w[O]=y[O];switch(h.type){case"type":return ut(w);default:return lt(w)}}function C(h,g){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),T(h,g)}function V(){return T("any",()=>!0)}function re(h){return new f({type:"array",schema:h,*entries(g){if(h&&Array.isArray(g))for(let[y,w]of g.entries())yield[y,w,h]},coercer(g){return Array.isArray(g)?g.slice():g},validator(g){return Array.isArray(g)||`Expected an array value, but received: ${o(g)}`}})}function ie(){return T("bigint",h=>typeof h=="bigint")}function _e(){return T("boolean",h=>typeof h=="boolean")}function ve(){return T("date",h=>h instanceof Date&&!isNaN(h.getTime())||`Expected a valid \`Date\` object, but received: ${o(h)}`)}function at(h){let g={},y=h.map(w=>o(w)).join();for(let w of h)g[w]=w;return new f({type:"enums",schema:g,validator(w){return h.includes(w)||`Expected one of \`${y}\`, but received: ${o(w)}`}})}function E(){return T("func",h=>typeof h=="function"||`Expected a function, but received: ${o(h)}`)}function A(h){return T("instance",g=>g instanceof h||`Expected a \`${h.name}\` instance, but received: ${o(g)}`)}function H(){return T("integer",h=>typeof h=="number"&&!isNaN(h)&&Number.isInteger(h)||`Expected an integer, but received: ${o(h)}`)}function ye(h){return new f({type:"intersection",schema:null,*entries(g,y){for(let w of h)yield*w.entries(g,y)},*validator(g,y){for(let w of h)yield*w.validator(g,y)},*refiner(g,y){for(let w of h)yield*w.refiner(g,y)}})}function P(h){let g=o(h),y=typeof h;return new f({type:"literal",schema:y==="string"||y==="number"||y==="boolean"?h:null,validator(w){return w===h||`Expected the literal \`${g}\`, but received: ${o(w)}`}})}function ke(h,g){return new f({type:"map",schema:null,*entries(y){if(h&&g&&y instanceof Map)for(let[w,O]of y.entries())yield[w,w,h],yield[w,O,g]},coercer(y){return y instanceof Map?new Map(y):y},validator(y){return y instanceof Map||`Expected a \`Map\` object, but received: ${o(y)}`}})}function Fe(){return T("never",()=>!1)}function Ot(h){return new f({...h,validator:(g,y)=>g===null||h.validator(g,y),refiner:(g,y)=>g===null||h.refiner(g,y)})}function Zt(){return T("number",h=>typeof h=="number"&&!isNaN(h)||`Expected a number, but received: ${o(h)}`)}function lt(h){let g=h?Object.keys(h):[],y=Fe();return new f({type:"object",schema:h||null,*entries(w){if(h&&i(w)){let O=new Set(Object.keys(w));for(let D of g)O.delete(D),yield[D,w[D],h[D]];for(let D of O)yield[D,w[D],y]}},validator(w){return n(w)||`Expected an object, but received: ${o(w)}`},coercer(w,O){if(!n(w))return w;let D={...w};if(O.mask&&h)for(let W in D)h[W]===void 0&&delete D[W];return D}})}function At(h){return new f({...h,validator:(g,y)=>g===void 0||h.validator(g,y),refiner:(g,y)=>g===void 0||h.refiner(g,y)})}function cs(h,g){return new f({type:"record",schema:null,*entries(y){if(i(y))for(let w in y){let O=y[w];yield[w,w,h],yield[w,O,g]}},validator(y){return n(y)||`Expected an object, but received: ${o(y)}`},coercer(y){return n(y)?{...y}:y}})}function Me(){return T("regexp",h=>h instanceof RegExp)}function Ei(h){return new f({type:"set",schema:null,*entries(g){if(h&&g instanceof Set)for(let y of g)yield[y,y,h]},coercer(g){return g instanceof Set?new Set(g):g},validator(g){return g instanceof Set||`Expected a \`Set\` object, but received: ${o(g)}`}})}function Ri(){return T("string",h=>typeof h=="string"||`Expected a string, but received: ${o(h)}`)}function xi(h){let g=Fe();return new f({type:"tuple",schema:null,*entries(y){if(Array.isArray(y)){let w=Math.max(h.length,y.length);for(let O=0;O<w;O++)yield[O,y[O],h[O]||g]}},validator(y){return Array.isArray(y)||`Expected an array, but received: ${o(y)}`},coercer(y){return Array.isArray(y)?y.slice():y}})}function ut(h){let g=Object.keys(h);return new f({type:"type",schema:h,*entries(y){if(i(y))for(let w of g)yield[w,y[w],h[w]]},validator(y){return n(y)||`Expected an object, but received: ${o(y)}`},coercer(y){return n(y)?{...y}:y}})}function Qt(h){let g=h.map(y=>y.type).join(" | ");return new f({type:"union",schema:null,coercer(y,w){for(let O of h){let[D,W]=O.validate(y,{coerce:!0,mask:w.mask});if(!D)return W}return y},validator(y,w){let O=[];for(let D of h){let[...W]=c(y,D,w),[Z]=W;if(Z[0])for(let[Q]of W)Q&&O.push(Q);else return[]}return[`Expected the value to satisfy a union of \`${g}\`, but received: ${o(y)}`,...O]}})}function kt(){return T("unknown",()=>!0)}function Mr(h,g,y){return new f({...h,coercer:(w,O)=>b(w,g)?h.coercer(y(w,O),O):h.coercer(w,O)})}function Pt(h,g,y={}){return Mr(h,kt(),w=>{let O=typeof g=="function"?g():g;if(w===void 0)return O;if(!y.strict&&s(w)&&s(O)){let D={...w},W=!1;for(let Z in O)D[Z]===void 0&&(D[Z]=O[Z],W=!0);if(W)return D}return w})}function ft(h){return Mr(h,Ri(),g=>g.trim())}function Or(h){return Dt(h,"empty",g=>{let y=Ti(g);return y===0||`Expected an empty ${h.type} but received one with a size of \`${y}\``})}function Ti(h){return h instanceof Map||h instanceof Set?h.size:h.length}function Mi(h,g,y={}){let{exclusive:w}=y;return Dt(h,"max",O=>w?O<g:O<=g||`Expected a ${h.type} less than ${w?"":"or equal to "}${g} but received \`${O}\``)}function Qd(h,g,y={}){let{exclusive:w}=y;return Dt(h,"min",O=>w?O>g:O>=g||`Expected a ${h.type} greater than ${w?"":"or equal to "}${g} but received \`${O}\``)}function Xd(h){return Dt(h,"nonempty",g=>Ti(g)>0||`Expected a nonempty ${h.type} but received an empty one`)}function ep(h,g){return Dt(h,"pattern",y=>g.test(y)||`Expected a ${h.type} matching \`/${g.source}/\` but received "${y}"`)}function tp(h,g,y=g){let w=`Expected a ${h.type}`,O=g===y?`of \`${g}\``:`between \`${g}\` and \`${y}\``;return Dt(h,"size",D=>{if(typeof D=="number"||D instanceof Date)return g<=D&&D<=y||`${w} ${O} but received \`${D}\``;if(D instanceof Map||D instanceof Set){let{size:W}=D;return g<=W&&W<=y||`${w} with a size ${O} but received one with a size of \`${W}\``}else{let{length:W}=D;return g<=W&&W<=y||`${w} with a length ${O} but received one with a length of \`${W}\``}})}function Dt(h,g,y){return new f({...h,*refiner(w,O){yield*h.refiner(w,O);let D=y(w,O),W=u(D,O,h,w);for(let Z of W)yield{...Z,refinement:g}}})}t.Struct=f,t.StructError=e,t.any=V,t.array=re,t.assert=p,t.assign=S,t.bigint=ie,t.boolean=_e,t.coerce=Mr,t.create=m,t.date=ve,t.defaulted=Pt,t.define=T,t.deprecated=R,t.dynamic=x,t.empty=Or,t.enums=at,t.func=E,t.instance=A,t.integer=H,t.intersection=ye,t.is=b,t.lazy=k,t.literal=P,t.map=ke,t.mask=d,t.max=Mi,t.min=Qd,t.never=Fe,t.nonempty=Xd,t.nullable=Ot,t.number=Zt,t.object=lt,t.omit=I,t.optional=At,t.partial=q,t.pattern=ep,t.pick=z,t.record=cs,t.refine=Dt,t.regexp=Me,t.set=Ei,t.size=tp,t.string=Ri,t.struct=C,t.trimmed=ft,t.tuple=xi,t.type=ut,t.union=Qt,t.unknown=kt,t.validate=v}))});import eS from"yargs";import{hideBin as tS}from"yargs/helpers";import me from"node:path";import Mt from"node:fs/promises";import{fileURLToPath as rS}from"node:url";import Da from"fs-extra";import{loadPyodide as Yd,version as iS}from"pyodide";import Kh from"node:path";import sv from"node:fs/promises";var Et=Ai(Yh(),1),$=Et.createLogger({transports:[new Et.transports.Console({format:Et.format.combine(Et.format.splat(),Et.format.cli())})]});function ai(t){process.emitWarning(t,{type:"DeprecationWarning"})}var Un=class{sourceUrl;isRemote;_data=null;constructor(e){e.startsWith("file://")&&(e=e.slice(7)),this.sourceUrl=e,this.isRemote=e.includes("://")}async readJson(e){if(this.isRemote){let r=Kh.posix.join(this.sourceUrl,e);$.debug(`Fetching ${r}`);let i=await fetch(r);if(!i.ok)throw new Error(`Failed to download ${r}: ${i.status} ${i.statusText}`);return await i.json()}else{let r=Kh.join(this.sourceUrl,e);$.debug(`Reading ${r}`);let i=await sv.readFile(r);return JSON.parse(i.toString())}}async loadPrebuiltPackageData(){if(this._data!=null)return this._data;$.info("Load pyodide-lock.json");let e=await this.readJson("pyodide-lock.json");return this._data=e.packages,e.packages}async getPackageInfoByName(e){let r=await this.loadPrebuiltPackageData(),i=Object.values(r).find(n=>n.name===e);if(i==null)throw new Error(`Package ${e} is not found in the lock file.`);return i}};var Qh=Ai(Hn(),1);import ov from"node:fs/promises";var X=Ai(Hn(),1),Zh=X.object({entrypoint:X.string(),embed:X.defaulted(X.boolean(),!1),idbfsMountpoints:X.optional(X.array(X.string())),nodeJsWorker:X.defaulted(X.boolean(),!1),nodefsMountpoints:X.optional(X.record(X.string(),X.string()))});function av(t){let e=Qh.mask(t??{},Zh);if(e.nodeJsWorker){if(e.idbfsMountpoints!=null)throw new Error("The `idbfsMountpoints` field is not allowed when `nodeJsWorker` is true.")}else if(e.nodefsMountpoints!=null)throw new Error("The `nodefsMountpoints` field is not allowed when `nodeJsWorker` is false.");return e}async function Xh(t){let e=av({...t.packageJsonStliteDesktopField,...t.fallbacks});$.info("App manifest: %j",e);let r=JSON.stringify(e,null,2);$.info(`Dump the manifest file -> ${t.manifestFilePath}`),await ov.writeFile(t.manifestFilePath,r,{encoding:"utf-8"})}var pe=Ai(Hn(),1);import lv from"node:path";async function ed(t){let{files:e,entrypoint:r}=uv(t),i=await fv(t),n=await cv(t);return{files:e,entrypoint:r,dependencies:i,requirementsTxtFilePaths:n}}function uv(t){let{packageJsonStliteDesktopField:e,fallbacks:{appHomeDirSource:r}}=t,i=e?.files,n=e?.entrypoint;if(i==null||n==null){ai("Missing `stlite.desktop.files` and `stlite.desktop.entrypoint` in `package.json`. Falling back to the `appHomeDirSource` argument to determine the app directory. Please update your `package.json` as this fallback is deprecated and will be removed in a future release.");let s=r;if(typeof s!="string")throw new Error("The `appHomeDirSource` argument is required when `stlite.desktop.files` and `stlite.desktop.entrypoint` are not found in the package.json. Note that `appHomeDirSource` is deprecated and will be removed in the future, so please specify `stlite.desktop.files` and `stlite.desktop.entrypoint` in the package.json.");i=[s],n=`./${s}/streamlit_app.py`}else r!=null&&ai("The `appHomeDirSource` argument is deprecated and has been ignored because `stlite.desktop.files` is specified in `package.json`.");return pe.assert(n,pe.string(),"The `stlite.desktop.entrypoint` field must be a string."),pe.assert(i,pe.array(pe.string()),"The `stlite.desktop.files` field must be an array of strings."),{files:i,entrypoint:n}}async function fv(t){let{packageJsonStliteDesktopField:e,fallbacks:{packages:r}}=t,i=e?.dependencies;pe.assert(i,pe.optional(pe.array(pe.string())),"The `stlite.desktop.dependencies` field must be an array of strings.");let n=[];return r!=null&&(ai("The `packages` argument is deprecated and will be removed in a future release. Use `stlite.desktop.dependencies` in your `package.json` instead."),n=r),[...i??[],...n]}async function cv(t){let{pathResolutionRoot:e,packageJsonStliteDesktopField:r,fallbacks:{requirementsTxtFilePaths:i}}=t,n=r?.requirementsTxtFiles;pe.assert(n,pe.optional(pe.array(pe.string())),"The `stlite.desktop.requirementsTxtFiles` field must be an array of strings.");let s=n?.map(a=>lv.resolve(e,a)),o=[];return i!=null&&i.length>0&&(ai("The `requirement` argument is deprecated and will be removed in a future release. Use `stlite.desktop.requirementsTxtFiles` in your `package.json` instead."),o=i),[...s??[],...o]}var hv="(<=>!~";var dv=new RegExp(`[${"["+hv+";@"}]`);function pv(t){return t.split(dv)[0].trim()}function td(t){return t.forEach(r=>{let i;try{i=new URL(r)}catch{return}if(i.protocol==="emfs:"||i.protocol==="file:")throw new Error(`"emfs:" and "file:" protocols are not allowed for the requirement (${r})`)}),t.filter(r=>pv(r)==="streamlit"?(console.warn(`Streamlit is specified in the requirements ("${r}"), but it will be ignored. A built-in version of Streamlit will be used.`),!1):!0)}var gv=/\s#.*$/;function rd(t){return t.split(`
36
+ `))}_onEvent(e,r){function i(n){e==="error"&&!this.transports.includes(r)&&this.add(r),this.emit(e,n,r)}r["__winston"+e]||(r["__winston"+e]=i.bind(this),r.on(e,r["__winston"+e]))}_addDefaultMeta(e){this.defaultMeta&&Object.assign(e,this.defaultMeta)}};function si(t,e){let r=t[e];return!r&&r!==0?null:r}Object.defineProperty(Bn.prototype,"transports",{configurable:!1,enumerable:!0,get(){let{pipes:t}=this._readableState;return Array.isArray(t)?t:[t].filter(Boolean)}});Uh.exports=Bn});var fa=_((_2,zh)=>{"use strict";var{LEVEL:X_}=te(),ev=Ln(),tv=Wn(),rv=ei()("winston:create-logger");function iv(t){return"is"+t.charAt(0).toUpperCase()+t.slice(1)+"Enabled"}zh.exports=function(t={}){t.levels=t.levels||ev.npm.levels;class e extends tv{constructor(n){super(n)}}let r=new e(t);return Object.keys(t.levels).forEach(function(i){if(rv('Define prototype method for "%s"',i),i==="log"){console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.');return}e.prototype[i]=function(...n){let s=this||r;if(n.length===1){let[o]=n,a=o&&o.message&&o||{message:o};return a.level=a[X_]=i,s._addDefaultMeta(a),s.write(a),this||r}return n.length===0?(s.log(i,""),s):s.log(i,...n)},e.prototype[iv(i)]=function(){return(this||r).isLevelEnabled(i)}}),r}});var Gh=_((S2,Hh)=>{"use strict";var nv=fa();Hh.exports=class{constructor(e={}){this.loggers=new Map,this.options=e}add(e,r){if(!this.loggers.has(e)){r=Object.assign({},r||this.options);let i=r.transports||this.options.transports;i?r.transports=Array.isArray(i)?i.slice():[i]:r.transports=[];let n=nv(r);n.on("close",()=>this._delete(e)),this.loggers.set(e,n)}return this.loggers.get(e)}get(e,r){return this.add(e,r)}has(e){return!!this.loggers.has(e)}close(e){if(e)return this._removeLogger(e);this.loggers.forEach((r,i)=>this._removeLogger(i))}_removeLogger(e){if(!this.loggers.has(e))return;this.loggers.get(e).close(),this._delete(e)}_delete(e){this.loggers.delete(e)}}});var Yh=_(G=>{"use strict";var Vh=Ls(),{warn:oi}=Ns();G.version=tu().version;G.transports=wh();G.config=Ln();G.addColors=Vh.levels;G.format=Vh.format;G.createLogger=fa();G.Logger=Wn();G.ExceptionHandler=oa();G.RejectionHandler=la();G.Container=Gh();G.Transport=lr();G.loggers=new G.Container;var Qe=G.createLogger();Object.keys(G.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach(t=>G[t]=(...e)=>Qe[t](...e));Object.defineProperty(G,"level",{get(){return Qe.level},set(t){Qe.level=t}});Object.defineProperty(G,"exceptions",{get(){return Qe.exceptions}});Object.defineProperty(G,"rejections",{get(){return Qe.rejections}});["exitOnError"].forEach(t=>{Object.defineProperty(G,t,{get(){return Qe[t]},set(e){Qe[t]=e}})});Object.defineProperty(G,"default",{get(){return{exceptionHandlers:Qe.exceptionHandlers,rejectionHandlers:Qe.rejectionHandlers,transports:Qe.transports}}});oi.deprecated(G,"setLevels");oi.forFunctions(G,"useFormat",["cli"]);oi.forProperties(G,"useFormat",["padLevels","stripColors"]);oi.forFunctions(G,"deprecated",["addRewriter","addFilter","clone","extend"]);oi.forProperties(G,"deprecated",["emitErrs","levelLength"])});var Hn=_((zn,Jh)=>{(function(t,e){typeof zn=="object"&&typeof Jh<"u"?e(zn):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.Superstruct={}))})(zn,(function(t){"use strict";class e extends TypeError{constructor(g,y){let w,{message:O,explanation:D,...W}=g,{path:Q}=g,X=Q.length===0?O:`At path: ${Q.join(".")} -- ${O}`;super(D??X),D!=null&&(this.cause=X),Object.assign(this,W),this.name=this.constructor.name,this.failures=()=>w??(w=[g,...y()])}}function r(h){return i(h)&&typeof h[Symbol.iterator]=="function"}function i(h){return typeof h=="object"&&h!=null}function n(h){return i(h)&&!Array.isArray(h)}function s(h){if(Object.prototype.toString.call(h)!=="[object Object]")return!1;let g=Object.getPrototypeOf(h);return g===null||g===Object.prototype}function o(h){return typeof h=="symbol"?h.toString():typeof h=="string"?JSON.stringify(h):`${h}`}function a(h){let{done:g,value:y}=h.next();return g?void 0:y}function l(h,g,y,w){if(h===!0)return;h===!1?h={}:typeof h=="string"&&(h={message:h});let{path:O,branch:D}=g,{type:W}=y,{refinement:Q,message:X=`Expected a value of type \`${W}\`${Q?` with refinement \`${Q}\``:""}, but received: \`${o(w)}\``}=h;return{value:w,type:W,refinement:Q,key:O[O.length-1],path:O,branch:D,...h,message:X}}function*u(h,g,y,w){r(h)||(h=[h]);for(let O of h){let D=l(O,g,y,w);D&&(yield D)}}function*c(h,g,y={}){let{path:w=[],branch:O=[h],coerce:D=!1,mask:W=!1}=y,Q={path:w,branch:O,mask:W};D&&(h=g.coercer(h,Q));let X="valid";for(let ne of g.validator(h,Q))ne.explanation=y.message,X="not_valid",yield[ne,void 0];for(let[ne,Pe,rp]of g.entries(h,Q)){let ip=c(Pe,rp,{path:ne===void 0?w:[...w,ne],branch:ne===void 0?O:[...O,Pe],coerce:D,mask:W,message:y.message});for(let Oi of ip)Oi[0]?(X=Oi[0].refinement!=null?"not_refined":"not_valid",yield[Oi[0],void 0]):D&&(Pe=Oi[1],ne===void 0?h=Pe:h instanceof Map?h.set(ne,Pe):h instanceof Set?h.add(Pe):i(h)&&(Pe!==void 0||ne in h)&&(h[ne]=Pe))}if(X!=="not_valid")for(let ne of g.refiner(h,Q))ne.explanation=y.message,X="not_refined",yield[ne,void 0];X==="valid"&&(yield[void 0,h])}class f{constructor(g){let{type:y,schema:w,validator:O,refiner:D,coercer:W=X=>X,entries:Q=function*(){}}=g;this.type=y,this.schema=w,this.entries=Q,this.coercer=W,O?this.validator=(X,ne)=>{let Pe=O(X,ne);return u(Pe,ne,this,X)}:this.validator=()=>[],D?this.refiner=(X,ne)=>{let Pe=D(X,ne);return u(Pe,ne,this,X)}:this.refiner=()=>[]}assert(g,y){return p(g,this,y)}create(g,y){return m(g,this,y)}is(g){return b(g,this)}mask(g,y){return d(g,this,y)}validate(g,y={}){return v(g,this,y)}}function p(h,g,y){let w=v(h,g,{message:y});if(w[0])throw w[0]}function m(h,g,y){let w=v(h,g,{coerce:!0,message:y});if(w[0])throw w[0];return w[1]}function d(h,g,y){let w=v(h,g,{coerce:!0,mask:!0,message:y});if(w[0])throw w[0];return w[1]}function b(h,g){return!v(h,g)[0]}function v(h,g,y={}){let w=c(h,g,y),O=a(w);return O[0]?[new e(O[0],function*(){for(let W of w)W[0]&&(yield W[0])}),void 0]:[void 0,O[1]]}function S(...h){let g=h[0].type==="type",y=h.map(O=>O.schema),w=Object.assign({},...y);return g?ut(w):lt(w)}function T(h,g){return new f({type:h,schema:null,validator:g})}function R(h,g){return new f({...h,refiner:(y,w)=>y===void 0||h.refiner(y,w),validator(y,w){return y===void 0?!0:(g(y,w),h.validator(y,w))}})}function x(h){return new f({type:"dynamic",schema:null,*entries(g,y){yield*h(g,y).entries(g,y)},validator(g,y){return h(g,y).validator(g,y)},coercer(g,y){return h(g,y).coercer(g,y)},refiner(g,y){return h(g,y).refiner(g,y)}})}function k(h){let g;return new f({type:"lazy",schema:null,*entries(y,w){g??(g=h()),yield*g.entries(y,w)},validator(y,w){return g??(g=h()),g.validator(y,w)},coercer(y,w){return g??(g=h()),g.coercer(y,w)},refiner(y,w){return g??(g=h()),g.refiner(y,w)}})}function I(h,g){let{schema:y}=h,w={...y};for(let O of g)delete w[O];switch(h.type){case"type":return ut(w);default:return lt(w)}}function q(h){let g=h instanceof f,y=g?{...h.schema}:{...h};for(let w in y)y[w]=At(y[w]);return g&&h.type==="type"?ut(y):lt(y)}function z(h,g){let{schema:y}=h,w={};for(let O of g)w[O]=y[O];switch(h.type){case"type":return ut(w);default:return lt(w)}}function C(h,g){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),T(h,g)}function V(){return T("any",()=>!0)}function re(h){return new f({type:"array",schema:h,*entries(g){if(h&&Array.isArray(g))for(let[y,w]of g.entries())yield[y,w,h]},coercer(g){return Array.isArray(g)?g.slice():g},validator(g){return Array.isArray(g)||`Expected an array value, but received: ${o(g)}`}})}function ie(){return T("bigint",h=>typeof h=="bigint")}function _e(){return T("boolean",h=>typeof h=="boolean")}function ve(){return T("date",h=>h instanceof Date&&!isNaN(h.getTime())||`Expected a valid \`Date\` object, but received: ${o(h)}`)}function at(h){let g={},y=h.map(w=>o(w)).join();for(let w of h)g[w]=w;return new f({type:"enums",schema:g,validator(w){return h.includes(w)||`Expected one of \`${y}\`, but received: ${o(w)}`}})}function E(){return T("func",h=>typeof h=="function"||`Expected a function, but received: ${o(h)}`)}function A(h){return T("instance",g=>g instanceof h||`Expected a \`${h.name}\` instance, but received: ${o(g)}`)}function H(){return T("integer",h=>typeof h=="number"&&!isNaN(h)&&Number.isInteger(h)||`Expected an integer, but received: ${o(h)}`)}function ye(h){return new f({type:"intersection",schema:null,*entries(g,y){for(let w of h)yield*w.entries(g,y)},*validator(g,y){for(let w of h)yield*w.validator(g,y)},*refiner(g,y){for(let w of h)yield*w.refiner(g,y)}})}function P(h){let g=o(h),y=typeof h;return new f({type:"literal",schema:y==="string"||y==="number"||y==="boolean"?h:null,validator(w){return w===h||`Expected the literal \`${g}\`, but received: ${o(w)}`}})}function ke(h,g){return new f({type:"map",schema:null,*entries(y){if(h&&g&&y instanceof Map)for(let[w,O]of y.entries())yield[w,w,h],yield[w,O,g]},coercer(y){return y instanceof Map?new Map(y):y},validator(y){return y instanceof Map||`Expected a \`Map\` object, but received: ${o(y)}`}})}function Fe(){return T("never",()=>!1)}function Ot(h){return new f({...h,validator:(g,y)=>g===null||h.validator(g,y),refiner:(g,y)=>g===null||h.refiner(g,y)})}function Zt(){return T("number",h=>typeof h=="number"&&!isNaN(h)||`Expected a number, but received: ${o(h)}`)}function lt(h){let g=h?Object.keys(h):[],y=Fe();return new f({type:"object",schema:h||null,*entries(w){if(h&&i(w)){let O=new Set(Object.keys(w));for(let D of g)O.delete(D),yield[D,w[D],h[D]];for(let D of O)yield[D,w[D],y]}},validator(w){return n(w)||`Expected an object, but received: ${o(w)}`},coercer(w,O){if(!n(w))return w;let D={...w};if(O.mask&&h)for(let W in D)h[W]===void 0&&delete D[W];return D}})}function At(h){return new f({...h,validator:(g,y)=>g===void 0||h.validator(g,y),refiner:(g,y)=>g===void 0||h.refiner(g,y)})}function cs(h,g){return new f({type:"record",schema:null,*entries(y){if(i(y))for(let w in y){let O=y[w];yield[w,w,h],yield[w,O,g]}},validator(y){return n(y)||`Expected an object, but received: ${o(y)}`},coercer(y){return n(y)?{...y}:y}})}function Me(){return T("regexp",h=>h instanceof RegExp)}function Ei(h){return new f({type:"set",schema:null,*entries(g){if(h&&g instanceof Set)for(let y of g)yield[y,y,h]},coercer(g){return g instanceof Set?new Set(g):g},validator(g){return g instanceof Set||`Expected a \`Set\` object, but received: ${o(g)}`}})}function Ri(){return T("string",h=>typeof h=="string"||`Expected a string, but received: ${o(h)}`)}function xi(h){let g=Fe();return new f({type:"tuple",schema:null,*entries(y){if(Array.isArray(y)){let w=Math.max(h.length,y.length);for(let O=0;O<w;O++)yield[O,y[O],h[O]||g]}},validator(y){return Array.isArray(y)||`Expected an array, but received: ${o(y)}`},coercer(y){return Array.isArray(y)?y.slice():y}})}function ut(h){let g=Object.keys(h);return new f({type:"type",schema:h,*entries(y){if(i(y))for(let w of g)yield[w,y[w],h[w]]},validator(y){return n(y)||`Expected an object, but received: ${o(y)}`},coercer(y){return n(y)?{...y}:y}})}function Qt(h){let g=h.map(y=>y.type).join(" | ");return new f({type:"union",schema:null,coercer(y,w){for(let O of h){let[D,W]=O.validate(y,{coerce:!0,mask:w.mask});if(!D)return W}return y},validator(y,w){let O=[];for(let D of h){let[...W]=c(y,D,w),[Q]=W;if(Q[0])for(let[X]of W)X&&O.push(X);else return[]}return[`Expected the value to satisfy a union of \`${g}\`, but received: ${o(y)}`,...O]}})}function kt(){return T("unknown",()=>!0)}function Mr(h,g,y){return new f({...h,coercer:(w,O)=>b(w,g)?h.coercer(y(w,O),O):h.coercer(w,O)})}function Pt(h,g,y={}){return Mr(h,kt(),w=>{let O=typeof g=="function"?g():g;if(w===void 0)return O;if(!y.strict&&s(w)&&s(O)){let D={...w},W=!1;for(let Q in O)D[Q]===void 0&&(D[Q]=O[Q],W=!0);if(W)return D}return w})}function ft(h){return Mr(h,Ri(),g=>g.trim())}function Or(h){return Dt(h,"empty",g=>{let y=Ti(g);return y===0||`Expected an empty ${h.type} but received one with a size of \`${y}\``})}function Ti(h){return h instanceof Map||h instanceof Set?h.size:h.length}function Mi(h,g,y={}){let{exclusive:w}=y;return Dt(h,"max",O=>w?O<g:O<=g||`Expected a ${h.type} less than ${w?"":"or equal to "}${g} but received \`${O}\``)}function Qd(h,g,y={}){let{exclusive:w}=y;return Dt(h,"min",O=>w?O>g:O>=g||`Expected a ${h.type} greater than ${w?"":"or equal to "}${g} but received \`${O}\``)}function Xd(h){return Dt(h,"nonempty",g=>Ti(g)>0||`Expected a nonempty ${h.type} but received an empty one`)}function ep(h,g){return Dt(h,"pattern",y=>g.test(y)||`Expected a ${h.type} matching \`/${g.source}/\` but received "${y}"`)}function tp(h,g,y=g){let w=`Expected a ${h.type}`,O=g===y?`of \`${g}\``:`between \`${g}\` and \`${y}\``;return Dt(h,"size",D=>{if(typeof D=="number"||D instanceof Date)return g<=D&&D<=y||`${w} ${O} but received \`${D}\``;if(D instanceof Map||D instanceof Set){let{size:W}=D;return g<=W&&W<=y||`${w} with a size ${O} but received one with a size of \`${W}\``}else{let{length:W}=D;return g<=W&&W<=y||`${w} with a length ${O} but received one with a length of \`${W}\``}})}function Dt(h,g,y){return new f({...h,*refiner(w,O){yield*h.refiner(w,O);let D=y(w,O),W=u(D,O,h,w);for(let Q of W)yield{...Q,refinement:g}}})}t.Struct=f,t.StructError=e,t.any=V,t.array=re,t.assert=p,t.assign=S,t.bigint=ie,t.boolean=_e,t.coerce=Mr,t.create=m,t.date=ve,t.defaulted=Pt,t.define=T,t.deprecated=R,t.dynamic=x,t.empty=Or,t.enums=at,t.func=E,t.instance=A,t.integer=H,t.intersection=ye,t.is=b,t.lazy=k,t.literal=P,t.map=ke,t.mask=d,t.max=Mi,t.min=Qd,t.never=Fe,t.nonempty=Xd,t.nullable=Ot,t.number=Zt,t.object=lt,t.omit=I,t.optional=At,t.partial=q,t.pattern=ep,t.pick=z,t.record=cs,t.refine=Dt,t.regexp=Me,t.set=Ei,t.size=tp,t.string=Ri,t.struct=C,t.trimmed=ft,t.tuple=xi,t.type=ut,t.union=Qt,t.unknown=kt,t.validate=v}))});import eS from"yargs";import{hideBin as tS}from"yargs/helpers";import me from"node:path";import Mt from"node:fs/promises";import{fileURLToPath as rS}from"node:url";import Da from"fs-extra";import{loadPyodide as Yd,version as iS}from"pyodide";import Kh from"node:path";import sv from"node:fs/promises";var Et=Ai(Yh(),1),$=Et.createLogger({transports:[new Et.transports.Console({format:Et.format.combine(Et.format.splat(),Et.format.cli())})]});function ai(t){process.emitWarning(t,{type:"DeprecationWarning"})}var Un=class{sourceUrl;isRemote;_data=null;constructor(e){e.startsWith("file://")&&(e=e.slice(7)),this.sourceUrl=e,this.isRemote=e.includes("://")}async readJson(e){if(this.isRemote){let r=Kh.posix.join(this.sourceUrl,e);$.debug(`Fetching ${r}`);let i=await fetch(r);if(!i.ok)throw new Error(`Failed to download ${r}: ${i.status} ${i.statusText}`);return await i.json()}else{let r=Kh.join(this.sourceUrl,e);$.debug(`Reading ${r}`);let i=await sv.readFile(r);return JSON.parse(i.toString())}}async loadPrebuiltPackageData(){if(this._data!=null)return this._data;$.info("Load pyodide-lock.json");let e=await this.readJson("pyodide-lock.json");return this._data=e.packages,e.packages}async getPackageInfoByName(e){let r=await this.loadPrebuiltPackageData(),i=Object.values(r).find(n=>n.name===e);if(i==null)throw new Error(`Package ${e} is not found in the lock file.`);return i}};var Qh=Ai(Hn(),1);import ov from"node:fs/promises";var Y=Ai(Hn(),1),Zh=Y.object({entrypoint:Y.string(),embed:Y.defaulted(Y.boolean(),!1),idbfsMountpoints:Y.optional(Y.array(Y.string())),nodeJsWorker:Y.defaulted(Y.boolean(),!1),nodefsMountpoints:Y.optional(Y.record(Y.string(),Y.string())),appMenu:Y.defaulted(Y.boolean(),!0)});function av(t){let e=Qh.mask(t??{},Zh);if(e.nodeJsWorker){if(e.idbfsMountpoints!=null)throw new Error("The `idbfsMountpoints` field is not allowed when `nodeJsWorker` is true.")}else if(e.nodefsMountpoints!=null)throw new Error("The `nodefsMountpoints` field is not allowed when `nodeJsWorker` is false.");return e}async function Xh(t){let e=av({...t.packageJsonStliteDesktopField,...t.fallbacks});$.info("App manifest: %j",e);let r=JSON.stringify(e,null,2);$.info(`Dump the manifest file -> ${t.manifestFilePath}`),await ov.writeFile(t.manifestFilePath,r,{encoding:"utf-8"})}var pe=Ai(Hn(),1);import lv from"node:path";async function ed(t){let{files:e,entrypoint:r}=uv(t),i=await fv(t),n=await cv(t);return{files:e,entrypoint:r,dependencies:i,requirementsTxtFilePaths:n}}function uv(t){let{packageJsonStliteDesktopField:e,fallbacks:{appHomeDirSource:r}}=t,i=e?.files,n=e?.entrypoint;if(i==null||n==null){ai("Missing `stlite.desktop.files` and `stlite.desktop.entrypoint` in `package.json`. Falling back to the `appHomeDirSource` argument to determine the app directory. Please update your `package.json` as this fallback is deprecated and will be removed in a future release.");let s=r;if(typeof s!="string")throw new Error("The `appHomeDirSource` argument is required when `stlite.desktop.files` and `stlite.desktop.entrypoint` are not found in the package.json. Note that `appHomeDirSource` is deprecated and will be removed in the future, so please specify `stlite.desktop.files` and `stlite.desktop.entrypoint` in the package.json.");i=[s],n=`./${s}/streamlit_app.py`}else r!=null&&ai("The `appHomeDirSource` argument is deprecated and has been ignored because `stlite.desktop.files` is specified in `package.json`.");return pe.assert(n,pe.string(),"The `stlite.desktop.entrypoint` field must be a string."),pe.assert(i,pe.array(pe.string()),"The `stlite.desktop.files` field must be an array of strings."),{files:i,entrypoint:n}}async function fv(t){let{packageJsonStliteDesktopField:e,fallbacks:{packages:r}}=t,i=e?.dependencies;pe.assert(i,pe.optional(pe.array(pe.string())),"The `stlite.desktop.dependencies` field must be an array of strings.");let n=[];return r!=null&&(ai("The `packages` argument is deprecated and will be removed in a future release. Use `stlite.desktop.dependencies` in your `package.json` instead."),n=r),[...i??[],...n]}async function cv(t){let{pathResolutionRoot:e,packageJsonStliteDesktopField:r,fallbacks:{requirementsTxtFilePaths:i}}=t,n=r?.requirementsTxtFiles;pe.assert(n,pe.optional(pe.array(pe.string())),"The `stlite.desktop.requirementsTxtFiles` field must be an array of strings.");let s=n?.map(a=>lv.resolve(e,a)),o=[];return i!=null&&i.length>0&&(ai("The `requirement` argument is deprecated and will be removed in a future release. Use `stlite.desktop.requirementsTxtFiles` in your `package.json` instead."),o=i),[...s??[],...o]}var hv="(<=>!~";var dv=new RegExp(`[${"["+hv+";@"}]`);function pv(t){return t.split(dv)[0].trim()}function td(t){return t.forEach(r=>{let i;try{i=new URL(r)}catch{return}if(i.protocol==="emfs:"||i.protocol==="file:")throw new Error(`"emfs:" and "file:" protocols are not allowed for the requirement (${r})`)}),t.filter(r=>pv(r)==="streamlit"?(console.warn(`Streamlit is specified in the requirements ("${r}"), but it will be ignored. A built-in version of Streamlit will be used.`),!1):!0)}var gv=/\s#.*$/;function rd(t){return t.split(`
37
37
  `).filter(e=>!e.startsWith("#")).map(e=>e.replace(gv,"")).map(e=>e.trim()).filter(e=>e!=="")}var ca=(t,e,r)=>{let i=t instanceof RegExp?id(t,r):t,n=e instanceof RegExp?id(e,r):e,s=i!==null&&n!=null&&mv(i,n,r);return s&&{start:s[0],end:s[1],pre:r.slice(0,s[0]),body:r.slice(s[0]+i.length,s[1]),post:r.slice(s[1]+n.length)}},id=(t,e)=>{let r=e.match(t);return r?r[0]:null},mv=(t,e,r)=>{let i,n,s,o,a,l=r.indexOf(t),u=r.indexOf(e,l+1),c=l;if(l>=0&&u>0){if(t===e)return[l,u];for(i=[],s=r.length;c>=0&&!a;){if(c===l)i.push(c),l=r.indexOf(t,c+1);else if(i.length===1){let f=i.pop();f!==void 0&&(a=[f,u])}else n=i.pop(),n!==void 0&&n<s&&(s=n,o=u),u=r.indexOf(e,c+1);c=l<u&&l>=0?l:u}i.length&&o!==void 0&&(a=[s,o])}return a};var nd="\0SLASH"+Math.random()+"\0",sd="\0OPEN"+Math.random()+"\0",da="\0CLOSE"+Math.random()+"\0",od="\0COMMA"+Math.random()+"\0",ad="\0PERIOD"+Math.random()+"\0",yv=new RegExp(nd,"g"),bv=new RegExp(sd,"g"),wv=new RegExp(da,"g"),_v=new RegExp(od,"g"),vv=new RegExp(ad,"g"),Sv=/\\\\/g,Ev=/\\{/g,Rv=/\\}/g,xv=/\\,/g,Tv=/\\./g;function ha(t){return isNaN(t)?t.charCodeAt(0):parseInt(t,10)}function Mv(t){return t.replace(Sv,nd).replace(Ev,sd).replace(Rv,da).replace(xv,od).replace(Tv,ad)}function Ov(t){return t.replace(yv,"\\").replace(bv,"{").replace(wv,"}").replace(_v,",").replace(vv,".")}function ld(t){if(!t)return[""];let e=[],r=ca("{","}",t);if(!r)return t.split(",");let{pre:i,body:n,post:s}=r,o=i.split(",");o[o.length-1]+="{"+n+"}";let a=ld(s);return s.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),e.push.apply(e,o),e}function ud(t){return t?(t.slice(0,2)==="{}"&&(t="\\{\\}"+t.slice(2)),li(Mv(t),!0).map(Ov)):[]}function Av(t){return"{"+t+"}"}function kv(t){return/^-?0\d/.test(t)}function Pv(t,e){return t<=e}function Dv(t,e){return t>=e}function li(t,e){let r=[],i=ca("{","}",t);if(!i)return[t];let n=i.pre,s=i.post.length?li(i.post,!1):[""];if(/\$$/.test(i.pre))for(let o=0;o<s.length;o++){let a=n+"{"+i.body+"}"+s[o];r.push(a)}else{let o=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),a=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),l=o||a,u=i.body.indexOf(",")>=0;if(!l&&!u)return i.post.match(/,(?!,).*\}/)?(t=i.pre+"{"+i.body+da+i.post,li(t)):[t];let c;if(l)c=i.body.split(/\.\./);else if(c=ld(i.body),c.length===1&&c[0]!==void 0&&(c=li(c[0],!1).map(Av),c.length===1))return s.map(p=>i.pre+c[0]+p);let f;if(l&&c[0]!==void 0&&c[1]!==void 0){let p=ha(c[0]),m=ha(c[1]),d=Math.max(c[0].length,c[1].length),b=c.length===3&&c[2]!==void 0?Math.abs(ha(c[2])):1,v=Pv;m<p&&(b*=-1,v=Dv);let T=c.some(kv);f=[];for(let R=p;v(R,m);R+=b){let x;if(a)x=String.fromCharCode(R),x==="\\"&&(x="");else if(x=String(R),T){let k=d-x.length;if(k>0){let I=new Array(k+1).join("0");R<0?x="-"+I+x.slice(1):x=I+x}}f.push(x)}}else{f=[];for(let p=0;p<c.length;p++)f.push.apply(f,li(c[p],!1))}for(let p=0;p<f.length;p++)for(let m=0;m<s.length;m++){let d=n+f[p]+s[m];(!e||l||d)&&r.push(d)}}return r}var ui=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")};var Cv={"[: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]},fi=t=>t.replace(/[[\]\\-]/g,"\\$&"),qv=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),fd=t=>t.join(""),cd=(t,e)=>{let r=e;if(t.charAt(r)!=="[")throw new Error("not in a brace expression");let i=[],n=[],s=r+1,o=!1,a=!1,l=!1,u=!1,c=r,f="";e:for(;s<t.length;){let b=t.charAt(s);if((b==="!"||b==="^")&&s===r+1){u=!0,s++;continue}if(b==="]"&&o&&!l){c=s+1;break}if(o=!0,b==="\\"&&!l){l=!0,s++;continue}if(b==="["&&!l){for(let[v,[S,T,R]]of Object.entries(Cv))if(t.startsWith(v,s)){if(f)return["$.",!1,t.length-r,!0];s+=v.length,R?n.push(S):i.push(S),a=a||T;continue e}}if(l=!1,f){b>f?i.push(fi(f)+"-"+fi(b)):b===f&&i.push(fi(b)),f="",s++;continue}if(t.startsWith("-]",s+1)){i.push(fi(b+"-")),s+=2;continue}if(t.startsWith("-",s+1)){f=b,s+=2;continue}i.push(fi(b)),s++}if(c<s)return["",!1,0,!1];if(!i.length&&!n.length)return["$.",!1,t.length-r,!0];if(n.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!u){let b=i[0].length===2?i[0].slice(-1):i[0];return[qv(b),!1,c-r,!1]}let p="["+(u?"^":"")+fd(i)+"]",m="["+(u?"":"^")+fd(n)+"]";return[i.length&&n.length?"("+p+"|"+m+")":i.length?p:m,a,c-r,!0]};var Be=(t,{windowsPathsNoEscape:e=!1,magicalBraces:r=!0}={})=>r?e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"):e?t.replace(/\[([^\/\\{}])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1");var Lv=new Set(["!","?","+","*","@"]),hd=t=>Lv.has(t),Nv="(?!(?:^|/)\\.\\.?(?:$|/))",Gn="(?!\\.)",jv=new Set(["[","."]),Fv=new Set(["..","."]),Iv=new Set("().*{}+?[]^$\\!"),$v=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),pa="[^/]",dd=pa+"*?",pd=pa+"+?",br=class t{type;#e;#t;#s=!1;#n=[];#o;#_;#b;#f=!1;#a;#h;#c=!1;constructor(e,r,i={}){this.type=e,e&&(this.#t=!0),this.#o=r,this.#e=this.#o?this.#o.#e:this,this.#a=this.#e===this?i:this.#e.#a,this.#b=this.#e===this?[]:this.#e.#b,e==="!"&&!this.#e.#f&&this.#b.push(this),this.#_=this.#o?this.#o.#n.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#n)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#h!==void 0?this.#h:this.type?this.#h=this.type+"("+this.#n.map(e=>String(e)).join("|")+")":this.#h=this.#n.map(e=>String(e)).join("")}#l(){if(this!==this.#e)throw new Error("should only call on root");if(this.#f)return this;this.toString(),this.#f=!0;let e;for(;e=this.#b.pop();){if(e.type!=="!")continue;let r=e,i=r.#o;for(;i;){for(let n=r.#_+1;!i.type&&n<i.#n.length;n++)for(let s of e.#n){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(i.#n[n])}r=i,i=r.#o}}return this}push(...e){for(let r of e)if(r!==""){if(typeof r!="string"&&!(r instanceof t&&r.#o===this))throw new Error("invalid part: "+r);this.#n.push(r)}}toJSON(){let e=this.type===null?this.#n.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#n.map(r=>r.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#f&&this.#o?.type==="!")&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#o?.isStart())return!1;if(this.#_===0)return!0;let e=this.#o;for(let r=0;r<this.#_;r++){let i=e.#n[r];if(!(i instanceof t&&i.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#o?.type==="!")return!0;if(!this.#o?.isEnd())return!1;if(!this.type)return this.#o?.isEnd();let e=this.#o?this.#o.#n.length:0;return this.#_===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let r=new t(this.type,e);for(let i of this.#n)r.copyIn(i);return r}static#r(e,r,i,n){let s=!1,o=!1,a=-1,l=!1;if(r.type===null){let m=i,d="";for(;m<e.length;){let b=e.charAt(m++);if(s||b==="\\"){s=!s,d+=b;continue}if(o){m===a+1?(b==="^"||b==="!")&&(l=!0):b==="]"&&!(m===a+2&&l)&&(o=!1),d+=b;continue}else if(b==="["){o=!0,a=m,l=!1,d+=b;continue}if(!n.noext&&hd(b)&&e.charAt(m)==="("){r.push(d),d="";let v=new t(b,r);m=t.#r(e,v,m,n),r.push(v);continue}d+=b}return r.push(d),m}let u=i+1,c=new t(null,r),f=[],p="";for(;u<e.length;){let m=e.charAt(u++);if(s||m==="\\"){s=!s,p+=m;continue}if(o){u===a+1?(m==="^"||m==="!")&&(l=!0):m==="]"&&!(u===a+2&&l)&&(o=!1),p+=m;continue}else if(m==="["){o=!0,a=u,l=!1,p+=m;continue}if(hd(m)&&e.charAt(u)==="("){c.push(p),p="";let d=new t(m,c);c.push(d),u=t.#r(e,d,u,n);continue}if(m==="|"){c.push(p),p="",f.push(c),c=new t(null,r);continue}if(m===")")return p===""&&r.#n.length===0&&(r.#c=!0),c.push(p),p="",r.push(...f,c),u;p+=m}return r.type=null,r.#t=void 0,r.#n=[e.substring(i-1)],u}static fromGlob(e,r={}){let i=new t(null,void 0,r);return t.#r(e,i,0,r),i}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[r,i,n,s]=this.toRegExpSource();if(!(n||this.#t||this.#a.nocase&&!this.#a.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return i;let a=(this.#a.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${r}$`,a),{_src:r,_glob:e})}get options(){return this.#a}toRegExpSource(e){let r=e??!!this.#a.dot;if(this.#e===this&&this.#l(),!this.type){let l=this.isStart()&&this.isEnd()&&!this.#n.some(m=>typeof m!="string"),u=this.#n.map(m=>{let[d,b,v,S]=typeof m=="string"?t.#v(m,this.#t,l):m.toRegExpSource(e);return this.#t=this.#t||v,this.#s=this.#s||S,d}).join(""),c="";if(this.isStart()&&typeof this.#n[0]=="string"&&!(this.#n.length===1&&Fv.has(this.#n[0]))){let d=jv,b=r&&d.has(u.charAt(0))||u.startsWith("\\.")&&d.has(u.charAt(2))||u.startsWith("\\.\\.")&&d.has(u.charAt(4)),v=!r&&!e&&d.has(u.charAt(0));c=b?Nv:v?Gn:""}let f="";return this.isEnd()&&this.#e.#f&&this.#o?.type==="!"&&(f="(?:$|\\/)"),[c+u+f,Be(u),this.#t=!!this.#t,this.#s]}let i=this.type==="*"||this.type==="+",n=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#p(r);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let l=this.toString();return this.#n=[l],this.type=null,this.#t=void 0,[l,Be(this.toString()),!1,!1]}let o=!i||e||r||!Gn?"":this.#p(!0);o===s&&(o=""),o&&(s=`(?:${s})(?:${o})*?`);let a="";if(this.type==="!"&&this.#c)a=(this.isStart()&&!r?Gn:"")+pd;else{let l=this.type==="!"?"))"+(this.isStart()&&!r&&!e?Gn:"")+dd+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;a=n+s+l}return[a,Be(s),this.#t=!!this.#t,this.#s]}#p(e){return this.#n.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[i,n,s,o]=r.toRegExpSource(e);return this.#s=this.#s||o,i}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#v(e,r,i=!1){let n=!1,s="",o=!1;for(let a=0;a<e.length;a++){let l=e.charAt(a);if(n){n=!1,s+=(Iv.has(l)?"\\":"")+l;continue}if(l==="\\"){a===e.length-1?s+="\\\\":n=!0;continue}if(l==="["){let[u,c,f,p]=cd(e,a);if(f){s+=u,o=o||c,a+=f-1,r=r||p;continue}}if(l==="*"){s+=i&&e==="*"?pd:dd,r=!0;continue}if(l==="?"){s+=pa,r=!0;continue}s+=$v(l)}return[s,Be(e),!!r,o]}};var wr=(t,{windowsPathsNoEscape:e=!1,magicalBraces:r=!1}={})=>r?e?t.replace(/[?*()[\]{}]/g,"[$&]"):t.replace(/[?*()[\]\\{}]/g,"\\$&"):e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");var Ee=(t,e,r={})=>(ui(e),!r.nocomment&&e.charAt(0)==="#"?!1:new Oe(e,r).match(t)),Wv=/^\*+([^+@!?\*\[\(]*)$/,Bv=t=>e=>!e.startsWith(".")&&e.endsWith(t),Uv=t=>e=>e.endsWith(t),zv=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),Hv=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),Gv=/^\*+\.\*+$/,Vv=t=>!t.startsWith(".")&&t.includes("."),Yv=t=>t!=="."&&t!==".."&&t.includes("."),Kv=/^\.\*+$/,Jv=t=>t!=="."&&t!==".."&&t.startsWith("."),Zv=/^\*+$/,Qv=t=>t.length!==0&&!t.startsWith("."),Xv=t=>t.length!==0&&t!=="."&&t!=="..",e1=/^\?+([^+@!?\*\[\(]*)?$/,t1=([t,e=""])=>{let r=yd([t]);return e?(e=e.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(e)):r},r1=([t,e=""])=>{let r=bd([t]);return e?(e=e.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(e)):r},i1=([t,e=""])=>{let r=bd([t]);return e?i=>r(i)&&i.endsWith(e):r},n1=([t,e=""])=>{let r=yd([t]);return e?i=>r(i)&&i.endsWith(e):r},yd=([t])=>{let e=t.length;return r=>r.length===e&&!r.startsWith(".")},bd=([t])=>{let e=t.length;return r=>r.length===e&&r!=="."&&r!==".."},wd=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",gd={win32:{sep:"\\"},posix:{sep:"/"}},s1=wd==="win32"?gd.win32.sep:gd.posix.sep;Ee.sep=s1;var ge=Symbol("globstar **");Ee.GLOBSTAR=ge;var o1="[^/]",a1=o1+"*?",l1="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",u1="(?:(?!(?:\\/|^)\\.).)*?",f1=(t,e={})=>r=>Ee(r,t,e);Ee.filter=f1;var Le=(t,e={})=>Object.assign({},t,e),c1=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return Ee;let e=Ee;return Object.assign((i,n,s={})=>e(i,n,Le(t,s)),{Minimatch:class extends e.Minimatch{constructor(n,s={}){super(n,Le(t,s))}static defaults(n){return e.defaults(Le(t,n)).Minimatch}},AST:class extends e.AST{constructor(n,s,o={}){super(n,s,Le(t,o))}static fromGlob(n,s={}){return e.AST.fromGlob(n,Le(t,s))}},unescape:(i,n={})=>e.unescape(i,Le(t,n)),escape:(i,n={})=>e.escape(i,Le(t,n)),filter:(i,n={})=>e.filter(i,Le(t,n)),defaults:i=>e.defaults(Le(t,i)),makeRe:(i,n={})=>e.makeRe(i,Le(t,n)),braceExpand:(i,n={})=>e.braceExpand(i,Le(t,n)),match:(i,n,s={})=>e.match(i,n,Le(t,s)),sep:e.sep,GLOBSTAR:ge})};Ee.defaults=c1;var _d=(t,e={})=>(ui(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:ud(t));Ee.braceExpand=_d;var h1=(t,e={})=>new Oe(t,e).makeRe();Ee.makeRe=h1;var d1=(t,e,r={})=>{let i=new Oe(e,r);return t=t.filter(n=>i.match(n)),i.options.nonull&&!t.length&&t.push(e),t};Ee.match=d1;var md=/[?*]|[+@!]\(.*?\)|\[|\]/,p1=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Oe=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,r={}){ui(e),r=r||{},this.options=r,this.pattern=e,this.platform=r.platform||wd,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.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 e of this.set)for(let r of e)if(typeof r!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let i=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let n=this.globParts.map((s,o,a)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=s[0]===""&&s[1]===""&&(s[2]==="?"||!md.test(s[2]))&&!md.test(s[3]),u=/^[a-z]:/i.test(s[0]);if(l)return[...s.slice(0,4),...s.slice(4).map(c=>this.parse(c))];if(u)return[s[0],...s.slice(1).map(c=>this.parse(c))]}return s.map(l=>this.parse(l))});if(this.debug(this.pattern,n),this.set=n.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s<this.set.length;s++){let o=this.set[s];o[0]===""&&o[1]===""&&this.globParts[s][2]==="?"&&typeof o[3]=="string"&&/^[a-z]:$/i.test(o[3])&&(o[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let i=0;i<e.length;i++)for(let n=0;n<e[i].length;n++)e[i][n]==="**"&&(e[i][n]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):r>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(r=>{let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let n=i;for(;r[n+1]==="**";)n++;n!==i&&r.splice(i,n-i)}return r})}levelOneOptimize(e){return e.map(r=>(r=r.reduce((i,n)=>{let s=i[i.length-1];return n==="**"&&s==="**"?i:n===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(i.pop(),i):(i.push(n),i)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let n=1;n<e.length-1;n++){let s=e[n];n===1&&s===""&&e[0]===""||(s==="."||s==="")&&(r=!0,e.splice(n,1),n--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(r=!0,e.pop())}let i=0;for(;(i=e.indexOf("..",i+1))!==-1;){let n=e[i-1];n&&n!=="."&&n!==".."&&n!=="**"&&(r=!0,e.splice(i-1,2),i-=2)}}while(r);return e.length===0?[""]:e}firstPhasePreProcess(e){let r=!1;do{r=!1;for(let i of e){let n=-1;for(;(n=i.indexOf("**",n+1))!==-1;){let o=n;for(;i[o+1]==="**";)o++;o>n&&i.splice(n+1,o-n);let a=i[n+1],l=i[n+2],u=i[n+3];if(a!==".."||!l||l==="."||l===".."||!u||u==="."||u==="..")continue;r=!0,i.splice(n,1);let c=i.slice(0);c[n]="**",e.push(c),n--}if(!this.preserveMultipleSlashes){for(let o=1;o<i.length-1;o++){let a=i[o];o===1&&a===""&&i[0]===""||(a==="."||a==="")&&(r=!0,i.splice(o,1),o--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(r=!0,i.pop())}let s=0;for(;(s=i.indexOf("..",s+1))!==-1;){let o=i[s-1];if(o&&o!=="."&&o!==".."&&o!=="**"){r=!0;let l=s===1&&i[s+1]==="**"?["."]:[];i.splice(s-1,2,...l),i.length===0&&i.push(""),s-=2}}}}while(r);return e}secondPhasePreProcess(e){for(let r=0;r<e.length-1;r++)for(let i=r+1;i<e.length;i++){let n=this.partsMatch(e[r],e[i],!this.preserveMultipleSlashes);if(n){e[r]=[],e[i]=n;break}}return e.filter(r=>r.length)}partsMatch(e,r,i=!1){let n=0,s=0,o=[],a="";for(;n<e.length&&s<r.length;)if(e[n]===r[s])o.push(a==="b"?r[s]:e[n]),n++,s++;else if(i&&e[n]==="**"&&r[s]===e[n+1])o.push(e[n]),n++;else if(i&&r[s]==="**"&&e[n]===r[s+1])o.push(r[s]),s++;else if(e[n]==="*"&&r[s]&&(this.options.dot||!r[s].startsWith("."))&&r[s]!=="**"){if(a==="b")return!1;a="a",o.push(e[n]),n++,s++}else if(r[s]==="*"&&e[n]&&(this.options.dot||!e[n].startsWith("."))&&e[n]!=="**"){if(a==="a")return!1;a="b",o.push(r[s]),n++,s++}else return!1;return e.length===r.length&&o}parseNegate(){if(this.nonegate)return;let e=this.pattern,r=!1,i=0;for(let n=0;n<e.length&&e.charAt(n)==="!";n++)r=!r,i++;i&&(this.pattern=e.slice(i)),this.negate=r}matchOne(e,r,i=!1){let n=this.options;if(this.isWindows){let b=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),v=!b&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),S=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),T=!S&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),R=v?3:b?0:void 0,x=T?3:S?0:void 0;if(typeof R=="number"&&typeof x=="number"){let[k,I]=[e[R],r[x]];k.toLowerCase()===I.toLowerCase()&&(r[x]=k,x>R?r=r.slice(x):R>x&&(e=e.slice(R)))}}let{optimizationLevel:s=1}=this.options;s>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:r}),this.debug("matchOne",e.length,r.length);for(var o=0,a=0,l=e.length,u=r.length;o<l&&a<u;o++,a++){this.debug("matchOne loop");var c=r[a],f=e[o];if(this.debug(r,c,f),c===!1)return!1;if(c===ge){this.debug("GLOBSTAR",[r,c,f]);var p=o,m=a+1;if(m===u){for(this.debug("** at the end");o<l;o++)if(e[o]==="."||e[o]===".."||!n.dot&&e[o].charAt(0)===".")return!1;return!0}for(;p<l;){var d=e[p];if(this.debug(`
38
38
  globstar while`,e,p,r,m,d),this.matchOne(e.slice(p),r.slice(m),i))return this.debug("globstar found match!",p,l,d),!0;if(d==="."||d===".."||!n.dot&&d.charAt(0)==="."){this.debug("dot detected!",e,p,r,m);break}this.debug("globstar swallow a segment, and continue"),p++}return!!(i&&(this.debug(`
39
39
  >>> no match, partial?`,e,p,r,m),p===l))}let b;if(typeof c=="string"?(b=f===c,this.debug("string match",c,f,b)):(b=c.test(f),this.debug("pattern match",c,f,b)),!b)return!1}if(o===l&&a===u)return!0;if(o===l)return i;if(a===u)return o===l-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return _d(this.pattern,this.options)}parse(e){ui(e);let r=this.options;if(e==="**")return ge;if(e==="")return"";let i,n=null;(i=e.match(Zv))?n=r.dot?Xv:Qv:(i=e.match(Wv))?n=(r.nocase?r.dot?Hv:zv:r.dot?Uv:Bv)(i[1]):(i=e.match(e1))?n=(r.nocase?r.dot?r1:t1:r.dot?i1:n1)(i):(i=e.match(Gv))?n=r.dot?Yv:Vv:(i=e.match(Kv))&&(n=Jv);let s=br.fromGlob(e,this.options).toMMPattern();return n&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:n}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,i=r.noglobstar?a1:r.dot?l1:u1,n=new Set(r.nocase?["i"]:[]),s=e.map(l=>{let u=l.map(f=>{if(f instanceof RegExp)for(let p of f.flags.split(""))n.add(p);return typeof f=="string"?p1(f):f===ge?ge:f._src});u.forEach((f,p)=>{let m=u[p+1],d=u[p-1];f!==ge||d===ge||(d===void 0?m!==void 0&&m!==ge?u[p+1]="(?:\\/|"+i+"\\/)?"+m:u[p]=i:m===void 0?u[p-1]=d+"(?:\\/|\\/"+i+")?":m!==ge&&(u[p-1]=d+"(?:\\/|\\/"+i+"\\/)"+m,u[p+1]=ge))});let c=u.filter(f=>f!==ge);if(this.partial&&c.length>=1){let f=[];for(let p=1;p<=c.length;p++)f.push(c.slice(0,p).join("/"));return"(?:"+f.join("|")+")"}return c.join("/")}).join("|"),[o,a]=e.length>1?["(?:",")"]:["",""];s="^"+o+s+a+"$",this.partial&&(s="^(?:\\/|"+o+s.slice(1,-1)+a+")$"),this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...n].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let i=this.options;this.isWindows&&(e=e.split("\\").join("/"));let n=this.slashSplit(e);this.debug(this.pattern,"split",n);let s=this.set;this.debug(this.pattern,"set",s);let o=n[n.length-1];if(!o)for(let a=n.length-2;!o&&a>=0;a--)o=n[a];for(let a=0;a<s.length;a++){let l=s[a],u=n;if(i.matchBase&&l.length===1&&(u=[o]),this.matchOne(u,l,r))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(e){return Ee.defaults(e).Minimatch}};Ee.AST=br;Ee.Minimatch=Oe;Ee.escape=wr;Ee.unescape=Be;import{fileURLToPath as V1}from"node:url";var g1=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Sd=new Set,ga=typeof process=="object"&&process?process:{},Ed=(t,e,r,i)=>{typeof ga.emitWarning=="function"?ga.emitWarning(t,e,r,i):console.error(`[${r}] ${e}: ${t}`)},Vn=globalThis.AbortController,vd=globalThis.AbortSignal;if(typeof Vn>"u"){vd=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,n){this._onabort.push(n)}},Vn=class{constructor(){e()}signal=new vd;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let n of this.signal._onabort)n(i);this.signal.onabort?.(i)}}};let t=ga.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,Ed("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",e))}}var m1=t=>!Sd.has(t);var Rt=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Rd=t=>Rt(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?_r:null:null,_r=class extends Array{constructor(e){super(e),this.fill(0)}},ma=class t{heap;length;static#e=!1;static create(e){let r=Rd(e);if(!r)return[];t.#e=!0;let i=new t(e,r);return t.#e=!1,i}constructor(e,r){if(!t.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Yt=class t{#e;#t;#s;#n;#o;#_;#b;#f;get perf(){return this.#f}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#a;#h;#c;#l;#r;#p;#v;#w;#g;#O;#m;#E;#T;#y;#S;#M;#d;#i;static unsafeExposeInternals(e){return{starts:e.#T,ttls:e.#y,sizes:e.#E,keyMap:e.#c,keyList:e.#l,valList:e.#r,next:e.#p,prev:e.#v,get head(){return e.#w},get tail(){return e.#g},free:e.#O,isBackgroundFetch:r=>e.#u(r),backgroundFetch:(r,i,n,s)=>e.#U(r,i,n,s),moveToTail:r=>e.#j(r),indexes:r=>e.#k(r),rindexes:r=>e.#D(r),isStale:r=>e.#x(r)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#h}get size(){return this.#a}get fetchMethod(){return this.#_}get memoMethod(){return this.#b}get dispose(){return this.#s}get onInsert(){return this.#n}get disposeAfter(){return this.#o}constructor(e){let{max:r=0,ttl:i,ttlResolution:n=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:l,dispose:u,onInsert:c,disposeAfter:f,noDisposeOnSet:p,noUpdateTTL:m,maxSize:d=0,maxEntrySize:b=0,sizeCalculation:v,fetchMethod:S,memoMethod:T,noDeleteOnFetchRejection:R,noDeleteOnStaleGet:x,allowStaleOnFetchRejection:k,allowStaleOnFetchAbort:I,ignoreFetchAbort:q,perf:z}=e;if(z!==void 0&&typeof z?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#f=z??g1,r!==0&&!Rt(r))throw new TypeError("max option must be a nonnegative integer");let C=r?Rd(r):Array;if(!C)throw new Error("invalid max value: "+r);if(this.#e=r,this.#t=d,this.maxEntrySize=b||this.#t,this.sizeCalculation=v,this.sizeCalculation){if(!this.#t&&!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(T!==void 0&&typeof T!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#b=T,S!==void 0&&typeof S!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#_=S,this.#M=!!S,this.#c=new Map,this.#l=new Array(r).fill(void 0),this.#r=new Array(r).fill(void 0),this.#p=new C(r),this.#v=new C(r),this.#w=0,this.#g=0,this.#O=ma.create(r),this.#a=0,this.#h=0,typeof u=="function"&&(this.#s=u),typeof c=="function"&&(this.#n=c),typeof f=="function"?(this.#o=f,this.#m=[]):(this.#o=void 0,this.#m=void 0),this.#S=!!this.#s,this.#i=!!this.#n,this.#d=!!this.#o,this.noDisposeOnSet=!!p,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!R,this.allowStaleOnFetchRejection=!!k,this.allowStaleOnFetchAbort=!!I,this.ignoreFetchAbort=!!q,this.maxEntrySize!==0){if(this.#t!==0&&!Rt(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!Rt(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#F()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!x,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=Rt(n)||n===0?n:1,this.ttlAutopurge=!!s,this.ttl=i||0,this.ttl){if(!Rt(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#C()}if(this.#e===0&&this.ttl===0&&this.#t===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#t){let V="LRU_CACHE_UNBOUNDED";m1(V)&&(Sd.add(V),Ed("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",V,t))}}getRemainingTTL(e){return this.#c.has(e)?1/0:0}#C(){let e=new _r(this.#e),r=new _r(this.#e);this.#y=e,this.#T=r,this.#W=(s,o,a=this.#f.now())=>{if(r[s]=o!==0?a:0,e[s]=o,o!==0&&this.ttlAutopurge){let l=setTimeout(()=>{this.#x(s)&&this.#P(this.#l[s],"expire")},o+1);l.unref&&l.unref()}},this.#A=s=>{r[s]=e[s]!==0?this.#f.now():0},this.#R=(s,o)=>{if(e[o]){let a=e[o],l=r[o];if(!a||!l)return;s.ttl=a,s.start=l,s.now=i||n();let u=s.now-l;s.remainingTTL=a-u}};let i=0,n=()=>{let s=this.#f.now();if(this.ttlResolution>0){i=s;let o=setTimeout(()=>i=0,this.ttlResolution);o.unref&&o.unref()}return s};this.getRemainingTTL=s=>{let o=this.#c.get(s);if(o===void 0)return 0;let a=e[o],l=r[o];if(!a||!l)return 1/0;let u=(i||n())-l;return a-u},this.#x=s=>{let o=r[s],a=e[s];return!!a&&!!o&&(i||n())-o>a}}#A=()=>{};#R=()=>{};#W=()=>{};#x=()=>!1;#F(){let e=new _r(this.#e);this.#h=0,this.#E=e,this.#q=r=>{this.#h-=e[r],e[r]=0},this.#L=(r,i,n,s)=>{if(this.#u(i))return 0;if(!Rt(n))if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(n=s(i,r),!Rt(n))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 n},this.#I=(r,i,n)=>{if(e[r]=i,this.#t){let s=this.#t-e[r];for(;this.#h>s;)this.#N(!0)}this.#h+=e[r],n&&(n.entrySize=i,n.totalCalculatedSize=this.#h)}}#q=e=>{};#I=(e,r,i)=>{};#L=(e,r,i,n)=>{if(i||n)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#k({allowStale:e=this.allowStale}={}){if(this.#a)for(let r=this.#g;!(!this.#B(r)||((e||!this.#x(r))&&(yield r),r===this.#w));)r=this.#v[r]}*#D({allowStale:e=this.allowStale}={}){if(this.#a)for(let r=this.#w;!(!this.#B(r)||((e||!this.#x(r))&&(yield r),r===this.#g));)r=this.#p[r]}#B(e){return e!==void 0&&this.#c.get(this.#l[e])===e}*entries(){for(let e of this.#k())this.#r[e]!==void 0&&this.#l[e]!==void 0&&!this.#u(this.#r[e])&&(yield[this.#l[e],this.#r[e]])}*rentries(){for(let e of this.#D())this.#r[e]!==void 0&&this.#l[e]!==void 0&&!this.#u(this.#r[e])&&(yield[this.#l[e],this.#r[e]])}*keys(){for(let e of this.#k()){let r=this.#l[e];r!==void 0&&!this.#u(this.#r[e])&&(yield r)}}*rkeys(){for(let e of this.#D()){let r=this.#l[e];r!==void 0&&!this.#u(this.#r[e])&&(yield r)}}*values(){for(let e of this.#k())this.#r[e]!==void 0&&!this.#u(this.#r[e])&&(yield this.#r[e])}*rvalues(){for(let e of this.#D())this.#r[e]!==void 0&&!this.#u(this.#r[e])&&(yield this.#r[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,r={}){for(let i of this.#k()){let n=this.#r[i],s=this.#u(n)?n.__staleWhileFetching:n;if(s!==void 0&&e(s,this.#l[i],this))return this.get(this.#l[i],r)}}forEach(e,r=this){for(let i of this.#k()){let n=this.#r[i],s=this.#u(n)?n.__staleWhileFetching:n;s!==void 0&&e.call(r,s,this.#l[i],this)}}rforEach(e,r=this){for(let i of this.#D()){let n=this.#r[i],s=this.#u(n)?n.__staleWhileFetching:n;s!==void 0&&e.call(r,s,this.#l[i],this)}}purgeStale(){let e=!1;for(let r of this.#D({allowStale:!0}))this.#x(r)&&(this.#P(this.#l[r],"expire"),e=!0);return e}info(e){let r=this.#c.get(e);if(r===void 0)return;let i=this.#r[r],n=this.#u(i)?i.__staleWhileFetching:i;if(n===void 0)return;let s={value:n};if(this.#y&&this.#T){let o=this.#y[r],a=this.#T[r];if(o&&a){let l=o-(this.#f.now()-a);s.ttl=l,s.start=Date.now()}}return this.#E&&(s.size=this.#E[r]),s}dump(){let e=[];for(let r of this.#k({allowStale:!0})){let i=this.#l[r],n=this.#r[r],s=this.#u(n)?n.__staleWhileFetching:n;if(s===void 0||i===void 0)continue;let o={value:s};if(this.#y&&this.#T){o.ttl=this.#y[r];let a=this.#f.now()-this.#T[r];o.start=Math.floor(Date.now()-a)}this.#E&&(o.size=this.#E[r]),e.unshift([i,o])}return e}load(e){this.clear();for(let[r,i]of e){if(i.start){let n=Date.now()-i.start;i.start=this.#f.now()-n}this.set(r,i.value,i)}}set(e,r,i={}){if(r===void 0)return this.delete(e),this;let{ttl:n=this.ttl,start:s,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:l}=i,{noUpdateTTL:u=this.noUpdateTTL}=i,c=this.#L(e,r,i.size||0,a);if(this.maxEntrySize&&c>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.#P(e,"set"),this;let f=this.#a===0?void 0:this.#c.get(e);if(f===void 0)f=this.#a===0?this.#g:this.#O.length!==0?this.#O.pop():this.#a===this.#e?this.#N(!1):this.#a,this.#l[f]=e,this.#r[f]=r,this.#c.set(e,f),this.#p[this.#g]=f,this.#v[f]=this.#g,this.#g=f,this.#a++,this.#I(f,c,l),l&&(l.set="add"),u=!1,this.#i&&this.#n?.(r,e,"add");else{this.#j(f);let p=this.#r[f];if(r!==p){if(this.#M&&this.#u(p)){p.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:m}=p;m!==void 0&&!o&&(this.#S&&this.#s?.(m,e,"set"),this.#d&&this.#m?.push([m,e,"set"]))}else o||(this.#S&&this.#s?.(p,e,"set"),this.#d&&this.#m?.push([p,e,"set"]));if(this.#q(f),this.#I(f,c,l),this.#r[f]=r,l){l.set="replace";let m=p&&this.#u(p)?p.__staleWhileFetching:p;m!==void 0&&(l.oldValue=m)}}else l&&(l.set="update");this.#i&&this.onInsert?.(r,e,r===p?"update":"replace")}if(n!==0&&!this.#y&&this.#C(),this.#y&&(u||this.#W(f,n,s),l&&this.#R(l,f)),!o&&this.#d&&this.#m){let p=this.#m,m;for(;m=p?.shift();)this.#o?.(...m)}return this}pop(){try{for(;this.#a;){let e=this.#r[this.#w];if(this.#N(!0),this.#u(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#d&&this.#m){let e=this.#m,r;for(;r=e?.shift();)this.#o?.(...r)}}}#N(e){let r=this.#w,i=this.#l[r],n=this.#r[r];return this.#M&&this.#u(n)?n.__abortController.abort(new Error("evicted")):(this.#S||this.#d)&&(this.#S&&this.#s?.(n,i,"evict"),this.#d&&this.#m?.push([n,i,"evict"])),this.#q(r),e&&(this.#l[r]=void 0,this.#r[r]=void 0,this.#O.push(r)),this.#a===1?(this.#w=this.#g=0,this.#O.length=0):this.#w=this.#p[r],this.#c.delete(i),this.#a--,r}has(e,r={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:n}=r,s=this.#c.get(e);if(s!==void 0){let o=this.#r[s];if(this.#u(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#x(s))n&&(n.has="stale",this.#R(n,s));else return i&&this.#A(s),n&&(n.has="hit",this.#R(n,s)),!0}else n&&(n.has="miss");return!1}peek(e,r={}){let{allowStale:i=this.allowStale}=r,n=this.#c.get(e);if(n===void 0||!i&&this.#x(n))return;let s=this.#r[n];return this.#u(s)?s.__staleWhileFetching:s}#U(e,r,i,n){let s=r===void 0?void 0:this.#r[r];if(this.#u(s))return s;let o=new Vn,{signal:a}=i;a?.addEventListener("abort",()=>o.abort(a.reason),{signal:o.signal});let l={signal:o.signal,options:i,context:n},u=(b,v=!1)=>{let{aborted:S}=o.signal,T=i.ignoreFetchAbort&&b!==void 0;if(i.status&&(S&&!v?(i.status.fetchAborted=!0,i.status.fetchError=o.signal.reason,T&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),S&&!T&&!v)return f(o.signal.reason);let R=m,x=this.#r[r];return(x===m||T&&v&&x===void 0)&&(b===void 0?R.__staleWhileFetching!==void 0?this.#r[r]=R.__staleWhileFetching:this.#P(e,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(e,b,l.options))),b},c=b=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=b),f(b)),f=b=>{let{aborted:v}=o.signal,S=v&&i.allowStaleOnFetchAbort,T=S||i.allowStaleOnFetchRejection,R=T||i.noDeleteOnFetchRejection,x=m;if(this.#r[r]===m&&(!R||x.__staleWhileFetching===void 0?this.#P(e,"fetch"):S||(this.#r[r]=x.__staleWhileFetching)),T)return i.status&&x.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),x.__staleWhileFetching;if(x.__returned===x)throw b},p=(b,v)=>{let S=this.#_?.(e,s,l);S&&S instanceof Promise&&S.then(T=>b(T===void 0?void 0:T),v),o.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(b(void 0),i.allowStaleOnFetchAbort&&(b=T=>u(T,!0)))})};i.status&&(i.status.fetchDispatched=!0);let m=new Promise(p).then(u,c),d=Object.assign(m,{__abortController:o,__staleWhileFetching:s,__returned:void 0});return r===void 0?(this.set(e,d,{...l.options,status:void 0}),r=this.#c.get(e)):this.#r[r]=d,d}#u(e){if(!this.#M)return!1;let r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof Vn}async fetch(e,r={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:l=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:p=this.allowStaleOnFetchRejection,ignoreFetchAbort:m=this.ignoreFetchAbort,allowStaleOnFetchAbort:d=this.allowStaleOnFetchAbort,context:b,forceRefresh:v=!1,status:S,signal:T}=r;if(!this.#M)return S&&(S.fetch="get"),this.get(e,{allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:s,status:S});let R={allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:s,ttl:o,noDisposeOnSet:a,size:l,sizeCalculation:u,noUpdateTTL:c,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:d,ignoreFetchAbort:m,status:S,signal:T},x=this.#c.get(e);if(x===void 0){S&&(S.fetch="miss");let k=this.#U(e,x,R,b);return k.__returned=k}else{let k=this.#r[x];if(this.#u(k)){let V=i&&k.__staleWhileFetching!==void 0;return S&&(S.fetch="inflight",V&&(S.returnedStale=!0)),V?k.__staleWhileFetching:k.__returned=k}let I=this.#x(x);if(!v&&!I)return S&&(S.fetch="hit"),this.#j(x),n&&this.#A(x),S&&this.#R(S,x),k;let q=this.#U(e,x,R,b),C=q.__staleWhileFetching!==void 0&&i;return S&&(S.fetch=I?"stale":"refresh",C&&I&&(S.returnedStale=!0)),C?q.__staleWhileFetching:q.__returned=q}}async forceFetch(e,r={}){let i=await this.fetch(e,r);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(e,r={}){let i=this.#b;if(!i)throw new Error("no memoMethod provided to constructor");let{context:n,forceRefresh:s,...o}=r,a=this.get(e,o);if(!s&&a!==void 0)return a;let l=i(e,a,{options:o,context:n});return this.set(e,l,o),l}get(e,r={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:o}=r,a=this.#c.get(e);if(a!==void 0){let l=this.#r[a],u=this.#u(l);return o&&this.#R(o,a),this.#x(a)?(o&&(o.get="stale"),u?(o&&i&&l.__staleWhileFetching!==void 0&&(o.returnedStale=!0),i?l.__staleWhileFetching:void 0):(s||this.#P(e,"expire"),o&&i&&(o.returnedStale=!0),i?l:void 0)):(o&&(o.get="hit"),u?l.__staleWhileFetching:(this.#j(a),n&&this.#A(a),l))}else o&&(o.get="miss")}#z(e,r){this.#v[r]=e,this.#p[e]=r}#j(e){e!==this.#g&&(e===this.#w?this.#w=this.#p[e]:this.#z(this.#v[e],this.#p[e]),this.#z(this.#g,e),this.#g=e)}delete(e){return this.#P(e,"delete")}#P(e,r){let i=!1;if(this.#a!==0){let n=this.#c.get(e);if(n!==void 0)if(i=!0,this.#a===1)this.#$(r);else{this.#q(n);let s=this.#r[n];if(this.#u(s)?s.__abortController.abort(new Error("deleted")):(this.#S||this.#d)&&(this.#S&&this.#s?.(s,e,r),this.#d&&this.#m?.push([s,e,r])),this.#c.delete(e),this.#l[n]=void 0,this.#r[n]=void 0,n===this.#g)this.#g=this.#v[n];else if(n===this.#w)this.#w=this.#p[n];else{let o=this.#v[n];this.#p[o]=this.#p[n];let a=this.#p[n];this.#v[a]=this.#v[n]}this.#a--,this.#O.push(n)}}if(this.#d&&this.#m?.length){let n=this.#m,s;for(;s=n?.shift();)this.#o?.(...s)}return i}clear(){return this.#$("delete")}#$(e){for(let r of this.#D({allowStale:!0})){let i=this.#r[r];if(this.#u(i))i.__abortController.abort(new Error("deleted"));else{let n=this.#l[r];this.#S&&this.#s?.(i,n,e),this.#d&&this.#m?.push([i,n,e])}}if(this.#c.clear(),this.#r.fill(void 0),this.#l.fill(void 0),this.#y&&this.#T&&(this.#y.fill(0),this.#T.fill(0)),this.#E&&this.#E.fill(0),this.#w=0,this.#g=0,this.#O.length=0,this.#h=0,this.#a=0,this.#d&&this.#m){let r=this.#m,i;for(;i=r?.shift();)this.#o?.(...i)}}};import{posix as M1,win32 as Ta}from"node:path";import{fileURLToPath as O1}from"node:url";import{lstatSync as A1,readdir as k1,readdirSync as P1,readlinkSync as D1,realpathSync as C1}from"fs";import*as q1 from"node:fs";import{lstat as N1,readdir as j1,readlink as F1,realpath as I1}from"node:fs/promises";import{EventEmitter as Ea}from"node:events";import Ad from"node:stream";import{StringDecoder as y1}from"node:string_decoder";var xd=typeof process=="object"&&process?process:{stdout:null,stderr:null},b1=t=>!!t&&typeof t=="object"&&(t instanceof Tt||t instanceof Ad||w1(t)||_1(t)),w1=t=>!!t&&typeof t=="object"&&t instanceof Ea&&typeof t.pipe=="function"&&t.pipe!==Ad.Writable.prototype.pipe,_1=t=>!!t&&typeof t=="object"&&t instanceof Ea&&typeof t.write=="function"&&typeof t.end=="function",st=Symbol("EOF"),ot=Symbol("maybeEmitEnd"),xt=Symbol("emittedEnd"),Yn=Symbol("emittingEnd"),ci=Symbol("emittedError"),Kn=Symbol("closed"),Td=Symbol("read"),Jn=Symbol("flush"),Md=Symbol("flushChunk"),Ue=Symbol("encoding"),vr=Symbol("decoder"),fe=Symbol("flowing"),hi=Symbol("paused"),Sr=Symbol("resume"),ce=Symbol("buffer"),Re=Symbol("pipes"),he=Symbol("bufferLength"),ya=Symbol("bufferPush"),Zn=Symbol("bufferShift"),be=Symbol("objectMode"),ee=Symbol("destroyed"),ba=Symbol("error"),wa=Symbol("emitData"),Od=Symbol("emitEnd"),_a=Symbol("emitEnd2"),Xe=Symbol("async"),va=Symbol("abort"),Qn=Symbol("aborted"),di=Symbol("signal"),Kt=Symbol("dataListeners"),Ae=Symbol("discarded"),pi=t=>Promise.resolve().then(t),v1=t=>t(),S1=t=>t==="end"||t==="finish"||t==="prefinish",E1=t=>t instanceof ArrayBuffer||!!t&&typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,R1=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),Xn=class{src;dest;opts;ondrain;constructor(e,r,i){this.src=e,this.dest=r,this.opts=i,this.ondrain=()=>e[Sr](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},Sa=class extends Xn{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,r,i){super(e,r,i),this.proxyErrors=n=>r.emit("error",n),e.on("error",this.proxyErrors)}},x1=t=>!!t.objectMode,T1=t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer",Tt=class extends Ea{[fe]=!1;[hi]=!1;[Re]=[];[ce]=[];[be];[Ue];[Xe];[vr];[st]=!1;[xt]=!1;[Yn]=!1;[Kn]=!1;[ci]=null;[he]=0;[ee]=!1;[di];[Qn]=!1;[Kt]=0;[Ae]=!1;writable=!0;readable=!0;constructor(...e){let r=e[0]||{};if(super(),r.objectMode&&typeof r.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");x1(r)?(this[be]=!0,this[Ue]=null):T1(r)?(this[Ue]=r.encoding,this[be]=!1):(this[be]=!1,this[Ue]=null),this[Xe]=!!r.async,this[vr]=this[Ue]?new y1(this[Ue]):null,r&&r.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[ce]}),r&&r.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[Re]});let{signal:i}=r;i&&(this[di]=i,i.aborted?this[va]():i.addEventListener("abort",()=>this[va]()))}get bufferLength(){return this[he]}get encoding(){return this[Ue]}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[be]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[Xe]}set async(e){this[Xe]=this[Xe]||!!e}[va](){this[Qn]=!0,this.emit("abort",this[di]?.reason),this.destroy(this[di]?.reason)}get aborted(){return this[Qn]}set aborted(e){}write(e,r,i){if(this[Qn])return!1;if(this[st])throw new Error("write after end");if(this[ee])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof r=="function"&&(i=r,r="utf8"),r||(r="utf8");let n=this[Xe]?pi:v1;if(!this[be]&&!Buffer.isBuffer(e)){if(R1(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(E1(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[be]?(this[fe]&&this[he]!==0&&this[Jn](!0),this[fe]?this.emit("data",e):this[ya](e),this[he]!==0&&this.emit("readable"),i&&n(i),this[fe]):e.length?(typeof e=="string"&&!(r===this[Ue]&&!this[vr]?.lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[Ue]&&(e=this[vr].write(e)),this[fe]&&this[he]!==0&&this[Jn](!0),this[fe]?this.emit("data",e):this[ya](e),this[he]!==0&&this.emit("readable"),i&&n(i),this[fe]):(this[he]!==0&&this.emit("readable"),i&&n(i),this[fe])}read(e){if(this[ee])return null;if(this[Ae]=!1,this[he]===0||e===0||e&&e>this[he])return this[ot](),null;this[be]&&(e=null),this[ce].length>1&&!this[be]&&(this[ce]=[this[Ue]?this[ce].join(""):Buffer.concat(this[ce],this[he])]);let r=this[Td](e||null,this[ce][0]);return this[ot](),r}[Td](e,r){if(this[be])this[Zn]();else{let i=r;e===i.length||e===null?this[Zn]():typeof i=="string"?(this[ce][0]=i.slice(e),r=i.slice(0,e),this[he]-=e):(this[ce][0]=i.subarray(e),r=i.subarray(0,e),this[he]-=e)}return this.emit("data",r),!this[ce].length&&!this[st]&&this.emit("drain"),r}end(e,r,i){return typeof e=="function"&&(i=e,e=void 0),typeof r=="function"&&(i=r,r="utf8"),e!==void 0&&this.write(e,r),i&&this.once("end",i),this[st]=!0,this.writable=!1,(this[fe]||!this[hi])&&this[ot](),this}[Sr](){this[ee]||(!this[Kt]&&!this[Re].length&&(this[Ae]=!0),this[hi]=!1,this[fe]=!0,this.emit("resume"),this[ce].length?this[Jn]():this[st]?this[ot]():this.emit("drain"))}resume(){return this[Sr]()}pause(){this[fe]=!1,this[hi]=!0,this[Ae]=!1}get destroyed(){return this[ee]}get flowing(){return this[fe]}get paused(){return this[hi]}[ya](e){this[be]?this[he]+=1:this[he]+=e.length,this[ce].push(e)}[Zn](){return this[be]?this[he]-=1:this[he]-=this[ce][0].length,this[ce].shift()}[Jn](e=!1){do;while(this[Md](this[Zn]())&&this[ce].length);!e&&!this[ce].length&&!this[st]&&this.emit("drain")}[Md](e){return this.emit("data",e),this[fe]}pipe(e,r){if(this[ee])return e;this[Ae]=!1;let i=this[xt];return r=r||{},e===xd.stdout||e===xd.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,i?r.end&&e.end():(this[Re].push(r.proxyErrors?new Sa(this,e,r):new Xn(this,e,r)),this[Xe]?pi(()=>this[Sr]()):this[Sr]()),e}unpipe(e){let r=this[Re].find(i=>i.dest===e);r&&(this[Re].length===1?(this[fe]&&this[Kt]===0&&(this[fe]=!1),this[Re]=[]):this[Re].splice(this[Re].indexOf(r),1),r.unpipe())}addListener(e,r){return this.on(e,r)}on(e,r){let i=super.on(e,r);if(e==="data")this[Ae]=!1,this[Kt]++,!this[Re].length&&!this[fe]&&this[Sr]();else if(e==="readable"&&this[he]!==0)super.emit("readable");else if(S1(e)&&this[xt])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[ci]){let n=r;this[Xe]?pi(()=>n.call(this,this[ci])):n.call(this,this[ci])}return i}removeListener(e,r){return this.off(e,r)}off(e,r){let i=super.off(e,r);return e==="data"&&(this[Kt]=this.listeners("data").length,this[Kt]===0&&!this[Ae]&&!this[Re].length&&(this[fe]=!1)),i}removeAllListeners(e){let r=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[Kt]=0,!this[Ae]&&!this[Re].length&&(this[fe]=!1)),r}get emittedEnd(){return this[xt]}[ot](){!this[Yn]&&!this[xt]&&!this[ee]&&this[ce].length===0&&this[st]&&(this[Yn]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Kn]&&this.emit("close"),this[Yn]=!1)}emit(e,...r){let i=r[0];if(e!=="error"&&e!=="close"&&e!==ee&&this[ee])return!1;if(e==="data")return!this[be]&&!i?!1:this[Xe]?(pi(()=>this[wa](i)),!0):this[wa](i);if(e==="end")return this[Od]();if(e==="close"){if(this[Kn]=!0,!this[xt]&&!this[ee])return!1;let s=super.emit("close");return this.removeAllListeners("close"),s}else if(e==="error"){this[ci]=i,super.emit(ba,i);let s=!this[di]||this.listeners("error").length?super.emit("error",i):!1;return this[ot](),s}else if(e==="resume"){let s=super.emit("resume");return this[ot](),s}else if(e==="finish"||e==="prefinish"){let s=super.emit(e);return this.removeAllListeners(e),s}let n=super.emit(e,...r);return this[ot](),n}[wa](e){for(let i of this[Re])i.dest.write(e)===!1&&this.pause();let r=this[Ae]?!1:super.emit("data",e);return this[ot](),r}[Od](){return this[xt]?!1:(this[xt]=!0,this.readable=!1,this[Xe]?(pi(()=>this[_a]()),!0):this[_a]())}[_a](){if(this[vr]){let r=this[vr].end();if(r){for(let i of this[Re])i.dest.write(r);this[Ae]||super.emit("data",r)}}for(let r of this[Re])r.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[be]||(e.dataLength=0);let r=this.promise();return this.on("data",i=>{e.push(i),this[be]||(e.dataLength+=i.length)}),await r,e}async concat(){if(this[be])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Ue]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,r)=>{this.on(ee,()=>r(new Error("stream destroyed"))),this.on("error",i=>r(i)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[Ae]=!1;let e=!1,r=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return r();let n=this.read();if(n!==null)return Promise.resolve({done:!1,value:n});if(this[st])return r();let s,o,a=f=>{this.off("data",l),this.off("end",u),this.off(ee,c),r(),o(f)},l=f=>{this.off("error",a),this.off("end",u),this.off(ee,c),this.pause(),s({value:f,done:!!this[st]})},u=()=>{this.off("error",a),this.off("data",l),this.off(ee,c),r(),s({done:!0,value:void 0})},c=()=>a(new Error("stream destroyed"));return new Promise((f,p)=>{o=p,s=f,this.once(ee,c),this.once("error",a),this.once("end",u),this.once("data",l)})},throw:r,return:r,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[Ae]=!1;let e=!1,r=()=>(this.pause(),this.off(ba,r),this.off(ee,r),this.off("end",r),e=!0,{done:!0,value:void 0}),i=()=>{if(e)return r();let n=this.read();return n===null?r():{done:!1,value:n}};return this.once("end",r),this.once(ba,r),this.once(ee,r),{next:i,throw:r,return:r,[Symbol.iterator](){return this}}}destroy(e){if(this[ee])return e?this.emit("error",e):this.emit(ee),this;this[ee]=!0,this[Ae]=!0,this[ce].length=0,this[he]=0;let r=this;return typeof r.close=="function"&&!this[Kn]&&r.close(),e?this.emit("error",e):this.emit(ee),this}static get isStream(){return b1}};var L1=C1.native,mi={lstatSync:A1,readdir:k1,readdirSync:P1,readlinkSync:D1,realpathSync:L1,promises:{lstat:N1,readdir:j1,readlink:F1,realpath:I1}},qd=t=>!t||t===mi||t===q1?mi:{...mi,...t,promises:{...mi.promises,...t.promises||{}}},Ld=/^\\\\\?\\([a-z]:)\\?$/i,$1=t=>t.replace(/\//g,"\\").replace(Ld,"$1\\"),W1=/[\\\/]/,je=0,Nd=1,jd=2,et=4,Fd=6,Id=8,Jt=10,$d=12,Ne=15,gi=~Ne,Ra=16,kd=32,yi=64,ze=128,es=256,rs=512,Pd=yi|ze|rs,B1=1023,xa=t=>t.isFile()?Id:t.isDirectory()?et:t.isSymbolicLink()?Jt:t.isCharacterDevice()?jd:t.isBlockDevice()?Fd:t.isSocket()?$d:t.isFIFO()?Nd:je,Dd=new Yt({max:2**12}),bi=t=>{let e=Dd.get(t);if(e)return e;let r=t.normalize("NFKD");return Dd.set(t,r),r},Cd=new Yt({max:2**12}),ts=t=>{let e=Cd.get(t);if(e)return e;let r=bi(t.toLowerCase());return Cd.set(t,r),r},is=class extends Yt{constructor(){super({max:256})}},Ma=class extends Yt{constructor(e=16*1024){super({maxSize:e,sizeCalculation:r=>r.length+1})}},Wd=Symbol("PathScurry setAsCwd"),we=class{name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#s;get mode(){return this.#s}#n;get nlink(){return this.#n}#o;get uid(){return this.#o}#_;get gid(){return this.#_}#b;get rdev(){return this.#b}#f;get blksize(){return this.#f}#a;get ino(){return this.#a}#h;get size(){return this.#h}#c;get blocks(){return this.#c}#l;get atimeMs(){return this.#l}#r;get mtimeMs(){return this.#r}#p;get ctimeMs(){return this.#p}#v;get birthtimeMs(){return this.#v}#w;get atime(){return this.#w}#g;get mtime(){return this.#g}#O;get ctime(){return this.#O}#m;get birthtime(){return this.#m}#E;#T;#y;#S;#M;#d;#i;#C;#A;#R;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,r=je,i,n,s,o,a){this.name=e,this.#E=s?ts(e):bi(e),this.#i=r&B1,this.nocase=s,this.roots=n,this.root=i||this,this.#C=o,this.#y=a.fullpath,this.#M=a.relative,this.#d=a.relativePosix,this.parent=a.parent,this.parent?this.#e=this.parent.#e:this.#e=qd(a.fs)}depth(){return this.#T!==void 0?this.#T:this.parent?this.#T=this.parent.depth()+1:this.#T=0}childrenCache(){return this.#C}resolve(e){if(!e)return this;let r=this.getRootString(e),n=e.substring(r.length).split(this.splitSep);return r?this.getRoot(r).#W(n):this.#W(n)}#W(e){let r=this;for(let i of e)r=r.child(i);return r}children(){let e=this.#C.get(this);if(e)return e;let r=Object.assign([],{provisional:0});return this.#C.set(this,r),this.#i&=~Ra,r}child(e,r){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let i=this.children(),n=this.nocase?ts(e):bi(e);for(let l of i)if(l.#E===n)return l;let s=this.parent?this.sep:"",o=this.#y?this.#y+s+e:void 0,a=this.newChild(e,je,{...r,parent:this,fullpath:o});return this.canReaddir()||(a.#i|=ze),i.push(a),a}relative(){if(this.isCWD)return"";if(this.#M!==void 0)return this.#M;let e=this.name,r=this.parent;if(!r)return this.#M=this.name;let i=r.relative();return i+(!i||!r.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#d!==void 0)return this.#d;let e=this.name,r=this.parent;if(!r)return this.#d=this.fullpathPosix();let i=r.relativePosix();return i+(!i||!r.parent?"":"/")+e}fullpath(){if(this.#y!==void 0)return this.#y;let e=this.name,r=this.parent;if(!r)return this.#y=this.name;let n=r.fullpath()+(r.parent?this.sep:"")+e;return this.#y=n}fullpathPosix(){if(this.#S!==void 0)return this.#S;if(this.sep==="/")return this.#S=this.fullpath();if(!this.parent){let n=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(n)?this.#S=`//?/${n}`:this.#S=n}let e=this.parent,r=e.fullpathPosix(),i=r+(!r||!e.parent?"":"/")+this.name;return this.#S=i}isUnknown(){return(this.#i&Ne)===je}isType(e){return this[`is${e}`]()}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(this.#i&Ne)===Id}isDirectory(){return(this.#i&Ne)===et}isCharacterDevice(){return(this.#i&Ne)===jd}isBlockDevice(){return(this.#i&Ne)===Fd}isFIFO(){return(this.#i&Ne)===Nd}isSocket(){return(this.#i&Ne)===$d}isSymbolicLink(){return(this.#i&Jt)===Jt}lstatCached(){return this.#i&kd?this:void 0}readlinkCached(){return this.#A}realpathCached(){return this.#R}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#A)return!0;if(!this.parent)return!1;let e=this.#i&Ne;return!(e!==je&&e!==Jt||this.#i&es||this.#i&ze)}calledReaddir(){return!!(this.#i&Ra)}isENOENT(){return!!(this.#i&ze)}isNamed(e){return this.nocase?this.#E===ts(e):this.#E===bi(e)}async readlink(){let e=this.#A;if(e)return e;if(this.canReadlink()&&this.parent)try{let r=await this.#e.promises.readlink(this.fullpath()),i=(await this.parent.realpath())?.resolve(r);if(i)return this.#A=i}catch(r){this.#B(r.code);return}}readlinkSync(){let e=this.#A;if(e)return e;if(this.canReadlink()&&this.parent)try{let r=this.#e.readlinkSync(this.fullpath()),i=this.parent.realpathSync()?.resolve(r);if(i)return this.#A=i}catch(r){this.#B(r.code);return}}#x(e){this.#i|=Ra;for(let r=e.provisional;r<e.length;r++){let i=e[r];i&&i.#F()}}#F(){this.#i&ze||(this.#i=(this.#i|ze)&gi,this.#q())}#q(){let e=this.children();e.provisional=0;for(let r of e)r.#F()}#I(){this.#i|=rs,this.#L()}#L(){if(this.#i&yi)return;let e=this.#i;(e&Ne)===et&&(e&=gi),this.#i=e|yi,this.#q()}#k(e=""){e==="ENOTDIR"||e==="EPERM"?this.#L():e==="ENOENT"?this.#F():this.children().provisional=0}#D(e=""){e==="ENOTDIR"?this.parent.#L():e==="ENOENT"&&this.#F()}#B(e=""){let r=this.#i;r|=es,e==="ENOENT"&&(r|=ze),(e==="EINVAL"||e==="UNKNOWN")&&(r&=gi),this.#i=r,e==="ENOTDIR"&&this.parent&&this.parent.#L()}#N(e,r){return this.#u(e,r)||this.#U(e,r)}#U(e,r){let i=xa(e),n=this.newChild(e.name,i,{parent:this}),s=n.#i&Ne;return s!==et&&s!==Jt&&s!==je&&(n.#i|=yi),r.unshift(n),r.provisional++,n}#u(e,r){for(let i=r.provisional;i<r.length;i++){let n=r[i];if((this.nocase?ts(e.name):bi(e.name))===n.#E)return this.#z(e,n,i,r)}}#z(e,r,i,n){let s=r.name;return r.#i=r.#i&gi|xa(e),s!==e.name&&(r.name=e.name),i!==n.provisional&&(i===n.length-1?n.pop():n.splice(i,1),n.unshift(r)),n.provisional++,r}async lstat(){if((this.#i&ze)===0)try{return this.#j(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#D(e.code)}}lstatSync(){if((this.#i&ze)===0)try{return this.#j(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#D(e.code)}}#j(e){let{atime:r,atimeMs:i,birthtime:n,birthtimeMs:s,blksize:o,blocks:a,ctime:l,ctimeMs:u,dev:c,gid:f,ino:p,mode:m,mtime:d,mtimeMs:b,nlink:v,rdev:S,size:T,uid:R}=e;this.#w=r,this.#l=i,this.#m=n,this.#v=s,this.#f=o,this.#c=a,this.#O=l,this.#p=u,this.#t=c,this.#_=f,this.#a=p,this.#s=m,this.#g=d,this.#r=b,this.#n=v,this.#b=S,this.#h=T,this.#o=R;let x=xa(e);this.#i=this.#i&gi|x|kd,x!==je&&x!==et&&x!==Jt&&(this.#i|=yi)}#P=[];#$=!1;#G(e){this.#$=!1;let r=this.#P.slice();this.#P.length=0,r.forEach(i=>i(null,e))}readdirCB(e,r=!1){if(!this.canReaddir()){r?e(null,[]):queueMicrotask(()=>e(null,[]));return}let i=this.children();if(this.calledReaddir()){let s=i.slice(0,i.provisional);r?e(null,s):queueMicrotask(()=>e(null,s));return}if(this.#P.push(e),this.#$)return;this.#$=!0;let n=this.fullpath();this.#e.readdir(n,{withFileTypes:!0},(s,o)=>{if(s)this.#k(s.code),i.provisional=0;else{for(let a of o)this.#N(a,i);this.#x(i)}this.#G(i.slice(0,i.provisional))})}#H;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let r=this.fullpath();if(this.#H)await this.#H;else{let i=()=>{};this.#H=new Promise(n=>i=n);try{for(let n of await this.#e.promises.readdir(r,{withFileTypes:!0}))this.#N(n,e);this.#x(e)}catch(n){this.#k(n.code),e.provisional=0}this.#H=void 0,i()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let r=this.fullpath();try{for(let i of this.#e.readdirSync(r,{withFileTypes:!0}))this.#N(i,e);this.#x(e)}catch(i){this.#k(i.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#i&Pd)return!1;let e=Ne&this.#i;return e===je||e===et||e===Jt}shouldWalk(e,r){return(this.#i&et)===et&&!(this.#i&Pd)&&!e.has(this)&&(!r||r(this))}async realpath(){if(this.#R)return this.#R;if(!((rs|es|ze)&this.#i))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#R=this.resolve(e)}catch{this.#I()}}realpathSync(){if(this.#R)return this.#R;if(!((rs|es|ze)&this.#i))try{let e=this.#e.realpathSync(this.fullpath());return this.#R=this.resolve(e)}catch{this.#I()}}[Wd](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let r=new Set([]),i=[],n=this;for(;n&&n.parent;)r.add(n),n.#M=i.join(this.sep),n.#d=i.join("/"),n=n.parent,i.push("..");for(n=e;n&&n.parent&&!r.has(n);)n.#M=void 0,n.#d=void 0,n=n.parent}},ns=class t extends we{sep="\\";splitSep=W1;constructor(e,r=je,i,n,s,o,a){super(e,r,i,n,s,o,a)}newChild(e,r=je,i={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),i)}getRootString(e){return Ta.parse(e).root}getRoot(e){if(e=$1(e.toUpperCase()),e===this.root.name)return this.root;for(let[r,i]of Object.entries(this.roots))if(this.sameRoot(e,r))return this.roots[e]=i;return this.roots[e]=new Er(e,this).root}sameRoot(e,r=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(Ld,"$1\\"),e===r}},ss=class t extends we{splitSep="/";sep="/";constructor(e,r=je,i,n,s,o,a){super(e,r,i,n,s,o,a)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,r=je,i={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),i)}},os=class{root;rootPath;roots;cwd;#e;#t;#s;nocase;#n;constructor(e=process.cwd(),r,i,{nocase:n,childrenCacheSize:s=16*1024,fs:o=mi}={}){this.#n=qd(o),(e instanceof URL||e.startsWith("file://"))&&(e=O1(e));let a=r.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(a),this.#e=new is,this.#t=new is,this.#s=new Ma(s);let l=a.substring(this.rootPath.length).split(i);if(l.length===1&&!l[0]&&l.pop(),n===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=n,this.root=this.newRoot(this.#n),this.roots[this.rootPath]=this.root;let u=this.root,c=l.length-1,f=r.sep,p=this.rootPath,m=!1;for(let d of l){let b=c--;u=u.child(d,{relative:new Array(b).fill("..").join(f),relativePosix:new Array(b).fill("..").join("/"),fullpath:p+=(m?"":f)+d}),m=!0}this.cwd=u}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#s}resolve(...e){let r="";for(let s=e.length-1;s>=0;s--){let o=e[s];if(!(!o||o===".")&&(r=r?`${o}/${r}`:o,this.isAbsolute(o)))break}let i=this.#e.get(r);if(i!==void 0)return i;let n=this.cwd.resolve(r).fullpath();return this.#e.set(r,n),n}resolvePosix(...e){let r="";for(let s=e.length-1;s>=0;s--){let o=e[s];if(!(!o||o===".")&&(r=r?`${o}/${r}`:o,this.isAbsolute(o)))break}let i=this.#t.get(r);if(i!==void 0)return i;let n=this.cwd.resolve(r).fullpathPosix();return this.#t.set(r,n),n}relative(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,r={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof we||(r=e,e=this.cwd);let{withFileTypes:i}=r;if(e.canReaddir()){let n=await e.readdir();return i?n:n.map(s=>s.name)}else return[]}readdirSync(e=this.cwd,r={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof we||(r=e,e=this.cwd);let{withFileTypes:i=!0}=r;return e.canReaddir()?i?e.readdirSync():e.readdirSync().map(n=>n.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof we||(r=e.withFileTypes,e=this.cwd);let i=await e.readlink();return r?i:i?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof we||(r=e.withFileTypes,e=this.cwd);let i=e.readlinkSync();return r?i:i?.fullpath()}async realpath(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof we||(r=e.withFileTypes,e=this.cwd);let i=await e.realpath();return r?i:i?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof we||(r=e.withFileTypes,e=this.cwd);let i=e.realpathSync();return r?i:i?.fullpath()}async walk(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof we||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:o}=r,a=[];(!s||s(e))&&a.push(i?e:e.fullpath());let l=new Set,u=(f,p)=>{l.add(f),f.readdirCB((m,d)=>{if(m)return p(m);let b=d.length;if(!b)return p();let v=()=>{--b===0&&p()};for(let S of d)(!s||s(S))&&a.push(i?S:S.fullpath()),n&&S.isSymbolicLink()?S.realpath().then(T=>T?.isUnknown()?T.lstat():T).then(T=>T?.shouldWalk(l,o)?u(T,v):v()):S.shouldWalk(l,o)?u(S,v):v()},!0)},c=e;return new Promise((f,p)=>{u(c,m=>{if(m)return p(m);f(a)})})}walkSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof we||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:o}=r,a=[];(!s||s(e))&&a.push(i?e:e.fullpath());let l=new Set([e]);for(let u of l){let c=u.readdirSync();for(let f of c){(!s||s(f))&&a.push(i?f:f.fullpath());let p=f;if(f.isSymbolicLink()){if(!(n&&(p=f.realpathSync())))continue;p.isUnknown()&&p.lstatSync()}p.shouldWalk(l,o)&&l.add(p)}}return a}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,r={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof we||(r=e,e=this.cwd),this.stream(e,r)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof we||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:o}=r;(!s||s(e))&&(yield i?e:e.fullpath());let a=new Set([e]);for(let l of a){let u=l.readdirSync();for(let c of u){(!s||s(c))&&(yield i?c:c.fullpath());let f=c;if(c.isSymbolicLink()){if(!(n&&(f=c.realpathSync())))continue;f.isUnknown()&&f.lstatSync()}f.shouldWalk(a,o)&&a.add(f)}}}stream(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof we||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:o}=r,a=new Tt({objectMode:!0});(!s||s(e))&&a.write(i?e:e.fullpath());let l=new Set,u=[e],c=0,f=()=>{let p=!1;for(;!p;){let m=u.shift();if(!m){c===0&&a.end();return}c++,l.add(m);let d=(v,S,T=!1)=>{if(v)return a.emit("error",v);if(n&&!T){let R=[];for(let x of S)x.isSymbolicLink()&&R.push(x.realpath().then(k=>k?.isUnknown()?k.lstat():k));if(R.length){Promise.all(R).then(()=>d(null,S,!0));return}}for(let R of S)R&&(!s||s(R))&&(a.write(i?R:R.fullpath())||(p=!0));c--;for(let R of S){let x=R.realpathCached()||R;x.shouldWalk(l,o)&&u.push(x)}p&&!a.flowing?a.once("drain",f):b||f()},b=!0;m.readdirCB(d,!0),b=!1}};return f(),a}streamSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof we||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:o}=r,a=new Tt({objectMode:!0}),l=new Set;(!s||s(e))&&a.write(i?e:e.fullpath());let u=[e],c=0,f=()=>{let p=!1;for(;!p;){let m=u.shift();if(!m){c===0&&a.end();return}c++,l.add(m);let d=m.readdirSync();for(let b of d)(!s||s(b))&&(a.write(i?b:b.fullpath())||(p=!0));c--;for(let b of d){let v=b;if(b.isSymbolicLink()){if(!(n&&(v=b.realpathSync())))continue;v.isUnknown()&&v.lstatSync()}v.shouldWalk(l,o)&&u.push(v)}}p&&!a.flowing&&a.once("drain",f)};return f(),a}chdir(e=this.cwd){let r=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[Wd](r)}},Er=class extends os{sep="\\";constructor(e=process.cwd(),r={}){let{nocase:i=!0}=r;super(e,Ta,"\\",{...r,nocase:i}),this.nocase=i;for(let n=this.cwd;n;n=n.parent)n.nocase=this.nocase}parseRootPath(e){return Ta.parse(e).root.toUpperCase()}newRoot(e){return new ns(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)}},Rr=class extends os{sep="/";constructor(e=process.cwd(),r={}){let{nocase:i=!1}=r;super(e,M1,"/",{...r,nocase:i}),this.nocase=i}parseRootPath(e){return"/"}newRoot(e){return new ss(this.rootPath,et,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},wi=class extends Rr{constructor(e=process.cwd(),r={}){let{nocase:i=!0}=r;super(e,{...r,nocase:i})}},RR=process.platform==="win32"?ns:ss,Bd=process.platform==="win32"?Er:process.platform==="darwin"?wi:Rr;var U1=t=>t.length>=1,z1=t=>t.length>=1,xr=class t{#e;#t;#s;length;#n;#o;#_;#b;#f;#a;#h=!0;constructor(e,r,i,n){if(!U1(e))throw new TypeError("empty pattern list");if(!z1(r))throw new TypeError("empty glob list");if(r.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,i<0||i>=this.length)throw new TypeError("index out of range");if(this.#e=e,this.#t=r,this.#s=i,this.#n=n,this.#s===0){if(this.isUNC()){let[s,o,a,l,...u]=this.#e,[c,f,p,m,...d]=this.#t;u[0]===""&&(u.shift(),d.shift());let b=[s,o,a,l,""].join("/"),v=[c,f,p,m,""].join("/");this.#e=[b,...u],this.#t=[v,...d],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[s,...o]=this.#e,[a,...l]=this.#t;o[0]===""&&(o.shift(),l.shift());let u=s+"/",c=a+"/";this.#e=[u,...o],this.#t=[c,...l],this.length=this.#e.length}}}pattern(){return this.#e[this.#s]}isString(){return typeof this.#e[this.#s]=="string"}isGlobstar(){return this.#e[this.#s]===ge}isRegExp(){return this.#e[this.#s]instanceof RegExp}globString(){return this.#_=this.#_||(this.#s===0?this.isAbsolute()?this.#t[0]+this.#t.slice(1).join("/"):this.#t.join("/"):this.#t.slice(this.#s).join("/"))}hasMore(){return this.length>this.#s+1}rest(){return this.#o!==void 0?this.#o:this.hasMore()?(this.#o=new t(this.#e,this.#t,this.#s+1,this.#n),this.#o.#a=this.#a,this.#o.#f=this.#f,this.#o.#b=this.#b,this.#o):this.#o=null}isUNC(){let e=this.#e;return this.#f!==void 0?this.#f:this.#f=this.#n==="win32"&&this.#s===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#e;return this.#b!==void 0?this.#b:this.#b=this.#n==="win32"&&this.#s===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#e;return this.#a!==void 0?this.#a:this.#a=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#e[0];return typeof e=="string"&&this.isAbsolute()&&this.#s===0?e:""}checkFollowGlobstar(){return!(this.#s===0||!this.isGlobstar()||!this.#h)}markFollowGlobstar(){return this.#s===0||!this.isGlobstar()||!this.#h?!1:(this.#h=!1,!0)}};var H1=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Tr=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:r,nocase:i,noext:n,noglobstar:s,platform:o=H1}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:r,nocase:i,noext:n,noglobstar:s,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(let a of e)this.add(a)}add(e){let r=new Oe(e,this.mmopts);for(let i=0;i<r.set.length;i++){let n=r.set[i],s=r.globParts[i];if(!n||!s)throw new Error("invalid pattern object");for(;n[0]==="."&&s[0]===".";)n.shift(),s.shift();let o=new xr(n,s,0,this.platform),a=new Oe(o.globString(),this.mmopts),l=s[s.length-1]==="**",u=o.isAbsolute();u?this.absolute.push(a):this.relative.push(a),l&&(u?this.absoluteChildren.push(a):this.relativeChildren.push(a))}}ignored(e){let r=e.fullpath(),i=`${r}/`,n=e.relative()||".",s=`${n}/`;for(let o of this.relative)if(o.match(n)||o.match(s))return!0;for(let o of this.absolute)if(o.match(r)||o.match(i))return!0;return!1}childrenIgnored(e){let r=e.fullpath()+"/",i=(e.relative()||".")+"/";for(let n of this.relativeChildren)if(n.match(i))return!0;for(let n of this.absoluteChildren)if(n.match(r))return!0;return!1}};var Oa=class t{store;constructor(e=new Map){this.store=e}copy(){return new t(new Map(this.store))}hasWalked(e,r){return this.store.get(e.fullpath())?.has(r.globString())}storeWalked(e,r){let i=e.fullpath(),n=this.store.get(i);n?n.add(r.globString()):this.store.set(i,new Set([r.globString()]))}},Aa=class{store=new Map;add(e,r,i){let n=(r?2:0)|(i?1:0),s=this.store.get(e);this.store.set(e,s===void 0?n:n&s)}entries(){return[...this.store.entries()].map(([e,r])=>[e,!!(r&2),!!(r&1)])}},ka=class{store=new Map;add(e,r){if(!e.canReaddir())return;let i=this.store.get(e);i?i.find(n=>n.globString()===r.globString())||i.push(r):this.store.set(e,[r])}get(e){let r=this.store.get(e);if(!r)throw new Error("attempting to walk unknown path");return r}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}},_i=class t{hasWalkedCache;matches=new Aa;subwalks=new ka;patterns;follow;dot;opts;constructor(e,r){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=r?r.copy():new Oa}processPatterns(e,r){this.patterns=r;let i=r.map(n=>[e,n]);for(let[n,s]of i){this.hasWalkedCache.storeWalked(n,s);let o=s.root(),a=s.isAbsolute()&&this.opts.absolute!==!1;if(o){n=n.resolve(o==="/"&&this.opts.root!==void 0?this.opts.root:o);let f=s.rest();if(f)s=f;else{this.matches.add(n,!0,!1);continue}}if(n.isENOENT())continue;let l,u,c=!1;for(;typeof(l=s.pattern())=="string"&&(u=s.rest());)n=n.resolve(l),s=u,c=!0;if(l=s.pattern(),u=s.rest(),c){if(this.hasWalkedCache.hasWalked(n,s))continue;this.hasWalkedCache.storeWalked(n,s)}if(typeof l=="string"){let f=l===".."||l===""||l===".";this.matches.add(n.resolve(l),a,f);continue}else if(l===ge){(!n.isSymbolicLink()||this.follow||s.checkFollowGlobstar())&&this.subwalks.add(n,s);let f=u?.pattern(),p=u?.rest();if(!u||(f===""||f===".")&&!p)this.matches.add(n,a,f===""||f===".");else if(f===".."){let m=n.parent||n;p?this.hasWalkedCache.hasWalked(m,p)||this.subwalks.add(m,p):this.matches.add(m,a,!0)}}else l instanceof RegExp&&this.subwalks.add(n,s)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new t(this.opts,this.hasWalkedCache)}filterEntries(e,r){let i=this.subwalks.get(e),n=this.child();for(let s of r)for(let o of i){let a=o.isAbsolute(),l=o.pattern(),u=o.rest();l===ge?n.testGlobstar(s,o,u,a):l instanceof RegExp?n.testRegExp(s,l,u,a):n.testString(s,l,u,a)}return n}testGlobstar(e,r,i,n){if((this.dot||!e.name.startsWith("."))&&(r.hasMore()||this.matches.add(e,n,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,r):e.isSymbolicLink()&&(i&&r.checkFollowGlobstar()?this.subwalks.add(e,i):r.markFollowGlobstar()&&this.subwalks.add(e,r)))),i){let s=i.pattern();if(typeof s=="string"&&s!==".."&&s!==""&&s!==".")this.testString(e,s,i.rest(),n);else if(s===".."){let o=e.parent||e;this.subwalks.add(o,i)}else s instanceof RegExp&&this.testRegExp(e,s,i.rest(),n)}}testRegExp(e,r,i,n){r.test(e.name)&&(i?this.subwalks.add(e,i):this.matches.add(e,n,!1))}testString(e,r,i,n){e.isNamed(r)&&(i?this.subwalks.add(e,i):this.matches.add(e,n,!1))}};var G1=(t,e)=>typeof t=="string"?new Tr([t],e):Array.isArray(t)?new Tr(t,e):t,as=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#t;#s;signal;maxDepth;includeChildMatches;constructor(e,r,i){if(this.patterns=e,this.path=r,this.opts=i,this.#s=!i.posix&&i.platform==="win32"?"\\":"/",this.includeChildMatches=i.includeChildMatches!==!1,(i.ignore||!this.includeChildMatches)&&(this.#t=G1(i.ignore??[],i),!this.includeChildMatches&&typeof this.#t.add!="function")){let n="cannot ignore child matches, ignore lacks add() method.";throw new Error(n)}this.maxDepth=i.maxDepth||1/0,i.signal&&(this.signal=i.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#n(e){return this.seen.has(e)||!!this.#t?.ignored?.(e)}#o(e){return!!this.#t?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,r){if(r&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=e.realpathCached()||await e.realpath(),!i)return;e=i}let s=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let o=await s.realpath();o&&(o.isUnknown()||this.opts.stat)&&await o.lstat()}return this.matchCheckTest(s,r)}matchCheckTest(e,r){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!r||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#n(e)?e:void 0}matchCheckSync(e,r){if(r&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=e.realpathCached()||e.realpathSync(),!i)return;e=i}let s=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let o=s.realpathSync();o&&(o?.isUnknown()||this.opts.stat)&&o.lstatSync()}return this.matchCheckTest(s,r)}matchFinish(e,r){if(this.#n(e))return;if(!this.includeChildMatches&&this.#t?.add){let s=`${e.relativePosix()}/**`;this.#t.add(s)}let i=this.opts.absolute===void 0?r:this.opts.absolute;this.seen.add(e);let n=this.opts.mark&&e.isDirectory()?this.#s:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(i){let s=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(s+n)}else{let s=this.opts.posix?e.relativePosix():e.relative(),o=this.opts.dotRelative&&!s.startsWith(".."+this.#s)?"."+this.#s:"";this.matchEmit(s?o+s+n:"."+n)}}async match(e,r,i){let n=await this.matchCheck(e,i);n&&this.matchFinish(n,r)}matchSync(e,r,i){let n=this.matchCheckSync(e,i);n&&this.matchFinish(n,r)}walkCB(e,r,i){this.signal?.aborted&&i(),this.walkCB2(e,r,new _i(this.opts),i)}walkCB2(e,r,i,n){if(this.#o(e))return n();if(this.signal?.aborted&&n(),this.paused){this.onResume(()=>this.walkCB2(e,r,i,n));return}i.processPatterns(e,r);let s=1,o=()=>{--s===0&&n()};for(let[a,l,u]of i.matches.entries())this.#n(a)||(s++,this.match(a,l,u).then(()=>o()));for(let a of i.subwalkTargets()){if(this.maxDepth!==1/0&&a.depth()>=this.maxDepth)continue;s++;let l=a.readdirCached();a.calledReaddir()?this.walkCB3(a,l,i,o):a.readdirCB((u,c)=>this.walkCB3(a,c,i,o),!0)}o()}walkCB3(e,r,i,n){i=i.filterEntries(e,r);let s=1,o=()=>{--s===0&&n()};for(let[a,l,u]of i.matches.entries())this.#n(a)||(s++,this.match(a,l,u).then(()=>o()));for(let[a,l]of i.subwalks.entries())s++,this.walkCB2(a,l,i.child(),o);o()}walkCBSync(e,r,i){this.signal?.aborted&&i(),this.walkCB2Sync(e,r,new _i(this.opts),i)}walkCB2Sync(e,r,i,n){if(this.#o(e))return n();if(this.signal?.aborted&&n(),this.paused){this.onResume(()=>this.walkCB2Sync(e,r,i,n));return}i.processPatterns(e,r);let s=1,o=()=>{--s===0&&n()};for(let[a,l,u]of i.matches.entries())this.#n(a)||this.matchSync(a,l,u);for(let a of i.subwalkTargets()){if(this.maxDepth!==1/0&&a.depth()>=this.maxDepth)continue;s++;let l=a.readdirSync();this.walkCB3Sync(a,l,i,o)}o()}walkCB3Sync(e,r,i,n){i=i.filterEntries(e,r);let s=1,o=()=>{--s===0&&n()};for(let[a,l,u]of i.matches.entries())this.#n(a)||this.matchSync(a,l,u);for(let[a,l]of i.subwalks.entries())s++,this.walkCB2Sync(a,l,i.child(),o);o()}},vi=class extends as{matches=new Set;constructor(e,r,i){super(e,r,i)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,r)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?r(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},Si=class extends as{results;constructor(e,r,i){super(e,r,i),this.results=new Tt({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 Y1=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",He=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,r){if(!r)throw new TypeError("glob options required");if(this.withFileTypes=!!r.withFileTypes,this.signal=r.signal,this.follow=!!r.follow,this.dot=!!r.dot,this.dotRelative=!!r.dotRelative,this.nodir=!!r.nodir,this.mark=!!r.mark,r.cwd?(r.cwd instanceof URL||r.cwd.startsWith("file://"))&&(r.cwd=V1(r.cwd)):this.cwd="",this.cwd=r.cwd||"",this.root=r.root,this.magicalBraces=!!r.magicalBraces,this.nobrace=!!r.nobrace,this.noext=!!r.noext,this.realpath=!!r.realpath,this.absolute=r.absolute,this.includeChildMatches=r.includeChildMatches!==!1,this.noglobstar=!!r.noglobstar,this.matchBase=!!r.matchBase,this.maxDepth=typeof r.maxDepth=="number"?r.maxDepth:1/0,this.stat=!!r.stat,this.ignore=r.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(l=>l.replace(/\\/g,"/"))),this.matchBase){if(r.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(l=>l.includes("/")?l:`./**/${l}`)}if(this.pattern=e,this.platform=r.platform||Y1,this.opts={...r,platform:this.platform},r.scurry){if(this.scurry=r.scurry,r.nocase!==void 0&&r.nocase!==r.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let l=r.platform==="win32"?Er:r.platform==="darwin"?wi:r.platform?Rr:Bd;this.scurry=new l(this.cwd,{nocase:r.nocase,fs:r.fs})}this.nocase=this.scurry.nocase;let i=this.platform==="darwin"||this.platform==="win32",n={...r,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},s=this.pattern.map(l=>new Oe(l,n)),[o,a]=s.reduce((l,u)=>(l[0].push(...u.set),l[1].push(...u.globParts),l),[[],[]]);this.patterns=o.map((l,u)=>{let c=a[u];if(!c)throw new Error("invalid pattern object");return new xr(l,c,0,this.platform)})}async walk(){return[...await new vi(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 vi(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 Si(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 Si(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 Pa=(t,e={})=>{Array.isArray(t)||(t=[t]);for(let r of t)if(new Oe(r,e).hasMagic())return!0;return!1};function us(t,e={}){return new He(t,e).streamSync()}function zd(t,e={}){return new He(t,e).stream()}function Hd(t,e={}){return new He(t,e).walkSync()}async function Ud(t,e={}){return new He(t,e).walk()}function fs(t,e={}){return new He(t,e).iterateSync()}function Gd(t,e={}){return new He(t,e).iterate()}var K1=us,J1=Object.assign(zd,{sync:us}),Z1=fs,Q1=Object.assign(Gd,{sync:fs}),X1=Object.assign(Hd,{stream:us,iterate:fs}),ls=Object.assign(Ud,{glob:Ud,globSync:Hd,sync:X1,globStream:zd,stream:J1,globStreamSync:us,streamSync:K1,globIterate:Gd,iterate:Q1,globIterateSync:fs,iterateSync:Z1,Glob:He,hasMagic:Pa,escape:wr,unescape:Be});ls.glob=ls;var nS="../build",sS="../wheels",oS="streamlit-1.50.0-cp313-none-any.whl",aS="stlite_lib-0.1.0-py3-none-any.whl",lS=rS(import.meta.url),Kd=me.dirname(lS);async function Jd(t,e){let r=[],i=n=>{r.push(n)};if(await t.loadPackage(e,{errorCallback:i}),r.length>0)throw new Error(r.join(`