@gadgetinc/ggt 1.5.1 → 1.6.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 (71) hide show
  1. package/README.md +16 -0
  2. package/dist/{add-XHMGXWYX.js → add-FGXJSCE2.js} +2 -2
  3. package/dist/{add-XHMGXWYX.js.map → add-FGXJSCE2.js.map} +1 -1
  4. package/dist/{chunk-A75V6SNW.js → chunk-2CKK6A2Y.js} +2 -2
  5. package/dist/{chunk-A75V6SNW.js.map → chunk-2CKK6A2Y.js.map} +1 -1
  6. package/dist/{chunk-Z7JIVKEF.js → chunk-4WFO3NAS.js} +2 -2
  7. package/dist/{chunk-XOSBJSTW.js → chunk-5NCJDCIZ.js} +23 -23
  8. package/dist/{chunk-XOSBJSTW.js.map → chunk-5NCJDCIZ.js.map} +3 -3
  9. package/dist/{chunk-XE5GH5GR.js → chunk-72YIA2TT.js} +2 -2
  10. package/dist/chunk-F4S4AEEO.js +2 -0
  11. package/dist/chunk-F4S4AEEO.js.map +7 -0
  12. package/dist/chunk-I6BQ7MRE.js +116 -0
  13. package/dist/chunk-I6BQ7MRE.js.map +7 -0
  14. package/dist/chunk-IYQBG4II.js +7 -0
  15. package/dist/chunk-IYQBG4II.js.map +7 -0
  16. package/dist/chunk-JHWQLV6Y.js +2 -0
  17. package/dist/chunk-JHWQLV6Y.js.map +7 -0
  18. package/dist/{chunk-WQ4SFIE4.js → chunk-L2MG47NS.js} +2 -2
  19. package/dist/chunk-LPBWX353.js +50 -0
  20. package/dist/chunk-LPBWX353.js.map +7 -0
  21. package/dist/chunk-PA2LOSVH.js +18 -0
  22. package/dist/{chunk-KW4V2PJW.js.map → chunk-PA2LOSVH.js.map} +4 -4
  23. package/dist/chunk-SIAMHUOB.js +2 -0
  24. package/dist/{chunk-U5I2YBJK.js.map → chunk-SIAMHUOB.js.map} +2 -2
  25. package/dist/chunk-VJVFVZNR.js +12 -0
  26. package/dist/{chunk-5VLIBRPJ.js.map → chunk-VJVFVZNR.js.map} +4 -4
  27. package/dist/chunk-XK6JJEHJ.js +2 -0
  28. package/dist/chunk-XK6JJEHJ.js.map +7 -0
  29. package/dist/{chunk-HAYHNB7Q.js → chunk-YT2LSGNB.js} +2 -2
  30. package/dist/configure-L4U26WFP.js +12 -0
  31. package/dist/configure-L4U26WFP.js.map +7 -0
  32. package/dist/{deploy-QW6KPNDB.js → deploy-6JWXSMQJ.js} +2 -2
  33. package/dist/{deploy-QW6KPNDB.js.map → deploy-6JWXSMQJ.js.map} +1 -1
  34. package/dist/{dev-KUTYS7OU.js → dev-M2PFPQXX.js} +2 -2
  35. package/dist/{dev-KUTYS7OU.js.map → dev-M2PFPQXX.js.map} +1 -1
  36. package/dist/{list-OSMGHITM.js → list-LNXNHS2W.js} +2 -2
  37. package/dist/{list-OSMGHITM.js.map → list-LNXNHS2W.js.map} +1 -1
  38. package/dist/login-4F3H443A.js +2 -0
  39. package/dist/logout-JA5JBU3G.js +7 -0
  40. package/dist/{logout-XPKPHMRV.js.map → logout-JA5JBU3G.js.map} +1 -1
  41. package/dist/main.js +6 -6
  42. package/dist/main.js.map +3 -3
  43. package/dist/{open-SP5XOXPG.js → open-TWQBAPIT.js} +2 -2
  44. package/dist/{open-SP5XOXPG.js.map → open-TWQBAPIT.js.map} +1 -1
  45. package/dist/{pull-7JMGBM4A.js → pull-VWGETR4M.js} +2 -2
  46. package/dist/{pull-7JMGBM4A.js.map → pull-VWGETR4M.js.map} +1 -1
  47. package/dist/push-KWUMHQCJ.js +2 -0
  48. package/dist/{status-CJVN2UZ6.js → status-OYEFON4A.js} +2 -2
  49. package/dist/{status-CJVN2UZ6.js.map → status-OYEFON4A.js.map} +1 -1
  50. package/dist/{version-NFFT7WG5.js → version-4QPNJ5VH.js} +2 -2
  51. package/dist/whoami-TIGWXVEY.js +7 -0
  52. package/dist/{whoami-MU3POPXB.js.map → whoami-TIGWXVEY.js.map} +1 -1
  53. package/package.json +1 -1
  54. package/dist/chunk-3B2GY4UU.js +0 -121
  55. package/dist/chunk-3B2GY4UU.js.map +0 -7
  56. package/dist/chunk-5VLIBRPJ.js +0 -12
  57. package/dist/chunk-KW4V2PJW.js +0 -18
  58. package/dist/chunk-LPIHKY3M.js +0 -50
  59. package/dist/chunk-LPIHKY3M.js.map +0 -7
  60. package/dist/chunk-U5I2YBJK.js +0 -2
  61. package/dist/login-UU4MWB6Y.js +0 -2
  62. package/dist/logout-XPKPHMRV.js +0 -7
  63. package/dist/push-7S6V2HSB.js +0 -2
  64. package/dist/whoami-MU3POPXB.js +0 -7
  65. /package/dist/{chunk-Z7JIVKEF.js.map → chunk-4WFO3NAS.js.map} +0 -0
  66. /package/dist/{chunk-XE5GH5GR.js.map → chunk-72YIA2TT.js.map} +0 -0
  67. /package/dist/{chunk-WQ4SFIE4.js.map → chunk-L2MG47NS.js.map} +0 -0
  68. /package/dist/{chunk-HAYHNB7Q.js.map → chunk-YT2LSGNB.js.map} +0 -0
  69. /package/dist/{login-UU4MWB6Y.js.map → login-4F3H443A.js.map} +0 -0
  70. /package/dist/{push-7S6V2HSB.js.map → push-KWUMHQCJ.js.map} +0 -0
  71. /package/dist/{version-NFFT7WG5.js.map → version-4QPNJ5VH.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- import{a as Nn}from"./chunk-XE5GH5GR.js";import{a as nt}from"./chunk-SX5LO3XQ.js";import{a as it,d as vn,n as K,o as rr,p as or}from"./chunk-A75V6SNW.js";import{f as Xt,l as er,m as ir,n as nr,o as sr}from"./chunk-3B2GY4UU.js";import"./chunk-HAYHNB7Q.js";import{b as tr}from"./chunk-Z7JIVKEF.js";import"./chunk-U5I2YBJK.js";import"./chunk-HN3YKQ3C.js";import"./chunk-KW4V2PJW.js";import{B as Zt,D as Qt,e as Yt,k as Vt,l as En}from"./chunk-LPIHKY3M.js";import"./chunk-5VLIBRPJ.js";import{L as rt,S as Kt,b as Ht,ba as je,ga as B,ha as zt,ia as Jt,o as $t}from"./chunk-XOSBJSTW.js";import{a as gn}from"./chunk-GFQYFEEH.js";import{a as s,b as v,c as q,d as b,e as yn,f as Be,g as wn,h as c}from"./chunk-7DYQUG5M.js";var Cr=b(Ee=>{"use strict";c();Object.defineProperty(Ee,"__esModule",{value:!0});Ee.sync=Ee.isexe=void 0;var Rn=v("fs"),bn=v("fs/promises"),kn=s(async(e,t={})=>{let{ignoreErrors:r=!1}=t;try{return Ar(await(0,bn.stat)(e),t)}catch(i){let n=i;if(r||n.code==="EACCES")return!1;throw n}},"isexe");Ee.isexe=kn;var Ln=s((e,t={})=>{let{ignoreErrors:r=!1}=t;try{return Ar((0,Rn.statSync)(e),t)}catch(i){let n=i;if(r||n.code==="EACCES")return!1;throw n}},"sync");Ee.sync=Ln;var Ar=s((e,t)=>e.isFile()&&On(e,t),"checkStat"),On=s((e,t)=>{let r=t.uid??process.getuid?.(),i=t.groups??process.getgroups?.()??[],n=t.gid??process.getgid?.()??i[0];if(r===void 0||n===void 0)throw new Error("cannot get uid or gid");let o=new Set([n,...i]),a=e.mode,f=e.uid,l=e.gid,u=parseInt("100",8),h=parseInt("010",8),g=parseInt("001",8),p=u|h;return!!(a&g||a&h&&o.has(l)||a&u&&f===r||a&p&&r===0)},"checkMode")});var Rr=b(ve=>{"use strict";c();Object.defineProperty(ve,"__esModule",{value:!0});ve.sync=ve.isexe=void 0;var qn=v("fs"),Fn=v("fs/promises"),Un=s(async(e,t={})=>{let{ignoreErrors:r=!1}=t;try{return Tr(await(0,Fn.stat)(e),e,t)}catch(i){let n=i;if(r||n.code==="EACCES")return!1;throw n}},"isexe");ve.isexe=Un;var Pn=s((e,t={})=>{let{ignoreErrors:r=!1}=t;try{return Tr((0,qn.statSync)(e),e,t)}catch(i){let n=i;if(r||n.code==="EACCES")return!1;throw n}},"sync");ve.sync=Pn;var Mn=s((e,t)=>{let{pathExt:r=process.env.PATHEXT||""}=t,i=r.split(";");if(i.indexOf("")!==-1)return!0;for(let n=0;n<i.length;n++){let o=i[n].toLowerCase(),a=e.substring(e.length-o.length).toLowerCase();if(o&&a===o)return!0}return!1},"checkPathExt"),Tr=s((e,t,r)=>e.isFile()&&Mn(t,r),"checkStat")});var kr=b(br=>{"use strict";c();Object.defineProperty(br,"__esModule",{value:!0})});var Pr=b(R=>{"use strict";c();var Lr=R&&R.__createBinding||(Object.create?function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:s(function(){return t[r]},"get")}),Object.defineProperty(e,i,n)}:function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]}),Wn=R&&R.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Or=R&&R.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Lr(t,e,r);return Wn(t,e),t},Gn=R&&R.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Lr(t,e,r)};Object.defineProperty(R,"__esModule",{value:!0});R.sync=R.isexe=R.posix=R.win32=void 0;var qr=Or(Cr());R.posix=qr;var Fr=Or(Rr());R.win32=Fr;Gn(kr(),R);var Bn=process.env._ISEXE_TEST_PLATFORM_||process.platform,Ur=Bn==="win32"?Fr:qr;R.isexe=Ur.isexe;R.sync=Ur.sync});var Jr=b((zc,zr)=>{c();var{isexe:jn,sync:Hn}=Pr(),{join:$n,delimiter:Kn,sep:Mr,posix:Wr}=v("path"),Gr=process.platform==="win32",Br=new RegExp(`[${Wr.sep}${Mr===Wr.sep?"":Mr}]`.replace(/(\\)/g,"\\$1")),zn=new RegExp(`^\\.${Br.source}`),jr=s(e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),"getNotFoundError"),Hr=s((e,{path:t=process.env.PATH,pathExt:r=process.env.PATHEXT,delimiter:i=Kn})=>{let n=e.match(Br)?[""]:[...Gr?[process.cwd()]:[],...(t||"").split(i)];if(Gr){let o=r||[".EXE",".CMD",".BAT",".COM"].join(i),a=o.split(i).flatMap(f=>[f,f.toLowerCase()]);return e.includes(".")&&a[0]!==""&&a.unshift(""),{pathEnv:n,pathExt:a,pathExtExe:o}}return{pathEnv:n,pathExt:[""]}},"getPathInfo"),$r=s((e,t)=>{let r=/^".*"$/.test(e)?e.slice(1,-1):e;return(!r&&zn.test(t)?t.slice(0,2):"")+$n(r,t)},"getPathPart"),Kr=s(async(e,t={})=>{let{pathEnv:r,pathExt:i,pathExtExe:n}=Hr(e,t),o=[];for(let a of r){let f=$r(a,e);for(let l of i){let u=f+l;if(await jn(u,{pathExt:n,ignoreErrors:!0})){if(!t.all)return u;o.push(u)}}}if(t.all&&o.length)return o;if(t.nothrow)return null;throw jr(e)},"which"),Jn=s((e,t={})=>{let{pathEnv:r,pathExt:i,pathExtExe:n}=Hr(e,t),o=[];for(let a of r){let f=$r(a,e);for(let l of i){let u=f+l;if(Hn(u,{pathExt:n,ignoreErrors:!0})){if(!t.all)return u;o.push(u)}}}if(t.all&&o.length)return o;if(t.nothrow)return null;throw jr(e)},"whichSync");zr.exports=Kr;Kr.sync=Jn});var Yr=b(Ke=>{c();(function(){var e;e=s(function(t,r,i){var n,o;for(o="";t.length>0;)n=t.match(r),n?(o+=t.slice(0,n.index),o+=i(n),t=t.slice(n.index+n[0].length)):(o+=t,t="");return o},"scan"),Ke.split=function(t){var r,i;return t==null&&(t=""),i=[],r="",e(t,/\s*(?:([^\s\\\'\"]+)|'((?:[^\'\\]|\\.)*)'|"((?:[^\"\\]|\\.)*)"|(\\.?)|(\S))(\s|$)?/,function(n){var o,a,f,l,u,h,g;if(l=n[0],g=n[1],h=n[2],o=n[3],a=n[4],f=n[5],u=n[6],f!=null)throw new Error("Unmatched quote");if(r+=g||(h||o||a).replace(/\\(?=.)/,""),u!=null)return i.push(r),r=""}),r&&i.push(r),i},Ke.escape=function(t){return t==null&&(t=""),t==null?"''":t.replace(/([^A-Za-z0-9_\-.,:\/@\n])/g,"\\$1").replace(/\n/g,`'
1
+ import{a as Nn}from"./chunk-72YIA2TT.js";import{a as nt}from"./chunk-SX5LO3XQ.js";import{a as it,d as vn,n as K,o as rr,p as or}from"./chunk-2CKK6A2Y.js";import{f as Xt,l as ir,m as nr,n as sr}from"./chunk-I6BQ7MRE.js";import"./chunk-YT2LSGNB.js";import{b as tr}from"./chunk-4WFO3NAS.js";import"./chunk-SIAMHUOB.js";import{a as er}from"./chunk-IYQBG4II.js";import"./chunk-HN3YKQ3C.js";import"./chunk-PA2LOSVH.js";import{B as Qt,d as Yt,j as En,z as Zt}from"./chunk-LPBWX353.js";import"./chunk-F4S4AEEO.js";import{b as Vt}from"./chunk-XK6JJEHJ.js";import"./chunk-VJVFVZNR.js";import{L as rt,S as Kt,b as Ht,ba as je,ga as B,ha as zt,ia as Jt,o as $t}from"./chunk-5NCJDCIZ.js";import{a as gn}from"./chunk-GFQYFEEH.js";import{a as s,b as v,c as q,d as b,e as yn,f as Be,g as wn,h as c}from"./chunk-7DYQUG5M.js";var Cr=b(Ee=>{"use strict";c();Object.defineProperty(Ee,"__esModule",{value:!0});Ee.sync=Ee.isexe=void 0;var Rn=v("fs"),bn=v("fs/promises"),kn=s(async(e,t={})=>{let{ignoreErrors:r=!1}=t;try{return Ar(await(0,bn.stat)(e),t)}catch(i){let n=i;if(r||n.code==="EACCES")return!1;throw n}},"isexe");Ee.isexe=kn;var Ln=s((e,t={})=>{let{ignoreErrors:r=!1}=t;try{return Ar((0,Rn.statSync)(e),t)}catch(i){let n=i;if(r||n.code==="EACCES")return!1;throw n}},"sync");Ee.sync=Ln;var Ar=s((e,t)=>e.isFile()&&On(e,t),"checkStat"),On=s((e,t)=>{let r=t.uid??process.getuid?.(),i=t.groups??process.getgroups?.()??[],n=t.gid??process.getgid?.()??i[0];if(r===void 0||n===void 0)throw new Error("cannot get uid or gid");let o=new Set([n,...i]),a=e.mode,f=e.uid,l=e.gid,u=parseInt("100",8),h=parseInt("010",8),g=parseInt("001",8),p=u|h;return!!(a&g||a&h&&o.has(l)||a&u&&f===r||a&p&&r===0)},"checkMode")});var Rr=b(ve=>{"use strict";c();Object.defineProperty(ve,"__esModule",{value:!0});ve.sync=ve.isexe=void 0;var qn=v("fs"),Fn=v("fs/promises"),Un=s(async(e,t={})=>{let{ignoreErrors:r=!1}=t;try{return Tr(await(0,Fn.stat)(e),e,t)}catch(i){let n=i;if(r||n.code==="EACCES")return!1;throw n}},"isexe");ve.isexe=Un;var Pn=s((e,t={})=>{let{ignoreErrors:r=!1}=t;try{return Tr((0,qn.statSync)(e),e,t)}catch(i){let n=i;if(r||n.code==="EACCES")return!1;throw n}},"sync");ve.sync=Pn;var Mn=s((e,t)=>{let{pathExt:r=process.env.PATHEXT||""}=t,i=r.split(";");if(i.indexOf("")!==-1)return!0;for(let n=0;n<i.length;n++){let o=i[n].toLowerCase(),a=e.substring(e.length-o.length).toLowerCase();if(o&&a===o)return!0}return!1},"checkPathExt"),Tr=s((e,t,r)=>e.isFile()&&Mn(t,r),"checkStat")});var kr=b(br=>{"use strict";c();Object.defineProperty(br,"__esModule",{value:!0})});var Pr=b(R=>{"use strict";c();var Lr=R&&R.__createBinding||(Object.create?function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:s(function(){return t[r]},"get")}),Object.defineProperty(e,i,n)}:function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]}),Wn=R&&R.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Or=R&&R.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Lr(t,e,r);return Wn(t,e),t},Gn=R&&R.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Lr(t,e,r)};Object.defineProperty(R,"__esModule",{value:!0});R.sync=R.isexe=R.posix=R.win32=void 0;var qr=Or(Cr());R.posix=qr;var Fr=Or(Rr());R.win32=Fr;Gn(kr(),R);var Bn=process.env._ISEXE_TEST_PLATFORM_||process.platform,Ur=Bn==="win32"?Fr:qr;R.isexe=Ur.isexe;R.sync=Ur.sync});var Jr=b((zc,zr)=>{c();var{isexe:jn,sync:Hn}=Pr(),{join:$n,delimiter:Kn,sep:Mr,posix:Wr}=v("path"),Gr=process.platform==="win32",Br=new RegExp(`[${Wr.sep}${Mr===Wr.sep?"":Mr}]`.replace(/(\\)/g,"\\$1")),zn=new RegExp(`^\\.${Br.source}`),jr=s(e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),"getNotFoundError"),Hr=s((e,{path:t=process.env.PATH,pathExt:r=process.env.PATHEXT,delimiter:i=Kn})=>{let n=e.match(Br)?[""]:[...Gr?[process.cwd()]:[],...(t||"").split(i)];if(Gr){let o=r||[".EXE",".CMD",".BAT",".COM"].join(i),a=o.split(i).flatMap(f=>[f,f.toLowerCase()]);return e.includes(".")&&a[0]!==""&&a.unshift(""),{pathEnv:n,pathExt:a,pathExtExe:o}}return{pathEnv:n,pathExt:[""]}},"getPathInfo"),$r=s((e,t)=>{let r=/^".*"$/.test(e)?e.slice(1,-1):e;return(!r&&zn.test(t)?t.slice(0,2):"")+$n(r,t)},"getPathPart"),Kr=s(async(e,t={})=>{let{pathEnv:r,pathExt:i,pathExtExe:n}=Hr(e,t),o=[];for(let a of r){let f=$r(a,e);for(let l of i){let u=f+l;if(await jn(u,{pathExt:n,ignoreErrors:!0})){if(!t.all)return u;o.push(u)}}}if(t.all&&o.length)return o;if(t.nothrow)return null;throw jr(e)},"which"),Jn=s((e,t={})=>{let{pathEnv:r,pathExt:i,pathExtExe:n}=Hr(e,t),o=[];for(let a of r){let f=$r(a,e);for(let l of i){let u=f+l;if(Hn(u,{pathExt:n,ignoreErrors:!0})){if(!t.all)return u;o.push(u)}}}if(t.all&&o.length)return o;if(t.nothrow)return null;throw jr(e)},"whichSync");zr.exports=Kr;Kr.sync=Jn});var Yr=b(Ke=>{c();(function(){var e;e=s(function(t,r,i){var n,o;for(o="";t.length>0;)n=t.match(r),n?(o+=t.slice(0,n.index),o+=i(n),t=t.slice(n.index+n[0].length)):(o+=t,t="");return o},"scan"),Ke.split=function(t){var r,i;return t==null&&(t=""),i=[],r="",e(t,/\s*(?:([^\s\\\'\"]+)|'((?:[^\'\\]|\\.)*)'|"((?:[^\"\\]|\\.)*)"|(\\.?)|(\S))(\s|$)?/,function(n){var o,a,f,l,u,h,g;if(l=n[0],g=n[1],h=n[2],o=n[3],a=n[4],f=n[5],u=n[6],f!=null)throw new Error("Unmatched quote");if(r+=g||(h||o||a).replace(/\\(?=.)/,""),u!=null)return i.push(r),r=""}),r&&i.push(r),i},Ke.escape=function(t){return t==null&&(t=""),t==null?"''":t.replace(/([^A-Za-z0-9_\-.,:\/@\n])/g,"\\$1").replace(/\n/g,`'
2
2
  '`)}}).call(Ke)});var Zr=b((sf,Xr)=>{"use strict";c();var Vr=v("fs"),Nt;function Yn(){try{return Vr.statSync("/.dockerenv"),!0}catch{return!1}}s(Yn,"hasDockerEnv");function Vn(){try{return Vr.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}s(Vn,"hasDockerCGroup");Xr.exports=()=>(Nt===void 0&&(Nt=Yn()||Vn()),Nt)});var ti=b((cf,St)=>{"use strict";c();var Xn=v("os"),Zn=v("fs"),Qr=Zr(),ei=s(()=>{if(process.platform!=="linux")return!1;if(Xn.release().toLowerCase().includes("microsoft"))return!Qr();try{return Zn.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!Qr():!1}catch{return!1}},"isWsl");process.env.__IS_WSL_TEST__?St.exports=ei:St.exports=ei()});var de=b((uf,A)=>{c();var Qn=Yr(),ze=v("child_process"),xt=Nn(),es=ti(),ts=v("path"),rs=v("url"),he=v("os"),_t=v("fs"),is=v("net"),ns=1024;function si(e){return JSON.parse(JSON.stringify(e))}s(si,"clone");A.exports.clone=si;var ss=s(function(e){return typeof e=="string"?e.replace(/(["$`\\])/g,"\\$1"):e},"escapeQuotes"),os=s(function(e,t){return e.indexOf(t)!==-1},"inArray"),ri={u:"urgency",urgency:"urgency",t:"expire-time",time:"expire-time",timeout:"expire-time",e:"expire-time",expire:"expire-time","expire-time":"expire-time",i:"icon",icon:"icon",c:"category",category:"category",subtitle:"category",h:"hint",hint:"hint",a:"app-name","app-name":"app-name"};A.exports.command=function(e,t,r){return e=Qn.escape(e),process.env.DEBUG&&process.env.DEBUG.indexOf("notifier")!==-1&&(console.info("node-notifier debug info (command):"),console.info("[notifier path]",e),console.info("[notifier options]",t.join(" "))),ze.exec(e+" "+t.join(" "),function(i,n,o){if(i)return r(i);r(o,n)})};A.exports.fileCommand=function(e,t,r){return process.env.DEBUG&&process.env.DEBUG.indexOf("notifier")!==-1&&(console.info("node-notifier debug info (fileCommand):"),console.info("[notifier path]",e),console.info("[notifier options]",t.join(" "))),ze.execFile(e,t,function(i,n,o){if(i)return r(i,n);r(o,n)})};A.exports.fileCommandJson=function(e,t,r){return process.env.DEBUG&&process.env.DEBUG.indexOf("notifier")!==-1&&(console.info("node-notifier debug info (fileCommandJson):"),console.info("[notifier path]",e),console.info("[notifier options]",t.join(" "))),ze.execFile(e,t,function(i,n,o){if(i)return r(i,n);if(!n)return r(i,{});try{let a=JSON.parse(n);r(o||null,a)}catch(a){r(a,n)}})};A.exports.immediateFileCommand=function(e,t,r){process.env.DEBUG&&process.env.DEBUG.indexOf("notifier")!==-1&&(console.info("node-notifier debug info (notifier):"),console.info("[notifier path]",e)),as(e,function(i,n){if(!n)return r(new Error("Notifier ("+e+") not found on system."));ze.execFile(e,t),r()})};function as(e,t){return _t.stat(e,function(r,i){return r?ts.extname(e)?t(r,!1):_t.stat(e+".exe",function(n,o){if(n)return t(n,!1);t(n,o.isFile())}):t(r,i.isFile())})}s(as,"notifierExists");var Je=s(function(e){return e.appIcon&&(e.icon=e.appIcon,delete e.appIcon),e},"mapAppIcon"),De=s(function(e){return e.text&&(e.message=e.text,delete e.text),e},"mapText"),oi=s(function(e){return e.i&&(e.icon=e.i,delete e.i),e},"mapIconShorthand");A.exports.mapToNotifySend=function(e){e=Je(e),e=De(e),e.timeout===!1&&delete e.timeout,e.wait===!0&&(e["expire-time"]=5);for(let t in e)t==="message"||t==="title"||e.hasOwnProperty(t)&&ri[t]!==t&&(e[ri[t]]=e[t],delete e[t]);return typeof e["expire-time"]>"u"?e["expire-time"]=10*1e3:typeof e["expire-time"]=="number"&&(e["expire-time"]=e["expire-time"]*1e3),e};A.exports.mapToGrowl=function(e){if(e=Je(e),e=oi(e),e=De(e),e.icon&&!Buffer.isBuffer(e.icon))try{e.icon=_t.readFileSync(e.icon)}catch{}return e};A.exports.mapToMac=function(e){return e=oi(e),e=De(e),e.icon&&(e.appIcon=e.icon,delete e.icon),e.sound===!0&&(e.sound="Bottle"),e.sound===!1&&delete e.sound,e.sound&&e.sound.indexOf("Notification.")===0&&(e.sound="Bottle"),e.wait===!0&&(e.timeout||(e.timeout=5),delete e.wait),!e.wait&&!e.timeout&&(e.timeout===!1?delete e.timeout:e.timeout=10),e.json=!0,e};function It(e){return Object.prototype.toString.call(e)==="[object Array]"}s(It,"isArray");A.exports.isArray=It;function cs(){}s(cs,"noop");A.exports.actionJackerDecorator=function(e,t,r,i){if(t=si(t),r=r||cs,typeof r!="function")throw new TypeError("The second argument must be a function callback. You have passed "+typeof r);return function(n,o){let a=o,f={};if(a&&typeof a=="object"&&(f=a,a=a.activationType),a&&(a=a.toLowerCase().trim(),a.match(/^activate|clicked$/)&&(a="activate"),a.match(/^timedout$/)&&(a="timeout")),r.apply(e,[n,a,f]),!i||!a)return;let l=i(a);l&&e.emit(l,e,t,f)}};A.exports.constructArgumentList=function(e,t){let r=[];t=t||{};let i=t.initial||[],n=t.keyExtra||"",o=t.allowedArguments||[],a=t.noEscape!==void 0,f=t.allowedArguments!==void 0,l=!!t.explicitTrue,u=!!t.keepNewlines,h=t.wrapper===void 0?'"':t.wrapper,g=s(function p(d){return It(d)?ii(d.map(p).join(",")):(a||(d=ss(d)),typeof d=="string"&&!u&&(d=ii(d)),h+d+h)},"escapeFn");i.forEach(function(p){r.push(g(p))});for(let p in e)if(e.hasOwnProperty(p)&&(!f||os(o,p)))if(l&&e[p]===!0)r.push("-"+n+p);else{if(l&&e[p]===!1)continue;r.push("-"+n+p,g(e[p]))}return r};function ii(e){let t=process.platform==="win32"?"\\r\\n":"\\n";return e.replace(/\r?\n/g,t)}s(ii,"removeNewLines");var fs=["t","m","b","tb","p","id","s","silent","appID","pid","pipeName","close","install"],ls="Notification.",ni="Notification.Default";A.exports.mapToWin8=function(e){e=Je(e),e=De(e),e.icon&&(/^file:\/+/.test(e.icon)?e.p=new rs.URL(e.icon).pathname.replace(/^\/(\w:\/)/,"$1").replace(/\//g,"\\"):e.p=e.icon,delete e.icon),e.message&&(e.m=e.message.replace(/\x1b/g,""),delete e.message),e.title&&(e.t=e.title,delete e.title),e.appName&&(e.appID=e.appName,delete e.appName),typeof e.remove<"u"&&(e.close=e.remove,delete e.remove),(e.quiet||e.silent)&&(e.silent=e.quiet||e.silent,delete e.quiet),typeof e.sound<"u"&&(e.s=e.sound,delete e.sound),e.s===!1&&(e.silent=!0,delete e.s),e.s&&e.silent&&delete e.s,e.s===!0&&(e.s=ni),e.s&&e.s.indexOf(ls)!==0&&(e.s=ni),e.actions&&It(e.actions)&&(e.b=e.actions.join(";"),delete e.actions);for(let t in e)e.hasOwnProperty(t)&&fs.indexOf(t)===-1&&delete e[t];return e};A.exports.mapToNotifu=function(e){return e=Je(e),e=De(e),e.icon&&(e.i=e.icon,delete e.icon),e.message&&(e.m=e.message,delete e.message),e.title&&(e.p=e.title,delete e.title),e.time&&(e.d=e.time,delete e.time),e.q!==!1?e.q=!0:delete e.q,e.quiet===!1&&(delete e.q,delete e.quiet),e.sound&&(delete e.q,delete e.sound),e.t&&(e.d=e.t,delete e.t),e.type&&(e.t=us(e.type),delete e.type),e};A.exports.isMac=function(){return he.type()==="Darwin"};A.exports.isMountainLion=function(){return he.type()==="Darwin"&&xt.satisfies(Dt(he.release()),">=12.0.0")};A.exports.isWin8=function(){return he.type()==="Windows_NT"&&xt.satisfies(Dt(he.release()),">=6.2.9200")};A.exports.isWSL=function(){return es};A.exports.isLessThanWin8=function(){return he.type()==="Windows_NT"&&xt.satisfies(Dt(he.release()),"<6.2.9200")};function Dt(e){return e.split(".").length===2&&(e+=".0"),e}s(Dt,"garanteeSemverFormat");function us(e){if(typeof e=="string"||e instanceof String){if(e.toLowerCase()==="info")return"info";if(e.toLowerCase()==="warn")return"warn";if(e.toLowerCase()==="error")return"error"}return"info"}s(us,"sanitizeNotifuTypeArgument");A.exports.createNamedPipe=e=>{let t=Buffer.alloc(ns);return new Promise(r=>{e.instance=is.createServer(i=>{i.on("data",n=>{t.write(n.toString())}),i.on("end",()=>{e.instance.close()})}),e.instance.listen(e.namedPipe,()=>{r(t)})})}});var hi=b((mf,ui)=>{c();var ai=v("os"),hs=vn(),Ae=de(),fi=v("events").EventEmitter,ds=v("util"),li="notify-send",Ye;ui.exports=Ce;function Ce(e){if(e=Ae.clone(e||{}),!(this instanceof Ce))return new Ce(e);this.options=e,fi.call(this)}s(Ce,"NotifySend");ds.inherits(Ce,fi);function ms(){}s(ms,"noop");function ps(e,t){if(e=Ae.clone(e||{}),t=t||ms,typeof t!="function")throw new TypeError("The second argument must be a function callback. You have passed "+typeof t);if(typeof e=="string"&&(e={title:"node-notifier",message:e}),!e.message)return t(new Error("Message is required.")),this;if(ai.type()!=="Linux"&&!ai.type().match(/BSD$/))return t(new Error("Only supported on Linux and *BSD systems")),this;if(Ye===!1)return t(new Error("notify-send must be installed on the system.")),this;if(Ye||this.options.suppressOsdCheck)return ci(e,t),this;try{Ye=!!hs.sync(li),ci(e,t)}catch(r){return Ye=!1,t(r)}return this}s(ps,"notifyRaw");Object.defineProperty(Ce.prototype,"notify",{get:s(function(){return this._notify||(this._notify=ps.bind(this)),this._notify},"get")});var ys=["urgency","expire-time","icon","category","hint","app-name"];function ci(e,t){e=Ae.mapToNotifySend(e),e.title=e.title||"Node Notification:";let r=[e.title,e.message];delete e.title,delete e.message;let i=Ae.constructArgumentList(e,{initial:r,keyExtra:"-",allowedArguments:ys});Ae.command(li,i,t)}s(ci,"doNotification")});var At=b((wf,mi)=>{c();var ws=v("net"),di=!1;mi.exports=function(e,t){if(typeof t>"u"&&(t=e,e={}),di)return t(null,di);let r=e.port||23053,i=e.host||"localhost",n=ws.connect(r,i);n.setTimeout(100),n.once("connect",function(){n.end(),t(null,!0)}),n.once("error",function(){n.end(),t(null,!1)})}});var wi=b((Ef,yi)=>{c();var gs=v("net"),Es=v("crypto"),pi=v("util").format,vs=v("fs"),G=`\r
3
3
  `;function me(e,t){t=t||{},this.type=e,this.host=t.host||"localhost",this.port=t.port||23053,this.request="GNTP/1.0 "+e+" NONE"+G,this.resources=[],this.attempts=0,this.maxAttempts=5}s(me,"GNTP");me.prototype.parseResp=function(e){var t={},r,i;return e=e.slice(0,e.indexOf(G+G)).split(G),r=e[0],i=e.slice(1),t.state=r.match(/-(OK|ERROR|CALLBACK)/)[0].slice(1),i.forEach(function(n){n=n.split(": "),t[n[0]]=n[1]}),t};me.prototype.retry=function(){var e=this,t=arguments;setTimeout(function(){e.send.apply(e,t)},750)};me.prototype.addResource=function(e){var t=Es.createHash("md5").update(e).digest("hex"),r="Identifier: "+t+G+"Length: "+e.length+G+G;return this.resources.push({header:r,file:e}),"x-growl-resource://"+t};me.prototype.add=function(e,t){t!==void 0&&(/-Icon/.test(e)&&!/^https?:\/\//.test(t)&&(/\.(png|gif|jpe?g)$/.test(t)?t=this.addResource(vs.readFileSync(t)):t instanceof Buffer&&(t=this.addResource(t))),this.request+=e+": "+t+G)};me.prototype.newline=function(){this.request+=G};me.prototype.send=function(e){var t=this,r=gs.connect(this.port,this.host),i="";e=e||function(){},this.attempts+=1,r.on("connect",function(){r.write(t.request),t.resources.forEach(function(n){r.write(n.header),r.write(n.file),r.write(G+G)})}),r.on("data",function(n){i+=n.toString(),i.slice(i.length-4)===G+G&&(i=t.parseResp(i),i.state==="ERROR"||i.state==="CALLBACK"?r.end():i="")}),r.on("end",function(){if(["200","401","402"].indexOf(i["Error-Code"])>=0)if(t.attempts<=t.maxAttempts)t.retry(e);else{var n='GNTP request to "%s:%d" failed with error code %s (%s)';e(new Error(pi(n,t.host,t.port,i["Error-Code"],i["Error-Description"])))}else e(void 0,i)}),r.on("error",function(){e(new Error(pi('Error while sending GNTP request to "%s:%d"',t.host,t.port))),r.destroy()})};yi.exports=me});var vi=b((Sf,Ei)=>{c();var gi=wi();function Te(){this.appname="Growly",this.notifications=void 0,this.labels=void 0,this.count=0,this.registered=!1,this.host=void 0,this.port=void 0}s(Te,"Growly");Te.prototype.getLabels=function(){return this.notifications.map(function(e){return e.label})};Te.prototype.setHost=function(e,t){this.host=e,this.port=t};Te.prototype.register=function(e,t,r,i){var n;typeof t=="object"&&(r=t,t=void 0),(r===void 0||!r.length)&&(r=[{label:"default",dispname:"Default Notification",enabled:!0}]),typeof arguments[arguments.length-1]=="function"?i=arguments[arguments.length-1]:i=s(function(){},"callback"),this.appname=e,this.notifications=r,this.labels=this.getLabels(),this.registered=!0,n=new gi("REGISTER",{host:this.host,port:this.port}),n.add("Application-Name",e),n.add("Application-Icon",t),n.add("Notifications-Count",r.length),n.newline(),r.forEach(function(o){o.enabled===void 0&&(o.enabled=!0),n.add("Notification-Name",o.label),n.add("Notification-Display-Name",o.dispname),n.add("Notification-Enabled",o.enabled?"True":"False"),n.add("Notification-Icon",o.icon),n.newline()}),n.send(i)};Te.prototype.notify=function(e,t,r){var i=this,n;if(!this.registered){this.register(this.appname,function(o){o&&console.log(o),i.notify.call(i,e,t,r)});return}t=t||{},typeof t=="function"&&(r=t,t={}),n=new gi("NOTIFY",{host:this.host,port:this.port}),n.add("Application-Name",this.appname),n.add("Notification-Name",t.label||this.labels[0]),n.add("Notification-ID",++this.count),n.add("Notification-Title",t.title),n.add("Notification-Text",e),n.add("Notification-Sticky",t.sticky?"True":"False"),n.add("Notification-Priority",t.priority),n.add("Notification-Icon",t.icon),n.add("Notification-Coalescing-ID",t.coalescingId||void 0),n.add("Notification-Callback-Context",r?"context":void 0),n.add("Notification-Callback-Context-Type",r?"string":void 0),n.add("Notification-Callback-Target",void 0),n.newline(),n.send(function(o,a){r&&o?r(o):r&&a.state==="CALLBACK"&&r(void 0,a["Notification-Callback-Result"].toLowerCase())})};Ei.exports=new Te});var Xe=b((If,_i)=>{c();var Ns=At(),Ve=de(),Re=vi(),Si=v("events").EventEmitter,Ss=v("util"),_s="Couldn't connect to growl (might be used as a fallback). Make sure it is running";_i.exports=be;var Ni;function be(e){if(e=Ve.clone(e||{}),!(this instanceof be))return new be(e);Re.appname=e.name||"Node",this.options=e,Si.call(this)}s(be,"Growl");Ss.inherits(be,Si);function xs(e,t){if(Re.setHost(this.options.host,this.options.port),e=Ve.clone(e||{}),typeof e=="string"&&(e={title:"node-notifier",message:e}),t=Ve.actionJackerDecorator(this,e,t,function(r){return r==="click"?"click":r==="timedout"?"timeout":!1}),e=Ve.mapToGrowl(e),!e.message)return t(new Error("Message is required.")),this;if(e.title=e.title||"Node Notification:",Ni||e.wait){let r=e.wait?t:Is;return Re.notify(e.message,e,r),e.wait||t(),this}return Ns(Re,function(r,i){if(Ni=i,!i)return t(new Error(_s));Re.notify(e.message,e),t()}),this}s(xs,"notifyRaw");Object.defineProperty(be.prototype,"notify",{get:s(function(){return this._notify||(this._notify=xs.bind(this)),this._notify},"get")});function Is(){}s(Is,"noop")});var Ai=b((Cf,Di)=>{c();var pe=de(),Ds=Xe(),As=v("path"),Cs=As.join(__dirname,"../vendor/mac.noindex/terminal-notifier.app/Contents/MacOS/terminal-notifier"),Ii=v("events").EventEmitter,Ts=v("util"),Rs="You need Mac OS X 10.8 or above to use NotificationCenter, or use Growl fallback with constructor option {withFallback: true}.";Di.exports=ke;function ke(e){if(e=pe.clone(e||{}),!(this instanceof ke))return new ke(e);this.options=e,Ii.call(this)}s(ke,"NotificationCenter");Ts.inherits(ke,Ii);var xi=null;function bs(){}s(bs,"noop");function ks(e,t){let r,i=Ls();if(e=pe.clone(e||{}),xi=i,typeof e=="string"&&(e={title:"node-notifier",message:e}),t=t||bs,typeof t!="function")throw new TypeError("The second argument must be a function callback. You have passed "+typeof fn);let n=pe.actionJackerDecorator(this,e,t,function(a){return xi!==i?!1:a==="activate"?"click":a==="timeout"?"timeout":a==="replied"?"replied":!1});if(e=pe.mapToMac(e),!e.message&&!e.group&&!e.list&&!e.remove)return t(new Error("Message, group, remove or list property is required.")),this;let o=pe.constructArgumentList(e);return pe.isMountainLion()?(pe.fileCommandJson(this.options.customPath||Cs,o,n),this):r||this.options.withFallback?(r=r||new Ds(this.options),r.notify(e,t)):(t(new Error(Rs)),this)}s(ks,"notifyRaw");Object.defineProperty(ke.prototype,"notify",{get:s(function(){return this._notify||(this._notify=ks.bind(this)),this._notify},"get")});function Ls(){return{_ref:"val"}}s(Ls,"identificator")});var Ct=b((bf,bi)=>{c();var Os=v("path"),qs=Os.resolve(__dirname,"../vendor/notifu/notifu"),Fs=At(),re=de(),Us=Tt(),Ci=Xe(),Ps=v("os"),Ri=v("events").EventEmitter,Ms=v("util"),Ze;bi.exports=Le;function Le(e){if(e=re.clone(e||{}),!(this instanceof Le))return new Le(e);this.options=e,Ri.call(this)}s(Le,"WindowsBalloon");Ms.inherits(Le,Ri);function Ws(){}s(Ws,"noop");function Gs(e,t){let r,i=this.options;e=re.clone(e||{}),t=t||Ws,typeof e=="string"&&(e={title:"node-notifier",message:e});let n=re.actionJackerDecorator(this,e,t,function(o){return o==="activate"?"click":o==="timeout"?"timeout":!1});return this.options.withFallback&&re.isWin8()?(r=r||new Us(i),r.notify(e,t)):this.options.withFallback&&(!re.isLessThanWin8()||Ze===!0)?(r=r||new Ci(i),r.notify(e,t)):!this.options.withFallback||Ze===!1?(Ti(e,i,n),this):(Fs(i,function(o,a){if(Ze=a,Ze)return r=r||new Ci(i),r.notify(e,t);Ti(e,i,n)}),this)}s(Gs,"notifyRaw");Object.defineProperty(Le.prototype,"notify",{get:s(function(){return this._notify||(this._notify=Gs.bind(this)),this._notify},"get")});var Bs=["t","d","p","m","i","e","q","w","xp"];function Ti(e,t,r){let i=Ps.arch()==="x64";e=e||{},e=re.mapToNotifu(e),e.p=e.p||"Node Notification:";let n=qs+(i?"64":"")+".exe",o=t.customPath||n;if(!e.m)return r(new Error("Message is required.")),this;let a=re.constructArgumentList(e,{wrapper:"",noEscape:!0,explicitTrue:!0,allowedArguments:Bs});if(e.wait)return re.fileCommand(o,a,function(f,l){let u=js(f.code);return u==="error"?r(f,l):r(null,u)});re.immediateFileCommand(o,a,r)}s(Ti,"doNotification");function js(e){switch(e){case 2:return"timeout";case 3:case 6:case 7:return"activate";case 4:return"close";default:return"error"}}s(js,"fromErrorCodeToAction")});import Hs from"crypto";function Oe(){return Qe>et.length-16&&(Hs.randomFillSync(et),Qe=0),et.slice(Qe,Qe+=16)}var et,Qe,Rt=q(()=>{c();et=new Uint8Array(256),Qe=et.length;s(Oe,"rng")});var ki,Li=q(()=>{c();ki=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});function $s(e){return typeof e=="string"&&ki.test(e)}var ae,qe=q(()=>{c();Li();s($s,"validate");ae=$s});function Ks(e,t=0){let r=(k[e[t+0]]+k[e[t+1]]+k[e[t+2]]+k[e[t+3]]+"-"+k[e[t+4]]+k[e[t+5]]+"-"+k[e[t+6]]+k[e[t+7]]+"-"+k[e[t+8]]+k[e[t+9]]+"-"+k[e[t+10]]+k[e[t+11]]+k[e[t+12]]+k[e[t+13]]+k[e[t+14]]+k[e[t+15]]).toLowerCase();if(!ae(r))throw TypeError("Stringified UUID is invalid");return r}var k,ce,Fe=q(()=>{c();qe();k=[];for(let e=0;e<256;++e)k.push((e+256).toString(16).substr(1));s(Ks,"stringify");ce=Ks});function zs(e,t,r){let i=t&&r||0,n=t||new Array(16);e=e||{};let o=e.node||Oi,a=e.clockseq!==void 0?e.clockseq:bt;if(o==null||a==null){let p=e.random||(e.rng||Oe)();o==null&&(o=Oi=[p[0]|1,p[1],p[2],p[3],p[4],p[5]]),a==null&&(a=bt=(p[6]<<8|p[7])&16383)}let f=e.msecs!==void 0?e.msecs:Date.now(),l=e.nsecs!==void 0?e.nsecs:Lt+1,u=f-kt+(l-Lt)/1e4;if(u<0&&e.clockseq===void 0&&(a=a+1&16383),(u<0||f>kt)&&e.nsecs===void 0&&(l=0),l>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");kt=f,Lt=l,bt=a,f+=122192928e5;let h=((f&268435455)*1e4+l)%4294967296;n[i++]=h>>>24&255,n[i++]=h>>>16&255,n[i++]=h>>>8&255,n[i++]=h&255;let g=f/4294967296*1e4&268435455;n[i++]=g>>>8&255,n[i++]=g&255,n[i++]=g>>>24&15|16,n[i++]=g>>>16&255,n[i++]=a>>>8|128,n[i++]=a&255;for(let p=0;p<6;++p)n[i+p]=o[p];return t||ce(n)}var Oi,bt,kt,Lt,qi,Fi=q(()=>{c();Rt();Fe();kt=0,Lt=0;s(zs,"v1");qi=zs});function Js(e){if(!ae(e))throw TypeError("Invalid UUID");let t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=t&255,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=t&255,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=t&255,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=t&255,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=t&255,r}var tt,Ot=q(()=>{c();qe();s(Js,"parse");tt=Js});function Ys(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}function Ue(e,t,r){function i(n,o,a,f){if(typeof n=="string"&&(n=Ys(n)),typeof o=="string"&&(o=tt(o)),o.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let l=new Uint8Array(16+n.length);if(l.set(o),l.set(n,o.length),l=r(l),l[6]=l[6]&15|t,l[8]=l[8]&63|128,a){f=f||0;for(let u=0;u<16;++u)a[f+u]=l[u];return a}return ce(l)}s(i,"generateUUID");try{i.name=e}catch{}return i.DNS=Vs,i.URL=Xs,i}var Vs,Xs,qt=q(()=>{c();Fe();Ot();s(Ys,"stringToBytes");Vs="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Xs="6ba7b811-9dad-11d1-80b4-00c04fd430c8";s(Ue,"default")});import Zs from"crypto";function Qs(e){return Array.isArray(e)?e=Buffer.from(e):typeof e=="string"&&(e=Buffer.from(e,"utf8")),Zs.createHash("md5").update(e).digest()}var Ui,Pi=q(()=>{c();s(Qs,"md5");Ui=Qs});var eo,Mi,Wi=q(()=>{c();qt();Pi();eo=Ue("v3",48,Ui),Mi=eo});function to(e,t,r){e=e||{};let i=e.random||(e.rng||Oe)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,t){r=r||0;for(let n=0;n<16;++n)t[r+n]=i[n];return t}return ce(i)}var Gi,Bi=q(()=>{c();Rt();Fe();s(to,"v4");Gi=to});import ro from"crypto";function io(e){return Array.isArray(e)?e=Buffer.from(e):typeof e=="string"&&(e=Buffer.from(e,"utf8")),ro.createHash("sha1").update(e).digest()}var ji,Hi=q(()=>{c();s(io,"sha1");ji=io});var no,$i,Ki=q(()=>{c();qt();Hi();no=Ue("v5",80,ji),$i=no});var zi,Ji=q(()=>{c();zi="00000000-0000-0000-0000-000000000000"});function so(e){if(!ae(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}var Yi,Vi=q(()=>{c();qe();s(so,"version");Yi=so});var Xi={};yn(Xi,{NIL:()=>zi,parse:()=>tt,stringify:()=>ce,v1:()=>qi,v3:()=>Mi,v4:()=>Gi,v5:()=>$i,validate:()=>ae,version:()=>Yi});var Zi=q(()=>{c();Fi();Wi();Bi();Ki();Ji();Vi();qe();Fe();Ot()});var Tt=b(($l,en)=>{c();var oo=v("path"),ao=oo.resolve(__dirname,"../vendor/snoreToast/snoretoast"),X=de(),co=Ct(),fo=v("os"),{v4:lo}=(Zi(),wn(Xi)),Qi=v("events").EventEmitter,uo=v("util"),Ft,ho="notifierPipe",mo="\\\\.\\pipe\\",po="/tmp/";en.exports=Pe;function Pe(e){if(e=X.clone(e||{}),!(this instanceof Pe))return new Pe(e);this.options=e,Qi.call(this)}s(Pe,"WindowsToaster");uo.inherits(Pe,Qi);function yo(){}s(yo,"noop");function wo(e){return e?e.split(";").reduce((t,r)=>{let i=r.split("=");return i&&i.length===2&&(t[i[0]]=i[1]),t},{}):{}}s(wo,"parseResult");function go(){return`${X.isWSL()?po:mo}${ho}-${lo()}`}s(go,"getPipeName");function Eo(e,t){e=X.clone(e||{}),t=t||yo;let r=fo.arch()==="x64",i,n={namedPipe:go()};if(typeof e=="string"&&(e={title:"node-notifier",message:e}),typeof t!="function")throw new TypeError("The second argument must be a function callback. You have passed "+typeof fn);let o=s((f,l)=>{let u=wo(i&&i.toString("utf16le"));u.action==="buttonClicked"&&u.button?u.activationType=u.button:u.action&&(u.activationType=u.action),f&&f.code===-1&&l(f,u),l(null,u),n.instance&&n.instance.close()},"snoreToastResultParser"),a=s(f=>o(f,X.actionJackerDecorator(this,e,t,l=>l==="activate"?"click":l||!1)),"actionJackedCallback");return e.title=e.title||"Node Notification:",typeof e.message>"u"&&typeof e.close>"u"?(t(new Error("Message or ID to close is required.")),this):!X.isWin8()&&!X.isWSL()&&this.options.withFallback?(Ft=Ft||new co(this.options),Ft.notify(e,t)):(X.createNamedPipe(n).then(f=>{i=f,e.pipeName=n.namedPipe;let l=e.customPath||this.options.customPath||ao+"-x"+(r?"64":"86")+".exe";e=X.mapToWin8(e);let u=X.constructArgumentList(e,{explicitTrue:!0,wrapper:"",keepNewlines:!0,noEscape:!0});X.fileCommand(l,u,a)}),this)}s(Eo,"notifyRaw");Object.defineProperty(Pe.prototype,"notify",{get:s(function(){return this._notify||(this._notify=Eo.bind(this)),this._notify},"get")})});var nn=b((Jl,C)=>{c();var tn=v("os"),rn=de(),Me=hi(),Ut=Ai(),We=Tt(),Pt=Xe(),Mt=Ct(),ye={withFallback:!0},vo=rn.isWSL()?"WSL":tn.type();switch(vo){case"Linux":C.exports=new Me(ye),C.exports.Notification=Me;break;case"Darwin":C.exports=new Ut(ye),C.exports.Notification=Ut;break;case"Windows_NT":rn.isLessThanWin8()?(C.exports=new Mt(ye),C.exports.Notification=Mt):(C.exports=new We(ye),C.exports.Notification=We);break;case"WSL":C.exports=new We(ye),C.exports.Notification=We;break;default:tn.type().match(/BSD$/)?(C.exports=new Me(ye),C.exports.Notification=Me):(C.exports=new Pt(ye),C.exports.Notification=Pt)}C.exports.NotifySend=Me;C.exports.NotificationCenter=Ut;C.exports.WindowsToaster=We;C.exports.WindowsBalloon=Mt;C.exports.Growl=Pt});c();var cn=Be(En(),1),fe=Be(gn(),1);import an from"node:path";c();import{EventEmitter as Tn}from"node:events";import gt from"node:fs";import ge from"node:path";c();import Sn from"node:os";var ar=300,se=20,Ne=1e7,cr=Sn.platform();var _n=cr==="darwin",st=cr==="win32",oe=_n||st,fr=3e3,lr=2e4,ot=1250;c();var J;(function(e){e[e.DIR=1]="DIR",e[e.FILE=2]="FILE"})(J||(J={}));var ue;(function(e){e.CHANGE="change",e.RENAME="rename"})(ue||(ue={}));var Se;(function(e){e.CHANGE="change",e.ERROR="error"})(Se||(Se={}));var m;(function(e){e.ADD="add",e.ADD_DIR="addDir",e.CHANGE="change",e.RENAME="rename",e.RENAME_DIR="renameDir",e.UNLINK="unlink",e.UNLINK_DIR="unlinkDir"})(m||(m={}));var F;(function(e){e.ALL="all",e.CLOSE="close",e.ERROR="error",e.READY="ready"})(F||(F={}));c();c();c();var xn=s((e,t=1,r)=>{t=Math.max(1,t);let i=r?.leading??!1,n=r?.trailing??!0,o=Math.max(r?.maxWait??1/0,t),a,f,l=0,u=0,h=s(()=>{let _=Date.now(),W=_-l,ne=_-u,le=W>=t||ne>=o;return[_,le]},"getInstantData"),g=s(_=>{if(u=_,!a)return;let W=a;a=void 0,e.apply(void 0,W)},"invoke"),p=s(()=>{L(0)},"onCancel"),d=s(()=>{f&&(p(),g(Date.now()))},"onFlush"),D=s(_=>{if(u=_,i)return g(_)},"onLeading"),T=s(_=>{if(n&&a)return g(_);a=void 0},"onTrailing"),M=s(()=>{f=void 0;let[_,W]=h();return W?T(_):ie(_)},"onTimeout"),ie=s(_=>{let W=_-l,ne=_-u,le=t-W,Ge=o-ne,H=Math.min(le,Ge);return L(H)},"updateTimeout"),L=s(_=>{f&&clearTimeout(f),!(_<=0)&&(f=setTimeout(M,_))},"resetTimeout"),j=s((..._)=>{let[W,ne]=h(),le=!!f;if(a=_,l=W,(ne||!f)&&L(t),ne)return le?g(W):D(W)},"debounced");return j.cancel=p,j.flush=d,j},"debounce"),He=xn;c();import Sr from"node:fs";import lt from"node:path";c();import S from"node:fs";import{promisify as O}from"node:util";c();var Q=s((e,t)=>s(function(...i){return e.apply(void 0,i).catch(t)},"attemptified"),"attemptifyAsync"),Y=s((e,t)=>s(function(...i){try{return e.apply(void 0,i)}catch(n){return t(n)}},"attemptified"),"attemptifySync");c();import ur from"node:process";var hr=ur.getuid?!ur.getuid():!1,dr=1e4,P=s(()=>{},"NOOP");c();var _e={isChangeErrorOk:s(e=>{if(!_e.isNodeError(e))return!1;let{code:t}=e;return t==="ENOSYS"||!hr&&(t==="EINVAL"||t==="EPERM")},"isChangeErrorOk"),isNodeError:s(e=>e instanceof Error,"isNodeError"),isRetriableError:s(e=>{if(!_e.isNodeError(e))return!1;let{code:t}=e;return t==="EMFILE"||t==="ENFILE"||t==="EAGAIN"||t==="EBUSY"||t==="EACCESS"||t==="EACCES"||t==="EACCS"||t==="EPERM"},"isRetriableError"),onChangeError:s(e=>{if(!_e.isNodeError(e))throw e;if(!_e.isChangeErrorOk(e))throw e},"onChangeError")},I=_e;c();c();var at=class{static{s(this,"RetryfyQueue")}constructor(){this.interval=25,this.intervalId=void 0,this.limit=dr,this.queueActive=new Set,this.queueWaiting=new Set,this.init=()=>{this.intervalId||(this.intervalId=setInterval(this.tick,this.interval))},this.reset=()=>{this.intervalId&&(clearInterval(this.intervalId),delete this.intervalId)},this.add=t=>{this.queueWaiting.add(t),this.queueActive.size<this.limit/2?this.tick():this.init()},this.remove=t=>{this.queueWaiting.delete(t),this.queueActive.delete(t)},this.schedule=()=>new Promise(t=>{let r=s(()=>this.remove(i),"cleanup"),i=s(()=>t(r),"resolver");this.add(i)}),this.tick=()=>{if(!(this.queueActive.size>=this.limit)){if(!this.queueWaiting.size)return this.reset();for(let t of this.queueWaiting){if(this.queueActive.size>=this.limit)break;this.queueWaiting.delete(t),this.queueActive.add(t),t()}}}}},mr=new at;var ee=s((e,t)=>s(function(i){return s(function n(...o){return mr.schedule().then(a=>{let f=s(u=>(a(),u),"onResolve"),l=s(u=>{if(a(),Date.now()>=i)throw u;if(t(u)){let h=Math.round(100*Math.random());return new Promise(p=>setTimeout(p,h)).then(()=>n.apply(void 0,o))}throw u},"onReject");return e.apply(void 0,o).then(f,l)})},"attempt")},"retrified"),"retryifyAsync"),te=s((e,t)=>s(function(i){return s(function n(...o){try{return e.apply(void 0,o)}catch(a){if(Date.now()>i)throw a;if(t(a))return n.apply(void 0,o);throw a}},"attempt")},"retrified"),"retryifySync");var In={attempt:{chmod:Q(O(S.chmod),I.onChangeError),chown:Q(O(S.chown),I.onChangeError),close:Q(O(S.close),P),fsync:Q(O(S.fsync),P),mkdir:Q(O(S.mkdir),P),realpath:Q(O(S.realpath),P),stat:Q(O(S.stat),P),unlink:Q(O(S.unlink),P),chmodSync:Y(S.chmodSync,I.onChangeError),chownSync:Y(S.chownSync,I.onChangeError),closeSync:Y(S.closeSync,P),existsSync:Y(S.existsSync,P),fsyncSync:Y(S.fsync,P),mkdirSync:Y(S.mkdirSync,P),realpathSync:Y(S.realpathSync,P),statSync:Y(S.statSync,P),unlinkSync:Y(S.unlinkSync,P)},retry:{close:ee(O(S.close),I.isRetriableError),fsync:ee(O(S.fsync),I.isRetriableError),open:ee(O(S.open),I.isRetriableError),readFile:ee(O(S.readFile),I.isRetriableError),rename:ee(O(S.rename),I.isRetriableError),stat:ee(O(S.stat),I.isRetriableError),write:ee(O(S.write),I.isRetriableError),writeFile:ee(O(S.writeFile),I.isRetriableError),closeSync:te(S.closeSync,I.isRetriableError),fsyncSync:te(S.fsyncSync,I.isRetriableError),openSync:te(S.openSync,I.isRetriableError),readFileSync:te(S.readFileSync,I.isRetriableError),renameSync:te(S.renameSync,I.isRetriableError),statSync:te(S.statSync,I.isRetriableError),writeSync:te(S.writeSync,I.isRetriableError),writeFileSync:te(S.writeFileSync,I.isRetriableError)}},pr=In;c();import ft from"node:fs";import $e from"node:path";c();c();c();var ct=s(()=>{},"noop");var Dn=s(()=>{let e=ct,t=ct,r=!1,i=!1;return{promise:new Promise((l,u)=>{e=s(h=>(r=!0,l(h)),"resolve"),t=s(h=>(i=!0,u(h)),"reject")}),resolve:e,reject:t,isPending:s(()=>!r&&!i,"isPending"),isResolved:s(()=>r,"isResolved"),isRejected:s(()=>i,"isRejected")}},"makeNakedPromise"),yr=Dn;var An=s(()=>{let{promise:e,resolve:t,isPending:r}=yr(),i=0,n=s(()=>{i+=1},"increment"),o=s(()=>{i-=1,!i&&t()},"decrement");return s(()=>{n(),queueMicrotask(o)},"init")(),{promise:e,isPending:r,increment:n,decrement:o}},"makeCounterPromise"),wr=An;c();var gr={then:s(e=>{e()},"then")};c();var Er=s(e=>Array.isArray(e)?e:[e],"castArray"),vr=s(e=>typeof e=="function","isFunction");var Cn=s((e,t)=>{let r=t?.followSymlinks??!1,i=t?.depth??1/0,n=t?.limit??1/0,o=t?.ignore??[],a=Er(o).map(E=>vr(E)?E:w=>E.test(w)),f=s(E=>a.some(w=>w(E)),"isIgnored"),l=t?.signal??{aborted:!1},u=t?.onDirents||(()=>{}),h=[],g=new Set,p={},d=[],D=new Set,T={},M=[],ie=new Set,L={},j={},_=new Set,W={directories:[],directoriesNames:new Set,directoriesNamesToPaths:{},files:[],filesNames:new Set,filesNamesToPaths:{},symlinks:[],symlinksNames:new Set,symlinksNamesToPaths:{},map:{}},ne={directories:h,directoriesNames:g,directoriesNamesToPaths:p,files:d,filesNames:D,filesNamesToPaths:T,symlinks:M,symlinksNames:ie,symlinksNamesToPaths:L,map:j},{promise:le,increment:Ge,decrement:H}=wr(),Z=0,Wt=s((E,w,N,x)=>{_.has(w)||Z>=n||(Z+=1,E.directories.push(w),E.directoriesNames.add(N),h.push(w),g.add(N),p.propertyIsEnumerable(N)||(p[N]=[]),p[N].push(w),_.add(w),!(x>=i)&&(Z>=n||jt(w,x+1)))},"handleDirectory"),Gt=s((E,w,N)=>{_.has(w)||Z>=n||(Z+=1,E.files.push(w),E.filesNames.add(N),d.push(w),D.add(N),T.propertyIsEnumerable(N)||(T[N]=[]),T[N].push(w),_.add(w))},"handleFile"),Bt=s((E,w,N,x)=>{_.has(w)||Z>=n||(Z+=1,E.symlinks.push(w),E.symlinksNames.add(N),M.push(w),ie.add(N),L.propertyIsEnumerable(N)||(L[N]=[]),L[N].push(w),_.add(w),r&&(x>=i||Z>=n||mn(w,x+1)))},"handleSymlink"),un=s((E,w,N,x,$)=>{l.aborted||f(w)||(x.isDirectory()?Wt(E,w,N,$):x.isFile()?Gt(E,w,N):x.isSymbolicLink()&&Bt(E,w,N,$))},"handleStat"),hn=s((E,w,N,x)=>{if(l.aborted)return;let $=w===$e.sep?"":$e.sep,z=N.name,we=`${w}${$}${z}`;f(we)||(N.isDirectory()?Wt(E,we,z,x):N.isFile()?Gt(E,we,z):N.isSymbolicLink()&&Bt(E,we,z,x))},"handleDirent"),dn=s((E,w,N,x)=>{for(let $=0,z=N.length;$<z;$++)hn(E,w,N[$],x)},"handleDirents"),jt=s((E,w)=>{l.aborted||w>i||Z>=n||(Ge(),ft.readdir(E,{withFileTypes:!0},(N,x)=>{if(N||l.aborted||!x.length)return H();(u(x)||gr).then(()=>{let z=j[E]={directories:[],directoriesNames:new Set,directoriesNamesToPaths:{},files:[],filesNames:new Set,filesNamesToPaths:{},symlinks:[],symlinksNames:new Set,symlinksNamesToPaths:{}};dn(z,E,x,w),H()})}))},"populateResultFromPath"),mn=s((E,w)=>{Ge(),ft.realpath(E,(N,x)=>{if(N||l.aborted)return H();ft.stat(x,($,z)=>{if($||l.aborted)return H();let we=$e.basename(x),pn=j[E]={directories:[],directoriesNames:new Set,directoriesNamesToPaths:{},files:[],filesNames:new Set,filesNamesToPaths:{},symlinks:[],symlinksNames:new Set,symlinksNamesToPaths:{}};un(pn,x,we,z,w),H()})})},"populateResultFromSymlink");return s(async(E,w=1)=>(E=$e.normalize(E),_.add(E),jt(E,w),await le,l.aborted?W:ne),"getResult")(e)},"readdir"),Nr=Cn;var V={lang:{debounce:He,attempt:s(e=>{try{return e()}catch(t){return V.lang.castError(t)}},"attempt"),castArray:s(e=>V.lang.isArray(e)?e:[e],"castArray"),castError:s(e=>V.lang.isError(e)?e:V.lang.isString(e)?new Error(e):new Error("Unknown error"),"castError"),defer:s(e=>setTimeout(e,0),"defer"),isArray:s(e=>Array.isArray(e),"isArray"),isError:s(e=>e instanceof Error,"isError"),isFunction:s(e=>typeof e=="function","isFunction"),isNaN:s(e=>Number.isNaN(e),"isNaN"),isNumber:s(e=>typeof e=="number","isNumber"),isPrimitive:s(e=>{if(e===null)return!0;let t=typeof e;return t!=="object"&&t!=="function"},"isPrimitive"),isShallowEqual:s((e,t)=>{if(e===t)return!0;if(V.lang.isNaN(e))return V.lang.isNaN(t);if(V.lang.isPrimitive(e)||V.lang.isPrimitive(t))return e===t;for(let r in e)if(!(r in t))return!1;for(let r in t)if(e[r]!==t[r])return!1;return!0},"isShallowEqual"),isSet:s(e=>e instanceof Set,"isSet"),isString:s(e=>typeof e=="string","isString"),isUndefined:s(e=>e===void 0,"isUndefined"),noop:s(()=>{},"noop"),uniq:s(e=>e.length<2?e:Array.from(new Set(e)),"uniq")},fs:{getDepth:s(e=>Math.max(0,e.split(lt.sep).length-1),"getDepth"),getRealPath:s((e,t)=>{try{return t?Sr.realpathSync.native(e):Sr.realpathSync(e)}catch{return}},"getRealPath"),isSubPath:s((e,t)=>t.startsWith(e)&&t[e.length]===lt.sep&&t.length-e.length>lt.sep.length,"isSubPath"),poll:s((e,t=lr)=>pr.retry.stat(t)(e,{bigint:!0}).catch(V.lang.noop),"poll"),readdir:s(async(e,t,r=1/0,i=1/0,n,o)=>{if(o&&r===1&&e in o){let a=o[e];return[a.directories,a.files]}else{let a=await Nr(e,{depth:r,limit:i,ignore:t,signal:n});return[a.directories,a.files]}},"readdir")}},y=V;c();import ut from"node:path";var ht=class{static{s(this,"WatcherHandler")}constructor(t,r,i){this.base=i,this.watcher=t,this.handler=r.handler,this.fswatcher=r.watcher,this.options=r.options,this.folderPath=r.folderPath,this.filePath=r.filePath,this.handlerBatched=this.base?this.base.onWatcherEvent.bind(this.base):this._makeHandlerBatched(this.options.debounce)}_isSubRoot(t){return this.filePath?t===this.filePath:t===this.folderPath||y.fs.isSubPath(this.folderPath,t)}_makeHandlerBatched(t=ar){return(()=>{let r=this.watcher._readyWait,i=[],n=new Set,o=s(async(f,l)=>{let u=this.options.ignoreInitial?[]:f,h=await this.eventsPopulate([...l]),g=this.eventsDeduplicate([...u,...h]);this.onTargetEvents(g)},"flush"),a=y.lang.debounce(()=>{this.watcher.isClosed()||(r=o(i,n),i=[],n=new Set)},t);return async(f,l="",u=!1)=>{u?await this.eventsPopulate([l],i,!0):n.add(l),r.then(a)}})()}eventsDeduplicate(t){if(t.length<2)return t;let r={};return t.reduce((i,n)=>{let[o,a]=n,f=r[a];return o===f||o===m.CHANGE&&f===m.ADD||(r[a]=o,i.push(n)),i},[])}async eventsPopulate(t,r=[],i=!1){return await Promise.all(t.map(async n=>{let o=await this.watcher._poller.update(n,this.options.pollingTimeout);await Promise.all(o.map(async a=>{r.push([a,n]),a===m.ADD_DIR?await this.eventsPopulateAddDir(t,n,r,i):a===m.UNLINK_DIR&&await this.eventsPopulateUnlinkDir(t,n,r,i)}))})),r}async eventsPopulateAddDir(t,r,i=[],n=!1){if(n)return i;let o=this.options.recursive?this.options.depth??se:Math.min(1,this.options.depth??se),a=this.options.limit??Ne,[f,l]=await y.fs.readdir(r,this.options.ignore,o,a,this.watcher._closeSignal),u=[...f,...l];return await Promise.all(u.map(h=>{if(!this.watcher.isIgnored(h,this.options.ignore)&&!t.includes(h))return this.eventsPopulate([h],i,!0)})),i}async eventsPopulateUnlinkDir(t,r,i=[],n=!1){if(n)return i;for(let o of this.watcher._poller.stats.keys())y.fs.isSubPath(r,o)&&(t.includes(o)||await this.eventsPopulate([o],i,!0));return i}onTargetAdd(t){this._isSubRoot(t)&&(this.options.renameDetection?this.watcher._locker.getLockTargetAdd(t,this.options.renameTimeout):this.watcher.event(m.ADD,t))}onTargetAddDir(t){t!==this.folderPath&&this.options.recursive&&!oe&&this.options.native!==!1&&this.watcher.watchDirectory(t,this.options,this.handler,void 0,this.base||this),this._isSubRoot(t)&&(this.options.renameDetection?this.watcher._locker.getLockTargetAddDir(t,this.options.renameTimeout):this.watcher.event(m.ADD_DIR,t))}onTargetChange(t){this._isSubRoot(t)&&this.watcher.event(m.CHANGE,t)}onTargetUnlink(t){this.watcher.watchersClose(ut.dirname(t),t,!1),this._isSubRoot(t)&&(this.options.renameDetection?this.watcher._locker.getLockTargetUnlink(t,this.options.renameTimeout):this.watcher.event(m.UNLINK,t))}onTargetUnlinkDir(t){this.watcher.watchersClose(ut.dirname(t),t,!1),this.watcher.watchersClose(t),this._isSubRoot(t)&&(this.options.renameDetection?this.watcher._locker.getLockTargetUnlinkDir(t,this.options.renameTimeout):this.watcher.event(m.UNLINK_DIR,t))}onTargetEvent(t){let[r,i]=t;r===m.ADD?this.onTargetAdd(i):r===m.ADD_DIR?this.onTargetAddDir(i):r===m.CHANGE?this.onTargetChange(i):r===m.UNLINK?this.onTargetUnlink(i):r===m.UNLINK_DIR&&this.onTargetUnlinkDir(i)}onTargetEvents(t){for(let r of t)this.onTargetEvent(r)}onWatcherEvent(t,r,i=!1){return this.handlerBatched(t,r,i)}onWatcherChange(t=ue.CHANGE,r){if(this.watcher.isClosed())return;let i=ut.resolve(this.folderPath,r||"");this.filePath&&i!==this.folderPath&&i!==this.filePath||this.watcher.isIgnored(i,this.options.ignore)||this.onWatcherEvent(t,i)}onWatcherError(t){st&&t.code==="EPERM"?this.onWatcherChange(ue.CHANGE,""):this.watcher.error(t)}async init(){await this.initWatcherEvents(),await this.initInitialEvents()}async initWatcherEvents(){let t=this.onWatcherChange.bind(this);this.fswatcher.on(Se.CHANGE,t);let r=this.onWatcherError.bind(this);this.fswatcher.on(Se.ERROR,r)}async initInitialEvents(){let t=!this.watcher.isReady();if(this.filePath){if(this.watcher._poller.stats.has(this.filePath))return;await this.onWatcherEvent(ue.CHANGE,this.filePath,t)}else{let r=this.options.recursive&&oe&&this.options.native!==!1?this.options.depth??se:Math.min(1,this.options.depth??se),i=this.options.limit??Ne,[n,o]=await y.fs.readdir(this.folderPath,this.options.ignore,r,i,this.watcher._closeSignal,this.options.readdirMap),a=[this.folderPath,...n,...o];await Promise.all(a.map(f=>{if(!this.watcher._poller.stats.has(f)&&!this.watcher.isIgnored(f,this.options.ignore))return this.onWatcherEvent(ue.CHANGE,f,t)}))}}},_r=ht;c();c();var U={interval:100,intervalId:void 0,fns:new Map,init:s(()=>{U.intervalId||(U.intervalId=setInterval(U.resolve,U.interval))},"init"),reset:s(()=>{U.intervalId&&(clearInterval(U.intervalId),delete U.intervalId)},"reset"),add:s((e,t)=>{U.fns.set(e,Date.now()+t),U.init()},"add"),remove:s(e=>{U.fns.delete(e)},"remove"),resolve:s(()=>{if(!U.fns.size)return U.reset();let e=Date.now();for(let[t,r]of U.fns)r>=e||(U.remove(t),t())},"resolve")},xe=U;var Ie=class e{static{s(this,"WatcherLocker")}constructor(t){this._watcher=t,this.reset()}getLockAdd(t,r=ot){let{ino:i,targetPath:n,events:o,locks:a}=t,f=s(()=>{let g=this._watcher._poller.paths.find(i||-1,p=>p!==n);if(g&&g!==n){if(y.fs.getRealPath(n,!0)===g)return;this._watcher.event(o.rename,g,n)}else this._watcher.event(o.add,n)},"emit");if(!i)return f();let l=s(()=>{a.add.delete(i),xe.remove(u)},"cleanup"),u=s(()=>{l(),f()},"free");xe.add(u,r);let h=s(()=>{let g=a.unlink.get(i);if(!g)return;l();let p=g();n===p?o.change&&this._watcher._poller.stats.has(n)&&this._watcher.event(o.change,n):this._watcher.event(o.rename,p,n)},"resolve");a.add.set(i,h),h()}getLockUnlink(t,r=ot){let{ino:i,targetPath:n,events:o,locks:a}=t,f=s(()=>{this._watcher.event(o.unlink,n)},"emit");if(!i)return f();let l=s(()=>{a.unlink.delete(i),xe.remove(u)},"cleanup"),u=s(()=>{l(),f()},"free");xe.add(u,r);let h=s(()=>(l(),n),"overridden");a.unlink.set(i,h),a.add.get(i)?.()}getLockTargetAdd(t,r){let i=this._watcher._poller.getIno(t,m.ADD,J.FILE);return this.getLockAdd({ino:i,targetPath:t,events:e.FILE_EVENTS,locks:this._locksFile},r)}getLockTargetAddDir(t,r){let i=this._watcher._poller.getIno(t,m.ADD_DIR,J.DIR);return this.getLockAdd({ino:i,targetPath:t,events:e.DIR_EVENTS,locks:this._locksDir},r)}getLockTargetUnlink(t,r){let i=this._watcher._poller.getIno(t,m.UNLINK,J.FILE);return this.getLockUnlink({ino:i,targetPath:t,events:e.FILE_EVENTS,locks:this._locksFile},r)}getLockTargetUnlinkDir(t,r){let i=this._watcher._poller.getIno(t,m.UNLINK_DIR,J.DIR);return this.getLockUnlink({ino:i,targetPath:t,events:e.DIR_EVENTS,locks:this._locksDir},r)}reset(){this._locksAdd=new Map,this._locksAddDir=new Map,this._locksUnlink=new Map,this._locksUnlinkDir=new Map,this._locksDir={add:this._locksAddDir,unlink:this._locksUnlinkDir},this._locksFile={add:this._locksAdd,unlink:this._locksUnlink}}};Ie.DIR_EVENTS={add:m.ADD_DIR,rename:m.RENAME_DIR,unlink:m.UNLINK_DIR};Ie.FILE_EVENTS={add:m.ADD,change:m.CHANGE,rename:m.RENAME,unlink:m.UNLINK};var xr=Ie;c();c();var dt=class{static{s(this,"LazyMapSet")}constructor(){this.map=new Map}clear(){this.map.clear()}delete(t,r){if(y.lang.isUndefined(r))return this.map.delete(t);if(this.map.has(t)){let i=this.map.get(t);if(y.lang.isSet(i)){let n=i.delete(r);return i.size||this.map.delete(t),n}else if(i===r)return this.map.delete(t),!0}return!1}find(t,r){if(this.map.has(t)){let i=this.map.get(t);if(y.lang.isSet(i))return Array.from(i).find(r);if(r(i))return i}}get(t){return this.map.get(t)}has(t,r){if(y.lang.isUndefined(r))return this.map.has(t);if(this.map.has(t)){let i=this.map.get(t);return y.lang.isSet(i)?i.has(r):i===r}return!1}set(t,r){if(this.map.has(t)){let i=this.map.get(t);y.lang.isSet(i)?i.add(r):i!==r&&this.map.set(t,new Set([i,r]))}else this.map.set(t,r);return this}},mt=dt;c();var pt=class{static{s(this,"WatcherStats")}constructor(t){this.ino=t.ino<=Number.MAX_SAFE_INTEGER?Number(t.ino):t.ino,this.size=Number(t.size),this.atimeMs=Number(t.atimeMs),this.mtimeMs=Number(t.mtimeMs),this.ctimeMs=Number(t.ctimeMs),this.birthtimeMs=Number(t.birthtimeMs),this._isFile=t.isFile(),this._isDirectory=t.isDirectory(),this._isSymbolicLink=t.isSymbolicLink()}isFile(){return this._isFile}isDirectory(){return this._isDirectory}isSymbolicLink(){return this._isSymbolicLink}},Ir=pt;var yt=class{static{s(this,"WatcherPoller")}constructor(){this.inos={},this.paths=new mt,this.stats=new Map}getIno(t,r,i){let n=this.inos[r];if(!n)return;let o=n[t];if(o&&!(i&&o[1]!==i))return o[0]}getStats(t){return this.stats.get(t)}async poll(t,r){let i=await y.fs.poll(t,r);if(!(!i||!(i.isFile()||i.isDirectory())))return new Ir(i)}reset(){this.inos={},this.paths=new mt,this.stats=new Map}async update(t,r){let i=this.getStats(t),n=await this.poll(t,r);if(this.updateStats(t,n),!i&&n){if(n.isFile())return this.updateIno(t,m.ADD,n),[m.ADD];if(n.isDirectory())return this.updateIno(t,m.ADD_DIR,n),[m.ADD_DIR]}else if(i&&!n){if(i.isFile())return this.updateIno(t,m.UNLINK,i),[m.UNLINK];if(i.isDirectory())return this.updateIno(t,m.UNLINK_DIR,i),[m.UNLINK_DIR]}else if(i&&n){if(i.isFile()){if(n.isFile())return i.ino===n.ino&&!i.size&&!n.size?[]:(this.updateIno(t,m.CHANGE,n),[m.CHANGE]);if(n.isDirectory())return this.updateIno(t,m.UNLINK,i),this.updateIno(t,m.ADD_DIR,n),[m.UNLINK,m.ADD_DIR]}else if(i.isDirectory()){if(n.isFile())return this.updateIno(t,m.UNLINK_DIR,i),this.updateIno(t,m.ADD,n),[m.UNLINK_DIR,m.ADD];if(n.isDirectory())return i.ino===n.ino?[]:(this.updateIno(t,m.UNLINK_DIR,i),this.updateIno(t,m.ADD_DIR,n),[m.UNLINK_DIR,m.ADD_DIR])}}return[]}updateIno(t,r,i){let n=this.inos[r]=this.inos[r]||(this.inos[r]={}),o=i.isFile()?J.FILE:J.DIR;n[t]=[i.ino,o]}updateStats(t,r){if(r)this.paths.set(r.ino,t),this.stats.set(t,r);else{let i=this.stats.get(t)?.ino||-1;this.paths.delete(i,t),this.stats.delete(t)}}},wt=yt;var Et=class e extends Tn{static{s(this,"Watcher")}constructor(t,r,i){super(),this._closed=!1,this._ready=!1,this._closeAborter=new AbortController,this._closeSignal=this._closeAborter.signal,this.on(F.CLOSE,()=>this._closeAborter.abort()),this._closeWait=new Promise(n=>this.on(F.CLOSE,n)),this._readyWait=new Promise(n=>this.on(F.READY,n)),this._locker=new xr(this),this._roots=new Set,this._poller=new wt,this._pollers=new Set,this._subwatchers=new Set,this._watchers={},this._watchersLock=Promise.resolve(),this._watchersRestorable={},this.watch(t,r,i)}isClosed(){return this._closed}isIgnored(t,r){return!!r&&(y.lang.isFunction(r)?!!r(t):r.test(t))}isReady(){return this._ready}close(){return this._locker.reset(),this._poller.reset(),this._roots.clear(),this.watchersClose(),this.isClosed()?!1:(this._closed=!0,this.emit(F.CLOSE))}error(t){if(this.isClosed())return!1;let r=y.lang.castError(t);return this.emit(F.ERROR,r)}event(t,r,i){return this.isClosed()?!1:(this.emit(F.ALL,t,r,i),this.emit(t,r,i))}ready(){return this.isClosed()||this.isReady()?!1:(this._ready=!0,this.emit(F.READY))}pollerExists(t,r){for(let i of this._pollers)if(i.targetPath===t&&y.lang.isShallowEqual(i.options,r))return!0;return!1}subwatcherExists(t,r){for(let i of this._subwatchers)if(i.targetPath===t&&y.lang.isShallowEqual(i.options,r))return!0;return!1}watchersClose(t,r,i=!0){if(t){let n=this._watchers[t];if(n)for(let o of[...n])r&&o.filePath!==r||this.watcherClose(o);if(i)for(let o in this._watchers)y.fs.isSubPath(t,o)&&this.watchersClose(o,r,!1)}else for(let n in this._watchers)this.watchersClose(n,r,!1)}watchersLock(t){return this._watchersLock.then(()=>this._watchersLock=new Promise(async r=>{await t(),r()}))}watchersRestore(){delete this._watchersRestoreTimeout;let t=Object.entries(this._watchersRestorable);this._watchersRestorable={};for(let[r,i]of t)this.watchPath(r,i.options,i.handler)}async watcherAdd(t,r){let{folderPath:i}=t;(this._watchers[i]=this._watchers[i]||[]).push(t);let o=new _r(this,t,r);return await o.init(),o}watcherClose(t){t.watcher.close();let r=this._watchers[t.folderPath];if(r){let o=r.indexOf(t);r.splice(o,1),r.length||delete this._watchers[t.folderPath]}let i=t.filePath||t.folderPath;this._roots.has(i)&&(this._watchersRestorable[i]=t,this._watchersRestoreTimeout||(this._watchersRestoreTimeout=y.lang.defer(()=>this.watchersRestore())))}watcherExists(t,r,i,n){if(this._watchers[t]?.find(f=>f.handler===i&&(!f.filePath||f.filePath===n)&&f.options.ignore===r.ignore&&!!f.options.native==!!r.native&&(!r.recursive||f.options.recursive)))return!0;let a=ge.dirname(t);for(let f=1;f<1/0;f++){if(this._watchers[a]?.find(h=>(f===1||h.options.recursive&&f<=(h.options.depth??se))&&h.handler===i&&(!h.filePath||h.filePath===n)&&h.options.ignore===r.ignore&&!!h.options.native==!!r.native&&(!r.recursive||h.options.recursive&&oe&&h.options.native!==!1)))return!0;if(!oe)break;let u=ge.dirname(t);if(a===u)break;a=u}return!1}async watchDirectories(t,r,i,n,o){if(this.isClosed())return;t=y.lang.uniq(t).sort();let a;for(let f of t)if(!this.isIgnored(f,r.ignore)&&!this.watcherExists(f,r,i,n))try{let l=!r.recursive||oe&&r.native!==!1?r:{...r,recursive:!1},h={watcher:gt.watch(f,l),handler:i,options:r,folderPath:f,filePath:n},g=a=await this.watcherAdd(h,o);if(this._roots.has(n||f)){let d={...r,ignoreInitial:!0,recursive:!1},D=ge.dirname(f),T=f;await this.watchDirectories([D],d,i,T,g)}}catch(l){this.error(l)}return a}async watchDirectory(t,r,i,n,o){if(!this.isClosed()&&!this.isIgnored(t,r.ignore)){if(!r.recursive||oe&&r.native!==!1)return this.watchersLock(()=>this.watchDirectories([t],r,i,n,o));{r={...r,recursive:!0};let a=r.depth??se,f=r.limit??Ne,[l]=await y.fs.readdir(t,r.ignore,a,f,this._closeSignal,r.readdirMap);return this.watchersLock(async()=>{let u=await this.watchDirectories([t],r,i,n,o);if(l.length){let h=y.fs.getDepth(t);for(let g of l){let p=y.fs.getDepth(g),d=Math.max(0,a-(p-h)),D={...r,depth:d};await this.watchDirectories([g],D,i,n,o||u)}}})}}}async watchFileOnce(t,r,i){if(this.isClosed()||(r={...r,ignoreInitial:!1},this.subwatcherExists(t,r)))return;let n={targetPath:t,options:r},o=s((u,h)=>{h===t&&(l(),i())},"handler"),a=new e(o),f=s(()=>{this._subwatchers.add(n),this.on(F.CLOSE,l),a.watchFile(t,r,o)},"start"),l=s(()=>{this._subwatchers.delete(n),this.removeListener(F.CLOSE,l),a.close()},"stop");return f()}async watchFile(t,r,i){if(this.isClosed()||this.isIgnored(t,r.ignore))return;r={...r,recursive:!1};let n=ge.dirname(t);return this.watchDirectory(n,r,i,t)}async watchPollingOnce(t,r,i){if(this.isClosed())return;let n=!1,o=new wt,a=await this.watchPolling(t,r,async()=>{n||!(await o.update(t,r.pollingTimeout)).length||n||(n=!0,a(),i())})}async watchPolling(t,r,i){if(this.isClosed())return y.lang.noop;if(this.pollerExists(t,r))return y.lang.noop;let n={...r,interval:r.pollingInterval??fr},o={targetPath:t,options:r},a=s(()=>{this._pollers.add(o),this.on(F.CLOSE,f),gt.watchFile(t,n,i)},"start"),f=s(()=>{this._pollers.delete(o),this.removeListener(F.CLOSE,f),gt.unwatchFile(t,i)},"stop");return y.lang.attempt(a),()=>y.lang.attempt(f)}async watchUnknownChild(t,r,i){if(this.isClosed())return;let n=s(()=>this.watchPath(t,r,i),"watch");return this.watchFileOnce(t,r,n)}async watchUnknownTarget(t,r,i){if(this.isClosed())return;let n=s(()=>this.watchPath(t,r,i),"watch");return this.watchPollingOnce(t,r,n)}async watchPaths(t,r,i){if(this.isClosed())return;if(t=y.lang.uniq(t).sort(),t.every((o,a)=>t.every((f,l)=>l===a||!y.fs.isSubPath(o,f))))await Promise.all(t.map(o=>this.watchPath(o,r,i)));else for(let o of t)await this.watchPath(o,r,i)}async watchPath(t,r,i){if(this.isClosed()||(t=ge.resolve(t),this.isIgnored(t,r.ignore)))return;let n=await y.fs.poll(t,r.pollingTimeout);if(n){if(n.isFile())return this.watchFile(t,r,i);if(n.isDirectory())return this.watchDirectory(t,r,i);this.error(`"${t}" is not supported`)}else{let o=ge.dirname(t);return(await y.fs.poll(o,r.pollingTimeout))?.isDirectory()?this.watchUnknownChild(t,r,i):this.watchUnknownTarget(t,r,i)}}async watch(t,r,i=y.lang.noop){if(y.lang.isFunction(t))return this.watch([],{},t);if(y.lang.isUndefined(t))return this.watch([],r,i);if(y.lang.isFunction(r))return this.watch(t,{},r);if(y.lang.isUndefined(r))return this.watch(t,{},i);if(this.isClosed())return;this.isReady()&&(r.readdirMap=void 0);let n=y.lang.castArray(t);n.forEach(o=>this._roots.add(o)),await this.watchPaths(n,r,i),!this.isClosed()&&(i!==y.lang.noop&&this.on(F.ALL,i),r.readdirMap=void 0,this.ready())}},Dr=Et;var ln=Be(Jr(),1);c();var vt=s((e,...t)=>{let r=zt(e,...t);je.isInteractive?je.updateFooter(r):je.writeStdout(r)},"footer");c();var sn=Be(nn(),1);var on=s((e,t)=>{e.log.info("notifying user",{notification:t}),sn.default.notify({title:"Gadget",contentImage:rt("favicon-128@4x.png"),icon:rt("favicon-128@4x.png"),sound:!0,timeout:!1,...t},r=>{r&&e.log.warn("error notifying user",{notification:t})})},"notify");var Su={...ir,...Zt,"--prefer":rr,"--file-push-delay":{type:Number,default:(0,fe.default)("100ms")},"--file-watch-debounce":{type:Number,default:(0,fe.default)("300ms")},"--file-watch-poll-interval":{type:Number,default:(0,fe.default)("3s")},"--file-watch-poll-timeout":{type:Number,default:(0,fe.default)("20s")},"--file-watch-rename-timeout":{type:Number,default:(0,fe.default)("1.25s")},"--no-logs":Boolean},_u=s(e=>B`
4
4
  Clones your Gadget environment's files to your local machine and keeps it in sync, in order to
@@ -55,4 +55,4 @@ ${i.sprint({indent:4})}
55
55
 
56
56
  Waiting for file changes${Vt.ellipsis} {gray Press Ctrl+C to stop}
57
57
  `})},"run");export{Su as args,xu as run,_u as usage};
58
- //# sourceMappingURL=dev-KUTYS7OU.js.map
58
+ //# sourceMappingURL=dev-M2PFPQXX.js.map